Skip to content

draw.io is a JavaScript, client-side editor for general diagramming.

29.2.2 release

David Benson0f3317f486bc
diff --git a/ChangeLog b/ChangeLog
index 264e5600d..f81900228 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+01-DEC-2025: 29.2.2
+
+- AI and licensing tuning
+
+27-NOV-2025: 29.2.1
+
+- Fixes possible NPE
+
+27-NOV-2025: 29.2.0
+
+- Enhances pagecount and pagenumber placeholders [jgraph/drawio#3378]
+- Adds support for CSV in create hash property [jgraph/drawio#5273]
+- Replaces smart template section with generate window
+
+21-NOV-2025: 29.1.1
+
+- [conf connect] License tuning
+
+19-NOV-2025: 29.1.0
+
+- Makes attribute encoding deterministic [jgraph/drawio#1556]
+
15-NOV-2025: 29.0.3
- Math base path and CSP corrections
diff --git a/VERSION b/VERSION
index 7f53d66ac..1b428738b 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-29.0.3
\ No newline at end of file
+29.2.2
\ 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 8ed1e1170..fce7db6b2 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -68,7 +68,7 @@ b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlPa
"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);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"29.0.3",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.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"29.2.2",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:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -1897,7 +1897,8 @@ mxCodec.prototype.decodeCell=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&
mxCodec.prototype.insertIntoGraph=function(a){var b=a.parent,c=a.getTerminal(!0),d=a.getTerminal(!1);a.setTerminal(null,!1);a.setTerminal(null,!0);a.parent=null;if(null!=b){if(b==a)throw Error(b.id+": Self Reference");b.insert(a)}null!=c&&c.insertEdge(a,!0);null!=d&&d.insertEdge(a,!1)};mxCodec.prototype.setAttribute=function(a,b,c){null!=b&&null!=c&&a.setAttribute(b,c)};
function mxObjectCodec(a,b,c,d){this.template=a;this.exclude=null!=b?b:[];this.idrefs=null!=c?c:[];this.mapping=null!=d?d:[];this.reverse={};for(var e in this.mapping)this.reverse[this.mapping[e]]=e}mxObjectCodec.allowEval=!1;mxObjectCodec.prototype.template=null;mxObjectCodec.prototype.exclude=null;mxObjectCodec.prototype.idrefs=null;mxObjectCodec.prototype.mapping=null;mxObjectCodec.prototype.reverse=null;mxObjectCodec.prototype.getName=function(){return mxUtils.getFunctionName(this.template.constructor)};
mxObjectCodec.prototype.cloneTemplate=function(){return new this.template.constructor};mxObjectCodec.prototype.getFieldName=function(a){if(null!=a){var b=this.reverse[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.getAttributeName=function(a){if(null!=a){var b=this.mapping[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.isExcluded=function(a,b,c,d){return b==mxObjectIdentity.FIELD_NAME||0<=mxUtils.indexOf(this.exclude,b)};
-mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));for(var d in b){var e=d,f=b[e];null==f||this.isExcluded(b,e,f,!0)||(mxUtils.isInteger(e)&&(e=null),this.encodeValue(a,b,e,f,c))}};
+mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};
+mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));var d=[],e;for(e in b){var f=e,g=b[f];null==g||this.isExcluded(b,f,g,!0)||(mxUtils.isInteger(f)?this.encodeValue(a,b,null,g,c):d.push({name:f,value:g}))}d.sort(function(k,l){return k.name<l.name?-1:k.name>l.name?1:0});for(e=0;e<d.length;e++)this.encodeValue(a,b,d[e].name,d[e].value,c)};
mxObjectCodec.prototype.encodeValue=function(a,b,c,d,e){if(null!=d){if(this.isReference(b,c,d,!0)){var f=a.getId(d);if(null==f){mxLog.warn("mxObjectCodec.encode: No ID for "+this.getName()+"."+c+"="+d);return}d=f}f=this.template[c];if(null==c||a.encodeDefaults||f!=d)c=this.getAttributeName(c),this.writeAttribute(a,b,c,d,e)}};mxObjectCodec.prototype.writeAttribute=function(a,b,c,d,e){"object"!=typeof d?this.writePrimitiveAttribute(a,b,c,d,e):this.writeComplexAttribute(a,b,c,d,e)};
mxObjectCodec.prototype.writePrimitiveAttribute=function(a,b,c,d,e){d=this.convertAttributeToXml(a,b,c,d,e);null==c?(b=a.document.createElement("add"),"function"==typeof d?b.appendChild(a.document.createTextNode(d)):a.setAttribute(b,"value",d),e.appendChild(b)):"function"!=typeof d&&a.setAttribute(e,c,d)};
mxObjectCodec.prototype.writeComplexAttribute=function(a,b,c,d,e){a=a.encode(d);null!=a?(null!=c&&a.setAttribute("as",c),e.appendChild(a)):mxLog.warn("mxObjectCodec.encode: No node for "+this.getName()+"."+c+": "+d)};mxObjectCodec.prototype.convertAttributeToXml=function(a,b,c,d){this.isBooleanAttribute(a,b,c,d)&&(d=1==d?"1":"0");return d};mxObjectCodec.prototype.isBooleanAttribute=function(a,b,c,d){return"undefined"==typeof d.length&&(1==d||0==d)};
@@ -1958,7 +1959,8 @@ Editor.expandMoreImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy
Editor.extensionImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTguOCAyMUg1cS0uODI1IDAtMS40MTMtLjU4N1EzIDE5LjgyNSAzIDE5di0zLjhxMS4yIDAgMi4xLS43NjIuOS0uNzYzLjktMS45MzggMC0xLjE3NS0uOS0xLjkzOFE0LjIgOS44IDMgOS44VjZxMC0uODI1LjU4Ny0xLjQxMlE0LjE3NSA0IDUgNGg0cTAtMS4wNS43MjUtMS43NzVRMTAuNDUgMS41IDExLjUgMS41cTEuMDUgMCAxLjc3NS43MjVRMTQgMi45NSAxNCA0aDRxLjgyNSAwIDEuNDEzLjU4OFEyMCA1LjE3NSAyMCA2djRxMS4wNSAwIDEuNzc1LjcyNS43MjUuNzI1LjcyNSAxLjc3NSAwIDEuMDUtLjcyNSAxLjc3NVEyMS4wNSAxNSAyMCAxNXY0cTAgLjgyNS0uNTg3IDEuNDEzUTE4LjgyNSAyMSAxOCAyMWgtMy44cTAtMS4yNS0uNzg3LTIuMTI1UTEyLjYyNSAxOCAxMS41IDE4dC0xLjkxMi44NzVROC44IDE5Ljc1IDguOCAyMVpNNSAxOWgyLjEyNXEuNi0xLjY1IDEuOTI1LTIuMzI1UTEwLjM3NSAxNiAxMS41IDE2cTEuMTI1IDAgMi40NS42NzUgMS4zMjUuNjc1IDEuOTI1IDIuMzI1SDE4di02aDJxLjIgMCAuMzUtLjE1LjE1LS4xNS4xNS0uMzUgMC0uMi0uMTUtLjM1UTIwLjIgMTIgMjAgMTJoLTJWNmgtNlY0cTAtLjItLjE1LS4zNS0uMTUtLjE1LS4zNS0uMTUtLjIgMC0uMzUuMTVRMTEgMy44IDExIDR2Mkg1djIuMnExLjM1LjUgMi4xNzUgMS42NzVROCAxMS4wNSA4IDEyLjVxMCAxLjQyNS0uODI1IDIuNlQ1IDE2LjhabTcuNzUtNy43NVoiLz48L3N2Zz4=";
Editor.colorDropperImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTYgNDJ2LTguNGwxOC44NS0xOC44NS0zLjYtMy42TDIzLjMgOS4xbDQuNiA0LjZMMzUgNi42cS41NS0uNTUgMS4xNzUtLjU1dDEuMTc1LjU1bDQuMDUgNC4wNXEuNTUuNTUuNTUgMS4xNzVUNDEuNCAxM2wtNy4xIDcuMSA0LjYgNC42LTIuMDUgMi4wNS0zLjYtMy42TDE0LjQgNDJabTMtM2g0LjM1TDMxLjEgMjEuMjVsLTQuMzUtNC4zNUw5IDM0LjY1Wm0yMy4xNS0yMSA2LjItNi4yLTIuMTUtMi4xNS02LjIgNi4yWm0wIDBMMzAgMTUuODUgMzIuMTUgMThaIi8+PC9zdmc+";
Editor.magnifyImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik03ODQtMTIwIDUzMi0zNzJxLTMwIDI0LTY5IDM4dC04MyAxNHEtMTA5IDAtMTg0LjUtNzUuNVQxMjAtNTgwcTAtMTA5IDc1LjUtMTg0LjVUMzgwLTg0MHExMDkgMCAxODQuNSA3NS41VDY0MC01ODBxMCA0NC0xNCA4M3QtMzggNjlsMjUyIDI1Mi01NiA1NlpNMzgwLTQwMHE3NSAwIDEyNy41LTUyLjVUNTYwLTU4MHEwLTc1LTUyLjUtMTI3LjVUMzgwLTc2MHEtNzUgMC0xMjcuNSA1Mi41VDIwMC01ODBxMCA3NSA1Mi41IDEyNy41VDM4MC00MDBaIi8+PC9zdmc+";
-Editor.sendImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik0xMjAtMTYwdi02NDBsNzYwIDMyMC03NjAgMzIwWm04MC0xMjAgNDc0LTIwMC00NzQtMjAwdjE0MGwyNDAgNjAtMjQwIDYwdjE0MFptMCAwdi00MDAgNDAwWiIvPjwvc3ZnPg==";Editor.sparklesImage="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KDTwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIFRyYW5zZm9ybWVkIGJ5OiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4KPHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBpZD0iaWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgZmlsbD0iI2ZjZmY0NyIgZGF0YS1kYXJrcmVhZGVyLWlubGluZS1maWxsPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6ICNkNmQ4NTA7IC0tZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlOiAjZDZkODUwOyIgc3Ryb2tlPSIjZmNmZjQ3IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIj4KDTxnIGlkPSJTVkdSZXBvX2JnQ2FycmllciIgc3Ryb2tlLXdpZHRoPSIwIi8+Cg08ZyBpZD0iU1ZHUmVwb190cmFjZXJDYXJyaWVyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KDTxnIGlkPSJTVkdSZXBvX2ljb25DYXJyaWVyIj4KDTxwYXRoIGQ9Ik0yNTkuOTIsMjYyLjkxLDIxNi40LDE0OS43N2E5LDksMCwwLDAtMTYuOCwwTDE1Ni4wOCwyNjIuOTFhOSw5LDAsMCwxLTUuMTcsNS4xN0wzNy43NywzMTEuNmE5LDksMCwwLDAsMCwxNi44bDExMy4xNCw0My41MmE5LDksMCwwLDEsNS4xNyw1LjE3TDE5OS42LDQ5MC4yM2E5LDksMCwwLDAsMTYuOCwwbDQzLjUyLTExMy4xNGE5LDksMCwwLDEsNS4xNy01LjE3TDM3OC4yMywzMjguNGE5LDksMCwwLDAsMC0xNi44TDI2NS4wOSwyNjguMDhBOSw5LDAsMCwxLDI1OS45MiwyNjIuOTFaIiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KDTxwb2x5Z29uIHBvaW50cz0iMTA4IDY4IDg4IDE2IDY4IDY4IDE2IDg4IDY4IDEwOCA4OCAxNjAgMTA4IDEwOCAxNjAgODggMTA4IDY4IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KDTxwb2x5Z29uIHBvaW50cz0iNDI2LjY3IDExNy4zMyA0MDAgNDggMzczLjMzIDExNy4zMyAzMDQgMTQ0IDM3My4zMyAxNzAuNjcgNDAwIDI0MCA0MjYuNjcgMTcwLjY3IDQ5NiAxNDQgNDI2LjY3IDExNy4zMyIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMTkuOTY4IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6ICMxODFhMWI7Ii8+Cg08L2c+Cg08L3N2Zz4=";
+Editor.sendImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik0xMjAtMTYwdi02NDBsNzYwIDMyMC03NjAgMzIwWm04MC0xMjAgNDc0LTIwMC00NzQtMjAwdjE0MGwyNDAgNjAtMjQwIDYwdjE0MFptMCAwdi00MDAgNDAwWiIvPjwvc3ZnPg==";Editor.sparklesImage="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjU5LjkyLDI2Mi45MSwyMTYuNCwxNDkuNzdhOSw5LDAsMCwwLTE2LjgsMEwxNTYuMDgsMjYyLjkxYTksOSwwLDAsMS01LjE3LDUuMTdMMzcuNzcsMzExLjZhOSw5LDAsMCwwLDAsMTYuOGwxMTMuMTQsNDMuNTJhOSw5LDAsMCwxLDUuMTcsNS4xN0wxOTkuNiw0OTAuMjNhOSw5LDAsMCwwLDE2LjgsMGw0My41Mi0xMTMuMTRhOSw5LDAsMCwxLDUuMTctNS4xN0wzNzguMjMsMzI4LjRhOSw5LDAsMCwwLDAtMTYuOEwyNjUuMDksMjY4LjA4QTksOSwwLDAsMSwyNTkuOTIsMjYyLjkxWiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iNDAiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KPHBvbHlnb24gcG9pbnRzPSIxMDggNjggODggMTYgNjggNjggMTYgODggNjggMTA4IDg4IDE2MCAxMDggMTA4IDE2MCA4OCAxMDggNjgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzAwMDAwMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjMwIi8+Cjxwb2x5Z29uIHBvaW50cz0iNDI2LjY3IDExNy4zMyA0MDAgNDggMzczLjMzIDExNy4zMyAzMDQgMTQ0IDM3My4zMyAxNzAuNjcgNDAwIDI0MCA0MjYuNjcgMTcwLjY3IDQ5NiAxNDQgNDI2LjY3IDExNy4zMyIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMzAiLz4KPC9zdmc+";
+Editor.thinSparklesImage="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjU5LjkyLDI2Mi45MSwyMTYuNCwxNDkuNzdhOSw5LDAsMCwwLTE2LjgsMEwxNTYuMDgsMjYyLjkxYTksOSwwLDAsMS01LjE3LDUuMTdMMzcuNzcsMzExLjZhOSw5LDAsMCwwLDAsMTYuOGwxMTMuMTQsNDMuNTJhOSw5LDAsMCwxLDUuMTcsNS4xN0wxOTkuNiw0OTAuMjNhOSw5LDAsMCwwLDE2LjgsMGw0My41Mi0xMTMuMTRhOSw5LDAsMCwxLDUuMTctNS4xN0wzNzguMjMsMzI4LjRhOSw5LDAsMCwwLDAtMTYuOEwyNjUuMDksMjY4LjA4QTksOSwwLDAsMSwyNTkuOTIsMjYyLjkxWiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMTkuOTY4IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6ICMxODFhMWI7Ii8+Cjxwb2x5Z29uIHBvaW50cz0iMTA4IDY4IDg4IDE2IDY4IDY4IDE2IDg4IDY4IDEwOCA4OCAxNjAgMTA4IDEwOCAxNjAgODggMTA4IDY4IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiLz4KPHBvbHlnb24gcG9pbnRzPSI0MjYuNjcgMTE3LjMzIDQwMCA0OCAzNzMuMzMgMTE3LjMzIDMwNCAxNDQgMzczLjMzIDE3MC42NyA0MDAgMjQwIDQyNi42NyAxNzAuNjcgNDk2IDE0NCA0MjYuNjcgMTE3LjMzIiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiLz4KPC9zdmc+";
Editor.arrowRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDAwLTI4MHYtNDAwbDIwMCAyMDAtMjAwIDIwMFoiLz48L3N2Zz4=";Editor.arrowDownImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTM2MCAyODAtNTYwaDQwMEw0ODAtMzYwWiIvPjwvc3ZnPg==";
Editor.arrowUpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJtMjgwLTQwMCAyMDAtMjAwIDIwMCAyMDBIMjgwWiIvPjwvc3ZnPg==";Editor.refreshImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTE2MHEtMTM0IDAtMjI3LTkzdC05My0yMjdxMC0xMzQgOTMtMjI3dDIyNy05M3E2OSAwIDEzMiAyOC41VDcyMC02OTB2LTExMGg4MHYyODBINTIwdi04MGgxNjhxLTMyLTU2LTg3LjUtODhUNDgwLTcyMHEtMTAwIDAtMTcwIDcwdC03MCAxNzBxMCAxMDAgNzAgMTcwdDE3MCA3MHE3NyAwIDEzOS00NHQ4Ny0xMTZoODRxLTI4IDEwNi0xMTQgMTczdC0xOTYgNjdaIi8+PC9zdmc+";
Editor.checkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzgyLTI0MCAxNTQtNDY4bDU3LTU3IDE3MSAxNzEgMzY3LTM2NyA1NyA1Ny00MjQgNDI0WiIvPjwvc3ZnPg==";Editor.dockRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoNTYwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2NTYwcTAgMzMtMjMuNSA1Ni41VDc2MC0xMjBIMjAwWm0xMjAtODB2LTU2MEgyMDB2NTYwaDEyMFptODAgMGgzNjB2LTU2MEg0MDB2NTYwWm0tODAgMEgyMDBoMTIwWiIvPjwvc3ZnPg==";
@@ -1994,11 +1996,12 @@ Editor.removeRowImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy5
Editor.checkmarkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjJweCIgaGVpZ2h0PSIxOHB4IiB2ZXJzaW9uPSIxLjEiPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDQgMCkiIGQ9Ik03LjE4MSwxNS4wMDdhMSwxLDAsMCwxLS43OTMtMC4zOTFMMy4yMjIsMTAuNUExLDEsMCwxLDEsNC44MDgsOS4yNzRMNy4xMzIsMTIuM2w2LjA0NC04Ljg2QTEsMSwwLDEsMSwxNC44Myw0LjU2OWwtNi44MjMsMTBhMSwxLDAsMCwxLS44LjQzN0g3LjE4MVoiIGZpbGw9IiMwMDAwMDAiLz48L3N2Zz4=";
Editor.swapImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzIwLTQ0MHYtMjg3TDIxNy02MjRsLTU3LTU2IDIwMC0yMDAgMjAwIDIwMC01NyA1Ni0xMDMtMTAzdjI4N2gtODBaTTYwMC04MCA0MDAtMjgwbDU3LTU2IDEwMyAxMDN2LTI4N2g4MHYyODdsMTAzLTEwMyA1NyA1Nkw2MDAtODBaIi8+PC9zdmc+";Editor.copyImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNzYwLTIwMEgzMjBxLTMzIDAtNTYuNS0yMy41VDI0MC0yODB2LTU2MHEwLTMzIDIzLjUtNTYuNVQzMjAtOTIwaDI4MGwyNDAgMjQwdjQwMHEwIDMzLTIzLjUgNTYuNVQ3NjAtMjAwWk01NjAtNjQwdi0yMDBIMzIwdjU2MGg0NDB2LTM2MEg1NjBaTTE2MC00MHEtMzMgMC01Ni41LTIzLjVUODAtMTIwdi01NjBoODB2NTYwaDQ0MHY4MEgxNjBabTE2MC04MDB2MjAwLTIwMCA1NjAtNTYwWiIvPjwvc3ZnPg==";
Editor.doubleArrowUpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJtMjk2LTIyNC01Ni01NiAyNDAtMjQwIDI0MCAyNDAtNTYgNTYtMTg0LTE4My0xODQgMTgzWm0wLTI0MC01Ni01NiAyNDAtMjQwIDI0MCAyNDAtNTYgNTYtMTg0LTE4My0xODQgMTgzWiIvPjwvc3ZnPg==";Editor.doubleArrowDownImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTIwMCAyNDAtNDQwbDU2LTU2IDE4NCAxODMgMTg0LTE4MyA1NiA1Ni0yNDAgMjQwWm0wLTI0MEwyNDAtNjgwbDU2LTU2IDE4NCAxODMgMTg0LTE4MyA1NiA1Ni0yNDAgMjQwWiIvPjwvc3ZnPg==";
-Editor.opacityImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMWYxZjFmIj48cGF0aCBkPSJNNDgwLTEyMHEtMTMzIDAtMjI2LjUtOTJUMTYwLTQzNnEwLTY1IDI1LTEyMS41VDI1NC02NThsMjI2LTIyMiAyMjYgMjIycTQ0IDQ0IDY5IDEwMC41VDgwMC00MzZxMCAxMzItOTMuNSAyMjRUNDgwLTEyMFpNMjQyLTQwMGg0NzRxMTItNzItMTMuNS0xMjNUNjUwLTYwMEw0ODAtNzY4IDMxMC02MDBxLTI3IDI2LTUzIDc3dC0xNSAxMjNaIi8+PC9zdmc+";
+Editor.opacityImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMWYxZjFmIj48cGF0aCBkPSJNNDgwLTEyMHEtMTMzIDAtMjI2LjUtOTJUMTYwLTQzNnEwLTY1IDI1LTEyMS41VDI1NC02NThsMjI2LTIyMiAyMjYgMjIycTQ0IDQ0IDY5IDEwMC41VDgwMC00MzZxMCAxMzItOTMuNSAyMjRUNDgwLTEyMFpNMjQyLTQwMGg0NzRxMTItNzItMTMuNS0xMjNUNjUwLTYwMEw0ODAtNzY4IDMxMC02MDBxLTI3IDI2LTUzIDc3dC0xNSAxMjNaIi8+PC9zdmc+";Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMWYxZjFmIj48cGF0aCBkPSJNMjQwLTgwcS0zMyAwLTU2LjUtMjMuNVQxNjAtMTYwdi00MDBxMC0zMyAyMy41LTU2LjVUMjQwLTY0MGgxMjB2ODBIMjQwdjQwMGg0ODB2LTQwMEg2MDB2LTgwaDEyMHEzMyAwIDU2LjUgMjMuNVQ4MDAtNTYwdjQwMHEwIDMzLTIzLjUgNTYuNVQ3MjAtODBIMjQwWm0yMDAtMjQwdi00NDdsLTY0IDY0LTU2LTU3IDE2MC0xNjAgMTYwIDE2MC01NiA1Ny02NC02NHY0NDdoLTgwWiIvPjwvc3ZnPg==";
Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];
Editor.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=[];Editor.ctrlKey=mxClient.IS_MAC?"⌘":"Ctrl";Editor.altKey=mxClient.IS_MAC?"⌥":"Alt";Editor.shiftKey=mxClient.IS_MAC?"⇧":"Shift";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;
Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;Editor.enableNativeClipboard=window==window.top&&null!=navigator.clipboard&&null!=navigator.clipboard.read;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#121212";Editor.darkColorVar="--ge-dark-color";Editor.fontSizeUnit="px";Editor.transitionDelay=.1;Editor.pageSizeUnit=mxConstants.INCHES;Editor.isDarkMode=function(){return Editor.darkMode};
Editor.isPngDataUrl=function(a){return null!=a&&"data:image/png;"==a.substring(0,15)};Editor.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};Editor.convertHtmlToText=function(a){if(null!=a){var b=document.createElement("div");b.innerHTML=Graph.sanitizeHtml(a);return mxUtils.extractTextWithWhitespace(b.childNodes)}return null};
+Editor.extractGraphModelFromText=function(a){function b(d){var h=d.indexOf("```");0<=h&&(d=d.substring(d,0,h+6));return d}function e(d){var h=d.lastIndexOf("```");0<=h&&(d=d.substring(h+3));return d}var f=a.indexOf("<mxGraphModel "),g=a.indexOf("</mxGraphModel>");0>f&&(f=a.indexOf("<mxGraphModel>"));return 0<=f&&g>f?[mxUtils.trim(b(a.substring(0,f))),a.substring(f,g+15),mxUtils.trim(e(a.substring(g+15)))]:[a,"",""]};
Editor.extractGraphModelFromPng=function(a){var b=null;try{var e=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(e):Base64.decode(e,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(g,d,h){g=f.substring(g+8,g+8+h);"zTXt"==d?(h=g.indexOf(String.fromCharCode(0)),"mxGraphModel"==g.substring(0,h)&&(g=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(h+2)),{to:"string"}).replace(/\+/g," "),null!=g&&0<g.length&&(b=g))):"tEXt"==d&&(g=g.split(String.fromCharCode(0)),1<g.length&&("mxGraphModel"==
g[0]||"mxfile"==g[0])&&(b=g[1]));if(null!=b||"IDAT"==d)return!0}))}catch(g){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};Editor.getLabelForStylename=function(a){var b=a.match(/^([A-Za-z]*)(\d*)$/);null!=b&&1<b.length&&(a=mxUtils.trim(b[1].replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,function(e){return e.toUpperCase()}).replace(/Color[s]?/g,"")),a=mxUtils.trim(a+(0<b[2].length?" ("+b[2]+")":"")));return a};
Editor.soundex=function(a){if(null==a||0==a.length)return"";var b=[],e=1;b[0]=a[0].toUpperCase();for(var f=1,g=a.length;f<g;f++){var d=a[f].toUpperCase().charCodeAt(0)-65;if(0<=d&&25>=d&&"0"!="01230120022455012603010202"[d]&&("01230120022455012603010202"[d]!=b[e-1]&&(b[e]="01230120022455012603010202"[d],e++),3<e))break}if(3>=e)for(;3>=e;)b[e]="0",e++;return b.join("")};
@@ -2037,8 +2040,8 @@ this.container.parentNode.removeChild(this.container)};
var ErrorDialog=function(a,b,e,f,g,d,h,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div");w.style.textAlign="center";if(null!=b){var y=document.createElement("div");y.style.padding="0px";y.style.margin="0px";y.style.fontSize="18px";y.style.paddingBottom="16px";y.style.marginBottom="10px";y.style.borderBottom="1px solid #c0c0c0";y.style.color="gray";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.overflow="hidden";mxUtils.write(y,b);y.setAttribute("title",b);w.appendChild(y)}b=
document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"<br/>"));b.innerHTML=Graph.sanitizeHtml(e);w.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=u&&u()}),k.className="geBtn",e.appendChild(k));
var A=mxUtils.button(f,function(){p&&a.hideDialog();null!=g&&g()});A.className="geBtn";e.appendChild(A);null!=h&&(f=mxUtils.button(h,function(){p&&a.hideDialog();null!=m&&m()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){A.focus()};w.appendChild(e);this.container=w},PrintDialog=function(a,b,e,f){this.create(a,b,e,f)};
-PrintDialog.prototype.create=function(a){function b(A){var D=h.checked||k.checked,E=parseInt(w.value)/100;isNaN(E)&&(E=1,w.value="100%");mxClient.IS_SF&&(E*=.75);var F=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/e.pageScale;if(D){var M=h.checked?1:parseInt(u.value);isNaN(M)||(H=mxUtils.getScaleForPageCount(M,e,F))}var N=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*E);F.height=Math.ceil(F.height*E);H*=E;!D&&e.pageVisible?(E=e.getPageLayout(),M-=E.x*F.width,N-=E.y*F.height):
-D=!0;D=PrintDialog.createPrintPreview(e,H,F,0,M,N,D);D.open();A&&PrintDialog.printPreview(D)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var h=document.createElement("input");h.setAttribute("type","checkbox");var m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(h);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));
+PrintDialog.prototype.create=function(a){function b(A){var E=h.checked||k.checked,D=parseInt(w.value)/100;isNaN(D)&&(D=1,w.value="100%");mxClient.IS_SF&&(D*=.75);var F=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/e.pageScale;if(E){var M=h.checked?1:parseInt(u.value);isNaN(M)||(H=mxUtils.getScaleForPageCount(M,e,F))}var N=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*D);F.height=Math.ceil(F.height*D);H*=D;!E&&e.pageVisible?(D=e.getPageLayout(),M-=D.x*F.width,N-=D.y*F.height):
+E=!0;E=PrintDialog.createPrintPreview(e,H,F,0,M,N,E);E.open();A&&PrintDialog.printPreview(E)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var h=document.createElement("input");h.setAttribute("type","checkbox");var m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(h);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));
m.appendChild(p);mxEvent.addListener(p,"click",function(A){h.checked=!h.checked;k.checked=!h.checked;mxEvent.consume(A)});mxEvent.addListener(h,"change",function(){k.checked=!h.checked});d.appendChild(m);g.appendChild(d);d=d.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(k);p=document.createElement("span");mxUtils.write(p," "+mxResources.get("posterPrint")+":");m.appendChild(p);mxEvent.addListener(p,
"click",function(A){k.checked=!k.checked;h.checked=!k.checked;mxEvent.consume(A)});d.appendChild(m);var u=document.createElement("input");u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.setAttribute("size","4");u.setAttribute("disabled","disabled");u.style.width="50px";m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(u);mxUtils.write(m," "+mxResources.get("pages")+" (max)");d.appendChild(m);g.appendChild(d);mxEvent.addListener(k,"change",
function(){k.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled");h.checked=!k.checked});d=d.cloneNode(!1);m=document.createElement("td");mxUtils.write(m,mxResources.get("pageScale")+":");d.appendChild(m);m=document.createElement("td");var w=document.createElement("input");w.setAttribute("value","100 %");w.setAttribute("size","5");w.style.width="50px";m.appendChild(w);d.appendChild(m);g.appendChild(d);d=document.createElement("tr");m=document.createElement("td");m.colSpan=2;
@@ -2046,18 +2049,18 @@ m.style.paddingTop="20px";m.setAttribute("align","right");p=mxUtils.button(mxRes
m.appendChild(p);d.appendChild(m);g.appendChild(d);f.appendChild(g);this.container=f};PrintDialog.printPreview=function(a){try{null!=a.wnd&&window.setTimeout(function(){a.wnd.focus();a.wnd.print();a.wnd.close()},500)}catch(b){}};
PrintDialog.createPrintPreview=function(a,b,e,f,g,d,h){b=new mxPrintPreview(a,b,e,f,g,d);b.title=mxResources.get("preview");b.addPageCss=!mxClient.IS_SF;b.printBackgroundImage=!0;b.autoOrigin=h;h=a.background;if(null==h||""==h||h==mxConstants.NONE)h="#ffffff";b.backgroundColor=h;var m=b.isTextLabel;b.isTextLabel=function(k){return"geHint"==!k.className&&m.apply(this,arguments)};var p=b.getLinkForCellState;b.getLinkForCellState=function(k){return a.getAbsoluteUrl(p.apply(this,arguments))};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){var E=w;null!=E&&null!=E.originalSrc&&(E=a.createImageForPageLink(E.originalSrc,null));null!=E&&null!=E.src?(u.style.backgroundImage="url("+E.src+")",u.style.display="inline-block"):(u.style.backgroundImage="",u.style.display="none");u.style.backgroundColor="";null!=y&&y!=mxConstants.NONE&&(u.style.backgroundColor=y,u.style.display="inline-block")}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");
+var PageSetupDialog=function(a){function b(){var D=w;null!=D&&null!=D.originalSrc&&(D=a.createImageForPageLink(D.originalSrc,null));null!=D&&null!=D.src?(u.style.backgroundImage="url("+D.src+")",u.style.display="inline-block"):(u.style.backgroundImage="",u.style.display="none");u.style.backgroundColor="";null!=y&&y!=mxConstants.NONE&&(u.style.backgroundColor=y,u.style.display="inline-block")}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");
var d=document.createElement("tr");var h=document.createElement("td");h.style.verticalAlign="top";h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("paperSize")+":");d.appendChild(h);h=document.createElement("td");h.style.verticalAlign="top";h.style.fontSize="10pt";var m=PageSetupDialog.addPageFormatPanel(h,"pagesetupdialog",e.pageFormat);d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");mxUtils.write(h,mxResources.get("gridSize")+":");d.appendChild(h);
-h=document.createElement("td");h.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=e.getGridSize();h.appendChild(p);mxEvent.addListener(p,"change",function(){var E=parseInt(p.value);p.value=Math.max(1,isNaN(E)?e.getGridSize():E)});d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");mxUtils.write(h,mxResources.get("background")+":");
+h=document.createElement("td");h.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=e.getGridSize();h.appendChild(p);mxEvent.addListener(p,"change",function(){var D=parseInt(p.value);p.value=Math.max(1,isNaN(D)?e.getGridSize():D)});d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");mxUtils.write(h,mxResources.get("background")+":");
d.appendChild(h);h=document.createElement("td");var k=document.createElement("button");k.className="geBtn";k.style.margin="0px";mxUtils.write(k,mxResources.get("change")+"...");var u=document.createElement("div");u.style.display="inline-block";u.style.verticalAlign="middle";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";u.style.backgroundSize="contain";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.height="32px";
-u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var w=e.backgroundImage,y=e.background,A=e.shadowVisible,D=function(E){a.showBackgroundImageDialog(function(F,H,M,N){H||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),w=F,A=N);y=M;b()},w,y,!0);mxEvent.consume(E)};mxEvent.addListener(k,"click",D);mxEvent.addListener(u,"click",D);b();h.appendChild(u);h.appendChild(k);d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");
-h.colSpan=2;h.style.paddingTop="16px";h.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&h.appendChild(k);D=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var E=parseInt(p.value);isNaN(E)||e.gridSize===E||e.setGridSize(E);E=new ChangePageSetup(a,y,w,m.get());E.ignoreColor=e.background==y;E.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=w?w.src:null);null!=A&&
-(E.shadowVisible=A);e.pageFormat.width==E.previousFormat.width&&e.pageFormat.height==E.previousFormat.height&&E.ignoreColor&&E.ignoreImage&&E.shadowVisible==e.shadowVisible||e.model.execute(E)});D.className="geBtn gePrimaryBtn";h.appendChild(D);a.editor.cancelFirst||h.appendChild(k);d.appendChild(h);g.appendChild(d);f.appendChild(g);this.container=f};
+u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var w=e.backgroundImage,y=e.background,A=e.shadowVisible,E=function(D){a.showBackgroundImageDialog(function(F,H,M,N){H||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),w=F,A=N);y=M;b()},w,y,!0);mxEvent.consume(D)};mxEvent.addListener(k,"click",E);mxEvent.addListener(u,"click",E);b();h.appendChild(u);h.appendChild(k);d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");
+h.colSpan=2;h.style.paddingTop="16px";h.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&h.appendChild(k);E=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(p.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,y,w,m.get());D.ignoreColor=e.background==y;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=w?w.src:null);null!=A&&
+(D.shadowVisible=A);e.pageFormat.width==D.previousFormat.width&&e.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage&&D.shadowVisible==e.shadowVisible||e.model.execute(D)});E.className="geBtn gePrimaryBtn";h.appendChild(E);a.editor.cancelFirst||h.appendChild(k);d.appendChild(h);g.appendChild(d);f.appendChild(g);this.container=f};
PageSetupDialog.addPageFormatPanel=function(a,b,e,f){b="format-"+b;var g=document.createElement("input");g.setAttribute("name",b);g.setAttribute("type","radio");g.setAttribute("value","portrait");var d=document.createElement("input");d.setAttribute("name",b);d.setAttribute("type","radio");d.setAttribute("value","landscape");var h=document.createElement("select");h.style.position="relative";h.style.marginBottom="4px";h.style.borderRadius="4px";h.style.borderWidth="1px";h.style.borderStyle="solid";
h.style.boxSizing="border-box";h.style.padding="2px";h.style.width="210px";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";g.style.marginRight="6px";m.appendChild(g);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));m.appendChild(b);d.style.marginLeft="10px";d.style.marginRight="6px";m.appendChild(d);var p=document.createElement("span");p.style.width="100px";mxUtils.write(p,
mxResources.get("landscape"));m.appendChild(p);var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.marginLeft="4px";k.style.fontSize="12px";k.style.width="210px";k.style.height="24px";var u=document.createElement("input");u.setAttribute("size","7");u.setAttribute("title",mxResources.get("width"));u.style.textAlign="right";k.appendChild(u);mxUtils.write(k," x ");var w=document.createElement("input");w.setAttribute("size","7");w.setAttribute("title",mxResources.get("height"));w.style.textAlign=
-"right";k.appendChild(w);var y=document.createElement("select");y.style.marginLeft="4px";y.style.maxWidth="78px";y.style.width="78px";for(var A=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],D=0;D<A.length;D++){var E=document.createElement("option");E.setAttribute("value",A[D].unit);mxUtils.write(E,A[D].label);y.appendChild(E)}y.value=Editor.pageSizeUnit;k.appendChild(y);
-m.style.display="none";k.style.display="none";var F={},H=PageSetupDialog.getFormats();for(D=0;D<H.length;D++)A=H[D],F[A.key]=A,E=document.createElement("option"),E.setAttribute("value",A.key),mxUtils.write(E,A.title),h.appendChild(E);var M=function(){h.value="custom";for(var J=0;J<H.length;J++){var V=H[J];null!=V.format&&("a4"==V.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==V.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),
+"right";k.appendChild(w);var y=document.createElement("select");y.style.marginLeft="4px";y.style.maxWidth="78px";y.style.width="78px";for(var A=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],E=0;E<A.length;E++){var D=document.createElement("option");D.setAttribute("value",A[E].unit);mxUtils.write(D,A[E].label);y.appendChild(D)}y.value=Editor.pageSizeUnit;k.appendChild(y);
+m.style.display="none";k.style.display="none";var F={},H=PageSetupDialog.getFormats();for(E=0;E<H.length;E++)A=H[E],F[A.key]=A,D=document.createElement("option"),D.setAttribute("value",A.key),mxUtils.write(D,A.title),h.appendChild(D);var M=function(){h.value="custom";for(var J=0;J<H.length;J++){var V=H[J];null!=V.format&&("a4"==V.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==V.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),
e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==V.format.width&&e.height==V.format.height?(h.value=V.key,g.setAttribute("checked","checked"),g.defaultChecked=!0,g.checked=!0,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,detected=!0):e.width==V.format.height&&e.height==V.format.width&&(h.value=V.key,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,d.setAttribute("checked","checked"),d.defaultChecked=!0,detected=d.checked=!0))}"custom"==
h.value?(u.value=Editor.toUnit(e.width,y.value),w.value=Editor.toUnit(e.height,y.value),g.setAttribute("checked","checked"),h.value="custom",m.style.display="none",k.style.display=""):(m.style.display="",k.style.display="none")};M();a.appendChild(h);mxUtils.br(a);a.appendChild(m);a.appendChild(k);var N=function(J,V){J=F[h.value];null!=J.format?(u.value=Editor.toUnit(d.checked?J.format.height:J.format.width,y.value),w.value=Editor.toUnit(d.checked?J.format.width:J.format.height,y.value),k.style.display=
"none",m.style.display=""):(m.style.display="none",k.style.display="");J=parseFloat(u.value);if(isNaN(J)||0>=J)u.value=Editor.toUnit(e.width,y.value);J=parseFloat(w.value);if(isNaN(J)||0>=J)w.value=Editor.toUnit(e.height,y.value);J=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(u.value),y.value)),Math.floor(Editor.fromUnit(parseFloat(w.value),y.value)));V||J.width==e.width&&J.height==e.height||(e=J,null!=f&&f(e))};mxEvent.addListener(b,"click",function(J){g.checked=!0;N(J);mxEvent.consume(J)});
@@ -2066,28 +2069,28 @@ Editor.pageSizeUnit),y.value);Editor.pageSizeUnit=y.value;N(J,!0);mxEvent.consum
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,b,e,f,g,d,h,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div"),y=document.createElement("div");y.style.width="100%";y.style.display="grid";y.style.gap="5px 8px";y.style.gridAutoColumns="auto 1fr";y.style.boxSizing="border-box";y.style.padding="3px";var A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.justifyContent="flex-end";A.style.minWidth="0";var D=document.createElement("div");D.style.display="inline-block";
-D.style.textOverflow="ellipsis";D.style.whiteSpace="nowrap";D.style.overflow="hidden";D.style.fontSize="10pt";D.style.padding="2px 0";D.setAttribute("title",g||mxResources.get("filename"));mxUtils.write(D,(g||mxResources.get("filename"))+":");A.appendChild(D);y.appendChild(A);var E=document.createElement("input");E.setAttribute("value",b||"");E.style.flexGrow="1";var F=mxUtils.button(e,function(){if(null==d||d(E.value))p&&a.hideDialog(),f(E.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
-g||null==h)if(null!=u?Editor.selectFilename(E):(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=y.parentNode;if(null!=H){var M=null;mxEvent.addListener(H,"dragleave",function(N){null!=M&&(M.style.backgroundColor="",M=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(N){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=E,M.style.backgroundColor=
-"#ebf2f9");N.stopPropagation();N.preventDefault()}));mxEvent.addListener(H,"drop",mxUtils.bind(this,function(N){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")&&(E.value=decodeURIComponent(N.dataTransfer.getData("text/uri-list")),F.click());N.stopPropagation();N.preventDefault()}))}}};A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.gap="4px";A.style.whiteSpace="nowrap";A.appendChild(E);y.appendChild(A);
-null==g&&null!=h||null==u||null==a.editor.diagramFileTypes||(A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.textOverflow="ellipsis",A.style.justifyContent="flex-end",A.style.fontSize="10pt",mxUtils.write(A,mxResources.get("type")+":"),y.appendChild(A),A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.whiteSpace="nowrap",y.appendChild(A),b=FilenameDialog.createFileTypes(a,E,a.editor.diagramFileTypes),
+var FilenameDialog=function(a,b,e,f,g,d,h,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div"),y=document.createElement("div");y.style.width="100%";y.style.display="grid";y.style.gap="5px 8px";y.style.gridAutoColumns="auto 1fr";y.style.boxSizing="border-box";y.style.padding="3px";var A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.justifyContent="flex-end";A.style.minWidth="0";var E=document.createElement("div");E.style.display="inline-block";
+E.style.textOverflow="ellipsis";E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.fontSize="10pt";E.style.padding="2px 0";E.setAttribute("title",g||mxResources.get("filename"));mxUtils.write(E,(g||mxResources.get("filename"))+":");A.appendChild(E);y.appendChild(A);var D=document.createElement("input");D.setAttribute("value",b||"");D.style.flexGrow="1";var F=mxUtils.button(e,function(){if(null==d||d(D.value))p&&a.hideDialog(),f(D.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
+g||null==h)if(null!=u?Editor.selectFilename(D):(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=y.parentNode;if(null!=H){var M=null;mxEvent.addListener(H,"dragleave",function(N){null!=M&&(M.style.backgroundColor="",M=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(N){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=D,M.style.backgroundColor=
+"#ebf2f9");N.stopPropagation();N.preventDefault()}));mxEvent.addListener(H,"drop",mxUtils.bind(this,function(N){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(N.dataTransfer.getData("text/uri-list")),F.click());N.stopPropagation();N.preventDefault()}))}}};A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.gap="4px";A.style.whiteSpace="nowrap";A.appendChild(D);y.appendChild(A);
+null==g&&null!=h||null==u||null==a.editor.diagramFileTypes||(A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.textOverflow="ellipsis",A.style.justifyContent="flex-end",A.style.fontSize="10pt",mxUtils.write(A,mxResources.get("type")+":"),y.appendChild(A),A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.whiteSpace="nowrap",y.appendChild(A),b=FilenameDialog.createFileTypes(a,D,a.editor.diagramFileTypes),
b.style.width="100%",A.appendChild(b));null!=h&&y.appendChild(h);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=u?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");A=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=k&&k()});A.className="geBtn";null==m||a.isOffline()||row.appendChild(a.createHelpIcon(m));
-a.editor.cancelFirst&&row.appendChild(A);mxEvent.addListener(E,"keypress",function(H){13==H.keyCode&&F.click()});row.appendChild(F);a.editor.cancelFirst||row.appendChild(A);y.appendChild(row);w.appendChild(y);this.container=w};FilenameDialog.filenameHelpLink=null;
+a.editor.cancelFirst&&row.appendChild(A);mxEvent.addListener(D,"keypress",function(H){13==H.keyCode&&F.click()});row.appendChild(F);a.editor.cancelFirst||row.appendChild(A);y.appendChild(row);w.appendChild(y);this.container=w};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createFileTypes=function(a,b,e){var f=document.createElement("select");for(a=0;a<e.length;a++){var g=document.createElement("option");g.setAttribute("value",a);mxUtils.write(g,mxResources.get(e[a].description)+" (."+e[a].extension+")");f.appendChild(g)}mxEvent.addListener(f,"change",function(d){d=e[f.value].extension;var h=b.value.lastIndexOf(".drawio.");h=0<h?h:b.value.lastIndexOf(".");"drawio"!=d&&(d="drawio."+d);b.value=0<h?b.value.substring(0,h+1)+d:b.value+"."+d;"createEvent"in
document?(d=document.createEvent("HTMLEvents"),d.initEvent("change",!1,!0),b.dispatchEvent(d)):b.fireEvent("onchange")});a=function(d){d=b.value.toLowerCase();for(var h=0,m=0;m<e.length;m++){var p=e[m].extension,k=null;"drawio"!=p&&(k=p,p=".drawio."+p);if(d.substring(d.length-p.length-1)=="."+p||null!=k&&d.substring(d.length-k.length-1)=="."+k){h=m;break}}f.value=h};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return f};
var WrapperWindow=function(a,b,e,f,g,d,h,m){m=null!=m?m:document.createElement("div");this.window=new mxWindow(b,m,e,f,g,d,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);a.installResizeHandler(this,!0);h(m)};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var h=this.graph;if(null!=h.container&&!h.transparentBackground){if(h.pageVisible){var m=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var p=h.container.firstChild;null!=p&&p.nodeType!=mxConstants.NODETYPE_ELEMENT;)p=p.nextSibling;null!=p&&(this.backgroundPageShape=this.createBackgroundPageShape(m),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(h.container),p.style.position="absolute",h.container.insertBefore(this.backgroundPageShape.node,p),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(k){h.dblClick(k)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(k){h.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){null!=
h.tooltipHandler&&h.tooltipHandler.isHideOnHover()&&h.tooltipHandler.hide();h.isMouseDown&&!mxEvent.isConsumed(k)&&h.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){h.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(k))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=m,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(h,m,p){var k=this.graph;h=null!=h?h:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,w=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,y=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",A="none",D="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){D=
-10;mxClient.IS_SVG?(A=unescape(encodeURIComponent(this.createSvgGrid(y,h))),A=window.btoa?btoa(A):Base64.encode(A,!0),A="url(data:image/svg+xml;base64,"+A+")",D=k.gridSize*this.scale*this.gridSteps*h):A="url("+this.gridImage+")";var E=y=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var F=k.gridSize*this.scale*this.gridSteps,H=m%F;F=p%F;null!=k.view.backgroundPageShape&&(E=this.getBackgroundPageBounds(),y=1+E.x,E=1+E.y);D=-Math.round(D-mxUtils.mod(this.translate.x*
-this.scale-y+m,D)+H*h)+"px "+-Math.round(D-mxUtils.mod(this.translate.y*this.scale-E+p,D)+F*h)+"px"}h=k.view.canvas;null!=h.ownerSVGElement&&(h=h.ownerSVGElement);y=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=D,k.view.backgroundPageShape.node.style.backgroundImage=A,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=w,k.view.backgroundPageShape.node.style.colorScheme=
-"none"==k.getAdaptiveColors()?"light":"",h.style.backgroundImage="none",h.style.backgroundColor="",k.container.style.backgroundColor=y?k.diagramBackgroundColor:""):(h.style.backgroundPosition=D,h.style.backgroundImage=A,"1"==urlParams.transparent?k.container.style.background="transparent":!y||null!=k.background&&k.background!=mxConstants.NONE?h.style.backgroundColor=u:(h.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(h,
+mxGraphView.prototype.validateBackgroundStyles=function(h,m,p){var k=this.graph;h=null!=h?h:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,w=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,y=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",A="none",E="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){E=
+10;mxClient.IS_SVG?(A=unescape(encodeURIComponent(this.createSvgGrid(y,h))),A=window.btoa?btoa(A):Base64.encode(A,!0),A="url(data:image/svg+xml;base64,"+A+")",E=k.gridSize*this.scale*this.gridSteps*h):A="url("+this.gridImage+")";var D=y=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var F=k.gridSize*this.scale*this.gridSteps,H=m%F;F=p%F;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),y=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*
+this.scale-y+m,E)+H*h)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale-D+p,E)+F*h)+"px"}h=k.view.canvas;null!=h.ownerSVGElement&&(h=h.ownerSVGElement);y=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=A,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=w,k.view.backgroundPageShape.node.style.colorScheme=
+"none"==k.getAdaptiveColors()?"light":"",h.style.backgroundImage="none",h.style.backgroundColor="",k.container.style.backgroundColor=y?k.diagramBackgroundColor:""):(h.style.backgroundPosition=E,h.style.backgroundImage=A,"1"==urlParams.transparent?k.container.style.background="transparent":!y||null!=k.background&&k.background!=mxConstants.NONE?h.style.backgroundColor=u:(h.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(h,
m){for(var p=this.graph.gridSize*this.scale*(null!=m?m:1);p<this.minGridSize;)p*=2;m=this.gridSteps*p;for(var k=[],u=1;u<this.gridSteps;u++){var w=u*p;k.push("M 0 "+w+" L "+m+" "+w+" M "+w+" 0 L "+w+" "+m)}h=mxUtils.getLightDarkColor(h);p="color-scheme: light dark;";mxClient.IS_SF&&(p="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+p+'" width="'+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(h.cssText)+';" stroke="'+h.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(h.cssText)+';" stroke="'+h.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,m){a.apply(this,arguments);
if(null!=this.shiftPreview1){var p=this.view.canvas;null!=p.ownerSVGElement&&(p=p.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+h,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";p.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(h,m,p){var k=this.view.scale,u=this.view.translate,w=this.pageFormat,y=k*this.pageScale,A=this.view.getBackgroundPageBounds();
-m=A.width;p=A.height;var D=new mxRectangle(k*u.x,k*u.y,w.width*y,w.height*y),E=(h=h&&Math.min(D.width,D.height)>this.minPageBreakDist)?Math.ceil(p/D.height)-1:0,F=h?Math.ceil(m/D.width)-1:0,H=A.x+m,M=A.y+p;null==this.horizontalPageBreaks&&0<E&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);h=mxUtils.bind(this,function(N){if(null!=N){for(var J=N==this.horizontalPageBreaks?E:F,V=0;V<=J;V++){var W=N==this.horizontalPageBreaks?[new mxPoint(Math.round(A.x),
-Math.round(A.y+(V+1)*D.height)),new mxPoint(Math.round(H),Math.round(A.y+(V+1)*D.height))]:[new mxPoint(Math.round(A.x+(V+1)*D.width),Math.round(A.y)),new mxPoint(Math.round(A.x+(V+1)*D.width),Math.round(M))];null!=N[V]?(N[V].points=W,N[V].redraw()):(W=new mxPolyline(W,this.pageBreakColor),W.dialect=this.dialect,W.isDashed=this.pageBreakDashed,W.pointerEvents=!1,W.init(this.view.backgroundPane),W.redraw(),N[V]=W)}for(V=J;V<N.length;V++)null!=N[V]&&N[V].destroy();N.splice(J,N.length-J)}});h(this.horizontalPageBreaks);
+m=A.width;p=A.height;var E=new mxRectangle(k*u.x,k*u.y,w.width*y,w.height*y),D=(h=h&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,F=h?Math.ceil(m/E.width)-1:0,H=A.x+m,M=A.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);h=mxUtils.bind(this,function(N){if(null!=N){for(var J=N==this.horizontalPageBreaks?D:F,V=0;V<=J;V++){var W=N==this.horizontalPageBreaks?[new mxPoint(Math.round(A.x),
+Math.round(A.y+(V+1)*E.height)),new mxPoint(Math.round(H),Math.round(A.y+(V+1)*E.height))]:[new mxPoint(Math.round(A.x+(V+1)*E.width),Math.round(A.y)),new mxPoint(Math.round(A.x+(V+1)*E.width),Math.round(M))];null!=N[V]?(N[V].points=W,N[V].redraw()):(W=new mxPolyline(W,this.pageBreakColor),W.dialect=this.dialect,W.isDashed=this.pageBreakDashed,W.pointerEvents=!1,W.init(this.view.backgroundPane),W.redraw(),N[V]=W)}for(V=J;V<N.length;V++)null!=N[V]&&N[V].destroy();N.splice(J,N.length-J)}});h(this.horizontalPageBreaks);
h(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(h,m,p){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var h=
e.apply(this,arguments);h.intersects=mxUtils.bind(this,function(m,p){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(h,arguments)});return h};mxGraphView.prototype.createBackgroundPageShape=function(h){return new mxRectangleShape(h,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var h=this.getGraphBounds(),m=0<h.width?h.x/this.scale-this.translate.x:0,p=0<h.height?h.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,
u=this.graph.pageScale,w=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/w);var y=Math.floor(Math.min(0,p)/k);return new mxRectangle(this.scale*(this.translate.x+u*w),this.scale*(this.translate.y+y*k),this.scale*(Math.ceil(Math.max(1,m+h.width/this.scale)/w)-u)*w,this.scale*(Math.ceil(Math.max(1,p+h.height/this.scale)/k)-y)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,m){f.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
@@ -2104,10 +2107,10 @@ navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{Y=[parseInt(ba[1],10),p
(b=g.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=g.graphHandler){var u=g.graphHandler.start;g.graphHandler.start=function(){null!=f.hoverIcons&&f.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(Y){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(Y)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(Y)-ba.y-this.diagramContainer.clientHeight?
this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(Y,ba){return f.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(Y){16==Y.which?this.shiftDown=!0:32!=Y.which||g.isEditing()?mxEvent.isConsumed(Y)||27!=Y.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),g.container.style.cursor="move",g.isEditing()||
mxEvent.getSource(Y)!=g.container||mxEvent.consume(Y))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(Y){g.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=g.panningHandler.isForcePanningEvent;g.panningHandler.isForcePanningEvent=function(Y){return y.apply(this,arguments)||f.isSpaceDown()||mxEvent.isMouseEvent(Y.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(Y.getEvent()))&&
-(!mxEvent.isControlDown(Y.getEvent())&&mxEvent.isRightMouseButton(Y.getEvent())||mxEvent.isMiddleMouseButton(Y.getEvent()))};var A=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(Y){return A.apply(this,arguments)||13==Y.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y)||mxClient.IS_SF&&mxEvent.isShiftDown(Y))};var D=g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return f.isSpaceDown()||D.apply(this,arguments)};var E=mxUtils.bind(this,
+(!mxEvent.isControlDown(Y.getEvent())&&mxEvent.isRightMouseButton(Y.getEvent())||mxEvent.isMiddleMouseButton(Y.getEvent()))};var A=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(Y){return A.apply(this,arguments)||13==Y.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y)||mxClient.IS_SF&&mxEvent.isShiftDown(Y))};var E=g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return f.isSpaceDown()||E.apply(this,arguments)};var D=mxUtils.bind(this,
function(){if(null!=this.toolbar)for(var Y=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ba=this.toolbar.container.firstChild;null!=ba;){var L=ba.getAttribute("data-min-width");null!=L&&parseInt(L)>Y?ba.style.display="none":ba.style.display="";ba=ba.nextSibling}}),F=!1,H=null,M=null,N=null,J=mxUtils.bind(this,function(){if(null!=this.toolbar&&F!=g.cellEditor.isContentEditing()){for(var Y=this.toolbar.container.firstChild,ba=[];null!=Y;){var L=Y.nextSibling;Y.parentNode.removeChild(Y);
-ba.push(Y);Y=L}Y=this.toolbar.fontMenu;L=this.toolbar.sizeMenu;if(null==N)this.toolbar.createTextToolbar();else{for(var U=0;U<N.length;U++)this.toolbar.container.appendChild(N[U]);this.toolbar.fontMenu=H;this.toolbar.sizeMenu=M}F=g.cellEditor.isContentEditing();H=Y;M=L;N=ba;E()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();J()}));this.addListener("currentThemeChanged",E);mxEvent.addListener(window,"resize",
-E);E();g.isTouchPopupMenuEnabled=function(){return null==f.dialog};var V=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){V.apply(this,arguments);J();if(g.cellEditor.isContentEditing()){var Y=!1,ba=function(){Y||(Y=!0,window.setTimeout(function(){var L=g.getSelectedEditingElement();null!=L&&(L=mxUtils.getCurrentStyle(L),null!=L&&null!=f.toolbar&&(f.toolbar.setFontName(mxUtils.getCssFontFamily(L.fontFamily)),f.toolbar.setFontSize(parseInt(L.fontSize))));Y=!1},0))};mxEvent.addListener(g.cellEditor.textarea,
+ba.push(Y);Y=L}Y=this.toolbar.fontMenu;L=this.toolbar.sizeMenu;if(null==N)this.toolbar.createTextToolbar();else{for(var U=0;U<N.length;U++)this.toolbar.container.appendChild(N[U]);this.toolbar.fontMenu=H;this.toolbar.sizeMenu=M}F=g.cellEditor.isContentEditing();H=Y;M=L;N=ba;D()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();J()}));this.addListener("currentThemeChanged",D);mxEvent.addListener(window,"resize",
+D);D();g.isTouchPopupMenuEnabled=function(){return null==f.dialog};var V=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){V.apply(this,arguments);J();if(g.cellEditor.isContentEditing()){var Y=!1,ba=function(){Y||(Y=!0,window.setTimeout(function(){var L=g.getSelectedEditingElement();null!=L&&(L=mxUtils.getCurrentStyle(L),null!=L&&null!=f.toolbar&&(f.toolbar.setFontName(mxUtils.getCssFontFamily(L.fontFamily)),f.toolbar.setFontSize(parseInt(L.fontSize))));Y=!1},0))};mxEvent.addListener(g.cellEditor.textarea,
"input",ba);mxEvent.addListener(g.cellEditor.textarea,"touchend",ba);mxEvent.addListener(g.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(g.cellEditor.textarea,"keyup",ba);ba()}};var W=g.cellEditor.stopEditing;g.cellEditor.stopEditing=function(Y,ba){try{W.apply(this,arguments),J()}catch(L){f.handleError(L)}};g.container.setAttribute("tabindex","0");g.container.style.cursor="default";if(window.self===window.top&&null!=g.container.parentNode)try{g.container.focus()}catch(Y){}var T=g.fireMouseEvent;
g.fireMouseEvent=function(Y,ba,L){try{Y==mxEvent.MOUSE_DOWN&&this.container.focus(),T.apply(this,arguments)}catch(U){f.handleError(U)}};var O=g.foldCells;g.foldCells=function(Y,ba,L,U,X){try{O.apply(this,arguments)}catch(ia){f.handleError(ia)}};g.popupMenuHandler.autoExpand=!0;null!=this.menus&&(g.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(Y,ba,L){this.menus.createPopupMenu(Y,ba,L)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(Y){g.popupMenuHandler.hideMenu()}));
this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};g.connectionHandler.addListener(mxEvent.CONNECT,function(Y,ba){var L=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(L.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=f.hoverIcons&&f.hoverIcons.update(g.view.getState(L[L.length-1]))},0));g.pasteCellStyles(L)});var fa=null,S=null;a=mxUtils.bind(this,function(){if(null!=this.toolbar){var Y=this.getSelectionState();g.isEnabled()&&
@@ -2127,7 +2130,7 @@ arguments);e.updateActionStates()};a.showLinkDialog=mxUtils.bind(e,e.showLinkDia
EditorUi.prototype.createSelectionState=function(){for(var a=this.editor.graph,b=a.getSelectionCells(),e=this.initSelectionState(),f=!0,g=0;g<b.length;g++){var d=a.getCurrentCellStyle(b[g]);"0"!=mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(e,b[g],b,f),f=!1)}this.updateSelectionStateForTableCells(e);if(Editor.enableCustomProperties){e.customProperties={};a=e.vertices;b=e.edges;for(g=0;g<a.length;g++)this.findCommonProperties(a[g],e.customProperties,0==g,e);
for(g=0;g<b.length;g++)this.findCommonProperties(b[g],e.customProperties,0==a.length&&0==g,e)}return e};
EditorUi.prototype.findCommonProperties=function(a,b,e,f){f=mxUtils.bind(this,function(k){if(null!=k)if(e)for(var u=0;u<k.length;u++)b[k[u].name]=k[u];else for(var w in b)if(null!=w){var y=!1;for(u=0;u<k.length;u++)if(k[u].name==w&&k[u].type==b[w].type){y=!0;break}y||delete b[w]}});var g=this.editor.graph,d=g.view.getState(a);if(null!=d&&null!=d.shape){if(!d.shape.commonCustomPropAdded){d.shape.commonCustomPropAdded=!0;d.shape.customProperties=d.shape.customProperties||[];if(null!=d.shape&&null!=
-d.shape.stencil&&null!=d.shape.stencil.desc){var h=d.shape.stencil,m=[],p=mxUtils.bind(this,function(k){k=h.desc.getElementsByTagName(k);for(var u=[],w=0;w<k.length;w++){var y=k[w].getAttribute("color");if(!mxUtils.isValidColor(y)&&!m[y]){m[y]=!0;var A=k[w].getAttribute("name");A=null!=A?A:Editor.getLabelForStylename(y);var D=k[w].getAttribute("default");D=null!=D?D:h.getDefaultColorValue(k[w],g);u.push({name:y,type:"color",primary:"false"!=k[w].getAttribute("primary"),defVal:D,defaultColor:D,undefinedColor:D,
+d.shape.stencil&&null!=d.shape.stencil.desc){var h=d.shape.stencil,m=[],p=mxUtils.bind(this,function(k){k=h.desc.getElementsByTagName(k);for(var u=[],w=0;w<k.length;w++){var y=k[w].getAttribute("color");if(!mxUtils.isValidColor(y)&&!m[y]){m[y]=!0;var A=k[w].getAttribute("name");A=null!=A?A:Editor.getLabelForStylename(y);var E=k[w].getAttribute("default");E=null!=E?E:h.getDefaultColorValue(k[w],g);u.push({name:y,type:"color",primary:"false"!=k[w].getAttribute("primary"),defVal:E,defaultColor:E,undefinedColor:E,
dispName:A})}}return u});Array.prototype.push.apply(d.shape.customProperties,p("fillcolor"));Array.prototype.push.apply(d.shape.customProperties,p("strokecolor"));Array.prototype.push.apply(d.shape.customProperties,p("fontcolor"))}d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)}f(d.shape.customProperties)}a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(k){}};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
EditorUi.prototype.updateSelectionStateForTableCells=function(a){if(1<a.cells.length&&a.cell){var b=mxUtils.sortCells(a.cells),e=this.editor.graph.model,f=e.getParent(b[0]),g=e.getParent(f);if(null!=f&&null!=g){for(var d=f.getIndex(b[0]),h=g.getIndex(f),m=null,p=1,k=1,u=0,w=h<g.getChildCount()-1?e.getChildAt(e.getChildAt(g,h+1),d):null;u<b.length-1;){var y=b[++u];null==w||w!=y||null!=m&&p!=m||(m=p,p=0,k++,f=e.getParent(w),w=h+k<g.getChildCount()?e.getChildAt(e.getChildAt(g,h+k),d):null);var A=this.editor.graph.view.getState(y);
@@ -2135,23 +2138,23 @@ if(y==e.getChildAt(f,d+p)&&null!=A&&1==mxUtils.getValue(A.style,"colspan",1)&&1=
EditorUi.prototype.createTimeout=function(a,b,e){var f=!0,g=null,d=mxUtils.bind(this,function(m){g.clear()&&(f=!1,m=null!=m?m:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(a,b,e)})},null!=e?e(m):this.handleError(m))}),h=window.setTimeout(d,null!=a?a:this.timeout);g={clear:function(){window.clearTimeout(h);return f},isAlive:function(){return f}};null!=b&&this.tryAndHandle(mxUtils.bind(this,function(){b(g)}),d);return g};
EditorUi.prototype.tryAndHandle=function(a,b){try{a()}catch(e){null!=b?b(e):this.handleError(e)}};
EditorUi.prototype.removeUserDefinedDarkColors=function(a,b,e){var f=this.editor.graph;a=null!=a?a:f.getSelectionCells();var g=Graph.colorStyles,d=document.createElement("div");f.model.beginUpdate();try{for(var h=0;h<a.length;h++)if(f.model.isEdge(a[h])||f.model.isVertex(a[h])){var m=f.getCellStyle(a[h],!1);if(null!=m)for(var p=0;p<g.length;p++)try{var k=m[g[p]];if(mxUtils.isLightDarkColor(k)){var u=mxUtils.getLightDarkColor(k);f.setCellStyles(g[p],u.light,[a[h]])}}catch(y){}b&&f.isHtmlLabel(a[h])&&
-"0"!=mxUtils.getValue(m,"html","0")&&(d.innerHTML=Graph.sanitizeHtml(f.getLabel(a[h])),Graph.addLightDarkColors(d,null,null,function(y,A,D){return mxUtils.isLightDarkColor(D)?(D=mxUtils.getLightDarkColor(D),y.style.setProperty(A,D.light),!0):!1})&&f.cellLabelChanged(a[h],d.innerHTML))}if(e&&mxUtils.isLightDarkColor(f.background)){u=mxUtils.getLightDarkColor(f.background);var w=new ChangePageSetup(this,u.light);w.ignoreImage=!0;f.model.execute(w)}}finally{f.model.endUpdate()}return a};
+"0"!=mxUtils.getValue(m,"html","0")&&(d.innerHTML=Graph.sanitizeHtml(f.getLabel(a[h])),Graph.addLightDarkColors(d,null,null,function(y,A,E){return mxUtils.isLightDarkColor(E)?(E=mxUtils.getLightDarkColor(E),y.style.setProperty(A,E.light),!0):!1})&&f.cellLabelChanged(a[h],d.innerHTML))}if(e&&mxUtils.isLightDarkColor(f.background)){u=mxUtils.getLightDarkColor(f.background);var w=new ChangePageSetup(this,u.light);w.ignoreImage=!0;f.model.execute(w)}}finally{f.model.endUpdate()}return a};
EditorUi.prototype.updateSelectionStateForCell=function(a,b,e,f){e=this.editor.graph;a.cells.push(b);if(e.getModel().isVertex(b)){a.connections=0<e.model.getEdgeCount(b);a.unlocked=a.unlocked&&!e.isCellLocked(b);a.resizable=a.resizable&&e.isCellResizable(b);a.rotatable=a.rotatable&&e.isCellRotatable(b);a.movable=a.movable&&e.isCellMovable(b)&&!e.isTableRow(b)&&!e.isTableCell(b);a.swimlane=a.swimlane||e.isSwimlane(b);a.table=a.table||e.isTable(b);a.cell=a.cell||e.isTableCell(b);a.row=a.row||e.isTableRow(b);
a.vertices.push(b);var g=e.getCellGeometry(b);if(null!=g&&(0<g.width?null==a.width?a.width=g.width:a.width!=g.width&&(a.width=""):a.containsLabel=!0,0<g.height?null==a.height?a.height=g.height:a.height!=g.height&&(a.height=""):a.containsLabel=!0,!g.relative||null!=g.offset)){var d=g.relative?g.offset.x:g.x;g=g.relative?g.offset.y:g.y;null==a.x?a.x=d:a.x!=d&&(a.x="");null==a.y?a.y=g:a.y!=g&&(a.y="")}}else e.getModel().isEdge(b)&&(a.edges.push(b),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable=
!1);d=e.view.getState(b);null!=d&&(a.html=a.html&&e.isHtmlLabel(b),a.autoSize=a.autoSize||e.isAutoSizeState(d),a.glass=a.glass&&e.isGlassState(d),a.rounded=a.rounded&&e.isRoundedState(d),a.lineJumps=a.lineJumps&&e.isLineJumpState(d),a.image=a.image||e.isImageState(d),a.shadow=a.shadow&&e.isShadowState(d),a.fill=a.fill&&e.isFillState(d),a.gradient=a.fill&&e.isGradientState(d),a.stroke=a.stroke&&e.isStrokeState(d),b=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||
"image"==b,e.mergeStyle(d.style,a.style,f))};
EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(p,k){"mouseDown"==k.getProperty("eventName")&&b.hideShapePicker()}));var e=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",e);a.addListener(mxEvent.ESCAPE,e);a.view.addListener(mxEvent.SCALE,e);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,e);a.getSelectionModel().addListener(mxEvent.CHANGE,e);var f=a.popupMenuHandler.isMenuShowing;
a.popupMenuHandler.isMenuShowing=function(){return f.apply(this,arguments)||null!=b.shapePicker||null!=b.currentMenu};var g=a.dblClick;a.dblClick=function(p,k){if(this.isEnabled())if(null!=k||null==b.sidebar||mxEvent.isShiftDown(p)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{var u=mxUtils.convertPoint(this.container,mxEvent.getClientX(p),mxEvent.getClientY(p));mxEvent.consume(p);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.x,u.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-e);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var h=this.hoverIcons.execute;this.hoverIcons.execute=function(p,k,u){var w=u.getEvent();this.graph.isCloneEvent(w)||mxEvent.isShiftDown(w)?h.apply(this,arguments):this.graph.connectVertex(p.cell,k,this.graph.defaultEdgeLength,w,null,null,mxUtils.bind(this,function(y,A,D){var E=a.getCompositeParent(p.cell);y=a.getCellGeometry(E);for(u.consume();null!=E&&a.model.isVertex(E)&&null!=y&&y.relative;)cell=
-E,E=a.model.getParent(cell),y=a.getCellGeometry(E);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.getGraphX(),u.getGraphY(),E,mxUtils.bind(this,function(F){D(F);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(F))}),k)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,w,this)}))};var m=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m);m=window.setTimeout(mxUtils.bind(this,function(){var u=
-k.getProperty("arrow"),w=k.getProperty("direction"),y=k.getProperty("event");u=u.getBoundingClientRect();var A=mxUtils.getOffset(a.container),D=a.container.scrollLeft+u.x-A.x;A=a.container.scrollTop+u.y-A.y;var E=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=b.showShapePicker(D,A,E,mxUtils.bind(this,function(H){null!=H&&a.connectVertex(E,w,a.defaultEdgeLength,y,!0,!1,function(M,N,J){J(H);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(H))},
-function(M){a.selectCellsForConnectVertex(M)},y,this.hoverIcons)}),w,!0);null!=F&&(this.centerShapePicker(F,u,D,A,w),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){b.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m)}))}};
+e);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var h=this.hoverIcons.execute;this.hoverIcons.execute=function(p,k,u){var w=u.getEvent();this.graph.isCloneEvent(w)||mxEvent.isShiftDown(w)?h.apply(this,arguments):this.graph.connectVertex(p.cell,k,this.graph.defaultEdgeLength,w,null,null,mxUtils.bind(this,function(y,A,E){var D=a.getCompositeParent(p.cell);y=a.getCellGeometry(D);for(u.consume();null!=D&&a.model.isVertex(D)&&null!=y&&y.relative;)cell=
+D,D=a.model.getParent(cell),y=a.getCellGeometry(D);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.getGraphX(),u.getGraphY(),D,mxUtils.bind(this,function(F){E(F);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(F))}),k)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,w,this)}))};var m=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m);m=window.setTimeout(mxUtils.bind(this,function(){var u=
+k.getProperty("arrow"),w=k.getProperty("direction"),y=k.getProperty("event");u=u.getBoundingClientRect();var A=mxUtils.getOffset(a.container),E=a.container.scrollLeft+u.x-A.x;A=a.container.scrollTop+u.y-A.y;var D=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=b.showShapePicker(E,A,D,mxUtils.bind(this,function(H){null!=H&&a.connectVertex(D,w,a.defaultEdgeLength,y,!0,!1,function(M,N,J){J(H);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(H))},
+function(M){a.selectCellsForConnectVertex(M)},y,this.hoverIcons)}),w,!0);null!=F&&(this.centerShapePicker(F,u,E,A,w),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){b.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m)}))}};
EditorUi.prototype.centerShapePicker=function(a,b,e,f,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(e-=d.width/2-10,f-=d.height+6):g==mxConstants.DIRECTION_SOUTH?(e-=d.width/2-10,f+=b.height+6):g==mxConstants.DIRECTION_WEST?(e-=d.width+6,f-=d.height/2-10):g==mxConstants.DIRECTION_EAST&&(e+=b.width+6,f-=d.height/2-10);a.style.left=e+"px";a.style.top=f+"px"};
EditorUi.prototype.showShapePicker=function(a,b,e,f,g,d,h,m,p){var k=null;this.editor.graph.freehand.isDrawing()||(m=m||null==e,k=this.createShapePicker(a,b,e,f,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,d,m),d,h,m,p),null!=k&&(null==this.hoverIcons||d||this.hoverIcons.reset(),a=this.editor.graph,a.popupMenuHandler.hideMenu(),a.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=f,this.shapePicker=k));return k};
-EditorUi.prototype.createShapePicker=function(a,b,e,f,g,d,h,m,p,k,u){u=null!=u?u:!0;var w=this.editor.graph,y=null;p=null!=p?p:function(E){E=E[0];var F=0,H=0,M=E.geometry;null!=M&&(w.model.isEdge(E)&&(E=M.getTerminalPoint(!1),M=new mxRectangle(0,0,E.x,E.y)),F=M.width/2,H=M.height/2);return new mxPoint(w.snap(Math.round(a/w.view.scale)-w.view.translate.x-F),w.snap(Math.round(b/w.view.scale)-w.view.translate.y-H))};if(null!=h&&0<h.length){var A=this;w=this.editor.graph;y=document.createElement("div");
-g=w.view.getState(e);var D=null==e||null!=g&&w.isTransparentState(g)?null:w.copyStyle(e);y.className="geShapePicker";y.setAttribute("title",mxResources.get("sidebarTooltip"));y.style.left=Math.round(a)+"px";y.style.top=Math.round(b)+"px";mxClient.IS_POINTER&&(y.style.touchAction="none");m||mxUtils.setPrefixedStyle(y.style,"transform","translate(-22px,-22px)");w.container.appendChild(y);g=mxUtils.bind(this,function(E){var F=document.createElement("a");y.appendChild(F);null!=D&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(D,[E]):this.sidebar.graph.pasteCellStyles([E],w.currentVertexStyle,w.currentEdgeStyle);var H=E.geometry;w.model.isEdge(E)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([E],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=w.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==e&&w.isSelectionEmpty()){var N=w.cloneCell(E);if(null!=f)f(N);else{var J=p([N]);w.model.isEdge(N)?
-N.geometry.translate(J.x,J.y):(N.geometry.x=J.x,N.geometry.y=J.y);w.model.beginUpdate();try{w.addCell(N),w.model.isVertex(N)&&w.isAutoSizeCell(N)&&w.updateCellSize(N)}finally{w.model.endUpdate()}w.setSelectionCell(N);w.scrollCellToVisible(N);u&&w.startEditing(N);null!=A.hoverIcons&&A.hoverIcons.update(w.view.getState(N))}}else N=w.getEditableCells(null!=e?[e]:w.getSelectionCells()),w.updateShapes(E,N);null!=d&&d(M);mxEvent.consume(M)}}),25,25,null,null,e),H.style.display="flex",H.style.alignItems=
+EditorUi.prototype.createShapePicker=function(a,b,e,f,g,d,h,m,p,k,u){u=null!=u?u:!0;var w=this.editor.graph,y=null;p=null!=p?p:function(D){D=D[0];var F=0,H=0,M=D.geometry;null!=M&&(w.model.isEdge(D)&&(D=M.getTerminalPoint(!1),M=new mxRectangle(0,0,D.x,D.y)),F=M.width/2,H=M.height/2);return new mxPoint(w.snap(Math.round(a/w.view.scale)-w.view.translate.x-F),w.snap(Math.round(b/w.view.scale)-w.view.translate.y-H))};if(null!=h&&0<h.length){var A=this;w=this.editor.graph;y=document.createElement("div");
+g=w.view.getState(e);var E=null==e||null!=g&&w.isTransparentState(g)?null:w.copyStyle(e);y.className="geShapePicker";y.setAttribute("title",mxResources.get("sidebarTooltip"));y.style.left=Math.round(a)+"px";y.style.top=Math.round(b)+"px";mxClient.IS_POINTER&&(y.style.touchAction="none");m||mxUtils.setPrefixedStyle(y.style,"transform","translate(-22px,-22px)");w.container.appendChild(y);g=mxUtils.bind(this,function(D){var F=document.createElement("a");y.appendChild(F);null!=E&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(E,[D]):this.sidebar.graph.pasteCellStyles([D],w.currentVertexStyle,w.currentEdgeStyle);var H=D.geometry;w.model.isEdge(D)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([D],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=w.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==e&&w.isSelectionEmpty()){var N=w.cloneCell(D);if(null!=f)f(N);else{var J=p([N]);w.model.isEdge(N)?
+N.geometry.translate(J.x,J.y):(N.geometry.x=J.x,N.geometry.y=J.y);w.model.beginUpdate();try{w.addCell(N),w.model.isVertex(N)&&w.isAutoSizeCell(N)&&w.updateCellSize(N)}finally{w.model.endUpdate()}w.setSelectionCell(N);w.scrollCellToVisible(N);u&&w.startEditing(N);null!=A.hoverIcons&&A.hoverIcons.update(w.view.getState(N))}}else N=w.getEditableCells(null!=e?[e]:w.getSelectionCells()),w.updateShapes(D,N);null!=d&&d(M);mxEvent.consume(M)}}),25,25,null,null,e),H.style.display="flex",H.style.alignItems=
"center",H.style.justifyContent="center",F.appendChild(H))});for(k=0;k<(m?Math.min(h.length,4):h.length);k++)g(h[k]);h=y.offsetTop+y.clientHeight-(w.container.scrollTop+w.container.offsetHeight);0<h&&(y.style.top=Math.max(w.container.scrollTop+22,b-h)+"px");h=y.offsetLeft+y.clientWidth-(w.container.scrollLeft+w.container.offsetWidth);0<h&&(y.style.left=Math.max(w.container.scrollLeft+22,a-h)+"px")}return y};
EditorUi.prototype.getCellsForShapePicker=function(a,b,e){var f=this.editor.graph,g=mxUtils.bind(this,function(d,h,m,p){return f.createVertex(null,null,p||"",0,0,h||120,m||60,d,!1)});b=mxUtils.bind(this,function(d,h,m){d=new mxCell(m||"",new mxGeometry(0,0,f.defaultEdgeLength+20,0),d);d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(d.geometry.width,null!=h?h:0),!1);d.geometry.points=null!=h?[new mxPoint(d.geometry.width/2,h)]:[];d.geometry.relative=!0;d.edge=
!0;return d});if(null!=a)try{a=f.cloneCell(a),f.model.isVertex(a)&&null!=a.geometry&&(a.geometry.x=0,a.geometry.y=0)}catch(d){a=null}null==a&&(a=g(f.appendFontSize(Editor.defaultTextStyle,f.vertexFontSize),60,30,"Text"));a=[a,g("whiteSpace=wrap;html=1;"),g("ellipse;whiteSpace=wrap;html=1;",80,80),g("rhombus;whiteSpace=wrap;html=1;",80,80),g("rounded=1;whiteSpace=wrap;html=1;"),g("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),g("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",
@@ -2171,7 +2174,7 @@ EditorUi.prototype.getImageForEdgeStyle=function(a){var b=Format.orthogonalImage
null)?Format.verticalElbowImage.src:Format.horizontalElbowImage.src:"isometricEdgeStyle"==e&&(b="vertical"==mxUtils.getValue(a,mxConstants.STYLE_ELBOW,null)?Format.verticalIsometricImage.src:Format.horizontalIsometricImage.src);return b};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(null!=navigator.clipboard||!mxClipboard.isEmpty())&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var h=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{h=h||d.getSelectionCells();h=d.getExportableCells(d.model.getTopmostCells(h));for(var m={},p=d.createCellLookup(h),k=d.cloneCells(h,null,m),u=new mxGraphModel,w=u.getChildAt(u.getRoot(),
-0),y=0;y<k.length;y++){u.add(w,k[y]);var A=d.view.getState(h[y]);if(null!=A){var D=d.getCellGeometry(k[y]);null!=D&&D.relative&&!u.isEdge(h[y])&&null==p[mxObjectIdentity.get(u.getParent(h[y]))]&&(D.offset=null,D.relative=!1,D.x=A.x/A.view.scale-A.view.translate.x,D.y=A.y/A.view.scale-A.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(m,p),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return h};var e=mxClipboard.paste;mxClipboard.paste=function(d){var h=
+0),y=0;y<k.length;y++){u.add(w,k[y]);var A=d.view.getState(h[y]);if(null!=A){var E=d.getCellGeometry(k[y]);null!=E&&E.relative&&!u.isEdge(h[y])&&null==p[mxObjectIdentity.get(u.getParent(h[y]))]&&(E.offset=null,E.relative=!1,E.x=A.x/A.view.scale-A.view.translate.x,E.y=A.y/A.view.scale-A.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(m,p),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return h};var e=mxClipboard.paste;mxClipboard.paste=function(d){var h=
null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):h=e.apply(this,arguments);a.updatePasteActionStates();return h};var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,h){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var ca=this.graph.getPageLayout(),P=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+ca.x*P.width),this.scale*(this.translate.y+ca.y*P.height),this.scale*ca.width*
@@ -2187,8 +2190,8 @@ mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appe
": "+this.currentPage.getName());p.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(ca-1,this.pages.length)].getName());u.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(ca+1,this.pages.length)].getName())}});p.style.paddingLeft="0px";p.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var y=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",p.style.display=
"",k.style.display="inline-block"):(u.style.display="none",p.style.display="none",k.style.display="none");w()});if(null!=this.menus){var A=this.menus.get("pages");null!=A&&mxEvent.addListener(k,"click",mxUtils.bind(this,function(ca){var P=new mxPopupMenu(A.funct);P.smartSeparators=!0;P.showDisabled=!0;P.autoExpand=!0;P.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(P,arguments);P.destroy()});var da=mxUtils.getOffset(k);P.popup(da.x,da.y+k.offsetHeight,null,ca);mxEvent.addListener(P.div,
"mouseleave",mxUtils.bind(this,function(){P.hideMenu()}))}))}this.editor.addListener("resetGraphView",y);this.editor.addListener("pageSelected",w)}d(mxUtils.bind(this,function(ca){this.actions.get("zoomOut").funct();mxEvent.consume(ca)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(ca){this.actions.get("zoomIn").funct();mxEvent.consume(ca)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(ca){a.isLightboxView()?
-(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(ca)}),Editor.zoomFitImage,mxResources.get("fit"));var D=null,E=null,F=mxUtils.bind(this,function(ca){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);D=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);D=null;E=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";E=null}),
-600)}),ca||200)}),H=mxUtils.bind(this,function(ca){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,ca||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=d(mxUtils.bind(this,function(ca){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
+(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(ca)}),Editor.zoomFitImage,mxResources.get("fit"));var E=null,D=null,F=mxUtils.bind(this,function(ca){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);E=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);E=null;D=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";D=null}),
+600)}),ca||200)}),H=mxUtils.bind(this,function(ca){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,ca||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=d(mxUtils.bind(this,function(ca){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var P=M.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
P.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));P=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
P.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(ca)}),Editor.layersImage,mxResources.get("layers")),N=a.getModel();N.addListener(mxEvent.CHANGE,function(){M.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(ca){if(null!=this.editor.editButtonFunc)this.editor.editButtonFunc();
@@ -2283,14 +2286,14 @@ EditorUi.prototype.showDataDialog=function(a){null!=a&&"undefined"!==typeof wind
EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(f){f=new ChangePageSetup(this,null,f);f.ignoreColor=!0;this.editor.graph.model.execute(f)});var e=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=e&&0<e.length?(b=new Image,b.onload=function(){a(new mxImage(e,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=e):a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b};
EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward",88:"copyAsSvg"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};
-EditorUi.prototype.createKeyHandler=function(a){function b(w,y,A){if(!f.isSelectionEmpty()&&f.isEnabled()){y=null!=y?y:1;var D=f.getCompositeParents(f.getSelectionCells()),E=0<D.length?D[0]:null;if(null!=E)if(A){f.getModel().beginUpdate();try{for(E=0;E<D.length;E++)if(f.getModel().isVertex(D[E])&&f.isCellResizable(D[E])){var F=f.getCellGeometry(D[E]);null!=F&&(F=F.clone(),37==w?F.width=Math.max(0,F.width-y):38==w?F.height=Math.max(0,F.height-y):39==w?F.width+=y:40==w&&(F.height+=y),f.getModel().setGeometry(D[E],
-F))}}finally{f.getModel().endUpdate()}}else{F=f.model.getParent(E);var H=f.getView().scale;A=null;1==f.getSelectionCount()&&f.model.isVertex(E)&&null!=f.layoutManager&&!f.isCellLocked(E)&&(A=f.layoutManager.getLayout(F));if(null!=A&&A.constructor==mxStackLayout)y=F.getIndex(E),37==w||38==w?f.model.add(F,E,Math.max(0,y-1)):(39==w||40==w)&&f.model.add(F,E,Math.min(f.model.getChildCount(F),y+1));else{var M=f.graphHandler;null!=M&&(null==M.first&&M.start(E,0,0,f.getMovableCells(D)),null!=M.first&&(E=
-D=0,37==w?D=-y:38==w?E=-y:39==w?D=y:40==w&&(E=y),M.currentDx+=D*H,M.currentDy+=E*H,M.checkPreview(),M.updatePreview()),null!=h&&window.clearTimeout(h),h=window.setTimeout(function(){if(null!=M.first){var N=M.roundLength(M.currentDx/H),J=M.roundLength(M.currentDy/H);M.moveCells(M.cells,N,J);M.reset()}},400))}}}}var e=this,f=this.editor.graph,g=new mxKeyHandler(f),d=g.isEventIgnored;g.isEventIgnored=function(w){return!(mxEvent.isShiftDown(w)&&9==w.keyCode)&&(!this.isControlDown(w)||mxEvent.isShiftDown(w)||
+EditorUi.prototype.createKeyHandler=function(a){function b(w,y,A){if(!f.isSelectionEmpty()&&f.isEnabled()){y=null!=y?y:1;var E=f.getCompositeParents(f.getSelectionCells()),D=0<E.length?E[0]:null;if(null!=D)if(A){f.getModel().beginUpdate();try{for(D=0;D<E.length;D++)if(f.getModel().isVertex(E[D])&&f.isCellResizable(E[D])){var F=f.getCellGeometry(E[D]);null!=F&&(F=F.clone(),37==w?F.width=Math.max(0,F.width-y):38==w?F.height=Math.max(0,F.height-y):39==w?F.width+=y:40==w&&(F.height+=y),f.getModel().setGeometry(E[D],
+F))}}finally{f.getModel().endUpdate()}}else{F=f.model.getParent(D);var H=f.getView().scale;A=null;1==f.getSelectionCount()&&f.model.isVertex(D)&&null!=f.layoutManager&&!f.isCellLocked(D)&&(A=f.layoutManager.getLayout(F));if(null!=A&&A.constructor==mxStackLayout)y=F.getIndex(D),37==w||38==w?f.model.add(F,D,Math.max(0,y-1)):(39==w||40==w)&&f.model.add(F,D,Math.min(f.model.getChildCount(F),y+1));else{var M=f.graphHandler;null!=M&&(null==M.first&&M.start(D,0,0,f.getMovableCells(E)),null!=M.first&&(D=
+E=0,37==w?E=-y:38==w?D=-y:39==w?E=y:40==w&&(D=y),M.currentDx+=E*H,M.currentDy+=D*H,M.checkPreview(),M.updatePreview()),null!=h&&window.clearTimeout(h),h=window.setTimeout(function(){if(null!=M.first){var N=M.roundLength(M.currentDx/H),J=M.roundLength(M.currentDy/H);M.moveCells(M.cells,N,J);M.reset()}},400))}}}}var e=this,f=this.editor.graph,g=new mxKeyHandler(f),d=g.isEventIgnored;g.isEventIgnored=function(w){return!(mxEvent.isShiftDown(w)&&9==w.keyCode)&&(!this.isControlDown(w)||mxEvent.isShiftDown(w)||
90!=w.keyCode&&89!=w.keyCode&&188!=w.keyCode&&190!=w.keyCode&&85!=w.keyCode&&83!=w.keyCode)&&(66!=w.keyCode&&73!=w.keyCode||!this.isControlDown(w)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=w.keyCode&&107!=w.keyCode||!this.isControlDown(w)&&!mxEvent.isShiftDown(w)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};g.isEnabledForEvent=function(w){return!mxEvent.isConsumed(w)&&this.isGraphEvent(w)&&this.isEnabled()&&
(null==e.dialogs||0==e.dialogs.length)};g.isControlDown=function(w){return mxEvent.isControlDown(w)||mxClient.IS_MAC&&w.metaKey};var h=null,m={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},p=g.getFunction;mxKeyHandler.prototype.getFunction=function(w){if(f.isEnabled()){var y=null;mxEvent.isShiftDown(w)&&this.isControlDown(w)&&mxEvent.isAltDown(w)?y=e.actions.get(e.ctrlAltShiftActions[w.keyCode]):mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)?
y=e.actions.get(e.altShiftActions[w.keyCode]):this.isControlDown(w)&&mxEvent.isAltDown(w)&&(y=e.actions.get(e.ctrlAltActions[w.keyCode]));if(null!=y)return y.funct;if("/"==w.key&&!this.isControlDown(w)&&!mxEvent.isAltDown(w))return function(){var A=document.getElementById("geOmniSearch");null!=A&&30<A.clientWidth&&A.focus()};if(null!=m[w.keyCode]&&!f.isSelectionEmpty())if(!this.isControlDown(w)&&mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)){if(f.model.isVertex(f.getSelectionCell()))return function(){var A=
f.connectVertex(f.getSelectionCell(),m[w.keyCode],f.defaultEdgeLength,w,!0);null!=A&&0<A.length&&(1==A.length&&f.model.isEdge(A[0])?f.setSelectionCell(f.model.getTerminal(A[0],!1)):f.setSelectionCell(A[A.length-1]),f.scrollCellToVisible(f.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(f.view.getState(f.getSelectionCell())))}}else return this.isControlDown(w)?function(){b(w.keyCode,mxEvent.isShiftDown(w)?f.gridSize:null,!0)}:function(){b(w.keyCode,mxEvent.isShiftDown(w)?f.gridSize:null)}}return p.apply(this,
-arguments)};g.bindAction=mxUtils.bind(this,function(w,y,A,D){var E=this.actions.get(A);null!=E&&(A=function(){E.isEnabled()&&E.funct.apply(this,arguments)},y?D?g.bindControlShiftKey(w,A):g.bindControlKey(w,A):D?g.bindShiftKey(w,A):g.bindKey(w,A))});var k=this,u=g.escape;g.escape=function(w){u.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){f.exitGroup()});g.bindControlShiftKey(35,function(){f.enterGroup()});g.bindShiftKey(36,function(){f.home()});g.bindKey(35,function(){f.refresh()});
+arguments)};g.bindAction=mxUtils.bind(this,function(w,y,A,E){var D=this.actions.get(A);null!=D&&(A=function(){D.isEnabled()&&D.funct.apply(this,arguments)},y?E?g.bindControlShiftKey(w,A):g.bindControlKey(w,A):E?g.bindShiftKey(w,A):g.bindKey(w,A))});var k=this,u=g.escape;g.escape=function(w){u.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){f.exitGroup()});g.bindControlShiftKey(35,function(){f.enterGroup()});g.bindShiftKey(36,function(){f.home()});g.bindKey(35,function(){f.refresh()});
g.bindAction(80,!0,"print");g.bindAction(107,!0,"zoomIn");g.bindAction(109,!0,"zoomOut");g.bindAction(61,!0,"zoomIn");g.bindAction(187,!0,"zoomIn");g.bindAction(222,!0,"zoomIn");g.bindAction(173,!0,"zoomOut");g.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)g.bindAction(79,!0,"outline",!0),g.bindControlKey(36,function(){f.isEnabled()&&f.foldCells(!0)}),g.bindControlKey(35,function(){f.isEnabled()&&f.foldCells(!1)}),g.bindControlKey(13,function(){k.ctrlEnter()}),g.bindAction(8,
!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),
g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(90,!0,"redo",!0),g.bindAction(89,!0,"redo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,
@@ -2335,7 +2338,7 @@ mxResources.get("close"));w.className="geButton";this.tooltip.appendChild(w);thi
100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/u.width,this.maxTooltipHeight/u.height))/100),u=this.graph2.getGraphBounds()):(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+e+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",u.width*=e,u.height*=e)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");e=u.width+2*this.tooltipBorder+4;f=u.height+2*this.tooltipBorder;this.tooltip.style.overflow=
"visible";this.tooltip.style.width=e+"px";m=e;this.tooltipTitles&&null!=g&&0<g.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTopStyle="solid",this.tooltipTitle.style.borderTopWidth="1px",this.tooltipTitle.style.textAlign="center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position="absolute",this.tooltipTitle.style.paddingTop="6px",this.tooltipTitle.style.bottom="6px",this.tooltip.appendChild(this.tooltipTitle)):
this.tooltipTitle.innerText="",this.tooltipTitle.style.display="",mxUtils.write(this.tooltipTitle,g),this.tooltipTitle.setAttribute("title",g),m=Math.min(this.maxTooltipWidth,Math.max(e,this.tooltipTitle.scrollWidth+4)),g=this.tooltipTitle.offsetHeight+10,f+=g,this.tooltipTitle.style.marginTop=2-g+"px"):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");m>e&&(this.tooltip.style.width=m+"px");this.tooltip.style.height=f+"px";g=-Math.round(u.x-this.tooltipBorder)+
-(m>e?(m-e)/2:0);e=-Math.round(u.y-this.tooltipBorder);h=null!=h?h:this.getTooltipOffset(a,u);a=h.x;h=h.y;0!=g||0!=e?this.graph2.view.canvas.setAttribute("transform","translate("+g+","+e+")"):this.graph2.view.canvas.removeAttribute("transform");this.tooltip.style.position="absolute";this.tooltip.style.left=a+"px";this.tooltip.style.top=h+"px";mxUtils.fit(this.tooltip,this.tooltipBorder);this.lastCreated=Date.now()};
+(m>e?(m-e)/2:0);e=-Math.round(u.y-this.tooltipBorder);h=null!=h?h:this.getTooltipOffset(a,u);a=h.x;h=h.y;0!=g||0!=e?this.graph2.view.canvas.setAttribute("transform","translate("+g+","+e+")"):this.graph2.view.canvas.removeAttribute("transform");this.tooltip.style.position="absolute";this.tooltip.style.left=Math.max(0,a)+"px";this.tooltip.style.top=Math.max(0,h)+"px";mxUtils.fit(this.tooltip,this.tooltipBorder);this.lastCreated=Date.now()};
Sidebar.prototype.showTooltip=function(a,b,e,f,g,d){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var h=mxUtils.bind(this,function(){this.createTooltip(a,b,e,f,g,d)});null!=this.tooltip&&"none"!=this.tooltip.style.display?h():this.thread=window.setTimeout(h,this.tooltipDelay);this.currentElt=a}};
Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,b,e,f,g){null==a&&(a="");null!=f&&(a+=" "+f);return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(g,b,e,f)}))};
Sidebar.prototype.addEntries=function(a){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(e){var f=e.data,g=null!=e.title?e.title:"";null!=e.tags&&(g+=" "+e.tags);null!=f&&0<g.length?this.addEntry(g,mxUtils.bind(this,function(){f=this.editorUi.convertDataUri(f);var d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(d+="aspect=fixed;");return this.createVertexTemplate(d+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0)})):null!=e.xml&&0<g.length&&this.addEntry(g,
@@ -2348,20 +2351,20 @@ Sidebar.prototype.isEntryIgnored=function(a,b){b=!b;if(null!=a.parentLibraries&&
Sidebar.prototype.searchEntries=function(a,b,e,f,g,d){if(null!=this.taglist&&null!=a){"mxgraph."==a.substring(0,8)&&0>a.indexOf(" ")&&8<a.lastIndexOf(".")&&(a=a.substring(8).replace(/\./g," "));var h=a.toLowerCase().split(" ");a=new mxDictionary;g=(e+1)*b;for(var m=[],p=0,k=0;k<h.length;k++){var u=Editor.soundex(h[k].replace(/\.*\d*$/,""));if(0<u.length){m=this.taglist[h[k]];var w=null!=m?m.entries.slice():[];m=this.taglist[u];w=null!=m?w.concat(m.entries):w;u=new mxDictionary;if(0<w.length){m=[];
for(var y=0;y<w.length;y++){var A=w[y];if(0==p==(null==a.get(A))&&null==u.get(A)&&(u.put(A,A),!this.isEntryIgnored(A,d)&&(m.push(A),k==h.length-1&&m.length==g))){f(m.slice(e*b,g),g,!0,h);return}}}else m=[];a=u;p++}}d=m.length;f(m.slice(e*b,(e+1)*b),d,!1,h)}else f([],null,null,h)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],e={},f=0;f<a.length;f++)null==e[a[f]]&&(e[a[f]]="1",b.push(a[f]));return b.join(" ")}return null};
Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,e){};
-Sidebar.prototype.addSearchPalette=function(a){function b(S,aa){E=aa;S=S.firstChild.nextSibling.nextSibling;aa=document.createElement("span");aa.style.color="gray";aa.innerHTML="Enter";S.appendChild(aa)}function e(){k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));F.style.display="none";M=p.value="";O()}var f=this.editorUi,g=f.editor.graph,d=document.createElement("div");d.style.visibility="hidden";this.appendChild(d);var h=document.createElement("div");
+Sidebar.prototype.addSearchPalette=function(a){function b(S,aa){D=aa;S=S.firstChild.nextSibling.nextSibling;aa=document.createElement("span");aa.style.color="gray";aa.innerHTML="Enter";S.appendChild(aa)}function e(){k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));F.style.display="none";M=p.value="";O()}var f=this.editorUi,g=f.editor.graph,d=document.createElement("div");d.style.visibility="hidden";this.appendChild(d);var h=document.createElement("div");
h.className="geSidebar geSearchSidebar";a||(h.style.display="none");var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";var p=document.createElement("input");p.setAttribute("id","geOmniSearch");p.setAttribute("placeholder",mxResources.get("typeSlashToSearch"));p.setAttribute("type","text");m.appendChild(p);var k=document.createElement("img");k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));
k.className="geAdaptiveAsset";m.appendChild(k);h.appendChild(m);var u=!1;mxEvent.addGestureListeners(p,mxUtils.bind(this,function(S){u=!1;mxClient.IS_TOUCH||mxEvent.getSource(S)!=p||document.activeElement==p||(p.focus(),mxClient.IS_GC||mxClient.IS_FF?p.select():document.execCommand("selectAll",!1,null),u=!0)}),mxUtils.bind(this,function(S){mxEvent.getSource(S)==p&&u&&mxEvent.consume(S)}),mxUtils.bind(this,function(S){u&&(mxEvent.consume(S),u=!1)}));var w=[],y=mxUtils.bind(this,function(S,aa){f.hideCurrentMenu();
-mxUtils.remove(S,w);w.unshift(S);5<w.length&&w.pop();S.funct.apply(this,aa);p.value=null}),A="about deleteAll showBoundingBox createSidebarEntry downloadDesktop toggleGoogleFonts".split(" "),D=mxUtils.bind(this,function(S){var aa=null,Y;for(Y in f.actions.actions){var ba=0>A.indexOf(Y)&&"test"!=Y.substring(0,4)?f.actions.get(Y):null;if(null!=ba&&ba.isEnabled()&&ba.visible){if(Y.toLowerCase()==S)return ba;for(var L=S.toLowerCase().split(" "),U=0,X=0;X<L.length;X++)0==L[X].length?U++:(0<=Y.toLowerCase().indexOf(L[X])||
-0<=ba.getTitle().toLowerCase().indexOf(L[X]))&&U++;U==L.length&&(0>w.indexOf(aa)||null!=aa&&!aa.isEnabled())&&(aa=ba)}}return aa}),E=null;f.addMenuHandler(p,mxUtils.bind(this,function(S,aa){function Y(ja){if(null!=ja&&ja.visible){var ta=S.addItem(ja.getTitle(),null,function(){y(ja,arguments)},aa,null,ja.isEnabled());ja.toggleAction&&ja.isSelected()&&S.addCheckmark(ta,Editor.checkmarkImage);null!=E||!ja.isEnabled()||0!=p.value.length&&U!=ja||b(ta,function(){y(ja,arguments);g.container.focus()})}}var ba=
-p.value.toLowerCase();E=null;var L=S.addItem(mxResources.get("searchShapes"),null,mxUtils.bind(this,function(){fa()}),aa);b(L,function(){fa()});S.addItem(mxResources.get("findInDiagram"),null,mxUtils.bind(this,function(){f.hideCurrentMenu();f.showSearchWindow(!0,p.value);p.value=""}),aa);Editor.enableChatGpt&&!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&"draw.io"==f.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&S.addItem(mxResources.get("generate"),
-null,mxUtils.bind(this,function(){f.openTemplateDialog(encodeURIComponent(p.value));p.value=""}),aa);!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&S.addItem(mxResources.get("help"),null,mxUtils.bind(this,function(){f.searchHelp(p.value);p.value=""}),aa);S.addSeparator();var U=0<p.value.length?D(ba):null;Y(U);for(L=0;L<w.length;L++)w[L]!=U&&Y(w[L]);if(0<ba.length&&null!=f.pages)for(S.addSeparator(),L=0;L<f.pages.length&&!function(ja){if(null!=ja.getName()&&0<=ja.getName().toLowerCase().indexOf(ba)){var ta=
-function(){f.selectPage(ja);g.container.focus();p.value=""},ca=S.addItem(ja.getName()+" ("+mxResources.get("page")+")",null,ta,aa);null==E&&b(ca,ta);return!0}return!1}(f.pages[L]);L++);if(0<ba.length&&null!=f.sidebar&&null!=f.sidebar.entries)for(S.addSeparator(),L=0;L<f.sidebar.entries.length;L++)for(var X=f.sidebar.entries[L].entries,ia=0;ia<X.length;ia++)(function(ja){var ta=f.sidebar.getConfigurationById(ja.id),ca=ja.title.toLowerCase().split(" ");null!=ta&&0<=mxUtils.indexOf(ca,ba)&&(ca=function(){var P=
-f.sidebar.showPalettes(ta.prefix||"",ta.libs||[ta.id],!0);p.value="";null!=P&&1<P.length&&(null==P[1].firstChild||null!=P[1].firstChild.firstChild&&"none"!=P[1].firstChild.style.display||P[0].click(),P[0].scrollIntoView({behavior:"smooth"}))},ja=S.addItem(ja.title+" ("+mxResources.get("openLibrary")+")",null,ca,aa),null==E&&b(ja,ca));return!0})(X[ia])}),null,!0);var F=document.createElement("div");F.style.display="none";F.style.paddingTop="8px";F.style.alignItems="center";F.style.justifyContent="center";
+mxUtils.remove(S,w);w.unshift(S);5<w.length&&w.pop();S.funct.apply(this,aa);p.value=null}),A="about deleteAll showBoundingBox createSidebarEntry downloadDesktop toggleGoogleFonts".split(" "),E=mxUtils.bind(this,function(S){var aa=null,Y;for(Y in f.actions.actions){var ba=0>A.indexOf(Y)&&"test"!=Y.substring(0,4)?f.actions.get(Y):null;if(null!=ba&&ba.isEnabled()&&ba.visible){if(Y.toLowerCase()==S)return ba;for(var L=S.toLowerCase().split(" "),U=0,X=0;X<L.length;X++)0==L[X].length?U++:(0<=Y.toLowerCase().indexOf(L[X])||
+0<=ba.getTitle().toLowerCase().indexOf(L[X]))&&U++;U==L.length&&(0>w.indexOf(aa)||null!=aa&&!aa.isEnabled())&&(aa=ba)}}return aa}),D=null;f.addMenuHandler(p,mxUtils.bind(this,function(S,aa){function Y(ja){if(null!=ja&&ja.visible){var ta=S.addItem(ja.getTitle(),null,function(){y(ja,arguments)},aa,null,ja.isEnabled());ja.toggleAction&&ja.isSelected()&&S.addCheckmark(ta,Editor.checkmarkImage);null!=D||!ja.isEnabled()||0!=p.value.length&&U!=ja||b(ta,function(){y(ja,arguments);g.container.focus()})}}var ba=
+p.value.toLowerCase();D=null;var L=S.addItem(mxResources.get("searchShapes"),null,mxUtils.bind(this,function(){fa()}),aa);b(L,function(){fa()});S.addItem(mxResources.get("findInDiagram"),null,mxUtils.bind(this,function(){f.hideCurrentMenu();f.showSearchWindow(!0,p.value);p.value=""}),aa);Editor.enableChatGpt&&!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&"draw.io"==f.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&S.addItem(mxResources.get("generate"),
+null,mxUtils.bind(this,function(){f.openGenerateDialog(p.value);p.value=""}),aa);!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&S.addItem(mxResources.get("help"),null,mxUtils.bind(this,function(){f.searchHelp(p.value);p.value=""}),aa);S.addSeparator();var U=0<p.value.length?E(ba):null;Y(U);for(L=0;L<w.length;L++)w[L]!=U&&Y(w[L]);if(0<ba.length&&null!=f.pages)for(S.addSeparator(),L=0;L<f.pages.length&&!function(ja){if(null!=ja.getName()&&0<=ja.getName().toLowerCase().indexOf(ba)){var ta=
+function(){f.selectPage(ja);g.container.focus();p.value=""},ca=S.addItem(ja.getName()+" ("+mxResources.get("page")+")",null,ta,aa);null==D&&b(ca,ta);return!0}return!1}(f.pages[L]);L++);if(0<ba.length&&null!=f.sidebar&&null!=f.sidebar.entries)for(S.addSeparator(),L=0;L<f.sidebar.entries.length;L++)for(var X=f.sidebar.entries[L].entries,ia=0;ia<X.length;ia++)(function(ja){var ta=f.sidebar.getConfigurationById(ja.id),ca=ja.title.toLowerCase().split(" ");null!=ta&&0<=mxUtils.indexOf(ca,ba)&&(ca=function(){var P=
+f.sidebar.showPalettes(ta.prefix||"",ta.libs||[ta.id],!0);p.value="";null!=P&&1<P.length&&(null==P[1].firstChild||null!=P[1].firstChild.firstChild&&"none"!=P[1].firstChild.style.display||P[0].click(),P[0].scrollIntoView({behavior:"smooth"}))},ja=S.addItem(ja.title+" ("+mxResources.get("openLibrary")+")",null,ca,aa),null==D&&b(ja,ca));return!0})(X[ia])}),null,!0);var F=document.createElement("div");F.style.display="none";F.style.paddingTop="8px";F.style.alignItems="center";F.style.justifyContent="center";
var H=mxUtils.button(mxResources.get("moreResults"),function(){fa()});H.setAttribute("title",mxResources.get("moreResults"));H.className="geBtn gePrimaryBtn";H.style.borderRadius="16px";H.style.padding="8px 12px";F.appendChild(H);h.appendChild(F);var M="",N=!1,J=!1,V=0,W={},T=12,O=mxUtils.bind(this,function(){N=!1;this.currentSearch=null;for(var S=h.firstChild;null!=S;){var aa=S.nextSibling;S!=m&&S!=F&&S.parentNode.removeChild(S);S=aa}});mxEvent.addListener(k,"click",function(){k.getAttribute("src")!=
Editor.magnifyImage&&e();p.focus()});var fa=mxUtils.bind(this,function(){f.hideCurrentMenu();T=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=p.value){if(null!=F.parentNode&&(M!=p.value&&(O(),M=p.value,W={},J=!1,V=0),!N&&!J)){H.setAttribute("disabled","true");F.style.display="flex";H.style.cursor="wait";H.innerHTML="";mxUtils.write(H,mxResources.get("loading")+"...");N=!0;var S={};this.currentSearch=S;try{this.searchEntries(M,T,V,mxUtils.bind(this,
function(aa,Y,ba,L){if(this.currentSearch==S){aa=null!=aa?aa:[];N=!1;V++;this.insertSearchHint(h,M,T,V,aa,Y,ba,L);0==aa.length&&1==V&&(M="");null!=F.parentNode&&F.parentNode.removeChild(F);for(Y=0;Y<aa.length;Y++)mxUtils.bind(this,function(U){try{var X=U();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(U,!1)&&(X.style.opacity=this.closedLibraryOpacity);null==W[X.innerHTML]?(W[X.innerHTML]=null!=U.parentLibraries?U.parentLibraries.slice():[],h.appendChild(X)):null!=
U.parentLibraries&&(W[X.innerHTML]=W[X.innerHTML].concat(U.parentLibraries));mxEvent.addGestureListeners(X,null,null,mxUtils.bind(this,function(ia){var ja=W[X.innerHTML];mxEvent.isPopupTrigger(ia)&&this.showPopupMenuForEntry(X,ja,ia)}));mxEvent.disableContextMenu(X)}catch(ia){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(ia.stack)):console.error(ia))}})(aa[Y]);ba?(H.removeAttribute("disabled"),H.innerHTML="",mxUtils.write(H,mxResources.get("moreResults"))):
-(H.innerHTML=mxResources.get("reset"),F.style.display="none",J=!0);H.style.cursor="";h.appendChild(F)}}),mxUtils.bind(this,function(){H.style.cursor=""}),this.searchClosedLibraries)}catch(aa){f.handleError(aa)}}}else O(),M=p.value="",W={},F.style.display="none",J=!1,p.focus()});this.searchShapes=function(S){p.value=S;fa()};mxEvent.addListener(p,"keydown",mxUtils.bind(this,function(S){13==S.keyCode&&null!=E?(E(S,S),mxEvent.consume(S)):9==S.keyCode?(g.container.focus(),mxEvent.consume(S)):27==S.keyCode&&
+(H.innerHTML=mxResources.get("reset"),F.style.display="none",J=!0);H.style.cursor="";h.appendChild(F)}}),mxUtils.bind(this,function(){H.style.cursor=""}),this.searchClosedLibraries)}catch(aa){f.handleError(aa)}}}else O(),M=p.value="",W={},F.style.display="none",J=!1,p.focus()});this.searchShapes=function(S){p.value=S;fa()};mxEvent.addListener(p,"keydown",mxUtils.bind(this,function(S){13==S.keyCode&&null!=D?(D(S,S),mxEvent.consume(S)):9==S.keyCode?(g.container.focus(),mxEvent.consume(S)):27==S.keyCode&&
(e(),mxEvent.consume(S))}));a=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){""==p.value?(k.setAttribute("src",Editor.magnifyImage),k.setAttribute("title",mxResources.get("search"))):(k.setAttribute("src",Editor.crossImage),k.setAttribute("title",mxResources.get("reset")));""==p.value?(J=!0,F.style.display="none"):p.value!=M?(F.style.display="none",J=!1):N||(F.style.display=J?"none":"flex")}),0)});mxEvent.addListener(p,"keyup",a);mxEvent.addListener(p,"paste",a);mxEvent.addListener(p,
"cut",a);mxEvent.addListener(p,"mousedown",function(S){S.stopPropagation&&S.stopPropagation();S.cancelBubble=!0});mxEvent.addListener(p,"selectstart",function(S){S.stopPropagation&&S.stopPropagation();S.cancelBubble=!0});a=document.createElement("div");a.appendChild(h);this.appendChild(a);this.palettes.search=[d,a]};
Sidebar.prototype.insertSearchHint=function(a,b,e,f,g,d,h,m){0==g.length&&1==f&&(e=document.createElement("div"),e.className="geSidebarText",b=mxResources.get("noResultsFor",[b]),e.setAttribute("title",b),mxUtils.write(e,b),a.appendChild(e))};
@@ -2474,17 +2477,17 @@ a.width,(e-2*this.thumbBorder)/a.height))/100,this.graph.view.scaleAndTranslate(
null!=w?"visible":"hidden";k.style.left=(null!=u?u:this.thumbBorder-1)+"px";k.style.top=k.style.left;k.style.width=b+"px";k.style.height=e+"px";k.style.visibility="";k.style.minWidth="";k.style.minHeight="";this.disablePointerEvents(k);f.appendChild(k);this.sidebarTitles&&null!=g&&0!=h&&(f.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",
b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,g),f.appendChild(b));return a};
Sidebar.prototype.createSection=function(a){return mxUtils.bind(this,function(){var b=document.createElement("div");b.setAttribute("title",a);b.style.textOverflow="ellipsis";b.style.whiteSpace="nowrap";b.style.textAlign="center";b.style.overflow="hidden";b.style.width="100%";b.style.padding="14px 0";mxUtils.write(b,a);return b})};
-Sidebar.prototype.createItem=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var D=document.createElement("a"),E=2*this.thumbBorder;D.style.width=k+E+"px";D.style.height=u+E+"px";mxEvent.addListener(D,"click",function(H){mxEvent.consume(H)});var F=new mxRectangle(0,0,g,d);null!=a&&0<a.length?(E=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(E),this.initialDefaultVertexStyle,this.initialDefaultEdgeStyle),
-null!=w?(D.className="geButton",D.style.backgroundImage="url("+w+")",D.style.backgroundRepeat="no-repeat",D.style.backgroundPosition="center",D.style.backgroundSize="24px 24px"):(D.className="geItem",this.createThumb(E,k,u,D,b,e,f,g,d)),1<a.length||a[0].vertex?(f=this.createDragSource(D,this.createDropHandler(a,!0,h,F,y,A),this.createDragPreview(g,d),a,F,y),this.addClickHandler(D,f,a,p,y),f.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):
-null!=a[0]&&a[0].edge&&(f=this.createDragSource(D,this.createDropHandler(a,!1,h,F,y,A),this.createDragPreview(g,d),a,F,y),this.addClickHandler(D,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(D,null,mxUtils.bind(this,function(H){mxEvent.isMouseEvent(H)&&this.showTooltip(D,a,F.width,F.height,b,e)}))):(D.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",D.setAttribute("title",b));return D};
+Sidebar.prototype.createItem=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A,E){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var D=E;if(null==D){D=document.createElement("a");var F=2*this.thumbBorder;D.style.width=k+F+"px";D.style.height=u+F+"px"}mxEvent.addListener(D,"click",function(M){mxEvent.consume(M)});var H=new mxRectangle(0,0,g,d);null!=a&&0<a.length?(F=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(F),this.initialDefaultVertexStyle,this.initialDefaultEdgeStyle),
+null!=w?(D.className="geButton",D.style.backgroundImage="url("+w+")",D.style.backgroundRepeat="no-repeat",D.style.backgroundPosition="center",D.style.backgroundSize="24px 24px"):null==E&&(D.className="geItem",this.createThumb(F,k,u,D,b,e,f,g,d)),1<a.length||a[0].vertex?(f=this.createDragSource(D,this.createDropHandler(a,!0,h,H,y,A),this.createDragPreview(g,d),a,H,y),this.addClickHandler(D,f,a,p,y),f.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):
+null!=a[0]&&a[0].edge&&(f=this.createDragSource(D,this.createDropHandler(a,!1,h,H,y,A),this.createDragPreview(g,d),a,H,y),this.addClickHandler(D,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(D,null,mxUtils.bind(this,function(M){mxEvent.isMouseEvent(M)&&this.showTooltip(D,a,H.width,H.height,b,e)}))):null==E&&(D.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",D.setAttribute("title",b));return D};
Sidebar.prototype.createDropHandler=function(a,b,e,f,g,d){e=null!=e?e:!0;return mxUtils.bind(this,function(h,m,p,k,u,w){for(w=w?null:mxEvent.isTouchEvent(m)||mxEvent.isPenEvent(m)?document.elementFromPoint(mxEvent.getClientX(m),mxEvent.getClientY(m)):mxEvent.getSource(m);null!=w&&w!=this.container;)w=w.parentNode;if(null==w&&h.isEnabled()){a=h.getImportableCells(a);if(0<a.length){h.stopEditing();w=null==p||mxEvent.isAltDown(m)?!1:h.isValidDropTarget(p,a,m);var y=null;null==p||w||(p=null);if(!h.isCellLocked(p||
-h.getDefaultParent())){h.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&h.isSplitTarget(p,a,m)){var A=h.view.scale,D=h.view.translate,E=(k+D.x)*A,F=(u+D.y)*A,H=h.cloneCells(a);h.splitEdge(p,H,null,k-f.width/2,u-f.height/2,E,F);y=H}else if(0<a.length&&(y=h.importCells(a,k,u,p),h.model.isVertex(d)&&1==y.length&&h.model.isVertex(y[0]))){var M=h.insertEdge(h.model.getParent(d),null,"",d,y[0],h.createCurrentEdgeStyle());h.applyNewEdgeStyle(d,[M]);y.push(M);h.connectionHandler.insertBeforeSource&&
-h.insertEdgeBeforeCell(M,d)}if(null!=h.layoutManager){var N=h.layoutManager.getLayout(p);if(null!=N){A=h.view.scale;D=h.view.translate;E=(k+D.x)*A;F=(u+D.y)*A;for(var J=0;J<y.length;J++)N.moveCell(y[J],E,F)}}!e||null!=m&&mxEvent.isShiftDown(m)||h.fireEvent(new mxEventObject("cellsInserted","cells",y));for(J=0;J<y.length;J++)h.model.isVertex(y[J])&&h.isAutoSizeCell(y[J])&&h.updateCellSize(y[J])}catch(V){this.editorUi.handleError(V)}finally{h.model.endUpdate()}null!=y&&0<y.length&&(h.scrollCellToVisible(y[0]),
+h.getDefaultParent())){h.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&h.isSplitTarget(p,a,m)){var A=h.view.scale,E=h.view.translate,D=(k+E.x)*A,F=(u+E.y)*A,H=h.cloneCells(a);h.splitEdge(p,H,null,k-f.width/2,u-f.height/2,D,F);y=H}else if(0<a.length&&(y=h.importCells(a,k,u,p),h.model.isVertex(d)&&1==y.length&&h.model.isVertex(y[0]))){var M=h.insertEdge(h.model.getParent(d),null,"",d,y[0],h.createCurrentEdgeStyle());h.applyNewEdgeStyle(d,[M]);y.push(M);h.connectionHandler.insertBeforeSource&&
+h.insertEdgeBeforeCell(M,d)}if(null!=h.layoutManager){var N=h.layoutManager.getLayout(p);if(null!=N){A=h.view.scale;E=h.view.translate;D=(k+E.x)*A;F=(u+E.y)*A;for(var J=0;J<y.length;J++)N.moveCell(y[J],D,F)}}!e||null!=m&&mxEvent.isShiftDown(m)||h.fireEvent(new mxEventObject("cellsInserted","cells",y));for(J=0;J<y.length;J++)h.model.isVertex(y[J])&&h.isAutoSizeCell(y[J])&&h.updateCellSize(y[J])}catch(V){this.editorUi.handleError(V)}finally{h.model.endUpdate()}null!=y&&0<y.length&&(h.scrollCellToVisible(y[0]),
h.setSelectionCells(y));(g||h.editAfterInsert&&null!=m&&mxEvent.isMouseEvent(m)&&null!=y&&1==y.length)&&window.setTimeout(function(){h.startEditing(y[0])},0)}}mxEvent.consume(m)}})};Sidebar.prototype.createDragPreview=function(a,b){var e=document.createElement("div");e.className="geDragPreview";e.style.width=a+"px";e.style.height=b+"px";return e};
-Sidebar.prototype.dropAndConnect=function(a,b,e,f,g,d,h){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:h;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),y=m.getCellGeometry(b[f]),A=m.model.getParent(a),D=!0;if(null!=m.layoutManager){var E=m.layoutManager.getLayout(A);null!=E&&E.constructor==mxStackLayout&&(D=!1)}k=m.model.isEdge(a)?null:m.view.getState(A);var F=E=0;if(null!=k){var H=k.origin;E=H.x;
-F=H.y}var M=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&D),N=m.getCellAt((p.x+E+m.view.translate.x)*m.view.scale,(p.y+F+m.view.translate.y)*m.view.scale,null,null,null,function(fa,S,aa){return!m.isContainer(fa.cell)});if(null!=N&&N!=A)k=m.view.getState(N),null!=k&&(H=k.origin,A=N,M=!0,m.model.isEdge(a)||(p.x-=H.x-E,p.y-=H.y-F));else if(!D||m.isTableRow(a)||m.isTableCell(a))p.x+=E,p.y+=F;E=y.x;F=y.y;m.model.isEdge(b[f])&&(F=E=0);k=b=m.importCells(b,p.x-(M?E:0),p.y-
+Sidebar.prototype.dropAndConnect=function(a,b,e,f,g,d,h){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:h;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),y=m.getCellGeometry(b[f]),A=m.model.getParent(a),E=!0;if(null!=m.layoutManager){var D=m.layoutManager.getLayout(A);null!=D&&D.constructor==mxStackLayout&&(E=!1)}k=m.model.isEdge(a)?null:m.view.getState(A);var F=D=0;if(null!=k){var H=k.origin;D=H.x;
+F=H.y}var M=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&E),N=m.getCellAt((p.x+D+m.view.translate.x)*m.view.scale,(p.y+F+m.view.translate.y)*m.view.scale,null,null,null,function(fa,S,aa){return!m.isContainer(fa.cell)});if(null!=N&&N!=A)k=m.view.getState(N),null!=k&&(H=k.origin,A=N,M=!0,m.model.isEdge(a)||(p.x-=H.x-D,p.y-=H.y-F));else if(!E||m.isTableRow(a)||m.isTableCell(a))p.x+=D,p.y+=F;D=y.x;F=y.y;m.model.isEdge(b[f])&&(F=D=0);k=b=m.importCells(b,p.x-(M?D:0),p.y-
(M?F:0),M?A:null);if(m.model.isEdge(a))m.model.setTerminal(a,b[f],e==mxConstants.DIRECTION_NORTH),null!=h&&null!=d&&(m.model.remove(b[h]),m.updateShapes(b[h],[a]));else if(m.model.isEdge(b[f])&&null==d){m.model.setTerminal(b[f],a,!0);var J=m.getCellGeometry(b[f]),V=null!=J?J.getTerminalPoint(!0):null;J.points=null;if(null!=V)for(e=0;e<b.length;e++)if(m.model.isEdge(b[e])&&e!=f){var W=m.getCellGeometry(b[e]),T=null!=W?W.getTerminalPoint(!0):null;null!=T&&T.x==V.x&&T.y==V.y&&m.model.setTerminal(b[e],
-a,!0)}if(null!=J.getTerminalPoint(!1))J.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(M&&m.model.isVertex(A)){var O=m.view.getState(A);H=O.cell!=m.view.currentRoot?O.origin:new mxPoint(0,0);m.cellsMoved(b,H.x,H.y,null,null,!0)}}else null!=d&&(y=m.getCellGeometry(b[d]),E=p.x-Math.round(y.x),F=p.y-Math.round(y.y),p.x=Math.round(y.x),p.y=Math.round(y.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,E,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=h?m.model.setTerminal(b[h],a,!0):b.push(m.insertEdge(null,
+a,!0)}if(null!=J.getTerminalPoint(!1))J.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(M&&m.model.isVertex(A)){var O=m.view.getState(A);H=O.cell!=m.view.currentRoot?O.origin:new mxPoint(0,0);m.cellsMoved(b,H.x,H.y,null,null,!0)}}else null!=d&&(y=m.getCellGeometry(b[d]),D=p.x-Math.round(y.x),F=p.y-Math.round(y.y),p.x=Math.round(y.x),p.y=Math.round(y.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,D,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=h?m.model.setTerminal(b[h],a,!0):b.push(m.insertEdge(null,
null,"",a,b[f],m.createCurrentEdgeStyle())));null!=g&&mxEvent.isShiftDown(g)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(fa){this.editorUi.handleError(fa)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=h&&1<k.length&&k.splice(h,1);return k};
Sidebar.prototype.getDropAndConnectGeometry=function(a,b,e,f){var g=this.editorUi.editor.graph,d=g.view,h=1<f.length,m=g.view.getState(a),p=g.getCellGeometry(a);f=g.getCellGeometry(b);null!=m&&null!=p&&null!=f&&(f=f.clone(),g.model.isEdge(a)?(p=m.absolutePoints,b=p[0],g=p[p.length-1],e==mxConstants.DIRECTION_NORTH?(f.x=b.x/d.scale-d.translate.x-f.width/2,f.y=b.y/d.scale-d.translate.y-f.height/2):(f.x=g.x/d.scale-d.translate.x-f.width/2,f.y=g.y/d.scale-d.translate.y-f.height/2)):(p.relative&&(p=p.clone(),
p.x=(m.x-d.translate.x)/d.scale,p.y=(m.y-d.translate.y)/d.scale),d=g.defaultEdgeLength,g.model.isEdge(b)&&null!=f.getTerminalPoint(!0)&&null!=f.getTerminalPoint(!1)?(b=f.getTerminalPoint(!0),g=f.getTerminalPoint(!1),d=g.x-b.x,b=g.y-b.y,d=Math.sqrt(d*d+b*b),f.x=p.getCenterX(),f.y=p.getCenterY(),f.width=1,f.height=1,e==mxConstants.DIRECTION_NORTH?(f.height=d,f.y=p.y-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1)):e==mxConstants.DIRECTION_EAST?(f.width=d,f.x=p.x+p.width,f.setTerminalPoint(new mxPoint(f.x+
@@ -2493,7 +2496,7 @@ f.width/2+d:e==mxConstants.DIRECTION_SOUTH?f.y=f.y+p.height/2+f.height/2+d:e==mx
2):e==mxConstants.DIRECTION_WEST&&(f.x-=p.getCenterX()+p.width/2,f.y-=p.getCenterY()))))));return f};Sidebar.prototype.isDropStyleEnabled=function(a,b){var e=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(e=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return e};
Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};Sidebar.prototype.disablePointerEvents=function(a){mxUtils.visitNodes(a,mxUtils.bind(this,function(b){b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.pointerEvents="none",b.removeAttribute("pointer-events"))}))};
Sidebar.prototype.createDragSource=function(a,b,e,f,g,d){function h(oa,za){var Aa=mxUtils.createImage(oa.src);Aa.style.width=oa.width+"px";Aa.style.height=oa.height+"px";null!=za&&Aa.setAttribute("title",za);mxUtils.setOpacity(Aa,oa==this.refreshTarget?30:20);Aa.style.position="absolute";Aa.style.cursor="crosshair";return Aa}function m(oa,za,Aa,Ma){null!=Ma.parentNode&&(mxUtils.contains(Aa,oa,za)?(mxUtils.setOpacity(Ma,100),U=Ma):mxUtils.setOpacity(Ma,Ma==S?30:20));return Aa}var p=this.editorUi,k=
-p.editor.graph,u=null,w=null,y=this;d=0;for(var A=this.livePreview,D=0;D<f.length&&A;D++)d+=k.model.getDescendants(f[D]).length,A=d<k.graphHandler.maxLivePreview;for(D=0;D<f.length&&(null==w&&k.model.isVertex(f[D])?w=D:null==u&&k.model.isEdge(f[D])&&null==k.model.getTerminal(f[D],!0)&&(u=D),null==w||null==u);D++);var E=this.isDropStyleEnabled(f,w),F=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(oa,za,Aa,Ma,Pa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
+p.editor.graph,u=null,w=null,y=this;d=0;for(var A=this.livePreview,E=0;E<f.length&&A;E++)d+=k.model.getDescendants(f[E]).length,A=d<k.graphHandler.maxLivePreview;for(E=0;E<f.length&&(null==w&&k.model.isVertex(f[E])?w=E:null==u&&k.model.isEdge(f[E])&&null==k.model.getTerminal(f[E],!0)&&(u=E),null==w||null==u);E++);var D=this.isDropStyleEnabled(f,w),F=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(oa,za,Aa,Ma,Pa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
J&&U==S){var Ka=oa.isCellSelected(J.cell)?oa.getSelectionCells():[J.cell];oa.updateShapes(oa.model.isEdge(J.cell)?f[0]:f[w],Ka,!0);oa.setSelectionCells(Ka)}else null!=f&&null!=U&&null!=M&&U!=S?(Ka=oa.model.isEdge(M.cell)||null==u?w:u,oa.setSelectionCells(this.dropAndConnect(M.cell,f,L,Ka,za,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(oa.view.getState(oa.getSelectionCell()))}),e,0,0,k.autoscroll,!0,!0);A&&(F.createDragElement=mxUtils.bind(this,function(){return F.createPreviewElement(this.graph)}),
F.createPreviewElement=mxUtils.bind(this,function(oa){var za=document.createElement("a");za.className="geItem";za.style.overflow="visible";oa=oa.view.scale;za.style.width=oa*Math.max(1,g.width)+"px";za.style.height=oa*Math.max(1,g.height)+"px";mxUtils.setOpacity(za,50);var Aa=k.cloneCells(f);this.graph.pasteCellStyles(k.includeDescendants(Aa),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);y.createThumb(Aa,oa*Math.max(1,g.width),oa*Math.max(1,g.height),za,null,null,null,null,null,k.shapeBackgroundColor,
0,oa);return za}));var H=F.mouseDown;F.mouseDown=function(oa){mxEvent.isPopupTrigger(oa)||mxEvent.isMultiTouchEvent(oa)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),H.apply(this,arguments))};var M=null,N=null,J=null,V=!1,W=h(this.triangleUp,mxResources.get("connect")),T=h(this.triangleRight,mxResources.get("connect")),O=h(this.triangleDown,mxResources.get("connect")),fa=h(this.triangleLeft,mxResources.get("connect")),S=h(this.refreshTarget,mxResources.get("replace")),aa=null,Y=h(this.roundDrop),
@@ -2503,7 +2506,7 @@ null:oa.getCellGeometry(M.cell),Ja=oa.getCellGeometry(f[Ma]),ra=oa.model.getPare
Pa.height*Aa.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=F.currentHighlight&&null!=F.currentHighlight.state&&oa.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*Aa.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-
g.height*Aa.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var ta=(new Date).getTime(),ca=0,P=null,da=this.editorUi.editor.graph.getCellStyle(f[0]);F.getDropTarget=mxUtils.bind(this,function(oa,za,Aa,Ma){var Pa=mxEvent.isAltDown(Ma)||
null==f?null:oa.getCellAt(za,Aa,null,null,null,function(Wa,Xa,bb){return oa.isContainer(Wa.cell)&&"0"!=mxUtils.getValue(Wa.style,"dropTarget","1")});if(null!=Pa&&!this.graph.isCellConnectable(Pa)&&!this.graph.model.isEdge(Pa)){var Ka=this.graph.getModel().getParent(Pa);this.graph.getModel().isVertex(Ka)&&this.graph.isCellConnectable(Ka)&&(Pa=Ka)}oa.isCellLocked(Pa)&&(Pa=null);var Ja=oa.view.getState(Pa);Ka=U=null;P!=Ja?(ta=(new Date).getTime(),ca=0,P=Ja,null!=this.updateThread&&window.clearTimeout(this.updateThread),
-null!=Ja&&(this.updateThread=window.setTimeout(function(){null==U&&(P=Ja,F.getDropTarget(oa,za,Aa,Ma))},this.dropTargetDelay+10))):ca=(new Date).getTime()-ta;if(E&&2500>ca&&null!=Ja&&!mxEvent.isShiftDown(Ma)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(da,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,
+null!=Ja&&(this.updateThread=window.setTimeout(function(){null==U&&(P=Ja,F.getDropTarget(oa,za,Aa,Ma))},this.dropTargetDelay+10))):ca=(new Date).getTime()-ta;if(D&&2500>ca&&null!=Ja&&!mxEvent.isShiftDown(Ma)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(da,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,
mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(da,mxConstants.STYLE_SHAPE)||1500<ca||oa.model.isEdge(Ja.cell))&&ca>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ja)&&(oa.model.isVertex(Ja.cell)&&null!=w||oa.model.isEdge(Ja.cell)&&oa.model.isEdge(f[0]))){if(oa.isCellEditable(Ja.cell)){J=Ja;var ra=oa.model.isEdge(Ja.cell)?oa.view.getPoint(Ja):new mxPoint(Ja.getCenterX(),Ja.getCenterY());ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/
2,this.refreshTarget.width,this.refreshTarget.height);S.style.left=Math.floor(ra.x)+"px";S.style.top=Math.floor(ra.y)+"px";null==aa&&(oa.container.appendChild(S),aa=S.parentNode);m(za,Aa,ra,S)}}else null==J||!mxUtils.contains(J,za,Aa)||1500<ca&&!mxEvent.isShiftDown(Ma)?(J=null,null!=aa&&(S.parentNode.removeChild(S),aa=null)):null!=J&&null!=aa&&(ra=oa.model.isEdge(J.cell)?oa.view.getPoint(J):new mxPoint(J.getCenterX(),J.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/
2,this.refreshTarget.width,this.refreshTarget.height),m(za,Aa,ra,S));if(V&&null!=M&&!mxEvent.isAltDown(Ma)&&null==U){Ka=mxRectangle.fromRectangle(M);if(oa.model.isEdge(M.cell)){var Da=M.absolutePoints;null!=Y.parentNode&&(ra=Da[0],Ka.add(m(za,Aa,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),Y)));null!=ba.parentNode&&(Da=Da[Da.length-1],Ka.add(m(za,Aa,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,
@@ -2519,7 +2522,7 @@ Ka.length;ra++)null!=Ka[ra].parentNode&&Ka[ra].parentNode.removeChild(Ka[ra]);V|
Sidebar.prototype.itemClicked=function(a,b,e,f){f=this.editorUi.editor.graph;f.container.focus();if(mxEvent.isAltDown(e)&&1==f.getSelectionCount()){for(var g=b=null,d=0;d<a.length&&(null==g&&f.model.isVertex(a[d])?g=d:null==b&&f.model.isEdge(a[d])&&null==f.model.getTerminal(a[d],!0)&&(b=d),null==g||null==b);d++);d=null==b?g:b;f.setSelectionCells(this.dropAndConnect(f.getSelectionCell(),a,mxEvent.isMetaDown(e)||mxEvent.isControlDown(e)?mxEvent.isShiftDown(e)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:
mxEvent.isShiftDown(e)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,d,e,g,b));f.scrollCellToVisible(f.getSelectionCell())}else mxEvent.isShiftDown(e)&&!f.isSelectionEmpty()?(e=f.getEditableCells(f.getSelectionCells()),f.updateShapes(a[0],e,!0),f.scrollCellToVisible(e)):(a=mxEvent.isAltDown(e)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(a,!0)),b.drop(f,e,null,a.x,a.y,!0))};
Sidebar.prototype.addClickHandler=function(a,b,e,f){var g=b.getGraphForEvent,d=b.mouseDown,h=b.mouseMove,m=b.mouseUp,p=this.editorUi.editor.graph.tolerance,k=!1,u=null,w=this,y=null;b.getGraphForEvent=function(A){return k?g.apply(this,arguments):null};b.mouseDown=function(A){d.apply(this,arguments);u=new mxPoint(mxEvent.getClientX(A),mxEvent.getClientY(A));y=a.style.opacity;k=!1;""==y&&(y="1");null!=this.dragElement&&(this.dragElement.style.display="none")};b.mouseMove=function(A){(k=null!=u&&(Math.abs(u.x-
-mxEvent.getClientX(A))>p||Math.abs(u.y-mxEvent.getClientY(A))>p))&&null!=this.dragElement&&"none"==this.dragElement.style.display&&(this.dragElement.style.display="");h.apply(this,arguments)};b.mouseUp=function(A){try{mxEvent.isPopupTrigger(A)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=f&&f(A),mxEvent.isConsumed(A)||w.itemClicked(e,b,A,a)),m.apply(b,arguments),u=null,w.currentElt=a}catch(D){b.reset(),w.editorUi.handleError(D)}}};
+mxEvent.getClientX(A))>p||Math.abs(u.y-mxEvent.getClientY(A))>p))&&null!=this.dragElement&&"none"==this.dragElement.style.display&&(this.dragElement.style.display="");h.apply(this,arguments)};b.mouseUp=function(A){try{mxEvent.isPopupTrigger(A)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=f&&f(A),mxEvent.isConsumed(A)||w.itemClicked(e,b,A,a)),m.apply(b,arguments),u=null,w.currentElt=a}catch(E){b.reset(),w.editorUi.handleError(E)}}};
Sidebar.prototype.createVertexTemplateEntry=function(a,b,e,f,g,d,h,m){null!=m&&null!=g&&(m+=" "+g);m=null!=m&&0<m.length?m:null!=g?g.toLowerCase():"";return this.addEntry(m,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,e,f,g,d,h)}))};Sidebar.prototype.createVertexTemplate=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A){a=[new mxCell(null!=f?f:"",new mxGeometry(0,0,b,e),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,e,g,d,h,m,p,k,u,w,y,A)};
Sidebar.prototype.createVertexTemplateFromData=function(a,b,e,f,g,d,h,m){var p=null;try{var k=mxUtils.parseXml(Graph.decompress(a)),u=new mxCodec(k),w=new mxGraphModel;u.decode(k.documentElement,w);p=this.graph.cloneCells(w.root.getChildAt(0).children)}catch(y){f=mxResources.get("error")+": "+y.message}return this.createVertexTemplateFromCells(p,b,e,f,g,d,h,m)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A){return this.createItem(a,f,g,d,b,e,h,m,p,k,u,w,y,A)};
Sidebar.prototype.createEdgeTemplateEntry=function(a,b,e,f,g,d,h,m,p){h=null!=h&&0<h.length?h:g.toLowerCase();return this.addEntry(h,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,b,e,f,g,d,m,p)}))};
@@ -2532,8 +2535,8 @@ Sidebar.prototype.setContentVisible=function(a,b){var e=Editor.transitionDelay;m
(mxUtils.setPrefixedStyle(a.style,"transform","scaleY(0)"),window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(a.style,"transform",null);mxUtils.setPrefixedStyle(a.style,"transition",null);a.style.display="none"}),1E3*e))};Sidebar.prototype.removePalette=function(a){var b=this.palettes[a];if(null!=b){this.palettes[a]=null;for(a=0;a<b.length;a++)this.container.removeChild(b[a]);return!0}return!1};
Sidebar.prototype.addImagePalette=function(a,b,e,f,g,d,h){for(var m=[],p=0;p<g.length;p++)mxUtils.bind(this,function(k,u,w){if(null==w&&(null==e||"img/lib/clip_art/"!=e.substring(0,17))){w=k.lastIndexOf("/");var y=k.lastIndexOf(".");w=k.substring(0<=w?w+1:0,0<=y?y:k.length).replace(/[-_]/g," ")}m.push(this.createVertexTemplateEntry("image;html=1;image="+e+k+f,this.defaultImageWidth,this.defaultImageHeight,"",u,null!=u,null,this.filterTags(w)))})(g[p],null!=d?d[p]:null,null!=h?h[g[p]]:null);this.addPaletteFunctions(a,
b,!1,m)};Sidebar.prototype.getTagsForStencil=function(a,b,e){a=a.split(".");for(var f=1;f<a.length;f++)a[f]=a[f].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=e&&a.push(e);return a.slice(1,a.length)};
-Sidebar.prototype.addStencilPalette=function(a,b,e,f,g,d,h,m,p,k){h=null!=h?h:1;if(this.addStencilsToIndex){var u=[];if(null!=p)for(k=0;k<p.length;k++)u.push(p[k]);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(w,y,A,D,E){if(null==g||0>mxUtils.indexOf(g,y)){A=this.getTagsForStencil(w,y);var F=null!=m?m[y]:null;null!=F&&A.push(F);u.push(this.createVertexTemplateEntry("shape="+w+y.toLowerCase()+f,Math.round(D*h),Math.round(E*h),"",y.replace(/_/g," "),null,null,this.filterTags(A.join(" "))))}}),
-!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(w){null==f&&(f="");null!=d&&d.call(this,w);if(null!=p)for(var y=0;y<p.length;y++)p[y](w);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(A,D,E,F,H){(null==g||0>mxUtils.indexOf(g,D))&&w.appendChild(this.createVertexTemplate("shape="+A+D.toLowerCase()+f,Math.round(F*h),Math.round(H*h),"",D.replace(/_/g," "),!0))}),!0)}))};
+Sidebar.prototype.addStencilPalette=function(a,b,e,f,g,d,h,m,p,k){h=null!=h?h:1;if(this.addStencilsToIndex){var u=[];if(null!=p)for(k=0;k<p.length;k++)u.push(p[k]);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(w,y,A,E,D){if(null==g||0>mxUtils.indexOf(g,y)){A=this.getTagsForStencil(w,y);var F=null!=m?m[y]:null;null!=F&&A.push(F);u.push(this.createVertexTemplateEntry("shape="+w+y.toLowerCase()+f,Math.round(E*h),Math.round(D*h),"",y.replace(/_/g," "),null,null,this.filterTags(A.join(" "))))}}),
+!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(w){null==f&&(f="");null!=d&&d.call(this,w);if(null!=p)for(var y=0;y<p.length;y++)p[y](w);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(A,E,D,F,H){(null==g||0>mxUtils.indexOf(g,E))&&w.appendChild(this.createVertexTemplate("shape="+A+E.toLowerCase()+f,Math.round(F*h),Math.round(H*h),"",E.replace(/_/g," "),!0))}),!0)}))};
Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.escapeListener&&(this.editorUi.editor.graph.removeListener(this.escapeListener),this.escapeListener=null);null!=this.refreshListener&&(this.editorUi.removeListener(this.refreshListener),this.refreshListener=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,
mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?
"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var g=0;g<a.length;g++)f=f.replace(new RegExp("&"+a[g][0]+";","g"),"&#"+a[g][1]+";");return b(f)};var e=mxUtils.getSizeForString;mxUtils.getSizeForString=function(f,g,d,h){return e(Graph.sanitizeHtml(f),g,d,h)}})();
@@ -2564,8 +2567,8 @@ mouseUp:mxUtils.bind(this,function(L,U){k=h=m=p=null})})}this.cellRenderer.minSv
null,"simple"==L.view.graph.getAdaptiveColors())&&(L.lastSanitizedLabelValue=y.innerHTML)),U=L.lastSanitizedLabelValue));return U};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);
this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(L,U){return!1};this.alternateEdgeStyle="vertical";null==f&&this.loadStylesheet();var A=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=A.apply(this,arguments);if(this.graph.pageVisible){var U=[],X=this.graph.pageFormat,ia=this.graph.pageScale,ja=X.width*ia;X=X.height*ia;ia=this.graph.view.translate;for(var ta=this.graph.view.scale,ca=this.graph.getPageLayout(),P=0;P<ca.width;P++)U.push(new mxRectangle(((ca.x+
P)*ja+ia.x)*ta,(ca.y*X+ia.y)*ta,ja*ta,X*ta));for(P=1;P<ca.height;P++)U.push(new mxRectangle((ca.x*ja+ia.x)*ta,((ca.y+P)*X+ia.y)*ta,ja*ta,X*ta));L=U.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(L,U){return null==L.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(L){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,
-arguments)};var D=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var U=D.apply(this,arguments),X=new mxDictionary,ia=[],ja=0;ja<U.length;ja++){var ta=this.graph.isTableCell(L)&&this.graph.isTableCell(U[ja])&&this.graph.isCellSelected(U[ja])?this.graph.model.getParent(U[ja]):this.graph.isTableRow(L)&&this.graph.isTableRow(U[ja])&&this.graph.isCellSelected(U[ja])?U[ja]:this.graph.getCompositeParent(U[ja]);null==ta||X.get(ta)||(X.put(ta,!0),ia.push(ta))}return ia};var E=this.graphHandler.start;
-this.graphHandler.start=function(L,U,X,ia){var ja=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?ja=!0:L=this.graph.model.getParent(L));ja||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));E.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,U){U=this.graph.getCompositeParent(U);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(L,U,X,ia,ja,ta){var ca=
+arguments)};var E=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var U=E.apply(this,arguments),X=new mxDictionary,ia=[],ja=0;ja<U.length;ja++){var ta=this.graph.isTableCell(L)&&this.graph.isTableCell(U[ja])&&this.graph.isCellSelected(U[ja])?this.graph.model.getParent(U[ja]):this.graph.isTableRow(L)&&this.graph.isTableRow(U[ja])&&this.graph.isCellSelected(U[ja])?U[ja]:this.graph.getCompositeParent(U[ja]);null==ta||X.get(ta)||(X.put(ta,!0),ia.push(ta))}return ia};var D=this.graphHandler.start;
+this.graphHandler.start=function(L,U,X,ia){var ja=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?ja=!0:L=this.graph.model.getParent(L));ja||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,U){U=this.graph.getCompositeParent(U);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(L,U,X,ia,ja,ta){var ca=
mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=ia&&this.graph.applyNewEdgeStyle(ia,[ca]);return ca};var F=new mxRubberband(this);this.getRubberband=function(){return F};var H=(new Date).getTime(),M=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;N.apply(this,arguments);L!=this.currentState?(H=(new Date).getTime(),M=0):M=(new Date).getTime()-H};var J=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=
function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<M||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&J.apply(this,arguments)};var V=this.isToggleEvent;this.isToggleEvent=function(L){return V.apply(this,arguments)||mxEvent.isShiftDown(L)};var W=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(W=this.container.style.cursor,
this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=W)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};var T=this.click;this.click=function(L){var U=null==L.state&&null!=L.sourceState&&this.isCellLocked(this.getLayerForCell(L.sourceState.cell));if(this.isEnabled()&&!U||L.isConsumed())return T.apply(this,arguments);
@@ -2590,7 +2593,7 @@ Graph.createSvgNode=function(a,b,e,f,g){var d=mxUtils.createXmlDocument(),h=null
e+"px");h.setAttribute("height",f+"px");h.setAttribute("viewBox",a+" "+b+" "+e+" "+f);d.appendChild(h);return h};
Graph.htmlToPng=function(a,b,e,f,g,d){g=null!=g?g:"";d=null!=d?d:Editor.htmlRasterScale;var h=document.createElement("canvas");h.width=b*d;h.height=e*d;var m=document.createElement("img");m.onload=mxUtils.bind(this,function(){try{var k=h.getContext("2d");k.scale(d,d);k.drawImage(m,0,0);f(h.toDataURL())}catch(u){f(null)}});var p=mxUtils.createXmlDocument();p=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");a=(new mxSvgCanvas2D(p)).convertHtml(a);m.onerror=
function(k){f(null)};m.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+b+'" height="'+e+'">'+(""!=g?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+g+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+a+"</div></foreignObject></svg>")};
-Graph.addLightDarkColors=function(a,b,e,f){function g(y,A,D){return null!=f?f(y,A,D):mxUtils.isValidColor(D)?(null==h&&null!=b&&(h={}),null!=h&&(h[A]=y.style.getPropertyValue(A)),D=mxUtils.getLightDarkColor(D,null,null,e),y.style.setProperty(A,D.cssText),!0):!1}for(var d=a.getElementsByTagName("*"),h=null,m=!1,p=0;p<d.length;p++)if(d[p]!=a&&null!=d[p].style){h=null;for(var k=0;k<d[p].style.length;k++){var u=d[p].style.item(k),w=d[p].style.getPropertyValue(u);m=g(d[p],u,w)||m}"FONT"==d[p].nodeName&&
+Graph.addLightDarkColors=function(a,b,e,f){function g(y,A,E){return null!=f?f(y,A,E):mxUtils.isValidColor(E)?(null==h&&null!=b&&(h={}),null!=h&&(h[A]=y.style.getPropertyValue(A)),E=mxUtils.getLightDarkColor(E,null,null,e),y.style.setProperty(A,E.cssText),!0):!1}for(var d=a.getElementsByTagName("*"),h=null,m=!1,p=0;p<d.length;p++)if(d[p]!=a&&null!=d[p].style){h=null;for(var k=0;k<d[p].style.length;k++){var u=d[p].style.item(k),w=d[p].style.getPropertyValue(u);m=g(d[p],u,w)||m}"FONT"==d[p].nodeName&&
""==d[p].style.getPropertyValue("color")&&(w=d[p].getAttribute("color"),m=g(d[p],"color",w)||m);null!=b&&null!=h&&d[p].setAttribute(b,JSON.stringify(h))}return m};Graph.removeLightDarkColors=function(a,b){a=a.getElementsByTagName("*");for(var e=!1,f=0;f<a.length;f++)try{var g=a[f].getAttribute(b);if(null!=g){a[f].removeAttribute(b);var d=JSON.parse(g),h;for(h in d){var m=d[h];""==m?(a[f].style[h]=null,""==a[f].getAttribute("style")&&a[f].removeAttribute("style")):a[f].style[h]=m;e=!0}}}catch(p){}return e};
Graph.getGivenColor=function(a,b){var e=null;if(a.nodeType==mxConstants.NODETYPE_ELEMENT){try{var f=a.getAttribute(Graph.backupStyleAttribute);if(null!=f){var g=JSON.parse(f);null!=g&&null!=g[b]&&("color"==b&&"FONT"==a.nodeName&&""==g[b]&&null!=a.getAttribute("color")?e=a.getAttribute("color"):""!=g[b]&&(e=g[b]))}}catch(d){}null==e&&""!=a.style[b]&&(e=a.style[b])}return e};
Graph.setTextColor=function(a,b,e){for(var f=e?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,g=e?"color":"background-color",d=a.getElementsByTagName("*"),h=[],m=0;m<d.length;m++)h.push({node:d[m],value:d[m].style[g]});document.execCommand(e?"forecolor":"backcolor",!1,f);a=a.getElementsByTagName("*");for(m=0;m<a.length;m++){if(m<h.length&&h[m].node==a[m]&&h[m].value!=a[m].style[g]&&""==a[m].style[g])try{if(d=a[m].getAttribute(Graph.backupStyleAttribute),null!=d){var p=JSON.parse(d);p[g]=
@@ -2601,16 +2604,16 @@ Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var e=a.b
Graph.arrayBufferIndexOfString=function(a,b,e){var f=b.charCodeAt(0),g=1,d=-1;for(e=e||0;e<a.byteLength;e++)if(a[e]==f){d=e;break}for(e=d+1;-1<d&&e<a.byteLength&&e<d+b.length-1;e++){if(a[e]!=b.charCodeAt(g))return Graph.arrayBufferIndexOfString(a,b,d+1);g++}return g==b.length-1?d:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};
Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return e?b:Graph.zapGremlins(b)};
Graph.fadeNodes=function(a,b,e,f,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,e);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=f&&f()},g)},0)};
-Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,g){function d(w){w.view.states.visit(function(y,A){null!=A.shape&&w.model.isEdge(w.model.getParent(A.cell))?A.shape.node.parentNode.appendChild(A.shape.node):null!=A.text&&w.model.isEdge(A.cell)&&A.text.node.parentNode.appendChild(A.text.node)})}function h(w,y){if(w.getModel().isVertex(y)){var A=w.container.offsetWidth/2,D=w.container.offsetHeight/2;w.rootCell=
-y.referenceCell||y;w.getModel().beginUpdate();try{pageSize=null!=e&&null!=e.pageSize?e.pageSize:8+Math.max(0,Math.floor(Math.min(w.container.offsetWidth-800/120,w.container.offsetHeight-600)/30));for(var E=y.referenceCell||y,F=f.model.getCell(E.sourceCellId),H=f.getEdges(F,null,!0,!0,!1,!0),M=[],N=0;N<H.length;N++)null!=H[N].getTerminal(!0)&&null!=H[N].getTerminal(!1)&&f.isCellVisible(H[N])&&!f.isEdgeIgnored(H[N])&&f.isCellVisible(H[N].getTerminal(!0))&&f.isCellVisible(H[N].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(H[N]))&&
-M.push(H[N]);M=H=M;if(null!=y.startIndex||0<pageSize&&H.length>pageSize){var J=y.startIndex||0;M=H.slice(Math.max(0,J),Math.min(H.length,J+pageSize))}M=f.getOpposites(M,F).concat(M);var V=w.cloneCells(M);for(N=0;N<M.length;N++)if(V[N].sourceCellId=M[N].id,w.model.isEdge(V[N]))for(V[N].geometry.x=0,V[N].geometry.y=0,V[N].geometry.points=null,V[N].setStyle(V[N].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),V[N].setTerminal(E,
+Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,g){function d(w){w.view.states.visit(function(y,A){null!=A.shape&&w.model.isEdge(w.model.getParent(A.cell))?A.shape.node.parentNode.appendChild(A.shape.node):null!=A.text&&w.model.isEdge(A.cell)&&A.text.node.parentNode.appendChild(A.text.node)})}function h(w,y){if(w.getModel().isVertex(y)){var A=w.container.offsetWidth/2,E=w.container.offsetHeight/2;w.rootCell=
+y.referenceCell||y;w.getModel().beginUpdate();try{pageSize=null!=e&&null!=e.pageSize?e.pageSize:8+Math.max(0,Math.floor(Math.min(w.container.offsetWidth-800/120,w.container.offsetHeight-600)/30));for(var D=y.referenceCell||y,F=f.model.getCell(D.sourceCellId),H=f.getEdges(F,null,!0,!0,!1,!0),M=[],N=0;N<H.length;N++)null!=H[N].getTerminal(!0)&&null!=H[N].getTerminal(!1)&&f.isCellVisible(H[N])&&!f.isEdgeIgnored(H[N])&&f.isCellVisible(H[N].getTerminal(!0))&&f.isCellVisible(H[N].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(H[N]))&&
+M.push(H[N]);M=H=M;if(null!=y.startIndex||0<pageSize&&H.length>pageSize){var J=y.startIndex||0;M=H.slice(Math.max(0,J),Math.min(H.length,J+pageSize))}M=f.getOpposites(M,F).concat(M);var V=w.cloneCells(M);for(N=0;N<M.length;N++)if(V[N].sourceCellId=M[N].id,w.model.isEdge(V[N]))for(V[N].geometry.x=0,V[N].geometry.y=0,V[N].geometry.points=null,V[N].setStyle(V[N].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),V[N].setTerminal(D,
null==V[N].getTerminal(!0)),F=0;F<V[N].getChildCount();F++){var W=V[N].getChildAt(F);null!=W.geometry&&W.geometry.relative&&(W.setStyle(W.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),W.geometry.offset=new mxPoint(0,0),W.geometry.y=0,W.geometry.x=.5>W.geometry.x?-.8:.5<W.geometry.x?.8:0)}if(0<y.startIndex){var T=w.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((y.startIndex||0)/pageSize)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
-T.referenceCell=E;T.startIndex=Math.max(0,(y.startIndex||0)-pageSize);V.splice(0,0,T)}if(H.length>(y.startIndex||0)+pageSize){var O=w.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((y.startIndex||0)/pageSize)+2)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");O.referenceCell=E;O.startIndex=(y.startIndex||0)+pageSize;V.splice(0,0,O)}for(var fa in w.getModel().cells){var S=w.getModel().getCell(fa);S!=w.rootCell&&!w.getModel().isAncestor(w.rootCell,
-S)&&w.getModel().isVertex(S)&&w.removeCells([S])}w.addCells(V);var aa=w.getModel().getGeometry(w.rootCell);null!=aa&&(aa=aa.clone(),aa.x=A-aa.width/2,aa.y=D-aa.height/3,w.getModel().setGeometry(w.rootCell,aa));y=[];for(fa in w.getModel().cells)S=w.getModel().getCell(fa),S!=w.rootCell&&w.getModel().isVertex(S)&&w.getModel().getParent(S)==w.getDefaultParent()&&(y.push(S),aa=w.getModel().getGeometry(S),null!=aa&&(aa.x=A-aa.width/2,aa.y=D-aa.height/2));var Y=y.length,ba=2*Math.PI/Y,L=Math.max(minSize,
+T.referenceCell=D;T.startIndex=Math.max(0,(y.startIndex||0)-pageSize);V.splice(0,0,T)}if(H.length>(y.startIndex||0)+pageSize){var O=w.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((y.startIndex||0)/pageSize)+2)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");O.referenceCell=D;O.startIndex=(y.startIndex||0)+pageSize;V.splice(0,0,O)}for(var fa in w.getModel().cells){var S=w.getModel().getCell(fa);S!=w.rootCell&&!w.getModel().isAncestor(w.rootCell,
+S)&&w.getModel().isVertex(S)&&w.removeCells([S])}w.addCells(V);var aa=w.getModel().getGeometry(w.rootCell);null!=aa&&(aa=aa.clone(),aa.x=A-aa.width/2,aa.y=E-aa.height/3,w.getModel().setGeometry(w.rootCell,aa));y=[];for(fa in w.getModel().cells)S=w.getModel().getCell(fa),S!=w.rootCell&&w.getModel().isVertex(S)&&w.getModel().getParent(S)==w.getDefaultParent()&&(y.push(S),aa=w.getModel().getGeometry(S),null!=aa&&(aa.x=A-aa.width/2,aa.y=E-aa.height/2));var Y=y.length,ba=2*Math.PI/Y,L=Math.max(minSize,
Math.min(w.container.offsetWidth/2-40,w.container.offsetHeight/2-80));for(A=0;A<Y;A++)aa=w.getModel().getGeometry(y[A]),null!=aa&&(aa=aa.clone(),aa.x+=L*Math.sin(A*ba),aa.y+=L*Math.cos(A*ba),w.getModel().setGeometry(y[A],aa))}finally{w.getModel().endUpdate()}}}var m=document.createElement("div");m.style.position="absolute";m.style.display="block";m.style.overflow="auto";m.style.width="100%";m.style.height="100%";m.style.left="0px";m.style.top="0px";m.style.zIndex=2;m.style.background=f.background==
mxConstants.NONE||null==f.background?"light-dark(#ffffff,"+Editor.darkColor+")":f.background;var p=document.createElement("img");p.setAttribute("src",Editor.closeBlackImage);p.style.position="absolute";p.style.cursor="pointer";p.style.right="10px";p.style.top="10px";m.appendChild(p);var k=document.createElement("div");k.style.position="absolute";k.style.cursor="pointer";k.style.right="38px";k.style.top="14px";k.style.textAlign="right";k.style.verticalAlign="top";mxUtils.write(k,mxResources.get("close"));
m.appendChild(k);document.body.appendChild(m);var u=function(w){27==w.keyCode&&p.click()};mxEvent.addListener(document,"keydown",u);(function(w){var y=new Graph(w);y.keepEdgesInBackground=!0;y.isCellResizable=function(){return!1};y.isCellRotatable=function(){return!1};y.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};y.getFoldingImage=function(){return null};var A=function(){mxEvent.removeListener(document,"keydown",u);w.parentNode.removeChild(w);f.scrollCellToVisible(g)};
-mxEvent.addListener(p,"click",A);mxEvent.addListener(k,"click",A);y.setEnabled(!1);var D=y.click;y.click=function(M){var N=M.getCell(),J=null!=N?null!=N.referenceCell?N.referenceCell:N:null;null!=N&&0<y.getEdges(J).length?h(y,N):D.apply(this,arguments)};A=y.container.offsetWidth/2;var E=y.container.offsetHeight/3;y.model.beginUpdate();var F=y.importCells([g])[0];F.sourceCellId=g.id;F.geometry.x=A-F.geometry.width/2;F.geometry.y=E-F.geometry.height/2;y.model.endUpdate();var H=!1;y.getModel().addListener(mxEvent.CHANGE,
+mxEvent.addListener(p,"click",A);mxEvent.addListener(k,"click",A);y.setEnabled(!1);var E=y.click;y.click=function(M){var N=M.getCell(),J=null!=N?null!=N.referenceCell?N.referenceCell:N:null;null!=N&&0<y.getEdges(J).length?h(y,N):E.apply(this,arguments)};A=y.container.offsetWidth/2;var D=y.container.offsetHeight/3;y.model.beginUpdate();var F=y.importCells([g])[0];F.sourceCellId=g.id;F.geometry.x=A-F.geometry.width/2;F.geometry.y=D-F.geometry.height/2;y.model.endUpdate();var H=!1;y.getModel().addListener(mxEvent.CHANGE,
function(M,N){H||(M=N.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,y.labelsVisible=!1,H=!0,mxEffects.animateChanges(y,M,function(){var J=new mxParallelEdgeLayout(y);J.spacing=60;var V=J.layout;J.layout=function(W){J.spacing=Math.min(60,Math.max(30,60-5*W.length));V.apply(this,arguments)};J.execute(y.getDefaultParent());mxText.prototype.enableBoundingBox=!0;y.labelsVisible=!0;y.tooltipHandler.hide();y.refresh();d(y);H=!1}))});h(y,F)})(m)})(a,b)};
Graph.removeKeys=function(a,b){for(var e in a)b(e)&&delete a[e]};Graph.setTransitionForNodes=function(a,b){for(var e=0;e<a.length;e++)mxUtils.setPrefixedStyle(a[e].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var e=0;e<a.length;e++)a[e].style.opacity=b};
Graph.removePasteFormatting=function(a,b){for(;null!=a;){null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild,!0);var e=a.nextSibling;if(a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style){"#000000"==a.style.color&&(a.style.color="");if("SPAN"==a.nodeName&&"Apple-tab-span"==a.className){var f=Graph.createTabNode(4);a.parentNode.replaceChild(f,a);a=f}if("P"==a.nodeName&&"p1"==a.className){for(;null!=a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);null!=e&&"P"==e.nodeName&&"p1"==
@@ -2624,7 +2627,7 @@ Graph.createRemoveIcon=function(a,b){var e=document.createElement("img");e.setAt
Graph.rewritePageLinks=function(a,b){function e(g,d){var h=g.getAttribute(d);if(null!=h){Graph.isPageLink(h)&&(h="#"+h.substring(h.indexOf(":")+1));var m=d;b&&"xlink:href"==d&&(g.removeAttribute(d),m="href");g.setAttribute(m,h)}}a=a.getElementsByTagName("a");if(null!=a)for(var f=0;f<a.length;f++)e(a[f],"href"),e(a[f],"xlink:href")};Graph.isLink=function(a){return null!=a&&a.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;
Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBackground=!1;Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, #000000)";Graph.prototype.shapeForegroundColor="light-dark(#000000, #ffffff)";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";
-Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
+Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%{}\"'=;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";
Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(e,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var g=e.view.graph.tolerance,d=!0,h=null,m=mxUtils.bind(this,function(u){d=!0;h=new mxPoint(mxEvent.getClientX(u),mxEvent.getClientY(u))}),p=mxUtils.bind(this,function(u){d=d&&null!=h&&Math.abs(h.x-mxEvent.getClientX(u))<g&&Math.abs(h.y-mxEvent.getClientY(u))<g}),k=mxUtils.bind(this,function(u){if(d)for(var w=mxEvent.getSource(u);null!=
@@ -2637,14 +2640,14 @@ h.shape?h.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.ge
mxUtils.getValue(h.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(h){return!0};Graph.prototype.getVerticesAndEdges=function(h,m){h=null!=h?h:!0;m=null!=m?m:!0;var p=this.model;return p.filterDescendants(function(k){return h&&p.isVertex(k)||m&&p.isEdge(k)},p.getRoot())};Graph.prototype.applyNewEdgeStyle=function(h,m,p){h=this.getCellStyle(h).newEdgeStyle;if(null!=h){this.model.beginUpdate();try{var k=JSON.parse(h),u;for(u in k)this.setCellStyles(u,k[u],m),"edgeStyle"==
u&&"elbowEdgeStyle"==k[u]&&null!=p&&this.setCellStyles("elbow",p==mxConstants.DIRECTION_SOUTH||p==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",m)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(h){for(var m={},p=0;p<h.length;p++){var k=this.view.getState(h[p]);null!=k&&this.mergeStyle(k.style,m,0==p)}return m};Graph.prototype.mergeStyle=function(h,m,p){if(null!=h){var k={},u;for(u in h){var w=h[u];null!=w&&(k[u]=!0,null==m[u]&&p?m[u]=w:m[u]!=w&&delete m[u])}for(u in m)k[u]||
delete m[u]}};Graph.prototype.getStartEditingCell=function(h,m){m=this.getCellStyle(h);m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,0));this.isTable(h)&&(!this.isSwimlane(h)||0==m)&&""==this.getLabel(h)&&0<this.model.getChildCount(h)&&(h=this.model.getChildAt(h,0),m=this.getCellStyle(h),m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(h)&&(!this.isSwimlane(h)||0==m)&&""==this.getLabel(h)&&0<this.model.getChildCount(h))for(m=0;m<this.model.getChildCount(h);m++){var p=
-this.model.getChildAt(h,m);if(this.isCellEditable(p)){h=p;break}}return h};Graph.prototype.copyStyle=function(h){return this.getCellStyle(h,!1)};Graph.prototype.pasteStyle=function(h,m,p,k){null!=h&&(k||(p=null!=p?p:Graph.cellStyles,Graph.removeKeys(h,function(u){return 0>mxUtils.indexOf(p,u)})),this.updateCellStyles(h,m))};Graph.prototype.copyCellStyles=function(h,m,p,k,u,w,y){var A=!1,D=!1;if(0<h.length)for(var E=0;E<h.length&&(A=this.getModel().isVertex(h[E])||A,!(D=this.getModel().isEdge(h[E])||
-D)||!A);E++);else D=A=!0;A=A&&!w;D=D&&!y;for(E=0;E<m.length;E++)if(h=0<=mxUtils.indexOf(Graph.textStyles,m[E]),"strokeColor"!=m[E]||null!=p[E]&&"none"!=p[E])if(0<=mxUtils.indexOf(Graph.cellStyles,m[E])||"shape"==m[E])if("shape"!=m[E]&&(A||h)&&(null==p[E]?delete k[m[E]]:k[m[E]]=p[E]),D||h)null==p[E]?delete u[m[E]]:u[m[E]]=p[E]};Graph.prototype.includeDescendants=function(h){for(var m=[],p=0;p<h.length;p++)m=m.concat(this.model.getDescendants(h[p]));return m};Graph.prototype.pasteCellStyles=function(h,
-m,p,k,u){m=null!=m?m:this.currentVertexStyle;p=null!=p?p:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var w=0;w<h.length;w++){var y=h[w],A=this.model.getStyle(y),D=!1;null!=y.style&&(pairs=y.style.split(";"),D=D||0<=mxUtils.indexOf(pairs,"text"));if(D)var E=Graph.textStyles;else if(E=Graph.cellStyles.slice(),!k)for(var F=null!=A?A.split(";"):[],H=0;H<F.length;H++){var M=F[H],N=M.indexOf("=");if(0<=N){var J=M.substring(0,N),V=mxUtils.indexOf(E,J);0<=V&&E.splice(V,
-1);for(D=0;D<Graph.cellStyleGroups.length;D++){var W=Graph.cellStyleGroups[D];if(0<=mxUtils.indexOf(W,J))for(var T=0;T<W.length;T++){var O=mxUtils.indexOf(E,W[T]);0<=O&&E.splice(O,1)}}}}var fa=this.model.isEdge(y);D=fa?p:m;for(H=0;H<E.length;H++){J=E[H];var S=D[J];null!=S&&("edgeStyle"!=J||u)&&(fa||!fa&&0>mxUtils.indexOf(Graph.edgeStyles,J))&&(A=mxUtils.setStyle(A,J,S),"fontFamily"==J&&null==D.fontSource&&(A=mxUtils.setStyle(A,"fontSource",null)),fa&&"rounded"==J&&"1"==S&&null==D.curved&&(A=mxUtils.setStyle(A,
+this.model.getChildAt(h,m);if(this.isCellEditable(p)){h=p;break}}return h};Graph.prototype.copyStyle=function(h){return this.getCellStyle(h,!1)};Graph.prototype.pasteStyle=function(h,m,p,k){null!=h&&(k||(p=null!=p?p:Graph.cellStyles,Graph.removeKeys(h,function(u){return 0>mxUtils.indexOf(p,u)})),this.updateCellStyles(h,m))};Graph.prototype.copyCellStyles=function(h,m,p,k,u,w,y){var A=!1,E=!1;if(0<h.length)for(var D=0;D<h.length&&(A=this.getModel().isVertex(h[D])||A,!(E=this.getModel().isEdge(h[D])||
+E)||!A);D++);else E=A=!0;A=A&&!w;E=E&&!y;for(D=0;D<m.length;D++)if(h=0<=mxUtils.indexOf(Graph.textStyles,m[D]),"strokeColor"!=m[D]||null!=p[D]&&"none"!=p[D])if(0<=mxUtils.indexOf(Graph.cellStyles,m[D])||"shape"==m[D])if("shape"!=m[D]&&(A||h)&&(null==p[D]?delete k[m[D]]:k[m[D]]=p[D]),E||h)null==p[D]?delete u[m[D]]:u[m[D]]=p[D]};Graph.prototype.includeDescendants=function(h){for(var m=[],p=0;p<h.length;p++)m=m.concat(this.model.getDescendants(h[p]));return m};Graph.prototype.pasteCellStyles=function(h,
+m,p,k,u){m=null!=m?m:this.currentVertexStyle;p=null!=p?p:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var w=0;w<h.length;w++){var y=h[w],A=this.model.getStyle(y),E=!1;null!=y.style&&(pairs=y.style.split(";"),E=E||0<=mxUtils.indexOf(pairs,"text"));if(E)var D=Graph.textStyles;else if(D=Graph.cellStyles.slice(),!k)for(var F=null!=A?A.split(";"):[],H=0;H<F.length;H++){var M=F[H],N=M.indexOf("=");if(0<=N){var J=M.substring(0,N),V=mxUtils.indexOf(D,J);0<=V&&D.splice(V,
+1);for(E=0;E<Graph.cellStyleGroups.length;E++){var W=Graph.cellStyleGroups[E];if(0<=mxUtils.indexOf(W,J))for(var T=0;T<W.length;T++){var O=mxUtils.indexOf(D,W[T]);0<=O&&D.splice(O,1)}}}}var fa=this.model.isEdge(y);E=fa?p:m;for(H=0;H<D.length;H++){J=D[H];var S=E[J];null!=S&&("edgeStyle"!=J||u)&&(fa||!fa&&0>mxUtils.indexOf(Graph.edgeStyles,J))&&(A=mxUtils.setStyle(A,J,S),"fontFamily"==J&&null==E.fontSource&&(A=mxUtils.setStyle(A,"fontSource",null)),fa&&"rounded"==J&&"1"==S&&null==E.curved&&(A=mxUtils.setStyle(A,
"curved",null)))}Editor.simpleLabels&&(A=mxUtils.setStyle(mxUtils.setStyle(A,"html",null),"whiteSpace",null));this.model.setStyle(y,A)}}finally{this.model.endUpdate()}return h};Graph.prototype.updateCellStyles=function(h,m){this.model.beginUpdate();try{for(var p=0;p<m.length;p++)if(this.model.isVertex(m[p])||this.model.isEdge(m[p])){var k=this.getCellStyle(m[p],!1),u=k[mxConstants.STYLE_PERIMETER],w=!1;for(A in h){var y=h[A];if(k[A]!=y){if(A==mxConstants.STYLE_SHAPE&&"umlLifeline"==k[A]&&"umlLifeline"!=
y){w=!0;var A="participant"}this.setCellStyles(A,y,[m[p]])}}w&&this.setCellStyles(mxConstants.STYLE_PERIMETER,u,[m[p]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=
-function(h,m,p,k,u,w){this.useCssTransforms&&(h=h/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(h,m,p,k,u,w){k=null!=k?k:!0;u=null!=u?u:!0;null==p&&(p=this.getCurrentRoot(),null==p&&(p=this.getModel().getRoot()));if(null!=p)for(var y=this.model.getChildCount(p)-1;0<=y;y--){var A=this.model.getChildAt(p,y),D=this.getScaledCellAt(h,m,A,k,u,w);if(null!=D)return D;if(this.isCellVisible(A)&&
-(u&&this.model.isEdge(A)||k&&this.model.isVertex(A))&&(D=this.view.getState(A),null!=D&&(null==w||!w(D,h,m))&&this.intersects(D,h,m)))return A}return null};Graph.prototype.isRecursiveVertexResize=function(h){return!this.isSwimlane(h.cell)&&0<this.model.getChildCount(h.cell)&&!this.isCellCollapsed(h.cell)&&"1"==mxUtils.getValue(h.style,"recursiveResize","1")&&null==mxUtils.getValue(h.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(h){for(var m=this.getCellGeometry(h);null!=m&&
+function(h,m,p,k,u,w){this.useCssTransforms&&(h=h/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(h,m,p,k,u,w){k=null!=k?k:!0;u=null!=u?u:!0;null==p&&(p=this.getCurrentRoot(),null==p&&(p=this.getModel().getRoot()));if(null!=p)for(var y=this.model.getChildCount(p)-1;0<=y;y--){var A=this.model.getChildAt(p,y),E=this.getScaledCellAt(h,m,A,k,u,w);if(null!=E)return E;if(this.isCellVisible(A)&&
+(u&&this.model.isEdge(A)||k&&this.model.isVertex(A))&&(E=this.view.getState(A),null!=E&&(null==w||!w(E,h,m))&&this.intersects(E,h,m)))return A}return null};Graph.prototype.isRecursiveVertexResize=function(h){return!this.isSwimlane(h.cell)&&0<this.model.getChildCount(h.cell)&&!this.isCellCollapsed(h.cell)&&"1"==mxUtils.getValue(h.style,"recursiveResize","1")&&null==mxUtils.getValue(h.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(h){for(var m=this.getCellGeometry(h);null!=m&&
m.relative;)h=this.getModel().getParent(h),m=this.getCellGeometry(h);return h};Graph.prototype.isPart=function(h){return"1"==mxUtils.getValue(this.getCurrentCellStyle(h),"part","0")||this.isTableCell(h)||this.isTableRow(h)};Graph.prototype.getCompositeParents=function(h){for(var m=new mxDictionary,p=[],k=0;k<h.length;k++){var u=this.getCompositeParent(h[k]);this.isTableCell(u)&&(u=this.graph.model.getParent(u));this.isTableRow(u)&&(u=this.graph.model.getParent(u));null==u||m.get(u)||(m.put(u,!0),
p.push(u))}return p};Graph.prototype.getReferenceTerminal=function(h){if(null!=h){var m=this.getCellGeometry(h);null!=m&&m.relative&&(h=this.model.getParent(h))}null!=h&&this.model.isEdge(h)&&(h=this.model.getParent(h));null!=h&&(h=this.getCompositeParent(h));return h};Graph.prototype.getCompositeParent=function(h){for(;this.isPart(h);){var m=this.model.getParent(h);if(!this.model.isVertex(m))break;h=m}return h};Graph.prototype.filterSelectionCells=function(h){var m=this.getSelectionCells();if(null!=
h){for(var p=[],k=0;k<m.length;k++)h(m[k])||p.push(m[k]);m=p}return m};var a=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(h){if(this.useCssTransforms){var m=this.currentScale,p=this.currentTranslate;h=new mxRectangle((h.x+2*p.x)*m-p.x,(h.y+2*p.y)*m-p.y,h.width*m,h.height*m)}a.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(h){h=this.strokeWidth;this.graph.useCssTransforms&&(h/=this.graph.currentScale);return h};mxGraphView.prototype.getGraphBounds=
@@ -2682,16 +2685,17 @@ Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);ret
Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var f=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,h=function(H,M){H=String(H);for(M=M||2;H.length<M;)H="0"+H;return H};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(f.masks[b]||b||f.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var m=e?"getUTC":"get",p=a[m+"Date"](),k=a[m+"Day"](),u=a[m+"Month"](),w=a[m+"FullYear"](),y=a[m+"Hours"](),A=a[m+"Minutes"](),D=a[m+"Seconds"]();m=a[m+"Milliseconds"]();var E=e?0:a.getTimezoneOffset(),F={d:p,dd:h(p),ddd:f.i18n.dayNames[k],dddd:f.i18n.dayNames[k+7],m:u+1,mm:h(u+1),mmm:f.i18n.monthNames[u],mmmm:f.i18n.monthNames[u+
-12],yy:String(w).slice(2),yyyy:w,h:y%12||12,hh:h(y%12||12),H:y,HH:h(y),M:A,MM:h(A),s:D,ss:h(D),l:h(m,3),L:h(99<m?Math.round(m/10):m),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:e?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<E?"-":"+")+h(100*Math.floor(Math.abs(E)/60)+Math.abs(E)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in F?F[H]:H.slice(1,
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(f.masks[b]||b||f.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var m=e?"getUTC":"get",p=a[m+"Date"](),k=a[m+"Day"](),u=a[m+"Month"](),w=a[m+"FullYear"](),y=a[m+"Hours"](),A=a[m+"Minutes"](),E=a[m+"Seconds"]();m=a[m+"Milliseconds"]();var D=e?0:a.getTimezoneOffset(),F={d:p,dd:h(p),ddd:f.i18n.dayNames[k],dddd:f.i18n.dayNames[k+7],m:u+1,mm:h(u+1),mmm:f.i18n.monthNames[u],mmmm:f.i18n.monthNames[u+
+12],yy:String(w).slice(2),yyyy:w,h:y%12||12,hh:h(y%12||12),H:y,HH:h(y),M:A,MM:h(A),s:E,ss:h(E),l:h(m,3),L:h(99<m?Math.round(m/10):m),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:e?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<D?"-":"+")+h(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in F?F[H]:H.slice(1,
H.length-1)})};Graph.prototype.getLayerForCell=function(a){for(;null!=a&&!this.model.isLayer(a);)a=this.model.getParent(a);return a};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){b=this.getLayerForCell(a[0]);for(var e=1;e<a.length;e++)if(!this.model.isAncestor(b,a[e])){b=null;break}}return b};
Graph.prototype.createLayersDialog=function(a,b){var e=document.createElement("div");e.style.position="absolute";for(var f=this.getModel(),g=f.getChildCount(f.root),d=0;d<g;d++)mxUtils.bind(this,function(h){function m(){f.isVisible(h)?(u.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(k,75)):(u.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(k,25))}var p=this.convertValueToString(h)||mxResources.get("background")||"Background",k=document.createElement("div");k.style.overflow=
"hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";k.style.cursor="pointer";k.setAttribute("title",mxResources.get(f.isVisible(h)?"hideIt":"show",[p]));var u=document.createElement("img");u.setAttribute("draggable","false");u.setAttribute("align","absmiddle");u.setAttribute("border","0");u.style.position="relative";u.style.width="16px";u.style.padding="0px 6px 0 4px";b&&(u.style.filter="invert(100%)",u.style.top="-2px");k.appendChild(u);mxUtils.write(k,p);e.appendChild(k);
mxEvent.addListener(k,"click",function(){f.setVisible(h,!f.isVisible(h));m();null!=a&&a(h)});m()})(f.getChildAt(f.root,d));return e};
Graph.prototype.replacePlaceholders=function(a,b,e,f){f=[];if(null!=b){for(var g=0;match=this.placeholderPattern.exec(b);){var d=match[0];if(2<d.length&&"%label%"!=d&&"%tooltip%"!=d){var h=null;if(match.index>g&&"%"==b.charAt(match.index-1))h=d.substring(1);else{var m=d.substring(1,d.length-1),p={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==m)h=a.id;else if("width"===m.substring(0,5)&&this.model.isVertex(a)){var k=this.getCellGeometry(a);
null!=k&&(h=k.width,5<m.length&&(h=Editor.toUnit(h,p[m.substring(6)])))}else if("height"==m.substring(0,6)&&this.model.isVertex(a))k=this.getCellGeometry(a),null!=k&&(h=k.height,6<m.length&&(h=Editor.toUnit(h,p[m.substring(7)])));else if("length"==m.substring(0,6)){for(k=a;null!=k&&!this.model.isEdge(k);)k=this.model.getParent(k);k=this.view.getState(k);null!=k&&(h=Math.round(k.length/this.view.scale),6<m.length&&(h=Editor.toUnit(h,p[m.substring(7)])))}else if(0>m.indexOf("{"))for(p=a;null==h&&null!=
-p;)null!=p.value&&"object"==typeof p.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(h=p.getAttribute(m+"_"+Graph.diagramLanguage)),null==h&&(h=p.hasAttribute(m)?null!=p.getAttribute(m)?p.getAttribute(m):"":null)),p=this.model.getParent(p);null==h&&(h=this.getGlobalVariable(m));null==h&&null!=e&&(h=e[m])}f.push(b.substring(g,match.index)+(null!=h?h:d));g=match.index+d.length}}f.push(b.substring(g))}return f.join("")};
-Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var f=this.model.getCell(a[e].id);null!=f&&b.push(f)}this.setSelectionCells(b)}else this.clearSelection()};Graph.prototype.selectCellForEvent=function(a,b){mxEvent.isShiftDown(b)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),a)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
+p;)null!=p.value&&"object"==typeof p.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(h=p.getAttribute(m+"_"+Graph.diagramLanguage)),null==h&&(h=p.hasAttribute(m)?null!=p.getAttribute(m)?p.getAttribute(m):"":null)),p=this.model.getParent(p);null==h&&("pagecount"==m.substring(0,9)&&9<m.length||"pagenumber"==m.substring(0,10)&&10<m.length?(p=m.match(/(pagecount|pagenumber)[\s]*([+-])[\s]*(\d+)/),null!=p&&(h=this.getGlobalVariable(p[1]),3<p.length&&(k=parseInt(p[3]),h+="+"==p[2]?k:-k))):
+h=this.getGlobalVariable(m));null==h&&null!=e&&(h=e[m])}f.push(b.substring(g,match.index)+(null!=h?h:d));g=match.index+d.length}}f.push(b.substring(g))}return f.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var f=this.model.getCell(a[e].id);null!=f&&b.push(f)}this.setSelectionCells(b)}else this.clearSelection()};
+Graph.prototype.selectCellForEvent=function(a,b){mxEvent.isShiftDown(b)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),a)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
Graph.prototype.selectTableRange=function(a,b){var e=!1;if(this.isTableCell(a)&&this.isTableCell(b)){var f=this.model.getParent(a),g=this.model.getParent(f),d=this.model.getParent(b);if(g==this.model.getParent(d)){a=f.getIndex(a);f=g.getIndex(f);var h=d.getIndex(b),m=g.getIndex(d);d=Math.max(f,m);b=Math.min(a,h);a=Math.max(a,h);h=[];for(f=Math.min(f,m);f<=d;f++){m=this.model.getChildAt(g,f);for(var p=b;p<=a;p++)h.push(this.model.getChildAt(m,p))}0<h.length&&(1<h.length||1<this.getSelectionCount()||
!this.isCellSelected(h[0]))&&(this.setSelectionCells(h),e=!0)}}return e};
Graph.prototype.snapCellsToGrid=function(a,b){this.getModel().beginUpdate();try{for(var e=0;e<a.length;e++){var f=a[e],g=this.getCellGeometry(f);if(null!=g){g=g.clone();if(this.getModel().isVertex(f))g.x=Math.round(g.x/b)*b,g.y=Math.round(g.y/b)*b,g.width=Math.round(g.width/b)*b,g.height=Math.round(g.height/b)*b;else if(this.getModel().isEdge(f)&&null!=g.points)for(var d=0;d<g.points.length;d++)g.points[d].x=Math.round(g.points[d].x/b)*b,g.points[d].y=Math.round(g.points[d].y/b)*b;this.getModel().setGeometry(f,
@@ -2702,11 +2706,11 @@ Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.mo
Graph.prototype.insertEdgeBeforeCell=function(a,b){for(var e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=a.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==a.parent&&(b=e.parent.getIndex(e),this.model.add(e.parent,a,b))};
Graph.prototype.connectVertex=function(a,b,e,f,g,d,h,m){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var p=this.isCloneConnectSource(a),k=p?a:this.getCompositeParent(a),u=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(k.geometry.x,k.geometry.y);b==mxConstants.DIRECTION_NORTH?(u.x+=k.geometry.width/2,u.y-=e):b==
mxConstants.DIRECTION_SOUTH?(u.x+=k.geometry.width/2,u.y+=k.geometry.height+e):(u.x=b==mxConstants.DIRECTION_WEST?u.x-e:u.x+(k.geometry.width+e),u.y+=k.geometry.height/2);var w=this.view.getState(this.model.getParent(a));e=this.view.scale;var y=this.view.translate;k=y.x*e;y=y.y*e;null!=w&&this.model.isVertex(w.cell)&&(k=w.x,y=w.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(u.x+=a.parent.geometry.x,u.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(k+u.x*e,y+u.y*e)).grow(40*e);d=null!=d?
-this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var A=null,D=null;if(null!=d){d=d.reverse();for(var E=0;E<d.length;E++)if(!this.isCellLocked(d[E])&&!this.model.isEdge(d[E])&&d[E]!=a)if(!this.model.isAncestor(a,d[E])&&this.isContainer(d[E])&&(null==A||d[E]==this.model.getParent(a)))A=d[E];else if(null==D&&this.isCellConnectable(d[E])&&!this.model.isAncestor(d[E],a)&&!this.isSwimlane(d[E])){var F=this.view.getState(d[E]);null==w||null==F||mxUtils.intersects(w,F)||(D=d[E])}}var H=
-!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||g;H&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var M=[],N=D;D=A;g=mxUtils.bind(this,function(J){if(null==h||null!=J||null==D&&p){this.model.beginUpdate();try{if(null==N&&H){var V=this.getAbsoluteParent(null!=J?J:a);V=p?a:this.getCompositeParent(V);N=null!=J?J:this.duplicateCells([V],
-!1)[0];null!=J&&this.addCells([N],this.model.getParent(a),null,null,null,!0);var W=this.getCellGeometry(N);null!=W&&(null!=J&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=W.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=W.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-W.width/2:u.x+W.width/2),W.x=u.x-W.width/2,W.y=u.y-W.height/2);null!=A?(this.addCells([N],A,null,null,null,!0),D=null):H&&!p&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var T=mxEvent.isControlDown(f)&&
-mxEvent.isShiftDown(f)&&H||null==D&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,N,this.createCurrentEdgeStyle());null!=T&&(M.push(T),this.applyNewEdgeStyle(a,[T],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(T,a));if(null==D&&null!=N&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var O=a.parent.getIndex(a);this.model.add(a.parent,N,O)}null==D&&null!=N&&M.push(N);null==N&&null!=T&&T.geometry.setTerminalPoint(u,!1);null!=T&&this.fireEvent(new mxEventObject("cellsInserted",
-"cells",[T]))}finally{this.model.endUpdate()}}if(null!=m)m(M);else return M});if(null==h||null!=N||!H||null==D&&p)return g(N);h(k+u.x*e,y+u.y*e,g)};
+this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var A=null,E=null;if(null!=d){d=d.reverse();for(var D=0;D<d.length;D++)if(!this.isCellLocked(d[D])&&!this.model.isEdge(d[D])&&d[D]!=a)if(!this.model.isAncestor(a,d[D])&&this.isContainer(d[D])&&(null==A||d[D]==this.model.getParent(a)))A=d[D];else if(null==E&&this.isCellConnectable(d[D])&&!this.model.isAncestor(d[D],a)&&!this.isSwimlane(d[D])){var F=this.view.getState(d[D]);null==w||null==F||mxUtils.intersects(w,F)||(E=d[D])}}var H=
+!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||g;H&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var M=[],N=E;E=A;g=mxUtils.bind(this,function(J){if(null==h||null!=J||null==E&&p){this.model.beginUpdate();try{if(null==N&&H){var V=this.getAbsoluteParent(null!=J?J:a);V=p?a:this.getCompositeParent(V);N=null!=J?J:this.duplicateCells([V],
+!1)[0];null!=J&&this.addCells([N],this.model.getParent(a),null,null,null,!0);var W=this.getCellGeometry(N);null!=W&&(null!=J&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=W.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=W.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-W.width/2:u.x+W.width/2),W.x=u.x-W.width/2,W.y=u.y-W.height/2);null!=A?(this.addCells([N],A,null,null,null,!0),E=null):H&&!p&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var T=mxEvent.isControlDown(f)&&
+mxEvent.isShiftDown(f)&&H||null==E&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,N,this.createCurrentEdgeStyle());null!=T&&(M.push(T),this.applyNewEdgeStyle(a,[T],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(T,a));if(null==E&&null!=N&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var O=a.parent.getIndex(a);this.model.add(a.parent,N,O)}null==E&&null!=N&&M.push(N);null==N&&null!=T&&T.geometry.setTerminalPoint(u,!1);null!=T&&this.fireEvent(new mxEventObject("cellsInserted",
+"cells",[T]))}finally{this.model.endUpdate()}}if(null!=m)m(M);else return M});if(null==h||null!=N||!H||null==E&&p)return g(N);h(k+u.x*e,y+u.y*e,g)};
Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),e=[],f,g=0;g<a.length;g++)if(f=a[g],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(b.innerHTML=Graph.sanitizeHtml(this.getLabel(f)),f=mxUtils.extractTextWithWhitespace([b])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&e.push(f);return e.join(" ")};
Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var e=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var f=a;null==e&&null!=f;)null!=f.value&&"object"==typeof f.value&&(e=f.hasAttribute(b)?null!=f.getAttribute(b)?f.getAttribute(b):"":null),f=this.model.getParent(f)}else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=b.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a,b){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),b||(a=mxUtils.removeJavascriptProtocol(a)),a):null};
@@ -2792,25 +2796,25 @@ TableLayout.prototype.getRowLayout=function(a,b){var e=this.graph.model.getChild
TableLayout.prototype.layoutRow=function(a,b,e,f){var g=this.graph.getModel(),d=g.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var h=a.x,m=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var p=0;p<d.length;p++){var k=this.graph.getCellGeometry(d[p]);null!=k&&(k=k.clone(),k.y=a.y,k.height=e-a.y-a.height,null!=b?(k.x=b[p],k.width=b[p+1]-k.x,p==d.length-1&&p<b.length-2&&(k.width=f-k.x-a.x-a.width)):(k.x=h,h+=k.width,p==d.length-1?k.width=f-a.x-a.width-m:m+=k.width),k.alternateBounds=new mxRectangle(0,
0,k.width,k.height),g.setGeometry(d[p],k))}return m};
TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getCellGeometry(a),f=this.graph.getCellStyle(a),g="1"==mxUtils.getValue(f,"resizeLastRow","0"),d="1"==mxUtils.getValue(f,"resizeLast","0");f="1"==mxUtils.getValue(f,"fixedRows","0");var h=this.graph.getModel(),m=0;h.beginUpdate();try{for(var p=e.height-b.y-b.height,k=e.width-b.x-b.width,u=h.getChildCells(a,!0),w=0;w<u.length;w++)h.setVisible(u[w],!0);var y=this.getSize(u,!1);if(0<p&&0<k&&0<
-u.length&&0<y){if(g){var A=this.graph.getCellGeometry(u[u.length-1]);null!=A&&(A=A.clone(),A.height=p-y+A.height,h.setGeometry(u[u.length-1],A))}var D=d?null:this.getRowLayout(u[0],k),E=[],F=b.y;for(w=0;w<u.length;w++)A=this.graph.getCellGeometry(u[w]),null!=A&&(A=A.clone(),A.x=b.x,A.width=k,A.y=Math.round(F),F=g||f?F+A.height:F+A.height/y*p,A.height=Math.round(F)-A.y,h.setGeometry(u[w],A)),m=Math.max(m,this.layoutRow(u[w],D,A.height,k,E));f&&p<y&&(e=e.clone(),e.height=F+b.height,h.setGeometry(a,
+u.length&&0<y){if(g){var A=this.graph.getCellGeometry(u[u.length-1]);null!=A&&(A=A.clone(),A.height=p-y+A.height,h.setGeometry(u[u.length-1],A))}var E=d?null:this.getRowLayout(u[0],k),D=[],F=b.y;for(w=0;w<u.length;w++)A=this.graph.getCellGeometry(u[w]),null!=A&&(A=A.clone(),A.x=b.x,A.width=k,A.y=Math.round(F),F=g||f?F+A.height:F+A.height/y*p,A.height=Math.round(F)-A.y,h.setGeometry(u[w],A)),m=Math.max(m,this.layoutRow(u[w],E,A.height,k,D));f&&p<y&&(e=e.clone(),e.height=F+b.height,h.setGeometry(a,
e));d&&k<m+Graph.minTableColumnWidth&&(e=e.clone(),e.width=m+b.width+b.x+Graph.minTableColumnWidth,h.setGeometry(a,e));this.graph.visitTableCells(a,mxUtils.bind(this,function(H){h.setVisible(H.cell,H.actual.cell==H.cell);if(H.actual.cell!=H.cell){if(H.actual.row==H.row){var M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo;H.actual.geo.width+=M.width}H.actual.col==H.col&&(M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo,H.actual.geo.height+=M.height)}}))}else for(w=0;w<u.length;w++)h.setVisible(u[w],
!1)}finally{h.endUpdate()}}};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(w,y){y=null!=y?y:!0;var A=this.getState(w);null!=A&&y&&this.graph.model.isEdge(A.cell)&&null!=A.style&&1!=A.style[mxConstants.STYLE_CURVED]&&!A.invalid&&this.updateLineJumps(A)&&this.graph.cellRenderer.redraw(A,!1,this.isRendering());A=b.apply(this,
arguments);null!=A&&y&&this.graph.model.isEdge(A.cell)&&null!=A.style&&1!=A.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(A);return A};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(w){var y=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
-y)for(var A=null,D=0;D<y.length;D++)if("hidden"!=y[D].getAttribute("visibility")){if(!(null!=A&&A!=y[D].getAttribute("d")||null!=w&&0!=--w))return y[D]}else null==A&&(A=y[D].getAttribute("d"));return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(w){e.apply(this,
+y)for(var A=null,E=0;E<y.length;E++)if("hidden"!=y[E].getAttribute("visibility")){if(!(null!=A&&A!=y[E].getAttribute("d")||null!=w&&0!=--w))return y[E]}else null==A&&(A=y[E].getAttribute("d"));return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(w){e.apply(this,
arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var f=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(w){w=f.apply(this,arguments);null!=this.state&&(w.adaptiveColors=this.state.view.graph.getAdaptiveColors());return w};var g=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(w,y){return g.apply(this,arguments)||null!=w.routedPoints&&null!=y.routedPoints&&!mxUtils.equalPoints(y.routedPoints,w.routedPoints)};
-var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var y=w.absolutePoints;if(Graph.lineJumpsEnabled){var A=null!=w.routedPoints,D=null;if(null!=y&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var E=function(ba,L,U){var X=new mxPoint(L,U);X.type=ba;D.push(X);
-X=null!=w.routedPoints?w.routedPoints[D.length-1]:null;return null==X||X.type!=ba||X.x!=L||X.y!=U},F=.5*this.scale;A=!1;D=[];for(var H=0;H<y.length-1;H++){for(var M=y[H+1],N=y[H],J=[],V=y[H+2];H<y.length-2&&mxUtils.ptSegDistSq(N.x,N.y,V.x,V.y,M.x,M.y)<1*this.scale*this.scale;)M=V,H++,V=y[H+2];A=E(0,N.x,N.y)||A;for(var W=0;W<this.validEdges.length;W++){var T=this.validEdges[W],O=T.absolutePoints;if(null!=O&&mxUtils.intersects(w,T)&&"1"!=T.style.noJump){var fa=null;for(T=0;T<O.length-1;T++){var S=O[T+
+var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var y=w.absolutePoints;if(Graph.lineJumpsEnabled){var A=null!=w.routedPoints,E=null;if(null!=y&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var D=function(ba,L,U){var X=new mxPoint(L,U);X.type=ba;E.push(X);
+X=null!=w.routedPoints?w.routedPoints[E.length-1]:null;return null==X||X.type!=ba||X.x!=L||X.y!=U},F=.5*this.scale;A=!1;E=[];for(var H=0;H<y.length-1;H++){for(var M=y[H+1],N=y[H],J=[],V=y[H+2];H<y.length-2&&mxUtils.ptSegDistSq(N.x,N.y,V.x,V.y,M.x,M.y)<1*this.scale*this.scale;)M=V,H++,V=y[H+2];A=D(0,N.x,N.y)||A;for(var W=0;W<this.validEdges.length;W++){var T=this.validEdges[W],O=T.absolutePoints;if(null!=O&&mxUtils.intersects(w,T)&&"1"!=T.style.noJump){var fa=null;for(T=0;T<O.length-1;T++){var S=O[T+
1],aa=O[T];for(V=O[T+2];T<O.length-2&&mxUtils.ptSegDistSq(aa.x,aa.y,V.x,V.y,S.x,S.y)<1*this.scale*this.scale;)S=V,T++,V=O[T+2];var Y=mxUtils.intersection(N.x,N.y,M.x,M.y,aa.x,aa.y,S.x,S.y);if(null!=Y&&(Math.abs(Y.x-N.x)>F||Math.abs(Y.y-N.y)>F)&&(Math.abs(Y.x-M.x)>F||Math.abs(Y.y-M.y)>F)&&(null==fa||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,fa.x,fa.y)>F||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,aa.x,aa.y)>F)&&(null==V||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,V.x,V.y)>F||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,S.x,S.y)>F)){V=
-Y.x-N.x;fa=Y.y-N.y;Y={distSq:V*V+fa*fa,x:Y.x,y:Y.y};for(V=0;V<J.length;V++)if(J[V].distSq>Y.distSq){J.splice(V,0,Y);Y=null;break}null==Y||0!=J.length&&J[J.length-1].x===Y.x&&J[J.length-1].y===Y.y||J.push(Y)}fa=aa}}}for(T=0;T<J.length;T++)A=E(1,J[T].x,J[T].y)||A}Y=y[y.length-1];A=E(0,Y.x,Y.y)||A}w.routedPoints=D;return A}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,y,A){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==
-this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)h.apply(this,arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,E=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,M=null,N=null,J=[],V=null;w.begin();for(var W=0;W<this.state.routedPoints.length;W++){var T=this.state.routedPoints[W],O=new mxPoint(T.x/
-this.scale,T.y/this.scale);0==W?O=y[0]:W==this.state.routedPoints.length-1&&(O=y[y.length-1]);var fa=!1;if(null!=M&&1==T.type){var S=this.state.routedPoints[W+1];T=S.x/this.scale-O.x;S=S.y/this.scale-O.y;T=T*T+S*S;null==V&&(V=new mxPoint(O.x-M.x,O.y-M.y),N=Math.sqrt(V.x*V.x+V.y*V.y),0<N?(V.x=V.x*E/N,V.y=V.y*E/N):V=null);T>E*E&&0<N&&(T=M.x-O.x,S=M.y-O.y,T=T*T+S*S,T>E*E&&(fa=new mxPoint(O.x-V.x,O.y-V.y),T=new mxPoint(O.x+V.x,O.y+V.y),J.push(fa),this.addPoints(w,J,A,D,!1,null,H),J=0>Math.round(V.x)||
-0==Math.round(V.x)&&0>=Math.round(V.y)?1:-1,H=!1,"sharp"==F?(w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.lineTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x,T.y)):"line"==F?(w.moveTo(fa.x+V.y*J,fa.y-V.x*J),w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.moveTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x+V.y*J,T.y-V.x*J),w.moveTo(T.x,T.y)):"arc"==F?(J*=1.3,w.curveTo(fa.x-V.y*J,fa.y+V.x*J,T.x-V.y*J,T.y+V.x*J,T.x,T.y)):(w.moveTo(T.x,T.y),H=!0),J=[T],fa=!0))}else V=null;fa||(J.push(O),M=O)}this.addPoints(w,J,A,D,!1,null,H);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;
-mxGraphView.prototype.getFixedTerminalPoint=function(w,y,A,D){return null!=y&&"centerPerimeter"==y.style[mxConstants.STYLE_PERIMETER]?new mxPoint(y.getCenterX(),y.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,y,A,D){if(null==y||null==w||"1"!=y.style.snapToPoint&&"1"!=w.style.snapToPoint)p.apply(this,arguments);else{y=this.getTerminalPort(w,y,D);var E=this.getNextPoint(w,A,D),F=this.graph.isOrthogonal(w),
-H=mxUtils.toRadians(Number(y.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(y.getCenterX(),y.getCenterY());if(0!=H){var N=Math.cos(-H),J=Math.sin(-H);E=mxUtils.getRotatedPoint(E,N,J,M)}N=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(w.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);E=this.getPerimeterPoint(y,E,0==H&&F,N);0!=H&&(N=Math.cos(H),J=Math.sin(H),E=mxUtils.getRotatedPoint(E,N,J,M));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,
-y,A,D,E),D)}};mxGraphView.prototype.snapToAnchorPoint=function(w,y,A,D,E){if(null!=y&&null!=w){w=this.graph.getAllConnectionConstraints(y);D=A=null;if(null!=w)for(var F=0;F<w.length;F++){var H=this.graph.getConnectionPoint(y,w[F]);if(null!=H){var M=(H.x-E.x)*(H.x-E.x)+(H.y-E.y)*(H.y-E.y);if(null==D||M<D)A=H,D=M}}null!=A&&(E=A)}return E};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,y,A){var D=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&
-null!=A.state&&(D=A.state.view.graph.replacePlaceholders(A.state.cell,D));return D};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(w){if(null!=w.style&&"undefined"!==typeof pako){var y=mxUtils.getValue(w.style,mxConstants.STYLE_SHAPE,null);if(null!=y&&"string"===typeof y&&"stencil("==y.substring(0,8))try{var A=y.substring(8,y.length-1),D=mxUtils.parseXml(Graph.decompress(A));return new mxShape(new mxStencil(D.documentElement))}catch(E){null!=window.console&&
-console.log("Error in shape: "+E)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(a){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[a]};mxStencilRegistry.setFileLoaded=function(a){mxStencilRegistry.filesLoaded[a]=!0};
+Y.x-N.x;fa=Y.y-N.y;Y={distSq:V*V+fa*fa,x:Y.x,y:Y.y};for(V=0;V<J.length;V++)if(J[V].distSq>Y.distSq){J.splice(V,0,Y);Y=null;break}null==Y||0!=J.length&&J[J.length-1].x===Y.x&&J[J.length-1].y===Y.y||J.push(Y)}fa=aa}}}for(T=0;T<J.length;T++)A=D(1,J[T].x,J[T].y)||A}Y=y[y.length-1];A=D(0,Y.x,Y.y)||A}w.routedPoints=E;return A}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,y,A){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==
+this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)h.apply(this,arguments);else{var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,D=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,M=null,N=null,J=[],V=null;w.begin();for(var W=0;W<this.state.routedPoints.length;W++){var T=this.state.routedPoints[W],O=new mxPoint(T.x/
+this.scale,T.y/this.scale);0==W?O=y[0]:W==this.state.routedPoints.length-1&&(O=y[y.length-1]);var fa=!1;if(null!=M&&1==T.type){var S=this.state.routedPoints[W+1];T=S.x/this.scale-O.x;S=S.y/this.scale-O.y;T=T*T+S*S;null==V&&(V=new mxPoint(O.x-M.x,O.y-M.y),N=Math.sqrt(V.x*V.x+V.y*V.y),0<N?(V.x=V.x*D/N,V.y=V.y*D/N):V=null);T>D*D&&0<N&&(T=M.x-O.x,S=M.y-O.y,T=T*T+S*S,T>D*D&&(fa=new mxPoint(O.x-V.x,O.y-V.y),T=new mxPoint(O.x+V.x,O.y+V.y),J.push(fa),this.addPoints(w,J,A,E,!1,null,H),J=0>Math.round(V.x)||
+0==Math.round(V.x)&&0>=Math.round(V.y)?1:-1,H=!1,"sharp"==F?(w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.lineTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x,T.y)):"line"==F?(w.moveTo(fa.x+V.y*J,fa.y-V.x*J),w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.moveTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x+V.y*J,T.y-V.x*J),w.moveTo(T.x,T.y)):"arc"==F?(J*=1.3,w.curveTo(fa.x-V.y*J,fa.y+V.x*J,T.x-V.y*J,T.y+V.x*J,T.x,T.y)):(w.moveTo(T.x,T.y),H=!0),J=[T],fa=!0))}else V=null;fa||(J.push(O),M=O)}this.addPoints(w,J,A,E,!1,null,H);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;
+mxGraphView.prototype.getFixedTerminalPoint=function(w,y,A,E){return null!=y&&"centerPerimeter"==y.style[mxConstants.STYLE_PERIMETER]?new mxPoint(y.getCenterX(),y.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,y,A,E){if(null==y||null==w||"1"!=y.style.snapToPoint&&"1"!=w.style.snapToPoint)p.apply(this,arguments);else{y=this.getTerminalPort(w,y,E);var D=this.getNextPoint(w,A,E),F=this.graph.isOrthogonal(w),
+H=mxUtils.toRadians(Number(y.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(y.getCenterX(),y.getCenterY());if(0!=H){var N=Math.cos(-H),J=Math.sin(-H);D=mxUtils.getRotatedPoint(D,N,J,M)}N=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(w.style[E?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);D=this.getPerimeterPoint(y,D,0==H&&F,N);0!=H&&(N=Math.cos(H),J=Math.sin(H),D=mxUtils.getRotatedPoint(D,N,J,M));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,
+y,A,E,D),E)}};mxGraphView.prototype.snapToAnchorPoint=function(w,y,A,E,D){if(null!=y&&null!=w){w=this.graph.getAllConnectionConstraints(y);E=A=null;if(null!=w)for(var F=0;F<w.length;F++){var H=this.graph.getConnectionPoint(y,w[F]);if(null!=H){var M=(H.x-D.x)*(H.x-D.x)+(H.y-D.y)*(H.y-D.y);if(null==E||M<E)A=H,E=M}}null!=A&&(D=A)}return D};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,y,A){var E=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&
+null!=A.state&&(E=A.state.view.graph.replacePlaceholders(A.state.cell,E));return E};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(w){if(null!=w.style&&"undefined"!==typeof pako){var y=mxUtils.getValue(w.style,mxConstants.STYLE_SHAPE,null);if(null!=y&&"string"===typeof y&&"stencil("==y.substring(0,8))try{var A=y.substring(8,y.length-1),E=mxUtils.parseXml(Graph.decompress(A));return new mxShape(new mxStencil(E.documentElement))}catch(D){null!=window.console&&
+console.log("Error in shape: "+D)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(a){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[a]};mxStencilRegistry.setFileLoaded=function(a){mxStencilRegistry.filesLoaded[a]=!0};
mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var f=0;f<b.length;f++){var g=b[f];if(!mxStencilRegistry.isFileLoaded(g))if(mxStencilRegistry.setFileLoaded(g),".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g,
null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var d=mxUtils.load(g);null!=d&&200<=d.getStatus()&&299>=d.getStatus()&&eval.call(window,d.getText())}}catch(h){null!=window.console&&console.log("error in getStencil:",a,e,b,g,h)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0])){b=a[1];for(var e=2;e<a.length-1;e++)b+="/"+a[e]}return b};
@@ -2852,8 +2856,8 @@ null!=C&&C.constructor==mxStackLayout&&(B=!1))}return B};Graph.prototype.getPref
!1);C.setTerminal(Q,ka,!0);C.setTerminal(Q,Z,!1);var ha=C.getGeometry(Q);if(null!=ha){ha=ha.clone();null!=ha.points&&ha.points.reverse();var la=ha.getTerminalPoint(!0),ya=ha.getTerminalPoint(!1);ha.setTerminalPoint(la,!1);ha.setTerminalPoint(ya,!0);C.setGeometry(Q,ha);var La=this.view.getState(Q),Ha=this.view.getState(Z),xa=this.view.getState(ka);if(null!=La){var Ga=null!=Ha?this.getConnectionConstraint(La,Ha,!0):null,va=null!=xa?this.getConnectionConstraint(La,xa,!1):null;this.setConnectionConstraint(Q,
Z,!0,va);this.setConnectionConstraint(Q,ka,!1,Ga);var ua=mxUtils.getValue(La.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(La.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[Q]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[Q])}G.push(Q)}}else if(C.isVertex(Q)&&(ha=this.getCellGeometry(Q),null!=ha)){if(!(this.isTable(Q)||this.isTableRow(Q)||this.isTableCell(Q)||this.isSwimlane(Q))){ha=ha.clone();
ha.x+=ha.width/2-ha.height/2;ha.y+=ha.height/2-ha.width/2;var Sa=ha.width;ha.width=ha.height;ha.height=Sa;C.setGeometry(Q,ha)}var Qa=this.view.getState(Q);if(null!=Qa){var Na=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ra=mxUtils.getValue(Qa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Na[mxUtils.mod(mxUtils.indexOf(Na,Ra)+(B?-1:1),Na.length)],[Q])}G.push(Q)}}}finally{C.endUpdate()}return G};
-Graph.prototype.stencilHasPlaceholders=function(q){if(null!=q&&null!=q.fgNode)for(q=q.fgNode.firstChild;null!=q;){if("text"==q.nodeName&&"1"==q.getAttribute("placeholders"))return!0;q=q.nextSibling}return!1};var D=Graph.prototype.processChange;Graph.prototype.processChange=function(q){if(q instanceof mxGeometryChange&&(this.isTableCell(q.cell)||this.isTableRow(q.cell))&&(null==q.previous&&null!=q.geometry||null!=q.previous&&!q.previous.equals(q.geometry))){var B=q.cell;this.isTableCell(B)&&(B=this.model.getParent(B));
-this.isTableRow(B)&&(B=this.model.getParent(B));var C=this.view.getState(B);null!=C&&null!=C.shape&&(this.view.invalidate(B),C.shape.bounds=null)}D.apply(this,arguments);q instanceof mxValueChange&&null!=q.cell&&null!=q.cell.value&&"object"==typeof q.cell.value&&this.invalidateDescendantsWithPlaceholders(q.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(q){q=this.model.getDescendants(q);if(0<q.length)for(var B=0;B<q.length;B++){var C=this.view.getState(q[B]);null!=C&&null!=C.shape&&
+Graph.prototype.stencilHasPlaceholders=function(q){if(null!=q&&null!=q.fgNode)for(q=q.fgNode.firstChild;null!=q;){if("text"==q.nodeName&&"1"==q.getAttribute("placeholders"))return!0;q=q.nextSibling}return!1};var E=Graph.prototype.processChange;Graph.prototype.processChange=function(q){if(q instanceof mxGeometryChange&&(this.isTableCell(q.cell)||this.isTableRow(q.cell))&&(null==q.previous&&null!=q.geometry||null!=q.previous&&!q.previous.equals(q.geometry))){var B=q.cell;this.isTableCell(B)&&(B=this.model.getParent(B));
+this.isTableRow(B)&&(B=this.model.getParent(B));var C=this.view.getState(B);null!=C&&null!=C.shape&&(this.view.invalidate(B),C.shape.bounds=null)}E.apply(this,arguments);q instanceof mxValueChange&&null!=q.cell&&null!=q.cell.value&&"object"==typeof q.cell.value&&this.invalidateDescendantsWithPlaceholders(q.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(q){q=this.model.getDescendants(q);if(0<q.length)for(var B=0;B<q.length;B++){var C=this.view.getState(q[B]);null!=C&&null!=C.shape&&
null!=C.shape.stencil&&this.stencilHasPlaceholders(C.shape.stencil)?this.removeStateForCell(q[B]):this.isReplacePlaceholders(q[B])&&this.view.invalidate(q[B],!1,!1)}};Graph.prototype.replaceElement=function(q,B){B=q.ownerDocument.createElement(null!=B?B:"span");for(var C=Array.prototype.slice.call(q.attributes);attr=C.pop();)B.setAttribute(attr.nodeName,attr.nodeValue);B.innerHTML=q.innerHTML;q.parentNode.replaceChild(B,q)};Graph.prototype.processElements=function(q,B){if(null!=q){q=q.getElementsByTagName("*");
for(var C=0;C<q.length;C++)null!=q[C]&&B(q[C])}};Graph.prototype.updateLabelElements=function(q,B,C){q=null!=q?q:this.getSelectionCells();for(var G=document.createElement("div"),K=0;K<q.length;K++){var Q=this.getCurrentCellStyle(q[K]);if(null!=Q&&"1"==Q.html&&(Q=this.convertValueToString(q[K]),null!=Q&&0<Q.length)){G.innerHTML=Graph.sanitizeHtml(Q);for(var Z=G.getElementsByTagName(null!=C?C:"*"),ka=0;ka<Z.length;ka++)B(Z[ka]);G.innerHTML!=Q&&this.cellLabelChanged(q[K],G.innerHTML)}}};Graph.prototype.cellLabelChanged=
function(q,B,C){B=Graph.zapGremlins(B);this.model.beginUpdate();try{if(null!=q.value&&"object"==typeof q.value){if(this.isReplacePlaceholders(q)&&null!=q.getAttribute("placeholder"))for(var G=q.getAttribute("placeholder"),K=q;null!=K;){if(K==this.model.getRoot()||null!=K.value&&"object"==typeof K.value&&K.hasAttribute(G)){this.setAttributeForCell(K,G,B);break}K=this.model.getParent(K)}var Q=q.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&Q.hasAttribute("label_"+Graph.diagramLanguage)?
@@ -2861,7 +2865,7 @@ Q.setAttribute("label_"+Graph.diagramLanguage,B):Q.setAttribute("label",B);B=Q}m
this.isCellDeletable(K.cell)&&this.isTransparentState(K)){for(var Q=!0,Z=0;Z<this.model.getChildCount(K.cell)&&Q;Z++)B.get(this.model.getChildAt(K.cell,Z))||(Q=!1);Q&&q.push(K.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(q){for(var B=[],C=0;C<q.length;C++)this.isCellDeletable(q[C])&&this.isTransparentState(this.view.getState(q[C]))&&B.push(q[C]);q=B;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=
function(q,B){this.setAttributeForCell(q,"link",B)};Graph.prototype.setTooltipForCell=function(q,B){var C="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(q.value)&&q.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(C="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(q,C,B)};Graph.prototype.getAttributeForCell=function(q,B,C){q=null!=q.value&&"object"===typeof q.value?q.value.getAttribute(B):null;return null!=q?q:C};Graph.prototype.setAttributeForCell=function(q,
B,C){if(null!=q.value&&"object"==typeof q.value)var G=q.value.cloneNode(!0);else G=mxUtils.createXmlDocument().createElement("UserObject"),G.setAttribute("label",q.value||"");null!=C?G.setAttribute(B,C):G.removeAttribute(B);this.model.setValue(q,G)};Graph.prototype.isTargetShape=function(q,B,C){q=mxUtils.getValue(this.getCurrentCellStyle(q),mxConstants.STYLE_SHAPE,"");for(C=0;C<B.length;C++){var G=mxUtils.getValue(this.getCurrentCellStyle(B[C]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(G,
-q))return!0}return!1};var E=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,B,C,G){if(mxEvent.isAltDown(B))return null;for(var K=0;K<q.length;K++){var Q=this.model.getParent(q[K]);if(this.model.isEdge(Q)&&0>mxUtils.indexOf(q,Q))return null}Q=E.apply(this,arguments);var Z=!0;for(K=0;K<q.length&&Z;K++)Z=Z&&this.isTableRow(q[K]);Z&&(this.isTableCell(Q)&&(Q=this.model.getParent(Q)),this.isTableRow(Q)&&(Q=this.model.getParent(Q)),this.isTable(Q)||(Q=null));return Q};Graph.prototype.click=
+q))return!0}return!1};var D=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,B,C,G){if(mxEvent.isAltDown(B))return null;for(var K=0;K<q.length;K++){var Q=this.model.getParent(q[K]);if(this.model.isEdge(Q)&&0>mxUtils.indexOf(q,Q))return null}Q=D.apply(this,arguments);var Z=!0;for(K=0;K<q.length&&Z;K++)Z=Z&&this.isTableRow(q[K]);Z&&(this.isTableCell(Q)&&(Q=this.model.getParent(Q)),this.isTableRow(Q)&&(Q=this.model.getParent(Q)),this.isTable(Q)||(Q=null));return Q};Graph.prototype.click=
function(q){mxGraph.prototype.click.call(this,q);this.firstClickState=q.getState();this.firstClickSource=q.getSource()};Graph.prototype.dblClick=function(q,B){this.isEnabled()&&(B=this.insertTextForEvent(q,B),mxGraph.prototype.dblClick.call(this,q,B))};Graph.prototype.insertTextForEvent=function(q,B){var C=mxUtils.convertPoint(this.container,mxEvent.getClientX(q),mxEvent.getClientY(q));if(null!=q&&!this.model.isVertex(B)){var G=this.model.isEdge(B)?this.view.getState(B):null,K=mxEvent.getSource(q);
this.firstClickState!=G||this.firstClickSource!=K||null!=G&&null!=G.text&&null!=G.text.node&&null!=G.text.boundingBox&&(mxUtils.contains(G.text.boundingBox,C.x,C.y)||mxUtils.isAncestorNode(G.text.node,mxEvent.getSource(q)))||(null!=G||this.isCellLocked(this.getDefaultParent()))&&(null==G||this.isCellLocked(G.cell))||!(null!=G||mxClient.IS_SVG&&K==this.view.getCanvas().ownerSVGElement)||(null==G&&(G=this.view.getState(this.getCellAt(C.x,C.y))),B=this.addText(C.x,C.y,G))}return B};Graph.prototype.getInsertPoint=
function(q){q=this.getGridSize();var B=this.container.scrollLeft/this.view.scale-this.view.translate.x,C=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var G=this.getPageLayout(),K=this.getPageSize();B=Math.max(B,G.x*K.width);C=Math.max(C,G.y*K.height)}return new mxPoint(this.snap(B+q),this.snap(C+q))};Graph.prototype.getFreeInsertPoint=function(q){var B=this.view,C=this.getGraphBounds(),G=this.getInsertPoint(q);q=this.snap(Math.round(Math.max(G.x,C.x/B.scale-
@@ -3040,34 +3044,34 @@ Format.processMenuIcon=function(a,b){var e=a.getElementsByTagName("img");0<e.len
Format.prototype.init=function(){var a=this.editorUi,b=a.editor,e=b.graph;this.update=mxUtils.bind(this,function(f,g){this.refresh()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.update);e.getModel().addListener(mxEvent.CHANGE,this.update);e.addListener(mxEvent.EDITING_STARTED,this.update);e.addListener(mxEvent.EDITING_STOPPED,this.update);e.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);e.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
this.update);a.addListener("lockedChanged",this.update);a.addListener("languageChanged",this.update);a.addListener("formatWidthChanged",this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};
Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))};
-Format.prototype.immediateRefresh=function(){if(0!=this.container.offsetWidth){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatContent";var f=document.createElement("div");f.className="geFormatTitle";this.container.appendChild(e);var g=a.getSelectionState(),d=g.containsLabel,h=null,m=null,p=mxUtils.bind(this,function(D,E,F,H){var M=mxUtils.bind(this,function(J,V){h!=D&&(V||(d?this.labelIndex=F:b.isSelectionEmpty()?this.diagramIndex=F:this.currentIndex=
-F),null!=h&&h.classList.remove("geActiveFormatTitle"),h=D,h.classList.add("geActiveFormatTitle"),m!=E&&(null!=m&&(m.style.display="none"),m=E,m.style.display=""))});mxEvent.addListener(D,"click",M);var N=d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex;(H&&null==h||F==N)&&M(null,H&&null==h)}),k=0;if(b.isSelectionEmpty()){var u=document.createElement("div");mxUtils.write(u,mxResources.get("diagram"));f.appendChild(u);f.setAttribute("title",mxResources.get("diagram"));e.appendChild(f);
+Format.prototype.immediateRefresh=function(){if(0!=this.container.offsetWidth){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatContent";var f=document.createElement("div");f.className="geFormatTitle";this.container.appendChild(e);var g=a.getSelectionState(),d=g.containsLabel,h=null,m=null,p=mxUtils.bind(this,function(E,D,F,H){var M=mxUtils.bind(this,function(J,V){h!=E&&(V||(d?this.labelIndex=F:b.isSelectionEmpty()?this.diagramIndex=F:this.currentIndex=
+F),null!=h&&h.classList.remove("geActiveFormatTitle"),h=E,h.classList.add("geActiveFormatTitle"),m!=D&&(null!=m&&(m.style.display="none"),m=D,m.style.display=""))});mxEvent.addListener(E,"click",M);var N=d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex;(H&&null==h||F==N)&&M(null,H&&null==h)}),k=0;if(b.isSelectionEmpty()){var u=document.createElement("div");mxUtils.write(u,mxResources.get("diagram"));f.appendChild(u);f.setAttribute("title",mxResources.get("diagram"));e.appendChild(f);
g=e.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);g.style.display="none";var w=f.cloneNode(!1);p(f,g,k++);var y=e.cloneNode(!1);y.style.display="none";u=document.createElement("div");mxUtils.write(u,mxResources.get("style"));w.appendChild(u);w.setAttribute("title",mxResources.get("style"));e.appendChild(w);this.panels.push(new DiagramStylePanel(this,a,y));this.container.appendChild(y);p(w,y,k++,!0)}else if(b.isEditing())u=document.createElement("div"),
mxUtils.write(u,mxResources.get("text")),f.appendChild(u),f.setAttribute("title",mxResources.get("text")),e.appendChild(f),y=e.cloneNode(!1),y.style.display="none",this.panels.push(new TextFormatPanel(this,a,y)),this.container.appendChild(y),p(f,y,k++,!0);else{w=f.cloneNode(!1);var A=w.cloneNode(!1);0<g.cells.length&&(u=document.createElement("div"),mxUtils.write(u,mxResources.get("style")),f.appendChild(u),f.setAttribute("title",mxResources.get("style")),e.appendChild(f),y=e.cloneNode(!1),y.style.display=
"none",this.panels.push(new StyleFormatPanel(this,a,y)),this.container.appendChild(y),p(f,y,k++));u=document.createElement("div");mxUtils.write(u,mxResources.get("text"));w.appendChild(u);w.setAttribute("title",mxResources.get("text"));e.appendChild(w);y=e.cloneNode(!1);y.style.display="none";this.panels.push(new TextFormatPanel(this,a,y));this.container.appendChild(y);u=document.createElement("div");mxUtils.write(u,mxResources.get("arrange"));A.appendChild(u);A.setAttribute("title",mxResources.get("arrange"));
e.appendChild(A);f=e.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?p(w,y,k++):w.style.display="none";p(A,f,k++,!0)}e.className="geFormatTitleContainer"}};BaseFormatPanel=function(a,b,e){this.format=a;this.editorUi=b;this.container=e;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="transparent";
-BaseFormatPanel.prototype.installInputHandler=function(a,b,e,f,g,d,h,m,p){d=null!=d?d:"";m=null!=m?m:!1;var k=this.editorUi,u=k.editor.graph;f=null!=f?f:1;g=null!=g?g:999;var w=null,y=!1,A=null,D=mxUtils.bind(this,function(E){var F=m?parseFloat(a.value):parseInt(a.value);p&&(F=this.fromUnit(F));if(F!=A){A=F;isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(f,isNaN(F)?e:F));if(u.cellEditor.isContentEditing()&&h)y||(y=!0,null!=w&&(u.cellEditor.restoreSelection(w),
+BaseFormatPanel.prototype.installInputHandler=function(a,b,e,f,g,d,h,m,p){d=null!=d?d:"";m=null!=m?m:!1;var k=this.editorUi,u=k.editor.graph;f=null!=f?f:1;g=null!=g?g:999;var w=null,y=!1,A=null,E=mxUtils.bind(this,function(D){var F=m?parseFloat(a.value):parseInt(a.value);p&&(F=this.fromUnit(F));if(F!=A){A=F;isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(f,isNaN(F)?e:F));if(u.cellEditor.isContentEditing()&&h)y||(y=!0,null!=w&&(u.cellEditor.restoreSelection(w),
w=null),h(F),a.value=(p?this.inUnit(F):F)+d,y=!1);else if(F!=mxUtils.getValue(k.getSelectionState().style,b,e)){u.isEditing()&&u.stopEditing(!0);u.getModel().beginUpdate();try{var H=k.getSelectionState().cells;u.setCellStyles(b,F,H);b==mxConstants.STYLE_FONTSIZE&&u.updateLabelElements(H,function(N){N.removeAttribute("size");N.style.fontSize="";""==N.getAttribute("style")&&N.removeAttribute("style")});for(var M=0;M<H.length;M++)0==u.model.getChildCount(H[M])&&u.autoSizeCell(H[M],!1);k.fireEvent(new mxEventObject("styleChanged",
-"keys",[b],"values",[F],"cells",H))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(F):F)+d}mxEvent.consume(E)});h&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(E){document.activeElement==u.cellEditor.textarea&&(w=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",D);mxEvent.addListener(a,"blur",D);return D};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";return a};
+"keys",[b],"values",[F],"cells",H))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(F):F)+d}mxEvent.consume(D)});h&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(D){document.activeElement==u.cellEditor.textarea&&(w=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",E);mxEvent.addListener(a,"blur",E);return E};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";return a};
BaseFormatPanel.prototype.createTitle=function(a){var b=document.createElement("div");b.className="geFormatSectionTitle";mxUtils.write(b,a);return b};
BaseFormatPanel.prototype.addAction=function(a,b){var e=this.editorUi.actions.get(b);b=null;if(null!=e&&e.isEnabled()){b=mxUtils.button(e.getTitle(),mxUtils.bind(this,function(g){try{e.funct(g,g)}catch(d){this.editorUi.handleError(d)}}));var f=null!=e.shortcut?" ("+e.shortcut+")":"";b.setAttribute("title",e.getTitle()+f);b.style.marginBottom="2px";b.className="geFullWidthElement";a.appendChild(b)}return b};
BaseFormatPanel.prototype.addActions=function(a,b){for(var e=null,f=null,g=0,d=0;d<b.length;d++){var h=this.addAction(a,b[d]);null!=h&&(g++,0==mxUtils.mod(g,2)&&(f.style.marginRight="4px",f.style.width="104px",h.style.width="104px",e.parentNode.removeChild(e)),e=mxUtils.br(a),f=h)}return g};
-BaseFormatPanel.prototype.createStepper=function(a,b,e,f,g,d,h){function m(y,A,D){""==a.value&&(a.value=null!=d?d:A);A=h?parseFloat(a.value):parseInt(a.value);isNaN(A)||(a.value=A+y,null!=b&&b(D))}e=null!=e?e:1;var p=10*e;f=document.createElement("div");f.className="geBtnStepper";f.style.position="absolute";f.style.left="200px";var k=document.createElement("div");k.style.height="9px";k.style.backgroundImage="url("+Editor.arrowUpImage+")";k.style.width="10px";f.appendChild(k);var u=k.cloneNode(!1);
+BaseFormatPanel.prototype.createStepper=function(a,b,e,f,g,d,h){function m(y,A,E){""==a.value&&(a.value=null!=d?d:A);A=h?parseFloat(a.value):parseInt(a.value);isNaN(A)||(a.value=A+y,null!=b&&b(E))}e=null!=e?e:1;var p=10*e;f=document.createElement("div");f.className="geBtnStepper";f.style.position="absolute";f.style.left="200px";var k=document.createElement("div");k.style.height="9px";k.style.backgroundImage="url("+Editor.arrowUpImage+")";k.style.width="10px";f.appendChild(k);var u=k.cloneNode(!1);
u.style.backgroundImage="url("+Editor.arrowDownImage+")";f.appendChild(u);mxEvent.addGestureListeners(k,function(y){mxEvent.consume(y)},null,function(y){m(mxEvent.isShiftDown(y)?p:e,"0",y);mxEvent.consume(y)});mxEvent.addGestureListeners(u,function(y){mxEvent.consume(y)},null,function(y){m(-(mxEvent.isShiftDown(y)?p:e),"2",y);mxEvent.consume(y)});if(g){var w=null;mxEvent.addGestureListeners(f,function(y){mxEvent.consume(y)},null,function(y){if(null!=w){try{w.select()}catch(A){}w=null;mxEvent.consume(y)}})}else mxEvent.addListener(f,
"click",function(y){mxEvent.consume(y)});return f};
BaseFormatPanel.prototype.createOption=function(a,b,e,f,g){var d=document.createElement("div");d.className="geFormatEntry";var h=document.createElement("input");h.setAttribute("type","checkbox");d.appendChild(h);var m=document.createElement("span");m.className="geStyleLabel";m.setAttribute("title",a);mxUtils.write(m,a);d.appendChild(m);var p=!1,k=b(),u=function(w,y){p||(p=!0,w?(h.setAttribute("checked","checked"),h.defaultChecked=!0,h.checked=!0):(h.removeAttribute("checked"),h.defaultChecked=!1,
h.checked=!1),k!=w&&(k=w,b()!=k&&e(k,y)),p=!1)};mxEvent.addListener(d,"click",function(w){if("disabled"!=h.getAttribute("disabled")){var y=mxEvent.getSource(w);if(y==d||y==m)h.checked=!h.checked;u(h.checked,w)}});u(k);null!=f&&(f.install(u),this.listeners.push(f));null!=g&&g(d);return d};
BaseFormatPanel.prototype.createCellOption=function(a,b,e,f,g,d,h,m,p){var k=this.editorUi,u=k.editor.graph;f=null!=f?"null"==f?null:f:1;g=null!=g?"null"==g?null:g:0;var w=null!=p?u.getCommonStyle(p):k.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(w,b,e)!=g},function(y){m&&u.stopEditing();if(null!=h)h.funct();else{u.getModel().beginUpdate();try{var A=null!=p?p:k.getSelectionState().cells;y=y?f:g;u.setCellStyles(b,y,A);null!=d&&d(A,y);k.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[y],"cells",A))}finally{u.getModel().endUpdate()}}},{install:function(y){this.listener=function(){y(mxUtils.getValue(w,b,e)!=g)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,g,d,h,m,p,k){function u(T,O){"default"!=T||O||(T=m);"default"!=T&&p&&(T=mxUtils.getLightDarkColor(T),T=k()?T.dark:T.light);return T}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var y=this.editorUi.editor.graph,A=document.createElement("div");A.className="geFormatEntry";var D=document.createElement("input");D.setAttribute("type","checkbox");h||A.appendChild(D);var E=document.createElement("span");mxUtils.write(E,a);A.appendChild(E);var F=
+BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,g,d,h,m,p,k){function u(T,O){"default"!=T||O||(T=m);"default"!=T&&p&&(T=mxUtils.getLightDarkColor(T),T=k()?T.dark:T.light);return T}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var y=this.editorUi.editor.graph,A=document.createElement("div");A.className="geFormatEntry";var E=document.createElement("input");E.setAttribute("type","checkbox");h||A.appendChild(E);var D=document.createElement("span");mxUtils.write(D,a);A.appendChild(D);var F=
b(),H=!1,M=null,N=null,J=document.createElement("input");J.setAttribute("type","color");J.style.position="relative";J.style.visibility="hidden";J.style.top="10px";J.style.width="0px";J.style.height="0px";J.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(M=document.createElement("img"),M.src=Editor.colorDropperImage,M.className="geColorDropper geAdaptiveAsset",mxEvent.addListener(M,"click",function(T){J.value=u(F);J.click();mxEvent.consume(T)}));var V=null,W=function(T,O){H||
(H=!0,null!=d&&d(T),O||(null!=V&&(y.cellEditor.restoreSelection(V),V=null),e(T)),F=b(),T=mxUtils.getLightDarkColor("default"!=F?F:m),O=document.createElement("div"),O.style.width="21px",O.style.height="12px",O.style.margin="2px 18px 2px 3px",O.style.borderWidth="1px",O.style.borderStyle="solid",O.style.backgroundColor=T.cssText,N.innerText="",N.appendChild(O),!p&&mxUtils.isLightDarkColor(F)&&T.light!=T.dark?O.style.background="linear-gradient(to right bottom, "+T.cssText+" 50%, "+mxUtils.invertLightDarkColor(T).cssText+
-" 50.3%)":p&&w&&(O.style.backgroundColor=k()?T.dark:T.light),null!=M?(O.style.width="21px",O.style.margin="2px 18px 2px 3px",O.appendChild(M)):(O.style.width="36px",O.style.margin="3px"),null!=F&&F!=mxConstants.NONE&&1<F.length&&"string"===typeof F&&(T="#"==F.charAt(0)?F.substring(1).toUpperCase():F,T=ColorDialog.prototype.colorNames[T],null!=T?N.setAttribute("title",T):"default"==F?N.setAttribute("title",mxResources.get("useBlackAndWhite")):N.setAttribute("title",F)),y.isSpecialColor(F)?D.style.display=
-"none":(D.style.display="",null!=F&&F!=mxConstants.NONE?(D.setAttribute("checked","checked"),D.defaultChecked=!0,D.checked=!0):(D.removeAttribute("checked"),D.defaultChecked=!1,D.checked=!1)),N.style.display=D.checked||h?"":"none",H=!1)};A.appendChild(J);mxEvent.addListener(J,"change",function(){var T=J.value;if(!p){var O=mxUtils.getLightDarkColor(F);k()?O.dark=T:O.light=T;T="light-dark("+O.light+", "+O.dark+")"}W(T)});N=mxUtils.button("",mxUtils.bind(this,function(T){var O=m;p&&k()&&mxUtils.isLightDarkColor(O)&&
-(O=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(F,!0),function(fa){W(fa)},"default"==f?"default":null,O,p);mxEvent.consume(T)}));N.className="geColorBtn";N.style.display=D.checked||h?"":"none";A.appendChild(N);a=null!=F&&"string"===typeof F&&"#"==F.charAt(0)?F.substring(1).toUpperCase():F;a=ColorDialog.prototype.colorNames[a];null!=a&&N.setAttribute("title",a);h||(mxEvent.addListener(A,"click",function(T){T=mxEvent.getSource(T);if(T==D||"INPUT"!=T.nodeName)T!=D&&(D.checked=!D.checked),
-D.checked||null==F||F==mxConstants.NONE||f==mxConstants.NONE||(f=u(F)),W(D.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(D,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})),mxEvent.addGestureListeners(A,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})));W(F,!0);null!=g&&g.install(function(){W(F,!0)},this.listeners.push(g));return A};
-BaseFormatPanel.prototype.createArrayCellColorOption=function(a,b,e,f,g,d,h){var m=this.editorUi,p=m.editor.graph,k=p.getCellStyle(p.getSelectionCell(),!1);k=null!=k?null!=k[b]?k[b]:h:null;for(var u=null!=k?mxUtils.parseColorList(k):[],w=document.createElement("div"),y=0;y<u.length;y++)mxUtils.bind(this,function(A){w.appendChild(this.createColorOption(a+" ("+(A+1)+")",function(){return u[y]},function(D){p.getModel().beginUpdate();try{var E=m.getSelectionState().cells;u[A]=D;var F=u.join(",");p.setCellStyles(b,
-F,E);null!=g&&g(D);m.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",E))}finally{p.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(D){this.listener=function(){var E=p.getCellStyle(p.getSelectionCell(),!1);null!=E&&(E=null!=E?null!=E[b]?E[b]:h:null,u=null!=E?mxUtils.parseColorList(E):[],D(u[y],!0))};p.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){p.getModel().removeListener(this.listener)}},f,null,d))})(y);return w};
+" 50.3%)":p&&w&&(O.style.backgroundColor=k()?T.dark:T.light),null!=M?(O.style.width="21px",O.style.margin="2px 18px 2px 3px",O.appendChild(M)):(O.style.width="36px",O.style.margin="3px"),null!=F&&F!=mxConstants.NONE&&1<F.length&&"string"===typeof F&&(T="#"==F.charAt(0)?F.substring(1).toUpperCase():F,T=ColorDialog.prototype.colorNames[T],null!=T?N.setAttribute("title",T):"default"==F?N.setAttribute("title",mxResources.get("useBlackAndWhite")):N.setAttribute("title",F)),y.isSpecialColor(F)?E.style.display=
+"none":(E.style.display="",null!=F&&F!=mxConstants.NONE?(E.setAttribute("checked","checked"),E.defaultChecked=!0,E.checked=!0):(E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1)),N.style.display=E.checked||h?"":"none",H=!1)};A.appendChild(J);mxEvent.addListener(J,"change",function(){var T=J.value;if(!p){var O=mxUtils.getLightDarkColor(F);k()?O.dark=T:O.light=T;T="light-dark("+O.light+", "+O.dark+")"}W(T)});N=mxUtils.button("",mxUtils.bind(this,function(T){var O=m;p&&k()&&mxUtils.isLightDarkColor(O)&&
+(O=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(F,!0),function(fa){W(fa)},"default"==f?"default":null,O,p);mxEvent.consume(T)}));N.className="geColorBtn";N.style.display=E.checked||h?"":"none";A.appendChild(N);a=null!=F&&"string"===typeof F&&"#"==F.charAt(0)?F.substring(1).toUpperCase():F;a=ColorDialog.prototype.colorNames[a];null!=a&&N.setAttribute("title",a);h||(mxEvent.addListener(A,"click",function(T){T=mxEvent.getSource(T);if(T==E||"INPUT"!=T.nodeName)T!=E&&(E.checked=!E.checked),
+E.checked||null==F||F==mxConstants.NONE||f==mxConstants.NONE||(f=u(F)),W(E.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(E,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})),mxEvent.addGestureListeners(A,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})));W(F,!0);null!=g&&g.install(function(){W(F,!0)},this.listeners.push(g));return A};
+BaseFormatPanel.prototype.createArrayCellColorOption=function(a,b,e,f,g,d,h){var m=this.editorUi,p=m.editor.graph,k=p.getCellStyle(p.getSelectionCell(),!1);k=null!=k?null!=k[b]?k[b]:h:null;for(var u=null!=k?mxUtils.parseColorList(k):[],w=document.createElement("div"),y=0;y<u.length;y++)mxUtils.bind(this,function(A){w.appendChild(this.createColorOption(a+" ("+(A+1)+")",function(){return u[y]},function(E){p.getModel().beginUpdate();try{var D=m.getSelectionState().cells;u[A]=E;var F=u.join(",");p.setCellStyles(b,
+F,D);null!=g&&g(E);m.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",D))}finally{p.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(E){this.listener=function(){var D=p.getCellStyle(p.getSelectionCell(),!1);null!=D&&(D=null!=D?null!=D[b]?D[b]:h:null,u=null!=D?mxUtils.parseColorList(D):[],E(u[y],!0))};p.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){p.getModel().removeListener(this.listener)}},f,null,d))})(y);return w};
BaseFormatPanel.prototype.createCellColorOption=function(a,b,e,f,g,d,h,m){function p(){var y=u.getCellStyle(u.getSelectionCell(),!1);return null!=y?null!=y[b]?y[b]:h:null}var k=this.editorUi,u=k.editor.graph,w=p();return null!=w&&m&&1<mxUtils.parseColorList(w).length?this.createArrayCellColorOption(a,b,e,f,g,d,h):this.createColorOption(a,p,function(y){u.getModel().beginUpdate();try{var A=k.getSelectionState().cells;u.setCellStyles(b,y,A);null!=g&&g(y);k.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[y],"cells",A))}finally{u.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(y){this.listener=function(){var A=u.getCellStyle(u.getSelectionCell(),!1);null!=A&&y(null!=A[b]?A[b]:h,!0)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}},f,null,d)};
BaseFormatPanel.prototype.addArrow=function(a){var b=document.createElement("div");b.className="geAdaptiveAsset geArrow";b.style.backgroundImage="url("+Editor.thinExpandImage+")";a.className="geStyleBtn";a.appendChild(b);return b};
@@ -3105,44 +3109,44 @@ BaseFormatPanel.prototype.getUnit=function(a){var b="";switch(this.editorUi.edit
BaseFormatPanel.prototype.fromUnit=function(a){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return a;case mxConstants.INCHES:return a*mxConstants.PIXELS_PER_INCH;case mxConstants.MILLIMETERS:return a*mxConstants.PIXELS_PER_MM;case mxConstants.METERS:return a*mxConstants.PIXELS_PER_MM*1E3}};BaseFormatPanel.prototype.isFloatUnit=function(){return this.editorUi.editor.graph.view.unit!=mxConstants.POINTS};
BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return 1;case mxConstants.INCHES:return.1;case mxConstants.MILLIMETERS:return.5;case mxConstants.METERS:return.001}};
ArrangePanel.prototype.addGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=f.getModel(),d=e.getSelectionState(),h=this.createPanel();h.style.height="60px";var m=document.createElement("div");m.className="geStyleLabel";m.style.position="absolute";m.style.fontWeight="bold";m.style.marginTop="4px";m.style.maxWidth="50px";mxUtils.write(m,mxResources.get("size"));h.appendChild(m);var p=this.addUnitInput(h,this.getUnit(),87,52,function(){A.apply(this,arguments)},this.getUnitStep(),null,
-null,this.isFloatUnit()),k=this.addUnitInput(h,this.getUnit(),16,52,function(){D.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());m=document.createElement("div");m.style.backgroundImage="url("+Editor.autosizeImage+")";m.className="geButton";m.style.margin="0";m.style.width="21px";m.style.height="21px";m.style.left="52px";mxUtils.setOpacity(m,50);mxEvent.addListener(m,"click",function(){e.actions.get("autosize").funct()});h.appendChild(m);d.row?(p.style.visibility="hidden",p.nextSibling.style.visibility=
+null,this.isFloatUnit()),k=this.addUnitInput(h,this.getUnit(),16,52,function(){E.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());m=document.createElement("div");m.style.backgroundImage="url("+Editor.autosizeImage+")";m.className="geButton";m.style.margin="0";m.style.width="21px";m.style.height="21px";m.style.left="52px";mxUtils.setOpacity(m,50);mxEvent.addListener(m,"click",function(){e.actions.get("autosize").funct()});h.appendChild(m);d.row?(p.style.visibility="hidden",p.nextSibling.style.visibility=
"hidden"):this.addLabel(h,mxResources.get("width"),87,64).style.marginTop="0px";this.addLabel(h,mxResources.get("height"),16,64).style.marginTop="0px";mxUtils.br(h);var u=document.createElement("div");u.className="geFormatEntry";u.style.marginTop="14px";var w=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");w.className="geFullWidthElement";u.appendChild(w);d.cell||d.row?m.style.visibility="hidden":h.appendChild(u);var y=w.getElementsByTagName("input")[0];
-this.addKeyHandler(p,W);this.addKeyHandler(k,W);var A=this.addGeometryHandler(p,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));if(f.isTableCell(Y))return f.setTableColumnWidth(Y,aa-S.width,!0),!0;0<S.width&&(y.checked&&(S.height=Math.round(S.height*aa*100/S.width)/100),S.width=aa)});var D=this.addGeometryHandler(k,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));f.isTableCell(Y)&&(Y=g.getParent(Y));if(f.isTableRow(Y))return f.setTableRowHeight(Y,aa-S.height),!0;0<S.height&&(y.checked&&(S.width=Math.round(S.width*
-aa*100/S.height)/100),S.height=aa)});(d.resizable||d.row||d.cell)&&a.appendChild(h);var E=this.createPanel();E.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));E.appendChild(m);var F=this.addUnitInput(E,this.getUnit(),87,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),H=this.addUnitInput(E,this.getUnit(),16,
-52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(E);u=!0;var M=null,N=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var J=f.getCellGeometry(d.vertices[0]);if(null!=J&&J.relative){mxUtils.br(E);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));E.appendChild(m);M=this.addGenericInput(E," %",87,52,function(){return Math.round(1E3*J.x)/
-10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=J.clone(),J.x=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});if(g.isEdge(g.getParent(d.vertices[0]))){u=!1;var V=null;N=this.addUnitInput(E,this.getUnit(),16,52,function(){V.apply(this,arguments)});V=this.addGeometryHandler(N,function(S,aa){S.y=b.fromUnit(aa)})}else N=this.addGenericInput(E," %",16,52,function(){return Math.round(1E3*J.y)/10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=
-J.clone(),J.y=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});mxUtils.br(E)}}a.appendChild(E)}this.addLabel(E,mxResources.get(u?"left":"line"),87,64);this.addLabel(E,mxResources.get(u?"top":"orthogonal"),16,64);var W=mxUtils.bind(this,function(S,aa,Y){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(Y||document.activeElement!=p)p.value=this.inUnit(d.width)+
-" "+this.getUnit();if(Y||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){S=f.getCellGeometry(d.vertices[0]);E.style.display="";if(Y||document.activeElement!=F)F.value=this.inUnit(d.x)+" "+this.getUnit();if(Y||document.activeElement!=H)H.value=this.inUnit(d.y)+" "+this.getUnit();null!=S&&S.relative&&(null==M||!Y&&document.activeElement==M||(M.value=Math.round(1E3*S.x)/10+" %"),null==N||
-!Y&&document.activeElement==N||(g.isEdge(g.getParent(d.vertices[0]))?N.value=this.inUnit(S.y)+" "+this.getUnit():N.value=Math.round(1E3*S.y)/10+" %"))}else E.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(W)}});g.addListener(mxEvent.CHANGE,W);this.addKeyHandler(F,W);this.addKeyHandler(H,W);W();var T=this.addGeometryHandler(F,function(S,aa){aa=b.fromUnit(aa);S.relative?(S.offset=null!=S.offset?S.offset:new mxPoint,S.offset.x=aa):S.x=aa});var O=this.addGeometryHandler(H,
+this.addKeyHandler(p,W);this.addKeyHandler(k,W);var A=this.addGeometryHandler(p,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));if(f.isTableCell(Y))return f.setTableColumnWidth(Y,aa-S.width,!0),!0;0<S.width&&(y.checked&&(S.height=Math.round(S.height*aa*100/S.width)/100),S.width=aa)});var E=this.addGeometryHandler(k,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));f.isTableCell(Y)&&(Y=g.getParent(Y));if(f.isTableRow(Y))return f.setTableRowHeight(Y,aa-S.height),!0;0<S.height&&(y.checked&&(S.width=Math.round(S.width*
+aa*100/S.height)/100),S.height=aa)});(d.resizable||d.row||d.cell)&&a.appendChild(h);var D=this.createPanel();D.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));D.appendChild(m);var F=this.addUnitInput(D,this.getUnit(),87,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),H=this.addUnitInput(D,this.getUnit(),16,
+52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(D);u=!0;var M=null,N=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var J=f.getCellGeometry(d.vertices[0]);if(null!=J&&J.relative){mxUtils.br(D);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));D.appendChild(m);M=this.addGenericInput(D," %",87,52,function(){return Math.round(1E3*J.x)/
+10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=J.clone(),J.x=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});if(g.isEdge(g.getParent(d.vertices[0]))){u=!1;var V=null;N=this.addUnitInput(D,this.getUnit(),16,52,function(){V.apply(this,arguments)});V=this.addGeometryHandler(N,function(S,aa){S.y=b.fromUnit(aa)})}else N=this.addGenericInput(D," %",16,52,function(){return Math.round(1E3*J.y)/10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=
+J.clone(),J.y=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});mxUtils.br(D)}}a.appendChild(D)}this.addLabel(D,mxResources.get(u?"left":"line"),87,64);this.addLabel(D,mxResources.get(u?"top":"orthogonal"),16,64);var W=mxUtils.bind(this,function(S,aa,Y){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(Y||document.activeElement!=p)p.value=this.inUnit(d.width)+
+" "+this.getUnit();if(Y||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){S=f.getCellGeometry(d.vertices[0]);D.style.display="";if(Y||document.activeElement!=F)F.value=this.inUnit(d.x)+" "+this.getUnit();if(Y||document.activeElement!=H)H.value=this.inUnit(d.y)+" "+this.getUnit();null!=S&&S.relative&&(null==M||!Y&&document.activeElement==M||(M.value=Math.round(1E3*S.x)/10+" %"),null==N||
+!Y&&document.activeElement==N||(g.isEdge(g.getParent(d.vertices[0]))?N.value=this.inUnit(S.y)+" "+this.getUnit():N.value=Math.round(1E3*S.y)/10+" %"))}else D.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(W)}});g.addListener(mxEvent.CHANGE,W);this.addKeyHandler(F,W);this.addKeyHandler(H,W);W();var T=this.addGeometryHandler(F,function(S,aa){aa=b.fromUnit(aa);S.relative?(S.offset=null!=S.offset?S.offset:new mxPoint,S.offset.x=aa):S.x=aa});var O=this.addGeometryHandler(H,
function(S,aa){aa=b.fromUnit(aa);S.relative?(S.offset=null!=S.offset?S.offset:new mxPoint,S.offset.y=aa):S.y=aa});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))&&(J=f.getCellGeometry(d.vertices[0]),null!=J&&J.relative)){var fa=document.createElement("select");fa.style.position="absolute";fa.style.width="134px";fa.style.left="77px";m=document.createElement("option");m.setAttribute("value","none");m.setAttribute("title",mxResources.get("move"));mxUtils.write(m,
mxResources.get("move")+"...");fa.appendChild(m);m=document.createElement("option");m.setAttribute("value","start");m.setAttribute("title",mxResources.get("linestart"));mxUtils.write(m,mxResources.get("linestart"));fa.appendChild(m);m=document.createElement("option");m.setAttribute("value","center");m.setAttribute("title",mxResources.get("center"));mxUtils.write(m,mxResources.get("center"));fa.appendChild(m);m=document.createElement("option");m.setAttribute("value","end");m.setAttribute("title",mxResources.get("lineend"));
-mxUtils.write(m,mxResources.get("lineend"));fa.appendChild(m);mxEvent.addListener(fa,"change",function(S){if("none"!=fa.value){g.beginUpdate();try{J=J.clone(),J.x="start"==fa.value?-1:"end"==fa.value?1:0,J.y=0,J.offset=new mxPoint,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}fa.value="none"});mxUtils.br(E);mxUtils.br(E);E.appendChild(fa)}a.appendChild(E)}};
+mxUtils.write(m,mxResources.get("lineend"));fa.appendChild(m);mxEvent.addListener(fa,"change",function(S){if("none"!=fa.value){g.beginUpdate();try{J=J.clone(),J.x="start"==fa.value?-1:"end"==fa.value?1:0,J.y=0,J.offset=new mxPoint,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}fa.value="none"});mxUtils.br(D);mxUtils.br(D);D.appendChild(fa)}a.appendChild(D)}};
ArrangePanel.prototype.addGeometryHandler=function(a,b){function e(m){if(""!=a.value){var p=parseFloat(a.value);if(isNaN(p))a.value=d+" "+h.getUnit();else if(p!=d){g.getModel().beginUpdate();try{for(var k=f.getSelectionState().cells,u=0;u<k.length;u++)if(g.getModel().isVertex(k[u])){var w=g.getCellGeometry(k[u]);if(null!=w&&(w=w.clone(),!b(w,p,k[u]))){var y=g.view.getState(k[u]);null!=y&&g.isRecursiveVertexResize(y)&&g.resizeChildCells(k[u],w);g.getModel().setGeometry(k[u],w);g.constrainChildCells(k[u])}}}finally{g.getModel().endUpdate()}d=
p;a.value=p+" "+h.getUnit()}}mxEvent.consume(m)}var f=this.editorUi,g=f.editor.graph,d=null,h=this;mxEvent.addListener(a,"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function e(h){if(""!=a.value){var m=parseFloat(a.value);if(isNaN(m))a.value=d+" pt";else if(m!=d){g.getModel().beginUpdate();try{for(var p=f.getSelectionState().cells,k=0;k<p.length;k++)if(g.getModel().isEdge(p[k])){var u=g.getCellGeometry(p[k]);null!=u&&(u=u.clone(),b(u,m),g.getModel().setGeometry(p[k],u))}}finally{g.getModel().endUpdate()}d=m;a.value=m+" pt"}}mxEvent.consume(h)}var f=this.editorUi,g=f.editor.graph,d=null;mxEvent.addListener(a,
"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
-ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=this.createPanel(),h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));d.appendChild(h);var m=this.addUnitInput(d,"pt",12,44,function(){p.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,E);var p=mxUtils.bind(this,function(J){var V=parseInt(m.value);
+ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=this.createPanel(),h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));d.appendChild(h);var m=this.addUnitInput(d,"pt",12,44,function(){p.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,D);var p=mxUtils.bind(this,function(J){var V=parseInt(m.value);
V=Math.min(999,Math.max(1,isNaN(V)?1:V));if(V!=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var W=e.getSelectionState().cells;f.setCellStyles("width",V,W);e.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[V],"cells",W))}m.value=V+" pt";mxEvent.consume(J)});mxEvent.addListener(m,"blur",p);mxEvent.addListener(m,"change",p);a.appendChild(d);var k=this.createPanel();k.style.paddingBottom="30px";h=document.createElement("div");h.style.position=
"absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("linestart"));k.appendChild(h);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){F.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),w=this.addUnitInput(k,this.getUnit(),16,52,function(){H.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),87,64);this.addLabel(k,mxResources.get("top"),16,64);a.appendChild(k);
-this.addKeyHandler(u,E);this.addKeyHandler(w,E);var y=this.createPanel();y.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("lineend"));y.appendChild(h);var A=this.addUnitInput(y,this.getUnit(),87,52,function(){M.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),D=this.addUnitInput(y,this.getUnit(),16,52,function(){N.apply(this,arguments)},this.getUnitStep(),null,
-null,this.isFloatUnit());mxUtils.br(y);this.addLabel(y,mxResources.get("left"),87,64);this.addLabel(y,mxResources.get("top"),16,64);a.appendChild(y);this.addKeyHandler(A,E);this.addKeyHandler(D,E);var E=mxUtils.bind(this,function(J,V,W){g=e.getSelectionState();J=g.cells[0];if("link"==g.style.shape||"flexArrow"==g.style.shape){if(d.style.display="",W||document.activeElement!=m)W=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=W+" pt"}else d.style.display=
-"none";1==g.cells.length&&f.model.isEdge(J)?(W=f.model.getGeometry(J),null!=W&&null!=W.sourcePoint&&null==f.model.getTerminal(J,!0)?(u.value=this.inUnit(W.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(W.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=W&&null!=W.targetPoint&&null==f.model.getTerminal(J,!1)?(A.value=this.inUnit(W.targetPoint.x)+" "+this.getUnit(),D.value=this.inUnit(W.targetPoint.y)+" "+this.getUnit()):y.style.display="none"):(k.style.display="none",y.style.display=
-"none")});var F=this.addEdgeGeometryHandler(u,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.x=b.fromUnit(V))});var H=this.addEdgeGeometryHandler(w,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.y=b.fromUnit(V))});var M=this.addEdgeGeometryHandler(A,function(J,V){null!=J.targetPoint&&(J.targetPoint.x=b.fromUnit(V))});var N=this.addEdgeGeometryHandler(D,function(J,V){null!=J.targetPoint&&(J.targetPoint.y=b.fromUnit(V))});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});
-E()};TextFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.appendChild(this.addFont(this.createPanel()));this.container.appendChild(this.addFontOps(this.createPanel()))};TextFormatPanel.prototype.addFontOps=function(a){0==this.addActions(a,["removeFormat"])&&(a.style.display="none");return a};
+this.addKeyHandler(u,D);this.addKeyHandler(w,D);var y=this.createPanel();y.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("lineend"));y.appendChild(h);var A=this.addUnitInput(y,this.getUnit(),87,52,function(){M.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),E=this.addUnitInput(y,this.getUnit(),16,52,function(){N.apply(this,arguments)},this.getUnitStep(),null,
+null,this.isFloatUnit());mxUtils.br(y);this.addLabel(y,mxResources.get("left"),87,64);this.addLabel(y,mxResources.get("top"),16,64);a.appendChild(y);this.addKeyHandler(A,D);this.addKeyHandler(E,D);var D=mxUtils.bind(this,function(J,V,W){g=e.getSelectionState();J=g.cells[0];if("link"==g.style.shape||"flexArrow"==g.style.shape){if(d.style.display="",W||document.activeElement!=m)W=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=W+" pt"}else d.style.display=
+"none";1==g.cells.length&&f.model.isEdge(J)?(W=f.model.getGeometry(J),null!=W&&null!=W.sourcePoint&&null==f.model.getTerminal(J,!0)?(u.value=this.inUnit(W.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(W.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=W&&null!=W.targetPoint&&null==f.model.getTerminal(J,!1)?(A.value=this.inUnit(W.targetPoint.x)+" "+this.getUnit(),E.value=this.inUnit(W.targetPoint.y)+" "+this.getUnit()):y.style.display="none"):(k.style.display="none",y.style.display=
+"none")});var F=this.addEdgeGeometryHandler(u,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.x=b.fromUnit(V))});var H=this.addEdgeGeometryHandler(w,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.y=b.fromUnit(V))});var M=this.addEdgeGeometryHandler(A,function(J,V){null!=J.targetPoint&&(J.targetPoint.x=b.fromUnit(V))});var N=this.addEdgeGeometryHandler(E,function(J,V){null!=J.targetPoint&&(J.targetPoint.y=b.fromUnit(V))});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});
+D()};TextFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.appendChild(this.addFont(this.createPanel()));this.container.appendChild(this.addFontOps(this.createPanel()))};TextFormatPanel.prototype.addFontOps=function(a){0==this.addActions(a,["removeFormat"])&&(a.style.display="none");return a};
TextFormatPanel.prototype.addFont=function(a){function b(q){q=null!=q?q.fontSize:null;return null!=q&&"px"==q.substring(q.length-2)?parseFloat(q):mxConstants.DEFAULT_FONTSIZE}function e(q,B){if(null!=q&&""!=q.textContent){q.style.lineHeight="";var C=mxUtils.getCurrentStyle(q);parseFloat(C.fontSize)*B/100!=parseFloat(C.lineHeight)?q.style.lineHeight=B+"%":""==q.getAttribute("style")&&q.removeAttribute("style")}}function f(q,B){B?q.classList.add("geActiveItem"):q.classList.remove("geActiveItem")}var g=
this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=this.createTitle(mxResources.get("font"));a.appendChild(m);m=this.createPanel();m.className="geFormatEntry";if(d.cellEditor.isContentEditing()){var p=m.cloneNode(),k=g.toolbar.addMenu(g.menus.get("formatBlock"),mxResources.get("style"),null,p);this.addArrow(k);k.style.margin="0px";k.style.position="relative";k.classList.add("geFullWidthElement");a.appendChild(p)}k=m.cloneNode(!1);a.appendChild(k);p=this.createPanel();var u=g.toolbar.addMenu(g.menus.get("fontFamily"),
"Helvetica",null,k);this.addArrow(u);u.style.margin="0px";u.style.position="relative";u.classList.add("geFullWidthElement");"inherit"==h.style[mxConstants.STYLE_FONTFAMILY]&&(k.style.display="none");k=m.cloneNode(!1);var w=g.toolbar.addItems(["bold","italic","underline"],k,!0,[Editor.boldImage,Editor.italicImage,Editor.underlineImage]);w[0].setAttribute("title",mxResources.get("bold")+" ("+g.actions.get("bold").shortcut+")");w[1].setAttribute("title",mxResources.get("italic")+" ("+g.actions.get("italic").shortcut+
-")");w[2].setAttribute("title",mxResources.get("underline")+" ("+g.actions.get("underline").shortcut+")");var y=g.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);var A=m.cloneNode(!1),D=function(q){return function(){return q()}},E=g.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",
-[mxConstants.ALIGN_LEFT],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),A),F=g.addButton(Editor.alignCenterImage,mxResources.get("center"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),
-A),H=g.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),A);d.cellEditor.isContentEditing()&&(V=g.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",
-!1,null)},k));var M=g.addButton(Editor.alignTopImage,mxResources.get("top"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),A),N=g.addButton(Editor.alignMiddleImage,mxResources.get("middle"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),A),J=g.addButton(Editor.alignBottomImage,mxResources.get("bottom"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),
+")");w[2].setAttribute("title",mxResources.get("underline")+" ("+g.actions.get("underline").shortcut+")");var y=g.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);var A=m.cloneNode(!1),E=function(q){return function(){return q()}},D=g.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",
+[mxConstants.ALIGN_LEFT],"cells",h.cells))}:E(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),A),F=g.addButton(Editor.alignCenterImage,mxResources.get("center"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",h.cells))}:E(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),
+A),H=g.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",h.cells))}:E(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),A);d.cellEditor.isContentEditing()&&(V=g.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",
+!1,null)},k));var M=g.addButton(Editor.alignTopImage,mxResources.get("top"),E(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),A),N=g.addButton(Editor.alignMiddleImage,mxResources.get("middle"),E(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),A),J=g.addButton(Editor.alignBottomImage,mxResources.get("bottom"),E(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),
A);a.appendChild(A);var V,W,T,O;if(d.cellEditor.isContentEditing()){M.style.display="none";N.style.display="none";J.style.display="none";y.style.display="none";var fa=g.addButton(Editor.alignJustifyImage,mxResources.get("block"),function(){document.execCommand("justifyfull",!1,null)},A);fa.style.marginRight="9px";var S=g.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},A);S.style.marginLeft="10px";var aa=g.addButton(Editor.superscriptImage,
-mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},A);S.style.marginLeft="10px";D=A.cloneNode(!1);D.style.paddingTop="4px";A=[g.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},D),g.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},D),g.addButton(Editor.indentImage,mxResources.get("increaseIndent"),
-function(){document.execCommand("indent",!1,null)},D),g.addButton(Editor.outdentImage,mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},D),g.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},D),g.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},D)];A[A.length-2].style.marginLeft="10px";a.appendChild(D)}else w[2].style.marginRight="12px",H.style.marginRight=
+mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},A);S.style.marginLeft="10px";E=A.cloneNode(!1);E.style.paddingTop="4px";A=[g.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},E),g.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},E),g.addButton(Editor.indentImage,mxResources.get("increaseIndent"),
+function(){document.execCommand("indent",!1,null)},E),g.addButton(Editor.outdentImage,mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},E),g.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},E),g.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},E)];A[A.length-2].style.marginLeft="10px";a.appendChild(E)}else w[2].style.marginRight="12px",H.style.marginRight=
"12px";A=m.cloneNode(!1);mxUtils.write(A,mxResources.get("position"));var Y=document.createElement("select");Y.style.left="114px";Y.style.width="98px";var ba="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),L={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,
mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,
-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(D=0;D<ba.length;D++){var U=document.createElement("option");U.setAttribute("value",ba[D]);mxUtils.write(U,mxResources.get(ba[D]));Y.appendChild(U)}A.appendChild(Y);ba=A.cloneNode(!1);mxUtils.write(ba,mxResources.get("writingDirection"));var X=Y.cloneNode(!1);U=["automatic","leftToRight","rightToLeft"];h.html&&(U.push("vertical-leftToRight"),
-U.push("vertical-rightToLeft"));var ia={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(D=0;D<U.length;D++){var ja=document.createElement("option");ja.setAttribute("value",U[D]);"vertical-"==U[D].substring(0,9)?mxUtils.write(ja,mxResources.get("vertical")+" ("+mxResources.get(U[D].substring(9))+")"):mxUtils.write(ja,mxResources.get(U[D]));
+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(E=0;E<ba.length;E++){var U=document.createElement("option");U.setAttribute("value",ba[E]);mxUtils.write(U,mxResources.get(ba[E]));Y.appendChild(U)}A.appendChild(Y);ba=A.cloneNode(!1);mxUtils.write(ba,mxResources.get("writingDirection"));var X=Y.cloneNode(!1);U=["automatic","leftToRight","rightToLeft"];h.html&&(U.push("vertical-leftToRight"),
+U.push("vertical-rightToLeft"));var ia={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(E=0;E<U.length;E++){var ja=document.createElement("option");ja.setAttribute("value",U[E]);"vertical-"==U[E].substring(0,9)?mxUtils.write(ja,mxResources.get("vertical")+" ("+mxResources.get(U[E].substring(9))+")"):mxUtils.write(ja,mxResources.get(U[E]));
X.appendChild(ja)}ba.appendChild(X);d.isEditing()||(a.appendChild(A),mxEvent.addListener(Y,"change",function(q){d.getModel().beginUpdate();try{var B=L[Y.value];null!=B&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,B[0],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,B[1],h.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,B[2],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,B[3],h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(q)}),a.appendChild(ba),mxEvent.addListener(X,
"change",function(q){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,ia[X.value],h.cells);mxEvent.consume(q)}));var ta=document.createElement("input");ta.style.position="absolute";ta.style.left="146px";ta.style.width="52px";k.appendChild(ta);A=this.installInputHandler(ta,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," "+Editor.fontSizeUnit,function(q){if(null!=d.getSelectedEditingElement()){ta.value=q+" "+Editor.fontSizeUnit;document.execCommand("fontSize",!1,"1");for(var B=d.cellEditor.textarea.getElementsByTagName("font"),
C=0;C<B.length;C++)if("1"==B[C].getAttribute("size")){B[C].removeAttribute("size");B[C].style.fontSize="";var G=mxUtils.getCurrentStyle(B[C]);q!=b(G)?B[C].style.fontSize=q+"px":""==B[C].getAttribute("style")&&B[C].removeAttribute("style")}}},!0);A=this.createStepper(ta,A,1,!0,Menus.prototype.defaultFontSize);A.style.display=ta.style.display;A.style.left="198px";"inherit"==h.style[mxConstants.STYLE_FONTSIZE]&&(ta.style.display="none",A.style.display="none");k.appendChild(A);var ca=null,P=d.shapeBackgroundColor,
@@ -3152,7 +3156,7 @@ da=null,ma=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundC
h.cells)))},"default",{install:function(q){da=q},destroy:function(){da=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(q){oa.style.display=q==mxConstants.NONE?"none":"";za.style.display=oa.style.display},function(q){q==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",h.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,
null,h.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,q,h.cells);d.updateLabelElements(h.cells,function(B){B.removeAttribute("color");B.style.color=null})},d.shapeForegroundColor);"inherit"==h.style[mxConstants.STYLE_FONTCOLOR]&&(k.style.display="none");k.style.fontWeight="bold";p.appendChild(k);p.appendChild(oa);k=this.createCellOption(mxResources.get("shadow"),mxConstants.STYLE_TEXT_SHADOW,0);k.style.width="100%";k.style.fontWeight="bold";Editor.enableShadowOption||(k.getElementsByTagName("input")[0].setAttribute("disabled",
"disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(p.appendChild(za),p.appendChild(k));a.appendChild(p);p=this.createPanel();p.style.paddingTop="2px";p.style.paddingBottom="4px";A=d.filterSelectionCells(mxUtils.bind(this,function(q){var B=d.view.getState(q);return null==B||d.getModel().isEdge(q)||d.isAutoSizeState(B)}));k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,A);k.style.fontWeight="bold";0<A.length&&p.appendChild(k);
-A=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,g.actions.get("formattedText"));A.style.fontWeight="bold";p.appendChild(A);D=d.view.getState(d.getSelectionCell());(A="1"==mxUtils.getValue(h.style,"html",0))&&(1<d.getSelectionCount()&&"1"==h.style.convertToSvg||1==d.getSelectionCount()&&null!=D&&null!=D.text&&null!=D.text.node&&0==D.text.node.getElementsByTagName("foreignObject").length)&&(k.style.opacity="0.5",k.getElementsByTagName("input")[0].setAttribute("disabled",
+A=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,g.actions.get("formattedText"));A.style.fontWeight="bold";p.appendChild(A);E=d.view.getState(d.getSelectionCell());(A="1"==mxUtils.getValue(h.style,"html",0))&&(1<d.getSelectionCount()&&"1"==h.style.convertToSvg||1==d.getSelectionCount()&&null!=E&&null!=E.text&&null!=E.text.node&&0==E.text.node.getElementsByTagName("foreignObject").length)&&(k.style.opacity="0.5",k.getElementsByTagName("input")[0].setAttribute("disabled",
"disabled"));k=this.createCellOption(mxResources.get("lblToSvg"),"convertToSvg","0");k.style.fontWeight="bold";p.appendChild(k);A||(k.style.opacity="0.5",k.getElementsByTagName("input")[0].setAttribute("disabled","disabled"));if(!g.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)k.getElementsByTagName("span")[0].style.maxWidth="172px",k.appendChild(g.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/5165"));k=this.createPanel();k.style.height="86px";A=document.createElement("div");
A.style.position="absolute";A.style.width="70px";A.style.marginTop="0px";A.style.fontWeight="bold";mxUtils.write(A,mxResources.get("spacing"));k.appendChild(A);var Aa=this.addUnitInput(k,this.getUnit(),87,52,function(){eb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ma=this.addUnitInput(k,this.getUnit(),16,52,function(){bb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),
16,64);mxUtils.br(k);mxUtils.br(k);var Pa=this.addUnitInput(k,this.getUnit(),158,52,function(){ab.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ka=this.addUnitInput(k,this.getUnit(),87,52,function(){fb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ja=this.addUnitInput(k,this.getUnit(),16,52,function(){qb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,
@@ -3166,8 +3170,8 @@ function(q){if(null!=W){var B=W.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*
"1"),G.style.border="1px solid "+C,G.style.borderCollapse="collapse")})}}),m),g.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(q){if(null!=W){var B=W.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(C,G,K,Q){return"#"+("0"+Number(G).toString(16)).substr(-2)+("0"+Number(K).toString(16)).substr(-2)+("0"+Number(Q).toString(16)).substr(-2)});g.pickColor(B,function(C){var G=null==T||null!=q&&mxEvent.isShiftDown(q)?
W:T;d.processElements(G,function(K){K.style.backgroundColor=null});G.style.backgroundColor=null==C||C==mxConstants.NONE?"":C})}}),m),g.addButton(Editor.spacingImage,mxResources.get("spacing"),function(){if(null!=W){var q=W.getAttribute("cellPadding")||0;q=new FilenameDialog(g,q,mxResources.get("apply"),mxUtils.bind(this,function(B){null!=B&&0<B.length?W.setAttribute("cellPadding",B):W.removeAttribute("cellPadding")}),mxResources.get("spacing"));g.showDialog(q.container,300,80,!0,!0);q.init()}},m),
g.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=W&&W.setAttribute("align","left")},m),g.addButton(Editor.alignCenterImage,mxResources.get("center"),function(){null!=W&&W.setAttribute("align","center")},m),g.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=W&&W.setAttribute("align","right")},m)];A[2].style.marginRight="10px";p.appendChild(m);a.appendChild(p);var Wa=p}else a.appendChild(p),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),
-mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(D=0;3>D;D++)(function(q){mxEvent.addListener(w[q],"click",function(){f(w[q],""==w[q].style.backgroundImage)})})(D);var Xa=mxUtils.bind(this,function(q,B,C){h=g.getSelectionState();q=mxUtils.getValue(h.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.toolbar.setMenuText(u,
-mxUtils.getValue(h.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));f(y,"0"==mxUtils.getValue(h.style,mxConstants.STYLE_HORIZONTAL,"1"));if(C||document.activeElement!=ta)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ta.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(E,q==mxConstants.ALIGN_LEFT);f(F,q==mxConstants.ALIGN_CENTER);f(H,q==mxConstants.ALIGN_RIGHT);
+mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(E=0;3>E;E++)(function(q){mxEvent.addListener(w[q],"click",function(){f(w[q],""==w[q].style.backgroundImage)})})(E);var Xa=mxUtils.bind(this,function(q,B,C){h=g.getSelectionState();q=mxUtils.getValue(h.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.toolbar.setMenuText(u,
+mxUtils.getValue(h.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));f(y,"0"==mxUtils.getValue(h.style,mxConstants.STYLE_HORIZONTAL,"1"));if(C||document.activeElement!=ta)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ta.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(D,q==mxConstants.ALIGN_LEFT);f(F,q==mxConstants.ALIGN_CENTER);f(H,q==mxConstants.ALIGN_RIGHT);
q=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);f(M,q==mxConstants.ALIGN_TOP);f(N,q==mxConstants.ALIGN_MIDDLE);f(J,q==mxConstants.ALIGN_BOTTOM);q=mxUtils.getValue(h.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);B=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);Y.value=q==mxConstants.ALIGN_LEFT&&B==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&B==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&
B==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&B==mxConstants.ALIGN_BOTTOM?"bottomLeft":q==mxConstants.ALIGN_CENTER&&B==mxConstants.ALIGN_BOTTOM?"bottom":q==mxConstants.ALIGN_RIGHT&&B==mxConstants.ALIGN_BOTTOM?"bottomRight":q==mxConstants.ALIGN_LEFT?"left":q==mxConstants.ALIGN_RIGHT?"right":"center";q=mxUtils.getValue(h.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);q==mxConstants.TEXT_DIRECTION_RTL?X.value="rightToLeft":q==mxConstants.TEXT_DIRECTION_LTR?
X.value="leftToRight":q!=mxConstants.TEXT_DIRECTION_AUTO&&h.html?q==mxConstants.TEXT_DIRECTION_VERTICAL_LR?X.value="vertical-leftToRight":q==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(X.value="vertical-rightToLeft"):X.value="automatic";if(C||document.activeElement!=Ma)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING,2)),Ma.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(C||document.activeElement!=Aa)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_TOP,0)),Aa.value=
@@ -3178,8 +3182,8 @@ window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement
d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(xa).display)return xa;xa=xa.parentNode}return null},K=mxUtils.getCurrentStyle(q),Q=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,Z=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(K);if(window.getSelection)for(var ka=q.getElementsByTagName("*"),ha=window.getSelection(),la=0;la<ka.length&&(!ha.containsNode(ka[la],!0)||null==ka[la].style||(null==Z&&""!=ka[la].style.fontSize&&(Z=parseFloat(ka[la].style.fontSize)),
null==Q&&""!=ka[la].style.lineHeight&&(Q=ka[la].style.lineHeight),null==Z||null==Q));la++);null==Z&&(Z=b(K));if(null==Q)for(ka=q;null!=ka&&ka!=d.cellEditor.textarea.parentNode;){if(null!=ka.style&&""!=ka.style.lineHeight){Q=ka.style.lineHeight;break}ka=ka.parentNode}if(null!=K){f(w[0],"bold"==K.fontWeight||400<K.fontWeight||C("B")||C("STRONG"));f(w[1],"italic"==K.fontStyle||C("I")||C("EM"));f(w[2],"underline"==K.textDecorationLine||C("U"));f(V,"line-through"==K.textDecorationLine||C("STRIKE"));f(aa,
C("SUP"));f(S,C("SUB"));var ya=G(q);if(null!=ya){C=function(xa,Ga){Ha.push({name:xa,dispName:Ga,type:"string",getValue:function(){return La[xa]},valueChanged:function(va,ua){var Sa=ya.style,Qa=va;parseInt(Qa)==Qa&&(Qa+="px",null!=ua&&(ua.value=Qa));Sa[xa]=Qa;""==va&&null!=ua&&(ua.value=La[xa])}})};var La=mxUtils.getCurrentStyle(ya),Ha=[];C("paddingTop","Padding Top");C("paddingRight","Padding Right");C("paddingLeft","Padding Left");C("paddingBottom","Padding Bottom");C("marginTop","Margin Top");C("marginRight",
-"Margin Right");C("marginLeft","Margin Left");C("marginBottom","Margin Bottom");C=this.createPanel();this.addProperties(C,Ha,h,!0);null!=hb?hb.parentNode.replaceChild(C,hb):a.appendChild(C);hb=C}d.cellEditor.isTableSelected()?(f(fa,B(K.textAlign,"justify")),f(E,B(K.textAlign,"left")),f(F,B(K.textAlign,"center")),f(H,B(K.textAlign,"right"))):(C=d.cellEditor.align||mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),B(K.textAlign,"justify")?(f(fa,B(K.textAlign,"justify")),f(E,
-!1),f(F,!1),f(H,!1)):(f(fa,!1),f(E,C==mxConstants.ALIGN_LEFT),f(F,C==mxConstants.ALIGN_CENTER),f(H,C==mxConstants.ALIGN_RIGHT)));W=d.getParentByName(q,"TABLE",d.cellEditor.textarea);O=null==W?null:d.getParentByName(q,"TR",W);T=null==W?null:d.getParentByNames(q,["TD","TH"],W);Wa.style.display=null!=W?"":"none";document.activeElement!=ta&&(ta.value=isNaN(Z)?"":Z+" "+Editor.fontSizeUnit,"string"===typeof Q&&0<Q.indexOf("%")?Da.value=Q.replace("%"," %"):(B=parseFloat(Q),isNaN(B)?Da.value="120 %":Da.value=
+"Margin Right");C("marginLeft","Margin Left");C("marginBottom","Margin Bottom");C=this.createPanel();this.addProperties(C,Ha,h,!0);null!=hb?hb.parentNode.replaceChild(C,hb):a.appendChild(C);hb=C}d.cellEditor.isTableSelected()?(f(fa,B(K.textAlign,"justify")),f(D,B(K.textAlign,"left")),f(F,B(K.textAlign,"center")),f(H,B(K.textAlign,"right"))):(C=d.cellEditor.align||mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),B(K.textAlign,"justify")?(f(fa,B(K.textAlign,"justify")),f(D,
+!1),f(F,!1),f(H,!1)):(f(fa,!1),f(D,C==mxConstants.ALIGN_LEFT),f(F,C==mxConstants.ALIGN_CENTER),f(H,C==mxConstants.ALIGN_RIGHT)));W=d.getParentByName(q,"TABLE",d.cellEditor.textarea);O=null==W?null:d.getParentByName(q,"TR",W);T=null==W?null:d.getParentByNames(q,["TD","TH"],W);Wa.style.display=null!=W?"":"none";document.activeElement!=ta&&(ta.value=isNaN(Z)?"":Z+" "+Editor.fontSizeUnit,"string"===typeof Q&&0<Q.indexOf("%")?Da.value=Q.replace("%"," %"):(B=parseFloat(Q),isNaN(B)?Da.value="120 %":Da.value=
Math.round(100*B)+" %"));null!=da&&(ma=d.getTextColor(q,!0),da(ma,!0));null!=ca&&(P=d.getTextColor(q,!1),ca(P,!0));g.toolbar.setMenuText(u,mxUtils.getCssFontFamily(K.fontFamily))}}cb=!1}),0))});mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,"touchend",m);mxEvent.addListener(d.cellEditor.textarea,"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};
StyleFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();if(!a.containsLabel&&0<a.cells.length){a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==String(a.style.image).substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel()));a.fill&&this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));this.container.appendChild(this.addLineJumps(this.createPanel()));
@@ -3187,8 +3191,8 @@ var b=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPA
StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),e=document.createElement("style");mxUtils.setTextContent(e,a);b.body.appendChild(e);return e.sheet.cssRules};
StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var e=b.style.editableCssRules;if(null!=e){var f=new RegExp(e),g=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?decodeURIComponent(escape(atob(g))):Base64.decode(g,!0),h=mxUtils.parseXml(d);if(null!=h){var m="light"==h.documentElement.style.colorScheme||"0"==mxUtils.getValue(b.style,
"darkMode",null),p=""==h.documentElement.style.colorScheme,k=h.getElementsByTagName("style");for(b=0;b<k.length;b++){var u=this.getCssRules(mxUtils.getTextContent(k[b]));for(e=0;e<u.length;e++)this.addSvgRule(a,u[e],h,k[b],u,e,f,m,p)}}}}catch(w){}return a};StyleFormatPanel.prototype.getColorSchemeFromCss=function(a){return(a=a.match(/color-scheme\s*:\s*([^;]+)/i))?a[1].trim():null};
-StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,g,d,h,m,p){var k=this.editorUi,u=k.editor.graph;h.test(b.selectorText)&&(h=mxUtils.bind(this,function(w,y,A,D){var E=mxUtils.trim(w.style.getPropertyValue(y));if(""!=E&&"url("!=E.substring(0,4)){var F=E;"transparent"==F?F=mxConstants.NONE:(E=mxUtils.isLightDarkColor(F))&&D?D=!1:E||D||(F="light-dark("+F+", "+F+")");w=this.createColorOption(A+" "+w.selectorText,function(){return F},mxUtils.bind(this,function(H){g[d].style.setProperty(y,H==mxConstants.NONE?
-"transparent":mxUtils.getLightDarkColor(H).cssText);H="";p&&mxUtils.isLightDarkColor(g[d].style[y])&&(e.documentElement.style.colorScheme="light dark");for(var M=0;M<g.length;M++)H+=g[M].cssText+" ";f.textContent=H;H=mxUtils.getXml(e.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(H))):Base64.encode(H,!0)),k.getSelectionState().cells)}),"#ffffff",{install:function(H){},destroy:function(){}},null,null,null,D);a.appendChild(w);
+StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,g,d,h,m,p){var k=this.editorUi,u=k.editor.graph;h.test(b.selectorText)&&(h=mxUtils.bind(this,function(w,y,A,E){var D=mxUtils.trim(w.style.getPropertyValue(y));if(""!=D&&"url("!=D.substring(0,4)){var F=D;"transparent"==F?F=mxConstants.NONE:(D=mxUtils.isLightDarkColor(F))&&E?E=!1:D||E||(F="light-dark("+F+", "+F+")");w=this.createColorOption(A+" "+w.selectorText,function(){return F},mxUtils.bind(this,function(H){g[d].style.setProperty(y,H==mxConstants.NONE?
+"transparent":mxUtils.getLightDarkColor(H).cssText);H="";p&&mxUtils.isLightDarkColor(g[d].style[y])&&(e.documentElement.style.colorScheme="light dark");for(var M=0;M<g.length;M++)H+=g[M].cssText+" ";f.textContent=H;H=mxUtils.getXml(e.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(H))):Base64.encode(H,!0)),k.getSelectionState().cells)}),"#ffffff",{install:function(H){},destroy:function(){}},null,null,null,E);a.appendChild(w);
a.style.display=""}}),h(b,"fill",mxResources.get("fill"),m),h(b,"stroke",mxResources.get("line"),m),h(b,"stop-color",mxResources.get("gradient"),m))};
StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState();if(1==b.cells.length){var e=document.createElement("select");e.style.position="relative";e.style.marginBottom="2px";e.className="geFullWidthElement";var f="edit copyAsText editLink editShape editImage editData copyData pasteData editConnectionPoints editGeometry editTooltip editStyle".split(" "),g=null;if(null!=this.editorUi.sidebar){var d=this.editorUi.sidebar.getKeyStyle(b.cells[0].style);g=this.editorUi.sidebar.getLibsForStyle(d);
null!=g||this.editorUi.sidebar.isSearchIndexLoaded()||null==b.style.shape||"mxgraph."!=String(b.style.shape).substring(0,8)||(g=[])}null!=g&&f.push("openLibrary");for(d=0;d<f.length;d++){var h=this.editorUi.actions.get(f[d]);if(null==h||h.enabled){var m=document.createElement("option");m.setAttribute("value",f[d]);var p=mxResources.get(f[d]);mxUtils.write(m,p+"...");null!=h&&null!=h.shortcut&&(p+=" ("+h.shortcut+")");m.setAttribute("title",p);e.appendChild(m)}}1<e.children.length&&(a.appendChild(e),
@@ -3197,11 +3201,11 @@ f=f.view.getState(f.getSelectionCell()),null!=f&&null!=mxUtils.getValue(f.style,
StyleFormatPanel.prototype.addFill=function(a){function b(){h.innerHTML="";A=1;for(var F=0;F<Editor.fillStyles.length;F++){var H=document.createElement("option");H.setAttribute("value",Editor.fillStyles[F].val);mxUtils.write(H,Editor.fillStyles[F].dispName);h.appendChild(H)}}var e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=document.createElement("select");d.style.position="absolute";d.style.left="76px";d.style.width="86px";var h=d.cloneNode(!1);mxEvent.addListener(d,"click",function(F){mxEvent.consume(F)});
mxEvent.addListener(h,"click",function(F){mxEvent.consume(F)});var m=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(F){d.style.display=null==F||F==mxConstants.NONE?"none":""},function(F){f.updateCellStyles({gradientColor:F},f.getSelectionCells())},f.getDefaultColor(g.style,mxConstants.STYLE_GRADIENTCOLOR,f.shapeForegroundColor,f.shapeBackgroundColor));m.style.fontWeight="bold";var p="image"==g.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:
mxConstants.STYLE_FILLCOLOR,k=this.createCellColorOption(mxResources.get("fill"),p,"default",null,mxUtils.bind(this,function(F){f.setCellStyles(p,F,g.cells)}),f.getDefaultColor(g.style,p,f.shapeBackgroundColor,f.shapeForegroundColor));k.style.fontWeight="bold";var u=mxUtils.getValue(g.style,p,null);m.style.display=null!=u&&u!=mxConstants.NONE&&g.fill&&"image"!=g.style.shape?"":"none";var w=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,
-mxConstants.DIRECTION_RADIAL];for(u=0;u<w.length;u++){var y=document.createElement("option");y.setAttribute("value",w[u]);mxUtils.write(y,mxResources.get(w[u]));d.appendChild(y)}m.appendChild(d);var A;b();g.gradient&&k.appendChild(h);var D=mxUtils.bind(this,function(){g=e.getSelectionState();var F=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),H=mxUtils.getValue(g.style,"fillStyle","auto");""==F&&(F=mxConstants.DIRECTION_SOUTH);d.value=F;a.style.display=
+mxConstants.DIRECTION_RADIAL];for(u=0;u<w.length;u++){var y=document.createElement("option");y.setAttribute("value",w[u]);mxUtils.write(y,mxResources.get(w[u]));d.appendChild(y)}m.appendChild(d);var A;b();g.gradient&&k.appendChild(h);var E=mxUtils.bind(this,function(){g=e.getSelectionState();var F=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),H=mxUtils.getValue(g.style,"fillStyle","auto");""==F&&(F=mxConstants.DIRECTION_SOUTH);d.value=F;a.style.display=
g.fill?"":"none";F=mxUtils.getValue(g.style,p,null);if(g.fill&&null!=F&&F!=mxConstants.NONE&&"filledEdge"!=g.style.shape){if("1"==g.style.sketch){if(2!=A){h.innerHTML="";A=2;for(F=0;F<Editor.roughFillStyles.length;F++){var M=document.createElement("option");M.setAttribute("value",Editor.roughFillStyles[F].val);mxUtils.write(M,Editor.roughFillStyles[F].dispName);h.appendChild(M)}h.value="auto"}}else 1!=A&&b();h.value=H;h.value||(H="auto",h.value=H);h.style.display="1"==g.style.sketch||"none"==d.style.display?
-"":"none";m.style.display=!g.gradient||g.containsImage||"1"==g.style.sketch&&"solid"!=H&&"auto"!=H?"none":""}else h.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});D();mxEvent.addListener(d,"change",function(F){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,d.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],
-"cells",g.cells));mxEvent.consume(F)});mxEvent.addListener(h,"change",function(F){f.setCellStyles("fillStyle",h.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[h.value],"cells",g.cells));mxEvent.consume(F)});a.appendChild(k);a.appendChild(m);var E={};k=this.getCustomColors();for(u=0;u<k.length;u++)E[k[u].key]||(E[k[u].key]=!0,a.appendChild(this.createCellColorOption(k[u].title,k[u].key,k[u].defaultValue,null,null,k[u].defaultColorValue,k[u].undefinedColor,
-!0)));k=mxUtils.bind(this,function(F,H,M){if(null!=F){F=F.split(",");H=null!=H?H.split(","):null;for(var N=0;N<F.length;N++)if(!E[F[N]]){E[F[N]]=!0;var J=null!=H?H[mxUtils.mod(N,H.length)]:null,V=null!=J?J:"default";a.appendChild(this.createCellColorOption(Editor.getLabelForStylename(F[N]),F[N],V,null,null,M,J,!0))}}});k(g.style.fillColorStyles,g.style.defaultFillColors,f.shapeBackgroundColor);k(g.style.strokeColorStyles,g.style.defaultStrokeColors,f.shapeForegroundColor);return a};
+"":"none";m.style.display=!g.gradient||g.containsImage||"1"==g.style.sketch&&"solid"!=H&&"auto"!=H?"none":""}else h.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});E();mxEvent.addListener(d,"change",function(F){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,d.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],
+"cells",g.cells));mxEvent.consume(F)});mxEvent.addListener(h,"change",function(F){f.setCellStyles("fillStyle",h.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[h.value],"cells",g.cells));mxEvent.consume(F)});a.appendChild(k);a.appendChild(m);var D={};k=this.getCustomColors();for(u=0;u<k.length;u++)D[k[u].key]||(D[k[u].key]=!0,a.appendChild(this.createCellColorOption(k[u].title,k[u].key,k[u].defaultValue,null,null,k[u].defaultColorValue,k[u].undefinedColor,
+!0)));k=mxUtils.bind(this,function(F,H,M){if(null!=F){F=F.split(",");H=null!=H?H.split(","):null;for(var N=0;N<F.length;N++)if(!D[F[N]]){D[F[N]]=!0;var J=null!=H?H[mxUtils.mod(N,H.length)]:null,V=null!=J?J:"default";a.appendChild(this.createCellColorOption(Editor.getLabelForStylename(F[N]),F[N],V,null,null,M,J,!0))}}});k(g.style.fillColorStyles,g.style.defaultFillColors,f.shapeBackgroundColor);k(g.style.strokeColorStyles,g.style.defaultStrokeColors,f.shapeForegroundColor);return a};
StyleFormatPanel.prototype.getCustomColors=function(){var a=this.editorUi,b=a.editor.graph;a=a.getSelectionState();var e=[];if(null!=a.customProperties)for(var f in a.customProperties){var g=a.customProperties[f];if(null!=g&&g.primary&&("color"==g.type||"color"==g.subType)&&("function"!==typeof g.isVisible||g.isVisible(a,this))){var d="color"==g.subType?g.subDefVal:g.defVal;d=null!=d?d:b.shapeBackgroundColor;e.push({title:g.dispName,defaultValue:d,defaultColorValue:null!=g.defaultColor?g.defaultColor:
d,undefinedColor:g.undefinedColor,key:g.name})}}a.swimlane&&(b=this.editorUi.editor.graph,e.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default",defaultColorValue:b.shapeBackgroundColor}));return e};
StyleFormatPanel.prototype.addDashPattern=function(a,b){var e=b.split(" ");if(2<=e.length){for(var f=0,g=0;g<e.length;g++)f+=parseInt(e[g]);b=Graph.createSvgImage(f,1,'<line transform="translate(0,1)" x1="0" y1="0" x2="'+f+'" y2="0" stroke-dasharray="'+b+'" stroke-width="2" stroke="black"/>',f,1);a.style.backgroundImage="url("+b.src+")";a.style.backgroundSize=f+"px 1px";a.style.backgroundRepeat="repeat-x"}else a.style.borderBottomStyle=b};
@@ -3209,15 +3213,15 @@ StyleFormatPanel.prototype.addStroke=function(a){function b(P){var da=f.fromUnit
Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",h.cells)));N.value=f.inUnit(da)+" "+f.getUnit();mxEvent.consume(P)}var f=this,g=this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=document.createElement("div");m.className="geFormatEntry";h.stroke||(m.style.display="none");var p=document.createElement("select");
p.style.position="absolute";p.style.left="72px";p.style.width="90px";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));p.appendChild(w)}mxEvent.addListener(p,"change",function(P){d.getModel().beginUpdate();try{var da=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],ma=["0","0"];"rounded"==p.value?ma=["1","0"]:"curved"==p.value&&(ma=["0","1"]);for(var Ia=0;Ia<da.length;Ia++)d.setCellStyles(da[Ia],
ma[Ia],h.cells);g.fireEvent(new mxEventObject("styleChanged","keys",da,"values",ma,"cells",h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(P)});mxEvent.addListener(p,"click",function(P){mxEvent.consume(P)});var y="image"==h.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;k="image"==h.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(k,y,"default",null,mxUtils.bind(this,function(P){d.setCellStyles(y,P,h.cells);if(null==P||
-P==mxConstants.NONE){P=[];for(var da=0;da<h.cells.length;da++)(d.isTableCell(h.cells[da])||d.isTableRow(h.cells[da]))&&P.push(h.cells[da]);0<P.length&&d.setCellStyles(y,"inherit",P)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(p);var A=m.cloneNode(!1);A.style.position="relative";var D=mxUtils.bind(this,function(P,da,ma,Ia,oa){P=this.editorUi.menus.styleChange(P,"",Ia,oa,"",null);Ia=document.createElement("div");this.addDashPattern(Ia,ma);P.firstChild.firstChild.className="geStyleMenuItem";
-P.firstChild.firstChild.style.width=da+"px";P.firstChild.firstChild.appendChild(Ia);return P}),E=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(P,110,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(P,110,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
-["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(P,110,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(P,110,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");D(P,110,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");
-D(P,110,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(P,110,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,A),F=A.cloneNode(!1),H=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){var da=[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,mxConstants.STYLE_DASHED,"width"];Format.processMenuIcon(this.editorUi.menus.styleChange(P,
+P==mxConstants.NONE){P=[];for(var da=0;da<h.cells.length;da++)(d.isTableCell(h.cells[da])||d.isTableRow(h.cells[da]))&&P.push(h.cells[da]);0<P.length&&d.setCellStyles(y,"inherit",P)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(p);var A=m.cloneNode(!1);A.style.position="relative";var E=mxUtils.bind(this,function(P,da,ma,Ia,oa){P=this.editorUi.menus.styleChange(P,"",Ia,oa,"",null);Ia=document.createElement("div");this.addDashPattern(Ia,ma);P.firstChild.firstChild.className="geStyleMenuItem";
+P.firstChild.firstChild.style.width=da+"px";P.firstChild.firstChild.appendChild(Ia);return P}),D=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){E(P,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(P,110,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");E(P,110,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
+["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");E(P,110,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");E(P,110,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");E(P,110,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");
+E(P,110,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(P,110,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,A),F=A.cloneNode(!1),H=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){var da=[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,mxConstants.STYLE_DASHED,"width"];Format.processMenuIcon(this.editorUi.menus.styleChange(P,
"",da,[null,null,null,null,null],"",null,null,null,!0,Format.connectionImage.src)).setAttribute("title",mxResources.get("line"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["link",null,null,null,null],"",null,null,null,!0,Format.linkEdgeImage.src)).setAttribute("title",mxResources.get("link"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["flexArrow",null,null,null,null],"",null,null,null,!0,Format.arrowImage.src)).setAttribute("title",mxResources.get("arrow"));
Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["arrow",null,null,null,null],"",null,null,null,!0,Format.simpleArrowImage.src)).setAttribute("title",mxResources.get("simpleArrow"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["filledEdge",null,null,null,null],"",null,null,null,!0,Format.filledEdgeImage.src)).setAttribute("title","Filled Edge");Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["pipe",null,null,null,null],"",null,null,null,!0,Format.pipeEdgeImage.src)).setAttribute("title",
-"Pipe");Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["wire",null,null,"1",null],"",null,null,null,!0,Format.wireEdgeImage.src)).setAttribute("title","Wire")})),"",null,F);H.setAttribute("title",mxResources.get("connection"));w=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,40,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(P,40,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
-["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(P,40,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(P,40,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(P,40,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");D(P,40,
-"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(P,40,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(P,40,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,F);k=A.cloneNode(!1);var M=document.createElement("input");M.style.position="absolute";
+"Pipe");Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["wire",null,null,"1",null],"",null,null,null,!0,Format.wireEdgeImage.src)).setAttribute("title","Wire")})),"",null,F);H.setAttribute("title",mxResources.get("connection"));w=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){E(P,40,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(P,40,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
+["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");E(P,40,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");E(P,40,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");E(P,40,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");E(P,40,
+"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");E(P,40,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(P,40,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,F);k=A.cloneNode(!1);var M=document.createElement("input");M.style.position="absolute";
M.style.width="52px";M.style.left="148px";M.setAttribute("title",mxResources.get("linewidth"));A.appendChild(M);var N=M.cloneNode(!0);N.style.width="56px";N.style.left="144px";F.appendChild(N);var J=this.createStepper(M,b,this.getUnitStep(),null,null,this.isFloatUnit());J.style.display=M.style.display;A.appendChild(J);J=this.createStepper(N,e,this.getUnitStep(),null,null,this.isFloatUnit());J.style.display=N.style.display;F.appendChild(J);mxEvent.addListener(M,"blur",b);mxEvent.addListener(M,"change",
b);mxEvent.addListener(N,"blur",e);mxEvent.addListener(N,"change",e);var V=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){"arrow"!=h.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",mxResources.get("straight")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],null,null,!0,Format.orthogonalImage.src)).setAttribute("title",mxResources.get("orthogonal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],null,null,!0,Format.horizontalElbowImage.src)).setAttribute("title",mxResources.get("vertical")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
@@ -3254,9 +3258,9 @@ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STY
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)").setAttribute("title",
mxResources.get("block"));P.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=P.div&&mxUtils.fit(P.div)}),0)}})),"",null,k);H.style.width="67px";H.style.marginRight="2px";w.style.width="67px";w.style.marginRight="2px";V.style.width="67px";V.style.marginRight="2px";W.style.width="67px";W.style.marginRight="2px";T.style.width="67px";T.style.marginRight="2px";this.addArrow(H).appendChild(document.createElement("div"));this.addArrow(V).appendChild(document.createElement("div"));
-this.addArrow(W);this.addArrow(T);E.style.width="142px";E=this.addArrow(E);w=this.addArrow(w);var O=document.createElement("div");O.className="gePatternPreview";O.style.width="100px";O.style.borderBottomStyle="solid";E.appendChild(O);var fa=document.createElement("div");fa.className="gePatternPreview";fa.style.width="36px";fa.style.borderBottomStyle="solid";w.appendChild(fa);a.appendChild(u);a.appendChild(F);a.appendChild(A);u=A.cloneNode(!1);u.style.display="block";u.style.height="60px";u.style.paddingTop=
+this.addArrow(W);this.addArrow(T);D.style.width="142px";D=this.addArrow(D);w=this.addArrow(w);var O=document.createElement("div");O.className="gePatternPreview";O.style.width="100px";O.style.borderBottomStyle="solid";D.appendChild(O);var fa=document.createElement("div");fa.className="gePatternPreview";fa.style.width="36px";fa.style.borderBottomStyle="solid";w.appendChild(fa);a.appendChild(u);a.appendChild(F);a.appendChild(A);u=A.cloneNode(!1);u.style.display="block";u.style.height="60px";u.style.paddingTop=
"2px";w=document.createElement("div");w.style.position="absolute";w.style.maxWidth="78px";w.style.overflow="hidden";w.style.textOverflow="ellipsis";w.style.marginTop="4px";w.style.fontWeight="normal";mxUtils.write(w,mxResources.get("size"));u.appendChild(w);var S=this.addUnitInput(u,this.getUnit(),82,52,function(){X.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),aa=this.addUnitInput(u,this.getUnit(),16,52,function(){ja.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());
-mxUtils.br(u);E=document.createElement("div");E.style.height="8px";u.appendChild(E);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("spacing"));u.appendChild(w);var Y=this.addUnitInput(u,this.getUnit(),82,52,function(){ia.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ba=this.addUnitInput(u,this.getUnit(),16,52,function(){ta.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("linestart"),82,62).style.fontSize=
+mxUtils.br(u);D=document.createElement("div");D.style.height="8px";u.appendChild(D);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("spacing"));u.appendChild(w);var Y=this.addUnitInput(u,this.getUnit(),82,52,function(){ia.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ba=this.addUnitInput(u,this.getUnit(),16,52,function(){ta.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("linestart"),82,62).style.fontSize=
"10px";this.addLabel(u,mxResources.get("lineend"),16,62).style.fontSize="10px";mxUtils.br(u);m=m.cloneNode(!1);m.className="geFormatEntry";w=document.createElement("div");mxUtils.write(w,mxResources.get("perimeter"));m.appendChild(w);var L=this.addUnitInput(m,this.getUnit(),16,52,function(){ca.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());h.edges.length==h.cells.length?(a.appendChild(k),a.appendChild(u)):h.vertices.length==h.cells.length&&a.appendChild(m);var U=mxUtils.bind(this,
function(P,da,ma){function Ia(oa,za,Aa,Ma){Aa=Aa.getElementsByTagName("div")[0];null!=Aa&&g.updateCssForMarker(Aa,Ma,h.style.shape,oa,za);return Aa}h=g.getSelectionState();if(ma||document.activeElement!=M)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),M.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=N)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),N.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();p.style.visibility=
"connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape||"pipe"==h.style.shape?"":"hidden";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(h.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");O.style.borderBottom="1px solid black";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_DASHED,null)&&(P=mxUtils.getValue(h.style,mxConstants.STYLE_DASH_PATTERN,""),2<=String(P).split(" ").length?(O.style.borderBottom="1px solid transparent",
@@ -3271,9 +3275,9 @@ d.style.left="72px";d.style.width="72px";g=["none","arc","gap","sharp","line"];f
mxEvent.addListener(d,"click",function(w){mxEvent.consume(w)});a.appendChild(d);var p=this.addUnitInput(a,this.getUnit(),16,52,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());var k=this.installInputHandler(p,"jumpSize",Graph.defaultJumpSize,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var u=mxUtils.bind(this,function(w,y,A){f=b.getSelectionState();d.value=mxUtils.getValue(f.style,"jumpStyle","none");if(A||document.activeElement!=p)w=parseInt(mxUtils.getValue(f.style,
"jumpSize",Graph.defaultJumpSize)),p.value=isNaN(w)?"":this.inUnit(w)+" "+this.getUnit()});this.addKeyHandler(p,u);e.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){e.getModel().removeListener(u)}});u()}else a.style.display="none";return a};
StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState(),g=document.createElement("table");g.className="geFullWidthElement";g.style.fontWeight="bold";g.style.tableLayout="fixed";var d=document.createElement("tbody"),h=document.createElement("tr");h.style.padding="0px";var m=document.createElement("td");m.style.padding="0px";m.style.width="50%";m.style.verticalAlign="top";var p=m.cloneNode(!0);p.style.paddingLeft="8px";h.appendChild(m);h.appendChild(p);
-d.appendChild(h);g.appendChild(d);a.appendChild(g);var k=m,u=mxUtils.bind(this,function(y,A,D,E){y=this.createCellOption(y,A,D,null,null,E);y.style.alignItems="top";k.appendChild(y);k=k==m?p:m;return y}),w=mxUtils.bind(this,function(y,A,D){f=b.getSelectionState();m.innerText="";p.innerText="";k=m;f.rounded&&u(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);f.swimlane&&u(mxResources.get("divider"),"swimlaneLine",1);u(mxResources.get("sketch"),"sketch",0,function(F,H){e.updateCellStyles({sketch:H?
-"1":null,curveFitting:H?Editor.sketchDefaultCurveFitting:null,jiggle:H?Editor.sketchDefaultJiggle:null},F)});f.glass&&u(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);y=u(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);Editor.enableShadowOption||(y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(y,60));0<f.edges.length&&0==f.vertices.length&&u(mxResources.get("flowAnimation",null,"Flow Animation"),"flowAnimation",0);if(null!=f.customProperties)for(var E in f.customProperties)y=
-f.customProperties[E],null!=y&&"bool"==y.type&&y.primary&&("function"!==typeof y.isVisible||y.isVisible(f,this))&&u(y.dispName,E,y.defVal?"1":"0")});e.getModel().addListener(mxEvent.CHANGE,w);this.listeners.push({destroy:function(){e.getModel().removeListener(w)}});w();return a};StyleFormatPanel.prototype.addStyleOps=function(a){1==this.editorUi.getSelectionState().cells.length&&this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};
+d.appendChild(h);g.appendChild(d);a.appendChild(g);var k=m,u=mxUtils.bind(this,function(y,A,E,D){y=this.createCellOption(y,A,E,null,null,D);y.style.alignItems="top";k.appendChild(y);k=k==m?p:m;return y}),w=mxUtils.bind(this,function(y,A,E){f=b.getSelectionState();m.innerText="";p.innerText="";k=m;f.rounded&&u(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);f.swimlane&&u(mxResources.get("divider"),"swimlaneLine",1);u(mxResources.get("sketch"),"sketch",0,function(F,H){e.updateCellStyles({sketch:H?
+"1":null,curveFitting:H?Editor.sketchDefaultCurveFitting:null,jiggle:H?Editor.sketchDefaultJiggle:null},F)});f.glass&&u(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);y=u(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);Editor.enableShadowOption||(y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(y,60));0<f.edges.length&&0==f.vertices.length&&u(mxResources.get("flowAnimation",null,"Flow Animation"),"flowAnimation",0);if(null!=f.customProperties)for(var D in f.customProperties)y=
+f.customProperties[D],null!=y&&"bool"==y.type&&y.primary&&("function"!==typeof y.isVisible||y.isVisible(f,this))&&u(y.dispName,D,y.defVal?"1":"0")});e.getModel().addListener(mxEvent.CHANGE,w);this.listeners.push({destroy:function(){e.getModel().removeListener(w)}});w();return a};StyleFormatPanel.prototype.addStyleOps=function(a){1==this.editorUi.getSelectionState().cells.length&&this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};
mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.init=function(){this.container.appendChild(this.addView(this.createPanel()))};
DiagramStylePanel.prototype.getGlobalStyleButtons=function(){var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatEntry";var f=document.createElement("input");f.setAttribute("type","checkbox");f.checked=Editor.sketchMode;e.appendChild(f);mxUtils.write(e,mxResources.get("sketch"));mxEvent.addListener(e,"click",function(d){if(b.isEnabled()){var h=!Editor.sketchMode;b.updateCellStyles({sketch:h?"1":null,curveFitting:h?Editor.sketchDefaultCurveFitting:null,jiggle:h?
Editor.sketchDefaultJiggle:null},b.getVerticesAndEdges());a.setSketchMode(h);mxEvent.consume(d)}});e=[e,mxUtils.button(mxResources.get("rounded"),mxUtils.bind(this,function(d){var h=b.getVerticesAndEdges(),m=!0;if(0<h.length)for(var p=0;p<h.length;p++){var k=b.getCellStyle(h[p]);if(0==mxUtils.getValue(k,mxConstants.STYLE_ROUNDED,0)){m=!1;break}}m=!m;b.updateCellStyles({rounded:m?"1":"0"},h);m?(b.currentEdgeStyle.rounded="1",b.currentVertexStyle.rounded="1"):(delete b.currentEdgeStyle.rounded,delete b.currentVertexStyle.rounded);
@@ -3293,10 +3297,10 @@ S!=mxConstants.STYLE_STROKECOLOR)p&&f.isEdge(T)&&S==mxConstants.STYLE_FONTCOLOR?
"light",fa.parentNode.appendChild(S))}),w=document.createElement("div");w.style.whiteSpace="normal";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var y=mxUtils.bind(this,function(V,W,T,O,fa){var S=this.format.cachedStyleEntries[fa];null==S&&(S=document.createElement("div"),S.className="geGraphStylePreview",p||null==O||null==O.background||(S.style.backgroundColor=O.background),u(V,W,T,O,S),mxEvent.addGestureListeners(S,mxUtils.bind(this,function(aa){S.style.opacity=
.6}),null,mxUtils.bind(this,function(aa){S.style.opacity="";e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(V,e.currentVertexStyle);k(V,e.currentEdgeStyle);k(W,e.currentVertexStyle);k(T,e.currentEdgeStyle);f.beginUpdate();try{var Y=d.slice(),ba;for(ba in V)Y.push(ba);h(Y,O);if(!p){var L=new ChangePageSetup(b,null!=O?O.background:null);L.ignoreImage=!0;f.execute(L);f.execute(new ChangeGridColor(b,null!=O&&null!=O.gridColor?O.gridColor:
g))}}finally{f.endUpdate()}})),mxClient.IS_TOUCH||(mxEvent.addListener(S,"mouseenter",mxUtils.bind(this,function(aa){var Y=e.getCellStyle;aa=e.background;var ba=e.view.gridColor;p||(e.background=null!=O?O.background:null,e.view.gridColor=null!=O&&null!=O.gridColor?O.gridColor:g);e.getCellStyle=function(L,U){U=null!=U?U:!0;var X=mxUtils.clone(Y.apply(this,arguments)),ia=e.stylesheet.getDefaultVertexStyle(),ja=W;f.isEdge(L)&&(ia=e.stylesheet.getDefaultEdgeStyle(),ja=T);m(X,d,ia);k(V,X,L,O);k(ja,X,L,
-O);U&&(X=this.postProcessCellStyle(L,X));return X};e.refresh();e.getCellStyle=Y;e.background=aa;e.view.gridColor=ba})),mxEvent.addListener(S,"mouseleave",mxUtils.bind(this,function(aa){e.refresh()}))),this.format.cachedStyleEntries[fa]=S);w.appendChild(S)}),A=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var D=[],E=mxUtils.bind(this,function(){0<D.length&&(D[this.format.currentStylePage].style.background="#84d7ff");
-for(var V=10*this.format.currentStylePage;V<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);V++){var W=Editor.styles[V];y(W.commonStyle,W.vertexStyle,W.edgeStyle,W.graph,V)}}),F=mxUtils.bind(this,function(V){0<=V&&V<A&&(D[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=V,E())});if(1<A){var H=document.createElement("div");H.className="geSwitcher";H.style.width="200px";for(var M=0;M<A;M++){var N=document.createElement("div");
-N.className="geSwitcherDot";mxUtils.bind(this,function(V,W){mxEvent.addListener(N,"click",mxUtils.bind(this,function(){F(V)}))})(M,N);H.appendChild(N);D.push(N)}a.appendChild(H);E();if(15>A&&0<D.length){M=document.createElement("div");M.className="geButton";M.style.backgroundImage="url("+Editor.chevronLeftImage+")";var J=M.cloneNode(!1);J.style.backgroundImage="url("+Editor.chevronRightImage+")";H.insertBefore(M,D[0]);H.appendChild(J);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage-
-1,A))}));mxEvent.addListener(J,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage+1,A))}))}}else E();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
+O);U&&(X=this.postProcessCellStyle(L,X));return X};e.refresh();e.getCellStyle=Y;e.background=aa;e.view.gridColor=ba})),mxEvent.addListener(S,"mouseleave",mxUtils.bind(this,function(aa){e.refresh()}))),this.format.cachedStyleEntries[fa]=S);w.appendChild(S)}),A=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var E=[],D=mxUtils.bind(this,function(){0<E.length&&(E[this.format.currentStylePage].style.background="#84d7ff");
+for(var V=10*this.format.currentStylePage;V<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);V++){var W=Editor.styles[V];y(W.commonStyle,W.vertexStyle,W.edgeStyle,W.graph,V)}}),F=mxUtils.bind(this,function(V){0<=V&&V<A&&(E[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=V,D())});if(1<A){var H=document.createElement("div");H.className="geSwitcher";H.style.width="200px";for(var M=0;M<A;M++){var N=document.createElement("div");
+N.className="geSwitcherDot";mxUtils.bind(this,function(V,W){mxEvent.addListener(N,"click",mxUtils.bind(this,function(){F(V)}))})(M,N);H.appendChild(N);E.push(N)}a.appendChild(H);D();if(15>A&&0<E.length){M=document.createElement("div");M.className="geButton";M.style.backgroundImage="url("+Editor.chevronLeftImage+")";var J=M.cloneNode(!1);J.style.backgroundImage="url("+Editor.chevronRightImage+")";H.insertBefore(M,E[0]);H.appendChild(J);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage-
+1,A))}));mxEvent.addListener(J,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage+1,A))}))}}else D();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return e.pageVisible},function(d){b.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(e.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
if(e.isEnabled()){if(this.showBackgroundImageOption){var f=this.createOption(mxResources.get("background"),function(){return null!=e.backgroundImage},function(d){d||(d=new ChangePageSetup(b,null,null),d.ignoreColor=!0,e.model.execute(d))},{install:function(d){this.listener=function(){d(null!=e.backgroundImage)};b.addListener("backgroundImageChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}),g=f.getElementsByTagName("input")[0];null!=g&&(g.style.visibility=null!=e.backgroundImage?
@@ -3314,7 +3318,7 @@ DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(thi
DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var f=PageSetupDialog.addPageFormatPanel(a,"formatpanel",e.pageFormat,function(d){if(null==e.pageFormat||e.pageFormat.width!=d.width||e.pageFormat.height!=d.height)d=new ChangePageSetup(b,null,null,d),d.ignoreColor=!0,d.ignoreImage=!0,e.model.execute(d)});this.addKeyHandler(f.widthInput,function(){f.set(e.pageFormat)});this.addKeyHandler(f.heightInput,
function(){f.set(e.pageFormat)});var g=function(){f.set(e.pageFormat)};b.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){b.removeListener(g)}});e.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){e.getModel().removeListener(g)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};
DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,l,t){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=t?t:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function e(){mxSwimlane.call(this)}function f(){mxCylinder.call(this)}function g(){mxConnector.call(this)}function d(){mxCylinder.call(this)}function h(){mxActor.call(this)}function m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function w(){mxShape.call(this)}
-function y(){mxShape.call(this)}function A(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function D(){mxActor.call(this)}function E(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function H(){mxActor.call(this)}function M(){mxActor.call(this)}function N(){mxActor.call(this)}function J(){mxActor.call(this)}function V(){mxActor.call(this)}function W(){mxActor.call(this)}function T(){mxActor.call(this)}function O(c,l){this.canvas=c;this.canvas.setLineJoin("round");
+function y(){mxShape.call(this)}function A(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function E(){mxActor.call(this)}function D(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function H(){mxActor.call(this)}function M(){mxActor.call(this)}function N(){mxActor.call(this)}function J(){mxActor.call(this)}function V(){mxActor.call(this)}function W(){mxActor.call(this)}function T(){mxActor.call(this)}function O(c,l){this.canvas=c;this.canvas.setLineJoin("round");
this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,O.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,O.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,O.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,O.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
O.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,O.prototype.arcTo)}function fa(){mxRectangleShape.call(this)}function S(){mxRectangleShape.call(this)}function aa(){mxActor.call(this)}function Y(){mxActor.call(this)}function ba(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function U(){mxRectangleShape.call(this)}function X(){mxCylinder.call(this)}function ia(){mxShape.call(this)}function ja(){mxShape.call(this)}function ta(){mxEllipse.call(this)}
function ca(){mxShape.call(this)}function P(){mxShape.call(this)}function da(){mxRectangleShape.call(this)}function ma(){mxShape.call(this)}function Ia(){mxShape.call(this)}function oa(){mxShape.call(this)}function za(){mxShape.call(this)}function Aa(){mxShape.call(this)}function Ma(){mxCylinder.call(this)}function Pa(){mxCylinder.call(this)}function Ka(){mxRectangleShape.call(this)}function Ja(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function Da(){mxArrowConnector.call(this);
@@ -3338,10 +3342,10 @@ c.begin(),c.moveTo(n-v,0),c.lineTo(n-v,v),c.lineTo(n,v),c.close(),c.fill()),c.be
15;w.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(n*Math.tan(v),.5*r);c.translate(l,t);c.begin();c.moveTo(.5*n,0);c.lineTo(n,v);c.lineTo(n,r-v);c.lineTo(.5*n,r);c.lineTo(0,r-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*n,2*v);c.lineTo(n,v);c.moveTo(.5*n,2*v);c.lineTo(.5*n,r);c.stroke()};mxCellRenderer.registerShape("isoCube2",
w);mxUtils.extend(y,mxShape);y.prototype.size=15;y.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*
n,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",y);mxUtils.extend(A,mxCylinder);A.prototype.size=15;A.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),x=mxUtils.getValue(this.style,"lid",!0);c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),x?(c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v)):(c.moveTo(0,0),c.arcTo(.5*n,v,0,0,0,.5*n,v),c.arcTo(.5*n,v,
-0,0,0,n,0)),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),x&&(c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*n,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",A);mxUtils.extend(D,mxActor);D.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n/2,.5*r,n,0);c.quadTo(.5*n,r/2,n,r);c.quadTo(n/2,.5*r,0,r);c.quadTo(.5*n,r/2,0,0);c.end()};mxCellRenderer.registerShape("switch",D);mxUtils.extend(E,
-mxCylinder);E.prototype.tabWidth=60;E.prototype.tabHeight=20;E.prototype.tabPosition="right";E.prototype.arcSize=.1;E.prototype.isRoundable=function(){return!0};E.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),x=mxUtils.getValue(this.style,
+0,0,0,n,0)),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),x&&(c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*n,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",A);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n/2,.5*r,n,0);c.quadTo(.5*n,r/2,n,r);c.quadTo(n/2,.5*r,0,r);c.quadTo(.5*n,r/2,0,0);c.end()};mxCellRenderer.registerShape("switch",E);mxUtils.extend(D,
+mxCylinder);D.prototype.tabWidth=60;D.prototype.tabHeight=20;D.prototype.tabPosition="right";D.prototype.arcSize=.1;D.prototype.isRoundable=function(){return!0};D.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),x=mxUtils.getValue(this.style,
"rounded",!1),I=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));I||(z*=Math.min(n,r));z=Math.min(z,.5*n,.5*(r-t));l=Math.max(l,z);l=Math.min(n-z,l);x||(z=0);c.begin();"left"==v?(c.moveTo(Math.max(z,0),t),c.lineTo(Math.max(z,0),0),c.lineTo(l,0),c.lineTo(l,t)):(c.moveTo(n-l,t),c.lineTo(n-l,0),c.lineTo(n-Math.max(z,0),0),c.lineTo(n-Math.max(z,0),t));x?(c.moveTo(0,z+t),c.arcTo(z,z,0,0,1,z,t),c.lineTo(n-z,t),c.arcTo(z,z,0,0,1,n,z+t),c.lineTo(n,
-r-z),c.arcTo(z,z,0,0,1,n-z,r),c.lineTo(z,r),c.arcTo(z,z,0,0,1,0,r-z)):(c.moveTo(0,t),c.lineTo(n,t),c.lineTo(n,r),c.lineTo(0,r));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,t+20),c.lineTo(n-20,t+10),c.lineTo(n-10,t+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",E);E.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",
+r-z),c.arcTo(z,z,0,0,1,n-z,r),c.lineTo(z,r),c.arcTo(z,z,0,0,1,0,r-z)):(c.moveTo(0,t),c.lineTo(n,t),c.lineTo(n,r),c.lineTo(0,r));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,t+20),c.lineTo(n-20,t+10),c.lineTo(n-10,t+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",D);D.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",
15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));r||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?
new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(F,mxCylinder);F.prototype.arcSize=.1;F.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);var v=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));
t=mxUtils.getValue(this.style,"umlStateConnection",null);x||(l*=Math.min(n,r));l=Math.min(l,.5*n,.5*r);v||(l=0);v=0;null!=t&&(v=10);c.begin();c.moveTo(v,l);c.arcTo(l,l,0,0,1,v+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,r-l);c.arcTo(l,l,0,0,1,n-l,r);c.lineTo(v+l,r);c.arcTo(l,l,0,0,1,v,r-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,r-20,10,10,3,3),c.stroke(),c.roundrect(n-20,r-20,10,10,3,3),c.stroke(),
@@ -3351,7 +3355,7 @@ mxActor);M.prototype.size=.4;M.prototype.redrawPath=function(c,l,t,n,r){l=r*Math
n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=n,new mxRectangle(c.x,c.y+l,t,n-2*l);l*=t;return new mxRectangle(c.x+l,c.y,t-2*l,n)}return c};mxCellRenderer.registerShape("tape",M);mxUtils.extend(N,mxActor);N.prototype.size=.3;N.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};N.prototype.redrawPath=
function(c,l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,0);c.lineTo(n,0);c.lineTo(n,r-l/2);c.quadTo(3*n/4,r-1.4*l,n/2,r-l/2);c.quadTo(n/4,r-l*(1-1.4),0,r-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",N);var Ya=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,t,n){var r=mxUtils.getValue(this.style,"size");return null!=r?n*Math.max(0,Math.min(1,r)):Ya.apply(this,arguments)};
mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};A.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*
-l*this.scale))}return null};E.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));
+l*this.scale))}return null};D.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));
r||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};F.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,
"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(J,mxActor);J.prototype.size=.2;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,
"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("parallelogram",J);mxUtils.extend(V,mxActor);V.prototype.size=.2;V.prototype.fixedSize=
@@ -3522,8 +3526,8 @@ return l},internalStorage:function(c){var l=[Va(c,["dx","dy"],function(t){var n=
l.push(ib(c));return l},module:function(c){return[Va(c,["jettyWidth","jettyHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",Ma.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",Ma.prototype.jettyHeight)));return new mxPoint(l.x+t/2,l.y+2*n)},function(l,t){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,
t.y-l.y))/2)})]},corner:function(c){return[Va(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",eb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",eb.prototype.dy)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},tee:function(c){return[Va(c,["dx","dy"],function(l){var t=
Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",fb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",fb.prototype.dy)));return new mxPoint(l.x+(l.width+t)/2,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,t.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},singleArrow:vb(1),doubleArrow:vb(.5),"mxgraph.arrows2.wedgeArrow":db(20,20),"mxgraph.arrows2.wedgeArrowDashed":db(20,
-20),"mxgraph.arrows2.wedgeArrowDashed2":db(20,20),folder:function(c){return[Va(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",E.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",E.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,
-t.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,
+20),"mxgraph.arrows2.wedgeArrowDashed2":db(20,20),folder:function(c){return[Va(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",D.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",D.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,
+t.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,
Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},tape:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[Va(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",w.isoAngle))))*Math.PI/
200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(y.prototype.size),cylinder3:wb(A.prototype.size),offPageConnector:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-
t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(t){var n=Math.max(0,Math.min(t.width/2,t.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(t.x+n,t.y+n)},function(t,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));
@@ -3547,7 +3551,7 @@ mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwim
"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));return c};A.prototype.getConstraints=function(c,l,t){c=[];l=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};E.prototype.getConstraints=
+0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};D.prototype.getConstraints=
function(c,l,t){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),r=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),r))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3560,7 +3564,7 @@ Z.prototype.constraints=mxEllipse.prototype.constraints;La.prototype.constraints
.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
@@ -3583,8 +3587,8 @@ function(c,l,t){c=[];var n=Math.min(t,l),r=Math.max(0,Math.min(n,n*parseFloat(mx
0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,n));return c};da.prototype.constraints=null;q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
.9),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];za.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function e(k,u,w,y,A){A.getModel().beginUpdate();try{var D=A.getCellGeometry(k);null!=D&&w&&y&&(w/=y,D=D.clone(),1<w?D.height=D.width/w:D.width=D.height*w,A.getModel().setGeometry(k,
-D));A.setCellStyles(mxConstants.STYLE_CLIP_PATH,u,[k]);A.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[k])}finally{A.getModel().endUpdate()}}var f=this.editorUi,g=f.editor,d=g.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(f.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";f.openFile()});var m=new Action("smartFit",function(){d.popupMenuHandler.hideMenu();var k=d.view.scale,
+Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function e(k,u,w,y,A){A.getModel().beginUpdate();try{var E=A.getCellGeometry(k);null!=E&&w&&y&&(w/=y,E=E.clone(),1<w?E.height=E.width/w:E.width=E.height*w,A.getModel().setGeometry(k,
+E));A.setCellStyles(mxConstants.STYLE_CLIP_PATH,u,[k]);A.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[k])}finally{A.getModel().endUpdate()}}var f=this.editorUi,g=f.editor,d=g.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(f.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";f.openFile()});var m=new Action("smartFit",function(){d.popupMenuHandler.hideMenu();var k=d.view.scale,
u=d.container.scrollLeft,w=d.container.scrollTop,y=d.view.translate.x,A=d.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(k-d.view.scale)&&5>Math.abs(u-d.container.scrollLeft)&&5>Math.abs(w-d.container.scrollTop)&&y==d.view.translate.x&&A==d.view.translate.y&&f.actions.get("fitWindow").funct()},null,null,"Enter");m.getTitle=function(){return mxResources.get("fitWindow")+" / "+mxResources.get("resetView")};this.put("smartFit",m);this.addAction("keyPressEnter",function(){d.isSelectionEmpty()?
f.actions.get("smartFit").funct():d.isEnabled()&&d.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){f.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(k,u){try{var w=mxUtils.parseXml(k);g.graph.setSelectionCells(g.graph.importGraphModel(w.documentElement))}catch(y){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+y.message)}}));f.showDialog((new OpenDialog(this)).container,
320,220,!0,!0,function(){window.openFile=null})}).isEnabled=h;this.addAction("save",function(){f.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=h;this.addAction("saveAs...",function(){f.saveFile(!0)},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+S");this.addAction("export...",function(){f.showDialog((new ExportDialog(f)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var k=new EditDiagramDialog(f);f.showDialog(k.container,620,420,!0,!1,null,null,null,new mxRectangle(0,
@@ -3592,8 +3596,8 @@ f.actions.get("smartFit").funct():d.isEnabled()&&d.startEditingAtCell()});this.a
this.addAction("cut",function(){var k=null;try{k=f.copyXml(),null!=k&&d.removeCells(k,!1)}catch(u){}try{null==k&&mxClipboard.cut(d)}catch(u){f.handleError(u)}},null,"",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{f.copyXml()}catch(k){}try{mxClipboard.copy(d)}catch(k){f.handleError(k)}},null,"",Editor.ctrlKey+"+C");this.addAction("paste",function(){f.pasteFromClipboard()},!1,"",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(k){f.pasteFromClipboard(d.popupMenuHandler.getTriggerPoint())});
this.addAction("swap",function(){var k=d.getSelectionCells();2==k.length&&d.swapShapes(k[0],k[1])});this.addAction("copySize",function(){var k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.getModel().isVertex(k)&&(k=d.getCellGeometry(k),null!=k&&(f.copiedSize=new mxRectangle(k.x,k.y,k.width,k.height)))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+F");this.addAction("pasteSize",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedSize){d.getModel().beginUpdate();try{for(var k=d.getResizableCells(d.getSelectionCells()),
u=0;u<k.length;u++)if(d.getModel().isVertex(k[u])){var w=d.getCellGeometry(k[u]);null!=w&&(w=w.clone(),w.width=f.copiedSize.width,w.height=f.copiedSize.height,d.getModel().setGeometry(k[u],w))}}finally{d.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+V");this.addAction("copyData",function(){var k=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&&null!=k&&(k=k.cloneValue(),null==k||isNaN(k.nodeType)||(f.copiedValue=k))},null,null,Editor.altKey+"+"+Editor.shiftKey+
-"+B");this.addAction("copyAsText",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k)try{d.isHtmlLabel(k)?f.writeHtmlToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)})):f.writeTextToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)}))}catch(u){f.handleError(u)}});this.addAction("pasteData",function(k,u){function w(D,E){var F=y.getValue(D);E=D.cloneValue(E);E.removeAttribute("placeholders");null==F||isNaN(F.nodeType)||E.setAttribute("placeholders",
-F.getAttribute("placeholders"));null!=k&&mxEvent.isShiftDown(k)||E.setAttribute("label",d.convertValueToString(D));y.setValue(D,E)}k=null!=u?u:k;var y=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedValue){y.beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());if(0==A.length)w(y.getRoot(),f.copiedValue);else for(u=0;u<A.length;u++)w(A[u],f.copiedValue)}finally{y.endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+E");this.addAction("delete",function(k,u){k=
+"+B");this.addAction("copyAsText",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k)try{d.isHtmlLabel(k)?f.writeHtmlToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)})):f.writeTextToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)}))}catch(u){f.handleError(u)}});this.addAction("pasteData",function(k,u){function w(E,D){var F=y.getValue(E);D=E.cloneValue(D);D.removeAttribute("placeholders");null==F||isNaN(F.nodeType)||D.setAttribute("placeholders",
+F.getAttribute("placeholders"));null!=k&&mxEvent.isShiftDown(k)||D.setAttribute("label",d.convertValueToString(E));y.setValue(E,D)}k=null!=u?u:k;var y=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedValue){y.beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());if(0==A.length)w(y.getRoot(),f.copiedValue);else for(u=0;u<A.length;u++)w(A[u],f.copiedValue)}finally{y.endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+E");this.addAction("delete",function(k,u){k=
null!=u?u:k;null!=k&&mxEvent.isShiftDown(k)?b():a(null!=k&&(mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)||mxEvent.isAltDown(k)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(k){f.handleError(k)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action("merge",
function(){var k=f.getSelectionState();if(null!=k.mergeCell){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",k.rowspan,[k.mergeCell]),d.setCellStyles("colspan",k.colspan,[k.mergeCell])}finally{d.getModel().endUpdate()}}}));this.put("unmergeCells",new Action("unmerge",function(){var k=f.getSelectionState();if(0<k.cells.length){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",null,k.cells),d.setCellStyles("colspan",null,k.cells)}finally{d.getModel().endUpdate()}}}));m=new Action("turn",
function(k,u){k=null!=u?u:k;d.turnShapes(d.getResizableCells(d.getSelectionCells()),null!=k?mxEvent.isShiftDown(k):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R");m.getTitle=function(){return mxResources.get("turn")+" / "+mxResources.get("reverse")};this.put("turn",m);this.put("selectConnections",new Action("selectEdges",function(k){k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.addSelectionCells(d.getEdges(k))}));this.addAction("selectVertices",function(){d.selectVertices(null,!0)},null,
@@ -3608,7 +3612,7 @@ null==w&&(w=k.value.getAttribute("tooltip"));null!=w&&(u=w)}u=new TextareaDialog
!0)||"";f.showLinkDialog(u,mxResources.get("ok"),function(w,y,A){d.getModel().beginUpdate();try{d.setLinkForCell(k,0<w.length?w:null),d.setAttributeForCell(k,"linkTarget",A)}finally{d.getModel().endUpdate()}},!0,d.getLinkTargetForCell(k))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+L");this.put("insertImage",new Action("image...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),f.actions.get("image").funct())})).isEnabled=h;this.addAction("editImage...",function(){f.actions.get("image").funct()});
this.put("insertLink",new Action("link...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&f.showLinkDialog("",mxResources.get("ok"),function(k,u,w){k=mxUtils.trim(k);if(0<k.length){var y=null,A=d.getLinkTitle(k);null!=u&&0<u.length&&(y=u[0].iconUrl,A=u[0].name||u[0].type,A=A.charAt(0).toUpperCase()+A.substring(1),30<A.length&&(A=A.substring(0,30)+"..."));u=new mxCell(A,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=y?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+
y:"spacing=10;"));u.vertex=!0;y=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([u],!0));u.geometry.x=y.x;u.geometry.y=y.y;d.setAttributeForCell(u,"linkTarget",w);d.setLinkForCell(u,k);d.cellSizeUpdated(u,!0);d.getModel().beginUpdate();try{u=d.addCell(u),d.fireEvent(new mxEventObject("cellsInserted","cells",[u]))}finally{d.getModel().endUpdate()}d.setSelectionCell(u);d.scrollCellToVisible(d.getSelectionCell())}},!0)},null,null,"L")).isEnabled=h;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var k=
-d.getSelectedElement(),u=d.getParentByName(k,"A",d.cellEditor.textarea),w="";if(null==u&&null!=k&&null!=k.getElementsByTagName)for(var y=k.getElementsByTagName("a"),A=0;A<y.length&&null==u;A++)y[A].textContent==k.textContent&&(u=y[A]);null!=u&&"A"==u.nodeName&&(w=u.getAttribute("href")||"",d.selectNode(u));var D=d.cellEditor.saveSelection();f.showLinkDialog(w,mxResources.get("ok"),mxUtils.bind(this,function(E){d.cellEditor.restoreSelection(D);null!=E&&d.insertLink(E)}))}else d.isSelectionEmpty()?
+d.getSelectedElement(),u=d.getParentByName(k,"A",d.cellEditor.textarea),w="";if(null==u&&null!=k&&null!=k.getElementsByTagName)for(var y=k.getElementsByTagName("a"),A=0;A<y.length&&null==u;A++)y[A].textContent==k.textContent&&(u=y[A]);null!=u&&"A"==u.nodeName&&(w=u.getAttribute("href")||"",d.selectNode(u));var E=d.cellEditor.saveSelection();f.showLinkDialog(w,mxResources.get("ok"),mxUtils.bind(this,function(D){d.cellEditor.restoreSelection(E);null!=D&&d.insertLink(D)}))}else d.isSelectionEmpty()?
this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=h;this.addAction("autosize",function(){var k=d.getSelectionCells();if(null!=k){d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var w=k[u];d.getModel().isVertex(w)&&(0<d.getModel().getChildCount(w)?d.updateGroupBounds([w],0,!0):d.updateCellSize(w))}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});
this.addAction("formattedText",function(){d.stopEditing();var k=d.getCommonStyle(d.getSelectionCells());k="1"==mxUtils.getValue(k,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var u=d.getEditableCells(d.getSelectionCells()),w=0;w<u.length;w++)if(state=d.getView().getState(u[w]),null!=state){var y=mxUtils.getValue(state.style,"html","0");if("1"==y&&null==k)d.removeTextStyleForCell(state.cell),d.setCellStyles("html",k,[u[w]]);else if("0"==y&&"1"==k){var A=mxUtils.htmlEntities(d.convertValueToString(state.cell),
!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(A=A.replace(/\n/g,"<br/>"));d.cellLabelChanged(state.cell,Graph.sanitizeHtml(A));d.setCellStyles("html",k,[u[w]])}}f.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=k?k:"0"],"cells",u))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var k=d.getView().getState(d.getSelectionCell()),u="wrap";d.stopEditing();null!=k&&"wrap"==k.style[mxConstants.STYLE_WHITE_SPACE]&&(u=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
@@ -3622,8 +3626,8 @@ f.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});m.setToggleAction(!0)
m.setToggleAction(!0);m.setSelectedCallback(function(){return d.pageVisible});m=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;f.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionArrowsEnabled});m=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());f.fireEvent(new mxEventObject("connectionPointsChanged"))},
null,null,Editor.altKey+"+"+Editor.shiftKey+"+O");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});m=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());f.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});m.isEnabled=h;m=this.addAction("autosave",function(){f.editor.setAutosave(!f.editor.autosave)});
m.setToggleAction(!0);m.setSelectedCallback(function(){return f.editor.autosave});m.isEnabled=h;m.visible=!1;this.addAction("help",function(){var k="";mxResources.isLanguageSupported(mxClient.language)&&(k="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+k+".html")});var p=!1;m=new Action("about",function(){p||(f.showDialog((new AboutDialog(f)).container,320,280,!0,!0,function(){p=!1}),p=!0)});m.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",m);m=
-mxUtils.bind(this,function(k,u,w,y){return this.addAction(k,function(){if(null!=w&&d.cellEditor.isContentEditing())w();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,u,A);(u&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(A,function(E){E.style.fontWeight=null;"B"==E.nodeName&&d.replaceElement(E)}):(u&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(A,
-function(E){E.style.fontStyle=null;"I"==E.nodeName&&d.replaceElement(E)}):(u&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(A,function(E){E.style.textDecoration=null;"U"==E.nodeName&&d.replaceElement(E)});for(var D=0;D<A.length;D++)0==d.model.getChildCount(A[D])&&d.autoSizeCell(A[D],!1)}finally{d.getModel().endUpdate()}}},null,null,y)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,
+mxUtils.bind(this,function(k,u,w,y){return this.addAction(k,function(){if(null!=w&&d.cellEditor.isContentEditing())w();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,u,A);(u&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(A,function(D){D.style.fontWeight=null;"B"==D.nodeName&&d.replaceElement(D)}):(u&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(A,
+function(D){D.style.fontStyle=null;"I"==D.nodeName&&d.replaceElement(D)}):(u&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(A,function(D){D.style.textDecoration=null;"U"==D.nodeName&&d.replaceElement(D)});for(var E=0;E<A.length;E++)0==d.model.getChildCount(A[E])&&d.autoSizeCell(A[E],!1)}finally{d.getModel().endUpdate()}}},null,null,y)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,
function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){f.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",d.shapeForegroundColor)});this.addAction("strokeColor...",function(){f.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("fillColor...",function(){f.menus.pickColor(mxConstants.STYLE_FILLCOLOR,
null,null,"default",d.shapeBackgroundColor)});this.addAction("gradientColor...",function(){f.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("backgroundColor...",function(){f.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor",null,"default",d.shapeBackgroundColor)});this.addAction("borderColor...",function(){f.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("removeFormat",
function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&!d.isEditing()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.removeTextStyleForCell(k[u],!0)}finally{d.getModel().endUpdate()}}});this.addAction("vertical",function(){f.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){f.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,
@@ -3639,10 +3643,10 @@ null!=k.handler&&k.handler.removePoint(k.handler.state,k.index)});this.addAction
this.addAction("clearWaypoints",function(){var k=d.getSelectionCells();if(null!=k){k=d.getEditableCells(d.addAllEdges(k));d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var w=k[u];if(d.getModel().isEdge(w)){var y=d.getCellGeometry(w);null!=y&&(y=y.clone(),y.points=null,y.x=0,y.y=0,y.offset=null,d.getModel().setGeometry(w,y))}}}finally{d.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+R");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&
document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,
Math.max(1,k-1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" + (Numpad)");m=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,k+1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" - (Numpad)");this.addAction("image...",function(){if(d.isEnabled()&&
-!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),w="",y=null;null!=u&&(w=u.style[mxConstants.STYLE_IMAGE]||w,y=u.style[mxConstants.STYLE_CLIP_PATH]||y);var A=d.cellEditor.saveSelection();f.showImageDialog(k,w,function(D,E,F,H,M,N){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(A),d.insertImage(D,E,F);else{var J=d.getSelectionCells();if(null!=D&&(0<D.length||0<J.length)){var V=null;
-d.getModel().beginUpdate();try{if(0==J.length){J=[d.insertVertex(d.getDefaultParent(),null,"",0,0,E,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var W=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(J,!0));J[0].geometry.x=W.x;J[0].geometry.y=W.y;null!=H&&e(J[0],H,M,N,d);V=J;d.fireEvent(new mxEventObject("cellsInserted","cells",V))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<D.length?D:null,J);var T=d.getCurrentCellStyle(J[0]);"image"!=T[mxConstants.STYLE_SHAPE]&&
-"label"!=T[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",J):0==D.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,J);null==H&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,J);if(null!=E&&null!=F)for(D=0;D<J.length;D++){var O=J[D];if("0"!=d.getCurrentCellStyle(O).expand){var fa=d.getModel().getGeometry(O);null!=fa&&(fa=fa.clone(),fa.width=E,fa.height=F,d.getModel().setGeometry(O,fa))}null!=H&&e(O,H,M,N,d)}}finally{d.getModel().endUpdate()}null!=V&&(d.setSelectionCells(V),
-d.scrollCellToVisible(V[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,y)}}).isEnabled=h;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],y=u[mxConstants.STYLE_SHAPE];w&&"image"==y&&(u=new CropImageDialog(f,w,u[mxConstants.STYLE_CLIP_PATH],function(A,D,E){e(k,A,D,E,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=h;m=this.addAction("layers",
+!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),w="",y=null;null!=u&&(w=u.style[mxConstants.STYLE_IMAGE]||w,y=u.style[mxConstants.STYLE_CLIP_PATH]||y);var A=d.cellEditor.saveSelection();f.showImageDialog(k,w,function(E,D,F,H,M,N){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(A),d.insertImage(E,D,F);else{var J=d.getSelectionCells();if(null!=E&&(0<E.length||0<J.length)){var V=null;
+d.getModel().beginUpdate();try{if(0==J.length){J=[d.insertVertex(d.getDefaultParent(),null,"",0,0,D,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var W=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(J,!0));J[0].geometry.x=W.x;J[0].geometry.y=W.y;null!=H&&e(J[0],H,M,N,d);V=J;d.fireEvent(new mxEventObject("cellsInserted","cells",V))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<E.length?E:null,J);var T=d.getCurrentCellStyle(J[0]);"image"!=T[mxConstants.STYLE_SHAPE]&&
+"label"!=T[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",J):0==E.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,J);null==H&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,J);if(null!=D&&null!=F)for(E=0;E<J.length;E++){var O=J[E];if("0"!=d.getCurrentCellStyle(O).expand){var fa=d.getModel().getGeometry(O);null!=fa&&(fa=fa.clone(),fa.width=D,fa.height=F,d.getModel().setGeometry(O,fa))}null!=H&&e(O,H,M,N,d)}}finally{d.getModel().endUpdate()}null!=V&&(d.setSelectionCells(V),
+d.scrollCellToVisible(V[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,y)}}).isEnabled=h;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],y=u[mxConstants.STYLE_SHAPE];w&&"image"==y&&(u=new CropImageDialog(f,w,u[mxConstants.STYLE_CLIP_PATH],function(A,E,D){e(k,A,E,D,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=h;m=this.addAction("layers",
mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(f,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),f.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),
null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("format",mxUtils.bind(this,function(){f.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return f.isFormatPanelVisible()}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?
(this.outlineWindow=new OutlineWindow(f,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),f.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+
@@ -3692,20 +3696,20 @@ w&&0<w.length&&(e.scrollCellToVisible(w[0]),e.setSelectionCells(w))}),b):(m&&(b=
b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),Editor.removeColumnImage,mxUtils.bind(this,function(){if(null!=f)try{h?e.deleteLane(f):e.deleteTableColumn(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("deleteColumn"))),p&&(b=a.addItem(mxResources.get("insertRowBefore"),Editor.addRowAboveImage,mxUtils.bind(this,function(){try{h?e.insertLane(f,!0):e.insertTableRow(f,!0)}catch(k){this.editorUi.handleError(k)}})),
b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),Editor.addRowBelowImage,mxUtils.bind(this,function(){try{h?e.insertLane(f,!1):e.insertTableRow(f,!1)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),Editor.removeRowImage,mxUtils.bind(this,function(){try{h?e.deleteLane(f):e.deleteTableRow(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",
mxResources.get("deleteRow")),p=this.editorUi.getSelectionState(),null!=p.mergeCell?this.addMenuItem(a,"mergeCells"):(1<p.style.colspan||1<p.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};
-Menus.prototype.addInsertTableItem=function(a,b,e,f){function g(A){y=d.getParentByName(mxEvent.getSource(A),"TD");var D=!1;if(null!=y){w=d.getParentByName(y,"TR");var E=mxEvent.isMouseEvent(A)?2:4,F=k,H=Math.min(20,w.sectionRowIndex+E);E=Math.min(20,y.cellIndex+E);for(var M=F.rows.length;M<H;M++)for(var N=F.insertRow(M),J=0;J<F.rows[0].cells.length;J++)N.insertCell(-1);for(M=0;M<F.rows.length;M++)for(N=F.rows[M],J=N.cells.length;J<E;J++)N.insertCell(-1);u.innerHTML=y.cellIndex+1+"x"+(w.sectionRowIndex+
-1);for(F=0;F<k.rows.length;F++)for(H=k.rows[F],E=0;E<H.cells.length;E++)M=H.cells[E],F==w.sectionRowIndex&&E==y.cellIndex&&(D="blue"==M.style.backgroundColor),M.style.backgroundColor=F<=w.sectionRowIndex&&E<=y.cellIndex?"blue":"transparent"}mxEvent.consume(A);return D}f=null!=f?f:!0;var d=this.editorUi.editor.graph;b=null!=b?b:mxUtils.bind(this,function(A,D,E){if(null!=d.getParentByName(mxEvent.getSource(A),"TD")&&null!=d.cellEditor.textarea){var F=d.cellEditor.textarea.getElementsByTagName("table");
-A=[];for(var H=0;H<F.length;H++)A.push(F[H]);d.container.focus();H=d;F=H.pasteHtmlAtCaret;for(var M=["<table>"],N=0;N<D;N++){M.push("<tr>");for(var J=0;J<E;J++)M.push("<td><br></td>");M.push("</tr>")}M.push("</table>");D=M.join("");F.call(H,D);D=d.cellEditor.textarea.getElementsByTagName("table");if(D.length==A.length+1)for(H=D.length-1;0<=H;H--)if(0==H||D[H]!=A[H-1]){d.selectNode(D[H].rows[0].cells[0]);break}}});null==e&&(a.div.classList.add("geToolbarMenu"),a.labels=!1);a=a.addItem("",null,null,
+Menus.prototype.addInsertTableItem=function(a,b,e,f){function g(A){y=d.getParentByName(mxEvent.getSource(A),"TD");var E=!1;if(null!=y){w=d.getParentByName(y,"TR");var D=mxEvent.isMouseEvent(A)?2:4,F=k,H=Math.min(20,w.sectionRowIndex+D);D=Math.min(20,y.cellIndex+D);for(var M=F.rows.length;M<H;M++)for(var N=F.insertRow(M),J=0;J<F.rows[0].cells.length;J++)N.insertCell(-1);for(M=0;M<F.rows.length;M++)for(N=F.rows[M],J=N.cells.length;J<D;J++)N.insertCell(-1);u.innerHTML=y.cellIndex+1+"x"+(w.sectionRowIndex+
+1);for(F=0;F<k.rows.length;F++)for(H=k.rows[F],D=0;D<H.cells.length;D++)M=H.cells[D],F==w.sectionRowIndex&&D==y.cellIndex&&(E="blue"==M.style.backgroundColor),M.style.backgroundColor=F<=w.sectionRowIndex&&D<=y.cellIndex?"blue":"transparent"}mxEvent.consume(A);return E}f=null!=f?f:!0;var d=this.editorUi.editor.graph;b=null!=b?b:mxUtils.bind(this,function(A,E,D){if(null!=d.getParentByName(mxEvent.getSource(A),"TD")&&null!=d.cellEditor.textarea){var F=d.cellEditor.textarea.getElementsByTagName("table");
+A=[];for(var H=0;H<F.length;H++)A.push(F[H]);d.container.focus();H=d;F=H.pasteHtmlAtCaret;for(var M=["<table>"],N=0;N<E;N++){M.push("<tr>");for(var J=0;J<D;J++)M.push("<td><br></td>");M.push("</tr>")}M.push("</table>");E=M.join("");F.call(H,E);E=d.cellEditor.textarea.getElementsByTagName("table");if(E.length==A.length+1)for(H=E.length-1;0<=H;H--)if(0==H||E[H]!=A[H-1]){d.selectNode(E[H].rows[0].cells[0]);break}}});null==e&&(a.div.classList.add("geToolbarMenu"),a.labels=!1);a=a.addItem("",null,null,
e,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";e=a.getElementsByTagName("td");1<e.length&&(e[1].style.display="none",e[2].style.display="none");a.firstChild.innerText="";var h=document.createElement("input");h.setAttribute("id","geTitleOption");h.setAttribute("type","checkbox");h.style.verticalAlign="middle";e=document.createElement("label");mxUtils.write(e,mxResources.get("title"));e.setAttribute("for","geTitleOption");e.style.verticalAlign="middle";mxEvent.addGestureListeners(e,
null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));mxEvent.addGestureListeners(h,null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");m.style.verticalAlign="middle";var p=document.createElement("label");mxUtils.write(p,mxResources.get("container"));p.setAttribute("for","geContainerOption");p.style.verticalAlign="middle";mxEvent.addGestureListeners(p,null,null,mxUtils.bind(this,
-function(A){mxEvent.consume(A)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));f&&(a.firstChild.appendChild(h),a.firstChild.appendChild(e),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(p),mxUtils.br(a.firstChild));var k=function(A,D){var E=document.createElement("table");E.className="geInsertTablePicker";E.setAttribute("border","1");E.style.borderCollapse="collapse";E.style.borderStyle="solid";E.style.marginBottom="4px";
-E.style.marginTop="8px";E.setAttribute("cellPadding","8");for(var F=0;F<A;F++)for(var H=E.insertRow(F),M=0;M<D;M++)H.insertCell(-1);return E}(5,5);a.firstChild.appendChild(k);var u=document.createElement("div");u.style.textAlign="center";u.style.padding="4px";u.style.width="100%";u.innerHTML="1x1";a.firstChild.appendChild(u);var w=null,y=null;mxEvent.addGestureListeners(k,null,null,mxUtils.bind(this,function(A){var D=g(A);null!=y&&null!=w&&D&&(b(A,w.sectionRowIndex+1,y.cellIndex+1,h.checked,m.checked),
+function(A){mxEvent.consume(A)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));f&&(a.firstChild.appendChild(h),a.firstChild.appendChild(e),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(p),mxUtils.br(a.firstChild));var k=function(A,E){var D=document.createElement("table");D.className="geInsertTablePicker";D.setAttribute("border","1");D.style.borderCollapse="collapse";D.style.borderStyle="solid";D.style.marginBottom="4px";
+D.style.marginTop="8px";D.setAttribute("cellPadding","8");for(var F=0;F<A;F++)for(var H=D.insertRow(F),M=0;M<E;M++)H.insertCell(-1);return D}(5,5);a.firstChild.appendChild(k);var u=document.createElement("div");u.style.textAlign="center";u.style.padding="4px";u.style.width="100%";u.innerHTML="1x1";a.firstChild.appendChild(u);var w=null,y=null;mxEvent.addGestureListeners(k,null,null,mxUtils.bind(this,function(A){var E=g(A);null!=y&&null!=w&&E&&(b(A,w.sectionRowIndex+1,y.cellIndex+1,h.checked,m.checked),
window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(k,"mouseover",g)};
-Menus.prototype.edgeStyleChange=function(a,b,e,f,g,d,h,m){return this.showIconOnly(a.addItem(b,m,mxUtils.bind(this,function(){var p=this.editorUi.editor.graph;p.stopEditing(!1);p.getModel().beginUpdate();try{for(var k=p.getSelectionCells(),u=[],w=0;w<k.length;w++){var y=k[w];if(p.getModel().isEdge(y)){if(h){var A=p.getCellGeometry(y);null!=A&&(A=A.clone(),A.points=null,p.getModel().setGeometry(y,A))}for(var D=0;D<e.length;D++)p.setCellStyles(e[D],f[D],[y]);u.push(y)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
+Menus.prototype.edgeStyleChange=function(a,b,e,f,g,d,h,m){return this.showIconOnly(a.addItem(b,m,mxUtils.bind(this,function(){var p=this.editorUi.editor.graph;p.stopEditing(!1);p.getModel().beginUpdate();try{for(var k=p.getSelectionCells(),u=[],w=0;w<k.length;w++){var y=k[w];if(p.getModel().isEdge(y)){if(h){var A=p.getCellGeometry(y);null!=A&&(A=A.clone(),A.points=null,p.getModel().setGeometry(y,A))}for(var E=0;E<e.length;E++)p.setCellStyles(e[E],f[E],[y]);u.push(y)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
"cells",u,"keys",e,"values",f,"force",0==k.length))}finally{p.getModel().endUpdate()}}),d,g))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};
Menus.prototype.styleChange=function(a,b,e,f,g,d,h,m,p,k){var u=this.createStyleChangeFunction(e,f);a=a.addItem(b,k,mxUtils.bind(this,function(){var w=this.editorUi.editor.graph;null!=h&&w.cellEditor.isContentEditing()?h():u(m)}),d,g);p&&this.showIconOnly(a);return a};
Menus.prototype.createStyleChangeFunction=function(a,b){return mxUtils.bind(this,function(e){var f=this.editorUi.editor.graph;f.stopEditing(!1);f.getModel().beginUpdate();try{for(var g=f.getEditableCells(f.getSelectionCells()),d=!1,h=0;h<a.length;h++)if(f.setCellStyles(a[h],b[h],g),a[h]==mxConstants.STYLE_ALIGN&&f.updateLabelElements(g,function(m){m.removeAttribute("align");m.style.textAlign=null}),a[h]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[h])d=!0;if(d)for(d=0;d<g.length;d++)0==f.model.getChildCount(g[d])&&
f.autoSizeCell(g[d],!1);null!=e&&e();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",b,"cells",g))}finally{f.getModel().endUpdate()}})};
-Menus.prototype.promptChange=function(a,b,e,f,g,d,h,m,p,k){return a.addItem(b,null,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph,w=f,y=u.getView().getState(u.getSelectionCell());null!=y&&(w=y.style[g]||w);var A=null!=k?k():!0;w=new FilenameDialog(this.editorUi,w,mxResources.get("apply"),mxUtils.bind(this,function(D){if(null!=D&&0<D.length){if(A){u.getModel().beginUpdate();try{u.stopEditing(!1),u.setCellStyles(g,D)}finally{u.getModel().endUpdate()}}null!=m&&m(D)}}),mxResources.get("enterValue")+
+Menus.prototype.promptChange=function(a,b,e,f,g,d,h,m,p,k){return a.addItem(b,null,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph,w=f,y=u.getView().getState(u.getSelectionCell());null!=y&&(w=y.style[g]||w);var A=null!=k?k():!0;w=new FilenameDialog(this.editorUi,w,mxResources.get("apply"),mxUtils.bind(this,function(E){if(null!=E&&0<E.length){if(A){u.getModel().beginUpdate();try{u.stopEditing(!1),u.setCellStyles(g,E)}finally{u.getModel().endUpdate()}}null!=m&&m(E)}}),mxResources.get("enterValue")+
(0<e.length?" "+e:""),null,null,null,null,function(){null!=m&&null!=k&&m(null)});this.editorUi.showDialog(w.container,300,80,!0,!0);w.init()}),d,p,h)};
Menus.prototype.pickColor=function(a,b,e,f,g,d){this.editorUi.tryAndHandle(mxUtils.bind(this,function(){var h=this.editorUi.editor.graph;if(null!=b&&h.cellEditor.isContentEditing()){var m=h.getSelectedEditingElement();null!=m&&null!=h.cellEditor.textarea&&(m=h.getTextColor(m,"forecolor"==b),this.editorUi.pickColor(m,mxUtils.bind(this,function(k){null!=h.cellEditor.textarea&&(Graph.setTextColor(h.cellEditor.textarea,k,"forecolor"==b),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",
["forecolor"==b?mxConstants.STYLE_FONTCOLOR:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[k],"cells",[h.cellEditor.getEditingCell()])))}),f,g,d))}else{var p=h.getCellStyle(h.getSelectionCell(),!1);m=mxConstants.NONE;null!=p&&(m=p[a]||m);this.editorUi.pickColor(m,ColorDialog.createApplyFunction(this.editorUi,a),f,g,d)}}))};
@@ -3730,8 +3734,8 @@ Menu.prototype.execute=function(a,b){this.funct(a,b)};EditorUi.prototype.createM
Toolbar.prototype.init=function(){var a=this.addMenu(this.editorUi.menus.get("viewPanels"),null,Editor.dockRightImage);a.setAttribute("data-min-width","720");this.addSeparator(null,720);var b=this.editorUi.createZoomInput();b.setAttribute("data-min-width","580");this.container.appendChild(b);this.addSeparator(null,580);this.addItems(["zoomIn","zoomOut"],null,null,[Editor.zoomInImage,Editor.zoomOutImage],460);this.addSeparator(null,460);this.addItems(["undo","redo"],null,null,[Editor.undoImage,Editor.redoImage]);
this.addSeparator(null,260);this.addItems(["delete"],null,null,[Editor.trashImage],260);this.addSeparator(null,300);this.addItems(["toFront","toBack"],null,null,[Editor.toFrontImage,Editor.toBackImage],660);this.addSeparator(null,660);this.addItems(["fillColor"],null,null,[Editor.fillColorImage],740);this.addItems(["strokeColor"],null,null,[Editor.strokeColorImage],780);this.addItems(["shadow"],null,null,[Editor.shadowImage],820);this.addSeparator(null,820);this.edgeShapeMenu=this.addMenu(this.editorUi.menus.get("edgeShape"));
this.edgeShapeMenu.setAttribute("data-min-width",440);this.edgeStyleMenu=this.addMenu(this.editorUi.menus.get("edgeStyle"));this.edgeStyleMenu.setAttribute("data-min-width",480);this.addSeparator(null,480);var e=this.addMenu(this.editorUi.menus.get("insert"),null,Editor.plusImage);e.setAttribute("data-min-width",300);var f=e.cloneNode(!0);f.setAttribute("data-min-width",330);f.style.backgroundImage="url("+Editor.shapesImage+")";this.editorUi.addShapePicker(f,!0);this.container.appendChild(f);var g=
-this.addTableDropDown();g.setAttribute("data-min-width",360);this.editorUi.dependsOnLanguage(mxUtils.bind(this,function(){null!=this.edgeShapeMenu&&this.edgeShapeMenu.setAttribute("title",mxResources.get("connection"));null!=this.edgeStyleMenu&&this.edgeStyleMenu.setAttribute("title",mxResources.get("waypoints"));a.setAttribute("title",mxResources.get("view")+" ("+mxResources.get("panTooltip")+")");e.setAttribute("title",mxResources.get("insert")+" ("+mxResources.get("doubleClickTooltip")+")");f.setAttribute("title",
-mxResources.get("shapes"));g.setAttribute("title",mxResources.get("table"))}))};Toolbar.prototype.appendDropDownImageHtml=function(a){a.style.backgroundImage="url("+Editor.thinExpandImage+")";a.style.backgroundPosition="right 0px top 50%";a.style.paddingRight="16px"};
+this.addTableDropDown();g.setAttribute("data-min-width",360);this.addSeparator(null,360);this.addItems(["insertFreehand","generate"],null,null,[Editor.freehandImage,Editor.sparklesImage],420);this.editorUi.dependsOnLanguage(mxUtils.bind(this,function(){null!=this.edgeShapeMenu&&this.edgeShapeMenu.setAttribute("title",mxResources.get("connection"));null!=this.edgeStyleMenu&&this.edgeStyleMenu.setAttribute("title",mxResources.get("waypoints"));a.setAttribute("title",mxResources.get("view")+" ("+mxResources.get("panTooltip")+
+")");e.setAttribute("title",mxResources.get("insert")+" ("+mxResources.get("doubleClickTooltip")+")");f.setAttribute("title",mxResources.get("shapes"));g.setAttribute("title",mxResources.get("table"))}))};Toolbar.prototype.appendDropDownImageHtml=function(a){a.style.backgroundImage="url("+Editor.thinExpandImage+")";a.style.backgroundPosition="right 0px top 50%";a.style.paddingRight="16px"};
Toolbar.prototype.addTableDropDown=function(){var a=this.addMenu(new Menu(mxUtils.bind(this,function(e){this.editorUi.menus.addInsertTableCellItem(e)})),null,Editor.tableImage),b=this.editorUi.menus.get("insert");null!=b&&"function"===typeof a.setEnabled&&b.addListener("stateChanged",function(){a.setEnabled(b.enabled)});return a};
Toolbar.prototype.setFontName=function(a){if(null!=this.fontMenu){this.fontMenu.innerText="";var b=document.createElement("span");mxUtils.write(b,a);this.fontMenu.appendChild(b);this.appendDropDownImageHtml(this.fontMenu)}};Toolbar.prototype.setFontSize=function(a){if(null!=this.sizeMenu){this.sizeMenu.innerText="";var b=document.createElement("span");mxUtils.write(b,a);this.sizeMenu.appendChild(b);this.appendDropDownImageHtml(this.sizeMenu)}};
Toolbar.prototype.createTextToolbar=function(){var a=this.editorUi,b=a.editor.graph,e=this.addMenu(this.editorUi.menus.get("formatBlock"),"");e.style.width="54px";e.setAttribute("data-min-width",360);this.appendDropDownImageHtml(e);this.addSeparator(null,360);var f=this.addMenu(this.editorUi.menus.get("fontFamily"),"");this.fontMenu=f;this.fontMenu.style.width="82px";this.fontMenu.setAttribute("data-min-width",240);this.setFontName(Menus.prototype.defaultFont);this.addSeparator(null,280);var g=this.addMenu(this.editorUi.menus.get("fontSize"),
@@ -3746,50 +3750,50 @@ p.addItem("",Editor.removeFormatImage,mxUtils.bind(this,function(){document.exec
!1,null)}))})),null,Editor.plusImage);h.setAttribute("data-min-width",700);this.addSeparator(null,700);var m=this.addMenu(new Menu(mxUtils.bind(this,function(p){var k=b.getSelectedElement(),u=b.getParentByNames(k,["TD","TH"],b.cellEditor.text2),w=b.getParentByName(k,"TR",b.cellEditor.text2);if(null==w)this.editorUi.menus.addInsertTableItem(p);else{var y=b.getParentByName(w,"TABLE",b.cellEditor.text2);k=p.addItem("",Editor.addColumnLeftImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(y,
null!=u?u.cellIndex:0))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertColumnBefore"));k=p.addItem("",Editor.addColumnRightImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(y,null!=u?u.cellIndex+1:-1))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertColumnAfter"));k=p.addItem("Delete column",Editor.removeColumnImage,mxUtils.bind(this,function(){if(null!=u)try{b.deleteColumn(y,u.cellIndex)}catch(A){this.editorUi.handleError(A)}}));
k.setAttribute("title",mxResources.get("deleteColumn"));k=p.addItem("",Editor.addRowAboveImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(y,w.sectionRowIndex))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertRowBefore"));k=p.addItem("",Editor.addRowBelowImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(y,w.sectionRowIndex+1))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertRowAfter"));k=p.addItem("",
-Editor.removeRowImage,mxUtils.bind(this,function(){try{b.deleteRow(y,w.sectionRowIndex)}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("deleteRow"));k=p.addItem("",Editor.strokeColorImage,mxUtils.bind(this,function(){var A=y.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(D,E,F,H){return"#"+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,
-function(D){null==D||D==mxConstants.NONE?(y.removeAttribute("border"),y.style.border="",y.style.borderCollapse=""):(y.setAttribute("border","1"),y.style.border="1px solid "+D,y.style.borderCollapse="collapse")})}));k.setAttribute("title",mxResources.get("borderColor"));k=p.addItem("",Editor.fillColorImage,mxUtils.bind(this,function(){var A=y.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(D,E,F,H){return"#"+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+
-("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(D){y.style.backgroundColor=null==D||D==mxConstants.NONE?"":D})}));k.setAttribute("title",mxResources.get("backgroundColor"));k=p.addItem("",Editor.spacingImage,mxUtils.bind(this,function(){var A=y.getAttribute("cellPadding")||0;A=new FilenameDialog(this.editorUi,A,mxResources.get("apply"),mxUtils.bind(this,function(D){null!=D&&0<D.length?y.setAttribute("cellPadding",D):y.removeAttribute("cellPadding")}),mxResources.get("spacing"));
+Editor.removeRowImage,mxUtils.bind(this,function(){try{b.deleteRow(y,w.sectionRowIndex)}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("deleteRow"));k=p.addItem("",Editor.strokeColorImage,mxUtils.bind(this,function(){var A=y.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(E,D,F,H){return"#"+("0"+Number(D).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,
+function(E){null==E||E==mxConstants.NONE?(y.removeAttribute("border"),y.style.border="",y.style.borderCollapse=""):(y.setAttribute("border","1"),y.style.border="1px solid "+E,y.style.borderCollapse="collapse")})}));k.setAttribute("title",mxResources.get("borderColor"));k=p.addItem("",Editor.fillColorImage,mxUtils.bind(this,function(){var A=y.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(E,D,F,H){return"#"+("0"+Number(D).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+
+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(E){y.style.backgroundColor=null==E||E==mxConstants.NONE?"":E})}));k.setAttribute("title",mxResources.get("backgroundColor"));k=p.addItem("",Editor.spacingImage,mxUtils.bind(this,function(){var A=y.getAttribute("cellPadding")||0;A=new FilenameDialog(this.editorUi,A,mxResources.get("apply"),mxUtils.bind(this,function(E){null!=E&&0<E.length?y.setAttribute("cellPadding",E):y.removeAttribute("cellPadding")}),mxResources.get("spacing"));
this.editorUi.showDialog(A.container,300,80,!0,!0);A.init()}));k.setAttribute("title",mxResources.get("spacing"));k=p.addItem("",Editor.alignLeftImage,mxUtils.bind(this,function(){y.setAttribute("align","left")}));k.setAttribute("title",mxResources.get("left"));k=p.addItem("",Editor.alignCenterImage,mxUtils.bind(this,function(){y.setAttribute("align","center")}));k.setAttribute("title",mxResources.get("center"));k=p.addItem("",Editor.alignRightImage,mxUtils.bind(this,function(){y.setAttribute("align",
"right")}));k.setAttribute("title",mxResources.get("right"))}})),null,Editor.tableImage);m.setAttribute("data-min-width",740);this.editorUi.dependsOnLanguage(mxUtils.bind(this,function(){e.innerText=mxResources.get("style");d.setAttribute("title",mxResources.get("format"));e.setAttribute("title",mxResources.get("style"));f.setAttribute("title",mxResources.get("fontFamily"));g.setAttribute("title",mxResources.get("fontSize"));h.setAttribute("title",mxResources.get("insert"));m.setAttribute("title",
mxResources.get("table"))}))};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.setMenuText=function(a,b){a.getElementsByTagName("span")[0].innerText=b};Toolbar.prototype.setMenuIcon=function(a,b){a.style.backgroundImage="url("+b+")"};
Toolbar.prototype.addMenu=function(a,b,e,f){var g=this.editorUi.createMenuElement("",a.funct);this.editorUi.menus.menuCreated(a,g,"geButton");null!=e?g.style.backgroundImage="url("+e+")":null!=b&&(a=document.createElement("span"),mxUtils.write(a,b),g.appendChild(a));f=null!=f?f:this.container;f.appendChild(g);return g};
-Toolbar.prototype.addSeparator=function(a,b){a=null!=a?a:this.container;var e=document.createElement("div");e.className="geSeparator";a.appendChild(e);null!=b&&e.setAttribute("data-min-width",b);return e};Toolbar.prototype.addItems=function(a,b,e,f,g){for(var d=[],h=0;h<a.length;h++){var m=a[h];"-"==m?d.push(this.addSeparator(b,g)):(m=this.addItem(null!=f?f[h]:null,m,b,e),d.push(m),null!=g&&m.setAttribute("data-min-width",g))}return d};
+Toolbar.prototype.addSeparator=function(a,b){a=null!=a?a:this.container;var e=document.createElement("div");e.className="geSeparator";a.appendChild(e);null!=b&&e.setAttribute("data-min-width",b);return e};Toolbar.prototype.addItems=function(a,b,e,f,g){for(var d=[],h=0;h<a.length;h++){var m=a[h];"-"==m?d.push(this.addSeparator(b,g)):(m=this.addItem(null!=f?f[h]:null,m,b,e),null!=m&&(d.push(m),null!=g&&m.setAttribute("data-min-width",g)))}return d};
Toolbar.prototype.addItem=function(a,b,e){var f=this.editorUi.actions.get(b),g=null;null!=f&&(g=this.editorUi.addButton(a,"",f.funct,null!=e?e:this.container),this.editorUi.dependsOnLanguage(mxUtils.bind(this,function(){var d=f.getTitle();null!=f.shortcut&&(d+=" ("+f.shortcut+")");g.setAttribute("title",d)})),a=mxUtils.bind(this,function(){f.enabled?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}),f.addListener("stateChanged",a),a());return g};
-Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(E,F,H){if(null==E)return[H,H,H];var M=Math.floor(E),
-N=H*(1-F);E=H*(1-F*(M%2?E-M:1-(E-M)));switch(M){case 6:case 0:return[H,E,N];case 1:return[E,H,N];case 2:return[N,H,E];case 3:return[N,E,H];case 4:return[E,N,H];case 5:return[H,N,E]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage+
+Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(D,F,H){if(null==D)return[H,H,H];var M=Math.floor(D),
+N=H*(1-F);D=H*(1-F*(M%2?D-M:1-(D-M)));switch(M){case 6:case 0:return[H,D,N];case 1:return[D,H,N];case 2:return[N,H,D];case 3:return[N,D,H];case 4:return[D,N,H];case 5:return[H,N,D]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage+
")";e.style.position="absolute";e.style.overflow="hidden";e.style.cursor="crosshair";e.style.width="181px";e.style.height="101px";e.style.left="6px";e.style.top="4px";var f=document.createElement("div");f.style.background="url("+this.crossImage+")";f.style.pointerEvents="none";f.style.position="absolute";f.style.width="15px";f.style.height="15px";f.style.left="-8px";f.style.top="-8px";var g=[0,0,1],d=1;e.appendChild(f);b.appendChild(e);sliderBox=document.createElement("div");sliderBox.style.position=
-"absolute";sliderBox.style.cursor="pointer";sliderBox.style.width="38px";sliderBox.style.height="110px";sliderBox.style.left="199px";sliderBox.style.top="4px";var h=document.createElement("div");h.style.border="1px solid light-dark(black, white)";h.style.pointerEvents="none";h.style.overflow="hidden";h.style.position="absolute";h.style.width="16px";h.style.height="101px";h.style.left="9px";h.style.top="0px";var m=!1,p=!1,k=mxUtils.bind(this,function(E){var F=Math.round(100*(1-g[1]));f.style.left=
-Math.round(g[0]/6*180)-8+"px";f.style.top=F-8+"px";F=h.childNodes;var H=a(g[0],g[1],1);if(null!=H){for(var M=0;M<F.length;M++)F[M].style.backgroundColor="rgb("+H[0]*(1-M/F.length)*255+", "+H[1]*(1-M/F.length)*255+", "+H[2]*(1-M/F.length)*255+")";D.style.top=Math.round(100*(1-g[2]))-4+"px";F=a(g[0],g[1],g[2]);F="#"+("0"+Math.round(255*F[0]).toString(16)).slice(-2)+("0"+Math.round(255*F[1]).toString(16)).slice(-2)+("0"+Math.round(255*F[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):
-"");1!=E&&this.fireEvent(new mxEventObject("change","color",mxUtils.rgba2hex(F)))}}),u=mxUtils.bind(this,function(E){0==g[2]&&(g[2]=1);m=!0;y(E)}),w=mxUtils.bind(this,function(E){p=!0;y(E)}),y=mxUtils.bind(this,function(E){if(m){var F=e.getBoundingClientRect(),H=mxEvent.getClientX(E)-F.left;E=mxEvent.getClientY(E)-F.top;f.style.left=H-8+"px";f.style.top=E-8+"px";H*=6/180;E=1-E/100;F=void 0;0>H&&(H=0);6<H&&(H=6);0>E&&(E=0);1<E&&(E=1);0>F&&(F=0);1<F&&(F=1);H=a(null==H?g[0]:g[0]=H,null==E?g[1]:g[1]=
-E,null==F?g[2]:g[2]=F);this.fromString("#"+("0"+Math.floor(255*H[0]).toString(16)).slice(-2)+("0"+Math.floor(255*H[1]).toString(16)).slice(-2)+("0"+Math.floor(255*H[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):""))}else p&&(F=sliderBox.getBoundingClientRect(),E=mxEvent.getClientY(E)-F.top,g[2]=Math.max(Math.min(1,1-E/100),0),k())}),A=mxUtils.bind(this,function(){m=p=!1});mxEvent.addGestureListeners(e,u);mxEvent.addGestureListeners(sliderBox,w);mxEvent.addGestureListeners(b,
-null,y,A);mxEvent.addListener(b,"mouseleave",A);for(u=0;101>u;u+=4)w=document.createElement("div"),w.style.height="4px",w.style.pointerEvents="none",h.appendChild(w);b.appendChild(h);var D=document.createElement("div");D.style.background="url("+this.arrowImage+")";D.style.position="absolute";D.style.pointerEvents="none";D.style.width="7px";D.style.height="11px";D.style.left="2px";D.style.top="-3px";sliderBox.appendChild(D);sliderBox.appendChild(h);b.appendChild(sliderBox);this.fromString=function(E,
-F){F=null!=F?F:!1;if(null==E||""==E||mxUtils.isVarColor(E)||E==mxConstants.NONE)E="#ffffff",F=!0;E=mxUtils.parseColor(E);var H=E.r/255,M=E.g/255,N=E.b/255,J=Math.min(Math.min(H,M),N);var V=Math.max(Math.max(H,M),N);var W=V-J;0===W?V=[null,0,V]:(H=H===J?3+(N-M)/W:M===J?5+(H-N)/W:1+(M-H)/W,V=[6===H?0:H,W/V,V]);null!=V[0]&&(g[0]=V[0]);0!=V[2]&&(g[1]=V[1]);g[2]=V[2];d=E.a;k(F)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";
+"absolute";sliderBox.style.cursor="pointer";sliderBox.style.width="38px";sliderBox.style.height="110px";sliderBox.style.left="199px";sliderBox.style.top="4px";var h=document.createElement("div");h.style.border="1px solid light-dark(black, white)";h.style.pointerEvents="none";h.style.overflow="hidden";h.style.position="absolute";h.style.width="16px";h.style.height="101px";h.style.left="9px";h.style.top="0px";var m=!1,p=!1,k=mxUtils.bind(this,function(D){var F=Math.round(100*(1-g[1]));f.style.left=
+Math.round(g[0]/6*180)-8+"px";f.style.top=F-8+"px";F=h.childNodes;var H=a(g[0],g[1],1);if(null!=H){for(var M=0;M<F.length;M++)F[M].style.backgroundColor="rgb("+H[0]*(1-M/F.length)*255+", "+H[1]*(1-M/F.length)*255+", "+H[2]*(1-M/F.length)*255+")";E.style.top=Math.round(100*(1-g[2]))-4+"px";F=a(g[0],g[1],g[2]);F="#"+("0"+Math.round(255*F[0]).toString(16)).slice(-2)+("0"+Math.round(255*F[1]).toString(16)).slice(-2)+("0"+Math.round(255*F[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):
+"");1!=D&&this.fireEvent(new mxEventObject("change","color",mxUtils.rgba2hex(F)))}}),u=mxUtils.bind(this,function(D){0==g[2]&&(g[2]=1);m=!0;y(D)}),w=mxUtils.bind(this,function(D){p=!0;y(D)}),y=mxUtils.bind(this,function(D){if(m){var F=e.getBoundingClientRect(),H=mxEvent.getClientX(D)-F.left;D=mxEvent.getClientY(D)-F.top;f.style.left=H-8+"px";f.style.top=D-8+"px";H*=6/180;D=1-D/100;F=void 0;0>H&&(H=0);6<H&&(H=6);0>D&&(D=0);1<D&&(D=1);0>F&&(F=0);1<F&&(F=1);H=a(null==H?g[0]:g[0]=H,null==D?g[1]:g[1]=
+D,null==F?g[2]:g[2]=F);this.fromString("#"+("0"+Math.floor(255*H[0]).toString(16)).slice(-2)+("0"+Math.floor(255*H[1]).toString(16)).slice(-2)+("0"+Math.floor(255*H[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):""))}else p&&(F=sliderBox.getBoundingClientRect(),D=mxEvent.getClientY(D)-F.top,g[2]=Math.max(Math.min(1,1-D/100),0),k())}),A=mxUtils.bind(this,function(){m=p=!1});mxEvent.addGestureListeners(e,u);mxEvent.addGestureListeners(sliderBox,w);mxEvent.addGestureListeners(b,
+null,y,A);mxEvent.addListener(b,"mouseleave",A);for(u=0;101>u;u+=4)w=document.createElement("div"),w.style.height="4px",w.style.pointerEvents="none",h.appendChild(w);b.appendChild(h);var E=document.createElement("div");E.style.background="url("+this.arrowImage+")";E.style.position="absolute";E.style.pointerEvents="none";E.style.width="7px";E.style.height="11px";E.style.left="2px";E.style.top="-3px";sliderBox.appendChild(E);sliderBox.appendChild(h);b.appendChild(sliderBox);this.fromString=function(D,
+F){F=null!=F?F:!1;if(null==D||""==D||mxUtils.isVarColor(D)||D==mxConstants.NONE)D="#ffffff",F=!0;D=mxUtils.parseColor(D);var H=D.r/255,M=D.g/255,N=D.b/255,J=Math.min(Math.min(H,M),N);var V=Math.max(Math.max(H,M),N);var W=V-J;0===W?V=[null,0,V]:(H=H===J?3+(N-M)/W:M===J?5+(H-N)/W:1+(M-H)/W,V=[6===H?0:H,W/V,V]);null!=V[0]&&(g[0]=V[0]);0!=V[2]&&(g[1]=V[1]);g[2]=V[2];d=D.a;k(F)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";
ColorPicker.prototype.crossImage="data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=";ColorPicker.prototype.arrowImage="data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7";
var ColorDialog=function(a,b,e,f,g,d,h){function m(da){return mxUtils.color2hex("#"+da).substring(1).toUpperCase()}function p(){Y.src="none"==aa.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(da,ma){da||"none"==aa.style.display?(aa.style.display="flex",!1!==ma&&O.focus()):aa.style.display="none";p()}function u(da){""==da.value&&null!=N&&V?da.style.background=da==O?N.dark:N.light:""==da.value||da.value==mxConstants.NONE||mxUtils.isVarColor(da.value)?da.style.background="transparent":
da.style.background="#"+da.value;da.style.color="transparent"==da.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(da.style.background)?"#ffffff":"#000000"}function w(){u(W);u(O)}function y(da){V!=da&&(da?h&&null!=N?(W.value=N.light.substring(1).toUpperCase(),da=!1):(W.value="",O.value="",fa.value="automatic",W.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),O.setAttribute("title",mxResources.get("useBlackAndWhite")),W.setAttribute("title",mxResources.get("useBlackAndWhite"))):
(""==W.value&&null!=N&&(W.value=N.light.substring(1).toUpperCase()),W.removeAttribute("placeholder"),W.removeAttribute("title"),""==O.value&&null!=N&&(O.style.background=N.dark,da=mxUtils.getCurrentStyle(O),O.value=mxUtils.rgba2hex(da.backgroundColor).substring(1).toUpperCase()),O.removeAttribute("placeholder"),O.removeAttribute("title"),da=!1));V=da}function A(da){"#"==da.value.charAt(0)&&(da.value=da.value.substring(1));var ma=da.value,Ia=ma.toLowerCase();null==g||""!=ma&&"automatic"!=Ia&&"default"!=
Ia&&Ia!=mxResources.get("default").toLowerCase()&&Ia!=mxResources.get("automatic").toLowerCase()||null==N?(da.value==mxConstants.NONE||mxUtils.isVarColor(da.value)||(da.value=m(da.value),ia.fromString("#"+da.value)),y(!1),da!=O||W.value==mxConstants.NONE&&O.value==mxConstants.NONE||(fa.value="custom"),da==W&&"automatic"==fa.value&&(W.value==mxConstants.NONE?O.value=mxConstants.NONE:mxUtils.isVarColor(W.value)?O.value=W.value:O.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+da.value)).substring(1).toUpperCase()),
-w()):U.click()}function D(){var da=W.value,ma=O.value;if(V&&null!=N||(/(^#?[a-zA-Z0-9]*$)/.test(da)||mxUtils.isVarColor(da))&&(/(^#?[a-zA-Z0-9]*$)/.test(ma)||mxUtils.isVarColor(ma))){if(V)da="default";else if(""==da&&(da=mxConstants.NONE),""==ma&&(ma=mxConstants.NONE),da==mxConstants.NONE||mxUtils.isVarColor(da)||"#"==da.charAt(0)||(da="#"+m(da)),ma==mxConstants.NONE||mxUtils.isVarColor(ma)||"#"==ma.charAt(0)||(ma="#"+m(ma)),da!=mxConstants.NONE&&ma!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,
-12),"automatic"!=fa.value&&ma!=mxConstants.NONE?da==mxConstants.NONE?ColorDialog.addRecentColor(ma.substring(1),12):ColorDialog.addRecentColor("light-dark("+da+","+ma+")",12):da!=mxConstants.NONE&&ColorDialog.addRecentColor(da.substring(1),12),"none"!=da||"none"!=ma)da=da==mxConstants.NONE?"transparent":da,ma=ma==mxConstants.NONE?"transparent":ma,h||"automatic"==fa.value||(da="light-dark("+da+","+ma+")");X(da);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function E(){mxClient.IS_TOUCH||
-window.setTimeout(function(){ja.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)},0)}function F(){ja.value!=mxConstants.NONE&&""!=ja.value&&ia.fromString("#"+ja.value,!0)}function H(){var da=ca(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);da.style.marginBottom="8px";return da}function M(da){13==da.keyCode&&(A(mxEvent.getSource(da)),D())}var N=null!=d?mxUtils.getLightDarkColor(d,null,null,
+w()):U.click()}function E(){var da=W.value,ma=O.value;if(V&&null!=N||(/(^#?[a-zA-Z0-9]*$)/.test(da)||mxUtils.isVarColor(da))&&(/(^#?[a-zA-Z0-9]*$)/.test(ma)||mxUtils.isVarColor(ma))){if(V)da="default";else if(""==da&&(da=mxConstants.NONE),""==ma&&(ma=mxConstants.NONE),da==mxConstants.NONE||mxUtils.isVarColor(da)||"#"==da.charAt(0)||(da="#"+m(da)),ma==mxConstants.NONE||mxUtils.isVarColor(ma)||"#"==ma.charAt(0)||(ma="#"+m(ma)),da!=mxConstants.NONE&&ma!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,
+12),"automatic"!=fa.value&&ma!=mxConstants.NONE?da==mxConstants.NONE?ColorDialog.addRecentColor(ma.substring(1),12):ColorDialog.addRecentColor("light-dark("+da+","+ma+")",12):da!=mxConstants.NONE&&ColorDialog.addRecentColor(da.substring(1),12),"none"!=da||"none"!=ma)da=da==mxConstants.NONE?"transparent":da,ma=ma==mxConstants.NONE?"transparent":ma,h||"automatic"==fa.value||(da="light-dark("+da+","+ma+")");X(da);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function D(){mxClient.IS_TOUCH||
+window.setTimeout(function(){ja.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)},0)}function F(){ja.value!=mxConstants.NONE&&""!=ja.value&&ia.fromString("#"+ja.value,!0)}function H(){var da=ca(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);da.style.marginBottom="8px";return da}function M(da){13==da.keyCode&&(A(mxEvent.getSource(da)),E())}var N=null!=d?mxUtils.getLightDarkColor(d,null,null,
h):null,J=a.editor.graph;this.editorUi=a;var V=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var W=document.createElement("input");W.style.textOverflow="ellipsis";W.style.margin="0 0 0 4px";W.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var T=document.createElement("div");T.style.display="flex";T.style.alignItems="center";d.appendChild(T);
var O=document.createElement("input");O.style.textOverflow="ellipsis";O.style.margin="0 4px";O.style.maxWidth="70px";O.style.width="100%";var fa=document.createElement("select");fa.style.textOverflow="ellipsis";fa.style.width="100%";var S=document.createElement("option");S.setAttribute("value","automatic");mxUtils.write(S,mxResources.get("automatic"));fa.appendChild(S);S=document.createElement("option");S.setAttribute("value","custom");mxUtils.write(S,mxResources.get("userDefined"));fa.appendChild(S);
fa.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var aa=document.createElement("div");aa.style.padding="0 6px 0 6px";S=document.createElement("img");S.setAttribute("title",mxResources.get("dark"));S.className="geAdaptiveAsset";S.src=Editor.thinDarkImage;S.style.width="20px";aa.appendChild(S);mxEvent.addListener(S,"click",function(){O.focus()});aa.appendChild(O);aa.appendChild(fa);aa.style.display="flex";aa.style.alignItems="center";S=document.createElement("div");S.style.display="flex";S.style.alignItems=
"center";S.style.userSelect="none";S.style.cursor="pointer";S.style.padding="2px 0 2px 0";var Y=document.createElement("img");Y.setAttribute("title",mxResources.get("dark"));Y.className="geAdaptiveAsset";Y.style.marginLeft="-2px";S.appendChild(Y);mxUtils.write(S,mxResources.get("advanced"));var ba=document.createElement("img");ba.setAttribute("title",mxResources.get("swap"));ba.className="geAdaptiveAsset";ba.style.marginLeft="6px";ba.style.width="16px";ba.style.height="16px";ba.style.cursor="pointer";
ba.src=Editor.swapImage;mxEvent.addListener(ba,"click",function(da){k(!0,!1);fa.value="custom";y(!1);var ma=W.value;W.value=O.value;O.value=ma;w();ja.focus();mxEvent.consume(da)});S.appendChild(ba);var L=ba.cloneNode();L.setAttribute("title",mxResources.get("copy"));L.style.marginLeft="2px";L.src=Editor.doubleArrowUpImage;mxEvent.addListener(L,"click",function(da){k(!0,!1);fa.value="custom";y(!1);ja==O?W.value=O.value:O.value=W.value;w();ja.focus();mxEvent.consume(da)});S.appendChild(L);ba=L.cloneNode();
ba.setAttribute("title",mxResources.get("opacity"));ba.src=Editor.opacityImage;mxEvent.addListener(ba,"click",function(da){var ma=mxUtils.parseColor("#"+ja.value);ma=String(Math.floor(Math.max(0,Math.min(100*ma.a,100))));a.prompt(mxResources.get("opacity")+" (0-100)",ma,function(Ia){!isNaN(Ia)&&""!==Ia&&0<=Ia&&100>=Ia&&(y(!1),W.value=mxUtils.rgba2hex(mxUtils.addAlphaToColor("#"+W.value,Ia/100,!0)).substring(1).toUpperCase(),O.value=mxUtils.rgba2hex(mxUtils.addAlphaToColor("#"+O.value,Ia/100,!0)).substring(1).toUpperCase(),
-w(),ja.focus())});mxEvent.consume(da)});S.appendChild(ba);p();mxEvent.addListener(S,"click",function(){k();p();ColorDialog.collapsed="none"==aa.style.display});var U=mxUtils.button("",function(){y(!0);w();ja.focus();""==ja.value&&null!=N&&V&&ia.fromString(ja==O?N.dark:N.light,!0)});mxEvent.addListener(fa,"change",function(da){"automatic"==fa.value?(W.focus(),A(W)):(y(!1),O.focus(),E());w();mxEvent.consume(da)});mxEvent.addListener(W,"change",function(){A(W)});mxEvent.addListener(O,"change",function(){A(O)});
-var X=null!=e?e:this.createApplyFunction();this.init=function(){E()};var ia=new ColorPicker,ja=Editor.isDarkMode()&&("auto"==J.getAdaptiveColors()||"simple"==J.getAdaptiveColors()&&"custom"==fa.value)&&!h?O:W;mxEvent.addListener(W,"focus",function(){ja=W;F();L.src=Editor.doubleArrowDownImage});mxEvent.addListener(O,"focus",function(){ja=O;F();L.src=Editor.doubleArrowUpImage});ia.addListener("change",function(da,ma){da=ma.getProperty("color").substring(1).toUpperCase();ja.value.toUpperCase()!=da&&
+w(),ja.focus())});mxEvent.consume(da)});S.appendChild(ba);p();mxEvent.addListener(S,"click",function(){k();p();ColorDialog.collapsed="none"==aa.style.display});var U=mxUtils.button("",function(){y(!0);w();ja.focus();""==ja.value&&null!=N&&V&&ia.fromString(ja==O?N.dark:N.light,!0)});mxEvent.addListener(fa,"change",function(da){"automatic"==fa.value?(W.focus(),A(W)):(y(!1),O.focus(),D());w();mxEvent.consume(da)});mxEvent.addListener(W,"change",function(){A(W)});mxEvent.addListener(O,"change",function(){A(O)});
+var X=null!=e?e:this.createApplyFunction();this.init=function(){D()};var ia=new ColorPicker,ja=Editor.isDarkMode()&&("auto"==J.getAdaptiveColors()||"simple"==J.getAdaptiveColors()&&"custom"==fa.value)&&!h?O:W;mxEvent.addListener(W,"focus",function(){ja=W;F();L.src=Editor.doubleArrowDownImage});mxEvent.addListener(O,"focus",function(){ja=O;F();L.src=Editor.doubleArrowUpImage});ia.addListener("change",function(da,ma){da=ma.getProperty("color").substring(1).toUpperCase();ja.value.toUpperCase()!=da&&
(ja.value=da,A(ja),window.setTimeout(function(){ja.focus()},0))});e=document.createElement("div");e.appendChild(ia.div);var ta=document.createElement("div");ta.style.display="flex";ta.style.flexFlow="row wrap";ta.style.justifyContent="center";ta.style.paddingTop="10px";var ca=mxUtils.bind(this,function(da,ma,Ia,oa){ma=null!=ma?ma:12;var za=document.createElement("table");za.style.borderCollapse="collapse";za.setAttribute("cellspacing","0");za.style.marginBottom="20px";za.style.cellSpacing="0px";za.style.marginLeft=
"1px";var Aa=document.createElement("tbody");za.appendChild(Aa);for(var Ma=da.length/ma,Pa=0;Pa<Ma;Pa++){for(var Ka=document.createElement("tr"),Ja=0;Ja<ma;Ja++)mxUtils.bind(this,function(ra){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==ra&&(ra=Ia);if(null!=ra){Da.style.borderWidth="1px";if(ra==mxConstants.NONE||null==ra)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(mxUtils.isLightDarkColor(ra)){var Wa=
mxUtils.getLightDarkColor(ra);Da.style.background="linear-gradient(to right bottom, "+Wa.cssText+" 50%, "+mxUtils.invertLightDarkColor(Wa).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+ra;Wa=this.colorNames[String(ra).toUpperCase()];null!=Wa&&Da.setAttribute("title",Wa)}Ka.appendChild(Da);null!=ra&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(ra==mxConstants.NONE){ja==O&&O.value==mxConstants.NONE?W.value=mxConstants.NONE:ja.value=mxConstants.NONE;if(ja==W||ja==O&&
-W.value==mxConstants.NONE)fa.value="automatic";A(ja);window.setTimeout(function(){ja.focus()},0)}else if(mxUtils.isLightDarkColor(ra)){k(!0);fa.value="custom";var Xa=mxUtils.getLightDarkColor(ra);W.value=Xa.light.substring(1).toUpperCase();O.value=Xa.dark.substring(1).toUpperCase();A(W);A(O);ja==W?ia.fromString(Xa.light):ia.fromString(Xa.dark)}else ia.fromString("#"+ra)}),mxEvent.addListener(Da,"dblclick",D))})(da[Pa*ma+Ja]);Aa.appendChild(Ka)}oa&&(da=document.createElement("td"),da.setAttribute("title",
+W.value==mxConstants.NONE)fa.value="automatic";A(ja);window.setTimeout(function(){ja.focus()},0)}else if(mxUtils.isLightDarkColor(ra)){k(!0);fa.value="custom";var Xa=mxUtils.getLightDarkColor(ra);W.value=Xa.light.substring(1).toUpperCase();O.value=Xa.dark.substring(1).toUpperCase();A(W);A(O);ja==W?ia.fromString(Xa.light):ia.fromString(Xa.dark)}else ia.fromString("#"+ra)}),mxEvent.addListener(Da,"dblclick",E))})(da[Pa*ma+Ja]);Aa.appendChild(Ka)}oa&&(da=document.createElement("td"),da.setAttribute("title",
mxResources.get("reset")),da.className="geAdaptiveAsset",da.style.border="1px solid black",da.style.padding="0px",da.style.width="16px",da.style.height="16px",da.style.backgroundImage="url('"+Editor.crossImage+"')",da.style.backgroundPosition="center center",da.style.backgroundSize="14px 14px",da.style.backgroundRepeat="no-repeat",da.style.cursor="pointer",Ka.appendChild(da),mxEvent.addListener(da,"click",function(){ColorDialog.resetRecentColors();za.parentNode.replaceChild(H(),za)}));ta.appendChild(za);
return za});h||(d.appendChild(S),!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==J.getAdaptiveColors()||"automatic"!=fa.value||(aa.style.display="none",p()),S=document.createElement("img"),S.setAttribute("title",mxResources.get("light")),S.className="geAdaptiveAsset",S.src=Editor.thinLightImage,S.style.width="20px",T.appendChild(S),mxEvent.addListener(S,"click",function(){W.focus()}));T.appendChild(W);null!=N&&(U.setAttribute("title",mxResources.get(h?"default":"useBlackAndWhite")),U.style.cursor=
"pointer",U.style.position="relative",U.style.marginLeft="4px",U.innerText="",J=document.createElement("div"),J.style.display="inline-block",J.style.verticalAlign="middle",J.style.borderStyle="solid",J.style.borderWidth="1px",J.style.marginTop="-2px",J.style.width="12px",J.style.height="12px",h?J.style.backgroundColor=N.light:J.style.backgroundImage="linear-gradient(to right bottom, "+N.cssText+" 50%, "+mxUtils.invertLightDarkColor(N).cssText+" 50.3%)",U.appendChild(J),T.appendChild(U),mxEvent.addListener(U,
-"dblclick",D));var P=document.createElement("input");P.setAttribute("type","color");P.style.position="relative";P.style.visibility="hidden";P.style.top="10px";P.style.width="0px";P.style.height="0px";P.style.border="none";e.style.whiteSpace="nowrap";T.appendChild(P);J=mxUtils.button("",function(){document.activeElement==P?W.focus():(P.value="#"+W.value,P.click())});J.style.cursor="pointer";S=document.createElement("img");S.src=Editor.colorDropperImage;S.className="geAdaptiveAsset";S.style.position=
+"dblclick",E));var P=document.createElement("input");P.setAttribute("type","color");P.style.position="relative";P.style.visibility="hidden";P.style.top="10px";P.style.width="0px";P.style.height="0px";P.style.border="none";e.style.whiteSpace="nowrap";T.appendChild(P);J=mxUtils.button("",function(){document.activeElement==P?W.focus():(P.value="#"+W.value,P.click())});J.style.cursor="pointer";S=document.createElement("img");S.src=Editor.colorDropperImage;S.className="geAdaptiveAsset";S.style.position=
"relative";S.style.verticalAlign="middle";S.style.marginTop="-2px";S.style.width="auto";S.style.height="14px";J.appendChild(S);T.appendChild(J);e.appendChild(d);mxEvent.addListener(P,"change",function(){ia.fromString(P.value)});h||e.appendChild(aa);H();d=ca(this.presetColors);d.style.marginBottom="8px";d=ca(this.defaultColors);d.style.marginBottom="16px";e.appendChild(ta);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent=
-"end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));T=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});T.className="geBtn";a.editor.cancelFirst&&d.appendChild(T);J=mxUtils.button(mxResources.get("apply"),D);J.className="geBtn gePrimaryBtn";d.appendChild(J);a.editor.cancelFirst||d.appendChild(T);null!=b&&("default"==b?U.click():(T=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==T.light?W.value=mxConstants.NONE:
+"end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));T=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});T.className="geBtn";a.editor.cancelFirst&&d.appendChild(T);J=mxUtils.button(mxResources.get("apply"),E);J.className="geBtn gePrimaryBtn";d.appendChild(J);a.editor.cancelFirst||d.appendChild(T);null!=b&&("default"==b?U.click():(T=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==T.light?W.value=mxConstants.NONE:
mxUtils.isVarColor(T.light)?W.value=T.light:(mxUtils.isRgbColor(T.light)?T.light=mxUtils.rgba2hex(T.light):mxUtils.isHexColor(T.light)||(T.light="#"+m(T.light)),W.value=T.light.substring(1).toUpperCase()),b==mxConstants.NONE||"transparent"==T.dark?O.value=mxConstants.NONE:mxUtils.isVarColor(T.dark)?O.value=T.dark:(mxUtils.isRgbColor(T.dark)?T.dark=mxUtils.rgba2hex(T.dark):mxUtils.isHexColor(T.dark)||(T.dark="#"+m(T.dark)),O.value=T.dark.substring(1).toUpperCase()),F(),w()));h||!ColorDialog.collapsed||
"automatic"!=fa.value||Editor.isDarkMode()||(aa.style.display="none",p());e.appendChild(d);this.picker=ia;this.colorInput=W;mxEvent.addListener(W,"keypress",M);mxEvent.addListener(O,"keypress",M);mxEvent.addListener(e,"keydown",function(da){27==da.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(da))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");
ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
@@ -3799,45 +3803,45 @@ var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("
"http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},SimpleTextareaDialog=function(a,b,e,f,g){var d=document.createElement("div"),h=document.createElement("textarea");h.style.position="absolute";h.style.left="30px";h.style.right="30px";h.style.top="30px";h.style.bottom="100px";
h.style.resize="none";h.setAttribute("wrap","off");h.setAttribute("spellcheck","false");h.setAttribute("autocorrect","off");h.setAttribute("autocomplete","off");h.setAttribute("autocapitalize","off");h.value=null!=b?b:"";d.appendChild(h);b=document.createElement("div");b.style.position="absolute";b.style.bottom="46px";b.style.right="30px";b.style.left="30px";b.style.justifyContent="end";b.style.display="flex";null==g||a.isOffline()||b.appendChild(a.createHelpIcon(g));g=mxUtils.button(mxResources.get("cancel"),
function(){a.hideDialog()});g.setAttribute("title","Escape");g.className="geBtn";a.editor.cancelFirst&&b.appendChild(g);var m=mxUtils.button(null!=f?f:mxResources.get("apply"),function(){a.hideDialog();e(h.value)});m.setAttribute("title","Ctrl+Enter");m.className="geBtn gePrimaryBtn";b.appendChild(m);mxEvent.addListener(h,"keydown",function(p){13==p.keyCode&&mxEvent.isControlDown(p)&&m.click()});a.editor.cancelFirst||b.appendChild(g);this.init=function(){h.focus();h.scrollTop=0};d.appendChild(b);
-this.container=d},TextareaDialog=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A,D){k=null!=k?k:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";m=document.createElement("div");m.style.position="absolute";m.style.left="0px";m.style.right="0px";var E=m.cloneNode(!1),F=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";E.style.top="20px";E.style.bottom="64px";F.style.display="flex";F.style.whiteSpace="nowrap";
-F.style.alignItems="center";F.style.justifyContent="end";F.style.bottom="10px";F.style.height="50px";F.style.textAlign="right";F.style.paddingTop="14px";F.style.boxSizing="border-box";mxUtils.write(m,b);h.appendChild(m);h.appendChild(E);h.appendChild(F);null!=D&&m.appendChild(D);var H=document.createElement("textarea");u?H.setAttribute("wrap","off"):H.style.wordBreak="break-all";H.setAttribute("spellcheck","false");H.setAttribute("autocorrect","off");H.setAttribute("autocomplete","off");H.setAttribute("autocapitalize",
-"off");mxUtils.write(H,e||"");H.style.resize="none";H.style.outline="none";H.style.position="absolute";H.style.boxSizing="border-box";H.style.top="0px";H.style.left="0px";H.style.height="100%";H.style.width="100%";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};E.appendChild(H);null==y||a.isOffline()||F.appendChild(a.createHelpIcon(y));if(null!=A)for(b=0;b<A.length;b++)(function(N,J,V){N=mxUtils.button(N,function(W){J(W,H)});null!=V&&N.setAttribute("title",V);N.className="geBtn";F.appendChild(N)})(A[b][0],
+this.container=d},TextareaDialog=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A,E){k=null!=k?k:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";m=document.createElement("div");m.style.position="absolute";m.style.left="0px";m.style.right="0px";var D=m.cloneNode(!1),F=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";D.style.top="20px";D.style.bottom="64px";F.style.display="flex";F.style.whiteSpace="nowrap";
+F.style.alignItems="center";F.style.justifyContent="end";F.style.bottom="10px";F.style.height="50px";F.style.textAlign="right";F.style.paddingTop="14px";F.style.boxSizing="border-box";mxUtils.write(m,b);h.appendChild(m);h.appendChild(D);h.appendChild(F);null!=E&&m.appendChild(E);var H=document.createElement("textarea");u?H.setAttribute("wrap","off"):H.style.wordBreak="break-all";H.setAttribute("spellcheck","false");H.setAttribute("autocorrect","off");H.setAttribute("autocomplete","off");H.setAttribute("autocapitalize",
+"off");mxUtils.write(H,e||"");H.style.resize="none";H.style.outline="none";H.style.position="absolute";H.style.boxSizing="border-box";H.style.top="0px";H.style.left="0px";H.style.height="100%";H.style.width="100%";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};D.appendChild(H);null==y||a.isOffline()||F.appendChild(a.createHelpIcon(y));if(null!=A)for(b=0;b<A.length;b++)(function(N,J,V){N=mxUtils.button(N,function(W){J(W,H)});null!=V&&N.setAttribute("title",V);N.className="geBtn";F.appendChild(N)})(A[b][0],
A[b][1],A[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&F.appendChild(d);null!=p&&p(F,H);if(null!=f){var M=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();f(H.value)});M.setAttribute("title","Ctrl+Enter");M.className="geBtn gePrimaryBtn";F.appendChild(M);mxEvent.addListener(H,"keydown",function(N){13==N.keyCode&&mxEvent.isControlDown(N)&&M.click()})}a.editor.cancelFirst||
F.appendChild(d);this.container=h},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.position="absolute";b.style.inset="10px";var e=document.createElement("textarea");e.setAttribute("wrap","off");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize","off");e.style.overflow="auto";e.style.resize="none";e.style.position="absolute";e.style.top="20px";e.style.bottom="76px";e.style.left="20px";
e.style.right="20px";var f=a.getDiagramSnapshot();e.value=mxUtils.getPrettyXml(f.node);b.appendChild(e);this.init=function(){e.focus()};Graph.fileSupport&&(e.addEventListener("dragover",function(p){p.stopPropagation();p.preventDefault()},!1),e.addEventListener("drop",function(p){p.stopPropagation();p.preventDefault();if(0<p.dataTransfer.files.length){p=p.dataTransfer.files[0];var k=new FileReader;k.onload=function(u){e.value=u.target.result};k.readAsText(p)}else e.value=a.extractGraphModelFromEvent(p)},
!1));var g=document.createElement("div");g.style.display="flex";g.style.whiteSpace="nowrap";g.style.alignItems="center";g.style.justifyContent="end";g.style.position="absolute";g.style.height="36px";g.style.bottom="24px";g.style.left="20px";g.style.right="20px";var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&g.appendChild(d);var h=document.createElement("select");h.style.textOverflow="ellipsis";h.style.width="196px";h.className=
"geBtn";if(a.editor.graph.isEnabled()){var m=document.createElement("option");m.setAttribute("value","apply");mxUtils.write(m,mxResources.get("apply",null,"Update Existing Drawing"));h.appendChild(m)}a.editor.graph.isEnabled()&&(m=document.createElement("option"),m.setAttribute("value","insert"),mxUtils.write(m,mxResources.get("insert")),h.appendChild(m));m=document.createElement("option");m.setAttribute("value","new");mxUtils.write(m,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&
!navigator.standalone&&h.appendChild(m);g.appendChild(h);m=mxUtils.button(mxResources.get("ok"),function(){var p=Graph.zapGremlins(mxUtils.trim(e.value)),k=null;if("new"==h.value)a.hideDialog(),a.editor.editAsNew(p);else if("apply"==h.value)try{var u=mxUtils.parseXml(p).documentElement,w=Editor.extractParserError(u,mxResources.get("unknownError"));w?(EditorUi.debug("EditDiagramDialogParserError",[this],"node",[u],"cause",[w]),k=mxResources.get("invalidInput")+" ("+w+")"):("mxfile"==u.nodeName?a.editor.setGraphXml(u):
-a.updateDiagramData(f,u),a.hideDialog())}catch(E){k=E}else if("insert"==h.value){a.editor.graph.model.beginUpdate();try{var y=mxUtils.parseXml(p),A=new mxGraphModel;(new mxCodec(y)).decode(y.documentElement,A);var D=A.getChildren(A.getChildAt(A.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(D));a.hideDialog()}catch(E){k=E}finally{a.editor.graph.model.endUpdate()}}null!=k&&a.handleError(k)});m.className="geBtn gePrimaryBtn";g.appendChild(m);a.editor.cancelFirst||g.appendChild(d);
+a.updateDiagramData(f,u),a.hideDialog())}catch(D){k=D}else if("insert"==h.value){a.editor.graph.model.beginUpdate();try{var y=mxUtils.parseXml(p),A=new mxGraphModel;(new mxCodec(y)).decode(y.documentElement,A);var E=A.getChildren(A.getChildAt(A.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(E));a.hideDialog()}catch(D){k=D}finally{a.editor.graph.model.endUpdate()}}null!=k&&a.handleError(k)});m.className="geBtn gePrimaryBtn";g.appendChild(m);a.editor.cancelFirst||g.appendChild(d);
b.appendChild(g);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function b(){var T=u.value,O=T.lastIndexOf(".");u.value=0<O?T.substring(0,O+1)+w.value:T+"."+w.value;"xml"===w.value?(y.setAttribute("disabled","true"),A.setAttribute("disabled","true"),D.setAttribute("disabled","true"),J.setAttribute("disabled","true")):(y.removeAttribute("disabled"),A.removeAttribute("disabled"),D.removeAttribute("disabled"),J.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?M.removeAttribute("disabled"):M.setAttribute("disabled",
-"disabled");"png"===w.value||"jpg"===w.value||"pdf"===w.value?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");"png"===w.value?(E.removeAttribute("disabled"),F.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"))}function e(){A.style.backgroundColor=A.value*D.value>MAX_AREA||0>=A.value?"red":"";D.style.backgroundColor=A.value*D.value>MAX_AREA||0>=D.value?"red":""}var f=a.editor.graph,g=f.getGraphBounds(),d=f.view.scale,h=Math.ceil(g.width/
+var ExportDialog=function(a){function b(){var T=u.value,O=T.lastIndexOf(".");u.value=0<O?T.substring(0,O+1)+w.value:T+"."+w.value;"xml"===w.value?(y.setAttribute("disabled","true"),A.setAttribute("disabled","true"),E.setAttribute("disabled","true"),J.setAttribute("disabled","true")):(y.removeAttribute("disabled"),A.removeAttribute("disabled"),E.removeAttribute("disabled"),J.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?M.removeAttribute("disabled"):M.setAttribute("disabled",
+"disabled");"png"===w.value||"jpg"===w.value||"pdf"===w.value?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");"png"===w.value?(D.removeAttribute("disabled"),F.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"))}function e(){A.style.backgroundColor=A.value*E.value>MAX_AREA||0>=A.value?"red":"";E.style.backgroundColor=A.value*E.value>MAX_AREA||0>=E.value?"red":""}var f=a.editor.graph,g=f.getGraphBounds(),d=f.view.scale,h=Math.ceil(g.width/
d),m=Math.ceil(g.height/d);d=document.createElement("table");var p=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");g.appendChild(k);var u=document.createElement("input");u.setAttribute("value",a.editor.getOrCreateFilename());u.style.width="180px";k=document.createElement("td");k.appendChild(u);g.appendChild(k);
p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");g.appendChild(k);var w=document.createElement("select");w.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));w.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),w.appendChild(k));
k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));w.appendChild(k);k=document.createElement("option");k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));w.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),w.appendChild(k));k=document.createElement("td");k.appendChild(w);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");
k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");g.appendChild(k);var y=document.createElement("input");y.setAttribute("type","number");y.setAttribute("value","100");y.style.width="180px";k=document.createElement("td");k.appendChild(y);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");g.appendChild(k);var A=document.createElement("input");
-A.setAttribute("value",h);A.style.width="180px";k=document.createElement("td");k.appendChild(A);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");g.appendChild(k);var D=document.createElement("input");D.setAttribute("value",m);D.style.width="180px";k=document.createElement("td");k.appendChild(D);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");
-k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");g.appendChild(k);var E=document.createElement("select");E.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");E.appendChild(k);k=document.createElement("option");
-k.setAttribute("value","400");mxUtils.write(k,"400dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));E.appendChild(k);var F=document.createElement("input");F.style.width="180px";F.style.display="none";F.setAttribute("value","100");F.setAttribute("type","number");F.setAttribute("min","50");F.setAttribute("step","50");var H=!1;mxEvent.addListener(E,"change",function(){"custom"==this.value?(this.style.display="none",F.style.display=
-"",F.focus()):(F.value=this.value,H||(y.value=this.value))});mxEvent.addListener(F,"change",function(){var T=parseInt(F.value);isNaN(T)||0>=T?F.style.backgroundColor="red":(F.style.backgroundColor="",H||(y.value=T))});k=document.createElement("td");k.appendChild(E);k.appendChild(F);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var M=document.createElement("input");
+A.setAttribute("value",h);A.style.width="180px";k=document.createElement("td");k.appendChild(A);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");g.appendChild(k);var E=document.createElement("input");E.setAttribute("value",m);E.style.width="180px";k=document.createElement("td");k.appendChild(E);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");
+k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");g.appendChild(k);var D=document.createElement("select");D.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");D.appendChild(k);k=document.createElement("option");
+k.setAttribute("value","400");mxUtils.write(k,"400dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));D.appendChild(k);var F=document.createElement("input");F.style.width="180px";F.style.display="none";F.setAttribute("value","100");F.setAttribute("type","number");F.setAttribute("min","50");F.setAttribute("step","50");var H=!1;mxEvent.addListener(D,"change",function(){"custom"==this.value?(this.style.display="none",F.style.display=
+"",F.focus()):(F.value=this.value,H||(y.value=this.value))});mxEvent.addListener(F,"change",function(){var T=parseInt(F.value);isNaN(T)||0>=T?F.style.backgroundColor="red":(F.style.backgroundColor="",H||(y.value=T))});k=document.createElement("td");k.appendChild(D);k.appendChild(F);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var M=document.createElement("input");
M.setAttribute("type","checkbox");M.checked=null==f.background||f.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(M);mxUtils.write(k,mxResources.get("transparent"));g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");g.appendChild(k);var N=document.createElement("input");N.setAttribute("type","checkbox");N.checked=!1;k=document.createElement("td");k.appendChild(N);
g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");g.appendChild(k);var J=document.createElement("input");J.setAttribute("type","number");J.setAttribute("value",ExportDialog.lastBorderValue);J.style.width="180px";k=document.createElement("td");k.appendChild(J);g.appendChild(k);p.appendChild(g);d.appendChild(p);mxEvent.addListener(w,"change",b);b();mxEvent.addListener(y,"change",
-function(){H=!0;var T=Math.max(0,parseFloat(y.value)||100)/100;y.value=parseFloat((100*T).toFixed(2));0<h?(A.value=Math.floor(h*T),D.value=Math.floor(m*T)):(y.value="100",A.value=h,D.value=m);e()});mxEvent.addListener(A,"change",function(){var T=parseInt(A.value)/h;0<T?(y.value=parseFloat((100*T).toFixed(2)),D.value=Math.floor(m*T)):(y.value="100",A.value=h,D.value=m);e()});mxEvent.addListener(D,"change",function(){var T=parseInt(D.value)/m;0<T?(y.value=parseFloat((100*T).toFixed(2)),A.value=Math.floor(h*
-T)):(y.value="100",A.value=h,D.value=m);e()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var V=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(y.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var T=u.value,O=w.value,fa=Math.max(0,parseFloat(y.value)||100)/100,S=Math.max(0,parseInt(J.value)),aa=f.background,Y=Math.max(1,parseInt(F.value));if(("svg"==O||"png"==O||
+function(){H=!0;var T=Math.max(0,parseFloat(y.value)||100)/100;y.value=parseFloat((100*T).toFixed(2));0<h?(A.value=Math.floor(h*T),E.value=Math.floor(m*T)):(y.value="100",A.value=h,E.value=m);e()});mxEvent.addListener(A,"change",function(){var T=parseInt(A.value)/h;0<T?(y.value=parseFloat((100*T).toFixed(2)),E.value=Math.floor(m*T)):(y.value="100",A.value=h,E.value=m);e()});mxEvent.addListener(E,"change",function(){var T=parseInt(E.value)/m;0<T?(y.value=parseFloat((100*T).toFixed(2)),A.value=Math.floor(h*
+T)):(y.value="100",A.value=h,E.value=m);e()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var V=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(y.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var T=u.value,O=w.value,fa=Math.max(0,parseFloat(y.value)||100)/100,S=Math.max(0,parseInt(J.value)),aa=f.background,Y=Math.max(1,parseInt(F.value));if(("svg"==O||"png"==O||
"pdf"==O)&&M.checked)aa=null;else if(null==aa||aa==mxConstants.NONE)aa="#ffffff";ExportDialog.lastBorderValue=S;ExportDialog.exportFile(a,T,O,aa,fa,S,Y,N.checked)}}));V.className="geBtn gePrimaryBtn";var W=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});W.className="geBtn";a.editor.cancelFirst?(k.appendChild(W),k.appendChild(V)):(k.appendChild(V),k.appendChild(W));g.appendChild(k);p.appendChild(g);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;
ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.exportFile=function(a,b,e,f,g,d,h,m){m=a.editor.graph;if("xml"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,e);else if("svg"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(m.getSvg(f,g,d)),b,e);else{var p=m.getGraphBounds(),k=mxUtils.createXmlDocument(),u=k.createElement("output");k.appendChild(u);k=new mxXmlCanvas2D(u);k.translate(Math.floor((d/g-p.x)/m.view.scale),Math.floor((d/g-p.y)/m.view.scale));k.scale(g/m.view.scale);(new mxImageExport).drawState(m.getView().getState(m.model.root),
k);u="xml="+encodeURIComponent(mxUtils.getXml(u));k=Math.ceil(p.width*g/m.view.scale+2*d);g=Math.ceil(p.height*g/m.view.scale+2*d);u.length<=MAX_REQUEST_SIZE&&k*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+e+"&filename="+encodeURIComponent(b)+"&bg="+(null!=f?f:"none")+"&w="+k+"&h="+g+"&"+u+"&dpi="+h)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
ExportDialog.saveLocalFile=function(a,b,e,f){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(e)+"&format="+f)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
var EditDataDialog=function(a,b){function e(){0<J.value.length?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")}var f=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",d||"");d=h}var m={};try{var p=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=p&&(m=JSON.parse(p))}catch(T){}var k=new mxForm("properties");k.table.style.width=
-"100%";var u=d.attributes,w=[],y=[],A=0,D=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,E=function(T,O){var fa=document.createElement("div");fa.style.position="relative";fa.style.paddingRight="20px";fa.style.boxSizing="border-box";fa.style.width="100%";var S=document.createElement("a"),aa=mxUtils.createImage(Dialog.prototype.closeImage);aa.style.height="9px";aa.style.fontSize="9px";aa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";S.className="geButton";S.setAttribute("title",
-mxResources.get("delete"));S.style.position="absolute";S.style.top="4px";S.style.right="0px";S.style.margin="0px";S.style.width="9px";S.style.height="9px";S.style.cursor="pointer";S.appendChild(aa);O=function(Y){return function(){for(var ba=0,L=0;L<w.length;L++){if(w[L]==Y){y[L]=null;k.table.deleteRow(ba+(null!=D?1:0));break}null!=y[L]&&ba++}}}(O);mxEvent.addListener(S,"click",O);O=T.parentNode;fa.appendChild(T);fa.appendChild(S);O.appendChild(fa)};h=function(T,O,fa){w[T]=O;y[T]=k.addTextarea(w[A]+
-":",fa,2);y[T].style.width="100%";0<fa.indexOf("\n")&&y[T].setAttribute("rows","2");E(y[T],O);null!=m[O]&&0==m[O].editable&&y[T].setAttribute("disabled","disabled")};p=[];for(var F=g.getModel().getParent(b)==g.getModel().getRoot(),H=g.getCellStyle(b),M=0;M<u.length;M++)("label"!=u[M].nodeName||"1"==H.metaEdit||Graph.translateDiagram||F)&&"placeholders"!=u[M].nodeName&&p.push({name:u[M].nodeName,value:u[M].nodeValue});p.sort(function(T,O){return"label"==T.name?1:"label"==O.name?-1:T.name<O.name?-1:
-T.name>O.name?1:0});if(null!=D){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,D);var N=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(T){T=new FilenameDialog(a,D,mxResources.get("apply"),mxUtils.bind(this,function(O){if(null!=O&&0<O.length&&O!=D)if(g.model.isRoot(b)){var fa=a.getPageById(D);if(null!=fa)if(null==a.getPageById(O)){var S=a.getPageIndex(fa);0<=S&&(a.removePage(fa),fa.node.setAttribute("id",
-O),D=O,N.innerHTML=mxUtils.htmlEntities(O),a.insertPage(fa,S))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==g.getModel().getCell(O)?(g.getModel().cellRemoved(b),b.setId(O),D=O,N.innerHTML=mxUtils.htmlEntities(O),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[O])})}),mxResources.get("id"));a.showDialog(T.container,300,80,!0,!0);T.init()})}for(M=0;M<p.length;M++)h(A,p[M].name,p[M].value),A++;p=document.createElement("div");
+"100%";var u=d.attributes,w=[],y=[],A=0,E=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,D=function(T,O){var fa=document.createElement("div");fa.style.position="relative";fa.style.paddingRight="20px";fa.style.boxSizing="border-box";fa.style.width="100%";var S=document.createElement("a"),aa=mxUtils.createImage(Dialog.prototype.closeImage);aa.style.height="9px";aa.style.fontSize="9px";aa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";S.className="geButton";S.setAttribute("title",
+mxResources.get("delete"));S.style.position="absolute";S.style.top="4px";S.style.right="0px";S.style.margin="0px";S.style.width="9px";S.style.height="9px";S.style.cursor="pointer";S.appendChild(aa);O=function(Y){return function(){for(var ba=0,L=0;L<w.length;L++){if(w[L]==Y){y[L]=null;k.table.deleteRow(ba+(null!=E?1:0));break}null!=y[L]&&ba++}}}(O);mxEvent.addListener(S,"click",O);O=T.parentNode;fa.appendChild(T);fa.appendChild(S);O.appendChild(fa)};h=function(T,O,fa){w[T]=O;y[T]=k.addTextarea(w[A]+
+":",fa,2);y[T].style.width="100%";0<fa.indexOf("\n")&&y[T].setAttribute("rows","2");D(y[T],O);null!=m[O]&&0==m[O].editable&&y[T].setAttribute("disabled","disabled")};p=[];for(var F=g.getModel().getParent(b)==g.getModel().getRoot(),H=g.getCellStyle(b),M=0;M<u.length;M++)("label"!=u[M].nodeName||"1"==H.metaEdit||Graph.translateDiagram||F)&&"placeholders"!=u[M].nodeName&&p.push({name:u[M].nodeName,value:u[M].nodeValue});p.sort(function(T,O){return"label"==T.name?1:"label"==O.name?-1:T.name<O.name?-1:
+T.name>O.name?1:0});if(null!=E){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,E);var N=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(T){T=new FilenameDialog(a,E,mxResources.get("apply"),mxUtils.bind(this,function(O){if(null!=O&&0<O.length&&O!=E)if(g.model.isRoot(b)){var fa=a.getPageById(E);if(null!=fa)if(null==a.getPageById(O)){var S=a.getPageIndex(fa);0<=S&&(a.removePage(fa),fa.node.setAttribute("id",
+O),E=O,N.innerHTML=mxUtils.htmlEntities(O),a.insertPage(fa,S))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==g.getModel().getCell(O)?(g.getModel().cellRemoved(b),b.setId(O),E=O,N.innerHTML=mxUtils.htmlEntities(O),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[O])})}),mxResources.get("id"));a.showDialog(T.container,300,80,!0,!0);T.init()})}for(M=0;M<p.length;M++)h(A,p[M].name,p[M].value),A++;p=document.createElement("div");
p.style.position="absolute";p.style.top="30px";p.style.left="30px";p.style.right="30px";p.style.bottom="80px";p.style.overflowY="auto";p.appendChild(k.table);h=document.createElement("div");h.style.display="flex";h.style.alignItems="center";h.style.boxSizing="border-box";h.style.paddingRight="160px";h.style.whiteSpace="nowrap";h.style.marginTop="6px";h.style.width="100%";var J=document.createElement("input");J.setAttribute("placeholder",mxResources.get("enterPropertyName"));J.setAttribute("type",
"text");J.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");J.style.boxSizing="border-box";J.style.borderWidth="1px";J.style.borderStyle="solid";J.style.marginLeft="2px";J.style.padding="4px";J.style.width="100%";h.appendChild(J);p.appendChild(h);f.appendChild(p);var V=mxUtils.button(mxResources.get("addProperty"),function(){var T=J.value;if(0<T.length&&"label"!=T&&"id"!=T&&"placeholders"!=T&&0>T.indexOf(":"))try{var O=mxUtils.indexOf(w,T);if(0<=O&&null!=y[O])y[O].focus();else{d.cloneNode(!1).setAttribute(T,
-"");0<=O&&(w.splice(O,1),y.splice(O,1));w.push(T);var fa=k.addTextarea(T+":","",2);fa.style.width="100%";y.push(fa);E(fa,T);fa.focus()}V.setAttribute("disabled","disabled");J.value=""}catch(S){mxUtils.alert(S)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(J,"keypress",function(T){13==T.keyCode&&V.click()});this.init=function(){0<y.length?y[0].focus():J.focus()};V.setAttribute("title",mxResources.get("addProperty"));V.setAttribute("disabled","disabled");V.style.textOverflow=
+"");0<=O&&(w.splice(O,1),y.splice(O,1));w.push(T);var fa=k.addTextarea(T+":","",2);fa.style.width="100%";y.push(fa);D(fa,T);fa.focus()}V.setAttribute("disabled","disabled");J.value=""}catch(S){mxUtils.alert(S)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(J,"keypress",function(T){13==T.keyCode&&V.click()});this.init=function(){0<y.length?y[0].focus():J.focus()};V.setAttribute("title",mxResources.get("addProperty"));V.setAttribute("disabled","disabled");V.style.textOverflow=
"ellipsis";V.style.position="absolute";V.style.overflow="hidden";V.style.width="144px";V.style.right="0px";V.className="geBtn";h.appendChild(V);p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});p.setAttribute("title","Escape");p.className="geBtn";h=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(T){var O=g.getDataForCells([b],!0);T=new EmbedDialog(a,JSON.stringify(O,null,2),null,null,function(){console.log(O);a.alert("Written to Console (Dev Tools)")},
mxResources.get("export"),null,"Console","data.json");a.showDialog(T.container,450,240,!0,!0);T.init()}));h.setAttribute("title",mxResources.get("export"));h.className="geBtn";var W=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var T=!1,O=0;O<w.length;O++)null==y[O]?d.removeAttribute(w[O]):(d.setAttribute(w[O],y[O].value),T=T||"placeholder"==w[O]&&"1"==d.getAttribute("placeholders"));T&&d.removeAttribute("label");g.getModel().setValue(b,
d)}catch(fa){mxUtils.alert(fa)}});W.setAttribute("title","Ctrl+Enter");W.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keydown",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&W.click()});mxEvent.addListener(J,"keyup",e);mxEvent.addListener(J,"change",e);u=document.createElement("div");u.style.display="flex";u.style.justifyContent="flex-end";u.style.alignItems="center";u.style.position="absolute";u.style.left="30px";u.style.right="30px";u.style.bottom="30px";u.style.height="40px";if(a.editor.graph.getModel().isVertex(b)||
@@ -3858,17 +3862,17 @@ mxResources.get("lockUnlock"));var ta=p.getCurrentCellStyle(ba);"1"==mxUtils.get
P&&p.removeSelectionCells(p.getModel().getDescendants(ba));mxEvent.consume(ca)}});X.appendChild(ja);mxUtils.write(ia,Y);ia.style.display="block";ia.style.whiteSpace="nowrap";ia.style.overflow="hidden";ia.style.textOverflow="ellipsis";ia.style.position="absolute";ia.style.padding="2px";ia.style.left="52px";ia.style.right="8px";X.appendChild(ia);U.appendChild(X);if(p.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)Y=document.createElement("div"),Y.style.display=
"block",Y.style.textAlign="right",Y.style.whiteSpace="nowrap",Y.style.position="absolute",Y.style.right="16px",Y.style.top="6px",0<aa&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toBack")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="&#9660;",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",Y.appendChild(X),mxEvent.addListener(X,"click",function(ca){p.isEnabled()&&p.addCell(ba,p.model.root,aa-
1);mxEvent.consume(ca)})),0<=aa&&aa<A-1&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toFront")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="&#9650;",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",Y.appendChild(X),mxEvent.addListener(X,"click",function(ca){p.isEnabled()&&p.addCell(ba,p.model.root,aa+1);mxEvent.consume(ca)})),U.appendChild(Y);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&
-(U.setAttribute("draggable","true"),U.style.cursor="move")}mxEvent.addListener(U,"dblclick",function(ca){var P=mxEvent.getSource(ca).nodeName;"INPUT"!=P&&"IMG"!=P&&"true"!=ia.contentEditable&&(m(ba),mxEvent.consume(ca))});p.getDefaultParent()==ba&&(U.classList.add("geActivePage"),U.style.fontWeight=p.isEnabled()?"bold":"",D=ba);mxEvent.addListener(U,"click",function(ca){p.isEnabled()&&"true"!=ia.contentEditable&&(p.setDefaultParent(L),p.view.setCurrentRoot(null),mxEvent.isShiftDown(ca)&&p.setSelectionCells(ba.children),
+(U.setAttribute("draggable","true"),U.style.cursor="move")}mxEvent.addListener(U,"dblclick",function(ca){var P=mxEvent.getSource(ca).nodeName;"INPUT"!=P&&"IMG"!=P&&"true"!=ia.contentEditable&&(m(ba),mxEvent.consume(ca))});p.getDefaultParent()==ba&&(U.classList.add("geActivePage"),U.style.fontWeight=p.isEnabled()?"bold":"",E=ba);mxEvent.addListener(U,"click",function(ca){p.isEnabled()&&"true"!=ia.contentEditable&&(p.setDefaultParent(L),p.view.setCurrentRoot(null),mxEvent.isShiftDown(ca)&&p.setSelectionCells(ba.children),
mxEvent.consume(ca))});u.appendChild(U)}p.isEnabled()?(W.classList.remove("mxDisabled"),N.classList.remove("mxDisabled"),V.classList.remove("mxDisabled"),H.classList.remove("mxDisabled")):(W.classList.add("mxDisabled"),N.classList.add("mxDisabled"),V.classList.add("mxDisabled"),H.classList.add("mxDisabled"));A=p.model.getChildCount(p.model.root);u.innerText="";J.clear();for(var fa=A-1;0<=fa;fa--)mxUtils.bind(this,function(aa){O(fa,p.convertValueToString(aa)||mxResources.get("background"),aa,aa)})(p.model.getChildAt(p.model.root,
-fa));var S=p.convertValueToString(D)||mxResources.get("background");W.setAttribute("title",mxResources.get("removeIt",[S]));V.setAttribute("title",mxResources.get("duplicateIt",[S]));p.isSelectionEmpty()&&M.classList.add("mxDisabled");d()}function m(O){if(p.isEnabled()&&null!=O){var fa=J.get(O);if(null!=fa){var S=fa.getElementsByTagName("span");if(null!=S&&0<S.length){var aa=S[0],Y=mxUtils.getTextContent(aa);aa.style.textOverflow="";aa.style.cursor="text";aa.contentEditable="true";aa.focus();document.execCommand("selectAll",
+fa));var S=p.convertValueToString(E)||mxResources.get("background");W.setAttribute("title",mxResources.get("removeIt",[S]));V.setAttribute("title",mxResources.get("duplicateIt",[S]));p.isSelectionEmpty()&&M.classList.add("mxDisabled");d()}function m(O){if(p.isEnabled()&&null!=O){var fa=J.get(O);if(null!=fa){var S=fa.getElementsByTagName("span");if(null!=S&&0<S.length){var aa=S[0],Y=mxUtils.getTextContent(aa);aa.style.textOverflow="";aa.style.cursor="text";aa.contentEditable="true";aa.focus();document.execCommand("selectAll",
!1,null);fa.removeAttribute("draggable");fa.style.cursor="";var ba=function(L){if("true"==aa.contentEditable){aa.contentEditable="false";var U=mxUtils.getTextContent(aa);L&&U!=Y?(U=mxUtils.getTextContent(aa),0<U.length?p.cellLabelChanged(O,U):p.cellLabelChanged(O,mxResources.get("untitledLayer"))):h()}};mxEvent.addListener(aa,"keydown",function(L){if(13==L.keyCode||27==L.keyCode)ba(13==L.keyCode),mxEvent.consume(L)});mxEvent.addListener(aa,"blur",function(L){ba(!0);mxEvent.consume(L)})}}}}var p=a.editor.graph,
k=document.createElement("div");k.style.userSelect="none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom="32px";k.appendChild(u);var w=null,y=null;mxEvent.addListener(k,"dragover",function(O){O.dataTransfer.dropEffect="move";y=0;O.stopPropagation();O.preventDefault()});mxEvent.addListener(k,"drop",function(O){O.stopPropagation();
-O.preventDefault()});var A=null,D=null,E=document.createElement("div");E.className="geToolbarContainer geDialogToolbar";var F=document.createElement("a");F.className="geButton";var H=F.cloneNode(!1);H.style.backgroundImage="url("+Editor.plusImage+")";H.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(H,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(fa)}finally{p.model.endUpdate()}m(fa)}mxEvent.consume(O)});
-p.isEnabled()||H.classList.add("mxDisabled");E.appendChild(H);var M=F.cloneNode();M.style.backgroundImage="url("+Editor.layersImage+")";M.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(M,"click",function(O){if(p.isEnabled()&&!p.isSelectionEmpty()){var fa=mxUtils.getOffset(M);a.showPopupMenu(mxUtils.bind(this,function(S,aa){for(var Y=p.getLayerForCells(p.getSelectionCells()),ba=A-1;0<=ba;ba--)mxUtils.bind(this,function(L){var U="1"==mxUtils.getValue(p.getCurrentCellStyle(L),
-"locked","0"),X=S.addItem(p.convertValueToString(L)||mxResources.get("background"),null,mxUtils.bind(this,function(){U||p.moveCells(p.getSelectionCells(),0,0,!1,L)}),aa,null,null,!U);U?S.addCheckmark(X,Editor.lockedImage):L==Y&&S.addCheckmark(X,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,ba))}),fa.x,fa.y+M.offsetHeight,O)}});E.appendChild(M);var N=F.cloneNode(!1);N.style.backgroundImage="url("+Editor.editImage+")";N.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(N,
-"click",function(O){p.isEnabled()&&a.showDataDialog(D);mxEvent.consume(O)});p.isEnabled()||N.classList.add("mxDisabled");E.appendChild(N);var J=new mxDictionary,V=F.cloneNode(!1);V.style.backgroundImage="url("+Editor.duplicateImage+")";V.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(V,"click",function(O){if(p.isEnabled()){O=null;p.model.beginUpdate();try{O=p.cloneCell(D),p.cellLabelChanged(O,mxResources.get("untitledLayer")),O.setVisible(!0),O=p.addCell(O,p.model.root),p.setDefaultParent(O)}finally{p.model.endUpdate()}null==
-O||p.isCellLocked(O)||p.selectAll(O)}});p.isEnabled()||V.classList.add("mxDisabled");E.appendChild(V);var W=F.cloneNode(!1);W.style.backgroundImage="url("+Editor.trashImage+")";W.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(W,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.model.root.getIndex(D);p.removeCells([D],!1);0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<fa&&fa<=p.model.getChildCount(p.model.root)?
-p.setDefaultParent(p.model.getChildAt(p.model.root,fa-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(O)});p.isEnabled()||W.classList.add("mxDisabled");E.appendChild(W);k.appendChild(E);var T=document.createElement("span");T.setAttribute("title",mxResources.get("selectionOnly"));T.innerHTML="&#8226;";T.style.position="absolute";T.style.fontWeight="bold";T.style.fontSize="16pt";T.style.right="6px";h();p.model.addListener(mxEvent.CHANGE,h);p.addListener("defaultParentChanged",
+O.preventDefault()});var A=null,E=null,D=document.createElement("div");D.className="geToolbarContainer geDialogToolbar";var F=document.createElement("a");F.className="geButton";var H=F.cloneNode(!1);H.style.backgroundImage="url("+Editor.plusImage+")";H.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(H,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(fa)}finally{p.model.endUpdate()}m(fa)}mxEvent.consume(O)});
+p.isEnabled()||H.classList.add("mxDisabled");D.appendChild(H);var M=F.cloneNode();M.style.backgroundImage="url("+Editor.layersImage+")";M.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(M,"click",function(O){if(p.isEnabled()&&!p.isSelectionEmpty()){var fa=mxUtils.getOffset(M);a.showPopupMenu(mxUtils.bind(this,function(S,aa){for(var Y=p.getLayerForCells(p.getSelectionCells()),ba=A-1;0<=ba;ba--)mxUtils.bind(this,function(L){var U="1"==mxUtils.getValue(p.getCurrentCellStyle(L),
+"locked","0"),X=S.addItem(p.convertValueToString(L)||mxResources.get("background"),null,mxUtils.bind(this,function(){U||p.moveCells(p.getSelectionCells(),0,0,!1,L)}),aa,null,null,!U);U?S.addCheckmark(X,Editor.lockedImage):L==Y&&S.addCheckmark(X,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,ba))}),fa.x,fa.y+M.offsetHeight,O)}});D.appendChild(M);var N=F.cloneNode(!1);N.style.backgroundImage="url("+Editor.editImage+")";N.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(N,
+"click",function(O){p.isEnabled()&&a.showDataDialog(E);mxEvent.consume(O)});p.isEnabled()||N.classList.add("mxDisabled");D.appendChild(N);var J=new mxDictionary,V=F.cloneNode(!1);V.style.backgroundImage="url("+Editor.duplicateImage+")";V.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(V,"click",function(O){if(p.isEnabled()){O=null;p.model.beginUpdate();try{O=p.cloneCell(E),p.cellLabelChanged(O,mxResources.get("untitledLayer")),O.setVisible(!0),O=p.addCell(O,p.model.root),p.setDefaultParent(O)}finally{p.model.endUpdate()}null==
+O||p.isCellLocked(O)||p.selectAll(O)}});p.isEnabled()||V.classList.add("mxDisabled");D.appendChild(V);var W=F.cloneNode(!1);W.style.backgroundImage="url("+Editor.trashImage+")";W.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(W,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.model.root.getIndex(E);p.removeCells([E],!1);0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<fa&&fa<=p.model.getChildCount(p.model.root)?
+p.setDefaultParent(p.model.getChildAt(p.model.root,fa-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(O)});p.isEnabled()||W.classList.add("mxDisabled");D.appendChild(W);k.appendChild(D);var T=document.createElement("span");T.setAttribute("title",mxResources.get("selectionOnly"));T.innerHTML="&#8226;";T.style.position="absolute";T.style.fontWeight="bold";T.style.fontSize="16pt";T.style.right="6px";h();p.model.addListener(mxEvent.CHANGE,h);p.addListener("defaultParentChanged",
h);a.addListener("lockedChanged",h);p.selectionModel.addListener(mxEvent.CHANGE,function(){p.isSelectionEmpty()?M.classList.add("mxDisabled"):M.classList.remove("mxDisabled");d()});this.window=new mxWindow(mxResources.get("layers"),k,b,e,f,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){u.scrollTop=u.scrollHeight-u.clientHeight};
this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=h;a.installResizeHandler(this,!0)};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
@@ -12138,68 +12142,68 @@ this.createVertexTemplateEntry(a+"vimeo;fillColor=#1AB7EA;strokeColor=none",62.6
"yelp","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yoolink",79.2,79.2,"","Yoolink",null,null,this.getTagsForStencil("mxgraph.weblogos","yoolink","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youmob",76,76.2,"","Youmob",null,null,this.getTagsForStencil("mxgraph.weblogos","youmob","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube;fillColor=#FF2626;gradientColor=#B5171F",.2*786,65.8,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos",
"youtube","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube_2;fillColor=#FF2626;gradientColor=#B5171F",.2*232,32.6,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" "))]);this.setCurrentSearchEntryLibrary()}})();
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,f){b.raw=f;return b};$jscomp.arrayIteratorImpl=function(b){var f=0;return function(){return f<b.length?{done:!1,value:b[f++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return f?f.call(b):$jscomp.arrayIterator(b)};
-$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,f,g){if(b==Array.prototype||b==Object.prototype)return b;b[f]=g.value;return b};
-$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var f=0;f<b.length;++f){var g=b[f];if(g&&g.Math==Math)return g}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};
-$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,f){var g=$jscomp.propertyToPolyfillSymbol[f];if(null==g)return b[f];g=b[g];return void 0!==g?g:b[f]};$jscomp.polyfill=function(b,f,g,c){f&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,f,g,c):$jscomp.polyfillUnisolated(b,f,g,c))};
-$jscomp.polyfillUnisolated=function(b,f,g,c){g=$jscomp.global;b=b.split(".");for(c=0;c<b.length-1;c++){var p=b[c];if(!(p in g))return;g=g[p]}b=b[b.length-1];c=g[b];f=f(c);f!=c&&null!=f&&$jscomp.defineProperty(g,b,{configurable:!0,writable:!0,value:f})};
-$jscomp.polyfillIsolated=function(b,f,g,c){var p=b.split(".");b=1===p.length;c=p[0];c=!b&&c in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var q=0;q<p.length-1;q++){var u=p[q];if(!(u in c))return;c=c[u]}p=p[p.length-1];g=$jscomp.IS_SYMBOL_NATIVE&&"es6"===g?c[p]:null;f=f(g);null!=f&&(b?$jscomp.defineProperty($jscomp.polyfills,p,{configurable:!0,writable:!0,value:f}):f!==g&&(void 0===$jscomp.propertyToPolyfillSymbol[p]&&(g=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[p]=$jscomp.IS_SYMBOL_NATIVE?
-$jscomp.global.Symbol(p):$jscomp.POLYFILL_PREFIX+g+"$"+p),$jscomp.defineProperty(c,$jscomp.propertyToPolyfillSymbol[p],{configurable:!0,writable:!0,value:f})))};$jscomp.underscoreProtoCanBeSet=function(){var b={a:!0},f={};try{return f.__proto__=b,f.a}catch(g){}return!1};
+$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,f,k){if(b==Array.prototype||b==Object.prototype)return b;b[f]=k.value;return b};
+$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var f=0;f<b.length;++f){var k=b[f];if(k&&k.Math==Math)return k}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};
+$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,f){var k=$jscomp.propertyToPolyfillSymbol[f];if(null==k)return b[f];k=b[k];return void 0!==k?k:b[f]};$jscomp.polyfill=function(b,f,k,c){f&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,f,k,c):$jscomp.polyfillUnisolated(b,f,k,c))};
+$jscomp.polyfillUnisolated=function(b,f,k,c){k=$jscomp.global;b=b.split(".");for(c=0;c<b.length-1;c++){var p=b[c];if(!(p in k))return;k=k[p]}b=b[b.length-1];c=k[b];f=f(c);f!=c&&null!=f&&$jscomp.defineProperty(k,b,{configurable:!0,writable:!0,value:f})};
+$jscomp.polyfillIsolated=function(b,f,k,c){var p=b.split(".");b=1===p.length;c=p[0];c=!b&&c in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var q=0;q<p.length-1;q++){var u=p[q];if(!(u in c))return;c=c[u]}p=p[p.length-1];k=$jscomp.IS_SYMBOL_NATIVE&&"es6"===k?c[p]:null;f=f(k);null!=f&&(b?$jscomp.defineProperty($jscomp.polyfills,p,{configurable:!0,writable:!0,value:f}):f!==k&&(void 0===$jscomp.propertyToPolyfillSymbol[p]&&(k=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[p]=$jscomp.IS_SYMBOL_NATIVE?
+$jscomp.global.Symbol(p):$jscomp.POLYFILL_PREFIX+k+"$"+p),$jscomp.defineProperty(c,$jscomp.propertyToPolyfillSymbol[p],{configurable:!0,writable:!0,value:f})))};$jscomp.underscoreProtoCanBeSet=function(){var b={a:!0},f={};try{return f.__proto__=b,f.a}catch(k){}return!1};
$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(b,f){b.__proto__=f;if(b.__proto__!==f)throw new TypeError(b+" is not extensible");return b}:null;$jscomp.generator={};$jscomp.generator.ensureIteratorResultIsObject_=function(b){if(!(b instanceof Object))throw new TypeError("Iterator result "+b+" is not an object");};
$jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null};$jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1};
$jscomp.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};$jscomp.generator.Context.prototype.next_=function(b){this.yieldResult=b};$jscomp.generator.Context.prototype.throw_=function(b){this.abruptCompletion_={exception:b,isException:!0};this.jumpToErrorHandler_()};$jscomp.generator.Context.prototype.return=function(b){this.abruptCompletion_={return:b};this.nextAddress=this.finallyAddress_};
-$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(b){this.abruptCompletion_={jumpTo:b};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(b,f){this.nextAddress=f;return{value:b}};$jscomp.generator.Context.prototype.yieldAll=function(b,f){b=$jscomp.makeIterator(b);var g=b.next();$jscomp.generator.ensureIteratorResultIsObject_(g);if(g.done)this.yieldResult=g.value,this.nextAddress=f;else return this.yieldAllIterator_=b,this.yield(g.value,f)};
+$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(b){this.abruptCompletion_={jumpTo:b};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(b,f){this.nextAddress=f;return{value:b}};$jscomp.generator.Context.prototype.yieldAll=function(b,f){b=$jscomp.makeIterator(b);var k=b.next();$jscomp.generator.ensureIteratorResultIsObject_(k);if(k.done)this.yieldResult=k.value,this.nextAddress=f;else return this.yieldAllIterator_=b,this.yield(k.value,f)};
$jscomp.generator.Context.prototype.jumpTo=function(b){this.nextAddress=b};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0};$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(b,f){this.catchAddress_=b;void 0!=f&&(this.finallyAddress_=f)};$jscomp.generator.Context.prototype.setFinallyBlock=function(b){this.catchAddress_=0;this.finallyAddress_=b||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(b,f){this.nextAddress=b;this.catchAddress_=f||0};
-$jscomp.generator.Context.prototype.enterCatchBlock=function(b){this.catchAddress_=b||0;b=this.abruptCompletion_.exception;this.abruptCompletion_=null;return b};$jscomp.generator.Context.prototype.enterFinallyBlock=function(b,f,g){g?this.finallyContexts_[g]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=b||0;this.finallyAddress_=f||0};
+$jscomp.generator.Context.prototype.enterCatchBlock=function(b){this.catchAddress_=b||0;b=this.abruptCompletion_.exception;this.abruptCompletion_=null;return b};$jscomp.generator.Context.prototype.enterFinallyBlock=function(b,f,k){k?this.finallyContexts_[k]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=b||0;this.finallyAddress_=f||0};
$jscomp.generator.Context.prototype.leaveFinallyBlock=function(b,f){f=this.finallyContexts_.splice(f||0)[0];if(f=this.abruptCompletion_=this.abruptCompletion_||f){if(f.isException)return this.jumpToErrorHandler_();void 0!=f.jumpTo&&this.finallyAddress_<f.jumpTo?(this.nextAddress=f.jumpTo,this.abruptCompletion_=null):this.nextAddress=this.finallyAddress_}else this.nextAddress=b};$jscomp.generator.Context.prototype.forIn=function(b){return new $jscomp.generator.Context.PropertyIterator(b)};
$jscomp.generator.Context.PropertyIterator=function(b){this.object_=b;this.properties_=[];for(var f in b)this.properties_.push(f);this.properties_.reverse()};$jscomp.generator.Context.PropertyIterator.prototype.getNext=function(){for(;0<this.properties_.length;){var b=this.properties_.pop();if(b in this.object_)return b}return null};$jscomp.generator.Engine_=function(b){this.context_=new $jscomp.generator.Context;this.program_=b};
$jscomp.generator.Engine_.prototype.next_=function(b){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_.next,b,this.context_.next_);this.context_.next_(b);return this.nextStep_()};
-$jscomp.generator.Engine_.prototype.return_=function(b){this.context_.start_();var f=this.context_.yieldAllIterator_;if(f)return this.yieldAllStep_("return"in f?f["return"]:function(g){return{value:g,done:!0}},b,this.context_.return);this.context_.return(b);return this.nextStep_()};
+$jscomp.generator.Engine_.prototype.return_=function(b){this.context_.start_();var f=this.context_.yieldAllIterator_;if(f)return this.yieldAllStep_("return"in f?f["return"]:function(k){return{value:k,done:!0}},b,this.context_.return);this.context_.return(b);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.throw_=function(b){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_["throw"],b,this.context_.next_);this.context_.throw_(b);return this.nextStep_()};
-$jscomp.generator.Engine_.prototype.yieldAllStep_=function(b,f,g){try{var c=b.call(this.context_.yieldAllIterator_,f);$jscomp.generator.ensureIteratorResultIsObject_(c);if(!c.done)return this.context_.stop_(),c;var p=c.value}catch(q){return this.context_.yieldAllIterator_=null,this.context_.throw_(q),this.nextStep_()}this.context_.yieldAllIterator_=null;g.call(this.context_,p);return this.nextStep_()};
+$jscomp.generator.Engine_.prototype.yieldAllStep_=function(b,f,k){try{var c=b.call(this.context_.yieldAllIterator_,f);$jscomp.generator.ensureIteratorResultIsObject_(c);if(!c.done)return this.context_.stop_(),c;var p=c.value}catch(q){return this.context_.yieldAllIterator_=null,this.context_.throw_(q),this.nextStep_()}this.context_.yieldAllIterator_=null;k.call(this.context_,p);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var b=this.program_(this.context_);if(b)return this.context_.stop_(),{value:b.value,done:!1}}catch(f){this.context_.yieldResult=void 0,this.context_.throw_(f)}this.context_.stop_();if(this.context_.abruptCompletion_){b=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(b.isException)throw b.exception;return{value:b.return,done:!0}}return{value:void 0,done:!0}};
$jscomp.generator.Generator_=function(b){this.next=function(f){return b.next_(f)};this.throw=function(f){return b.throw_(f)};this.return=function(f){return b.return_(f)};this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(b,f){f=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(f));$jscomp.setPrototypeOf&&b.prototype&&$jscomp.setPrototypeOf(f,b.prototype);return f};
-$jscomp.asyncExecutePromiseGenerator=function(b){function f(c){return b.next(c)}function g(c){return b.throw(c)}return new Promise(function(c,p){function q(u){u.done?c(u.value):Promise.resolve(u.value).then(f,g).then(q,p)}q(b.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(b){return $jscomp.asyncExecutePromiseGenerator(b())};$jscomp.asyncExecutePromiseGeneratorProgram=function(b){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(b)))};
+$jscomp.asyncExecutePromiseGenerator=function(b){function f(c){return b.next(c)}function k(c){return b.throw(c)}return new Promise(function(c,p){function q(u){u.done?c(u.value):Promise.resolve(u.value).then(f,k).then(q,p)}q(b.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(b){return $jscomp.asyncExecutePromiseGenerator(b())};$jscomp.asyncExecutePromiseGeneratorProgram=function(b){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(b)))};
DrawioFile=function(b,f){mxEventSource.call(this);this.ui=b;this.setData(f||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;DrawioFile.RESTRICT_EXPORT=!1;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};
-DrawioFile.prototype.synchronizeFile=function(b,f){if(this.savingFile)null!=f&&f({message:mxResources.get("busy")});else{var g=!0,c=window.setTimeout(mxUtils.bind(this,function(){g=!1;null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,f)})})}),this.ui.timeout),p=mxUtils.bind(this,function(u){g&&(window.clearTimeout(c),null!=f&&f(u))}),q=mxUtils.bind(this,function(){return!g});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,
-function(u){g&&(window.clearTimeout(c),this.sync.cleanup(b,f,u))}),p,q):this.updateFile(mxUtils.bind(this,function(){g&&(window.clearTimeout(c),null!=b&&b())}),p,q)}};
-DrawioFile.prototype.updateFile=function(b,f,g,c,p){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",p,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(q){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[q]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=q?this.mergeFile(q,b,f,
+DrawioFile.prototype.synchronizeFile=function(b,f){if(this.savingFile)null!=f&&f({message:mxResources.get("busy")});else{var k=!0,c=window.setTimeout(mxUtils.bind(this,function(){k=!1;null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,f)})})}),this.ui.timeout),p=mxUtils.bind(this,function(u){k&&(window.clearTimeout(c),null!=f&&f(u))}),q=mxUtils.bind(this,function(){return!k});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,
+function(u){k&&(window.clearTimeout(c),this.sync.cleanup(b,f,u))}),p,q):this.updateFile(mxUtils.bind(this,function(){k&&(window.clearTimeout(c),null!=b&&b())}),p,q)}};
+DrawioFile.prototype.updateFile=function(b,f,k,c,p){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",p,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(q){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[q]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=q?this.mergeFile(q,b,f,
c,p):this.reloadFile(b,f))}catch(u){null!=f&&f(u)}}),f))};
-DrawioFile.prototype.mergeFile=function(b,f,g,c,p){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var u=this.getShadowPages(),y=[this.ui.diffPages(null!=c?c:u,q)],H=this.ignorePatches(y);if(H)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",H),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var E=this.isModified()?this.ui.diffPages(u,
-this.isRealtime()?this.ownPages:this.ui.pages):null,F=this.ui.patchPages(this.ui.clonePages(u),y[0]),d=this.ui.getHashValueForPages(F,{}),k=this.ui.getHashValueForPages(q,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",u,"pages",q,"patched",F,"patches",y,"changes",E,"checksum",d,"current",k,"valid",d==k,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",p);if(null!=d&&d!=k)this.checksumError(g,y,null,null,"mergeFile",
-d,k,b.getCurrentRevisionId());else{this.setShadowPages(q);if(null!=this.sync){var l=this.sync.patchRealtime(y,DrawioFile.LAST_WRITE_WINS?E:null,null,p);null==l||mxUtils.isEmptyObject(l)||y.push(l)}this.patch(y,DrawioFile.LAST_WRITE_WINS?E:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(A){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(A);try{var n=this.getCurrentUser(),x=null!=n?
-n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,A)}catch(B){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(A){null!=g&&g(A)}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),g=f.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var p=f.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(p=this.ui.anonymizeNode(p,!0));p.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,p,!0);g.appendChild(p)}return mxUtils.getPrettyXml(g)};
-DrawioFile.prototype.compressReportData=function(b,f,g){f=null!=f?f:1E4;null!=g&&null!=b&&b.length>g?b=b.substring(0,g)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,f,g,c,p,q,u,y){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var H=this.getCurrentUser(),E=null!=H?H.id:"unknown",F=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",d=JSON.stringify(f).length,k=null;if(null!=f&&1E3>d){b=[];for(g=0;g<f.length;g++)b.push(this.ui.anonymizePatch(f[g]));k=JSON.stringify(b);k=null!=k&&1E3>
-k.length?Graph.compress(k):null}this.getLatestVersion(mxUtils.bind(this,function(l){try{var n=null!=k?"report":"error",x=this.ui.getHashValueForPages(l.getShadowPages()),A="unknown",B="unknown",I="unknown";try{var G=null!=l.initialData&&0<l.initialData.length?mxUtils.parseXml(l.initialData).documentElement:null;null!=G&&(null!=G.getAttribute("version")&&(A=G.getAttribute("version")),null!=G.getAttribute("agent")&&(B=G.getAttribute("agent")),null!=G.getAttribute("type")&&(I=G.getAttribute("type")))}catch(C){}EditorUi.logError("Checksum "+
-n+" in "+p,null,this.getMode()+"."+F,"user_"+E+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+f.length+(null!=k?"-json_"+k:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=u?"-current_"+u:"")+(null!=y?"-rev_"+this.ui.hashValue(y):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId())+("-latestVersion_"+A)+("-latestAgent_"+B)+("-latestType_"+I));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+F,action:p,label:"user_"+
-E+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+f.length+"-size_"+this.getSize()})}catch(C){}}),function(){})}catch(l){}};
-DrawioFile.prototype.sendErrorReport=function(b,f,g,c){try{var p=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),u=this.getCurrentUser(),y=null!=u?this.ui.hashValue(u.id):"unknown",H=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",E=this.getTitle(),F=E.lastIndexOf(".");u="xml";0<F&&(u=E.substring(F));var d=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+u+")\nUser="+y+H+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
-"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+d+"\n\nShadow:\n"+p+"\n\nData:\n"+q,c)}catch(k){}};
-DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var g=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),c=this.ui.editor.graph,p=c.getSelectionCells(),q=c.getViewState(),u=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(y){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[g],"viewState",[q],"latestFile",y);null!=y?(this.ui.replaceFileData(y.getData(),
-[g]),this.ui.restoreViewState(u,q,p),this.setDescriptor(y.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var H=this.ui.getCurrentFile();null!=H&&(H.stats=this.stats,H.patch([g]),H.fileChanged());this.ui.restoreViewState(u,q,p);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(y){null!=f&&f(y)}};
-DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var g=0;g<b.length&&f;g++)f=f&&mxUtils.isEmptyObject(b[g]);return f};
-DrawioFile.prototype.patch=function(b,f,g,c){if(null!=b){var p=this.ui.editor.undoManager,q=p.history.slice(),u=p.indexOfNextAdd,y=this.ui.editor.graph;y.container.style.visibility="hidden";var H=this.changeListenerEnabled;this.changeListenerEnabled=g;var E=y.foldingEnabled,F=y.mathEnabled,d=y.cellRenderer.redraw;y.cellRenderer.redraw=function(B){B.view.graph.isEditing(B.cell)&&(B.view.graph.scrollCellToVisible(B.cell),B.view.graph.cellEditor.resize());d.apply(this,arguments)};y.model.beginUpdate();
-try{if(g){for(var k=this.ui.pages.slice(),l=this.ui.currentPage,n=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),x=0;x<n.length;x++){var A=mxUtils.indexOf(this.ui.pages,n[x]);0>A?this.ui.insertPage(n[x],Math.min(x,this.ui.pages.length)):this.ui.movePage(A,x)}for(x=0;x<k.length;x++)0>mxUtils.indexOf(n,k[x])&&this.ui.removePage(k[x]);0<=mxUtils.indexOf(this.ui.pages,l)&&this.ui.selectPage(l,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified());0==this.ui.pages.length&&
-this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);y.checkDefaultParent()}finally{y.container.style.visibility="";y.model.endUpdate();y.cellRenderer.redraw=d;this.changeListenerEnabled=H;g||(p.history=q,p.indexOfNextAdd=u,p.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)F!=y.mathEnabled?(this.ui.editor.updateGraphComponents(),y.refresh()):(E!=y.foldingEnabled?
-y.view.revalidate():y.view.validate(),y.sizeDidChange());null!=this.sync&&this.isRealtime()&&!c&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",g)}return b};
-DrawioFile.prototype.save=function(b,f,g,c,p,q){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",p,"manual",q,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!p&&this.invalidChecksum)if(null!=g)g({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=g)g({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(u){if(null!=g)g(u);else throw u;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
+DrawioFile.prototype.mergeFile=function(b,f,k,c,p){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var u=this.getShadowPages(),z=[this.ui.diffPages(null!=c?c:u,q)],G=this.ignorePatches(z);if(G)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",G),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var E=this.isModified()?this.ui.diffPages(u,
+this.isRealtime()?this.ownPages:this.ui.pages):null,F=this.ui.patchPages(this.ui.clonePages(u),z[0]),d=this.ui.getHashValueForPages(F,{}),g=this.ui.getHashValueForPages(q,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",u,"pages",q,"patched",F,"patches",z,"changes",E,"checksum",d,"current",g,"valid",d==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",p);if(null!=d&&d!=g)this.checksumError(k,z,null,null,"mergeFile",
+d,g,b.getCurrentRevisionId());else{this.setShadowPages(q);if(null!=this.sync){var l=this.sync.patchRealtime(z,DrawioFile.LAST_WRITE_WINS?E:null,null,p);null==l||mxUtils.isEmptyObject(l)||z.push(l)}this.patch(z,DrawioFile.LAST_WRITE_WINS?E:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(A){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(A);try{var n=this.getCurrentUser(),x=null!=n?
+n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,A)}catch(B){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(A){null!=k&&k(A)}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),k=f.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var p=f.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(p=this.ui.anonymizeNode(p,!0));p.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,p,!0);k.appendChild(p)}return mxUtils.getPrettyXml(k)};
+DrawioFile.prototype.compressReportData=function(b,f,k){f=null!=f?f:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
+DrawioFile.prototype.checksumError=function(b,f,k,c,p,q,u,z){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var G=this.getCurrentUser(),E=null!=G?G.id:"unknown",F=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",d=JSON.stringify(f).length,g=null;if(null!=f&&1E3>d){b=[];for(k=0;k<f.length;k++)b.push(this.ui.anonymizePatch(f[k]));g=JSON.stringify(b);g=null!=g&&1E3>
+g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(l){try{var n=null!=g?"report":"error",x=this.ui.getHashValueForPages(l.getShadowPages()),A="unknown",B="unknown",I="unknown";try{var H=null!=l.initialData&&0<l.initialData.length?mxUtils.parseXml(l.initialData).documentElement:null;null!=H&&(null!=H.getAttribute("version")&&(A=H.getAttribute("version")),null!=H.getAttribute("agent")&&(B=H.getAttribute("agent")),null!=H.getAttribute("type")&&(I=H.getAttribute("type")))}catch(D){}EditorUi.logError("Checksum "+
+n+" in "+p,null,this.getMode()+"."+F,"user_"+E+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+f.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=u?"-current_"+u:"")+(null!=z?"-rev_"+this.ui.hashValue(z):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId())+("-latestVersion_"+A)+("-latestAgent_"+B)+("-latestType_"+I));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+F,action:p,label:"user_"+
+E+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+f.length+"-size_"+this.getSize()})}catch(D){}}),function(){})}catch(l){}};
+DrawioFile.prototype.sendErrorReport=function(b,f,k,c){try{var p=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),u=this.getCurrentUser(),z=null!=u?this.ui.hashValue(u.id):"unknown",G=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",E=this.getTitle(),F=E.lastIndexOf(".");u="xml";0<F&&(u=E.substring(F));var d=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+u+")\nUser="+z+G+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
+"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+d+"\n\nShadow:\n"+p+"\n\nData:\n"+q,c)}catch(g){}};
+DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var k=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),c=this.ui.editor.graph,p=c.getSelectionCells(),q=c.getViewState(),u=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(z){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[k],"viewState",[q],"latestFile",z);null!=z?(this.ui.replaceFileData(z.getData(),
+[k]),this.ui.restoreViewState(u,q,p),this.setDescriptor(z.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var G=this.ui.getCurrentFile();null!=G&&(G.stats=this.stats,G.patch([k]),G.fileChanged());this.ui.restoreViewState(u,q,p);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(z){null!=f&&f(z)}};
+DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var k=0;k<b.length&&f;k++)f=f&&mxUtils.isEmptyObject(b[k]);return f};
+DrawioFile.prototype.patch=function(b,f,k,c){if(null!=b){var p=this.ui.editor.undoManager,q=p.history.slice(),u=p.indexOfNextAdd,z=this.ui.editor.graph;z.container.style.visibility="hidden";var G=this.changeListenerEnabled;this.changeListenerEnabled=k;var E=z.foldingEnabled,F=z.mathEnabled,d=z.cellRenderer.redraw;z.cellRenderer.redraw=function(B){B.view.graph.isEditing(B.cell)&&(B.view.graph.scrollCellToVisible(B.cell),B.view.graph.cellEditor.resize());d.apply(this,arguments)};z.model.beginUpdate();
+try{if(k){for(var g=this.ui.pages.slice(),l=this.ui.currentPage,n=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),x=0;x<n.length;x++){var A=mxUtils.indexOf(this.ui.pages,n[x]);0>A?this.ui.insertPage(n[x],Math.min(x,this.ui.pages.length)):this.ui.movePage(A,x)}for(x=0;x<g.length;x++)0>mxUtils.indexOf(n,g[x])&&this.ui.removePage(g[x]);0<=mxUtils.indexOf(this.ui.pages,l)&&this.ui.selectPage(l,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified());0==this.ui.pages.length&&
+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);z.checkDefaultParent()}finally{z.container.style.visibility="";z.model.endUpdate();z.cellRenderer.redraw=d;this.changeListenerEnabled=G;k||(p.history=q,p.indexOfNextAdd=u,p.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)F!=z.mathEnabled?(this.ui.editor.updateGraphComponents(),z.refresh()):(E!=z.foldingEnabled?
+z.view.revalidate():z.view.validate(),z.sizeDidChange());null!=this.sync&&this.isRealtime()&&!c&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",k)}return b};
+DrawioFile.prototype.save=function(b,f,k,c,p,q){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",p,"manual",q,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!p&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=k)k({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(u){if(null!=k)k(u);else throw u;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return Editor.defaultCompressed};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};
-DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,f,g){};DrawioFile.prototype.saveFile=function(b,f,g,c){};DrawioFile.prototype.getFileUrl=function(){return null};
+DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,f,k){};DrawioFile.prototype.saveFile=function(b,f,k,c){};DrawioFile.prototype.getFileUrl=function(){return null};
DrawioFile.prototype.getFolderUrl=function(b){return null};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return DrawioFile.RESTRICT_EXPORT};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};
-DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,f,g){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,f,g){};
-DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var f=this.ui.editor.graph,g=f.getSelectionCells(),c=f.getViewState(),p=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(p,
-c,g);this.ui.actions.get("share").funct()}))}))}),null,mxResources.get("saveToGoogleDrive",null,"Save to Google Drive"),mxResources.get("cancel")):this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
-DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var f=0;null!=b&&f<b.length;f++){var g=b[f];null!=g.id&&0==g.id.indexOf("extFont_")&&g.parentNode.removeChild(g)}};
+DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,f,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,f,k){};
+DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var f=this.ui.editor.graph,k=f.getSelectionCells(),c=f.getViewState(),p=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(p,
+c,k);this.ui.actions.get("share").funct()}))}))}),null,mxResources.get("saveToGoogleDrive",null,"Save to Google Drive"),mxResources.get("cancel")):this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
+DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var f=0;null!=b&&f<b.length;f++){var k=b[f];null!=k.id&&0==k.id.indexOf("extFont_")&&k.parentNode.removeChild(k)}};
DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();null!=b&&(this.ui.setFileData(b),this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages)));this.installListeners();this.isSyncSupported()&&this.startSync();EditorUi.debug("DrawioFile.open",[this])};DrawioFile.prototype.isPolling=function(){return!1};DrawioFile.prototype.getPollingInterval=function(){return 1E4};DrawioFile.prototype.isSyncSupported=function(){return!1};
DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages&&null!=this.ui.pages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,f){b(null)};
-DrawioFile.prototype.loadDescriptor=function(b,f){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,f){this.loadDescriptor(mxUtils.bind(this,function(g){b(g)}),f)};DrawioFile.prototype.patchDescriptor=function(b,f){this.setDescriptorEtag(b,this.getDescriptorEtag(f));this.descriptorChanged()};
+DrawioFile.prototype.loadDescriptor=function(b,f){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,f){this.loadDescriptor(mxUtils.bind(this,function(k){b(k)}),f)};DrawioFile.prototype.patchDescriptor=function(b,f){this.setDescriptorEtag(b,this.getDescriptorEtag(f));this.descriptorChanged()};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};
DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,f){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,f){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};DrawioFile.prototype.getDescriptor=function(){return null};
@@ -12209,470 +12213,465 @@ this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener)
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
DrawioFile.prototype.addAllSavedStatus=function(b){if(null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this){b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));var f=this.isRevisionHistorySupported()&&b!=mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+f+'title="'+b+'">'+b+(this.isLocked()?' <img class="geToolbarButton" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+
Editor.lockedImage+'"/>':"")+"</div>")}};
-DrawioFile.prototype.saveDraft=function(b){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var f={type:"draft",created:this.created,modified:(new Date).getTime(),data:null!=b?b:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(f));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[f])}catch(g){this.removeDraft()}};
+DrawioFile.prototype.saveDraft=function(b){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var f={type:"draft",created:this.created,modified:(new Date).getTime(),data:null!=b?b:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(f));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[f])}catch(k){this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};
DrawioFile.prototype.addUnsavedStatus=function(b){this.inConflictState||null==this.ui.statusContainer||this.ui.getCurrentFile()!=this||(b instanceof Error&&null!=b.message&&""!=b.message?this.ui.updateStatus(mxUtils.bind(this,function(){var f=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+f+'" data-title="'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+'" data-message="'+mxUtils.htmlEntities(b.message)+'" class="geStatusAlert">'+f+" ("+mxUtils.htmlEntities(b.message)+
-")</div>")})):(this.ui.updateStatus(mxUtils.bind(this,function(){var f=this.getErrorMessage(b);if(null==f&&null!=this.lastSaved){var g=this.ui.timeSince(new Date(this.lastSaved));null!=g&&(f=mxResources.get("lastSaved",[g]))}null!=f&&60<f.length&&(f=f.substring(0,60)+"...");f=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=f&&""!=f?" ("+mxUtils.htmlEntities(f)+")":"");g='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"';this.ui.editor.setStatus("<div "+
-g+' title="'+f+'" class="geStatusAlert">'+f+"</div>")})),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=
+")</div>")})):(this.ui.updateStatus(mxUtils.bind(this,function(){var f=this.getErrorMessage(b);if(null==f&&null!=this.lastSaved){var k=this.ui.timeSince(new Date(this.lastSaved));null!=k&&(f=mxResources.get("lastSaved",[k]))}null!=f&&60<f.length&&(f=f.substring(0,60)+"...");f=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=f&&""!=f?" ("+mxUtils.htmlEntities(f)+")":"");k='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"';this.ui.editor.setStatus("<div "+
+k+' title="'+f+'" class="geStatusAlert">'+f+"</div>")})),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=
null;this.saveDraft()}),EditorUi.draftSaveDelay||0))))};DrawioFile.prototype.addConflictStatus=function(b,f){this.ui.updateStatus(mxUtils.bind(this,function(){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""),f)}));this.ui.spinner.stop();this.clearAutosave()};
DrawioFile.prototype.setConflictStatus=function(b,f){this.ui.editor.setStatus('<div title="'+b+'" '+(null!=f?'data-action="statusFunction"':"")+' class="geStatusAlert">'+b+'<img data-link="https://www.drawio.com/doc/faq/synchronize" src="'+Editor.helpImage+'" style="margin-left:2px;cursor:help;"/></div>',f)};
-DrawioFile.prototype.showRefreshDialog=function(b,f,g){null==g&&(g=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,f)})):(this.addConflictStatus(g,mxUtils.bind(this,function(){this.showRefreshDialog(b,f)})),this.ui.showError(mxResources.get("warning")+" ("+g+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(mxUtils.bind(this,
+DrawioFile.prototype.showRefreshDialog=function(b,f,k){null==k&&(k=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,f)})):(this.addConflictStatus(k,mxUtils.bind(this,function(){this.showRefreshDialog(b,f)})),this.ui.showError(mxResources.get("warning")+" ("+k+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(mxUtils.bind(this,
function(){null!=b&&b();this.ui.alert(mxResources.get("copyCreated"))}),f)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.reloadFile(mxUtils.bind(this,function(){this.ui.spinner.stop();null!=b&&b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=f&&f()}))}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
-DrawioFile.prototype.showCopyDialog=function(b,f,g){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,f)}),null,mxResources.get("overwrite"),g,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
+DrawioFile.prototype.showCopyDialog=function(b,f,k){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,f)}),null,mxResources.get("overwrite"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
DrawioFile.prototype.showConflictDialog=function(b,f){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),f,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,f){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var g=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),c=mxResources.get("redirectToNewApp");null!=f&&(c+=" ("+f+")");f=mxUtils.bind(this,function(){var p=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==g?window.location.reload():window.location.href=
-g});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),p,mxResources.get("cancel"),mxResources.get("discardChanges")):p()});null!=b?this.isModified()?this.ui.confirm(c,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(c,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+DrawioFile.prototype.redirectToNewApp=function(b,f){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),c=mxResources.get("redirectToNewApp");null!=f&&(c+=" ("+f+")");f=mxUtils.bind(this,function(){var p=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
+k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),p,mxResources.get("cancel"),mxResources.get("discardChanges")):p()});null!=b?this.isModified()?this.ui.confirm(c,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(c,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
f)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified(),"remoteFileChanged",null==this.sync?"n/a":this.sync.remoteFileChanged),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")")})):
this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus()})),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.clearStatus())};
-DrawioFile.prototype.handleFileError=function(b,f){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,f):(this.isModified()&&this.addUnsavedStatus(b),f?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||this.ui.updateStatus(mxUtils.bind(this,function(){var g=this.getErrorMessage(b);null!=g&&60<g.length&&(g=g.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+
-(null!=g?" ("+mxUtils.htmlEntities(g)+")":"")+"</div>")}))))};
-DrawioFile.prototype.handleConflictError=function(b,f){var g=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(u){this.handleFileError(u,!0)}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,g,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),q=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,g,c,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),c)});"none"==DrawioFile.SYNC?this.showCopyDialog(g,c,p):this.invalidChecksum&&f?this.showRefreshDialog(g,c,this.getErrorMessage(b)):f?this.showConflictDialog(p,q):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(g,c)}))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT?f=mxResources.get("timeout"):"0"==f&&(f=mxResources.get("noResponse"));return f};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
-DrawioFile.prototype.compressionChanged=function(b){var f=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=f)for(var g=0;g<f.length;g++){var c=f[g].node;if(null!=c&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=f[g].getId())){var p=c.getElementsByTagName("mxGraphModel");p=0<p.length?p[0]:null;var q=Graph.decompress(mxUtils.getNodeValue(c));b?0==q.length&&null!=p&&(EditorUi.removeChildNodes(c),mxUtils.setTextContent(c,Graph.compressNode(p)),EditorUi.debug("DrawioFile.compressionChanged",
-[this],"Page "+g+" compressed")):0<q.length&&null==p&&(EditorUi.removeChildNodes(c),c.appendChild(mxUtils.parseXml(q).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+g+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};
+DrawioFile.prototype.handleFileError=function(b,f){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,f):(this.isModified()&&this.addUnsavedStatus(b),f?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||this.ui.updateStatus(mxUtils.bind(this,function(){var k=this.getErrorMessage(b);null!=k&&60<k.length&&(k=k.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+
+(null!=k?" ("+mxUtils.htmlEntities(k)+")":"")+"</div>")}))))};
+DrawioFile.prototype.handleConflictError=function(b,f){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(u){this.handleFileError(u,!0)}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,k,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),q=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,c,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),c)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,c,p):this.invalidChecksum&&f?this.showRefreshDialog(k,c,this.getErrorMessage(b)):f?this.showConflictDialog(p,q):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(k,c)}))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT?f=mxResources.get("timeout"):"0"==f&&(f=mxResources.get("noResponse"));return f};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.compressionChanged=function(b){var f=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=f)for(var k=0;k<f.length;k++){var c=f[k].node;if(null!=c&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=f[k].getId())){var p=c.getElementsByTagName("mxGraphModel");p=0<p.length?p[0]:null;var q=Graph.decompress(mxUtils.getNodeValue(c));b?0==q.length&&null!=p&&(EditorUi.removeChildNodes(c),mxUtils.setTextContent(c,Graph.compressNode(p)),EditorUi.debug("DrawioFile.compressionChanged",
+[this],"Page "+k+" compressed")):0<q.length&&null==p&&(EditorUi.removeChildNodes(c),c.appendChild(mxUtils.parseXml(q).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+k+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};
DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosaveDelay",this.autosaveDelay,"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"...")})),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),
this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(f){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(f){this.handleFileError(f)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
-DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(f,mxUtils.bind(this,function(g){EditorUi.debug("DrawioFile.createSecret",[this],"secret",f,"token",g);b(f,g)}),mxUtils.bind(this,function(){b(f)})):b(f)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,f,g,c,p,q,u){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(q,f,g,c,p,u)}catch(E){this.invalidChecksum=
-this.inConflictState=!0;this.descriptorChanged();null!=c&&c(E);try{var y=this.getCurrentUser(),H=null!=y?y.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),H,E)}catch(F){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(E){this.descriptorChanged(),null!=c&&c(E)}};
-DrawioFile.prototype.autosave=function(b,f,g,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());var p=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var q=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==q&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var u=this.isAutosaveRevision();
-u&&(this.lastAutosaveRevision=(new Date).getTime());this.save(u,mxUtils.bind(this,function(y){this.autosaveCompleted();null!=g&&g(y)}),mxUtils.bind(this,function(y){null!=c&&c(y)}))}else this.isModified()||this.ui.clearStatus(),null!=g&&g(null)}catch(y){null!=c&&c(y)}}),p);this.autosaveThread=q;EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"delay",b,"maxDelay",f,"actualDelay",p,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
+DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(f,mxUtils.bind(this,function(k){EditorUi.debug("DrawioFile.createSecret",[this],"secret",f,"token",k);b(f,k)}),mxUtils.bind(this,function(){b(f)})):b(f)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
+DrawioFile.prototype.fileSaved=function(b,f,k,c,p,q,u){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(q,f,k,c,p,u)}catch(E){this.invalidChecksum=
+this.inConflictState=!0;this.descriptorChanged();null!=c&&c(E);try{var z=this.getCurrentUser(),G=null!=z?z.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),G,E)}catch(F){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(E){this.descriptorChanged(),null!=c&&c(E)}};
+DrawioFile.prototype.autosave=function(b,f,k,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());var p=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var q=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==q&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var u=this.isAutosaveRevision();
+u&&(this.lastAutosaveRevision=(new Date).getTime());this.save(u,mxUtils.bind(this,function(z){this.autosaveCompleted();null!=k&&k(z)}),mxUtils.bind(this,function(z){null!=c&&c(z)}))}else this.isModified()||this.ui.clearStatus(),null!=k&&k(null)}catch(z){null!=c&&c(z)}}),p);this.autosaveThread=q;EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"delay",b,"maxDelay",f,"actualDelay",p,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
-DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(f){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,f){if(null!=b&&null!=f){var g=b.lastIndexOf(".");b=0<g?b.substring(g):"";g=f.lastIndexOf(".");return b===(0<g?f.substring(g):"")}return b==f};
+DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(f){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,f){if(null!=b&&null!=f){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=f.lastIndexOf(".");return b===(0<k?f.substring(k):"")}return b==f};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,g){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,g,c,p,q,u){DrawioFile.call(this,b,f);this.title=g;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=p;this.desc=q;this.editable=u};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
-LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,f,g,c,p){this.saveAs(this.title,f,g,c,p)};LocalFile.prototype.saveAs=function(b,f,g,c,p){this.saveFile(b,!1,f,g,null,c,p)};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,k){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,k,c,p,q,u){DrawioFile.call(this,b,f);this.title=k;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=p;this.desc=q;this.editable=u};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
+LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,f,k,c,p){this.saveAs(this.title,f,k,c,p)};LocalFile.prototype.saveAs=function(b,f,k,c,p){this.saveFile(b,!1,f,k,null,c,p)};
LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?null!=f&&f({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};
-LocalFile.prototype.saveFile=function(b,f,g,c,p,q,u){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;p||this.updateFileData();var y=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var H=this.getData(),E=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),F=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
-!0;var k=mxUtils.bind(this,function(n){this.savingFile=!1;null!=c&&c({error:n})});this.saveDraft(H);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);u||this.desc.lastModified==x.lastModified?n.write(y?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(A){try{var B=this.desc;this.savingFile=!1;this.desc=A;this.fileSaved(H,B,E,k);this.removeDraft()}catch(I){k(I)}}),k)}),k)}),k):(this.inConflictState=!0,k())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;k(x)}))}),k)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,y?"image/png":"text/xml",y);else if(d.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf(".");l=0<l?b.substring(l+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(y?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));E()}});y?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){F(d)}),c,this.ui.getCurrentFile()!=this?H:null,f.scale,f.border)):F(H)};
-LocalFile.prototype.rename=function(b,f,g){this.title=b;this.descriptorChanged();null!=f&&f()};LocalLibrary=function(b,f,g){LocalFile.call(this,b,f,g)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,f,g){this.saveFile(b,!1,f,g)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,f,g){DrawioFile.call(this,b,f);this.title=g;this.etag=this.getEtag(f)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};
-StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,f){this.getLatestVersionId(b,f)};StorageFile.prototype.getLatestVersionId=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(g){b(this.getEtag(g))}),f)};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.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,f,g){this.saveAs(this.getTitle(),f,g)};
-StorageFile.prototype.saveAs=function(b,f,g){DrawioFile.prototype.save.apply(this,[!1,mxUtils.bind(this,function(){this.saveFile(this.getTitle(),!1,f,g)}),g])};StorageFile.insertFile=function(b,f,g,c,p,q){StorageFile.doInsertFile(null!=q?q:new StorageFile(b,g,f),c,p)};
-StorageFile.doInsertFile=function(b,f,g){var c=b.getTitle(),p=b.getUi(),q=mxUtils.bind(this,function(u){var y=function(){b.writeFile(c,function(){f(b)},g)};u?p.confirm(mxResources.get("replaceIt",[c]),y,g):y()});StorageFile.getFileContent(p,c,function(u){q(null!=u)},function(){q(!1)})};StorageFile.getFileContent=function(b,f,g,c){b.getDatabaseItem(f,function(p){g(null!=p?p.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,g):null!=c&&c()}),"files")};
-StorageFile.getFileInfo=function(b,f,g,c){b.getDatabaseItem(f,function(p){g(p)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,function(p){g(null!=p?{title:f}:null)}):null!=c&&c()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(b,f,g,c,p){p=null!=p?p:0;if(this.isEditable()){var q=mxUtils.bind(this,function(){this.writeFile(b,g,c)});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):this instanceof StorageLibrary?q():StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(u){this.isRenamable()&&this.getTitle()!=b&&null!=u?this.ui.confirm(mxResources.get("replaceIt",[b]),q,c):this.getLatestVersion(mxUtils.bind(this,function(y){y.getDescriptor()!=
-this.getDescriptor()?(EditorUi.debug("StorageFile.saveFile",[this],"conflict",[y]),this.mergeFile(y,mxUtils.bind(this,function(){p>=this.maxRetries||this.invalidChecksum||this.inConflictState?(this.inConflictState=!0,null!=c&&c()):this.retrySave(mxUtils.bind(this,function(){this.updateFileData();this.saveFile(b,f,g,c,p+1)}))}),c)):q()}),c)}),c)}else null!=g&&g();EditorUi.debug("StorageFile.saveFile",[this],"title",b,"revision",f,"retry",p)};
+LocalFile.prototype.saveFile=function(b,f,k,c,p,q,u){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;p||this.updateFileData();var z=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var G=this.getData(),E=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),F=mxUtils.bind(this,function(d){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(G);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);u||this.desc.lastModified==x.lastModified?n.write(z?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(A){try{var B=this.desc;this.savingFile=!1;this.desc=A;this.fileSaved(G,B,E,g);this.removeDraft()}catch(I){g(I)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;g(x)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,z?"image/png":"text/xml",z);else if(d.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf(".");l=0<l?b.substring(l+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(z?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));E()}});z?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){F(d)}),c,this.ui.getCurrentFile()!=this?G:null,f.scale,f.border)):F(G)};
+LocalFile.prototype.rename=function(b,f,k){this.title=b;this.descriptorChanged();null!=f&&f()};LocalLibrary=function(b,f,k){LocalFile.call(this,b,f,k)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,f,k){DrawioFile.call(this,b,f);this.title=k;this.etag=this.getEtag(f)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};
+StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,f){this.getLatestVersionId(b,f)};StorageFile.prototype.getLatestVersionId=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(k){b(this.getEtag(k))}),f)};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.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,f,k){this.saveAs(this.getTitle(),f,k)};
+StorageFile.prototype.saveAs=function(b,f,k){DrawioFile.prototype.save.apply(this,[!1,mxUtils.bind(this,function(){this.saveFile(this.getTitle(),!1,f,k)}),k])};StorageFile.insertFile=function(b,f,k,c,p,q){StorageFile.doInsertFile(null!=q?q:new StorageFile(b,k,f),c,p)};
+StorageFile.doInsertFile=function(b,f,k){var c=b.getTitle(),p=b.getUi(),q=mxUtils.bind(this,function(u){var z=function(){b.writeFile(c,function(){f(b)},k)};u?p.confirm(mxResources.get("replaceIt",[c]),z,k):z()});StorageFile.getFileContent(p,c,function(u){q(null!=u)},function(){q(!1)})};StorageFile.getFileContent=function(b,f,k,c){b.getDatabaseItem(f,function(p){k(null!=p?p.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,k):null!=c&&c()}),"files")};
+StorageFile.getFileInfo=function(b,f,k,c){b.getDatabaseItem(f,function(p){k(p)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,function(p){k(null!=p?{title:f}:null)}):null!=c&&c()}),"filesInfo")};
+StorageFile.prototype.saveFile=function(b,f,k,c,p){p=null!=p?p:0;if(this.isEditable()){var q=mxUtils.bind(this,function(){this.writeFile(b,k,c)});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):this instanceof StorageLibrary?q():StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(u){this.isRenamable()&&this.getTitle()!=b&&null!=u?this.ui.confirm(mxResources.get("replaceIt",[b]),q,c):this.getLatestVersion(mxUtils.bind(this,function(z){z.getDescriptor()!=
+this.getDescriptor()?(EditorUi.debug("StorageFile.saveFile",[this],"conflict",[z]),this.mergeFile(z,mxUtils.bind(this,function(){p>=this.maxRetries||this.invalidChecksum||this.inConflictState?(this.inConflictState=!0,null!=c&&c()):this.retrySave(mxUtils.bind(this,function(){this.updateFileData();this.saveFile(b,f,k,c,p+1)}))}),c)):q()}),c)}),c)}else null!=k&&k();EditorUi.debug("StorageFile.saveFile",[this],"title",b,"revision",f,"retry",p)};
StorageFile.prototype.retrySave=function(b){var f=300+300*Math.random();window.setTimeout(b,f);EditorUi.debug("StorageFile.retrySave",[this],"delay",f)};
-StorageFile.prototype.writeFile=function(b,f,g){this.isRenamable()&&(this.title=b);try{var c=this.getDescriptor(),p=this.getData(),q=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.setDescriptor(this.getEtag(p));this.contentChanged();this.fileSaved(p,c,f,g)});this.setShadowModified(!1);this.ui.setDatabaseItem(null,[{title:this.title,size:p.length,lastModified:Date.now(),type:this.type},{title:this.title,data:p}],q,mxUtils.bind(this,function(){if(null==this.ui.database)try{this.ui.setLocalData(this.title,
-p,q)}catch(u){null!=g&&g(u)}else null!=g&&g()}),["filesInfo","files"])}catch(u){null!=g&&g(u)}};StorageFile.prototype.rename=function(b,f,g){var c=this.getTitle();c!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(p){var q=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,f)}),g)});null!=p?this.ui.confirm(mxResources.get("replaceIt",[b]),q,g):q()}),g):f()};
-StorageFile.prototype.getLatestVersion=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(g){b(new StorageFile(this.ui,g,this.title))}),f)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
-StorageFile.listLocalStorageFiles=function(b){for(var f=[],g=0;g<localStorage.length;g++){var c=localStorage.key(g),p=localStorage.getItem(c);if(0<c.length&&"."!=c.charAt(0)&&0<p.length){var q=(null==b||"F"==b)&&("<mxfile "===p.substring(0,8)||"<?xml"===p.substring(0,5)||"\x3c!--[if IE]>"===p.substring(0,12)),u=(null==b||"L"==b)&&"<mxlibrary>"===p.substring(0,11);(q||u)&&f.push({title:c,type:q?"F":"L",size:p.length,lastModified:Date.now()})}}return f};
-StorageFile.migrate=function(b){var f=StorageFile.listLocalStorageFiles();f.push({title:".scratchpad",type:"L"});var g=b.transaction(["files","filesInfo"],"readwrite");b=g.objectStore("files");g=g.objectStore("filesInfo");for(var c=0;c<f.length;c++){var p=f[c],q=localStorage.getItem(p.title);b.add({title:p.title,data:q});g.add(p)}};
-StorageFile.listFiles=function(b,f,g,c){b.getDatabaseItems(function(p){var q=[];if(null!=p)for(var u=0;u<p.length;u++)"."==p[u].title.charAt(0)||null!=f&&p[u].type!=f||q.push(p[u]);g(q)},function(){null==b.database?g(StorageFile.listLocalStorageFiles(f)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,f,g,c){b.removeDatabaseItem([f,f],g,function(){null==b.database?(localStorage.removeItem(f),g()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,f,g){StorageFile.call(this,b,f,g)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,g){this.saveFile(b,!1,f,g)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-StorageLibrary.prototype.isRenamable=function(b,f,g){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,f,g){DrawioFile.call(this,b,f);this.title=g;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,f,g){RemoteFile.call(this,b,f,g.title);this.libObj=g};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,f,g){};
-RemoteLibrary.prototype.saveAs=function(b,f,g){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,f,g){StorageFile.call(this,b,f,g);b=g;f=b.lastIndexOf("/");0<=f&&(b=b.substring(f+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,f,g){return!1};UrlLibrary.prototype.saveAs=function(b,f,g){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,f,g){DrawioFile.call(this,b,f);this.desc=g||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
+StorageFile.prototype.writeFile=function(b,f,k){this.isRenamable()&&(this.title=b);try{var c=this.getDescriptor(),p=this.getData(),q=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.setDescriptor(this.getEtag(p));this.contentChanged();this.fileSaved(p,c,f,k)});this.setShadowModified(!1);this.ui.setDatabaseItem(null,[{title:this.title,size:p.length,lastModified:Date.now(),type:this.type},{title:this.title,data:p}],q,mxUtils.bind(this,function(){if(null==this.ui.database)try{this.ui.setLocalData(this.title,
+p,q)}catch(u){null!=k&&k(u)}else null!=k&&k()}),["filesInfo","files"])}catch(u){null!=k&&k(u)}};StorageFile.prototype.rename=function(b,f,k){var c=this.getTitle();c!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(p){var q=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,f)}),k)});null!=p?this.ui.confirm(mxResources.get("replaceIt",[b]),q,k):q()}),k):f()};
+StorageFile.prototype.getLatestVersion=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(k){b(new StorageFile(this.ui,k,this.title))}),f)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
+StorageFile.listLocalStorageFiles=function(b){for(var f=[],k=0;k<localStorage.length;k++){var c=localStorage.key(k),p=localStorage.getItem(c);if(0<c.length&&"."!=c.charAt(0)&&0<p.length){var q=(null==b||"F"==b)&&("<mxfile "===p.substring(0,8)||"<?xml"===p.substring(0,5)||"\x3c!--[if IE]>"===p.substring(0,12)),u=(null==b||"L"==b)&&"<mxlibrary>"===p.substring(0,11);(q||u)&&f.push({title:c,type:q?"F":"L",size:p.length,lastModified:Date.now()})}}return f};
+StorageFile.migrate=function(b){var f=StorageFile.listLocalStorageFiles();f.push({title:".scratchpad",type:"L"});var k=b.transaction(["files","filesInfo"],"readwrite");b=k.objectStore("files");k=k.objectStore("filesInfo");for(var c=0;c<f.length;c++){var p=f[c],q=localStorage.getItem(p.title);b.add({title:p.title,data:q});k.add(p)}};
+StorageFile.listFiles=function(b,f,k,c){b.getDatabaseItems(function(p){var q=[];if(null!=p)for(var u=0;u<p.length;u++)"."==p[u].title.charAt(0)||null!=f&&p[u].type!=f||q.push(p[u]);k(q)},function(){null==b.database?k(StorageFile.listLocalStorageFiles(f)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,f,k,c){b.removeDatabaseItem([f,f],k,function(){null==b.database?(localStorage.removeItem(f),k()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,f,k){StorageFile.call(this,b,f,k)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageLibrary.prototype.isRenamable=function(b,f,k){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,f,k){DrawioFile.call(this,b,f);this.title=k;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,f,k){RemoteFile.call(this,b,f,k.title);this.libObj=k};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,f,k){};
+RemoteLibrary.prototype.saveAs=function(b,f,k){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,f,k){StorageFile.call(this,b,f,k);b=k;f=b.lastIndexOf("/");0<=f&&(b=b.substring(f+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,f,k){return!1};UrlLibrary.prototype.saveAs=function(b,f,k){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,f,k){DrawioFile.call(this,b,f);this.desc=k||{};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,f,g){function c(d,k,l,n,x,A){function B(){mxEvent.addListener(I,"click",null!=A?A:function(){l==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(l,!0);f()})):l==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(l,!0);f()}),function(S){b.spinner.stop();b.handleError(S)}):
-(b.setMode(l,!0),f())})}y++;++u>g&&(mxUtils.br(H),u=1);var I=document.createElement("a");I.style.overflow="hidden";I.style.display="inline-block";I.className="geBaseButton";I.style.boxSizing="border-box";I.style.fontSize="11px";I.style.position="relative";I.style.margin="4px";I.style.marginTop="8px";I.style.marginBottom="0px";I.style.padding="8px 10px 8px 10px";I.style.width="88px";I.style.height="100px";I.style.whiteSpace="nowrap";I.setAttribute("title",k);var G=document.createElement("div");G.style.textOverflow=
-"ellipsis";G.style.overflow="hidden";G.style.position="absolute";G.style.bottom="8px";G.style.left="0px";G.style.right="0px";mxUtils.write(G,k);I.appendChild(G);if(null!=d){var C=document.createElement("img");C.setAttribute("src",d);C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="60px";C.style.height="60px";C.style.paddingBottom="6px";I.appendChild(C)}else G.style.paddingTop="5px",G.style.whiteSpace="normal",mxClient.IS_IOS?(I.style.padding="0px 10px 20px 10px",I.style.top=
-"6px"):mxClient.IS_FF&&(G.style.paddingTop="0px",G.style.marginTop="-2px");if(null!=x)for(d=0;d<x.length;d++)mxUtils.br(G),mxUtils.write(G,x[d]);if(null!=n&&null==b[n]){C.style.visibility="hidden";mxUtils.setOpacity(G,10);var R=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});R.spin(I);var T=window.setTimeout(function(){null==b[n]&&(R.stop(),I.style.display="none")},3E4);b.addListener("clientLoaded",
-mxUtils.bind(this,function(S,Q){null!=b[n]&&Q.getProperty("client")==b[n]&&(window.clearTimeout(T),mxUtils.setOpacity(G,100),C.style.visibility="",R.stop(),B(),"drive"==n&&null!=E.parentNode&&E.parentNode.removeChild(E))}))}else B();H.appendChild(I)}g=null!=g?g:2;var p=document.createElement("div");p.style.textAlign="center";p.style.whiteSpace="nowrap";p.style.paddingTop="0px";p.style.paddingBottom="20px";var q=document.createElement("div");q.style.border="1px solid #d3d3d3";q.style.borderWidth="1px 0px 1px 0px";
-q.style.padding="10px 0px 20px 0px";var u=0,y=0,H=document.createElement("div");H.style.paddingTop="2px";q.appendChild(H);var E=document.createElement("p"),F=document.createElement("p");F.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(F,mxResources.get("saveDiagramsTo")+":");p.appendChild(F);p.appendChild(q);u=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===
+var StorageDialog=function(b,f,k){function c(d,g,l,n,x,A){function B(){mxEvent.addListener(I,"click",null!=A?A:function(){l==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(l,!0);f()})):l==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(l,!0);f()}),function(R){b.spinner.stop();b.handleError(R)}):
+(b.setMode(l,!0),f())})}z++;++u>k&&(mxUtils.br(G),u=1);var I=document.createElement("a");I.style.overflow="hidden";I.style.display="inline-block";I.className="geBaseButton";I.style.boxSizing="border-box";I.style.fontSize="11px";I.style.position="relative";I.style.margin="4px";I.style.marginTop="8px";I.style.marginBottom="0px";I.style.padding="8px 10px 8px 10px";I.style.width="88px";I.style.height="100px";I.style.whiteSpace="nowrap";I.setAttribute("title",g);var H=document.createElement("div");H.style.textOverflow=
+"ellipsis";H.style.overflow="hidden";H.style.position="absolute";H.style.bottom="8px";H.style.left="0px";H.style.right="0px";mxUtils.write(H,g);I.appendChild(H);if(null!=d){var D=document.createElement("img");D.setAttribute("src",d);D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.width="60px";D.style.height="60px";D.style.paddingBottom="6px";I.appendChild(D)}else H.style.paddingTop="5px",H.style.whiteSpace="normal",mxClient.IS_IOS?(I.style.padding="0px 10px 20px 10px",I.style.top=
+"6px"):mxClient.IS_FF&&(H.style.paddingTop="0px",H.style.marginTop="-2px");if(null!=x)for(d=0;d<x.length;d++)mxUtils.br(H),mxUtils.write(H,x[d]);if(null!=n&&null==b[n]){D.style.visibility="hidden";mxUtils.setOpacity(H,10);var S=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});S.spin(I);var U=window.setTimeout(function(){null==b[n]&&(S.stop(),I.style.display="none")},3E4);b.addListener("clientLoaded",
+mxUtils.bind(this,function(R,P){null!=b[n]&&P.getProperty("client")==b[n]&&(window.clearTimeout(U),mxUtils.setOpacity(H,100),D.style.visibility="",S.stop(),B(),"drive"==n&&null!=E.parentNode&&E.parentNode.removeChild(E))}))}else B();G.appendChild(I)}k=null!=k?k:2;var p=document.createElement("div");p.style.textAlign="center";p.style.whiteSpace="nowrap";p.style.paddingTop="0px";p.style.paddingBottom="20px";var q=document.createElement("div");q.style.border="1px solid #d3d3d3";q.style.borderWidth="1px 0px 1px 0px";
+q.style.padding="10px 0px 20px 0px";var u=0,z=0,G=document.createElement("div");G.style.paddingTop="2px";q.appendChild(G);var E=document.createElement("p"),F=document.createElement("p");F.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(F,mxResources.get("saveDiagramsTo")+":");p.appendChild(F);p.appendChild(q);u=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===
typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");
null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");q=document.createElement("span");q.style.position="absolute";q.style.cursor="pointer";q.style.bottom="27px";q.style.color="gray";q.style.userSelect="none";q.style.textAlign="center";q.style.left="50%";mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0)");mxUtils.write(q,mxResources.get("decideLater"));
p.appendChild(q);mxEvent.addListener(q,"click",function(){b.hideDialog();var d=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=d});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(E.style.padding="7px",E.style.fontSize="9pt",E.style.marginTop="-14px",E.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'+
-mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",p.appendChild(E))},5E3);this.container=p},SplashDialog=function(b){var f=document.createElement("div");f.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var g=b.addLanguageMenu(f,!1,"28px");null!=g&&(g.style.bottom="24px")}var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width=
-"32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var p=document.createElement("div");p.style.margin="8px 0px 0px 0px";p.style.padding="18px 0px 24px 0px";g="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",g=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src=IMAGE_PATH+"/dropbox-logo.svg",g=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",g=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?
-(c.src=IMAGE_PATH+"/github-logo.svg",g=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",g=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",g=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",g=mxResources.get("trello")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",p.style.paddingBottom="10px",p.style.paddingTop="30px",g=mxResources.get("device"));var q=document.createElement("button");
-q.className="geBigButton";q.style.marginBottom="8px";q.style.fontSize="18px";q.style.padding="10px";q.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)p.style.padding="42px 0px 10px 0px",q.style.marginBottom="12px";else{p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";var u=document.createElement("table"),y=document.createElement("tbody"),H=document.createElement("tr"),E=document.createElement("td"),F=document.createElement("td");u.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,g);F.style.textAlign="left";F.appendChild(c);H.appendChild(E);H.appendChild(F);y.appendChild(H);u.appendChild(y);f.appendChild(u);g=document.createElement("span");g.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,0)");mxUtils.write(g,
-mxResources.get("changeStorage"));mxEvent.addListener(g,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(g)}mxUtils.write(q,mxResources.get("createNewDiagram"));mxEvent.addListener(q,"click",function(){b.hideDialog();b.actions.get("new").funct()});p.appendChild(q);mxUtils.br(p);q=document.createElement("button");q.className="geBigButton";q.style.marginBottom="22px";q.style.fontSize="18px";q.style.padding="10px";q.style.width="340px";mxUtils.write(q,
+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",p.appendChild(E))},5E3);this.container=p},SplashDialog=function(b){var f=document.createElement("div");f.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var k=b.addLanguageMenu(f,!1,"28px");null!=k&&(k.style.bottom="24px")}var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width=
+"32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var p=document.createElement("div");p.style.margin="8px 0px 0px 0px";p.style.padding="18px 0px 24px 0px";k="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src=IMAGE_PATH+"/dropbox-logo.svg",k=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",k=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?
+(c.src=IMAGE_PATH+"/github-logo.svg",k=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",k=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",k=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",k=mxResources.get("trello")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",p.style.paddingBottom="10px",p.style.paddingTop="30px",k=mxResources.get("device"));var q=document.createElement("button");
+q.className="geBigButton";q.style.marginBottom="8px";q.style.fontSize="18px";q.style.padding="10px";q.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)p.style.padding="42px 0px 10px 0px",q.style.marginBottom="12px";else{p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";var u=document.createElement("table"),z=document.createElement("tbody"),G=document.createElement("tr"),E=document.createElement("td"),F=document.createElement("td");u.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,k);F.style.textAlign="left";F.appendChild(c);G.appendChild(E);G.appendChild(F);z.appendChild(G);u.appendChild(z);f.appendChild(u);k=document.createElement("span");k.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0)");mxUtils.write(k,
+mxResources.get("changeStorage"));mxEvent.addListener(k,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(k)}mxUtils.write(q,mxResources.get("createNewDiagram"));mxEvent.addListener(q,"click",function(){b.hideDialog();b.actions.get("new").funct()});p.appendChild(q);mxUtils.br(p);q=document.createElement("button");q.className="geBigButton";q.style.marginBottom="22px";q.style.fontSize="18px";q.style.padding="10px";q.style.width="340px";mxUtils.write(q,
mxResources.get("openExistingDiagram"));mxEvent.addListener(q,"click",function(){b.actions.get("open").funct()});p.appendChild(q);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(g=function(l){q.style.marginBottom="24px";var n=document.createElement("a");n.style.display="inline-block";n.style.color="gray";n.style.cursor="pointer";n.style.marginTop="6px";mxUtils.write(n,mxResources.get("signOut"));q.style.marginBottom="16px";p.style.paddingBottom="18px";mxEvent.addListener(n,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){l()})});p.appendChild(n)},b.mode==App.MODE_GOOGLE&&
-null!=b.drive){var d=b.drive.getUsersList();if(0<d.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");q.style.marginBottom="16px";p.style.paddingBottom="18px";p.appendChild(c);var k=document.createElement("select");k.style.marginLeft="4px";k.style.width="140px";for(g=0;g<d.length;g++)u=document.createElement("option"),mxUtils.write(u,d[g].displayName),u.value=g,k.appendChild(u),u=document.createElement("option"),u.innerHTML="&nbsp;&nbsp;&nbsp;",
-mxUtils.write(u,"<"+d[g].email+">"),u.setAttribute("disabled","disabled"),k.appendChild(u);u=document.createElement("option");mxUtils.write(u,mxResources.get("addAccount"));u.value=d.length;k.appendChild(u);mxEvent.addListener(k,"change",function(){var l=k.value,n=d.length!=l;n&&b.drive.setUser(d[l]);b.drive.authorize(n,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(x){b.handleError(x,null,function(){b.hideDialog();b.showSplash()})},!0)});p.appendChild(k)}else g(function(){b.drive.logout()})}else b.mode!=
-App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?g(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?g(function(){b.gitLab.logout();var l=document.createElement("form");l.setAttribute("method","post");l.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");l.setAttribute("target","_blank");document.body.appendChild(l);l.submit();l.parentNode.removeChild(l)}):b.mode==App.MODE_TRELLO&&
-null!=b.trello?b.trello.isAuthorized()&&g(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&g(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):g(function(){b.oneDrive.logout()});f.appendChild(p);this.container=f},EmbedDialog=function(b,f,g,c,p,q,u,y,H){c=document.createElement("div");var E=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=q?mxUtils.write(c,q):mxUtils.write(c,mxResources.get(5E5>f.length?E?"link":"mainEmbedNotice":"preview")+":");
+mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(k=function(l){q.style.marginBottom="24px";var n=document.createElement("a");n.style.display="inline-block";n.style.color="gray";n.style.cursor="pointer";n.style.marginTop="6px";mxUtils.write(n,mxResources.get("signOut"));q.style.marginBottom="16px";p.style.paddingBottom="18px";mxEvent.addListener(n,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){l()})});p.appendChild(n)},b.mode==App.MODE_GOOGLE&&
+null!=b.drive){var d=b.drive.getUsersList();if(0<d.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");q.style.marginBottom="16px";p.style.paddingBottom="18px";p.appendChild(c);var g=document.createElement("select");g.style.marginLeft="4px";g.style.width="140px";for(k=0;k<d.length;k++)u=document.createElement("option"),mxUtils.write(u,d[k].displayName),u.value=k,g.appendChild(u),u=document.createElement("option"),u.innerHTML="&nbsp;&nbsp;&nbsp;",
+mxUtils.write(u,"<"+d[k].email+">"),u.setAttribute("disabled","disabled"),g.appendChild(u);u=document.createElement("option");mxUtils.write(u,mxResources.get("addAccount"));u.value=d.length;g.appendChild(u);mxEvent.addListener(g,"change",function(){var l=g.value,n=d.length!=l;n&&b.drive.setUser(d[l]);b.drive.authorize(n,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(x){b.handleError(x,null,function(){b.hideDialog();b.showSplash()})},!0)});p.appendChild(g)}else k(function(){b.drive.logout()})}else b.mode!=
+App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?k(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?k(function(){b.gitLab.logout();var l=document.createElement("form");l.setAttribute("method","post");l.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");l.setAttribute("target","_blank");document.body.appendChild(l);l.submit();l.parentNode.removeChild(l)}):b.mode==App.MODE_TRELLO&&
+null!=b.trello?b.trello.isAuthorized()&&k(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&k(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):k(function(){b.oneDrive.logout()});f.appendChild(p);this.container=f},EmbedDialog=function(b,f,k,c,p,q,u,z,G){c=document.createElement("div");var E=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=q?mxUtils.write(c,q):mxUtils.write(c,mxResources.get(5E5>f.length?E?"link":"mainEmbedNotice":"preview")+":");
mxUtils.br(c);q=document.createElement("div");q.style.position="absolute";q.style.top="30px";q.style.right="30px";q.style.color="gray";mxUtils.write(q,b.formatFileSize(f.length));c.appendChild(q);var F=document.createElement("textarea");F.setAttribute("autocomplete","off");F.setAttribute("autocorrect","off");F.setAttribute("autocapitalize","off");F.setAttribute("spellcheck","false");F.style.fontFamily="monospace";F.style.wordBreak="break-all";F.style.marginTop="10px";F.style.resize="none";F.style.height=
"150px";F.style.width="440px";F.style.border="1px solid gray";F.value=mxResources.get("updatingDocument");c.appendChild(F);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>f.length?(F.value=f,F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null)):(F.setAttribute("readonly","true"),F.value=mxResources.get("tooLargeUseDownload"))},0)};q=document.createElement("div");q.style.position="absolute";q.style.bottom="36px";
-q.style.right="32px";u=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!E||navigator.standalone||!(E||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(u=mxUtils.button(null!=y?y:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var k=5E5>f.length?F.value:f;if(null!=p)p(k);else if(E)try{var l=b.openLink(k);null!=l&&(null==g||0<g)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=l&&null!=l.location.href&&l.location.href.substring(0,
-8)!=k.substring(0,8)&&(l.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(x){}}),g||500)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}else{var n=window.open();n=null!=n?n.document:null;null!=n?(n.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==f.substring(0,7)?f:mxUtils.htmlEntities(f))+"</body></html>"),n.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),
-u.className="geBtn",q.appendChild(u));if(!E||7500<f.length)y=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=H?H:"embed.txt","txt",f,"text/plain")}),y.className="geBtn",q.appendChild(y);if(!b.isOffline()&&5E5>f.length){y=mxUtils.button("",function(){try{var k="mailto:?subject="+encodeURIComponent(H||b.defaultFilename)+"&body="+encodeURIComponent(F.value);b.openLink(k)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}});
-var d=document.createElement("img");d.className="geAdaptiveAsset";d.setAttribute("src",Editor.mailImage);d.setAttribute("width","18");d.setAttribute("height","18");d.setAttribute("border","0");d.style.marginBottom="5px";y.appendChild(d);y.style.verticalAlign="bottom";y.style.paddingTop="4px";y.style.minWidth="46px";y.className="geBtn";q.appendChild(y)}y=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});q.appendChild(y);d=mxUtils.button(mxResources.get("copy"),function(){F.focus();
-mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?y.className="geBtn gePrimaryBtn":(q.appendChild(d),d.className="geBtn gePrimaryBtn",y.className="geBtn"):null!=u&&(q.appendChild(u),y.className="geBtn",u.className="geBtn gePrimaryBtn");c.appendChild(q);this.container=c};EmbedDialog.showPreviewOption=!0;
-var CreateGraphDialog=function(b,f,g){var c=document.createElement("div");c.style.textAlign="right";this.init=function(){var p=document.createElement("div");p.style.position="relative";p.style.border="1px solid gray";p.style.boxSizing="border-box";p.style.width="100%";p.style.height="360px";p.style.overflow="hidden";p.style.marginBottom="16px";mxEvent.disableContextMenu(p);c.appendChild(p);var q=new Graph(p);q.setCellsCloneable(!0);q.setPanning(!0);q.setAllowDanglingEdges(!1);q.connectionHandler.select=
+q.style.right="32px";u=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!E||navigator.standalone||!(E||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(u=mxUtils.button(null!=z?z:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var g=5E5>f.length?F.value:f;if(null!=p)p(g);else if(E)try{var l=b.openLink(g);null!=l&&(null==k||0<k)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=l&&null!=l.location.href&&l.location.href.substring(0,
+8)!=g.substring(0,8)&&(l.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(x){}}),k||500)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}else{var n=window.open();n=null!=n?n.document:null;null!=n?(n.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==f.substring(0,7)?f:mxUtils.htmlEntities(f))+"</body></html>"),n.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),
+u.className="geBtn",q.appendChild(u));if(!E||7500<f.length)z=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=G?G:"embed.txt","txt",f,"text/plain")}),z.className="geBtn",q.appendChild(z);if(!b.isOffline()&&5E5>f.length){z=mxUtils.button("",function(){try{var g="mailto:?subject="+encodeURIComponent(G||b.defaultFilename)+"&body="+encodeURIComponent(F.value);b.openLink(g)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}});
+var d=document.createElement("img");d.className="geAdaptiveAsset";d.setAttribute("src",Editor.mailImage);d.setAttribute("width","18");d.setAttribute("height","18");d.setAttribute("border","0");d.style.marginBottom="5px";z.appendChild(d);z.style.verticalAlign="bottom";z.style.paddingTop="4px";z.style.minWidth="46px";z.className="geBtn";q.appendChild(z)}z=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});q.appendChild(z);d=mxUtils.button(mxResources.get("copy"),function(){F.focus();
+mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?z.className="geBtn gePrimaryBtn":(q.appendChild(d),d.className="geBtn gePrimaryBtn",z.className="geBtn"):null!=u&&(q.appendChild(u),z.className="geBtn",u.className="geBtn gePrimaryBtn");c.appendChild(q);this.container=c};EmbedDialog.showPreviewOption=!0;
+var CreateGraphDialog=function(b,f,k){var c=document.createElement("div");c.style.textAlign="right";this.init=function(){var p=document.createElement("div");p.style.position="relative";p.style.border="1px solid gray";p.style.boxSizing="border-box";p.style.width="100%";p.style.height="360px";p.style.overflow="hidden";p.style.marginBottom="16px";mxEvent.disableContextMenu(p);c.appendChild(p);var q=new Graph(p);q.setCellsCloneable(!0);q.setPanning(!0);q.setAllowDanglingEdges(!1);q.connectionHandler.select=
!1;q.view.setTranslate(20,20);q.border=20;q.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&null!=q.view.getDrawPane()&&(p=q.view.getDrawPane().ownerSVGElement,null!=p&&(p.style.position="absolute"));var u="curved=1;";q.cellRenderer.installCellOverlayListeners=function(n,x,A){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(A.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(B){x.fireEvent(new mxEventObject("pointerdown","event",B,
-"state",n))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(A.node,"touchstart",function(B){x.fireEvent(new mxEventObject("pointerdown","event",B,"state",n))})};q.getAllConnectionConstraints=function(){return null};q.connectionHandler.marker.highlight.keepOnTop=!1;q.connectionHandler.createEdgeState=function(n){n=q.createEdge(null,null,null,null,null,u);return new mxCellState(this.graph.view,n,this.graph.getCellStyle(n))};var y=q.getDefaultParent(),H=mxUtils.bind(this,function(n){var x=
-new mxCellOverlay(this.connectImage,"Add outgoing");x.cursor="hand";x.addListener(mxEvent.CLICK,function(A,B){q.connectionHandler.reset();q.clearSelection();var I=q.getCellGeometry(n),G;d(function(){G=q.insertVertex(y,null,"Entry",I.x,I.y,80,30,"rounded=1;");H(G);q.view.refresh(G);q.insertEdge(y,null,"",n,G,u)},function(){q.scrollCellToVisible(G)})});x.addListener("pointerdown",function(A,B){A=B.getProperty("event");B=B.getProperty("state");q.popupMenuHandler.hideMenu();q.stopEditing(!1);var I=mxUtils.convertPoint(q.container,
-mxEvent.getClientX(A),mxEvent.getClientY(A));q.connectionHandler.start(B,I.x,I.y);q.isMouseDown=!0;q.isMouseTrigger=mxEvent.isMouseEvent(A);mxEvent.consume(A)});q.addCellOverlay(n,x)});q.getModel().beginUpdate();try{var E=q.insertVertex(y,null,"Start",0,0,80,30,"ellipse");H(E)}finally{q.getModel().endUpdate()}if("horizontalTree"==g){var F=new mxCompactTreeLayout(q);F.edgeRouting=!1;F.levelDistance=30;F.sortEdges=!0;u="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==g?(F=new mxCompactTreeLayout(q,
-!1),F.edgeRouting=!1,F.levelDistance=30,F.sortEdges=!0,u="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==g?(F=new mxRadialTreeLayout(q,!1),F.edgeRouting=!1,F.levelDistance=80):"verticalFlow"==g?F=new mxHierarchicalLayout(q,mxConstants.DIRECTION_NORTH):"horizontalFlow"==g?F=new mxHierarchicalLayout(q,mxConstants.DIRECTION_WEST):"circle"==g?F=new mxCircleLayout(q):(F=new mxFastOrganicLayout(q,!1),F.forceConstant=80);if(null!=F){var d=function(n,x){q.getModel().beginUpdate();try{null!=n&&n(),
-F.execute(q.getDefaultParent(),E)}catch(A){throw A;}finally{n=new mxMorphing(q),n.addListener(mxEvent.DONE,mxUtils.bind(this,function(){q.getModel().endUpdate();null!=x&&x()})),n.startAnimation()}},k=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(n,x,A,B,I){k.apply(this,arguments);d()};q.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);d()};q.connectionHandler.addListener(mxEvent.CONNECT,function(){d()})}p=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),
+"state",n))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(A.node,"touchstart",function(B){x.fireEvent(new mxEventObject("pointerdown","event",B,"state",n))})};q.getAllConnectionConstraints=function(){return null};q.connectionHandler.marker.highlight.keepOnTop=!1;q.connectionHandler.createEdgeState=function(n){n=q.createEdge(null,null,null,null,null,u);return new mxCellState(this.graph.view,n,this.graph.getCellStyle(n))};var z=q.getDefaultParent(),G=mxUtils.bind(this,function(n){var x=
+new mxCellOverlay(this.connectImage,"Add outgoing");x.cursor="hand";x.addListener(mxEvent.CLICK,function(A,B){q.connectionHandler.reset();q.clearSelection();var I=q.getCellGeometry(n),H;d(function(){H=q.insertVertex(z,null,"Entry",I.x,I.y,80,30,"rounded=1;");G(H);q.view.refresh(H);q.insertEdge(z,null,"",n,H,u)},function(){q.scrollCellToVisible(H)})});x.addListener("pointerdown",function(A,B){A=B.getProperty("event");B=B.getProperty("state");q.popupMenuHandler.hideMenu();q.stopEditing(!1);var I=mxUtils.convertPoint(q.container,
+mxEvent.getClientX(A),mxEvent.getClientY(A));q.connectionHandler.start(B,I.x,I.y);q.isMouseDown=!0;q.isMouseTrigger=mxEvent.isMouseEvent(A);mxEvent.consume(A)});q.addCellOverlay(n,x)});q.getModel().beginUpdate();try{var E=q.insertVertex(z,null,"Start",0,0,80,30,"ellipse");G(E)}finally{q.getModel().endUpdate()}if("horizontalTree"==k){var F=new mxCompactTreeLayout(q);F.edgeRouting=!1;F.levelDistance=30;F.sortEdges=!0;u="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==k?(F=new mxCompactTreeLayout(q,
+!1),F.edgeRouting=!1,F.levelDistance=30,F.sortEdges=!0,u="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==k?(F=new mxRadialTreeLayout(q,!1),F.edgeRouting=!1,F.levelDistance=80):"verticalFlow"==k?F=new mxHierarchicalLayout(q,mxConstants.DIRECTION_NORTH):"horizontalFlow"==k?F=new mxHierarchicalLayout(q,mxConstants.DIRECTION_WEST):"circle"==k?F=new mxCircleLayout(q):(F=new mxFastOrganicLayout(q,!1),F.forceConstant=80);if(null!=F){var d=function(n,x){q.getModel().beginUpdate();try{null!=n&&n(),
+F.execute(q.getDefaultParent(),E)}catch(A){throw A;}finally{n=new mxMorphing(q),n.addListener(mxEvent.DONE,mxUtils.bind(this,function(){q.getModel().endUpdate();null!=x&&x()})),n.startAnimation()}},g=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(n,x,A,B,I){g.apply(this,arguments);d()};q.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);d()};q.connectionHandler.addListener(mxEvent.CONNECT,function(){d()})}p=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),
function(){b.hideDialog()})});p.className="geBtn";b.editor.cancelFirst&&c.appendChild(p);var l=mxUtils.button(mxResources.get("insert"),function(n){q.clearCellOverlays();var x=q.getModel().getChildren(q.getDefaultParent());n=mxEvent.isAltDown(n)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(q.getBoundingBoxFromGeometry(x,!0));x=b.editor.graph.importCells(x,n.x,n.y);n=b.editor.graph.view;var A=n.getBounds(x);null!=A&&(A.x-=n.translate.x,A.y-=n.translate.y,b.editor.graph.scrollRectToVisible(A),
b.editor.graph.setSelectionCells(x));b.hideDialog()});c.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||c.appendChild(p);this.graph=q};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage("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==",26,
26);
-var BackgroundImageDialog=function(b,f,g,c,p){function q(){null==z||z==mxConstants.NONE?(v.style.display="none",S.checked=!1):(v.style.backgroundColor=z,v.style.display="",S.checked=!0)}var u=b.editor.graph,y=document.createElement("div");y.style.whiteSpace="nowrap";var H=document.createElement("h2");mxUtils.write(H,mxResources.get("background"));H.style.marginTop="0px";y.appendChild(H);var E=null!=g&&null!=g.originalSrc;H=!1;var F=document.createElement("input");F.style.cssText="margin-right:8px;margin-bottom:8px;";F.setAttribute("value",
-"url");F.setAttribute("type","radio");F.setAttribute("name","geBackgroundImageDialogOption");var d=document.createElement("input");d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","url");d.setAttribute("type","radio");d.setAttribute("name","geBackgroundImageDialogOption");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginBottom="8px";k.style.width="360px";k.value=E||null==g?"":g.src;var l=document.createElement("select");l.style.width="360px";
-if(null!=b.pages)for(var n=0;n<b.pages.length;n++){var x=document.createElement("option");mxUtils.write(x,b.pages[n].getName()||mxResources.get("pageWithNumber",[n+1]));x.setAttribute("value","data:page/id,"+b.pages[n].getId());b.pages[n]==b.currentPage&&x.setAttribute("disabled","disabled");null!=g&&g.originalSrc==x.getAttribute("value")&&(x.setAttribute("selected","selected"),H=!0);l.appendChild(x)}E||null!=b.pages&&1!=b.pages.length||(F.style.display="none",d.style.display="none",l.style.display=
-"none");var A=document.createElement("option"),B=!1,I=!1,G=function(J,K){B||null!=J&&I||(d.checked?null!=K&&K(A.selected?null:l.value):""==k.value||b.isOffline()?(R.value="",T.value="",null!=K&&K("")):(k.value=mxUtils.trim(k.value),b.loadImage(k.value,function(m){R.value=m.width;T.value=m.height;null!=K&&K(k.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));R.value="";T.value="";null!=K&&K(null)})))},C=mxUtils.bind(this,function(J){b.importFiles(J,
-0,0,b.maxBackgroundSize,function(K,m,t,D,M,L){k.value=K;G();k.focus()},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var m=0;m<K.length;m++)K[m]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){E?l.focus():k.focus();mxEvent.addListener(l,"focus",function(){F.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(k,"focus",function(){d.removeAttribute("checked");F.setAttribute("checked","checked");
-F.checked=!0});if(Graph.fileSupport){k.setAttribute("placeholder",mxResources.get("dragImagesHere"));var J=y.parentNode,K=null;mxEvent.addListener(J,"dragleave",function(m){null!=K&&(K.parentNode.removeChild(K),K=null);m.stopPropagation();m.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(m){null==K&&(K=b.highlightElement(J));m.stopPropagation();m.preventDefault()}));mxEvent.addListener(J,"drop",mxUtils.bind(this,function(m){null!=K&&(K.parentNode.removeChild(K),K=null);
-if(0<m.dataTransfer.files.length)C(m.dataTransfer.files);else if(0<=mxUtils.indexOf(m.dataTransfer.types,"text/uri-list")){var t=m.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(t)&&(k.value=decodeURIComponent(t),G())}m.stopPropagation();m.preventDefault()}),!1)}};y.appendChild(F);y.appendChild(k);mxUtils.br(y);n=document.createElement("span");n.style.marginLeft="30px";mxUtils.write(n,mxResources.get("width")+":");y.appendChild(n);var R=document.createElement("input");
-R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==g||E?"":g.width;y.appendChild(R);mxUtils.write(y,mxResources.get("height")+":");var T=document.createElement("input");T.setAttribute("type","text");T.style.width="60px";T.style.marginLeft="8px";T.style.marginRight="16px";T.value=null==g||E?"":g.height;y.appendChild(T);mxUtils.br(y);mxUtils.br(y);mxEvent.addListener(k,"change",G);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,G()));k.focus()};y.appendChild(d);y.appendChild(l);mxUtils.br(y);mxUtils.br(y);E?(d.setAttribute("checked","checked"),d.checked=!0):(F.setAttribute("checked","checked"),F.checked=!0);!H&&d.checked&&(mxUtils.write(A,mxResources.get("pageNotFound")),A.setAttribute("disabled","disabled"),A.setAttribute("selected","selected"),A.setAttribute("value","pageNotFound"),l.appendChild(A),mxEvent.addListener(l,
-"change",function(){null==A.parentNode||A.selected||A.parentNode.removeChild(A)}));g=document.createElement("div");g.style.display=p?"inline-flex":"none";g.style.alignItems="center";g.style.cursor="default";g.style.minWidth="40%";g.style.height="20px";var S=document.createElement("input");S.setAttribute("type","checkbox");S.style.margin="0px 10px 0px 4px";S.style.verticalAlign="bottom";S.defaultChecked=c!=mxConstants.NONE&&null!=c;S.checked=S.defaultChecked;g.appendChild(S);mxUtils.write(g,mxResources.get("fillColor"));
-p=g.cloneNode(!1);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.style.margin="0px 10px 0px 30px";Q.style.verticalAlign="bottom";Q.defaultChecked=u.shadowVisible;Q.checked=Q.defaultChecked;p.appendChild(Q);mxUtils.write(p,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||Q.setAttribute("disabled","disabled");mxEvent.addListener(p,"click",function(J){mxEvent.getSource(J)!=Q&&(Q.checked=!Q.checked)});var v=document.createElement("button");v.style.width="36px";v.style.height=
-"18px";v.style.cursor="pointer";v.style.marginLeft="10px";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";v.style.verticalAlign="bottom";v.className="geColorBtn";var z=c;q();mxEvent.addListener(g,"click",function(J){mxEvent.getSource(J)!=S&&(S.checked=!S.checked);z=S.checked?"#ffffff":null;q()});mxEvent.addListener(v,"click",function(J){b.pickColor(z||"none",function(K){z=K;q()});mxEvent.consume(J)});g.appendChild(v);y.appendChild(g);y.appendChild(p);mxUtils.br(y);
-c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";u=mxUtils.button(mxResources.get("cancel"),function(){B=!0;b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&c.appendChild(u);p=mxUtils.button(mxResources.get("reset"),function(){k.value="";R.value="";T.value="";F.checked=!0;z=mxConstants.NONE;q();B=!1});mxEvent.addGestureListeners(p,function(){B=!0});p.className="geBtn";p.width="100";c.appendChild(p);if(Graph.fileSupport){var N=document.createElement("input");
-N.setAttribute("multiple","multiple");N.setAttribute("type","file");mxEvent.addListener(N,"change",function(J){null!=N.files&&(C(N.files),N.type="",N.type="file",N.value="")});N.style.display="none";y.appendChild(N);p=mxUtils.button(mxResources.get("open"),function(){N.click()});p.className="geBtn";c.appendChild(p)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();G(null,function(J){f(""!=J&&null!=J?new mxImage(J,R.value,T.value):null,null==J,z,!mxClient.IS_SVG||mxClient.IS_SF?
-null:Q.checked)})});mxEvent.addGestureListeners(applyBtn,function(){I=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(u);y.appendChild(c);this.container=y},ParseDialog=function(b,f,g){function c(l,n,x){var A=l.split("\n");if("plantUmlPng"==n||"plantUmlSvg"==n||"plantUmlTxt"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var B=function(t,D,M,L,O){q=mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(new mxRectangle(0,0,L,O));var P=
-null;I.getModel().beginUpdate();try{P="txt"==D?b.insertAsPreText(M,q.x,q.y):I.insertVertex(null,null,null,q.x,q.y,L,O,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(M)+";"),I.setAttributeForCell(P,"plantUmlData",JSON.stringify({data:t,format:D},null,2))}finally{I.getModel().endUpdate()}null!=P&&(I.setSelectionCell(P),I.scrollCellToVisible(P))},I=b.editor.graph,G="plantUmlTxt"==n?"txt":"plantUmlPng"==n?"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"==
-l&&"svg"==G?window.setTimeout(function(){b.spinner.stop();B(l,G,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(l,G,function(t,D,M){b.spinner.stop();B(l,G,t,D,M)},function(t){b.handleError(t)})}}else if("mermaid"==n||"mermaid2drawio"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var C=0;C<A.length&&(0==A[C].trim().length||"%%"==A[C].substring(0,2));)C++;if("---"==A[C].trim()){do C++;while(C<A.length&&"---"!=A[C].trim());C++}C=A[C].trim().toLowerCase();A=C.indexOf(" ");C=C.substring(0,0<A?A:C.length);var R="undefined"!==typeof mxMermaidToDrawio&&
-"mermaid2drawio"==n&&("graph"==C||"flowchart"==C||"sequencediagram"==C||"classdiagram"==C||"statediagram-v2"==C||"statediagram"==C||"erdiagram"==C||"requirementdiagram"==C||"gitgraph"==C||"mindmap"==C||"journey"==C);I=b.editor.graph;R&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(t){b.spinner.stop();I.setSelectionCells(b.importXml(t,Math.max(q.x,20),Math.max(q.y,20),!0,null,null,!0));I.scrollCellToVisible(I.getSelectionCell())}));b.generateMermaidImage(l,null,function(t,D,M){if(!R){q=
-mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(new mxRectangle(0,0,D,M));b.spinner.stop();var L=null;I.getModel().beginUpdate();try{L=I.insertVertex(null,null,null,q.x,q.y,D,M,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+t+";"),I.setAttributeForCell(L,"mermaidData",JSON.stringify({data:l},null,2))}finally{I.getModel().endUpdate()}null!=L&&(I.setSelectionCell(L),I.scrollCellToVisible(L))}},function(t){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(t)})}}else if("table"==
-n){n=null;var T=[],S=0,Q={};for(C=0;C<A.length;C++){var v=mxUtils.trim(A[C]);if("primary key"==v.substring(0,11).toLowerCase()){var z=v.match(/\((.+)\)/);z&&z[1]&&(Q[z[1]]=!0);A.splice(C,1)}else 0<v.toLowerCase().indexOf("primary key")&&(Q[v.split(" ")[0]]=!0,A[C]=mxUtils.trim(v.replace(/primary key/i,"")))}for(C=0;C<A.length;C++)if(v=mxUtils.trim(A[C]),"create table"==v.substring(0,12).toLowerCase())v=mxUtils.trim(v.substring(12)),"("==v.charAt(v.length-1)&&(v=mxUtils.trim(v.substring(0,v.length-
-1))),n=new mxCell(v,new mxGeometry(S,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),n.vertex=!0,T.push(n),v=b.editor.graph.getPreferredSizeForCell(N),null!=v&&(n.geometry.width=v.width+10);else if(null!=n&&")"==v.charAt(0))S+=n.geometry.width+40,n=null;else if("("!=v&&null!=n){v=v.substring(0,","==v.charAt(v.length-1)?v.length-1:v.length);z=Q[v.split(" ")[0]];var N=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;strokeColor=inherit;top=0;left=0;right=0;bottom="+(z?"1":"0")+";");N.vertex=!0;var J=new mxCell(z?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(z?"fontStyle=1;":""));J.vertex=!0;N.insert(J);v=new mxCell(v,new mxGeometry(30,
-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(z?"fontStyle=5;":""));v.vertex=!0;N.insert(v);v=b.editor.graph.getPreferredSizeForCell(v);null!=v&&n.geometry.width<v.width+30&&(n.geometry.width=Math.min(320,Math.max(n.geometry.width,v.width+30)));n.insert(N,z?0:null);n.geometry.height+=30}0<T.length&&(I=b.editor.graph,q=mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(I.getBoundingBoxFromGeometry(T,
-!0)),I.setSelectionCells(I.importCells(T,q.x,q.y)),I.scrollCellToVisible(I.getSelectionCell()))}else if("list"==n){if(0<A.length){I=b.editor.graph;n=null;T=[];for(C=N=0;C<A.length;C++)";"!=A[C].charAt(0)&&(0==A[C].length?n=null:null==n?(n=new mxCell(A[C],new mxGeometry(N,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),n.vertex=!0,T.push(n),v=I.getPreferredSizeForCell(n),
-null!=v&&n.geometry.width<v.width+10&&(n.geometry.width=v.width+10),N+=n.geometry.width+40):"--"==A[C]?(v=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),v.vertex=!0,n.geometry.height+=v.geometry.height,n.insert(v)):0<A[C].length&&(S=new mxCell(A[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-S.vertex=!0,v=I.getPreferredSizeForCell(S),null!=v&&S.geometry.width<v.width&&(S.geometry.width=v.width),n.geometry.width=Math.max(n.geometry.width,S.geometry.width),n.geometry.height+=S.geometry.height,n.insert(S)));if(0<T.length){q=mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(I.getBoundingBoxFromGeometry(T,!0));I.getModel().beginUpdate();try{T=I.importCells(T,q.x,q.y);v=[];for(C=0;C<T.length;C++)v.push(T[C]),v=v.concat(T[C].children);I.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{I.getModel().endUpdate()}I.setSelectionCells(T);
-I.scrollCellToVisible(I.getSelectionCell())}}}else{N=function(t){var D=K[t];null==D&&(D=new mxCell(t,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),D.vertex=!0,K[t]=D,T.push(D));return D};var K={};T=[];for(C=0;C<A.length;C++)if(";"!=A[C].charAt(0)){var m=A[C].split("->");2<=m.length&&(z=N(m[0]),J=N(m[m.length-1]),m=new mxCell(2<m.length?m[1]:"",new mxGeometry),m.edge=!0,m.geometry.relative=!0,z.insertEdge(m,!0),J.insertEdge(m,!1),T.push(m))}if(0<T.length){A=document.createElement("div");A.style.visibility=
-"hidden";document.body.appendChild(A);I=new Graph(A);I.getModel().beginUpdate();try{T=I.importCells(T);for(C=0;C<T.length;C++)I.getModel().isVertex(T[C])&&(v=I.getPreferredSizeForCell(T[C]),T[C].geometry.width=Math.max(T[C].geometry.width,v.width),T[C].geometry.height=Math.max(T[C].geometry.height,v.height));C=!0;"horizontalFlow"==n||"verticalFlow"==n?((new mxHierarchicalLayout(I,"horizontalFlow"==n?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(I.getDefaultParent(),T),C=!1):"circle"==
-n?(new mxCircleLayout(I)).execute(I.getDefaultParent()):(S=new mxFastOrganicLayout(I),S.disableEdgeStyle=!1,S.forceConstant=180,S.execute(I.getDefaultParent()));C&&(Q=new mxParallelEdgeLayout(I),Q.spacing=30,Q.execute(I.getDefaultParent()))}finally{I.getModel().endUpdate()}I.clearCellOverlays();v=[];b.editor.graph.getModel().beginUpdate();try{T=I.getModel().getChildren(I.getDefaultParent()),q=mxEvent.isAltDown(x)?q:b.editor.graph.getCenterInsertPoint(I.getBoundingBoxFromGeometry(T,!0)),v=b.editor.graph.importCells(T,
-q.x,q.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(v);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());I.destroy();A.parentNode.removeChild(A)}}}function p(){return"list"==y.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==y.value||
-"mermaid2drawio"==y.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==y.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==y.value?"@startuml\nskinparam backgroundcolor transparent\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":
-"plantUmlSvg"==y.value||"plantUmlTxt"==y.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var q=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");var u=document.createElement("textarea");u.style.position="absolute";u.style.left="30px";u.style.right="30px";u.style.top=
-"30px";u.style.bottom="100px";u.style.resize="none";u.setAttribute("wrap","off");u.setAttribute("spellcheck","false");u.setAttribute("autocorrect","off");u.setAttribute("autocomplete","off");u.setAttribute("autocapitalize","off");var y=document.createElement("select");y.className="geBtn";if("formatSql"==g||"mermaid"==g&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())y.style.display="none";var H=document.createElement("option");H.setAttribute("value","list");mxUtils.write(H,mxResources.get("list"));
-"plantUml"!=g&&"mermaid"!=g&&y.appendChild(H);null!=g&&"fromText"!=g||H.setAttribute("selected","selected");H=document.createElement("option");H.setAttribute("value","table");mxUtils.write(H,mxResources.get("formatSql"));"formatSql"==g&&(y.appendChild(H),H.setAttribute("selected","selected"));H=document.createElement("option");H.setAttribute("value","mermaid");mxUtils.write(H,mxResources.get("image"));if("mermaid"==g){if("undefined"!==typeof mxMermaidToDrawio){var E=document.createElement("option");
-E.setAttribute("value","mermaid2drawio");E.setAttribute("selected","selected");mxUtils.write(E,mxResources.get("diagram"));y.appendChild(E)}else y.style.display="none";y.appendChild(H)}H=document.createElement("option");H.setAttribute("value","diagram");mxUtils.write(H,mxResources.get("diagram"));E=document.createElement("option");E.setAttribute("value","circle");mxUtils.write(E,mxResources.get("circle"));var F=document.createElement("option");F.setAttribute("value","horizontalFlow");mxUtils.write(F,
-mxResources.get("horizontalFlow"));var d=document.createElement("option");d.setAttribute("value","verticalFlow");mxUtils.write(d,mxResources.get("verticalFlow"));"plantUml"!=g&&"mermaid"!=g&&(y.appendChild(H),y.appendChild(E),y.appendChild(F),y.appendChild(d));H=document.createElement("option");H.setAttribute("value","plantUmlSvg");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==g&&H.setAttribute("selected","selected");E=document.createElement("option");
-E.setAttribute("value","plantUmlPng");mxUtils.write(E,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");F=document.createElement("option");F.setAttribute("value","plantUmlTxt");mxUtils.write(F,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==g&&(y.appendChild(H),y.appendChild(E),y.appendChild(F));var k=p();u.value=k;f.appendChild(u);H=document.createElement("div");H.style.position="absolute";H.style.bottom=
-"46px";H.style.right="30px";H.style.left="30px";H.style.justifyContent="end";H.style.display="flex";this.init=function(){u.focus()};Graph.fileSupport&&(u.addEventListener("dragover",function(l){l.stopPropagation();l.preventDefault()},!1),u.addEventListener("drop",function(l){l.stopPropagation();l.preventDefault();if(0<l.dataTransfer.files.length){l=l.dataTransfer.files[0];var n=new FileReader;n.onload=function(x){u.value=x.target.result};n.readAsText(l)}},!1));"plantUml"==g&&"https://plant-aws.diagrams.net"==
-window.PLANT_URL&&(E=document.createElement("div"),E.style.display="inline-block",E.style.color="#c00",E.style.fontSize="12px",E.style.marginRight="10px",E.style.display="flex",E.style.alignItems="center",E.innerHTML='<a href="https://github.com/jgraph/drawio/discussions/5074" target="_blank" rel="noopener noreferrer" style="color: #c00; text-decoration: underline;">PlantUML is deprecated</a>',H.appendChild(E));b.isOffline()&&!mxClient.IS_CHROMEAPP||"mermaid"!=g&&"plantUml"!=g||H.appendChild(b.createHelpIcon("mermaid"==
-g?"https://mermaid.js.org/intro/":"https://plantuml.com/"));H.appendChild(y);mxEvent.addListener(y,"change",function(){var l=p();if(0==u.value.length||u.value==k)k=l,u.value=k});g=mxUtils.button(mxResources.get("close"),function(){u.value==k?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});g.className="geBtn";b.editor.cancelFirst&&H.appendChild(g);E=mxUtils.button(mxResources.get("insert"),function(l){try{b.hideDialog(),c(u.value,y.value,l)}catch(n){b.handleError(n)}});
-E.className="geBtn gePrimaryBtn";H.appendChild(E);b.editor.cancelFirst||H.appendChild(g);f.appendChild(H);this.container=f},NewDialog=function(b,f,g,c,p,q,u,y,H,E,F,d,k,l,n,x,A,B,I,G){function C(na){null!=na&&(Xa=qb=na?135:140);na=!0;if(null!=lb)for(;X<lb.length&&(na||0!=mxUtils.mod(X,30));){var xa=lb[X++];xa=J(xa.url,xa.libs,xa.title,xa.tooltip?xa.tooltip:xa.title,xa.select,xa.imgUrl,xa.info,xa.onClick,xa.preview,xa.noImg,xa.clibs,xa.type);na&&xa.click();na=!1}}function R(na,xa,qa,ta,ua,za){if(null!=
-na&&mxUtils.isAncestorNode(document.body,ta)){na=mxUtils.parseXml(na);na=Editor.parseDiagramNode(na.documentElement,null,!0);var Ma=new mxCodec(na.ownerDocument),Na=new mxGraphModel;Ma.decode(na,Na);b.sidebar.createTooltip(ta,Na.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=ua?mxResources.get(ua):null,!0,new mxPoint(xa,
-qa),!0,function(){ea=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=za&&Q(ta,null,null,za,infoObj,clibs)},!0,!1)}}function T(){var na=document.createElement("div");na.style.position="absolute";na.style.overflow="visible";na.style.left="8px";na.style.right="8px";na.style.bottom="8px";na.style.top="8px";mxUtils.write(na,mxResources.get("describeYourDiagram")+":");mxUtils.br(na);var xa=document.createElement("input");xa.setAttribute("type","text");xa.setAttribute("placeholder",
-mxResources.get("processForHiringNewEmployee"));xa.style.width="100%";xa.style.marginTop="6px";xa.style.marginBottom="4px";xa.style.boxSizing="border-box";na.appendChild(xa);na.init=function(){xa.focus()};mxUtils.br(na);var qa=document.createElement("div");qa.style.top="86px";qa.style.left="0";qa.style.right="0";qa.style.bottom="0";qa.style.margin="0";qa.style.borderRadius="0";qa.style.width="auto";qa.style.height="auto";qa.style.position="absolute";qa.style.border="1px solid #424242";qa.className=
-"geTemplate";var ta=document.createElement("div");ta.style.boxSizing="border-box";ta.style.position="absolute";ta.style.fontSize="14px";ta.style.textAlign="center";ta.style.top="50%";mxUtils.write(ta,mxResources.get("blankDiagram"));qa.appendChild(ta);var ua=document.createElement("select");ua.className="geBtn";ua.style.maxWidth="160px";ua.style.marginLeft="0px";ta=document.createElement("option");mxUtils.write(ta,mxResources.get("diagramType"));ta.setAttribute("value","");ua.appendChild(ta);for(var za=
-0;za<EditorUi.mermaidDiagramTypes.length;za++){ta=document.createElement("option");var Ma=EditorUi.mermaidDiagramTypes[za],Na=Ma;Ma==urlParams["smart-template-type"]&&ta.setAttribute("selected","selected");"erDiagram"==Na&&(Na="entityRelationshipDiagram");Na=mxResources.get(Na,null,Na.charAt(0).toUpperCase()+Na.substring(1).replace(/[A-Z]/g," $&"));ta.setAttribute("value",Ma);mxUtils.write(ta,Na);ua.appendChild(ta)}var Qa=mxUtils.button(mxResources.get("generate"),function(){var Ya=xa.value,Ua=ua.value.replace(/([A-Z])/g,
-" $1").toLowerCase(),ib="Write the declaration code for a detailed and complex "+(""!=Ua?Ua:"graph")+' that shows "'+(""!=Ya?Ya:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Ua=""!=ua.value?" ("+mxUtils.trim(mxUtils.getTextContent(ua.options[ua.selectedIndex]))+")":"";var Ra="gantt"==ua.value||"pie"==ua.value||"timeline"==ua.value||"quadrantchart"==ua.value||"c4context"==ua.value,Za=xa.value+Ua;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,
-function(Ga){Ra||(Ea=oa=Ga,Oa="Smart Template: "+Za)}));b.spinner.spin(qa,mxResources.get("generate")+" '"+Ya+"'")&&b.generateOpenAiMermaidDiagram(ib,function(Ga,mb,eb,vb){b.spinner.stop();qa.innerHTML="";var nb=document.createElement("img");nb.setAttribute("title",mxResources.get("preview"));nb.src="data:image/svg+xml;base64,"+mb.substring(mb.indexOf(",")+1);nb.style.cursor="pointer";nb.style.width="95%";nb.style.height="95%";qa.appendChild(nb);Ga=b.createMermaidXml(Ga,EditorUi.defaultMermaidConfig,
-mb,eb,vb,Za);var xb="<mxfile><diagram>"+Graph.compress(Ga)+"</diagram></mxfile>";if(Ra||"undefined"===typeof mxMermaidToDrawio)Ea=oa=Ga;Ga=Z.cloneNode(!0);qa.appendChild(Ga);mb=function(Ta){ea=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};eb=function(Ta){ea||R(xb,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),nb,Za)};mxEvent.addGestureListeners(nb,mb,null,eb);mxEvent.addGestureListeners(Ga,mb,null,eb)},function(Ga){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();
-b.handleError(Ga)})});Qa.setAttribute("disabled","disabled");Qa.className="geBtn gePrimaryBtn";ta=function(){window.setTimeout(function(){""!=xa.value?Qa.removeAttribute("disabled"):Qa.setAttribute("disabled","disabled")},0)};za=null!=I?I:urlParams["smart-template"];null!=za&&"1"!=za&&(xa.value=decodeURIComponent(za),ta(),""==za||null==I&&"1"!=urlParams["smart-template-generate"]||window.setTimeout(function(){Qa.click()},0));mxEvent.addListener(xa,"change",ta);mxEvent.addListener(xa,"keydown",ta);
-mxEvent.addListener(xa,"cut",ta);mxEvent.addListener(xa,"paste",ta);mxEvent.addListener(xa,"keydown",function(Ya){13==Ya.keyCode&&Qa.click()});ta=document.createElement("div");ta.style.height="40px";ta.style.marginTop="4px";ta.style.marginBottom="4px";ta.style.whiteSpace="nowrap";ta.style.overflowX="auto";ta.style.overflowY="hidden";ta.appendChild(ua);ta.appendChild(Qa);na.appendChild(ta);na.appendChild(qa);return na}function S(){if(ya==bb&&null==oa&&null!=jb&&null!=$a)c&&b.spinner.spin(document.body,
-mxResources.get("generate")+" '"+$a.value+"'")&&(t=!0,b.hideDialog()),jb.click();else if(t&&b.spinner.stop(),Ca&&null!=l)g||t||b.hideDialog(),l(Ca,Aa,P.value);else if(c)g||t||b.hideDialog(),c(oa,P.value,Fa,ma);else{var na=P.value;if(null!=na&&0<na.length){var xa=function(ta,ua,za){b.createFile(za,oa,null!=ma&&0<ma.length?ma:null,ta,function(){t||b.hideDialog()},null,ua,null,null!=wa&&0<wa.length?wa:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var qa=new SaveDialog(b,na,mxUtils.bind(this,
-function(ta,ua,za){xa(ua,za,ta.value)}),null,null,null,null,b.mode);b.showDialog(qa.container,420,150,!0,!1);qa.init()}else b.pickFolder(b.mode,function(ta){xa(b.mode,ta,na)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function Q(na,xa,qa,ta,ua,za,Ma){return ya!=na?(null!=ya&&(ya.classList.remove("geTemplateSelected"),ya==bb&&(Va.style.display="none",fb.style.display="",La.style.visibility="hidden",Sa.style.visibility=null!=Ea?"visible":"hidden")),na==bb&&(xa=Ea,null!=
-xa?(Sa.style.visibility="visible",Sa.style.visibility=null!=Ea?"visible":"hidden",La.style.visibility="visible"):(Va.style.display="",La.style.visibility="hidden",Sa.style.visibility="hidden")),Y.removeAttribute("disabled"),oa=xa,ma=qa,wa=za,ya=na,Ca=ta,Fa=Ma,Aa=ua,ya.classList.add("geTemplateSelected"),!0):!1}function v(){Va.style.display="";fb.style.display="none";La.style.visibility="hidden";Sa.style.visibility="hidden";$a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?$a.select():
-document.execCommand("selectAll",!1,null)}function z(){fb.style.backgroundImage=rb;fb.style.backgroundSize="contain";Va.style.display="none";fb.style.display="";La.style.visibility="visible";Sa.style.visibility="visible"}function N(na){if(!ob){ob=!0;var xa=mxUtils.trim($a.value);na||""==xa?null!=Oa&&($a.value=Oa,z()):(fb.style.backgroundImage="url("+Editor.spinImage+")",fb.style.backgroundSize="12px 12px",fb.style.display="",Va.style.display="none",b.generateDiagram(xa,mxUtils.bind(this,function(qa,
-ta){ob=!1;ya==bb&&"none"==Va.style.display&&(rb="url(data:image/svg+xml;base64,"+ta.substring(ta.indexOf(",")+1)+")",bb.setAttribute("title",xa),Sa.style.display="",Ea=oa=qa,Oa=xa,z(),t&&S())}),mxUtils.bind(this,function(qa){ob=!1;ya==bb&&(Va.style.display="",fb.style.display="none",La.style.visibility="hidden",Sa.style.visibility="hidden",b.handleError(qa))})))}}function J(na,xa,qa,ta,ua,za,Ma,Na,Qa,Ya,Ua,ib){function Ra(Ta,tb){null==mb?(eb=Ta,eb=/^https?:\/\//.test(eb)?b.editor.isCorsEnabledForUrl(eb)?
-eb:PROXY_URL+"?url="+encodeURIComponent(eb):TEMPLATE_PATH+"/"+eb,mxUtils.get(eb,mxUtils.bind(this,function(ub){200<=ub.getStatus()&&299>=ub.getStatus()&&(mb=ub.getText());tb(mb,eb)}))):tb(mb,eb)}function Za(Ta,tb){if(null==na||aa||b.sidebar.currentElt==Ga)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=fa){var ub="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+fa.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+
-fa.naturalWidth+'" height="'+fa.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";R(ub,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),qa,na)}else b.sidebar.currentElt=Ga,aa=!0,Ra(na,function(Db){if(aa&&b.sidebar.currentElt==Ga)try{R(Db,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),Ga,tb)}catch(Eb){b.sidebar.currentElt=null,b.handleError(Eb)}aa=!1})}var Ga=null;if("generative"!=ib||null==bb){Ga=document.createElement("div");Ga.className="geTemplate";var mb=null,
-eb=na;null!=qa?Ga.setAttribute("title",mxResources.get(qa,null,qa)):null!=ta&&0<ta.length&&Ga.setAttribute("title",ta)}else Ga=bb;var vb=document.createElement("span");vb.className="geAdaptiveAsset";mxUtils.write(vb,mxResources.get(qa,null,qa));if(null!=za){Ga.style.display="inline-flex";Ga.style.justifyContent="center";Ga.style.alignItems="center";Qa=document.createElement("img");Qa.setAttribute("src",za);Qa.setAttribute("alt",ta);Qa.style.maxWidth=Xa+"px";Qa.style.maxHeight=qb+"px";fa=Qa;var nb=
-za.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ga.appendChild(Qa);Qa.onerror=function(){this.src!=nb?this.src=nb:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Ta){Q(Ga,null,null,na,Ma,Ua)}),null,null);mxEvent.addListener(Ga,"dblclick",function(Ta){S();mxEvent.consume(Ta)})}else if(!Ya&&null!=na&&0<na.length){var xb=function(Ta){W.spin(Ba)&&Ra(na,function(tb,ub){W.stop();null!=tb&&(Q(Ga,tb,xa,null,null,Ua,ub),Ta&&S())})};
-za=Qa||TEMPLATE_PATH+"/"+na.substring(0,na.length-4)+".png";Qa=fb.cloneNode(!1);Qa.style.backgroundImage="url("+za+")";Qa.style.display="";Ga.appendChild(Qa);null!=qa&&Ga.appendChild(vb);mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Ta){xb()}),null,null);mxEvent.addListener(Ga,"dblclick",function(Ta){xb(!0);mxEvent.consume(Ta)})}else Ga.appendChild(vb),"generative"==ib&&null==bb&&(Ga.appendChild(fb),Ga.appendChild(Va),Ga.appendChild(Sa),Ga.appendChild(La),bb=Ga),ua&&Q(Ga),null!=Na?(mxEvent.addGestureListeners(Ga,
-null,null,mxUtils.bind(this,function(Ta){Q(Ga,null,null,na,Ma)})),mxEvent.addListener(Ga,"click",Na)):(mxEvent.addListener(Ga,"click",function(Ta){Q(Ga,null,null,na,Ma)&&"generative"==ib&&null==Ea&&v()}),mxEvent.addListener(Ga,"dblclick",function(Ta){"generative"!=ib?S():"none"==Va.style.display&&v();mxEvent.consume(Ta)}));null!=na&&(za=Z.cloneNode(!0),Ga.appendChild(za),mxEvent.addGestureListeners(za,mxUtils.bind(this,function(Ta){ea=b.sidebar.currentElt==Ga}),null,null),mxEvent.addListener(za,"click",
-mxUtils.bind(this,function(Ta){ea||Za(Ta,null!=qa?qa:ta);mxEvent.consume(Ta)})));Ba.appendChild(Ga);return Ga}function K(){function na(Ra,Za){Ra=mxResources.get(Ra,null,Ra.substring(0,1).toUpperCase()+Ra.substring(1));18<Ra.length&&(Ra=Ra.substring(0,18)+"&hellip;");return Ra+(null!=Za?" ("+Za.length+")":"")}function xa(Ra,Za,Ga){mxEvent.addListener(Za,"click",function(){cb!=Za&&(null!=cb&&(cb.style.backgroundColor=""),cb=Za,cb.style.backgroundColor=u,Ba.scrollTop=0,Ba.innerText="",X=0,null!=Ja[Ra].content?
-(Ba.appendChild(Ja[Ra].content),oa=Ea,lb=null,null!=Ja[Ra].content.init&&Ja[Ra].content.init()):(lb=Ga?Wa[Ra][Ga]:Ja[Ra],ha=null,C(!1)))});"smartTemplate"!=Ra||null==I&&null==urlParams["smart-template"]||Za.click()}pb&&(pb=!1,mxEvent.addListener(Ba,"scroll",function(Ra){Ba.scrollTop+Ba.clientHeight>=Ba.scrollHeight&&(C(),mxEvent.consume(Ra))}));if(0<ab){var qa=document.createElement("div");qa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(qa,
-mxResources.get("custom"));Ka.appendChild(qa);for(var ta in gb){var ua=document.createElement("div");qa=ta;var za=gb[ta];18<qa.length&&(qa=qa.substring(0,18)+"&hellip;");ua.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ua.setAttribute("title",qa+" ("+za.length+")");mxUtils.write(ua,ua.getAttribute("title"));null!=E&&(ua.style.padding=E);Ka.appendChild(ua);(function(Ra,Za){mxEvent.addListener(ua,
-"click",function(){cb!=Za&&(cb.style.backgroundColor="",cb=Za,cb.style.backgroundColor=u,Ba.scrollTop=0,Ba.innerText="",X=0,lb=gb[Ra],ha=null,C(!1))})})(ta,ua)}qa=document.createElement("div");qa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(qa,"draw.io");Ka.appendChild(qa)}for(ta in Ja){qa=za=null;if(null!=Ja[ta].content)ua=document.createElement(Ma?"ul":"div"),qa=na(ta),ua.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;",
-ua.setAttribute("title",qa),mxUtils.write(ua,qa),Ka.appendChild(ua),qa=ua;else{var Ma=Wa[ta];qa=ua=document.createElement(Ma?"ul":"div");za=Ja[ta];var Na=na(ta,za);if(null!=Ma){za=document.createElement("li");var Qa=document.createElement("div");Qa.className="geTempTreeCaret";Qa.setAttribute("title",Na);mxUtils.write(Qa,Na);qa=Qa;za.appendChild(Qa);Na=document.createElement("ul");Na.className="geTempTreeNested";Na.style.visibility="hidden";for(var Ya in Ma){var Ua=document.createElement("li"),ib=
-na(Ya,Ma[Ya]);Ua.setAttribute("title",ib);mxUtils.write(Ua,ib);xa(ta,Ua,Ya);Na.appendChild(Ua)}za.appendChild(Na);ua.className="geTempTree";ua.appendChild(za);(function(Ra,Za){mxEvent.addListener(Za,"click",function(){Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){Ra.style.visibility="hidden"},550);Za.classList.toggle("geTempTreeCaret-down")})})(Na,Qa)}else ua.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;",
-ua.setAttribute("title",Na),mxUtils.write(ua,Na);null!=E&&(ua.style.padding=E);Ka.appendChild(ua)}xa(ta,qa);null==cb&&qa.click()}C(!1)}var m=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);g=null!=g?g:!0;p=null!=p?p:!1;u=null!=u?u:"light-dark(#ebf2f9, "+Editor.darkColor+")";F=null!=F?F:EditorUi.templateFile;var t=!1,D=document.createElement("div");D.style.userSelect="none";D.style.height="100%";var M=document.createElement("div");M.style.whiteSpace="nowrap";
-M.style.height="46px";g&&D.appendChild(M);var L=document.createElement("img");L.setAttribute("border","0");L.setAttribute("align","absmiddle");L.style.width="40px";L.style.height="40px";L.style.marginRight="10px";L.style.paddingBottom="4px";L.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";f||m||!g||M.appendChild(L);g&&mxUtils.write(M,(m?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");var O=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?O=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?O=b.dropbox.extension:
-b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?O=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?O=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?O=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(O=b.trello.extension);var P=document.createElement("input");P.setAttribute("value",b.defaultFilename+O);P.style.marginLeft="10px";P.style.width=f||m?"144px":"244px";this.init=function(){g&&Editor.selectFilename(P);null!=Ba.parentNode&&null!=Ba.parentNode.parentNode&&mxEvent.addGestureListeners(Ba.parentNode.parentNode,
-mxUtils.bind(this,function(na){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};if(g)if(M.appendChild(P),B)P.style.width=f||m?"350px":"450px";else if(null!=b.editor.diagramFileTypes){var U=FilenameDialog.createFileTypes(b,P,b.editor.diagramFileTypes);U.style.marginLeft="6px";U.style.width=f||m?"80px":"180px";M.appendChild(U)}var V=!1,X=0,W=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),
-Y=mxUtils.button(x||mxResources.get("create"),function(){Y.setAttribute("disabled","disabled");S();Y.removeAttribute("disabled")});Y.className="geBtn gePrimaryBtn";var Z=document.createElement("img");Z.setAttribute("src",Editor.magnifyImage);Z.setAttribute("title",mxResources.get("preview"));Z.className="geButton geRoundButton";var aa=!1,fa=null,ea=!1;if(d||k){var ca=[],ha=null,ka=null,ba=null,ia=function(na){Y.setAttribute("disabled","disabled");for(var xa=0;xa<ca.length;xa++)ca[xa].className=xa==
-na?"geBtn gePrimaryBtn":"geBtn"};V=!0;var la=document.createElement("div");la.style.whiteSpace="nowrap";la.style.height="30px";D.appendChild(la);var da=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ka.style.display="";Ia.style.display="";Ba.style.left="160px";ia(0);Ba.scrollTop=0;Ba.innerText="";X=0;ha!=lb&&(lb=ha,Ja=ka,ab=ba,Ka.innerText="",K(),ha=null)});ca.push(da);la.appendChild(da);var ra=function(na){Ka.style.display="none";Ia.style.display="none";Ba.style.left="30px";
-ia(na?-1:1);null==ha&&(ha=lb);Ba.scrollTop=0;Ba.innerText="";W.spin(Ba);var xa=function(qa,ta,ua){X=0;W.stop();lb=qa;ua=ua||{};var za=0,Ma;for(Ma in ua)za+=ua[Ma].length;if(ta)Ba.innerText=ta;else if(0==qa.length&&0==za)Ba.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(Ba.innerText="",0<za){Ka.style.display="";Ba.style.left="160px";Ka.innerText="";ab=0;Ja={"draw.io":qa};for(Ma in ua)Ja[Ma]=ua[Ma];K()}else C(!0)};na?k(va.value,xa):d(xa)};if(d){var pa=mxUtils.button(mxResources.get("Recent",
-null,"Recent"),function(){ra()});la.appendChild(pa);ca.push(pa)}if(k){var sa=document.createElement("span");sa.style.marginLeft="10px";sa.innerText=mxResources.get("search")+":";la.appendChild(sa);var va=document.createElement("input");va.style.marginRight="10px";va.style.marginLeft="10px";va.style.width="220px";mxEvent.addListener(va,"keypress",function(na){13==na.keyCode&&ra(!0)});la.appendChild(va);var ja=mxUtils.button(mxResources.get("search"),function(){ra(!0)});ja.className="geBtn";la.appendChild(ja)}ia(0)}var ma=
-null,wa=null,oa=null,ya=null,Ca=null,Fa=null,Aa=null,Ea=null,Oa=null,Ba=document.createElement("div");Ba.style.border="1px solid #d3d3d3";Ba.style.position="absolute";Ba.style.left="160px";Ba.style.right="34px";var Da=(g?72:40)+(V?30:0);Ba.style.top=Da+"px";Ba.style.bottom="68px";Ba.style.margin="6px 0 0 -1px";Ba.style.padding="6px";Ba.style.overflow="auto";var Ia=document.createElement("div");Ia.style.cssText="position:absolute;left:30px;width:128px;top:"+Da+"px;height:22px;margin-top: 6px;white-space: nowrap;";
-var Pa=document.createElement("input");Pa.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";Pa.setAttribute("placeholder",mxResources.get("search"));Pa.setAttribute("type","text");Ia.appendChild(Pa);var Ha=document.createElement("img");Ha.setAttribute("src",Editor.magnifyImage);Ha.setAttribute("title",mxResources.get("search"));Ha.className="geAdaptiveAsset";Ha.style.position="relative";Ha.style.cursor="pointer";Ha.style.outline=
-"none";Ha.style.opacity="0.5";Ha.style.height="16px";Ha.style.left="-20px";Ha.style.top="4px";Ia.appendChild(Ha);mxEvent.addListener(Ha,"click",function(){Ha.getAttribute("src")!=Editor.magnifyImage&&(Ha.setAttribute("src",Editor.magnifyImage),Ha.setAttribute("title",mxResources.get("search")),Pa.value="",null!=sb&&(sb.click(),sb=null));Pa.focus()});mxEvent.addListener(Pa,"keydown",mxUtils.bind(this,function(na){if(13==na.keyCode){var xa=Pa.value;if(""==xa)null!=sb&&(sb.click(),sb=null);else{if(null==
-NewDialog.tagsList[F]){var qa={};for(Ua in Ja)if(null==Ja[Ua].content)for(var ta=Ja[Ua],ua=0;ua<ta.length;ua++){var za=ta[ua];if(null!=za.tags)for(var Ma=za.tags.toLowerCase().split(";"),Na=0;Na<Ma.length;Na++)null==qa[Ma[Na]]&&(qa[Ma[Na]]=[]),qa[Ma[Na]].push(za)}NewDialog.tagsList[F]=qa}var Qa=xa.toLowerCase().split(" ");qa=NewDialog.tagsList[F];if(0<ab&&null==qa.__tagsList__){for(Ua in gb)for(ta=gb[Ua],ua=0;ua<ta.length;ua++)for(za=ta[ua],Ma=za.title.split(" "),Ma.push(Ua),Na=0;Na<Ma.length;Na++){var Ya=
-Ma[Na].toLowerCase();null==qa[Ya]&&(qa[Ya]=[]);qa[Ya].push(za)}qa.__tagsList__=!0}var Ua=[];ta={};for(ua=Ma=0;ua<Qa.length;ua++)if(0<Qa[ua].length){Ya=qa[Qa[ua]];var ib={};Ua=[];if(null!=Ya)for(Na=0;Na<Ya.length;Na++)za=Ya[Na],0==Ma==(null==ta[za.url])&&(ib[za.url]=!0,Ua.push(za));ta=ib;Ma++}Ba.scrollTop=0;Ba.innerText="";X=0;qa=document.createElement("div");qa.style.padding="6px";qa.style.whiteSpace="nowrap";qa.style.overflow="hidden";qa.style.textOverflow="ellipsis";za=mxResources.get(0==Ua.length?
-"noResultsFor":"resultsFor",[xa]);qa.setAttribute("title",za);mxUtils.write(qa,za);Ba.appendChild(qa);null!=cb&&null==sb&&(cb.style.backgroundColor="",sb=cb,cb=qa);lb=Ua;ha=null;C(!1)}mxEvent.consume(na)}}));mxEvent.addListener(Pa,"keyup",mxUtils.bind(this,function(na){""==Pa.value?(Ha.setAttribute("src",Editor.magnifyImage),Ha.setAttribute("title",mxResources.get("search"))):(Ha.setAttribute("src",Editor.crossImage),Ha.setAttribute("title",mxResources.get("reset")))}));Da+=23;var Ka=document.createElement("div");
-Ka.style.cssText="position:absolute;left:30px;width:128px;top:"+Da+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(Ba,"scroll",function(){null!=b.sidebar&&b.sidebar.hideTooltip()});var Xa=140,qb=Xa,bb=null,rb="url("+Editor.sparklesImage+")",Va=document.createElement("div");Va.className="geGenerateDiagramForm";Va.style.position="absolute";Va.style.width="100%";Va.style.height="100%";var fb=document.createElement("div");fb.className="geTemplatePreview geAdaptiveAsset";
-fb.style.backgroundImage=rb;var $a=document.createElement("textarea");$a.setAttribute("placeholder",mxResources.get("describeYourDiagram"));$a.className="geGenerateDiagramDescription";var jb=document.createElement("button");jb.className="geBtn gePrimaryBtn geGenerateDiagramButton";jb.setAttribute("disabled","disabled");jb.setAttribute("title",mxResources.get("ok"));mxUtils.write(jb,mxResources.get("ok"));var Sa=Z.cloneNode(!0);Sa.style.display="none";var db=!1;mxEvent.addGestureListeners(Sa,function(na){db=
-null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(na){if(!db&&null!=Ea){var xa="<mxfile><diagram>"+Graph.compress(Ea)+"</diagram></mxfile>";R(xa,mxEvent.getClientX(na),mxEvent.getClientY(na),bb,Oa)}});var La=Z.cloneNode(!0);La.setAttribute("src",Editor.editImage);La.setAttribute("title",mxResources.get("edit"));La.style.visibility="hidden";La.style.left="0px";var hb=Z.cloneNode(!0);hb.setAttribute("src",Editor.helpImage);hb.setAttribute("title",mxResources.get("help"));
-mxEvent.addListener(hb,"click",function(na){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(na)});Va.appendChild($a);Va.appendChild(jb);Va.appendChild(hb);Va.style.display="none";mxEvent.addListener(La,"click",v);mxEvent.addListener($a,"input",function(){""!=$a.value?jb.removeAttribute("disabled"):jb.setAttribute("disabled","disabled")});var ob=!1;mxEvent.addListener(jb,"click",function(){N()});mxEvent.addListener($a,"keydown",function(na){13!=na.keyCode||mxEvent.isShiftDown(na)?
-27==na.keyCode&&(N(!0),mxEvent.consume(na)):(N(),mxEvent.consume(na))});var Ja={},Wa={},gb={},ab=0,pb=!0,cb=null,sb=null;Ja.basic=G?[]:[{title:"blankDiagram"}];var lb=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ja.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&
-(Ja.smartTemplate={content:T()});if(!f){var yb=function(){mxUtils.get(wb,function(na){if(!Ab){Ab=!0;na=na.getXml().documentElement.firstChild;for(var xa={};null!=na;){if("undefined"!==typeof na.getAttribute)if("parsererror"==na.nodeName)null!=window.console&&console.log("Parser error in "+F+": "+na.textContent);else if("clibs"==na.nodeName){for(var qa=na.getAttribute("name"),ta=na.getElementsByTagName("add"),ua=[],za=0;za<ta.length;za++)ua.push(encodeURIComponent(mxUtils.getTextContent(ta[za])));
-null!=qa&&0<ua.length&&(xa[qa]=ua.join(";"))}else if(ua=na.getAttribute("url"),null!=ua){ta=na.getAttribute("section");qa=na.getAttribute("subsection");if(null==ta&&(za=ua.indexOf("/"),ta=ua.substring(0,za),null==qa)){var Ma=ua.indexOf("/",za+1);-1<Ma&&(qa=ua.substring(za+1,Ma))}za=Ja[ta];null==za&&(za=[],Ja[ta]=za);ua=na.getAttribute("clibs");null!=xa[ua]&&(ua=xa[ua]);ua={url:na.getAttribute("url"),libs:na.getAttribute("libs"),title:na.getAttribute("title"),tooltip:na.getAttribute("name")||na.getAttribute("url"),
-preview:na.getAttribute("preview"),clibs:ua,tags:na.getAttribute("tags")};za.push(ua);null!=qa&&(za=Wa[ta],null==za&&(za={},Wa[ta]=za),ta=za[qa],null==ta&&(ta=[],za[qa]=ta),ta.push(ua))}na=na.nextSibling}W.stop();K()}})};D.appendChild(Ia);D.appendChild(Ka);D.appendChild(Ba);var Ab=!1,wb=F;/^https?:\/\//.test(wb)&&!b.editor.isCorsEnabledForUrl(wb)&&(wb=PROXY_URL+"?url="+encodeURIComponent(wb));W.spin(Ba);null!=A?A(function(na,xa){gb=na;ba=ab=xa;yb()},yb):yb();ka=Ja}mxEvent.addListener(P,"keypress",
-function(na){b.dialog.container.firstChild==D&&13==na.keyCode&&S()});var kb=document.createElement("div");kb.style.marginTop=f?"4px":"16px";kb.style.textAlign="right";kb.style.position="absolute";kb.style.left="40px";kb.style.bottom="24px";kb.style.right="40px";var zb=mxUtils.button(mxResources.get("cancel"),function(){null!=q&&q();b.hideDialog(!0)});zb.className="geBtn";!b.editor.cancelFirst||p&&null==q||kb.appendChild(zb);if(!(f||"1"==urlParams.embed||p||mxClient.IS_ANDROID||mxClient.IS_IOS)&&"1"!=
-urlParams.noDevice){var Bb=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var na=new FilenameDialog(b,"",mxResources.get("create"),function(xa){null!=xa&&0<xa.length&&b.editor.loadUrl(b.editor.getProxiedUrl(xa),function(qa){oa=qa;ma=null;templateRealURl=xa;b.hideDialog();S()},function(qa){b.handleError(qa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(na.container,300,80,!0,!0);na.init()});Bb.className="geBtn";kb.appendChild(Bb)}if(Graph.fileSupport&&n){var Cb=mxUtils.button(mxResources.get("import"),
-function(){if(null==b.newDlgFileInputElt){var na=document.createElement("input");na.setAttribute("multiple","multiple");na.setAttribute("type","file");mxEvent.addListener(na,"change",function(xa){b.openFiles(na.files,!0);na.value=""});na.style.display="none";document.body.appendChild(na);b.newDlgFileInputElt=na}b.newDlgFileInputElt.click()});Cb.className="geBtn";kb.appendChild(Cb)}kb.appendChild(Y);b.editor.cancelFirst||null!=c||p&&null==q||kb.appendChild(zb);D.appendChild(kb);this.container=D};
-NewDialog.tagsList={};
-var SaveDialog=function(b,f,g,c,p,q,u,y,H,E,F){function d(m,t,D,M,L,O){var P=null;if((null==c||0>mxUtils.indexOf(c,m))&&(null==H||m==H)&&(null==E||0<=mxUtils.indexOf(E,m))){L=null!=L?L:b.getTitleForService(m);var U=0<=mxUtils.indexOf(z,m);if(U||null!=b.getServiceForName(m)){P=document.createElement("option");var V="";!U&&b.isOffline(m==App.MODE_GOOGLE&&"1"==urlParams["gapi-stealth"])&&(P.setAttribute("disabled","disabled"),V=" ("+mxResources.get("offline")+")");if("pick"==O)P.innerHTML=mxUtils.htmlEntities(L)+
-"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+V,P.setAttribute("value","pickFolder-"+m),P.setAttribute("title",L+" - "+mxResources.get("pickFolder")+"...");else{U=m+(null!=D?"-"+D:"");var X=J[U];null!=X&&null!=X.option&&X.option.parentNode.removeChild(X.option);X=null;if(null!=t){"/"==t.charAt(t.length-1)&&(t=t.substring(0,t.length-1));"/"==t.charAt(0)&&(t=t.substring(1));X=t;if(m!=App.MODE_GITHUB&&m==App.MODE_GITLAB){var W=X.lastIndexOf("/");0<=W&&(X=
-X.substring(W+1))}40<X.length&&(X=X.substring(0,20)+"..."+X.substring(X.length-20))}P.innerHTML=mxUtils.htmlEntities(L)+(null!=X?"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(X):"")+V;P.setAttribute("title",L+(null!=t?" ("+t+")":"")+(null!=D&&decodeURIComponent(D)!=t?" ["+D+"]":""));P.setAttribute("value",U);J[U]={option:P,mode:m,path:t,id:D};SaveDialog.lastValue==U&&null==y&&"disabled"==!P.getAttribute("disabled")?M=!0:null==M&&("root"==O?M=null==y&&b.mode==m||null!=m&&m==y:"pickFolder-"==
-v.value.substring(0,11)&&(M=!0));M&&P.setAttribute("selected","selected")}v.appendChild(P)}}return P}function k(m){b.pickFolder(m,function(t){var D=null;m==App.MODE_GOOGLE&&null!=t.docs&&0<t.docs.length?D={mode:m,path:t.docs[0].name,id:t.docs[0].id}:m==App.MODE_ONEDRIVE&&null!=t.value&&0<t.value.length?D={mode:m,path:t.value[0].name,id:OneDriveFile.prototype.getIdOf(t.value[0])}:(m==App.MODE_GITHUB||m==App.MODE_GITLAB)&&null!=t&&0<t.length&&(D={mode:m,path:decodeURIComponent(t),id:t});null!=D&&(b.addRecent(D,
-"Folders",5),t=d(D.mode,D.path,D.id,!0),v.innerHTML="",J={},l(),D=v.selectedIndex,v.value=t.value,0>v.selectedIndex&&(v.selectedIndex=D))},!0,!0,!0,!0)}function l(){var m=b.getRecent("Folders"),t=0;if(null!=m&&0<m.length)for(var D=0;D<m.length;D++)null!=d(m[D].mode,m[D].path,m[D].id)&&t++;d(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");d(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(d(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),
+var BackgroundImageDialog=function(b,f,k,c,p){function q(){null==y||y==mxConstants.NONE?(v.style.display="none",R.checked=!1):(v.style.backgroundColor=y,v.style.display="",R.checked=!0)}var u=b.editor.graph,z=document.createElement("div");z.style.whiteSpace="nowrap";var G=document.createElement("h2");mxUtils.write(G,mxResources.get("background"));G.style.marginTop="0px";z.appendChild(G);var E=null!=k&&null!=k.originalSrc;G=!1;var F=document.createElement("input");F.style.cssText="margin-right:8px;margin-bottom:8px;";F.setAttribute("value",
+"url");F.setAttribute("type","radio");F.setAttribute("name","geBackgroundImageDialogOption");var d=document.createElement("input");d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","url");d.setAttribute("type","radio");d.setAttribute("name","geBackgroundImageDialogOption");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.width="360px";g.value=E||null==k?"":k.src;var l=document.createElement("select");l.style.width="360px";
+if(null!=b.pages)for(var n=0;n<b.pages.length;n++){var x=document.createElement("option");mxUtils.write(x,b.pages[n].getName()||mxResources.get("pageWithNumber",[n+1]));x.setAttribute("value","data:page/id,"+b.pages[n].getId());b.pages[n]==b.currentPage&&x.setAttribute("disabled","disabled");null!=k&&k.originalSrc==x.getAttribute("value")&&(x.setAttribute("selected","selected"),G=!0);l.appendChild(x)}E||null!=b.pages&&1!=b.pages.length||(F.style.display="none",d.style.display="none",l.style.display=
+"none");var A=document.createElement("option"),B=!1,I=!1,H=function(J,K){B||null!=J&&I||(d.checked?null!=K&&K(A.selected?null:l.value):""==g.value||b.isOffline()?(S.value="",U.value="",null!=K&&K("")):(g.value=mxUtils.trim(g.value),b.loadImage(g.value,function(m){S.value=m.width;U.value=m.height;null!=K&&K(g.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));S.value="";U.value="";null!=K&&K(null)})))},D=mxUtils.bind(this,function(J){b.importFiles(J,
+0,0,b.maxBackgroundSize,function(K,m,t,C,N,M){g.value=K;H();g.focus()},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var m=0;m<K.length;m++)K[m]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){E?l.focus():g.focus();mxEvent.addListener(l,"focus",function(){F.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(g,"focus",function(){d.removeAttribute("checked");F.setAttribute("checked","checked");
+F.checked=!0});if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var J=z.parentNode,K=null;mxEvent.addListener(J,"dragleave",function(m){null!=K&&(K.parentNode.removeChild(K),K=null);m.stopPropagation();m.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(m){null==K&&(K=b.highlightElement(J));m.stopPropagation();m.preventDefault()}));mxEvent.addListener(J,"drop",mxUtils.bind(this,function(m){null!=K&&(K.parentNode.removeChild(K),K=null);
+if(0<m.dataTransfer.files.length)D(m.dataTransfer.files);else if(0<=mxUtils.indexOf(m.dataTransfer.types,"text/uri-list")){var t=m.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(t)&&(g.value=decodeURIComponent(t),H())}m.stopPropagation();m.preventDefault()}),!1)}};z.appendChild(F);z.appendChild(g);mxUtils.br(z);n=document.createElement("span");n.style.marginLeft="30px";mxUtils.write(n,mxResources.get("width")+":");z.appendChild(n);var S=document.createElement("input");
+S.setAttribute("type","text");S.style.width="60px";S.style.marginLeft="8px";S.style.marginRight="16px";S.value=null==k||E?"":k.width;z.appendChild(S);mxUtils.write(z,mxResources.get("height")+":");var U=document.createElement("input");U.setAttribute("type","text");U.style.width="60px";U.style.marginLeft="8px";U.style.marginRight="16px";U.value=null==k||E?"":k.height;z.appendChild(U);mxUtils.br(z);mxUtils.br(z);mxEvent.addListener(g,"change",H);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&&(g.value=J.url,H()));g.focus()};z.appendChild(d);z.appendChild(l);mxUtils.br(z);mxUtils.br(z);E?(d.setAttribute("checked","checked"),d.checked=!0):(F.setAttribute("checked","checked"),F.checked=!0);!G&&d.checked&&(mxUtils.write(A,mxResources.get("pageNotFound")),A.setAttribute("disabled","disabled"),A.setAttribute("selected","selected"),A.setAttribute("value","pageNotFound"),l.appendChild(A),mxEvent.addListener(l,
+"change",function(){null==A.parentNode||A.selected||A.parentNode.removeChild(A)}));k=document.createElement("div");k.style.display=p?"inline-flex":"none";k.style.alignItems="center";k.style.cursor="default";k.style.minWidth="40%";k.style.height="20px";var R=document.createElement("input");R.setAttribute("type","checkbox");R.style.margin="0px 10px 0px 4px";R.style.verticalAlign="bottom";R.defaultChecked=c!=mxConstants.NONE&&null!=c;R.checked=R.defaultChecked;k.appendChild(R);mxUtils.write(k,mxResources.get("fillColor"));
+p=k.cloneNode(!1);var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px 10px 0px 30px";P.style.verticalAlign="bottom";P.defaultChecked=u.shadowVisible;P.checked=P.defaultChecked;p.appendChild(P);mxUtils.write(p,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||P.setAttribute("disabled","disabled");mxEvent.addListener(p,"click",function(J){mxEvent.getSource(J)!=P&&(P.checked=!P.checked)});var v=document.createElement("button");v.style.width="36px";v.style.height=
+"18px";v.style.cursor="pointer";v.style.marginLeft="10px";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";v.style.verticalAlign="bottom";v.className="geColorBtn";var y=c;q();mxEvent.addListener(k,"click",function(J){mxEvent.getSource(J)!=R&&(R.checked=!R.checked);y=R.checked?"#ffffff":null;q()});mxEvent.addListener(v,"click",function(J){b.pickColor(y||"none",function(K){y=K;q()});mxEvent.consume(J)});k.appendChild(v);z.appendChild(k);z.appendChild(p);mxUtils.br(z);
+c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";u=mxUtils.button(mxResources.get("cancel"),function(){B=!0;b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&c.appendChild(u);p=mxUtils.button(mxResources.get("reset"),function(){g.value="";S.value="";U.value="";F.checked=!0;y=mxConstants.NONE;q();B=!1});mxEvent.addGestureListeners(p,function(){B=!0});p.className="geBtn";p.width="100";c.appendChild(p);if(Graph.fileSupport){var L=document.createElement("input");
+L.setAttribute("multiple","multiple");L.setAttribute("type","file");mxEvent.addListener(L,"change",function(J){null!=L.files&&(D(L.files),L.type="",L.type="file",L.value="")});L.style.display="none";z.appendChild(L);p=mxUtils.button(mxResources.get("open"),function(){L.click()});p.className="geBtn";c.appendChild(p)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();H(null,function(J){f(""!=J&&null!=J?new mxImage(J,S.value,U.value):null,null==J,y,!mxClient.IS_SVG||mxClient.IS_SF?
+null:P.checked)})});mxEvent.addGestureListeners(applyBtn,function(){I=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(u);z.appendChild(c);this.container=z},ParseDialog=function(b,f,k){function c(l,n,x){if("plantUmlPng"==n||"plantUmlSvg"==n||"plantUmlTxt"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var A=function(m,t,C,N,M){q=mxEvent.isAltDown(x)?q:B.getCenterInsertPoint(new mxRectangle(0,0,N,M));var O=null;B.getModel().beginUpdate();
+try{O="txt"==t?b.insertAsPreText(C,q.x,q.y):B.insertVertex(null,null,null,q.x,q.y,N,M,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(C)+";"),B.setAttributeForCell(O,"plantUmlData",JSON.stringify({data:m,format:t},null,2))}finally{B.getModel().endUpdate()}null!=O&&(B.setSelectionCell(O),B.scrollCellToVisible(O))},B=b.editor.graph,I="plantUmlTxt"==n?"txt":"plantUmlPng"==n?"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"==
+l&&"svg"==I?window.setTimeout(function(){b.spinner.stop();A(l,I,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(l,I,function(m,t,C){b.spinner.stop();A(l,I,m,t,C)},function(m){b.handleError(m)})}}else if("mermaid"==n||"mermaid2drawio"==n)b.spinner.spin(document.body,mxResources.get("inserting"))&&b.parseMermaidDiagram(l,null,mxUtils.bind(this,function(m){b.spinner.stop();var t=b.editor.graph;t.setSelectionCells(b.importXml(m,Math.max(q.x,20),Math.max(q.y,20),!0,null,null,!0));t.scrollCellToVisible(t.getSelectionCell())}),mxUtils.bind(this,function(m){b.handleError(m)}),
+null,"mermaid2drawio"==n);else if("table"==n){var H=l.split("\n");n=null;for(var D=[],S=0,U={},R=0;R<H.length;R++){var P=mxUtils.trim(H[R]);if("primary key"==P.substring(0,11).toLowerCase()){var v=P.match(/\((.+)\)/);v&&v[1]&&(U[v[1]]=!0);H.splice(R,1)}else 0<P.toLowerCase().indexOf("primary key")&&(U[P.split(" ")[0]]=!0,H[R]=mxUtils.trim(P.replace(/primary key/i,"")))}for(R=0;R<H.length;R++)if(P=mxUtils.trim(H[R]),"create table"==P.substring(0,12).toLowerCase())P=mxUtils.trim(P.substring(12)),"("==
+P.charAt(P.length-1)&&(P=mxUtils.trim(P.substring(0,P.length-1))),n=new mxCell(P,new mxGeometry(S,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),n.vertex=!0,D.push(n),P=b.editor.graph.getPreferredSizeForCell(y),null!=P&&(n.geometry.width=P.width+10);else if(null!=n&&")"==P.charAt(0))S+=n.geometry.width+40,n=null;else if("("!=P&&null!=n){P=P.substring(0,","==P.charAt(P.length-1)?P.length-1:P.length);
+v=U[P.split(" ")[0]];var y=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;strokeColor=inherit;top=0;left=0;right=0;bottom="+(v?"1":"0")+";");y.vertex=!0;var L=new mxCell(v?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(v?"fontStyle=1;":
+""));L.vertex=!0;y.insert(L);P=new mxCell(P,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(v?"fontStyle=5;":""));P.vertex=!0;y.insert(P);P=b.editor.graph.getPreferredSizeForCell(P);null!=P&&n.geometry.width<P.width+30&&(n.geometry.width=Math.min(320,Math.max(n.geometry.width,P.width+30)));n.insert(y,v?0:null);n.geometry.height+=30}0<D.length&&(B=b.editor.graph,q=mxEvent.isAltDown(x)?
+q:B.getCenterInsertPoint(B.getBoundingBoxFromGeometry(D,!0)),B.setSelectionCells(B.importCells(D,q.x,q.y)),B.scrollCellToVisible(B.getSelectionCell()))}else if("list"==n){if(H=l.split("\n"),0<H.length){B=b.editor.graph;y=null;D=[];for(R=n=0;R<H.length;R++)";"!=H[R].charAt(0)&&(0==H[R].length?y=null:null==y?(y=new mxCell(H[R],new mxGeometry(n,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+y.vertex=!0,D.push(y),P=B.getPreferredSizeForCell(y),null!=P&&y.geometry.width<P.width+10&&(y.geometry.width=P.width+10),n+=y.geometry.width+40):"--"==H[R]?(P=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),P.vertex=!0,y.geometry.height+=P.geometry.height,y.insert(P)):0<H[R].length&&(S=new mxCell(H[R],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+S.vertex=!0,P=B.getPreferredSizeForCell(S),null!=P&&S.geometry.width<P.width&&(S.geometry.width=P.width),y.geometry.width=Math.max(y.geometry.width,S.geometry.width),y.geometry.height+=S.geometry.height,y.insert(S)));if(0<D.length){q=mxEvent.isAltDown(x)?q:B.getCenterInsertPoint(B.getBoundingBoxFromGeometry(D,!0));B.getModel().beginUpdate();try{D=B.importCells(D,q.x,q.y);P=[];for(R=0;R<D.length;R++)P.push(D[R]),P=P.concat(D[R].children);B.fireEvent(new mxEventObject("cellsInserted","cells",P))}finally{B.getModel().endUpdate()}B.setSelectionCells(D);
+B.scrollCellToVisible(B.getSelectionCell())}}}else{y=function(m){var t=J[m];null==t&&(t=new mxCell(m,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),t.vertex=!0,J[m]=t,D.push(t));return t};var J={};D=[];for(R=0;R<H.length;R++)if(";"!=H[R].charAt(0)){var K=H[R].split("->");2<=K.length&&(v=y(K[0]),L=y(K[K.length-1]),K=new mxCell(2<K.length?K[1]:"",new mxGeometry),K.edge=!0,K.geometry.relative=!0,v.insertEdge(K,!0),L.insertEdge(K,!1),D.push(K))}if(0<D.length){H=document.createElement("div");H.style.visibility=
+"hidden";document.body.appendChild(H);B=new Graph(H);B.getModel().beginUpdate();try{D=B.importCells(D);for(R=0;R<D.length;R++)B.getModel().isVertex(D[R])&&(P=B.getPreferredSizeForCell(D[R]),D[R].geometry.width=Math.max(D[R].geometry.width,P.width),D[R].geometry.height=Math.max(D[R].geometry.height,P.height));R=!0;"horizontalFlow"==n||"verticalFlow"==n?((new mxHierarchicalLayout(B,"horizontalFlow"==n?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(B.getDefaultParent(),D),R=!1):"circle"==
+n?(new mxCircleLayout(B)).execute(B.getDefaultParent()):(S=new mxFastOrganicLayout(B),S.disableEdgeStyle=!1,S.forceConstant=180,S.execute(B.getDefaultParent()));R&&(U=new mxParallelEdgeLayout(B),U.spacing=30,U.execute(B.getDefaultParent()))}finally{B.getModel().endUpdate()}B.clearCellOverlays();P=[];b.editor.graph.getModel().beginUpdate();try{D=B.getModel().getChildren(B.getDefaultParent()),q=mxEvent.isAltDown(x)?q:b.editor.graph.getCenterInsertPoint(B.getBoundingBoxFromGeometry(D,!0)),P=b.editor.graph.importCells(D,
+q.x,q.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",P))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(P);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());B.destroy();H.parentNode.removeChild(H)}}}function p(){return"list"==z.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==z.value||
+"mermaid2drawio"==z.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==z.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==z.value?"@startuml\nskinparam backgroundcolor transparent\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":
+"plantUmlSvg"==z.value||"plantUmlTxt"==z.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var q=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");var u=document.createElement("textarea");u.style.position="absolute";u.style.left="30px";u.style.right="30px";u.style.top=
+"30px";u.style.bottom="100px";u.style.resize="none";u.setAttribute("wrap","off");u.setAttribute("spellcheck","false");u.setAttribute("autocorrect","off");u.setAttribute("autocomplete","off");u.setAttribute("autocapitalize","off");var z=document.createElement("select");z.className="geBtn";if("formatSql"==k||"mermaid"==k&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())z.style.display="none";var G=document.createElement("option");G.setAttribute("value","list");mxUtils.write(G,mxResources.get("list"));
+"plantUml"!=k&&"mermaid"!=k&&z.appendChild(G);null!=k&&"fromText"!=k||G.setAttribute("selected","selected");G=document.createElement("option");G.setAttribute("value","table");mxUtils.write(G,mxResources.get("formatSql"));"formatSql"==k&&(z.appendChild(G),G.setAttribute("selected","selected"));G=document.createElement("option");G.setAttribute("value","mermaid");mxUtils.write(G,mxResources.get("image"));if("mermaid"==k){if("undefined"!==typeof mxMermaidToDrawio){var E=document.createElement("option");
+E.setAttribute("value","mermaid2drawio");E.setAttribute("selected","selected");mxUtils.write(E,mxResources.get("diagram"));z.appendChild(E)}else z.style.display="none";z.appendChild(G)}G=document.createElement("option");G.setAttribute("value","diagram");mxUtils.write(G,mxResources.get("diagram"));E=document.createElement("option");E.setAttribute("value","circle");mxUtils.write(E,mxResources.get("circle"));var F=document.createElement("option");F.setAttribute("value","horizontalFlow");mxUtils.write(F,
+mxResources.get("horizontalFlow"));var d=document.createElement("option");d.setAttribute("value","verticalFlow");mxUtils.write(d,mxResources.get("verticalFlow"));"plantUml"!=k&&"mermaid"!=k&&(z.appendChild(G),z.appendChild(E),z.appendChild(F),z.appendChild(d));G=document.createElement("option");G.setAttribute("value","plantUmlSvg");mxUtils.write(G,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==k&&G.setAttribute("selected","selected");E=document.createElement("option");
+E.setAttribute("value","plantUmlPng");mxUtils.write(E,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");F=document.createElement("option");F.setAttribute("value","plantUmlTxt");mxUtils.write(F,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==k&&(z.appendChild(G),z.appendChild(E),z.appendChild(F));var g=p();u.value=g;f.appendChild(u);G=document.createElement("div");G.style.position="absolute";G.style.bottom=
+"46px";G.style.right="30px";G.style.left="30px";G.style.justifyContent="end";G.style.display="flex";this.init=function(){u.focus()};Graph.fileSupport&&(u.addEventListener("dragover",function(l){l.stopPropagation();l.preventDefault()},!1),u.addEventListener("drop",function(l){l.stopPropagation();l.preventDefault();if(0<l.dataTransfer.files.length){l=l.dataTransfer.files[0];var n=new FileReader;n.onload=function(x){u.value=x.target.result};n.readAsText(l)}},!1));"plantUml"==k&&"https://plant-aws.diagrams.net"==
+window.PLANT_URL&&(E=document.createElement("div"),E.style.display="inline-block",E.style.color="#c00",E.style.fontSize="12px",E.style.marginRight="10px",E.style.display="flex",E.style.alignItems="center",E.innerHTML='<a href="https://github.com/jgraph/drawio/discussions/5074" target="_blank" rel="noopener noreferrer" style="color: #c00; text-decoration: underline;">PlantUML is deprecated</a>',G.appendChild(E));b.isOffline()&&!mxClient.IS_CHROMEAPP||"mermaid"!=k&&"plantUml"!=k||G.appendChild(b.createHelpIcon("mermaid"==
+k?"https://mermaid.js.org/intro/":"https://plantuml.com/"));G.appendChild(z);mxEvent.addListener(z,"change",function(){var l=p();if(0==u.value.length||u.value==g)g=l,u.value=g});k=mxUtils.button(mxResources.get("close"),function(){u.value==g?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});k.className="geBtn";b.editor.cancelFirst&&G.appendChild(k);E=mxUtils.button(mxResources.get("insert"),function(l){try{b.hideDialog(),c(u.value,z.value,l)}catch(n){b.handleError(n)}});
+E.className="geBtn gePrimaryBtn";G.appendChild(E);b.editor.cancelFirst||G.appendChild(k);f.appendChild(G);this.container=f},NewDialog=function(b,f,k,c,p,q,u,z,G,E,F,d,g,l,n,x,A,B,I,H){function D(oa){null!=oa&&(La=Za=oa?135:140);oa=!0;if(null!=lb)for(;V<lb.length&&(oa||0!=mxUtils.mod(V,30));){var Ba=lb[V++];Ba=L(Ba.url,Ba.libs,Ba.title,Ba.tooltip?Ba.tooltip:Ba.title,Ba.select,Ba.imgUrl,Ba.info,Ba.onClick,Ba.preview,Ba.noImg,Ba.clibs,Ba.type);oa&&Ba.click();oa=!1}}function S(oa,Ba,ua,Da,wa,za){if(null!=
+oa&&mxUtils.isAncestorNode(document.body,Da)){oa=mxUtils.parseXml(oa);oa=Editor.parseDiagramNode(oa.documentElement,null,!0);var Ka=new mxCodec(oa.ownerDocument),Na=new mxGraphModel;Ka.decode(oa,Na);b.sidebar.createTooltip(Da,Na.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=wa?mxResources.get(wa):null,!0,new mxPoint(Ba,
+ua),!0,function(){ja=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=za&&R(Da,null,null,za,infoObj,clibs)},!0,!1)}}function U(){if(na==$a&&null==ta&&null!=bb&&null!=eb)c&&b.spinner.spin(document.body,mxResources.get("generate")+" '"+eb.value+"'")&&(m=!0,b.hideDialog()),bb.click();else if(m&&b.spinner.stop(),xa&&null!=l)k||m||b.hideDialog(),l(xa,Ea,O.value);else if(c)k||m||b.hideDialog(),c(ta,O.value,Aa,ha);else{var oa=O.value;if(null!=oa&&0<oa.length){var Ba=function(Da,wa,
+za){b.createFile(za,ta,null!=ha&&0<ha.length?ha:null,Da,function(){m||b.hideDialog()},null,wa,null,null!=ma&&0<ma.length?ma:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ua=new SaveDialog(b,oa,mxUtils.bind(this,function(Da,wa,za){Ba(wa,za,Da.value)}),null,null,null,null,b.mode);b.showDialog(ua.container,420,150,!0,!1);ua.init()}else b.pickFolder(b.mode,function(Da){Ba(b.mode,Da,oa)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function R(oa,Ba,ua,Da,
+wa,za,Ka){return na!=oa?(null!=na&&(na.classList.remove("geTemplateSelected"),na==$a&&(Ua.style.display="none",cb.style.display="",Ra.style.visibility="hidden",ib.style.visibility=null!=va?"visible":"hidden")),oa==$a&&(Ba=va,null!=Ba?(ib.style.visibility="visible",ib.style.visibility=null!=va?"visible":"hidden",Ra.style.visibility="visible"):(Ua.style.display="",Ra.style.visibility="hidden",ib.style.visibility="hidden")),W.removeAttribute("disabled"),ta=Ba,ha=ua,ma=za,na=oa,xa=Da,Aa=Ka,Ea=wa,na.classList.add("geTemplateSelected"),
+!0):!1}function P(){Ua.style.display="";cb.style.display="none";Ra.style.visibility="hidden";ib.style.visibility="hidden";eb.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?eb.select():document.execCommand("selectAll",!1,null)}function v(){cb.style.backgroundImage=pb;cb.style.backgroundSize="contain";Ua.style.display="none";cb.style.display="";Ra.style.visibility="visible";ib.style.visibility="visible"}function y(oa){if(!fb){fb=!0;var Ba=mxUtils.trim(eb.value);oa||""==Ba?null!=Fa&&
+(eb.value=Fa,v()):(cb.style.backgroundImage="url("+Editor.spinImage+")",cb.style.backgroundSize="12px 12px",cb.style.display="",Ua.style.display="none",b.generateOpenAiMermaidDiagram(Ba,function(ua){fb=!1;na==$a&&"none"==Ua.style.display&&(pb="url("+Editor.createSvgDataUri(mxUtils.getXml(b.getSvgForXml(ua)))+")",$a.setAttribute("title",Ba),ib.style.display="",va=ta=ua,Fa=Ba,v(),m&&U())},mxUtils.bind(this,function(ua){fb=!1;na==$a&&(Ua.style.display="",cb.style.display="none",Ra.style.visibility="hidden",
+ib.style.visibility="hidden",b.handleError(ua))}),!0))}}function L(oa,Ba,ua,Da,wa,za,Ka,Na,Sa,jb,ab,nb){function Pa(Wa,qb){null==tb?(ob=Wa,ob=/^https?:\/\//.test(ob)?b.editor.isCorsEnabledForUrl(ob)?ob:PROXY_URL+"?url="+encodeURIComponent(ob):TEMPLATE_PATH+"/"+ob,mxUtils.get(ob,mxUtils.bind(this,function(rb){200<=rb.getStatus()&&299>=rb.getStatus()&&(tb=rb.getText());qb(tb,ob)}))):qb(tb,ob)}function gb(Wa,qb){if(null==oa||Z||b.sidebar.currentElt==Ia)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),
+null!=aa){var rb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+aa.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+aa.naturalWidth+'" height="'+aa.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";S(rb,mxEvent.getClientX(Wa),mxEvent.getClientY(Wa),ua,oa)}else b.sidebar.currentElt=Ia,Z=!0,Pa(oa,function(Cb){if(Z&&b.sidebar.currentElt==Ia)try{S(Cb,
+mxEvent.getClientX(Wa),mxEvent.getClientY(Wa),Ia,qb)}catch(Db){b.sidebar.currentElt=null,b.handleError(Db)}Z=!1})}var Ia=null;if("generative"!=nb||null==$a){Ia=document.createElement("div");Ia.className="geTemplate";var tb=null,ob=oa;null!=ua?Ia.setAttribute("title",mxResources.get(ua,null,ua)):null!=Da&&0<Da.length&&Ia.setAttribute("title",Da)}else Ia=$a;var ub=document.createElement("span");ub.className="geAdaptiveAsset";mxUtils.write(ub,mxResources.get(ua,null,ua));if(null!=za){Ia.style.display=
+"inline-flex";Ia.style.justifyContent="center";Ia.style.alignItems="center";Sa=document.createElement("img");Sa.setAttribute("src",za);Sa.setAttribute("alt",Da);Sa.style.maxWidth=La+"px";Sa.style.maxHeight=Za+"px";aa=Sa;var xb=za.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ia.appendChild(Sa);Sa.onerror=function(){this.src!=xb?this.src=xb:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ia,mxUtils.bind(this,function(Wa){R(Ia,null,null,oa,Ka,ab)}),null,
+null);mxEvent.addListener(Ia,"dblclick",function(Wa){U();mxEvent.consume(Wa)})}else if(!jb&&null!=oa&&0<oa.length){var yb=function(Wa){X.spin(ya)&&Pa(oa,function(qb,rb){X.stop();null!=qb&&(R(Ia,qb,Ba,null,null,ab,rb),Wa&&U())})};za=Sa||TEMPLATE_PATH+"/"+oa.substring(0,oa.length-4)+".png";Sa=cb.cloneNode(!1);Sa.style.backgroundImage="url("+za+")";Sa.style.display="";Ia.appendChild(Sa);null!=ua&&Ia.appendChild(ub);mxEvent.addGestureListeners(Ia,mxUtils.bind(this,function(Wa){yb()}),null,null);mxEvent.addListener(Ia,
+"dblclick",function(Wa){yb(!0);mxEvent.consume(Wa)})}else Ia.appendChild(ub),"generative"==nb&&null==$a&&(Ia.appendChild(cb),Ia.appendChild(Ua),Ia.appendChild(ib),Ia.appendChild(Ra),$a=Ia),wa&&R(Ia),null!=Na?(mxEvent.addGestureListeners(Ia,null,null,mxUtils.bind(this,function(Wa){R(Ia,null,null,oa,Ka)})),mxEvent.addListener(Ia,"click",Na)):(mxEvent.addListener(Ia,"click",function(Wa){R(Ia,null,null,oa,Ka)&&"generative"==nb&&null==va&&P()}),mxEvent.addListener(Ia,"dblclick",function(Wa){"generative"!=
+nb?U():"none"==Ua.style.display&&P();mxEvent.consume(Wa)}));null!=oa&&(za=Y.cloneNode(!0),Ia.appendChild(za),mxEvent.addGestureListeners(za,mxUtils.bind(this,function(Wa){ja=b.sidebar.currentElt==Ia}),null,null),mxEvent.addListener(za,"click",mxUtils.bind(this,function(Wa){ja||gb(Wa,null!=ua?ua:Da);mxEvent.consume(Wa)})));ya.appendChild(Ia);return Ia}function J(){function oa(Pa,gb){Pa=mxResources.get(Pa,null,Pa.substring(0,1).toUpperCase()+Pa.substring(1));18<Pa.length&&(Pa=Pa.substring(0,18)+"&hellip;");
+return Pa+(null!=gb?" ("+gb.length+")":"")}function Ba(Pa,gb,Ia){mxEvent.addListener(gb,"click",function(){Xa!=gb&&(null!=Xa&&(Xa.style.backgroundColor=""),Xa=gb,Xa.style.backgroundColor=u,ya.scrollTop=0,ya.innerText="",V=0,null!=Qa[Pa].content?(ya.appendChild(Qa[Pa].content),ta=va,lb=null,null!=Qa[Pa].content.init&&Qa[Pa].content.init()):(lb=Ia?Ta[Pa][Ia]:Qa[Pa],ca=null,D(!1)))})}db&&(db=!1,mxEvent.addListener(ya,"scroll",function(Pa){ya.scrollTop+ya.clientHeight>=ya.scrollHeight&&(D(),mxEvent.consume(Pa))}));
+if(0<hb){var ua=document.createElement("div");ua.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ua,mxResources.get("custom"));Ja.appendChild(ua);for(var Da in Va){var wa=document.createElement("div");ua=Da;var za=Va[Da];18<ua.length&&(ua=ua.substring(0,18)+"&hellip;");wa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";wa.setAttribute("title",
+ua+" ("+za.length+")");mxUtils.write(wa,wa.getAttribute("title"));null!=E&&(wa.style.padding=E);Ja.appendChild(wa);(function(Pa,gb){mxEvent.addListener(wa,"click",function(){Xa!=gb&&(Xa.style.backgroundColor="",Xa=gb,Xa.style.backgroundColor=u,ya.scrollTop=0,ya.innerText="",V=0,lb=Va[Pa],ca=null,D(!1))})})(Da,wa)}ua=document.createElement("div");ua.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ua,"draw.io");Ja.appendChild(ua)}for(Da in Qa){ua=
+za=null;if(null!=Qa[Da].content)wa=document.createElement(Ka?"ul":"div"),ua=oa(Da),wa.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;",wa.setAttribute("title",ua),mxUtils.write(wa,ua),Ja.appendChild(wa),ua=wa;else{var Ka=Ta[Da];ua=wa=document.createElement(Ka?"ul":"div");za=Qa[Da];var Na=oa(Da,za);if(null!=Ka){za=document.createElement("li");var Sa=document.createElement("div");
+Sa.className="geTempTreeCaret";Sa.setAttribute("title",Na);mxUtils.write(Sa,Na);ua=Sa;za.appendChild(Sa);Na=document.createElement("ul");Na.className="geTempTreeNested";Na.style.visibility="hidden";for(var jb in Ka){var ab=document.createElement("li"),nb=oa(jb,Ka[jb]);ab.setAttribute("title",nb);mxUtils.write(ab,nb);Ba(Da,ab,jb);Na.appendChild(ab)}za.appendChild(Na);wa.className="geTempTree";wa.appendChild(za);(function(Pa,gb){mxEvent.addListener(gb,"click",function(){Pa.style.visibility="visible";
+Pa.classList.toggle("geTempTreeActive");Pa.classList.toggle("geTempTreeNested")&&setTimeout(function(){Pa.style.visibility="hidden"},550);gb.classList.toggle("geTempTreeCaret-down")})})(Na,Sa)}else wa.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;",wa.setAttribute("title",Na),mxUtils.write(wa,Na);null!=E&&(wa.style.padding=E);Ja.appendChild(wa)}Ba(Da,ua);null==Xa&&ua.click()}D(!1)}
+var K=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);k=null!=k?k:!0;p=null!=p?p:!1;u=null!=u?u:"light-dark(#ebf2f9, "+Editor.darkColor+")";F=null!=F?F:EditorUi.templateFile;var m=!1,t=document.createElement("div");t.style.userSelect="none";t.style.height="100%";var C=document.createElement("div");C.style.whiteSpace="nowrap";C.style.height="46px";k&&t.appendChild(C);var N=document.createElement("img");N.setAttribute("border","0");N.setAttribute("align","absmiddle");
+N.style.width="40px";N.style.height="40px";N.style.marginRight="10px";N.style.paddingBottom="4px";N.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";f||K||!k||C.appendChild(N);k&&mxUtils.write(C,(K?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");var M=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?M=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?M=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?M=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?M=b.gitHub.extension:b.mode==
+App.MODE_GITLAB&&null!=b.gitLab?M=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(M=b.trello.extension);var O=document.createElement("input");O.setAttribute("value",b.defaultFilename+M);O.style.marginLeft="10px";O.style.width=f||K?"144px":"244px";this.init=function(){k&&Editor.selectFilename(O);null!=ya.parentNode&&null!=ya.parentNode.parentNode&&mxEvent.addGestureListeners(ya.parentNode.parentNode,mxUtils.bind(this,function(oa){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};
+if(k)if(C.appendChild(O),B)O.style.width=f||K?"350px":"450px";else if(null!=b.editor.diagramFileTypes){var Q=FilenameDialog.createFileTypes(b,O,b.editor.diagramFileTypes);Q.style.marginLeft="6px";Q.style.width=f||K?"80px":"180px";C.appendChild(Q)}var T=!1,V=0,X=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),W=mxUtils.button(x||mxResources.get("create"),function(){W.setAttribute("disabled",
+"disabled");U();W.removeAttribute("disabled")});W.className="geBtn gePrimaryBtn";var Y=document.createElement("img");Y.setAttribute("src",Editor.magnifyImage);Y.setAttribute("title",mxResources.get("preview"));Y.className="geButton geRoundButton";var Z=!1,aa=null,ja=!1;if(d||g){var ea=[],ca=null,ka=null,la=null,ba=function(oa){W.setAttribute("disabled","disabled");for(var Ba=0;Ba<ea.length;Ba++)ea[Ba].className=Ba==oa?"geBtn gePrimaryBtn":"geBtn"};T=!0;var ia=document.createElement("div");ia.style.whiteSpace=
+"nowrap";ia.style.height="30px";t.appendChild(ia);var fa=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ja.style.display="";Ca.style.display="";ya.style.left="160px";ba(0);ya.scrollTop=0;ya.innerText="";V=0;ca!=lb&&(lb=ca,Qa=ka,hb=la,Ja.innerText="",J(),ca=null)});ea.push(fa);ia.appendChild(fa);var da=function(oa){Ja.style.display="none";Ca.style.display="none";ya.style.left="30px";ba(oa?-1:1);null==ca&&(ca=lb);ya.scrollTop=0;ya.innerText="";X.spin(ya);var Ba=function(ua,
+Da,wa){V=0;X.stop();lb=ua;wa=wa||{};var za=0,Ka;for(Ka in wa)za+=wa[Ka].length;if(Da)ya.innerText=Da;else if(0==ua.length&&0==za)ya.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ya.innerText="",0<za){Ja.style.display="";ya.style.left="160px";Ja.innerText="";hb=0;Qa={"draw.io":ua};for(Ka in wa)Qa[Ka]=wa[Ka];J()}else D(!0)};oa?g(qa.value,Ba):d(Ba)};if(d){var ra=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){da()});ia.appendChild(ra);ea.push(ra)}if(g){var pa=
+document.createElement("span");pa.style.marginLeft="10px";pa.innerText=mxResources.get("search")+":";ia.appendChild(pa);var qa=document.createElement("input");qa.style.marginRight="10px";qa.style.marginLeft="10px";qa.style.width="220px";mxEvent.addListener(qa,"keypress",function(oa){13==oa.keyCode&&da(!0)});ia.appendChild(qa);var sa=mxUtils.button(mxResources.get("search"),function(){da(!0)});sa.className="geBtn";ia.appendChild(sa)}ba(0)}var ha=null,ma=null,ta=null,na=null,xa=null,Aa=null,Ea=null,
+va=null,Fa=null,ya=document.createElement("div");ya.style.border="1px solid #d3d3d3";ya.style.position="absolute";ya.style.left="160px";ya.style.right="34px";var Oa=(k?72:40)+(T?30:0);ya.style.top=Oa+"px";ya.style.bottom="68px";ya.style.margin="6px 0 0 -1px";ya.style.padding="6px";ya.style.overflow="auto";var Ca=document.createElement("div");Ca.style.cssText="position:absolute;left:30px;width:128px;top:"+Oa+"px;height:22px;margin-top: 6px;white-space: nowrap;";var Ga=document.createElement("input");
+Ga.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";Ga.setAttribute("placeholder",mxResources.get("search"));Ga.setAttribute("type","text");Ca.appendChild(Ga);var Ha=document.createElement("img");Ha.setAttribute("src",Editor.magnifyImage);Ha.setAttribute("title",mxResources.get("search"));Ha.className="geAdaptiveAsset";Ha.style.position="relative";Ha.style.cursor="pointer";Ha.style.outline="none";Ha.style.opacity="0.5";Ha.style.height=
+"16px";Ha.style.left="-20px";Ha.style.top="4px";Ca.appendChild(Ha);mxEvent.addListener(Ha,"click",function(){Ha.getAttribute("src")!=Editor.magnifyImage&&(Ha.setAttribute("src",Editor.magnifyImage),Ha.setAttribute("title",mxResources.get("search")),Ga.value="",null!=mb&&(mb.click(),mb=null));Ga.focus()});mxEvent.addListener(Ga,"keydown",mxUtils.bind(this,function(oa){if(13==oa.keyCode){var Ba=Ga.value;if(""==Ba)null!=mb&&(mb.click(),mb=null);else{if(null==NewDialog.tagsList[F]){var ua={};for(ab in Qa)if(null==
+Qa[ab].content)for(var Da=Qa[ab],wa=0;wa<Da.length;wa++){var za=Da[wa];if(null!=za.tags)for(var Ka=za.tags.toLowerCase().split(";"),Na=0;Na<Ka.length;Na++)null==ua[Ka[Na]]&&(ua[Ka[Na]]=[]),ua[Ka[Na]].push(za)}NewDialog.tagsList[F]=ua}var Sa=Ba.toLowerCase().split(" ");ua=NewDialog.tagsList[F];if(0<hb&&null==ua.__tagsList__){for(ab in Va)for(Da=Va[ab],wa=0;wa<Da.length;wa++)for(za=Da[wa],Ka=za.title.split(" "),Ka.push(ab),Na=0;Na<Ka.length;Na++){var jb=Ka[Na].toLowerCase();null==ua[jb]&&(ua[jb]=[]);
+ua[jb].push(za)}ua.__tagsList__=!0}var ab=[];Da={};for(wa=Ka=0;wa<Sa.length;wa++)if(0<Sa[wa].length){jb=ua[Sa[wa]];var nb={};ab=[];if(null!=jb)for(Na=0;Na<jb.length;Na++)za=jb[Na],0==Ka==(null==Da[za.url])&&(nb[za.url]=!0,ab.push(za));Da=nb;Ka++}ya.scrollTop=0;ya.innerText="";V=0;ua=document.createElement("div");ua.style.padding="6px";ua.style.whiteSpace="nowrap";ua.style.overflow="hidden";ua.style.textOverflow="ellipsis";za=mxResources.get(0==ab.length?"noResultsFor":"resultsFor",[Ba]);ua.setAttribute("title",
+za);mxUtils.write(ua,za);ya.appendChild(ua);null!=Xa&&null==mb&&(Xa.style.backgroundColor="",mb=Xa,Xa=ua);lb=ab;ca=null;D(!1)}mxEvent.consume(oa)}}));mxEvent.addListener(Ga,"keyup",mxUtils.bind(this,function(oa){""==Ga.value?(Ha.setAttribute("src",Editor.magnifyImage),Ha.setAttribute("title",mxResources.get("search"))):(Ha.setAttribute("src",Editor.crossImage),Ha.setAttribute("title",mxResources.get("reset")))}));Oa+=23;var Ja=document.createElement("div");Ja.style.cssText="position:absolute;left:30px;width:128px;top:"+
+Oa+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ya,"scroll",function(){null!=b.sidebar&&b.sidebar.hideTooltip()});var La=140,Za=La,$a=null,pb="url("+Editor.thinSparklesImage+")",Ua=document.createElement("div");Ua.className="geGenerateDiagramForm";Ua.style.position="absolute";Ua.style.width="100%";Ua.style.height="100%";var cb=document.createElement("div");cb.className="geTemplatePreview geAdaptiveAsset";cb.style.backgroundImage=pb;var eb=document.createElement("textarea");
+eb.setAttribute("placeholder",mxResources.get("describeYourDiagram"));eb.className="geGenerateDiagramDescription";var bb=document.createElement("button");bb.className="geBtn gePrimaryBtn geGenerateDiagramButton";bb.setAttribute("disabled","disabled");bb.setAttribute("title",mxResources.get("ok"));mxUtils.write(bb,mxResources.get("ok"));var ib=Y.cloneNode(!0);ib.style.display="none";var Ya=!1;mxEvent.addGestureListeners(ib,function(oa){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},
+null,function(oa){if(!Ya&&null!=va){var Ba="<mxfile><diagram>"+Graph.compress(va)+"</diagram></mxfile>";S(Ba,mxEvent.getClientX(oa),mxEvent.getClientY(oa),$a,Fa)}});var Ra=Y.cloneNode(!0);Ra.setAttribute("src",Editor.editImage);Ra.setAttribute("title",mxResources.get("edit"));Ra.style.visibility="hidden";Ra.style.left="0px";var Ma=Y.cloneNode(!0);Ma.setAttribute("src",Editor.helpImage);Ma.setAttribute("title",mxResources.get("help"));mxEvent.addListener(Ma,"click",function(oa){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");
+mxEvent.consume(oa)});Ua.appendChild(eb);Ua.appendChild(bb);Ua.appendChild(Ma);Ua.style.display="none";mxEvent.addListener(Ra,"click",P);mxEvent.addListener(eb,"input",function(){""!=eb.value?bb.removeAttribute("disabled"):bb.setAttribute("disabled","disabled")});var fb=!1;mxEvent.addListener(bb,"click",function(){y()});mxEvent.addListener(eb,"keydown",function(oa){13!=oa.keyCode||mxEvent.isShiftDown(oa)?27==oa.keyCode&&(y(!0),mxEvent.consume(oa)):(y(),mxEvent.consume(oa))});var Qa={},Ta={},Va={},
+hb=0,db=!0,Xa=null,mb=null;Qa.basic=H?[]:[{title:"blankDiagram"}];var lb=Qa.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Qa.basic.push({title:"generate",type:"generative"});if(!f){var vb=function(){mxUtils.get(sb,function(oa){if(!zb){zb=!0;oa=oa.getXml().documentElement.firstChild;for(var Ba={};null!=oa;){if("undefined"!==typeof oa.getAttribute)if("parsererror"==oa.nodeName)null!=window.console&&
+console.log("Parser error in "+F+": "+oa.textContent);else if("clibs"==oa.nodeName){for(var ua=oa.getAttribute("name"),Da=oa.getElementsByTagName("add"),wa=[],za=0;za<Da.length;za++)wa.push(encodeURIComponent(mxUtils.getTextContent(Da[za])));null!=ua&&0<wa.length&&(Ba[ua]=wa.join(";"))}else if(wa=oa.getAttribute("url"),null!=wa){Da=oa.getAttribute("section");ua=oa.getAttribute("subsection");if(null==Da&&(za=wa.indexOf("/"),Da=wa.substring(0,za),null==ua)){var Ka=wa.indexOf("/",za+1);-1<Ka&&(ua=wa.substring(za+
+1,Ka))}za=Qa[Da];null==za&&(za=[],Qa[Da]=za);wa=oa.getAttribute("clibs");null!=Ba[wa]&&(wa=Ba[wa]);wa={url:oa.getAttribute("url"),libs:oa.getAttribute("libs"),title:oa.getAttribute("title"),tooltip:oa.getAttribute("name")||oa.getAttribute("url"),preview:oa.getAttribute("preview"),clibs:wa,tags:oa.getAttribute("tags")};za.push(wa);null!=ua&&(za=Ta[Da],null==za&&(za={},Ta[Da]=za),Da=za[ua],null==Da&&(Da=[],za[ua]=Da),Da.push(wa))}oa=oa.nextSibling}X.stop();J()}})};t.appendChild(Ca);t.appendChild(Ja);
+t.appendChild(ya);var zb=!1,sb=F;/^https?:\/\//.test(sb)&&!b.editor.isCorsEnabledForUrl(sb)&&(sb=PROXY_URL+"?url="+encodeURIComponent(sb));X.spin(ya);null!=A?A(function(oa,Ba){Va=oa;la=hb=Ba;vb()},vb):vb();ka=Qa}mxEvent.addListener(O,"keypress",function(oa){b.dialog.container.firstChild==t&&13==oa.keyCode&&U()});var kb=document.createElement("div");kb.style.marginTop=f?"4px":"16px";kb.style.textAlign="right";kb.style.position="absolute";kb.style.left="40px";kb.style.bottom="24px";kb.style.right="40px";
+var wb=mxUtils.button(mxResources.get("cancel"),function(){null!=q&&q();b.hideDialog(!0)});wb.className="geBtn";!b.editor.cancelFirst||p&&null==q||kb.appendChild(wb);if(!(f||"1"==urlParams.embed||p||mxClient.IS_ANDROID||mxClient.IS_IOS)&&"1"!=urlParams.noDevice){var Ab=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var oa=new FilenameDialog(b,"",mxResources.get("create"),function(Ba){null!=Ba&&0<Ba.length&&b.editor.loadUrl(b.editor.getProxiedUrl(Ba),function(ua){ta=ua;ha=null;templateRealURl=
+Ba;b.hideDialog();U()},function(ua){b.handleError(ua)})},mxResources.get("url"),null,null,null,!1);b.showDialog(oa.container,300,80,!0,!0);oa.init()});Ab.className="geBtn";kb.appendChild(Ab)}if(Graph.fileSupport&&n){var Bb=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var oa=document.createElement("input");oa.setAttribute("multiple","multiple");oa.setAttribute("type","file");mxEvent.addListener(oa,"change",function(Ba){b.openFiles(oa.files,!0);oa.value=""});oa.style.display=
+"none";document.body.appendChild(oa);b.newDlgFileInputElt=oa}b.newDlgFileInputElt.click()});Bb.className="geBtn";kb.appendChild(Bb)}kb.appendChild(W);b.editor.cancelFirst||null!=c||p&&null==q||kb.appendChild(wb);t.appendChild(kb);this.container=t};NewDialog.tagsList={};
+var SaveDialog=function(b,f,k,c,p,q,u,z,G,E,F){function d(m,t,C,N,M,O){var Q=null;if((null==c||0>mxUtils.indexOf(c,m))&&(null==G||m==G)&&(null==E||0<=mxUtils.indexOf(E,m))){M=null!=M?M:b.getTitleForService(m);var T=0<=mxUtils.indexOf(y,m);if(T||null!=b.getServiceForName(m)){Q=document.createElement("option");var V="";!T&&b.isOffline(m==App.MODE_GOOGLE&&"1"==urlParams["gapi-stealth"])&&(Q.setAttribute("disabled","disabled"),V=" ("+mxResources.get("offline")+")");if("pick"==O)Q.innerHTML=mxUtils.htmlEntities(M)+
+"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+V,Q.setAttribute("value","pickFolder-"+m),Q.setAttribute("title",M+" - "+mxResources.get("pickFolder")+"...");else{T=m+(null!=C?"-"+C:"");var X=J[T];null!=X&&null!=X.option&&X.option.parentNode.removeChild(X.option);X=null;if(null!=t){"/"==t.charAt(t.length-1)&&(t=t.substring(0,t.length-1));"/"==t.charAt(0)&&(t=t.substring(1));X=t;if(m!=App.MODE_GITHUB&&m==App.MODE_GITLAB){var W=X.lastIndexOf("/");0<=W&&(X=
+X.substring(W+1))}40<X.length&&(X=X.substring(0,20)+"..."+X.substring(X.length-20))}Q.innerHTML=mxUtils.htmlEntities(M)+(null!=X?"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(X):"")+V;Q.setAttribute("title",M+(null!=t?" ("+t+")":"")+(null!=C&&decodeURIComponent(C)!=t?" ["+C+"]":""));Q.setAttribute("value",T);J[T]={option:Q,mode:m,path:t,id:C};SaveDialog.lastValue==T&&null==z&&"disabled"==!Q.getAttribute("disabled")?N=!0:null==N&&("root"==O?N=null==z&&b.mode==m||null!=m&&m==z:"pickFolder-"==
+v.value.substring(0,11)&&(N=!0));N&&Q.setAttribute("selected","selected")}v.appendChild(Q)}}return Q}function g(m){b.pickFolder(m,function(t){var C=null;m==App.MODE_GOOGLE&&null!=t.docs&&0<t.docs.length?C={mode:m,path:t.docs[0].name,id:t.docs[0].id}:m==App.MODE_ONEDRIVE&&null!=t.value&&0<t.value.length?C={mode:m,path:t.value[0].name,id:OneDriveFile.prototype.getIdOf(t.value[0])}:(m==App.MODE_GITHUB||m==App.MODE_GITLAB)&&null!=t&&0<t.length&&(C={mode:m,path:decodeURIComponent(t),id:t});null!=C&&(b.addRecent(C,
+"Folders",5),t=d(C.mode,C.path,C.id,!0),v.innerHTML="",J={},l(),C=v.selectedIndex,v.value=t.value,0>v.selectedIndex&&(v.selectedIndex=C))},!0,!0,!0,!0)}function l(){var m=b.getRecent("Folders"),t=0;if(null!=m&&0<m.length)for(var C=0;C<m.length;C++)null!=d(m[C].mode,m[C].path,m[C].id)&&t++;d(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");d(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(d(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),
null,null,"root"),d(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&d(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);d(App.MODE_GITHUB,null,null,null,null,"pick");d(App.MODE_GITLAB,null,null,null,null,"pick");d(App.MODE_TRELLO);m=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&m&&d(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=c&&0<=mxUtils.indexOf(c,App.MODE_BROWSER)?!0:null);isLocalStorage&&
-"0"!=urlParams.browser&&d(App.MODE_BROWSER);m&&d("download");Editor.popupsAllowed&&d("_blank",null,null,null,mxResources.get("openInNewWindow"));"pickFolder-"==v.value.substring(0,11)&&(m=document.createElement("option"),m.setAttribute("value",""),m.setAttribute("selected","selected"),mxUtils.write(m,mxResources.get("pickFolder")+"..."),v.insertBefore(m,v.firstChild));N=v.value}function n(){if("pickFolder-"==v.value.substring(0,11)){var m=v.value.substring(11);v.value=N;k(m)}else if(null!=Q&&null!=
-J[v.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[Q.value].extension){m=b.getExtensionForService(J[v.value].mode);var t=S.value;null!=m&&0>f.indexOf(".")&&0>t.indexOf(".")&&(S.value=t+m)}K.innerHTML="";mxUtils.write(K,null!=F?F:mxResources.get("download"==v.value||"_blank"==v.value||null!=H?"ok":"save"));""==v.value?K.setAttribute("disabled","disabled"):K.removeAttribute("disabled")}var x=document.createElement("div");x.style.display="flex";x.style.flexWrap="wrap";x.style.whiteSpace=
-"nowrap";var A=document.createElement("div");A.style.display="grid";A.style.gap="5px 8px";A.style.gridAutoRows="auto auto 44px";A.style.gridAutoColumns="0fr minmax(0,1fr)";A.style.width="100%";var B=null,I=null;if(null!=p&&null!=q&&"image/"==q.substring(0,6)&&("image/svg"!=q.substring(0,9)||mxClient.IS_SVG)){A.style.display="inline-grid";A.style.flexBasis="75%";B=document.createElement("div");B.style.display="inline-block";B.style.height="auto";B.style.maxWidth="25%";B.style.margin="auto";var G=document.createElement("img"),
-C=u?p:btoa(unescape(encodeURIComponent(p))),R="data:"+q+";base64,"+C;G.setAttribute("src",R);G.style.boxSizing="border-box";G.style.maxHeight="50px";G.style.maxWidth="100%";G.style.paddingLeft="10px";B.appendChild(G);"image/png"!=q&&"image/svg+xml"!=q||"function"!==typeof window.ClipboardItem||null==navigator.clipboard||(I=mxUtils.button(mxResources.get("copy"),function(){b.writeImageToClipboard(R,null,null,q,mxUtils.bind(this,function(){"copy"==y?b.hideDialog():b.alert(mxResources.get("copiedToClipboard"))}),
-mxUtils.bind(this,function(m){b.handleError(m)}))},null,"geBtn"));Editor.popupsAllowed&&(null==c||0>mxUtils.indexOf(c,"_blank"))?(B.setAttribute("title",mxResources.get("openInNewWindow")),B.style.cursor="pointer",mxEvent.addGestureListeners(B,null,null,function(m){mxEvent.isPopupTrigger(m)||b.openInNewWindow(p,q,u)})):B.setAttribute("title",mxResources.get("preview"))}C=document.createElement("div");C.style.display="flex";C.style.padding="1px";C.style.alignItems="center";C.style.justifyContent="flex-end";
-C.style.gridColumn="1";C.style.whiteSpace="nowrap";var T=document.createElement("div");T.style.display="grid";T.style.padding="1px";T.style.alignItems="center";T.style.gridColumn="2";T.style.gridAutoColumns="minmax(0,1fr) auto";T.style.gap="6px";mxUtils.write(C,mxResources.get("saveAs")+":");var S=document.createElement("input");S.setAttribute("type","text");S.setAttribute("value",f);S.style.boxSizing="border-box";S.style.width="100%";T.appendChild(S);null==H&&(A.appendChild(C),A.appendChild(T));
-var Q=null;null!=b.editor.diagramFileTypes&&null==q&&null==H&&(C=C.cloneNode(!1),T=T.cloneNode(!1),mxUtils.write(C,mxResources.get("type")+":"),Q=FilenameDialog.createFileTypes(b,S,b.editor.diagramFileTypes),Q.style.boxSizing="border-box",Q.style.width="100%",T.appendChild(Q),A.appendChild(C),A.appendChild(T));C=C.cloneNode(!1);T=T.cloneNode(!1);mxUtils.write(C,mxResources.get("where")+":");var v=document.createElement("select");v.style.textOverflow="ellipsis";v.style.gridColumn="1";var z=["browser",
-"device","download","_blank"],N=null,J={};G=mxUtils.button(mxResources.get("reset"),function(){S.value=f;S.dispatchEvent(new Event("change"));b.resetRecent("Folders");v.innerHTML="";v.value="";pickFolderOption=null;J={};l()},null,"geBtn");var K=mxUtils.button("",function(){SaveDialog.lastValue=v.value;var m=J[SaveDialog.lastValue];null!=m&&g(S,m.mode,m.id)},null,"geBtn gePrimaryBtn");mxEvent.addListener(S,"keypress",function(m){13==m.keyCode&&("copy"==y&&null!=I?I.click():K.click())});mxEvent.addListener(v,
-"change",n);l();T.appendChild(v);null!=SaveDialog.lastValue&&null!=J[SaveDialog.lastValue]&&(v.value=SaveDialog.lastValue);n();A.appendChild(C);A.appendChild(T);x.appendChild(A);null!=B&&x.appendChild(B);A=document.createElement("div");A.style.flexBasis="100%";A.style.textAlign="right";A.style.marginTop=null!=q?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||A.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));B=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},
-null,"geBtn");b.editor.cancelFirst&&A.appendChild(B);A.appendChild(G);"copy"==y&&null!=I?(I.className="geBtn gePrimaryBtn",K.className="geBtn",A.appendChild(K),A.appendChild(I)):(null!=I&&A.appendChild(I),A.appendChild(K));b.editor.cancelFirst||A.appendChild(B);x.appendChild(A);this.init=function(){Editor.selectFilename(S)};this.container=x},CreateDialog=function(b,f,g,c,p,q,u,y,H,E,F,d,k,l,n,x,A){function B(v,z,N,J){function K(){mxEvent.addListener(m,"click",function(){var O=N;if(u){var P=C.value,
-U=P.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>U){O=null!=O?O:Q.value;var V="";O==App.MODE_GOOGLE?V=b.drive.extension:O==App.MODE_GITHUB?V=b.gitHub.extension:O==App.MODE_GITLAB?V=b.gitLab.extension:O==App.MODE_TRELLO?V=b.trello.extension:O==App.MODE_DROPBOX?V=b.dropbox.extension:O==App.MODE_ONEDRIVE?V=b.oneDrive.extension:O==App.MODE_DEVICE&&(V=".drawio");0<=U&&(P=P.substring(0,U));C.value=P+V}}I(N)})}var m=document.createElement("a");m.style.overflow="hidden";var t=document.createElement("img");
-t.src=v;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";m.style.display="inline-block";m.className="geBaseButton";m.style.position="relative";m.style.margin="4px";m.style.padding="8px 8px 10px 8px";m.style.whiteSpace="nowrap";m.appendChild(t);m.style.color="gray";m.style.fontSize="11px";var D=document.createElement("div");m.appendChild(D);mxUtils.write(D,z);if(null!=J&&null==b[J]){t.style.visibility="hidden";mxUtils.setOpacity(D,
-10);var M=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});M.spin(m);var L=window.setTimeout(function(){null==b[J]&&(M.stop(),m.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[J]&&(window.clearTimeout(L),mxUtils.setOpacity(D,100),t.style.visibility="",M.stop(),K())}))}else K();T.appendChild(m);++S==d&&(mxUtils.br(T),S=0)}function I(v){var z=C.value;
-if(null==v||null!=z&&0<z.length)A&&b.hideDialog(),g(z,v,C)}F="1"==urlParams.noDevice?!1:F;u=null!=u?u:!0;y=null!=y?y:!0;d=null!=d?d:4;A=null!=A?A:!0;q=document.createElement("div");q.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(q);var G=document.createElement("h2");mxUtils.write(G,p||mxResources.get("create"));G.style.marginTop="0px";G.style.marginBottom="24px";q.appendChild(G);p=document.createElement("span");mxUtils.write(p,mxResources.get("filename")+":");p.style.maxWidth="106px";p.style.overflow=
-"hidden";p.style.textOverflow="ellipsis";p.style.display="inline-block";q.appendChild(p);var C=document.createElement("input");C.setAttribute("value",f);C.style.width="180px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){Editor.selectFilename(C)};q.appendChild(C);null!=x&&null!=b.editor.diagramFileTypes&&(x=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),x.style.marginLeft="6px",x.style.width="90px",q.appendChild(x));x=null;if("1"!=
-urlParams.noDevice&&null!=k&&null!=l&&"image/"==l.substring(0,6)&&("image/svg"!=l.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";p=document.createElement("img");var R=n?k:btoa(unescape(encodeURIComponent(k)));p.setAttribute("src","data:"+l+";base64,"+R);p.style.position="absolute";p.style.top="70px";p.style.right="100px";p.style.maxWidth="120px";p.style.maxHeight="80px";mxUtils.setPrefixedStyle(p.style,"transform","translate(50%,-50%)");q.appendChild(p);mxClient.IS_FF||"image/png"!=l||null==
-navigator.clipboard||"function"!==typeof window.ClipboardItem||(x=mxUtils.button(mxResources.get("copy"),function(v){v=b.base64ToBlob(R,"image/png");v=new ClipboardItem({"image/png":v,"text/html":new Blob(['<img src="data:'+l+";base64,"+R+'">'],{type:"text/html"})});navigator.clipboard.write([v]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(z){b.handleError(z)}))}),x.style.marginTop="6px",x.className="geBtn");H&&Editor.popupsAllowed&&
-(p.style.cursor="pointer",mxEvent.addGestureListeners(p,null,null,function(v){mxEvent.isPopupTrigger(v)||I("_blank")}))}mxUtils.br(q);var T=document.createElement("div");T.style.textAlign="center";var S=0;T.style.marginTop="6px";q.appendChild(T);var Q=document.createElement("select");Q.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(k=document.createElement("option"),k.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(k,mxResources.get("googleDrive")),
-Q.appendChild(k),B(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(k=document.createElement("option"),k.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(k,mxResources.get("oneDrive")),Q.appendChild(k),b.mode==App.MODE_ONEDRIVE&&k.setAttribute("selected","selected"),B(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(k=document.createElement("option"),
-k.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(k,mxResources.get("dropbox")),Q.appendChild(k),b.mode==App.MODE_DROPBOX&&k.setAttribute("selected","selected"),B(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(k=document.createElement("option"),k.setAttribute("value",App.MODE_GITHUB),mxUtils.write(k,mxResources.get("github")),Q.appendChild(k),B(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&
-(k=document.createElement("option"),k.setAttribute("value",App.MODE_GITLAB),mxUtils.write(k,mxResources.get("gitlab")),Q.appendChild(k),B(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(k=document.createElement("option"),k.setAttribute("value",App.MODE_TRELLO),mxUtils.write(k,mxResources.get("trello")),Q.appendChild(k),B(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||
-"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)k=document.createElement("option"),k.setAttribute("value",App.MODE_DEVICE),mxUtils.write(k,mxResources.get("device")),Q.appendChild(k),b.mode!=App.MODE_DEVICE&&y||k.setAttribute("selected","selected"),F&&B(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);y&&isLocalStorage&&"0"!=urlParams.browser&&(y=document.createElement("option"),y.setAttribute("value",App.MODE_BROWSER),mxUtils.write(y,
-mxResources.get("browser")),Q.appendChild(y),b.mode==App.MODE_BROWSER&&y.setAttribute("selected","selected"),B(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));y=document.createElement("div");y.style.marginTop="26px";y.style.textAlign="center";null!=E&&(F=mxUtils.button(mxResources.get("help"),function(){b.openLink(E)}),F.className="geBtn",y.appendChild(F));F=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),
-window.close(),window.location.href=b.getUrl())});F.className="geBtn";b.editor.cancelFirst&&null==c&&y.appendChild(F);null==c&&(k=mxUtils.button(mxResources.get("decideLater"),function(){I(null)}),k.className="geBtn",y.appendChild(k));H&&Editor.popupsAllowed&&(H=mxUtils.button(mxResources.get("openInNewWindow"),function(){I("_blank")}),H.className="geBtn",y.appendChild(H));CreateDialog.showDownloadButton&&(H=mxUtils.button(mxResources.get("download"),function(){I("download")}),H.className="geBtn",
-y.appendChild(H),null!=x&&(H.style.marginTop="6px",y.style.marginTop="6px"));null!=x&&(mxUtils.br(y),y.appendChild(x));b.editor.cancelFirst&&null==c||y.appendChild(F);mxEvent.addListener(C,"keypress",function(v){13==v.keyCode?I(App.MODE_DEVICE):27==v.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});q.appendChild(y);this.container=q};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
-var PopupDialog=function(b,f,g,c,p){p=null!=p?p:!0;var q=document.createElement("div");q.style.textAlign="center";q.style.height="100%";mxUtils.write(q,mxResources.get("fileOpenLocation"));mxUtils.br(q);mxUtils.br(q);var u=mxUtils.button(mxResources.get("openInThisWindow"),function(){p&&b.hideDialog();null!=c&&c()});u.className="geBtn";u.style.marginBottom="8px";u.style.width="280px";q.appendChild(u);mxUtils.br(q);var y=mxUtils.button(mxResources.get("openInNewWindow"),function(){p&&b.hideDialog();
-null!=g&&g();b.openLink(f,null,!0)});y.className="geBtn gePrimaryBtn";y.style.width=u.style.width;q.appendChild(y);mxUtils.br(q);mxUtils.br(q);mxUtils.write(q,mxResources.get("allowPopups"));this.container=q},ImageDialog=function(b,f,g,c,p,q,u,y){function H(){0<d.value.length?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");"data:"!=d.value.substring(0,5)?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}q=null!=q?q:!0;var E=b.editor.graph,F=document.createElement("div");
-mxUtils.write(F,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor="transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var d=document.createElement("input");d.setAttribute("value",g);d.setAttribute("type","text");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.marginTop=
-"6px";d.style.width=(Graph.fileSupport?460:340)-20+"px";d.style.backgroundImage="url('"+Editor.crossImage+"')";d.style.backgroundRepeat="no-repeat";d.style.backgroundPosition="100% 50%";d.style.paddingRight="14px";g=document.createElement("div");g.setAttribute("title",mxResources.get("reset"));g.style.position="relative";g.style.left="-16px";g.style.width="12px";g.style.height="14px";g.style.cursor="pointer";g.style.display="inline-block";g.style.top="3px";g.style.background="url('"+b.editor.transparentImage+
-"')";mxEvent.addListener(g,"click",function(){d.value="";d.focus()});f.appendChild(d);f.appendChild(g);F.appendChild(f);var k=y,l,n,x=function(C,R,T,S){var Q="data:"==C.substring(0,5);!b.isOffline()||Q&&"undefined"===typeof chrome?0<C.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(C,function(v){b.spinner.stop();b.hideDialog();var z=!1===S?1:null!=R&&null!=T?Math.max(R/v.width,T/v.height):Math.min(1,Math.min(520/v.width,520/v.height));q&&(C=b.convertDataUri(C));c(C,
-Math.round(Number(v.width)*z),Math.round(Number(v.height)*z),k,l,n)},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(C,null,null,k,l,n)):(C=b.convertDataUri(C),R=null==R?120:R,T=null==T?100:T,b.hideDialog(),c(C,R,T,k,l,n))},A=function(C,R){if(null!=C){var T=p?null:E.getModel().getGeometry(E.getSelectionCell());null!=T?x(C,T.width,T.height,R):x(C,null,null,R)}else b.hideDialog(),c(null)};this.init=function(){d.focus();
-if(Graph.fileSupport){d.setAttribute("placeholder",mxResources.get("dragImagesHere"));var C=F.parentNode,R=null;mxEvent.addListener(C,"dragleave",function(T){null!=R&&(R.parentNode.removeChild(R),R=null);T.stopPropagation();T.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(T){null==R&&(R=b.highlightElement(C));T.stopPropagation();T.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(T){null!=R&&(R.parentNode.removeChild(R),R=null);if(0<T.dataTransfer.files.length)b.importFiles(T.dataTransfer.files,
-0,0,b.maxImageSize,function(Q,v,z,N,J,K,m,t){A(Q,t)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var v=0;v<Q.length;v++)Q[v]()},!mxEvent.isControlDown(T),null,null,!0);else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var S=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(S)&&A(decodeURIComponent(S))}T.stopPropagation();T.preventDefault()}),!1)}};y=document.createElement("div");y.style.marginTop="14px";y.style.textAlign=
-"center";g=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});g.className="geBtn";b.editor.cancelFirst&&y.appendChild(g);ImageDialog.filePicked=function(C){C.action==google.picker.Action.PICKED&&null!=C.docs[0].thumbnails&&(C=C.docs[0].thumbnails[C.docs[0].thumbnails.length-1],null!=C&&(d.value=C.url));d.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type",
-"file");mxEvent.addListener(B,"change",function(C){null!=B.files&&(b.importFiles(B.files,0,0,b.maxImageSize,function(R,T,S,Q,v,z){A(R)},function(){},function(R){return"image/"==R.type.substring(0,6)},function(R){for(var T=0;T<R.length;T++)R[T]()},!0),B.type="",B.type="file",B.value="")});B.style.display="none";document.body.appendChild(B);b.imgDlgFileInputElt=B}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";y.appendChild(f)}mxEvent.addListener(d,
-"keypress",function(C){13==C.keyCode&&A(d.value)});var I=mxUtils.button(mxResources.get("crop"),function(){var C=new CropImageDialog(b,d.value,k,function(R,T,S){k=R;l=T;n=S});b.showDialog(C.container,300,390,!0,!0)});u&&(I.className="geBtn",y.appendChild(I));var G=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=d.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var C=b.editor.createImageUrlConverter().convert(d.value),R=new Image;R.onload=function(){b.editor.convertImageToDataUri(C,
-function(T){b.confirmImageResize(function(S){b.resizeImage(R,T,mxUtils.bind(this,function(Q,v,z){b.spinner.stop();null!=Q&&Q.length<b.maxImageBytes?(d.value=Q,H()):b.handleError({message:mxResources.get("imageTooBig")})}),S,b.maxImageSize)},R.width>b.maxImageSize||R.height>b.maxImageSize||T.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};R.onerror=function(){b.spinner.stop();b.handleError({message:mxResources.get("fileNotFound")})};
-R.src=C}});G.className="geBtn";mxEvent.addListener(d,"change",function(C){k=null;H()});H();y.appendChild(G);u=mxUtils.button(mxResources.get("apply"),function(){A(d.value)});u.className="geBtn gePrimaryBtn";y.appendChild(u);b.editor.cancelFirst||y.appendChild(g);Graph.fileSupport&&(y.style.marginTop="120px",F.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",F.style.backgroundPosition="center 65%",F.style.backgroundRepeat="no-repeat",u=document.createElement("div"),u.style.position="absolute",
-u.style.width="420px",u.style.top="58%",u.style.textAlign="center",u.style.fontSize="18px",u.style.color="#a0c3ff",mxUtils.write(u,mxResources.get("dragImagesHere")),F.appendChild(u));F.appendChild(y);this.container=F},LinkDialog=function(b,f,g,c,p,q,u){function y(C,R){var T=document.createElement("option");mxUtils.write(T,mxResources.get(C));T.value=C;I.appendChild(T);G[C]=R}var H=document.createElement("div");H.style.height="100%";mxUtils.write(H,mxResources.get("editLink")+":");var E=document.createElement("div");
+"0"!=urlParams.browser&&d(App.MODE_BROWSER);m&&d("download");Editor.popupsAllowed&&d("_blank",null,null,null,mxResources.get("openInNewWindow"));"pickFolder-"==v.value.substring(0,11)&&(m=document.createElement("option"),m.setAttribute("value",""),m.setAttribute("selected","selected"),mxUtils.write(m,mxResources.get("pickFolder")+"..."),v.insertBefore(m,v.firstChild));L=v.value}function n(){if("pickFolder-"==v.value.substring(0,11)){var m=v.value.substring(11);v.value=L;g(m)}else if(null!=P&&null!=
+J[v.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[P.value].extension){m=b.getExtensionForService(J[v.value].mode);var t=R.value;null!=m&&0>f.indexOf(".")&&0>t.indexOf(".")&&(R.value=t+m)}K.innerHTML="";mxUtils.write(K,null!=F?F:mxResources.get("download"==v.value||"_blank"==v.value||null!=G?"ok":"save"));""==v.value?K.setAttribute("disabled","disabled"):K.removeAttribute("disabled")}var x=document.createElement("div");x.style.display="flex";x.style.flexWrap="wrap";x.style.whiteSpace=
+"nowrap";var A=document.createElement("div");A.style.display="grid";A.style.gap="5px 8px";A.style.gridAutoRows="auto auto 44px";A.style.gridAutoColumns="0fr minmax(0,1fr)";A.style.width="100%";var B=null,I=null;if(null!=p&&null!=q&&"image/"==q.substring(0,6)&&("image/svg"!=q.substring(0,9)||mxClient.IS_SVG)){A.style.display="inline-grid";A.style.flexBasis="75%";B=document.createElement("div");B.style.display="inline-block";B.style.height="auto";B.style.maxWidth="25%";B.style.margin="auto";var H=document.createElement("img"),
+D=u?p:btoa(unescape(encodeURIComponent(p))),S="data:"+q+";base64,"+D;H.setAttribute("src",S);H.style.boxSizing="border-box";H.style.maxHeight="50px";H.style.maxWidth="100%";H.style.paddingLeft="10px";B.appendChild(H);"image/png"!=q&&"image/svg+xml"!=q||"function"!==typeof window.ClipboardItem||null==navigator.clipboard||(I=mxUtils.button(mxResources.get("copy"),function(){b.writeImageToClipboard(S,null,null,q,mxUtils.bind(this,function(){"copy"==z?b.hideDialog():b.alert(mxResources.get("copiedToClipboard"))}),
+mxUtils.bind(this,function(m){b.handleError(m)}))},null,"geBtn"));Editor.popupsAllowed&&(null==c||0>mxUtils.indexOf(c,"_blank"))?(B.setAttribute("title",mxResources.get("openInNewWindow")),B.style.cursor="pointer",mxEvent.addGestureListeners(B,null,null,function(m){mxEvent.isPopupTrigger(m)||b.openInNewWindow(p,q,u)})):B.setAttribute("title",mxResources.get("preview"))}D=document.createElement("div");D.style.display="flex";D.style.padding="1px";D.style.alignItems="center";D.style.justifyContent="flex-end";
+D.style.gridColumn="1";D.style.whiteSpace="nowrap";var U=document.createElement("div");U.style.display="grid";U.style.padding="1px";U.style.alignItems="center";U.style.gridColumn="2";U.style.gridAutoColumns="minmax(0,1fr) auto";U.style.gap="6px";mxUtils.write(D,mxResources.get("saveAs")+":");var R=document.createElement("input");R.setAttribute("type","text");R.setAttribute("value",f);R.style.boxSizing="border-box";R.style.width="100%";U.appendChild(R);null==G&&(A.appendChild(D),A.appendChild(U));
+var P=null;null!=b.editor.diagramFileTypes&&null==q&&null==G&&(D=D.cloneNode(!1),U=U.cloneNode(!1),mxUtils.write(D,mxResources.get("type")+":"),P=FilenameDialog.createFileTypes(b,R,b.editor.diagramFileTypes),P.style.boxSizing="border-box",P.style.width="100%",U.appendChild(P),A.appendChild(D),A.appendChild(U));D=D.cloneNode(!1);U=U.cloneNode(!1);mxUtils.write(D,mxResources.get("where")+":");var v=document.createElement("select");v.style.textOverflow="ellipsis";v.style.gridColumn="1";var y=["browser",
+"device","download","_blank"],L=null,J={};H=mxUtils.button(mxResources.get("reset"),function(){R.value=f;R.dispatchEvent(new Event("change"));b.resetRecent("Folders");v.innerHTML="";v.value="";pickFolderOption=null;J={};l()},null,"geBtn");var K=mxUtils.button("",function(){SaveDialog.lastValue=v.value;var m=J[SaveDialog.lastValue];null!=m&&k(R,m.mode,m.id)},null,"geBtn gePrimaryBtn");mxEvent.addListener(R,"keypress",function(m){13==m.keyCode&&("copy"==z&&null!=I?I.click():K.click())});mxEvent.addListener(v,
+"change",n);l();U.appendChild(v);null!=SaveDialog.lastValue&&null!=J[SaveDialog.lastValue]&&(v.value=SaveDialog.lastValue);n();A.appendChild(D);A.appendChild(U);x.appendChild(A);null!=B&&x.appendChild(B);A=document.createElement("div");A.style.flexBasis="100%";A.style.textAlign="right";A.style.marginTop=null!=q?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||A.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));B=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},
+null,"geBtn");b.editor.cancelFirst&&A.appendChild(B);A.appendChild(H);"copy"==z&&null!=I?(I.className="geBtn gePrimaryBtn",K.className="geBtn",A.appendChild(K),A.appendChild(I)):(null!=I&&A.appendChild(I),A.appendChild(K));b.editor.cancelFirst||A.appendChild(B);x.appendChild(A);this.init=function(){Editor.selectFilename(R)};this.container=x},CreateDialog=function(b,f,k,c,p,q,u,z,G,E,F,d,g,l,n,x,A){function B(v,y,L,J){function K(){mxEvent.addListener(m,"click",function(){var O=L;if(u){var Q=D.value,
+T=Q.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>T){O=null!=O?O:P.value;var V="";O==App.MODE_GOOGLE?V=b.drive.extension:O==App.MODE_GITHUB?V=b.gitHub.extension:O==App.MODE_GITLAB?V=b.gitLab.extension:O==App.MODE_TRELLO?V=b.trello.extension:O==App.MODE_DROPBOX?V=b.dropbox.extension:O==App.MODE_ONEDRIVE?V=b.oneDrive.extension:O==App.MODE_DEVICE&&(V=".drawio");0<=T&&(Q=Q.substring(0,T));D.value=Q+V}}I(L)})}var m=document.createElement("a");m.style.overflow="hidden";var t=document.createElement("img");
+t.src=v;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";m.style.display="inline-block";m.className="geBaseButton";m.style.position="relative";m.style.margin="4px";m.style.padding="8px 8px 10px 8px";m.style.whiteSpace="nowrap";m.appendChild(t);m.style.color="gray";m.style.fontSize="11px";var C=document.createElement("div");m.appendChild(C);mxUtils.write(C,y);if(null!=J&&null==b[J]){t.style.visibility="hidden";mxUtils.setOpacity(C,
+10);var N=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});N.spin(m);var M=window.setTimeout(function(){null==b[J]&&(N.stop(),m.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[J]&&(window.clearTimeout(M),mxUtils.setOpacity(C,100),t.style.visibility="",N.stop(),K())}))}else K();U.appendChild(m);++R==d&&(mxUtils.br(U),R=0)}function I(v){var y=D.value;
+if(null==v||null!=y&&0<y.length)A&&b.hideDialog(),k(y,v,D)}F="1"==urlParams.noDevice?!1:F;u=null!=u?u:!0;z=null!=z?z:!0;d=null!=d?d:4;A=null!=A?A:!0;q=document.createElement("div");q.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(q);var H=document.createElement("h2");mxUtils.write(H,p||mxResources.get("create"));H.style.marginTop="0px";H.style.marginBottom="24px";q.appendChild(H);p=document.createElement("span");mxUtils.write(p,mxResources.get("filename")+":");p.style.maxWidth="106px";p.style.overflow=
+"hidden";p.style.textOverflow="ellipsis";p.style.display="inline-block";q.appendChild(p);var D=document.createElement("input");D.setAttribute("value",f);D.style.width="180px";D.style.marginLeft="10px";D.style.marginBottom="20px";D.style.maxWidth="70%";this.init=function(){Editor.selectFilename(D)};q.appendChild(D);null!=x&&null!=b.editor.diagramFileTypes&&(x=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),x.style.marginLeft="6px",x.style.width="90px",q.appendChild(x));x=null;if("1"!=
+urlParams.noDevice&&null!=g&&null!=l&&"image/"==l.substring(0,6)&&("image/svg"!=l.substring(0,9)||mxClient.IS_SVG)){D.style.width="160px";p=document.createElement("img");var S=n?g:btoa(unescape(encodeURIComponent(g)));p.setAttribute("src","data:"+l+";base64,"+S);p.style.position="absolute";p.style.top="70px";p.style.right="100px";p.style.maxWidth="120px";p.style.maxHeight="80px";mxUtils.setPrefixedStyle(p.style,"transform","translate(50%,-50%)");q.appendChild(p);mxClient.IS_FF||"image/png"!=l||null==
+navigator.clipboard||"function"!==typeof window.ClipboardItem||(x=mxUtils.button(mxResources.get("copy"),function(v){v=b.base64ToBlob(S,"image/png");v=new ClipboardItem({"image/png":v,"text/html":new Blob(['<img src="data:'+l+";base64,"+S+'">'],{type:"text/html"})});navigator.clipboard.write([v]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(y){b.handleError(y)}))}),x.style.marginTop="6px",x.className="geBtn");G&&Editor.popupsAllowed&&
+(p.style.cursor="pointer",mxEvent.addGestureListeners(p,null,null,function(v){mxEvent.isPopupTrigger(v)||I("_blank")}))}mxUtils.br(q);var U=document.createElement("div");U.style.textAlign="center";var R=0;U.style.marginTop="6px";q.appendChild(U);var P=document.createElement("select");P.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(g,mxResources.get("googleDrive")),
+P.appendChild(g),B(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(g,mxResources.get("oneDrive")),P.appendChild(g),b.mode==App.MODE_ONEDRIVE&&g.setAttribute("selected","selected"),B(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(g=document.createElement("option"),
+g.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(g,mxResources.get("dropbox")),P.appendChild(g),b.mode==App.MODE_DROPBOX&&g.setAttribute("selected","selected"),B(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GITHUB),mxUtils.write(g,mxResources.get("github")),P.appendChild(g),B(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&
+(g=document.createElement("option"),g.setAttribute("value",App.MODE_GITLAB),mxUtils.write(g,mxResources.get("gitlab")),P.appendChild(g),B(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_TRELLO),mxUtils.write(g,mxResources.get("trello")),P.appendChild(g),B(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||
+"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)g=document.createElement("option"),g.setAttribute("value",App.MODE_DEVICE),mxUtils.write(g,mxResources.get("device")),P.appendChild(g),b.mode!=App.MODE_DEVICE&&z||g.setAttribute("selected","selected"),F&&B(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);z&&isLocalStorage&&"0"!=urlParams.browser&&(z=document.createElement("option"),z.setAttribute("value",App.MODE_BROWSER),mxUtils.write(z,
+mxResources.get("browser")),P.appendChild(z),b.mode==App.MODE_BROWSER&&z.setAttribute("selected","selected"),B(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));z=document.createElement("div");z.style.marginTop="26px";z.style.textAlign="center";null!=E&&(F=mxUtils.button(mxResources.get("help"),function(){b.openLink(E)}),F.className="geBtn",z.appendChild(F));F=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),
+window.close(),window.location.href=b.getUrl())});F.className="geBtn";b.editor.cancelFirst&&null==c&&z.appendChild(F);null==c&&(g=mxUtils.button(mxResources.get("decideLater"),function(){I(null)}),g.className="geBtn",z.appendChild(g));G&&Editor.popupsAllowed&&(G=mxUtils.button(mxResources.get("openInNewWindow"),function(){I("_blank")}),G.className="geBtn",z.appendChild(G));CreateDialog.showDownloadButton&&(G=mxUtils.button(mxResources.get("download"),function(){I("download")}),G.className="geBtn",
+z.appendChild(G),null!=x&&(G.style.marginTop="6px",z.style.marginTop="6px"));null!=x&&(mxUtils.br(z),z.appendChild(x));b.editor.cancelFirst&&null==c||z.appendChild(F);mxEvent.addListener(D,"keypress",function(v){13==v.keyCode?I(App.MODE_DEVICE):27==v.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});q.appendChild(z);this.container=q};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+var PopupDialog=function(b,f,k,c,p){p=null!=p?p:!0;var q=document.createElement("div");q.style.textAlign="center";q.style.height="100%";mxUtils.write(q,mxResources.get("fileOpenLocation"));mxUtils.br(q);mxUtils.br(q);var u=mxUtils.button(mxResources.get("openInThisWindow"),function(){p&&b.hideDialog();null!=c&&c()});u.className="geBtn";u.style.marginBottom="8px";u.style.width="280px";q.appendChild(u);mxUtils.br(q);var z=mxUtils.button(mxResources.get("openInNewWindow"),function(){p&&b.hideDialog();
+null!=k&&k();b.openLink(f,null,!0)});z.className="geBtn gePrimaryBtn";z.style.width=u.style.width;q.appendChild(z);mxUtils.br(q);mxUtils.br(q);mxUtils.write(q,mxResources.get("allowPopups"));this.container=q},ImageDialog=function(b,f,k,c,p,q,u,z){function G(){0<d.value.length?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");"data:"!=d.value.substring(0,5)?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled")}q=null!=q?q:!0;var E=b.editor.graph,F=document.createElement("div");
+mxUtils.write(F,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor="transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var d=document.createElement("input");d.setAttribute("value",k);d.setAttribute("type","text");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.marginTop=
+"6px";d.style.width=(Graph.fileSupport?460:340)-20+"px";d.style.backgroundImage="url('"+Editor.crossImage+"')";d.style.backgroundRepeat="no-repeat";d.style.backgroundPosition="100% 50%";d.style.paddingRight="14px";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(){d.value="";d.focus()});f.appendChild(d);f.appendChild(k);F.appendChild(f);var g=z,l,n,x=function(D,S,U,R){var P="data:"==D.substring(0,5);!b.isOffline()||P&&"undefined"===typeof chrome?0<D.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(D,function(v){b.spinner.stop();b.hideDialog();var y=!1===R?1:null!=S&&null!=U?Math.max(S/v.width,U/v.height):Math.min(1,Math.min(520/v.width,520/v.height));q&&(D=b.convertDataUri(D));c(D,
+Math.round(Number(v.width)*y),Math.round(Number(v.height)*y),g,l,n)},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(D,null,null,g,l,n)):(D=b.convertDataUri(D),S=null==S?120:S,U=null==U?100:U,b.hideDialog(),c(D,S,U,g,l,n))},A=function(D,S){if(null!=D){var U=p?null:E.getModel().getGeometry(E.getSelectionCell());null!=U?x(D,U.width,U.height,S):x(D,null,null,S)}else b.hideDialog(),c(null)};this.init=function(){d.focus();
+if(Graph.fileSupport){d.setAttribute("placeholder",mxResources.get("dragImagesHere"));var D=F.parentNode,S=null;mxEvent.addListener(D,"dragleave",function(U){null!=S&&(S.parentNode.removeChild(S),S=null);U.stopPropagation();U.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(U){null==S&&(S=b.highlightElement(D));U.stopPropagation();U.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(U){null!=S&&(S.parentNode.removeChild(S),S=null);if(0<U.dataTransfer.files.length)b.importFiles(U.dataTransfer.files,
+0,0,b.maxImageSize,function(P,v,y,L,J,K,m,t){A(P,t)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var v=0;v<P.length;v++)P[v]()},!mxEvent.isControlDown(U),null,null,!0);else if(0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")){var R=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(R)&&A(decodeURIComponent(R))}U.stopPropagation();U.preventDefault()}),!1)}};z=document.createElement("div");z.style.marginTop="14px";z.style.textAlign=
+"center";k=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&z.appendChild(k);ImageDialog.filePicked=function(D){D.action==google.picker.Action.PICKED&&null!=D.docs[0].thumbnails&&(D=D.docs[0].thumbnails[D.docs[0].thumbnails.length-1],null!=D&&(d.value=D.url));d.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type",
+"file");mxEvent.addListener(B,"change",function(D){null!=B.files&&(b.importFiles(B.files,0,0,b.maxImageSize,function(S,U,R,P,v,y){A(S)},function(){},function(S){return"image/"==S.type.substring(0,6)},function(S){for(var U=0;U<S.length;U++)S[U]()},!0),B.type="",B.type="file",B.value="")});B.style.display="none";document.body.appendChild(B);b.imgDlgFileInputElt=B}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";z.appendChild(f)}mxEvent.addListener(d,
+"keypress",function(D){13==D.keyCode&&A(d.value)});var I=mxUtils.button(mxResources.get("crop"),function(){var D=new CropImageDialog(b,d.value,g,function(S,U,R){g=S;l=U;n=R});b.showDialog(D.container,300,390,!0,!0)});u&&(I.className="geBtn",z.appendChild(I));var H=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=d.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var D=b.editor.createImageUrlConverter().convert(d.value),S=new Image;S.onload=function(){b.editor.convertImageToDataUri(D,
+function(U){b.confirmImageResize(function(R){b.resizeImage(S,U,mxUtils.bind(this,function(P,v,y){b.spinner.stop();null!=P&&P.length<b.maxImageBytes?(d.value=P,G()):b.handleError({message:mxResources.get("imageTooBig")})}),R,b.maxImageSize)},S.width>b.maxImageSize||S.height>b.maxImageSize||U.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};S.onerror=function(){b.spinner.stop();b.handleError({message:mxResources.get("fileNotFound")})};
+S.src=D}});H.className="geBtn";mxEvent.addListener(d,"change",function(D){g=null;G()});G();z.appendChild(H);u=mxUtils.button(mxResources.get("apply"),function(){A(d.value)});u.className="geBtn gePrimaryBtn";z.appendChild(u);b.editor.cancelFirst||z.appendChild(k);Graph.fileSupport&&(z.style.marginTop="120px",F.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",F.style.backgroundPosition="center 65%",F.style.backgroundRepeat="no-repeat",u=document.createElement("div"),u.style.position="absolute",
+u.style.width="420px",u.style.top="58%",u.style.textAlign="center",u.style.fontSize="18px",u.style.color="#a0c3ff",mxUtils.write(u,mxResources.get("dragImagesHere")),F.appendChild(u));F.appendChild(z);this.container=F},LinkDialog=function(b,f,k,c,p,q,u){function z(D,S){var U=document.createElement("option");mxUtils.write(U,mxResources.get(D));U.value=D;I.appendChild(U);H[D]=S}var G=document.createElement("div");G.style.height="100%";mxUtils.write(G,mxResources.get("editLink")+":");var E=document.createElement("div");
E.className="geUrlLinkContainer";E.style.backgroundColor="transparent";E.style.borderColor="transparent";E.style.whiteSpace="nowrap";E.style.textOverflow="clip";E.style.cursor="default";var F=document.createElement("input");F.setAttribute("placeholder",mxResources.get("dragUrlsHere"));F.setAttribute("type","text");F.style.marginTop="6px";F.style.width="414px";F.style.boxSizing="border-box";F.style.backgroundRepeat="no-repeat";F.style.backgroundPosition="100% 50%";F.style.paddingRight="16px";F.style.marginBottom=
-"4px";var d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.backgroundImage="url("+Editor.crossImage+")";d.className="geAdaptiveAsset";d.style.display="inline-block";d.style.position="relative";d.style.top="3px";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";mxEvent.addListener(d,"click",function(){F.value="";F.focus()});var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value",
-"url");k.setAttribute("type","radio");k.setAttribute("name","geLinkDialogOption");var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","geLinkDialogOption");var n=document.createElement("select");n.style.width="414px";var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.margin="0 6p 0 6px";null!=u&&(x.setAttribute("checked","checked"),x.defaultChecked=
-!0);u=null!=u?u:"_blank";x.setAttribute("title",u);q&&(F.style.width="200px");if(p&&null!=b.pages){null!=f&&Graph.isPageLink(f)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(F.setAttribute("value",f),k.setAttribute("checked","checked"),k.defaultChecked=!0);E.appendChild(k);E.appendChild(F);E.appendChild(d);q&&(E.appendChild(x),mxUtils.write(E,mxResources.get("openInNewWindow")));mxUtils.br(E);E.appendChild(l);p=!1;for(q=0;q<b.pages.length;q++)d=document.createElement("option"),mxUtils.write(d,
+"4px";var d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.backgroundImage="url("+Editor.crossImage+")";d.className="geAdaptiveAsset";d.style.display="inline-block";d.style.position="relative";d.style.top="3px";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";mxEvent.addListener(d,"click",function(){F.value="";F.focus()});var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value",
+"url");g.setAttribute("type","radio");g.setAttribute("name","geLinkDialogOption");var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","geLinkDialogOption");var n=document.createElement("select");n.style.width="414px";var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.margin="0 6p 0 6px";null!=u&&(x.setAttribute("checked","checked"),x.defaultChecked=
+!0);u=null!=u?u:"_blank";x.setAttribute("title",u);q&&(F.style.width="200px");if(p&&null!=b.pages){null!=f&&Graph.isPageLink(f)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(F.setAttribute("value",f),g.setAttribute("checked","checked"),g.defaultChecked=!0);E.appendChild(g);E.appendChild(F);E.appendChild(d);q&&(E.appendChild(x),mxUtils.write(E,mxResources.get("openInNewWindow")));mxUtils.br(E);E.appendChild(l);p=!1;for(q=0;q<b.pages.length;q++)d=document.createElement("option"),mxUtils.write(d,
b.pages[q].getName()||mxResources.get("pageWithNumber",[q+1])),d.setAttribute("value","data:page/id,"+b.pages[q].getId()),f==d.getAttribute("value")&&(d.setAttribute("selected","selected"),p=!0),n.appendChild(d);if(!p&&l.checked){var A=document.createElement("option");mxUtils.write(A,mxResources.get("pageNotFound"));A.setAttribute("disabled","disabled");A.setAttribute("selected","selected");A.setAttribute("value","pageNotFound");n.appendChild(A);mxEvent.addListener(n,"change",function(){null==A.parentNode||
-A.selected||A.parentNode.removeChild(A)})}E.appendChild(n)}else F.setAttribute("value",f),E.appendChild(F),E.appendChild(d);H.appendChild(E);var B=mxUtils.button(g,function(){b.hideDialog();c(l.checked?"pageNotFound"!==n.value?n.value:f:F.value,LinkDialog.selectedDocs,x.checked?u:null)});B.style.verticalAlign="middle";B.className="geBtn gePrimaryBtn";this.init=function(){l.checked?n.focus():(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",
-!1,null));mxEvent.addListener(n,"focus",function(){k.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(F,"focus",function(){l.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});if(Graph.fileSupport){var C=H.parentNode,R=null;mxEvent.addListener(C,"dragleave",function(T){null!=R&&(R.parentNode.removeChild(R),R=null);T.stopPropagation();T.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(T){null==
-R&&(R=b.highlightElement(C));T.stopPropagation();T.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(T){try{null!=R&&(R.parentNode.removeChild(R),R=null),0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")&&(F.value=decodeURIComponent(T.dataTransfer.getData("text/uri-list")),k.setAttribute("checked","checked"),k.checked=!0,B.click())}catch(S){b.handleError(S)}T.stopPropagation();T.preventDefault()}),!1)}};g=document.createElement("div");g.style.marginTop="16px";g.style.textAlign=
-"right";b.isOffline()||g.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));E=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});E.style.verticalAlign="middle";E.className="geBtn";b.editor.cancelFirst&&g.appendChild(E);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(C){if(C.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=C.docs;var R=C.docs[0].url;"application/mxe"==C.docs[0].mimeType||null!=C.docs[0].mimeType&&"application/vnd.jgraph."==
-C.docs[0].mimeType.substring(0,23)?R="https://app.diagrams.net/#G"+C.docs[0].id:"application/vnd.google-apps.folder"==C.docs[0].mimeType&&(R="https://drive.google.com/#folders/"+C.docs[0].id);F.value=R;F.focus()}else LinkDialog.selectedDocs=null;F.focus()};var I=document.createElement("select");I.className="geBtn";I.style.position="relative";I.style.top="1px";I.style.maxWidth="120px";var G={};p=document.createElement("option");mxUtils.write(p,mxResources.get("select")+"...");p.value="";I.appendChild(p);
-"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&y("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var C=b.drive.createLinkPicker();b.linkPicker=C.setCallback(function(R){LinkDialog.filePicked(R)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&y("dropbox",function(){Dropbox.choose({linkType:"direct",
-cancel:function(){},success:function(C){F.value=C[0].link;F.focus()}})});null!=b.oneDrive&&y("oneDrive",function(){b.oneDrive.pickFile(function(C,R){null!=R&&null!=R.value&&0<R.value.length&&(F.value=R.value[0].webUrl,F.focus())},!0)});null!=b.gitHub&&y("github",function(){b.gitHub.pickFile(function(C){if(null!=C){C=C.split("/");var R=C[0],T=C[1],S=C[2];C=C.slice(3,C.length).join("/");F.value="https://github.com/"+R+"/"+T+"/blob/"+S+"/"+C;F.focus()}})});null!=b.gitLab&&y("gitlab",function(){b.gitLab.pickFile(function(C){if(null!=
-C){C=C.split("/");var R=C[0],T=C[1],S=C[2];C=C.slice(3,C.length).join("/");F.value=DRAWIO_GITLAB_URL+"/"+R+"/"+T+"/blob/"+S+"/"+C;F.focus()}})});1<I.children.length&&(g.appendChild(I),mxEvent.addListener(I,"change",function(C){null!=G[I.value]&&(G[I.value](),I.value="")}));mxEvent.addListener(F,"keypress",function(C){13==C.keyCode&&B.click()});g.appendChild(B);b.editor.cancelFirst||g.appendChild(E);H.appendChild(g);this.container=H},RevisionDialog=function(b,f,g){var c=document.createElement("div"),
+A.selected||A.parentNode.removeChild(A)})}E.appendChild(n)}else F.setAttribute("value",f),E.appendChild(F),E.appendChild(d);G.appendChild(E);var B=mxUtils.button(k,function(){b.hideDialog();c(l.checked?"pageNotFound"!==n.value?n.value:f:F.value,LinkDialog.selectedDocs,x.checked?u:null)});B.style.verticalAlign="middle";B.className="geBtn gePrimaryBtn";this.init=function(){l.checked?n.focus():(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",
+!1,null));mxEvent.addListener(n,"focus",function(){g.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(F,"focus",function(){l.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});if(Graph.fileSupport){var D=G.parentNode,S=null;mxEvent.addListener(D,"dragleave",function(U){null!=S&&(S.parentNode.removeChild(S),S=null);U.stopPropagation();U.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(U){null==
+S&&(S=b.highlightElement(D));U.stopPropagation();U.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(U){try{null!=S&&(S.parentNode.removeChild(S),S=null),0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")&&(F.value=decodeURIComponent(U.dataTransfer.getData("text/uri-list")),g.setAttribute("checked","checked"),g.checked=!0,B.click())}catch(R){b.handleError(R)}U.stopPropagation();U.preventDefault()}),!1)}};k=document.createElement("div");k.style.marginTop="16px";k.style.textAlign=
+"right";b.isOffline()||k.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));E=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});E.style.verticalAlign="middle";E.className="geBtn";b.editor.cancelFirst&&k.appendChild(E);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(D){if(D.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=D.docs;var S=D.docs[0].url;"application/mxe"==D.docs[0].mimeType||null!=D.docs[0].mimeType&&"application/vnd.jgraph."==
+D.docs[0].mimeType.substring(0,23)?S="https://app.diagrams.net/#G"+D.docs[0].id:"application/vnd.google-apps.folder"==D.docs[0].mimeType&&(S="https://drive.google.com/#folders/"+D.docs[0].id);F.value=S;F.focus()}else LinkDialog.selectedDocs=null;F.focus()};var I=document.createElement("select");I.className="geBtn";I.style.position="relative";I.style.top="1px";I.style.maxWidth="120px";var H={};p=document.createElement("option");mxUtils.write(p,mxResources.get("select")+"...");p.value="";I.appendChild(p);
+"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&z("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var D=b.drive.createLinkPicker();b.linkPicker=D.setCallback(function(S){LinkDialog.filePicked(S)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&z("dropbox",function(){Dropbox.choose({linkType:"direct",
+cancel:function(){},success:function(D){F.value=D[0].link;F.focus()}})});null!=b.oneDrive&&z("oneDrive",function(){b.oneDrive.pickFile(function(D,S){null!=S&&null!=S.value&&0<S.value.length&&(F.value=S.value[0].webUrl,F.focus())},!0)});null!=b.gitHub&&z("github",function(){b.gitHub.pickFile(function(D){if(null!=D){D=D.split("/");var S=D[0],U=D[1],R=D[2];D=D.slice(3,D.length).join("/");F.value="https://github.com/"+S+"/"+U+"/blob/"+R+"/"+D;F.focus()}})});null!=b.gitLab&&z("gitlab",function(){b.gitLab.pickFile(function(D){if(null!=
+D){D=D.split("/");var S=D[0],U=D[1],R=D[2];D=D.slice(3,D.length).join("/");F.value=DRAWIO_GITLAB_URL+"/"+S+"/"+U+"/blob/"+R+"/"+D;F.focus()}})});1<I.children.length&&(k.appendChild(I),mxEvent.addListener(I,"change",function(D){null!=H[I.value]&&(H[I.value](),I.value="")}));mxEvent.addListener(F,"keypress",function(D){13==D.keyCode&&B.click()});k.appendChild(B);b.editor.cancelFirst||k.appendChild(E);G.appendChild(k);this.container=G},RevisionDialog=function(b,f,k){var c=document.createElement("div"),
p=document.createElement("h3");p.style.marginTop="3px";mxUtils.write(p,mxResources.get("revisionHistory"));c.appendChild(p);p=document.createElement("div");p.style.position="absolute";p.style.overflow="auto";p.style.width="170px";p.style.height="378px";c.appendChild(p);var q=document.createElement("div");q.style.position="absolute";q.style.left="200px";q.style.width="470px";q.style.height="376px";q.style.overflow="hidden";q.style.borderWidth="1px";q.style.borderStyle="solid";var u=document.createElement("div");
-u.style.position="absolute";u.style.display="none";u.style.textAlign="center";u.style.padding="8px";u.style.borderRadius="8px";u.style.left="50%";u.style.top="50%";u.style.whiteSpace="nowrap";u.style.transform="translate(-50%, -50%)";u.style.background="inherit";u.style.border="1px solid";q.appendChild(u);mxEvent.disableContextMenu(q);c.appendChild(q);var y=new Graph(q);y.setTooltips(!1);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=
-null;y.maxFitScale=null;y.centerZoom=!0;var H=0,E=null,F=0,d=y.getGlobalVariable;y.getGlobalVariable=function(Y){return"page"==Y&&null!=E&&null!=E[F]?E[F].getAttribute("name"):"pagenumber"==Y?F+1:"pagecount"==Y?null!=E?E.length:1:d.apply(this,arguments)};y.getLinkForCell=function(){return null};for(var k=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",
-left:"50%"}),l=b.getCurrentFile(),n=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),x={},A=0;A<n.length;A++)x[n[A].getAttribute("id")]=n[A];var B=null,I=null,G=null,C=null,R=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=G&&y.zoomIn()},20);R.setAttribute("disabled","disabled");var T=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=G&&y.zoomOut()},20);T.setAttribute("disabled","disabled");var S=b.createToolbarButton(Editor.zoomFitImage,
-mxResources.get("fit"),function(){null!=G&&(1==y.view.scale?(y.maxFitScale=8,y.fit(8)):y.zoomActual(),y.center())},20);S.setAttribute("disabled","disabled");var Q=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"));Q.setAttribute("disabled","disabled");var v=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"));v.setAttribute("disabled","disabled");var z=q.cloneNode(!1);z.style.pointerEvent="none";q.parentNode.appendChild(z);var N=new Graph(z);N.setTooltips(!1);N.setEnabled(!1);
-N.setPanning(!0);N.panningHandler.ignoreCell=!0;N.panningHandler.useLeftButtonForPanning=!0;N.minFitScale=null;N.maxFitScale=null;N.centerZoom=!0;var J=document.createElement("div");J.style.textAlign="left";J.style.color="gray";J.style.backgroundColor="transparent";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.style.whiteSpace="nowrap";J.style.cursor="default";J.style.height="100%";J.style.display="inline-flex";J.style.alignItems="center";J.style.flexGrow="1";mxEvent.addListener(J,"click",
-function(){var Y=mxUtils.getTextContent(J);""!=Y&&b.alert(Y)});var K=null;mxEvent.addGestureListeners(Q,function(Y){try{var Z=null!=E[H]?x[E[H].getAttribute("id")]:null;mxUtils.setOpacity(Q,20);u.innerText="";if(null==Z)u.style.display="inline-block",mxUtils.write(u,mxResources.get("pageNotFound"));else{K=J.innerHTML;J.innerHTML=mxResources.get("current");q.style.display="none";z.style.display="";z.style.backgroundColor=q.style.backgroundColor;var aa=Editor.parseDiagramNode(Z);(new mxCodec(aa.ownerDocument)).decode(aa,
-N.getModel());N.view.scaleAndTranslate(y.view.scale,y.view.translate.x,y.view.translate.y);N.mathEnabled="1"==aa.getAttribute("math");N.setAdaptiveColors(aa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&N.mathEnabled&&Editor.MathJaxRender(N.container)}}catch(fa){u.style.display="inline-block",u.innerText="",mxUtils.write(u,mxResources.get("pageNotFound")+": "+fa.message)}},null,function(){mxUtils.setOpacity(Q,60);u.style.display="none";u.innerText="";"none"==q.style.display&&(q.style.display=
-"",J.innerHTML=K,z.style.display="none")});mxEvent.addListener(v,"click",mxUtils.bind(this,function(Y){if(null!=G){Y=b.getPagesForNode(G.documentElement);var Z=b.diffPages(b.pages,Y);Y=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(Z,null,2),function(aa){try{if(0<aa.length&&b.editor.graph.isEnabled()){var fa=[JSON.parse(aa)];b.confirm(mxResources.get("areYouSure"),function(){try{l.patch(fa,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(ea){b.handleError(ea)}})}else b.hideDialog()}catch(ea){b.handleError(ea)}},
-null,null,null,null,function(aa,fa){if(null!=Z[EditorUi.DIFF_UPDATE]){var ea=document.createElement("select"),ca=document.createElement("option");mxUtils.write(ca,mxResources.get("allPages"));ca.setAttribute("value","allPages");ea.appendChild(ca);for(var ha in Z[EditorUi.DIFF_UPDATE]){ca=document.createElement("option");var ka=b.getPageById(ha);null!=ka&&(mxUtils.write(ca,ka.getName()),ca.setAttribute("value","page-"+ha),ea.appendChild(ca))}ea.style.marginRight="8px";ea.style.order="-1";mxEvent.addListener(ea,
-"change",function(ba){ba=null;if("allPages"!=ea.value){var ia=ea.value.substring(5);null!=Z[EditorUi.DIFF_UPDATE][ia]&&(ba={},ba[EditorUi.DIFF_UPDATE]={},ba[EditorUi.DIFF_UPDATE][ia]=Z[EditorUi.DIFF_UPDATE][ia])}fa.value=JSON.stringify(null==ba?Z:ba,null,2)});2<ea.children.length&&aa.appendChild(ea)}},!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close"));b.showDialog(Y.container,620,460,!0,!0);Y.init()}}));var m=mxUtils.button(mxResources.get("restore"),function(Y){null!=G&&null!=C&&
-b.confirm(mxResources.get("areYouSure"),function(){null!=g?g(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&(m.setAttribute("disabled","disabled"),l.save(!0,function(Z){b.spinner.stop();m.removeAttribute("disabled");b.replaceFileData(C);b.hideDialog()},function(Z){b.spinner.stop();m.removeAttribute("disabled");b.clearStatus();b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});m.className="geBtn gePrimaryBtn";m.setAttribute("disabled","disabled");var t=document.createElement("select");
-t.setAttribute("disabled","disabled");t.style.userSelect="none";t.style.maxWidth="100px";t.style.marginLeft="10px";t.style.display="none";var D=null;mxEvent.addListener(t,"change",function(Y){null!=D&&(D(Y),mxEvent.consume(Y))});var M=mxUtils.button(mxResources.get("open"),function(){null!=G&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(G.documentElement)),b.openLink(b.getUrl(),null,!0))});M.className="geBtn";M.setAttribute("disabled","disabled");
-var L=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});L.className="geBtn";L.setAttribute("disabled","disabled");null!=g&&(M.style.display="none");n=document.createElement("div");n.style.position="absolute";n.style.top="482px";n.style.right="28px";n.style.left="32px";n.style.justifyContent="end";n.style.display="flex";var O=document.createElement("div");O.className="geToolbarContainer";O.style.backgroundColor="transparent";O.style.left="32px";O.style.right=
-"32px";O.style.border="none";O.style.top="442px";var P=null;if(null!=f&&0<f.length){q.style.cursor="move";var U=document.createElement("table");U.style.borderWidth="1px";U.style.borderStyle="solid";U.style.borderCollapse="collapse";U.style.borderSpacing="0px";U.style.width="100%";var V=document.createElement("tbody"),X=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(H=mxUtils.indexOf(b.pages,b.currentPage));for(A=f.length-1;0<=A;A--){var W=function(Y){var Z=new Date(Y.modifiedDate),
-aa=null;if(0<=Z.getTime()){var fa=function(ca){k.stop();u.innerText="";var ha=mxUtils.parseXml(ca),ka=b.editor.extractGraphModel(ha.documentElement,!0);if(null!=ka){var ba=function(pa){null!=pa&&(pa=ia(Editor.parseDiagramNode(pa)));return pa},ia=function(pa){var sa=pa.getAttribute("background");if(null==sa||""==sa||sa==mxConstants.NONE)sa=y.defaultPageBackgroundColor;q.style.backgroundColor=mxUtils.getLightDarkColor(sa);(new mxCodec(pa.ownerDocument)).decode(pa,y.getModel());y.maxFitScale=1;y.fit(8);
-y.center();y.mathEnabled="1"==pa.getAttribute("math");y.setAdaptiveColors(pa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&y.mathEnabled&&Editor.MathJaxRender(y.container);return pa};t.style.display="none";t.innerText="";G=ha;C=ca;E=parseSelectFunction=null;F=0;if("mxfile"==ka.nodeName){ha=ka.getElementsByTagName("diagram");E=[];for(ca=0;ca<ha.length;ca++)E.push(ha[ca]);F=Math.min(H,E.length-1);0<E.length&&ba(E[F]);if(1<E.length)for(t.removeAttribute("disabled"),t.style.display="",ca=0;ca<
-E.length;ca++){ha=document.createElement("option");ha.setAttribute("title",la+" ("+E[ca].getAttribute("id")+")");ha.setAttribute("value",ca);var la=E[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);ka=b.getPageById(E[ca].getAttribute("id"));var da="";if(null!=ka){var ra=new DiagramPage(E[ca]);b.getHashValueForPages([ka])!=b.getHashValueForPages([ra])&&(da=" (M)")}else da=" (X)";mxUtils.write(ha,la+da);ca==F&&ha.setAttribute("selected","selected");t.appendChild(ha)}D=function(){try{var pa=
-parseInt(t.value);F=H=pa;ba(E[pa])}catch(sa){t.value=H,b.handleError(sa)}}}else ia(ka);la=Y.lastModifyingUserName;null!=la&&20<la.length&&(la=la.substring(0,20)+"...");J.innerText="";mxUtils.write(J,(null!=la?la+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());J.setAttribute("title",aa.getAttribute("title"));R.removeAttribute("disabled");T.removeAttribute("disabled");S.removeAttribute("disabled");Q.removeAttribute("disabled");v.removeAttribute("disabled");null!=l&&l.isRestricted()||(b.editor.graph.isEnabled()&&
-m.removeAttribute("disabled"),M.removeAttribute("disabled"),L.removeAttribute("disabled"));mxUtils.setOpacity(R,60);mxUtils.setOpacity(T,60);mxUtils.setOpacity(S,60);mxUtils.setOpacity(Q,60);mxUtils.setOpacity(v,60)}else t.style.display="none",t.innerText="",J.innerText="",u.innerText="",mxUtils.write(J,mxResources.get("errorLoadingFile")),mxUtils.write(u,mxResources.get("errorLoadingFile"))};aa=document.createElement("tr");aa.style.borderBottomWidth="1px";aa.style.borderBottomStyle="solid";aa.style.fontSize=
+u.style.position="absolute";u.style.display="none";u.style.textAlign="center";u.style.padding="8px";u.style.borderRadius="8px";u.style.left="50%";u.style.top="50%";u.style.whiteSpace="nowrap";u.style.transform="translate(-50%, -50%)";u.style.background="inherit";u.style.border="1px solid";q.appendChild(u);mxEvent.disableContextMenu(q);c.appendChild(q);var z=new Graph(q);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 G=0,E=null,F=0,d=z.getGlobalVariable;z.getGlobalVariable=function(Y){return"page"==Y&&null!=E&&null!=E[F]?E[F].getAttribute("name"):"pagenumber"==Y?F+1:"pagecount"==Y?null!=E?E.length:1:d.apply(this,arguments)};z.getLinkForCell=function(){return null};for(var g=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",
+left:"50%"}),l=b.getCurrentFile(),n=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),x={},A=0;A<n.length;A++)x[n[A].getAttribute("id")]=n[A];var B=null,I=null,H=null,D=null,S=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=H&&z.zoomIn()},20);S.setAttribute("disabled","disabled");var U=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=H&&z.zoomOut()},20);U.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomFitImage,
+mxResources.get("fit"),function(){null!=H&&(1==z.view.scale?(z.maxFitScale=8,z.fit(8)):z.zoomActual(),z.center())},20);R.setAttribute("disabled","disabled");var P=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"));P.setAttribute("disabled","disabled");var v=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"));v.setAttribute("disabled","disabled");var y=q.cloneNode(!1);y.style.pointerEvent="none";q.parentNode.appendChild(y);var L=new Graph(y);L.setTooltips(!1);L.setEnabled(!1);
+L.setPanning(!0);L.panningHandler.ignoreCell=!0;L.panningHandler.useLeftButtonForPanning=!0;L.minFitScale=null;L.maxFitScale=null;L.centerZoom=!0;var J=document.createElement("div");J.style.textAlign="left";J.style.color="gray";J.style.backgroundColor="transparent";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.style.whiteSpace="nowrap";J.style.cursor="default";J.style.height="100%";J.style.display="inline-flex";J.style.alignItems="center";J.style.flexGrow="1";mxEvent.addListener(J,"click",
+function(){var Y=mxUtils.getTextContent(J);""!=Y&&b.alert(Y)});var K=null;mxEvent.addGestureListeners(P,function(Y){try{var Z=null!=E[G]?x[E[G].getAttribute("id")]:null;mxUtils.setOpacity(P,20);u.innerText="";if(null==Z)u.style.display="inline-block",mxUtils.write(u,mxResources.get("pageNotFound"));else{K=J.innerHTML;J.innerHTML=mxResources.get("current");q.style.display="none";y.style.display="";y.style.backgroundColor=q.style.backgroundColor;var aa=Editor.parseDiagramNode(Z);(new mxCodec(aa.ownerDocument)).decode(aa,
+L.getModel());L.view.scaleAndTranslate(z.view.scale,z.view.translate.x,z.view.translate.y);L.mathEnabled="1"==aa.getAttribute("math");L.setAdaptiveColors(aa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&L.mathEnabled&&Editor.MathJaxRender(L.container)}}catch(ja){u.style.display="inline-block",u.innerText="",mxUtils.write(u,mxResources.get("pageNotFound")+": "+ja.message)}},null,function(){mxUtils.setOpacity(P,60);u.style.display="none";u.innerText="";"none"==q.style.display&&(q.style.display=
+"",J.innerHTML=K,y.style.display="none")});mxEvent.addListener(v,"click",mxUtils.bind(this,function(Y){if(null!=H){Y=b.getPagesForNode(H.documentElement);var Z=b.diffPages(b.pages,Y);Y=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(Z,null,2),function(aa){try{if(0<aa.length&&b.editor.graph.isEnabled()){var ja=[JSON.parse(aa)];b.confirm(mxResources.get("areYouSure"),function(){try{l.patch(ja,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(ea){b.handleError(ea)}})}else b.hideDialog()}catch(ea){b.handleError(ea)}},
+null,null,null,null,function(aa,ja){if(null!=Z[EditorUi.DIFF_UPDATE]){var ea=document.createElement("select"),ca=document.createElement("option");mxUtils.write(ca,mxResources.get("allPages"));ca.setAttribute("value","allPages");ea.appendChild(ca);for(var ka in Z[EditorUi.DIFF_UPDATE]){ca=document.createElement("option");var la=b.getPageById(ka);null!=la&&(mxUtils.write(ca,la.getName()),ca.setAttribute("value","page-"+ka),ea.appendChild(ca))}ea.style.marginRight="8px";ea.style.order="-1";mxEvent.addListener(ea,
+"change",function(ba){ba=null;if("allPages"!=ea.value){var ia=ea.value.substring(5);null!=Z[EditorUi.DIFF_UPDATE][ia]&&(ba={},ba[EditorUi.DIFF_UPDATE]={},ba[EditorUi.DIFF_UPDATE][ia]=Z[EditorUi.DIFF_UPDATE][ia])}ja.value=JSON.stringify(null==ba?Z:ba,null,2)});2<ea.children.length&&aa.appendChild(ea)}},!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close"));b.showDialog(Y.container,620,460,!0,!0);Y.init()}}));var m=mxUtils.button(mxResources.get("restore"),function(Y){null!=H&&null!=D&&
+b.confirm(mxResources.get("areYouSure"),function(){null!=k?k(D):b.spinner.spin(document.body,mxResources.get("restoring"))&&(m.setAttribute("disabled","disabled"),l.save(!0,function(Z){b.spinner.stop();m.removeAttribute("disabled");b.replaceFileData(D);b.hideDialog()},function(Z){b.spinner.stop();m.removeAttribute("disabled");b.clearStatus();b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});m.className="geBtn gePrimaryBtn";m.setAttribute("disabled","disabled");var t=document.createElement("select");
+t.setAttribute("disabled","disabled");t.style.userSelect="none";t.style.maxWidth="100px";t.style.marginLeft="10px";t.style.display="none";var C=null;mxEvent.addListener(t,"change",function(Y){null!=C&&(C(Y),mxEvent.consume(Y))});var N=mxUtils.button(mxResources.get("open"),function(){null!=H&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(H.documentElement)),b.openLink(b.getUrl(),null,!0))});N.className="geBtn";N.setAttribute("disabled","disabled");
+var M=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});M.className="geBtn";M.setAttribute("disabled","disabled");null!=k&&(N.style.display="none");n=document.createElement("div");n.style.position="absolute";n.style.top="482px";n.style.right="28px";n.style.left="32px";n.style.justifyContent="end";n.style.display="flex";var O=document.createElement("div");O.className="geToolbarContainer";O.style.backgroundColor="transparent";O.style.left="32px";O.style.right=
+"32px";O.style.border="none";O.style.top="442px";var Q=null;if(null!=f&&0<f.length){q.style.cursor="move";var T=document.createElement("table");T.style.borderWidth="1px";T.style.borderStyle="solid";T.style.borderCollapse="collapse";T.style.borderSpacing="0px";T.style.width="100%";var V=document.createElement("tbody"),X=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(G=mxUtils.indexOf(b.pages,b.currentPage));for(A=f.length-1;0<=A;A--){var W=function(Y){var Z=new Date(Y.modifiedDate),
+aa=null;if(0<=Z.getTime()){var ja=function(ca){g.stop();u.innerText="";var ka=mxUtils.parseXml(ca),la=b.editor.extractGraphModel(ka.documentElement,!0);if(null!=la){var ba=function(pa){null!=pa&&(pa=ia(Editor.parseDiagramNode(pa)));return pa},ia=function(pa){var qa=pa.getAttribute("background");if(null==qa||""==qa||qa==mxConstants.NONE)qa=z.defaultPageBackgroundColor;q.style.backgroundColor=mxUtils.getLightDarkColor(qa);(new mxCodec(pa.ownerDocument)).decode(pa,z.getModel());z.maxFitScale=1;z.fit(8);
+z.center();z.mathEnabled="1"==pa.getAttribute("math");z.setAdaptiveColors(pa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&z.mathEnabled&&Editor.MathJaxRender(z.container);return pa};t.style.display="none";t.innerText="";H=ka;D=ca;E=parseSelectFunction=null;F=0;if("mxfile"==la.nodeName){ka=la.getElementsByTagName("diagram");E=[];for(ca=0;ca<ka.length;ca++)E.push(ka[ca]);F=Math.min(G,E.length-1);0<E.length&&ba(E[F]);if(1<E.length)for(t.removeAttribute("disabled"),t.style.display="",ca=0;ca<
+E.length;ca++){ka=document.createElement("option");ka.setAttribute("title",fa+" ("+E[ca].getAttribute("id")+")");ka.setAttribute("value",ca);var fa=E[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);la=b.getPageById(E[ca].getAttribute("id"));var da="";if(null!=la){var ra=new DiagramPage(E[ca]);b.getHashValueForPages([la])!=b.getHashValueForPages([ra])&&(da=" (M)")}else da=" (X)";mxUtils.write(ka,fa+da);ca==F&&ka.setAttribute("selected","selected");t.appendChild(ka)}C=function(){try{var pa=
+parseInt(t.value);F=G=pa;ba(E[pa])}catch(qa){t.value=G,b.handleError(qa)}}}else ia(la);fa=Y.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");J.innerText="";mxUtils.write(J,(null!=fa?fa+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());J.setAttribute("title",aa.getAttribute("title"));S.removeAttribute("disabled");U.removeAttribute("disabled");R.removeAttribute("disabled");P.removeAttribute("disabled");v.removeAttribute("disabled");null!=l&&l.isRestricted()||(b.editor.graph.isEnabled()&&
+m.removeAttribute("disabled"),N.removeAttribute("disabled"),M.removeAttribute("disabled"));mxUtils.setOpacity(S,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(P,60);mxUtils.setOpacity(v,60)}else t.style.display="none",t.innerText="",J.innerText="",u.innerText="",mxUtils.write(J,mxResources.get("errorLoadingFile")),mxUtils.write(u,mxResources.get("errorLoadingFile"))};aa=document.createElement("tr");aa.style.borderBottomWidth="1px";aa.style.borderBottomStyle="solid";aa.style.fontSize=
"12px";aa.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding="6px";ea.style.whiteSpace="nowrap";Y==f[f.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===X?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());aa.appendChild(ea);aa.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=Y.fileSize?" "+b.formatFileSize(parseInt(Y.fileSize)):"")+(null!=Y.lastModifyingUserName?
-" "+Y.lastModifyingUserName:""));mxEvent.addListener(aa,"click",function(ca){I!=Y&&(k.stop(),null!=B&&(B.style.backgroundColor=""),I=Y,B=aa,B.style.backgroundColor="light-dark(#ebf2f9, #000000)",C=G=null,J.removeAttribute("title"),J.innerText=mxResources.get("loading")+"...",q.style.backgroundColor=y.defaultPageBackgroundColor,u.innerText="",y.getModel().clear(),m.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"),S.setAttribute("disabled",
-"disabled"),Q.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),mxUtils.setOpacity(R,20),mxUtils.setOpacity(T,20),mxUtils.setOpacity(S,20),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(v,20),k.spin(q),Y.getXml(function(ha){if(I==Y)try{fa(ha)}catch(ka){J.innerText=mxResources.get("error")+": "+ka.message}},function(ha){k.stop();t.style.display="none";t.innerText="";J.innerText="";mxUtils.write(J,mxResources.get("errorLoadingFile"));
-mxUtils.write(u,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(aa,"dblclick",function(ca){M.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);V.appendChild(aa)}return aa}(f[A]);null!=W&&A==f.length-1&&(P=W)}U.appendChild(V);p.appendChild(U)}else null==l||null==b.drive&&l.constructor==window.DriveFile||null==b.dropbox&&l.constructor==window.DropboxFile?(q.style.display="none",
-O.style.display="none",mxUtils.write(p,mxResources.get("notAvailable"))):(q.style.display="none",O.style.display="none",mxUtils.write(p,mxResources.get("noRevisions")));this.init=function(){null!=P&&P.click()};p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";O.appendChild(J);O.appendChild(Q);O.appendChild(T);O.appendChild(S);O.appendChild(R);O.appendChild(t);O.appendChild(v);b.editor.cancelFirst&&n.appendChild(p);n.appendChild(M);null!=l&&l.constructor==DriveFile&&
-n.appendChild(L);n.appendChild(m);b.editor.cancelFirst||n.appendChild(p);c.appendChild(n);c.appendChild(O);this.container=c},DraftDialog=function(b,f,g,c,p,q,u,y,H){var E=document.createElement("div"),F=document.createElement("div");F.style.marginTop="0px";F.style.whiteSpace="nowrap";F.style.overflow="auto";F.style.lineHeight="normal";mxUtils.write(F,f);E.appendChild(F);var d=document.createElement("select"),k=mxUtils.bind(this,function(){"-1"==d.value?(d.value=d.options[0].value,k(),b.confirm(mxResources.get("areYouSure"),
-null,mxUtils.bind(this,function(){var Q=this,v;return $jscomp.asyncExecutePromiseGeneratorProgram(function(z){for(v=0;v<H.length;v++)p.apply(Q,[v,mxUtils.bind(Q,function(){})]);b.hideDialog(!0);z.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(I=mxUtils.parseXml(H[d.value].data),G=b.editor.extractGraphModel(I.documentElement,!0),C=0,this.init())});if(null!=H){d.style.marginLeft="4px";for(f=0;f<H.length;f++){var l=document.createElement("option");l.setAttribute("value",f);var n=new Date(H[f].created),
-x=new Date(H[f].modified);mxUtils.write(l,n.toLocaleDateString()+" "+n.toLocaleTimeString()+" - "+(n.toDateString(),x.toDateString(),x.toLocaleDateString())+" "+x.toLocaleTimeString());d.appendChild(l)}l=document.createElement("option");l.setAttribute("value","-1");mxUtils.write(l,mxResources.get("deleteAll"));d.appendChild(l);F.appendChild(d);mxEvent.addListener(d,"change",k)}null==g&&(g=H[0].data);var A=document.createElement("div");A.style.position="absolute";A.style.border="1px solid lightGray";
-A.style.marginTop="10px";A.style.left="40px";A.style.right="40px";A.style.top="46px";A.style.bottom="74px";A.style.overflow="hidden";mxEvent.disableContextMenu(A);E.appendChild(A);var B=new Graph(A);B.setEnabled(!1);B.setPanning(!0);B.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";B.panningHandler.ignoreCell=!0;B.panningHandler.useLeftButtonForPanning=!0;B.minFitScale=null;B.maxFitScale=null;B.centerZoom=!0;var I=mxUtils.parseXml(g),G=b.editor.extractGraphModel(I.documentElement,!0),C=0,R=null,
-T=B.getGlobalVariable;B.getGlobalVariable=function(Q){return"page"==Q&&null!=R&&null!=R[C]?R[C].getAttribute("name"):"pagenumber"==Q?C+1:"pagecount"==Q?null!=R?R.length:1:T.apply(this,arguments)};B.getLinkForCell=function(){return null};g=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){B.zoomIn()},20);F=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){B.zoomOut()},20);f=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==
-B.view.scale?(B.maxFitScale=8,B.fit(8)):B.zoomActual();B.center()},20);u=mxUtils.button(u||mxResources.get("discard"),function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var Q=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(v){p.apply(Q,[d.value,mxUtils.bind(Q,function(){null!=d.parentNode&&(d.options[d.selectedIndex].parentNode.removeChild(d.options[d.selectedIndex]),1<d.options.length?(d.value=d.options[0].value,k()):b.hideDialog(!0))})]);v.jumpToEnd()})}),
-mxResources.get("no"),mxResources.get("yes"))});u.className="geBtn";var S=document.createElement("select");S.style.maxWidth="80px";S.style.position="relative";S.style.top="-2px";S.style.verticalAlign="bottom";S.style.marginRight="6px";S.style.display="none";q=mxUtils.button(q||mxResources.get("edit"),function(){c.apply(this,[d.value])});q.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.position="absolute";l.style.bottom="30px";l.style.right="40px";l.style.textAlign="right";
-n=document.createElement("div");n.className="geToolbarContainer";n.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function Q(J){if(null!=J){var K=J.getAttribute("background");if(null==K||""==K||K==mxConstants.NONE)K="light-dark(#ffffff, transparent)";A.style.backgroundColor=K;(new mxCodec(J.ownerDocument)).decode(J,B.getModel());B.maxFitScale=1;B.fit(8);B.center()}return J}function v(J){null!=J&&(J=
-Q(Editor.parseDiagramNode(J)));return J}mxEvent.addListener(S,"change",function(J){C=parseInt(S.value);v(R[C]);mxEvent.consume(J)});if("mxfile"==G.nodeName){var z=G.getElementsByTagName("diagram");R=[];for(var N=0;N<z.length;N++)R.push(z[N]);0<R.length&&v(R[C]);S.innerText="";if(1<R.length)for(S.style.display="",N=0;N<R.length;N++)z=document.createElement("option"),mxUtils.write(z,R[N].getAttribute("name")||mxResources.get("pageWithNumber",[N+1])),z.setAttribute("value",N),N==C&&z.setAttribute("selected",
-"selected"),S.appendChild(z);else S.style.display="none"}else Q(G)};n.appendChild(S);n.appendChild(g);n.appendChild(F);n.appendChild(f);g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});g.className="geBtn";y=null!=y?mxUtils.button(mxResources.get("ignore"),y):null;null!=y&&(y.className="geBtn");b.editor.cancelFirst?(l.appendChild(g),null!=y&&l.appendChild(y),l.appendChild(u),l.appendChild(q)):(l.appendChild(q),l.appendChild(u),null!=y&&l.appendChild(y),l.appendChild(g));E.appendChild(l);
-E.appendChild(n);this.container=E},FindWindow=function(b,f,g,c,p,q){function u(D,M,L){if("object"===typeof M.value&&null!=M.value.attributes){M=M.value.attributes;for(var O=0;O<M.length;O++)if("label"!=M[O].nodeName){var P=mxUtils.trim(M[O].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==D&&0<=P.indexOf(L)||null!=D&&D.test(P))return!0}}return!1}function y(){l?(K.removeAttribute("disabled"),m.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),m.setAttribute("disabled",
-"disabled"));C.value?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}function H(D,M,L){N.innerText="";var O=F.model.getDescendants(F.model.getRoot()),P=C.value.toLowerCase(),U=T.checked?new RegExp(P):null,V=null;x=null;d!=P&&(d=P,k=null,n=!1);var X=null==k;if(0<P.length){if(n){n=!1;for(var W,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){W=Y;break}D=(W+1)%b.pages.length;k=null;do n=!1,O=b.pages[D],F=b.createTemporaryGraph(F.getStylesheet()),b.updatePageRoot(O),F.model.setRoot(O.root),
-D=(D+1)%b.pages.length;while(!H(!0,M,L)&&D!=W);k&&(k=null,L?b.editor.graph.model.execute(new SelectPage(b,O)):b.selectPage(O));n=!1;F=b.editor.graph;return H(!0,M,L)}for(Y=0;Y<O.length;Y++){W=F.view.getState(O[Y]);M&&(X=X||W==k);if(null!=W&&null!=W.cell.value&&(X||null==V)&&(F.model.isVertex(W.cell)||F.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(Q.innerHTML=F.sanitizeHtml(F.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([Q])):label=F.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g,
-" ")).toLowerCase();var Z=0;M&&q&&W==k&&(label=label.substr(A),Z=A);var aa=null==R||""==R.value;if(null==U&&(0<=label.indexOf(P)||aa&&u(U,W.cell,P))||null!=U&&(U.test(label)||aa&&u(U,W.cell,P)))if(q&&(null!=U?(aa=label.match(U),null!=aa&&0<aa.length&&(x=aa[0].toLowerCase(),A=Z+aa.index+x.length)):(x=P,A=Z+label.indexOf(P)+x.length)),X){V=W;break}else null==V&&(V=W)}X=X||W==k}}if(null!=V){if(Y==O.length&&S.checked)return k=null,n=!0,H(!0,M,L);k=V;F.scrollCellToVisible(k.cell);F.isEnabled()&&!F.isCellLocked(k.cell)?
-L||F.getSelectionCell()==k.cell&&1==F.getSelectionCount()||F.setSelectionCell(k.cell):F.highlightCell(k.cell)}else{if(!D&&S.checked)return n=!0,H(!0,M,L);F.isEnabled()&&!L&&F.clearSelection()}l=null!=V;q&&!D&&y();return 0==P.length||null!=V}var E=b.actions.get("findReplace"),F=b.editor.graph,d=null,k=null,l=!1,n=!1,x=null,A=0,B=1,I=document.createElement("div");I.style.userSelect="none";I.style.overflow="hidden";I.style.padding="10px";I.style.height="100%";var G=q?"260px":"200px",C=document.createElement("input");
-C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=G;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";I.appendChild(C);mxUtils.br(I);if(q){var R=document.createElement("input");R.setAttribute("placeholder",mxResources.get("replaceWith"));R.setAttribute("type","text");R.style.marginTop="4px";R.style.marginBottom="6px";R.style.width=G;R.style.fontSize="12px";R.style.borderRadius=
-"4px";R.style.padding="6px";I.appendChild(R);mxUtils.br(I);mxEvent.addListener(R,"input",y)}var T=document.createElement("input");T.setAttribute("id","geFindWinRegExChck");T.setAttribute("type","checkbox");T.style.marginRight="4px";I.appendChild(T);G=document.createElement("label");G.setAttribute("for","geFindWinRegExChck");I.appendChild(G);mxUtils.write(G,mxResources.get("regularExpression"));I.appendChild(G);G=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");G.style.position=
-"relative";G.style.marginLeft="6px";I.appendChild(G);mxUtils.br(I);var S=document.createElement("input");S.setAttribute("id","geFindWinAllPagesChck");S.setAttribute("type","checkbox");S.style.marginRight="4px";I.appendChild(S);G=document.createElement("label");G.setAttribute("for","geFindWinAllPagesChck");I.appendChild(G);mxUtils.write(G,mxResources.get("allPages"));I.appendChild(G);var Q=document.createElement("div");mxUtils.br(I);G=document.createElement("div");G.style.left="0px";G.style.right=
-"0px";G.style.marginTop="6px";G.style.padding="0 6px 0 6px";I.appendChild(G);var v=mxUtils.button(mxResources.get("reset"),function(){N.innerText="";C.value="";C.style.backgroundColor="";q&&(R.value="",y());d=k=null;n=!1;C.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.float="none";v.style.width="120px";v.style.marginTop="6px";v.style.marginLeft="8px";v.style.overflow="hidden";v.style.textOverflow="ellipsis";v.className="geBtn";q||G.appendChild(v);var z=mxUtils.button(mxResources.get("find"),
-function(){try{C.style.backgroundColor=H()?"":"light-dark(#ffcfcf, #ff0000)"}catch(D){b.handleError(D)}});z.setAttribute("title",mxResources.get("find")+" (Enter)");z.style.float="none";z.style.width="120px";z.style.marginTop="6px";z.style.marginLeft="8px";z.style.overflow="hidden";z.style.textOverflow="ellipsis";z.className="geBtn gePrimaryBtn";G.appendChild(z);var N=document.createElement("div");N.style.marginTop="10px";if(q){var J=function(D,M,L,O,P){if(null==P||"1"!=P.html)return O=D.toLowerCase().indexOf(M,
-O),0>O?D:D.substr(0,O)+L+D.substr(O+M.length);var U=D;M=mxUtils.htmlEntities(M,!1,!1,!1);P=[];var V=-1;for(D=D.replace(/<br>/ig,"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(V=D.indexOf("<",V+1));)P.push(V);V=D.match(/<[^>]*>/g);D=D.replace(/<[^>]*>/g,"");O=D.toLowerCase().indexOf(M,O);if(0>O)return U;U=O+M.length;L=mxUtils.htmlEntities(L);D=D.substr(0,O)+L+D.substr(U);for(var X=0,W=0;W<P.length;W++){if(P[W]-X<O)D=D.substr(0,P[W])+V[W]+D.substr(P[W]);
-else{var Y=P[W]-X<U?O+X:P[W]+(L.length-M.length);D=D.substr(0,Y)+V[W]+D.substr(Y)}X+=V[W].length}return D.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")};G.style.textAlign="center";var K=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=x&&null!=k){var D=k.cell,M=F.getLabel(D);F.isCellEditable(D)&&F.model.setValue(D,J(M,x,R.value,A-x.length,F.getCurrentCellStyle(D)));C.style.backgroundColor=H(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(L){b.handleError(L)}});
-K.setAttribute("title",mxResources.get("replFind"));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";K.setAttribute("disabled","disabled");G.appendChild(K);mxUtils.br(G);var m=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=x&&null!=k){var D=k.cell,M=F.getLabel(D);F.model.setValue(D,J(M,x,R.value,A-x.length,F.getCurrentCellStyle(D)));K.setAttribute("disabled",
-"disabled");m.setAttribute("disabled","disabled")}}catch(L){b.handleError(L)}});m.setAttribute("title",mxResources.get("replace"));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 gePrimaryBtn";m.setAttribute("disabled","disabled");G.appendChild(m);var t=mxUtils.button(mxResources.get("replaceAll"),function(){N.innerText="";d=null;var D=b.currentPage,M=b.editor.graph.getSelectionCells();
-b.editor.graph.rendering=!1;F.getModel().beginUpdate();try{for(var L=0,O={};H(!1,!0,!0)&&100>L;){var P=k.cell,U=F.getLabel(P),V=O[P.id];if(V&&V.replAllMrk==B&&V.replAllPos>=A)break;O[P.id]={replAllMrk:B,replAllPos:A};F.isCellEditable(P)&&(F.model.setValue(P,J(U,x,R.value,A-x.length,F.getCurrentCellStyle(P))),L++)}D!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,D));mxUtils.write(N,mxResources.get("matchesRepl",[L]))}catch(X){b.handleError(X)}finally{F.getModel().endUpdate(),b.editor.graph.setSelectionCells(M),
-b.editor.graph.rendering=!0}B++});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");G.appendChild(t);mxUtils.br(G);G.appendChild(v);v=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));v.setAttribute("title",mxResources.get("close"));
-v.style.float="none";v.style.width="120px";v.style.marginTop="6px";v.style.marginLeft="8px";v.style.overflow="hidden";v.style.textOverflow="ellipsis";v.className="geBtn";G.appendChild(v);mxUtils.br(G);G.appendChild(N)}else G.style.display="flex",G.style.alignItems="center",v.style.width="",z.style.width="";mxEvent.addListener(C,"keyup",function(D){if(91==D.keyCode||93==D.keyCode||17==D.keyCode)mxEvent.consume(D);else if(27==D.keyCode)E.funct();else if(d!=C.value.toLowerCase()||13==D.keyCode)try{C.style.backgroundColor=
-H()?"":"light-dark(#ffcfcf, #ff0000)"}catch(M){C.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(I,"keydown",function(D){70==D.keyCode&&b.keyHandler.isControlDown(D)&&!mxEvent.isShiftDown(D)&&(E.funct(),mxEvent.consume(D))});this.window=new mxWindow(mxResources.get("find")+(q?"/"+mxResources.get("replace"):""),I,f,g,c,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",
-mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?S.removeAttribute("disabled"):(S.checked=!1,S.setAttribute("disabled","disabled"))):F.container.focus()}));b.installResizeHandler(this,!1);this.doSearch=function(D){C.focus();C.value=D;z.click()}},FreehandWindow=function(b,f,g,c,p,q){var u=b.editor.graph,y=document.createElement("div");y.style.textAlign=
-"center";y.style.userSelect="none";y.style.overflow="hidden";y.style.height="100%";if(q){var H=function(){var l=u.freehand.getStrokeColor(!0);null!=l&&l!=mxConstants.NONE&&1<l.length&&"string"===typeof l&&("default"==l?l=mxResources.get("useBlackAndWhite"):(l="#"==l.charAt(0)?l.substring(1).toUpperCase():l,l=ColorDialog.prototype.colorNames[l]),null!=l&&F.setAttribute("title",l))},E=document.createElement("input");E.setAttribute("id","geFreehandBrush");E.setAttribute("type","checkbox");E.checked=
-u.freehand.isPerfectFreehandMode();E.style.margin="10px 5px 0px 10px";E.style.float="left";y.appendChild(E);u.freehand.setPerfectFreehandMode(E.checked);q=document.createElement("label");q.setAttribute("for","geFreehandBrush");q.style.float="left";q.style.marginTop="10px";y.appendChild(q);mxUtils.write(q,mxResources.get("brush"));y.appendChild(q);var F=document.createElement("tempDiv");F.style.display="block";F.style.width="100%";F.style.height="100%";F.style.borderRadius="2px";F.style.boxSizing=
-"border-box";F.style.border="1px solid black";F.style.backgroundColor=u.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){F.style.backgroundColor=u.freehand.getStrokeColor()});H();q=mxUtils.button("",mxUtils.bind(this,function(l){b.pickColor(u.freehand.getStrokeColor(!0),function(n){u.freehand.setStrokeColor(n);F.style.backgroundColor=u.freehand.getStrokeColor();H()},"default");mxEvent.consume(l)}));q.style.position="absolute";q.style.boxSizing="border-box";q.style.padding="2px";
-q.style.top="8px";q.style.right="8px";q.style.width="28px";q.style.height="18px";q.className="geColorBtn";q.innerText="";q.appendChild(F);y.appendChild(q);q=document.createElement("img");q.setAttribute("title",mxResources.get("settings"));q.setAttribute("src",Editor.gearImage);q.className="geButton";q.style.position="absolute";q.style.boxSizing="border-box";q.style.padding="2px";q.style.top="8px";q.style.right="38px";q.style.width="18px";q.style.height="18px";q.style.opacity="0.6";y.appendChild(q);
-mxEvent.addListener(q,"click",mxUtils.bind(this,function(l){l=u.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",l,function(n){!isNaN(n)&&0<n&&20>=n&&u.freehand.setSmoothing(parseInt(n))})}));mxUtils.br(y);var d=document.createElement("input");d.setAttribute("type","range");d.setAttribute("min","2");d.setAttribute("max","30");d.setAttribute("value",u.freehand.getBrushSize());d.style.width="90%";d.style.visibility="hidden";y.appendChild(d);mxUtils.br(y);q=function(){u.freehand.setPerfectFreehandMode(E.checked);
-d.style.visibility=E.checked?"visible":"hidden"};mxEvent.addListener(E,"change",q);q();mxEvent.addListener(d,"change",function(){u.freehand.setBrushSize(parseInt(this.value))})}var k=mxUtils.button(mxResources.get("startDrawing"),function(){u.freehand.isDrawing()?u.freehand.stopDrawing():u.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing")+" (X)");k.style.width="90%";k.style.marginLeft="0px";k.style.position="relative";k.className="geBtn gePrimaryBtn";y.appendChild(k);
-this.window=new mxWindow(mxResources.get("freehand"),y,f,g,c,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);u.addListener("freehandStateChanged",mxUtils.bind(this,function(){k.innerText="";mxUtils.write(k,mxResources.get(u.freehand.isDrawing()?"stopDrawing":"startDrawing"));var l=document.createElement("span");l.className="geShortcutKey";l.style.margin="0 2px 4px 0";mxUtils.write(l,"X");k.appendChild(l);k.setAttribute("title",
-mxResources.get(u.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");k.className="geBtn"+(u.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){u.freehand.isDrawing()&&u.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,f,g,c,p){var q=b.editor.graph,u=document.createElement("div");u.style.userSelect="none";u.style.overflow=
-"hidden";u.style.height="100%";var y=document.createElement("div");y.style.display="flex";y.style.alignItems="center";y.style.justifyContent="center";y.style.paddingTop="20px";var H=document.createElement("input");H.setAttribute("type","checkbox");H.style.marginRight="4px";H.checked=!0;var E=document.createElement("input");E.setAttribute("type","checkbox");E.style.marginRight="4px";E.checked=!0;var F=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(q.isSelectionEmpty()?
-q.getVerticesAndEdges():q.getSelectionCells(),H.checked,E.checked)}));F.setAttribute("title","Convert Colors");F.className="geBtn gePrimaryBtn";y.appendChild(F);u.appendChild(y);y=y.cloneNode(!1);y.appendChild(E);y.style.paddingTop="8px";mxUtils.write(y,mxResources.get("background"));u.appendChild(y);y=y.cloneNode(!1);y.appendChild(H);y.style.paddingTop="8px";mxUtils.write(y,mxResources.get("labels"));u.appendChild(y);this.window=new mxWindow(mxResources.get("adaptiveColors"),u,f,g,c,p,!0,!0);this.window.destroyOnClose=
-!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,f,g,c,p){function q(){v=!0;A.value=z;d.isSelectionEmpty()?(I.setAttribute("disabled","disabled"),"selectionOnly"==A.value&&(A.value="includeCopyOfMyDiagram")):I.removeAttribute("disabled");b.isDiagramEmpty()?(B.setAttribute("disabled","disabled"),
-"includeCopyOfMyDiagram"==A.value&&(A.value="help")):B.removeAttribute("disabled");v=!1}function u(J,K,m){var t=document.createElement("button");t.className="geBtn gePrimaryBtn";t.style.padding="4px";t.style.height="auto";t.style.position="relative";"flex"==m?(t.style.overflow="hidden",t.style.textOverflow="ellipsis",t.style.whiteSpace="nowrap",t.style.margin="0px",t.style.flexGrow="1"):(t.style.display="block",t.style.margin="8px",t.style.left="50%",t.style.transform="translateX(-50%)");mxUtils.write(t,
-J);t.setAttribute("title",J);mxEvent.addListener(t,"click",K);return t}function y(J){var K=document.createElement("div");K.style.display="block";K.style.position="relative";K.style.backgroundColor="#e0e0e0";K.style.borderRadius="4px";K.style.wordWrap="break-word";K.style.textAlign="left";K.style.padding="6px";K.style.margin="12px";K.style.left="0px";K.style.right="0px";mxUtils.write(K,J);l.appendChild(K);return K}function H(J){var K=J.indexOf("<mxGraphModel "),m=J.indexOf("</mxGraphModel>");0>K&&
-(K=J.indexOf("<mxGraphModel>"));if(0<=K&&m>K){var t=mxUtils,D=t.trim,M=J.substring(0,K),L=M.indexOf("```");0<=L&&(M=M.substring(M,0,L+6));t=D.call(t,M);K=J.substring(K,m+15);D=mxUtils;M=D.trim;J=J.substring(m+15);m=J.lastIndexOf("```");0<=m&&(J=J.substring(m+3));return[t,K,M.call(D,J)]}return null}function E(J){var K=y(J);K.style.cursor="pointer";K.style.marginBottom="2px";K.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(K,"click",function(X){Q.value=J;Q.focus()});var m=y("");
-m.style.marginTop="2px";var t=b.currentPage,D=J,M=[],L=null;if("includeCopyOfMyDiagram"==A.value||"selectionOnly"==A.value){var O=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==A.value&&(O.isObjectIgnored=function(X){return X.constructor==mxCell&&!d.model.isRoot(X)&&!d.model.isLayer(X)&&!d.isCellSelected(X)&&!d.isAncestorSelected(X)});L=O.encode(d.getModel());O.document.appendChild(L);M.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+
-mxUtils.getXml(L)})}else"create"==A.value?(D=C.value.replace(/([A-Z])/g," $1").toLowerCase(),D="Write the declaration code for a "+(""!=D?D:"graph")+' that shows "'+(""!=J?J:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):M.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});M.push({role:"user",content:D});
-var P={model:Editor.gptModel,messages:M},U=0;for(M=0;M<P.messages.length;M++)U+=P.messages[M].content.match(/\b\w+\b|[^\w\s]|=/g).length;var V=mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,mxResources.get("loading")+"...");var X=document.createElement("img");X.setAttribute("title","Processing "+U+" tokens");X.setAttribute("src",IMAGE_PATH+"/spin.gif");X.style.marginLeft="6px";m.appendChild(X);m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,
-function(W){var Y=new mxXmlRequest(Editor.gptUrl,JSON.stringify(P),"POST");Y.setRequestHeaders=mxUtils.bind(this,function(fa,ea){fa.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);fa.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(fa){W.clear();m.innerHTML="";mxUtils.write(m,fa.message);m.appendChild(u(mxResources.get("tryAgain"),V));m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(fa)}),aa=mxUtils.bind(this,
-function(fa){var ea=H(fa),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){fa=document.createElement("div");fa.style.display="inline-block";fa.style.position="relative";fa.style.transform="translateX(-50%)";fa.style.padding="6px";fa.style.left="50%";var ha=mxUtils.parseXml(ea[1]),ka=new mxCodec(ha),ba=new mxGraphModel;ka.decode(ha.documentElement,ba);var ia=null;null!=L&&(ha=new mxCodec(L.ownerDocument),ia=new mxGraphModel,ha.decode(L,ia));ha=mxUtils.bind(this,function(la){d.model.beginUpdate();
-try{if(null!=ia&&null!=b.getPageIndex(t)){b.selectPage(t);var da=b.diffCells(ia.root,ba.root);b.patchPage(t,da,null,!0)}else{var ra=ba.getChildren(ba.getChildAt(ba.getRoot(),0));d.setSelectionCells(d.importCells(ra))}}finally{d.model.endUpdate()}mxEvent.consume(la)});ka=d.getBoundingBoxFromGeometry(ca);null!=ka?(fa.style.cursor="move",fa.appendChild(b.sidebar.createVertexTemplateFromCells(ca,ka.width,ka.height,"",!0,null,!0,!0,ha,160,120))):(fa.style.padding="14px",mxUtils.write(fa,mxResources.get("noPreview")));
-m.innerHTML="";K=m;0<ea[0].length&&(mxUtils.write(K,ea[0]),mxUtils.br(K));K.appendChild(fa);ca=document.createElement("div");ca.style.display="flex";ca.style.gap="6px";ca.style.margin="6px";ca.appendChild(u(mxResources.get("tryAgain"),V,"flex"));ca.appendChild(u(mxResources.get(null!=L?"apply":"insert"),ha,"flex"));m.appendChild(ca);0<ea[2].length&&(mxUtils.br(K),mxUtils.write(K,ea[2]));K.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else m.innerHTML="",K=m,mxUtils.write(K,fa),
-m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});Y.send(mxUtils.bind(this,function(fa){if(W.clear())try{if(200<=fa.getStatus()&&299>=fa.getStatus()){var ea=JSON.parse(fa.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",P,"response:",ea);var ca=mxUtils.trim(ea.choices[0].message.content);if("create"==A.value){var ha=b.extractMermaidDeclaration(ca);null!=ha?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ia){aa(ia)})),b.generateMermaidImage(ha,null,
-function(){},function(ia){mxMermaidToDrawio.resetListeners();Z(ia)})):(aa(ca),m.appendChild(u(mxResources.get("tryAgain"),V)))}else aa(ca)}else{var ka="Error: "+fa.getStatus();try{var ba=JSON.parse(fa.getText());null!=ba&&null!=ba.error&&null!=ba.error.message&&(ka=ba.error.message)}catch(ia){}m.innerHTML="";mxUtils.write(m,ka);m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ia){Z(ia)}}),Z)}),function(W){m.innerHTML="";mxUtils.write(m,W.message);m.appendChild(u(mxResources.get("tryAgain"),
-V));m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});V()}function F(){""!=mxUtils.trim(Q.value)&&(E(Q.value),Q.value="")}var d=b.editor.graph,k=document.createElement("div");k.style.textAlign="center";k.style.overflow="hidden";k.style.height="100%";var l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.top="0px";l.style.left="0px";l.style.right="0px";l.style.bottom="104px";k.appendChild(l);var n=document.createElement("div");n.style.position=
-"absolute";n.style.boxSizing="border-box";n.style.borderRadius="4px";n.style.border="1px solid lightgray";n.style.margin="8px 8px 16px 8px";n.style.padding="8px";n.style.left="0px";n.style.right="0px";n.style.bottom="0px";n.style.padding="6px";n.style.height="80px";var x=document.createElement("div");x.style.display="flex";x.style.gap="6px";x.style.marginBottom="6px";var A=document.createElement("select");A.style.textOverflow="ellipsis";A.style.flexGrow="1";A.style.padding="4px";A.style.minWidth=
-"0";n.appendChild(x);var B=document.createElement("option");B.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(B,mxResources.get("includeCopyOfMyDiagram"));A.appendChild(B);var I=document.createElement("option");I.setAttribute("value","selectionOnly");mxUtils.write(I,mxResources.get("selectionOnly"));A.appendChild(I);x.appendChild(A);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var G=document.createElement("option");G.setAttribute("value","create");mxUtils.write(G,
-mxResources.get("create"));A.appendChild(G)}G=document.createElement("option");G.setAttribute("value","help");mxUtils.write(G,mxResources.get("help"));A.appendChild(G);G=document.createElement("option");G.setAttribute("value","reset");mxUtils.write(G,mxResources.get("reset"));A.appendChild(G);var C=document.createElement("select");C.style.textOverflow="ellipsis";C.style.flexGrow="1";C.style.padding="4px";C.style.minWidth="0";for(G=0;G<EditorUi.mermaidDiagramTypes.length;G++){var R=document.createElement("option"),
-T=EditorUi.mermaidDiagramTypes[G],S=T;"erDiagram"==S&&(S="entityRelationshipDiagram");S=mxResources.get(S,null,S.charAt(0).toUpperCase()+S.substring(1).replace(/[A-Z]/g," $&"));R.setAttribute("value",T);mxUtils.write(R,S);C.appendChild(R)}x.appendChild(C);x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.textOverflow="clip";x.style.cursor="default";var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.width="100%";Q.style.outline="none";Q.style.border="none";
-Q.style.background="transparent";Q.style.padding="8px 26px 8px 8px";Q.style.boxSizing="border-box";x.appendChild(Q);G=document.createElement("img");G.setAttribute("src",Editor.sendImage);G.setAttribute("title",mxResources.get("sendMessage"));G.className="geAdaptiveAsset";G.style.position="relative";G.style.cursor="pointer";G.style.opacity="0.5";G.style.height="19px";G.style.left="-24px";G.style.top="5px";G.style.background="url('"+b.editor.transparentImage+"')";x.appendChild(G);n.appendChild(x);d.isSelectionEmpty()?
-b.isDiagramEmpty()?A.value="help":A.value="includeCopyOfMyDiagram":A.value="selectionOnly";var v=!1,z=A.value,N=function(){Q.setAttribute("placeholder",mxResources.get("create"==A.value?"describeYourDiagram":"askMeAnything"));"create"==A.value?(A.style.width="",C.style.display=""):(A.style.width="100%",C.style.display="none")};N();mxEvent.addListener(A,"change",function(){v||("reset"==A.value?(A.value=z,l.innerHTML=""):z=A.value,N())});d.selectionModel.addListener(mxEvent.CHANGE,q);d.getModel().addListener(mxEvent.CHANGE,
-q);q();mxEvent.addListener(G,"click",F);mxEvent.addListener(Q,"keydown",function(J){13!=J.keyCode||mxEvent.isShiftDown(J)||F()});k.appendChild(n);this.window=new mxWindow(mxResources.get("chatWindowTitle"),k,f,g,c,p,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){d.getModel().removeListener(q)}));this.window.addListener("show",
-mxUtils.bind(this,function(){this.window.fit();Q.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,f,g,c,p){var q=b.editor.graph,u=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)u=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var y=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(H,E){if(q.isEnabled()){var F=new FilenameDialog(b,"",mxResources.get("add"),function(d){b.hideDialog();if(null!=d&&0<d.length){d=
-d.split(" ");for(var k=[],l=[],n=0;n<d.length;n++){var x=mxUtils.trim(d[n]);""!=x&&(l.push(x),0>mxUtils.indexOf(H,x)&&k.push(x))}q.isSelectionEmpty()?E(H.concat(k)):q.addTagsForCells(q.getSelectionCells(),l)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(F.container,320,80,!0,!0);F.init()}},u);u=y.div;this.window=new mxWindow(mxResources.get("tags"),u,f,g,c,p,!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(){y.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,f,g,c){var p=document.createElement("div");p.style.textAlign="center";var q=document.createElement("p");q.style.fontSize="16pt";q.style.padding="0px";q.style.margin="0px";q.style.color="gray";mxUtils.write(q,mxResources.get("authorizationRequired"));var u="Unknown",
-y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";f==b.drive?(u=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(u=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(u=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(u=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(u=mxResources.get("gitlab"),
-y.src=IMAGE_PATH+"/gitlab-logo.svg",y.style.width="32px"):f==b.trello&&(u=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[u]));var H=document.createElement("input");H.setAttribute("type","checkbox");u=mxUtils.button(mxResources.get("authorize"),function(){c(H.checked)});u.insertBefore(y,u.firstChild);u.style.marginTop="6px";u.className="geBigButton";u.style.fontSize="18px";u.style.padding="14px";
-p.appendChild(q);p.appendChild(b);p.appendChild(u);g&&(g=document.createElement("p"),g.style.marginTop="20px",g.appendChild(H),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberMe")),g.appendChild(q),p.appendChild(g),H.checked=!0,H.defaultChecked=!0,mxEvent.addListener(q,"click",function(E){H.checked=!H.checked;mxEvent.consume(E)}));this.container=p},MoreShapesDialog=function(b,f,g){g=null!=g?g:b.sidebar.entries;var c=document.createElement("div"),p=[];if(null!=b.sidebar.customEntries)for(var q=
-0;q<b.sidebar.customEntries.length;q++){for(var u=b.sidebar.customEntries[q]||{},y={title:b.getResource(u.title),entries:[]},H=0;null!=u.entries&&H<u.entries.length;H++){var E=u.entries[H];y.entries.push({id:E.id,title:b.getResource(E.title),desc:b.getResource(E.desc),image:E.preview})}0<y.entries.length&&p.push(y)}for(q=0;q<g.length;q++)if(null==b.sidebar.enabledLibraries)p.push(g[q]);else{y={title:g[q].title,entries:[]};for(H=0;H<g[q].entries.length;H++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
-g[q].entries[H].id)&&y.entries.push(g[q].entries[H]);0<y.entries.length&&p.push(y)}g=p;if(f){q=mxUtils.bind(this,function(T){for(var S=0;S<T.length;S++)(function(Q){var v=n.cloneNode(!1);v.style.fontWeight="bold";v.style.backgroundColor="light-dark(#e5e5e5, #505759)";v.style.padding="6px 0px 6px 20px";mxUtils.write(v,Q.title);F.appendChild(v);for(var z=0;z<Q.entries.length;z++)(function(N){var J=n.cloneNode(!1);J.style.cursor="pointer";J.style.padding="4px 0px 4px 20px";J.style.whiteSpace="nowrap";
-J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.setAttribute("title",N.title+" ("+N.id+")");var K=document.createElement("input");K.setAttribute("type","checkbox");K.checked=b.sidebar.isEntryVisible(N.id);K.defaultChecked=K.checked;J.appendChild(K);mxUtils.write(J," "+N.title);F.appendChild(J);var m=function(t){if(null==t||"INPUT"!=mxEvent.getSource(t).nodeName){d.style.textAlign="center";d.style.padding="0px";d.style.color="";d.innerText="";if(null!=N.desc){var D=document.createElement("pre");
-D.style.boxSizing="border-box";D.style.fontFamily="inherit";D.style.margin="20px";D.style.right="0px";D.style.textAlign="left";mxUtils.write(D,N.desc);d.appendChild(D)}null!=N.imageCallback?N.imageCallback(d):null!=N.image?(D=document.createElement("img"),D.setAttribute("border","0"),D.style.maxWidth="100%",D.setAttribute("src",N.image),d.appendChild(D)):null==N.desc&&(d.style.padding="20px",d.style.color="rgb(179, 179, 179)",mxUtils.write(d,mxResources.get("noPreview")));null!=k&&(k.style.backgroundColor=
-"");k=J;k.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=t&&mxEvent.consume(t)}};mxEvent.addListener(J,"click",m);mxEvent.addListener(J,"dblclick",function(t){K.checked=!K.checked;mxEvent.consume(t)});l.push(function(){return K.checked?N.id:null});0==S&&0==z&&m()})(Q.entries[z])})(T[S])});H=document.createElement("div");H.className="geDialogTitle";mxUtils.write(H,mxResources.get("shapes"));H.style.position="absolute";H.style.top="0px";H.style.left="0px";H.style.lineHeight="40px";H.style.height=
-"40px";H.style.right="0px";var F=document.createElement("div"),d=document.createElement("div");F.style.position="absolute";F.style.top="40px";F.style.left="0px";F.style.width="202px";F.style.bottom="60px";F.style.overflow="auto";d.style.position="absolute";d.style.left="202px";d.style.right="0px";d.style.top="40px";d.style.bottom="60px";d.style.overflow="auto";d.style.borderLeftStyle="solid";d.style.borderLeftWidth="1px";d.style.textAlign="center";var k=null,l=[],n=document.createElement("div");n.style.position=
-"relative";n.style.left="0px";n.style.right="0px";q(g);c.style.padding="30px";c.appendChild(H);c.appendChild(F);c.appendChild(d);g=document.createElement("div");g.className="geDialogFooter";g.style.position="absolute";g.style.paddingRight="16px";g.style.left="0px";g.style.right="0px";g.style.bottom="0px";g.style.height="60px";g.style.lineHeight="52px";var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.position="relative";x.style.top="1px";x.checked=b.sidebar.sidebarTitles;
-x.defaultChecked=x.checked;g.appendChild(x);q=document.createElement("span");mxUtils.write(q," "+mxResources.get("labels"));q.style.paddingRight="20px";g.appendChild(q);mxEvent.addListener(q,"click",function(T){x.checked=!x.checked;mxEvent.consume(T)});var A=document.createElement("input");A.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)q=document.createElement("span"),q.style.paddingRight="20px",q.appendChild(A),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),
-A.style.position="relative",A.style.top="1px",A.checked=!0,A.defaultChecked=!0,mxEvent.addListener(q,"click",function(T){mxEvent.getSource(T)!=A&&(A.checked=!A.checked,mxEvent.consume(T))}),g.appendChild(q);q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var T=[],S=0;S<l.length;S++){var Q=l[S].apply(this,arguments);null!=Q&&T.push(Q)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&
-"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(S=mxUtils.indexOf(T,".scratchpad"),null!=b.scratchpad!=(0<=S&&0<T.splice(S,1).length)&&b.toggleScratchpad(),S=mxUtils.indexOf(T,"search"),mxSettings.settings.search=0<=S&&0<T.splice(S,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),A.checked&&mxSettings.save());b.sidebar.showEntries(T.join(";"),A.checked,!0);b.setSidebarTitles(x.checked,A.checked)});H.className="geBtn gePrimaryBtn"}else{var B=document.createElement("table");
-q=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";H=document.createElement("tr");B.style.width="100%";f=document.createElement("td");p=document.createElement("td");u=document.createElement("td");var I=mxUtils.bind(this,function(T,S,Q){var v=document.createElement("input");v.type="checkbox";B.appendChild(v);v.checked=b.sidebar.isEntryVisible(Q);var z=document.createElement("span");mxUtils.write(z,S);S=document.createElement("div");S.style.display="block";S.appendChild(v);
-S.appendChild(z);mxEvent.addListener(z,"click",function(N){v.checked=!v.checked;mxEvent.consume(N)});T.appendChild(S);return function(){return v.checked?Q:null}});H.appendChild(f);H.appendChild(p);H.appendChild(u);q.appendChild(H);B.appendChild(q);l=[];var G=0;for(q=0;q<g.length;q++)for(H=0;H<g[q].entries.length;H++)G++;var C=[f,p,u],R=0;for(q=0;q<g.length;q++)(function(T){for(var S=0;S<T.entries.length;S++){var Q=T.entries[S];l.push(I(C[Math.floor(R/(G/3))],Q.title,Q.id));R++}})(g[q]);c.appendChild(B);
-g=document.createElement("div");g.style.marginTop="18px";g.style.textAlign="center";A=document.createElement("input");isLocalStorage&&(A.setAttribute("type","checkbox"),A.checked=!0,A.defaultChecked=!0,g.appendChild(A),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),g.appendChild(q),mxEvent.addListener(q,"click",function(T){A.checked=!A.checked;mxEvent.consume(T)}));c.appendChild(g);q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
-q.className="geBtn";H=mxUtils.button(mxResources.get("apply"),function(){for(var T=["search"],S=0;S<l.length;S++){var Q=l[S].apply(this,arguments);null!=Q&&T.push(Q)}b.sidebar.showEntries(0<T.length?T.join(";"):"",A.checked);b.hideDialog()});H.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.marginTop="26px";g.style.textAlign="right"}b.editor.cancelFirst?(g.appendChild(q),g.appendChild(H)):(g.appendChild(H),g.appendChild(q));c.appendChild(g);this.container=c},PluginsDialog=function(b,
-f,g,c){function p(){H=!0;if(0==y.length)u.innerText=mxResources.get("noPlugins");else{u.innerText="";for(var l=0;l<y.length;l++){var n=document.createElement("span");n.style.display="flex";n.style.alignItems="center";n.style.whiteSpace="nowrap";var x=document.createElement("img");x.src=Editor.trashImage;x.style.position="relative";x.style.cursor="pointer";x.style.marginRight="4px";x.style.display="inline-block";x.style.width="18px";x.setAttribute("title",mxResources.get("delete"));n.appendChild(x);
-mxUtils.write(n,y[l]);u.appendChild(n);mxUtils.br(u);mxEvent.addListener(x,"click",function(A){return function(){b.confirm(mxResources.get("delete")+' "'+y[A]+'"?',function(){null!=g&&g(y[A]);y.splice(A,1);p()})}}(l))}}}var q=document.createElement("div"),u=document.createElement("div");u.style.height="180px";u.style.overflow="auto";var y=mxSettings.getPlugins().slice(),H=!1;q.appendChild(u);p();H=!1;var E=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(l){l&&0>mxUtils.indexOf(y,
-l)&&y.push(l);p()})}:function(){var l=document.createElement("div"),n=document.createElement("span");n.style.marginTop="6px";mxUtils.write(n,mxResources.get("builtinPlugins")+": ");l.appendChild(n);var x=document.createElement("select");x.style.width="150px";for(n=0;n<App.publicPlugin.length;n++){var A=document.createElement("option");mxUtils.write(A,App.publicPlugin[n]);A.value=App.publicPlugin[n];x.appendChild(A)}l.appendChild(x);mxUtils.br(l);mxUtils.br(l);n=mxUtils.button(mxResources.get("custom")+
-"...",function(){var B=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog();if(null!=I&&0<I.length){I=I.split(";");for(var G=0;G<I.length;G++){var C=I[G],R=App.pluginRegistry[C];null!=R&&(C=R);0<C.length&&0>mxUtils.indexOf(y,C)&&y.push(C)}p()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(B.container,300,80,!0,!0);B.init()});n.className="geBtn";ALLOW_CUSTOM_PLUGINS||(n.style.display="none");l=new CustomDialog(b,l,mxUtils.bind(this,function(){var B=
-App.pluginRegistry[x.value];0>mxUtils.indexOf(y,B)&&(y.push(B),p())}),null,null,null,n);b.showDialog(l.container,360,100,!0,!0)});E.className="geBtn";var F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";var d=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){H?(mxSettings.setPlugins(y),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});d.className="geBtn gePrimaryBtn";var k=document.createElement("div");
-k.style.marginTop="14px";k.style.textAlign="right";b.isOffline()||k.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(c||k.appendChild(F),k.appendChild(E),k.appendChild(d)):(k.appendChild(E),k.appendChild(d),c||k.appendChild(F));q.appendChild(k);this.container=q},CropImageDialog=function(b,f,g,c){function p(){var T=A.checked,S=B.checked,Q=l.geometry,v=H.width,z=H.height,N=(300-v)/2,J=(300-z)/2;Q.x<N?(Q.width-=N-Q.x,Q.x=N):Q.x+Q.width>N+v&&(Q.width=N+v-Q.x,
-Q.x=Math.min(Q.x,N+v));Q.y<J?(Q.height-=J-Q.y,Q.y=J):Q.y+Q.height>J+z&&(Q.height=J+z-Q.y,Q.y=Math.min(Q.y,J+z));var K=(Q.x-N)/v*100;v=100-(Q.x+Q.width-N)/v*100;N=(Q.y-J)/z*100;Q=100-(Q.y+Q.height-J)/z*100;return"inset("+mxUtils.format(N)+"% "+mxUtils.format(v)+"% "+mxUtils.format(Q)+"% "+mxUtils.format(K)+"%"+(T?" round "+k+"%":S?" round 50%":"")+")"}function q(T){null!=F&&(!0!==T&&(F.model.setGeometry(l,d.clone()),k=5,G.value=k),F.model.setStyle(l,n+p()),F.selectAll(),I.style.visibility=A.checked?
-"visible":"hidden")}var u=document.createElement("div"),y=document.createElement("div");y.style.height="300px";y.style.width="300px";y.style.display="inline-flex";y.style.justifyContent="center";y.style.alignItems="center";y.style.position="absolute";var H=document.createElement("img");H.onload=function(){function T(){F.model.setStyle(l,n+p())}F=new Graph(E);F.autoExtend=!1;F.autoScroll=!1;F.setGridEnabled(!1);F.setEnabled(!0);F.setPanning(!1);F.setConnectable(!1);F.getRubberband().setEnabled(!1);
-F.graphHandler.allowLivePreview=!1;var S=F.createVertexHandler;F.createVertexHandler=function(){var U=S.apply(this,arguments);U.livePreview=!1;return U};if(null!=g)try{if("inset"==g.substring(0,5)){var Q=l.geometry,v=H.width,z=H.height,N=(300-v)/2,J=(300-z)/2,K=g.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),m=parseFloat(K[0]),t=parseFloat(K[1]),D=parseFloat(K[2]),M=parseFloat(K[3]);isFinite(m)&&isFinite(t)&&isFinite(D)&&isFinite(M)?(Q.x=M/100*v+N,Q.y=m/100*z+J,Q.width=(100-t)/100*v+N-Q.x,Q.height=(100-
-D)/100*z+J-Q.y,"round"==K[4]?"50%"==K[5]?B.setAttribute("checked","checked"):(k=parseInt(K[5]),G.value=k,A.setAttribute("checked","checked"),I.style.visibility="visible"):x.setAttribute("checked","checked")):g=null}else g=null}catch(U){}l.style=n+(g?g:p());l.vertex=!0;F.addCell(l,null,null,null,null);F.selectAll();F.addListener(mxEvent.CELLS_MOVED,T);F.addListener(mxEvent.CELLS_RESIZED,T);var L=F.graphHandler.mouseUp,O=F.graphHandler.mouseDown;F.graphHandler.mouseUp=function(){L.apply(this,arguments);
-E.style.backgroundColor="#fff9"};F.graphHandler.mouseDown=function(){O.apply(this,arguments);E.style.backgroundColor=""};F.dblClick=function(){};var P=F.getSelectionModel().changeSelection;F.getSelectionModel().changeSelection=function(){P.call(this,[l],[l])}};H.onerror=function(){H.onload=null;H.src=Editor.errorImage};H.setAttribute("src",f);H.style.maxWidth="300px";H.style.maxHeight="300px";y.appendChild(H);u.appendChild(y);var E=document.createElement("div");E.style.width="300px";E.style.height=
-"300px";E.style.overflow="hidden";E.style.backgroundColor="#fff9";u.appendChild(E);var F=null,d=new mxGeometry(100,100,100,100),k=5,l=new mxCell("",d.clone(),""),n="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id","croppingRect");x.setAttribute("name","croppingShape");x.setAttribute("checked","checked");x.style.margin="5px";u.appendChild(x);f=document.createElement("label");
+" "+Y.lastModifyingUserName:""));mxEvent.addListener(aa,"click",function(ca){I!=Y&&(g.stop(),null!=B&&(B.style.backgroundColor=""),I=Y,B=aa,B.style.backgroundColor="light-dark(#ebf2f9, #000000)",D=H=null,J.removeAttribute("title"),J.innerText=mxResources.get("loading")+"...",q.style.backgroundColor=z.defaultPageBackgroundColor,u.innerText="",z.getModel().clear(),m.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),R.setAttribute("disabled",
+"disabled"),P.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),mxUtils.setOpacity(S,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(P,20),mxUtils.setOpacity(v,20),g.spin(q),Y.getXml(function(ka){if(I==Y)try{ja(ka)}catch(la){J.innerText=mxResources.get("error")+": "+la.message}},function(ka){g.stop();t.style.display="none";t.innerText="";J.innerText="";mxUtils.write(J,mxResources.get("errorLoadingFile"));
+mxUtils.write(u,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(aa,"dblclick",function(ca){N.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);V.appendChild(aa)}return aa}(f[A]);null!=W&&A==f.length-1&&(Q=W)}T.appendChild(V);p.appendChild(T)}else null==l||null==b.drive&&l.constructor==window.DriveFile||null==b.dropbox&&l.constructor==window.DropboxFile?(q.style.display="none",
+O.style.display="none",mxUtils.write(p,mxResources.get("notAvailable"))):(q.style.display="none",O.style.display="none",mxUtils.write(p,mxResources.get("noRevisions")));this.init=function(){null!=Q&&Q.click()};p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";O.appendChild(J);O.appendChild(P);O.appendChild(U);O.appendChild(R);O.appendChild(S);O.appendChild(t);O.appendChild(v);b.editor.cancelFirst&&n.appendChild(p);n.appendChild(N);null!=l&&l.constructor==DriveFile&&
+n.appendChild(M);n.appendChild(m);b.editor.cancelFirst||n.appendChild(p);c.appendChild(n);c.appendChild(O);this.container=c},DraftDialog=function(b,f,k,c,p,q,u,z,G){var E=document.createElement("div"),F=document.createElement("div");F.style.marginTop="0px";F.style.whiteSpace="nowrap";F.style.overflow="auto";F.style.lineHeight="normal";mxUtils.write(F,f);E.appendChild(F);var d=document.createElement("select"),g=mxUtils.bind(this,function(){"-1"==d.value?(d.value=d.options[0].value,g(),b.confirm(mxResources.get("areYouSure"),
+null,mxUtils.bind(this,function(){var P=this,v;return $jscomp.asyncExecutePromiseGeneratorProgram(function(y){for(v=0;v<G.length;v++)p.apply(P,[v,mxUtils.bind(P,function(){})]);b.hideDialog(!0);y.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(I=mxUtils.parseXml(G[d.value].data),H=b.editor.extractGraphModel(I.documentElement,!0),D=0,this.init())});if(null!=G){d.style.marginLeft="4px";for(f=0;f<G.length;f++){var l=document.createElement("option");l.setAttribute("value",f);var n=new Date(G[f].created),
+x=new Date(G[f].modified);mxUtils.write(l,n.toLocaleDateString()+" "+n.toLocaleTimeString()+" - "+(n.toDateString(),x.toDateString(),x.toLocaleDateString())+" "+x.toLocaleTimeString());d.appendChild(l)}l=document.createElement("option");l.setAttribute("value","-1");mxUtils.write(l,mxResources.get("deleteAll"));d.appendChild(l);F.appendChild(d);mxEvent.addListener(d,"change",g)}null==k&&(k=G[0].data);var A=document.createElement("div");A.style.position="absolute";A.style.border="1px solid lightGray";
+A.style.marginTop="10px";A.style.left="40px";A.style.right="40px";A.style.top="46px";A.style.bottom="74px";A.style.overflow="hidden";mxEvent.disableContextMenu(A);E.appendChild(A);var B=new Graph(A);B.setEnabled(!1);B.setPanning(!0);B.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";B.panningHandler.ignoreCell=!0;B.panningHandler.useLeftButtonForPanning=!0;B.minFitScale=null;B.maxFitScale=null;B.centerZoom=!0;var I=mxUtils.parseXml(k),H=b.editor.extractGraphModel(I.documentElement,!0),D=0,S=null,
+U=B.getGlobalVariable;B.getGlobalVariable=function(P){return"page"==P&&null!=S&&null!=S[D]?S[D].getAttribute("name"):"pagenumber"==P?D+1:"pagecount"==P?null!=S?S.length:1:U.apply(this,arguments)};B.getLinkForCell=function(){return null};k=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){B.zoomIn()},20);F=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){B.zoomOut()},20);f=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==
+B.view.scale?(B.maxFitScale=8,B.fit(8)):B.zoomActual();B.center()},20);u=mxUtils.button(u||mxResources.get("discard"),function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(v){p.apply(P,[d.value,mxUtils.bind(P,function(){null!=d.parentNode&&(d.options[d.selectedIndex].parentNode.removeChild(d.options[d.selectedIndex]),1<d.options.length?(d.value=d.options[0].value,g()):b.hideDialog(!0))})]);v.jumpToEnd()})}),
+mxResources.get("no"),mxResources.get("yes"))});u.className="geBtn";var R=document.createElement("select");R.style.maxWidth="80px";R.style.position="relative";R.style.top="-2px";R.style.verticalAlign="bottom";R.style.marginRight="6px";R.style.display="none";q=mxUtils.button(q||mxResources.get("edit"),function(){c.apply(this,[d.value])});q.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.position="absolute";l.style.bottom="30px";l.style.right="40px";l.style.textAlign="right";
+n=document.createElement("div");n.className="geToolbarContainer";n.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function P(J){if(null!=J){var K=J.getAttribute("background");if(null==K||""==K||K==mxConstants.NONE)K="light-dark(#ffffff, transparent)";A.style.backgroundColor=K;(new mxCodec(J.ownerDocument)).decode(J,B.getModel());B.maxFitScale=1;B.fit(8);B.center()}return J}function v(J){null!=J&&(J=
+P(Editor.parseDiagramNode(J)));return J}mxEvent.addListener(R,"change",function(J){D=parseInt(R.value);v(S[D]);mxEvent.consume(J)});if("mxfile"==H.nodeName){var y=H.getElementsByTagName("diagram");S=[];for(var L=0;L<y.length;L++)S.push(y[L]);0<S.length&&v(S[D]);R.innerText="";if(1<S.length)for(R.style.display="",L=0;L<S.length;L++)y=document.createElement("option"),mxUtils.write(y,S[L].getAttribute("name")||mxResources.get("pageWithNumber",[L+1])),y.setAttribute("value",L),L==D&&y.setAttribute("selected",
+"selected"),R.appendChild(y);else R.style.display="none"}else P(H)};n.appendChild(R);n.appendChild(k);n.appendChild(F);n.appendChild(f);k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});k.className="geBtn";z=null!=z?mxUtils.button(mxResources.get("ignore"),z):null;null!=z&&(z.className="geBtn");b.editor.cancelFirst?(l.appendChild(k),null!=z&&l.appendChild(z),l.appendChild(u),l.appendChild(q)):(l.appendChild(q),l.appendChild(u),null!=z&&l.appendChild(z),l.appendChild(k));E.appendChild(l);
+E.appendChild(n);this.container=E},FindWindow=function(b,f,k,c,p,q){function u(C,N,M){if("object"===typeof N.value&&null!=N.value.attributes){N=N.value.attributes;for(var O=0;O<N.length;O++)if("label"!=N[O].nodeName){var Q=mxUtils.trim(N[O].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==C&&0<=Q.indexOf(M)||null!=C&&C.test(Q))return!0}}return!1}function z(){l?(K.removeAttribute("disabled"),m.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),m.setAttribute("disabled",
+"disabled"));D.value?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}function G(C,N,M){L.innerText="";var O=F.model.getDescendants(F.model.getRoot()),Q=D.value.toLowerCase(),T=U.checked?new RegExp(Q):null,V=null;x=null;d!=Q&&(d=Q,g=null,n=!1);var X=null==g;if(0<Q.length){if(n){n=!1;for(var W,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){W=Y;break}C=(W+1)%b.pages.length;g=null;do n=!1,O=b.pages[C],F=b.createTemporaryGraph(F.getStylesheet()),b.updatePageRoot(O),F.model.setRoot(O.root),
+C=(C+1)%b.pages.length;while(!G(!0,N,M)&&C!=W);g&&(g=null,M?b.editor.graph.model.execute(new SelectPage(b,O)):b.selectPage(O));n=!1;F=b.editor.graph;return G(!0,N,M)}for(Y=0;Y<O.length;Y++){W=F.view.getState(O[Y]);N&&(X=X||W==g);if(null!=W&&null!=W.cell.value&&(X||null==V)&&(F.model.isVertex(W.cell)||F.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(P.innerHTML=F.sanitizeHtml(F.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([P])):label=F.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g,
+" ")).toLowerCase();var Z=0;N&&q&&W==g&&(label=label.substr(A),Z=A);var aa=null==S||""==S.value;if(null==T&&(0<=label.indexOf(Q)||aa&&u(T,W.cell,Q))||null!=T&&(T.test(label)||aa&&u(T,W.cell,Q)))if(q&&(null!=T?(aa=label.match(T),null!=aa&&0<aa.length&&(x=aa[0].toLowerCase(),A=Z+aa.index+x.length)):(x=Q,A=Z+label.indexOf(Q)+x.length)),X){V=W;break}else null==V&&(V=W)}X=X||W==g}}if(null!=V){if(Y==O.length&&R.checked)return g=null,n=!0,G(!0,N,M);g=V;F.scrollCellToVisible(g.cell);F.isEnabled()&&!F.isCellLocked(g.cell)?
+M||F.getSelectionCell()==g.cell&&1==F.getSelectionCount()||F.setSelectionCell(g.cell):F.highlightCell(g.cell)}else{if(!C&&R.checked)return n=!0,G(!0,N,M);F.isEnabled()&&!M&&F.clearSelection()}l=null!=V;q&&!C&&z();return 0==Q.length||null!=V}var E=b.actions.get("findReplace"),F=b.editor.graph,d=null,g=null,l=!1,n=!1,x=null,A=0,B=1,I=document.createElement("div");I.style.userSelect="none";I.style.overflow="hidden";I.style.padding="10px";I.style.height="100%";var H=q?"260px":"200px",D=document.createElement("input");
+D.setAttribute("placeholder",mxResources.get("find"));D.setAttribute("type","text");D.style.marginTop="4px";D.style.marginBottom="6px";D.style.width=H;D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";I.appendChild(D);mxUtils.br(I);if(q){var S=document.createElement("input");S.setAttribute("placeholder",mxResources.get("replaceWith"));S.setAttribute("type","text");S.style.marginTop="4px";S.style.marginBottom="6px";S.style.width=H;S.style.fontSize="12px";S.style.borderRadius=
+"4px";S.style.padding="6px";I.appendChild(S);mxUtils.br(I);mxEvent.addListener(S,"input",z)}var U=document.createElement("input");U.setAttribute("id","geFindWinRegExChck");U.setAttribute("type","checkbox");U.style.marginRight="4px";I.appendChild(U);H=document.createElement("label");H.setAttribute("for","geFindWinRegExChck");I.appendChild(H);mxUtils.write(H,mxResources.get("regularExpression"));I.appendChild(H);H=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");H.style.position=
+"relative";H.style.marginLeft="6px";I.appendChild(H);mxUtils.br(I);var R=document.createElement("input");R.setAttribute("id","geFindWinAllPagesChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";I.appendChild(R);H=document.createElement("label");H.setAttribute("for","geFindWinAllPagesChck");I.appendChild(H);mxUtils.write(H,mxResources.get("allPages"));I.appendChild(H);var P=document.createElement("div");mxUtils.br(I);H=document.createElement("div");H.style.left="0px";H.style.right=
+"0px";H.style.marginTop="6px";H.style.padding="0 6px 0 6px";I.appendChild(H);var v=mxUtils.button(mxResources.get("reset"),function(){L.innerText="";D.value="";D.style.backgroundColor="";q&&(S.value="",z());d=g=null;n=!1;D.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.float="none";v.style.width="120px";v.style.marginTop="6px";v.style.marginLeft="8px";v.style.overflow="hidden";v.style.textOverflow="ellipsis";v.className="geBtn";q||H.appendChild(v);var y=mxUtils.button(mxResources.get("find"),
+function(){try{D.style.backgroundColor=G()?"":"light-dark(#ffcfcf, #ff0000)"}catch(C){b.handleError(C)}});y.setAttribute("title",mxResources.get("find")+" (Enter)");y.style.float="none";y.style.width="120px";y.style.marginTop="6px";y.style.marginLeft="8px";y.style.overflow="hidden";y.style.textOverflow="ellipsis";y.className="geBtn gePrimaryBtn";H.appendChild(y);var L=document.createElement("div");L.style.marginTop="10px";if(q){var J=function(C,N,M,O,Q){if(null==Q||"1"!=Q.html)return O=C.toLowerCase().indexOf(N,
+O),0>O?C:C.substr(0,O)+M+C.substr(O+N.length);var T=C;N=mxUtils.htmlEntities(N,!1,!1,!1);Q=[];var V=-1;for(C=C.replace(/<br>/ig,"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(V=C.indexOf("<",V+1));)Q.push(V);V=C.match(/<[^>]*>/g);C=C.replace(/<[^>]*>/g,"");O=C.toLowerCase().indexOf(N,O);if(0>O)return T;T=O+N.length;M=mxUtils.htmlEntities(M);C=C.substr(0,O)+M+C.substr(T);for(var X=0,W=0;W<Q.length;W++){if(Q[W]-X<O)C=C.substr(0,Q[W])+V[W]+C.substr(Q[W]);
+else{var Y=Q[W]-X<T?O+X:Q[W]+(M.length-N.length);C=C.substr(0,Y)+V[W]+C.substr(Y)}X+=V[W].length}return C.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")};H.style.textAlign="center";var K=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=x&&null!=g){var C=g.cell,N=F.getLabel(C);F.isCellEditable(C)&&F.model.setValue(C,J(N,x,S.value,A-x.length,F.getCurrentCellStyle(C)));D.style.backgroundColor=G(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(M){b.handleError(M)}});
+K.setAttribute("title",mxResources.get("replFind"));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";K.setAttribute("disabled","disabled");H.appendChild(K);mxUtils.br(H);var m=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=x&&null!=g){var C=g.cell,N=F.getLabel(C);F.model.setValue(C,J(N,x,S.value,A-x.length,F.getCurrentCellStyle(C)));K.setAttribute("disabled",
+"disabled");m.setAttribute("disabled","disabled")}}catch(M){b.handleError(M)}});m.setAttribute("title",mxResources.get("replace"));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 gePrimaryBtn";m.setAttribute("disabled","disabled");H.appendChild(m);var t=mxUtils.button(mxResources.get("replaceAll"),function(){L.innerText="";d=null;var C=b.currentPage,N=b.editor.graph.getSelectionCells();
+b.editor.graph.rendering=!1;F.getModel().beginUpdate();try{for(var M=0,O={};G(!1,!0,!0)&&100>M;){var Q=g.cell,T=F.getLabel(Q),V=O[Q.id];if(V&&V.replAllMrk==B&&V.replAllPos>=A)break;O[Q.id]={replAllMrk:B,replAllPos:A};F.isCellEditable(Q)&&(F.model.setValue(Q,J(T,x,S.value,A-x.length,F.getCurrentCellStyle(Q))),M++)}C!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,C));mxUtils.write(L,mxResources.get("matchesRepl",[M]))}catch(X){b.handleError(X)}finally{F.getModel().endUpdate(),b.editor.graph.setSelectionCells(N),
+b.editor.graph.rendering=!0}B++});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");H.appendChild(t);mxUtils.br(H);H.appendChild(v);v=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));v.setAttribute("title",mxResources.get("close"));
+v.style.float="none";v.style.width="120px";v.style.marginTop="6px";v.style.marginLeft="8px";v.style.overflow="hidden";v.style.textOverflow="ellipsis";v.className="geBtn";H.appendChild(v);mxUtils.br(H);H.appendChild(L)}else H.style.display="flex",H.style.alignItems="center",v.style.width="",y.style.width="";mxEvent.addListener(D,"keyup",function(C){if(91==C.keyCode||93==C.keyCode||17==C.keyCode)mxEvent.consume(C);else if(27==C.keyCode)E.funct();else if(d!=D.value.toLowerCase()||13==C.keyCode)try{D.style.backgroundColor=
+G()?"":"light-dark(#ffcfcf, #ff0000)"}catch(N){D.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(I,"keydown",function(C){70==C.keyCode&&b.keyHandler.isControlDown(C)&&!mxEvent.isShiftDown(C)&&(E.funct(),mxEvent.consume(C))});this.window=new mxWindow(mxResources.get("find")+(q?"/"+mxResources.get("replace"):""),I,f,k,c,p,!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()?(D.focus(),mxClient.IS_GC||mxClient.IS_FF?D.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?R.removeAttribute("disabled"):(R.checked=!1,R.setAttribute("disabled","disabled"))):F.container.focus()}));b.installResizeHandler(this,!1);this.doSearch=function(C){D.focus();D.value=C;y.click()}},FreehandWindow=function(b,f,k,c,p,q){var u=b.editor.graph,z=document.createElement("div");z.style.textAlign=
+"center";z.style.userSelect="none";z.style.overflow="hidden";z.style.height="100%";if(q){var G=function(){var l=u.freehand.getStrokeColor(!0);null!=l&&l!=mxConstants.NONE&&1<l.length&&"string"===typeof l&&("default"==l?l=mxResources.get("useBlackAndWhite"):(l="#"==l.charAt(0)?l.substring(1).toUpperCase():l,l=ColorDialog.prototype.colorNames[l]),null!=l&&F.setAttribute("title",l))},E=document.createElement("input");E.setAttribute("id","geFreehandBrush");E.setAttribute("type","checkbox");E.checked=
+u.freehand.isPerfectFreehandMode();E.style.margin="10px 5px 0px 10px";E.style.float="left";z.appendChild(E);u.freehand.setPerfectFreehandMode(E.checked);q=document.createElement("label");q.setAttribute("for","geFreehandBrush");q.style.float="left";q.style.marginTop="10px";z.appendChild(q);mxUtils.write(q,mxResources.get("brush"));z.appendChild(q);var F=document.createElement("tempDiv");F.style.display="block";F.style.width="100%";F.style.height="100%";F.style.borderRadius="2px";F.style.boxSizing=
+"border-box";F.style.border="1px solid black";F.style.backgroundColor=u.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){F.style.backgroundColor=u.freehand.getStrokeColor()});G();q=mxUtils.button("",mxUtils.bind(this,function(l){b.pickColor(u.freehand.getStrokeColor(!0),function(n){u.freehand.setStrokeColor(n);F.style.backgroundColor=u.freehand.getStrokeColor();G()},"default");mxEvent.consume(l)}));q.style.position="absolute";q.style.boxSizing="border-box";q.style.padding="2px";
+q.style.top="8px";q.style.right="8px";q.style.width="28px";q.style.height="18px";q.className="geColorBtn";q.innerText="";q.appendChild(F);z.appendChild(q);q=document.createElement("img");q.setAttribute("title",mxResources.get("settings"));q.setAttribute("src",Editor.gearImage);q.className="geButton";q.style.position="absolute";q.style.boxSizing="border-box";q.style.padding="2px";q.style.top="8px";q.style.right="38px";q.style.width="18px";q.style.height="18px";q.style.opacity="0.6";z.appendChild(q);
+mxEvent.addListener(q,"click",mxUtils.bind(this,function(l){l=u.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",l,function(n){!isNaN(n)&&0<n&&20>=n&&u.freehand.setSmoothing(parseInt(n))})}));mxUtils.br(z);var d=document.createElement("input");d.setAttribute("type","range");d.setAttribute("min","2");d.setAttribute("max","30");d.setAttribute("value",u.freehand.getBrushSize());d.style.width="90%";d.style.visibility="hidden";z.appendChild(d);mxUtils.br(z);q=function(){u.freehand.setPerfectFreehandMode(E.checked);
+d.style.visibility=E.checked?"visible":"hidden"};mxEvent.addListener(E,"change",q);q();mxEvent.addListener(d,"change",function(){u.freehand.setBrushSize(parseInt(this.value))})}var g=mxUtils.button(mxResources.get("startDrawing"),function(){u.freehand.isDrawing()?u.freehand.stopDrawing():u.freehand.startDrawing()});g.setAttribute("title",mxResources.get("startDrawing")+" (X)");g.style.width="90%";g.style.marginLeft="0px";g.style.position="relative";g.className="geBtn gePrimaryBtn";z.appendChild(g);
+this.window=new mxWindow(mxResources.get("freehand"),z,f,k,c,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);u.addListener("freehandStateChanged",mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,mxResources.get(u.freehand.isDrawing()?"stopDrawing":"startDrawing"));var l=document.createElement("span");l.className="geShortcutKey";l.style.margin="0 2px 4px 0";mxUtils.write(l,"X");g.appendChild(l);g.setAttribute("title",
+mxResources.get(u.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");g.className="geBtn"+(u.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){u.freehand.isDrawing()&&u.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,f,k,c,p){var q=b.editor.graph,u=document.createElement("div");u.style.userSelect="none";u.style.overflow=
+"hidden";u.style.height="100%";var z=document.createElement("div");z.style.display="flex";z.style.alignItems="center";z.style.justifyContent="center";z.style.paddingTop="20px";var G=document.createElement("input");G.setAttribute("type","checkbox");G.style.marginRight="4px";G.checked=!0;var E=document.createElement("input");E.setAttribute("type","checkbox");E.style.marginRight="4px";E.checked=!0;var F=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(q.isSelectionEmpty()?
+q.getVerticesAndEdges():q.getSelectionCells(),G.checked,E.checked)}));F.setAttribute("title","Convert Colors");F.className="geBtn gePrimaryBtn";z.appendChild(F);u.appendChild(z);z=z.cloneNode(!1);z.appendChild(E);z.style.paddingTop="8px";mxUtils.write(z,mxResources.get("background"));u.appendChild(z);z=z.cloneNode(!1);z.appendChild(G);z.style.paddingTop="8px";mxUtils.write(z,mxResources.get("labels"));u.appendChild(z);this.window=new mxWindow(mxResources.get("adaptiveColors"),u,f,k,c,p,!0,!0);this.window.destroyOnClose=
+!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,f,k,c,p){function q(){P||(v=x.value,y());H.style.display="createPublic"==x.value?"none":""}function u(){P=!0;x.value=v;F.isSelectionEmpty()?(I.setAttribute("disabled","disabled"),"selectionOnly"==x.value&&(x.value="includeCopyOfMyDiagram")):I.removeAttribute("disabled");
+b.isDiagramEmpty()?(B.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==x.value&&(x.value="help")):B.removeAttribute("disabled");P=!1}function z(L){var J=document.createElement("div");J.style.textAlign="left";J.style.padding="6px";J.style.margin="6px 0";mxUtils.write(J,L);g.appendChild(J);return J}function G(L){var J=[],K=z(L);J.push(K);K.style.marginBottom="2px";K.style.marginLeft="40%";K.style.borderRadius="10px";K.style.backgroundColor="light-dark(#e0e0e0, #3a3a3a)";var m=document.createElement("div");
+m.className="geInlineButtons";m.style.display="flex";m.style.justifyContent="end";J.push(m);var t=document.createElement("img");t.className="geAdaptiveAsset geLibraryButton";t.setAttribute("src",Editor.trashImage);t.setAttribute("title",mxResources.get("remove"));m.appendChild(t);mxEvent.addListener(t,"click",mxUtils.bind(this,function(Y){if(mxEvent.isShiftDown(Y))g.innerHTML="";else{for(Y=0;Y<J.length;Y++)null!=J[Y].parentNode&&J[Y].parentNode.removeChild(J[Y]);J=[]}}));t=t.cloneNode();t.setAttribute("src",
+Editor.copyImage);t.setAttribute("title",mxResources.get("copy"));mxEvent.addListener(t,"click",mxUtils.bind(this,function(){b.writeTextToClipboard(L,mxUtils.bind(this,function(Y){b.handleError(Y)}))}));m.appendChild(t);t=t.cloneNode();t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));m.appendChild(t);mxEvent.addListener(t,"click",mxUtils.bind(this,function(){R.value=L;R.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?R.select():document.execCommand("selectAll",
+!1,null)}));g.appendChild(m);var C=z("");C.className="geSidebar";C.style.marginTop="2px";var N=b.currentPage,M=H.value,O=x.value;t="";var Q=null,T=Date.now();m=[];var V=null;"create"==O?t="You are a helpful assistant that generates diagrams in either MermaidJS or draw.io XML format based on the given prompt. Begin with a concise checklist (3-7 bullets) of what you will do; keep items conceptual, not implementation-level. Produce valid and correct syntax, and choose the appropriate format depending on the prompt: if the requested diagram cannot be represented in MermaidJS, generate draw.io XML instead. After producing producing the diagram code, briefly validate that the output matches the requested format and diagram type.Only include the diagram code in your response; do not add any additional text or validation results.":
+"includeCopyOfMyDiagram"==O||"selectionOnly"==O?(t=new mxCodec(mxUtils.createXmlDocument()),"selectionOnly"==O&&(t.isObjectIgnored=function(Y){return Y.constructor==mxCell&&!F.model.isRoot(Y)&&!F.model.isLayer(Y)&&!F.isCellSelected(Y)&&!F.isAncestorSelected(Y)}),V=t.encode(F.getModel()),V.ownerDocument.appendChild(V),t="You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. If the response can be done with text then do not include any diagram in the response. Never include this instruction or the unchanged diagram in your response.\n"+
+mxUtils.getXml(V)):t="You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response.";m.push({role:"system",content:t});m.push({role:"user",content:L});var X="gemini-"==M.substring(0,7)?{system_instruction:{parts:[{text:t}]},contents:[{parts:[{text:L}]}]}:{model:M,messages:m},W=mxUtils.bind(this,function(){function Y(ca){var ka=document.createElement("div");ka.style.display="flex";ka.style.alignItems="center";
+mxUtils.write(ka,mxResources.get("error")+": "+ca);ca=document.createElement("img");ca.className="geAdaptiveAsset geLibraryButton";ca.setAttribute("src",Editor.refreshImage);ca.setAttribute("title",mxResources.get("tryAgain"));mxEvent.addListener(ca,"click",W);ka.appendChild(ca);return ka}C.innerHTML="";J.push(C);var Z=document.createElement("div");Z.style.display="flex";Z.style.alignItems="center";mxUtils.write(Z,mxResources.get("loading")+"...");var aa=document.createElement("img");aa.className=
+"geAdaptiveAsset";aa.setAttribute("src",Editor.svgSpinImage);aa.style.width="16px";aa.style.height="16px";aa.style.marginLeft="6px";Z.appendChild(aa);C.appendChild(Z);C.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});var ja=mxUtils.bind(this,function(ca){C.innerHTML="";C.appendChild(Y(ca.message));C.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});EditorUi.debug("EditorUi.ChatWindow.handleError","error",ca);null!=window.console&&console.error(ca)}),ea=mxUtils.bind(this,
+function(ca,ka){EditorUi.debug("EditorUi.ChatWindow.handleResponse","data",ca,"prompt",[ka],"time",Date.now()-T);var la=null!=ca?b.stringToCells(ca[1]):null;if(null!=la&&0<la.length){var ba=F.getBoundingBoxFromGeometry(la);b.sidebar.graph.moveCells(la,-ba.x,-ba.y);var ia=mxUtils.bind(this,function(ra){null!=b.sidebar&&b.sidebar.hideTooltip();if(null!=V&&null==Q){var pa=new mxCodec(V.ownerDocument);Q=new mxGraphModel;pa.decode(V,Q)}F.model.beginUpdate();try{if(null!=Q&&null!=N&&null!=b.getPageIndex(N)){b.selectPage(N);
+var qa=mxUtils.parseXml(ca[1]),sa=new mxCodec(qa),ha=new mxGraphModel;sa.decode(qa.documentElement,ha);var ma=b.diffCells(Q.root,ha.root);b.patchPage(N,ma,null,!0);EditorUi.debug("EditorUi.ChatWindow.handleResponse","sentModel",Q,"receivedModel",ha,"patch",ma)}else{var ta=F.getFreeInsertPoint();F.setSelectionCells(F.importCells(la,ta.x,ta.y));EditorUi.debug("EditorUi.ChatWindow.handleResponse","cells",F.getSelectionCell())}}finally{F.model.endUpdate()}F.scrollCellToVisible(F.getSelectionCell());mxEvent.consume(ra)});
+C.innerHTML="";K=C;0<ca[0].length&&(mxUtils.write(K,ca[0]),mxUtils.br(K));if(0<ca[1].length){var fa=b.getSvgForXml(ca[1]);fa.style.overflow="visible";fa.style.padding="1px";fa.style.cursor="move";fa.style.width="160px";fa.style.height="auto";fa.style.maxHeight="460px";var da=document.createElement("a");da.className="geItem";da.style.padding="4px";da.style.borderRadius="10px";da.appendChild(fa);K.appendChild(da);b.sidebar.createItem(la,ka,!0,!0,ba.width,ba.height,!0,!0,ia,null,null,null,null,null,
+da);ba=document.createElement("div");ba.style.display="flex";fa=document.createElement("img");fa.className="geAdaptiveAsset geLibraryButton";fa.setAttribute("src",Editor.refreshImage);fa.setAttribute("title",mxResources.get("refresh"));ba.appendChild(fa);mxEvent.addListener(fa,"click",W);fa=fa.cloneNode();fa.setAttribute("src",Editor.shareImage);fa.setAttribute("title",mxResources.get(b.isStandaloneApp()?"export":"openInNewWindow"));ba.appendChild(fa);mxEvent.addListener(fa,"click",mxUtils.bind(this,
+function(ra){b.isStandaloneApp()?b.saveData("export.xml","xml",ca[1],"text/xml"):b.editor.editAsNew(ca[1])}));fa=fa.cloneNode();fa.setAttribute("src",Editor.magnifyImage);fa.setAttribute("title",mxResources.get("preview"));ba.appendChild(fa);mxEvent.addListener(fa,"click",mxUtils.bind(this,function(ra){b.sidebar.createTooltip(K,la,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1600),Math.min((window.innerHeight||document.documentElement.clientHeight||
+document.body.clientHeight)-120,1200),ka,!0,new mxPoint(mxEvent.getClientX(ra),mxEvent.getClientY(ra)),!0,function(){wasVisible=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},!0,!1)}));fa=fa.cloneNode();null!=V&&null!=N&&null!=b.getPageIndex(N)?(fa.setAttribute("src",Editor.checkImage),fa.setAttribute("title",mxResources.get("apply"))):(fa.setAttribute("src",Editor.plusImage),fa.setAttribute("title",mxResources.get("insert")));ba.appendChild(fa);mxEvent.addListener(fa,"click",ia);
+K.appendChild(ba)}0<ca[2].length&&(mxUtils.br(K),mxUtils.write(K,ca[2]))}else C.innerHTML="",K=C,C.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"}),null==ca?mxUtils.write(K,mxResources.get("errShowingDiag")):(mxUtils.write(K,ca[0]),mxUtils.write(K,ca[2]));K.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});S||"createPublic"==O?b.generateOpenAiMermaidDiagram(L,function(ca){ea(["",ca,""],L)},ja,!0):b.createTimeout(b.editor.generateTimeout,mxUtils.bind(this,function(ca){var ka=
+mxUtils.bind(this,function(ia){ca.clear();ja(ia)}),la="gemini-"==M.substring(0,7)?"https://generativelanguage.googleapis.com/v1beta/models/"+M+":generateContent":Editor.gptUrl,ba=new mxXmlRequest(la,JSON.stringify(X),"POST");ba.setRequestHeaders=mxUtils.bind(this,function(ia,fa){"gemini-"==M.substring(0,7)?ia.setRequestHeader("X-goog-api-key",Editor.geminiApiKey):ia.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ia.setRequestHeader("Content-Type","application/json")});EditorUi.debug("EditorUi.ChatWindow.addMessage",
+"url",la,"params",X);ba.send(mxUtils.bind(this,function(ia){if(ca.clear())try{if(200<=ia.getStatus()&&299>=ia.getStatus()){var fa=JSON.parse(ia.getText()),da="gemini-"==M.substring(0,7)?mxUtils.trim(fa.candidates[0].content.parts[0].text):mxUtils.trim(fa.choices[0].message.content),ra=b.extractMermaidDeclaration(da);EditorUi.debug("EditorUi.ChatWindow.addMessage","params",X,"response",fa,"text",[da],"mermaid",[ra]);null==ra?ea(Editor.extractGraphModelFromText(da),L):b.parseMermaidDiagram(ra,null,
+mxUtils.bind(this,function(sa){ea(["",sa,""],L)}),mxUtils.bind(this,function(sa){ka(sa)}),null,!0)}else{var pa="Error: "+ia.getStatus();try{var qa=JSON.parse(ia.getText());null!=qa&&null!=qa.error&&null!=qa.error.message&&(pa=qa.error.message)}catch(sa){}C.innerHTML="";mxUtils.write(C,pa);C.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(sa){ka(sa)}}),ka)}),function(ca){C.innerHTML="";C.appendChild(Y(ca.message));C.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});
+EditorUi.debug("EditorUi.ChatWindow.addMessage","error",ca)})});W()}function E(){""!=mxUtils.trim(R.value)&&(G(R.value),R.value="")}var F=b.editor.graph,d=document.createElement("div");d.style.display="flex";d.style.flexDirection="column";d.style.overflow="hidden";d.style.height="100%";d.style.padding="10px 12px 20px 12px";d.style.boxSizing="border-box";mxEvent.addGestureListeners(d,mxUtils.bind(this,function(L){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null);var g=document.createElement("div");
+g.style.flexGrow="1";g.style.overflow="auto";g.style.fontSize="12px";g.style.marginRight="-8px";g.style.paddingRight="8px";mxEvent.addListener(g,"scroll",function(){null!=b.sidebar&&b.sidebar.hideTooltip()});d.appendChild(g);var l=document.createElement("div");l.style.borderRadius="20px";l.style.backgroundColor="light-dark(#e0e0e0, #3a3a3a)";l.style.padding="8px";l.style.marginTop="8px";var n=document.createElement("div");n.style.display="flex";n.style.gap="6px";n.style.paddingRight="8px";n.style.justifyContent=
+"start";var x=document.createElement("select");x.style.borderColor="transparent";x.style.textOverflow="ellipsis";x.style.padding="5px";x.style.minWidth="0";if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var A=document.createElement("option");A.setAttribute("value","createPublic");mxUtils.write(A,mxResources.get("create")+" ("+mxResources.get("diagramIsPublic")+")");x.appendChild(A)}var B=document.createElement("option");B.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(B,
+mxResources.get("includeCopyOfMyDiagram"));x.appendChild(B);var I=document.createElement("option");I.setAttribute("value","selectionOnly");mxUtils.write(I,mxResources.get("selectionOnly"));x.appendChild(I);"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(A=document.createElement("option"),A.setAttribute("value","create"),mxUtils.write(A,mxResources.get("create")),x.appendChild(A),x.value="create");A=document.createElement("option");A.setAttribute("value","help");mxUtils.write(A,mxResources.get("help"));
+x.appendChild(A);x.value="createPublic";var H=x.cloneNode(!1);for(U in Editor.gptModels)if(A=Editor.gptModels[U],"gpt-"==A.substring(0,4)&&null!=Editor.gptApiKey||"gemini-"==A.substring(0,7)&&null!=Editor.geminiApiKey){var D=document.createElement("option");D.setAttribute("value",A);mxUtils.write(D,U);H.appendChild(D)}var S=0==H.children.length;var U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.textOverflow="clip";U.style.cursor="default";var R=document.createElement("input");
+R.setAttribute("type","text");R.style.width="100%";R.style.outline="none";R.style.border="none";R.style.background="transparent";R.style.padding="6px 30px 6px 10px";R.style.boxSizing="border-box";U.appendChild(R);A=document.createElement("img");A.setAttribute("src",Editor.sendImage);A.setAttribute("title",mxResources.get("sendMessage"));A.className="geAdaptiveAsset";A.style.position="relative";A.style.cursor="pointer";A.style.opacity="0.5";A.style.height="19px";A.style.left="-28px";A.style.top="5px";
+A.style.background="url('"+b.editor.transparentImage+"')";U.appendChild(A);l.appendChild(U);S||(n.appendChild(x),n.appendChild(H),l.appendChild(n));var P=!1,v=x.value,y=function(){R.setAttribute("placeholder",mxResources.get("create"==x.value||"createPublic"==x.value?"describeYourDiagram":"askMeAnything"))};y();mxEvent.addListener(x,"change",q);q();F.selectionModel.addListener(mxEvent.CHANGE,u);F.getModel().addListener(mxEvent.CHANGE,u);u();d.appendChild(l);mxEvent.addListener(A,"click",E);mxEvent.addListener(R,
+"keydown",function(L){13!=L.keyCode||mxEvent.isShiftDown(L)||E()});this.generate=mxUtils.bind(this,function(L){R.value=L;E()});this.window=new mxWindow(mxResources.get("generate"),d,f,k,c,p,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){F.getModel().removeListener(u)}));this.window.addListener("show",
+mxUtils.bind(this,function(){this.window.fit();R.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,f,k,c,p){var q=b.editor.graph,u=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)u=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var z=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(G,E){if(q.isEnabled()){var F=new FilenameDialog(b,"",mxResources.get("add"),function(d){b.hideDialog();if(null!=d&&0<d.length){d=
+d.split(" ");for(var g=[],l=[],n=0;n<d.length;n++){var x=mxUtils.trim(d[n]);""!=x&&(l.push(x),0>mxUtils.indexOf(G,x)&&g.push(x))}q.isSelectionEmpty()?E(G.concat(g)):q.addTagsForCells(q.getSelectionCells(),l)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(F.container,320,80,!0,!0);F.init()}},u);u=z.div;this.window=new mxWindow(mxResources.get("tags"),u,f,k,c,p,!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(){z.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,f,k,c){var p=document.createElement("div");p.style.textAlign="center";var q=document.createElement("p");q.style.fontSize="16pt";q.style.padding="0px";q.style.margin="0px";q.style.color="gray";mxUtils.write(q,mxResources.get("authorizationRequired"));var u="Unknown",
+z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.marginRight="10px";f==b.drive?(u=mxResources.get("googleDrive"),z.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(u=mxResources.get("dropbox"),z.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(u=mxResources.get("oneDrive"),z.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(u=mxResources.get("github"),z.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(u=mxResources.get("gitlab"),
+z.src=IMAGE_PATH+"/gitlab-logo.svg",z.style.width="32px"):f==b.trello&&(u=mxResources.get("trello"),z.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[u]));var G=document.createElement("input");G.setAttribute("type","checkbox");u=mxUtils.button(mxResources.get("authorize"),function(){c(G.checked)});u.insertBefore(z,u.firstChild);u.style.marginTop="6px";u.className="geBigButton";u.style.fontSize="18px";u.style.padding="14px";
+p.appendChild(q);p.appendChild(b);p.appendChild(u);k&&(k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(G),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberMe")),k.appendChild(q),p.appendChild(k),G.checked=!0,G.defaultChecked=!0,mxEvent.addListener(q,"click",function(E){G.checked=!G.checked;mxEvent.consume(E)}));this.container=p},MoreShapesDialog=function(b,f,k){k=null!=k?k:b.sidebar.entries;var c=document.createElement("div"),p=[];if(null!=b.sidebar.customEntries)for(var q=
+0;q<b.sidebar.customEntries.length;q++){for(var u=b.sidebar.customEntries[q]||{},z={title:b.getResource(u.title),entries:[]},G=0;null!=u.entries&&G<u.entries.length;G++){var E=u.entries[G];z.entries.push({id:E.id,title:b.getResource(E.title),desc:b.getResource(E.desc),image:E.preview})}0<z.entries.length&&p.push(z)}for(q=0;q<k.length;q++)if(null==b.sidebar.enabledLibraries)p.push(k[q]);else{z={title:k[q].title,entries:[]};for(G=0;G<k[q].entries.length;G++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
+k[q].entries[G].id)&&z.entries.push(k[q].entries[G]);0<z.entries.length&&p.push(z)}k=p;if(f){q=mxUtils.bind(this,function(U){for(var R=0;R<U.length;R++)(function(P){var v=n.cloneNode(!1);v.style.fontWeight="bold";v.style.backgroundColor="light-dark(#e5e5e5, #505759)";v.style.padding="6px 0px 6px 20px";mxUtils.write(v,P.title);F.appendChild(v);for(var y=0;y<P.entries.length;y++)(function(L){var J=n.cloneNode(!1);J.style.cursor="pointer";J.style.padding="4px 0px 4px 20px";J.style.whiteSpace="nowrap";
+J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.setAttribute("title",L.title+" ("+L.id+")");var K=document.createElement("input");K.setAttribute("type","checkbox");K.checked=b.sidebar.isEntryVisible(L.id);K.defaultChecked=K.checked;J.appendChild(K);mxUtils.write(J," "+L.title);F.appendChild(J);var m=function(t){if(null==t||"INPUT"!=mxEvent.getSource(t).nodeName){d.style.textAlign="center";d.style.padding="0px";d.style.color="";d.innerText="";if(null!=L.desc){var C=document.createElement("pre");
+C.style.boxSizing="border-box";C.style.fontFamily="inherit";C.style.margin="20px";C.style.right="0px";C.style.textAlign="left";mxUtils.write(C,L.desc);d.appendChild(C)}null!=L.imageCallback?L.imageCallback(d):null!=L.image?(C=document.createElement("img"),C.setAttribute("border","0"),C.style.maxWidth="100%",C.setAttribute("src",L.image),d.appendChild(C)):null==L.desc&&(d.style.padding="20px",d.style.color="rgb(179, 179, 179)",mxUtils.write(d,mxResources.get("noPreview")));null!=g&&(g.style.backgroundColor=
+"");g=J;g.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=t&&mxEvent.consume(t)}};mxEvent.addListener(J,"click",m);mxEvent.addListener(J,"dblclick",function(t){K.checked=!K.checked;mxEvent.consume(t)});l.push(function(){return K.checked?L.id:null});0==R&&0==y&&m()})(P.entries[y])})(U[R])});G=document.createElement("div");G.className="geDialogTitle";mxUtils.write(G,mxResources.get("shapes"));G.style.position="absolute";G.style.top="0px";G.style.left="0px";G.style.lineHeight="40px";G.style.height=
+"40px";G.style.right="0px";var F=document.createElement("div"),d=document.createElement("div");F.style.position="absolute";F.style.top="40px";F.style.left="0px";F.style.width="202px";F.style.bottom="60px";F.style.overflow="auto";d.style.position="absolute";d.style.left="202px";d.style.right="0px";d.style.top="40px";d.style.bottom="60px";d.style.overflow="auto";d.style.borderLeftStyle="solid";d.style.borderLeftWidth="1px";d.style.textAlign="center";var g=null,l=[],n=document.createElement("div");n.style.position=
+"relative";n.style.left="0px";n.style.right="0px";q(k);c.style.padding="30px";c.appendChild(G);c.appendChild(F);c.appendChild(d);k=document.createElement("div");k.className="geDialogFooter";k.style.position="absolute";k.style.paddingRight="16px";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.height="60px";k.style.lineHeight="52px";var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.position="relative";x.style.top="1px";x.checked=b.sidebar.sidebarTitles;
+x.defaultChecked=x.checked;k.appendChild(x);q=document.createElement("span");mxUtils.write(q," "+mxResources.get("labels"));q.style.paddingRight="20px";k.appendChild(q);mxEvent.addListener(q,"click",function(U){x.checked=!x.checked;mxEvent.consume(U)});var A=document.createElement("input");A.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)q=document.createElement("span"),q.style.paddingRight="20px",q.appendChild(A),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),
+A.style.position="relative",A.style.top="1px",A.checked=!0,A.defaultChecked=!0,mxEvent.addListener(q,"click",function(U){mxEvent.getSource(U)!=A&&(A.checked=!A.checked,mxEvent.consume(U))}),k.appendChild(q);q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";G=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var U=[],R=0;R<l.length;R++){var P=l[R].apply(this,arguments);null!=P&&U.push(P)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&
+"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(R=mxUtils.indexOf(U,".scratchpad"),null!=b.scratchpad!=(0<=R&&0<U.splice(R,1).length)&&b.toggleScratchpad(),R=mxUtils.indexOf(U,"search"),mxSettings.settings.search=0<=R&&0<U.splice(R,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),A.checked&&mxSettings.save());b.sidebar.showEntries(U.join(";"),A.checked,!0);b.setSidebarTitles(x.checked,A.checked)});G.className="geBtn gePrimaryBtn"}else{var B=document.createElement("table");
+q=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";G=document.createElement("tr");B.style.width="100%";f=document.createElement("td");p=document.createElement("td");u=document.createElement("td");var I=mxUtils.bind(this,function(U,R,P){var v=document.createElement("input");v.type="checkbox";B.appendChild(v);v.checked=b.sidebar.isEntryVisible(P);var y=document.createElement("span");mxUtils.write(y,R);R=document.createElement("div");R.style.display="block";R.appendChild(v);
+R.appendChild(y);mxEvent.addListener(y,"click",function(L){v.checked=!v.checked;mxEvent.consume(L)});U.appendChild(R);return function(){return v.checked?P:null}});G.appendChild(f);G.appendChild(p);G.appendChild(u);q.appendChild(G);B.appendChild(q);l=[];var H=0;for(q=0;q<k.length;q++)for(G=0;G<k[q].entries.length;G++)H++;var D=[f,p,u],S=0;for(q=0;q<k.length;q++)(function(U){for(var R=0;R<U.entries.length;R++){var P=U.entries[R];l.push(I(D[Math.floor(S/(H/3))],P.title,P.id));S++}})(k[q]);c.appendChild(B);
+k=document.createElement("div");k.style.marginTop="18px";k.style.textAlign="center";A=document.createElement("input");isLocalStorage&&(A.setAttribute("type","checkbox"),A.checked=!0,A.defaultChecked=!0,k.appendChild(A),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),k.appendChild(q),mxEvent.addListener(q,"click",function(U){A.checked=!A.checked;mxEvent.consume(U)}));c.appendChild(k);q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
+q.className="geBtn";G=mxUtils.button(mxResources.get("apply"),function(){for(var U=["search"],R=0;R<l.length;R++){var P=l[R].apply(this,arguments);null!=P&&U.push(P)}b.sidebar.showEntries(0<U.length?U.join(";"):"",A.checked);b.hideDialog()});G.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right"}b.editor.cancelFirst?(k.appendChild(q),k.appendChild(G)):(k.appendChild(G),k.appendChild(q));c.appendChild(k);this.container=c},PluginsDialog=function(b,
+f,k,c){function p(){G=!0;if(0==z.length)u.innerText=mxResources.get("noPlugins");else{u.innerText="";for(var l=0;l<z.length;l++){var n=document.createElement("span");n.style.display="flex";n.style.alignItems="center";n.style.whiteSpace="nowrap";var x=document.createElement("img");x.src=Editor.trashImage;x.style.position="relative";x.style.cursor="pointer";x.style.marginRight="4px";x.style.display="inline-block";x.style.width="18px";x.setAttribute("title",mxResources.get("delete"));n.appendChild(x);
+mxUtils.write(n,z[l]);u.appendChild(n);mxUtils.br(u);mxEvent.addListener(x,"click",function(A){return function(){b.confirm(mxResources.get("delete")+' "'+z[A]+'"?',function(){null!=k&&k(z[A]);z.splice(A,1);p()})}}(l))}}}var q=document.createElement("div"),u=document.createElement("div");u.style.height="180px";u.style.overflow="auto";var z=mxSettings.getPlugins().slice(),G=!1;q.appendChild(u);p();G=!1;var E=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(l){l&&0>mxUtils.indexOf(z,
+l)&&z.push(l);p()})}:function(){var l=document.createElement("div"),n=document.createElement("span");n.style.marginTop="6px";mxUtils.write(n,mxResources.get("builtinPlugins")+": ");l.appendChild(n);var x=document.createElement("select");x.style.width="150px";for(n=0;n<App.publicPlugin.length;n++){var A=document.createElement("option");mxUtils.write(A,App.publicPlugin[n]);A.value=App.publicPlugin[n];x.appendChild(A)}l.appendChild(x);mxUtils.br(l);mxUtils.br(l);n=mxUtils.button(mxResources.get("custom")+
+"...",function(){var B=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog();if(null!=I&&0<I.length){I=I.split(";");for(var H=0;H<I.length;H++){var D=I[H],S=App.pluginRegistry[D];null!=S&&(D=S);0<D.length&&0>mxUtils.indexOf(z,D)&&z.push(D)}p()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(B.container,300,80,!0,!0);B.init()});n.className="geBtn";ALLOW_CUSTOM_PLUGINS||(n.style.display="none");l=new CustomDialog(b,l,mxUtils.bind(this,function(){var B=
+App.pluginRegistry[x.value];0>mxUtils.indexOf(z,B)&&(z.push(B),p())}),null,null,null,n);b.showDialog(l.container,360,100,!0,!0)});E.className="geBtn";var F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";var d=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){G?(mxSettings.setPlugins(z),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});d.className="geBtn gePrimaryBtn";var g=document.createElement("div");
+g.style.marginTop="14px";g.style.textAlign="right";b.isOffline()||g.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(c||g.appendChild(F),g.appendChild(E),g.appendChild(d)):(g.appendChild(E),g.appendChild(d),c||g.appendChild(F));q.appendChild(g);this.container=q},CropImageDialog=function(b,f,k,c){function p(){var U=A.checked,R=B.checked,P=l.geometry,v=G.width,y=G.height,L=(300-v)/2,J=(300-y)/2;P.x<L?(P.width-=L-P.x,P.x=L):P.x+P.width>L+v&&(P.width=L+v-P.x,
+P.x=Math.min(P.x,L+v));P.y<J?(P.height-=J-P.y,P.y=J):P.y+P.height>J+y&&(P.height=J+y-P.y,P.y=Math.min(P.y,J+y));var K=(P.x-L)/v*100;v=100-(P.x+P.width-L)/v*100;L=(P.y-J)/y*100;P=100-(P.y+P.height-J)/y*100;return"inset("+mxUtils.format(L)+"% "+mxUtils.format(v)+"% "+mxUtils.format(P)+"% "+mxUtils.format(K)+"%"+(U?" round "+g+"%":R?" round 50%":"")+")"}function q(U){null!=F&&(!0!==U&&(F.model.setGeometry(l,d.clone()),g=5,H.value=g),F.model.setStyle(l,n+p()),F.selectAll(),I.style.visibility=A.checked?
+"visible":"hidden")}var u=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 G=document.createElement("img");G.onload=function(){function U(){F.model.setStyle(l,n+p())}F=new Graph(E);F.autoExtend=!1;F.autoScroll=!1;F.setGridEnabled(!1);F.setEnabled(!0);F.setPanning(!1);F.setConnectable(!1);F.getRubberband().setEnabled(!1);
+F.graphHandler.allowLivePreview=!1;var R=F.createVertexHandler;F.createVertexHandler=function(){var T=R.apply(this,arguments);T.livePreview=!1;return T};if(null!=k)try{if("inset"==k.substring(0,5)){var P=l.geometry,v=G.width,y=G.height,L=(300-v)/2,J=(300-y)/2,K=k.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),m=parseFloat(K[0]),t=parseFloat(K[1]),C=parseFloat(K[2]),N=parseFloat(K[3]);isFinite(m)&&isFinite(t)&&isFinite(C)&&isFinite(N)?(P.x=N/100*v+L,P.y=m/100*y+J,P.width=(100-t)/100*v+L-P.x,P.height=(100-
+C)/100*y+J-P.y,"round"==K[4]?"50%"==K[5]?B.setAttribute("checked","checked"):(g=parseInt(K[5]),H.value=g,A.setAttribute("checked","checked"),I.style.visibility="visible"):x.setAttribute("checked","checked")):k=null}else k=null}catch(T){}l.style=n+(k?k:p());l.vertex=!0;F.addCell(l,null,null,null,null);F.selectAll();F.addListener(mxEvent.CELLS_MOVED,U);F.addListener(mxEvent.CELLS_RESIZED,U);var M=F.graphHandler.mouseUp,O=F.graphHandler.mouseDown;F.graphHandler.mouseUp=function(){M.apply(this,arguments);
+E.style.backgroundColor="#fff9"};F.graphHandler.mouseDown=function(){O.apply(this,arguments);E.style.backgroundColor=""};F.dblClick=function(){};var Q=F.getSelectionModel().changeSelection;F.getSelectionModel().changeSelection=function(){Q.call(this,[l],[l])}};G.onerror=function(){G.onload=null;G.src=Editor.errorImage};G.setAttribute("src",f);G.style.maxWidth="300px";G.style.maxHeight="300px";z.appendChild(G);u.appendChild(z);var E=document.createElement("div");E.style.width="300px";E.style.height=
+"300px";E.style.overflow="hidden";E.style.backgroundColor="#fff9";u.appendChild(E);var F=null,d=new mxGeometry(100,100,100,100),g=5,l=new mxCell("",d.clone(),""),n="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id","croppingRect");x.setAttribute("name","croppingShape");x.setAttribute("checked","checked");x.style.margin="5px";u.appendChild(x);f=document.createElement("label");
f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));u.appendChild(f);var A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRounded");A.setAttribute("name","croppingShape");A.style.margin="5px";u.appendChild(A);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));u.appendChild(f);var B=document.createElement("input");B.setAttribute("type","radio");B.setAttribute("id",
-"croppingEllipse");B.setAttribute("name","croppingShape");B.style.margin="5px";u.appendChild(B);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));u.appendChild(f);mxEvent.addListener(x,"change",q);mxEvent.addListener(A,"change",q);mxEvent.addListener(B,"change",q);var I=document.createElement("div");I.style.textAlign="center";I.style.visibility="hidden";var G=document.createElement("input");G.setAttribute("type","range");G.setAttribute("min",
-"1");G.setAttribute("max","49");G.setAttribute("value",k);G.setAttribute("title",mxResources.get("arcSize"));I.appendChild(G);u.appendChild(I);mxEvent.addListener(G,"change",function(){k=this.value;q(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";y=mxUtils.button(mxResources.get("apply"),function(){c(p(),l.geometry.width,l.geometry.height);b.hideDialog()});y.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("reset"),function(){c(null,
-H.width,H.height);b.hideDialog()});C.className="geBtn";var R=document.createElement("div");R.style.marginTop="10px";R.style.textAlign="right";b.editor.cancelFirst?(R.appendChild(f),R.appendChild(C),R.appendChild(y)):(R.appendChild(C),R.appendChild(y),R.appendChild(f));u.appendChild(R);this.container=u},EditGeometryDialog=function(b,f){var g=b.editor.graph,c=1==f.length?g.getCellGeometry(f[0]):null,p=document.createElement("div"),q=document.createElement("table"),u=document.createElement("tbody"),
-y=document.createElement("tr"),H=document.createElement("td"),E=document.createElement("td");q.style.paddingLeft="6px";mxUtils.write(H,mxResources.get("relative")+":");var F=document.createElement("input");F.setAttribute("type","checkbox");null!=c&&c.relative&&(F.setAttribute("checked","checked"),F.defaultChecked=!0);this.init=function(){F.focus()};E.appendChild(F);y.appendChild(H);y.appendChild(E);u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");E=document.createElement("td");
-mxUtils.write(H,mxResources.get("left")+":");var d=document.createElement("input");d.setAttribute("type","text");d.style.width="100px";d.value=null!=c?c.x:"";E.appendChild(d);y.appendChild(H);y.appendChild(E);u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");E=document.createElement("td");mxUtils.write(H,mxResources.get("top")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.y:"";E.appendChild(k);y.appendChild(H);
-y.appendChild(E);u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");E=document.createElement("td");mxUtils.write(H,mxResources.get("dx")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=c&&null!=c.offset?c.offset.x:"";E.appendChild(l);y.appendChild(H);y.appendChild(E);u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");E=document.createElement("td");mxUtils.write(H,mxResources.get("dy")+
-":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c&&null!=c.offset?c.offset.y:"";E.appendChild(n);y.appendChild(H);y.appendChild(E);u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");E=document.createElement("td");mxUtils.write(H,mxResources.get("width")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=c?c.width:"";E.appendChild(x);y.appendChild(H);y.appendChild(E);
-u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");E=document.createElement("td");mxUtils.write(H,mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.height:"";E.appendChild(A);y.appendChild(H);y.appendChild(E);u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");E=document.createElement("td");mxUtils.write(H,mxResources.get("rotation")+":");var B=document.createElement("input");
-B.setAttribute("type","text");B.style.width="100px";B.value=1==f.length?mxUtils.getValue(g.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";E.appendChild(B);y.appendChild(H);y.appendChild(E);u.appendChild(y);q.appendChild(u);p.appendChild(q);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var I=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();g.getModel().beginUpdate();try{for(var G=0;G<f.length;G++){var C=g.getCellGeometry(f[G]);null!=
-C&&(C=C.clone(),g.isCellMovable(f[G])&&(C.relative=F.checked,0<mxUtils.trim(d.value).length&&(C.x=Number(d.value)),0<mxUtils.trim(k.value).length&&(C.y=Number(k.value)),0<mxUtils.trim(l.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.x=Number(l.value)),0<mxUtils.trim(n.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.y=Number(n.value))),g.isCellResizable(f[G])&&(0<mxUtils.trim(x.value).length&&(C.width=Number(x.value)),0<mxUtils.trim(A.value).length&&(C.height=Number(A.value))),
-g.getModel().setGeometry(f[G],C));0<mxUtils.trim(B.value).length&&g.setCellStyles(mxConstants.STYLE_ROTATION,Number(B.value),[f[G]])}}finally{g.getModel().endUpdate()}});I.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",function(G){13==G.keyCode&&I.click()});q=document.createElement("div");q.style.marginTop="20px";q.style.textAlign="right";b.editor.cancelFirst?(q.appendChild(c),q.appendChild(I)):(q.appendChild(I),q.appendChild(c));p.appendChild(q);this.container=p},LibraryDialog=function(b,
-f,g,c,p,q,u){function y(v){for(v=document.elementFromPoint(v.clientX,v.clientY);null!=v&&v.parentNode!=x;)v=v.parentNode;var z=null;if(null!=v){var N=x.firstChild;for(z=0;null!=N&&N!=v;)N=N.nextSibling,z++}return z}function H(v,z,N,J,K,m,t,D,M){try{if(b.spinner.stop(),null==z||"image/"==z.substring(0,6))if(null==v&&null!=t||null==B[v]){var L=function(){Z.innerText="";Z.style.cursor="pointer";Z.style.whiteSpace="nowrap";Z.style.textOverflow="ellipsis";mxUtils.write(Z,null!=aa.title&&0<aa.title.length?
-aa.title:mxResources.get("untitled"));Z.style.color=null==aa.title||0==aa.title.length?"#d0d0d0":""};x.style.backgroundImage="";A.style.display="none";var O=K,P=m;if(K>b.maxImageSize||m>b.maxImageSize){var U=Math.min(1,Math.min(b.maxImageSize/Math.max(1,K)),b.maxImageSize/Math.max(1,m));K*=U;m*=U}O>P?(P=Math.round(100*P/O),O=100):(O=Math.round(100*O/P),P=100);var V=document.createElement("div");V.setAttribute("draggable","true");V.style.display="inline-block";V.style.position="relative";V.style.padding=
-"0 12px";V.style.cursor="move";mxUtils.setPrefixedStyle(V.style,"transition","transform .1s ease-in-out");if(null!=v){var X=document.createElement("img");X.setAttribute("src",R.convert(v));X.style.width=O+"px";X.style.height=P+"px";X.style.margin="10px";X.style.paddingBottom=Math.floor((100-P)/2)+"px";X.style.paddingLeft=Math.floor((100-O)/2)+"px";V.appendChild(X)}else if(null!=t){var W=b.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml));0<W.length&&(b.sidebar.createThumb(W,100,100,
-V,null,!0,!1,null,null,k.shapeBackgroundColor),V.firstChild.style.display="inline-block",V.firstChild.style.cursor="")}var Y=document.createElement("img");Y.setAttribute("src",Editor.closeBlackImage);Y.setAttribute("border","0");Y.setAttribute("title",mxResources.get("delete"));Y.setAttribute("align","top");Y.style.paddingTop="4px";Y.style.position="absolute";Y.style.marginLeft="-12px";Y.style.zIndex="1";Y.style.cursor="pointer";mxEvent.addListener(Y,"dragstart",function(ka){mxEvent.consume(ka)});
-(function(ka,ba,ia){mxEvent.addListener(Y,"click",function(la){B[ba]=null;for(var da=0;da<d.length;da++)if(null!=d[da].data&&d[da].data==ba||null!=d[da].xml&&null!=ia&&d[da].xml==ia.xml){d.splice(da,1);break}V.parentNode.removeChild(ka);0==d.length&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",A.style.display="");mxEvent.consume(la)});mxEvent.addListener(Y,"dblclick",function(la){mxEvent.consume(la)})})(V,v,t);V.appendChild(Y);V.style.marginBottom="30px";var Z=document.createElement("div");
-Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.bottom="-18px";Z.style.left="10px";Z.style.right="10px";Z.style.backgroundColor="light-dark(#ffffff, transparent)";Z.style.overflow="hidden";Z.style.textAlign="center";Z.setAttribute("title",mxResources.get("rename"));var aa=null;null!=v?(aa={data:v,w:K,h:m,title:M},null!=D&&(aa.aspect=D),B[v]=X,d.push(aa)):null!=t&&(t.aspect="fixed",d.push(t),aa=t);mxEvent.addListener(Z,"keydown",function(ka){13==ka.keyCode&&null!=C&&(C(),C=null,
-mxEvent.consume(ka))});L();V.appendChild(Z);mxEvent.addListener(Z,"mousedown",function(ka){"true"!=Z.getAttribute("contentEditable")&&mxEvent.consume(ka)});W=function(ka){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ba=new FilenameDialog(b,aa.title||"",mxResources.get("ok"),function(ia){null!=ia&&(aa.title=ia,L())},mxResources.get("enterValue"));b.showDialog(ba.container,300,80,!0,!0);ba.init();mxEvent.consume(ka)}else if("true"!=Z.getAttribute("contentEditable")){null!=
-C&&(C(),C=null);if(null==aa.title||0==aa.title.length)Z.innerText="";Z.style.textOverflow="";Z.style.whiteSpace="";Z.style.cursor="text";Z.style.color="";Z.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(Z.style,"user-select","text");Z.focus();document.execCommand("selectAll",!1,null);C=function(){Z.removeAttribute("contentEditable");Z.style.cursor="pointer";aa.title=mxUtils.getTextContent(Z);L()};mxEvent.consume(ka)}};mxEvent.addListener(Z,"click",W);mxEvent.addListener(V,"dblclick",
-W);x.appendChild(V);mxEvent.addListener(V,"dragstart",function(ka){null==C&&(null==v&&null!=t&&(Y.style.visibility="hidden",Z.style.visibility="hidden"),mxClient.IS_FF&&null!=t.xml&&ka.dataTransfer.setData("Text",t.xml),I=y(ka),mxClient.IS_GC&&(V.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(V.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(V,30);Y.style.visibility="";Z.style.visibility=""},0))});mxEvent.addListener(V,"dragend",function(ka){"hidden"==Y.style.visibility&&
-(Y.style.visibility="",Z.style.visibility="");I=null;mxUtils.setOpacity(V,100);mxUtils.setPrefixedStyle(V.style,"transform",null)})}else T||(T=!0,b.handleError({message:mxResources.get("fileExists")}));else{K=!1;try{if(O=mxUtils.parseXml(v),"mxlibrary"==O.documentElement.nodeName){P=JSON.parse(mxUtils.getTextContent(O.documentElement));if(null!=P&&0<P.length)for(var fa=0;fa<P.length;fa++)null!=P[fa].xml?H(null,null,0,0,0,0,P[fa]):H(P[fa].data,null,0,0,P[fa].w,P[fa].h,null,"fixed",P[fa].title);K=!0}else if("mxfile"==
-O.documentElement.nodeName){var ea=O.documentElement.getElementsByTagName("diagram");for(fa=0;fa<ea.length;fa++){var ca=Editor.getDiagramNodeXml(ea[fa]);W=b.stringToCells(ca);if(0<W.length){var ha=b.editor.graph.getBoundingBoxFromGeometry(W);null!=ha&&H(null,null,0,0,0,0,{xml:ca,w:ha.width,h:ha.height})}}K=!0}}catch(ka){null!=window.console&&console.error("Error in library dialog: "+ka)}K||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ka){null!=window.console&&
-console.log("Error in library dialog: "+ka)}return null}function E(v){v.dataTransfer.dropEffect=null!=I?"move":"copy";v.stopPropagation();v.preventDefault()}function F(v){v.stopPropagation();v.preventDefault();T=!1;G=y(v);if(null!=I)null!=G&&G<x.children.length?(d.splice(G>I?G-1:G,0,d.splice(I,1)[0]),x.insertBefore(x.children[I],x.children[G])):(d.push(d.splice(I,1)[0]),x.appendChild(x.children[I]));else if(0<v.dataTransfer.files.length)b.importFiles(v.dataTransfer.files,0,0,b.maxImageSize,S(v));
-else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")){var z=decodeURIComponent(v.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(z)||/(\.png)($|\?)/i.test(z)||/(\.gif)($|\?)/i.test(z)||/(\.svg)($|\?)/i.test(z))&&b.loadImage(z,function(N){H(z,null,0,0,N.width,N.height);x.scrollTop=x.scrollHeight})}v.stopPropagation();v.preventDefault()}var d=[],k=b.editor.graph;g=document.createElement("div");g.style.height="100%";var l=document.createElement("div");l.style.whiteSpace="nowrap";
-l.style.height="40px";g.appendChild(l);mxUtils.write(l,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var n=document.createElement("input");n.setAttribute("value",f);n.style.marginRight="20px";n.style.marginLeft="10px";n.style.width="500px";null==p||p.isRenamable()||n.setAttribute("disabled","true");this.init=function(){if(null==p||p.isRenamable())n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};l.appendChild(n);
+"croppingEllipse");B.setAttribute("name","croppingShape");B.style.margin="5px";u.appendChild(B);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));u.appendChild(f);mxEvent.addListener(x,"change",q);mxEvent.addListener(A,"change",q);mxEvent.addListener(B,"change",q);var I=document.createElement("div");I.style.textAlign="center";I.style.visibility="hidden";var H=document.createElement("input");H.setAttribute("type","range");H.setAttribute("min",
+"1");H.setAttribute("max","49");H.setAttribute("value",g);H.setAttribute("title",mxResources.get("arcSize"));I.appendChild(H);u.appendChild(I);mxEvent.addListener(H,"change",function(){g=this.value;q(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){c(p(),l.geometry.width,l.geometry.height);b.hideDialog()});z.className="geBtn gePrimaryBtn";var D=mxUtils.button(mxResources.get("reset"),function(){c(null,
+G.width,G.height);b.hideDialog()});D.className="geBtn";var S=document.createElement("div");S.style.marginTop="10px";S.style.textAlign="right";b.editor.cancelFirst?(S.appendChild(f),S.appendChild(D),S.appendChild(z)):(S.appendChild(D),S.appendChild(z),S.appendChild(f));u.appendChild(S);this.container=u},EditGeometryDialog=function(b,f){var k=b.editor.graph,c=1==f.length?k.getCellGeometry(f[0]):null,p=document.createElement("div"),q=document.createElement("table"),u=document.createElement("tbody"),
+z=document.createElement("tr"),G=document.createElement("td"),E=document.createElement("td");q.style.paddingLeft="6px";mxUtils.write(G,mxResources.get("relative")+":");var F=document.createElement("input");F.setAttribute("type","checkbox");null!=c&&c.relative&&(F.setAttribute("checked","checked"),F.defaultChecked=!0);this.init=function(){F.focus()};E.appendChild(F);z.appendChild(G);z.appendChild(E);u.appendChild(z);z=document.createElement("tr");G=document.createElement("td");E=document.createElement("td");
+mxUtils.write(G,mxResources.get("left")+":");var d=document.createElement("input");d.setAttribute("type","text");d.style.width="100px";d.value=null!=c?c.x:"";E.appendChild(d);z.appendChild(G);z.appendChild(E);u.appendChild(z);z=document.createElement("tr");G=document.createElement("td");E=document.createElement("td");mxUtils.write(G,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=c?c.y:"";E.appendChild(g);z.appendChild(G);
+z.appendChild(E);u.appendChild(z);z=document.createElement("tr");G=document.createElement("td");E=document.createElement("td");mxUtils.write(G,mxResources.get("dx")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=c&&null!=c.offset?c.offset.x:"";E.appendChild(l);z.appendChild(G);z.appendChild(E);u.appendChild(z);z=document.createElement("tr");G=document.createElement("td");E=document.createElement("td");mxUtils.write(G,mxResources.get("dy")+
+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c&&null!=c.offset?c.offset.y:"";E.appendChild(n);z.appendChild(G);z.appendChild(E);u.appendChild(z);z=document.createElement("tr");G=document.createElement("td");E=document.createElement("td");mxUtils.write(G,mxResources.get("width")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=c?c.width:"";E.appendChild(x);z.appendChild(G);z.appendChild(E);
+u.appendChild(z);z=document.createElement("tr");G=document.createElement("td");E=document.createElement("td");mxUtils.write(G,mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.height:"";E.appendChild(A);z.appendChild(G);z.appendChild(E);u.appendChild(z);z=document.createElement("tr");G=document.createElement("td");E=document.createElement("td");mxUtils.write(G,mxResources.get("rotation")+":");var B=document.createElement("input");
+B.setAttribute("type","text");B.style.width="100px";B.value=1==f.length?mxUtils.getValue(k.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";E.appendChild(B);z.appendChild(G);z.appendChild(E);u.appendChild(z);q.appendChild(u);p.appendChild(q);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var I=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();k.getModel().beginUpdate();try{for(var H=0;H<f.length;H++){var D=k.getCellGeometry(f[H]);null!=
+D&&(D=D.clone(),k.isCellMovable(f[H])&&(D.relative=F.checked,0<mxUtils.trim(d.value).length&&(D.x=Number(d.value)),0<mxUtils.trim(g.value).length&&(D.y=Number(g.value)),0<mxUtils.trim(l.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.x=Number(l.value)),0<mxUtils.trim(n.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.y=Number(n.value))),k.isCellResizable(f[H])&&(0<mxUtils.trim(x.value).length&&(D.width=Number(x.value)),0<mxUtils.trim(A.value).length&&(D.height=Number(A.value))),
+k.getModel().setGeometry(f[H],D));0<mxUtils.trim(B.value).length&&k.setCellStyles(mxConstants.STYLE_ROTATION,Number(B.value),[f[H]])}}finally{k.getModel().endUpdate()}});I.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",function(H){13==H.keyCode&&I.click()});q=document.createElement("div");q.style.marginTop="20px";q.style.textAlign="right";b.editor.cancelFirst?(q.appendChild(c),q.appendChild(I)):(q.appendChild(I),q.appendChild(c));p.appendChild(q);this.container=p},LibraryDialog=function(b,
+f,k,c,p,q,u){function z(v){for(v=document.elementFromPoint(v.clientX,v.clientY);null!=v&&v.parentNode!=x;)v=v.parentNode;var y=null;if(null!=v){var L=x.firstChild;for(y=0;null!=L&&L!=v;)L=L.nextSibling,y++}return y}function G(v,y,L,J,K,m,t,C,N){try{if(b.spinner.stop(),null==y||"image/"==y.substring(0,6))if(null==v&&null!=t||null==B[v]){var M=function(){Z.innerText="";Z.style.cursor="pointer";Z.style.whiteSpace="nowrap";Z.style.textOverflow="ellipsis";mxUtils.write(Z,null!=aa.title&&0<aa.title.length?
+aa.title:mxResources.get("untitled"));Z.style.color=null==aa.title||0==aa.title.length?"#d0d0d0":""};x.style.backgroundImage="";A.style.display="none";var O=K,Q=m;if(K>b.maxImageSize||m>b.maxImageSize){var T=Math.min(1,Math.min(b.maxImageSize/Math.max(1,K)),b.maxImageSize/Math.max(1,m));K*=T;m*=T}O>Q?(Q=Math.round(100*Q/O),O=100):(O=Math.round(100*O/Q),Q=100);var V=document.createElement("div");V.setAttribute("draggable","true");V.style.display="inline-block";V.style.position="relative";V.style.padding=
+"0 12px";V.style.cursor="move";mxUtils.setPrefixedStyle(V.style,"transition","transform .1s ease-in-out");if(null!=v){var X=document.createElement("img");X.setAttribute("src",S.convert(v));X.style.width=O+"px";X.style.height=Q+"px";X.style.margin="10px";X.style.paddingBottom=Math.floor((100-Q)/2)+"px";X.style.paddingLeft=Math.floor((100-O)/2)+"px";V.appendChild(X)}else if(null!=t){var W=b.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml));0<W.length&&(b.sidebar.createThumb(W,100,100,
+V,null,!0,!1,null,null,g.shapeBackgroundColor),V.firstChild.style.display="inline-block",V.firstChild.style.cursor="")}var Y=document.createElement("img");Y.setAttribute("src",Editor.closeBlackImage);Y.setAttribute("border","0");Y.setAttribute("title",mxResources.get("delete"));Y.setAttribute("align","top");Y.style.paddingTop="4px";Y.style.position="absolute";Y.style.marginLeft="-12px";Y.style.zIndex="1";Y.style.cursor="pointer";mxEvent.addListener(Y,"dragstart",function(la){mxEvent.consume(la)});
+(function(la,ba,ia){mxEvent.addListener(Y,"click",function(fa){B[ba]=null;for(var da=0;da<d.length;da++)if(null!=d[da].data&&d[da].data==ba||null!=d[da].xml&&null!=ia&&d[da].xml==ia.xml){d.splice(da,1);break}V.parentNode.removeChild(la);0==d.length&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",A.style.display="");mxEvent.consume(fa)});mxEvent.addListener(Y,"dblclick",function(fa){mxEvent.consume(fa)})})(V,v,t);V.appendChild(Y);V.style.marginBottom="30px";var Z=document.createElement("div");
+Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.bottom="-18px";Z.style.left="10px";Z.style.right="10px";Z.style.backgroundColor="light-dark(#ffffff, transparent)";Z.style.overflow="hidden";Z.style.textAlign="center";Z.setAttribute("title",mxResources.get("rename"));var aa=null;null!=v?(aa={data:v,w:K,h:m,title:N},null!=C&&(aa.aspect=C),B[v]=X,d.push(aa)):null!=t&&(t.aspect="fixed",d.push(t),aa=t);mxEvent.addListener(Z,"keydown",function(la){13==la.keyCode&&null!=D&&(D(),D=null,
+mxEvent.consume(la))});M();V.appendChild(Z);mxEvent.addListener(Z,"mousedown",function(la){"true"!=Z.getAttribute("contentEditable")&&mxEvent.consume(la)});W=function(la){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ba=new FilenameDialog(b,aa.title||"",mxResources.get("ok"),function(ia){null!=ia&&(aa.title=ia,M())},mxResources.get("enterValue"));b.showDialog(ba.container,300,80,!0,!0);ba.init();mxEvent.consume(la)}else if("true"!=Z.getAttribute("contentEditable")){null!=
+D&&(D(),D=null);if(null==aa.title||0==aa.title.length)Z.innerText="";Z.style.textOverflow="";Z.style.whiteSpace="";Z.style.cursor="text";Z.style.color="";Z.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(Z.style,"user-select","text");Z.focus();document.execCommand("selectAll",!1,null);D=function(){Z.removeAttribute("contentEditable");Z.style.cursor="pointer";aa.title=mxUtils.getTextContent(Z);M()};mxEvent.consume(la)}};mxEvent.addListener(Z,"click",W);mxEvent.addListener(V,"dblclick",
+W);x.appendChild(V);mxEvent.addListener(V,"dragstart",function(la){null==D&&(null==v&&null!=t&&(Y.style.visibility="hidden",Z.style.visibility="hidden"),mxClient.IS_FF&&null!=t.xml&&la.dataTransfer.setData("Text",t.xml),I=z(la),mxClient.IS_GC&&(V.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(V.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(V,30);Y.style.visibility="";Z.style.visibility=""},0))});mxEvent.addListener(V,"dragend",function(la){"hidden"==Y.style.visibility&&
+(Y.style.visibility="",Z.style.visibility="");I=null;mxUtils.setOpacity(V,100);mxUtils.setPrefixedStyle(V.style,"transform",null)})}else U||(U=!0,b.handleError({message:mxResources.get("fileExists")}));else{K=!1;try{if(O=mxUtils.parseXml(v),"mxlibrary"==O.documentElement.nodeName){Q=JSON.parse(mxUtils.getTextContent(O.documentElement));if(null!=Q&&0<Q.length)for(var ja=0;ja<Q.length;ja++)null!=Q[ja].xml?G(null,null,0,0,0,0,Q[ja]):G(Q[ja].data,null,0,0,Q[ja].w,Q[ja].h,null,"fixed",Q[ja].title);K=!0}else if("mxfile"==
+O.documentElement.nodeName){var ea=O.documentElement.getElementsByTagName("diagram");for(ja=0;ja<ea.length;ja++){var ca=Editor.getDiagramNodeXml(ea[ja]);W=b.stringToCells(ca);if(0<W.length){var ka=b.editor.graph.getBoundingBoxFromGeometry(W);null!=ka&&G(null,null,0,0,0,0,{xml:ca,w:ka.width,h:ka.height})}}K=!0}}catch(la){null!=window.console&&console.error("Error in library dialog: "+la)}K||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(la){null!=window.console&&
+console.log("Error in library dialog: "+la)}return null}function E(v){v.dataTransfer.dropEffect=null!=I?"move":"copy";v.stopPropagation();v.preventDefault()}function F(v){v.stopPropagation();v.preventDefault();U=!1;H=z(v);if(null!=I)null!=H&&H<x.children.length?(d.splice(H>I?H-1:H,0,d.splice(I,1)[0]),x.insertBefore(x.children[I],x.children[H])):(d.push(d.splice(I,1)[0]),x.appendChild(x.children[I]));else if(0<v.dataTransfer.files.length)b.importFiles(v.dataTransfer.files,0,0,b.maxImageSize,R(v));
+else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")){var y=decodeURIComponent(v.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(y)||/(\.png)($|\?)/i.test(y)||/(\.gif)($|\?)/i.test(y)||/(\.svg)($|\?)/i.test(y))&&b.loadImage(y,function(L){G(y,null,0,0,L.width,L.height);x.scrollTop=x.scrollHeight})}v.stopPropagation();v.preventDefault()}var d=[],g=b.editor.graph;k=document.createElement("div");k.style.height="100%";var l=document.createElement("div");l.style.whiteSpace="nowrap";
+l.style.height="40px";k.appendChild(l);mxUtils.write(l,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var n=document.createElement("input");n.setAttribute("value",f);n.style.marginRight="20px";n.style.marginLeft="10px";n.style.width="500px";null==p||p.isRenamable()||n.setAttribute("disabled","true");this.init=function(){if(null==p||p.isRenamable())n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};l.appendChild(n);
Editor.enableUncompressedLibraries&&(n.style.width="420px",f=document.createElement("input"),f.setAttribute("type","checkbox"),f.style.marginRight="10px",l.appendChild(f),mxUtils.write(l,mxResources.get("compressed")));var x=document.createElement("div");x.style.borderWidth="1px 0px 1px 0px";x.style.borderColor="#d3d3d3";x.style.borderStyle="solid";x.style.marginTop="6px";x.style.overflow="auto";x.style.height="340px";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";
-0==d.length&&Graph.fileSupport&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var A=document.createElement("div");A.style.position="absolute";A.style.width="640px";A.style.top="260px";A.style.textAlign="center";A.style.fontSize="22px";A.style.color="#a0c3ff";mxUtils.write(A,mxResources.get("dragImagesHere"));g.appendChild(A);var B={},I=null,G=null,C=null;l=function(v){"true"!=mxEvent.getSource(v).getAttribute("contentEditable")&&null!=C&&(C(),C=null,mxEvent.consume(v))};mxEvent.addListener(x,
-"mousedown",l);mxEvent.addListener(x,"pointerdown",l);mxEvent.addListener(x,"touchstart",l);var R=new mxUrlConverter,T=!1;if(null!=c)for(l=0;l<c.length;l++)f=c[l],H(f.data,null,0,0,f.w,f.h,f,f.aspect,f.title);mxEvent.addListener(x,"dragleave",function(v){A.style.cursor="";for(var z=mxEvent.getSource(v);null!=z;){if(z==x||z==A){v.stopPropagation();v.preventDefault();break}z=z.parentNode}});var S=function(v){return function(z,N,J,K,m,t,D,M,L){null!=L&&EditorUi.isVisioFilename(L.name)?b.importVisio(L,
-mxUtils.bind(this,function(O){H(O,N,J,K,m,t,D,"fixed",mxEvent.isAltDown(v)?null:D.substring(0,D.lastIndexOf(".")).replace(/_/g," "))})):null!=L&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(z,L.name)?b.isExternalDataComms()?b.parseFile(L,mxUtils.bind(this,function(O){4==O.readyState&&(b.spinner.stop(),200<=O.status&&299>=O.status&&(H(O.responseText,N,J,K,m,t,D,"fixed",mxEvent.isAltDown(v)?null:D.substring(0,D.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight))})):(b.spinner.stop(),
-b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(H(z,N,J,K,m,t,D,"fixed",mxEvent.isAltDown(v)?null:D.substring(0,D.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight)}};mxEvent.addListener(x,"dragover",E);mxEvent.addListener(x,"drop",F);mxEvent.addListener(A,"dragover",E);mxEvent.addListener(A,"drop",F);g.appendChild(x);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});
-l.setAttribute("id","btnCancel");l.className="geBtn";b.editor.cancelFirst&&c.appendChild(l);"draw.io"!=b.getServiceName()||null==p||p.constructor!=DriveLibrary&&p.constructor!=GitHubLibrary||(f=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(p,function(v){if(null!=v){var z=b.getSearch("create title mode url drive splash state clibs ui".split(" "));z+=(0==z.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(v);v=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
-"/"+z,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(v.container,450,240,!0);v.init()}else p.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(p.getId(),p)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),f.className="geBtn",c.appendChild(f));f=mxUtils.button(mxResources.get("export"),
-function(){var v=b.createLibraryDataFromImages(d),z=n.value;/(\.xml)$/i.test(z)||(z+=".xml");b.isLocalFileSave()?b.saveLocalFile(v,z,"text/xml",null,null,null!=u?u:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(z)+"&format=xml&xml="+encodeURIComponent(v))).simulate(document,"_blank")});f.setAttribute("id","btnDownload");f.className="geBtn";c.appendChild(f);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var Q=document.createElement("input");Q.setAttribute("multiple",
-"multiple");Q.setAttribute("type","file");mxEvent.addListener(Q,"change",function(v){T=!1;b.importFiles(Q.files,0,0,b.maxImageSize,function(z,N,J,K,m,t,D,M,L){null!=Q.files&&(S(v)(z,N,J,K,m,t,D,M,L),Q.type="",Q.type="file",Q.value="")});x.scrollTop=x.scrollHeight});Q.style.display="none";document.body.appendChild(Q);b.libDlgFileInputElt=Q}f=mxUtils.button(mxResources.get("import"),function(){null!=C&&(C(),C=null);b.libDlgFileInputElt.click()});f.setAttribute("id","btnAddImage");f.className="geBtn";
-c.appendChild(f)}f=mxUtils.button(mxResources.get("addImages"),function(){null!=C&&(C(),C=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(v,z,N){T=!1;if(null!=v){if("data:image/"==v.substring(0,11)){var J=v.indexOf(",");0<J&&(v=v.substring(0,J)+";base64,"+v.substring(J+1))}H(v,null,0,0,z,N);x.scrollTop=x.scrollHeight}})});f.setAttribute("id","btnAddImageUrl");f.className="geBtn";c.appendChild(f);this.saveBtnClickHandler=function(v,z,N,J){b.saveLibrary(v,z,N,J)};f=mxUtils.button(mxResources.get("save"),
-mxUtils.bind(this,function(){null!=C&&(C(),C=null);this.saveBtnClickHandler(n.value,d,p,q)}));f.setAttribute("id","btnSave");f.className="geBtn gePrimaryBtn";c.appendChild(f);b.editor.cancelFirst||c.appendChild(l);g.appendChild(c);this.container=g},EditShapeDialog=function(b,f,g,c,p){c=null!=c?c:300;p=null!=p?p:120;var q=document.createElement("table"),u=document.createElement("tbody");q.style.cellPadding="4px";var y=document.createElement("tr");var H=document.createElement("td");H.setAttribute("colspan",
-"2");H.style.fontSize="10pt";mxUtils.write(H,g);y.appendChild(H);u.appendChild(y);y=document.createElement("tr");H=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=p+"px";this.textarea=E;this.init=function(){E.focus();E.scrollTop=0};H.appendChild(E);y.appendChild(H);H=document.createElement("td");g=document.createElement("div");g.style.position="relative";g.style.border="1px solid gray";g.style.top=
-"6px";g.style.width="200px";g.style.height=p+4+"px";g.style.overflow="hidden";g.style.marginBottom="16px";mxEvent.disableContextMenu(g);H.appendChild(g);var F=new Graph(g);F.setEnabled(!1);var d=b.editor.graph.cloneCell(f);F.addCells([d]);g=F.view.getState(d);var k="";null!=g.shape&&null!=g.shape.stencil&&(k=mxUtils.getPrettyXml(g.shape.stencil.desc));mxUtils.write(E,k||"");g=F.getGraphBounds();p=Math.min(160/g.width,(p-40)/g.height);F.view.scaleAndTranslate(p,20/p-g.x,20/p-g.y);y.appendChild(H);
-u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");H.setAttribute("colspan","2");H.style.paddingTop="2px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");b.isOffline()||(p=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),p.className="geBtn",H.appendChild(p));p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&H.appendChild(p);
-var l=function(n,x,A){var B=E.value,I=mxUtils.parseXml(B);B=mxUtils.getPrettyXml(I.documentElement);I=I.documentElement.getElementsByTagName("parsererror");if(null!=I&&0<I.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(A&&b.hideDialog(),I=!n.model.contains(x),!A||I||B!=k){B=Graph.compress(B);n.getModel().beginUpdate();try{if(I){var G=b.editor.graph.getFreeInsertPoint();x.geometry.x=G.x;x.geometry.y=G.y;n.addCell(x)}n.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+B+")",[x])}catch(C){throw C;}finally{n.getModel().endUpdate()}I&&(n.setSelectionCell(x),n.scrollCellToVisible(x))}};g=mxUtils.button(mxResources.get("preview"),function(){l(F,d,!1)});g.className="geBtn";H.appendChild(g);g=mxUtils.button(mxResources.get("apply"),function(){l(b.editor.graph,f,!0)});g.className="geBtn gePrimaryBtn";H.appendChild(g);b.editor.cancelFirst||H.appendChild(p);y.appendChild(H);u.appendChild(y);q.appendChild(u);this.container=q},CustomDialog=function(b,f,g,c,p,q,
-u,y,H,E,F,d){var k=document.createElement("div");k.appendChild(f);var l=document.createElement("div");l.style.marginTop=null!=d?d:"30px";l.style.textAlign="right";null!=u&&l.appendChild(u);b.isOffline()||null==q||l.appendChild(b.createHelpIcon(q));f=mxUtils.button(H||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});f.className="geBtn";y&&(f.style.display="none");b.editor.cancelFirst&&l.appendChild(f);p=mxUtils.button(p||mxResources.get("ok"),mxUtils.bind(this,function(){E||b.hideDialog(null,
-null,this.container);if(null!=g){var n=g();if("string"===typeof n){b.showError(mxResources.get("error"),n);return}}E&&b.hideDialog(null,null,this.container)}));l.appendChild(p);p.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(f);if(null!=F)for(y=0;y<F.length;y++)(function(n,x,A){n=mxUtils.button(n,function(B){x(B)});null!=A&&n.setAttribute("title",A);n.className="geBtn";l.appendChild(n)})(F[y][0],F[y][1],F[y][2]);k.appendChild(l);this.cancelBtn=f;this.okButton=p;this.container=
-k},BtnDialog=function(b,f,g,c){var p=document.createElement("div");p.style.textAlign="center";var q=document.createElement("p");q.style.fontSize="16pt";q.style.padding="0px";q.style.margin="0px";q.style.color="gray";mxUtils.write(q,mxResources.get("done"));var u="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";f==b.drive?(u=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?
-(u=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(u=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(u=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(u=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(u=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[u],"You are now authorized in {1}"));
-g=mxUtils.button(g,c);g.insertBefore(y,g.firstChild);g.style.marginTop="6px";g.className="geBigButton";g.style.fontSize="18px";g.style.padding="14px";p.appendChild(q);p.appendChild(b);p.appendChild(g);this.container=p},FontDialog=function(b,f,g,c,p){function q(G){this.style.border="";13==G.keyCode&&I.click()}var u=document.createElement("table"),y=document.createElement("tbody");u.style.marginTop="8px";var H=document.createElement("tr");var E=document.createElement("td");E.colSpan=2;E.style.whiteSpace=
-"nowrap";E.style.fontSize="10pt";E.style.fontWeight="bold";var F=document.createElement("input");F.style.cssText="margin-right:8px;margin-bottom:8px;";F.setAttribute("value","sysfonts");F.setAttribute("type","radio");F.setAttribute("name","current-fontdialog");F.setAttribute("id","fontdialog-sysfonts");E.appendChild(F);var d=document.createElement("label");d.setAttribute("for","fontdialog-sysfonts");mxUtils.write(d,mxResources.get("sysFonts",null,"System Fonts"));E.appendChild(d);H.appendChild(E);
-y.appendChild(H);H=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")+":");H.appendChild(E);var k=document.createElement("input");"s"==c&&k.setAttribute("value",f);k.style.marginLeft="4px";k.style.width="250px";k.className="dlg_fontName_s";E=document.createElement("td");E.appendChild(k);H.appendChild(E);y.appendChild(H);H=document.createElement("tr");
-E=document.createElement("td");E.colSpan=2;E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.fontWeight="bold";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","googlefonts");l.setAttribute("type","radio");l.setAttribute("name","current-fontdialog");l.setAttribute("id","fontdialog-googlefonts");E.appendChild(l);d=document.createElement("label");d.setAttribute("for","fontdialog-googlefonts");mxUtils.write(d,mxResources.get("googleFonts",
-null,"Google Fonts"));E.appendChild(d);if(!b.isOffline()||EditorUi.isElectronApp)d=b.createHelpIcon("https://fonts.google.com/"),E.appendChild(d);H.appendChild(E);"0"!=urlParams.isGoogleFontsEnabled&&y.appendChild(H);H=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")+":");H.appendChild(E);var n=document.createElement("input");
-"g"==c&&n.setAttribute("value",f);n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_g";E=document.createElement("td");E.appendChild(n);H.appendChild(E);"0"!=urlParams.isGoogleFontsEnabled&&y.appendChild(H);H=document.createElement("tr");E=document.createElement("td");E.colSpan=2;E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.fontWeight="bold";var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","webfonts");
-x.setAttribute("type","radio");x.setAttribute("name","current-fontdialog");x.setAttribute("id","fontdialog-webfonts");E.appendChild(x);d=document.createElement("label");d.setAttribute("for","fontdialog-webfonts");mxUtils.write(d,mxResources.get("webfonts",null,"Web Fonts"));E.appendChild(d);H.appendChild(E);Editor.enableWebFonts&&y.appendChild(H);H=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")+":");H.appendChild(E);var A=document.createElement("input");"w"==c&&(Editor.enableWebFonts?A.setAttribute("value",f):k.setAttribute("value",f));A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontName_w";E=document.createElement("td");E.appendChild(A);H.appendChild(E);Editor.enableWebFonts&&y.appendChild(H);H=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")+":");H.appendChild(E);var B=document.createElement("input");B.setAttribute("value",g||"");B.style.marginLeft="4px";B.style.width="250px";B.className="dlg_fontUrl";E=document.createElement("td");E.appendChild(B);H.appendChild(E);Editor.enableWebFonts&&y.appendChild(H);this.init=function(){var G=k;"g"==c?G=n:"w"==c&&Editor.enableWebFonts&&(G=A);G.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-G.select():document.execCommand("selectAll",!1,null)};H=document.createElement("tr");E=document.createElement("td");E.colSpan=2;E.style.paddingTop="20px";E.style.whiteSpace="nowrap";E.setAttribute("align","right");b.isOffline()||E.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();p()});f.className="geBtn";b.editor.cancelFirst&&E.appendChild(f);var I=mxUtils.button(mxResources.get("apply"),function(){if(F.checked){var G=
-k.value;var C="s"}else if(l.checked){G=n.value;var R=Editor.GOOGLE_FONTS+encodeURIComponent(G).replace(/%20/g,"+");C="g"}else x.checked&&(G=A.value,R=B.value,C="w");var T=G;var S=R,Q=C,v=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,z=u.querySelector(".dlg_fontName_"+Q);null==z||null!=T&&0!=T.length?(z=u.querySelector(".dlg_fontUrl"),null==z||"w"!=Q||v.test(S)?T=!0:(z.style.border="1px solid red",T=!1)):(z.style.border="1px solid red",T=!1);T&&(p(G,R,C),b.hideDialog())});
-I.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",q);mxEvent.addListener(n,"keypress",q);mxEvent.addListener(A,"keypress",q);mxEvent.addListener(B,"keypress",q);mxEvent.addListener(k,"focus",function(){F.setAttribute("checked","checked");F.checked=!0});mxEvent.addListener(n,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(A,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(B,"focus",function(){x.setAttribute("checked",
-"checked");x.checked=!0});E.appendChild(I);b.editor.cancelFirst||E.appendChild(f);H.appendChild(E);y.appendChild(H);u.appendChild(y);this.container=u};
-function AspectDialog(b,f,g,c,p){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:g||[]};f=document.createElement("div");var q=document.createElement("h5");q.style.margin="0 0 10px";mxUtils.write(q,mxResources.get("pages"));f.appendChild(q);g=document.createElement("div");g.className="geAspectDlgList";f.appendChild(g);q=document.createElement("h5");q.style.margin="0 0 10px";mxUtils.write(q,mxResources.get("layers"));f.appendChild(q);q=document.createElement("div");q.className="geAspectDlgList";
-f.appendChild(q);this.pagesContainer=g;this.layersContainer=q;this.ui=b;g=document.createElement("div");g.style.marginTop="16px";g.style.textAlign="center";q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=p&&p()});q.className="geBtn";b.editor.cancelFirst&&g.appendChild(q);var u=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));g.appendChild(u);u.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||g.appendChild(q);u.setAttribute("disabled","disabled");this.okBtn=u;f.appendChild(g);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
-AspectDialog.prototype.createViewer=function(b,f,g,c){mxEvent.disableContextMenu(b);b.style.userSelect="none";var p=new Graph(b);p.setTooltips(!1);p.setEnabled(!1);p.setPanning(!1);p.minFitScale=null;p.maxFitScale=null;p.centerZoom=!0;f="mxGraphModel"==f.nodeName?f:Editor.parseDiagramNode(f);if(null!=f){var q=f.getAttribute("background");if(null==q||""==q||q==mxConstants.NONE)q=null!=c?c:"#ffffff";b.style.backgroundColor=q;c=new mxCodec(f.ownerDocument);b=p.getModel();c.decode(f,b);f=b.getChildCount(b.root);
-c=null==g;for(q=0;q<f;q++){var u=b.getChildAt(b.root,q);b.setVisible(u,c||g==u.id)}p.maxFitScale=1;p.fit(0);p.center()}return p};
-AspectDialog.prototype.createPageItem=function(b,f,g){var c=document.createElement("div");c.className="geAspectDlgListItem";c.setAttribute("data-page-id",b);c.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.pagesContainer.appendChild(c);var p=this.createViewer(c.childNodes[0],g);f=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=c;
-this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var q=p.model;q=q.getChildCells(q.getRoot());for(var u=0;u<q.length;u++)this.createLayerItem(q[u],b,p,g)});mxEvent.addListener(c,"click",f);this.aspect.pageId==b&&f()};
-AspectDialog.prototype.createLayerItem=function(b,f,g,c){f=g.convertValueToString(b)||mxResources.get("background")||"Background";var p=document.createElement("div");p.setAttribute("data-layer-id",b.id);p.className="geAspectDlgListItem";p.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.layersContainer.appendChild(p);this.createViewer(p.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=p.className.indexOf("geAspectDlgListItemSelected")?
+0==d.length&&Graph.fileSupport&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var A=document.createElement("div");A.style.position="absolute";A.style.width="640px";A.style.top="260px";A.style.textAlign="center";A.style.fontSize="22px";A.style.color="#a0c3ff";mxUtils.write(A,mxResources.get("dragImagesHere"));k.appendChild(A);var B={},I=null,H=null,D=null;l=function(v){"true"!=mxEvent.getSource(v).getAttribute("contentEditable")&&null!=D&&(D(),D=null,mxEvent.consume(v))};mxEvent.addListener(x,
+"mousedown",l);mxEvent.addListener(x,"pointerdown",l);mxEvent.addListener(x,"touchstart",l);var S=new mxUrlConverter,U=!1;if(null!=c)for(l=0;l<c.length;l++)f=c[l],G(f.data,null,0,0,f.w,f.h,f,f.aspect,f.title);mxEvent.addListener(x,"dragleave",function(v){A.style.cursor="";for(var y=mxEvent.getSource(v);null!=y;){if(y==x||y==A){v.stopPropagation();v.preventDefault();break}y=y.parentNode}});var R=function(v){return function(y,L,J,K,m,t,C,N,M){null!=M&&EditorUi.isVisioFilename(M.name)?b.importVisio(M,
+mxUtils.bind(this,function(O){G(O,L,J,K,m,t,C,"fixed",mxEvent.isAltDown(v)?null:C.substring(0,C.lastIndexOf(".")).replace(/_/g," "))})):null!=M&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(y,M.name)?b.isExternalDataComms()?b.parseFile(M,mxUtils.bind(this,function(O){4==O.readyState&&(b.spinner.stop(),200<=O.status&&299>=O.status&&(G(O.responseText,L,J,K,m,t,C,"fixed",mxEvent.isAltDown(v)?null:C.substring(0,C.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight))})):(b.spinner.stop(),
+b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(G(y,L,J,K,m,t,C,"fixed",mxEvent.isAltDown(v)?null:C.substring(0,C.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight)}};mxEvent.addListener(x,"dragover",E);mxEvent.addListener(x,"drop",F);mxEvent.addListener(A,"dragover",E);mxEvent.addListener(A,"drop",F);k.appendChild(x);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});
+l.setAttribute("id","btnCancel");l.className="geBtn";b.editor.cancelFirst&&c.appendChild(l);"draw.io"!=b.getServiceName()||null==p||p.constructor!=DriveLibrary&&p.constructor!=GitHubLibrary||(f=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(p,function(v){if(null!=v){var y=b.getSearch("create title mode url drive splash state clibs ui".split(" "));y+=(0==y.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(v);v=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
+"/"+y,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(v.container,450,240,!0);v.init()}else p.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(p.getId(),p)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),f.className="geBtn",c.appendChild(f));f=mxUtils.button(mxResources.get("export"),
+function(){var v=b.createLibraryDataFromImages(d),y=n.value;/(\.xml)$/i.test(y)||(y+=".xml");b.isLocalFileSave()?b.saveLocalFile(v,y,"text/xml",null,null,null!=u?u:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(y)+"&format=xml&xml="+encodeURIComponent(v))).simulate(document,"_blank")});f.setAttribute("id","btnDownload");f.className="geBtn";c.appendChild(f);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var P=document.createElement("input");P.setAttribute("multiple",
+"multiple");P.setAttribute("type","file");mxEvent.addListener(P,"change",function(v){U=!1;b.importFiles(P.files,0,0,b.maxImageSize,function(y,L,J,K,m,t,C,N,M){null!=P.files&&(R(v)(y,L,J,K,m,t,C,N,M),P.type="",P.type="file",P.value="")});x.scrollTop=x.scrollHeight});P.style.display="none";document.body.appendChild(P);b.libDlgFileInputElt=P}f=mxUtils.button(mxResources.get("import"),function(){null!=D&&(D(),D=null);b.libDlgFileInputElt.click()});f.setAttribute("id","btnAddImage");f.className="geBtn";
+c.appendChild(f)}f=mxUtils.button(mxResources.get("addImages"),function(){null!=D&&(D(),D=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(v,y,L){U=!1;if(null!=v){if("data:image/"==v.substring(0,11)){var J=v.indexOf(",");0<J&&(v=v.substring(0,J)+";base64,"+v.substring(J+1))}G(v,null,0,0,y,L);x.scrollTop=x.scrollHeight}})});f.setAttribute("id","btnAddImageUrl");f.className="geBtn";c.appendChild(f);this.saveBtnClickHandler=function(v,y,L,J){b.saveLibrary(v,y,L,J)};f=mxUtils.button(mxResources.get("save"),
+mxUtils.bind(this,function(){null!=D&&(D(),D=null);this.saveBtnClickHandler(n.value,d,p,q)}));f.setAttribute("id","btnSave");f.className="geBtn gePrimaryBtn";c.appendChild(f);b.editor.cancelFirst||c.appendChild(l);k.appendChild(c);this.container=k},EditShapeDialog=function(b,f,k){var c=document.createElement("div");c.style.position="absolute";c.style.left="30px";c.style.right="30px";c.style.top="30px";c.style.bottom="30px";var p=document.createElement("div");p.style.position="absolute";p.style.top=
+"0px";mxUtils.write(p,k);c.appendChild(p);k=document.createElement("div");k.style.position="absolute";k.style.width="100%";k.style.display="flex";k.style.alignItems="stretch";k.style.top="24px";k.style.bottom="50px";var q=document.createElement("textarea");q.style.outline="none";q.style.resize="horizontal";q.style.width="430px";q.style.maxWidth="calc(100% - 100px)";q.style.flexShrink="0";q.style.borderRadius="4px";q.style.marginRight="4px";k.appendChild(q);var u=document.createElement("div");u.style.border=
+"1px solid lightgray";u.style.padding="20px";u.style.flexGrow="1";u.style.borderRadius="4px";mxEvent.disableContextMenu(u);k.appendChild(u);var z=new Graph(u);z.setEnabled(!1);var G=b.editor.graph.cloneCell(f);z.addCells([G]);p=z.view.getState(G);var E="";null!=p.shape&&null!=p.shape.stencil&&(E=mxUtils.getPrettyXml(p.shape.stencil.desc));mxUtils.write(q,E||"");c.appendChild(k);k=document.createElement("div");k.style.position="absolute";k.style.display="flex";k.style.alignItems="center";k.style.justifyContent=
+"end";k.style.bottom="6px";k.style.height="30px";k.style.width="100%";b.isOffline()||k.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-complex-create-edit"));p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&k.appendChild(p);var F=function(g,l,n){var x=q.value,A=mxUtils.parseXml(x);x=mxUtils.getPrettyXml(A.documentElement);A=A.documentElement.getElementsByTagName("parsererror");if(null!=A&&0<A.length)b.showError(mxResources.get("error"),
+mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(n&&b.hideDialog(),A=!g.model.contains(l),!n||A||x!=E){x=Graph.compress(x);g.getModel().beginUpdate();try{if(A){var B=b.editor.graph.getFreeInsertPoint();l.geometry.x=B.x;l.geometry.y=B.y;g.addCell(l)}g.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+x+")",[l])}catch(I){throw I;}finally{g.getModel().endUpdate()}A&&(g.setSelectionCell(l),g.scrollCellToVisible(l))}},d=mxUtils.button(mxResources.get("preview"),function(){F(z,
+G,!1);z.fit()});d.className="geBtn";k.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){F(b.editor.graph,f,!0)});d.className="geBtn gePrimaryBtn";k.appendChild(d);b.editor.cancelFirst||k.appendChild(p);c.appendChild(k);this.init=function(){q.focus();q.scrollTop=0;z.fit();u.style.overflow="auto";z.fit()};this.container=c},CustomDialog=function(b,f,k,c,p,q,u,z,G,E,F,d){var g=document.createElement("div");g.appendChild(f);var l=document.createElement("div");l.style.marginTop=null!=
+d?d:"30px";l.style.textAlign="right";null!=u&&l.appendChild(u);b.isOffline()||null==q||l.appendChild(b.createHelpIcon(q));f=mxUtils.button(G||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});f.className="geBtn";z&&(f.style.display="none");b.editor.cancelFirst&&l.appendChild(f);p=mxUtils.button(p||mxResources.get("ok"),mxUtils.bind(this,function(){E||b.hideDialog(null,null,this.container);if(null!=k){var n=k();if("string"===typeof n){b.showError(mxResources.get("error"),n);return}}E&&
+b.hideDialog(null,null,this.container)}));l.appendChild(p);p.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(f);if(null!=F)for(z=0;z<F.length;z++)(function(n,x,A){n=mxUtils.button(n,function(B){x(B)});null!=A&&n.setAttribute("title",A);n.className="geBtn";l.appendChild(n)})(F[z][0],F[z][1],F[z][2]);g.appendChild(l);this.cancelBtn=f;this.okButton=p;this.container=g},BtnDialog=function(b,f,k,c){var p=document.createElement("div");p.style.textAlign="center";var q=document.createElement("p");
+q.style.fontSize="16pt";q.style.padding="0px";q.style.margin="0px";q.style.color="gray";mxUtils.write(q,mxResources.get("done"));var u="Unknown",z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.marginRight="10px";f==b.drive?(u=mxResources.get("googleDrive"),z.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(u=mxResources.get("dropbox"),z.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(u=mxResources.get("oneDrive"),z.src=
+IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(u=mxResources.get("github"),z.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(u=mxResources.get("gitlab"),z.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(u=mxResources.get("trello"),z.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[u],"You are now authorized in {1}"));k=mxUtils.button(k,c);k.insertBefore(z,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";
+k.style.fontSize="18px";k.style.padding="14px";p.appendChild(q);p.appendChild(b);p.appendChild(k);this.container=p},FontDialog=function(b,f,k,c,p){function q(H){this.style.border="";13==H.keyCode&&I.click()}var u=document.createElement("table"),z=document.createElement("tbody");u.style.marginTop="8px";var G=document.createElement("tr");var E=document.createElement("td");E.colSpan=2;E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.fontWeight="bold";var F=document.createElement("input");
+F.style.cssText="margin-right:8px;margin-bottom:8px;";F.setAttribute("value","sysfonts");F.setAttribute("type","radio");F.setAttribute("name","current-fontdialog");F.setAttribute("id","fontdialog-sysfonts");E.appendChild(F);var d=document.createElement("label");d.setAttribute("for","fontdialog-sysfonts");mxUtils.write(d,mxResources.get("sysFonts",null,"System Fonts"));E.appendChild(d);G.appendChild(E);z.appendChild(G);G=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")+":");G.appendChild(E);var g=document.createElement("input");"s"==c&&g.setAttribute("value",f);g.style.marginLeft="4px";g.style.width="250px";g.className="dlg_fontName_s";E=document.createElement("td");E.appendChild(g);G.appendChild(E);z.appendChild(G);G=document.createElement("tr");E=document.createElement("td");E.colSpan=2;E.style.whiteSpace="nowrap";E.style.fontSize=
+"10pt";E.style.fontWeight="bold";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","googlefonts");l.setAttribute("type","radio");l.setAttribute("name","current-fontdialog");l.setAttribute("id","fontdialog-googlefonts");E.appendChild(l);d=document.createElement("label");d.setAttribute("for","fontdialog-googlefonts");mxUtils.write(d,mxResources.get("googleFonts",null,"Google Fonts"));E.appendChild(d);if(!b.isOffline()||EditorUi.isElectronApp)d=
+b.createHelpIcon("https://fonts.google.com/"),E.appendChild(d);G.appendChild(E);"0"!=urlParams.isGoogleFontsEnabled&&z.appendChild(G);G=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")+":");G.appendChild(E);var n=document.createElement("input");"g"==c&&n.setAttribute("value",f);n.style.marginLeft="4px";n.style.width="250px";n.className=
+"dlg_fontName_g";E=document.createElement("td");E.appendChild(n);G.appendChild(E);"0"!=urlParams.isGoogleFontsEnabled&&z.appendChild(G);G=document.createElement("tr");E=document.createElement("td");E.colSpan=2;E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.fontWeight="bold";var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","webfonts");x.setAttribute("type","radio");x.setAttribute("name","current-fontdialog");x.setAttribute("id",
+"fontdialog-webfonts");E.appendChild(x);d=document.createElement("label");d.setAttribute("for","fontdialog-webfonts");mxUtils.write(d,mxResources.get("webfonts",null,"Web Fonts"));E.appendChild(d);G.appendChild(E);Editor.enableWebFonts&&z.appendChild(G);G=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")+":");G.appendChild(E);var A=
+document.createElement("input");"w"==c&&(Editor.enableWebFonts?A.setAttribute("value",f):g.setAttribute("value",f));A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontName_w";E=document.createElement("td");E.appendChild(A);G.appendChild(E);Editor.enableWebFonts&&z.appendChild(G);G=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")+":");G.appendChild(E);var B=document.createElement("input");B.setAttribute("value",k||"");B.style.marginLeft="4px";B.style.width="250px";B.className="dlg_fontUrl";E=document.createElement("td");E.appendChild(B);G.appendChild(E);Editor.enableWebFonts&&z.appendChild(G);this.init=function(){var H=g;"g"==c?H=n:"w"==c&&Editor.enableWebFonts&&(H=A);H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)};G=document.createElement("tr");
+E=document.createElement("td");E.colSpan=2;E.style.paddingTop="20px";E.style.whiteSpace="nowrap";E.setAttribute("align","right");b.isOffline()||E.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();p()});f.className="geBtn";b.editor.cancelFirst&&E.appendChild(f);var I=mxUtils.button(mxResources.get("apply"),function(){if(F.checked){var H=g.value;var D="s"}else if(l.checked){H=n.value;var S=Editor.GOOGLE_FONTS+
+encodeURIComponent(H).replace(/%20/g,"+");D="g"}else x.checked&&(H=A.value,S=B.value,D="w");var U=H;var R=S,P=D,v=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,y=u.querySelector(".dlg_fontName_"+P);null==y||null!=U&&0!=U.length?(y=u.querySelector(".dlg_fontUrl"),null==y||"w"!=P||v.test(R)?U=!0:(y.style.border="1px solid red",U=!1)):(y.style.border="1px solid red",U=!1);U&&(p(H,S,D),b.hideDialog())});I.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",
+q);mxEvent.addListener(n,"keypress",q);mxEvent.addListener(A,"keypress",q);mxEvent.addListener(B,"keypress",q);mxEvent.addListener(g,"focus",function(){F.setAttribute("checked","checked");F.checked=!0});mxEvent.addListener(n,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(A,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(B,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});E.appendChild(I);b.editor.cancelFirst||
+E.appendChild(f);G.appendChild(E);z.appendChild(G);u.appendChild(z);this.container=u};
+function AspectDialog(b,f,k,c,p){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:k||[]};f=document.createElement("div");var q=document.createElement("h5");q.style.margin="0 0 10px";mxUtils.write(q,mxResources.get("pages"));f.appendChild(q);k=document.createElement("div");k.className="geAspectDlgList";f.appendChild(k);q=document.createElement("h5");q.style.margin="0 0 10px";mxUtils.write(q,mxResources.get("layers"));f.appendChild(q);q=document.createElement("div");q.className="geAspectDlgList";
+f.appendChild(q);this.pagesContainer=k;this.layersContainer=q;this.ui=b;k=document.createElement("div");k.style.marginTop="16px";k.style.textAlign="center";q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=p&&p()});q.className="geBtn";b.editor.cancelFirst&&k.appendChild(q);var u=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));k.appendChild(u);u.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||k.appendChild(q);u.setAttribute("disabled","disabled");this.okBtn=u;f.appendChild(k);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
+AspectDialog.prototype.createViewer=function(b,f,k,c){mxEvent.disableContextMenu(b);b.style.userSelect="none";var p=new Graph(b);p.setTooltips(!1);p.setEnabled(!1);p.setPanning(!1);p.minFitScale=null;p.maxFitScale=null;p.centerZoom=!0;f="mxGraphModel"==f.nodeName?f:Editor.parseDiagramNode(f);if(null!=f){var q=f.getAttribute("background");if(null==q||""==q||q==mxConstants.NONE)q=null!=c?c:"#ffffff";b.style.backgroundColor=q;c=new mxCodec(f.ownerDocument);b=p.getModel();c.decode(f,b);f=b.getChildCount(b.root);
+c=null==k;for(q=0;q<f;q++){var u=b.getChildAt(b.root,q);b.setVisible(u,c||k==u.id)}p.maxFitScale=1;p.fit(0);p.center()}return p};
+AspectDialog.prototype.createPageItem=function(b,f,k){var c=document.createElement("div");c.className="geAspectDlgListItem";c.setAttribute("data-page-id",b);c.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.pagesContainer.appendChild(c);var p=this.createViewer(c.childNodes[0],k);f=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=c;
+this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var q=p.model;q=q.getChildCells(q.getRoot());for(var u=0;u<q.length;u++)this.createLayerItem(q[u],b,p,k)});mxEvent.addListener(c,"click",f);this.aspect.pageId==b&&f()};
+AspectDialog.prototype.createLayerItem=function(b,f,k,c){f=k.convertValueToString(b)||mxResources.get("background")||"Background";var p=document.createElement("div");p.setAttribute("data-layer-id",b.id);p.className="geAspectDlgListItem";p.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.layersContainer.appendChild(p);this.createViewer(p.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=p.className.indexOf("geAspectDlgListItemSelected")?
(p.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(p.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(p,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};
-var FilePropertiesDialog=function(b,f){function g(C){var R=E;E=function(T,S){try{C(function(){R(T,S)},S)}catch(Q){S(Q)}}}var c=document.createElement("table"),p=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";c.style.tableLayout="fixed";var q=b.getCurrentFile(),u=null!=q&&null!=q.getTitle()?q.getTitle():b.defaultFilename,y=/(\.png)$/i.test(u),H=/(\.svg)$/i.test(u),E=function(C,R){C()},F=null!=q?q.isLocked():!1;var d=document.createElement("tr");var k=document.createElement("td");
-k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("locked")+":");d.appendChild(k);var l=document.createElement("input");l.setAttribute("type","checkbox");F&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);k=document.createElement("td");k.style.whiteSpace="nowrap";k.appendChild(l);d.appendChild(k);p.appendChild(d);this.init=function(){l.focus()};g(function(C,R){null!=b.fileNode&&F!=l.checked?window.setTimeout(function(){null!=
-q&&q.setLocked(l.checked);C()},0):C()});if(y||H){u=1;y=0;d=b.fileNode;null!=d&&(d.hasAttribute("scale")&&(u=parseFloat(d.getAttribute("scale"))),d.hasAttribute("border")&&(y=parseInt(d.getAttribute("border"))));d=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+":");d.appendChild(k);var n=document.createElement("input");n.setAttribute("value",100*u+"%");n.style.marginLeft="4px";n.style.width="100%";
-k=document.createElement("td");k.style.whiteSpace="nowrap";k.appendChild(n);d.appendChild(k);p.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");d.appendChild(k);var x=document.createElement("input");x.setAttribute("value",y);x.style.marginLeft="4px";x.style.width="100%";k=document.createElement("td");k.style.whiteSpace="nowrap";k.appendChild(x);d.appendChild(k);p.appendChild(d);
-this.init=this.init||function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};g(function(C,R){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(n.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(x.value))),null!=q&&q.fileChanged());C()})}else if(!/(\.html)$/i.test(u)&&!/(\.svg)$/i.test(u)){var A=null!=q?q.isCompressed():Editor.defaultCompressed;d=document.createElement("tr");k=document.createElement("td");
-k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("compressed")+":");d.appendChild(k);var B=document.createElement("input");B.setAttribute("type","checkbox");A&&(B.setAttribute("checked","checked"),B.defaultChecked=!0);k=document.createElement("td");k.style.whiteSpace="nowrap";k.appendChild(B);d.appendChild(k);p.appendChild(d);this.init=this.init||function(){B.focus()};g(function(C,R){null!=b.fileNode&&A!=
-B.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",B.checked?"true":"false");null!=q&&(q.compressionChanged(B.checked),q.fileChanged());C()},0):C()})}if(null!=q&&q.isRealtimeOptional()){d=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("realtimeCollaboration")+":");d.appendChild(k);var I=document.createElement("input");I.setAttribute("type",
-"checkbox");var G=q.isRealtimeEnabled();if(G="disabled"!=b.drive.getCustomProperty(q.desc,"collaboration"))I.setAttribute("checked","checked"),I.defaultChecked=!0;g(function(C,R){I.checked!=G?q.setRealtimeEnabled(I.checked,C,R):C()});this.init=null!=this.init?this.init:function(){I.focus()};k=document.createElement("td");k.style.whiteSpace="nowrap";k.appendChild(I);k.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));d.appendChild(k);p.appendChild(d)}null!=q&&
-"draw.io"==b.getServiceName()&&0<q.getSize()&&"1"!=urlParams.embed&&(d=document.createElement("tr"),k=document.createElement("td"),k.style.whiteSpace="nowrap",k.style.overflow="hidden",k.style.textOverflow="ellipsis",k.style.fontSize="10pt",mxUtils.write(k,mxResources.get("size")+":"),d.appendChild(k),k=b.formatFileSize(q.getSize()),u=document.createElement("input"),u.setAttribute("title",k),u.setAttribute("value",k),u.setAttribute("disabled","disabled"),u.style.marginLeft="4px",u.style.width="100%",
-k=document.createElement("td"),k.style.whiteSpace="nowrap",k.appendChild(u),d.appendChild(k),p.appendChild(d));null!=f&&(d=document.createElement("tr"),k=document.createElement("td"),k.style.whiteSpace="nowrap",k.style.overflow="hidden",k.style.textOverflow="ellipsis",k.style.fontSize="10pt",mxUtils.write(k,mxResources.get("publicDiagramUrl")+":"),d.appendChild(k),u=document.createElement("a"),u.setAttribute("href",f),u.setAttribute("title",f),u.style.whiteSpace="nowrap",u.style.overflow="hidden",
-u.style.textOverflow="ellipsis",u.style.display="block",u.style.margin="2px 0px 2px 8px",u.style.fontSize="10pt",mxUtils.write(u,f),mxEvent.addListener(u,"click",function(C){b.openLink(f);mxEvent.consume(C)}),k=document.createElement("td"),k.appendChild(u),d.appendChild(k),p.appendChild(d));null!=q&&null!=q.fileObject&&null!=q.fileObject.path&&(d=document.createElement("tr"),k=document.createElement("td"),k.style.whiteSpace="nowrap",k.style.overflow="hidden",k.style.textOverflow="ellipsis",k.style.fontSize=
-"10pt",mxUtils.write(k,mxResources.get("pathFilename")+":"),d.appendChild(k),u=document.createElement("input"),u.setAttribute("title",q.fileObject.path),u.setAttribute("value",q.fileObject.path),u.setAttribute("disabled","disabled"),u.style.marginLeft="4px",u.style.width="100%",k=document.createElement("td"),k.appendChild(u),d.appendChild(k),p.appendChild(d));this.init=null!=this.init?this.init:function(){};u=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-E(function(){b.spinner.stop();b.hideDialog()},function(C){b.spinner.stop();b.handleError(C,mxResources.get("error"))})});u.className="geBtn gePrimaryBtn";d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;k.style.paddingTop="20px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";b.editor.cancelFirst&&k.appendChild(y);k.appendChild(u);b.editor.cancelFirst||k.appendChild(y);d.appendChild(k);
-p.appendChild(d);c.appendChild(p);this.container=c},ConnectionPointsDialog=function(b,f){function g(){null!=p&&p.destroy()}var c=document.createElement("div");c.style.userSelect="none";var p=null;this.init=function(){function q(J,K,m){var t="shape=image;points=[];rotatable=0;resizable=0;connectable=0;editable=0;image="+b.convertDataUri(mxConstraintHandler.prototype.pointImage.src)+";";J=new mxCell("",new mxGeometry(J,K,6,6),t);J.vertex=!0;J.cp=!0;J.constObj=m;return d.addCell(J)}function u(J){J=d.getSelectionCells();
-d.deleteCells(J)}function y(){var J=parseInt(Q.value)||0;J=0>J?0:100<J?100:J;Q.value=J;var K=parseInt(z.value)||0;K=0>K?0:100<K?100:K;z.value=K;var m=parseInt(v.value)||0,t=parseInt(N.value)||0;m=new mxConnectionConstraint(new mxPoint(J/100,K/100),!1,null,m,t);J=d.getConnectionPoint(n,m);K=d.getSelectionCell();if(null!=K){K.constObj=m;m=K.geometry.clone();t=d.view.scale;var D=d.view.translate;m.x=(J.x-3*t)/t-D.x;m.y=(J.y-3*t)/t-D.y;d.model.setGeometry(K,m)}}function H(J){if(J.constObj)return{x:J.constObj.point.x,
-y:J.constObj.point.y,dx:J.constObj.dx,dy:J.constObj.dy};var K=0,m=0,t=k.geometry,D=mxUtils.format((J.geometry.x+3-t.x)/t.width);J=mxUtils.format((J.geometry.y+3-t.y)/t.height);0>D?(K=D*t.width,D=0):1<D&&(K=(D-1)*t.width,D=1);0>J?(m=J*t.height,J=0):1<J&&(m=(J-1)*t.height,J=1);return{x:D,y:J,dx:parseInt(K),dy:parseInt(m)}}function E(J){if(1==d.getSelectionCount()){var K=d.getSelectionCell();J&&(K.constObj=null);J=H(K);Q.value=100*J.x;z.value=100*J.y;v.value=J.dx;N.value=J.dy;S.style.visibility=""}else S.style.visibility=
+var FilePropertiesDialog=function(b,f){function k(D){var S=E;E=function(U,R){try{D(function(){S(U,R)},R)}catch(P){R(P)}}}var c=document.createElement("table"),p=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";c.style.tableLayout="fixed";var q=b.getCurrentFile(),u=null!=q&&null!=q.getTitle()?q.getTitle():b.defaultFilename,z=/(\.png)$/i.test(u),G=/(\.svg)$/i.test(u),E=function(D,S){D()},F=null!=q?q.isLocked():!1;var d=document.createElement("tr");var g=document.createElement("td");
+g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("locked")+":");d.appendChild(g);var l=document.createElement("input");l.setAttribute("type","checkbox");F&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(l);d.appendChild(g);p.appendChild(d);this.init=function(){l.focus()};k(function(D,S){null!=b.fileNode&&F!=l.checked?window.setTimeout(function(){null!=
+q&&q.setLocked(l.checked);D()},0):D()});if(z||G){u=1;z=0;d=b.fileNode;null!=d&&(d.hasAttribute("scale")&&(u=parseFloat(d.getAttribute("scale"))),d.hasAttribute("border")&&(z=parseInt(d.getAttribute("border"))));d=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("zoom")+":");d.appendChild(g);var n=document.createElement("input");n.setAttribute("value",100*u+"%");n.style.marginLeft="4px";n.style.width="100%";
+g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(n);d.appendChild(g);p.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("borderWidth")+":");d.appendChild(g);var x=document.createElement("input");x.setAttribute("value",z);x.style.marginLeft="4px";x.style.width="100%";g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(x);d.appendChild(g);p.appendChild(d);
+this.init=this.init||function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};k(function(D,S){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(n.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(x.value))),null!=q&&q.fileChanged());D()})}else if(!/(\.html)$/i.test(u)&&!/(\.svg)$/i.test(u)){var A=null!=q?q.isCompressed():Editor.defaultCompressed;d=document.createElement("tr");g=document.createElement("td");
+g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("compressed")+":");d.appendChild(g);var B=document.createElement("input");B.setAttribute("type","checkbox");A&&(B.setAttribute("checked","checked"),B.defaultChecked=!0);g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(B);d.appendChild(g);p.appendChild(d);this.init=this.init||function(){B.focus()};k(function(D,S){null!=b.fileNode&&A!=
+B.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",B.checked?"true":"false");null!=q&&(q.compressionChanged(B.checked),q.fileChanged());D()},0):D()})}if(null!=q&&q.isRealtimeOptional()){d=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("realtimeCollaboration")+":");d.appendChild(g);var I=document.createElement("input");I.setAttribute("type",
+"checkbox");var H=q.isRealtimeEnabled();if(H="disabled"!=b.drive.getCustomProperty(q.desc,"collaboration"))I.setAttribute("checked","checked"),I.defaultChecked=!0;k(function(D,S){I.checked!=H?q.setRealtimeEnabled(I.checked,D,S):D()});this.init=null!=this.init?this.init:function(){I.focus()};g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(I);g.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));d.appendChild(g);p.appendChild(d)}null!=q&&
+"draw.io"==b.getServiceName()&&0<q.getSize()&&"1"!=urlParams.embed&&(d=document.createElement("tr"),g=document.createElement("td"),g.style.whiteSpace="nowrap",g.style.overflow="hidden",g.style.textOverflow="ellipsis",g.style.fontSize="10pt",mxUtils.write(g,mxResources.get("size")+":"),d.appendChild(g),g=b.formatFileSize(q.getSize()),u=document.createElement("input"),u.setAttribute("title",g),u.setAttribute("value",g),u.setAttribute("disabled","disabled"),u.style.marginLeft="4px",u.style.width="100%",
+g=document.createElement("td"),g.style.whiteSpace="nowrap",g.appendChild(u),d.appendChild(g),p.appendChild(d));null!=f&&(d=document.createElement("tr"),g=document.createElement("td"),g.style.whiteSpace="nowrap",g.style.overflow="hidden",g.style.textOverflow="ellipsis",g.style.fontSize="10pt",mxUtils.write(g,mxResources.get("publicDiagramUrl")+":"),d.appendChild(g),u=document.createElement("a"),u.setAttribute("href",f),u.setAttribute("title",f),u.style.whiteSpace="nowrap",u.style.overflow="hidden",
+u.style.textOverflow="ellipsis",u.style.display="block",u.style.margin="2px 0px 2px 8px",u.style.fontSize="10pt",mxUtils.write(u,f),mxEvent.addListener(u,"click",function(D){b.openLink(f);mxEvent.consume(D)}),g=document.createElement("td"),g.appendChild(u),d.appendChild(g),p.appendChild(d));null!=q&&null!=q.fileObject&&null!=q.fileObject.path&&(d=document.createElement("tr"),g=document.createElement("td"),g.style.whiteSpace="nowrap",g.style.overflow="hidden",g.style.textOverflow="ellipsis",g.style.fontSize=
+"10pt",mxUtils.write(g,mxResources.get("pathFilename")+":"),d.appendChild(g),u=document.createElement("input"),u.setAttribute("title",q.fileObject.path),u.setAttribute("value",q.fileObject.path),u.setAttribute("disabled","disabled"),u.style.marginLeft="4px",u.style.width="100%",g=document.createElement("td"),g.appendChild(u),d.appendChild(g),p.appendChild(d));this.init=null!=this.init?this.init:function(){};u=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+E(function(){b.spinner.stop();b.hideDialog()},function(D){b.spinner.stop();b.handleError(D,mxResources.get("error"))})});u.className="geBtn gePrimaryBtn";d=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.paddingTop="20px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});z.className="geBtn";b.editor.cancelFirst&&g.appendChild(z);g.appendChild(u);b.editor.cancelFirst||g.appendChild(z);d.appendChild(g);
+p.appendChild(d);c.appendChild(p);this.container=c},ConnectionPointsDialog=function(b,f){function k(){null!=p&&p.destroy()}var c=document.createElement("div");c.style.userSelect="none";var p=null;this.init=function(){function q(J,K,m){var t="shape=image;points=[];rotatable=0;resizable=0;connectable=0;editable=0;image="+b.convertDataUri(mxConstraintHandler.prototype.pointImage.src)+";";J=new mxCell("",new mxGeometry(J,K,6,6),t);J.vertex=!0;J.cp=!0;J.constObj=m;return d.addCell(J)}function u(J){J=d.getSelectionCells();
+d.deleteCells(J)}function z(){var J=parseInt(P.value)||0;J=0>J?0:100<J?100:J;P.value=J;var K=parseInt(y.value)||0;K=0>K?0:100<K?100:K;y.value=K;var m=parseInt(v.value)||0,t=parseInt(L.value)||0;m=new mxConnectionConstraint(new mxPoint(J/100,K/100),!1,null,m,t);J=d.getConnectionPoint(n,m);K=d.getSelectionCell();if(null!=K){K.constObj=m;m=K.geometry.clone();t=d.view.scale;var C=d.view.translate;m.x=(J.x-3*t)/t-C.x;m.y=(J.y-3*t)/t-C.y;d.model.setGeometry(K,m)}}function G(J){if(J.constObj)return{x:J.constObj.point.x,
+y:J.constObj.point.y,dx:J.constObj.dx,dy:J.constObj.dy};var K=0,m=0,t=g.geometry,C=mxUtils.format((J.geometry.x+3-t.x)/t.width);J=mxUtils.format((J.geometry.y+3-t.y)/t.height);0>C?(K=C*t.width,C=0):1<C&&(K=(C-1)*t.width,C=1);0>J?(m=J*t.height,J=0):1<J&&(m=(J-1)*t.height,J=1);return{x:C,y:J,dx:parseInt(K),dy:parseInt(m)}}function E(J){if(1==d.getSelectionCount()){var K=d.getSelectionCell();J&&(K.constObj=null);J=G(K);P.value=100*J.x;y.value=100*J.y;v.value=J.dx;L.value=J.dy;R.style.visibility=""}else R.style.visibility=
"hidden"}var F=document.createElement("div");F.style.width="350px";F.style.height="350px";F.style.overflow="hidden";F.style.borderStyle="solid";F.style.borderWidth="1px";F.style.boxSizing="border-box";mxEvent.disableContextMenu(F);c.appendChild(F);var d=new Graph(F);d.transparentBackground=!1;d.autoExtend=!1;d.autoScroll=!1;d.setGridEnabled(!1);d.setEnabled(!0);d.setPanning(!0);d.setConnectable(!1);d.setTooltips(!1);d.minFitScale=null;d.maxFitScale=null;d.centerZoom=!0;d.maxFitScale=2;F=f.geometry;
-var k=new mxCell(f.value,new mxGeometry(0,0,F.width,F.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;opacity=50;");k.vertex=!0;d.addCell(k);d.dblClick=function(J,K){if(null!=K&&K!=k)d.setSelectionCell(K);else{K=mxUtils.convertPoint(d.container,mxEvent.getClientX(J),mxEvent.getClientY(J));mxEvent.consume(J);J=d.view.scale;var m=d.view.translate;d.setSelectionCell(q((K.x-3*J)/J-m.x,(K.y-3*J)/J-m.y))}};p=new mxKeyHandler(d);p.bindKey(46,u);p.bindKey(8,u);d.getRubberband().isForceRubberbandEvent=
-function(J){return 0==J.evt.button&&(null==J.getCell()||J.getCell()==k)};d.panningHandler.isForcePanningEvent=function(J){return 2==J.evt.button};var l=d.isCellSelectable;d.isCellSelectable=function(J){return J==k?!1:l.apply(this,arguments)};d.getLinkForCell=function(){return null};var n=d.view.getState(k);F=d.getAllConnectionConstraints(n);for(var x=0;null!=F&&x<F.length;x++){var A=d.getConnectionPoint(n,F[x]);q(A.x-3,A.y-3,F[x])}d.fit(8);d.center();x=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
-function(){d.zoomIn()});A=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){d.zoomOut()});var B=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==d.view.scale?(d.maxFitScale=8,d.fit(8)):d.zoomActual();d.center()}),I=function(){b.prompt(mxResources.get("gridSize"),d.gridSize,function(J){!isNaN(J)&&0<J&&(d.setGridSize(J),d.setGridEnabled(!0),d.refresh())})},G=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(J){mxEvent.isShiftDown(J)?
-I():(d.setGridEnabled(!d.isGridEnabled()),d.refresh())});mxEvent.addListener(G,"dblclick",I);var C=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),u);mxUtils.setOpacity(C,10);F=document.createElement("div");F.style.display="flex";F.style.alignItems="center";F.style.paddingTop="6px";F.appendChild(x);F.appendChild(A);F.appendChild(B);F.appendChild(G);F.appendChild(C);c.appendChild(F);var R=document.createElement("input");R.setAttribute("type","number");R.setAttribute("min","1");R.setAttribute("value",
-"1");R.style.width="45px";R.style.position="relative";R.style.margin="0 4px 0 4px";var T=document.createElement("select");T.style.position="relative";A=["left","right","top","bottom"];for(x=0;x<A.length;x++)B=A[x],G=document.createElement("option"),mxUtils.write(G,mxResources.get(B)),G.value=B,T.appendChild(G);x=mxUtils.button(mxResources.get("add"),function(){var J=parseInt(R.value);J=1>J?1:100<J?100:J;R.value=J;for(var K=T.value,m=k.geometry,t=[],D=0;D<J;D++){switch(K){case "left":var M=m.x;var L=
-m.y+(D+1)*m.height/(J+1);break;case "right":M=m.x+m.width;L=m.y+(D+1)*m.height/(J+1);break;case "top":M=m.x+(D+1)*m.width/(J+1);L=m.y;break;case "bottom":M=m.x+(D+1)*m.width/(J+1),L=m.y+m.height}t.push(q(M-3,L-3))}d.setSelectionCells(t)});x.style.marginLeft="auto";F.appendChild(x);F.appendChild(R);F.appendChild(T);var S=document.createElement("div");S.style.margin="4px 0px 8px 0px";S.style.whiteSpace="nowrap";S.style.height="24px";F=document.createElement("span");mxUtils.write(F,mxResources.get("dx"));
-S.appendChild(F);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.setAttribute("max","100");Q.style.width="45px";Q.style.margin="0 4px 0 4px";S.appendChild(Q);mxUtils.write(S,"%");var v=document.createElement("input");v.setAttribute("type","number");v.style.width="45px";v.style.margin="0 4px 0 4px";S.appendChild(v);mxUtils.write(S,"pt");F=document.createElement("span");mxUtils.write(F,mxResources.get("dy"));F.style.marginLeft="12px";S.appendChild(F);
-var z=document.createElement("input");z.setAttribute("type","number");z.setAttribute("min","0");z.setAttribute("max","100");z.style.width="45px";z.style.margin="0 4px 0 4px";S.appendChild(z);mxUtils.write(S,"%");var N=document.createElement("input");N.setAttribute("type","number");N.style.width="45px";N.style.margin="0 4px 0 4px";S.appendChild(N);mxUtils.write(S,"pt");c.appendChild(S);E();d.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<d.getSelectionCount()?mxUtils.setOpacity(C,60):
-mxUtils.setOpacity(C,10);E()});d.addListener(mxEvent.CELLS_MOVED,E);mxEvent.addListener(Q,"change",y);mxEvent.addListener(z,"change",y);mxEvent.addListener(v,"change",y);mxEvent.addListener(N,"change",y);F=mxUtils.button(mxResources.get("cancel"),function(){g();b.hideDialog()});F.className="geBtn";x=mxUtils.button(mxResources.get("apply"),function(){var J=d.model.cells,K=[],m=[],t;for(t in J){var D=J[t];D.cp&&m.push(H(D))}m.sort(function(M,L){return M.x!=L.x?M.x-L.x:M.y!=L.y?M.y-L.y:M.dx!=L.dx?M.dx-
-L.dx:M.dy-L.dy});for(J=0;J<m.length;J++)0<J&&m[J].x==m[J-1].x&&m[J].y==m[J-1].y&&m[J].dx==m[J-1].dx&&m[J].dy==m[J-1].dy||K.push("["+m[J].x+","+m[J].y+",0,"+m[J].dx+","+m[J].dy+"]");b.editor.graph.setCellStyles("points","["+K.join(",")+"]",[f]);g();b.hideDialog()});x.className="geBtn gePrimaryBtn";A=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[f]);g();b.hideDialog()});A.className="geBtn";B=document.createElement("div");B.style.marginTop="10px";B.style.textAlign=
-"right";b.isOffline()||B.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&B.appendChild(F);B.appendChild(A);B.appendChild(x);b.editor.cancelFirst||B.appendChild(F);c.appendChild(B)};this.destroy=g;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);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)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
+var g=new mxCell(f.value,new mxGeometry(0,0,F.width,F.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;opacity=50;");g.vertex=!0;d.addCell(g);d.dblClick=function(J,K){if(null!=K&&K!=g)d.setSelectionCell(K);else{K=mxUtils.convertPoint(d.container,mxEvent.getClientX(J),mxEvent.getClientY(J));mxEvent.consume(J);J=d.view.scale;var m=d.view.translate;d.setSelectionCell(q((K.x-3*J)/J-m.x,(K.y-3*J)/J-m.y))}};p=new mxKeyHandler(d);p.bindKey(46,u);p.bindKey(8,u);d.getRubberband().isForceRubberbandEvent=
+function(J){return 0==J.evt.button&&(null==J.getCell()||J.getCell()==g)};d.panningHandler.isForcePanningEvent=function(J){return 2==J.evt.button};var l=d.isCellSelectable;d.isCellSelectable=function(J){return J==g?!1:l.apply(this,arguments)};d.getLinkForCell=function(){return null};var n=d.view.getState(g);F=d.getAllConnectionConstraints(n);for(var x=0;null!=F&&x<F.length;x++){var A=d.getConnectionPoint(n,F[x]);q(A.x-3,A.y-3,F[x])}d.fit(8);d.center();x=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
+function(){d.zoomIn()});A=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){d.zoomOut()});var B=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==d.view.scale?(d.maxFitScale=8,d.fit(8)):d.zoomActual();d.center()}),I=function(){b.prompt(mxResources.get("gridSize"),d.gridSize,function(J){!isNaN(J)&&0<J&&(d.setGridSize(J),d.setGridEnabled(!0),d.refresh())})},H=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(J){mxEvent.isShiftDown(J)?
+I():(d.setGridEnabled(!d.isGridEnabled()),d.refresh())});mxEvent.addListener(H,"dblclick",I);var D=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),u);mxUtils.setOpacity(D,10);F=document.createElement("div");F.style.display="flex";F.style.alignItems="center";F.style.paddingTop="6px";F.appendChild(x);F.appendChild(A);F.appendChild(B);F.appendChild(H);F.appendChild(D);c.appendChild(F);var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","1");S.setAttribute("value",
+"1");S.style.width="45px";S.style.position="relative";S.style.margin="0 4px 0 4px";var U=document.createElement("select");U.style.position="relative";A=["left","right","top","bottom"];for(x=0;x<A.length;x++)B=A[x],H=document.createElement("option"),mxUtils.write(H,mxResources.get(B)),H.value=B,U.appendChild(H);x=mxUtils.button(mxResources.get("add"),function(){var J=parseInt(S.value);J=1>J?1:100<J?100:J;S.value=J;for(var K=U.value,m=g.geometry,t=[],C=0;C<J;C++){switch(K){case "left":var N=m.x;var M=
+m.y+(C+1)*m.height/(J+1);break;case "right":N=m.x+m.width;M=m.y+(C+1)*m.height/(J+1);break;case "top":N=m.x+(C+1)*m.width/(J+1);M=m.y;break;case "bottom":N=m.x+(C+1)*m.width/(J+1),M=m.y+m.height}t.push(q(N-3,M-3))}d.setSelectionCells(t)});x.style.marginLeft="auto";F.appendChild(x);F.appendChild(S);F.appendChild(U);var R=document.createElement("div");R.style.margin="4px 0px 8px 0px";R.style.whiteSpace="nowrap";R.style.height="24px";F=document.createElement("span");mxUtils.write(F,mxResources.get("dx"));
+R.appendChild(F);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.setAttribute("max","100");P.style.width="45px";P.style.margin="0 4px 0 4px";R.appendChild(P);mxUtils.write(R,"%");var v=document.createElement("input");v.setAttribute("type","number");v.style.width="45px";v.style.margin="0 4px 0 4px";R.appendChild(v);mxUtils.write(R,"pt");F=document.createElement("span");mxUtils.write(F,mxResources.get("dy"));F.style.marginLeft="12px";R.appendChild(F);
+var y=document.createElement("input");y.setAttribute("type","number");y.setAttribute("min","0");y.setAttribute("max","100");y.style.width="45px";y.style.margin="0 4px 0 4px";R.appendChild(y);mxUtils.write(R,"%");var L=document.createElement("input");L.setAttribute("type","number");L.style.width="45px";L.style.margin="0 4px 0 4px";R.appendChild(L);mxUtils.write(R,"pt");c.appendChild(R);E();d.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<d.getSelectionCount()?mxUtils.setOpacity(D,60):
+mxUtils.setOpacity(D,10);E()});d.addListener(mxEvent.CELLS_MOVED,E);mxEvent.addListener(P,"change",z);mxEvent.addListener(y,"change",z);mxEvent.addListener(v,"change",z);mxEvent.addListener(L,"change",z);F=mxUtils.button(mxResources.get("cancel"),function(){k();b.hideDialog()});F.className="geBtn";x=mxUtils.button(mxResources.get("apply"),function(){var J=d.model.cells,K=[],m=[],t;for(t in J){var C=J[t];C.cp&&m.push(G(C))}m.sort(function(N,M){return N.x!=M.x?N.x-M.x:N.y!=M.y?N.y-M.y:N.dx!=M.dx?N.dx-
+M.dx:N.dy-M.dy});for(J=0;J<m.length;J++)0<J&&m[J].x==m[J-1].x&&m[J].y==m[J-1].y&&m[J].dx==m[J-1].dx&&m[J].dy==m[J-1].dy||K.push("["+m[J].x+","+m[J].y+",0,"+m[J].dx+","+m[J].dy+"]");b.editor.graph.setCellStyles("points","["+K.join(",")+"]",[f]);k();b.hideDialog()});x.className="geBtn gePrimaryBtn";A=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[f]);k();b.hideDialog()});A.className="geBtn";B=document.createElement("div");B.style.marginTop="10px";B.style.textAlign=
+"right";b.isOffline()||B.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&B.appendChild(F);B.appendChild(A);B.appendChild(x);b.editor.cancelFirst||B.appendChild(F);c.appendChild(B)};this.destroy=k;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);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)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";
Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";
Editor.thinShapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI5Ljc1IDI5Ljc1Wm0tMTMgNS40NXEuNC4wNS43NS4wNUgxOS4wNXY0LjY1cTAgLjI1LjE3NS40MjV0LjQyNS4xNzVIMzkuOXEuMjUgMCAuNDI1LS4xNzV0LjE3NS0uNDI1VjE5LjY1cTAtLjI1LS4xNzUtLjQyNXQtLjQyNS0uMTc1aC00LjY1VjE3LjVxMC0uMzUtLjA1LS43NWg0LjdxMS4xNSAwIDIgLjg3NS44NS44NzUuODUgMi4wMjVWMzkuOXEwIDEuMTUtLjg1IDItLjg1Ljg1LTIgLjg1SDE5LjY1cS0xLjE1IDAtMi4wMjUtLjg1dC0uODc1LTJabTEuNS0zLjk1cS01LjQ1IDAtOS4yMjUtMy44LTMuNzc1LTMuOC0zLjc3NS05LjIgMC01LjQ1IDMuNzc1LTkuMjI1UTEyLjggNS4yNSAxOC4yNSA1LjI1cTUuNCAwIDkuMiAzLjc3NSAzLjggMy43NzUgMy44IDkuMjI1IDAgNS40LTMuOCA5LjItMy44IDMuOC05LjIgMy44Wm0tLjA1LTIuM3E0LjQ1IDAgNy42LTMuMTI1IDMuMTUtMy4xMjUgMy4xNS03LjU3NXQtMy4xMjUtNy42UTIyLjcgNy41IDE4LjI1IDcuNXQtNy42IDMuMTI1UTcuNSAxMy43NSA3LjUgMTguMnQzLjEyNSA3LjZxMy4xMjUgMy4xNSA3LjU3NSAzLjE1Wm0uMDUtMTAuN1oiLz48L3N2Zz4=";
@@ -12714,884 +12713,890 @@ Editor.chevronLeftImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3d
Editor.rightPanelOpenImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDYwLTMyMHYtMzIwTDMwMC00ODBsMTYwIDE2MFpNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoNTYwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2NTYwcTAgMzMtMjMuNSA1Ni41VDc2MC0xMjBIMjAwWm00NDAtODBoMTIwdi01NjBINjQwdjU2MFptLTgwIDB2LTU2MEgyMDB2NTYwaDM2MFptODAgMGgxMjAtMTIwWiIvPjwvc3ZnPg==";
Editor.rightPanelCloseImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzAwLTY0MHYzMjBsMTYwLTE2MC0xNjAtMTYwWk0yMDAtMTIwcS0zMyAwLTU2LjUtMjMuNVQxMjAtMjAwdi01NjBxMC0zMyAyMy41LTU2LjVUMjAwLTg0MGg1NjBxMzMgMCA1Ni41IDIzLjVUODQwLTc2MHY1NjBxMCAzMy0yMy41IDU2LjVUNzYwLTEyMEgyMDBabTQ0MC04MGgxMjB2LTU2MEg2NDB2NTYwWm0tODAgMHYtNTYwSDIwMHY1NjBoMzYwWm04MCAwaDEyMC0xMjBaIi8+PC9zdmc+";
Editor.spinImage="data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==";
+Editor.svgSpinImage="data:image/svg+xml;base64,77u/PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyMDAgMjAwJz4KICAgIDxyYWRpYWxHcmFkaWVudCBpZD0nYTUnIGN4PScuNjYnIGZ4PScuNjYnIGN5PScuMzEyNScgZnk9Jy4zMTI1JyBncmFkaWVudFRyYW5zZm9ybT0nc2NhbGUoMS41KSc+CiAgICAgICAgPHN0b3Agb2Zmc2V0PScwJyBzdG9wLWNvbG9yPScjNjc2NzY3Jz48L3N0b3A+CiAgICAgICAgPHN0b3Agb2Zmc2V0PScuMycgc3RvcC1jb2xvcj0nIzY3Njc2Nycgc3RvcC1vcGFjaXR5PScuOSc+PC9zdG9wPgogICAgICAgIDxzdG9wIG9mZnNldD0nLjYnIHN0b3AtY29sb3I9JyM2NzY3NjcnIHN0b3Atb3BhY2l0eT0nLjYnPjwvc3RvcD4KICAgICAgICA8c3RvcCBvZmZzZXQ9Jy44JyBzdG9wLWNvbG9yPScjNjc2NzY3JyBzdG9wLW9wYWNpdHk9Jy4zJz48L3N0b3A+CiAgICAgICAgPHN0b3Agb2Zmc2V0PScxJyBzdG9wLWNvbG9yPScjNjc2NzY3JyBzdG9wLW9wYWNpdHk9JzAnPjwvc3RvcD4KICAgIDwvcmFkaWFsR3JhZGllbnQ+CiAgICA8Y2lyY2xlIHRyYW5zZm9ybS1vcmlnaW49J2NlbnRlcicgZmlsbD0nbm9uZScgc3Ryb2tlPSd1cmwoI2E1KScgc3Ryb2tlLXdpZHRoPSc1MCcgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJyBzdHJva2UtZGFzaGFycmF5PScyMDAgMTAwMCcgc3Ryb2tlLWRhc2hvZmZzZXQ9JzAnIGN4PScxMDAnIGN5PScxMDAnIHI9JzcwJz4KICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybSB0eXBlPSdyb3RhdGUnIGF0dHJpYnV0ZU5hbWU9J3RyYW5zZm9ybScgY2FsY01vZGU9J3NwbGluZScgZHVyPScyJyB2YWx1ZXM9JzM2MDswJyBrZXlUaW1lcz0nMDsxJyBrZXlTcGxpbmVzPScwIDAgMSAxJyByZXBlYXRDb3VudD0naW5kZWZpbml0ZSc+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+CiAgICA8Y2lyY2xlIHRyYW5zZm9ybS1vcmlnaW49J2NlbnRlcicgZmlsbD0nbm9uZScgb3BhY2l0eT0nLjInIHN0cm9rZT0nIzY3Njc2Nycgc3Ryb2tlLXdpZHRoPSc1MCcgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJyBjeD0nMTAwJyBjeT0nMTAwJyByPSc3MCc+PC9jaXJjbGU+Cjwvc3ZnPg==";
Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=";
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.enableUncompressedLibraries=!1;Editor.enableCustomProperties=!0;
Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||"1"==urlParams.enableSW||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(m){Editor.enableServiceWorker=!1}Editor.enableWebFonts=
-"1"!=urlParams["safe-style-src"]&&!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.pasteAtMousePointer=!0;Editor.defaultTextStyle="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;";
-Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.gptModel=null!=urlParams["gpt-model"]?decodeURIComponent(urlParams["gpt-model"]):"gpt-3.5-turbo";Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):
-"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.createInheritProperty=function(m,t){return{name:t,dispName:m,type:"bool",defVal:!1,isVisible:function(D,M){return 1==D.vertices.length?(M=M.editorUi.editor.graph.model,D=M.getParent(D.vertices[0]),M.isEdge(D)||M.isVertex(D)):!1},getValue:function(D,M){return"inherit"==
-mxUtils.getValue(D.style,t)},valueChanged:function(D,M,L,O){M=O.editorUi.editor.graph;"1"==D?M.setCellStyles(t,"inherit",L.vertices):M.setCellStyles(t,null,L.vertices)}}};Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(m){m.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(m,
-t){return"1"!=mxUtils.getValue(m.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"comic","0")||"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,
-isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",
-dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch",
-"1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(m,
-t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(m,t){return"1"==
-mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",
-type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,
-"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",
-type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},{val:"round",dispName:"Round"}]},{name:"miterlimit",dispName:"Miter Limit",type:"int",min:1,defVal:4,isVisible:function(m,t){m=mxUtils.getValue(m.style,"linejoin","miter");return"miter"==m||"miter-clip"==m}}];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(m){return"orthogonalEdgeStyle"==mxUtils.getValue(m.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,isVisible:function(m){return"entityRelationEdgeStyle"==mxUtils.getValue(m.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:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",type:"color",defVal:null},{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:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(m){return"1"==mxUtils.getValue(m.style,"flowAnimation",null)}},{name:"flowAnimationTimingFunction",dispName:"Flow Timing",type:"enum",defVal:"linear",enumList:[{val:"linear",dispName:"Linear"},{val:"ease",dispName:"Ease"},{val:"ease-in",dispName:"Ease-in"},
-{val:"ease-out",dispName:"Ease-out"},{val:"ease-in-out",dispName:"Ease-in-out"}],isVisible:function(m){return"1"==mxUtils.getValue(m.style,"flowAnimation",null)}},{name:"flowAnimationDirection",dispName:"Flow Direction",type:"enum",defVal:"normal",enumList:[{val:"normal",dispName:"Normal"},{val:"reverse",dispName:"Reverse"},{val:"alternate",dispName:"Alternate"},{val:"alternate-reverse",dispName:"Alternate-Reverse"}],isVisible:function(m){return"1"==mxUtils.getValue(m.style,"flowAnimation",null)}},
-{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:"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(m,t){t=t.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&t.isTableCell(m.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,
-defVal:1,isVisible:function(m,t){t=t.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&t.isTableCell(m.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(m,t){m=t.editorUi.editor.graph.getCellStyle(1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null);return"1"==mxUtils.getValue(m,"resizeLastRow","0")},isVisible:function(m,t){t=t.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&t.isTable(m.vertices[0])}},
-{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(m,t){m=t.editorUi.editor.graph.getCellStyle(1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null);return"1"==mxUtils.getValue(m,"resizeLast","0")},isVisible:function(m,t){t=t.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&t.isTable(m.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(m,t){return t.editorUi.editor.graph.isCellConnectable(0<
-m.vertices.length&&0==m.edges.length?m.vertices[0]:null)},isVisible:function(m,t){return 0<m.vertices.length&&0==m.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",getDefaultValue:function(m,t){m=0<m.vertices.length&&0==m.edges.length?m.vertices[0]:null;t=t.editorUi.editor.graph;return null!=m&&t.isSwimlane(m)},isVisible:function(m,t){return 0<m.vertices.length&&0==m.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(m,t){m=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;t=t.editorUi.editor.graph;return null!=m&&(t.isSwimlane(m)||0<
-t.model.getChildCount(m))},isVisible:function(m,t){return 1==m.vertices.length&&0==m.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(m,t){var D=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;t=t.editorUi.editor.graph;return null!=D&&(t.isContainer(D)&&"0"!=m.style.collapsible||!t.isContainer(D)&&"1"==m.style.collapsible)},isVisible:function(m,t){return 1==m.vertices.length&&0==m.edges.length}},{name:"recursiveResize",dispName:"Resize Children",
-type:"bool",defVal:!0,isVisible:function(m,t){return 1==m.vertices.length&&0==m.edges.length&&!t.editorUi.editor.graph.isSwimlane(m.vertices[0])&&null==mxUtils.getValue(m.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(m,t){t=t.editorUi.editor.graph.model;return 0<m.vertices.length?t.isVertex(t.getParent(m.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(m,t){m=0<m.vertices.length?t.editorUi.editor.graph.getCellGeometry(m.vertices[0]):null;return null!=m&&!m.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",
-defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(m,t){return 0<m.vertices.length&&t.editorUi.editor.graph.isAutoSizeCell(m.vertices[0])}},{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(m,t){var D=mxUtils.getValue(m.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||t.editorUi.editor.graph.isSwimlane(m.vertices[0])||
-null==D||D==mxConstants.NONE||0==mxUtils.getValue(m.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(m.style,mxConstants.STYLE_OPACITY,100)||null!=m.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(m,t){return 0<m.vertices.length&&t.editorUi.editor.graph.isContainer(m.vertices[0])}},Editor.createInheritProperty("Inherit Font Family",mxConstants.STYLE_FONTFAMILY),Editor.createInheritProperty("Inherit Font Size",mxConstants.STYLE_FONTSIZE),
-Editor.createInheritProperty("Inherit Font Color",mxConstants.STYLE_FONTCOLOR),Editor.createInheritProperty("Inherit Fill Color",mxConstants.STYLE_FILLCOLOR),Editor.createInheritProperty("Inherit Stroke Color",mxConstants.STYLE_STROKECOLOR)].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## An optional data object can be specified to define the metadata for the connector.\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, width 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,,[email protected],default,#6c8ebf,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.canvasSupported=!1;(function(){try{var m=document.createElement("canvas");Editor.canvasSupported=!(!m.getContext||!m.getContext("2d"))}catch(t){}})();Editor.useCanvasForExport=!1;(function(){try{var m=document.createElement("canvas"),t=new Image;t.onload=function(){try{m.getContext("2d").drawImage(t,0,0);var D=m.toDataURL("image/png");Editor.useCanvasForExport=null!=D&&6<D.length}catch(M){}};t.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(D){}})();
-Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var m=document.createElement("canvas");m.width=m.height=1;var t=m.toDataURL("image/jpeg");Editor.jpgSupported=null!==t.match("image/jpeg");t=m.toDataURL("image/webp");Editor.webpSupported=null!==t.match("image/webp")}catch(D){}})();Editor.loadCompatibleCss=function(m){mxUtils.lightDarkColorSupported||mxUtils.get(m||"styles/grapheditor.css",mxUtils.bind(this,function(t){if(200<=t.getStatus()&&299>=t.getStatus()){var D=document.createElement("style");
-D.type="text/css";var M=D.appendChild,L=document,O=L.createTextNode;t=t.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(t=t.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(P){}M.call(D,O.call(L,t));document.head.appendChild(D)}}))};Editor.createRoughCanvas=function(m){var t=
-rough.canvas({getContext:function(){return m}});t.draw=function(D){var M=D.sets||[];D=D.options||this.getDefaultOptions();for(var L=0;L<M.length;L++){var O=M[L];switch(O.type){case "path":null!=D.stroke&&this._drawToContext(m,O,D);break;case "fillPath":this._drawToContext(m,O,D);break;case "fillSketch":this.fillSketch(m,O,D)}}};t.fillSketch=function(D,M,L){var O=m.state.strokeColor,P=m.state.strokeWidth,U=m.state.strokeAlpha,V=m.state.dashed,X=L.fillWeight;0>X&&(X=L.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);
-m.setStrokeColor(L.fill||"");m.setStrokeWidth(X);m.setDashed(!1);this._drawToContext(D,M,L);m.setDashed(V);m.setStrokeWidth(P);m.setStrokeColor(O);m.setStrokeAlpha(U)};t._drawToContext=function(D,M,L){D.begin();for(var O=0;O<M.ops.length;O++){var P=M.ops[O],U=P.data;switch(P.op){case "move":D.moveTo(U[0],U[1]);break;case "bcurveTo":D.curveTo(U[0],U[1],U[2],U[3],U[4],U[5]);break;case "lineTo":D.lineTo(U[0],U[1])}}D.end();"fillPath"===M.type&&L.filled?D.fill():D.stroke()};return t};(function(){function m(O,
-P,U){this.canvas=O;this.rc=P;this.shape=U;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,m.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;
+!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.pasteAtMousePointer=!0;Editor.defaultTextStyle="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;";
+Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.geminiApiKey=null!=urlParams["gemini-api-key"]?decodeURIComponent(urlParams["gemini-api-key"]):null;Editor.gptModels={"GPT-5.1":"gpt-5.1-2025-11-13","GPT-4.1":"gpt-4.1-2025-04-14",
+"GPT-4o":"chatgpt-4o-latest","GPT-3.5":"gpt-3.5-turbo-0125","Gemini 3 Pro Preview":"gemini-3-pro-preview","Gemini 2.5 Pro":"gemini-2.5-pro","Gemini 2.5 Flash":"gemini-2.5-flash","Gemini 2.0 Flash":"gemini-2.0-flash"};Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=
+null;Editor.createInheritProperty=function(m,t){return{name:t,dispName:m,type:"bool",defVal:!1,isVisible:function(C,N){return 1==C.vertices.length?(N=N.editorUi.editor.graph.model,C=N.getParent(C.vertices[0]),N.isEdge(C)||N.isVertex(C)):!1},getValue:function(C,N){return"inherit"==mxUtils.getValue(C.style,t)},valueChanged:function(C,N,M,O){N=O.editorUi.editor.graph;"1"==C?N.setCellStyles(t,"inherit",M.vertices):N.setCellStyles(t,null,M.vertices)}}};Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",
+type:"bool",defVal:!1,onChange:function(m){m.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(m,t){return"1"!=mxUtils.getValue(m.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"comic","0")||"1"==mxUtils.getValue(m.style,
+"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(m,t){return"1"==
+mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",
+type:"bool",defVal:!1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},
+{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],
+isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*
+mxConstants.SHADOW_OPACITY},isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,
+dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(m,t){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,
+mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},{val:"round",dispName:"Round"}]},{name:"miterlimit",dispName:"Miter Limit",type:"int",min:1,defVal:4,
+isVisible:function(m,t){m=mxUtils.getValue(m.style,"linejoin","miter");return"miter"==m||"miter-clip"==m}}];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(m){return"orthogonalEdgeStyle"==mxUtils.getValue(m.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,isVisible:function(m){return"entityRelationEdgeStyle"==
+mxUtils.getValue(m.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:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",type:"color",defVal:null},{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:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(m){return"1"==mxUtils.getValue(m.style,"flowAnimation",null)}},{name:"flowAnimationTimingFunction",
+dispName:"Flow Timing",type:"enum",defVal:"linear",enumList:[{val:"linear",dispName:"Linear"},{val:"ease",dispName:"Ease"},{val:"ease-in",dispName:"Ease-in"},{val:"ease-out",dispName:"Ease-out"},{val:"ease-in-out",dispName:"Ease-in-out"}],isVisible:function(m){return"1"==mxUtils.getValue(m.style,"flowAnimation",null)}},{name:"flowAnimationDirection",dispName:"Flow Direction",type:"enum",defVal:"normal",enumList:[{val:"normal",dispName:"Normal"},{val:"reverse",dispName:"Reverse"},{val:"alternate",
+dispName:"Alternate"},{val:"alternate-reverse",dispName:"Alternate-Reverse"}],isVisible:function(m){return"1"==mxUtils.getValue(m.style,"flowAnimation",null)}},{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:"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(m,t){t=t.editorUi.editor.graph;
+return 1==m.vertices.length&&0==m.edges.length&&t.isTableCell(m.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(m,t){t=t.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&t.isTableCell(m.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(m,t){m=t.editorUi.editor.graph.getCellStyle(1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null);return"1"==mxUtils.getValue(m,
+"resizeLastRow","0")},isVisible:function(m,t){t=t.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&t.isTable(m.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(m,t){m=t.editorUi.editor.graph.getCellStyle(1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null);return"1"==mxUtils.getValue(m,"resizeLast","0")},isVisible:function(m,t){t=t.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&t.isTable(m.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(m,t){return t.editorUi.editor.graph.isCellConnectable(0<m.vertices.length&&0==m.edges.length?m.vertices[0]:null)},isVisible:function(m,t){return 0<m.vertices.length&&0==m.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",getDefaultValue:function(m,t){m=0<m.vertices.length&&0==m.edges.length?m.vertices[0]:null;t=t.editorUi.editor.graph;return null!=m&&t.isSwimlane(m)},isVisible:function(m,t){return 0<m.vertices.length&&0==m.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(m,
+t){m=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;t=t.editorUi.editor.graph;return null!=m&&(t.isSwimlane(m)||0<t.model.getChildCount(m))},isVisible:function(m,t){return 1==m.vertices.length&&0==m.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(m,t){var C=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;t=t.editorUi.editor.graph;return null!=C&&(t.isContainer(C)&&"0"!=m.style.collapsible||!t.isContainer(C)&&"1"==m.style.collapsible)},
+isVisible:function(m,t){return 1==m.vertices.length&&0==m.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(m,t){return 1==m.vertices.length&&0==m.edges.length&&!t.editorUi.editor.graph.isSwimlane(m.vertices[0])&&null==mxUtils.getValue(m.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(m,t){t=t.editorUi.editor.graph.model;return 0<m.vertices.length?
+t.isVertex(t.getParent(m.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(m,t){m=0<m.vertices.length?t.editorUi.editor.graph.getCellGeometry(m.vertices[0]):null;return null!=m&&!m.relative}},
+{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(m,t){return 0<m.vertices.length&&t.editorUi.editor.graph.isAutoSizeCell(m.vertices[0])}},{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(m,
+t){var C=mxUtils.getValue(m.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||t.editorUi.editor.graph.isSwimlane(m.vertices[0])||null==C||C==mxConstants.NONE||0==mxUtils.getValue(m.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(m.style,mxConstants.STYLE_OPACITY,100)||null!=m.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(m,t){return 0<m.vertices.length&&t.editorUi.editor.graph.isContainer(m.vertices[0])}},
+Editor.createInheritProperty("Inherit Font Family",mxConstants.STYLE_FONTFAMILY),Editor.createInheritProperty("Inherit Font Size",mxConstants.STYLE_FONTSIZE),Editor.createInheritProperty("Inherit Font Color",mxConstants.STYLE_FONTCOLOR),Editor.createInheritProperty("Inherit Fill Color",mxConstants.STYLE_FILLCOLOR),Editor.createInheritProperty("Inherit Stroke Color",mxConstants.STYLE_STROKECOLOR)].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## An optional data object can be specified to define the metadata for the connector.\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, width 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,,[email protected],default,#6c8ebf,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.canvasSupported=!1;(function(){try{var m=document.createElement("canvas");Editor.canvasSupported=!(!m.getContext||!m.getContext("2d"))}catch(t){}})();Editor.useCanvasForExport=!1;(function(){try{var m=document.createElement("canvas"),t=new Image;t.onload=function(){try{m.getContext("2d").drawImage(t,0,0);var C=m.toDataURL("image/png");Editor.useCanvasForExport=null!=C&&6<C.length}catch(N){}};t.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(C){}})();
+Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var m=document.createElement("canvas");m.width=m.height=1;var t=m.toDataURL("image/jpeg");Editor.jpgSupported=null!==t.match("image/jpeg");t=m.toDataURL("image/webp");Editor.webpSupported=null!==t.match("image/webp")}catch(C){}})();Editor.loadCompatibleCss=function(m){mxUtils.lightDarkColorSupported||mxUtils.get(m||"styles/grapheditor.css",mxUtils.bind(this,function(t){if(200<=t.getStatus()&&299>=t.getStatus()){var C=document.createElement("style");
+C.type="text/css";var N=C.appendChild,M=document,O=M.createTextNode;t=t.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(t=t.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(Q){}N.call(C,O.call(M,t));document.head.appendChild(C)}}))};Editor.createRoughCanvas=function(m){var t=
+rough.canvas({getContext:function(){return m}});t.draw=function(C){var N=C.sets||[];C=C.options||this.getDefaultOptions();for(var M=0;M<N.length;M++){var O=N[M];switch(O.type){case "path":null!=C.stroke&&this._drawToContext(m,O,C);break;case "fillPath":this._drawToContext(m,O,C);break;case "fillSketch":this.fillSketch(m,O,C)}}};t.fillSketch=function(C,N,M){var O=m.state.strokeColor,Q=m.state.strokeWidth,T=m.state.strokeAlpha,V=m.state.dashed,X=M.fillWeight;0>X&&(X=M.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);
+m.setStrokeColor(M.fill||"");m.setStrokeWidth(X);m.setDashed(!1);this._drawToContext(C,N,M);m.setDashed(V);m.setStrokeWidth(Q);m.setStrokeColor(O);m.setStrokeAlpha(T)};t._drawToContext=function(C,N,M){C.begin();for(var O=0;O<N.ops.length;O++){var Q=N.ops[O],T=Q.data;switch(Q.op){case "move":C.moveTo(T[0],T[1]);break;case "bcurveTo":C.curveTo(T[0],T[1],T[2],T[3],T[4],T[5]);break;case "lineTo":C.lineTo(T[0],T[1])}}C.end();"fillPath"===N.type&&M.filled?C.fill():C.stroke()};return t};(function(){function m(O,
+Q,T){this.canvas=O;this.rc=Q;this.shape=T;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,m.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;
this.canvas.ellipse=mxUtils.bind(this,m.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,m.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,m.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,m.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,m.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=
mxUtils.bind(this,m.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,m.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,m.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,m.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,m.prototype.fillAndStroke);this.path=[];this.passThrough=!1}m.prototype.moveOp="M";m.prototype.lineOp=
-"L";m.prototype.quadOp="Q";m.prototype.curveOp="C";m.prototype.closeOp="Z";m.prototype.getStyle=function(O,P){var U=1;if(null!=this.shape.state){var V=this.shape.state.cell.id;if(null!=V)for(var X=0;X<V.length;X++)U=(U<<5)-U+V.charCodeAt(X)<<0}U={strokeWidth:this.canvas.state.strokeWidth,seed:U,preserveVertices:!0};V=this.rc.getDefaultOptions();U.stroke=O?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;O=null;(U.filled=P)?(U.fill=this.canvas.state.fillColor===
-mxConstants.NONE?"":this.canvas.state.fillColor,O=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):U.fill="";U.bowing=mxUtils.getValue(this.shape.style,"bowing",V.bowing);U.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",V.hachureAngle);U.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",V.curveFitting);U.roughness=mxUtils.getValue(this.shape.style,"jiggle",V.roughness);U.simplification=mxUtils.getValue(this.shape.style,"simplification",
-V.simplification);U.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",V.disableMultiStroke);U.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",V.disableMultiStrokeFill);P=mxUtils.getValue(this.shape.style,"hachureGap",-1);U.hachureGap="auto"==P?-1:P;U.dashGap=mxUtils.getValue(this.shape.style,"dashGap",P);U.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",P);U.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",P);P=mxUtils.getValue(this.shape.style,
-"fillWeight",-1);U.fillWeight="auto"==P?-1:P;P=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==P&&(P="auto");"auto"==P&&(P=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&P.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&P.push(mxUtils.hex2rgb(Editor.darkColor)),P=null!=U.fill&&(null!=O||0<=mxUtils.indexOf(P,mxUtils.hex2rgb(U.fill)))?"solid":V.fillStyle);U.fillStyle=P;return U};m.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
-arguments):this.path=[]};m.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};m.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var O=2;O<arguments.length;O+=2)this.lastX=arguments[O-1],this.lastY=arguments[O],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};m.prototype.lineTo=function(O,P){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
-O,P),this.lastX=O,this.lastY=P)};m.prototype.moveTo=function(O,P){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,O,P),this.lastX=O,this.lastY=P,this.firstX=O,this.firstY=P)};m.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};m.prototype.quadTo=function(O,P,U,V){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,O,P,U,V),this.lastX=U,this.lastY=V)};
-m.prototype.curveTo=function(O,P,U,V,X,W){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,O,P,U,V,X,W),this.lastX=X,this.lastY=W)};m.prototype.arcTo=function(O,P,U,V,X,W,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Z=mxUtils.arcToCurves(this.lastX,this.lastY,O,P,U,V,X,W,Y);if(null!=Z)for(var aa=0;aa<Z.length;aa+=6)this.curveTo(Z[aa],Z[aa+1],Z[aa+2],Z[aa+3],Z[aa+4],Z[aa+5]);this.lastX=W;this.lastY=Y}};m.prototype.rect=function(O,
-P,U,V){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(O,P,U,V,this.getStyle(!0,!0)))};m.prototype.ellipse=function(O,P,U,V){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(O+U/2,P+V/2,U,V,this.getStyle(!0,!0)))};m.prototype.roundrect=function(O,P,U,V,X,W){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(O+
-X,P),this.lineTo(O+U-X,P),this.quadTo(O+U,P,O+U,P+W),this.lineTo(O+U,P+V-W),this.quadTo(O+U,P+V,O+U-X,P+V),this.lineTo(O+X,P+V),this.quadTo(O,P+V,O,P+V-W),this.lineTo(O,P+W),this.quadTo(O,P,O+X,P))};m.prototype.drawPath=function(O){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),O)}catch(U){}this.passThrough=!1}else if(null!=this.nextShape){for(var P in O)this.nextShape.options[P]=O[P];O.stroke!=mxConstants.NONE&&null!=O.stroke||delete this.nextShape.options.stroke;
+"L";m.prototype.quadOp="Q";m.prototype.curveOp="C";m.prototype.closeOp="Z";m.prototype.getStyle=function(O,Q){var T=1;if(null!=this.shape.state){var V=this.shape.state.cell.id;if(null!=V)for(var X=0;X<V.length;X++)T=(T<<5)-T+V.charCodeAt(X)<<0}T={strokeWidth:this.canvas.state.strokeWidth,seed:T,preserveVertices:!0};V=this.rc.getDefaultOptions();T.stroke=O?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;O=null;(T.filled=Q)?(T.fill=this.canvas.state.fillColor===
+mxConstants.NONE?"":this.canvas.state.fillColor,O=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):T.fill="";T.bowing=mxUtils.getValue(this.shape.style,"bowing",V.bowing);T.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",V.hachureAngle);T.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",V.curveFitting);T.roughness=mxUtils.getValue(this.shape.style,"jiggle",V.roughness);T.simplification=mxUtils.getValue(this.shape.style,"simplification",
+V.simplification);T.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",V.disableMultiStroke);T.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",V.disableMultiStrokeFill);Q=mxUtils.getValue(this.shape.style,"hachureGap",-1);T.hachureGap="auto"==Q?-1:Q;T.dashGap=mxUtils.getValue(this.shape.style,"dashGap",Q);T.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",Q);T.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",Q);Q=mxUtils.getValue(this.shape.style,
+"fillWeight",-1);T.fillWeight="auto"==Q?-1:Q;Q=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==Q&&(Q="auto");"auto"==Q&&(Q=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&Q.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&Q.push(mxUtils.hex2rgb(Editor.darkColor)),Q=null!=T.fill&&(null!=O||0<=mxUtils.indexOf(Q,mxUtils.hex2rgb(T.fill)))?"solid":V.fillStyle);T.fillStyle=Q;return T};m.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
+arguments):this.path=[]};m.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};m.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var O=2;O<arguments.length;O+=2)this.lastX=arguments[O-1],this.lastY=arguments[O],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};m.prototype.lineTo=function(O,Q){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
+O,Q),this.lastX=O,this.lastY=Q)};m.prototype.moveTo=function(O,Q){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,O,Q),this.lastX=O,this.lastY=Q,this.firstX=O,this.firstY=Q)};m.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};m.prototype.quadTo=function(O,Q,T,V){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,O,Q,T,V),this.lastX=T,this.lastY=V)};
+m.prototype.curveTo=function(O,Q,T,V,X,W){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,O,Q,T,V,X,W),this.lastX=X,this.lastY=W)};m.prototype.arcTo=function(O,Q,T,V,X,W,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Z=mxUtils.arcToCurves(this.lastX,this.lastY,O,Q,T,V,X,W,Y);if(null!=Z)for(var aa=0;aa<Z.length;aa+=6)this.curveTo(Z[aa],Z[aa+1],Z[aa+2],Z[aa+3],Z[aa+4],Z[aa+5]);this.lastX=W;this.lastY=Y}};m.prototype.rect=function(O,
+Q,T,V){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(O,Q,T,V,this.getStyle(!0,!0)))};m.prototype.ellipse=function(O,Q,T,V){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(O+T/2,Q+V/2,T,V,this.getStyle(!0,!0)))};m.prototype.roundrect=function(O,Q,T,V,X,W){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(O+
+X,Q),this.lineTo(O+T-X,Q),this.quadTo(O+T,Q,O+T,Q+W),this.lineTo(O+T,Q+V-W),this.quadTo(O+T,Q+V,O+T-X,Q+V),this.lineTo(O+X,Q+V),this.quadTo(O,Q+V,O,Q+V-W),this.lineTo(O,Q+W),this.quadTo(O,Q,O+X,Q))};m.prototype.drawPath=function(O){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),O)}catch(T){}this.passThrough=!1}else if(null!=this.nextShape){for(var Q in O)this.nextShape.options[Q]=O[Q];O.stroke!=mxConstants.NONE&&null!=O.stroke||delete this.nextShape.options.stroke;
O.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};m.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};m.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};m.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
!0))};m.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(O){return new m(O,Editor.createRoughCanvas(O),this)};var t=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(O){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?t.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(O):
-this.createRoughCanvas(O)};var D=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(O,P,U,V,X){null!=O.handJiggle&&O.handJiggle.passThrough||D.apply(this,arguments)};var M=mxShape.prototype.paint;mxShape.prototype.paint=function(O){var P=O.addTolerance,U=!0;null!=this.style&&(U="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=O.handJiggle&&O.handJiggle.constructor==m&&!this.outline){O.save();var V=this.fill,X=this.stroke;this.stroke=
-this.fill=null;var W=this.configurePointerEvents,Y=O.setStrokeColor;O.setStrokeColor=function(){};var Z=O.setFillColor;O.setFillColor=function(){};U||null==V||(this.configurePointerEvents=function(){});O.handJiggle.passThrough=!0;M.apply(this,arguments);O.handJiggle.passThrough=!1;O.setFillColor=Z;O.setStrokeColor=Y;this.configurePointerEvents=W;this.stroke=X;this.fill=V;O.restore();U&&null!=V&&(O.addTolerance=function(){})}M.apply(this,arguments);O.addTolerance=P};var L=mxShape.prototype.paintGlassEffect;
-mxShape.prototype.paintGlassEffect=function(O,P,U,V,X,W){null!=O.handJiggle&&O.handJiggle.constructor==m?(O.handJiggle.passThrough=!0,L.apply(this,arguments),O.handJiggle.passThrough=!1):L.apply(this,arguments)}})();Editor.fastCompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:Graph.arrayBufferToString(pako.deflateRaw(m))};Editor.fastDecompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:pako.inflateRaw(Graph.stringToArrayBuffer(atob(m)),{to:"string"})};
-Editor.extractGraphModel=function(m,t,D){if(null!=m&&"undefined"!==typeof pako){var M=m.ownerDocument.getElementsByTagName("div"),L=[];if(null!=M&&0<M.length)for(var O=0;O<M.length;O++)if("mxgraph"==M[O].getAttribute("class")){L.push(M[O]);break}0<L.length&&(M=L[0].getAttribute("data-mxgraph"),null!=M?(L=JSON.parse(M),null!=L&&null!=L.xml&&(m=mxUtils.parseXml(L.xml),m=m.documentElement)):(L=L[0].getElementsByTagName("div"),0<L.length&&(M=mxUtils.getTextContent(L[0]),M=Graph.decompress(M,null,D),0<
-M.length&&(m=mxUtils.parseXml(M),m=m.documentElement))))}if(null!=m&&"svg"==m.nodeName)if(M=m.getAttribute("content"),null!=M&&"<"!=M.charAt(0)&&"%"!=M.charAt(0)&&(M=unescape(window.atob?atob(M):Base64.decode(cont,M))),null!=M&&"%"==M.charAt(0)&&(M=decodeURIComponent(M)),null!=M&&0<M.length)m=mxUtils.parseXml(M).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==m||t||(L=null,"diagram"==m.nodeName?L=m:"mxfile"==m.nodeName&&(M=m.getElementsByTagName("diagram"),0<M.length&&
-(L=M[Math.max(0,Math.min(M.length-1,urlParams.page||0))])),null!=L&&(m=Editor.parseDiagramNode(L,D)));null==m||"mxGraphModel"==m.nodeName||t&&"mxfile"==m.nodeName||(m=null);return m};Editor.parseDiagramNode=function(m,t,D){Editor.validateDiagramNode(m);var M=mxUtils.trim(mxUtils.getTextContent(m)),L=null;0<M.length?(t=Graph.decompress(M,null,t),null!=t&&0<t.length&&(L=mxUtils.parseXml(t).documentElement)):(m=mxUtils.getChildNodes(m),0<m.length&&(L=m[0],D&&(L=Editor.parseDiagramNode(L,t,!1)),t=mxUtils.createXmlDocument(),
-t.appendChild(t.importNode(L,!0)),L=t.documentElement));return L};Editor.getDiagramNodeXml=function(m){Editor.validateDiagramNode(m);var t=mxUtils.getNodeValue(m),D=null;0<t.length?D=Graph.decompress(t):(m=m.getElementsByTagName("mxGraphModel"),null!=m&&0<m.length&&(D=mxUtils.getXml(m[0])));return D};Editor.validateDiagramNode=function(m){if(0==mxUtils.trim(mxUtils.getTextContent(m)).length&&0==mxUtils.getChildNodes(m).length){var t=new mxCodec,D=new mxGraphModel;m.appendChild(t.encode(D))}return m};
-Editor.extractGraphModelFromPdf=function(m){var t=null;m=m.substring(m.indexOf(",")+1);m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0);if("%PDF-1.7"==m.substring(0,8)){var D=m.indexOf("EmbeddedFile");if(-1<D){var M=m.indexOf("stream",D)+9;if(0<m.substring(D,M).indexOf("application#2Fvnd.jgraph.mxfile")){var L=m.indexOf("endstream",M-1);return pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(M,L)),{to:"string"})}}for(D=m.indexOf("/ObjStm");0<D;){M=m.indexOf("stream",D)+9;L=m.indexOf("endstream",
-M-1);M=pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(M,L)),{to:"string"});L=M.indexOf("/Subject <");if(0<L){D=M.substring(L+14,M.indexOf(">",L));if(null!=D){t=D;D=[];for(M=0;M<t.length;M+=2)L=t.substr(M,2),"00"!=L&&D.push(String.fromCharCode(parseInt(L,16)));t=D.join("")}break}D=m.indexOf("/ObjStm",D+1)}}if(null==t&&"%PDF-1.4"==m.substring(0,8)){D="";L=M=0;for(var O=[],P=null;L<m.length;){var U=m.charCodeAt(L);L+=1;10!=U&&(D+=String.fromCharCode(U));U=="/Subject (%3Cmxfile".charCodeAt(M)?
-M++:M=0;if(19==M){var V=m.indexOf("%3C%2Fmxfile%3E",L)+15;L-=9;if(V>L){t=m.substring(L,V);break}}10==U&&("endobj"==D?P=null:"obj"==D.substring(D.length-3,D.length)||"xref"==D||"trailer"==D?(P=[],O[D.split(" ")[0]]=P):null!=P&&P.push(D),D="")}}null==t&&null!=O&&(t=Editor.extractGraphModelFromXref(O));null!=t&&(t=decodeURIComponent(t.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return t};Editor.extractGraphModelFromXref=function(m){var t=m.trailer,D=null;null!=t&&(t=/.* \/Info (\d+) (\d+) R/g.exec(t.join("\n")),
-null!=t&&0<t.length&&(t=m[t[1]],null!=t&&(t=/.* \/Subject (\d+) (\d+) R/g.exec(t.join("\n")),null!=t&&0<t.length&&(m=m[t[1]],null!=m&&(m=m.join("\n"),D=m.substring(1,m.length-1))))));return D};Editor.extractParserError=function(m,t){var D=null;m=null!=m?m.getElementsByTagName("parsererror"):null;null!=m&&0<m.length&&(D=t||mxResources.get("invalidChars"),t=m[0].getElementsByTagName("div"),0<t.length&&(D=mxUtils.getTextContent(t[0])));return null!=D?mxUtils.trim(D):D};Editor.addRetryToError=function(m,
-t){null!=m&&(m=null!=m.error?m.error:m,null==m.retry&&(m.retry=t))};Editor.mermaidToDrawio=function(m,t,D){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(m,t,D)};Editor.configure=function(m){if(null!=m){Editor.config=m;Editor.configVersion=m.version;m.debug&&(urlParams.test="1");if(null!=m.customCss){var t=document.createElement("style");t.type="text/css";t.appendChild(document.createTextNode(m.customCss));document.head.appendChild(t)}null!=m.defaultFonts&&(Menus.prototype.defaultFonts=
+this.createRoughCanvas(O)};var C=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(O,Q,T,V,X){null!=O.handJiggle&&O.handJiggle.passThrough||C.apply(this,arguments)};var N=mxShape.prototype.paint;mxShape.prototype.paint=function(O){var Q=O.addTolerance,T=!0;null!=this.style&&(T="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=O.handJiggle&&O.handJiggle.constructor==m&&!this.outline){O.save();var V=this.fill,X=this.stroke;this.stroke=
+this.fill=null;var W=this.configurePointerEvents,Y=O.setStrokeColor;O.setStrokeColor=function(){};var Z=O.setFillColor;O.setFillColor=function(){};T||null==V||(this.configurePointerEvents=function(){});O.handJiggle.passThrough=!0;N.apply(this,arguments);O.handJiggle.passThrough=!1;O.setFillColor=Z;O.setStrokeColor=Y;this.configurePointerEvents=W;this.stroke=X;this.fill=V;O.restore();T&&null!=V&&(O.addTolerance=function(){})}N.apply(this,arguments);O.addTolerance=Q};var M=mxShape.prototype.paintGlassEffect;
+mxShape.prototype.paintGlassEffect=function(O,Q,T,V,X,W){null!=O.handJiggle&&O.handJiggle.constructor==m?(O.handJiggle.passThrough=!0,M.apply(this,arguments),O.handJiggle.passThrough=!1):M.apply(this,arguments)}})();Editor.fastCompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:Graph.arrayBufferToString(pako.deflateRaw(m))};Editor.fastDecompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:pako.inflateRaw(Graph.stringToArrayBuffer(atob(m)),{to:"string"})};
+Editor.extractGraphModel=function(m,t,C){if(null!=m&&"undefined"!==typeof pako){var N=m.ownerDocument.getElementsByTagName("div"),M=[];if(null!=N&&0<N.length)for(var O=0;O<N.length;O++)if("mxgraph"==N[O].getAttribute("class")){M.push(N[O]);break}0<M.length&&(N=M[0].getAttribute("data-mxgraph"),null!=N?(M=JSON.parse(N),null!=M&&null!=M.xml&&(m=mxUtils.parseXml(M.xml),m=m.documentElement)):(M=M[0].getElementsByTagName("div"),0<M.length&&(N=mxUtils.getTextContent(M[0]),N=Graph.decompress(N,null,C),0<
+N.length&&(m=mxUtils.parseXml(N),m=m.documentElement))))}if(null!=m&&"svg"==m.nodeName)if(N=m.getAttribute("content"),null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(cont,N))),null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N)),null!=N&&0<N.length)m=mxUtils.parseXml(N).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==m||t||(M=null,"diagram"==m.nodeName?M=m:"mxfile"==m.nodeName&&(N=m.getElementsByTagName("diagram"),0<N.length&&
+(M=N[Math.max(0,Math.min(N.length-1,urlParams.page||0))])),null!=M&&(m=Editor.parseDiagramNode(M,C)));null==m||"mxGraphModel"==m.nodeName||t&&"mxfile"==m.nodeName||(m=null);return m};Editor.parseDiagramNode=function(m,t,C){Editor.validateDiagramNode(m);var N=mxUtils.trim(mxUtils.getTextContent(m)),M=null;0<N.length?(t=Graph.decompress(N,null,t),null!=t&&0<t.length&&(M=mxUtils.parseXml(t).documentElement)):(m=mxUtils.getChildNodes(m),0<m.length&&(M=m[0],C&&(M=Editor.parseDiagramNode(M,t,!1)),t=mxUtils.createXmlDocument(),
+t.appendChild(t.importNode(M,!0)),M=t.documentElement));return M};Editor.getDiagramNodeXml=function(m){Editor.validateDiagramNode(m);var t=mxUtils.getNodeValue(m),C=null;0<t.length?C=Graph.decompress(t):(m=m.getElementsByTagName("mxGraphModel"),null!=m&&0<m.length&&(C=mxUtils.getXml(m[0])));return C};Editor.validateDiagramNode=function(m){if(0==mxUtils.trim(mxUtils.getTextContent(m)).length&&0==mxUtils.getChildNodes(m).length){var t=new mxCodec,C=new mxGraphModel;m.appendChild(t.encode(C))}return m};
+Editor.extractGraphModelFromPdf=function(m){var t=null;m=m.substring(m.indexOf(",")+1);m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0);if("%PDF-1.7"==m.substring(0,8)){var C=m.indexOf("EmbeddedFile");if(-1<C){var N=m.indexOf("stream",C)+9;if(0<m.substring(C,N).indexOf("application#2Fvnd.jgraph.mxfile")){var M=m.indexOf("endstream",N-1);return pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(N,M)),{to:"string"})}}for(C=m.indexOf("/ObjStm");0<C;){N=m.indexOf("stream",C)+9;M=m.indexOf("endstream",
+N-1);N=pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(N,M)),{to:"string"});M=N.indexOf("/Subject <");if(0<M){C=N.substring(M+14,N.indexOf(">",M));if(null!=C){t=C;C=[];for(N=0;N<t.length;N+=2)M=t.substr(N,2),"00"!=M&&C.push(String.fromCharCode(parseInt(M,16)));t=C.join("")}break}C=m.indexOf("/ObjStm",C+1)}}if(null==t&&"%PDF-1.4"==m.substring(0,8)){C="";M=N=0;for(var O=[],Q=null;M<m.length;){var T=m.charCodeAt(M);M+=1;10!=T&&(C+=String.fromCharCode(T));T=="/Subject (%3Cmxfile".charCodeAt(N)?
+N++:N=0;if(19==N){var V=m.indexOf("%3C%2Fmxfile%3E",M)+15;M-=9;if(V>M){t=m.substring(M,V);break}}10==T&&("endobj"==C?Q=null:"obj"==C.substring(C.length-3,C.length)||"xref"==C||"trailer"==C?(Q=[],O[C.split(" ")[0]]=Q):null!=Q&&Q.push(C),C="")}}null==t&&null!=O&&(t=Editor.extractGraphModelFromXref(O));null!=t&&(t=decodeURIComponent(t.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return t};Editor.extractGraphModelFromXref=function(m){var t=m.trailer,C=null;null!=t&&(t=/.* \/Info (\d+) (\d+) R/g.exec(t.join("\n")),
+null!=t&&0<t.length&&(t=m[t[1]],null!=t&&(t=/.* \/Subject (\d+) (\d+) R/g.exec(t.join("\n")),null!=t&&0<t.length&&(m=m[t[1]],null!=m&&(m=m.join("\n"),C=m.substring(1,m.length-1))))));return C};Editor.extractParserError=function(m,t){var C=null;m=null!=m?m.getElementsByTagName("parsererror"):null;null!=m&&0<m.length&&(C=t||mxResources.get("invalidChars"),t=m[0].getElementsByTagName("div"),0<t.length&&(C=mxUtils.getTextContent(t[0])));return null!=C?mxUtils.trim(C):C};Editor.addRetryToError=function(m,
+t){null!=m&&(m=null!=m.error?m.error:m,null==m.retry&&(m.retry=t))};Editor.mermaidToDrawio=function(m,t,C){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(m,t,C)};Editor.configure=function(m){if(null!=m){Editor.config=m;Editor.configVersion=m.version;m.debug&&(urlParams.test="1");if(null!=m.customCss){var t=document.createElement("style");t.type="text/css";t.appendChild(document.createTextNode(m.customCss));document.head.appendChild(t)}null!=m.defaultFonts&&(Menus.prototype.defaultFonts=
m.defaultFonts);null!=m.presetColors&&(ColorDialog.prototype.presetColors=m.presetColors);null!=m.defaultColors&&(ColorDialog.prototype.defaultColors=m.defaultColors);null!=m.colorNames&&(ColorDialog.prototype.colorNames=m.colorNames);null!=m.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=m.defaultColorSchemes);null!=m.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=m.defaultEdgeLength);null!=m.selectParentLayer&&(Graph.selectParentLayer=m.selectParentLayer);null!=m.autosaveDelay&&
(DrawioFile.prototype.autosaveDelay=m.autosaveDelay);null!=m.templateFile&&(EditorUi.templateFile=m.templateFile);null!=m.styles&&(Array.isArray(m.styles)?Editor.styles=m.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=m.globalVars&&(Editor.globalVars=m.globalVars);null!=m.compressXml&&(Editor.defaultCompressed=m.compressXml,Editor.compressXml=m.compressXml);null!=m.includeDiagram&&(Editor.defaultIncludeDiagram=m.includeDiagram);null!=m.simpleLabels&&(Editor.simpleLabels=
m.simpleLabels);null!=m.pasteAtMousePointer&&(Editor.pasteAtMousePointer=m.pasteAtMousePointer);null!=m.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=m.oneDriveInlinePicker);null!=m.defaultAdaptiveColors?Graph.defaultAdaptiveColors=m.defaultAdaptiveColors:0==m.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=m.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=m.enableLightDarkColors);null!=m.darkColor&&(Editor.darkColor=m.darkColor);null!=m.darkColorVar&&(Editor.darkColorVar=
m.darkColorVar);Graph.prototype.defaultPageBackgroundColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=m.settingsName&&(Editor.configurationKey="."+m.settingsName+"-configuration",Editor.settingsKey="."+m.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=m.customFonts&&(Menus.prototype.defaultFonts=m.customFonts.concat(Menus.prototype.defaultFonts));null!=m.customPresetColors&&
-(ColorDialog.prototype.presetColors=m.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=m.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=m.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=m.css){t=document.createElement("style");t.setAttribute("type","text/css");t.appendChild(document.createTextNode(m.css));var D=document.getElementsByTagName("script")[0];D.parentNode.insertBefore(t,D)}null!=m.expandLibraries&&(Sidebar.prototype.expandLibraries=
+(ColorDialog.prototype.presetColors=m.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=m.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=m.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=m.css){t=document.createElement("style");t.setAttribute("type","text/css");t.appendChild(document.createTextNode(m.css));var C=document.getElementsByTagName("script")[0];C.parentNode.insertBefore(t,C)}null!=m.expandLibraries&&(Sidebar.prototype.expandLibraries=
m.expandLibraries);null!=m.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=m.appendCustomLibraries);null!=m.libraries&&(Sidebar.prototype.customEntries=m.libraries);null!=m.enabledLibraries&&(Array.isArray(m.enabledLibraries)?Sidebar.prototype.enabledLibraries=m.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=m.defaultLibraries&&(Sidebar.prototype.defaultEntries=m.defaultLibraries);null!=m.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
m.defaultCustomLibraries);null!=m.enableCustomLibraries&&(Editor.enableCustomLibraries=m.enableCustomLibraries);null!=m.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=m.defaultVertexStyle);null!=m.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=m.defaultEdgeStyle);null!=m.defaultPageVisible&&(Graph.prototype.defaultPageVisible=m.defaultPageVisible);null!=m.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=m.defaultGridEnabled);null!=m.zoomWheel&&(Graph.zoomWheel=m.zoomWheel);null!=
m.zoomFactor&&(t=parseFloat(m.zoomFactor),!isNaN(t)&&1<t?Graph.prototype.zoomFactor=t:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=m.defaultGridSize&&(t=parseInt(m.defaultGridSize),!isNaN(t)&&0<t?mxGraph.prototype.gridSize=t:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=m.gridSteps&&(t=parseInt(m.gridSteps),!isNaN(t)&&0<t?mxGraphView.prototype.gridSteps=t:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=m.pageFormat&&(t=parseInt(m.pageFormat.width),D=parseInt(m.pageFormat.height),!isNaN(t)&&0<t&&!isNaN(D)&&0<D?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,t,D),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=m.thumbWidth&&(Sidebar.prototype.thumbWidth=m.thumbWidth);null!=m.thumbHeight&&(Sidebar.prototype.thumbHeight=m.thumbHeight);null!=m.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+null!=m.pageFormat&&(t=parseInt(m.pageFormat.width),C=parseInt(m.pageFormat.height),!isNaN(t)&&0<t&&!isNaN(C)&&0<C?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,t,C),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=m.thumbWidth&&(Sidebar.prototype.thumbWidth=m.thumbWidth);null!=m.thumbHeight&&(Sidebar.prototype.thumbHeight=m.thumbHeight);null!=m.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
m.emptyLibraryXml);null!=m.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=m.emptyDiagramXml);null!=m.sidebarWidth&&(EditorUi.prototype.hsplitPosition=m.sidebarWidth);null!=m.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=m.updateDefaultStyle);null!=m.sidebarTitles&&(Sidebar.prototype.sidebarTitles=m.sidebarTitles);null!=m.sidebarTitleSize&&(t=parseInt(m.sidebarTitleSize),!isNaN(t)&&0<t?Sidebar.prototype.sidebarTitleSize=t:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));
null!=m.fontCss&&("string"===typeof m.fontCss?Editor.configureFontCss(m.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=m.autosaveDelay&&(t=parseInt(m.autosaveDelay),!isNaN(t)&&0<t?DrawioFile.prototype.autosaveDelay=t:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=m.maxImageBytes&&(EditorUi.prototype.maxImageBytes=m.maxImageBytes);null!=m.maxImageSize&&(EditorUi.prototype.maxImageSize=m.maxImageSize);null!=m.shareCursorPosition&&
(EditorUi.prototype.shareCursorPosition=m.shareCursorPosition);null!=m.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=m.showRemoteCursors);null!=m.restrictExport&&(DrawioFile.RESTRICT_EXPORT=m.restrictExport);null!=m.replaceSvgDataUris&&(Editor.replaceSvgDataUris=m.replaceSvgDataUris);null!=m.foreignObjectImages&&(Editor.foreignObjectImages=m.foreignObjectImages);null!=m.shadowColor&&(mxConstants.SHADOW_COLOR=m.shadowColor);null!=m.shadowOpacity&&(mxConstants.SHADOW_OPACITY=m.shadowOpacity);
-null!=m.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=m.shadowOffsetX);null!=m.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=m.shadowOffsetY);null!=m.shadowBlur&&(mxConstants.SHADOW_BLUR=m.shadowBlur);null!=m.enableAnimations&&(Editor.enableAnimations=m.enableAnimations);null!=m.enableChatGpt&&(Editor.enableChatGpt=m.enableChatGpt);null!=m.gptApiKey&&(Editor.gptApiKey=m.gptApiKey);null!=m.gptModel&&(Editor.gptModel=m.gptModel);null!=m.gptUrl&&(Editor.gptUrl=m.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==
-typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(m){if(null!=m){Editor.prototype.fontCss=m;var t=document.getElementsByTagName("script")[0];if(null!=t&&null!=t.parentNode){var D=document.createElement("style");D.setAttribute("type","text/css");D.appendChild(document.createTextNode(m));t.parentNode.insertBefore(D,t);m=m.split("url(");for(D=1;D<m.length;D++){var M=m[D].indexOf(")");M=Editor.trimCssUrl(m[D].substring(0,M));var L=document.createElement("link");
-L.setAttribute("rel","preload");L.setAttribute("href",M);L.setAttribute("as","font");L.setAttribute("crossorigin","");t.parentNode.insertBefore(L,t)}}}};Editor.trimCssUrl=function(m){return m.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=
-20;Editor.guid=function(m){m=null!=m?m:Editor.GUID_LENGTH;for(var t=[],D=0;D<m;D++)t.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return t.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},
-{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];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(m){m=null!=m&&"mxlibrary"!=m.nodeName?this.extractGraphModel(m):null;if(null!=m){var t=Editor.extractParserError(m,mxResources.get("invalidOrMissingFile"));if(t)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[m],"cause",[t]),Error(mxResources.get("notADiagramFile")+" ("+t+")");if("mxGraphModel"==m.nodeName){t=m.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=t&&""!=t)t!=this.graph.currentStyle&&(D=null!=this.graph.themes?
-this.graph.themes[t]:mxUtils.load(STYLE_PATH+"/"+t+".xml").getDocumentElement(),null!=D&&(M=new mxCodec(D.ownerDocument),M.decode(D,this.graph.getStylesheet())));else{var D=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=D){var M=new mxCodec(D.ownerDocument);M.decode(D,this.graph.getStylesheet())}}this.graph.currentStyle=t;this.graph.mathEnabled="1"==urlParams.math||"1"==m.getAttribute("math");this.graph.setAdaptiveColors(m.getAttribute("adaptiveColors"));
-t=m.getAttribute("backgroundImage");null!=t?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(t)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==m.getAttribute("shadow"),!1);if(t=m.getAttribute("extFonts"))try{for(t=t.split("|").map(function(L){L=L.split("^");return{name:L[0],url:L[1]}}),D=0;D<t.length;D++)this.graph.addExtFont(t[D].name,
-t[D].url)}catch(L){console.log("ExtFonts format error: "+L.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 f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(m,t){m=null!=m?m:!0;var D=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&D.setAttribute("style",
-this.graph.currentStyle);var M=this.graph.getBackgroundImageObject(this.graph.backgroundImage,t);null!=M&&D.setAttribute("backgroundImage",JSON.stringify(M));D.setAttribute("math",this.graph.mathEnabled?"1":"0");D.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?D.setAttribute("adaptiveColors",this.graph.adaptiveColors):D.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(M=this.graph.extFonts.map(function(L){return L.name+
-"^"+L.url}),D.setAttribute("extFonts",M.join("|")));return D};Editor.prototype.isDataSvg=function(m){try{var t=mxUtils.parseXml(m).documentElement.getAttribute("content");if(null!=t&&(null!=t&&"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(cont,t))),null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t)),null!=t&&0<t.length)){var D=mxUtils.parseXml(t).documentElement;return"mxfile"==D.nodeName||"mxGraphModel"==D.nodeName}}catch(M){}return!1};Editor.prototype.extractGraphModel=
-function(m,t,D){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.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(m,t){if("undefined"===typeof window.MathJax){var D=function(){M=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var M=null;Editor.doMathJaxRender=function(P){try{null==
-M?(MathJax.typesetClear([P]),MathJax.typeset([P]),D()):M!=P&&Editor.mathJaxQueue.push(P)}catch(U){MathJax.typesetClear([P]),null!=U.retry?(M=P,U.retry.then(function(){MathJax.typesetPromise([P]).then(D)["catch"](function(V){console.log("Error in MathJax.typesetPromise: "+V.toString());D()})})["catch"](function(V){console.log("Error in MathJax.retry: "+V.toString());D()})):null!=window.console&&console.log("Error in MathJax.typeset: "+U.toString())}};window.MathJax=null!=t?t:{options:{skipHtmlTags:{"[+]":["text"]},
-ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"],paths:{fonts:DRAW_MATH_URL+"/fonts","mathjax-tex":DRAW_MATH_URL+"/fonts/mathjax-tex-font","mathjax-mhchem-extension":DRAW_MATH_URL+"/fonts/mathjax-mhchem-font-extension","mathjax-bbm-extension":DRAW_MATH_URL+"/fonts/mathjax-bbm-font-extension","mathjax-bboldx-extension":DRAW_MATH_URL+"/fonts/mathjax-bboldx-font-extension","mathjax-dsfont-extension":DRAW_MATH_URL+
-"/fonts/mathjax-dsfont-font-extension"}},output:{font:"mathjax-tex"},startup:{pageReady:function(){for(var P=0;P<Editor.mathJaxQueue.length;P++)Editor.doMathJaxRender(Editor.mathJaxQueue[P])}}};Editor.MathJaxRender=function(P){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(P):Editor.mathJaxQueue.push(P)};Editor.onMathJaxDone=function(){};var L=Editor.prototype.init;Editor.prototype.init=function(){L.apply(this,arguments);var P=mxUtils.bind(this,function(U,
-V){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,P);this.graph.addListener(mxEvent.REFRESH,P)};t=document.getElementsByTagName("script");if(null!=t&&0<t.length){var O=document.createElement("script");O.setAttribute("type","text/javascript");O.setAttribute("src",m);t[0].parentNode.appendChild(O)}}};Editor.prototype.csvToArray=function(m){if(0<m.length){var t="",D=[""],M=0,L=!0,O;m=$jscomp.makeIterator(m);
-for(O=m.next();!O.done;O=m.next())O=O.value,'"'===O?(L&&O===t&&(D[M]+=O),L=!L):","===O&&L?O=D[++M]="":D[M]+=O,t=O;return D}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(m)){var t=EditorUi.isVisioFilename(m);t=/\.png$/i.test(m)||/\.pdf$/i.test(m)||t;var D="t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+D+(t?"&base64=1":"")}return m};Editor.prototype.isCorsEnabledForUrl=
-function(m){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||m.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(m)||"https://raw.githubusercontent.com/"===m.substring(0,34)||"https://fonts.googleapis.com/"===m.substring(0,29)||"https://fonts.gstatic.com/"===m.substring(0,26)};Editor.prototype.createImageUrlConverter=
-function(){var m=new mxUrlConverter;m.updateBaseUrl();var t=m.convert,D=this;m.convert=function(M){null!=M&&navigator.onLine&&("http://"!=M.substring(0,7)&&"https://"!=M.substring(0,8)||M.substring(0,m.baseUrl.length)==m.baseUrl||D.crossOriginImages&&D.isCorsEnabledForUrl(M)?"chrome-extension://"!=M.substring(0,19)&&(M=t.apply(this,arguments)):M=PROXY_URL+"?url="+encodeURIComponent(M));return M};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};
-Editor.prototype.convertImageToDataUri=function(m,t,D,M,L){try{var O=!0,P=window.setTimeout(mxUtils.bind(this,function(){O=!1;t(m)}),this.timeout),U=mxUtils.bind(this,function(){null!=M?this.convertImageToDataUri(m,t,D,M,!0):t(m)});if(/(\.svg)$/i.test(m)&&!L)mxUtils.get(m,mxUtils.bind(this,function(X){window.clearTimeout(P);O&&(200>X.getStatus()||299<X.getStatus()?U():t(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(P);O&&U()}));else{var V=new Image;this.crossOriginImages&&
-(V.crossOrigin="anonymous");V.onload=function(){window.clearTimeout(P);if(O)try{M=null!=M&&L?M:1;var X=document.createElement("canvas"),W=X.getContext("2d");W.scale(M,M);X.height=V.height*M;X.width=V.width*M;W.drawImage(V,0,0);t(X.toDataURL())}catch(Y){t(m)}};V.onerror=function(){window.clearTimeout(P);O&&(null!=D?D():t(m))};V.src=m}}catch(X){null!=D?D():t(m)}};Editor.prototype.convertImages=function(m,t,D,M){function L(){0<O.length?O.shift()():t(m)}null==M&&(M=this.createImageUrlConverter());var O=
-[],P=D||{};D=mxUtils.bind(this,function(U,V){U=m.getElementsByTagName(U);for(var X=0;X<U.length;X++)mxUtils.bind(this,function(W){O.push(mxUtils.bind(this,function(){try{if(null!=W){var Y=M.convert(W.getAttribute(V));if(null!=Y&&"data:"!=Y.substring(0,5)){var Z=P[Y];null==Z?this.convertImageToDataUri(Y,function(aa){null!=aa&&(P[Y]=aa,W.setAttribute(V,aa));L()},null,Editor.svgRasterScale):(W.setAttribute(V,Z),L())}else null!=Y&&W.setAttribute(V,Y),L()}}catch(aa){L()}}))})(U[X])});D("image","xlink:href");
-D("img","src");L()};Editor.base64Encode=function(m){for(var t="",D=0,M=m.length,L,O,P;D<M;){L=m.charCodeAt(D++)&255;if(D==M){t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&3)<<4);t+="==";break}O=m.charCodeAt(D++);if(D==M){t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&
-3)<<4|(O&240)>>4);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2);t+="=";break}P=m.charCodeAt(D++);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&3)<<4|(O&240)>>4);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2|(P&192)>>6);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P&63)}return t};
-Editor.prototype.loadUrl=function(m,t,D,M,L,O,P,U){try{var V=!P&&(M||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));L=null!=L?L:!0;var X=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(W){200<=W.getStatus()&&299>=W.getStatus()?null!=t&&(W=W.getText(),V&&(O=null!=O?O:"data:image/png;base64,",W=O+Editor.base64Encode(W)),t(W)):null!=D&&(0==W.getStatus()?D({message:mxResources.get("accessDenied")},W):404==W.getStatus()?D({message:mxResources.get("fileNotFound"),
-code:W.getStatus()},W):D({message:this.getErrorMessage(W)},W))}),function(W){null!=D&&D({message:mxResources.get("error")+" "+W.getStatus()})},V,this.timeout,function(){L&&null!=D&&D({code:App.ERROR_TIMEOUT,retry:X})},U)});X()}catch(W){null!=D&&D(W)}};Editor.prototype.getErrorMessage=function(m){var t=mxResources.get("error")+" "+m.getStatus();try{var D=m.getText(),M=JSON.parse(D);null!=M&&null!=M.error&&null!=M.error.message&&(t=M.error.message+" ("+t+")")}catch(L){}return t};Editor.prototype.absoluteCssFonts=
-function(m){var t=null;if(null!=m){var D=m.split("url(");if(0<D.length){t=[D[0]];m=window.location.pathname;var M=null!=m?m.lastIndexOf("/"):-1;0<=M&&(m=m.substring(0,M+1));M=document.getElementsByTagName("base");var L=null;null!=M&&0<M.length&&(L=M[0].getAttribute("href"));for(var O=1;O<D.length;O++)if(M=D[O].indexOf(")"),0<M){var P=Editor.trimCssUrl(D[O].substring(0,M));this.graph.isRelativeUrl(P)&&(P=null!=L?L+P:window.location.protocol+"//"+window.location.hostname+("/"==P.charAt(0)?"":m)+P);
-t.push('url("'+P+'"'+D[O].substring(M))}else t.push(D[O])}else t=[m]}return null!=t?t.join(""):null};Editor.prototype.mapFontUrl=function(m,t,D){/^https?:\/\//.test(t)&&!this.isCorsEnabledForUrl(t)&&(t=PROXY_URL+"?url="+encodeURIComponent(t));D(m,t)};Editor.prototype.embedCssFonts=function(m,t){var D=m.split("url("),M=0;null==this.cachedFonts&&(this.cachedFonts={});var L=mxUtils.bind(this,function(){if(0==M){for(var V=[D[0]],X=1;X<D.length;X++){var W=D[X].indexOf(")");V.push('url("');V.push(this.cachedFonts[Editor.trimCssUrl(D[X].substring(0,
-W))]);V.push('"'+D[X].substring(W))}t(V.join(""))}});if(0<D.length){for(m=1;m<D.length;m++){var O=D[m].indexOf(")"),P=null,U=D[m].indexOf("format(",O);0<U&&(P=Editor.trimCssUrl(D[m].substring(U+7,D[m].indexOf(")",U))));mxUtils.bind(this,function(V){if(null==this.cachedFonts[V]){this.cachedFonts[V]=V;M++;var X="application/x-font-ttf";if("svg"==P||/(\.svg)($|\?)/i.test(V))X="image/svg+xml";else if("otf"==P||"embedded-opentype"==P||/(\.otf)($|\?)/i.test(V))X="application/x-font-opentype";else if("woff"==
-P||/(\.woff)($|\?)/i.test(V))X="application/font-woff";else if("woff2"==P||/(\.woff2)($|\?)/i.test(V))X="application/font-woff2";else if("eot"==P||/(\.eot)($|\?)/i.test(V))X="application/vnd.ms-fontobject";else if("sfnt"==P||/(\.sfnt)($|\?)/i.test(V))X="application/font-sfnt";this.mapFontUrl(X,V,mxUtils.bind(this,function(W,Y){this.loadUrl(Y,mxUtils.bind(this,function(Z){this.cachedFonts[V]=Z;M--;L()}),mxUtils.bind(this,function(Z){M--;L()}),!0,null,"data:"+W+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(D[m].substring(0,
-O)),P)}L()}else t(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(t){this.resolvedFontCss=t;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},t;for(t in Graph.fontMapping)Graph.isCssFontUrl(t)&&(m[t]=Graph.fontMapping[t]);return m};Editor.prototype.embedExtFonts=function(m){var t=this.graph.getCustomFonts();if(0<t.length){var D=[],M=0;null==this.cachedGoogleFonts&&
-(this.cachedGoogleFonts=this.createGoogleFontCache());for(var L=mxUtils.bind(this,function(){0==M&&this.embedCssFonts(D.join(""),m)}),O=0;O<t.length;O++)mxUtils.bind(this,function(P,U){Graph.isCssFontUrl(U)?null==this.cachedGoogleFonts[U]?(M++,this.loadUrl(Graph.rewriteGoogleFontUrl(U),mxUtils.bind(this,function(V){this.cachedGoogleFonts[U]=V;D.push(V+"\n");M--;L()}),mxUtils.bind(this,function(V){M--;D.push("@import url("+U+");\n");L()}))):D.push(this.cachedGoogleFonts[U]+"\n"):D.push('@font-face {font-family: "'+
-P+'";src: url("'+U+'")}\n')})(t[O].name,t[O].url);L()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var t=document.getElementsByTagName("style"),D=0;D<t.length;D++){var M=mxUtils.getTextContent(t[D]);0>M.indexOf("mxPageSelector")&&0<M.indexOf("MathJax")&&m[0].appendChild(t[D].cloneNode(!0))}};Editor.prototype.addFontCss=function(m,t){t=null!=t?t:this.absoluteCssFonts(this.fontCss);if(null!=t){var D=mxUtils.getSvgDefs(m),M=t.split("\n");
-t=[];for(var L=[],O=0;O<M.length;O++)"@import"==M[O].substring(0,7)?t.push(M[O]):L.push(M[O]);m=m.ownerDocument;m=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"style"):m.createElement("style");m.setAttribute("type","text/css");0<t.length&&(mxUtils.setTextContent(m,t.join("\n")),D.appendChild(m));0<L.length&&(m=m.cloneNode(!1),mxUtils.setTextContent(m,L.join("\n")),D.appendChild(m))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};
-Editor.prototype.getMaxCanvasScale=function(m,t,D){var M=mxClient.IS_FF?8192:16384;return Math.min(D,Math.min(M/m,M/t))};Editor.prototype.exportToCanvas=function(m,t,D,M,L,O,P,U,V,X,W,Y,Z,aa,fa,ea,ca,ha){try{O=null!=O?O:!0;P=null!=P?P:!0;Y=null!=Y?Y:this.graph;Z=null!=Z?Z:0;var ka=V?null:Y.background;ka==mxConstants.NONE&&(ka=null);null==ka&&(ka=M);null==ka&&0==V&&(ka="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(Y.getSvg(null,null,Z,aa,null,P,null,null,null,X,null,ea,ca,ha),mxUtils.bind(this,
-function(ba){try{ba.style.setProperty("-webkit-font-smoothing","antialiased");ba.style.setProperty("-moz-osx-font-smoothing","grayscale");var ia=new Image;ia.onload=mxUtils.bind(this,function(){try{var da=function(){mxClient.IS_SF?window.setTimeout(function(){va.drawImage(ia,0,0);m(ra,ba)},0):(va.drawImage(ia,0,0),m(ra,ba))},ra=document.createElement("canvas"),pa=parseInt(ba.getAttribute("width")),sa=parseInt(ba.getAttribute("height"));U=null!=U?U:1;null!=t&&(U=O?Math.min(1,Math.min(3*t/(4*sa),t/
-pa)):t/pa);U=this.getMaxCanvasScale(pa,sa,U);pa=Math.ceil(U*pa);sa=Math.ceil(U*sa);ra.setAttribute("width",pa);ra.setAttribute("height",sa);var va=ra.getContext("2d");if(null!=ka){var ja=mxUtils.getLightDarkColor(ka);va.beginPath();va.rect(0,0,pa,sa);va.fillStyle="dark"==ea&&"none"!=Y.getAdaptiveColors()?ja.dark:ja.light;va.fill()}1!=U&&va.scale(U,U);if(fa){var ma=Y.view,wa=ma.scale;ma.scale=1;var oa=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=wa;oa="data:image/svg+xml;base64,"+
-oa;var ya=Y.gridSize*ma.gridSteps*U,Ca=Y.getGraphBounds(),Fa=ma.translate.x*wa,Aa=ma.translate.y*wa,Ea=Fa+(Ca.x-Fa)/wa-Z,Oa=Aa+(Ca.y-Aa)/wa-Z,Ba=new Image;Ba.onload=function(){try{for(var Da=-Math.round(ya-mxUtils.mod((Fa-Ea)*U,ya)),Ia=-Math.round(ya-mxUtils.mod((Aa-Oa)*U,ya));Da<pa;Da+=ya)for(var Pa=Ia;Pa<sa;Pa+=ya)va.drawImage(Ba,Da/U,Pa/U);da()}catch(Ha){null!=L&&L(Ha)}};Ba.onerror=function(Da){null!=L&&L(Da)};Ba.src=oa}else da()}catch(Da){null!=L&&L(Da)}});ia.onerror=function(da){null!=L&&L(da)};
-X&&this.graph.addSvgShadow(ba);this.graph.mathEnabled&&this.addMathCss(ba);var la=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ba,this.resolvedFontCss),ia.src=Editor.createSvgDataUri(mxUtils.getXml(ba))}catch(da){null!=L&&L(da)}});this.embedExtFonts(mxUtils.bind(this,function(da){try{null!=da&&this.addFontCss(ba,da),this.loadFonts(la)}catch(ra){null!=L&&L(ra)}}))}catch(da){null!=L&&L(da)}}),D,W)}catch(ba){null!=L&&L(ba)}};Editor.crcTable=[];for(var p=0;256>p;p++)for(var q=
-p,u=0;8>u;u++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[p]=q;Editor.updateCRC=function(m,t,D,M){for(var L=0;L<M;L++)m=Editor.crcTable[(m^t.charCodeAt(D+L))&255]^m>>>8;return m};Editor.crc32=function(m){for(var t=-1,D=0;D<m.length;D++)t=t>>>8^Editor.crcTable[(t^m.charCodeAt(D))&255];return(t^-1)>>>0};Editor.writeGraphModelToPng=function(m,t,D,M,L){function O(W,Y){var Z=V;V+=Y;return W.substring(Z,V)}function P(W){W=O(W,4);return W.charCodeAt(3)+(W.charCodeAt(2)<<8)+(W.charCodeAt(1)<<16)+(W.charCodeAt(0)<<
-24)}function U(W){return String.fromCharCode(W>>24&255,W>>16&255,W>>8&255,W&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var V=0;if(O(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=L&&L();else if(O(m,4),"IHDR"!=O(m,4))null!=L&&L();else{O(m,17);L=m.substring(0,V);do{var X=P(m);if("IDAT"==O(m,4)){L=m.substring(0,V-8);"pHYs"==t&&"dpi"==D?(D=Math.round(M/.0254),D=U(D)+U(D)+String.fromCharCode(1)):D=D+String.fromCharCode(0)+("zTXt"==t?String.fromCharCode(0):
-"")+M;M=4294967295;M=Editor.updateCRC(M,t,0,4);M=Editor.updateCRC(M,D,0,D.length);L+=U(D.length)+t+D+U(M^4294967295);L+=m.substring(V-8,m.length);break}L+=m.substring(V-8,V-4+X);O(m,X);O(m,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(L):Base64.encode(L,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var y=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,t){y.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
-mxSettings.save()};var H=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,t){var D=null;null!=m.editor.graph.getModel().getParent(t)?D=t.getId():null!=m.currentPage&&(D=m.currentPage.getId());return D});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 F=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?F.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(m){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=
-function(m){m=d.apply(this,arguments);var t=this.editorUi,D=t.editor.graph;if(D.isEnabled()){var M=t.getCurrentFile();null!=M&&M.isAutosaveOptional()&&m.appendChild(this.createOption(mxResources.get("autosave"),function(){return t.editor.autosave},function(O){t.editor.setAutosave(O);t.editor.autosave&&M.isModified()&&M.fileChanged()},{install:function(O){this.listener=function(){O(t.editor.autosave)};t.editor.addListener("autosaveChanged",this.listener)},destroy:function(){t.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&
-D.isEnabled()&&"undefined"!==typeof MathJax){var L=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return D.mathEnabled},function(O){t.actions.get("mathematicalTypesetting").funct()},{install:function(O){this.listener=function(){O(D.mathEnabled)};t.addListener("mathEnabledChanged",this.listener)},destroy:function(){t.removeListener(this.listener)}});m.appendChild(L);(!t.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&L.appendChild(t.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return m};
-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,isVisible:function(m){return"0"==mxUtils.getValue(m.style,
-"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(m){return"1"==mxUtils.getValue(m.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.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:.25,isVisible:function(m){return"0"==mxUtils.getValue(m.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",
-min:0,defVal:25,isVisible:function(m){return"1"==mxUtils.getValue(m.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",
-min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
-[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.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.tape.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=
-[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},
-{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},
-{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",
-type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=
-[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];
-mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",
-type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",
-type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",
-dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
-min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",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;var k=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var m=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=m.style.shape&&!m.containsLabel&&0<m.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));
-k.apply(this,arguments);null!=m.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),m.customProperties,m))};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(m){var t=this.editorUi.getSelectionState();1==t.cells.length?this.addActions(m,["copyStyle","pasteStyle"]):1<=t.cells.length&&this.addActions(m,["pasteStyle","pasteData"]);l.apply(this,arguments);return m};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=
-function(m,t,D,M){function L(va,ja,ma,wa,oa){if(null!=ma.valueChanged)ma.valueChanged(ja,oa,D,Y);else{Z.getModel().beginUpdate();try{oa=[];var ya=[];if(null!=ma.index){for(var Ca=[],Fa=ma.parentRow.nextSibling;Fa&&Fa.getAttribute("data-pName")==va;)Ca.push(Fa.getAttribute("data-pValue")),Fa=Fa.nextSibling;ma.index<Ca.length?null!=wa?Ca.splice(wa,1):Ca[ma.index]=ja:Ca.push(ja);null!=ma.size&&Ca.length>ma.size&&(Ca=Ca.slice(0,ma.size));ja=Ca.join(",");null!=ma.countProperty&&(Z.setCellStyles(ma.countProperty,
-Ca.length,Z.getSelectionCells()),oa.push(ma.countProperty),ya.push(Ca.length))}Z.setCellStyles(va,ja,Z.getSelectionCells());oa.push(va);ya.push(ja);if(null!=ma.dependentProps)for(va=0;va<ma.dependentProps.length;va++){var Aa=ma.dependentPropsDefVal[va],Ea=ma.dependentPropsVals[va];if(Ea.length>ja)Ea=Ea.slice(0,ja);else for(var Oa=Ea.length;Oa<ja;Oa++)Ea.push(Aa);Ea=Ea.join(",");Z.setCellStyles(ma.dependentProps[va],Ea,Z.getSelectionCells());oa.push(ma.dependentProps[va]);ya.push(Ea)}if("function"==
-typeof ma.onChange)ma.onChange(Z,ja);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",oa,"values",ya,"cells",Z.getSelectionCells()))}finally{Z.getModel().endUpdate()}}}function O(va,ja){ja.style.left="0px";ja.style.top="0px";ja.style.position="relative";ja.style.right="0px";ja.style.bottom="0px";ja.style.width="100%";ja.style.maxWidth="100%";ja.style.maxHeight="100%";ja.style.textAlign="left"}function P(va,ja,ma){function wa(ya){if(null==ya||ya==mxConstants.NONE)oa.style.background="url('"+
-Dialog.prototype.noColorImage+"')";else if("default"==ya)oa.style.background="";else{var Ca=mxUtils.getLightDarkColor(ya);mxUtils.isLightDarkColor(ya)&&Ca.light!=Ca.dark?oa.style.background="linear-gradient(to right bottom, "+Ca.cssText+" 50%, "+mxUtils.invertLightDarkColor(Ca).cssText+" 50.3%)":oa.style.background=ya}}var oa=document.createElement("div");oa.style.width="32px";oa.style.height="8px";oa.style.margin="2px";oa.style.borderStyle="solid";oa.style.borderWidth="1px";wa(ja);btn=mxUtils.button("",
-mxUtils.bind(Y,function(ya){this.editorUi.pickColor(ja,function(Ca){L(va,Ca,ma);wa(Ca)});mxEvent.consume(ya)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(oa);return btn}function U(va,ja,ma,wa,oa,ya,Ca){null!=ja&&(ja=ja.split(","),aa.push({name:va,values:ja,type:ma,defVal:wa,countProperty:oa,parentRow:ya,isDeletable:!0,flipBkg:Ca}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Fa){for(var Aa=ya,Ea=
-0;null!=Aa.nextSibling;)if(Aa.nextSibling.getAttribute("data-pName")==va)Aa=Aa.nextSibling,Ea++;else break;var Oa={type:ma,parentRow:ya,index:Ea,isDeletable:!0,defVal:wa,countProperty:oa};Ea=W(va,"",Oa,0==Ea%2,Ca);L(va,wa,Oa);Aa.parentNode.insertBefore(Ea,Aa.nextSibling);mxEvent.consume(Fa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function V(va,ja,ma,wa,oa,ya,Ca){if(0<oa){var Fa=Array(oa);ja=null!=ja?ja.split(","):[];for(var Aa=0;Aa<oa;Aa++)Fa[Aa]=null!=
-ja[Aa]?ja[Aa]:null!=wa?wa:"";aa.push({name:va,values:Fa,type:ma,defVal:wa,parentRow:ya,flipBkg:Ca,size:oa})}return document.createElement("div")}function X(va,ja,ma){var wa=document.createElement("input");wa.type="checkbox";wa.checked="1"==ja;mxEvent.addListener(wa,"change",function(){L(va,wa.checked?"1":"0",ma,null,wa)});return wa}function W(va,ja,ma,wa,oa){var ya=ma.dispName,Ca=ma.type,Fa=document.createElement("tr");Fa.className="gePropRow"+(oa?"Dark":"")+(wa?"Alt":"")+" gePropNonHeaderRow";Fa.setAttribute("data-pName",
-va);Fa.setAttribute("data-pValue",ja);wa=!1;null!=ma.index&&(Fa.setAttribute("data-index",ma.index),ya=(null!=ya?ya:"")+"["+ma.index+"]",wa=!0);var Aa=document.createElement("td");Aa.className="gePropRowCell";ya=mxResources.get(ya,null,ya);mxUtils.write(Aa,ya);Aa.setAttribute("title",ya);wa&&(Aa.style.textAlign="right");Fa.appendChild(Aa);Aa=document.createElement("td");Aa.className="gePropRowCell";Aa.setAttribute("title",null!=ja?decodeURIComponent(ja):mxResources.get("none"));mxEvent.addListener(Aa,
-"click",mxUtils.bind(Y,function(Da){!mxUtils.isAncestorNode(Fa,document.activeElement)&&mxUtils.isAncestorNode(Fa.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(Da))}));if("color"==Ca)Aa.appendChild(P(va,ja,ma));else if("bool"==Ca||"boolean"==Ca)Aa.appendChild(X(va,ja,ma));else if("enum"==Ca){var Ea=ma.enumList;Aa.innerHTML="";var Oa=document.createElement("div");Oa.className="gePropValue";Aa.appendChild(Oa);
-for(oa=0;oa<Ea.length;oa++)if(ya=Ea[oa],ya.val==ja){mxUtils.write(Oa,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(Aa,"click",mxUtils.bind(Y,function(Da){var Ia=mxEvent.getSource(Da);if(!(Ia!=Aa&&Ia!=Oa||mxEvent.isConsumed(Da))){Oa.innerHTML="";var Pa=document.createElement("select"),Ha=null;O(Aa,Pa);for(Da=0;Da<Ea.length;Da++){Ia=Ea[Da];var Ka=document.createElement("option");Ka.value=mxUtils.htmlEntities(Ia.val);mxUtils.write(Ka,mxResources.get(Ia.dispName,null,Ia.dispName));
-Pa.appendChild(Ka);null==Ia.val&&(Ka.value="null",Ha=Ka)}Pa.value=null==ja&&null!=Ha?"null":ja;Oa.appendChild(Pa);mxEvent.addListener(Pa,"change",function(){var Xa=mxUtils.htmlEntities(Pa.value);if(Pa[Pa.selectedIndex]==Ha||"null"==Xa.value)Xa=null;L(va,Xa,ma)});Pa.focus();mxEvent.addListener(Pa,"blur",function(){Oa.innerHTML="";for(var Xa=0;Xa<Ea.length;Xa++){var qb=Ea[Xa];if(qb.val==Pa.value){mxUtils.write(Oa,mxResources.get(qb.dispName,null,qb.dispName));break}}})}}))}else if("dynamicArr"==Ca)Aa.appendChild(U(va,
-ja,ma.subType,ma.subDefVal,ma.countProperty,Fa,oa));else if("staticArr"==Ca)Aa.appendChild(V(va,ja,ma.subType,ma.subDefVal,ma.size,Fa,oa));else if("readOnly"==Ca)oa=document.createElement("input"),oa.setAttribute("readonly",""),oa.value=ja,oa.style.borderWidth="0px","id"==va||"shape"==va?(Fa.firstChild.innerHTML="",Fa.firstChild.setAttribute("colspan","2"),oa.style.flexGrow="1",oa.style.marginLeft="4px",oa.style.textAlign="id"==va?"center":"left",oa.setAttribute("title",ja),ya=document.createElement("div"),
-mxUtils.write(ya,mxResources.get(va)+":"),ya.style.display="inline-flex",ya.style.alignItems="center",ya.style.width="100%",ya.appendChild(oa),Fa.firstChild.appendChild(ya)):(oa.style.width="96px",Aa.appendChild(oa));else{Aa.innerHTML="";var Ba=document.createElement("div");Ba.className="gePropValue";Aa.appendChild(Ba);Ba.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ja));mxEvent.addListener(Aa,"click",mxUtils.bind(Y,function(Da){function Ia(){var Ka=Ha.value;Ka=0==Ka.length&&"string"!=Ca&&"numbers"!=
-Ca?0:Ka;ma.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",Ca="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=ma.min&&Ka<ma.min?Ka=ma.min:null!=ma.max&&Ka>ma.max&&(Ka=ma.max);var Xa=null;try{Xa="numbers"==Ca?Ka.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==Ca?parseInt(Ka):Ka)+"")}catch(qb){}L(va,Xa,ma,null,Ha)}var Pa=mxEvent.getSource(Da);if(!(Pa!=Aa&&Pa!=Ba||mxEvent.isConsumed(Da))){Ba.innerHTML="";var Ha=document.createElement("input");O(Ba,Ha);Ha.value=
-decodeURIComponent(ja);Ha.className="gePropEditor";"int"!=Ca&&"float"!=Ca||ma.allowAuto||(Ha.type="number",Ha.step="int"==Ca?"1":"any",null!=ma.min&&(Ha.min=parseFloat(ma.min)),null!=ma.max&&(Ha.max=parseFloat(ma.max)));Ba.appendChild(Ha);mxEvent.addListener(Ha,"keypress",function(Ka){13==Ka.keyCode&&Ia()});Ha.focus();mxEvent.addListener(Ha,"blur",function(){Ia()})}}))}ma.isDeletable&&(oa=mxUtils.button("-",mxUtils.bind(Y,function(Da){L(va,"",ma,ma.index);mxEvent.consume(Da)})),oa.style.height="16px",
-oa.style.width="25px",oa.style.float="right",oa.className="geColorBtn",Aa.appendChild(oa));Fa.appendChild(Aa);return Fa}var Y=this,Z=this.editorUi.editor.graph,aa=[],fa=document.createElement("table");fa.className="geProperties geFullWidthElement";var ea=document.createElement("tr");ea.className="gePropHeader";var ca=document.createElement("th");ca.className="gePropHeaderCell";ca.style.paddingLeft="16px";ca.style.backgroundRepeat="no-repeat";ca.style.backgroundPosition="-2px 50%";ca.style.backgroundSize=
-"20px";mxUtils.write(ca,mxResources.get("property"));ea.style.cursor="pointer";var ha=function(){var va=fa.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){ca.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var ja="none";for(var ma=m.childNodes.length-1;0<=ma;ma--)try{var wa=m.childNodes[ma],oa=wa.nodeName.toUpperCase();"INPUT"!=oa&&"SELECT"!=oa||m.removeChild(wa)}catch(ya){}}else ca.style.backgroundImage="url('"+Editor.arrowDownImage+"')",ja="";for(ma=0;ma<va.length;ma++)va[ma].style.display=
-ja};mxEvent.addListener(ea,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;ha()});ea.appendChild(ca);var ka=document.createElement("th");ka.className="gePropHeaderCell";ka.style.paddingLeft="4px";mxUtils.write(ka,mxResources.get("value"));ea.appendChild(ka);fa.appendChild(ea);var ba=ka=!1;ea=null;1==D.vertices.length&&0==D.edges.length?ea=D.vertices[0].id:0==D.vertices.length&&1==D.edges.length&&(ea=D.edges[0].id);null==ea||M||(fa.appendChild(W("id",mxUtils.htmlEntities(ea),
-{dispName:"id",type:"readOnly"},!0,!1)),null!=D.style&&null!=D.style.shape&&fa.appendChild(W("shape",mxUtils.htmlEntities(D.style.shape),{dispName:"shape",type:"readOnly"},!0,!1)));for(var ia in t)if(M=t[ia],("function"!=typeof M.isVisible||M.isVisible(D,this))&&!M.primary){var la=null!=M.getValue?M.getValue(D,this):null!=D.style[ia]?mxUtils.htmlEntities(D.style[ia]+""):null!=M.getDefaultValue?M.getDefaultValue(D,this):M.defVal;if("separator"==M.type)ba=!ba;else{if("staticArr"==M.type)M.size=parseInt(D.style[M.sizeProperty]||
-t[M.sizeProperty].defVal)||0;else if(null!=M.dependentProps){var da=M.dependentProps,ra=[],pa=[];for(ea=0;ea<da.length;ea++)if(null!=t[da[ea]]){var sa=D.style[da[ea]];pa.push(t[da[ea]].subDefVal);ra.push(null!=sa?sa.split(","):[])}M.dependentPropsDefVal=pa;M.dependentPropsVals=ra}fa.appendChild(W(ia,la,M,ka,ba));ka=!ka}}for(ea=0;ea<aa.length;ea++)for(M=aa[ea],t=M.parentRow,ia=0;ia<M.values.length;ia++)ka=W(M.name,M.values[ia],{type:M.type,parentRow:M.parentRow,isDeletable:M.isDeletable,index:ia,defVal:M.defVal,
-countProperty:M.countProperty,size:M.size},0==ia%2,M.flipBkg),t.parentNode.insertBefore(ka,t.nextSibling),t=ka;m.appendChild(fa);ha();return m};StyleFormatPanel.prototype.addStyles=function(m){if(null!=this.defaultColorSchemes){var t=this.editorUi,D=t.editor.graph,M=document.createElement("div");M.style.padding="6px 20px 0 24px";m.appendChild(M);var L=document.createElement("div");L.className="geSwitcher";L.style.padding="4px 18px 6px 0px";for(var O=[],P=0;P<this.defaultColorSchemes.length;P++){var U=
-document.createElement("div");U.className="geSwitcherDot";mxUtils.bind(this,function(Z){mxEvent.addListener(U,"click",mxUtils.bind(this,function(){V(Z)}))})(P);O.push(U);L.appendChild(U)}var V=mxUtils.bind(this,function(Z){null!=O[Z]&&(null!=this.format.currentScheme&&null!=O[this.format.currentScheme]&&(O[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Z,X(this.defaultColorSchemes[this.format.currentScheme]),O[this.format.currentScheme].style.background="#84d7ff")}),
-X=mxUtils.bind(this,function(Z){var aa=mxUtils.clone(D.defaultVertexStyle);aa[mxConstants.STYLE_STROKECOLOR]=null!=aa[mxConstants.STYLE_STROKECOLOR]?aa[mxConstants.STYLE_STROKECOLOR]:"default";aa[mxConstants.STYLE_FILLCOLOR]=null!=aa[mxConstants.STYLE_FILLCOLOR]?aa[mxConstants.STYLE_FILLCOLOR]:"default";aa[mxConstants.STYLE_FONTCOLOR]=null!=aa[mxConstants.STYLE_FONTCOLOR]?aa[mxConstants.STYLE_FONTCOLOR]:"default";D.replaceDefaultColors(new mxCell,aa);var fa=mxUtils.bind(this,function(ca){var ha=mxUtils.button("",
-mxUtils.bind(this,function(ia){D.getModel().beginUpdate();try{for(var la=t.getSelectionState().cells,da=0;da<la.length;da++){var ra=D.getModel().getStyle(la[da]);null!=ca?(mxEvent.isShiftDown(ia)||(ra=""==ca.fill||null==ca.fill?mxUtils.setStyle(ra,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_FILLCOLOR,ca.fill),ra=""==ca.gradient||null==ca.gradient?mxUtils.setStyle(ra,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_GRADIENTCOLOR,ca.gradient),mxEvent.isControlDown(ia)||
-mxClient.IS_MAC&&mxEvent.isMetaDown(ia)||!D.getModel().isVertex(la[da])||(ra=""==ca.font||null==ca.font?mxUtils.setStyle(ra,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_FONTCOLOR,ca.font))),mxEvent.isAltDown(ia)||(ra=""==ca.stroke||null==ca.fill?mxUtils.setStyle(ra,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_STROKECOLOR,ca.stroke))):(ra=mxUtils.setStyle(ra,mxConstants.STYLE_FILLCOLOR,null),ra=mxUtils.setStyle(ra,mxConstants.STYLE_STROKECOLOR,
-null),ra=mxUtils.setStyle(ra,mxConstants.STYLE_GRADIENTCOLOR,null),D.getModel().isVertex(la[da])&&(ra=mxUtils.setStyle(ra,mxConstants.STYLE_FONTCOLOR,null)));D.getModel().setStyle(la[da],ra)}}finally{D.getModel().endUpdate()}}));ha.className="geStyleButton";ha.style.width="36px";ha.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ha.style.margin="0px 6px 6px 0px";if(null!=ca){var ka="1px solid";null!=ca.border&&(ka=ca.border);if(null!=ca.gradient)ha.style.backgroundImage="linear-gradient("+
-mxUtils.getLightDarkColor(ca.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ca.gradient).cssText+" 100%)";else if(ca.fill==mxConstants.NONE)ha.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ca.fill||""==ca.fill)ha.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var ba=mxUtils.getLightDarkColor(ca.fill);ha.style.backgroundImage="linear-gradient(to right bottom, "+ba.cssText+" 50%, "+ba.light+" 50.3%)"}null==
-ca.stroke||ca.stroke==mxConstants.NONE?ha.style.border=ka+" transparent":""==ca.stroke?ha.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(ba=mxUtils.getLightDarkColor(ca.stroke),ha.style.border=ka+" "+ba.cssText,ha.style.borderRightColor=ba.light,ha.style.borderBottomColor=ha.style.borderRightColor);null!=ca.title&&ha.setAttribute("title",ca.title)}else ka=mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),ba=mxUtils.getValue(aa,
-mxConstants.STYLE_STROKECOLOR,"#000000"),ha.style.backgroundColor=ka,ha.style.border="1px solid "+ba;ha.style.borderRadius="0";M.appendChild(ha);null!=ca&&null!=ca.gradient&&(ka=ha.cloneNode(!1),ka.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(ca.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ca.gradient).light+") 100%)",ka.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",ka.style.backgroundColor="transparent",M.appendChild(ka),
-ka.style.marginLeft="-42px",mxEvent.addListener(ka,"click",function(){ha.click()}))});M.innerText="";if(null!=Z)for(var ea=0;ea<Z.length;ea++)0<ea&&0==mxUtils.mod(ea,4)&&mxUtils.br(M),fa(Z[ea])});null==this.format.currentScheme?V(Math.min(O.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):V(this.format.currentScheme);P=10>=this.defaultColorSchemes.length?43:23;var W=document.createElement("div");W.className="geButton";W.style.cssText="position:absolute;left:0px;bottom:"+P+"px;width:20px;background-image:url("+
-Editor.chevronLeftImage+");";mxEvent.addListener(W,"click",mxUtils.bind(this,function(){V(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Y=document.createElement("div");Y.className="geButton";Y.style.cssText="position:absolute;left:186px;bottom:"+P+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(m.appendChild(W),m.appendChild(Y));mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){V(mxUtils.mod(this.format.currentScheme+
-1,this.defaultColorSchemes.length))}));X(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&m.appendChild(L)}return m}}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.isGoogleFontUrl=function(m){return m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||
-m.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(m){return Graph.isGoogleFontUrl(m)};Graph.rewriteGoogleFontUrl=function(m){null!=m&&m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(m=Editor.GOOGLE_FONTS_CSS2+m.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return m};Graph.createFontElement=function(m,t){var D=Graph.fontMapping[t];null==D&&Graph.isCssFontUrl(t)?(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),
-m.setAttribute("type","text/css"),m.setAttribute("charset","UTF-8"),m.setAttribute("href",Graph.rewriteGoogleFontUrl(t))):(null==D&&(D='@font-face {\nfont-family: "'+m+'";\nsrc: url("'+t+'");\n}'),m=document.createElement("style"),mxUtils.write(m,D));return m};Graph.addRecentCustomFont=function(m,t){};Graph.addFont=function(m,t,D,M){if(null!=m&&0<m.length&&null!=t&&0<t.length){M=null!=M?M:Graph.customFontElements;var L=m.toLowerCase();if("helvetica"!=L&&"arial"!=m&&"sans-serif"!=L){var O=M[L];null!=
-O&&O.url!=t&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=t,"http:"==t.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(t)),O={name:m,url:t,elt:Graph.createFontElement(m,O)},M[L]=O,t=M==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=D&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=D,O.elt.onerror=D):D()),null!=t&&t.appendChild(O.elt)):null!=D&&D()}else null!=D&&D()}else null!=D&&D();return m};Graph.getFontUrl=function(m,t){m=Graph.customFontElements[m.toLowerCase()];
-null!=m&&(t=m.url);return t};Graph.processFontAttributes=function(m){m=m.getElementsByTagName("*");for(var t=0;t<m.length;t++){var D=m[t].getAttribute("data-font-src");if(null!=D){var M="FONT"==m[t].nodeName?m[t].getAttribute("face"):m[t].style.fontFamily;null!=M&&Graph.addFont(M,D)}}};Graph.processFontStyle=function(m){if(null!=m){var t=mxUtils.getValue(m,"fontSource",null);if(null!=t){var D=mxUtils.getValue(m,mxConstants.STYLE_FONTFAMILY,null);if(null!=D)try{Graph.addFont(D,decodeURIComponent(t))}catch(M){}}}return m};
-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.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var n=Graph.prototype.init;Graph.prototype.init=function(){function m(L){t=
-L}n.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var t=null;mxEvent.addListener(this.container,"mouseenter",m);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.container,"mouseleave",function(L){t=null});this.isMouseInsertPoint=function(){return null!=t};var D=this.getInsertPoint;this.getInsertPoint=function(L){return null==t||L?D.apply(this,arguments):this.getPointForEvent(t)};var M=this.layoutManager.getLayout;this.layoutManager.getLayout=
-function(L){var O=this.graph.getCellStyle(L);if(null!=O&&"rack"==O.childLayout){var P=new mxStackLayout(this.graph,!1);P.gridSize=null!=O.rackUnitSize?parseFloat(O.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;P.marginLeft=O.marginLeft||0;P.marginRight=O.marginRight||0;P.marginTop=O.marginTop||0;P.marginBottom=O.marginBottom||0;P.allowGaps=O.allowGaps||0;P.horizontal="1"==mxUtils.getValue(O,"horizontalRack","0");P.resizeParent=!1;P.fill=!0;return P}return M.apply(this,
-arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,t){return Graph.processFontStyle(x.apply(this,arguments))};var A=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,t,D,M,L,O,P,U,V,X,W,Y){A.apply(this,arguments);Graph.processFontAttributes(Y)};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(m,t,D,M){function L(){for(var ea=U.getSelectionCells(),ca=[],ha=0;ha<ea.length;ha++)U.isCellVisible(ea[ha])&&ca.push(ea[ha]);U.setSelectionCells(ca)}function O(ea){U.setHiddenTags(ea?[]:V.slice());L();U.refresh()}function P(ea,ca){W.innerText="";if(0<ea.length){var ha=document.createElement("table");ha.setAttribute("cellpadding","2");ha.style.boxSizing="border-box";ha.style.tableLayout="fixed";ha.style.width="100%";
-var ka=document.createElement("tbody");if(null!=ea&&0<ea.length)for(var ba=0;ba<ea.length;ba++)(function(ia){function la(){var ja=U.getCellsForTags([ia],null,null,!0);U.isEnabled()?U.setSelectionCells(ja):U.highlightCells(ja,null,null,70)}var da=0>mxUtils.indexOf(U.hiddenTags,ia),ra=document.createElement("tr"),pa=document.createElement("td");pa.style.align="center";pa.style.width="16px";var sa=document.createElement("img");sa.setAttribute("src",da?Editor.visibleImage:Editor.hiddenImage);sa.setAttribute("title",
-mxResources.get(da?"hideIt":"show",[ia]));mxUtils.setOpacity(sa,da?75:25);sa.className="geAdaptiveAsset";sa.style.verticalAlign="middle";sa.style.cursor="pointer";sa.style.width="16px";if(t||Editor.isDarkMode())sa.style.filter="invert(100%)";pa.appendChild(sa);mxEvent.addListener(sa,"click",function(ja){mxEvent.isShiftDown(ja)?O(0<=mxUtils.indexOf(U.hiddenTags,ia)):(U.toggleHiddenTag(ia),L(),U.refresh());mxEvent.consume(ja)});ra.appendChild(pa);pa=document.createElement("td");pa.style.align="center";
-pa.style.width="16px";sa=document.createElement("img");sa.setAttribute("src",Editor.selectImage);sa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(sa,da?75:25);sa.className="geAdaptiveAsset";sa.style.verticalAlign="middle";sa.style.cursor="pointer";sa.style.width="16px";if(t||Editor.isDarkMode())sa.style.filter="invert(100%)";mxEvent.addListener(sa,"click",function(ja){O(!0);la();mxEvent.consume(ja)});pa.appendChild(sa);ra.appendChild(pa);pa=document.createElement("td");pa.style.overflow=
-"hidden";pa.style.whiteSpace="nowrap";pa.style.textOverflow="ellipsis";pa.style.verticalAlign="middle";pa.style.cursor="pointer";pa.setAttribute("title",ia);a=document.createElement("a");mxUtils.write(a,ia);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,da?100:40);pa.appendChild(a);mxEvent.addListener(pa,"click",function(ja){if(mxEvent.isShiftDown(ja))O(!0),la();else if(da&&0<U.hiddenTags.length)O(!0);else{var ma=V.slice(),wa=mxUtils.indexOf(ma,ia);ma.splice(wa,1);
-U.setHiddenTags(ma);L();U.refresh()}mxEvent.consume(ja)});ra.appendChild(pa);if(U.isEnabled()){pa=document.createElement("td");pa.style.verticalAlign="middle";pa.style.textAlign="center";pa.style.width="18px";if(null==ca){pa.style.align="center";pa.style.width="16px";sa=document.createElement("img");sa.setAttribute("src",Editor.trashImage);sa.setAttribute("title",mxResources.get("removeIt",[ia]));mxUtils.setOpacity(sa,da?75:25);sa.className="geAdaptiveAsset";sa.style.verticalAlign="middle";sa.style.cursor=
-"pointer";sa.style.width="16px";if(t||Editor.isDarkMode())sa.style.filter="invert(100%)";mxEvent.addListener(sa,"click",function(ja){var ma=mxUtils.indexOf(V,ia);0<=ma&&V.splice(ma,1);U.removeTagsForCells(U.model.getDescendants(U.model.getRoot()),[ia]);U.refresh();mxEvent.consume(ja)});pa.appendChild(sa)}else{var va=document.createElement("input");va.setAttribute("type","checkbox");va.style.margin="0px";va.defaultChecked=null!=ca&&0<=mxUtils.indexOf(ca,ia);va.checked=va.defaultChecked;va.style.background=
-"transparent";va.setAttribute("title",mxResources.get(va.defaultChecked?"removeIt":"add",[ia]));mxEvent.addListener(va,"change",function(ja){va.checked?U.addTagsForCells(U.getSelectionCells(),[ia]):U.removeTagsForCells(U.getSelectionCells(),[ia]);mxEvent.consume(ja)});pa.appendChild(va)}ra.appendChild(pa)}ka.appendChild(ra)})(ea[ba]);ha.appendChild(ka);W.appendChild(ha)}}var U=this,V=U.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding=
-"10px";X.style.height="100%";var W=document.createElement("div");W.style.position="absolute";W.style.boxSizing="border-box";W.style.userSelect="none";W.style.overflow="auto";W.style.padding="3px";W.style.left="0px";W.style.right="0px";W.style.top="0px";W.style.bottom="0px";X.appendChild(W);U.addListener(mxEvent.ROOT,function(){V=U.hiddenTags.slice()});var Y=mxUtils.bind(this,function(ea,ca){if(m()){ea=U.getAllTags();for(ca=0;ca<ea.length;ca++)0>mxUtils.indexOf(V,ea[ca])&&V.push(ea[ca]);V.sort();U.isSelectionEmpty()?
-P(V):P(V,U.getCommonTagsForCells(U.getSelectionCells()))}});U.selectionModel.addListener(mxEvent.CHANGE,Y);U.model.addListener(mxEvent.CHANGE,Y);U.addListener(mxEvent.REFRESH,Y);var Z=document.createElement("div");Z.className="geToolbarContainer geDialogToolbar";Z.style.position="absolute";Z.style.display="flex";Z.style.bottom="0px";Z.style.left="0px";Z.style.right="0px";Z.style.height="32px";Z.style.overflow="hidden";Z.style.padding="3px 4px 4px 4px";Z.style.borderWidth="1px 0px 0px 0px";Z.style.borderStyle=
-"solid";Z.style.whiteSpace="nowrap";if(U.isEnabled()){W.style.bottom="32px";var aa=document.createElement("a");aa.className="geButton";var fa=aa.cloneNode(!1);fa.style.backgroundImage="url("+Editor.visibleImage+")";fa.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(fa,"click",function(ea){U.setHiddenTags([]);mxEvent.isShiftDown(ea)||(V=U.hiddenTags.slice());L();U.refresh();mxEvent.consume(ea)});Z.appendChild(fa);null!=D&&(aa=aa.cloneNode(!1),aa.style.backgroundImage="url("+Editor.plusImage+
-")",aa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(aa,"click",function(ea){D(V,function(ca){V=ca;Y()});mxEvent.consume(ea)}),Z.appendChild(aa));X.appendChild(Z)}null!=M&&Z.appendChild(M);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];for(var t in Graph.customFontElements){var D=Graph.customFontElements[t];m.push({name:D.name,url:D.url})}return m};Graph.prototype.setFont=function(m,t){Graph.addFont(m,t);var D=Editor.guid();
-document.execCommand("fontname",!1,D);for(var M=this.cellEditor.textarea.getElementsByTagName("font"),L=!1,O=0;O<M.length;O++)M[O].getAttribute("face")==D&&(L=!0,M[O].setAttribute("face",m),null!=t?M[O].setAttribute("data-font-src",t):M[O].removeAttribute("data-font-src"));L||document.execCommand("fontname",!1,m)};var I=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return I.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 m=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=m)for(var t in m)this.globalVars[t]=m[t]}catch(D){null!=window.console&&console.log("Error in vars URL parameter: "+D)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var G=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=
-function(m){var t=G.apply(this,arguments);null==t&&null!=this.globalVars&&(t=this.globalVars[m]);return t};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,t,D,M,L,O,P,U,V,X,W,Y,Z,aa,fa,ea){var ca=C.apply(this,arguments);
-if(null!=Y){var ha=ca.getAttribute("style");null==ha&&(ha="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;ca.setAttribute("style",ha+(" color-scheme: "+Y+";"))}var ka=this.getCustomFonts();if(W&&0<ka.length){var ba=ca.ownerDocument;ha=null!=ba.createElementNS?ba.createElementNS(mxConstants.NS_SVG,"style"):ba.createElement("style");null!=ba.setAttributeNS?ha.setAttributeNS("type","text/css"):ha.setAttribute("type","text/css");for(var ia="",
-la="",da=0;da<ka.length;da++){var ra=ka[da].name,pa=ka[da].url;Graph.isCssFontUrl(pa)?ia+="@import url("+Graph.rewriteGoogleFontUrl(pa)+");\n":la+='@font-face {\nfont-family: "'+ra+'";\nsrc: url("'+pa+'");\n}\n'}ha.appendChild(ba.createTextNode(ia+la));ca.getElementsByTagName("defs")[0].appendChild(ha)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ca);this.mathEnabled&&(document.body.appendChild(ca),Editor.MathJaxRender(ca),
-ca.parentNode.removeChild(ca),ha=ca.ownerDocument.getElementById("MJX-SVG-styles"),null!=ha&&ca.getElementsByTagName("defs")[0].appendChild(ha.cloneNode(!0)));return ca};var R=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){R.apply(this,arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var T=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=
-function(){T.apply(this,arguments);this.enumerationState=0};var S=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return S.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(m){m=decodeURIComponent(mxUtils.getValue(m.style,"enumerateValue",""));""==m&&(m=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(m)+
-"</div>"};mxGraphView.prototype.redrawEnumerationState=function(m){var t="1"==mxUtils.getValue(m.style,"enumerate",0);t&&null==m.secondLabel?(m.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),m.secondLabel.size=12,m.secondLabel.state=m,m.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(m,m.secondLabel)):t||null==m.secondLabel||(m.secondLabel.destroy(),m.secondLabel=null);t=m.secondLabel;if(null!=t){var D=m.view.scale,
-M=this.createEnumerationValue(m);m=this.graph.model.isVertex(m.cell)?new mxRectangle(m.x+m.width-4*D,m.y+4*D,0,0):mxRectangle.fromPoint(m.view.getPoint(m));t.bounds.equals(m)&&t.value==M&&t.scale==D||(t.bounds=m,t.value=M,t.scale=D,t.redraw())}};var Q=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();Q.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),
-this.view.validateBackgroundImage())};var v=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){v.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(m,t){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)),null!=m.actions&&this.executeCustomActions(m.actions,null,t))};Graph.prototype.executeCustomActions=function(m,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 M=!1,L=0,O=0,P=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),U=mxUtils.bind(this,function(){M&&(M=!1,this.model.endUpdate())}),V=mxUtils.bind(this,function(){0<L&&L--;0==L&&X()}),X=mxUtils.bind(this,function(){if(O<m.length){var W=this.stoppingCustomActions,Y=m[O++],
-Z=[];if(null!=Y.open)if(U(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,D))return}else this.openLink(Y.open);null==Y.wait||W||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;V()}),L++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),U());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),
-Y.opacity.value);null!=Y.fadeIn&&(L++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,V,W?0:Y.fadeIn.delay));null!=Y.fadeOut&&(L++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,V,W?0:Y.fadeOut.delay));null!=Y.wipeIn&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(P(),this.toggleCells(this.getCellsForAction(Y.toggle,
-!0)));if(null!=Y.show){P();var aa=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(aa),1);this.setCellsVisible(aa,!0)}null!=Y.hide&&(P(),aa=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(aa),0),this.setCellsVisible(aa,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&(P(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&
-null!=Y.style.key&&(P(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));aa=[];null!=Y.select&&this.isEnabled()&&(aa=this.getCellsForAction(Y.select),this.setSelectionCells(aa));null!=Y.highlight&&(aa=this.getCellsForAction(Y.highlight),this.highlightCells(aa,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));null!=Y.scroll&&(aa=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<aa.length&&this.scrollCellToVisible(aa[0]);
-null!=D&&null!=Y.explore&&Graph.exploreFromCell(this,D,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var fa=Y.tags.toggle;0==fa.length&&(fa=this.getAllTags());for(aa=0;aa<fa.length;aa++)this.toggleHiddenTag(fa[aa])}fa=null;null!=Y.tags.hidden&&(null==fa&&(fa=[]),fa=fa.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==fa&&(fa=[]);var ea=this.getAllTags();for(aa=0;aa<ea.length;aa++)0>mxUtils.indexOf(Y.tags.visible,ea[aa])&&0>mxUtils.indexOf(fa,ea[aa])&&fa.push(ea[aa])}null!=fa&&this.setHiddenTags(fa);
-this.refresh()}0<Z.length&&(L++,this.executeAnimations(Z,V,W?1:Y.steps,W?0:Y.delay));0==L?X():U()}else this.stoppingCustomActions=this.executingCustomActions=!1,U(),null!=t&&t()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(m,t){var D=this.getLinkForCell(t);null!=D&&"data:action/json,"==D.substring(0,17)&&this.setLinkForCell(t,this.updateCustomLink(m,D));if(this.isHtmlLabel(t)){var M=document.createElement("div");M.innerHTML=Graph.sanitizeHtml(this.getLabel(t));for(var L=M.getElementsByTagName("a"),
-O=!1,P=0;P<L.length;P++)D=L[P].getAttribute("href"),null!=D&&"data:action/json,"==D.substring(0,17)&&(L[P].setAttribute("href",this.updateCustomLink(m,D)),O=!0);O&&this.labelChanged(t,M.innerHTML)}};Graph.prototype.updateCustomLink=function(m,t){if("data:action/json,"==t.substring(0,17))try{var D=JSON.parse(t.substring(17));null!=D.actions&&(this.updateCustomLinkActions(m,D.actions),t="data:action/json,"+JSON.stringify(D))}catch(M){}return t};Graph.prototype.updateCustomLinkActions=function(m,t){for(var D=
-0;D<t.length;D++){var M=t[D],L;for(L in M)this.updateCustomLinkAction(m,M[L],"cells"),this.updateCustomLinkAction(m,M[L],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,t,D){if(null!=t&&null!=t[D]){for(var M=[],L=0;L<t[D].length;L++)if("*"==t[D][L])M.push(t[D][L]);else{var O=m[t[D][L]];null!=O?""!=O&&M.push(O):M.push(t[D][L])}t[D]=M}};Graph.prototype.getCellsForAction=function(m,t){t=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,t));if(null!=m.excludeCells){for(var D=
-[],M=0;M<t.length;M++)0>m.excludeCells.indexOf(t[M].id)&&D.push(t[M]);t=D}return t};Graph.prototype.getCellsById=function(m){var t=[];if(null!=m)for(var D=0;D<m.length;D++)if("*"==m[D]){var M=this.model.getRoot();t=t.concat(this.model.filterDescendants(function(O){return O!=M},M))}else{var L=this.model.getCell(m[D]);null!=L&&t.push(L)}return t};var z=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return z.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};
-Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(m){var t=mxUtils.indexOf(this.hiddenTags,m);0>t?this.hiddenTags.push(m):0<=t&&this.hiddenTags.splice(t,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var t=0;t<m.length;t++)if(0>
-mxUtils.indexOf(this.hiddenTags,m[t]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,t,D,M){var L=[];if(null!=m){t=null!=t?t:this.model.getDescendants(this.model.getRoot());for(var O=0,P={},U=0;U<m.length;U++)0<m[U].length&&(P[m[U]]=!0,O++);for(U=0;U<t.length;U++)if(D&&this.model.getParent(t[U])==this.model.root||this.model.isVertex(t[U])||this.model.isEdge(t[U])){var V=this.getTagsForCell(t[U]),X=!1;if(0<V.length&&(V=V.split(" "),V.length>=m.length)){for(var W=X=0;W<V.length&&X<O;W++)null!=
-P[V[W]]&&X++;X=X==O}X&&(1!=M||this.isCellVisible(t[U]))&&L.push(t[U])}}return L};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var t=null,D=[],M=0;M<m.length;M++){var L=this.getTagsForCell(m[M]);D=[];if(0<L.length){L=L.split(" ");for(var O={},P=0;P<L.length;P++)if(null==t||null!=t[L[P]])O[L[P]]=!0,D.push(L[P]);t=O}else return[]}return D};Graph.prototype.getTagsForCells=function(m){for(var t=
-[],D={},M=0;M<m.length;M++){var L=this.getTagsForCell(m[M]);if(0<L.length){L=L.split(" ");for(var O=0;O<L.length;O++)null==D[L[O]]&&(D[L[O]]=!0,t.push(L[O]))}}return t};Graph.prototype.getTagsForCell=function(m){return this.getAttributeForCell(m,"tags","")};Graph.prototype.addTagsForCells=function(m,t){if(0<m.length&&0<t.length){this.model.beginUpdate();try{for(var D=0;D<m.length;D++){for(var M=this.getTagsForCell(m[D]),L=M.split(" "),O=!1,P=0;P<t.length;P++){var U=mxUtils.trim(t[P]);""!=U&&0>mxUtils.indexOf(L,
-U)&&(M=0<M.length?M+" "+U:U,O=!0)}O&&this.setAttributeForCell(m[D],"tags",M)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(m,t){if(0<m.length&&0<t.length){this.model.beginUpdate();try{for(var D=0;D<m.length;D++){var M=this.getTagsForCell(m[D]);if(0<M.length){for(var L=M.split(" "),O=!1,P=0;P<t.length;P++){var U=mxUtils.indexOf(L,t[P]);0<=U&&(L.splice(U,1),O=!0)}O&&this.setAttributeForCell(m[D],"tags",L.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=
-function(m){this.model.beginUpdate();try{for(var t=0;t<m.length;t++)this.model.setVisible(m[t],!this.model.isVisible(m[t]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(m,t){this.model.beginUpdate();try{for(var D=0;D<m.length;D++)this.model.setVisible(m[D],t)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(m,t,D,M){for(var L=0;L<m.length;L++)this.highlightCell(m[L],t,D,M)};Graph.prototype.highlightCell=function(m,t,D,M,L){t=null!=t?t:mxConstants.DEFAULT_VALID_COLOR;
-D=null!=D?D:1E3;m=this.view.getState(m);var O=null;null!=m&&(L=null!=L?L:4,L=Math.max(L+1,mxUtils.getValue(m.style,mxConstants.STYLE_STROKEWIDTH,1)+L),O=new mxCellHighlight(this,t,L,!1),null!=M&&(O.opacity=M),O.highlight(m),window.setTimeout(function(){null!=O.shape&&(mxUtils.setPrefixedStyle(O.shape.node.style,"transition","all 1200ms ease-in-out"),O.shape.node.style.opacity=0);window.setTimeout(function(){O.destroy()},1200)},D));return O};Graph.prototype.addSvgShadow=function(m,t,D,M){M=null!=M?
-M:!0;var L=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=D&&D||(t=null!=t?t:m.getElementsByTagName("g")[0],null!=t&&(this.updateShadowFilter(t,!0),!isNaN(parseInt(m.getAttribute("width")))&&M&&(m.setAttribute("width",parseInt(m.getAttribute("width"))+L),m.setAttribute("height",parseInt(m.getAttribute("height"))+L),t=m.getAttribute("viewBox"),null!=t&&0<t.length&&(t=t.split(" "),3<t.length&&(w=parseFloat(t[2])+L,h=parseFloat(t[3])+L,m.setAttribute("viewBox",t[0]+" "+t[1]+" "+w+" "+h))))));
-return L};Graph.prototype.updateShadowFilter=function(m,t){mxClient.IS_SF||(t?(t=mxUtils.getLightDarkColor(this.svgShadowColor,this.svgShadowOpacity),m.style.filter="drop-shadow("+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowBlur)/100+"px "+t.cssText+")"):m.style.filter="")};Graph.prototype.setShadowVisible=function(m,t){t=null!=t?t:!0;this.shadowVisible=m;this.updateShadowFilter(this.view.getDrawPane(),this.shadowVisible);
-t&&this.fireEvent(new mxEventObject("shadowVisibleChanged"))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var m=this.model.getChildCount(this.model.root),t=0;do var D=this.model.getChildAt(this.model.root,t);while(t++<m&&"1"==mxUtils.getValue(this.getCellStyle(D),"locked","0"));null!=D&&this.setDefaultParent(D)}};
-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",STENCIL_PATH+"/kubernetes2.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];
-mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",
-STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];
-mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=
-[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",
-STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=
-[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/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.ibmcloud=[STENCIL_PATH+"/ibm_cloud.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.networks2=[SHAPES_PATH+"/mxNetworks2.js",STENCIL_PATH+"/networks2.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"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=
-function(m){var t=null;null!=m&&0<m.length&&("ER"==m.substring(0,2)?t="mxgraph.er":"sysML"==m.substring(0,5)&&(t="mxgraph.sysml"));return t};var N=mxMarker.createMarker;mxMarker.createMarker=function(m,t,D,M,L,O,P,U,V,X){if(null!=D&&null==mxMarker.markers[D]){var W=this.getPackageForType(D);null!=W&&mxStencilRegistry.getStencil(W)}return N.apply(this,arguments)};var J=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,t,D,M,L,O){"1"==mxUtils.getValue(t.style,"lineShape",null)&&
-m.setFillColor(mxUtils.getValue(t.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return J.apply(this,arguments)};PrintDialog.prototype.create=function(m,t,D,M){function L(){fa.value=Math.max(1,Math.min(W,Math.max(parseInt(fa.value),parseInt(aa.value))));aa.value=Math.max(1,Math.min(W,Math.min(parseInt(fa.value),parseInt(aa.value))))}function O(Da){m.lastPrintPagesRadioChecked=Z.checked;m.lastPrintSelectionOnlyChecked=ca.checked;m.lastPrintCropRadioChecked=ka.checked;m.lastPrintFitRadioChecked=
-ba.checked;Z.checked&&aa.value<fa.value?(m.lastPrintPagesFromInput=aa.value,m.lastPrintPagesToInput=fa.value):(m.lastPrintPagesFromInput=null,m.lastPrintPagesToInput=null);ya.value=Math.max(1,Math.min(1600,parseInt(ya.value)))+"%";m.lastPrintZoom=ya.value;m.lastPrintBorder=oa.value;m.lastPrintGrid=Ca.checked;m.lastPrintTransparent=Aa.checked;m.lastPrintInclude=Ea.checked;m.lastPrintSheetsAcross=ma.value;m.lastPrintSheetsDown=wa.value;var Ia={};Ia.border=parseInt(oa.value);Ia.scale=parseInt(ya.value)/
-100;Ia.grid=Ca.checked;Ia.shadows=Fa.checked;Ia.transparent=Aa.checked;Ia.includeCopy=Ea.checked;Ia.sheetsAcross=parseInt(ma.value);Ia.sheetsDown=parseInt(wa.value);Ia.pagesFrom=parseInt(aa.value);Ia.pagesTo=parseInt(fa.value);Ia.allPages=Y.checked;Ia.selection=ca.checked;Ia.pageView=ha.checked;Ia.crop=ka.checked;Ia.fit=ba.checked;return null!=D?D(!Da,Ia):m.print(!Da,Ia)}var P=m.editor.graph,U=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign="center";
-V.style.marginTop="0px";mxUtils.write(V,t||mxResources.get("print"));U.appendChild(V);var X=1,W=1;V=document.createElement("div");V.style.whiteSpace="nowrap";var Y=document.createElement("input");Y.style.marginRight="8px";Y.style.marginBottom="8px";Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");V.appendChild(Y);t=document.createElement("span");mxUtils.write(t,mxResources.get("allPages"));mxEvent.addListener(t,"click",function(){Y.checked=!0});V.appendChild(t);mxUtils.br(V);
-var Z=Y.cloneNode(!0);V.appendChild(Z);t=document.createElement("span");mxUtils.write(t,mxResources.get("pages")+":");V.appendChild(t);mxEvent.addListener(t,"click",function(){Z.checked=!0});var aa=document.createElement("input");aa.style.margin="0 4px";aa.setAttribute("value","1");aa.setAttribute("type","number");aa.setAttribute("min","1");aa.style.width="40px";V.appendChild(aa);t=document.createElement("span");mxUtils.write(t,mxResources.get("to"));V.appendChild(t);var fa=aa.cloneNode(!0);V.appendChild(fa);
-mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(fa,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"change",L);mxEvent.addListener(fa,"change",L);if(null!=m.pages&&(W=m.pages.length,null!=m.currentPage))for(var ea=0;ea<W;ea++)if(m.currentPage==m.pages[ea]){X=ea+1;break}null!=m.lastPrintPagesFromInput&&null!=m.lastPrintPagesToInput?(aa.value=Math.min(W,Math.max(1,m.lastPrintPagesFromInput)),fa.value=Math.min(W,Math.max(1,m.lastPrintPagesToInput))):(aa.value=X,
-fa.value=X);aa.setAttribute("max",W);fa.setAttribute("max",W);ea=mxUtils.button(mxResources.get("currentPage"),function(Da){aa.value=X;fa.value=X;Z.checked=!0});ea.setAttribute("title",mxResources.get("currentPage"));ea.style.marginLeft="4px";ea.style.maxWidth="100px";ea.style.overflow="hidden";ea.style.textOverflow="ellipsis";ea.style.whiteSpace="nowrap";V.appendChild(ea);1<W&&U.appendChild(V);V=document.createElement("div");V.style.borderBottom="1px solid lightGray";V.style.paddingBottom="12px";
-V.style.marginBottom="12px";V.style.whiteSpace="nowrap";var ca=document.createElement("input");ca.setAttribute("name","pages-printdialog");ca.setAttribute("type",1==W?"checkbox":"radio");ca.style.marginRight="8px";P.isSelectionEmpty()&&ca.setAttribute("disabled","disabled");P.isEnabled()&&(V.appendChild(ca),t=document.createElement("span"),mxUtils.write(t,mxResources.get("selectionOnly")),V.appendChild(t));(P.isEnabled()||1<W)&&U.appendChild(V);!m.isPagesEnabled()||m.lastPrintPagesRadioChecked?Z.checked=
-!0:!P.isSelectionEmpty()&&m.lastPrintSelectionOnlyChecked?ca.checked=!0:Y.checked=!0;P.isSelectionEmpty()||mxEvent.addListener(t,"click",function(){ca.checked=!ca.checked});P=document.createElement("div");P.style.whiteSpace="nowrap";var ha=document.createElement("input");ha.style.marginBottom="8px";ha.style.marginRight="8px";ha.setAttribute("type","radio");ha.setAttribute("name","printSize");P.appendChild(ha);t=document.createElement("span");mxUtils.write(t,mxResources.get("pageView"));P.appendChild(t);
-mxEvent.addListener(P,"click",function(){ha.checked=!0});U.appendChild(P);P=document.createElement("div");P.style.whiteSpace="nowrap";var ka=document.createElement("input");ka.style.marginBottom="8px";ka.style.marginRight="8px";ka.setAttribute("type","radio");ka.setAttribute("name","printSize");P.appendChild(ka);t=document.createElement("span");mxUtils.write(t,mxResources.get("crop"));P.appendChild(t);mxEvent.addListener(P,"click",function(){ka.checked=!0});U.appendChild(P);P=document.createElement("div");
-P.style.whiteSpace="nowrap";var ba=document.createElement("input");ba.style.marginBottom="8px";ba.style.marginRight="8px";ba.setAttribute("type","radio");ba.setAttribute("name","printSize");t=document.createElement("div");t.style.display="inline-block";t.style.verticalAlign="top";t.style.paddingTop="2px";t.appendChild(ba);P.appendChild(t);V=document.createElement("table");V.style.display="inline-block";V.style.borderSpacing="0";ea=document.createElement("tbody");var ia=document.createElement("tr"),
-la=ia.cloneNode(!0),da=document.createElement("td"),ra=da.cloneNode(!0),pa=da.cloneNode(!0),sa=da.cloneNode(!0),va=da.cloneNode(!0),ja=da.cloneNode(!0);da.style.textAlign="right";sa.style.textAlign="right";mxUtils.write(da,mxResources.get("fitTo"));mxEvent.addListener(P,"click",function(Da){mxEvent.getSource(Da)!=ba&&(ba.checked=!ba.checked)});var ma=document.createElement("input");ma.style.margin="0 2px";ma.style.boxSizing="border-box";ma.setAttribute("value",m.lastPrintSheetsAcross||"1");ma.setAttribute("min",
-"1");ma.setAttribute("type","number");ma.style.width="40px";ra.appendChild(ma);t=document.createElement("span");mxUtils.write(t,mxResources.get("fitToSheetsAcross"));pa.appendChild(t);mxUtils.write(sa,mxResources.get("fitToBy"));var wa=ma.cloneNode(!0);wa.setAttribute("value",m.lastPrintSheetsDown||"1");va.appendChild(wa);mxEvent.addListener(ma,"click",function(Da){ba.checked=!0;mxEvent.consume(Da)});mxEvent.addListener(wa,"click",function(Da){ba.checked=!0;mxEvent.consume(Da)});m.lastPrintCropRadioChecked?
-ka.checked=!0:m.lastPrintFitRadioChecked?ba.checked=!0:ha.checked=!0;t=document.createElement("span");mxUtils.write(t,mxResources.get("fitToSheetsDown"));ja.appendChild(t);ia.appendChild(da);ia.appendChild(ra);ia.appendChild(pa);la.appendChild(sa);la.appendChild(va);la.appendChild(ja);ea.appendChild(ia);ea.appendChild(la);V.appendChild(ea);P.appendChild(V);U.appendChild(P);P=document.createElement("div");P.style.borderTop="1px solid lightGray";P.style.whiteSpace="nowrap";P.style.paddingTop="12px";
-P.style.marginTop="12px";P.style.paddingLeft="8px";mxUtils.write(P,mxResources.get("borderWidth")+":");var oa=document.createElement("input");oa.setAttribute("type","number");oa.setAttribute("min","0");oa.style.width="40px";oa.style.marginLeft="4px";oa.value=null!=m.lastPrintBorder?m.lastPrintBorder:mxPrintPreview.prototype.pageMargin;P.appendChild(oa);t=document.createElement("span");t.style.marginLeft="8px";mxUtils.write(t,mxResources.get("zoom")+":");P.appendChild(t);var ya=document.createElement("input");
-ya.style.width="60px";ya.style.marginLeft="4px";ya.value=null!=m.lastPrintZoom?m.lastPrintZoom:"100%";P.appendChild(ya);mxUtils.br(P);var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");Ca.style.marginTop="12px";Ca.checked=null!=m.lastPrintGrid?m.lastPrintGrid:!1;P.appendChild(Ca);t=document.createElement("span");t.style.marginLeft="4px";t.style.marginRight="8px";mxUtils.write(t,mxResources.get("grid"));P.appendChild(t);mxEvent.addListener(t,"click",function(Da){Ca.checked=!0;
-mxEvent.consume(Da)});var Fa=document.createElement("input");Fa.setAttribute("type","checkbox");Fa.style.marginTop="12px";Fa.checked=null!=m.lastPrintShadow?m.lastPrintShadow:!1;P.appendChild(Fa);t=document.createElement("span");t.style.marginLeft="4px";t.style.marginRight="8px";mxUtils.write(t,mxResources.get("shadows"));P.appendChild(t);m.isOffline()&&!mxClient.IS_CHROMEAPP||t.appendChild(m.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));mxEvent.addListener(t,"click",function(Da){"IMG"!=
-mxEvent.getSource(Da).nodeName&&(Fa.checked=!0,mxEvent.consume(Da))});Editor.enableShadowOption?null!=D&&mxUtils.br(P):(Fa.style.display="none",t.style.display="none");var Aa=document.createElement("input");Aa.setAttribute("type","checkbox");Aa.style.marginTop="10px";Aa.checked=null!=m.lastPrintTransparent?m.lastPrintTransparent:!1;null!=D&&(P.appendChild(Aa),t=document.createElement("span"),t.style.marginLeft="4px",mxUtils.write(t,mxResources.get("transparentBackground")),P.appendChild(t),mxEvent.addListener(t,
-"click",function(Da){Aa.checked=!0;mxEvent.consume(Da)}));var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.marginTop="10px";Ea.checked=null!=m.lastPrintInclude?m.lastPrintInclude:Editor.defaultIncludeDiagram;null==D||mxClient.IS_CHROMEAPP||"draw.io"!=m.getServiceName()||(mxUtils.br(P),P.appendChild(Ea),t=document.createElement("span"),t.style.marginLeft="4px",mxUtils.write(t,mxResources.get("includeCopyOfMyDiagram")),P.appendChild(t),mxEvent.addListener(t,"click",
-function(Da){Ea.checked=!0;mxEvent.consume(Da)}));U.appendChild(P);t=document.createElement("div");t.style.marginTop="30px";t.style.textAlign="right";t.style.whiteSpace="nowrap";m.isOffline()&&!mxClient.IS_CHROMEAPP||null!=D||t.appendChild(m.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));P=mxUtils.button(mxResources.get("cancel"),function(){m.hideDialog()});P.className="geBtn";m.editor.cancelFirst&&t.appendChild(P);PrintDialog.previewEnabled&&null==D&&(V=mxUtils.button(mxResources.get("preview"),
-function(){try{m.hideDialog(),O(!1)}catch(Da){m.handleError(Da)}}),V.className="geBtn",t.appendChild(V));M=null!=M?M:null!=D?"export":PrintDialog.previewEnabled?"print":"ok";M=mxUtils.button(mxResources.get(M),function(){try{m.hideDialog(),O(!0)}catch(Da){m.handleError(Da)}});M.className="geBtn gePrimaryBtn";t.appendChild(M);m.editor.cancelFirst||t.appendChild(P);U.appendChild(t);if(m.editor.isChromelessView()){var Oa=function(){Editor.isDarkMode()?(U.classList.add("geDarkMode"),U.style.colorScheme=
-"dark"):(U.classList.remove("geDarkMode"),U.style.colorScheme="light")};m.addListener("darkModeChanged",Oa);Oa();var Ba=function(Da,Ia){Da=Ia.getProperty("dialog");U.parentNode==Da.container&&(m.editor.removeListener(Ba),m.removeListener(Oa))};m.editor.addListener("hideDialog",Ba)}this.container=U};var K=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||
+null!=m.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=m.shadowOffsetX);null!=m.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=m.shadowOffsetY);null!=m.shadowBlur&&(mxConstants.SHADOW_BLUR=m.shadowBlur);null!=m.enableAnimations&&(Editor.enableAnimations=m.enableAnimations);null!=m.enableChatGpt&&(Editor.enableChatGpt=m.enableChatGpt);null!=m.gptApiKey&&(Editor.gptApiKey=m.gptApiKey);null!=m.geminiApiKey&&(Editor.geminiApiKey=m.geminiApiKey);null!=m.gptModels&&(Editor.gptModels=m.gptModels);null!=m.gptUrl&&
+(Editor.gptUrl=m.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(m){if(null!=m){Editor.prototype.fontCss=m;var t=document.getElementsByTagName("script")[0];if(null!=t&&null!=t.parentNode){var C=document.createElement("style");C.setAttribute("type","text/css");C.appendChild(document.createTextNode(m));t.parentNode.insertBefore(C,t);m=m.split("url(");for(C=1;C<m.length;C++){var N=m[C].indexOf(")");
+N=Editor.trimCssUrl(m[C].substring(0,N));var M=document.createElement("link");M.setAttribute("rel","preload");M.setAttribute("href",N);M.setAttribute("as","font");M.setAttribute("crossorigin","");t.parentNode.insertBefore(M,t)}}}};Editor.trimCssUrl=function(m){return m.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
+Editor.GUID_LENGTH=20;Editor.guid=function(m){m=null!=m?m:Editor.GUID_LENGTH;for(var t=[],C=0;C<m;C++)t.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return t.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},
+{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.generateTimeout=6E4;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(m){m=null!=m&&"mxlibrary"!=m.nodeName?this.extractGraphModel(m):null;if(null!=m){var t=Editor.extractParserError(m,mxResources.get("invalidOrMissingFile"));if(t)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[m],"cause",[t]),Error(mxResources.get("notADiagramFile")+" ("+t+")");if("mxGraphModel"==m.nodeName){t=m.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=t&&""!=
+t)t!=this.graph.currentStyle&&(C=null!=this.graph.themes?this.graph.themes[t]:mxUtils.load(STYLE_PATH+"/"+t+".xml").getDocumentElement(),null!=C&&(N=new mxCodec(C.ownerDocument),N.decode(C,this.graph.getStylesheet())));else{var C=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=C){var N=new mxCodec(C.ownerDocument);N.decode(C,this.graph.getStylesheet())}}this.graph.currentStyle=t;this.graph.mathEnabled="1"==urlParams.math||
+"1"==m.getAttribute("math");this.graph.setAdaptiveColors(m.getAttribute("adaptiveColors"));t=m.getAttribute("backgroundImage");null!=t?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(t)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==m.getAttribute("shadow"),!1);if(t=m.getAttribute("extFonts"))try{for(t=t.split("|").map(function(M){M=
+M.split("^");return{name:M[0],url:M[1]}}),C=0;C<t.length;C++)this.graph.addExtFont(t[C].name,t[C].url)}catch(M){console.log("ExtFonts format error: "+M.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 f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(m,t){m=null!=m?m:!0;var C=f.apply(this,arguments);
+null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&C.setAttribute("style",this.graph.currentStyle);var N=this.graph.getBackgroundImageObject(this.graph.backgroundImage,t);null!=N&&C.setAttribute("backgroundImage",JSON.stringify(N));C.setAttribute("math",this.graph.mathEnabled?"1":"0");C.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?C.setAttribute("adaptiveColors",this.graph.adaptiveColors):C.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&
+0<this.graph.extFonts.length&&(N=this.graph.extFonts.map(function(M){return M.name+"^"+M.url}),C.setAttribute("extFonts",N.join("|")));return C};Editor.prototype.isDataSvg=function(m){try{var t=mxUtils.parseXml(m).documentElement.getAttribute("content");if(null!=t&&(null!=t&&"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(cont,t))),null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t)),null!=t&&0<t.length)){var C=mxUtils.parseXml(t).documentElement;return"mxfile"==
+C.nodeName||"mxGraphModel"==C.nodeName}}catch(N){}return!1};Editor.prototype.extractGraphModel=function(m,t,C){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
+k.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(m,t){if("undefined"===typeof window.MathJax){var C=function(){N=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};m=null!=m?
+m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var N=null;Editor.doMathJaxRender=function(Q){try{null==N?(MathJax.typesetClear([Q]),MathJax.typeset([Q]),C()):N!=Q&&Editor.mathJaxQueue.push(Q)}catch(T){MathJax.typesetClear([Q]),null!=T.retry?(N=Q,T.retry.then(function(){MathJax.typesetPromise([Q]).then(C)["catch"](function(V){console.log("Error in MathJax.typesetPromise: "+V.toString());C()})})["catch"](function(V){console.log("Error in MathJax.retry: "+V.toString());C()})):null!=window.console&&
+console.log("Error in MathJax.typeset: "+T.toString())}};window.MathJax=null!=t?t:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"],paths:{fonts:DRAW_MATH_URL+"/fonts","mathjax-tex":DRAW_MATH_URL+"/fonts/mathjax-tex-font","mathjax-mhchem-extension":DRAW_MATH_URL+"/fonts/mathjax-mhchem-font-extension","mathjax-bbm-extension":DRAW_MATH_URL+"/fonts/mathjax-bbm-font-extension",
+"mathjax-bboldx-extension":DRAW_MATH_URL+"/fonts/mathjax-bboldx-font-extension","mathjax-dsfont-extension":DRAW_MATH_URL+"/fonts/mathjax-dsfont-font-extension"}},output:{font:"mathjax-tex"},startup:{pageReady:function(){for(var Q=0;Q<Editor.mathJaxQueue.length;Q++)Editor.doMathJaxRender(Editor.mathJaxQueue[Q])}}};Editor.MathJaxRender=function(Q){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(Q):Editor.mathJaxQueue.push(Q)};Editor.onMathJaxDone=function(){};
+var M=Editor.prototype.init;Editor.prototype.init=function(){M.apply(this,arguments);var Q=mxUtils.bind(this,function(T,V){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,Q);this.graph.addListener(mxEvent.REFRESH,Q)};t=document.getElementsByTagName("script");if(null!=t&&0<t.length){var O=document.createElement("script");O.setAttribute("type","text/javascript");O.setAttribute("src",m);t[0].parentNode.appendChild(O)}}};
+Editor.prototype.csvToArray=function(m){if(0<m.length){var t="",C=[""],N=0,M=!0,O;m=$jscomp.makeIterator(m);for(O=m.next();!O.done;O=m.next())O=O.value,'"'===O?(M&&O===t&&(C[N]+=O),M=!M):","===O&&M?O=C[++N]="":C[N]+=O,t=O;return C}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(m)){var t=EditorUi.isVisioFilename(m);t=/\.png$/i.test(m)||/\.pdf$/i.test(m)||t;var C=
+"t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+C+(t?"&base64=1":"")}return m};Editor.prototype.isCorsEnabledForUrl=function(m){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||m.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(m)||"https://raw.githubusercontent.com/"===m.substring(0,34)||
+"https://fonts.googleapis.com/"===m.substring(0,29)||"https://fonts.gstatic.com/"===m.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var m=new mxUrlConverter;m.updateBaseUrl();var t=m.convert,C=this;m.convert=function(N){null!=N&&navigator.onLine&&("http://"!=N.substring(0,7)&&"https://"!=N.substring(0,8)||N.substring(0,m.baseUrl.length)==m.baseUrl||C.crossOriginImages&&C.isCorsEnabledForUrl(N)?"chrome-extension://"!=N.substring(0,19)&&(N=t.apply(this,arguments)):N=PROXY_URL+
+"?url="+encodeURIComponent(N));return N};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,t,C,N,M){try{var O=!0,Q=window.setTimeout(mxUtils.bind(this,function(){O=!1;t(m)}),this.timeout),T=mxUtils.bind(this,function(){null!=N?this.convertImageToDataUri(m,t,C,N,!0):t(m)});if(/(\.svg)$/i.test(m)&&!M)mxUtils.get(m,mxUtils.bind(this,function(X){window.clearTimeout(Q);O&&(200>X.getStatus()||
+299<X.getStatus()?T():t(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(Q);O&&T()}));else{var V=new Image;this.crossOriginImages&&(V.crossOrigin="anonymous");V.onload=function(){window.clearTimeout(Q);if(O)try{N=null!=N&&M?N:1;var X=document.createElement("canvas"),W=X.getContext("2d");W.scale(N,N);X.height=V.height*N;X.width=V.width*N;W.drawImage(V,0,0);t(X.toDataURL())}catch(Y){t(m)}};V.onerror=function(){window.clearTimeout(Q);O&&(null!=C?C():t(m))};V.src=
+m}}catch(X){null!=C?C():t(m)}};Editor.prototype.convertImages=function(m,t,C,N){function M(){0<O.length?O.shift()():t(m)}null==N&&(N=this.createImageUrlConverter());var O=[],Q=C||{};C=mxUtils.bind(this,function(T,V){T=m.getElementsByTagName(T);for(var X=0;X<T.length;X++)mxUtils.bind(this,function(W){O.push(mxUtils.bind(this,function(){try{if(null!=W){var Y=N.convert(W.getAttribute(V));if(null!=Y&&"data:"!=Y.substring(0,5)){var Z=Q[Y];null==Z?this.convertImageToDataUri(Y,function(aa){null!=aa&&(Q[Y]=
+aa,W.setAttribute(V,aa));M()},null,Editor.svgRasterScale):(W.setAttribute(V,Z),M())}else null!=Y&&W.setAttribute(V,Y),M()}}catch(aa){M()}}))})(T[X])});C("image","xlink:href");C("img","src");M()};Editor.base64Encode=function(m){for(var t="",C=0,N=m.length,M,O,Q;C<N;){M=m.charCodeAt(C++)&255;if(C==N){t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4);t+="==";break}O=m.charCodeAt(C++);
+if(C==N){t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4|(O&240)>>4);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2);t+="=";break}Q=m.charCodeAt(C++);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4|(O&240)>>4);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+15)<<2|(Q&192)>>6);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q&63)}return t};Editor.prototype.loadUrl=function(m,t,C,N,M,O,Q,T){try{var V=!Q&&(N||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));M=null!=M?M:!0;var X=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(W){200<=W.getStatus()&&299>=W.getStatus()?null!=t&&(W=W.getText(),V&&(O=null!=O?O:"data:image/png;base64,",W=O+Editor.base64Encode(W)),
+t(W)):null!=C&&(0==W.getStatus()?C({message:mxResources.get("accessDenied")},W):404==W.getStatus()?C({message:mxResources.get("fileNotFound"),code:W.getStatus()},W):C({message:this.getErrorMessage(W)},W))}),function(W){null!=C&&C({message:mxResources.get("error")+" "+W.getStatus()})},V,this.timeout,function(){M&&null!=C&&C({code:App.ERROR_TIMEOUT,retry:X})},T)});X()}catch(W){null!=C&&C(W)}};Editor.prototype.getErrorMessage=function(m){var t=mxResources.get("error")+" "+m.getStatus();try{var C=m.getText(),
+N=JSON.parse(C);null!=N&&null!=N.error&&null!=N.error.message&&(t=N.error.message+" ("+t+")")}catch(M){}return t};Editor.prototype.absoluteCssFonts=function(m){var t=null;if(null!=m){var C=m.split("url(");if(0<C.length){t=[C[0]];m=window.location.pathname;var N=null!=m?m.lastIndexOf("/"):-1;0<=N&&(m=m.substring(0,N+1));N=document.getElementsByTagName("base");var M=null;null!=N&&0<N.length&&(M=N[0].getAttribute("href"));for(var O=1;O<C.length;O++)if(N=C[O].indexOf(")"),0<N){var Q=Editor.trimCssUrl(C[O].substring(0,
+N));this.graph.isRelativeUrl(Q)&&(Q=null!=M?M+Q:window.location.protocol+"//"+window.location.hostname+("/"==Q.charAt(0)?"":m)+Q);t.push('url("'+Q+'"'+C[O].substring(N))}else t.push(C[O])}else t=[m]}return null!=t?t.join(""):null};Editor.prototype.mapFontUrl=function(m,t,C){/^https?:\/\//.test(t)&&!this.isCorsEnabledForUrl(t)&&(t=PROXY_URL+"?url="+encodeURIComponent(t));C(m,t)};Editor.prototype.embedCssFonts=function(m,t){var C=m.split("url("),N=0;null==this.cachedFonts&&(this.cachedFonts={});var M=
+mxUtils.bind(this,function(){if(0==N){for(var V=[C[0]],X=1;X<C.length;X++){var W=C[X].indexOf(")");V.push('url("');V.push(this.cachedFonts[Editor.trimCssUrl(C[X].substring(0,W))]);V.push('"'+C[X].substring(W))}t(V.join(""))}});if(0<C.length){for(m=1;m<C.length;m++){var O=C[m].indexOf(")"),Q=null,T=C[m].indexOf("format(",O);0<T&&(Q=Editor.trimCssUrl(C[m].substring(T+7,C[m].indexOf(")",T))));mxUtils.bind(this,function(V){if(null==this.cachedFonts[V]){this.cachedFonts[V]=V;N++;var X="application/x-font-ttf";
+if("svg"==Q||/(\.svg)($|\?)/i.test(V))X="image/svg+xml";else if("otf"==Q||"embedded-opentype"==Q||/(\.otf)($|\?)/i.test(V))X="application/x-font-opentype";else if("woff"==Q||/(\.woff)($|\?)/i.test(V))X="application/font-woff";else if("woff2"==Q||/(\.woff2)($|\?)/i.test(V))X="application/font-woff2";else if("eot"==Q||/(\.eot)($|\?)/i.test(V))X="application/vnd.ms-fontobject";else if("sfnt"==Q||/(\.sfnt)($|\?)/i.test(V))X="application/font-sfnt";this.mapFontUrl(X,V,mxUtils.bind(this,function(W,Y){this.loadUrl(Y,
+mxUtils.bind(this,function(Z){this.cachedFonts[V]=Z;N--;M()}),mxUtils.bind(this,function(Z){N--;M()}),!0,null,"data:"+W+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(C[m].substring(0,O)),Q)}M()}else t(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(t){this.resolvedFontCss=t;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},t;for(t in Graph.fontMapping)Graph.isCssFontUrl(t)&&
+(m[t]=Graph.fontMapping[t]);return m};Editor.prototype.embedExtFonts=function(m){var t=this.graph.getCustomFonts();if(0<t.length){var C=[],N=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var M=mxUtils.bind(this,function(){0==N&&this.embedCssFonts(C.join(""),m)}),O=0;O<t.length;O++)mxUtils.bind(this,function(Q,T){Graph.isCssFontUrl(T)?null==this.cachedGoogleFonts[T]?(N++,this.loadUrl(Graph.rewriteGoogleFontUrl(T),mxUtils.bind(this,function(V){this.cachedGoogleFonts[T]=
+V;C.push(V+"\n");N--;M()}),mxUtils.bind(this,function(V){N--;C.push("@import url("+T+");\n");M()}))):C.push(this.cachedGoogleFonts[T]+"\n"):C.push('@font-face {font-family: "'+Q+'";src: url("'+T+'")}\n')})(t[O].name,t[O].url);M()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var t=document.getElementsByTagName("style"),C=0;C<t.length;C++){var N=mxUtils.getTextContent(t[C]);0>N.indexOf("mxPageSelector")&&0<N.indexOf("MathJax")&&m[0].appendChild(t[C].cloneNode(!0))}};
+Editor.prototype.addFontCss=function(m,t){t=null!=t?t:this.absoluteCssFonts(this.fontCss);if(null!=t){var C=mxUtils.getSvgDefs(m),N=t.split("\n");t=[];for(var M=[],O=0;O<N.length;O++)"@import"==N[O].substring(0,7)?t.push(N[O]):M.push(N[O]);m=m.ownerDocument;m=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"style"):m.createElement("style");m.setAttribute("type","text/css");0<t.length&&(mxUtils.setTextContent(m,t.join("\n")),C.appendChild(m));0<M.length&&(m=m.cloneNode(!1),mxUtils.setTextContent(m,
+M.join("\n")),C.appendChild(m))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(m,t,C){var N=mxClient.IS_FF?8192:16384;return Math.min(C,Math.min(N/m,N/t))};Editor.prototype.exportToCanvas=function(m,t,C,N,M,O,Q,T,V,X,W,Y,Z,aa,ja,ea,ca,ka){try{O=null!=O?O:!0;Q=null!=Q?Q:!0;Y=null!=Y?Y:this.graph;Z=null!=Z?Z:0;var la=V?null:Y.background;la==mxConstants.NONE&&(la=null);null==la&&(la=N);null==la&&0==V&&
+(la="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(Y.getSvg(null,null,Z,aa,null,Q,null,null,null,X,null,ea,ca,ka),mxUtils.bind(this,function(ba){try{ba.style.setProperty("-webkit-font-smoothing","antialiased");ba.style.setProperty("-moz-osx-font-smoothing","grayscale");var ia=new Image;ia.onload=mxUtils.bind(this,function(){try{var da=function(){mxClient.IS_SF?window.setTimeout(function(){sa.drawImage(ia,0,0);m(ra,ba)},0):(sa.drawImage(ia,0,0),m(ra,ba))},ra=document.createElement("canvas"),
+pa=parseInt(ba.getAttribute("width")),qa=parseInt(ba.getAttribute("height"));T=null!=T?T:1;null!=t&&(T=O?Math.min(1,Math.min(3*t/(4*qa),t/pa)):t/pa);T=this.getMaxCanvasScale(pa,qa,T);pa=Math.ceil(T*pa);qa=Math.ceil(T*qa);ra.setAttribute("width",pa);ra.setAttribute("height",qa);var sa=ra.getContext("2d");if(null!=la){var ha=mxUtils.getLightDarkColor(la);sa.beginPath();sa.rect(0,0,pa,qa);sa.fillStyle="dark"==ea&&"none"!=Y.getAdaptiveColors()?ha.dark:ha.light;sa.fill()}1!=T&&sa.scale(T,T);if(ja){var ma=
+Y.view,ta=ma.scale;ma.scale=1;var na=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=ta;na="data:image/svg+xml;base64,"+na;var xa=Y.gridSize*ma.gridSteps*T,Aa=Y.getGraphBounds(),Ea=ma.translate.x*ta,va=ma.translate.y*ta,Fa=Ea+(Aa.x-Ea)/ta-Z,ya=va+(Aa.y-va)/ta-Z,Oa=new Image;Oa.onload=function(){try{for(var Ca=-Math.round(xa-mxUtils.mod((Ea-Fa)*T,xa)),Ga=-Math.round(xa-mxUtils.mod((va-ya)*T,xa));Ca<pa;Ca+=xa)for(var Ha=Ga;Ha<qa;Ha+=xa)sa.drawImage(Oa,Ca/T,Ha/T);da()}catch(Ja){null!=
+M&&M(Ja)}};Oa.onerror=function(Ca){null!=M&&M(Ca)};Oa.src=na}else da()}catch(Ca){null!=M&&M(Ca)}});ia.onerror=function(da){null!=M&&M(da)};X&&this.graph.addSvgShadow(ba);this.graph.mathEnabled&&this.addMathCss(ba);var fa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ba,this.resolvedFontCss),ia.src=Editor.createSvgDataUri(mxUtils.getXml(ba))}catch(da){null!=M&&M(da)}});this.embedExtFonts(mxUtils.bind(this,function(da){try{null!=da&&this.addFontCss(ba,da),this.loadFonts(fa)}catch(ra){null!=
+M&&M(ra)}}))}catch(da){null!=M&&M(da)}}),C,W)}catch(ba){null!=M&&M(ba)}};Editor.crcTable=[];for(var p=0;256>p;p++)for(var q=p,u=0;8>u;u++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[p]=q;Editor.updateCRC=function(m,t,C,N){for(var M=0;M<N;M++)m=Editor.crcTable[(m^t.charCodeAt(C+M))&255]^m>>>8;return m};Editor.crc32=function(m){for(var t=-1,C=0;C<m.length;C++)t=t>>>8^Editor.crcTable[(t^m.charCodeAt(C))&255];return(t^-1)>>>0};Editor.writeGraphModelToPng=function(m,t,C,N,M){function O(W,Y){var Z=
+V;V+=Y;return W.substring(Z,V)}function Q(W){W=O(W,4);return W.charCodeAt(3)+(W.charCodeAt(2)<<8)+(W.charCodeAt(1)<<16)+(W.charCodeAt(0)<<24)}function T(W){return String.fromCharCode(W>>24&255,W>>16&255,W>>8&255,W&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var V=0;if(O(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=M&&M();else if(O(m,4),"IHDR"!=O(m,4))null!=M&&M();else{O(m,17);M=m.substring(0,V);do{var X=Q(m);if("IDAT"==O(m,4)){M=m.substring(0,
+V-8);"pHYs"==t&&"dpi"==C?(C=Math.round(N/.0254),C=T(C)+T(C)+String.fromCharCode(1)):C=C+String.fromCharCode(0)+("zTXt"==t?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,t,0,4);N=Editor.updateCRC(N,C,0,C.length);M+=T(C.length)+t+C+T(N^4294967295);M+=m.substring(V-8,m.length);break}M+=m.substring(V-8,V-4+X);O(m,X);O(m,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(M):Base64.encode(M,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";
+var z=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,t){z.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var G=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){G.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,t){var C=null;null!=m.editor.graph.getModel().getParent(t)?C=t.getId():
+null!=m.currentPage&&(C=m.currentPage.getId());return C});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 F=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?F.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(m){return"simple"==
+Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(m){m=d.apply(this,arguments);var t=this.editorUi,C=t.editor.graph;if(C.isEnabled()){var N=t.getCurrentFile();null!=N&&N.isAutosaveOptional()&&m.appendChild(this.createOption(mxResources.get("autosave"),function(){return t.editor.autosave},function(O){t.editor.setAutosave(O);t.editor.autosave&&N.isModified()&&N.fileChanged()},
+{install:function(O){this.listener=function(){O(t.editor.autosave)};t.editor.addListener("autosaveChanged",this.listener)},destroy:function(){t.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&C.isEnabled()&&"undefined"!==typeof MathJax){var M=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return C.mathEnabled},function(O){t.actions.get("mathematicalTypesetting").funct()},{install:function(O){this.listener=function(){O(C.mathEnabled)};t.addListener("mathEnabledChanged",
+this.listener)},destroy:function(){t.removeListener(this.listener)}});m.appendChild(M);(!t.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&M.appendChild(t.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return m};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,isVisible:function(m){return"0"==mxUtils.getValue(m.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(m){return"1"==mxUtils.getValue(m.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.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:.25,isVisible:function(m){return"0"==mxUtils.getValue(m.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(m){return"1"==mxUtils.getValue(m.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
+type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.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.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",
+min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
+type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",
+dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=
+mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",
+min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",
+dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",
+dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
+max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
+[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
+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;var g=StyleFormatPanel.prototype.init;
+StyleFormatPanel.prototype.init=function(){var m=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=m.style.shape&&!m.containsLabel&&0<m.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments);null!=m.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),m.customProperties,m))};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(m){var t=
+this.editorUi.getSelectionState();1==t.cells.length?this.addActions(m,["copyStyle","pasteStyle"]):1<=t.cells.length&&this.addActions(m,["pasteStyle","pasteData"]);l.apply(this,arguments);return m};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(m,t,C,N){function M(sa,ha,ma,ta,na){if(null!=ma.valueChanged)ma.valueChanged(ha,na,C,Y);else{Z.getModel().beginUpdate();try{na=[];var xa=[];if(null!=ma.index){for(var Aa=[],Ea=ma.parentRow.nextSibling;Ea&&Ea.getAttribute("data-pName")==
+sa;)Aa.push(Ea.getAttribute("data-pValue")),Ea=Ea.nextSibling;ma.index<Aa.length?null!=ta?Aa.splice(ta,1):Aa[ma.index]=ha:Aa.push(ha);null!=ma.size&&Aa.length>ma.size&&(Aa=Aa.slice(0,ma.size));ha=Aa.join(",");null!=ma.countProperty&&(Z.setCellStyles(ma.countProperty,Aa.length,Z.getSelectionCells()),na.push(ma.countProperty),xa.push(Aa.length))}Z.setCellStyles(sa,ha,Z.getSelectionCells());na.push(sa);xa.push(ha);if(null!=ma.dependentProps)for(sa=0;sa<ma.dependentProps.length;sa++){var va=ma.dependentPropsDefVal[sa],
+Fa=ma.dependentPropsVals[sa];if(Fa.length>ha)Fa=Fa.slice(0,ha);else for(var ya=Fa.length;ya<ha;ya++)Fa.push(va);Fa=Fa.join(",");Z.setCellStyles(ma.dependentProps[sa],Fa,Z.getSelectionCells());na.push(ma.dependentProps[sa]);xa.push(Fa)}if("function"==typeof ma.onChange)ma.onChange(Z,ha);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",na,"values",xa,"cells",Z.getSelectionCells()))}finally{Z.getModel().endUpdate()}}}function O(sa,ha){ha.style.left="0px";ha.style.top="0px";ha.style.position=
+"relative";ha.style.right="0px";ha.style.bottom="0px";ha.style.width="100%";ha.style.maxWidth="100%";ha.style.maxHeight="100%";ha.style.textAlign="left"}function Q(sa,ha,ma){function ta(xa){if(null==xa||xa==mxConstants.NONE)na.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==xa)na.style.background="";else{var Aa=mxUtils.getLightDarkColor(xa);mxUtils.isLightDarkColor(xa)&&Aa.light!=Aa.dark?na.style.background="linear-gradient(to right bottom, "+Aa.cssText+" 50%, "+mxUtils.invertLightDarkColor(Aa).cssText+
+" 50.3%)":na.style.background=xa}}var na=document.createElement("div");na.style.width="32px";na.style.height="8px";na.style.margin="2px";na.style.borderStyle="solid";na.style.borderWidth="1px";ta(ha);btn=mxUtils.button("",mxUtils.bind(Y,function(xa){this.editorUi.pickColor(ha,function(Aa){M(sa,Aa,ma);ta(Aa)});mxEvent.consume(xa)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(na);return btn}function T(sa,
+ha,ma,ta,na,xa,Aa){null!=ha&&(ha=ha.split(","),aa.push({name:sa,values:ha,type:ma,defVal:ta,countProperty:na,parentRow:xa,isDeletable:!0,flipBkg:Aa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ea){for(var va=xa,Fa=0;null!=va.nextSibling;)if(va.nextSibling.getAttribute("data-pName")==sa)va=va.nextSibling,Fa++;else break;var ya={type:ma,parentRow:xa,index:Fa,isDeletable:!0,defVal:ta,countProperty:na};Fa=W(sa,"",ya,0==Fa%2,Aa);M(sa,ta,ya);va.parentNode.insertBefore(Fa,va.nextSibling);mxEvent.consume(Ea)}));
+btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function V(sa,ha,ma,ta,na,xa,Aa){if(0<na){var Ea=Array(na);ha=null!=ha?ha.split(","):[];for(var va=0;va<na;va++)Ea[va]=null!=ha[va]?ha[va]:null!=ta?ta:"";aa.push({name:sa,values:Ea,type:ma,defVal:ta,parentRow:xa,flipBkg:Aa,size:na})}return document.createElement("div")}function X(sa,ha,ma){var ta=document.createElement("input");ta.type="checkbox";ta.checked="1"==ha;mxEvent.addListener(ta,"change",function(){M(sa,
+ta.checked?"1":"0",ma,null,ta)});return ta}function W(sa,ha,ma,ta,na){var xa=ma.dispName,Aa=ma.type,Ea=document.createElement("tr");Ea.className="gePropRow"+(na?"Dark":"")+(ta?"Alt":"")+" gePropNonHeaderRow";Ea.setAttribute("data-pName",sa);Ea.setAttribute("data-pValue",ha);ta=!1;null!=ma.index&&(Ea.setAttribute("data-index",ma.index),xa=(null!=xa?xa:"")+"["+ma.index+"]",ta=!0);var va=document.createElement("td");va.className="gePropRowCell";xa=mxResources.get(xa,null,xa);mxUtils.write(va,xa);va.setAttribute("title",
+xa);ta&&(va.style.textAlign="right");Ea.appendChild(va);va=document.createElement("td");va.className="gePropRowCell";va.setAttribute("title",null!=ha?decodeURIComponent(ha):mxResources.get("none"));mxEvent.addListener(va,"click",mxUtils.bind(Y,function(Ca){!mxUtils.isAncestorNode(Ea,document.activeElement)&&mxUtils.isAncestorNode(Ea.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(Ca))}));if("color"==
+Aa)va.appendChild(Q(sa,ha,ma));else if("bool"==Aa||"boolean"==Aa)va.appendChild(X(sa,ha,ma));else if("enum"==Aa){var Fa=ma.enumList;va.innerHTML="";var ya=document.createElement("div");ya.className="gePropValue";va.appendChild(ya);for(na=0;na<Fa.length;na++)if(xa=Fa[na],xa.val==ha){mxUtils.write(ya,mxResources.get(xa.dispName,null,xa.dispName));break}mxEvent.addListener(va,"click",mxUtils.bind(Y,function(Ca){var Ga=mxEvent.getSource(Ca);if(!(Ga!=va&&Ga!=ya||mxEvent.isConsumed(Ca))){ya.innerHTML="";
+var Ha=document.createElement("select"),Ja=null;O(va,Ha);for(Ca=0;Ca<Fa.length;Ca++){Ga=Fa[Ca];var La=document.createElement("option");La.value=mxUtils.htmlEntities(Ga.val);mxUtils.write(La,mxResources.get(Ga.dispName,null,Ga.dispName));Ha.appendChild(La);null==Ga.val&&(La.value="null",Ja=La)}Ha.value=null==ha&&null!=Ja?"null":ha;ya.appendChild(Ha);mxEvent.addListener(Ha,"change",function(){var Za=mxUtils.htmlEntities(Ha.value);if(Ha[Ha.selectedIndex]==Ja||"null"==Za.value)Za=null;M(sa,Za,ma)});Ha.focus();
+mxEvent.addListener(Ha,"blur",function(){ya.innerHTML="";for(var Za=0;Za<Fa.length;Za++){var $a=Fa[Za];if($a.val==Ha.value){mxUtils.write(ya,mxResources.get($a.dispName,null,$a.dispName));break}}})}}))}else if("dynamicArr"==Aa)va.appendChild(T(sa,ha,ma.subType,ma.subDefVal,ma.countProperty,Ea,na));else if("staticArr"==Aa)va.appendChild(V(sa,ha,ma.subType,ma.subDefVal,ma.size,Ea,na));else if("readOnly"==Aa)na=document.createElement("input"),na.setAttribute("readonly",""),na.value=ha,na.style.borderWidth=
+"0px","id"==sa||"shape"==sa?(Ea.firstChild.innerHTML="",Ea.firstChild.setAttribute("colspan","2"),na.style.flexGrow="1",na.style.marginLeft="4px",na.style.textAlign="id"==sa?"center":"left",na.setAttribute("title",ha),xa=document.createElement("div"),mxUtils.write(xa,mxResources.get(sa)+":"),xa.style.display="inline-flex",xa.style.alignItems="center",xa.style.width="100%",xa.appendChild(na),Ea.firstChild.appendChild(xa)):(na.style.width="96px",va.appendChild(na));else{va.innerHTML="";var Oa=document.createElement("div");
+Oa.className="gePropValue";va.appendChild(Oa);Oa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ha));mxEvent.addListener(va,"click",mxUtils.bind(Y,function(Ca){function Ga(){var La=Ja.value;La=0==La.length&&"string"!=Aa&&"numbers"!=Aa?0:La;ma.allowAuto&&(null!=La.trim&&"auto"==La.trim().toLowerCase()?(La="auto",Aa="string"):(La=parseFloat(La),La=isNaN(La)?0:La));null!=ma.min&&La<ma.min?La=ma.min:null!=ma.max&&La>ma.max&&(La=ma.max);var Za=null;try{Za="numbers"==Aa?La.match(/\d+/g).map(Number).join(" "):
+encodeURIComponent(("int"==Aa?parseInt(La):La)+"")}catch($a){}M(sa,Za,ma,null,Ja)}var Ha=mxEvent.getSource(Ca);if(!(Ha!=va&&Ha!=Oa||mxEvent.isConsumed(Ca))){Oa.innerHTML="";var Ja=document.createElement("input");O(Oa,Ja);Ja.value=decodeURIComponent(ha);Ja.className="gePropEditor";"int"!=Aa&&"float"!=Aa||ma.allowAuto||(Ja.type="number",Ja.step="int"==Aa?"1":"any",null!=ma.min&&(Ja.min=parseFloat(ma.min)),null!=ma.max&&(Ja.max=parseFloat(ma.max)));Oa.appendChild(Ja);mxEvent.addListener(Ja,"keypress",
+function(La){13==La.keyCode&&Ga()});Ja.focus();mxEvent.addListener(Ja,"blur",function(){Ga()})}}))}ma.isDeletable&&(na=mxUtils.button("-",mxUtils.bind(Y,function(Ca){M(sa,"",ma,ma.index);mxEvent.consume(Ca)})),na.style.height="16px",na.style.width="25px",na.style.float="right",na.className="geColorBtn",va.appendChild(na));Ea.appendChild(va);return Ea}var Y=this,Z=this.editorUi.editor.graph,aa=[],ja=document.createElement("table");ja.className="geProperties geFullWidthElement";var ea=document.createElement("tr");
+ea.className="gePropHeader";var ca=document.createElement("th");ca.className="gePropHeaderCell";ca.style.paddingLeft="16px";ca.style.backgroundRepeat="no-repeat";ca.style.backgroundPosition="-2px 50%";ca.style.backgroundSize="20px";mxUtils.write(ca,mxResources.get("property"));ea.style.cursor="pointer";var ka=function(){var sa=ja.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){ca.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var ha="none";for(var ma=m.childNodes.length-
+1;0<=ma;ma--)try{var ta=m.childNodes[ma],na=ta.nodeName.toUpperCase();"INPUT"!=na&&"SELECT"!=na||m.removeChild(ta)}catch(xa){}}else ca.style.backgroundImage="url('"+Editor.arrowDownImage+"')",ha="";for(ma=0;ma<sa.length;ma++)sa[ma].style.display=ha};mxEvent.addListener(ea,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;ka()});ea.appendChild(ca);var la=document.createElement("th");la.className="gePropHeaderCell";la.style.paddingLeft="4px";mxUtils.write(la,mxResources.get("value"));
+ea.appendChild(la);ja.appendChild(ea);var ba=la=!1;ea=null;1==C.vertices.length&&0==C.edges.length?ea=C.vertices[0].id:0==C.vertices.length&&1==C.edges.length&&(ea=C.edges[0].id);null==ea||N||(ja.appendChild(W("id",mxUtils.htmlEntities(ea),{dispName:"id",type:"readOnly"},!0,!1)),null!=C.style&&null!=C.style.shape&&ja.appendChild(W("shape",mxUtils.htmlEntities(C.style.shape),{dispName:"shape",type:"readOnly"},!0,!1)));for(var ia in t)if(N=t[ia],("function"!=typeof N.isVisible||N.isVisible(C,this))&&
+!N.primary){var fa=null!=N.getValue?N.getValue(C,this):null!=C.style[ia]?mxUtils.htmlEntities(C.style[ia]+""):null!=N.getDefaultValue?N.getDefaultValue(C,this):N.defVal;if("separator"==N.type)ba=!ba;else{if("staticArr"==N.type)N.size=parseInt(C.style[N.sizeProperty]||t[N.sizeProperty].defVal)||0;else if(null!=N.dependentProps){var da=N.dependentProps,ra=[],pa=[];for(ea=0;ea<da.length;ea++)if(null!=t[da[ea]]){var qa=C.style[da[ea]];pa.push(t[da[ea]].subDefVal);ra.push(null!=qa?qa.split(","):[])}N.dependentPropsDefVal=
+pa;N.dependentPropsVals=ra}ja.appendChild(W(ia,fa,N,la,ba));la=!la}}for(ea=0;ea<aa.length;ea++)for(N=aa[ea],t=N.parentRow,ia=0;ia<N.values.length;ia++)la=W(N.name,N.values[ia],{type:N.type,parentRow:N.parentRow,isDeletable:N.isDeletable,index:ia,defVal:N.defVal,countProperty:N.countProperty,size:N.size},0==ia%2,N.flipBkg),t.parentNode.insertBefore(la,t.nextSibling),t=la;m.appendChild(ja);ka();return m};StyleFormatPanel.prototype.addStyles=function(m){if(null!=this.defaultColorSchemes){var t=this.editorUi,
+C=t.editor.graph,N=document.createElement("div");N.style.padding="6px 20px 0 24px";m.appendChild(N);var M=document.createElement("div");M.className="geSwitcher";M.style.padding="4px 18px 6px 0px";for(var O=[],Q=0;Q<this.defaultColorSchemes.length;Q++){var T=document.createElement("div");T.className="geSwitcherDot";mxUtils.bind(this,function(Z){mxEvent.addListener(T,"click",mxUtils.bind(this,function(){V(Z)}))})(Q);O.push(T);M.appendChild(T)}var V=mxUtils.bind(this,function(Z){null!=O[Z]&&(null!=this.format.currentScheme&&
+null!=O[this.format.currentScheme]&&(O[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Z,X(this.defaultColorSchemes[this.format.currentScheme]),O[this.format.currentScheme].style.background="#84d7ff")}),X=mxUtils.bind(this,function(Z){var aa=mxUtils.clone(C.defaultVertexStyle);aa[mxConstants.STYLE_STROKECOLOR]=null!=aa[mxConstants.STYLE_STROKECOLOR]?aa[mxConstants.STYLE_STROKECOLOR]:"default";aa[mxConstants.STYLE_FILLCOLOR]=null!=aa[mxConstants.STYLE_FILLCOLOR]?
+aa[mxConstants.STYLE_FILLCOLOR]:"default";aa[mxConstants.STYLE_FONTCOLOR]=null!=aa[mxConstants.STYLE_FONTCOLOR]?aa[mxConstants.STYLE_FONTCOLOR]:"default";C.replaceDefaultColors(new mxCell,aa);var ja=mxUtils.bind(this,function(ca){var ka=mxUtils.button("",mxUtils.bind(this,function(ia){C.getModel().beginUpdate();try{for(var fa=t.getSelectionState().cells,da=0;da<fa.length;da++){var ra=C.getModel().getStyle(fa[da]);null!=ca?(mxEvent.isShiftDown(ia)||(ra=""==ca.fill||null==ca.fill?mxUtils.setStyle(ra,
+mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_FILLCOLOR,ca.fill),ra=""==ca.gradient||null==ca.gradient?mxUtils.setStyle(ra,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_GRADIENTCOLOR,ca.gradient),mxEvent.isControlDown(ia)||mxClient.IS_MAC&&mxEvent.isMetaDown(ia)||!C.getModel().isVertex(fa[da])||(ra=""==ca.font||null==ca.font?mxUtils.setStyle(ra,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_FONTCOLOR,ca.font))),mxEvent.isAltDown(ia)||
+(ra=""==ca.stroke||null==ca.fill?mxUtils.setStyle(ra,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_STROKECOLOR,ca.stroke))):(ra=mxUtils.setStyle(ra,mxConstants.STYLE_FILLCOLOR,null),ra=mxUtils.setStyle(ra,mxConstants.STYLE_STROKECOLOR,null),ra=mxUtils.setStyle(ra,mxConstants.STYLE_GRADIENTCOLOR,null),C.getModel().isVertex(fa[da])&&(ra=mxUtils.setStyle(ra,mxConstants.STYLE_FONTCOLOR,null)));C.getModel().setStyle(fa[da],ra)}}finally{C.getModel().endUpdate()}}));ka.className=
+"geStyleButton";ka.style.width="36px";ka.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ka.style.margin="0px 6px 6px 0px";if(null!=ca){var la="1px solid";null!=ca.border&&(la=ca.border);if(null!=ca.gradient)ka.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(ca.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ca.gradient).cssText+" 100%)";else if(ca.fill==mxConstants.NONE)ka.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ca.fill||""==ca.fill)ka.style.backgroundColor=
+mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var ba=mxUtils.getLightDarkColor(ca.fill);ka.style.backgroundImage="linear-gradient(to right bottom, "+ba.cssText+" 50%, "+ba.light+" 50.3%)"}null==ca.stroke||ca.stroke==mxConstants.NONE?ka.style.border=la+" transparent":""==ca.stroke?ka.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(ba=mxUtils.getLightDarkColor(ca.stroke),ka.style.border=
+la+" "+ba.cssText,ka.style.borderRightColor=ba.light,ka.style.borderBottomColor=ka.style.borderRightColor);null!=ca.title&&ka.setAttribute("title",ca.title)}else la=mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),ba=mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,"#000000"),ka.style.backgroundColor=la,ka.style.border="1px solid "+ba;ka.style.borderRadius="0";N.appendChild(ka);null!=ca&&null!=ca.gradient&&(la=ka.cloneNode(!1),la.style.backgroundImage="linear-gradient(light-dark(transparent, "+
+mxUtils.getLightDarkColor(ca.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ca.gradient).light+") 100%)",la.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",la.style.backgroundColor="transparent",N.appendChild(la),la.style.marginLeft="-42px",mxEvent.addListener(la,"click",function(){ka.click()}))});N.innerText="";if(null!=Z)for(var ea=0;ea<Z.length;ea++)0<ea&&0==mxUtils.mod(ea,4)&&mxUtils.br(N),ja(Z[ea])});null==this.format.currentScheme?V(Math.min(O.length-1,Editor.isDarkMode()?
+1:"1"==urlParams.sketch?5:0)):V(this.format.currentScheme);Q=10>=this.defaultColorSchemes.length?43:23;var W=document.createElement("div");W.className="geButton";W.style.cssText="position:absolute;left:0px;bottom:"+Q+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(W,"click",mxUtils.bind(this,function(){V(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Y=document.createElement("div");Y.className="geButton";Y.style.cssText="position:absolute;left:186px;bottom:"+
+Q+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(m.appendChild(W),m.appendChild(Y));mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){V(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));X(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&m.appendChild(M)}return m}}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.isGoogleFontUrl=function(m){return m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||m.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(m){return Graph.isGoogleFontUrl(m)};Graph.rewriteGoogleFontUrl=function(m){null!=m&&m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(m=Editor.GOOGLE_FONTS_CSS2+m.substring(Editor.GOOGLE_FONTS.length)+
+":wght@400;500");return m};Graph.createFontElement=function(m,t){var C=Graph.fontMapping[t];null==C&&Graph.isCssFontUrl(t)?(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("type","text/css"),m.setAttribute("charset","UTF-8"),m.setAttribute("href",Graph.rewriteGoogleFontUrl(t))):(null==C&&(C='@font-face {\nfont-family: "'+m+'";\nsrc: url("'+t+'");\n}'),m=document.createElement("style"),mxUtils.write(m,C));return m};Graph.addRecentCustomFont=function(m,t){};Graph.addFont=
+function(m,t,C,N){if(null!=m&&0<m.length&&null!=t&&0<t.length){N=null!=N?N:Graph.customFontElements;var M=m.toLowerCase();if("helvetica"!=M&&"arial"!=m&&"sans-serif"!=M){var O=N[M];null!=O&&O.url!=t&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=t,"http:"==t.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(t)),O={name:m,url:t,elt:Graph.createFontElement(m,O)},N[M]=O,t=N==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=C&&("link"==O.elt.nodeName.toLowerCase()?
+(O.elt.onload=C,O.elt.onerror=C):C()),null!=t&&t.appendChild(O.elt)):null!=C&&C()}else null!=C&&C()}else null!=C&&C();return m};Graph.getFontUrl=function(m,t){m=Graph.customFontElements[m.toLowerCase()];null!=m&&(t=m.url);return t};Graph.processFontAttributes=function(m){m=m.getElementsByTagName("*");for(var t=0;t<m.length;t++){var C=m[t].getAttribute("data-font-src");if(null!=C){var N="FONT"==m[t].nodeName?m[t].getAttribute("face"):m[t].style.fontFamily;null!=N&&Graph.addFont(N,C)}}};Graph.processFontStyle=
+function(m){if(null!=m){var t=mxUtils.getValue(m,"fontSource",null);if(null!=t){var C=mxUtils.getValue(m,mxConstants.STYLE_FONTFAMILY,null);if(null!=C)try{Graph.addFont(C,decodeURIComponent(t))}catch(N){}}}return m};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.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
+"0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var n=Graph.prototype.init;Graph.prototype.init=function(){function m(M){t=M}n.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var t=null;mxEvent.addListener(this.container,"mouseenter",m);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.container,"mouseleave",function(M){t=null});
+this.isMouseInsertPoint=function(){return null!=t};var C=this.getInsertPoint;this.getInsertPoint=function(M){return null==t||M?C.apply(this,arguments):this.getPointForEvent(t)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(M){var O=this.graph.getCellStyle(M);if(null!=O&&"rack"==O.childLayout){var Q=new mxStackLayout(this.graph,!1);Q.gridSize=null!=O.rackUnitSize?parseFloat(O.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Q.marginLeft=O.marginLeft||
+0;Q.marginRight=O.marginRight||0;Q.marginTop=O.marginTop||0;Q.marginBottom=O.marginBottom||0;Q.allowGaps=O.allowGaps||0;Q.horizontal="1"==mxUtils.getValue(O,"horizontalRack","0");Q.resizeParent=!1;Q.fill=!0;return Q}return N.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,t){return Graph.processFontStyle(x.apply(this,arguments))};var A=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=
+function(m,t,C,N,M,O,Q,T,V,X,W,Y){A.apply(this,arguments);Graph.processFontAttributes(Y)};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(m,t,C,N){function M(){for(var ea=T.getSelectionCells(),ca=[],ka=0;ka<ea.length;ka++)T.isCellVisible(ea[ka])&&ca.push(ea[ka]);T.setSelectionCells(ca)}function O(ea){T.setHiddenTags(ea?[]:V.slice());
+M();T.refresh()}function Q(ea,ca){W.innerText="";if(0<ea.length){var ka=document.createElement("table");ka.setAttribute("cellpadding","2");ka.style.boxSizing="border-box";ka.style.tableLayout="fixed";ka.style.width="100%";var la=document.createElement("tbody");if(null!=ea&&0<ea.length)for(var ba=0;ba<ea.length;ba++)(function(ia){function fa(){var ha=T.getCellsForTags([ia],null,null,!0);T.isEnabled()?T.setSelectionCells(ha):T.highlightCells(ha,null,null,70)}var da=0>mxUtils.indexOf(T.hiddenTags,ia),
+ra=document.createElement("tr"),pa=document.createElement("td");pa.style.align="center";pa.style.width="16px";var qa=document.createElement("img");qa.setAttribute("src",da?Editor.visibleImage:Editor.hiddenImage);qa.setAttribute("title",mxResources.get(da?"hideIt":"show",[ia]));mxUtils.setOpacity(qa,da?75:25);qa.className="geAdaptiveAsset";qa.style.verticalAlign="middle";qa.style.cursor="pointer";qa.style.width="16px";if(t||Editor.isDarkMode())qa.style.filter="invert(100%)";pa.appendChild(qa);mxEvent.addListener(qa,
+"click",function(ha){mxEvent.isShiftDown(ha)?O(0<=mxUtils.indexOf(T.hiddenTags,ia)):(T.toggleHiddenTag(ia),M(),T.refresh());mxEvent.consume(ha)});ra.appendChild(pa);pa=document.createElement("td");pa.style.align="center";pa.style.width="16px";qa=document.createElement("img");qa.setAttribute("src",Editor.selectImage);qa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(qa,da?75:25);qa.className="geAdaptiveAsset";qa.style.verticalAlign="middle";qa.style.cursor="pointer";qa.style.width=
+"16px";if(t||Editor.isDarkMode())qa.style.filter="invert(100%)";mxEvent.addListener(qa,"click",function(ha){O(!0);fa();mxEvent.consume(ha)});pa.appendChild(qa);ra.appendChild(pa);pa=document.createElement("td");pa.style.overflow="hidden";pa.style.whiteSpace="nowrap";pa.style.textOverflow="ellipsis";pa.style.verticalAlign="middle";pa.style.cursor="pointer";pa.setAttribute("title",ia);a=document.createElement("a");mxUtils.write(a,ia);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,
+da?100:40);pa.appendChild(a);mxEvent.addListener(pa,"click",function(ha){if(mxEvent.isShiftDown(ha))O(!0),fa();else if(da&&0<T.hiddenTags.length)O(!0);else{var ma=V.slice(),ta=mxUtils.indexOf(ma,ia);ma.splice(ta,1);T.setHiddenTags(ma);M();T.refresh()}mxEvent.consume(ha)});ra.appendChild(pa);if(T.isEnabled()){pa=document.createElement("td");pa.style.verticalAlign="middle";pa.style.textAlign="center";pa.style.width="18px";if(null==ca){pa.style.align="center";pa.style.width="16px";qa=document.createElement("img");
+qa.setAttribute("src",Editor.trashImage);qa.setAttribute("title",mxResources.get("removeIt",[ia]));mxUtils.setOpacity(qa,da?75:25);qa.className="geAdaptiveAsset";qa.style.verticalAlign="middle";qa.style.cursor="pointer";qa.style.width="16px";if(t||Editor.isDarkMode())qa.style.filter="invert(100%)";mxEvent.addListener(qa,"click",function(ha){var ma=mxUtils.indexOf(V,ia);0<=ma&&V.splice(ma,1);T.removeTagsForCells(T.model.getDescendants(T.model.getRoot()),[ia]);T.refresh();mxEvent.consume(ha)});pa.appendChild(qa)}else{var sa=
+document.createElement("input");sa.setAttribute("type","checkbox");sa.style.margin="0px";sa.defaultChecked=null!=ca&&0<=mxUtils.indexOf(ca,ia);sa.checked=sa.defaultChecked;sa.style.background="transparent";sa.setAttribute("title",mxResources.get(sa.defaultChecked?"removeIt":"add",[ia]));mxEvent.addListener(sa,"change",function(ha){sa.checked?T.addTagsForCells(T.getSelectionCells(),[ia]):T.removeTagsForCells(T.getSelectionCells(),[ia]);mxEvent.consume(ha)});pa.appendChild(sa)}ra.appendChild(pa)}la.appendChild(ra)})(ea[ba]);
+ka.appendChild(la);W.appendChild(ka)}}var T=this,V=T.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var W=document.createElement("div");W.style.position="absolute";W.style.boxSizing="border-box";W.style.userSelect="none";W.style.overflow="auto";W.style.padding="3px";W.style.left="0px";W.style.right="0px";W.style.top="0px";W.style.bottom="0px";X.appendChild(W);T.addListener(mxEvent.ROOT,function(){V=
+T.hiddenTags.slice()});var Y=mxUtils.bind(this,function(ea,ca){if(m()){ea=T.getAllTags();for(ca=0;ca<ea.length;ca++)0>mxUtils.indexOf(V,ea[ca])&&V.push(ea[ca]);V.sort();T.isSelectionEmpty()?Q(V):Q(V,T.getCommonTagsForCells(T.getSelectionCells()))}});T.selectionModel.addListener(mxEvent.CHANGE,Y);T.model.addListener(mxEvent.CHANGE,Y);T.addListener(mxEvent.REFRESH,Y);var Z=document.createElement("div");Z.className="geToolbarContainer geDialogToolbar";Z.style.position="absolute";Z.style.display="flex";
+Z.style.bottom="0px";Z.style.left="0px";Z.style.right="0px";Z.style.height="32px";Z.style.overflow="hidden";Z.style.padding="3px 4px 4px 4px";Z.style.borderWidth="1px 0px 0px 0px";Z.style.borderStyle="solid";Z.style.whiteSpace="nowrap";if(T.isEnabled()){W.style.bottom="32px";var aa=document.createElement("a");aa.className="geButton";var ja=aa.cloneNode(!1);ja.style.backgroundImage="url("+Editor.visibleImage+")";ja.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ja,"click",function(ea){T.setHiddenTags([]);
+mxEvent.isShiftDown(ea)||(V=T.hiddenTags.slice());M();T.refresh();mxEvent.consume(ea)});Z.appendChild(ja);null!=C&&(aa=aa.cloneNode(!1),aa.style.backgroundImage="url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(aa,"click",function(ea){C(V,function(ca){V=ca;Y()});mxEvent.consume(ea)}),Z.appendChild(aa));X.appendChild(Z)}null!=N&&Z.appendChild(N);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];
+for(var t in Graph.customFontElements){var C=Graph.customFontElements[t];m.push({name:C.name,url:C.url})}return m};Graph.prototype.setFont=function(m,t){Graph.addFont(m,t);var C=Editor.guid();document.execCommand("fontname",!1,C);for(var N=this.cellEditor.textarea.getElementsByTagName("font"),M=!1,O=0;O<N.length;O++)N[O].getAttribute("face")==C&&(M=!0,N[O].setAttribute("face",m),null!=t?N[O].setAttribute("data-font-src",t):N[O].removeAttribute("data-font-src"));M||document.execCommand("fontname",
+!1,m)};var I=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return I.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 m=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=m)for(var t in m)this.globalVars[t]=m[t]}catch(C){null!=window.console&&console.log("Error in vars URL parameter: "+
+C)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var H=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(m){var t=H.apply(this,arguments);null==t&&null!=this.globalVars&&(t=this.globalVars[m]);return t};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};
+Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,t,C,N,M,O,Q,T,V,X,W,Y,Z,aa,ja,ea){var ca=D.apply(this,arguments);if(null!=Y){var ka=ca.getAttribute("style");null==ka&&(ka="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;ca.setAttribute("style",ka+(" color-scheme: "+Y+";"))}var la=this.getCustomFonts();if(W&&0<la.length){var ba=ca.ownerDocument;ka=null!=ba.createElementNS?
+ba.createElementNS(mxConstants.NS_SVG,"style"):ba.createElement("style");null!=ba.setAttributeNS?ka.setAttributeNS("type","text/css"):ka.setAttribute("type","text/css");for(var ia="",fa="",da=0;da<la.length;da++){var ra=la[da].name,pa=la[da].url;Graph.isCssFontUrl(pa)?ia+="@import url("+Graph.rewriteGoogleFontUrl(pa)+");\n":fa+='@font-face {\nfont-family: "'+ra+'";\nsrc: url("'+pa+'");\n}\n'}ka.appendChild(ba.createTextNode(ia+fa));ca.getElementsByTagName("defs")[0].appendChild(ka)}Editor.replaceSvgDataUris&&
+null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ca);this.mathEnabled&&(document.body.appendChild(ca),Editor.MathJaxRender(ca),ca.parentNode.removeChild(ca),ka=ca.ownerDocument.getElementById("MJX-SVG-styles"),null!=ka&&ca.getElementsByTagName("defs")[0].appendChild(ka.cloneNode(!0)));return ca};var S=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){S.apply(this,arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=
+null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var U=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){U.apply(this,arguments);this.enumerationState=0};var R=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return R.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(m){m=decodeURIComponent(mxUtils.getValue(m.style,
+"enumerateValue",""));""==m&&(m=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(m)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(m){var t="1"==mxUtils.getValue(m.style,"enumerate",0);t&&null==m.secondLabel?(m.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),m.secondLabel.size=12,m.secondLabel.state=m,m.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,
+this.graph.cellRenderer.initializeLabel(m,m.secondLabel)):t||null==m.secondLabel||(m.secondLabel.destroy(),m.secondLabel=null);t=m.secondLabel;if(null!=t){var C=m.view.scale,N=this.createEnumerationValue(m);m=this.graph.model.isVertex(m.cell)?new mxRectangle(m.x+m.width-4*C,m.y+4*C,0,0):mxRectangle.fromPoint(m.view.getPoint(m));t.bounds.equals(m)&&t.value==N&&t.scale==C||(t.bounds=m,t.value=N,t.scale=C,t.redraw())}};var P=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();
+P.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var v=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){v.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(m,t){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)),null!=m.actions&&
+this.executeCustomActions(m.actions,null,t))};Graph.prototype.executeCustomActions=function(m,t,C){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 N=!1,M=0,O=0,Q=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),T=mxUtils.bind(this,
+function(){N&&(N=!1,this.model.endUpdate())}),V=mxUtils.bind(this,function(){0<M&&M--;0==M&&X()}),X=mxUtils.bind(this,function(){if(O<m.length){var W=this.stoppingCustomActions,Y=m[O++],Z=[];if(null!=Y.open)if(T(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,C))return}else this.openLink(Y.open);null==Y.wait||W||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;V()}),M++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=Y.wait?parseInt(Y.wait):1E3),T());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,V,W?0:Y.fadeIn.delay));null!=Y.fadeOut&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,V,W?0:Y.fadeOut.delay));null!=Y.wipeIn&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,
+!0),!0)));null!=Y.wipeOut&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(Q(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){Q();var aa=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(aa),1);this.setCellsVisible(aa,!0)}null!=Y.hide&&(Q(),aa=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(aa),0),this.setCellsVisible(aa,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&
+(Q(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(Q(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));aa=[];null!=Y.select&&this.isEnabled()&&(aa=this.getCellsForAction(Y.select),this.setSelectionCells(aa));null!=Y.highlight&&(aa=this.getCellsForAction(Y.highlight),this.highlightCells(aa,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));
+null!=Y.scroll&&(aa=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<aa.length&&this.scrollCellToVisible(aa[0]);null!=C&&null!=Y.explore&&Graph.exploreFromCell(this,C,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ja=Y.tags.toggle;0==ja.length&&(ja=this.getAllTags());for(aa=0;aa<ja.length;aa++)this.toggleHiddenTag(ja[aa])}ja=null;null!=Y.tags.hidden&&(null==ja&&(ja=[]),ja=ja.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ja&&(ja=[]);var ea=
+this.getAllTags();for(aa=0;aa<ea.length;aa++)0>mxUtils.indexOf(Y.tags.visible,ea[aa])&&0>mxUtils.indexOf(ja,ea[aa])&&ja.push(ea[aa])}null!=ja&&this.setHiddenTags(ja);this.refresh()}0<Z.length&&(M++,this.executeAnimations(Z,V,W?1:Y.steps,W?0:Y.delay));0==M?X():T()}else this.stoppingCustomActions=this.executingCustomActions=!1,T(),null!=t&&t()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(m,t){var C=this.getLinkForCell(t);null!=C&&"data:action/json,"==C.substring(0,17)&&this.setLinkForCell(t,
+this.updateCustomLink(m,C));if(this.isHtmlLabel(t)){var N=document.createElement("div");N.innerHTML=Graph.sanitizeHtml(this.getLabel(t));for(var M=N.getElementsByTagName("a"),O=!1,Q=0;Q<M.length;Q++)C=M[Q].getAttribute("href"),null!=C&&"data:action/json,"==C.substring(0,17)&&(M[Q].setAttribute("href",this.updateCustomLink(m,C)),O=!0);O&&this.labelChanged(t,N.innerHTML)}};Graph.prototype.updateCustomLink=function(m,t){if("data:action/json,"==t.substring(0,17))try{var C=JSON.parse(t.substring(17));
+null!=C.actions&&(this.updateCustomLinkActions(m,C.actions),t="data:action/json,"+JSON.stringify(C))}catch(N){}return t};Graph.prototype.updateCustomLinkActions=function(m,t){for(var C=0;C<t.length;C++){var N=t[C],M;for(M in N)this.updateCustomLinkAction(m,N[M],"cells"),this.updateCustomLinkAction(m,N[M],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,t,C){if(null!=t&&null!=t[C]){for(var N=[],M=0;M<t[C].length;M++)if("*"==t[C][M])N.push(t[C][M]);else{var O=m[t[C][M]];null!=O?""!=
+O&&N.push(O):N.push(t[C][M])}t[C]=N}};Graph.prototype.getCellsForAction=function(m,t){t=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,t));if(null!=m.excludeCells){for(var C=[],N=0;N<t.length;N++)0>m.excludeCells.indexOf(t[N].id)&&C.push(t[N]);t=C}return t};Graph.prototype.getCellsById=function(m){var t=[];if(null!=m)for(var C=0;C<m.length;C++)if("*"==m[C]){var N=this.model.getRoot();t=t.concat(this.model.filterDescendants(function(O){return O!=N},N))}else{var M=this.model.getCell(m[C]);
+null!=M&&t.push(M)}return t};var y=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return y.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(m){var t=mxUtils.indexOf(this.hiddenTags,m);0>t?this.hiddenTags.push(m):0<=t&&this.hiddenTags.splice(t,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var t=0;t<m.length;t++)if(0>mxUtils.indexOf(this.hiddenTags,m[t]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,t,C,N){var M=[];if(null!=m){t=null!=t?t:this.model.getDescendants(this.model.getRoot());for(var O=0,Q={},T=0;T<m.length;T++)0<m[T].length&&(Q[m[T]]=!0,O++);for(T=0;T<t.length;T++)if(C&&this.model.getParent(t[T])==
+this.model.root||this.model.isVertex(t[T])||this.model.isEdge(t[T])){var V=this.getTagsForCell(t[T]),X=!1;if(0<V.length&&(V=V.split(" "),V.length>=m.length)){for(var W=X=0;W<V.length&&X<O;W++)null!=Q[V[W]]&&X++;X=X==O}X&&(1!=N||this.isCellVisible(t[T]))&&M.push(t[T])}}return M};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var t=null,C=[],N=0;N<m.length;N++){var M=this.getTagsForCell(m[N]);
+C=[];if(0<M.length){M=M.split(" ");for(var O={},Q=0;Q<M.length;Q++)if(null==t||null!=t[M[Q]])O[M[Q]]=!0,C.push(M[Q]);t=O}else return[]}return C};Graph.prototype.getTagsForCells=function(m){for(var t=[],C={},N=0;N<m.length;N++){var M=this.getTagsForCell(m[N]);if(0<M.length){M=M.split(" ");for(var O=0;O<M.length;O++)null==C[M[O]]&&(C[M[O]]=!0,t.push(M[O]))}}return t};Graph.prototype.getTagsForCell=function(m){return this.getAttributeForCell(m,"tags","")};Graph.prototype.addTagsForCells=function(m,t){if(0<
+m.length&&0<t.length){this.model.beginUpdate();try{for(var C=0;C<m.length;C++){for(var N=this.getTagsForCell(m[C]),M=N.split(" "),O=!1,Q=0;Q<t.length;Q++){var T=mxUtils.trim(t[Q]);""!=T&&0>mxUtils.indexOf(M,T)&&(N=0<N.length?N+" "+T:T,O=!0)}O&&this.setAttributeForCell(m[C],"tags",N)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(m,t){if(0<m.length&&0<t.length){this.model.beginUpdate();try{for(var C=0;C<m.length;C++){var N=this.getTagsForCell(m[C]);if(0<N.length){for(var M=
+N.split(" "),O=!1,Q=0;Q<t.length;Q++){var T=mxUtils.indexOf(M,t[Q]);0<=T&&(M.splice(T,1),O=!0)}O&&this.setAttributeForCell(m[C],"tags",M.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(m){this.model.beginUpdate();try{for(var t=0;t<m.length;t++)this.model.setVisible(m[t],!this.model.isVisible(m[t]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(m,t){this.model.beginUpdate();try{for(var C=0;C<m.length;C++)this.model.setVisible(m[C],t)}finally{this.model.endUpdate()}};
+Graph.prototype.highlightCells=function(m,t,C,N){for(var M=0;M<m.length;M++)this.highlightCell(m[M],t,C,N)};Graph.prototype.highlightCell=function(m,t,C,N,M){t=null!=t?t:mxConstants.DEFAULT_VALID_COLOR;C=null!=C?C:1E3;m=this.view.getState(m);var O=null;null!=m&&(M=null!=M?M:4,M=Math.max(M+1,mxUtils.getValue(m.style,mxConstants.STYLE_STROKEWIDTH,1)+M),O=new mxCellHighlight(this,t,M,!1),null!=N&&(O.opacity=N),O.highlight(m),window.setTimeout(function(){null!=O.shape&&(mxUtils.setPrefixedStyle(O.shape.node.style,
+"transition","all 1200ms ease-in-out"),O.shape.node.style.opacity=0);window.setTimeout(function(){O.destroy()},1200)},C));return O};Graph.prototype.addSvgShadow=function(m,t,C,N){N=null!=N?N:!0;var M=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=C&&C||(t=null!=t?t:m.getElementsByTagName("g")[0],null!=t&&(this.updateShadowFilter(t,!0),!isNaN(parseInt(m.getAttribute("width")))&&N&&(m.setAttribute("width",parseInt(m.getAttribute("width"))+M),m.setAttribute("height",parseInt(m.getAttribute("height"))+
+M),t=m.getAttribute("viewBox"),null!=t&&0<t.length&&(t=t.split(" "),3<t.length&&(w=parseFloat(t[2])+M,h=parseFloat(t[3])+M,m.setAttribute("viewBox",t[0]+" "+t[1]+" "+w+" "+h))))));return M};Graph.prototype.updateShadowFilter=function(m,t){mxClient.IS_SF||(t?(t=mxUtils.getLightDarkColor(this.svgShadowColor,this.svgShadowOpacity),m.style.filter="drop-shadow("+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowBlur)/100+"px "+t.cssText+
+")"):m.style.filter="")};Graph.prototype.setShadowVisible=function(m,t){t=null!=t?t:!0;this.shadowVisible=m;this.updateShadowFilter(this.view.getDrawPane(),this.shadowVisible);t&&this.fireEvent(new mxEventObject("shadowVisibleChanged"))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var m=this.model.getChildCount(this.model.root),
+t=0;do var C=this.model.getChildAt(this.model.root,t);while(t++<m&&"1"==mxUtils.getValue(this.getCellStyle(C),"locked","0"));null!=C&&this.setDefaultParent(C)}};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",STENCIL_PATH+"/kubernetes2.xml"];
+mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",
+STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",
+STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=
+[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",
+STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",
+STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/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.ibmcloud=[STENCIL_PATH+"/ibm_cloud.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.networks2=[SHAPES_PATH+"/mxNetworks2.js",
+STENCIL_PATH+"/networks2.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"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];
+mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(m){var t=null;null!=m&&0<m.length&&("ER"==m.substring(0,2)?t="mxgraph.er":"sysML"==m.substring(0,5)&&(t="mxgraph.sysml"));return t};var L=mxMarker.createMarker;mxMarker.createMarker=function(m,t,C,N,M,O,Q,T,V,X){if(null!=C&&null==mxMarker.markers[C]){var W=this.getPackageForType(C);null!=W&&mxStencilRegistry.getStencil(W)}return L.apply(this,
+arguments)};var J=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,t,C,N,M,O){"1"==mxUtils.getValue(t.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(t.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return J.apply(this,arguments)};PrintDialog.prototype.create=function(m,t,C,N){function M(){ja.value=Math.max(1,Math.min(W,Math.max(parseInt(ja.value),parseInt(aa.value))));aa.value=Math.max(1,Math.min(W,Math.min(parseInt(ja.value),parseInt(aa.value))))}function O(Ca){m.lastPrintPagesRadioChecked=
+Z.checked;m.lastPrintSelectionOnlyChecked=ca.checked;m.lastPrintCropRadioChecked=la.checked;m.lastPrintFitRadioChecked=ba.checked;Z.checked&&aa.value<ja.value?(m.lastPrintPagesFromInput=aa.value,m.lastPrintPagesToInput=ja.value):(m.lastPrintPagesFromInput=null,m.lastPrintPagesToInput=null);xa.value=Math.max(1,Math.min(1600,parseInt(xa.value)))+"%";m.lastPrintZoom=xa.value;m.lastPrintBorder=na.value;m.lastPrintGrid=Aa.checked;m.lastPrintTransparent=va.checked;m.lastPrintInclude=Fa.checked;m.lastPrintSheetsAcross=
+ma.value;m.lastPrintSheetsDown=ta.value;var Ga={};Ga.border=parseInt(na.value);Ga.scale=parseInt(xa.value)/100;Ga.grid=Aa.checked;Ga.shadows=Ea.checked;Ga.transparent=va.checked;Ga.includeCopy=Fa.checked;Ga.sheetsAcross=parseInt(ma.value);Ga.sheetsDown=parseInt(ta.value);Ga.pagesFrom=parseInt(aa.value);Ga.pagesTo=parseInt(ja.value);Ga.allPages=Y.checked;Ga.selection=ca.checked;Ga.pageView=ka.checked;Ga.crop=la.checked;Ga.fit=ba.checked;return null!=C?C(!Ca,Ga):m.print(!Ca,Ga)}var Q=m.editor.graph,
+T=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign="center";V.style.marginTop="0px";mxUtils.write(V,t||mxResources.get("print"));T.appendChild(V);var X=1,W=1;V=document.createElement("div");V.style.whiteSpace="nowrap";var Y=document.createElement("input");Y.style.marginRight="8px";Y.style.marginBottom="8px";Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");V.appendChild(Y);t=document.createElement("span");mxUtils.write(t,mxResources.get("allPages"));
+mxEvent.addListener(t,"click",function(){Y.checked=!0});V.appendChild(t);mxUtils.br(V);var Z=Y.cloneNode(!0);V.appendChild(Z);t=document.createElement("span");mxUtils.write(t,mxResources.get("pages")+":");V.appendChild(t);mxEvent.addListener(t,"click",function(){Z.checked=!0});var aa=document.createElement("input");aa.style.margin="0 4px";aa.setAttribute("value","1");aa.setAttribute("type","number");aa.setAttribute("min","1");aa.style.width="40px";V.appendChild(aa);t=document.createElement("span");
+mxUtils.write(t,mxResources.get("to"));V.appendChild(t);var ja=aa.cloneNode(!0);V.appendChild(ja);mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(ja,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"change",M);mxEvent.addListener(ja,"change",M);if(null!=m.pages&&(W=m.pages.length,null!=m.currentPage))for(var ea=0;ea<W;ea++)if(m.currentPage==m.pages[ea]){X=ea+1;break}null!=m.lastPrintPagesFromInput&&null!=m.lastPrintPagesToInput?(aa.value=Math.min(W,Math.max(1,
+m.lastPrintPagesFromInput)),ja.value=Math.min(W,Math.max(1,m.lastPrintPagesToInput))):(aa.value=X,ja.value=X);aa.setAttribute("max",W);ja.setAttribute("max",W);ea=mxUtils.button(mxResources.get("currentPage"),function(Ca){aa.value=X;ja.value=X;Z.checked=!0});ea.setAttribute("title",mxResources.get("currentPage"));ea.style.marginLeft="4px";ea.style.maxWidth="100px";ea.style.overflow="hidden";ea.style.textOverflow="ellipsis";ea.style.whiteSpace="nowrap";V.appendChild(ea);1<W&&T.appendChild(V);V=document.createElement("div");
+V.style.borderBottom="1px solid lightGray";V.style.paddingBottom="12px";V.style.marginBottom="12px";V.style.whiteSpace="nowrap";var ca=document.createElement("input");ca.setAttribute("name","pages-printdialog");ca.setAttribute("type",1==W?"checkbox":"radio");ca.style.marginRight="8px";Q.isSelectionEmpty()&&ca.setAttribute("disabled","disabled");Q.isEnabled()&&(V.appendChild(ca),t=document.createElement("span"),mxUtils.write(t,mxResources.get("selectionOnly")),V.appendChild(t));(Q.isEnabled()||1<W)&&
+T.appendChild(V);!m.isPagesEnabled()||m.lastPrintPagesRadioChecked?Z.checked=!0:!Q.isSelectionEmpty()&&m.lastPrintSelectionOnlyChecked?ca.checked=!0:Y.checked=!0;Q.isSelectionEmpty()||mxEvent.addListener(t,"click",function(){ca.checked=!ca.checked});Q=document.createElement("div");Q.style.whiteSpace="nowrap";var ka=document.createElement("input");ka.style.marginBottom="8px";ka.style.marginRight="8px";ka.setAttribute("type","radio");ka.setAttribute("name","printSize");Q.appendChild(ka);t=document.createElement("span");
+mxUtils.write(t,mxResources.get("pageView"));Q.appendChild(t);mxEvent.addListener(Q,"click",function(){ka.checked=!0});T.appendChild(Q);Q=document.createElement("div");Q.style.whiteSpace="nowrap";var la=document.createElement("input");la.style.marginBottom="8px";la.style.marginRight="8px";la.setAttribute("type","radio");la.setAttribute("name","printSize");Q.appendChild(la);t=document.createElement("span");mxUtils.write(t,mxResources.get("crop"));Q.appendChild(t);mxEvent.addListener(Q,"click",function(){la.checked=
+!0});T.appendChild(Q);Q=document.createElement("div");Q.style.whiteSpace="nowrap";var ba=document.createElement("input");ba.style.marginBottom="8px";ba.style.marginRight="8px";ba.setAttribute("type","radio");ba.setAttribute("name","printSize");t=document.createElement("div");t.style.display="inline-block";t.style.verticalAlign="top";t.style.paddingTop="2px";t.appendChild(ba);Q.appendChild(t);V=document.createElement("table");V.style.display="inline-block";V.style.borderSpacing="0";ea=document.createElement("tbody");
+var ia=document.createElement("tr"),fa=ia.cloneNode(!0),da=document.createElement("td"),ra=da.cloneNode(!0),pa=da.cloneNode(!0),qa=da.cloneNode(!0),sa=da.cloneNode(!0),ha=da.cloneNode(!0);da.style.textAlign="right";qa.style.textAlign="right";mxUtils.write(da,mxResources.get("fitTo"));mxEvent.addListener(Q,"click",function(Ca){mxEvent.getSource(Ca)!=ba&&(ba.checked=!ba.checked)});var ma=document.createElement("input");ma.style.margin="0 2px";ma.style.boxSizing="border-box";ma.setAttribute("value",
+m.lastPrintSheetsAcross||"1");ma.setAttribute("min","1");ma.setAttribute("type","number");ma.style.width="40px";ra.appendChild(ma);t=document.createElement("span");mxUtils.write(t,mxResources.get("fitToSheetsAcross"));pa.appendChild(t);mxUtils.write(qa,mxResources.get("fitToBy"));var ta=ma.cloneNode(!0);ta.setAttribute("value",m.lastPrintSheetsDown||"1");sa.appendChild(ta);mxEvent.addListener(ma,"click",function(Ca){ba.checked=!0;mxEvent.consume(Ca)});mxEvent.addListener(ta,"click",function(Ca){ba.checked=
+!0;mxEvent.consume(Ca)});m.lastPrintCropRadioChecked?la.checked=!0:m.lastPrintFitRadioChecked?ba.checked=!0:ka.checked=!0;t=document.createElement("span");mxUtils.write(t,mxResources.get("fitToSheetsDown"));ha.appendChild(t);ia.appendChild(da);ia.appendChild(ra);ia.appendChild(pa);fa.appendChild(qa);fa.appendChild(sa);fa.appendChild(ha);ea.appendChild(ia);ea.appendChild(fa);V.appendChild(ea);Q.appendChild(V);T.appendChild(Q);Q=document.createElement("div");Q.style.borderTop="1px solid lightGray";
+Q.style.whiteSpace="nowrap";Q.style.paddingTop="12px";Q.style.marginTop="12px";Q.style.paddingLeft="8px";mxUtils.write(Q,mxResources.get("borderWidth")+":");var na=document.createElement("input");na.setAttribute("type","number");na.setAttribute("min","0");na.style.width="40px";na.style.marginLeft="4px";na.value=null!=m.lastPrintBorder?m.lastPrintBorder:mxPrintPreview.prototype.pageMargin;Q.appendChild(na);t=document.createElement("span");t.style.marginLeft="8px";mxUtils.write(t,mxResources.get("zoom")+
+":");Q.appendChild(t);var xa=document.createElement("input");xa.style.width="60px";xa.style.marginLeft="4px";xa.value=null!=m.lastPrintZoom?m.lastPrintZoom:"100%";Q.appendChild(xa);mxUtils.br(Q);var Aa=document.createElement("input");Aa.setAttribute("type","checkbox");Aa.style.marginTop="12px";Aa.checked=null!=m.lastPrintGrid?m.lastPrintGrid:!1;Q.appendChild(Aa);t=document.createElement("span");t.style.marginLeft="4px";t.style.marginRight="8px";mxUtils.write(t,mxResources.get("grid"));Q.appendChild(t);
+mxEvent.addListener(t,"click",function(Ca){Aa.checked=!0;mxEvent.consume(Ca)});var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.marginTop="12px";Ea.checked=null!=m.lastPrintShadow?m.lastPrintShadow:!1;Q.appendChild(Ea);t=document.createElement("span");t.style.marginLeft="4px";t.style.marginRight="8px";mxUtils.write(t,mxResources.get("shadows"));Q.appendChild(t);m.isOffline()&&!mxClient.IS_CHROMEAPP||t.appendChild(m.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));
+mxEvent.addListener(t,"click",function(Ca){"IMG"!=mxEvent.getSource(Ca).nodeName&&(Ea.checked=!0,mxEvent.consume(Ca))});Editor.enableShadowOption?null!=C&&mxUtils.br(Q):(Ea.style.display="none",t.style.display="none");var va=document.createElement("input");va.setAttribute("type","checkbox");va.style.marginTop="10px";va.checked=null!=m.lastPrintTransparent?m.lastPrintTransparent:!1;null!=C&&(Q.appendChild(va),t=document.createElement("span"),t.style.marginLeft="4px",mxUtils.write(t,mxResources.get("transparentBackground")),
+Q.appendChild(t),mxEvent.addListener(t,"click",function(Ca){va.checked=!0;mxEvent.consume(Ca)}));var Fa=document.createElement("input");Fa.setAttribute("type","checkbox");Fa.style.marginTop="10px";Fa.checked=null!=m.lastPrintInclude?m.lastPrintInclude:Editor.defaultIncludeDiagram;null==C||mxClient.IS_CHROMEAPP||"draw.io"!=m.getServiceName()||(mxUtils.br(Q),Q.appendChild(Fa),t=document.createElement("span"),t.style.marginLeft="4px",mxUtils.write(t,mxResources.get("includeCopyOfMyDiagram")),Q.appendChild(t),
+mxEvent.addListener(t,"click",function(Ca){Fa.checked=!0;mxEvent.consume(Ca)}));T.appendChild(Q);t=document.createElement("div");t.style.marginTop="30px";t.style.textAlign="right";t.style.whiteSpace="nowrap";m.isOffline()&&!mxClient.IS_CHROMEAPP||null!=C||t.appendChild(m.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));Q=mxUtils.button(mxResources.get("cancel"),function(){m.hideDialog()});Q.className="geBtn";m.editor.cancelFirst&&t.appendChild(Q);PrintDialog.previewEnabled&&null==C&&
+(V=mxUtils.button(mxResources.get("preview"),function(){try{m.hideDialog(),O(!1)}catch(Ca){m.handleError(Ca)}}),V.className="geBtn",t.appendChild(V));N=null!=N?N:null!=C?"export":PrintDialog.previewEnabled?"print":"ok";N=mxUtils.button(mxResources.get(N),function(){try{m.hideDialog(),O(!0)}catch(Ca){m.handleError(Ca)}});N.className="geBtn gePrimaryBtn";t.appendChild(N);m.editor.cancelFirst||t.appendChild(Q);T.appendChild(t);if(m.editor.isChromelessView()){var ya=function(){Editor.isDarkMode()?(T.classList.add("geDarkMode"),
+T.style.colorScheme="dark"):(T.classList.remove("geDarkMode"),T.style.colorScheme="light")};m.addListener("darkModeChanged",ya);ya();var Oa=function(Ca,Ga){Ca=Ga.getProperty("dialog");T.parentNode==Ca.container&&(m.editor.removeListener(Oa),m.removeListener(ya))};m.editor.addListener("hideDialog",Oa)}this.container=T};var K=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 m=this.image;null!=m&&null!=m.src&&Graph.isPageLink(m.src)&&(m={originalSrc:m.src});this.page.viewState.backgroundImage=m}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else K.apply(this,
arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(m=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=m?m:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),
-this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="29.0.3";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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)||/.*\.cdn\.prod\.atlassian-dev\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&
+this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="29.2.2";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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)||/.*\.cdn\.prod\.atlassian-dev\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&
"support.draw.io"!=window.location.hostname&&"test.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||
"1"==urlParams.dev;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.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes=
"flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!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:{useWidth:1E3,useMaxWidth:!0,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,k,l,n,x,A,B){if(null!=d){x=null!=x?x:Error(d);x.stack=null!=x.stack?x.stack:"";A=null!=A?A:0>d.indexOf("NetworkError")&&0>d.indexOf("SecurityError")&&0>d.indexOf("NS_ERROR_FAILURE")&&0>d.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&d!=EditorUi.lastErrorMessage&&0>d.indexOf("extension:")&&
+topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,g,l,n,x,A,B){if(null!=d){x=null!=x?x:Error(d);x.stack=null!=x.stack?x.stack:"";A=null!=A?A:0>d.indexOf("NetworkError")&&0>d.indexOf("SecurityError")&&0>d.indexOf("NS_ERROR_FAILURE")&&0>d.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&d!=EditorUi.lastErrorMessage&&0>d.indexOf("extension:")&&
0>d.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>x.stack.indexOf("extension:")&&0>x.stack.indexOf("<anonymous>:")&&0>x.stack.indexOf("/math4/es5/")&&(EditorUi.lastErrorMessage=d,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+A+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=n?":colno:"+encodeURIComponent(n):
-"")+(""!=x.stack?"&stack="+encodeURIComponent(x.stack):""))}catch(I){}try{B||null==window.console||console.error(A,d,k,l,n,x)}catch(I){}}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var k=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=k+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(l){}};EditorUi.sendReport=function(d,k){if("1"==
-urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{k=null!=k?k:5E4,d.length>k&&(d=d.substring(0,k)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],k=0;k<arguments.length;k++)d.push(arguments[k]);mxClient.IS_IOS?(mxLog.show(),
-mxLog.debug(d.join(" "))):console.log.apply(console,d)}}catch(l){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.embedSvgImages=function(d){d=d.getElementsByTagName("image");for(var k=[],l=0;l<d.length;l++)k.push(d[l]);for(l=0;l<k.length;l++)EditorUi.replaceSvgImage(k[l])};EditorUi.replaceSvgImage=function(d){try{var k=null;k=null==d.getAttributeNS?d.getAttribute("xlink:href"):d.getAttributeNS(mxConstants.NS_XLINK,"href");var l=EditorUi.getSvgSubtree(k);
+"")+(""!=x.stack?"&stack="+encodeURIComponent(x.stack):""))}catch(I){}try{B||null==window.console||console.error(A,d,g,l,n,x)}catch(I){}}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);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!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(l){}};EditorUi.sendReport=function(d,g){if("1"==
+urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,d.length>g&&(d=d.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],g=0;g<arguments.length;g++)d.push(arguments[g]);mxClient.IS_IOS?(mxLog.show(),
+mxLog.debug(d.join(" "))):console.log.apply(console,d)}}catch(l){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.embedSvgImages=function(d){d=d.getElementsByTagName("image");for(var g=[],l=0;l<d.length;l++)g.push(d[l]);for(l=0;l<g.length;l++)EditorUi.replaceSvgImage(g[l])};EditorUi.replaceSvgImage=function(d){try{var g=null;g=null==d.getAttributeNS?d.getAttribute("xlink:href"):d.getAttributeNS(mxConstants.NS_XLINK,"href");var l=EditorUi.getSvgSubtree(g);
if(null!=l&&"svg"==l.nodeName){var n=l.getAttribute("width"),x=l.getAttribute("height");l.setAttribute("x",d.getAttribute("x"));l.setAttribute("y",d.getAttribute("y"));l.setAttribute("width",d.getAttribute("width"));l.setAttribute("height",d.getAttribute("height"));l.style.fontFamily="initial";0<n&&0<x&&null==l.getAttribute("viewBox")&&l.setAttribute("viewBox","0 0 "+n+" "+x);var A=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");A.appendChild(l);d.hasAttribute("transform")&&A.setAttribute("transform",
-d.getAttribute("transform"));d.parentNode.replaceChild(A,d)}}catch(B){}};EditorUi.getSvgSubtree=function(d){var k=Graph.getSvgFromDataUri(d);d=null;if(null!=k){d=Graph.sanitizeNode(mxUtils.parseXml(k).documentElement);k=d.getElementsByTagName("style");if(0<k.length){var l="svg-image-"+Editor.guid();d.setAttribute("id",l);for(var n=document.implementation.createHTMLDocument(""),x=document.createElement("style"),A=0;A<k.length;A++){x.textContent=k[A].textContent;n.body.appendChild(x);for(var B="",I=
-0;I<x.sheet.cssRules.length;I++){var G=x.sheet.cssRules[I];if(null!=G.selectorText){for(var C=G.selectorText.split(","),R=0;R<C.length;R++)C[R]="#"+l+" "+C[R];G.selectorText=C.join(",")}B+=G.cssText+"\n"}k[A].textContent=B}}null!=d.style&&"light dark"==d.style.getPropertyValue("color-scheme")&&d.style.removeProperty("color-scheme");k=d.getElementsByTagName("*");for(l=0;l<k.length;l++)k[l].removeAttribute("data-cell-id")}return d};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+d.getAttribute("transform"));d.parentNode.replaceChild(A,d)}}catch(B){}};EditorUi.getSvgSubtree=function(d){var g=Graph.getSvgFromDataUri(d);d=null;if(null!=g){d=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=d.getElementsByTagName("style");if(0<g.length){var l="svg-image-"+Editor.guid();d.setAttribute("id",l);for(var n=document.implementation.createHTMLDocument(""),x=document.createElement("style"),A=0;A<g.length;A++){x.textContent=g[A].textContent;n.body.appendChild(x);for(var B="",I=
+0;I<x.sheet.cssRules.length;I++){var H=x.sheet.cssRules[I];if(null!=H.selectorText){for(var D=H.selectorText.split(","),S=0;S<D.length;S++)D[S]="#"+l+" "+D[S];H.selectorText=D.join(",")}B+=H.cssText+"\n"}g[A].textContent=B}}null!=d.style&&"light dark"==d.style.getPropertyValue("color-scheme")&&d.style.removeProperty("color-scheme");g=d.getElementsByTagName("*");for(l=0;l<g.length;l++)g[l].removeAttribute("data-cell-id")}return d};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.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=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;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.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var d=document.createElement("div");d.className="geButtonContainer";return d};EditorUi.prototype.openLink=function(d,k,l){return this.editor.graph.openLink(d,k,l)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=
-function(d,k){k(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,k,l){localStorage.setItem(d,k);null!=l&&l()};EditorUi.prototype.isLocked=function(){var d=this.getCurrentFile();return null!=d&&d.isLocked()};EditorUi.prototype.removeLocalData=function(d,k){localStorage.removeItem(d);k()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};
-EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){var k=this.editor.graph;k.mathEnabled=d;null!=k.view.backgroundImage&&(k.view.backgroundImage.destroy(),k.view.backgroundImage=null);this.editor.updateGraphComponents();k.refresh();k.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var d=document.createElement("div");d.className="geButtonContainer";return d};EditorUi.prototype.openLink=function(d,g,l){return this.editor.graph.openLink(d,g,l)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=
+function(d,g){g(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,g,l){localStorage.setItem(d,g);null!=l&&l()};EditorUi.prototype.isLocked=function(){var d=this.getCurrentFile();return null!=d&&d.isLocked()};EditorUi.prototype.removeLocalData=function(d,g){localStorage.removeItem(d);g()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};
+EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){var g=this.editor.graph;g.mathEnabled=d;null!=g.view.backgroundImage&&(g.view.backgroundImage.destroy(),g.view.backgroundImage=null);this.editor.updateGraphComponents();g.refresh();g.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};
EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(d){this.editor.graph.setAdaptiveColors(d);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||
-!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,k,l){var n=null==d||null==k;l=null!=l?l:24;var x=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),A=this.timeout,B=x.spin,I=null,G=null,
-C=mxUtils.bind(this,function(S){null!=S&&S()}),R=this;x.spin=function(S,Q,v,z){z=null!=z?z:A;var N=!1;if(!this.active){var J=Date.now();null!=v&&(I=window.setTimeout(function(){x.stop();I=null;v({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:G})},z));n&&(k=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2);S==document.body&&"1"==urlParams.embedInline&&(S=R.diagramContainer,d=S.scrollLeft+S.clientWidth/2,k=S.scrollTop+
-S.clientHeight/2);B.call(this,S);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=S.scrollTop+"px",x.el.style.marginLeft=S.scrollLeft+"px");this.active=!0;null!=Q&&(N=document.createElement("div"),N.className="geSpinnerStatus",N.setAttribute("title",Q),S==document.body?(N.style.left=Math.max(0,d)+"px",N.style.top=Math.max(0,k+66)+"px"):(N.style.left="50%",N.style.top="50%",N.style.marginTop="70px"),"..."!=Q.substring(Q.length-3,Q.length)&&"!"!=Q.charAt(Q.length-1)&&(Q+="..."),N.innerText=
-Q,S.appendChild(N),x.status=N);this.pause=mxUtils.bind(this,function(){var K=C;this.active&&(z=Math.max(0,z-(Date.now()-J)),K=mxUtils.bind(this,function(m){this.spin(S,Q,v,z);if(null!=m)try{m(),G=mxUtils.bind(this,function(){this.spin(S,Q,v,z);try{m()}catch(t){null!=v&&v(t)}})}catch(t){null!=v&&v(t)}}));this.stop();return K});N=!0}return N};var T=x.stop;x.stop=function(){T.call(this);this.active&&(this.active=!1,null!=I&&(window.clearTimeout(I),I=null),null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),
-x.status=null)};x.pause=function(){return C};return x};EditorUi.prototype.isCompatibleString=function(d){try{if(d=mxUtils.trim(d),"<"==d.charAt(0)){var k=mxUtils.parseXml(d),l=this.editor.extractGraphModel(k.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}}catch(n){}return!1};EditorUi.isVisioFilename=function(d){return/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d)};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&
+!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,g,l){var n=null==d||null==g;l=null!=l?l:24;var x=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),A=this.timeout,B=x.spin,I=null,H=null,
+D=mxUtils.bind(this,function(R){null!=R&&R()}),S=this;x.spin=function(R,P,v,y){y=null!=y?y:A;var L=!1;if(!this.active){var J=Date.now();null!=v&&(I=window.setTimeout(function(){x.stop();I=null;v({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:H})},y));n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2);R==document.body&&"1"==urlParams.embedInline&&(R=S.diagramContainer,d=R.scrollLeft+R.clientWidth/2,g=R.scrollTop+
+R.clientHeight/2);B.call(this,R);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=R.scrollTop+"px",x.el.style.marginLeft=R.scrollLeft+"px");this.active=!0;null!=P&&(L=document.createElement("div"),L.className="geSpinnerStatus",L.setAttribute("title",P),R==document.body?(L.style.left=Math.max(0,d)+"px",L.style.top=Math.max(0,g+66)+"px"):(L.style.left="50%",L.style.top="50%",L.style.marginTop="70px"),"..."!=P.substring(P.length-3,P.length)&&"!"!=P.charAt(P.length-1)&&(P+="..."),L.innerText=
+P,R.appendChild(L),x.status=L);this.pause=mxUtils.bind(this,function(){var K=D;this.active&&(y=Math.max(0,y-(Date.now()-J)),K=mxUtils.bind(this,function(m){this.spin(R,P,v,y);if(null!=m)try{m(),H=mxUtils.bind(this,function(){this.spin(R,P,v,y);try{m()}catch(t){null!=v&&v(t)}})}catch(t){null!=v&&v(t)}}));this.stop();return K});L=!0}return L};var U=x.stop;x.stop=function(){U.call(this);this.active&&(this.active=!1,null!=I&&(window.clearTimeout(I),I=null),null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),
+x.status=null)};x.pause=function(){return D};return x};EditorUi.prototype.isCompatibleString=function(d){try{if(d=mxUtils.trim(d),"<"==d.charAt(0)){var g=mxUtils.parseXml(d),l=this.editor.extractGraphModel(g.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}}catch(n){}return!1};EditorUi.isVisioFilename=function(d){return/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d)};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&
207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&
-26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var k=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=k.getFunction,n=this.editor.graph,x=this;k.getFunction=function(A){if(n.isSelectionEmpty()&&null!=x.pages&&0<x.pages.length){var B=x.getSelectedPageIndex();if(mxEvent.isShiftDown(A)){if(37==
+26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=g.getFunction,n=this.editor.graph,x=this;g.getFunction=function(A){if(n.isSelectionEmpty()&&null!=x.pages&&0<x.pages.length){var B=x.getSelectedPageIndex();if(mxEvent.isShiftDown(A)){if(37==
A.keyCode)return function(){0<B&&x.movePage(B,B-1)};if(38==A.keyCode)return function(){0<B&&x.movePage(B,0)};if(39==A.keyCode)return function(){B<x.pages.length-1&&x.movePage(B,B+1)};if(40==A.keyCode)return function(){B<x.pages.length-1&&x.movePage(B,x.pages.length-1)}}else if(mxEvent.isControlDown(A)||mxClient.IS_MAC&&mxEvent.isMetaDown(A)){if(37==A.keyCode)return function(){0<B&&x.selectNextPage(!1)};if(38==A.keyCode)return function(){0<B&&x.selectPage(x.pages[0])};if(39==A.keyCode)return function(){B<
-x.pages.length-1&&x.selectNextPage(!0)};if(40==A.keyCode)return function(){B<x.pages.length-1&&x.selectPage(x.pages[x.pages.length-1])}}}return!(65<=A.keyCode&&90>=A.keyCode)||n.isSelectionEmpty()||mxEvent.isAltDown(A)||mxEvent.isShiftDown(A)||mxEvent.isControlDown(A)||mxClient.IS_MAC&&mxEvent.isMetaDown(A)?l.apply(this,arguments):null}}return k};var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var k=f.apply(this,arguments);if(null==k)try{var l=
-d.indexOf("&lt;mxfile ");if(0<=l){var n=d.lastIndexOf("&lt;/mxfile&gt;");n>l&&(k=d.substring(l,n+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var x=mxUtils.parseXml(d),A=this.editor.extractGraphModel(x.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);k=null!=A?mxUtils.getXml(A):""}}catch(B){}return k};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var k=d.indexOf('<meta charset="utf-8">');
-0<=k&&(d=d.slice(0,k)+'<meta charset="utf-8"/>'+d.slice(k+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d,k){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[d],"patches",k);d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var l=null!=d?this.editor.extractGraphModel(d,!0):null;null!=l&&(d=l);if(null!=d){l=this.editor.graph;l.model.beginUpdate();try{var n=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");
+x.pages.length-1&&x.selectNextPage(!0)};if(40==A.keyCode)return function(){B<x.pages.length-1&&x.selectPage(x.pages[x.pages.length-1])}}}return!(65<=A.keyCode&&90>=A.keyCode)||n.isSelectionEmpty()||mxEvent.isAltDown(A)||mxEvent.isShiftDown(A)||mxEvent.isControlDown(A)||mxClient.IS_MAC&&mxEvent.isMetaDown(A)?l.apply(this,arguments):null}}return g};var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var g=f.apply(this,arguments);if(null==g)try{var l=
+d.indexOf("&lt;mxfile ");if(0<=l){var n=d.lastIndexOf("&lt;/mxfile&gt;");n>l&&(g=d.substring(l,n+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var x=mxUtils.parseXml(d),A=this.editor.extractGraphModel(x.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=A?mxUtils.getXml(A):""}}catch(B){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');
+0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d,g){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[d],"patches",g);d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var l=null!=d?this.editor.extractGraphModel(d,!0):null;null!=l&&(d=l);if(null!=d){l=this.editor.graph;l.model.beginUpdate();try{var n=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");
if(1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var A=x.length-1;0<=A;A--){var B=this.updatePageRoot(new DiagramPage(x[A]));null==B.getName()&&B.setName(mxResources.get("pageWithNumber",[A+1]));l.model.execute(new ChangePage(this,B,0==A?B:null,0))}}else null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(A=0;A<n.length;A++)l.model.execute(new ChangePage(this,n[A],null));var I=this.getCurrentFile();null!=I&&I.fileReplaced(k)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,k,l,n,x,A,B,I,G,C,R,T,S){k=null!=
-k?k:this.editor.graph;x=null!=x?x:!1;G=null!=G?G:!0;R=null!=R?R:!Editor.defaultCompressed;var Q=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var v="_blank";else Q=v=n;if(null==d)return"";var z=d;if("mxfile"!=z.nodeName.toLowerCase()){if(R){var N=d.ownerDocument.createElement("diagram");N.setAttribute("name",mxResources.get("pageWithNumber",[1]));N.setAttribute("id",Editor.guid());N.appendChild(d)}else{N=Graph.zapGremlins(mxUtils.getXml(d));z=Graph.compress(N);if(Graph.decompress(z)!=
-N)return N;N=d.ownerDocument.createElement("diagram");N.setAttribute("name",mxResources.get("pageWithNumber",[1]));N.setAttribute("id",Editor.guid());mxUtils.setTextContent(N,z)}z=d.ownerDocument.createElement("mxfile");z.appendChild(N)}C?(z=z.cloneNode(!0),z.removeAttribute("modified"),z.removeAttribute("host"),z.removeAttribute("agent"),z.removeAttribute("etag"),z.removeAttribute("userAgent"),z.removeAttribute("version"),z.removeAttribute("editor"),z.removeAttribute("type")):(z.removeAttribute("userAgent"),
-z.removeAttribute("modified"),z.removeAttribute("version"),z.removeAttribute("editor"),z.removeAttribute("pages"),z.removeAttribute("type"),z.removeAttribute("etag"),mxClient.IS_CHROMEAPP?z.setAttribute("host","Chrome"):EditorUi.isElectronApp?z.setAttribute("host","Electron"):z.setAttribute("host",window.location.hostname),z.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),z.setAttribute("version",EditorUi.VERSION),1<z.getElementsByTagName("diagram").length&&
-null!=this.pages&&z.setAttribute("pages",this.pages.length));null!=T&&(z=z.cloneNode(!0),z.setAttribute("scale",T));null!=S&&(z=z.cloneNode(!0),z.setAttribute("border",S));d=R?mxUtils.getPrettyXml(z):mxUtils.getXml(z);if(!A&&!x&&(B||null!=l&&/(\.html)$/i.test(l.getTitle())))d=this.getHtml2(mxUtils.getXml(z),k,null!=l?l.getTitle():null,v,Q);else if(A||!x&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(n=null),l=this.getSvgFileProperties(z),
-d=this.getEmbeddedSvg(d,k,n,null,I,G,Q,null,null,l.scale,l.border,null,Editor.svgFileTheme);return d};EditorUi.prototype.getXmlFileData=function(d,k,l,n){d=null!=d?d:!0;k=null!=k?k:!1;l=null!=l?l:!Editor.defaultCompressed;var x=this.editor.getGraphXml(d,n);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(G){var C=G.getElementsByTagName("mxGraphModel"),R=0<C.length?C[0]:null;C=G;null==R&&l?(R=mxUtils.getNodeValue(G),0<R.length&&(R=Graph.decompress(R),null!=R&&0<R.length&&(C=G.cloneNode(!1),
-C.appendChild(mxUtils.parseXml(R).documentElement)))):null==R||l?C=G.cloneNode(!0):(C=G.cloneNode(!1),mxUtils.setTextContent(C,Graph.compressNode(R)));x.appendChild(C)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(x),x=this.fileNode.cloneNode(!1),k)d(this.currentPage.node);else for(k=0;k<this.pages.length;k++){var A=this.pages[k],B=A.node;if(A!=this.currentPage)if(A.needsUpdate){var I=new mxCodec(mxUtils.createXmlDocument());I=I.encode(new mxGraphModel(A.root));
-this.editor.graph.saveViewState(A.viewState,I,null,n);EditorUi.removeChildNodes(B);B.appendChild(I);delete A.needsUpdate}else n&&(this.updatePageRoot(A),null!=A.viewState.backgroundImage&&null!=A.viewState.backgroundImage.originalSrc&&(I=new mxCodec(mxUtils.createXmlDocument()),I=I.encode(new mxGraphModel(A.root)),this.editor.graph.saveViewState(A.viewState,I,null,n,A),B=B.cloneNode(!1),B.appendChild(I)));d(B)}return x};EditorUi.prototype.anonymizeString=function(d,k){for(var l=[],n=0;n<d.length;n++){var x=
-d.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?l.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):x.toUpperCase()!=x?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?l.push(" "):l.push("?"):l.push(k?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(d){d=mxUtils.clone(d);if(null!=d[EditorUi.DIFF_INSERT])for(var k=0;k<d[EditorUi.DIFF_INSERT].length;k++)try{var l=
-mxUtils.parseXml(d[EditorUi.DIFF_INSERT][k].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));d[EditorUi.DIFF_INSERT][k].data=mxUtils.getXml(l)}catch(A){d[EditorUi.DIFF_INSERT][k].data=A.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var n in d[EditorUi.DIFF_UPDATE]){var x=d[EditorUi.DIFF_UPDATE][n];null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(k=mxUtils.bind(this,function(A){var B=x.cells[A];
-if(null!=B){for(var I in B)null!=B[I].value&&(B[I].value="["+B[I].value.length+"]"),null!=B[I].xmlValue&&(B[I].xmlValue="["+B[I].xmlValue.length+"]"),null!=B[I].style&&(B[I].style="["+B[I].style.length+"]"),mxUtils.isEmptyObject(B[I])&&delete B[I];mxUtils.isEmptyObject(B)&&delete x.cells[A]}}),k(EditorUi.DIFF_INSERT),k(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);mxUtils.isEmptyObject(x)&&delete d[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};
-EditorUi.prototype.anonymizeAttributes=function(d,k){if(null!=d.attributes)for(var l=0;l<d.attributes.length;l++)"as"!=d.attributes[l].name&&d.setAttribute(d.attributes[l].name,this.anonymizeString(d.attributes[l].value,k));if(null!=d.childNodes)for(l=0;l<d.childNodes.length;l++)this.anonymizeAttributes(d.childNodes[l],k)};EditorUi.prototype.anonymizeNode=function(d,k){k=d.getElementsByTagName("mxCell");for(var l=0;l<k.length;l++)null!=k[l].getAttribute("value")&&k[l].setAttribute("value","["+k[l].getAttribute("value").length+
-"]"),null!=k[l].getAttribute("xmlValue")&&k[l].setAttribute("xmlValue","["+k[l].getAttribute("xmlValue").length+"]"),null!=k[l].getAttribute("style")&&k[l].setAttribute("style","["+k[l].getAttribute("style").length+"]"),null!=k[l].parentNode&&"root"!=k[l].parentNode.nodeName&&null!=k[l].parentNode.parentNode&&(k[l].setAttribute("id",k[l].parentNode.getAttribute("id")),k[l].parentNode.parentNode.replaceChild(k[l],k[l].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var k=
-this.getCurrentFile();null!=k&&(k.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&k.invalidChecksum?k.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(k.clearAutosave(),this.clearStatus(),d?k.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();k.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();k.handleFileError(l,!0)})):k.synchronizeFile(mxUtils.bind(this,function(){k.handleFileSuccess("manual"==
-DrawioFile.SYNC)}),mxUtils.bind(this,function(l){k.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(d,k,l,n,x,A,B,I,G,C,R,T,S){x=null!=x?x:!0;A=null!=A?A:!1;C=null!=C?C:!Editor.defaultCompressed;var Q=this.editor.graph;if((k||!d&&null!=G&&/(\.svg)$/i.test(G.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var v=Q.getGlobalVariable;Q=this.createTemporaryGraph(Q.getStylesheet());Q.setBackgroundImage=this.editor.graph.setBackgroundImage;Q.background=this.editor.graph.background;
-var z=null!=this.pages?this.pages[0]:null;null==z||this.currentPage==z?Q.setBackgroundImage(this.editor.graph.backgroundImage):null!=z.viewState&&null!=z.viewState&&Q.setBackgroundImage(z.viewState.backgroundImage);Q.getGlobalVariable=function(N){return"page"==N&&null!=z?z.getName():"pagenumber"==N?1:v.apply(this,arguments)};document.body.appendChild(Q.container);null!=z&&Q.model.setRoot(z.root)}B=null!=B?B:this.getXmlFileData(x,A,C,R);G=null!=G?G:this.getCurrentFile();d=this.createFileData(B,Q,G,
-window.location.href,d,k,l,n,x,I,C,T,S);Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);return d};EditorUi.prototype.getHtml=function(d,k,l,n,x,A){A=null!=A?A:!0;var B=null,I=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=k){B=A?k.getGraphBounds():k.getBoundingBox(k.getSelectionCells());var G=k.view.scale;A=Math.floor(B.x/G-k.view.translate.x);G=Math.floor(B.y/G-k.view.translate.y);B=k.background;null==x&&(k=this.getBasenames().join(";"),0<k.length&&(I=EditorUi.drawHost+
-"/embed.js?s="+k));d.setAttribute("x0",A);d.setAttribute("y0",G)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=n&&d.setAttribute("edit",n));null!=x&&(x=x.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";n=Graph.compress(d);Graph.decompress(n)!=d&&(n=encodeURIComponent(d));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(A=0;A<n.length;A++)l.model.execute(new ChangePage(this,n[A],null));var I=this.getCurrentFile();null!=I&&I.fileReplaced(g)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,l,n,x,A,B,I,H,D,S,U,R){g=null!=
+g?g:this.editor.graph;x=null!=x?x:!1;H=null!=H?H:!0;S=null!=S?S:!Editor.defaultCompressed;var P=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var v="_blank";else P=v=n;if(null==d)return"";var y=d;if("mxfile"!=y.nodeName.toLowerCase()){if(S){var L=d.ownerDocument.createElement("diagram");L.setAttribute("name",mxResources.get("pageWithNumber",[1]));L.setAttribute("id",Editor.guid());L.appendChild(d)}else{L=Graph.zapGremlins(mxUtils.getXml(d));y=Graph.compress(L);if(Graph.decompress(y)!=
+L)return L;L=d.ownerDocument.createElement("diagram");L.setAttribute("name",mxResources.get("pageWithNumber",[1]));L.setAttribute("id",Editor.guid());mxUtils.setTextContent(L,y)}y=d.ownerDocument.createElement("mxfile");y.appendChild(L)}D?(y=y.cloneNode(!0),y.removeAttribute("modified"),y.removeAttribute("host"),y.removeAttribute("agent"),y.removeAttribute("etag"),y.removeAttribute("userAgent"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("type")):(y.removeAttribute("userAgent"),
+y.removeAttribute("modified"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("pages"),y.removeAttribute("type"),y.removeAttribute("etag"),mxClient.IS_CHROMEAPP?y.setAttribute("host","Chrome"):EditorUi.isElectronApp?y.setAttribute("host","Electron"):y.setAttribute("host",window.location.hostname),y.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),y.setAttribute("version",EditorUi.VERSION),1<y.getElementsByTagName("diagram").length&&
+null!=this.pages&&y.setAttribute("pages",this.pages.length));null!=U&&(y=y.cloneNode(!0),y.setAttribute("scale",U));null!=R&&(y=y.cloneNode(!0),y.setAttribute("border",R));d=S?mxUtils.getPrettyXml(y):mxUtils.getXml(y);if(!A&&!x&&(B||null!=l&&/(\.html)$/i.test(l.getTitle())))d=this.getHtml2(mxUtils.getXml(y),g,null!=l?l.getTitle():null,v,P);else if(A||!x&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(n=null),l=this.getSvgFileProperties(y),
+d=this.getEmbeddedSvg(d,g,n,null,I,H,P,null,null,l.scale,l.border,null,Editor.svgFileTheme);return d};EditorUi.prototype.getXmlFileData=function(d,g,l,n){d=null!=d?d:!0;g=null!=g?g:!1;l=null!=l?l:!Editor.defaultCompressed;var x=this.editor.getGraphXml(d,n);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(H){var D=H.getElementsByTagName("mxGraphModel"),S=0<D.length?D[0]:null;D=H;null==S&&l?(S=mxUtils.getNodeValue(H),0<S.length&&(S=Graph.decompress(S),null!=S&&0<S.length&&(D=H.cloneNode(!1),
+D.appendChild(mxUtils.parseXml(S).documentElement)))):null==S||l?D=H.cloneNode(!0):(D=H.cloneNode(!1),mxUtils.setTextContent(D,Graph.compressNode(S)));x.appendChild(D)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(x),x=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var A=this.pages[g],B=A.node;if(A!=this.currentPage)if(A.needsUpdate){var I=new mxCodec(mxUtils.createXmlDocument());I=I.encode(new mxGraphModel(A.root));
+this.editor.graph.saveViewState(A.viewState,I,null,n);EditorUi.removeChildNodes(B);B.appendChild(I);delete A.needsUpdate}else n&&(this.updatePageRoot(A),null!=A.viewState.backgroundImage&&null!=A.viewState.backgroundImage.originalSrc&&(I=new mxCodec(mxUtils.createXmlDocument()),I=I.encode(new mxGraphModel(A.root)),this.editor.graph.saveViewState(A.viewState,I,null,n,A),B=B.cloneNode(!1),B.appendChild(I)));d(B)}return x};EditorUi.prototype.anonymizeString=function(d,g){for(var l=[],n=0;n<d.length;n++){var x=
+d.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?l.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):x.toUpperCase()!=x?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?l.push(" "):l.push("?"):l.push(g?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(d){d=mxUtils.clone(d);if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++)try{var l=
+mxUtils.parseXml(d[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));d[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(l)}catch(A){d[EditorUi.DIFF_INSERT][g].data=A.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var n in d[EditorUi.DIFF_UPDATE]){var x=d[EditorUi.DIFF_UPDATE][n];null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(g=mxUtils.bind(this,function(A){var B=x.cells[A];
+if(null!=B){for(var I in B)null!=B[I].value&&(B[I].value="["+B[I].value.length+"]"),null!=B[I].xmlValue&&(B[I].xmlValue="["+B[I].xmlValue.length+"]"),null!=B[I].style&&(B[I].style="["+B[I].style.length+"]"),mxUtils.isEmptyObject(B[I])&&delete B[I];mxUtils.isEmptyObject(B)&&delete x.cells[A]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);mxUtils.isEmptyObject(x)&&delete d[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};
+EditorUi.prototype.anonymizeAttributes=function(d,g){if(null!=d.attributes)for(var l=0;l<d.attributes.length;l++)"as"!=d.attributes[l].name&&d.setAttribute(d.attributes[l].name,this.anonymizeString(d.attributes[l].value,g));if(null!=d.childNodes)for(l=0;l<d.childNodes.length;l++)this.anonymizeAttributes(d.childNodes[l],g)};EditorUi.prototype.anonymizeNode=function(d,g){g=d.getElementsByTagName("mxCell");for(var l=0;l<g.length;l++)null!=g[l].getAttribute("value")&&g[l].setAttribute("value","["+g[l].getAttribute("value").length+
+"]"),null!=g[l].getAttribute("xmlValue")&&g[l].setAttribute("xmlValue","["+g[l].getAttribute("xmlValue").length+"]"),null!=g[l].getAttribute("style")&&g[l].setAttribute("style","["+g[l].getAttribute("style").length+"]"),null!=g[l].parentNode&&"root"!=g[l].parentNode.nodeName&&null!=g[l].parentNode.parentNode&&(g[l].setAttribute("id",g[l].parentNode.getAttribute("id")),g[l].parentNode.parentNode.replaceChild(g[l],g[l].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var g=
+this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.clearStatus(),d?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();g.handleFileError(l,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==
+DrawioFile.SYNC)}),mxUtils.bind(this,function(l){g.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(d,g,l,n,x,A,B,I,H,D,S,U,R){x=null!=x?x:!0;A=null!=A?A:!1;D=null!=D?D:!Editor.defaultCompressed;var P=this.editor.graph;if((g||!d&&null!=H&&/(\.svg)$/i.test(H.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var v=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());P.setBackgroundImage=this.editor.graph.setBackgroundImage;P.background=this.editor.graph.background;
+var y=null!=this.pages?this.pages[0]:null;null==y||this.currentPage==y?P.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&P.setBackgroundImage(y.viewState.backgroundImage);P.getGlobalVariable=function(L){return"page"==L&&null!=y?y.getName():"pagenumber"==L?1:v.apply(this,arguments)};document.body.appendChild(P.container);null!=y&&P.model.setRoot(y.root)}B=null!=B?B:this.getXmlFileData(x,A,D,S);H=null!=H?H:this.getCurrentFile();d=this.createFileData(B,P,H,
+window.location.href,d,g,l,n,x,I,D,U,R);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return d};EditorUi.prototype.getHtml=function(d,g,l,n,x,A){A=null!=A?A:!0;var B=null,I=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){B=A?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var H=g.view.scale;A=Math.floor(B.x/H-g.view.translate.x);H=Math.floor(B.y/H-g.view.translate.y);B=g.background;null==x&&(g=this.getBasenames().join(";"),0<g.length&&(I=EditorUi.drawHost+
+"/embed.js?s="+g));d.setAttribute("x0",A);d.setAttribute("y0",H)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=n&&d.setAttribute("edit",n));null!=x&&(x=x.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";n=Graph.compress(d);Graph.decompress(n)!=d&&(n=encodeURIComponent(d));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+(null==x&&null!=B&&B!=mxConstants.NONE?' style="background-color:'+B+';">':">")+'\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==x?'<script type="text/javascript" src="'+I+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,k,l,n,x){k=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
+(null==x?'<script type="text/javascript" src="'+I+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,l,n,x){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+
-x+"'\"/>\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(d))+'"></div>\n'+(null==x?'<script type="text/javascript" src="'+k+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
-function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var k=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,l=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[k],"cause",[l]),Error(mxResources.get("notADiagramFile")+" ("+l+")");d=null!=k?this.editor.extractGraphModel(k,!0):null;null!=d&&(k=d);if(null!=k&&"mxfile"==k.nodeName&&(d=k.getElementsByTagName("diagram"),
-l={},0<d.length)){var n=this.getHashObject(),x=null;this.fileNode=k;this.pages=[];for(var A=0;A<d.length;A++){null==d[A].getAttribute("id")&&d[A].setAttribute("id",A);k=new DiagramPage(d[A]);null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[A+1]));this.pages.push(k);if(null==n.pageId&&null!=urlParams["page-id"]&&k.getId()==urlParams["page-id"]||null!=n.pageId&&k.getId()==n.pageId)x=k;if(null==l[k.getId()])l[k.getId()]=k;else throw Error(k.getId()+": Duplicate page ID");}this.currentPage=
-null!=x?x:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];k=this.currentPage.node}null==this.fileNode&&null!=k&&(this.fileNode=k.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(k.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(k);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),
-this.scrollToPage());if(null!=urlParams["layer-ids"])try{var B=decodeURIComponent(urlParams["layer-ids"]).split(" ");k={};for(A=0;A<B.length;A++)k[B[A]]=!0;var I=this.editor.graph.getModel(),G=I.getChildren(I.root);for(A=0;A<G.length;A++){var C=G[A];I.setVisible(C,k[C.id]||!1)}}catch(R){}};EditorUi.prototype.getBaseFilename=function(d){var k=this.getCurrentFile();k=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(k)||/(\.html)$/i.test(k)||/(\.svg)$/i.test(k)||/(\.png)$/i.test(k))k=
-k.substring(0,k.lastIndexOf("."));/(\.drawio)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(k=k+"-"+this.currentPage.getName());return k};EditorUi.prototype.downloadFile=function(d,k,l,n,x,A,B,I,G,C,R,T,S,Q,v,z,N){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var J=this.getBaseFilename(!x),K=J+("xml"==d||"pdf"==d&&R?".drawio":"")+"."+
-d;if("xml"==d){var m=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,k);this.saveData(K,d,m,"text/xml")}else if("html"==d)m=this.getHtml2(this.getFileData(!0),this.editor.graph,J),this.saveData(K,d,m,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==d?K=J+".png":"jpeg"==d&&(K=J+".jpg"),this.saveRequest(K,d,mxUtils.bind(this,function(O,P){try{return this.createDownloadRequest(O,d,n,P,B,x,I,G,C,R,T,void 0,
-void 0,!A,S,Q,v,z,N)}catch(U){this.handleError(U)}}));else{var t=null,D=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(K,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(t)}))});if("svg"==d){var M=this.editor.graph.background;if(B||M==mxConstants.NONE)M=null;var L=this.editor.graph.getSvg(M,null,null,null,null,n);l&&this.editor.graph.addSvgShadow(L);this.editor.convertImages(L,
-mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();D(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else K=J+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();D(O)}),n)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(d,k,l,n,x,A,B,I,G,C,R,T,S,Q,v,z,N,J,K){d=this.downloadRequestBuilder(d,k,l,n,x,A,B,I,G,C,R,T,S,Q,v,z,N,J,K);k="";for(var m in d)l=d[m],null!=l&&(k+=m+"="+encodeURIComponent(l)+
-"&");return new mxXmlRequest(EXPORT_URL,k)};EditorUi.prototype.downloadRequestBuilder=function(d,k,l,n,x,A,B,I,G,C,R,T,S,Q,v,z,N,J,K){var m=this.editor.graph,t=m.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==A?!1:"xmlpng"!=k,null,null,null,!Editor.defaultCompressed,"pdf"==k);var D=null,M=null,L=null;if(!EditorUi.isElectronApp&&(t.width*t.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};C=C?"1":"0";"pdf"==k&&(null!=R?(D=R.from,M=R.to):0==A&&
-(L="1"));"xmlpng"==k&&(C="1",k="png");if(("xmlpng"==k||"svg"==k)&&null!=this.pages&&null!=this.currentPage)for(A=0;A<this.pages.length;A++)if(this.pages[A]==this.currentPage){D=A;break}A=m.background;"png"!=k&&"pdf"!=k&&"svg"!=k||!x?x||null!=A&&A!=mxConstants.NONE||(A="#ffffff"):A=mxConstants.NONE;x={globalVars:m.getExportVariables()};null!=R&&null!=R.from&&(x.globalVars.pagenumber=R.from+1);G&&(x.grid={size:m.gridSize,steps:m.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==k?mxGraphView.prototype.defaultGridColor:
-m.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:k,from:D,to:M,allPages:L,bg:null!=A?A:mxConstants.NONE,base64:n,embedXml:C,xml:l,filename:null!=d?d:"",extras:JSON.stringify(x),scale:B,border:I,pageMargin:v,w:T&&isFinite(T)?T:null,h:S&&isFinite(S)?S:null,crop:null!=Q&&Q?"1":"0",fit:null!=z&&z?"1":"0",shadows:null!=K&&K?"1":"0",sheetsAcross:N,sheetsDown:J}};EditorUi.prototype.setMode=function(d,k){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=
-window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));if(null!=d&&1<d.length){var k=d.indexOf("#");0<=k&&(d=d.substring(0,k))}return d};EditorUi.prototype.getHashObject=function(){var d=window.location.hash,k={};if(null!=d&&0<d.length){var l=d.lastIndexOf("#");if(0<l){d=decodeURIComponent(d.substring(l+1));try{k=JSON.parse(d)}catch(n){}}}return k};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var d=this.getHashObject();
-d.pageId=this.currentPage.getId();this.setHashObject(d)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(d){if(Editor.enableHashObjects){var k=window.location.hash;if(null==k||""==k)k="#";var l=k.lastIndexOf("#");0<l&&(k=k.substring(0,l));try{null==d||mxUtils.isEmptyObject(d)||(k=k+"#"+encodeURIComponent(JSON.stringify(d)))}catch(n){}0<l&&0<k.lastIndexOf("#")?window.location.hash=k:window.location.replace(k)}};EditorUi.prototype.loadDescriptor=function(d,k,l){var n=window.location.hash,
-x=mxUtils.bind(this,function(B){var I=null!=d.data?d.data:"";null!=B&&0<B.length&&(0<I.length&&(I+="\n"),I+=B);B=new LocalFile(this,"csv"!=d.format&&0<I.length?I:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);B.getHash=function(){return n};this.fileLoaded(B);"csv"==d.format&&this.importCsv(I,mxUtils.bind(this,function(S){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=d.update){var G=null!=d.interval?
-parseInt(d.interval):6E4,C=null,R=mxUtils.bind(this,function(){var S=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(Q){S===this.currentPage&&(200<=Q.getStatus()&&300>=Q.getStatus()?(this.updateDiagram(Q.getText()),T()):this.handleError({message:mxResources.get("error")+" "+Q.getStatus()}))}),mxUtils.bind(this,function(Q){this.handleError(Q)}))}),T=mxUtils.bind(this,function(){window.clearTimeout(C);C=window.setTimeout(R,
-G)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){T();R()}));T();R()}null!=k&&k()});if(null!=d.url&&0<d.url.length){var A=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(A,mxUtils.bind(this,function(B){x(B)}),mxUtils.bind(this,function(B){null!=l&&l(B)}))}else x("")};EditorUi.prototype.updateDiagram=function(d){function k(m){var t=new mxCellOverlay(m.image||x.warningImage,m.tooltip,m.align,m.valign,m.offset);t.addListener(mxEvent.CLICK,function(D,M){n.alert(m.tooltip)});
-return t}var l=null,n=this;if(null!=d&&0<d.length&&(l=mxUtils.parseXml(d),d=null!=l?l.documentElement:null,null!=d&&"updates"==d.nodeName)){var x=this.editor.graph,A=x.getModel();A.beginUpdate();var B=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var I=A.getCell(d.getAttribute("id"));if(null!=I){try{var G=d.getAttribute("value");if(null!=G){var C=mxUtils.parseXml(G).documentElement;if(null!=C)if("1"==C.getAttribute("replace-value"))A.setValue(I,C);else for(var R=C.attributes,T=0;T<
-R.length;T++)x.setAttributeForCell(I,R[T].nodeName,0<R[T].nodeValue.length?R[T].nodeValue:null)}}catch(m){null!=window.console&&console.log("Error in value for "+I.id+": "+m)}try{var S=d.getAttribute("style");null!=S&&x.model.setStyle(I,S)}catch(m){null!=window.console&&console.log("Error in style for "+I.id+": "+m)}try{var Q=d.getAttribute("icon");if(null!=Q){var v=0<Q.length?JSON.parse(Q):null;null!=v&&v.append||x.removeCellOverlays(I);null!=v&&x.addCellOverlay(I,k(v))}}catch(m){null!=window.console&&
-console.log("Error in icon for "+I.id+": "+m)}try{var z=d.getAttribute("geometry");if(null!=z){z=JSON.parse(z);var N=x.getCellGeometry(I);if(null!=N){N=N.clone();for(key in z){var J=parseFloat(z[key]);"dx"==key?N.x+=J:"dy"==key?N.y+=J:"dw"==key?N.width+=J:"dh"==key?N.height+=J:N[key]=parseFloat(z[key])}x.model.setGeometry(I,N)}}}catch(m){null!=window.console&&console.log("Error in icon for "+I.id+": "+m)}}}else if("model"==d.nodeName){for(var K=d.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=
+x+"'\"/>\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(d))+'"></div>\n'+(null==x?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
+function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var g=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,l=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[g],"cause",[l]),Error(mxResources.get("notADiagramFile")+" ("+l+")");d=null!=g?this.editor.extractGraphModel(g,!0):null;null!=d&&(g=d);if(null!=g&&"mxfile"==g.nodeName&&(d=g.getElementsByTagName("diagram"),
+l={},0<d.length)){var n=this.getHashObject(),x=null;this.fileNode=g;this.pages=[];for(var A=0;A<d.length;A++){null==d[A].getAttribute("id")&&d[A].setAttribute("id",A);g=new DiagramPage(d[A]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[A+1]));this.pages.push(g);if(null==n.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||null!=n.pageId&&g.getId()==n.pageId)x=g;if(null==l[g.getId()])l[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=
+null!=x?x:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}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,this.currentPage.setDiagramModified(!1),
+this.scrollToPage());if(null!=urlParams["layer-ids"])try{var B=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(A=0;A<B.length;A++)g[B[A]]=!0;var I=this.editor.graph.getModel(),H=I.getChildren(I.root);for(A=0;A<H.length;A++){var D=H[A];I.setVisible(D,g[D.id]||!1)}}catch(S){}};EditorUi.prototype.getBaseFilename=function(d){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(".")));!d&&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(d,g,l,n,x,A,B,I,H,D,S,U,R,P,v,y,L){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var J=this.getBaseFilename(!x),K=J+("xml"==d||"pdf"==d&&S?".drawio":"")+"."+
+d;if("xml"==d){var m=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(K,d,m,"text/xml")}else if("html"==d)m=this.getHtml2(this.getFileData(!0),this.editor.graph,J),this.saveData(K,d,m,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==d?K=J+".png":"jpeg"==d&&(K=J+".jpg"),this.saveRequest(K,d,mxUtils.bind(this,function(O,Q){try{return this.createDownloadRequest(O,d,n,Q,B,x,I,H,D,S,U,void 0,
+void 0,!A,R,P,v,y,L)}catch(T){this.handleError(T)}}));else{var t=null,C=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(K,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(t)}))});if("svg"==d){var N=this.editor.graph.background;if(B||N==mxConstants.NONE)N=null;var M=this.editor.graph.getSvg(N,null,null,null,null,n);l&&this.editor.graph.addSvgShadow(M);this.editor.convertImages(M,
+mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();C(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else K=J+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();C(O)}),n)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(d,g,l,n,x,A,B,I,H,D,S,U,R,P,v,y,L,J,K){d=this.downloadRequestBuilder(d,g,l,n,x,A,B,I,H,D,S,U,R,P,v,y,L,J,K);g="";for(var m in d)l=d[m],null!=l&&(g+=m+"="+encodeURIComponent(l)+
+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(d,g,l,n,x,A,B,I,H,D,S,U,R,P,v,y,L,J,K){var m=this.editor.graph,t=m.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==A?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var C=null,N=null,M=null;if(!EditorUi.isElectronApp&&(t.width*t.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};D=D?"1":"0";"pdf"==g&&(null!=S?(C=S.from,N=S.to):0==A&&
+(M="1"));"xmlpng"==g&&(D="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(A=0;A<this.pages.length;A++)if(this.pages[A]==this.currentPage){C=A;break}A=m.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!x?x||null!=A&&A!=mxConstants.NONE||(A="#ffffff"):A=mxConstants.NONE;x={globalVars:m.getExportVariables()};null!=S&&null!=S.from&&(x.globalVars.pagenumber=S.from+1);H&&(x.grid={size:m.gridSize,steps:m.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:
+m.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:C,to:N,allPages:M,bg:null!=A?A:mxConstants.NONE,base64:n,embedXml:D,xml:l,filename:null!=d?d:"",extras:JSON.stringify(x),scale:B,border:I,pageMargin:v,w:U&&isFinite(U)?U:null,h:R&&isFinite(R)?R:null,crop:null!=P&&P?"1":"0",fit:null!=y&&y?"1":"0",shadows:null!=K&&K?"1":"0",sheetsAcross:L,sheetsDown:J}};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=
+window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));if(null!=d&&1<d.length){var g=d.indexOf("#");0<=g&&(d=d.substring(0,g))}return d};EditorUi.prototype.getHashObject=function(){var d=window.location.hash,g={};if(null!=d&&0<d.length){var l=d.lastIndexOf("#");if(0<l){d=decodeURIComponent(d.substring(l+1));try{g=JSON.parse(d)}catch(n){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var d=this.getHashObject();
+d.pageId=this.currentPage.getId();this.setHashObject(d)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(d){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var l=g.lastIndexOf("#");0<l&&(g=g.substring(0,l));try{null==d||mxUtils.isEmptyObject(d)||(g=g+"#"+encodeURIComponent(JSON.stringify(d)))}catch(n){}0<l&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(d,g,l){var n=window.location.hash,
+x=mxUtils.bind(this,function(B){var I=null!=d.data?d.data:"";null!=B&&0<B.length&&(0<I.length&&(I+="\n"),I+=B);B=new LocalFile(this,"csv"!=d.format&&0<I.length?I:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);B.getHash=function(){return n};this.fileLoaded(B);"csv"==d.format&&this.importCsv(I,mxUtils.bind(this,function(R){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=d.update){var H=null!=d.interval?
+parseInt(d.interval):6E4,D=null,S=mxUtils.bind(this,function(){var R=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(P){R===this.currentPage&&(200<=P.getStatus()&&300>=P.getStatus()?(this.updateDiagram(P.getText()),U()):this.handleError({message:mxResources.get("error")+" "+P.getStatus()}))}),mxUtils.bind(this,function(P){this.handleError(P)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(D);D=window.setTimeout(S,
+H)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();S()}));U();S()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var A=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(A,mxUtils.bind(this,function(B){x(B)}),mxUtils.bind(this,function(B){null!=l&&l(B)}))}else x("")};EditorUi.prototype.updateDiagram=function(d){function g(m){var t=new mxCellOverlay(m.image||x.warningImage,m.tooltip,m.align,m.valign,m.offset);t.addListener(mxEvent.CLICK,function(C,N){n.alert(m.tooltip)});
+return t}var l=null,n=this;if(null!=d&&0<d.length&&(l=mxUtils.parseXml(d),d=null!=l?l.documentElement:null,null!=d&&"updates"==d.nodeName)){var x=this.editor.graph,A=x.getModel();A.beginUpdate();var B=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var I=A.getCell(d.getAttribute("id"));if(null!=I){try{var H=d.getAttribute("value");if(null!=H){var D=mxUtils.parseXml(H).documentElement;if(null!=D)if("1"==D.getAttribute("replace-value"))A.setValue(I,D);else for(var S=D.attributes,U=0;U<
+S.length;U++)x.setAttributeForCell(I,S[U].nodeName,0<S[U].nodeValue.length?S[U].nodeValue:null)}}catch(m){null!=window.console&&console.log("Error in value for "+I.id+": "+m)}try{var R=d.getAttribute("style");null!=R&&x.model.setStyle(I,R)}catch(m){null!=window.console&&console.log("Error in style for "+I.id+": "+m)}try{var P=d.getAttribute("icon");if(null!=P){var v=0<P.length?JSON.parse(P):null;null!=v&&v.append||x.removeCellOverlays(I);null!=v&&x.addCellOverlay(I,g(v))}}catch(m){null!=window.console&&
+console.log("Error in icon for "+I.id+": "+m)}try{var y=d.getAttribute("geometry");if(null!=y){y=JSON.parse(y);var L=x.getCellGeometry(I);if(null!=L){L=L.clone();for(key in y){var J=parseFloat(y[key]);"dx"==key?L.x+=J:"dy"==key?L.y+=J:"dw"==key?L.width+=J:"dh"==key?L.height+=J:L[key]=parseFloat(y[key])}x.model.setGeometry(I,L)}}}catch(m){null!=window.console&&console.log("Error in icon for "+I.id+": "+m)}}}else if("model"==d.nodeName){for(var K=d.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=
K.nextSibling;null!=K&&(new mxCodec(d.firstChild)).decode(K,A)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(x.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))x.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(B=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{A.endUpdate()}null!=B&&this.chromelessResize&&this.chromelessResize(!0,
-B)}return l};EditorUi.prototype.getCopyFilename=function(d,k){var l=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var n=l.lastIndexOf(".");0<=n&&(d=l.substring(n),l=l.substring(0,n));if(k){k=l;var x=new Date;l=x.getFullYear();n=x.getMonth()+1;var A=x.getDate(),B=x.getHours(),I=x.getMinutes();x=x.getSeconds();l=k+(" "+(l+"-"+n+"-"+A+"-"+B+"-"+I+"-"+x))}return l=mxResources.get("copyOf",[l])+d};EditorUi.prototype.logIfModified=function(d,k){try{null!=d&&k&&EditorUi.debug("File.closed",
-[d])}catch(l){}};EditorUi.prototype.fileLoaded=function(d,k,l){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[d],"noDialogs",[k]);var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=n&&(n.removeListener(this.descriptorChangedListener),this.logIfModified(n,!0),n.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var A=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
-null!=n&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!k&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");this.clearStatus();this.updateUi();k||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=d)try{this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",
+B)}return l};EditorUi.prototype.getCopyFilename=function(d,g){var l=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var n=l.lastIndexOf(".");0<=n&&(d=l.substring(n),l=l.substring(0,n));if(g){g=l;var x=new Date;l=x.getFullYear();n=x.getMonth()+1;var A=x.getDate(),B=x.getHours(),I=x.getMinutes();x=x.getSeconds();l=g+(" "+(l+"-"+n+"-"+A+"-"+B+"-"+I+"-"+x))}return l=mxResources.get("copyOf",[l])+d};EditorUi.prototype.logIfModified=function(d,g){try{null!=d&&g&&EditorUi.debug("File.closed",
+[d])}catch(l){}};EditorUi.prototype.fileLoaded=function(d,g,l){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[d],"noDialogs",[g]);var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=n&&(n.removeListener(this.descriptorChangedListener),this.logIfModified(n,!0),n.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var A=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
+null!=n&&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.fname.innerText="");this.clearStatus();this.updateUi();g||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=d)try{this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",
this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?d.addUnsavedStatus():this.clearStatus():this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+
'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")}));!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();null!=l&&l();this.editor.fireEvent(new mxEventObject("fileLoaded"));x=!0;if(!this.isOffline()&&null!=d.getMode()){var B="1"==urlParams.sketch?"sketch":
uiTheme;if(null==B)B="default";else if("sketch"==B||"min"==B)B+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+B})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),
-title:d.getTitle(),mode:d.getMode()})}catch(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=d)try{d.close()}catch(G){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=n?this.fileLoaded(n)||A():A()});k?d():(null!=I.fallbackFileData&&(I.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,
-function(){this.hideDialog();var G=new LocalFile(this,I.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(G)})}),this.handleError(I,mxResources.get("errorLoadingFile"),d,!0,null,null,!0))}else A();return x};EditorUi.prototype.getHashValueForPages=function(d,k){var l=0,n=new mxGraphModel,x=new mxCodec;null!=k&&(k.byteCount=0,k.attrCount=0,k.eltCount=0,k.nodeCount=0);for(var A=0;A<d.length;A++){this.updatePageRoot(d[A]);var B=d[A].node.cloneNode(!1);B.removeAttribute("name");n.root=d[A].root;
-var I=x.encode(n);this.editor.graph.saveViewState(d[A].viewState,I,!0);I.removeAttribute("pageWidth");I.removeAttribute("pageHeight");B.appendChild(I);null!=k&&(k.eltCount+=B.getElementsByTagName("*").length,k.nodeCount+=B.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(B,function(G,C,R,T){return!T||"mxGeometry"!=G.nodeName&&"mxPoint"!=G.nodeName||"x"!=C&&"y"!=C&&"width"!=C&&"height"!=C?T&&"mxCell"==G.nodeName&&"previous"==C?null:R:Math.round(R)},k)<<0}return l};EditorUi.prototype.hashValue=
-function(d,k,l){var n=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(n^=this.hashValue(d.nodeName,k,l));if(null!=d.attributes){null!=l&&(l.attrCount+=d.attributes.length);for(var x=0;x<d.attributes.length;x++){var A=d.attributes[x].name,B=null!=k?k(d,A,d.attributes[x].value,!0):d.attributes[x].value;null!=B&&(n^=this.hashValue(A,k,l)+this.hashValue(B,k,l))}}if(null!=d.childNodes)for(x=0;x<d.childNodes.length;x++)n=
-(n<<5)-n+this.hashValue(d.childNodes[x],k,l)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);k=0;null!=l&&(l.byteCount+=d.length);for(x=0;x<d.length;x++)k=(k<<5)-k+d.charCodeAt(x)<<0;n^=k}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,k,l,n,x,A,B){};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(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){if(!Editor.defaultCompressed)for(var k=0;k<d.length;k++)null!=d[k].xml&&"<"!=d[k].xml.charAt(0)&&(d[k].xml=mxUtils.trim(Graph.decompress(d[k].xml)));k=mxUtils.createXmlDocument();var l=k.createElement("mxlibrary");
-mxUtils.setTextContent(l,JSON.stringify(d,null,2));k.appendChild(l);return mxUtils.getXml(k,"\n")};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var k=this.sidebar.palettes[d];if(null!=k){for(var l=0;l<k.length;l++)k[l].parentNode.removeChild(k[l]);delete this.sidebar.palettes[d]}};
-EditorUi.prototype.repositionLibrary=function(d,k){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=d||!k){null==d&&(k=this.sidebar.palettes["L.scratchpad"],null==k&&(k=this.sidebar.palettes.search),null!=k&&(d=k[k.length-1].nextSibling));d=null!=d?d:l.firstChild.nextSibling.nextSibling;k=l.lastChild;var n=k.previousSibling;l.insertBefore(k,d);l.insertBefore(n,k)}};EditorUi.prototype.loadLibrary=function(d,k){var l=mxUtils.parseXml(d.getData());if("mxlibrary"==
-l.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(d,n,l.documentElement.getAttribute("title"),k)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.showSearchWindow=function(d,k){var l=d?"findReplace":"find",n=l+"Window";
-if(null==this[n]){var x="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,A=d?x?330:300:240;this[n]=new FindWindow(this,document.body.offsetWidth-(A+20),100,A,d?x?304:288:180,d);this[n].window.addListener("show",function(){this.fireEvent(new mxEventObject(l))});this[n].window.addListener("hide",function(){this.fireEvent(new mxEventObject(l))});this[n].window.setVisible(!0)}else null==k&&this[n].window.setVisible(!this[n].window.isVisible());null!=k&&(this[n].doSearch(k),
-this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(d,k,l,n){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());var x=null;if(d.constructor!=StorageLibrary||".scratchpad"!=d.title){null==this.openLibraries&&(this.openLibraries=[]);for(var A=0;A<this.openLibraries.length;A++)if(this.openLibraries[A].file.getHash()==d.getHash()){mxUtils.remove(this.openLibraries[A],this.openLibraries);break}x={file:d,images:k,title:l,expand:n};this.openLibraries.push(x)}else this.scratchpad=
-d;A=this.sidebar.palettes[d.getHash()];A=null!=A?A[A.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var B=null,I=mxUtils.bind(this,function(J,K){0==J.length&&d.isEditable()?(null==B&&(B=document.createElement("div"),B.className="geDropTarget",mxUtils.write(B,mxResources.get("dragElementsHere"))),K.appendChild(B)):this.addLibraryEntries(J,K)});null!=this.sidebar&&null!=k&&this.sidebar.addEntries(k);null==l&&(l=d.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));
-var G=this.sidebar.addPalette(d.getHash(),l,null!=n?n:!0,mxUtils.bind(this,function(J){I(k,J)}));null!=x&&(x.div=G);this.repositionLibrary(A,"L.scratchpad"!=d.getHash());n=G.parentNode.previousSibling;l=n.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=d.title&&n.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);var C=document.createElement("div");C.style.backgroundColor="inherit";n.style.position="relative";var R=document.createElement("img");R.className="geLibraryButton";R.setAttribute("src",
-Editor.crossImage);R.setAttribute("title",mxResources.get("close"));var T=null;if(".scratchpad"!=d.title||this.closableScratchpad)C.appendChild(R),mxEvent.addListener(R,"click",mxUtils.bind(this,function(J){if(!mxEvent.isConsumed(J)){var K=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(d)});null!=T?this.confirm(mxResources.get("allChangesLost"),null,K,mxResources.get("cancel"),mxResources.get("discardChanges")):K();mxEvent.consume(J)}}));if(d.isEditable()){var S=
-this.editor.graph,Q=null;l=mxUtils.bind(this,function(J){this.showLibraryDialog(d.getTitle(),G,k,d,d.getMode());mxEvent.consume(J)});var v=mxUtils.bind(this,function(J){d.setModified(!0);d.isAutosave()?(null!=Q&&null!=Q.parentNode&&Q.parentNode.removeChild(Q),Q=R.cloneNode(!1),Q.setAttribute("src",Editor.spinImage),Q.setAttribute("title",mxResources.get("saving")),Q.style.cursor="default",Q.style.marginRight="2px",Q.style.marginTop="-2px",C.insertBefore(Q,C.firstChild),this.saveLibrary(d.getTitle(),
-k,d,d.getMode(),!0,!0,function(){null!=Q&&null!=Q.parentNode&&Q.parentNode.removeChild(Q)})):null==T&&(T=R.cloneNode(!1),T.setAttribute("src",Editor.saveImage),T.setAttribute("title",mxResources.get("save")),C.insertBefore(T,C.firstChild),mxEvent.addListener(T,"click",mxUtils.bind(this,function(K){this.saveLibrary(d.getTitle(),k,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==T||d.isModified()||(T.parentNode.removeChild(T),T=null)});mxEvent.consume(K)})))}),z=mxUtils.bind(this,function(J,
-K,m,t){J=S.cloneCells(mxUtils.sortCells(S.model.getTopmostCells(J)));for(var D=0;D<J.length;D++){var M=S.getCellGeometry(J[D]);null!=M&&M.translate(-K.x,-K.y)}G.appendChild(this.sidebar.createVertexTemplateFromCells(J,K.width,K.height,t||"",!0,null,!1));J=mxUtils.getXml(this.editor.graph.encodeCells(J));Editor.defaultCompressed&&(J=Graph.compress(J));K={xml:J,w:K.width,h:K.height};null!=t&&(K.title=t);k.push(K);v(m);null!=B&&null!=B.parentNode&&0<k.length&&(B.parentNode.removeChild(B),B=null)}),N=
-mxUtils.bind(this,function(J){if(S.isSelectionEmpty())S.getRubberband().isActive()?(S.getRubberband().execute(J),S.getRubberband().reset()):null!=J&&mxEvent.getSource(J).classList.contains("geLibraryButton")&&this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var K=S.getSelectionCells(),m=S.view.getBounds(K);if(null!=m&&0<m.width&&0<m.height){var t=S.view.scale;m.x/=t;m.y/=t;m.width/=t;m.height/=t;m.x-=S.view.translate.x;m.y-=S.view.translate.y;
-z(K,m)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(J)});mxEvent.addGestureListeners(G,function(){},mxUtils.bind(this,function(J){S.isMouseDown&&null!=S.panningManager&&null!=S.graphHandler.first&&(S.graphHandler.suspend(),null!=S.graphHandler.hint&&(S.graphHandler.hint.style.visibility="hidden"),G.style.backgroundColor="light-dark(#fefefe, #000000)",G.style.cursor="copy",S.panningManager.stop(),S.autoScroll=!1,mxEvent.consume(J))}),
-mxUtils.bind(this,function(J){S.isMouseDown&&null!=S.panningManager&&null!=S.graphHandler&&(G.style.backgroundColor="",G.style.cursor="default",this.sidebar.showTooltips=!0,S.panningManager.stop(),S.graphHandler.reset(),S.isMouseDown=!1,S.autoScroll=!0,N(J),mxEvent.consume(J))}));mxEvent.addListener(G,"mouseleave",mxUtils.bind(this,function(J){S.isMouseDown&&null!=S.graphHandler.first&&(S.graphHandler.resume(),null!=S.graphHandler.hint&&(S.graphHandler.hint.style.visibility="visible"),G.style.backgroundColor=
-"",G.style.cursor="",S.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(J){G.style.backgroundColor="light-dark(#fefefe, #000000)";J.dataTransfer.dropEffect="copy";G.style.cursor="copy";this.sidebar.hideTooltip();J.stopPropagation();J.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(J){G.style.cursor="";G.style.backgroundColor="";0<J.dataTransfer.files.length&&this.importFiles(J.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,
-function(K,m,t,D,M,L,O,P,U){if(null!=K&&"image/"==m.substring(0,6))K="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(K),K=[new mxCell("",new mxGeometry(0,0,M,L),K)],K[0].vertex=!0,z(K,new mxRectangle(0,0,M,L),J,mxEvent.isAltDown(J)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<k.length&&(B.parentNode.removeChild(B),B=null);else{var V=!1,X=mxUtils.bind(this,function(W,Y){null!=W&&"application/pdf"==
-Y&&(Y=Editor.extractGraphModelFromPdf(W),null!=Y&&0<Y.length&&(W=Y));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var Z=JSON.parse(mxUtils.getTextContent(W.documentElement));I(Z,G);k=k.concat(Z);v(J);this.spinner.stop();V=!0}catch(ca){}else if("mxfile"==W.documentElement.nodeName)try{var aa=W.documentElement.getElementsByTagName("diagram");for(Z=0;Z<aa.length;Z++){var fa=this.stringToCells(Editor.getDiagramNodeXml(aa[Z])),ea=this.editor.graph.getBoundingBoxFromGeometry(fa);
-null!=ea&&z(fa,new mxRectangle(0,0,ea.width,ea.height),J)}V=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=B&&null!=B.parentNode&&0<k.length&&(B.parentNode.removeChild(B),B=null)});null!=U&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(U,function(W){X(W,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,O)&&null!=U?this.isExternalDataComms()?
-this.parseFile(U,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?X(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):X(K,m)}}));J.stopPropagation();J.preventDefault()})),mxEvent.addListener(G,"dragleave",function(J){G.style.cursor="";G.style.backgroundColor=
-"";J.stopPropagation();J.preventDefault()}));R=R.cloneNode(!1);R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("edit"));C.insertBefore(R,C.firstChild);mxEvent.addListener(R,"click",l);l=R.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));C.insertBefore(l,C.firstChild);mxEvent.addListener(l,"click",N);".scratchpad"==d.title&&(this.addSelectionToScratchpad=N);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||
-(l=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),l.className="geLibraryButton",C.insertBefore(l,C.firstChild))}n.appendChild(C);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(d,k){for(var l=0;l<d.length;l++)try{var n=d[l],x=n.data;if(null!=x){x="data:"==x.substring(0,5)?this.convertDataUri(x):x;var A="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(A+="aspect=fixed;");A=A+"image="+x+";";
-null!=n.style&&(A+=n.style);k.appendChild(this.sidebar.createVertexTemplate(A,n.w,n.h,"",n.title||"",!1,null,!0))}else if(null!=n.xml){var B=this.stringToCells("<"==n.xml.charAt(0)?n.xml:Graph.decompress(n.xml)),I=0==B.length?mxResources.get("drawingEmpty"):null!=n.title?n.title:"";k.appendChild(this.sidebar.createVertexTemplateFromCells(B,n.w,n.h,I,!0,null,!0))}}catch(G){I=null!=G.message?mxResources.get("error")+": "+G.message:String(G),A=this.sidebar.createVertexTemplateFromCells(null,n.w,n.h,
-I,!0,null,!0),k.appendChild(A)}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,k,l,n,x,A,B){d=new ImageDialog(this,d,k,l,n,
-x,A,B);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,k,l,n,x,A){var B=localStorage.getItem(k);d=new TextareaDialog(this,d,null!=B?JSON.stringify(JSON.parse(B),null,2):"",mxUtils.bind(this,function(I){if(null!=I)try{if(null!=A&&A(I),I==B)this.hideDialog();else{if(0<I.length){var G=JSON.parse(I);localStorage.setItem(k,JSON.stringify(G))}else localStorage.removeItem(k);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(C){this.handleError(C)}}),
-null,mxResources.get("close"),null,null,null,!0,null,null,x,l,n);this.showDialog(d.container,660,480,!0,!1,null,null,null,new mxRectangle(0,0,null!=l&&2<l.length?500:440,280));d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,k,l,n){d=null!=d?d:mxUtils.bind(this,function(x,A,B,I){A||(x=new ChangePageSetup(this,n?B:null,x),x.ignoreColor=!n,null!=I&&n&&(x.shadowVisible=I),this.editor.graph.model.execute(x))});d=new BackgroundImageDialog(this,d,k,l,n);this.showDialog(d.container,400,
-n?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,k,l,n,x){d=new LibraryDialog(this,d,k,l,n,x);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(A){A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var k=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&
-k.refresh()}));return k};EditorUi.prototype.handleError=function(d,k,l,n,x,A,B){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},G=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{B||EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO"),"1"!=urlParams.test&&!B||null==window.console||console.error("EditorUi.handleError:",d)}catch(S){}if(null!=
-G||null!=k){B=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var C=mxResources.get("ok"),R=null;k=null!=k?k:mxResources.get("error");if(null!=G){null!=G.retry&&(C=mxResources.get("cancel"),R=function(){I();G.retry()});if(404==G.code||404==G.status||403==G.code){B=403==G.code?null!=G.message?mxUtils.htmlEntities(G.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?
-" ("+this.drive.user.email+")":""),!1);var T=null!=x?null:null!=A?A:window.location.hash;if(null!=T&&("#G"==T.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==T.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==G.code||404==G.status)){T="#U"==T.substring(0,2)?T.substring(45,T.lastIndexOf("%26ex")):T.substring(2);this.showError(k,
-B,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+T);null!=n&&n()}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function S(){N.innerText="";for(var J=0;J<Q.length;J++){var K=document.createElement("option");mxUtils.write(K,Q[J].displayName);K.value=J;N.appendChild(K);K=document.createElement("option");K.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(K,"<"+Q[J].email+">");K.setAttribute("disabled","disabled");
-N.appendChild(K)}K=document.createElement("option");mxUtils.write(K,mxResources.get("addAccount"));K.value=Q.length;N.appendChild(K)}var Q=this.drive.getUsersList(),v=document.createElement("div"),z=document.createElement("div");z.style.marginBottom="6px";mxUtils.write(z,mxResources.get("changeUser")+": ");v.appendChild(z);var N=document.createElement("select");N.style.width="100%";S();mxEvent.addListener(N,"change",mxUtils.bind(this,function(){var J=N.value,K=Q.length!=J;K&&this.drive.setUser(Q[J]);
-this.drive.authorize(K,mxUtils.bind(this,function(){K||(Q=this.drive.getUsersList(),S())}),mxUtils.bind(this,function(m){this.handleError(m)}),!0)}));v.appendChild(N);v=new CustomDialog(this,v,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(v.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=G.message?B=""==G.message&&null!=G.name?mxUtils.htmlEntities(G.name,!1):
-mxUtils.htmlEntities(G.message,!1):null!=G.response&&null!=G.response.error?B=mxUtils.htmlEntities(G.response.error,!1):"undefined"!==typeof window.App&&(G.code==App.ERROR_TIMEOUT?B=mxUtils.htmlEntities(mxResources.get("timeout"),!1):G.code==App.ERROR_BUSY?B=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof G&&0<G.length&&(B=mxUtils.htmlEntities(G,!1)))}x=d=null;null!=G&&null!=G.helpLink?(d=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(G.helpLink)})):
-null!=G&&null!=G.ownerEmail?(d=mxResources.get("contactOwner"),B+=mxUtils.htmlEntities(" ("+d+": "+G.ownerEmail+")",!1),x=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(G.ownerEmail))})):null!=G&&null!=G.alternateAction&&(d=G.alternateAction.label,x=G.alternateAction.funct);this.showError(k,B,C,l,R,null,null,d,x,null,null,null,n?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(d,k,l){d=new ErrorDialog(this,null,d,mxResources.get("ok"),k);this.showDialog(d.container,
-l||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,k,l,n,x,A){d=null!=d?d:"";var B=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){B();null!=k&&k()},function(){B();null!=l&&l()},n,x,null,null,null,null,I);this.showDialog(d.container,340,46+I,!0,A);d.init()};EditorUi.prototype.showBanner=function(d,k,l,n,x,A,B,I,G){A=!1;if(!(this.bannerShowing||this["hideBanner"+
-d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){B=null!=B?B:"translate(-50%,120%)";I=null!=I?I:"translate(-50%,0%)";var C=document.createElement("div");C.className="geBtn gePrimaryBtn geBanner"+(x?" geSmallBanner":"");C.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(C.style,"transform",B);mxUtils.setPrefixedStyle(C.style,"transition","all 1000ms ease");null!=G&&mxUtils.setPrefixedStyle(C.style,"transform-origin",G);G=G=document.createElement("img");
-G.setAttribute("src",Editor.crossImage);G.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));G.setAttribute("border","0");x||(A=document.createElement("img"),A.setAttribute("src",IMAGE_PATH+"/logo.png"),A.setAttribute("border","0"),A.setAttribute("align","absmiddle"),A.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",C.appendChild(A),G.style.cssText=(x?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",
-C.appendChild(G));mxUtils.write(C,k);document.body.appendChild(C);this.bannerShowing=!0;x&&(G.className="geLibraryButton",C.appendChild(G));k=document.createElement("div");k.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var R=document.createElement("input");R.setAttribute("type","checkbox");R.setAttribute("id","geDoNotShowAgainCheckbox");R.style.marginRight="6px";if(!n){k.appendChild(R);var T=document.createElement("label");
-T.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(T,mxResources.get("doNotShowAgain"));k.appendChild(T);C.style.paddingBottom=x?"16px":"30px";C.appendChild(k)}var S=mxUtils.bind(this,function(){null!=C.parentNode&&(C.parentNode.removeChild(C),this.bannerShowing=!1,R.checked||n)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=G&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(v){mxEvent.consume(v);
-S()}));var Q=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform",B);window.setTimeout(mxUtils.bind(this,function(){S()}),1E3)});mxEvent.addListener(C,"click",mxUtils.bind(this,function(v){var z=mxEvent.getSource(v);z!=R&&z!=T?(null!=l&&l(),S(),mxEvent.consume(v)):Q()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform",I)}),500);window.setTimeout(Q,x?5E3:3E4);A=!0}return A};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=
-new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=function(d,k,l,n){d=d.toDataURL("image/"+l);if(null!=d&&6<d.length)null!=k&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(k))),0<n&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,k,l,n,x){var A="jpeg"==l?"jpg":l;n=this.getBaseFilename(n)+
-(null!=k?".drawio":"")+"."+A;d=this.createImageDataUri(d,k,l,x);this.saveData(n,A,d.substring(d.lastIndexOf(",")+1),"image/"+l,!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(d,k){d=new TextareaDialog(this,d,k,null,null,mxResources.get("close"));
-this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,k,l,n,x,A){"text/xml"!=l||/(\.drawio)$/i.test(k)||/(\.xml)$/i.test(k)||/(\.svg)$/i.test(k)||/(\.html)$/i.test(k)||(k=k+"."+(null!=A?A:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=n?this.base64ToBlob(d,l):new Blob([d],{type:l}),navigator.msSaveOrOpenBlob(d,k);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==
-l?mxUtils.popup(d,!0):(l.document.write(d),l.document.close(),l.document.execCommand("SaveAs",!0,k),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(k+":",d):this.openInNewWindow(d,l,n);else{var B=document.createElement("a");A=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof B.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var I=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
-A=65==(I?parseInt(I[2],10):!1)?!1:A}if(A||this.isOffline()){B.href=URL.createObjectURL(n?this.base64ToBlob(d,l):new Blob([d],{type:l}));A?B.download=k:B.setAttribute("target","_blank");document.body.appendChild(B);try{window.setTimeout(function(){URL.revokeObjectURL(B.href)},2E4),B.click(),B.parentNode.removeChild(B)}catch(G){}}else this.createEchoRequest(d,k,l,n,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,k,l,n,x,A){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,
-d+(null!=l?"&mime="+l:"")+(null!=x?"&format="+x:"")+(null!=A?"&base64="+A:"")+(null!=k?"&filename="+encodeURIComponent(k):"")+(n?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(d,k,l,n,x,A,B,I,G){A=null!=A?A:!1;B=null!=B?B:"vsdx"!=x&&(!mxClient.IS_IOS||!navigator.standalone);var C=mxUtils.bind(this,function(T,S,Q,v){try{if("_blank"==S)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(d,l,n);else if(null!=l&&"text/html"==l.substring(0,9)){var z=new EmbedDialog(this,d);this.showDialog(z.container,
-450,240,!0,!0);z.init()}else{var N=window.open("about:blank");null==N?mxUtils.popup(d,!0):(N.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),N.document.close())}else if(S==App.MODE_DEVICE||"download"==S)this.doSaveLocalFile(d,T,l,n,null,I);else if(null!=T&&0<T.length){var J=mxUtils.bind(this,function(K){try{this.exportFile(d,T,l,n,S,K)}catch(m){this.handleError(m)}});null!=v?J(v):this.pickFolder(S,J)}}catch(K){this.handleError(K)}});x=[];A||x.push(App.MODE_BROWSER);B||x.push("_blank");
-var R=new SaveDialog(this,k,mxUtils.bind(this,function(T,S,Q){C(T.value,S,T,Q);this.hideDialog(null,null,R.container)}),x,d,l,n,G);this.showDialog(R.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));R.init()};EditorUi.prototype.openInNewWindow=function(d,k,l){var n=window.open("about:blank");if(null==n||null==n.document)mxUtils.popup(d,!0);else{var x="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==k){var A=mxUtils.parseXml(d).documentElement.style.backgroundColor;
-""!=A&&(x="background: "+A+";")}x='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+x+'">';"image/svg+xml"!=k||mxClient.IS_SVG?"image/svg+xml"!=k||l?(A=l?d:btoa(unescape(encodeURIComponent(d))),n.document.write(x+'<img style="max-width:100%;" src="data:'+k+";base64,"+A+'"/></body></html>')):n.document.write(x+d+"</body></html>"):n.document.write(x+"<pre>"+mxUtils.htmlEntities(d,!1)+"</pre></body></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(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var k=d(mxUtils.bind(this,function(n){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
+title:d.getTitle(),mode:d.getMode()})}catch(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=d)try{d.close()}catch(H){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=n?this.fileLoaded(n)||A():A()});g?d():(null!=I.fallbackFileData&&(I.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,
+function(){this.hideDialog();var H=new LocalFile(this,I.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(H)})}),this.handleError(I,mxResources.get("errorLoadingFile"),d,!0,null,null,!0))}else A();return x};EditorUi.prototype.getHashValueForPages=function(d,g){var l=0,n=new mxGraphModel,x=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var A=0;A<d.length;A++){this.updatePageRoot(d[A]);var B=d[A].node.cloneNode(!1);B.removeAttribute("name");n.root=d[A].root;
+var I=x.encode(n);this.editor.graph.saveViewState(d[A].viewState,I,!0);I.removeAttribute("pageWidth");I.removeAttribute("pageHeight");B.appendChild(I);null!=g&&(g.eltCount+=B.getElementsByTagName("*").length,g.nodeCount+=B.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(B,function(H,D,S,U){return!U||"mxGeometry"!=H.nodeName&&"mxPoint"!=H.nodeName||"x"!=D&&"y"!=D&&"width"!=D&&"height"!=D?U&&"mxCell"==H.nodeName&&"previous"==D?null:S:Math.round(S)},g)<<0}return l};EditorUi.prototype.hashValue=
+function(d,g,l){var n=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(n^=this.hashValue(d.nodeName,g,l));if(null!=d.attributes){null!=l&&(l.attrCount+=d.attributes.length);for(var x=0;x<d.attributes.length;x++){var A=d.attributes[x].name,B=null!=g?g(d,A,d.attributes[x].value,!0):d.attributes[x].value;null!=B&&(n^=this.hashValue(A,g,l)+this.hashValue(B,g,l))}}if(null!=d.childNodes)for(x=0;x<d.childNodes.length;x++)n=
+(n<<5)-n+this.hashValue(d.childNodes[x],g,l)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=l&&(l.byteCount+=d.length);for(x=0;x<d.length;x++)g=(g<<5)-g+d.charCodeAt(x)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,l,n,x,A,B){};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(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){if(!Editor.defaultCompressed)for(var g=0;g<d.length;g++)null!=d[g].xml&&"<"!=d[g].xml.charAt(0)&&(d[g].xml=mxUtils.trim(Graph.decompress(d[g].xml)));g=mxUtils.createXmlDocument();var l=g.createElement("mxlibrary");
+mxUtils.setTextContent(l,JSON.stringify(d,null,2));g.appendChild(l);return mxUtils.getXml(g,"\n")};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var g=this.sidebar.palettes[d];if(null!=g){for(var l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);delete this.sidebar.palettes[d]}};
+EditorUi.prototype.repositionLibrary=function(d,g){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=d||!g){null==d&&(g=this.sidebar.palettes["L.scratchpad"],null==g&&(g=this.sidebar.palettes.search),null!=g&&(d=g[g.length-1].nextSibling));d=null!=d?d:l.firstChild.nextSibling.nextSibling;g=l.lastChild;var n=g.previousSibling;l.insertBefore(g,d);l.insertBefore(n,g)}};EditorUi.prototype.loadLibrary=function(d,g){var l=mxUtils.parseXml(d.getData());if("mxlibrary"==
+l.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(d,n,l.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.showSearchWindow=function(d,g){var l=d?"findReplace":"find",n=l+"Window";
+if(null==this[n]){var x="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,A=d?x?330:300:240;this[n]=new FindWindow(this,document.body.offsetWidth-(A+20),100,A,d?x?304:288:180,d);this[n].window.addListener("show",function(){this.fireEvent(new mxEventObject(l))});this[n].window.addListener("hide",function(){this.fireEvent(new mxEventObject(l))});this[n].window.setVisible(!0)}else null==g&&this[n].window.setVisible(!this[n].window.isVisible());null!=g&&(this[n].doSearch(g),
+this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(d,g,l,n){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());var x=null;if(d.constructor!=StorageLibrary||".scratchpad"!=d.title){null==this.openLibraries&&(this.openLibraries=[]);for(var A=0;A<this.openLibraries.length;A++)if(this.openLibraries[A].file.getHash()==d.getHash()){mxUtils.remove(this.openLibraries[A],this.openLibraries);break}x={file:d,images:g,title:l,expand:n};this.openLibraries.push(x)}else this.scratchpad=
+d;A=this.sidebar.palettes[d.getHash()];A=null!=A?A[A.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var B=null,I=mxUtils.bind(this,function(J,K){0==J.length&&d.isEditable()?(null==B&&(B=document.createElement("div"),B.className="geDropTarget",mxUtils.write(B,mxResources.get("dragElementsHere"))),K.appendChild(B)):this.addLibraryEntries(J,K)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==l&&(l=d.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));
+var H=this.sidebar.addPalette(d.getHash(),l,null!=n?n:!0,mxUtils.bind(this,function(J){I(g,J)}));null!=x&&(x.div=H);this.repositionLibrary(A,"L.scratchpad"!=d.getHash());n=H.parentNode.previousSibling;l=n.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=d.title&&n.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);var D=document.createElement("div");D.style.backgroundColor="inherit";n.style.position="relative";var S=document.createElement("img");S.className="geLibraryButton";S.setAttribute("src",
+Editor.crossImage);S.setAttribute("title",mxResources.get("close"));var U=null;if(".scratchpad"!=d.title||this.closableScratchpad)D.appendChild(S),mxEvent.addListener(S,"click",mxUtils.bind(this,function(J){if(!mxEvent.isConsumed(J)){var K=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(d)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,K,mxResources.get("cancel"),mxResources.get("discardChanges")):K();mxEvent.consume(J)}}));if(d.isEditable()){var R=
+this.editor.graph,P=null;l=mxUtils.bind(this,function(J){this.showLibraryDialog(d.getTitle(),H,g,d,d.getMode());mxEvent.consume(J)});var v=mxUtils.bind(this,function(J){d.setModified(!0);d.isAutosave()?(null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P),P=S.cloneNode(!1),P.setAttribute("src",Editor.spinImage),P.setAttribute("title",mxResources.get("saving")),P.style.cursor="default",P.style.marginRight="2px",P.style.marginTop="-2px",D.insertBefore(P,D.firstChild),this.saveLibrary(d.getTitle(),
+g,d,d.getMode(),!0,!0,function(){null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P)})):null==U&&(U=S.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),D.insertBefore(U,D.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(K){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==U||d.isModified()||(U.parentNode.removeChild(U),U=null)});mxEvent.consume(K)})))}),y=mxUtils.bind(this,function(J,
+K,m,t){J=R.cloneCells(mxUtils.sortCells(R.model.getTopmostCells(J)));for(var C=0;C<J.length;C++){var N=R.getCellGeometry(J[C]);null!=N&&N.translate(-K.x,-K.y)}H.appendChild(this.sidebar.createVertexTemplateFromCells(J,K.width,K.height,t||"",!0,null,!1));J=mxUtils.getXml(this.editor.graph.encodeCells(J));Editor.defaultCompressed&&(J=Graph.compress(J));K={xml:J,w:K.width,h:K.height};null!=t&&(K.title=t);g.push(K);v(m);null!=B&&null!=B.parentNode&&0<g.length&&(B.parentNode.removeChild(B),B=null)}),L=
+mxUtils.bind(this,function(J){if(R.isSelectionEmpty())R.getRubberband().isActive()?(R.getRubberband().execute(J),R.getRubberband().reset()):null!=J&&mxEvent.getSource(J).classList.contains("geLibraryButton")&&this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var K=R.getSelectionCells(),m=R.view.getBounds(K);if(null!=m&&0<m.width&&0<m.height){var t=R.view.scale;m.x/=t;m.y/=t;m.width/=t;m.height/=t;m.x-=R.view.translate.x;m.y-=R.view.translate.y;
+y(K,m)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(J)});mxEvent.addGestureListeners(H,function(){},mxUtils.bind(this,function(J){R.isMouseDown&&null!=R.panningManager&&null!=R.graphHandler.first&&(R.graphHandler.suspend(),null!=R.graphHandler.hint&&(R.graphHandler.hint.style.visibility="hidden"),H.style.backgroundColor="light-dark(#fefefe, #000000)",H.style.cursor="copy",R.panningManager.stop(),R.autoScroll=!1,mxEvent.consume(J))}),
+mxUtils.bind(this,function(J){R.isMouseDown&&null!=R.panningManager&&null!=R.graphHandler&&(H.style.backgroundColor="",H.style.cursor="default",this.sidebar.showTooltips=!0,R.panningManager.stop(),R.graphHandler.reset(),R.isMouseDown=!1,R.autoScroll=!0,L(J),mxEvent.consume(J))}));mxEvent.addListener(H,"mouseleave",mxUtils.bind(this,function(J){R.isMouseDown&&null!=R.graphHandler.first&&(R.graphHandler.resume(),null!=R.graphHandler.hint&&(R.graphHandler.hint.style.visibility="visible"),H.style.backgroundColor=
+"",H.style.cursor="",R.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(J){H.style.backgroundColor="light-dark(#fefefe, #000000)";J.dataTransfer.dropEffect="copy";H.style.cursor="copy";this.sidebar.hideTooltip();J.stopPropagation();J.preventDefault()})),mxEvent.addListener(H,"drop",mxUtils.bind(this,function(J){H.style.cursor="";H.style.backgroundColor="";0<J.dataTransfer.files.length&&this.importFiles(J.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,
+function(K,m,t,C,N,M,O,Q,T){if(null!=K&&"image/"==m.substring(0,6))K="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(K),K=[new mxCell("",new mxGeometry(0,0,N,M),K)],K[0].vertex=!0,y(K,new mxRectangle(0,0,N,M),J,mxEvent.isAltDown(J)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<g.length&&(B.parentNode.removeChild(B),B=null);else{var V=!1,X=mxUtils.bind(this,function(W,Y){null!=W&&"application/pdf"==
+Y&&(Y=Editor.extractGraphModelFromPdf(W),null!=Y&&0<Y.length&&(W=Y));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var Z=JSON.parse(mxUtils.getTextContent(W.documentElement));I(Z,H);g=g.concat(Z);v(J);this.spinner.stop();V=!0}catch(ca){}else if("mxfile"==W.documentElement.nodeName)try{var aa=W.documentElement.getElementsByTagName("diagram");for(Z=0;Z<aa.length;Z++){var ja=this.stringToCells(Editor.getDiagramNodeXml(aa[Z])),ea=this.editor.graph.getBoundingBoxFromGeometry(ja);
+null!=ea&&y(ja,new mxRectangle(0,0,ea.width,ea.height),J)}V=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=B&&null!=B.parentNode&&0<g.length&&(B.parentNode.removeChild(B),B=null)});null!=T&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(T,function(W){X(W,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,O)&&null!=T?this.isExternalDataComms()?
+this.parseFile(T,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?X(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):X(K,m)}}));J.stopPropagation();J.preventDefault()})),mxEvent.addListener(H,"dragleave",function(J){H.style.cursor="";H.style.backgroundColor=
+"";J.stopPropagation();J.preventDefault()}));S=S.cloneNode(!1);S.setAttribute("src",Editor.editImage);S.setAttribute("title",mxResources.get("edit"));D.insertBefore(S,D.firstChild);mxEvent.addListener(S,"click",l);l=S.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));D.insertBefore(l,D.firstChild);mxEvent.addListener(l,"click",L);".scratchpad"==d.title&&(this.addSelectionToScratchpad=L);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||
+(l=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),l.className="geLibraryButton",D.insertBefore(l,D.firstChild))}n.appendChild(D);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var l=0;l<d.length;l++)try{var n=d[l],x=n.data;if(null!=x){x="data:"==x.substring(0,5)?this.convertDataUri(x):x;var A="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(A+="aspect=fixed;");A=A+"image="+x+";";
+null!=n.style&&(A+=n.style);g.appendChild(this.sidebar.createVertexTemplate(A,n.w,n.h,"",n.title||"",!1,null,!0))}else if(null!=n.xml){var B=this.stringToCells("<"==n.xml.charAt(0)?n.xml:Graph.decompress(n.xml)),I=0==B.length?mxResources.get("drawingEmpty"):null!=n.title?n.title:"";g.appendChild(this.sidebar.createVertexTemplateFromCells(B,n.w,n.h,I,!0,null,!0))}}catch(H){I=null!=H.message?mxResources.get("error")+": "+H.message:String(H),A=this.sidebar.createVertexTemplateFromCells(null,n.w,n.h,
+I,!0,null,!0),g.appendChild(A)}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,g,l,n,x,A,B){d=new ImageDialog(this,d,g,l,n,
+x,A,B);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,g,l,n,x,A){var B=localStorage.getItem(g);d=new TextareaDialog(this,d,null!=B?JSON.stringify(JSON.parse(B),null,2):"",mxUtils.bind(this,function(I){if(null!=I)try{if(null!=A&&A(I),I==B)this.hideDialog();else{if(0<I.length){var H=JSON.parse(I);localStorage.setItem(g,JSON.stringify(H))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(D){this.handleError(D)}}),
+null,mxResources.get("close"),null,null,null,!0,null,null,x,l,n);this.showDialog(d.container,660,480,!0,!1,null,null,null,new mxRectangle(0,0,null!=l&&2<l.length?500:440,280));d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g,l,n){d=null!=d?d:mxUtils.bind(this,function(x,A,B,I){A||(x=new ChangePageSetup(this,n?B:null,x),x.ignoreColor=!n,null!=I&&n&&(x.shadowVisible=I),this.editor.graph.model.execute(x))});d=new BackgroundImageDialog(this,d,g,l,n);this.showDialog(d.container,400,
+n?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,l,n,x){d=new LibraryDialog(this,d,g,l,n,x);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(A){A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var g=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&
+g.refresh()}));return g};EditorUi.prototype.handleError=function(d,g,l,n,x,A,B){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},H=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{B||EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO"),"1"!=urlParams.test&&!B||null==window.console||console.error("EditorUi.handleError:",d)}catch(R){}if(null!=
+H||null!=g){B=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var D=mxResources.get("ok"),S=null;g=null!=g?g:mxResources.get("error");if(null!=H){null!=H.retry&&(D=mxResources.get("cancel"),S=function(){I();H.retry()});if(404==H.code||404==H.status||403==H.code){B=403==H.code?null!=H.message?mxUtils.htmlEntities(H.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?
+" ("+this.drive.user.email+")":""),!1);var U=null!=x?null:null!=A?A:window.location.hash;if(null!=U&&("#G"==U.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==U.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==H.code||404==H.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(g,
+B,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);null!=n&&n()}),S,mxResources.get("changeUser"),mxUtils.bind(this,function(){function R(){L.innerText="";for(var J=0;J<P.length;J++){var K=document.createElement("option");mxUtils.write(K,P[J].displayName);K.value=J;L.appendChild(K);K=document.createElement("option");K.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(K,"<"+P[J].email+">");K.setAttribute("disabled","disabled");
+L.appendChild(K)}K=document.createElement("option");mxUtils.write(K,mxResources.get("addAccount"));K.value=P.length;L.appendChild(K)}var P=this.drive.getUsersList(),v=document.createElement("div"),y=document.createElement("div");y.style.marginBottom="6px";mxUtils.write(y,mxResources.get("changeUser")+": ");v.appendChild(y);var L=document.createElement("select");L.style.width="100%";R();mxEvent.addListener(L,"change",mxUtils.bind(this,function(){var J=L.value,K=P.length!=J;K&&this.drive.setUser(P[J]);
+this.drive.authorize(K,mxUtils.bind(this,function(){K||(P=this.drive.getUsersList(),R())}),mxUtils.bind(this,function(m){this.handleError(m)}),!0)}));v.appendChild(L);v=new CustomDialog(this,v,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(v.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=H.message?B=""==H.message&&null!=H.name?mxUtils.htmlEntities(H.name,!1):
+mxUtils.htmlEntities(H.message,!1):null!=H.response&&null!=H.response.error?B=mxUtils.htmlEntities(H.response.error,!1):"undefined"!==typeof window.App&&(H.code==App.ERROR_TIMEOUT?B=mxUtils.htmlEntities(mxResources.get("timeout"),!1):H.code==App.ERROR_BUSY?B=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof H&&0<H.length&&(B=mxUtils.htmlEntities(H,!1)))}x=d=null;null!=H&&null!=H.helpLink?(d=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(H.helpLink)})):
+null!=H&&null!=H.ownerEmail?(d=mxResources.get("contactOwner"),B+=mxUtils.htmlEntities(" ("+d+": "+H.ownerEmail+")",!1),x=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(H.ownerEmail))})):null!=H&&null!=H.alternateAction&&(d=H.alternateAction.label,x=H.alternateAction.funct);this.showError(g,B,D,l,S,null,null,d,x,null,null,null,n?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(d,g,l){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,
+l||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,l,n,x,A){d=null!=d?d:"";var B=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){B();null!=g&&g()},function(){B();null!=l&&l()},n,x,null,null,null,null,I);this.showDialog(d.container,340,46+I,!0,A);d.init()};EditorUi.prototype.showBanner=function(d,g,l,n,x,A,B,I,H){A=!1;if(!(this.bannerShowing||this["hideBanner"+
+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){B=null!=B?B:"translate(-50%,120%)";I=null!=I?I:"translate(-50%,0%)";var D=document.createElement("div");D.className="geBtn gePrimaryBtn geBanner"+(x?" geSmallBanner":"");D.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(D.style,"transform",B);mxUtils.setPrefixedStyle(D.style,"transition","all 1000ms ease");null!=H&&mxUtils.setPrefixedStyle(D.style,"transform-origin",H);H=H=document.createElement("img");
+H.setAttribute("src",Editor.crossImage);H.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));H.setAttribute("border","0");x||(A=document.createElement("img"),A.setAttribute("src",IMAGE_PATH+"/logo.png"),A.setAttribute("border","0"),A.setAttribute("align","absmiddle"),A.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",D.appendChild(A),H.style.cssText=(x?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",
+D.appendChild(H));mxUtils.write(D,g);document.body.appendChild(D);this.bannerShowing=!0;x&&(H.className="geLibraryButton",D.appendChild(H));g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var S=document.createElement("input");S.setAttribute("type","checkbox");S.setAttribute("id","geDoNotShowAgainCheckbox");S.style.marginRight="6px";if(!n){g.appendChild(S);var U=document.createElement("label");
+U.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(U,mxResources.get("doNotShowAgain"));g.appendChild(U);D.style.paddingBottom=x?"16px":"30px";D.appendChild(g)}var R=mxUtils.bind(this,function(){null!=D.parentNode&&(D.parentNode.removeChild(D),this.bannerShowing=!1,S.checked||n)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=H&&mxEvent.addListener(H,"click",mxUtils.bind(this,function(v){mxEvent.consume(v);
+R()}));var P=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(D.style,"transform",B);window.setTimeout(mxUtils.bind(this,function(){R()}),1E3)});mxEvent.addListener(D,"click",mxUtils.bind(this,function(v){var y=mxEvent.getSource(v);y!=S&&y!=U?(null!=l&&l(),R(),mxEvent.consume(v)):P()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(D.style,"transform",I)}),500);window.setTimeout(P,x?5E3:3E4);A=!0}return A};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=
+new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=function(d,g,l,n){d=d.toDataURL("image/"+l);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(g))),0<n&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,l,n,x){var A="jpeg"==l?"jpg":l;n=this.getBaseFilename(n)+
+(null!=g?".drawio":"")+"."+A;d=this.createImageDataUri(d,g,l,x);this.saveData(n,A,d.substring(d.lastIndexOf(",")+1),"image/"+l,!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(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));
+this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,l,n,x,A){"text/xml"!=l||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=A?A:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=n?this.base64ToBlob(d,l):new Blob([d],{type:l}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==
+l?mxUtils.popup(d,!0):(l.document.write(d),l.document.close(),l.document.execCommand("SaveAs",!0,g),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,l,n);else{var B=document.createElement("a");A=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof B.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var I=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
+A=65==(I?parseInt(I[2],10):!1)?!1:A}if(A||this.isOffline()){B.href=URL.createObjectURL(n?this.base64ToBlob(d,l):new Blob([d],{type:l}));A?B.download=g:B.setAttribute("target","_blank");document.body.appendChild(B);try{window.setTimeout(function(){URL.revokeObjectURL(B.href)},2E4),B.click(),B.parentNode.removeChild(B)}catch(H){}}else this.createEchoRequest(d,g,l,n,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,l,n,x,A){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,
+d+(null!=l?"&mime="+l:"")+(null!=x?"&format="+x:"")+(null!=A?"&base64="+A:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(d,g,l,n,x,A,B,I,H){A=null!=A?A:!1;B=null!=B?B:"vsdx"!=x&&(!mxClient.IS_IOS||!navigator.standalone);var D=mxUtils.bind(this,function(U,R,P,v){try{if("_blank"==R)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(d,l,n);else if(null!=l&&"text/html"==l.substring(0,9)){var y=new EmbedDialog(this,d);this.showDialog(y.container,
+450,240,!0,!0);y.init()}else{var L=window.open("about:blank");null==L?mxUtils.popup(d,!0):(L.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),L.document.close())}else if(R==App.MODE_DEVICE||"download"==R)this.doSaveLocalFile(d,U,l,n,null,I);else if(null!=U&&0<U.length){var J=mxUtils.bind(this,function(K){try{this.exportFile(d,U,l,n,R,K)}catch(m){this.handleError(m)}});null!=v?J(v):this.pickFolder(R,J)}}catch(K){this.handleError(K)}});x=[];A||x.push(App.MODE_BROWSER);B||x.push("_blank");
+var S=new SaveDialog(this,g,mxUtils.bind(this,function(U,R,P){D(U.value,R,U,P);this.hideDialog(null,null,S.container)}),x,d,l,n,H);this.showDialog(S.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));S.init()};EditorUi.prototype.openInNewWindow=function(d,g,l){var n=window.open("about:blank");if(null==n||null==n.document)mxUtils.popup(d,!0);else{var x="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var A=mxUtils.parseXml(d).documentElement.style.backgroundColor;
+""!=A&&(x="background: "+A+";")}x='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+x+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||l?(A=l?d:btoa(unescape(encodeURIComponent(d))),n.document.write(x+'<img style="max-width:100%;" src="data:'+g+";base64,"+A+'"/></body></html>')):n.document.write(x+d+"</body></html>"):n.document.write(x+"<pre>"+mxUtils.htmlEntities(d,!1)+"</pre></body></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(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=d(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.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,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 x=k.getBoundingClientRect();this.tagsDialog.style.left=x.left+"px";
+"#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 x=g.getBoundingClientRect();this.tagsDialog.style.left=x.left+"px";
this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=x.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();
-k.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&&
+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.editor.isExportToCanvas()&&
this.isChromelessImageExportEnabled()){this.exportDialog=null;var l=d(mxUtils.bind(this,function(n){var x=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",x);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)x.apply(this);else{this.exportDialog=document.createElement("div");var A=l.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,80);this.exportDialog.style.left=A.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
this.chromelessToolbar.offsetHeight+4+"px";A=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=A.zIndex;var B=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});B.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",x);this.editor.exportToCanvas(mxUtils.bind(this,function(I){B.stop();this.exportDialog.style.width=
-"auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var G=this.createImageDataUri(I,null,"png");I=document.createElement("img");I.style.maxWidth="140px";I.style.maxHeight="140px";I.style.cursor="pointer";I.style.backgroundColor="white";I.setAttribute("title",mxResources.get("openInNewWindow"));I.setAttribute("border","0");I.setAttribute("src",G);this.exportDialog.appendChild(I);mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.openInNewWindow(G.substring(G.indexOf(",")+
-1),"image/png",!0);x.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(I){B.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(I)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,k,l,n,x,A){this.isLocalFileSave()?this.saveLocalFile(l,
-d,n,x,k,A):this.saveRequest(d,k,mxUtils.bind(this,function(B,I){return this.createEchoRequest(l,B,n,x,k,I)}),l,x,n)};EditorUi.prototype.saveRequest=function(d,k,l,n,x,A,B){B=null!=B?B:!mxClient.IS_IOS||!navigator.standalone;var I=mxUtils.bind(this,function(C,R,T,S){if("_blank"==R||null!=C&&0<C.length){var Q=l("_blank"==R?null:C,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");null!=Q&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?Q.simulate(document,"_blank"):(T=mxUtils.bind(this,
-function(v){A=null!=A?A:"pdf"==k?"application/pdf":"image/"+k;if(null!=n)try{this.exportFile(n,C,A,!0,R,v)}catch(z){this.handleError(z)}else this.spinner.spin(document.body,mxResources.get("saving"))&&Q.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=Q.getStatus()&&299>=Q.getStatus())try{this.exportFile(Q.getText(),C,A,!0,R,v)}catch(z){this.handleError(z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}))}),
-null!=S?T(S):this.pickFolder(R,T)))}});x=[App.MODE_BROWSER];B||x.push("_blank");var G=new SaveDialog(this,d,mxUtils.bind(this,function(C,R,T){I(C.value,R,C,T);this.hideDialog(null,null,G.container)}),x,null,"application/pdf");this.showDialog(G.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));G.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,k,
-l,n,x,A){};EditorUi.prototype.getServiceForName=function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,k,l){k(null)};EditorUi.prototype.exportSvg=function(d,k,l,n,x,A,B,I,G,C,R,T,S,Q){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(W){Editor.addRetryToError(W,mxUtils.bind(this,function(){this.exportSvg(d,k,l,n,x,A,B,I,G,C,R,T,S,Q)}));this.handleError(W)})))try{var v=this.editor.graph.isSelectionEmpty();
-l=null!=l?l:v;var z=k?null:this.editor.graph.background;z==mxConstants.NONE&&(z=null);null==z&&0==k&&(z=this.editor.graph.shapeBackgroundColor);var N=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var J=mxUtils.lightDarkColorSupported,K=mxUtils.preferDarkColor;if("light"==R||"dark"==R)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==R;var m=Graph.addFont,t={};Graph.addFont=function(W,Y,Z,aa){m.call(this,
-W,Y,Z,t)};var D=this.editor.graph.createSvgImageExport(x),M=D.drawCellState;D.drawCellState=function(W,Y){null!=W&&Graph.processFontStyle(W.style);M.apply(this,arguments)};var L=this.editor.graph.getSvg(z,d,B,I,null,l,null,D,"blank"==C?"_blank":"self"==C?"_top":null,null,!S,R,T);mxUtils.lightDarkColorSupported=J;mxUtils.preferDarkColor=K;this.editor.graph.addForeignObjectWarning=N;n&&this.editor.graph.addSvgShadow(L);var O=this.getBaseFilename()+(x?".drawio":"")+".svg";Q=null!=Q?Q:mxUtils.bind(this,
-function(W){this.isLocalFileSave()||W.length<=MAX_REQUEST_SIZE?this.saveData(O,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});var P=mxUtils.bind(this,function(W){this.spinner.stop();x&&W.setAttribute("content",this.getFileData(!0,null,null,null,l,G,null,null,null,null,null,d,B));Q(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(W))});this.editor.graph.mathEnabled&&
-this.editor.addMathCss(L);var U=mxUtils.bind(this,function(W){Editor.replaceSvgDataUris&&A&&EditorUi.embedSvgImages(W);Editor.foreignObjectImages&&S?this.replaceAlternateContent(W,R,P):P(W)}),V=Graph.customFontElements;Graph.customFontElements=t;var X=mxUtils.bind(this,function(W){Graph.customFontElements=V;Graph.addFont=m;A&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(W,U,this.thumbImageCache)):U(W)});S?this.embedFonts(L,
-X):(this.editor.addFontCss(L),X(L))}catch(W){this.handleError(W)}};EditorUi.prototype.replaceAlternateContent=function(d,k,l){function n(T,S,Q,v,z){var N=mxUtils.createElementNs(d.ownerDocument,mxConstants.NS_SVG,"image");N.setAttribute("x",S);N.setAttribute("y",Q+.5);N.setAttribute("width",v.width);N.setAttribute("height",v.height);null==N.setAttributeNS?N.setAttribute("xlink:href",z):N.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",z);T.replaceChild(N,T.lastChild);I()}function x(){if(B<R.length)R[B++](x)}
-var A="";k=d.getElementsByTagName("style");for(var B=0;B<k.length;B++)A+=k[B].innerHTML;k=d.getElementsByTagName("switch");counter=k.length;var I=mxUtils.bind(this,function(){counter--;0==counter&&l(d)}),G={},C={},R=[];for(B=0;B<k.length;B++)mxUtils.bind(this,function(T){var S=T.getElementsByTagName("div");if(0<S.length)try{var Q=S[0].cloneNode(!0),v=parseInt(Q.style.marginLeft),z=parseInt(Q.style.paddingTop),N=Q.getElementsByTagName("div")[1],J=S=!1,K=Q.style.alignItems,m=Q.style.justifyContent;
-if(null!=Q.style.writingMode){var t=Q.style.writingMode;J="vertical-"==t.substring(0,9);S="-rl"==t.substring(t.length-3)}var D=!J&&"1px"==Q.style.width||J&&"1px"==Q.style.height;if(!J&&"1px"==Q.style.height||J&&"1px"==Q.style.width)Q.style.alignItems=J&&S?"unsafe flex-end":"unsafe flex-start";D&&(Q.style.justifyContent="unsafe flex-start");Q.style.paddingTop="";Q.style.marginLeft="";var M=Q.outerHTML,L=G[M];null==L&&(Q.style.position="absolute",Q.style.visibility="hidden",document.body.appendChild(Q),
-t=1,t="1px"==Q.style.width?N.offsetWidth:parseInt(Q.style.width),D=1,D="1px"==Q.style.height?N.offsetHeight:parseInt(Q.style.height),document.body.removeChild(Q),L=new mxRectangle(v,z,t,D),G[M]=L);"1px"==Q.style.height&&("unsafe center"==K?z-=L.height/2:"unsafe flex-end"==K&&(z-=L.height));if("1px"==Q.style.width)if(!J&&"unsafe center"==m||J&&"unsafe center"==K)v-=L.width/2;else if(!J&&"unsafe flex-end"==m||J&&(!S&&"unsafe flex-end"==K||S&&"unsafe flex-start"==K))v-=L.width;L=new mxRectangle(v,z,
-L.width,L.height+parseInt(N.style.fontSize)/4);R.push(mxUtils.bind(this,function(O){var P=C[M];null==P?Graph.htmlToPng(M,L.width,L.height,mxUtils.bind(this,function(U){n(T,v,z,L,U);C[M]=U;O()}),A):(n(T,v,z,L,P),O())}))}catch(O){I()}else I()})(k[B]);0==counter&&l(d);B=0;x()};EditorUi.prototype.addRadiobox=function(d,k,l,n,x,A,B){return this.addCheckbox(d,l,n,x,A,B,!0,k)};EditorUi.prototype.addCheckbox=function(d,k,l,n,x,A,B,I){A=null!=A?A:!0;var G=document.createElement("input");G.style.marginRight=
-"8px";G.style.marginTop="16px";G.setAttribute("type",B?"radio":"checkbox");B="geCheckbox-"+Editor.guid();G.id=B;null!=I&&G.setAttribute("name",I);l&&(G.setAttribute("checked","checked"),G.defaultChecked=!0);n&&G.setAttribute("disabled","disabled");A&&(d.appendChild(G),l=document.createElement("label"),mxUtils.write(l,k),l.setAttribute("for",B),d.appendChild(l),x||mxUtils.br(d));return G};EditorUi.prototype.addEditButton=function(d,k){var l=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);
+"auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var H=this.createImageDataUri(I,null,"png");I=document.createElement("img");I.style.maxWidth="140px";I.style.maxHeight="140px";I.style.cursor="pointer";I.style.backgroundColor="white";I.setAttribute("title",mxResources.get("openInNewWindow"));I.setAttribute("border","0");I.setAttribute("src",H);this.exportDialog.appendChild(I);mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.openInNewWindow(H.substring(H.indexOf(",")+
+1),"image/png",!0);x.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(I){B.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(I)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,l,n,x,A){this.isLocalFileSave()?this.saveLocalFile(l,
+d,n,x,g,A):this.saveRequest(d,g,mxUtils.bind(this,function(B,I){return this.createEchoRequest(l,B,n,x,g,I)}),l,x,n)};EditorUi.prototype.saveRequest=function(d,g,l,n,x,A,B){B=null!=B?B:!mxClient.IS_IOS||!navigator.standalone;var I=mxUtils.bind(this,function(D,S,U,R){if("_blank"==S||null!=D&&0<D.length){var P=l("_blank"==S?null:D,S==App.MODE_DEVICE||"download"==S||null==S||"_blank"==S?"0":"1");null!=P&&(S==App.MODE_DEVICE||"download"==S||"_blank"==S?P.simulate(document,"_blank"):(U=mxUtils.bind(this,
+function(v){A=null!=A?A:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,D,A,!0,S,v)}catch(y){this.handleError(y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&P.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=P.getStatus()&&299>=P.getStatus())try{this.exportFile(P.getText(),D,A,!0,S,v)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}))}),
+null!=R?U(R):this.pickFolder(S,U)))}});x=[App.MODE_BROWSER];B||x.push("_blank");var H=new SaveDialog(this,d,mxUtils.bind(this,function(D,S,U){I(D.value,S,D,U);this.hideDialog(null,null,H.container)}),x,null,"application/pdf");this.showDialog(H.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));H.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,
+l,n,x,A){};EditorUi.prototype.getServiceForName=function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,g,l){g(null)};EditorUi.prototype.exportSvg=function(d,g,l,n,x,A,B,I,H,D,S,U,R,P){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(W){Editor.addRetryToError(W,mxUtils.bind(this,function(){this.exportSvg(d,g,l,n,x,A,B,I,H,D,S,U,R,P)}));this.handleError(W)})))try{var v=this.editor.graph.isSelectionEmpty();
+l=null!=l?l:v;var y=g?null:this.editor.graph.background;y==mxConstants.NONE&&(y=null);null==y&&0==g&&(y=this.editor.graph.shapeBackgroundColor);var L=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var J=mxUtils.lightDarkColorSupported,K=mxUtils.preferDarkColor;if("light"==S||"dark"==S)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==S;var m=Graph.addFont,t={};Graph.addFont=function(W,Y,Z,aa){m.call(this,
+W,Y,Z,t)};var C=this.editor.graph.createSvgImageExport(x),N=C.drawCellState;C.drawCellState=function(W,Y){null!=W&&Graph.processFontStyle(W.style);N.apply(this,arguments)};var M=this.editor.graph.getSvg(y,d,B,I,null,l,null,C,"blank"==D?"_blank":"self"==D?"_top":null,null,!R,S,U);mxUtils.lightDarkColorSupported=J;mxUtils.preferDarkColor=K;this.editor.graph.addForeignObjectWarning=L;n&&this.editor.graph.addSvgShadow(M);var O=this.getBaseFilename()+(x?".drawio":"")+".svg";P=null!=P?P:mxUtils.bind(this,
+function(W){this.isLocalFileSave()||W.length<=MAX_REQUEST_SIZE?this.saveData(O,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});var Q=mxUtils.bind(this,function(W){this.spinner.stop();x&&W.setAttribute("content",this.getFileData(!0,null,null,null,l,H,null,null,null,null,null,d,B));P(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(W))});this.editor.graph.mathEnabled&&
+this.editor.addMathCss(M);var T=mxUtils.bind(this,function(W){Editor.replaceSvgDataUris&&A&&EditorUi.embedSvgImages(W);Editor.foreignObjectImages&&R?this.replaceAlternateContent(W,S,Q):Q(W)}),V=Graph.customFontElements;Graph.customFontElements=t;var X=mxUtils.bind(this,function(W){Graph.customFontElements=V;Graph.addFont=m;A&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(W,T,this.thumbImageCache)):T(W)});R?this.embedFonts(M,
+X):(this.editor.addFontCss(M),X(M))}catch(W){this.handleError(W)}};EditorUi.prototype.replaceAlternateContent=function(d,g,l){function n(U,R,P,v,y){var L=mxUtils.createElementNs(d.ownerDocument,mxConstants.NS_SVG,"image");L.setAttribute("x",R);L.setAttribute("y",P+.5);L.setAttribute("width",v.width);L.setAttribute("height",v.height);null==L.setAttributeNS?L.setAttribute("xlink:href",y):L.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",y);U.replaceChild(L,U.lastChild);I()}function x(){if(B<S.length)S[B++](x)}
+var A="";g=d.getElementsByTagName("style");for(var B=0;B<g.length;B++)A+=g[B].innerHTML;g=d.getElementsByTagName("switch");counter=g.length;var I=mxUtils.bind(this,function(){counter--;0==counter&&l(d)}),H={},D={},S=[];for(B=0;B<g.length;B++)mxUtils.bind(this,function(U){var R=U.getElementsByTagName("div");if(0<R.length)try{var P=R[0].cloneNode(!0),v=parseInt(P.style.marginLeft),y=parseInt(P.style.paddingTop),L=P.getElementsByTagName("div")[1],J=R=!1,K=P.style.alignItems,m=P.style.justifyContent;
+if(null!=P.style.writingMode){var t=P.style.writingMode;J="vertical-"==t.substring(0,9);R="-rl"==t.substring(t.length-3)}var C=!J&&"1px"==P.style.width||J&&"1px"==P.style.height;if(!J&&"1px"==P.style.height||J&&"1px"==P.style.width)P.style.alignItems=J&&R?"unsafe flex-end":"unsafe flex-start";C&&(P.style.justifyContent="unsafe flex-start");P.style.paddingTop="";P.style.marginLeft="";var N=P.outerHTML,M=H[N];null==M&&(P.style.position="absolute",P.style.visibility="hidden",document.body.appendChild(P),
+t=1,t="1px"==P.style.width?L.offsetWidth:parseInt(P.style.width),C=1,C="1px"==P.style.height?L.offsetHeight:parseInt(P.style.height),document.body.removeChild(P),M=new mxRectangle(v,y,t,C),H[N]=M);"1px"==P.style.height&&("unsafe center"==K?y-=M.height/2:"unsafe flex-end"==K&&(y-=M.height));if("1px"==P.style.width)if(!J&&"unsafe center"==m||J&&"unsafe center"==K)v-=M.width/2;else if(!J&&"unsafe flex-end"==m||J&&(!R&&"unsafe flex-end"==K||R&&"unsafe flex-start"==K))v-=M.width;M=new mxRectangle(v,y,
+M.width,M.height+parseInt(L.style.fontSize)/4);S.push(mxUtils.bind(this,function(O){var Q=D[N];null==Q?Graph.htmlToPng(N,M.width,M.height,mxUtils.bind(this,function(T){n(U,v,y,M,T);D[N]=T;O()}),A):(n(U,v,y,M,Q),O())}))}catch(O){I()}else I()})(g[B]);0==counter&&l(d);B=0;x()};EditorUi.prototype.addRadiobox=function(d,g,l,n,x,A,B){return this.addCheckbox(d,l,n,x,A,B,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,l,n,x,A,B,I){A=null!=A?A:!0;var H=document.createElement("input");H.style.marginRight=
+"8px";H.style.marginTop="16px";H.setAttribute("type",B?"radio":"checkbox");B="geCheckbox-"+Editor.guid();H.id=B;null!=I&&H.setAttribute("name",I);l&&(H.setAttribute("checked","checked"),H.defaultChecked=!0);n&&H.setAttribute("disabled","disabled");A&&(d.appendChild(H),l=document.createElement("label"),mxUtils.write(l,g),l.setAttribute("for",B),d.appendChild(l),x||mxUtils.br(d));return H};EditorUi.prototype.addEditButton=function(d,g){var l=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);
l.style.marginLeft="24px";var n=this.getCurrentFile(),x="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(x=window.location.href);var A=document.createElement("select");A.style.maxWidth="200px";A.style.width="auto";A.style.marginLeft="8px";A.style.marginRight="10px";A.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));A.appendChild(n);var B=document.createElement("option");B.setAttribute("value",
-"custom");mxUtils.write(B,mxResources.get("custom")+"...");A.appendChild(B);d.appendChild(A);mxEvent.addListener(A,"change",mxUtils.bind(this,function(){if("custom"==A.value){var I=new FilenameDialog(this,x,mxResources.get("ok"),function(G){null!=G?(x=G,B.setAttribute("title",G)):(A.value="blank",B.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){A.value="blank"});this.showDialog(I.container,300,80,!0,!1);I.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,
-function(){l.checked&&(null==k||k.checked)?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return l.checked?"blank"===A.value?"_blank":x:null},getEditInput:function(){return l},getEditSelect:function(){return A}}};EditorUi.prototype.addLinkSection=function(d,k){function l(){var I=document.createElement("div");I.style.width="100%";I.style.height="100%";I.style.boxSizing="border-box";null!=A&&A!=mxConstants.NONE?(I.style.border="1px solid black",
+"custom");mxUtils.write(B,mxResources.get("custom")+"...");A.appendChild(B);d.appendChild(A);mxEvent.addListener(A,"change",mxUtils.bind(this,function(){if("custom"==A.value){var I=new FilenameDialog(this,x,mxResources.get("ok"),function(H){null!=H?(x=H,B.setAttribute("title",H)):(A.value="blank",B.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){A.value="blank"});this.showDialog(I.container,300,80,!0,!1);I.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,
+function(){l.checked&&(null==g||g.checked)?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return l.checked?"blank"===A.value?"_blank":x:null},getEditInput:function(){return l},getEditSelect:function(){return A}}};EditorUi.prototype.addLinkSection=function(d,g){function l(){var I=document.createElement("div");I.style.width="100%";I.style.height="100%";I.style.boxSizing="border-box";null!=A&&A!=mxConstants.NONE?(I.style.border="1px solid black",
I.style.backgroundColor=A):(I.style.backgroundPosition="center center",I.style.backgroundRepeat="no-repeat",I.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");B.innerText="";B.appendChild(I)}mxUtils.write(d,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 x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));
-n.appendChild(x);x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("openInNewWindow"));n.appendChild(x);x=document.createElement("option");x.setAttribute("value","self");mxUtils.write(x,mxResources.get("openInThisWindow"));n.appendChild(x);k&&(k=document.createElement("option"),k.setAttribute("value","frame"),mxUtils.write(k,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(k));d.appendChild(n);mxUtils.write(d,mxResources.get("borderColor")+
-":");var A="#0000ff",B=null;B=mxUtils.button("",mxUtils.bind(this,function(I){this.pickColor(A||"none",function(G){A=G;l()});mxEvent.consume(I)}));l();B.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";B.style.marginLeft="4px";B.style.height="22px";B.style.width="22px";B.style.position="relative";B.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";B.className="geColorBtn";d.appendChild(B);mxUtils.br(d);return{getColor:function(){return A},getTarget:function(){return n.value},
-focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(d,k,l,n,x,A){A=null!=A?A:[];l&&(A.push("lightbox=1"),"auto"!=d&&A.push("target="+d),null!=k&&k!=mxConstants.NONE&&A.push("highlight="+("#"==k.charAt(0)?k.substring(1):k)),null!=n&&0<n.length&&A.push("edit="+encodeURIComponent(n)),x&&A.push("layers=1"),this.editor.graph.foldingEnabled&&A.push("nav=1"));return A};EditorUi.prototype.createLink=function(d,k,l,n,x,A,B,I,G,C,R,T,S){var Q=this.getCurrentFile();G=this.createUrlParameters(d,
-k,n,x,A,G);d=!0;null!=B?l="#U"+encodeURIComponent(B):I||null==Q||""==Q.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+Q.getHash(),d=!1);d&&null!=Q&&null!=Q.getTitle()&&Q.getTitle()!=this.defaultFilename&&G.push("title="+encodeURIComponent(Q.getTitle()));C&&1<l.length&&(G.push("open="+l.substring(1)),l="");R&&null!=this.currentPage&&G.push("page-id="+this.currentPage.getId());T&&G.push("transparent=1");
-null!=S&&G.push("dark="+S);return(n&&(null!=B||null!=Q&&Q.getMode()!=App.MODE_GITHUB&&Q.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<G.length?"?"+G.join("&"):"")+l};EditorUi.prototype.createHtml=function(d,k,l,n,x,A,B,I,G,C,R,T,S){this.getBasenames();var Q={};""!=x&&x!=mxConstants.NONE&&(Q.highlight=x);"auto"!==n&&(Q.target=n);C||(Q.lightbox=
-!1);Q.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(Q.zoom=l/100);l=[];B&&(l.push("pages"),Q.resize=!0,null!=this.pages&&null!=this.currentPage&&(Q.page=mxUtils.indexOf(this.pages,this.currentPage)));k&&(l.push("zoom"),Q.resize=!0);I&&l.push("layers");G&&l.push("tags");null!=S&&(Q["dark-mode"]=S);0<l.length&&(C&&l.push("lightbox"),Q.toolbar=l.join(" "));null!=R&&0<R.length&&(Q.edit=R);null!=d?Q.url=d:Q.xml=this.getFileData(!0,null,null,null,null,!B);k='<div class="mxgraph" style="'+
-(A?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Q))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";T(k,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"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(d,k,l,n){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("html"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(A);var B=document.createElement("div");B.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var I=document.createElement("input");I.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
-I.setAttribute("value","url");I.setAttribute("type","radio");I.setAttribute("name","type-embedhtmldialog");A=I.cloneNode(!0);A.setAttribute("value","copy");B.appendChild(A);var G=document.createElement("span");mxUtils.write(G,mxResources.get("includeCopyOfMyDiagram"));B.appendChild(G);mxUtils.br(B);B.appendChild(I);G=document.createElement("span");mxUtils.write(G,mxResources.get("publicDiagramUrl"));B.appendChild(G);var C=this.getCurrentFile();null==l&&null!=C&&C.constructor==window.DriveFile&&(G=
-document.createElement("a"),G.style.paddingLeft="12px",G.style.color="gray",G.style.cursor="pointer",mxUtils.write(G,mxResources.get("share")),B.appendChild(G),mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(C.getId(),C)})));A.setAttribute("checked","checked");null==l&&I.setAttribute("disabled","disabled");x.appendChild(B);B=380;var R=this.addLinkSection(x),T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";
-T.style.marginTop="16px";G=document.createElement("option");G.setAttribute("value","light");mxUtils.write(G,mxResources.get("light"));T.appendChild(G);G=document.createElement("option");G.setAttribute("value","dark");mxUtils.write(G,mxResources.get("dark"));T.appendChild(G);G=document.createElement("option");G.setAttribute("value","auto");mxUtils.write(G,mxResources.get("automatic"));G.setAttribute("selected","selected");T.appendChild(G);G.setAttribute("selected","selected");mxUtils.write(x,mxResources.get("appearance")+
-":");x.appendChild(T);mxUtils.br(x);B+=26;var S=this.addCheckbox(x,mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.marginRight="16px";Q.style.width="60px";Q.style.marginLeft="4px";Q.style.marginRight="12px";Q.value="100%";x.appendChild(Q);var v=this.addCheckbox(x,mxResources.get("fit"),!0);G=null!=this.pages&&1<this.pages.length;var z=z=this.addCheckbox(x,mxResources.get("allPages"),G,!G),N=this.addCheckbox(x,mxResources.get("layers"),
+n.appendChild(x);x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("openInNewWindow"));n.appendChild(x);x=document.createElement("option");x.setAttribute("value","self");mxUtils.write(x,mxResources.get("openInThisWindow"));n.appendChild(x);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));d.appendChild(n);mxUtils.write(d,mxResources.get("borderColor")+
+":");var A="#0000ff",B=null;B=mxUtils.button("",mxUtils.bind(this,function(I){this.pickColor(A||"none",function(H){A=H;l()});mxEvent.consume(I)}));l();B.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";B.style.marginLeft="4px";B.style.height="22px";B.style.width="22px";B.style.position="relative";B.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";B.className="geColorBtn";d.appendChild(B);mxUtils.br(d);return{getColor:function(){return A},getTarget:function(){return n.value},
+focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,l,n,x,A){A=null!=A?A:[];l&&(A.push("lightbox=1"),"auto"!=d&&A.push("target="+d),null!=g&&g!=mxConstants.NONE&&A.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=n&&0<n.length&&A.push("edit="+encodeURIComponent(n)),x&&A.push("layers=1"),this.editor.graph.foldingEnabled&&A.push("nav=1"));return A};EditorUi.prototype.createLink=function(d,g,l,n,x,A,B,I,H,D,S,U,R){var P=this.getCurrentFile();H=this.createUrlParameters(d,
+g,n,x,A,H);d=!0;null!=B?l="#U"+encodeURIComponent(B):I||null==P||""==P.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+P.getHash(),d=!1);d&&null!=P&&null!=P.getTitle()&&P.getTitle()!=this.defaultFilename&&H.push("title="+encodeURIComponent(P.getTitle()));D&&1<l.length&&(H.push("open="+l.substring(1)),l="");S&&null!=this.currentPage&&H.push("page-id="+this.currentPage.getId());U&&H.push("transparent=1");
+null!=R&&H.push("dark="+R);return(n&&(null!=B||null!=P&&P.getMode()!=App.MODE_GITHUB&&P.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<H.length?"?"+H.join("&"):"")+l};EditorUi.prototype.createHtml=function(d,g,l,n,x,A,B,I,H,D,S,U,R){this.getBasenames();var P={};""!=x&&x!=mxConstants.NONE&&(P.highlight=x);"auto"!==n&&(P.target=n);D||(P.lightbox=
+!1);P.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(P.zoom=l/100);l=[];B&&(l.push("pages"),P.resize=!0,null!=this.pages&&null!=this.currentPage&&(P.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(l.push("zoom"),P.resize=!0);I&&l.push("layers");H&&l.push("tags");null!=R&&(P["dark-mode"]=R);0<l.length&&(D&&l.push("lightbox"),P.toolbar=l.join(" "));null!=S&&0<S.length&&(P.edit=S);null!=d?P.url=d:P.xml=this.getFileData(!0,null,null,null,null,!B);g='<div class="mxgraph" style="'+
+(A?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(P))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";U(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"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(d,g,l,n){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("html"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(A);var B=document.createElement("div");B.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var I=document.createElement("input");I.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
+I.setAttribute("value","url");I.setAttribute("type","radio");I.setAttribute("name","type-embedhtmldialog");A=I.cloneNode(!0);A.setAttribute("value","copy");B.appendChild(A);var H=document.createElement("span");mxUtils.write(H,mxResources.get("includeCopyOfMyDiagram"));B.appendChild(H);mxUtils.br(B);B.appendChild(I);H=document.createElement("span");mxUtils.write(H,mxResources.get("publicDiagramUrl"));B.appendChild(H);var D=this.getCurrentFile();null==l&&null!=D&&D.constructor==window.DriveFile&&(H=
+document.createElement("a"),H.style.paddingLeft="12px",H.style.color="gray",H.style.cursor="pointer",mxUtils.write(H,mxResources.get("share")),B.appendChild(H),mxEvent.addListener(H,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(D.getId(),D)})));A.setAttribute("checked","checked");null==l&&I.setAttribute("disabled","disabled");x.appendChild(B);B=380;var S=this.addLinkSection(x),U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";
+U.style.marginTop="16px";H=document.createElement("option");H.setAttribute("value","light");mxUtils.write(H,mxResources.get("light"));U.appendChild(H);H=document.createElement("option");H.setAttribute("value","dark");mxUtils.write(H,mxResources.get("dark"));U.appendChild(H);H=document.createElement("option");H.setAttribute("value","auto");mxUtils.write(H,mxResources.get("automatic"));H.setAttribute("selected","selected");U.appendChild(H);H.setAttribute("selected","selected");mxUtils.write(x,mxResources.get("appearance")+
+":");x.appendChild(U);mxUtils.br(x);B+=26;var R=this.addCheckbox(x,mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value="100%";x.appendChild(P);var v=this.addCheckbox(x,mxResources.get("fit"),!0);H=null!=this.pages&&1<this.pages.length;var y=y=this.addCheckbox(x,mxResources.get("allPages"),H,!H),L=this.addCheckbox(x,mxResources.get("layers"),
!0),J=this.addCheckbox(x,mxResources.get("tags"),!0),K=this.addCheckbox(x,mxResources.get("lightbox"),!0),m=null;if(EditorUi.enableHtmlEditOption){m=this.addEditButton(x,K);var t=m.getEditInput();t.style.marginBottom="16px";B+=50;mxEvent.addListener(K,"change",function(){K.checked?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled");t.checked&&K.checked?m.getEditSelect().removeAttribute("disabled"):m.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,x,mxUtils.bind(this,
-function(){n(I.checked?l:null,S.checked,Q.value,R.getTarget(),R.getColor(),v.checked,z.checked,N.checked,J.checked,K.checked,null!=m?m.getLink():null,null!=T?T.value:null)}),null,d,k);this.showDialog(d.container,340,B,!0,!0);A.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,k,l,n,x,A,B,I,G,C,R,T){var S=document.createElement("div");S.style.whiteSpace="nowrap";var Q=document.createElement("h3");mxUtils.write(Q,d||mxResources.get("publish"));Q.style.width="100%";Q.style.textAlign="center";
-Q.style.marginTop="2px";Q.style.marginBottom="20px";S.appendChild(Q);var v=document.createElement("select");d=30;v.className="geBtn";v.style.marginBottom="8px";v.style.marginLeft="0px";v.style.width="100%";v.style.boxSizing="border-box";if(null==I||""==I.getHash())x=null!=x?x:"https://www.drawio.com/doc/faq/publish-diagram-as-link",Q=document.createElement("option"),mxUtils.write(Q,mxResources.get("makeCopy")),Q.setAttribute("value","copy"),v.appendChild(Q);Q=document.createElement("option");mxUtils.write(Q,
-mxResources.get("authorizationRequired"));Q.setAttribute("value","auth");v.appendChild(Q);null!=I&&""!=I.getHash()||Q.setAttribute("disabled","disabled");I=document.createElement("option");I.setAttribute("value","public");v.appendChild(I);null!=B?(mxUtils.write(I,mxResources.get("publicDiagramUrl")),I.setAttribute("title",B),v.value="public"):(mxUtils.write(I,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),I.setAttribute("disabled","disabled"));S.appendChild(v);
-mxUtils.br(S);v.focus();var z=null,N=null;if(null!=k||null!=l)d+=30,mxUtils.write(S,mxResources.get("width")+":"),z=document.createElement("input"),z.setAttribute("type","text"),z.style.marginRight="16px",z.style.width="50px",z.style.marginLeft="6px",z.style.marginRight="16px",z.style.marginBottom="10px",z.value="100%",S.appendChild(z),mxUtils.write(S,mxResources.get("height")+":"),N=document.createElement("input"),N.setAttribute("type","text"),N.style.width="50px",N.style.marginLeft="6px",N.style.marginBottom=
-"10px",N.value=l+"px",S.appendChild(N),mxUtils.br(S);var J=this.addLinkSection(S,n),K=C?this.addCheckbox(S,mxResources.get("transparentBackground"),!1):null;null!=K&&(d+=20);var m=document.createElement("select");m.className="geBtn";m.style.marginTop="8px";k=document.createElement("option");mxUtils.write(k,mxResources.get("allPages"));k.setAttribute("value","allPages");m.appendChild(k);k=document.createElement("option");mxUtils.write(k,mxResources.get("currentPage"));k.setAttribute("value","currentPage");
-m.appendChild(k);var t=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(d+=30,k=null!=this.currentPage?this.currentPage.getName():"",16<k.length&&(k=k.substring(0,16)+"..."),T&&(mxUtils.write(S,mxResources.get("pages")+":"),S.appendChild(m),mxUtils.br(S),d+=30),t=this.addCheckbox(S,mxResources.get("selectedPage")+": "+k));var D=document.createElement("select");D.style.maxWidth="260px";D.style.marginLeft="8px";D.style.marginTop="16px";T=document.createElement("option");
-T.setAttribute("value","0");mxUtils.write(T,mxResources.get("light"));D.appendChild(T);T=document.createElement("option");T.setAttribute("value","1");mxUtils.write(T,mxResources.get("dark"));D.appendChild(T);T=document.createElement("option");T.setAttribute("value","auto");mxUtils.write(T,mxResources.get("automatic"));T.setAttribute("selected","selected");D.appendChild(T);R&&(mxUtils.write(S,mxResources.get("appearance")+":"),S.appendChild(D),mxUtils.br(S),d+=30);var M=this.addCheckbox(S,mxResources.get("lightbox"),
-!0,null,null,!n),L=this.addEditButton(S,M),O=L.getEditInput();n&&(O.style.marginLeft=M.style.marginLeft,M.style.display="none",d-=20);var P=this.addCheckbox(S,mxResources.get("layers"),!0);P.style.marginLeft=O.style.marginLeft;P.style.marginTop="8px";var U=this.addCheckbox(S,mxResources.get("tags"),!0);U.style.marginLeft=O.style.marginLeft;U.style.marginBottom="16px";U.style.marginTop="16px";mxEvent.addListener(M,"change",function(){M.checked?(P.removeAttribute("disabled"),O.removeAttribute("disabled"),
-U.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));O.checked&&M.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,S,mxUtils.bind(this,function(){G(J.getTarget(),J.getColor(),null==t?!1:t.checked,M.checked,L.getLink(),P.checked,null!=z?z.value:null,null!=N?N.value:null,U.checked,v.value,null!=K?K.checked:!1,D.value,"allPages"==
-m.value)}),null,mxResources.get("create"),x,A);this.showDialog(n.container,340,296+d,!0,!0);null!=z?(z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?z.select():document.execCommand("selectAll",!1,null)):null==v.parentNode;J.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,k,l,n,x){var A=document.createElement("div");A.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("image"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
-(x?"10":"4")+"px";A.appendChild(B);if(x){mxUtils.write(A,mxResources.get("zoom")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.style.marginRight="12px";I.value=this.lastExportZoom||"100%";A.appendChild(I);mxUtils.write(A,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";A.appendChild(G);mxUtils.br(A)}var C=this.addCheckbox(A,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),R=n?null:this.addCheckbox(A,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);B=this.editor.graph;var T=n?null:this.addCheckbox(A,mxResources.get("transparentBackground"),B.background==mxConstants.NONE||null==B.background);null!=T&&(T.style.marginBottom="16px");d=new CustomDialog(this,A,mxUtils.bind(this,function(){var S=
-parseInt(I.value)/100||1,Q=parseInt(G.value)||0;l(!C.checked,null!=R?R.checked:!1,null!=T?T.checked:!1,S,Q)}),null,d,k);this.showDialog(d.container,300,(x?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,k,l,n,x,A,B,I,G){B=null!=B?B:Editor.defaultIncludeDiagram;var C=document.createElement("div");C.style.whiteSpace="nowrap";var R=this.editor.graph,T="jpeg"==I||"webp"==I?220:320,S=document.createElement("h3");mxUtils.write(S,d);S.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-C.appendChild(S);mxUtils.write(C,mxResources.get("zoom")+":");var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.marginRight="16px";Q.style.width="60px";Q.style.marginLeft="4px";Q.style.marginRight="12px";Q.value=this.lastExportZoom||"100%";C.appendChild(Q);mxUtils.write(C,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||
-"0";C.appendChild(v);mxUtils.br(C);var z=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,R.isSelectionEmpty()),N=document.createElement("input");N.style.marginTop="16px";N.style.marginRight="8px";N.style.marginLeft="24px";N.setAttribute("disabled","disabled");N.setAttribute("type","checkbox");var J=document.createElement("select");J.style.marginTop="16px";J.style.marginLeft="8px";d=["selectionOnly","diagram","page"];for(S=0;S<d.length;S++)if(!R.isSelectionEmpty()||"selectionOnly"!=d[S]){var K=
-document.createElement("option");mxUtils.write(K,mxResources.get(d[S]));K.setAttribute("value",d[S]);J.appendChild(K)}G?(mxUtils.write(C,mxResources.get("size")+":"),C.appendChild(J),mxUtils.br(C),T+=26,mxEvent.addListener(J,"change",function(){"selectionOnly"==J.value&&(z.checked=!0)})):A&&(C.appendChild(N),mxUtils.write(C,mxResources.get("crop")),mxUtils.br(C),T+=30,mxEvent.addListener(z,"change",function(){z.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?
-G&&(z.style.display="none",z.nextSibling.style.display="none",z.nextSibling.nextSibling.style.display="none",T-=30):(J.value="diagram",N.setAttribute("checked","checked"),N.defaultChecked=!0,mxEvent.addListener(z,"change",function(){J.value=z.checked?"selectionOnly":"diagram"}));var m=this.addCheckbox(C,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=I&&"webp"!=I),t=document.createElement("select");t.style.maxWidth="260px";t.style.marginLeft="8px";t.style.marginTop="16px";A=document.createElement("option");
-A.setAttribute("value","light");mxUtils.write(A,mxResources.get("light"));t.appendChild(A);G=document.createElement("option");G.setAttribute("value","dark");mxUtils.write(G,mxResources.get("dark"));t.appendChild(G);"svg"==I&&mxUtils.lightDarkColorSupported?(A=document.createElement("option"),A.setAttribute("value","auto"),mxUtils.write(A,mxResources.get("automatic")),A.setAttribute("selected","selected"),t.appendChild(A)):Editor.isDarkMode()?G.setAttribute("selected","selected"):A.setAttribute("selected",
-"selected");mxUtils.write(C,mxResources.get("appearance")+":");C.appendChild(t);mxUtils.br(C);T+=26;var D=this.addCheckbox(C,mxResources.get("shadow"),R.shadowVisible),M=null;if("png"==I||"jpeg"==I||"webp"==I)M=this.addCheckbox(C,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),T+=30;R=null!=this.pages?this.pages.length:1;var L=this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram")+(1<R?":":""),B,null,null,"jpeg"!=I&&"webp"!=I),O=document.createElement("select");O.style.maxWidth=
-"260px";O.style.marginLeft="28px";"png"==I||"svg"==I?(B=function(){L.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},A=document.createElement("option"),A.setAttribute("value","allPages"),mxUtils.write(A,mxResources.get("allPages")),O.appendChild(A),A=document.createElement("option"),A.setAttribute("value","currentPage"),mxUtils.write(A,mxResources.get("currentPage")),O.appendChild(A),1<R?(L.style.marginBottom="12px",O.style.marginBottom="16px",C.appendChild(O),mxUtils.br(C),
-T+=20):L.style.marginBottom="16px",null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(L,"change",B),B()):L.style.marginBottom="16px";var P=document.createElement("input");P.style.marginBottom="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");P.id="geCheckbox-"+Editor.guid();var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");U.id="geCheckbox-"+Editor.guid();k&&(P.checked=null!=
-this.lastEmbedImages?this.lastEmbedImages:!0,C.appendChild(P),B=document.createElement("label"),mxUtils.write(B,mxResources.get("embedImages")),B.setAttribute("for",P.id),C.appendChild(B),mxUtils.br(C),U.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,C.appendChild(U),B=document.createElement("label"),mxUtils.write(B,mxResources.get("embedFonts")),B.setAttribute("for",U.id),C.appendChild(B),mxUtils.br(C),T+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft=
+function(){n(I.checked?l:null,R.checked,P.value,S.getTarget(),S.getColor(),v.checked,y.checked,L.checked,J.checked,K.checked,null!=m?m.getLink():null,null!=U?U.value:null)}),null,d,g);this.showDialog(d.container,340,B,!0,!0);A.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,l,n,x,A,B,I,H,D,S,U){var R=document.createElement("div");R.style.whiteSpace="nowrap";var P=document.createElement("h3");mxUtils.write(P,d||mxResources.get("publish"));P.style.width="100%";P.style.textAlign="center";
+P.style.marginTop="2px";P.style.marginBottom="20px";R.appendChild(P);var v=document.createElement("select");d=30;v.className="geBtn";v.style.marginBottom="8px";v.style.marginLeft="0px";v.style.width="100%";v.style.boxSizing="border-box";if(null==I||""==I.getHash())x=null!=x?x:"https://www.drawio.com/doc/faq/publish-diagram-as-link",P=document.createElement("option"),mxUtils.write(P,mxResources.get("makeCopy")),P.setAttribute("value","copy"),v.appendChild(P);P=document.createElement("option");mxUtils.write(P,
+mxResources.get("authorizationRequired"));P.setAttribute("value","auth");v.appendChild(P);null!=I&&""!=I.getHash()||P.setAttribute("disabled","disabled");I=document.createElement("option");I.setAttribute("value","public");v.appendChild(I);null!=B?(mxUtils.write(I,mxResources.get("publicDiagramUrl")),I.setAttribute("title",B),v.value="public"):(mxUtils.write(I,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),I.setAttribute("disabled","disabled"));R.appendChild(v);
+mxUtils.br(R);v.focus();var y=null,L=null;if(null!=g||null!=l)d+=30,mxUtils.write(R,mxResources.get("width")+":"),y=document.createElement("input"),y.setAttribute("type","text"),y.style.marginRight="16px",y.style.width="50px",y.style.marginLeft="6px",y.style.marginRight="16px",y.style.marginBottom="10px",y.value="100%",R.appendChild(y),mxUtils.write(R,mxResources.get("height")+":"),L=document.createElement("input"),L.setAttribute("type","text"),L.style.width="50px",L.style.marginLeft="6px",L.style.marginBottom=
+"10px",L.value=l+"px",R.appendChild(L),mxUtils.br(R);var J=this.addLinkSection(R,n),K=D?this.addCheckbox(R,mxResources.get("transparentBackground"),!1):null;null!=K&&(d+=20);var m=document.createElement("select");m.className="geBtn";m.style.marginTop="8px";g=document.createElement("option");mxUtils.write(g,mxResources.get("allPages"));g.setAttribute("value","allPages");m.appendChild(g);g=document.createElement("option");mxUtils.write(g,mxResources.get("currentPage"));g.setAttribute("value","currentPage");
+m.appendChild(g);var t=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(d+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),U&&(mxUtils.write(R,mxResources.get("pages")+":"),R.appendChild(m),mxUtils.br(R),d+=30),t=this.addCheckbox(R,mxResources.get("selectedPage")+": "+g));var C=document.createElement("select");C.style.maxWidth="260px";C.style.marginLeft="8px";C.style.marginTop="16px";U=document.createElement("option");
+U.setAttribute("value","0");mxUtils.write(U,mxResources.get("light"));C.appendChild(U);U=document.createElement("option");U.setAttribute("value","1");mxUtils.write(U,mxResources.get("dark"));C.appendChild(U);U=document.createElement("option");U.setAttribute("value","auto");mxUtils.write(U,mxResources.get("automatic"));U.setAttribute("selected","selected");C.appendChild(U);S&&(mxUtils.write(R,mxResources.get("appearance")+":"),R.appendChild(C),mxUtils.br(R),d+=30);var N=this.addCheckbox(R,mxResources.get("lightbox"),
+!0,null,null,!n),M=this.addEditButton(R,N),O=M.getEditInput();n&&(O.style.marginLeft=N.style.marginLeft,N.style.display="none",d-=20);var Q=this.addCheckbox(R,mxResources.get("layers"),!0);Q.style.marginLeft=O.style.marginLeft;Q.style.marginTop="8px";var T=this.addCheckbox(R,mxResources.get("tags"),!0);T.style.marginLeft=O.style.marginLeft;T.style.marginBottom="16px";T.style.marginTop="16px";mxEvent.addListener(N,"change",function(){N.checked?(Q.removeAttribute("disabled"),O.removeAttribute("disabled"),
+T.removeAttribute("disabled")):(Q.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));O.checked&&N.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,R,mxUtils.bind(this,function(){H(J.getTarget(),J.getColor(),null==t?!1:t.checked,N.checked,M.getLink(),Q.checked,null!=y?y.value:null,null!=L?L.value:null,T.checked,v.value,null!=K?K.checked:!1,C.value,"allPages"==
+m.value)}),null,mxResources.get("create"),x,A);this.showDialog(n.container,340,296+d,!0,!0);null!=y?(y.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?y.select():document.execCommand("selectAll",!1,null)):null==v.parentNode;J.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,l,n,x){var A=document.createElement("div");A.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("image"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
+(x?"10":"4")+"px";A.appendChild(B);if(x){mxUtils.write(A,mxResources.get("zoom")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.style.marginRight="12px";I.value=this.lastExportZoom||"100%";A.appendChild(I);mxUtils.write(A,mxResources.get("borderWidth")+":");var H=document.createElement("input");H.setAttribute("type","text");H.style.marginRight="16px";H.style.width="60px";H.style.marginLeft="4px";H.value=
+this.lastExportBorder||"0";A.appendChild(H);mxUtils.br(A)}var D=this.addCheckbox(A,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),S=n?null:this.addCheckbox(A,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);B=this.editor.graph;var U=n?null:this.addCheckbox(A,mxResources.get("transparentBackground"),B.background==mxConstants.NONE||null==B.background);null!=U&&(U.style.marginBottom="16px");d=new CustomDialog(this,A,mxUtils.bind(this,function(){var R=
+parseInt(I.value)/100||1,P=parseInt(H.value)||0;l(!D.checked,null!=S?S.checked:!1,null!=U?U.checked:!1,R,P)}),null,d,g);this.showDialog(d.container,300,(x?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,l,n,x,A,B,I,H){B=null!=B?B:Editor.defaultIncludeDiagram;var D=document.createElement("div");D.style.whiteSpace="nowrap";var S=this.editor.graph,U="jpeg"==I||"webp"==I?220:320,R=document.createElement("h3");mxUtils.write(R,d);R.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+D.appendChild(R);mxUtils.write(D,mxResources.get("zoom")+":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value=this.lastExportZoom||"100%";D.appendChild(P);mxUtils.write(D,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||
+"0";D.appendChild(v);mxUtils.br(D);var y=this.addCheckbox(D,mxResources.get("selectionOnly"),!1,S.isSelectionEmpty()),L=document.createElement("input");L.style.marginTop="16px";L.style.marginRight="8px";L.style.marginLeft="24px";L.setAttribute("disabled","disabled");L.setAttribute("type","checkbox");var J=document.createElement("select");J.style.marginTop="16px";J.style.marginLeft="8px";d=["selectionOnly","diagram","page"];for(R=0;R<d.length;R++)if(!S.isSelectionEmpty()||"selectionOnly"!=d[R]){var K=
+document.createElement("option");mxUtils.write(K,mxResources.get(d[R]));K.setAttribute("value",d[R]);J.appendChild(K)}H?(mxUtils.write(D,mxResources.get("size")+":"),D.appendChild(J),mxUtils.br(D),U+=26,mxEvent.addListener(J,"change",function(){"selectionOnly"==J.value&&(y.checked=!0)})):A&&(D.appendChild(L),mxUtils.write(D,mxResources.get("crop")),mxUtils.br(D),U+=30,mxEvent.addListener(y,"change",function(){y.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled")}));S.isSelectionEmpty()?
+H&&(y.style.display="none",y.nextSibling.style.display="none",y.nextSibling.nextSibling.style.display="none",U-=30):(J.value="diagram",L.setAttribute("checked","checked"),L.defaultChecked=!0,mxEvent.addListener(y,"change",function(){J.value=y.checked?"selectionOnly":"diagram"}));var m=this.addCheckbox(D,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=I&&"webp"!=I),t=document.createElement("select");t.style.maxWidth="260px";t.style.marginLeft="8px";t.style.marginTop="16px";A=document.createElement("option");
+A.setAttribute("value","light");mxUtils.write(A,mxResources.get("light"));t.appendChild(A);H=document.createElement("option");H.setAttribute("value","dark");mxUtils.write(H,mxResources.get("dark"));t.appendChild(H);"svg"==I&&mxUtils.lightDarkColorSupported?(A=document.createElement("option"),A.setAttribute("value","auto"),mxUtils.write(A,mxResources.get("automatic")),A.setAttribute("selected","selected"),t.appendChild(A)):Editor.isDarkMode()?H.setAttribute("selected","selected"):A.setAttribute("selected",
+"selected");mxUtils.write(D,mxResources.get("appearance")+":");D.appendChild(t);mxUtils.br(D);U+=26;var C=this.addCheckbox(D,mxResources.get("shadow"),S.shadowVisible),N=null;if("png"==I||"jpeg"==I||"webp"==I)N=this.addCheckbox(D,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),U+=30;S=null!=this.pages?this.pages.length:1;var M=this.addCheckbox(D,mxResources.get("includeCopyOfMyDiagram")+(1<S?":":""),B,null,null,"jpeg"!=I&&"webp"!=I),O=document.createElement("select");O.style.maxWidth=
+"260px";O.style.marginLeft="28px";"png"==I||"svg"==I?(B=function(){M.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},A=document.createElement("option"),A.setAttribute("value","allPages"),mxUtils.write(A,mxResources.get("allPages")),O.appendChild(A),A=document.createElement("option"),A.setAttribute("value","currentPage"),mxUtils.write(A,mxResources.get("currentPage")),O.appendChild(A),1<S?(M.style.marginBottom="12px",O.style.marginBottom="16px",D.appendChild(O),mxUtils.br(D),
+U+=20):M.style.marginBottom="16px",null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(M,"change",B),B()):M.style.marginBottom="16px";var Q=document.createElement("input");Q.style.marginBottom="16px";Q.style.marginRight="8px";Q.setAttribute("type","checkbox");Q.id="geCheckbox-"+Editor.guid();var T=document.createElement("input");T.style.marginBottom="16px";T.style.marginRight="8px";T.setAttribute("type","checkbox");T.id="geCheckbox-"+Editor.guid();g&&(Q.checked=null!=
+this.lastEmbedImages?this.lastEmbedImages:!0,D.appendChild(Q),B=document.createElement("label"),mxUtils.write(B,mxResources.get("embedImages")),B.setAttribute("for",Q.id),D.appendChild(B),mxUtils.br(D),T.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,D.appendChild(T),B=document.createElement("label"),mxUtils.write(B,mxResources.get("embedFonts")),B.setAttribute("for",T.id),D.appendChild(B),mxUtils.br(D),U+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft=
"8px";A=document.createElement("option");A.setAttribute("value","auto");mxUtils.write(A,mxResources.get("automatic"));V.appendChild(A);B=document.createElement("option");B.setAttribute("value","blank");mxUtils.write(B,mxResources.get("openInNewWindow"));V.appendChild(B);B=document.createElement("option");B.setAttribute("value","self");mxUtils.write(B,mxResources.get("openInThisWindow"));V.appendChild(B);B=document.createElement("div");mxUtils.write(B,mxResources.get("LinksLost"));B.style.margin="7px";
-B.style.display="none";"svg"==I&&(mxUtils.write(C,mxResources.get("links")+":"),C.appendChild(V),C.appendChild(B),mxUtils.br(C),mxUtils.br(C),T+=50);l=new CustomDialog(this,C,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=Q.value;this.lastEmbedImages=P.checked;this.lastEmbedFonts=U.checked;this.lastEmbedInclude=O.value;x(Q.value,m.checked,!z.checked,D.checked,L.checked,P.checked&&k,v.value,N.checked,("png"==I||"svg"==I)&&"currentPage"==O.value,V.value,null!=M?M.checked:
-null,null!=t?t.value:null,J.value,U.checked)}),null,l,n);this.showDialog(l.container,340,T,!0,!0,null,null,null,null,!0);Q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,k,l,n,x){var A=document.createElement("div");A.style.whiteSpace="nowrap";var B=this.editor.graph;if(null!=k){var I=document.createElement("h3");mxUtils.write(I,k);I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-A.appendChild(I)}var G=this.addCheckbox(A,mxResources.get("fit"),!0),C=this.addCheckbox(A,mxResources.get("shadow"),B.shadowVisible&&n,!n),R=this.addCheckbox(A,l),T=this.addCheckbox(A,mxResources.get("lightbox"),!0),S=this.addEditButton(A,T),Q=S.getEditInput(),v=1<B.model.getChildCount(B.model.getRoot()),z=this.addCheckbox(A,mxResources.get("layers"),v,!v);z.style.marginLeft=Q.style.marginLeft;z.style.marginBottom="12px";z.style.marginTop="8px";mxEvent.addListener(T,"change",function(){T.checked?
-(v&&z.removeAttribute("disabled"),Q.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"));Q.checked&&T.checked?S.getEditSelect().removeAttribute("disabled"):S.getEditSelect().setAttribute("disabled","disabled")});k=new CustomDialog(this,A,mxUtils.bind(this,function(){d(G.checked,C.checked,R.checked,T.checked,S.getLink(),z.checked)}),null,mxResources.get("embed"),x);this.showDialog(k.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
-function(d,k,l,n,x,A,B,I){function G(Q){var v=" ",z="";n&&(v=" 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!=R?"&page="+R:"")+(x?"&edit=_blank":"")+(A?"&layers=1":"")+"');}})(this);\"",z+=
-"cursor:pointer;");d&&(z+="max-width:100%;");var N="";l&&(N=' width="'+Math.round(C.width)+'" height="'+Math.round(C.height)+'"');B('<img src="'+Q+'"'+N+(""!=z?' style="'+z+'"':"")+v+"/>")}var C=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Q){var v=n?this.getFileData(!0):null;Q=this.createImageDataUri(Q,v,"png");G(Q)}),null,null,null,mxUtils.bind(this,function(Q){I({message:mxResources.get("unknownError")})}),
-null,!0,l?2:1,null,k,null,null,Editor.defaultBorder);else if(k=this.getFileData(!0),C.width*C.height<=MAX_AREA&&k.length<=MAX_REQUEST_SIZE){var T="";l&&(T="&w="+Math.round(2*C.width)+"&h="+Math.round(2*C.height));var S=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+T+"&xml="+encodeURIComponent(k));S.send(mxUtils.bind(this,function(){200<=S.getStatus()&&299>=S.getStatus()?G("data:image/png;base64,"+S.getText()):I({message:mxResources.get("unknownError")})}))}else I({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(d,k,l,n,x,A,B){var I=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),G=I.getElementsByTagName("a");if(null!=G)for(var C=0;C<G.length;C++){var R=G[C].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==G[C].getAttribute("target")&&G[C].removeAttribute("target")}n&&I.setAttribute("content",this.getFileData(!0));k&&this.editor.graph.addSvgShadow(I);if(l){var T=" ",S="";n&&(T="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"+(x?"&edit=_blank":"")+(A?"&layers=1":"")+"');}})(this);\"",S+="cursor:pointer;");d&&(S+="max-width:100%;");this.editor.convertImages(I,mxUtils.bind(this,function(Q){B('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Q))+'"'+(""!=S?' style="'+S+'"':"")+T+"/>")}))}else S="",n&&(k=this.getSelectedPageIndex(),I.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!=k?"&page="+k:"")+(x?"&edit=_blank":"")+(A?"&layers=1":"")+"');}}})(this);"),S+="cursor:pointer;"),d&&(d=parseInt(I.getAttribute("width")),x=parseInt(I.getAttribute("height")),I.setAttribute("viewBox","-0.5 -0.5 "+d+" "+x),S+="max-width:100%;max-height:"+x+"px;",I.removeAttribute("height")),""!=S&&I.setAttribute("style",S),this.editor.addFontCss(I),this.editor.graph.mathEnabled&&this.editor.addMathCss(I),B(mxUtils.getXml(I))};EditorUi.prototype.timeSince=function(d){d=
-Math.floor((new Date-d)/1E3);var k=Math.floor(d/31536E3);if(1<k)return k+" "+mxResources.get("years");k=Math.floor(d/2592E3);if(1<k)return k+" "+mxResources.get("months");k=Math.floor(d/86400);if(1<k)return k+" "+mxResources.get("days");k=Math.floor(d/3600);if(1<k)return k+" "+mxResources.get("hours");k=Math.floor(d/60);return 1<k?k+" "+mxResources.get("minutes"):1==k?k+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,k){if(null!=d){var l=null;if("diagram"==d.nodeName)l=
-d;else if("mxfile"==d.nodeName){var n=d.getElementsByTagName("diagram");if(0<n.length){l=n[0];var x=k.getGlobalVariable;k.getGlobalVariable=function(A){return"page"==A?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==A?1:x.apply(this,arguments)}}}null!=l&&(d=Editor.parseDiagramNode(l))}n=this.editor.graph;try{this.editor.graph=k,this.editor.setGraphXml(d)}catch(A){}finally{this.editor.graph=n}return d};EditorUi.prototype.getSvgFileProperties=function(d){return this.getPngFileProperties(d)};
-EditorUi.prototype.getPngFileProperties=function(d){var k=1,l=0;if(null!=d){if(d.hasAttribute("scale")){var n=parseFloat(d.getAttribute("scale"));!isNaN(n)&&0<n&&(k=n)}d.hasAttribute("border")&&(n=parseInt(d.getAttribute("border")),!isNaN(n)&&0<n&&(l=n))}return{scale:k,border:l}};EditorUi.prototype.getEmbeddedPng=function(d,k,l,n,x){try{var A=this.editor.graph,B=null;if(null!=l&&0<l.length)A=this.createTemporaryGraph(A.getStylesheet()),document.body.appendChild(A.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,
-!0),A),B=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){A=this.createTemporaryGraph(A.getStylesheet());var I=A.getGlobalVariable;A.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?A.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&A.setBackgroundImage(G.viewState.backgroundImage);A.getGlobalVariable=function(C){return"page"==C?G.getName():"pagenumber"==C?1:I.apply(this,arguments)};document.body.appendChild(A.container);
-A.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(C){try{null==B&&(B=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var R=C.toDataURL("image/png");R=Editor.writeGraphModelToPng(R,"tEXt","mxfile",encodeURIComponent(B));d(R.substring(R.lastIndexOf(",")+1));A!=this.editor.graph&&A.container.parentNode.removeChild(A.container)}catch(T){null!=k&&k(T)}}),null,null,null,mxUtils.bind(this,function(C){null!=k&&k(C)}),null,null,n,null,A.shadowVisible,null,A,x,null,
-null,null,"diagram",null)}catch(C){null!=k&&k(C)}};EditorUi.prototype.getEmbeddedSvg=function(d,k,l,n,x,A,B,I,G,C,R,T,S){I=null!=I?I:!0;R=null!=R?R:0;B=null!=G?G:k.background;B==mxConstants.NONE&&(B=null);null==B&&"none"==k.getAdaptiveColors()&&(B="#ffffff");G=this.editor.graph.createSvgImageExport(null!=d);A=k.getSvg(B,C,R,null,null,A,null,G,null,k.shadowVisible||T,null,S,"diagram");(k.shadowVisible||T)&&k.addSvgShadow(A,null,null,0==R);null!=d&&A.setAttribute("content",d);null!=l&&A.setAttribute("resource",
-l);var Q=mxUtils.bind(this,function(v){v=(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(v);null!=x&&x(v);return v});k.mathEnabled&&this.editor.addMathCss(A);if(null!=x)this.embedFonts(A,mxUtils.bind(this,function(v){I?this.editor.convertImages(v,mxUtils.bind(this,function(z){Q(z)})):Q(v)}));else return Q(A)};EditorUi.prototype.embedFonts=function(d,k){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,
-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(d,l),k(d)}catch(n){k(d)}}))}catch(l){k(d)}}))};EditorUi.prototype.exportImage=function(d,k,l,n,x,A,B,I,G,C,R,T,S){G=null!=G?G:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(v){Editor.addRetryToError(v,mxUtils.bind(this,function(){this.exportImage(d,k,l,n,x,A,B,I,G,C,R,T,S)}));this.handleError(v)}))){var Q=this.editor.graph.isSelectionEmpty();
-l=null!=l?l:Q;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(v){this.spinner.stop();try{this.saveCanvas(v,x?this.getFileData(!0,null,null,null,l,I,null,null,null,null,null,d,A):null,G,null==this.pages||0==this.pages.length,R)}catch(z){this.handleError(z)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),null,l,d||1,k,n,null,null,A,B,C,T,S)}catch(v){this.spinner.stop(),this.handleError(v)}}};
-EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.addLocalPagesToMapping=function(d){d=null!=d?d:{};if(null!=this.pages)for(var k=0;k<this.pages.length;k++)d[this.pages[k].getId()]=this.pages[k].getId();return d};EditorUi.prototype.importXml=function(d,k,l,n,x,A,B){k=null!=k?k:0;l=null!=l?l:0;var I=[];try{var G=this.editor.graph;if(null!=d&&0<d.length){G.model.beginUpdate();try{var C=mxUtils.parseXml(d);d={};var R=this.editor.extractGraphModel(C.documentElement,
-null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var T=R.getElementsByTagName("diagram");if(1==T.length&&!A){if(R=Editor.parseDiagramNode(T[0]),null!=this.currentPage&&(d[T[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var S=T[0].getAttribute("name");null!=S&&""!=S&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,S))}}else if(0<T.length){A=[];var Q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[T[0].getAttribute("id")]=
-this.pages[0].getId(),S=T[0].getAttribute("name"),null!=S&&""!=S&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],S)),R=Editor.parseDiagramNode(T[0]),n=!1,Q=1);for(;Q<T.length;Q++){var v=T[Q].getAttribute("id");T[Q].removeAttribute("id");var z=this.updatePageRoot(new DiagramPage(T[Q]));d[v]=T[Q].getAttribute("id");var N=this.pages.length;null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[N+1]));G.model.execute(new ChangePage(this,z,z,N,!0));A.push(z)}this.updatePageLinks(d,
-A)}}if(null!=R&&"mxGraphModel"===R.nodeName){I=G.importGraphModel(R,k,l,n);if(null!=I)for(this.addLocalPagesToMapping(d),Q=0;Q<I.length;Q++)this.updatePageLinksForCell(d,I[Q]);var J=G.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=J&&null!=J.originalSrc){this.updateBackgroundPageLink(d,J);var K=new ChangePageSetup(this,null,J);K.ignoreColor=!0;G.model.execute(K)}}B&&G.pasteCellStyles(G.includeDescendants(I),G.defaultVertexStyle,G.defaultEdgeStyle)}finally{G.model.endUpdate()}}}catch(m){if(x)throw m;
-this.handleError(m)}return I};EditorUi.prototype.updatePageLinks=function(d,k){for(var l=0;l<k.length;l++)this.updatePageLinksForCell(d,k[l].root),null!=k[l].viewState&&this.updateBackgroundPageLink(d,k[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,k){try{if(null!=k&&Graph.isPageLink(k.originalSrc)){var l=d[k.originalSrc.substring(k.originalSrc.indexOf(",")+1)];null!=l&&(k.originalSrc="data:page/id,"+l)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,k){var l=document.createElement("div"),n=this.editor.graph,x=n.getLinkForCell(k);null!=x&&n.setLinkForCell(k,this.updatePageLink(d,x));if(n.isHtmlLabel(k)){l.innerHTML=Graph.sanitizeHtml(n.getLabel(k));for(var A=l.getElementsByTagName("a"),B=!1,I=0;I<A.length;I++)x=A[I].getAttribute("href"),null!=x&&(A[I].setAttribute("href",this.updatePageLink(d,x)),B=!0);B&&n.labelChanged(k,l.innerHTML)}for(I=0;I<n.model.getChildCount(k);I++)this.updatePageLinksForCell(d,n.model.getChildAt(k,I))};EditorUi.prototype.updatePageLink=
-function(d,k){if(Graph.isPageLink(k)){var l=d[k.substring(k.indexOf(",")+1)];k=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==k.substring(0,17))try{var n=JSON.parse(k.substring(17));if(null!=n.actions){for(var x=0;x<n.actions.length;x++){var A=n.actions[x];if(null!=A.open&&Graph.isPageLink(A.open)){var B=A.open.substring(A.open.indexOf(",")+1);l=d[B];null!=l?A.open="data:page/id,"+l:null==this.getPageById(B)&&delete A.open}}k="data:action/json,"+JSON.stringify(n)}}catch(I){}return k};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,k,l,n,x){var A=mxUtils.bind(this,function(B){this.loadingExtensions=!1;null!=l?l(B):this.handleError(B)});this.createTimeout(null,mxUtils.bind(this,function(B){n=null!=n?n:d.name;var I=mxUtils.bind(this,function(C){B.clear()&&A(C)}),G=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var C=this.isRemoteVisioFormat(n);
-try{var R=n.lastIndexOf(".");if(0<=R&&R<n.length)n.substring(R+1).toUpperCase();else{var T=n.lastIndexOf("/");0<=T&&T<n.length&&(n=n.substring(T+1))}}catch(Q){}if(C)if(null==VSS_CONVERT_URL||this.isOffline())I({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{C=new FormData;C.append("file1",d,n);var S=new XMLHttpRequest;S.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));S.responseType="blob";this.addRemoteServiceSecurityCheck(S);
-null!=x&&S.setRequestHeader("x-convert-custom",x);S.onreadystatechange=mxUtils.bind(this,function(){if(4==S.readyState&&B.clear())if(200<=S.status&&299>=S.status)try{var Q=S.response;if("text/xml"==Q.type){var v=new FileReader;v.onload=mxUtils.bind(this,function(z){try{k(z.target.result)}catch(N){I({message:mxResources.get("errorLoadingFile")})}});v.readAsText(Q)}else this.doImportVisio(Q,k,I,n)}catch(z){I(z)}else try{""==S.responseType||"text"==S.responseType?I({message:S.responseText}):(v=new FileReader,
-v.onload=function(){try{I({message:JSON.parse(v.result).Message})}catch(z){null!=v.result&&0<v.result.length?I({message:v.result}):I(z)}},v.readAsText(S.response))}catch(z){I({})}});S.send(C)}else if(B.clear())try{this.doImportVisio(d,k,I,n)}catch(Q){I(Q)}}else I({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?G():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",G,null,null,null,I))}),A)};
-EditorUi.prototype.importGraphML=function(d,k,l){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=l?l(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var A=mxUtils.bind(this,function(I){x.clear()&&n(I)}),B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,k,n)}catch(I){A(I)}else A({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||
-this.isOffline(!0)?B():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,A))}),n)};EditorUi.prototype.exportVisio=function(d){if(this.spinner.spin(document.body,mxResources.get("loading"))){var k=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(l){var n=mxUtils.bind(this,function(A){l.clear()&&k(A)}),x=mxUtils.bind(this,function(){this.loadingExtensions=
-!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(d)||n({message:mxResources.get("unknownError")})}catch(A){n(A)}else n({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,n))}),k):k({message:mxResources.get("serviceUnavailableOrBlocked")})}};
-EditorUi.prototype.convertLucidChart=function(d,k,l){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=l?l(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var A=mxUtils.bind(this,function(I){x.clear()&&n(I)}),B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if("undefined"!==typeof window.LucidImporter)try{var I=JSON.parse(d);k(LucidImporter.importState(I));try{if(null!=window.console&&"1"==urlParams.test){var G=[(new Date).toISOString(),
-"convertLucidChart",I];null!=I.state&&G.push(JSON.parse(I.state));if(null!=I.svgThumbs)for(var C=0;C<I.svgThumbs.length;C++)G.push(Editor.createSvgDataUri(I.svgThumbs[C]));null!=I.thumb&&G.push(I.thumb);console.log.apply(console,G)}}catch(R){}}catch(R){null!=window.console&&console.error(R),A(R)}else A({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(B,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",B,null,null,null,A)},null,null,null,A)},null,null,null,A)},null,null,null,A)},null,null,null,A):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,A))}),n)};EditorUi.prototype.createMermaidXml=function(d,k,l,
-n,x,A){var B=new Graph(document.createElement("div"));l=B.insertVertex(null,null,null,0,0,n,x,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");B.setAttributeForCell(l,"mermaidData",JSON.stringify({data:d,config:k},null,2));null!=A&&B.setAttributeForCell(l,"templatePrompt",A);d=(new mxCodec).encode(B.getModel());return mxUtils.getXml(d)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(d,k,l){var n=0,x=function(){for(var B=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),
-I=0;I<B.length;I++)null!=B[I].parentNode&&B[I].parentNode.removeChild(B[I])},A=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(B){var I=new mxXmlRequest("https://www.draw.io/generate/v2",d,"POST"),G=mxUtils.bind(this,function(C){B.clear()&&(x(),l(C))});I.send(mxUtils.bind(this,function(C){if(B.isAlive())if(200<=C.getStatus()&&299>=C.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var T=mxUtils.trim(C.getText());this.generateMermaidImage(T,null,mxUtils.bind(this,
-function(S,Q,v){this.tryAndHandle(mxUtils.bind(this,function(){B.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[d],"result",[T]),x(),k(T,S,Q,v))}),G)}),G,mxUtils.bind(this,function(S){3>n++?B.clear()&&A():G(S)}))}),G);else{var R={message:mxResources.get("error")+" "+C.getStatus()};try{R=JSON.parse(C.getText()),R=R.error}catch(T){}G(R)}}),G)}),l)});A()};EditorUi.prototype.extractMermaidDeclaration=function(d){d=mxUtils.trim(d);"o\n\n"==d.substring(0,3)&&(d=d.substring(3));
-var k=d.split("```");k=1<k.length?k:d.split("<pre>");k=1<k.length?k:d.split("~~~");k=1<k.length?k:d.split("%%");k=1<k.length?k:d.split("(Begins)");d=mxUtils.trim(1>=k.length?d:k[1]);k=d.split("\n");var l=1<k.length?k[1]:null;if(null!=l){var n=l.indexOf("-");0<n&&(l=l.substring(0,n))}if(0<k.length&&"mermaid"==mxUtils.trim(k[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))k.shift(),d=mxUtils.trim(k.join("\n")),k=d.split("\n");l=k[0].split(" ")[0].replace(/:$/,"");n=l.indexOf("-");0<
-n&&(l=l.substring(0,n));try{"mindmap"==l&&2<k.length&&(d=extractMermaidMindmap(k))}catch(x){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(d=null);return d};EditorUi.prototype.generateMermaidImage=function(d,k,l,n,x){var A=mxUtils.bind(this,function(I){this.loadingMermaid=!1;null!=n?n(I):this.handleError(I)}),B=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;k=null!=k?k:mxUtils.clone(EditorUi.defaultMermaidConfig);k.securityLevel="strict";k.startOnLoad=!1;k.maxTextSize=9E5;"undefined"!==
-typeof mxMermaidToDrawio&&k.flowchart&&0<=d.indexOf("$$")&&(k.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(k.theme="dark");var I=mxUtils.bind(this,function(G){try{if(mxClient.IS_IE||mxClient.IS_IE11)G=G.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');G=G.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var C=mxUtils.parseXml(G).getElementsByTagName("svg");if(0<C.length&&
-"error"!=C[0].getAttribute("aria-roledescription")){var R=parseFloat(C[0].getAttribute("width")),T=parseFloat(C[0].getAttribute("height"));if(isNaN(R)||isNaN(T))try{var S=C[0].getAttribute("viewBox").split(/\s+/);R=parseFloat(S[2]);T=parseFloat(S[3])}catch(Q){R=R||100,T=T||100}l(this.convertDataUri(Editor.createSvgDataUri(G)),R,T)}else null!=x?x():n({message:mxResources.get("invalidInput")})}catch(Q){n(Q)}});mermaid.mermaidAPI.initialize(k);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),
-d).then(function(G){I(G.svg)}).catch(function(G){null!=x?x(G):n(G)})}catch(G){n(G)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(B,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(I){this.importXml(I,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",B,null,null,null,A)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,A))};
-EditorUi.prototype.generatePlantUmlImage=function(d,k,l,n){function x(I,G,C){c1=I>>2;c2=(I&3)<<4|G>>4;c3=(G&15)<<2|C>>6;c4=C&63;r="";r+=A(c1&63);r+=A(c2&63);r+=A(c3&63);return r+=A(c4&63)}function A(I){if(10>I)return String.fromCharCode(48+I);I-=10;if(26>I)return String.fromCharCode(65+I);I-=26;if(26>I)return String.fromCharCode(97+I);I-=26;return 0==I?"-":1==I?"_":"?"}var B=new XMLHttpRequest;B.open("GET",("txt"==k?PLANT_URL+"/txt/":"png"==k?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(I){r="";
-for(i=0;i<I.length;i+=3)r=i+2==I.length?r+x(I.charCodeAt(i),I.charCodeAt(i+1),0):i+1==I.length?r+x(I.charCodeAt(i),0,0):r+x(I.charCodeAt(i),I.charCodeAt(i+1),I.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=k&&(B.responseType="blob");B.onload=function(I){if(200<=this.status&&300>this.status)if("txt"==k)l(this.response);else{var G=new FileReader;G.readAsDataURL(this.response);G.onloadend=function(C){var R=new Image;R.onload=function(){try{var T=R.width,S=R.height;
-if(0==T&&0==S){var Q=G.result,v=Q.indexOf(","),z=decodeURIComponent(escape(atob(Q.substring(v+1)))),N=mxUtils.parseXml(z).getElementsByTagName("svg");0<N.length&&(T=parseFloat(N[0].getAttribute("width")),S=parseFloat(N[0].getAttribute("height")))}l(G.result,T,S)}catch(J){n(J)}};R.src=G.result};G.onerror=function(C){n(C)}}else n(I)};B.onerror=function(I){n(I)};B.send()};EditorUi.prototype.insertAsPreText=function(d,k,l){var n=this.editor.graph,x=null;n.getModel().beginUpdate();try{x=n.insertVertex(null,
-null,"<pre>"+d+"</pre>",k,l,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(x,!0)}finally{n.getModel().endUpdate()}return x};EditorUi.prototype.insertTextAt=function(d,k,l,n,x,A,B,I){A=null!=A?A:!0;B=null!=B?B:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(S){4==S.readyState&&200<=
-S.status&&299>=S.status&&this.editor.graph.setSelectionCells(this.insertTextAt(S.responseText,k,l,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var G=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var C=Editor.extractGraphModelFromPdf(d);if(null!=C&&0<C.length)return this.importXml(C,k,l,A,!0,I)}if(Editor.isPngDataUrl(d)&&(C=Editor.extractGraphModelFromPng(d),null!=C&&0<C.length))return this.importXml(C,k,l,A,
-!0,I);if("data:image/svg+xml;"==d.substring(0,19))try{C=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(C=d.substring(d.indexOf(",")+1),C=window.atob&&!mxClient.IS_SF?atob(C):Base64.decode(C,!0)):C=decodeURIComponent(d.substring(d.indexOf(",")+1));var R=this.importXml(C,k,l,A,!0,I);if(0<R.length)return R}catch(S){}this.loadImage(d,mxUtils.bind(this,function(S){if("data:"==d.substring(0,5))this.resizeImage(S,d,mxUtils.bind(this,function(z,N,J){G.setSelectionCell(G.insertVertex(null,null,"",G.snap(k),
-G.snap(l),N,J,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(z)+";"))}),B,this.maxImageSize);else{var Q=Math.min(1,Math.min(this.maxImageSize/S.width,this.maxImageSize/S.height)),v=Math.round(S.width*Q);S=Math.round(S.height*Q);G.setSelectionCell(G.insertVertex(null,null,"",G.snap(k),G.snap(l),v,S,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var S=null;G.getModel().beginUpdate();try{S=G.insertVertex(G.getDefaultParent(),null,d,G.snap(k),G.snap(l),1,1,"text;"+(n?"html=1;":"")),G.updateCellSize(S),G.fireEvent(new mxEventObject("textInserted","cells",[S]))}finally{G.getModel().endUpdate()}G.setSelectionCell(S)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,k,l,A,null,I);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(S){this.editor.graph.setSelectionCells(this.importXml(S,k,l,A,null,I))}),mxUtils.bind(this,function(S){this.handleError(S)}));else{G=this.editor.graph;x=null;G.getModel().beginUpdate();try{x=G.insertVertex(G.getDefaultParent(),null,"",G.snap(k),G.snap(l),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));G.fireEvent(new mxEventObject("textInserted","cells",[x]));n&&(d=G.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");x.value=d;G.updateCellSize(x);if(0<this.maxTextWidth&&
-x.geometry.width>this.maxTextWidth){var T=G.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=T.width;x.geometry.height=T.height}Graph.isLink(x.value)&&G.setLinkForCell(x,x.value);x.geometry.width+=G.gridSize;x.geometry.height+=G.gridSize}finally{G.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=function(d){var k=-1;do d/=1024,k++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[k]};EditorUi.prototype.convertDataUri=
-function(d){if("data:"==d.substring(0,5)){var k=d.indexOf(";");0<k&&(d=d.substring(0,k)+d.substring(d.indexOf(",",k+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,k){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,k){if(d&&Graph.fileSupport){if(null==this.importFileInputElt){var l=
-document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(B,I){StorageFile.listFiles(this,"F",B,I)});window.openBrowserFile=
-mxUtils.bind(this,function(B,I,G){StorageFile.getFileContent(this,B,I,G)});window.deleteBrowserFile=mxUtils.bind(this,function(B,I,G){StorageFile.deleteFile(this,B,I,G)});if(!k){var n=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(B){this.hideDialog(B)}));window.openFile.setConsumer(mxUtils.bind(this,function(B,I){null!=I&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(I)?(B=new Blob([B],{type:"application/octet-stream"}),this.importVisio(B,
-mxUtils.bind(this,function(G){this.importXml(G,0,0,!0)}),null,I)):this.editor.graph.setSelectionCells(this.importXml(B,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!k){var x=this.dialog,A=x.close;this.dialog.close=mxUtils.bind(this,function(B){Editor.useLocalStorage=n;A.apply(x,arguments);B&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
-function(d,k,l){var n=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(A){if(mxUtils.isEmptyObject(A.files))l();else{var B=0,I,G=!1;A.forEach(function(C,R){C=R.name.toLowerCase();"diagram/diagram.xml"==C?(G=!0,R.async("string").then(function(T){0==T.indexOf("<mxfile ")?k(T):l()})):0==C.indexOf("versions/")&&(C=parseInt(C.substr(9)),C>B&&(B=C,I=R))});0<B?I.async("string").then(function(C){(new XMLHttpRequest).upload&&n.isRemoteFileFormat(C,
-d.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):n.parseFileData(C,mxUtils.bind(this,function(R){4==R.readyState&&(200<=R.status&&299>=R.status?k(R.responseText):l())}),d.name):l()}):G||l()}},function(A){l(A)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,l))};EditorUi.prototype.importFile=function(d,k,l,n,x,A,B,
-I,G,C,R,T){C=null!=C?C:!0;var S=!1,Q=null,v=mxUtils.bind(this,function(z){var N=null;null!=z&&"<mxlibrary"==z.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,z,B)),this.showSidebar()):N=this.importXml(z,l,n,C,null,null!=T?mxEvent.isControlDown(T):null);null!=I&&I(N)});"image"==k.substring(0,5)?(G=!1,"image/png"==k.substring(0,9)&&(R=R?null:this.extractGraphModelFromPng(d),null!=R&&0<R.length&&(Q=this.importXml(R,l,n,C,null,null!=T?mxEvent.isControlDown(T):null),G=!0)),G||(G=this.editor.graph,
-R=d.indexOf(";"),0<R&&(d=d.substring(0,R)+d.substring(d.indexOf(",",R+1))),C&&G.isGridEnabled()&&(l=G.snap(l),n=G.snap(n)),R="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==k.substring(0,9)&&(R+="editableCssRules=.*;"),Q=[G.insertVertex(null,null,"",l,n,x,A,R+"image="+d+";")])):/(\.*<graphml )/.test(d)?(S=!0,this.importGraphML(d,v)):null!=G&&null!=B&&EditorUi.isVisioFilename(B)?(S=!0,this.importVisio(G,v)):(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(d,B)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(S=!0,k=mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?v(z.responseText):null!=I&&(I(null),this.showError(mxResources.get("error"),413==z.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,k,B):this.parseFile(G,k,B)):0==d.indexOf("PK")&&null!=G?(S=!0,this.importZipFile(G,v,mxUtils.bind(this,function(){Q=
-this.insertTextAt(this.validateFileData(d),l,n,!0,null,C);I(Q)}))):/(\.v(sd|dx))($|\?)/i.test(B)||/(\.vs(s|x))($|\?)/i.test(B)||(Q=this.insertTextAt(this.validateFileData(d),l,n,!0,null,C,null,null!=T?mxEvent.isControlDown(T):null));S||null==I||I(Q);return Q};EditorUi.prototype.importFiles=function(d,k,l,n,x,A,B,I,G,C,R,T,S){n=null!=n?n:this.maxImageSize;C=null!=C?C:this.maxImageBytes;var Q=null!=k&&null!=l,v=!0;k=null!=k?k:0;l=null!=l?l:0;var z=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var N=R||
-this.resampleThreshold,J=0;J<d.length;J++)if("image/svg"!==d[J].type.substring(0,9)&&"image/"===d[J].type.substring(0,6)&&d[J].size>N){z=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[d],"x",[k],"y",[l],"maxSize",[n],"maxBytes",[C],"resampleThreshold",[this.resampleThreshold],"largeImages",[z],"crop",[Q],"resizeImages",[v],"ignoreEmbeddedXml",[T],"evt",[S]);var K=mxUtils.bind(this,function(){var m=this.editor.graph,t=m.gridSize;x=null!=x?x:mxUtils.bind(this,function(U,V,X,W,Y,Z,aa,
-fa,ea){try{if(null!=U&&"<mxlibrary"==U.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,aa)),this.showSidebar(),null;this.isCompatibleString(U)&&1==d.length&&null!=S&&"drop"==S.type&&this.isBlankFile()&&!this.canUndo()&&(Q=!1,W=X=0);return this.importFile(U,V,X,W,Y,Z,aa,fa,ea,Q,T,S)}catch(ca){return this.handleError(ca),null}});A=null!=A?A:mxUtils.bind(this,function(U){m.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var D=
-d.length,M=D,L=[],O=mxUtils.bind(this,function(U,V){L[U]=V;if(0==--M){this.spinner.stop();if(null!=I)I(L);else{var X=[];m.getModel().beginUpdate();try{for(U=0;U<L.length;U++){var W=L[U]();null!=W&&(X=X.concat(W))}}finally{m.getModel().endUpdate()}}A(X)}}),P=0;P<D;P++)mxUtils.bind(this,function(U){var V=d[U];if(null!=V){var X=new FileReader;X.onload=mxUtils.bind(this,function(W){if(null==B||B(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Y=Graph.clipSvgDataUri(W.target.result),
-Z=Y.indexOf(","),aa=decodeURIComponent(escape(atob(Y.substring(Z+1)))),fa=mxUtils.parseXml(aa),ea=fa.getElementsByTagName("svg");if(0<ea.length){var ca=ea[0],ha=T?null:ca.getAttribute("content");null!=ha&&"<"!=ha.charAt(0)&&"%"!=ha.charAt(0)&&(ha=unescape(window.atob?atob(ha):Base64.decode(ha,!0)));null!=ha&&"%"==ha.charAt(0)&&(ha=decodeURIComponent(ha));null==ha||"<mxfile "!==ha.substring(0,8)&&"<mxGraphModel>"!==ha.substring(0,14)&&"<mxGraphModel "!==ha.substring(0,14)?O(U,mxUtils.bind(this,function(){try{if(null!=
-fa){var ia=fa.getElementsByTagName("svg");if(0<ia.length){var la=ia[0],da=la.getAttribute("width"),ra=la.getAttribute("height");da=null!=da&&"%"!=da.charAt(da.length-1)?parseFloat(da):NaN;ra=null!=ra&&"%"!=ra.charAt(ra.length-1)?parseFloat(ra):NaN;var pa=la.getAttribute("viewBox");if(null==pa||0==pa.length)la.setAttribute("viewBox","0 0 "+da+" "+ra);else if(isNaN(da)||isNaN(ra)){var sa=pa.split(" ");3<sa.length&&(da=parseFloat(sa[2]),ra=parseFloat(sa[3]))}Y=Editor.createSvgDataUri(mxUtils.getXml(la));
-var va=Math.min(1,Math.min(n/Math.max(1,da)),n/Math.max(1,ra)),ja=x(Y,V.type,k+U*t,l+U*t,Math.max(1,Math.round(da*va)),Math.max(1,Math.round(ra*va)),V.name);if(null!=ja&&(isNaN(da)||isNaN(ra))){var ma=new Image;ma.onload=mxUtils.bind(this,function(){da=Math.max(1,ma.width);ra=Math.max(1,ma.height);ja[0].geometry.width=da;ja[0].geometry.height=ra;la.setAttribute("viewBox","0 0 "+da+" "+ra);Y=Editor.createSvgDataUri(mxUtils.getXml(la));var wa=Y.indexOf(";");0<wa&&(Y=Y.substring(0,wa)+Y.substring(Y.indexOf(",",
-wa+1)));m.setCellStyles("image",Y,[ja[0]])});ma.src=Editor.createSvgDataUri(mxUtils.getXml(la))}return ja}}}catch(wa){}return null})):O(U,mxUtils.bind(this,function(){return x(ha,"text/xml",k+U*t,l+U*t,0,0,V.name)}))}else O(U,mxUtils.bind(this,function(){return null}))}else{Z=!1;if("image/png"==V.type){var ka=T?null:this.extractGraphModelFromPng(W.target.result);if(null!=ka&&0<ka.length){var ba=new Image;ba.src=W.target.result;O(U,mxUtils.bind(this,function(){return x(ka,"text/xml",k+U*t,l+U*t,ba.width,
-ba.height,V.name)}));Z=!0}}Z||(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(W.target.result,mxUtils.bind(this,function(ia){this.resizeImage(ia,W.target.result,mxUtils.bind(this,function(la,da,ra){O(U,mxUtils.bind(this,function(){if(null!=la&&la.length<
-C){var pa=v&&this.isResampleImageSize(V.size,R)?Math.min(1,Math.min(n/da,n/ra)):1;return x(la,V.type,k+U*t,l+U*t,Math.round(da*pa),Math.round(ra*pa),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),v,n,R,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Y=W.target.result,x(Y,V.type,k+U*t,l+U*t,240,160,V.name,function(ia){O(U,function(){return ia})},V)}catch(ia){O(U,mxUtils.bind(this,function(){return null})),
-null!=window.console&&console.error(ia,V)}else O(U,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(V.name)?x(null,V.type,k+U*t,l+U*t,240,160,V.name,function(W){O(U,function(){return W})},V):"image"==V.type.substring(0,5)||"application/pdf"==V.type?X.readAsDataURL(V):X.readAsText(V)}})(P)});if(z){z=[];for(J=0;J<d.length;J++)z.push(d[J]);d=z;this.confirmImageResize(function(m){v=m;K()},G)}else K()};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(d,k){k=null!=k?k:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,x=function(A,B){if(A||k)mxSettings.setResizeImages(A?B:null),mxSettings.save();l();d(B)};null==n||k?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(A){x(A,
-!0)},function(A){x(A,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):x(!1,n)};EditorUi.prototype.parseFile=function(d,k,l){l=null!=l?l:d.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,k,l)});n.readAsText(d)};EditorUi.prototype.parseFileData=
-function(d,k,l){var n=new XMLHttpRequest;n.open("POST",OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){k(n)};n.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=function(d,k){k=null!=k?k:this.resampleThreshold;return d>k};EditorUi.prototype.resizeImage=function(d,k,l,n,x,A,
-B){x=null!=x?x:this.maxImageSize;var I=Math.max(1,d.width),G=Math.max(1,d.height),C=k;if(n&&this.isResampleImageSize(null!=B?B:k.length,A))try{var R=Math.max(I/x,G/x);if(1<R){var T=Math.round(I/R),S=Math.round(G/R),Q=document.createElement("canvas");Q.width=T;Q.height=S;Q.getContext("2d").drawImage(d,0,0,T,S);var v=Q.toDataURL();if(v.length<k.length){var z=document.createElement("canvas");z.width=T;z.height=S;var N=z.toDataURL();v!==N&&(k=v,I=T,G=S)}}}catch(J){}n&&C!=k&&x>this.maxImageSize/2&&k.length>
-this.maxImageBytes?this.resizeImage(d,k,l,n,x/1.5,A,B):l(k,I,G)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,k,l){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;k(n)};null!=l&&(n.onerror=l);n.src=d}catch(x){if(null!=l)l(x);else throw x;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?
-urlParams.rough:d)};var p=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());p.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var q=
-EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var d=this,k=this.editor.graph,l=k.isEnabled;k.isEnabled=function(){return l.apply(this,arguments)&&!d.isLocked()};Graph.touchStyle&&(k.panningHandler.isPanningTrigger=function(t){var D=t.getEvent();return null==t.getState()&&!mxEvent.isMouseEvent(D)&&!k.freehand.isDrawing()||mxEvent.isPopupTrigger(D)&&(null==t.getState()||mxEvent.isControlDown(D)||mxEvent.isShiftDown(D))});
-k.cellEditor.editPlantUmlData=function(t,D,M){var L=JSON.parse(M);D=new SimpleTextareaDialog(d,L.data,function(O){null!=O&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(O,L.format,function(P,U,V){d.spinner.stop();k.getModel().beginUpdate();try{if("txt"==L.format)k.labelChanged(t,"<pre>"+P+"</pre>"),k.updateCellSize(t,!0);else{k.setCellStyles("image",d.convertDataUri(P),[t]);var X=k.model.getGeometry(t);null!=X&&(X=X.clone(),X.width=U,X.height=V,k.cellsResized([t],
-[X],!1))}k.setAttributeForCell(t,"plantUmlData",JSON.stringify({data:O,format:L.format}))}finally{k.getModel().endUpdate()}},function(P){d.handleError(P)})});d.showDialog(D.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));D.init()};k.cellEditor.editMermaidData=function(t,D,M){var L=JSON.parse(M);D=new SimpleTextareaDialog(d,L.data,function(O){null!=O&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(O,L.config,function(P,U,V){d.spinner.stop();
-k.getModel().beginUpdate();try{k.setCellStyles("image",P,[t]);var X=k.model.getGeometry(t);null!=X&&(X=X.clone(),X.width=Math.max(X.width,U),X.height=Math.max(X.height,V),k.cellsResized([t],[X],!1));k.setAttributeForCell(t,"mermaidData",JSON.stringify({data:O,config:L.config},null,2))}finally{k.getModel().endUpdate()}},function(P){d.handleError(P)})});d.showDialog(D.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));D.init()};var n=k.cellEditor.startEditing;k.cellEditor.startEditing=
-function(t,D){try{var M=this.graph.getAttributeForCell(t,"plantUmlData");if(null!=M)this.editPlantUmlData(t,D,M);else if(M=this.graph.getAttributeForCell(t,"mermaidData"),null!=M&&window.isMermaidEnabled)this.editMermaidData(t,D,M);else{var L=k.getCellStyle(t);"1"==mxUtils.getValue(L,"metaEdit","0")?d.showDataDialog(t):n.apply(this,arguments)}}catch(O){d.handleError(O)}};k.getLinkTitle=function(t){return d.getLinkTitle(t)};k.customLinkClicked=function(t,D){var M=!1;try{var L=this.getGraphBounds();
-d.handleCustomLink(t,D);M=!0;d.chromelessResize&&!L.equals(this.getGraphBounds())&&(d.chromelessResize(),this.scrollCellToVisible(D))}catch(O){d.handleError(O)}return M};var x=k.parseBackgroundImage;k.parseBackgroundImage=function(t){var D=x.apply(this,arguments);null!=D&&null!=D.src&&Graph.isPageLink(D.src)&&(D={originalSrc:D.src});return D};var A=k.setBackgroundImage;k.setBackgroundImage=function(t){null!=t&&null!=t.originalSrc&&(t=d.createImageForPageLink(t.originalSrc,d.currentPage,this));A.apply(this,
-arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){k.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){k.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(t,D){t=null!=k.backgroundImage?k.backgroundImage.originalSrc:null;if(null!=t){var M=t.indexOf(",");if(0<M)for(t=t.substring(M+1),D=D.getProperty("patches"),M=0;M<D.length;M++)if(null!=D[M][EditorUi.DIFF_UPDATE]&&null!=D[M][EditorUi.DIFF_UPDATE][t]||
-null!=D[M][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(D[M][EditorUi.DIFF_REMOVE],t)){k.refreshBackgroundImage();break}}}));var B=k.getBackgroundImageObject;k.getBackgroundImageObject=function(t,D,M){var L=B.apply(this,arguments);null!=L&&null!=L.originalSrc&&(L=D?d.createImageForPageLink(L.originalSrc,M,null,!0):{src:L.originalSrc});return L};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/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 I=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(t){t=null!=t?t:"";"1"==urlParams.dev&&(t+=(0<t.length?"&":"?")+"dev=1");return I.apply(this,arguments)};var G=k.addClickHandler;k.addClickHandler=function(t,D,M){var L=D;D=function(O,P,U){if(null==P){var V=mxEvent.getSource(O);"a"==V.nodeName.toLowerCase()&&(P=V.getAttribute("href"))}null!=P&&k.isCustomLink(P)&&(mxEvent.isTouchEvent(O)||
-!mxEvent.isPopupTrigger(O))&&k.customLinkClicked(P,U)&&mxEvent.consume(O);null!=L&&L(O,P,U)};G.call(this,t,D,M)};q.apply(this,arguments);this.editor.graph.addSvgShadow(k.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var C=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(t,D,M){k.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(t,["zoomIn","zoomOut","-"],null,M);C.apply(this,arguments);k.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(t,
-["-","addToScratchpad"],null,M);k.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(t,["-","exitGroup","home"],null,M)};var R=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(t,D,M){if(d.editor.graph.isSelectionEmpty())R.apply(this,arguments),d.menus.addMenuItems(t,["copyAsImage","copyAsSvg"],null,M);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(t,D,M):this.addPopupMenuArrangeItems(t,D,M),this.addMenuItems(t,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),
-null,M),this.isShowCellEditItems()||this.addPopupDeleteItem(t,D,M),this.addMenuItems(t,["lockUnlock","-"],null,M),!this.isShowStyleItems()){if(1==k.getSelectionCount()&&!k.isCellLocked(D)&&k.isCellEditable(D)&&(this.addSubmenu("editCell",t,null,mxResources.get("edit")),t.addSeparator(),k.getModel().isEdge(D))){this.addSubmenu("line",t);var L=k.getModel().getGeometry(D);null!=L&&null!=L.points&&0<L.points.length&&this.addMenuItems(t,["clearWaypoints"],null,M)}1==k.getSelectionCount()&&this.addMenuItems(t,
-["enterGroup"],null,M);L=d.getSelectionState();null!=L.mergeCell?this.addMenuItem(t,"mergeCells"):(1<L.style.colspan||1<L.style.rowspan)&&this.addMenuItem(t,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,
-function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var T=k.getExportVariables;k.getExportVariables=function(){var t=T.apply(this,arguments),D=d.getCurrentFile();null!=D&&(t.filename=D.getTitle());t.pagecount=null!=d.pages?d.pages.length:1;t.page=null!=d.currentPage?d.currentPage.getName():"";t.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return t};var S=k.getGlobalVariable;k.getGlobalVariable=
-function(t){var D=d.getCurrentFile();return"filename"==t&&null!=D?D.getTitle():"page"==t&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==t?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==t?null!=d.pages?d.pages.length:1:S.apply(this,arguments)};var Q=null,v=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var t=this.getCurrentFile(),D=null!=t&&null!=t.getTitle()?t.getTitle():this.defaultFilename;Q!=D&&t==v&&(k.invalidateDescendantsWithPlaceholders(k.model.getRoot()),
-k.view.validate());Q=D;v=t}));var z=k.labelLinkClicked;k.labelLinkClicked=function(t,D,M){var L=D.getAttribute("href");if(null==L||!k.isCustomLink(L)||!mxEvent.isTouchEvent(M)&&mxEvent.isPopupTrigger(M))z.apply(this,arguments);else{if(!k.isEnabled()||null!=t&&k.isCellLocked(t.cell))k.customLinkClicked(L),k.getRubberband().reset();mxEvent.consume(M)}};this.editor.getOrCreateFilename=function(){var t=d.defaultFilename,D=d.getCurrentFile();null!=D&&(t=null!=D.getTitle()?D.getTitle():t);return t};var N=
-this.actions.get("print");N.setEnabled(!mxClient.IS_IOS||!navigator.standalone);N.visible=N.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!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(76,
-!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),k.addListener(mxEvent.ESCAPE,function(t,D){null!=
-D&&k.isEnabled()&&!k.isEditing()&&null!=D.getProperty("event")&&d.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&k.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(t){var D=k.cellEditor.text2,M=null;null!=D&&(mxEvent.addListener(D,"dragleave",function(L){null!=M&&(M.parentNode.removeChild(M),M=null);L.stopPropagation();L.preventDefault()}),
-mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(L){null==M&&(M=this.highlightElement(D));L.stopPropagation();L.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(L){null!=M&&(M.parentNode.removeChild(M),M=null);if(0<L.dataTransfer.files.length)this.importFiles(L.dataTransfer.files,0,0,this.maxImageSize,function(P,U,V,X,W,Y){k.insertImage(P,W,Y)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var U=0;U<P.length;U++)P[U]()},mxEvent.isControlDown(L));
-else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var O=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(P){var U=Math.max(1,P.width);P=Math.max(1,P.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,U)),V/Math.max(1,P));k.insertImage(decodeURIComponent(O),U*V,P*V)})):document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(L.dataTransfer.types,
-"text/html")?document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"));L.stopPropagation();L.preventDefault()})))}));if(Editor.isSettingsEnabled()){N=this.editor.graph.view;var J=mxSettings.getUnit();N.setUnit(J);Editor.pageSizeUnit=J==mxConstants.METERS?mxConstants.MILLIMETERS:J;N.addListener("unitChanged",function(t,D){t=D.getProperty("unit");mxSettings.setUnit(t);
-mxSettings.save();Editor.pageSizeUnit=t==mxConstants.METERS?mxConstants.MILLIMETERS:t});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,N.unit);this.refresh()}if("1"==urlParams.styledev){N=document.getElementById("geFooter");null!=N&&(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)})),N.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,D){0<this.editor.graph.getSelectionCount()?
-(t=this.editor.graph.getSelectionCell(),t=this.editor.graph.getModel().getStyle(t),this.styleInput.value=t||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var K=this.isSelectionAllowed;this.isSelectionAllowed=function(t){return mxEvent.getSource(t)==this.styleInput?!0:K.apply(this,arguments)}}N=document.getElementById("geInfo");null!=N&&N.parentNode.removeChild(N);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var m=null;mxEvent.addListener(k.container,
-"dragleave",function(t){k.isEnabled()&&(null!=m&&(m.parentNode.removeChild(m),m=null),t.stopPropagation(),t.preventDefault())});mxEvent.addListener(k.container,"dragover",mxUtils.bind(this,function(t){null==m&&(m=this.highlightElement(k.container));null!=this.sidebar&&this.sidebar.hideTooltip();t.stopPropagation();t.preventDefault()}));mxEvent.addListener(k.container,"drop",mxUtils.bind(this,function(t){null!=m&&(m.parentNode.removeChild(m),m=null);if(k.isEnabled()){var D=mxUtils.convertPoint(k.container,
-mxEvent.getClientX(t),mxEvent.getClientY(t)),M=t.dataTransfer.files,L=k.view.translate,O=k.view.scale,P=D.x/O-L.x,U=D.y/O-L.y;if(0<M.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(t)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(M,!0)):(mxEvent.isAltDown(t)&&(U=P=null),this.importFiles(M,P,U,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(t),null,null,mxEvent.isShiftDown(t),t));else{mxEvent.isAltDown(t)&&(U=P=0);var V=0<=mxUtils.indexOf(t.dataTransfer.types,
-"text/uri-list")?t.dataTransfer.getData("text/uri-list"):null;D=this.extractGraphModelFromEvent(t,null!=this.pages);if(null!=D)k.setSelectionCells(this.importXml(D,P,U,!0));else if(0<=mxUtils.indexOf(t.dataTransfer.types,"text/html")){var X=t.dataTransfer.getData("text/html");D=document.createElement("div");D.innerHTML=Graph.sanitizeHtml(X);var W=null;M=D.getElementsByTagName("img");null!=M&&1==M.length?(X=M[0].getAttribute("src"),null==X&&(X=M[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||
-(W=!0)):(M=D.getElementsByTagName("a"),null!=M&&1==M.length?X=M[0].getAttribute("href"):(D=D.getElementsByTagName("pre"),null!=D&&1==D.length&&(X=mxUtils.getTextContent(D[0]))));var Y=!0,Z=mxUtils.bind(this,function(){k.setSelectionCells(this.insertTextAt(X,P,U,!0,W,null,Y,mxEvent.isControlDown(t)))});W&&null!=X&&X.length>this.resampleThreshold?this.confirmImageResize(function(aa){Y=aa;Z()},mxEvent.isControlDown(t)):Z()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),
-mxUtils.bind(this,function(aa){var fa=Math.max(1,aa.width);aa=Math.max(1,aa.height);var ea=this.maxImageSize;ea=Math.min(1,Math.min(ea/Math.max(1,fa)),ea/Math.max(1,aa));k.setSelectionCell(k.insertVertex(null,null,"",P,U,fa*ea,aa*ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(aa){k.setSelectionCells(this.insertTextAt(V,P,U,!0))})):0<=mxUtils.indexOf(t.dataTransfer.types,"text/plain")&&
-k.setSelectionCells(this.insertTextAt(t.dataTransfer.getData("text/plain"),P,U,!0))}}t.stopPropagation();t.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",
-function(){mxClient.IS_SF&&k.view.validateBackground()});k.addListener("enabledChanged",mxUtils.bind(this,function(){k.isEnabled()||this.hideShapePicker();this.refresh()}));d=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==d.embedViewport)mxUtils.fit(this.div);else{var t=parseInt(this.div.offsetLeft),D=parseInt(this.div.offsetWidth),M=d.embedViewport.x+d.embedViewport.width,L=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),P=d.embedViewport.y+d.embedViewport.height;
-this.div.style.left=Math.max(d.embedViewport.x,Math.min(t,M-D))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(L,P-O))+"px";this.div.style.height=Math.min(d.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(d.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(N=Editor.currentTheme,"simple"==N||"sketch"==N)this.doSetCurrentTheme(N,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():
-(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));N=!1;if(null!=urlParams.dark)N=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)N="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||N&&"auto"!=mxSettings.settings.darkMode||(N=mxSettings.settings.darkMode);"auto"==N&&this.isAutoDarkModeSupported()&&(N=window.matchMedia("(prefers-color-scheme: dark)").matches);
-this.setDarkMode("string"===typeof N?"1"==N:N);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(t){this.isAutoDarkMode()&&this.setDarkMode(t.matches)}))}catch(t){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);
-Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(t,D){k.enableFlowAnimation=Editor.enableAnimations;k.refresh()}));k.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=
-0);"1"==urlParams.prefetchFonts&&d.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var u=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,k=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=k&&d<k?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<
-k&&d>=k&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=d}u.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,k=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,n=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(C){mxEvent.getSource(C)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(C),mxEvent.getClientY(C)),
-this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var x=document.createElement("div");x.style.position="absolute";x.style.width="10px";x.style.height="10px";x.style.borderRadius="5px";x.style.border="1px solid gray";x.style.background="#ffffff";x.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(x);this.bottomResizer=x;var A=null,B=null,I=null,G=null;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(C){G=parseInt(this.diagramContainer.style.height);B=mxEvent.getClientY(C);
-n.popupMenuHandler.hideMenu();mxEvent.consume(C)}));x=x.cloneNode(!1);x.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(x);this.rightResizer=x;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(C){I=parseInt(this.diagramContainer.style.width);A=mxEvent.getClientX(C);n.popupMenuHandler.hideMenu();mxEvent.consume(C)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(C){var R=!1;null!=A&&(this.diagramContainer.style.width=Math.max(20,I+mxEvent.getClientX(C)-
-A)+"px",R=!0);null!=B&&(this.diagramContainer.style.height=Math.max(20,G+mxEvent.getClientY(C)-B)+"px",R=!0);R&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(C){null==A&&null==B||mxEvent.consume(C);B=A=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility=
-"hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";k.style.visibility="hidden";d.style.visibility="hidden";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(C){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(C){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility=
-"hidden";this.rightResizer.style.visibility="hidden";k.style.visibility="hidden";d.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var k=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect",
-"off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=
-!0;l.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(A){var B=mxEvent.getSource(A);null==k.container||!k.isEnabled()||k.isMouseDown||k.isEditing()||null!=this.dialog||"INPUT"==B.nodeName||"TEXTAREA"==B.nodeName||"true"==B.contentEditable||224!=A.keyCode&&(mxClient.IS_MAC||17!=A.keyCode)&&(!mxClient.IS_MAC||91!=A.keyCode&&93!=A.keyCode)||
-n||(l.style.left=k.container.scrollLeft+10+"px",l.style.top=k.container.scrollTop+10+"px",A=k.container.scrollLeft,B=k.container.scrollTop,k.container.appendChild(l),n=!0,l.focus(),document.execCommand("selectAll",!1,null),k.container.scrollLeft=A,k.container.scrollTop=B)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(A){var B=A.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=B&&17!=B&&91!=B&&93!=B||(n=!1,k.isEditing()||null!=this.dialog||null==k.container||k.container.focus(),
-l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(A){if(k.isEnabled())try{mxClipboard.copy(k),this.copyCells(l),d()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(A){if(k.isEnabled())try{mxClipboard.copy(k),this.copyCells(l,!0),d()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(A){if(k.isEnabled()&&!k.isCellLocked(k.getDefaultParent()))try{if(l.innerHTML=
-"&nbsp;",l.focus(),null!=A.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(A,l,!0,!0)),!mxEvent.isConsumed(A)){var B=k.container.scrollLeft,I=k.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{k.container.scrollLeft=B,k.container.scrollTop=I,Graph.removePasteFormatting(l.firstChild),this.pasteCells(A,l,!1,!0)}catch(G){this.handleError(G)}}),0)}}catch(G){this.handleError(G)}}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=function(A){return mxEvent.getSource(A)==
-l?!0:x.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,k){mxSettings.setUi(d);(k=this.doSetCurrentTheme(d)||k)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=function(d,k){if(null==d||""==d)d=App.isSimpleThemePreferred()?"simple":"kennedy";var l="simple"==Editor.currentTheme&&this.isDefaultTheme(d)||this.isDefaultTheme(Editor.currentTheme)&&
-"simple"==d||d==Editor.currentTheme;if(l||k)k=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=d,this.switchTheme(d),this.fireEvent(new mxEventObject("currentThemeChanged")),this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(k);return l};EditorUi.prototype.saveScrollState=function(d){var k=this.editor.graph.view.translate,l=this.diagramContainer.scrollLeft,n=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?
-(l-=this.embedViewport.x,n-=this.embedViewport.y):(l+=this.embedViewport.x,n+=this.embedViewport.y));k={x:l,y:n,tx:k.x,ty:k.y};d&&(k.boundingRect=this.diagramContainer.getBoundingClientRect());return k};EditorUi.prototype.restoreScrollState=function(d){var k=this.editor.graph.view.scale,l=this.editor.graph.view.translate;if(null!=d.boundingRect){var n=this.diagramContainer.getBoundingClientRect();d.x-=d.boundingRect.x-n.x;d.y-=d.boundingRect.y-n.y}this.diagramContainer.scrollLeft=d.x+(l.x-d.tx)*k;
-this.diagramContainer.scrollTop=d.y+(l.y-d.ty)*k};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var k=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||k||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==
-Editor.currentTheme){var n=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;k=null!=n&&null!=n.getAttribute("class");if(!k&&null!=n){n=n.getAttribute("title");var x=this.getCurrentFile();x=null!=x?x.savingStatusKey:DrawioFile.prototype.savingStatusKey;n==mxResources.get(x)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(x))+'..."src="'+Editor.tailSpin+'"></div>',
-k=!0)}this.statusContainer.style.display="none";n=32>=d.clientWidth;d.style.visibility=n&&""==this.editor.getStatus()?"hidden":"";if(n||k)this.statusContainer.style.display="",k=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(d){this.destroyWindows(!0);this.updateDefaultStyles();
-this.switchThemeConstants(d);this.switchCssForTheme(d);this.createMainMenuForTheme(d);this.createFooterMenuForTheme(d);this.createPickerMenuForTheme(d);this.createMenubarForTheme(d);"sketch"==d&&(this.createFormatWindow(),this.createShapesWindow())};EditorUi.prototype.getWindows=function(){var d=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(d=d.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(d=d.concat([this.menus.tagsWindow,this.menus.findWindow,
-this.menus.findReplaceWindow,this.menus.commentsWindow]));return d};EditorUi.prototype.fitWindows=function(){for(var d=this.getWindows(),k=0;k<d.length;k++)null!=d[k]&&d[k].window.fit()};EditorUi.prototype.hideWindows=function(){for(var d=this.getWindows(),k=0;k<d.length;k++)null!=d[k]&&d[k].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(d){null==this.sidebarWindow||d||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||d||(this.formatWindow.destroy(),
-this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=
-null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(d){var k=this.editor.graph;k.defaultEdgeLength=Graph.prototype.defaultEdgeLength;k.defaultGridEnabled=Graph.prototype.defaultGridEnabled;k.defaultPageVisible=
-Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=d&&"sketch"!=d);if("simple"==d||"sketch"==d){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)k.defaultEdgeLength=120;null==urlParams.grid&&(k.defaultGridEnabled=!1);null==urlParams.pv&&(k.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||
-Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(d){};EditorUi.prototype.createMainMenuForTheme=function(d){};EditorUi.prototype.createFooterMenuForTheme=function(d){};EditorUi.prototype.createPickerMenuForTheme=function(d){};EditorUi.prototype.getNetworkStatus=function(){var d=null;if(this.isOffline(!0))d=mxResources.get("offline");else{var k=this.getCurrentFile();null!=k&&(k.invalidChecksum?d=mxResources.get("error")+": "+mxResources.get("checksum"):null==k.sync||k.sync.enabled&&
-k.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==k.sync||k.sync.isConnected()?k.isRealtimeEnabled()&&k.isRealtimeSupported()&&1<k.getRealtimeState()&&(d=k.getRealtimeError(),d=mxResources.get("realtimeCollaboration")+": "+(null!=d&&null!=d.message?d.message:mxResources.get("error"))):d=mxResources.get("notConnected"):d=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return d};EditorUi.prototype.createMenubarForTheme=function(d){null!=this.statusContainer&&
-(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(d,
-k,l,n){l=null!=l?l:"geButton";var x=this.menus.get(d);n=this.menubar.addMenu(mxResources.get(d),x.funct,null,n);n.className=l;n.setAttribute("title",mxResources.get(d));this.menus.menuCreated(x,n,l);null!=k&&(n.style.backgroundImage="url("+k+")",n.innerText="");return n};EditorUi.prototype.addButton=function(d,k,l,n){d=this.createToolbarButton(d,k,l);n=null!=n?n:this.container;n.appendChild(d);return d};EditorUi.prototype.createToolbarButton=function(d,k,l){var n=document.createElement("a");n.className=
-"geButton";null!=d&&"data:"==d.substring(0,5)&&(n.style.backgroundImage="url("+d+")");null!=k&&n.setAttribute("title",k);null!=l&&mxEvent.addListener(n,"click",function(x){"disabled"!=n.getAttribute("disabled")&&l(x);mxEvent.consume(x)});mxEvent.preventDefault(n);return n};EditorUi.prototype.createMenuItem=function(d,k,l){var n=this.actions.get(d),x=null!=n?n.funct:null,A=this.createToolbarButton(k,mxResources.get(d)+(null!=n&&null!=n.shortcut?" ("+n.shortcut+")":""),x);null==n||l||(d=function(){n.isEnabled()?
-A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",d),n.addListener("stateChanged",d),d());return A};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=this,k=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),l="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),
-k,60,240,l,mxUtils.bind(this,function(A){A.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var n=this.formatWindow.window.toggleMinimized,x=240;this.formatWindow.window.toggleMinimized=function(){n.apply(this,arguments);this.minimized?(x=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+x-140+"px"):(this.div.style.width=
-x+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-x+140)+"px");d.format.refresh();this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(A){mxEvent.getSource(A)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var A=
-window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,B=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>A||690>B)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var y=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(d){var k=this.formatWindow;null!=k?k.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):
-y.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(d){if(this.isShapesPanelVisible()!=d){var k=EditorUi.prototype.hsplitPosition;0==k&&(k=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));var l=this.hsplitPosition,n=mxUtils.bind(this,function(){this.hsplitPosition=x;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),x=d?k:0,A=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(0)":"translateX(-100%)");
-0!=x&&n();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform "+A+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,
-"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==x&&n()}),1E3*A)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var H=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():H.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(d){var k=mxUtils.bind(this,function(B,I){var G=this.menus.get(B);B=this.createMenuElement(I,
-mxUtils.bind(this,function(){G.funct.apply(this,arguments)}));B.setAttribute("title",I);B.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";B.className="geButton";d.parentNode.appendChild(B);return B});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))k=document.createElement("div"),k.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",
-k.className="geButton",k.style.left="0px",k.style.right="50%",mxUtils.write(k,mxResources.get("newLibrary")),d.appendChild(k),mxEvent.addListener(k,"click",this.actions.get("newLibrary").funct),k=k.cloneNode(!1),k.style.left="50%",k.style.right="0px",mxUtils.write(k,mxResources.get("openLibrary")),d.appendChild(k),mxEvent.addListener(k,"click",this.actions.get("openLibrary").funct);else{var l=k("newLibrary","");l.style.left="0px";l.style.right="50%";var n=document.createElement("span");l.appendChild(n);
-var x=k("openLibraryFrom","");x.style.borderLeftWidth="1px";x.style.left="50%";x.style.right="0px";var A=document.createElement("span");x.appendChild(A);this.dependsOnLanguage(mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,mxResources.get("newLibrary"));l.setAttribute("title",mxResources.get("newLibrary"));A.innerHTML="";mxUtils.write(A,mxResources.get("openLibraryFrom"));x.setAttribute("title",mxResources.get("openLibraryFrom"))}))}d.appendChild(this.sidebar.container);d.style.overflow=
-"hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),k="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-
-k)/2):56,d-6,k-6,mxUtils.bind(this,function(n){this.createShapesPanel(n)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};EditorUi.prototype.setAndPersistDarkMode=
-function(d){var k=d;"auto"==d&&(k=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(k);mxSettings.settings.darkMode=d;mxSettings.save();d=mxSettings.getUi();null==urlParams.ui&&"dark"==d&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(d){this.spinner.spin(document.body,mxResources.get("working"))&&(mxSettings.setLanguage(d),mxSettings.save(),mxClient.language=d,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,
-null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(d,k){this.dependsOnLanguage(mxUtils.bind(this,function(){d.setAttribute("title",mxResources.get(k))}))};EditorUi.prototype.dependsOnLanguage=function(d){d();this.addListener("languageChanged",d)};EditorUi.prototype.setAndPersistHighContrast=function(d){this.setHighContrast(d);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=d,mxSettings.save())};
-EditorUi.prototype.isHighContrast=function(){var d=document.getElementById("high-contrast-stylesheet");return null!=d&&window.matchMedia?(d=d.getAttribute("media"),"all"==d||"not all"!=d&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(d){var k=document.getElementById("high-contrast-stylesheet");if(null!=k&&window.matchMedia){var l=window.matchMedia("(forced-colors: active)").matches,n=k.getAttribute("media");(n="all"==n||"not all"!=n&&l)&&!d?
-k.setAttribute("media",l?"not all":"(forced-colors: active)"):!n&&d&&k.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(d){var k=this.getDiagramContainerOffset();mxSettings.setRulerOn(d);mxSettings.save();d||null==this.ruler?d&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.fireEvent(new mxEventObject("rulerVisibleChanged"));
-d=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=d.x-k.x;this.diagramContainer.scrollTop+=d.x-k.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(d){return!d&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(d){mxUtils.lightDarkColorSupported&&(Editor.darkMode=d,d=mxUtils.isAncestorNode(document.body,this.container)||
-null==this.editor?this.container:this.editor.graph.container,mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff",null!=d&&(Editor.isDarkMode()?(d.classList.add("geDarkMode"),d.style.colorScheme="dark"):(d.classList.remove("geDarkMode"),d.style.colorScheme="light")),null!=this.ruler&&this.ruler.updateStyle(),this.fireEvent(new mxEventObject("darkModeChanged")))};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=
-d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,k){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,Editor.isSettingsEnabled()&&k&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState(!0))),
-(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:d,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var d=this.sketchFooterMenuElt,k=this.sketchMainMenuElt,l=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)k.style.left="10px",k.style.top="10px",l.style.left="10px",l.style.top="60px",d.style.top="10px",d.style.right="12px",d.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",
-this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var n=this.diagramContainer.getAttribute("data-bounds");if(null!=n){this.diagramContainer.removeAttribute("data-bounds");
-var x=n.split(" ");n=mxUtils.getDocumentSize();this.diagramContainer.style.top=x[0];this.diagramContainer.style.left=x[1];var A=parseInt(x[2]);x=parseInt(x[3]);A=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,A):A,n.width-80);x=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,x):x,n.height-80);this.diagramContainer.style.width=A+"px";this.diagramContainer.style.height=x+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||
-window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}k.style.left=this.diagramContainer.offsetLeft+"px";k.style.top=this.diagramContainer.offsetTop-k.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";d.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-d.offsetWidth+"px";d.style.top=k.style.top;d.style.right=
-"";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-
-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;k.style.visibility="";d.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(d){Editor.sketchMode!=d&&(Editor.sketchMode=d,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);d.defaultEdgeStyle=
-mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(d.vertexFontSize=16,d.edgeFontSize=d.vertexFontSize-4):"sketch"==Editor.currentTheme?(d.vertexFontSize=20,d.edgeFontSize=d.vertexFontSize-4):(d.vertexFontSize=Graph.prototype.vertexFontSize,d.edgeFontSize=Graph.prototype.edgeFontSize),d.defaultEdgeStyle.fontSize=d.edgeFontSize;if(null==Editor.config||
-null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.endSize="8",d.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.jettySize="auto",d.defaultEdgeStyle.orthogonalLoop="1",d.defaultEdgeStyle.endArrow="open",d.defaultEdgeStyle.endSize=
-"14",d.defaultEdgeStyle.startSize="14",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultEdgeStyle.fontFamily=
-Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(d.defaultVertexStyle.sketch="1",d.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultVertexStyle.hachureGap="4",d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==
-Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(d){var k=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var l=d.indexOf(",");0<l&&(k=this.getPageById(d.substring(l+1)),k=null!=k?k.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,
-5)&&(k=this.getCustomLinkTitle(d));return k};EditorUi.prototype.getCustomLinkTitle=function(d){var k=mxResources.get("action");if("data:action/json,"==d.substring(0,17))try{var l=JSON.parse(d.substring(17));null!=l&&null!=l.title&&(k=l.title)}catch(n){}return k};EditorUi.prototype.handleCustomLink=function(d,k){if(Graph.isPageLink(d))if(k=d.indexOf(","),d=this.getPageById(d.substring(k+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(d,
-k)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var d=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(k){k.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(k){}this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(k,l){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));d.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(k,l){mxSettings.setCreateTarget(d.connectionHandler.isCreateTarget());mxSettings.save()}));
-d.pageFormat=null!=d.defaultPageFormat?d.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(k,l){mxSettings.setPageFormat(d.pageFormat);mxSettings.save()}));d.view.defaultDarkGridColor=mxSettings.getGridColor(!0);d.view.defaultGridColor=mxSettings.getGridColor(!1);d.view.gridColor="light-dark("+d.view.defaultGridColor+", "+d.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(k,l){mxSettings.setGridColor(d.view.defaultGridColor,
-!1);mxSettings.setGridColor(d.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(k,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",
-mxUtils.bind(this,function(k,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));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.writeImageToClipboard=function(d,k,l,n,x,A){n=null!=n?n:"image/png";var B=null==k||null==l?'<img src="'+d+'">':'<img src="'+d+'" width="'+k+'" height="'+l+'">',I={"text/html":new Blob([B],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(n)&&(I[n]=this.base64ToBlob(d.substring(d.indexOf(",")+1),n));var G=new ClipboardItem(I);
-navigator.clipboard.write([G]).then(x)["catch"](A);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[d],"w",k,"h",l,"type",n,"html",[B],"data",[I],"item",[G])};EditorUi.prototype.writeHtmlToClipboard=function(d,k){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(d)],{type:"text/plain"}),"text/html":new Blob([d],{type:"text/html"})})])["catch"](k)};EditorUi.prototype.writeTextToClipboard=function(d,k){navigator.clipboard.writeText(d)["catch"](k)};
-EditorUi.prototype.copySvg=function(d,k,l){try{if(null!=navigator.clipboard&&"function"===typeof window.ClipboardItem){var n=this.editor.graph.getSvg(null,l,null,null,null,null,null,null,null,null,null,null,null,0<d.length?d:null);n.setAttribute("content",k);var x=Editor.createSvgDataUri(mxUtils.getXml(n)),A=parseInt(n.getAttribute("width")),B=parseInt(n.getAttribute("height"));this.writeImageToClipboard(x,A,B,"image/svg+xml",null,mxUtils.bind(this,function(I){this.handleError(I)}))}}catch(I){this.handleError(I)}};
-EditorUi.prototype.copyImage=function(d,k,l){try{l=null!=l?l:4,null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(n,x){try{this.spinner.stop();var A=this.createImageDataUri(n,k,"png"),B=Math.round(parseInt(x.getAttribute("width"))/l),I=Math.round(parseInt(x.getAttribute("height"))/l);EditorUi.debug("EditorUi.copyImage",[this],"cells",[d],"xml",[k],"scale",[l]);this.writeImageToClipboard(A,
-B,I,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var G=this.getBaseFilename(!1)+(null!=k?".drawio":"")+".png";this.saveLocalFile(A.substring(A.lastIndexOf(",")+1),G,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(G){this.handleError(G)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,null,l,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,
-null,!1,null,0<d.length?d:null)}catch(n){this.handleError(n)}};EditorUi.prototype.copyCells=function(d,k){var l=this.editor.graph;if(l.isSelectionEmpty())d.innerText="";else{var n=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),x=mxUtils.getXml(l.encodeCells(n));mxUtils.setTextContent(d,encodeURIComponent(x));k?(l.removeCells(n,!1),l.lastPasteXml=null):(l.lastPasteXml=x,l.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=
-null;if(Editor.enableNativeClipboard){var k=this.editor.graph;k.isSelectionEmpty()||(d=mxUtils.sortCells(k.getExportableCells(k.model.getTopmostCells(k.getSelectionCells()))),k=mxUtils.getXml(k.encodeCells(d)),navigator.clipboard.writeText(k))}return d};EditorUi.prototype.pasteXml=function(d,k,l,n,x,A){EditorUi.debug("EditorUi.pasteXml",[this],"xml",[d],"pasteAsLabel",[k],"compat",[l],"evt",[n],"html",[x],"pt",[A]);x=null!=x?x:!0;var B=this.editor.graph,I=null!=A?A:Editor.pasteAtMousePointer&&B.isMouseInsertPoint()?
-B.getInsertPoint():null;A=null;B.lastPasteXml==d?null==I&&B.pasteCounter++:(B.lastPasteXml=d,B.pasteCounter=0);var G=B.pasteCounter*B.gridSize;if(l||this.isCompatibleString(d)){B.model.beginUpdate();try{if(A=this.importXml(d,G,G),null!=I){var C=B.getBoundingBoxFromGeometry(A,!0);if(null!=C){var R=Math.round(B.snap(I.x)),T=Math.round(B.snap(I.y));B.cellsMoved(A,R-C.x,T-C.y)}}}finally{B.model.endUpdate()}B.setSelectionCells(A)}else if(k&&1==B.getSelectionCount()){k=B.getStartEditingCell(B.getSelectionCell(),
-n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==B.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])B.setCellStyles(mxConstants.STYLE_IMAGE,d,[k]);else{B.model.beginUpdate();try{B.labelChanged(k,d),Graph.isLink(d)&&B.setLinkForCell(k,d)}finally{B.model.endUpdate()}}B.setSelectionCell(k)}else I=null!=I?I:B.getInsertPoint(),B.isMouseInsertPoint()&&(G=0,B.lastPasteXml==d&&0<B.pasteCounter&&B.pasteCounter--),A=this.insertTextAt(d,I.x+G,I.y+G,x),B.setSelectionCells(A);B.isSelectionEmpty()||(B.scrollCellToVisible(B.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(B.view.getState(B.getSelectionCell())));return A};EditorUi.prototype.pasteCells=function(d,k,l,n){if(!mxEvent.isConsumed(d)){var x=d.clipboardData,A=this.editor.graph,B=!1,I=k;if(l&&null!=x&&x.getData){var G=x.getData("text/plain"),C=!1;if(null!=G&&0<G.length&&"%3CmxGraphModel%3E"==G.substring(0,18))try{var R=decodeURIComponent(G);this.isCompatibleString(R)&&(C=!0,G=R)}catch(J){}C=C?null:x.getData("text/html");null!=C&&0<C.length?(I=this.parseHtmlData(C),
-B="text/plain"!=I.getAttribute("data-type")):null!=G&&0<G.length&&(I=document.createElement("div"),mxUtils.setTextContent(I,C))}G=I.getElementsByTagName("span");if(null!=G&&0<G.length&&"application/vnd.lucid.chart.objects"===G[0].getAttribute("data-lucid-type"))l=G[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(J){var K=this.editor.graph;K.lastPasteXml==J?K.pasteCounter++:(K.lastPasteXml=J,K.pasteCounter=0);var m=K.pasteCounter*K.gridSize;
-K.setSelectionCells(this.importXml(J,m,m));K.scrollCellToVisible(K.getSelectionCell())}),mxUtils.bind(this,function(J){this.handleError(J)})),mxEvent.consume(d));else{var T=!1,S="";S=B?null!=I.textContent&&"<mxfile"==I.textContent.substring(0,7)&&"</mxfile>"==I.textContent.substring(I.textContent.length-9)||"<mxGraphModel"==I.textContent.substring(0,13)&&"</mxGraphModel>"==I.textContent.substring(I.textContent.length-15)?I.textContent.replace(/\u00a0/g," "):I.innerHTML:mxUtils.trim(null==I.innerText?
-mxUtils.getTextContent(I):I.innerText);try{var Q=S.lastIndexOf("%3E");0<=Q&&Q<S.length-3&&(S=S.substring(0,Q+3))}catch(J){}try{G=I.getElementsByTagName("span"),(R=null!=G&&0<G.length?mxUtils.trim(decodeURIComponent(G[0].textContent)):decodeURIComponent(S))&&(this.isCompatibleString(R)||0==R.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(T=!0,S=R)}catch(J){}R=null;try{if(!T&&""==I.textContent)for(Q=0;Q<x.items.length;Q++){var v=x.items[Q];if("file"===v.kind){R=v.getAsFile();break}}}catch(J){}EditorUi.debug("EditorUi.pasteCells",
-[this],"evt",[d],"realElt",[k.outerHTML],"elt",[I.outerHTML],"useEvent",l,"pasteAsLabel",n,"xml",[S],"compat",T,"asHtml",B,"data",x,"items",[x.items.length],"files",[x.files.length],"types",[JSON.stringify(x.types)],"blob",[R]);try{if(T||null==R)if(null!=S&&0<S.length){if(0==S.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var N=mxUtils.bind(this,function(){try{S=(new MiroImporter).importMiroJson(JSON.parse(S)),this.pasteXml(S,n,T,d)}catch(J){console.log("Miro import error:",J)}});
-"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",N):N()}else this.pasteXml(S,n,T,d,B);mxEvent.consume(d)}else l||(A.lastPasteXml=null,A.pasteCounter=0);else{var z=A.getInsertPoint();this.importFiles([R],z.x,z.y,this.maxImageSize);mxEvent.consume(d)}}catch(J){this.handleError(J)}}}k.innerHTML="&nbsp;"};EditorUi.prototype.pasteFromClipboard=function(d){var k=this.editor.graph;if(k.isEnabled()&&!k.isCellLocked(k.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,
-function(l,n,x,A,B){if(null!=l){k.getModel().beginUpdate();try{this.pasteXml(l,!0,null,null,null,d)}finally{k.getModel().endUpdate()}}else l=null!=n?n:null!=x?x:A,null!=l?(d=null!=d?d:k.getInsertPoint(),this.importFiles([l],d.x,d.y,this.maxImageSize)):this.pasteFromLocalClipboard(d)})):this.pasteFromLocalClipboard(d)}catch(l){}};EditorUi.prototype.pasteFromLocalClipboard=function(d){var k=this.editor.graph;k.getModel().beginUpdate();try{k.moveCellsTo(mxClipboard.paste(k),d)}finally{k.getModel().endUpdate()}};
-EditorUi.prototype.installImagePasteHandler=function(){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(k){for(var l=null!=k.clipboardData?k.clipboardData:k.originalEvent.clipboardData,n=!1,x=null,A=0;A<l.types.length;A++)if("text/"===l.types[A].substring(0,5)){n=!0;break}for(A=0;A<l.items.length;A++){var B=l.items[A];if("file"===B.kind){x=B.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[k],"data",[l],"items",[l.items.length],"files",
-[l.files.length],"types",[JSON.stringify(l.types)],"containsText",n,"file",[x],"editing",d.isEditing());var I=mxUtils.bind(this,function(){try{if(!n&&null!=x){if(d.isEditing())this.importFiles([x],0,0,this.maxImageSize,function(C,R,T,S,Q,v){d.insertImage(C,Q,v)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var R=0;R<C.length;R++)C[R]()});else{var G=this.editor.graph.getInsertPoint();this.importFiles([x],G.x,G.y,this.maxImageSize)}mxEvent.consume(k)}}catch(C){}});
-if(!mxEvent.isConsumed(k)&&!n)if(Editor.enableNativeClipboard)navigator.clipboard.read().then(mxUtils.bind(this,function(G){this.readTypeFromClipboardData(G,"image/svg+xml",mxUtils.bind(this,function(C){if(null!=C){C=new Blob([C],{type:"image/svg+xml"});var R=this.editor.graph.getInsertPoint();this.importFiles([C],R.x,R.y,this.maxImageSize)}else I()}),"image")}))["catch"](I);else I()}),!1)};EditorUi.prototype.readGraphModelFromClipboard=function(d){navigator.clipboard.read().then(mxUtils.bind(this,
-function(k){try{EditorUi.debug("EditorUi.readGraphModelFromClipboard",[this],"data",k,"types",null!=k&&0<k.length?[JSON.stringify(k[0].types)]:[]),this.readGraphModelFromHtmlClipboardData(k,mxUtils.bind(this,function(l,n){null!=l?d(l):this.readGraphModelFromImageClipboardData(k,mxUtils.bind(this,function(x,A,B){null!=x?d(x):this.readTypeFromClipboardData(k,"text/plain",mxUtils.bind(this,function(I){d(I,A,B,n,k)}))}))}))}catch(l){d(null)}}))["catch"](function(){d(null)})};EditorUi.prototype.readGraphModelFromHtmlClipboardData=
-function(d,k){this.readTypeFromClipboardData(d,"text/html",mxUtils.bind(this,function(l){var n=null,x=null;try{var A=this.parseHtmlData(l);if(null!=A){n="text/plain"!=A.getAttribute("data-type")?A.innerHTML:mxUtils.trim(null==A.innerText?mxUtils.getTextContent(A):A.innerText);try{var B=n.lastIndexOf("%3E");0<=B&&B<n.length-3&&(n=n.substring(0,B+3))}catch(C){}try{null==n&&(l=null,""==A.textContent&&1==A.children.length&&"IMG"==A.firstChild.nodeName&&(l=A.firstChild.getAttribute("src")),null!=l&&0<
-l.length&&("data:image/png;base64,"==l.substring(0,22)?x=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/png"):"data:image/svg+xml;base64,"==l.substring(0,26)&&(x=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/svg+xml"))))}catch(C){}try{var I=A.getElementsByTagName("span"),G=null!=I&&0<I.length?mxUtils.trim(decodeURIComponent(I[0].textContent)):decodeURIComponent(n);this.isCompatibleString(G)&&(n=G)}catch(C){}}}catch(C){}k(this.isCompatibleString(n)?n:null,x)}))};EditorUi.prototype.readGraphModelFromImageClipboardData=
-function(d,k){this.readTypeFromClipboardData(d,"image/svg+xml",mxUtils.bind(this,function(l,n){var x=null;try{null!=l&&(x=mxUtils.parseXml(l).documentElement.getAttribute("content"))}catch(A){}this.isCompatibleString(x)?k(x):this.readTypeFromClipboardData(d,"image/png",mxUtils.bind(this,function(A,B){x=Editor.extractGraphModelFromPng("data:image/png;base64,"+A);this.isCompatibleString(x)?k(x):k(null,n,B)}))}))};EditorUi.prototype.readTypeFromClipboardData=function(d,k,l){var n=!1;if(null!=d&&0<d.length)for(var x=
-0;x<d.length&&!n;x++)(function(A){0<=mxUtils.indexOf(A.types,k)&&(n=!0,A.getType(k).then(mxUtils.bind(this,function(B){if("image/png"==k)B.arrayBuffer().then(function(I){l(btoa(Graph.arrayBufferToString(I)),B)})["catch"](function(){l(null)});else B.text().then(mxUtils.bind(this,function(I){EditorUi.debug("EditorUi.readTypeFromClipboardData",[this],"data",[d],"type",[k],"result",[I]);l(I,B)}))["catch"](function(){l(null)})}))["catch"](function(){l(null)}))})(d[x]);n||l()};EditorUi.prototype.parseHtmlData=
-function(d){var k=null;if(null!=d&&0<d.length){var l="<meta "==d.substring(0,6);k=document.createElement("div");k.innerHTML=(l?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(d);asHtml=!0;l=k.getElementsByTagName("style");if(null!=l)for(;0<l.length;)l[0].parentNode.removeChild(l[0]);if(null!=k.firstChild&&k.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=k.firstChild.nextSibling&&k.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==k.firstChild.nodeName&&"A"==k.firstChild.nextSibling.nodeName&&
-null==k.firstChild.nextSibling.nextSibling){var n=null==k.firstChild.nextSibling.innerText?mxUtils.getTextContent(k.firstChild.nextSibling):k.firstChild.nextSibling.innerText;n==k.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(k,n),asHtml=!1)}if(""==k.textContent&&(l=k.getElementsByTagName("img"),1==l.length&&(n=l[0].getAttribute("src"),l=null,null!=n))){if(Editor.isPngDataUrl(n)){var x=Editor.extractGraphModelFromPng(n);null!=x&&0<x.length&&(l=x)}else if("data:image/svg+xml;base64,"==
-n.substring(0,26)){img=this.base64ToBlob(n.substring(n.indexOf(",")+1),"image/svg+xml");n=Graph.getSvgFromDataUri(n);try{x=mxUtils.parseXml(n).documentElement.getAttribute("content"),this.isCompatibleString(x)&&(l=x)}catch(A){}}null!=l&&(mxUtils.setTextContent(k,l),asHtml=!1)}asHtml?Graph.removePasteFormatting(k):k.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[d],"elt",[k],"asHtml",asHtml);return k};EditorUi.prototype.showPrintDialog=function(d,k,l){var n=
-330;this.editor.graph.isEnabled()&&(n+=40);null!=this.pages&&1<this.pages.length&&(n+=40,this.editor.graph.isEnabled()||(n+=10));null==k||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(n+=20);this.showDialog((new PrintDialog(this,d,k,l)).container,320,n,!0,!0)};EditorUi.prototype.print=function(d,k){var l=this.editor,n=l.graph,x=this.getPageIndex(this.currentPage),A=null!=x?x+1:1,B=mxUtils.bind(this,function(J,K,m,t){var D=J.useCssTransforms,M=J.currentTranslate,L=J.currentScale,O=J.view.translate,
-P=J.view.scale;J.useCssTransforms&&(J.useCssTransforms=!1,J.currentTranslate=new mxPoint(0,0),J.currentScale=1,J.view.translate=new mxPoint(0,0),J.view.scale=1);var U=J.getGraphBounds(),V=0,X=0,W=mxRectangle.fromRectangle(J.pageFormat),Y=k.fit||k.crop||!J.pageVisible,Z=k.scale;W.width=Math.ceil(W.width*J.pageScale);W.height=Math.ceil(W.height*J.pageScale);var aa=1;if(k.fit){aa=k.sheetsAcross;var fa=k.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));aa=Math.min(W.height*
-fa/(U.height/J.view.scale),W.width*aa/(U.width/J.view.scale))}else aa=isNaN(Z)?1:Z;aa*=1;!Y&&J.pageVisible?(Z=J.getPageLayout(),V-=Z.x*W.width,X-=Z.y*W.height):Y=!0;k.crop&&(k.selection&&(U=n.getBoundingBox(n.getSelectionCells())),W.width=(U.width+1)*aa/J.view.scale,W.height=(U.height+1)*aa/J.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);t=null!=t?"page/id,"+t:null;if(null==K){K=PrintDialog.createPrintPreview(J,aa,null,0,V,X,Y);K.title=this.getBaseFilename(!0);K.pageSelector=
-!1;K.mathEnabled=!1;V=k.border;isNaN(V)||(K.pageMargin=V);k.selection&&(K.isCellVisible=function(ka){return J.isCellSelected(ka)});var ea=K.writeHead;K.writeHead=function(ka,ba){ba=null!=ba?ba:"";k.shadows||(ba+='g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');mxClient.IS_GC&&(ba+="@media print {\n .MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=l.fontCss&&(ba+=l.fontCss);ea.apply(this,arguments);for(var ia=J.getCustomFonts(),la=0;la<ia.length;la++){var da=ia[la].name,
-ra=ia[la].url;Graph.isCssFontUrl(ra)?ka.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(ra))+'" charset="UTF-8" type="text/css">'):(ka.writeln('<style type="text/css">'),ka.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(da)+'";\nsrc: url("'+mxUtils.htmlEntities(ra)+'");\n}'),ka.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=K.drawBackgroundImage;K.drawBackgroundImage=function(ka){ca.apply(this,arguments);null!=ka.node&&(EditorUi.embedSvgImages(ka.node),
-n.disableSvgLinks(ka.node,function(ba){ba.setAttribute("href","javascript:void(0)")}))}}var ha=K.addGraphFragment;K.addGraphFragment=function(ka,ba,ia,la,da,ra){ha.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:da.classList.add("geDisableMathJax");if(this.graph.shadowVisible)for(var pa=da.getElementsByTagName("svg"),sa=0;sa<pa.length;sa++)J.addSvgShadow(pa[sa])};k.grid&&(K.gridSize=J.gridSize,K.gridSteps=J.view.gridSteps,K.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:
-J.view.gridColor);K.open(null,null,m,!0,t,W,k.selection?J.getSelectionCells():null)}else{U=J.background;if(null==U||""==U||U==mxConstants.NONE)U="#ffffff";K.backgroundColor=U;K.autoOrigin=Y;k.grid&&(K.gridSize=J.gridSize,K.gridSteps=J.view.gridSteps,K.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:J.view.gridColor);K.appendGraph(J,aa,V,X,m,!0,t,W,k.selection?J.getSelectionCells():null);m=J.getCustomFonts();if(null!=K.wnd)for(W=0;W<m.length;W++)V=m[W].name,X=m[W].url,Graph.isCssFontUrl(X)?
-K.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(X)+'" charset="UTF-8" type="text/css">'):(K.wnd.document.writeln('<style type="text/css">'),K.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(V)+'";\nsrc: url("'+mxUtils.htmlEntities(X)+'");\n}'),K.wnd.document.writeln("</style>"))}D&&(J.useCssTransforms=D,J.currentTranslate=M,J.currentScale=L,J.view.translate=O,J.view.scale=P);return K}),I=k.pagesFrom,G=k.pagesTo,C=!k.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,
-k);else{C&&(C=k.selection||I==A&&G==A);if(!C&&null!=this.pages&&this.pages.length){C=0;A=this.pages.length-1;k.allPages||(C=parseInt(I)-1,A=parseInt(G)-1);for(var R=C;R<=A;R++){var T=this.pages[R];I=T==this.currentPage?n:null;if(null==I){I=this.createTemporaryGraph(n.stylesheet);I.shapeForegroundColor=n.shapeForegroundColor;I.shapeBackgroundColor=n.shapeBackgroundColor;G=!0;var S=C=!1,Q=null,v=null;null==T.viewState&&null==T.root&&this.updatePageRoot(T);null!=T.viewState&&(G=T.viewState.pageVisible,
-C=T.viewState.mathEnabled,S=T.viewState.shadowVisible,Q=T.viewState.background,v=T.viewState.backgroundImage,I.pageFormat=T.viewState.pageFormat,I.gridSize=T.viewState.gridSize);null!=v&&null!=v.originalSrc&&(v=this.createImageForPageLink(v.originalSrc,T));I.background=Q;I.backgroundImage=null!=v?new mxImage(v.src,v.width,v.height,v.x,v.y):null;I.pageVisible=G;I.mathEnabled=C;I.shadowVisible=S;var z=I.getGraphBounds;I.getGraphBounds=function(){var J=z.apply(this,arguments),K=this.backgroundImage;
-if(null!=K&&null!=K.width&&null!=K.height){var m=this.view.translate,t=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((m.x+K.x)*t,(m.y+K.y)*t,K.width*t,K.height*t))}return J};var N=I.getGlobalVariable;I.getGlobalVariable=function(J){return"page"==J?T.getName():"pagenumber"==J?R+1:"pagecount"==J?null!=this.pages?this.pages.length:1:N.apply(this,arguments)};document.body.appendChild(I.container);this.updatePageRoot(T);I.model.setRoot(T.root)}x=B(I,x,R!=A,T.getId());I!=n&&I.container.parentNode.removeChild(I.container)}}else x=
-B(n);null==x||null==x.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(x.mathEnabled&&(B=x.wnd.document,d||(x.wnd.IMMEDIATE_PRINT=!0),B.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),x.closeDocument(),Graph.rewritePageLinks(x.wnd.document,!0),x.mathEnabled||d||PrintDialog.printPreview(x));return x}};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var k=null,l=0;l<d.length;l++)mxEvent.addListener(d[l],"dragleave",function(n){null!=
-k&&(k.parentNode.removeChild(k),k=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(d[l],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==k&&(k=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(d[l],"drop",mxUtils.bind(this,function(n){null!=k&&(k.parentNode.removeChild(k),k=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 x=this.extractGraphModelFromEvent(n);if(null==x){var A=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=A&&(10==document.documentMode||11==document.documentMode?x=A.getData("Text"):(x=null,x=0<=mxUtils.indexOf(A.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(A.types,"text/html")?
-A.getData("text/html"):null,null!=x&&0<x.length?(A=document.createElement("div"),A.innerHTML=Graph.sanitizeHtml(x),A=A.getElementsByTagName("img"),0<A.length&&(x=A[0].getAttribute("src"))):0<=mxUtils.indexOf(A.types,"text/plain")&&(x=A.getData("text/plain"))),null!=x&&(Editor.isPngDataUrl(x)?(x=Editor.extractGraphModelFromPng(x),null!=x&&0<x.length&&this.openLocalFile(x,null,!0)):this.isRemoteFileFormat(x)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,
-"format=xml&data="+encodeURIComponent(x))).send(mxUtils.bind(this,function(B){200<=B.getStatus()&&299>=B.getStatus()?this.openLocalFile(B.getText(),null,!0):this.showError(mxResources.get("error"),413==B.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(x)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(x):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+
-"#U"+encodeURIComponent(x)))))}else this.openLocalFile(x,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var k=0,l=0;if(null==d){var n=document.body;var x=document.documentElement;var A=(n.clientWidth||x.clientWidth)-3;n=Math.max(n.clientHeight||0,x.clientHeight)-3}else n=d.getBoundingClientRect(),k=n.top,l=n.left,A=n.width,n=n.height;x=document.createElement("div");x.style.zIndex=mxPopupMenu.prototype.zIndex+2;x.style.border="3px dotted rgb(254, 137, 12)";
-x.style.pointerEvents="none";x.style.position="absolute";x.style.top=k+"px";x.style.left=l+"px";x.style.width=Math.max(0,A-3)+"px";x.style.height=Math.max(0,n-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(x):document.body.appendChild(x);return x};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var k=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=k){var l=new mxCodec(k.ownerDocument),n=new mxGraphModel;l.decode(k,
-n);k=n.getChildAt(n.getRoot(),0);for(l=0;l<n.getChildCount(k);l++)d.push(n.getChildAt(k,l))}return d};EditorUi.prototype.openFileHandle=function(d,k,l,n,x,A){if(null!=k&&0<k.length){if(!Editor.useCanvasForExport&&/(\.png)$/i.test(k)||/(\.pdf)$/i.test(k))k=k.substring(0,k.length-4),/(\.drawio)$/i.test(k)||(k+=".drawio");var B=mxUtils.bind(this,function(G){k=0<=k.lastIndexOf(".")?k.substring(0,k.lastIndexOf("."))+".drawio":k+".drawio";if("<mxlibrary"==G.substring(0,10)){null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,G,k)),this.showSidebar()}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(G,k,n)});if(EditorUi.isVisioFilename(k))this.importVisio(l,mxUtils.bind(this,function(G){this.spinner.stop();B(G)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(G){this.spinner.stop();B(G)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(d,k))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(G){4==G.readyState&&(this.spinner.stop(),200<=G.status&&299>=G.status?B(G.responseText):this.handleError({message:mxResources.get(413==G.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(k)&&(k=k.substring(0,k.length-5)+".drawio"),
-this.convertLucidChart(d,mxUtils.bind(this,function(G){this.spinner.stop();this.openLocalFile(G,k,n)}),mxUtils.bind(this,function(G){this.spinner.stop();this.handleError(G)}));else if("<mxlibrary"==d.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,d,l.name)),this.showSidebar()}catch(G){this.handleError(G,mxResources.get("errorLoadingFile"))}}else if(0==
-d.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(G){this.spinner.stop();B(G)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,k,n)}));else{if("image/png"==l.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==l.type){var I=Editor.extractGraphModelFromPdf(d);null!=I&&(x=null,n=!0,d=I)}this.spinner.stop();this.openLocalFile(d,k,n,x,null!=x?l:null,A)}}};EditorUi.prototype.openFiles=function(d,k){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=
-0;l<d.length;l++)mxUtils.bind(this,function(n){var x=new FileReader;x.onload=mxUtils.bind(this,function(A){try{this.openFileHandle(A.target.result,n.name,n,k)}catch(B){this.handleError(B)}});x.onerror=mxUtils.bind(this,function(A){this.spinner.stop();this.handleError(A);window.openFile=null});"image"!==n.type.substring(0,5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?x.readAsText(n):x.readAsDataURL(n)})(d[l])};EditorUi.prototype.openLocalFile=function(d,k,l,n,x,A){var B=this.getCurrentFile(),
-I=mxUtils.bind(this,function(){window.openFile=null;if(null==k&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var G=mxUtils.parseXml(d);null!=G&&(this.editor.setGraphXml(G.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,k||this.defaultFilename,l,n,x,A))});if(null!=d&&0<d.length)null==B||!B.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,k),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var k=
-0;k<this.pages.length;k++)this.updatePageRoot(this.pages[k]),this.addBasenamesForCell(this.pages[k].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);k=[];for(var l in d)k.push(l);return k};EditorUi.prototype.addBasenamesForCell=function(d,k){function l(B){if(null!=B){var I=B.lastIndexOf(".");0<I&&(B=B.substring(I+1,B.length));null==k[B]&&(k[B]=!0)}}var n=this.editor.graph,x=n.getCellStyle(d);l(mxStencilRegistry.getBasenameForStencil(x[mxConstants.STYLE_SHAPE]));n.model.isEdge(d)&&
-(l(mxMarker.getPackageForType(x[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(x[mxConstants.STYLE_ENDARROW])));x=n.model.getChildCount(d);for(var A=0;A<x;A++)this.addBasenamesForCell(n.model.getChildAt(d,A),k)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;
-this.editor.graph.setEnabled(d);null!=this.tabContainer&&(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);d||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};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 d=!1;this.installMessageHandler(mxUtils.bind(this,function(k,l,n,x){d||(d=!0,this.spinner.stop(),
-this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==k||0==k.length)k=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,k,{}));this.mode=App.MODE_EMBED;this.setFileData(k);if(x)try{var A=this.editor.graph;A.setGridEnabled(!1);A.pageVisible=!1;var B=A.model.cells,I;for(I in B){var G=B[I];null!=G&&null!=G.style&&(G.style+=";sketch=1;"+(-1==G.style.indexOf("fontFamily=")||-1<G.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(C){console.log(C)}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(d,k){null!=d?this.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();k(l)})):k(null)};EditorUi.prototype.createLoadMessage=function(d){var k=this.editor.graph;return{event:d,pageVisible:k.pageVisible,translate:k.view.translate,bounds:k.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:k.view.scale,
-page:k.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){try{var k=this.editor.graph;k.isEditing()&&k.stopEditing(!k.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var n=k.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),k,null,!0,mxUtils.bind(this,function(x){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,
-exit:null!=d?!d:!0,data:Editor.createSvgDataUri(x)}),"*")}),null,null,!0,n,1,this.embedExportBorder,null,this.embedExportTheme)}else d||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,k.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(x){d||this.handleError(x)}};
-EditorUi.prototype.installMessageHandler=function(d){var k=null,l=!1,n=!1,x=null,A=mxUtils.bind(this,function(G,C){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,A);mxEvent.addListener(window,"message",mxUtils.bind(this,function(G){if(G.source==(window.opener||window.parent)){var C=
-G.data,R=null,T=mxUtils.bind(this,function(ba){if(null!=ba&&"function"===typeof ba.charAt&&"<"!=ba.charAt(0))try{Editor.isPngDataUrl(ba)?ba=Editor.extractGraphModelFromPng(ba):"data:image/svg+xml;base64,"==ba.substring(0,26)?ba=atob(ba.substring(26)):"data:image/svg+xml;utf8,"==ba.substring(0,24)&&(ba=ba.substring(24)),null!=ba&&(""==ba.trim()?ba=null:"%"==ba.charAt(0)?ba=decodeURIComponent(ba):"<"!=ba.charAt(0)&&(ba=Graph.decompress(ba)))}catch(ia){}return ba});if("json"==urlParams.proto){var S=
-!1;try{C=JSON.parse(C),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[G],"data",[C])}catch(ba){C=null}try{if(null==C)return;if("dialog"==C.action){this.showError(null!=C.titleKey?mxResources.get(C.titleKey):C.title,null!=C.messageKey?mxResources.get(C.messageKey):mxUtils.htmlEntities(C.message),null!=C.buttonKey?mxResources.get(C.buttonKey):C.button);null!=C.modified&&(this.editor.modified=C.modified);return}if("layout"==C.action){this.executeLayouts(this.editor.graph.createLayouts(C.layouts));
-return}if("prompt"==C.action){this.spinner.stop();var Q=new FilenameDialog(this,C.defaultValue||"",null!=C.okKey?mxResources.get(C.okKey):C.ok,function(ba){null!=ba?B.postMessage(JSON.stringify({event:"prompt",value:ba,message:C}),"*"):B.postMessage(JSON.stringify({event:"prompt-cancel",message:C}),"*")},null!=C.titleKey?mxResources.get(C.titleKey):C.title,null,null,null,null,function(){B.postMessage(JSON.stringify({event:"prompt-cancel",message:C}),"*")});this.showDialog(Q.container,300,80,!0,!1);
-Q.init();return}if("draft"==C.action){var v=T(C.xml);this.spinner.stop();Q=new DraftDialog(this,mxResources.get("draftFound",[C.name||this.defaultFilename]),v,mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"edit",message:C}),"*")}),mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"discard",message:C}),"*")}),C.editKey?mxResources.get(C.editKey):null,C.discardKey?mxResources.get(C.discardKey):null,C.ignore?
-mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"ignore",message:C}),"*")}):null);this.showDialog(Q.container,640,480,!0,!1,mxUtils.bind(this,function(ba){ba&&this.actions.get("exit").funct()}));try{Q.init()}catch(ba){B.postMessage(JSON.stringify({event:"draft",error:ba.toString(),message:C}),"*")}return}if("template"==C.action){this.spinner.stop();var z=1==C.enableRecent,N=1==C.enableSearch,J=1==C.enableCustomTemp;Q=new NewDialog(this,!1,C.templatesOnly?
-!1:null!=C.callback,mxUtils.bind(this,function(ba,ia,la,da){ba=ba||this.emptyDiagramXml;null!=C.callback?B.postMessage(JSON.stringify({event:"template",xml:ba,blank:ba==this.emptyDiagramXml,name:ia,tempUrl:la,libs:da,builtIn:!0,message:C}),"*"):(d(ba,G,ba!=this.emptyDiagramXml,C.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,z?mxUtils.bind(this,function(ba){this.remoteInvoke("getRecentDiagrams",[null],null,ba,function(){ba(null,"Network Error!")})}):null,
-N?mxUtils.bind(this,function(ba,ia){this.remoteInvoke("searchDiagrams",[ba,null],null,ia,function(){ia(null,"Network Error!")})}):null,mxUtils.bind(this,function(ba,ia,la){B.postMessage(JSON.stringify({event:"template",docUrl:ba,info:ia,name:la}),"*")}),null,null,J?mxUtils.bind(this,function(ba){this.remoteInvoke("getCustomTemplates",null,null,ba,function(){ba({},0)})}):null,1==C.withoutType,null,C.templatesOnly);this.showDialog(Q.container,620,460,!0,!1,mxUtils.bind(this,function(ba){null!=this.sidebar&&
-this.sidebar.hideTooltip();ba&&this.actions.get("exit").funct()}));Q.init();return}if("textContent"==C.action){var K=this.getDiagramTextContent();B.postMessage(JSON.stringify({event:"textContent",data:K,message:C}),"*");return}if("status"==C.action){this.updateStatus(mxUtils.bind(this,function(){null!=C.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(C.messageKey))):null!=C.message&&this.editor.setStatus(mxUtils.htmlEntities(C.message))}));null!=C.modified&&(this.editor.modified=
-C.modified);return}if("spinner"==C.action){var m=null!=C.messageKey?mxResources.get(C.messageKey):C.message;null==C.show||C.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("exit"==C.action){this.actions.get("exit").funct();return}if("viewport"==C.action){if(null!=C.viewport){var t=this.editor.graph,D=t.view.translate.x,M=t.view.translate.y;this.embedViewport=C.viewport;t.refresh();this.diagramContainer.scrollTop-=(M-t.view.translate.y)*t.view.scale;this.diagramContainer.scrollLeft-=
-(D-t.view.translate.x)*t.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==C.action){Q=null;try{var L=this.diagramContainer.getAttribute("data-scrollState");null!=L&&(this.diagramContainer.removeAttribute("data-scrollState"),Q=JSON.parse(L))}catch(ba){}Editor.inlineFullscreen=C.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=Q&&this.restoreScrollState(Q);return}if("snapshot"==C.action){this.sendEmbeddedSvgExport(!0);return}if("export"==
-C.action){if("png"==C.format||"xmlpng"==C.format){if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,null!=C.spinKey?mxResources.get(C.spinKey):C.spin)){var O=null!=C.xml?C.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);t=this.editor.graph;var P=mxUtils.bind(this,function(ba,ia){if(C.withSvg)C.withSvg=!1,this.getEmbeddedSvg(O,this.editor.graph,null,!0,function(da){P(ba,da)},null,null,C.embedImages,this.editor.graph.background,C.scale,C.border,C.shadow,"auto");else{this.editor.graph.setEnabled(!0);
-this.spinner.stop();var la=this.createLoadMessage("export");la.format=C.format;la.message=C;la.data=ba;la.svg=ia;la.xml=O;B.postMessage(JSON.stringify(la),"*")}}),U=mxUtils.bind(this,function(ba){null==ba&&(ba=Editor.blankImage);"xmlpng"==C.format&&(ba=Editor.writeGraphModelToPng(ba,"tEXt","mxfile",encodeURIComponent(O)));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container);P(ba)}),V=C.pageId||(null!=this.pages?C.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var X=
-mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=V){var ba=t.getGlobalVariable;t=this.createTemporaryGraph(t.getStylesheet());for(var ia,la=0;la<this.pages.length;la++)if(this.pages[la].getId()==V){ia=this.updatePageRoot(this.pages[la]);break}null==ia&&(ia=this.currentPage);t.getGlobalVariable=function(sa){return"page"==sa?ia.getName():"pagenumber"==sa?1:ba.apply(this,arguments)};document.body.appendChild(t.container);t.model.setRoot(ia.root)}if(null!=C.layerIds){var da=
-t.model,ra=da.getChildCells(da.getRoot()),pa={};for(la=0;la<C.layerIds.length;la++)pa[C.layerIds[la]]=!0;for(la=0;la<ra.length;la++)da.setVisible(ra[la],pa[ra[la].id]||!1)}la=null;C.keepTheme&&(la=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(sa){U(sa.toDataURL("image/png"))}),C.width,null,C.background,mxUtils.bind(this,function(){U(null)}),null,null,C.scale,C.transparent,C.shadow,null,t,C.border,null,C.grid,la)});null!=C.xml&&0<C.xml.length&&(l=!0,this.setFileData(O),
-l=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==C.format?"1":"0")+(null!=V?"&pageId="+V:"")+(null!=C.layerIds&&0<C.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:C.layerIds})):"")+(null!=C.scale?"&scale="+C.scale:"")+"&base64=1&xml="+encodeURIComponent(O))).send(mxUtils.bind(this,function(ba){200<=ba.getStatus()&&299>=ba.getStatus()?P("data:image/png;base64,"+ba.getText()):U(null)}),mxUtils.bind(this,function(){U(null)}))}}else if(X=mxUtils.bind(this,
-function(){var ba=this.createLoadMessage("export");ba.message=C;if("html2"==C.format||"html"==C.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ia=this.getXmlFileData();ba.xml=mxUtils.getXml(ia);ba.data=this.getFileData(null,null,!0,null,null,null,ia);ba.format=C.format}else if("html"==C.format)ia=this.editor.getGraphXml(),ba.data=this.getHtml(ia,this.editor.graph),ba.xml=mxUtils.getXml(ia),ba.format=C.format;else{mxSvgCanvas2D.prototype.foAltText=null;ia=null!=C.background?
-C.background:this.editor.graph.background;ia==mxConstants.NONE&&(ia=null);ba.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ba.format="svg";var la=mxUtils.bind(this,function(ra){this.editor.graph.setEnabled(!0);this.spinner.stop();ba.data=C.asText?ra:Editor.createSvgDataUri(ra);B.postMessage(JSON.stringify(ba),"*")}),da="auto";C.keepTheme&&(da=Editor.isDarkMode()?"dark":"light");null!=C.theme&&(da=C.theme);if("xmlsvg"==C.format){if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,
-null!=C.spinKey?mxResources.get(C.spinKey):C.spin)){da=null;if(this.isAutoDarkMode()||Editor.isDarkMode())da="auto";null!=C.theme&&(da=C.theme);this.getEmbeddedSvg(ba.xml,this.editor.graph,null,!0,la,null,null,C.embedImages,ia,C.scale,C.border,C.shadow,da)}}else if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,null!=C.spinKey?mxResources.get(C.spinKey):C.spin))this.editor.graph.setEnabled(!1),ia=this.editor.graph.getSvg(ia,C.scale,C.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||
-C.shadow,null,da),(this.editor.graph.shadowVisible||C.shadow)&&this.editor.graph.addSvgShadow(ia),this.embedFonts(ia,mxUtils.bind(this,function(ra){C.embedImages||null==C.embedImages?this.editor.convertImages(ra,mxUtils.bind(this,function(pa){la(mxUtils.getXml(pa))})):la(mxUtils.getXml(ra))}));return}B.postMessage(JSON.stringify(ba),"*")}),null!=C.xml&&0<C.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);X()}}l=!0;this.setFileData(C.xml);
-l=!1;this.editor.graph.mathEnabled||X()}else X();return}if("load"==C.action){S=C.toSketch;n=1==C.autosave;this.hideDialog();null!=C.modified&&null==urlParams.modified&&(urlParams.modified=C.modified);null!=C.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=C.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&
-(this.actions.get("save").shortcut=Editor.ctrlKey+"+"+Editor.shiftKey+"+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=C.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=C.noSaveBtn);if(null!=C.rough){var Y=Editor.sketchMode;this.doSetSketchMode(C.rough);Y!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=C.dark&&this.setDarkMode(C.dark);null!=C.border&&(this.embedExportBorder=C.border);null!=C.theme&&(this.embedExportTheme=C.theme);null!=C.background&&
-(this.embedExportBackground=C.background);null!=C.viewport&&(this.embedViewport=C.viewport);this.embedExitPoint=null;if(null!=C.rect){var Z=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,C.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,C.rect.top)+"px";this.minInlineWidth=C.minWidth;this.minInlineHeight=C.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var aa=C.maxFitScale,
-fa=C.rect.width+2*Z,ea=C.rect.height+2*Z;R=mxUtils.bind(this,function(){var ba=mxUtils.getDocumentSize();fa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,fa):fa,ba.width-80);ba=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ea):ea,ba.height-80);this.diagramContainer.style.width=fa+"px";this.diagramContainer.style.height=ba+"px";var ia=this.editor.graph;ba=ia.maxFitScale;ia.maxFitScale=aa;ia.fit(2*Z,null,null,null,null,null,ea);this.setPageVisible(!1);if(null!=
-this.minInlineWidth&&ia.getGraphBounds().width<this.minInlineWidth){var la=ia.container.scrollTop;this.resetScrollbars();ia.container.scrollTop=la}ia.maxFitScale=ba;ia.container.scrollTop-=Z;ia.container.scrollLeft-=Z;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[C]));ia.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=ia.container.style.top);
-var da=ia.getGraphBounds();ia.container.clientWidth>da.width+2*Z&&(ia.container.scrollLeft=da.x+(da.width+Z-ia.container.clientWidth)/2)}),10)})}null!=C.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=C.noExitBtn);null!=C.title&&null!=this.buttonContainer&&this.setEmbedTitle(C.title);try{C.libs&&this.sidebar.showEntries(C.libs)}catch(ba){}C=null!=C.xmlpng?this.extractGraphModelFromPng(C.xmlpng):null!=C.descriptor?C.descriptor:C.xml}else{if("merge"==C.action){var ca=this.getCurrentFile();
-null!=ca&&(v=T(C.xml),null!=v&&""!=v&&ca.mergeFile(new LocalFile(this,v),function(){B.postMessage(JSON.stringify({event:"merge",message:C}),"*")},function(ba){B.postMessage(JSON.stringify({event:"merge",message:C,error:ba}),"*")}))}else"remoteInvokeReady"==C.action?this.handleRemoteInvokeReady(B):"remoteInvoke"==C.action?this.handleRemoteInvoke(C,G.origin):"remoteInvokeResponse"==C.action?this.handleRemoteInvokeResponse(C):B.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(C)}),
-"*");return}}catch(ba){this.handleError(ba)}}var ha=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ka=mxUtils.bind(this,function(ba,ia){l=!0;try{d(ba,ia,null,S)}catch(la){this.handleError(la)}l=!1;null!=urlParams.modified&&this.clearStatus();x=ha();n&&null==k&&(k=mxUtils.bind(this,function(la,da){la=ha();la==x||l||(da=this.createLoadMessage("autosave"),da.xml=la,(window.opener||window.parent).postMessage(JSON.stringify(da),
-"*"));x=la}),this.editor.graph.model.addListener(mxEvent.CHANGE,k),this.editor.graph.addListener("gridSizeChanged",k),this.editor.graph.addListener("shadowVisibleChanged",k),this.addListener("pageFormatChanged",k),this.addListener("pageScaleChanged",k),this.addListener("backgroundColorChanged",k),this.addListener("backgroundImageChanged",k),this.addListener("foldingEnabledChanged",k),this.addListener("mathEnabledChanged",k),this.addListener("gridEnabledChanged",k),this.addListener("guidesEnabledChanged",
-k),this.addListener("pageViewChanged",k));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ia=this.createLoadMessage("load"),ia.xml=ba,B.postMessage(JSON.stringify(ia),"*");null!=R&&R()});null!=C&&"function"===typeof C.substring&&"data:application/vnd.visio;base64,"==C.substring(0,34)?(T="0M8R4KGxGuE"==C.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(C.substring(C.indexOf(",")+1)),function(ba){ka(ba,G)},mxUtils.bind(this,function(ba){this.handleError(ba)}),T)):null!=
-C&&"function"===typeof C.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(C,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(C,mxUtils.bind(this,function(ba){4==ba.readyState&&(200<=ba.status&&299>=ba.status&&"<mxGraphModel"==ba.responseText.substring(0,13)?ka(ba.responseText,G):this.handleError({message:413==ba.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=C&&"function"===typeof C.substring&&
-this.isLucidChartData(C)?this.convertLucidChart(C,mxUtils.bind(this,function(ba){ka(ba)}),mxUtils.bind(this,function(ba){this.handleError(ba)})):null==C||"object"!==typeof C||null==C.format||null==C.data&&null==C.url?(C=T(C),ka(C,G)):this.loadDescriptor(C,mxUtils.bind(this,function(ba){ka(ha(),G)}),mxUtils.bind(this,function(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}))}}));var B=window.opener||window.parent;A="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||
-"ready";B.postMessage(A,"*");if("json"==urlParams.proto){var I=this.editor.graph.openLink;this.editor.graph.openLink=function(G,C,R){I.apply(this,arguments);B.postMessage(JSON.stringify({event:"openLink",href:G,target:C,allowOpener:R}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,k,l,n){var x=document.createElement("button");x.className="geEmbedBtn geBtn";x.setAttribute("title",d+(null!=l?" ("+l+")":""));mxUtils.write(x,d);n&&x.classList.add("gePrimaryBtn");mxEvent.addListener(x,"click",
-k);return x};EditorUi.prototype.setEmbedTitle=function(d){d=this.createStatusDiv(d);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(d):this.buttonContainer.appendChild(d);this.embedFilenameSpan=d};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var d=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==
-this.buttonContainer;this.buttonContainer.innerText="";d&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),
-mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+"+Editor.shiftKey+"+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct))}))};
-EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new SimpleTextareaDialog(this,Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),mxResources.get("import"),"https://www.drawio.com/blog/insert-from-csv"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,new mxRectangle(0,0,320,280));this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(d){this.loadOrgChartLayouts(mxUtils.bind(this,
-function(){var k=new TextareaDialog(this,mxResources.get("layout"),d,mxUtils.bind(this,function(l){if(0<l.length)try{var n=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(n));this.customLayoutConfig=n;this.hideDialog()}catch(x){this.handleError(x)}}),null,null,null,null,mxUtils.bind(this,function(l,n){var x=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var A=n.value;n.value=JSON.stringify(JSON.parse(A));n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));n.value=A}catch(B){this.handleError(B)}}));x.setAttribute("title","copy");x.className="geBtn";l.appendChild(x)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(k.container,620,460,!0,!0);k.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(d){this.createTimeout(null,mxUtils.bind(this,function(k){var l=mxUtils.bind(this,function(){this.loadingOrgChart=
-!1;k.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),d())}),n=mxUtils.bind(this,function(x){this.loadingOrgChart=!1;k.clear()&&this.handleError(x)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():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",l,null,null,null,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(d,k){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,k)}))};EditorUi.prototype.doImportCsv=function(d,k){try{var l=d.split("\n"),n=[],x=[],A=[],B={};if(0<l.length){var I={},G=this.editor.graph,C=null,R=null,T=null,S=null,
-Q=null,v=null,z=null,N="whiteSpace=wrap;html=1;",J=null,K=null,m="",t="auto",D="auto",M=!1,L=null,O=null,P=40,U=40,V=100,X=0,W=mxUtils.bind(this,function(){null!=k?k(Ba):(G.setSelectionCells(Ba),G.scrollCellToVisible(G.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Y=G.getFreeInsertPoint(),Z=Y.x,aa=Y.y;Y=aa;var fa=null,ea="auto";K=null;for(var ca=[],ha=null,ka=null,ba=0;ba<l.length&&"#"==l[ba].charAt(0);){d=l[ba].replace(/\r$/,
-"");for(ba++;ba<l.length&&"\\"==d.charAt(d.length-1)&&"#"==l[ba].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(l[ba].substring(1)),ba++;if("#"!=d.charAt(1)){var ia=d.indexOf(":");if(0<ia){var la=mxUtils.trim(d.substring(1,ia)),da=mxUtils.trim(d.substring(ia+1));"label"==la?fa=Graph.sanitizeHtml(da):"labelname"==la&&0<da.length&&"-"!=da?Q=da:"labels"==la&&0<da.length&&"-"!=da?z=JSON.parse(da):"style"==la?R=da:"parentstyle"==la?N=da:"unknownStyle"==la&&"-"!=da?v=da:"stylename"==la&&0<da.length&&
-"-"!=da?S=da:"styles"==la&&0<da.length&&"-"!=da?T=JSON.parse(da):"vars"==la&&0<da.length&&"-"!=da?C=JSON.parse(da):"identity"==la&&0<da.length&&"-"!=da?J=da:"parent"==la&&0<da.length&&"-"!=da?K=da:"namespace"==la&&0<da.length&&"-"!=da?m=da:"width"==la?t=da:"height"==la?D=da:"collapsed"==la&&"-"!=da?M="true"==da:"left"==la&&0<da.length?L=da:"top"==la&&0<da.length?O=da:"ignore"==la?ka=da.split(","):"connect"==la?ca.push(JSON.parse(da)):"link"==la?ha=da:"padding"==la?X=parseFloat(da):"edgespacing"==
-la?P=parseFloat(da):"nodespacing"==la?U=parseFloat(da):"levelspacing"==la?V=parseFloat(da):"layout"==la&&(ea=da)}}}if(null==l[ba])throw Error(mxResources.get("invalidOrMissingFile"));var ra=this.editor.csvToArray(l[ba].replace(/\r$/,""));ia=d=null;la=[];for(da=0;da<ra.length;da++)J==ra[da]&&(d=da),K==ra[da]&&(ia=da),la.push(mxUtils.trim(ra[da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==fa&&(fa="%"+la[0]+"%");if(null!=ca)for(var pa=0;pa<ca.length;pa++)null==I[ca[pa].to]&&
-(I[ca[pa].to]={});J=[];for(da=ba+1;da<l.length;da++){var sa=this.editor.csvToArray(l[da].replace(/\r$/,""));if(null==sa){var va=40<l[da].length?l[da].substring(0,40)+"...":l[da];throw Error(va+" ("+da+"):\n"+mxResources.get("containsValidationErrors"));}0<sa.length&&J.push(sa)}G.model.beginUpdate();try{for(da=0;da<J.length;da++){sa=J[da];var ja=null,ma=null!=d?m+sa[d]:null;l=!1;null!=ma&&(ja=G.model.getCell(ma),l=null==ja||0<=mxUtils.indexOf(n,ja));var wa=new mxCell(fa,new mxGeometry(Z,Y,0,0),R||
-"whiteSpace=wrap;html=1;");wa.collapsed=M;wa.vertex=!0;wa.id=ma;null==ja||l||G.model.setCollapsed(ja,M);for(var oa=0;oa<sa.length;oa++)G.setAttributeForCell(wa,la[oa],sa[oa]),null==ja||l||G.setAttributeForCell(ja,la[oa],sa[oa]);if(null!=Q&&null!=z){var ya=z[wa.getAttribute(Q)];null!=ya&&(G.labelChanged(wa,ya),null==ja||l||G.cellLabelChanged(ja,ya))}if(null!=S&&null!=T){var Ca=T[wa.getAttribute(S)];null!=Ca&&(wa.style=Ca)}G.setAttributeForCell(wa,"placeholders","1");wa.style=G.replacePlaceholders(wa,
-wa.style,C);null==ja||l?G.fireEvent(new mxEventObject("cellsInserted","cells",[wa])):(G.model.setStyle(ja,wa.style),0>mxUtils.indexOf(A,ja)&&A.push(ja),G.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));l=null!=ja;ja=wa;if(!l)for(pa=0;pa<ca.length;pa++)I[ca[pa].to][ja.getAttribute(ca[pa].to)]=ja;null!=ha&&"link"!=ha&&(G.setLinkForCell(ja,ja.getAttribute(ha)),G.setAttributeForCell(ja,ha,null));var Fa=this.editor.graph.getPreferredSizeForCell(ja);K=null!=ia?G.model.getCell(m+sa[ia]):null;
-if(ja.vertex){va=null!=K?0:Z;ba=null!=K?0:aa;null!=L&&null!=ja.getAttribute(L)&&(ja.geometry.x=va+parseFloat(ja.getAttribute(L)));null!=O&&null!=ja.getAttribute(O)&&(ja.geometry.y=ba+parseFloat(ja.getAttribute(O)));var Aa="@"==t.charAt(0)?ja.getAttribute(t.substring(1)):null;ja.geometry.width=null!=Aa&&"auto"!=Aa?parseFloat(ja.getAttribute(t.substring(1))):"auto"==t||"auto"==Aa?Fa.width+X:parseFloat(t);var Ea="@"==D.charAt(0)?ja.getAttribute(D.substring(1)):null;ja.geometry.height=null!=Ea&&"auto"!=
-Ea&&"width"!=D?parseFloat(Ea):"auto"==D||"auto"==Ea?Fa.height+X:"width"==D?ja.geometry.width:parseFloat(D);Y+=ja.geometry.height+U}l?(null==B[ma]&&(B[ma]=[]),B[ma].push(ja)):(n.push(ja),null!=K?(K.style=G.replacePlaceholders(K,N,C),G.addCell(ja,K),x.push(K)):A.push(G.addCell(ja)))}for(da=0;da<x.length;da++)Aa="@"==t.charAt(0)?x[da].getAttribute(t.substring(1)):null,Ea="@"==D.charAt(0)?x[da].getAttribute(D.substring(1)):null,"auto"!=t&&"auto"!=Aa||"auto"!=D&&"auto"!=Ea||G.updateGroupBounds([x[da]],
-X,!0);var Oa=A.slice(),Ba=A.slice();for(pa=0;pa<ca.length;pa++){var Da=ca[pa];for(da=0;da<n.length;da++){ja=n[da];var Ia=mxUtils.bind(this,function(Sa,db,La){var hb=db.getAttribute(La.from);if(null!=hb&&""!=hb){hb=hb.split(",");for(var ob=0;ob<hb.length;ob++){var Ja=I[La.to][hb[ob]];if(null==Ja&&null!=v){Ja=new mxCell(hb[ob],new mxGeometry(Z,aa,0,0),v);Ja.style=G.replacePlaceholders(db,Ja.style,C);var Wa=this.editor.graph.getPreferredSizeForCell(Ja);Ja.geometry.width=Wa.width+X;Ja.geometry.height=
-Wa.height+X;I[La.to][hb[ob]]=Ja;Ja.vertex=!0;Ja.id=hb[ob];A.push(G.addCell(Ja))}if(null!=Ja){Wa=La.label;null!=La.fromlabel&&(Wa=(db.getAttribute(La.fromlabel)||"")+(Wa||""));null!=La.sourcelabel&&(Wa=G.replacePlaceholders(db,La.sourcelabel,C)+(Wa||""));null!=La.tolabel&&(Wa=(Wa||"")+(Ja.getAttribute(La.tolabel)||""));null!=La.targetlabel&&(Wa=(Wa||"")+G.replacePlaceholders(Ja,La.targetlabel,C));var gb="target"==La.placeholders==!La.invert?Ja:Sa;gb=null!=La.style?G.replacePlaceholders(gb,La.style,
-C):G.createCurrentEdgeStyle();Wa=G.insertEdge(null,null,Wa||"",La.invert?Ja:Sa,La.invert?Sa:Ja,gb);if(null!=La.labels)for(gb=0;gb<La.labels.length;gb++){var ab=La.labels[gb],pb=new mxCell(ab.label||gb,new mxGeometry(null!=ab.x?ab.x:0,null!=ab.y?ab.y:0,0,0),"resizable=0;html=1;");pb.vertex=!0;pb.connectable=!1;pb.geometry.relative=!0;null!=ab.placeholders&&(pb.value=G.replacePlaceholders("target"==ab.placeholders==!La.invert?Ja:Sa,pb.value,C));if(null!=ab.dx||null!=ab.dy)pb.geometry.offset=new mxPoint(null!=
-ab.dx?ab.dx:0,null!=ab.dy?ab.dy:0);Wa.insert(pb)}if(null!=La.data)for(var cb in La.data)G.setAttributeForCell(Wa,cb,La.data[cb]);Ba.push(Wa);mxUtils.remove(La.invert?Sa:Ja,Oa)}}}});Ia(ja,ja,Da);if(null!=B[ja.id])for(oa=0;oa<B[ja.id].length;oa++)Ia(ja,B[ja.id][oa],Da)}}if(null!=ka)for(da=0;da<n.length;da++)for(ja=n[da],oa=0;oa<ka.length;oa++)G.setAttributeForCell(ja,mxUtils.trim(ka[oa]),null);if(0<A.length){var Pa=new mxParallelEdgeLayout(G);Pa.spacing=P;Pa.checkOverlap=!0;var Ha=function(){0<Pa.spacing&&
-Pa.execute(G.getDefaultParent());for(var Sa=0;Sa<A.length;Sa++){var db=G.getCellGeometry(A[Sa]);db.x=Math.round(G.snap(db.x));db.y=Math.round(G.snap(db.y));"auto"==t&&(db.width=Math.round(G.snap(db.width)));"auto"==D&&(db.height=Math.round(G.snap(db.height)))}};if("["==ea.charAt(0)){var Ka=W;G.view.validate();this.executeLayouts(G.createLayouts(JSON.parse(ea)),function(){Ha();Ka()});W=null}else if("circle"==ea){var Xa=new mxCircleLayout(G);Xa.disableEdgeStyle=!1;Xa.resetEdges=!1;var qb=Xa.isVertexIgnored;
-Xa.isVertexIgnored=function(Sa){return qb.apply(this,arguments)||0>mxUtils.indexOf(A,Sa)};this.executeLayout(function(){Xa.execute(G.getDefaultParent());Ha()},!0,W);W=null}else if("horizontaltree"==ea||"verticaltree"==ea||"auto"==ea&&Ba.length==2*A.length-1&&1==Oa.length){G.view.validate();var bb=new mxCompactTreeLayout(G,"horizontaltree"==ea);bb.levelDistance=U;bb.edgeRouting=!1;bb.resetEdges=!1;bb.sortEdges=!0;this.executeLayout(function(){bb.execute(G.getDefaultParent(),0<Oa.length?Oa[0]:null)},
-!0,W);W=null}else if("horizontalflow"==ea||"verticalflow"==ea||"auto"==ea&&1==Oa.length){G.view.validate();var rb=new mxHierarchicalLayout(G,"horizontalflow"==ea?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);rb.intraCellSpacing=U;rb.parallelEdgeSpacing=P;rb.interRankCellSpacing=V;rb.disableEdgeStyle=!1;this.executeLayout(function(){rb.execute(G.getDefaultParent(),Ba);G.moveCells(Ba,Z,aa)},!0,W);W=null}else if("orgchart"==ea){G.view.validate();var Va=new mxOrgChartLayout(G,2,V,U),fb=Va.isVertexIgnored;
-Va.isVertexIgnored=function(Sa){return fb.apply(this,arguments)||0>mxUtils.indexOf(A,Sa)};this.executeLayout(function(){Va.execute(G.getDefaultParent());Ha()},!0,W);W=null}else if("organic"==ea||"auto"==ea&&Ba.length>A.length){G.view.validate();var $a=new mxFastOrganicLayout(G);$a.forceConstant=3*U;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var jb=$a.isVertexIgnored;$a.isVertexIgnored=function(Sa){return jb.apply(this,arguments)||0>mxUtils.indexOf(A,Sa)};this.executeLayout(function(){$a.execute(G.getDefaultParent());
-Ha()},!0,W);W=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=W&&W()}}catch(Sa){this.handleError(Sa)}};EditorUi.prototype.getSearch=function(d){var k="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var l="?",n;for(n in urlParams)0>mxUtils.indexOf(d,n)&&null!=urlParams[n]&&(k+=l+n+"="+urlParams[n],l="&")}else k=window.location.search;return k};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var k=0<d.indexOf("?")?1:0;
-if("1"==urlParams.offline)d+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),n;for(n in urlParams)0>mxUtils.indexOf(l,n)&&(d=0==k?d+"?":d+"&",null!=urlParams[n]&&(d+=n+"="+urlParams[n],k++))}return d};EditorUi.prototype.showLinkDialog=function(d,k,l,n,x){d=new LinkDialog(this,d,k,l,!0,n,x);this.showDialog(d.container,440,120,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var k=1;null==this.drive&&
-"function"!==typeof window.DriveClient||k++;null==this.dropbox&&"function"!==typeof window.DropboxClient||k++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||k++;null!=this.gitHub&&k++;null!=this.gitLab&&k++;d&&isLocalStorage&&"1"==urlParams.browser&&k++;return k};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),k=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(k);
-this.menus.get("viewZoom").setEnabled(k);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!l);this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));
-d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(k);this.actions.get("zoomIn").setEnabled(k);this.actions.get("zoomOut").setEnabled(k);this.actions.get("smartFit").setEnabled(k);this.actions.get("resetView").setEnabled(k);this.menus.get("edit").setEnabled(k);this.menus.get("view").setEnabled(k);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);this.menus.get("edgeShape").setEnabled(d);this.menus.get("edgeStyle").setEnabled(d);
-this.menus.get("appearance").setEnabled(mxUtils.lightDarkColorSupported)};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var d=this.openLibraries;this.openLibraries=null;if(null!=d)for(var k=
-0;k<d.length;k++)this.libraryLoaded(d[k].file,d[k].images,d[k].title,null!=d[k].div?"none"!=d[k].div.style.display:d[k].expand)};var E=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){E.apply(this,arguments);var d=this.editor.graph,k=this.getCurrentFile(),l=this.getSelectionState(),n=this.isDiagramActive(),x="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=k&&k.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&x);this.actions.get("redo").setEnabled(this.canRedo()&&
-x);this.actions.get("autosave").setEnabled(null!=k&&k.isEditable()&&k.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("explore").setEnabled(n&&(1==l.edges.length||1==l.vertices.length));this.actions.get("editConnectionPoints").setEnabled(n&&0==l.edges.length&&1==l.vertices.length);this.actions.get("editImage").setEnabled(n&&l.image&&0<l.cells.length);this.actions.get("crop").setEnabled(n&&l.image&&0<l.cells.length);
-this.actions.get("pageSetup").setEnabled(n);this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);this.actions.get("copyStyle").setEnabled(n&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&n&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);this.actions.get("addToScratchpad").setEnabled(0<l.cells.length);this.actions.get("createShape").setEnabled(n);
-this.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!=k);this.actions.get("makeCopy").setEnabled(null!=k&&!k.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==k||!k.isRestricted()));this.actions.get("publishLink").setEnabled(null!=k&&!k.isRestricted());this.actions.get("removeFormat").setEnabled(d.isEnabled()&&!d.isSelectionEmpty()&&!d.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=
-this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("rename").setEnabled(null!=k&&k.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=k);this.actions.get("properties").setEnabled(null!=k);this.menus.get("publish").setEnabled(null!=k&&!k.isRestricted());k=this.actions.get("findReplace");k.setEnabled("none"!=this.diagramContainer.style.display);k.label=mxResources.get("find")+(d.isEnabled()?
-"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var F=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);F.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,k,l,n,
-x,A,B,I){var G=d.editor.graph;if("xml"==l)d.hideDialog(),d.saveData(k,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==l)d.hideDialog(),d.saveData(k,"svg",mxUtils.getXml(G.getSvg(n,x,A)),"image/svg+xml");else{var C=d.getFileData(!0,null,null,null,null,!0),R=G.getGraphBounds(),T=Math.floor(R.width*x/G.view.scale),S=Math.floor(R.height*x/G.view.scale);if(C.length<=MAX_REQUEST_SIZE&&T*S<MAX_AREA)if(d.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!d.editor.isExportToCanvas()){var Q=
-{globalVars:G.getExportVariables()};I&&(Q.grid={size:G.gridSize,steps:G.view.gridSteps,color:G.view.gridColor});d.saveRequest(k,l,function(v,z){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(z||"0")+(null!=v?"&filename="+encodeURIComponent(v):"")+"&extras="+encodeURIComponent(JSON.stringify(Q))+(0<B?"&dpi="+B:"")+"&bg="+(null!=n?n:"none")+"&w="+T+"&h="+S+"&border="+A+"&xml="+encodeURIComponent(C))})}else"png"==l?d.exportImage(x,null==n||"none"==n,!0,!1,!1,A,!0,!1,null,I,B):d.exportImage(x,
-!1,!0,!1,!1,A,!0,!1,"jpeg",I);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,k="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var n=d;this.currentPage!=this.pages[l]&&(n=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[l]),n.model.setRoot(this.pages[l].root));k+=this.pages[l].getName()+" "+n.getIndexableText()+" "}else k=d.getIndexableText();
-this.editor.graph.setEnabled(!0);return k};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var k={},l=document.createElement("div");l.style.whiteSpace="nowrap";var n=document.createElement("h3");mxUtils.write(n,mxUtils.htmlEntities(d));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(n);var x=document.createElement("div");x.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";x.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
-IMAGE_PATH+'/spin.gif"></div>';var A={};try{var B=mxSettings.getCustomLibraries();for(d=0;d<B.length;d++){var I=B[d];if("R"==I.substring(0,1)){var G=JSON.parse(decodeURIComponent(I.substring(1)));A[G[0]]={id:G[0],title:G[1],downloadUrl:G[2]}}}}catch(C){}this.remoteInvoke("getCustomLibraries",null,null,function(C){x.innerText="";if(0==C.length)x.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<
-C.length;R++){var T=C[R];A[T.id]&&(k[T.id]=T);var S=this.addCheckbox(x,T.title,A[T.id]);(function(Q,v){mxEvent.addListener(v,"change",function(){this.checked?k[Q.id]=Q:delete k[Q.id]})})(T,S)}},mxUtils.bind(this,function(C){x.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=C&&null!=C.message?C.message:mxResources.get("unknownError"));x.appendChild(R)}));l.appendChild(x);l=new CustomDialog(this,
-l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var C=0,R;for(R in k)null==A[R]&&(C++,mxUtils.bind(this,function(T){this.remoteInvoke("getFileContent",[T.downloadUrl],null,mxUtils.bind(this,function(S){C--;0==C&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,S,T)),this.showSidebar()}catch(Q){this.handleError(Q,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){C--;0==C&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(k[R]));
-for(R in A)k[R]||this.closeLibrary(new RemoteLibrary(this,null,A[R]));0==C&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.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(d){this.remoteWin=d;for(var k=0;k<this.remoteInvokeQueue.length;k++)d.postMessage(this.remoteInvokeQueue[k],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var k=d.msgMarkers,l=this.remoteInvokeCallbacks[k.callbackId];if(null==l)throw Error("No callback for "+(null!=k?k.callbackId:"null"));d.error?l.error&&l.error(d.error.errResp):
-l.callback&&l.callback.apply(this,d.resp);this.remoteInvokeCallbacks[k.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,k,l,n,x){var A=!0,B=window.setTimeout(mxUtils.bind(this,function(){A=!1;x({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),I=mxUtils.bind(this,function(){window.clearTimeout(B);A&&n.apply(this,arguments)}),G=mxUtils.bind(this,function(){window.clearTimeout(B);A&&x.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;
-this.remoteInvokeCallbacks.push({callback:I,error:G});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:k,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,k){var l=mxUtils.bind(this,function(C,R){var T={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=R?T.error={errResp:R}:null!=C&&(T.resp=C);this.remoteWin.postMessage(JSON.stringify(T),"*")});try{var n=d.funtionName,x=
-this.remoteInvokableFns[n];if(null!=x&&"function"===typeof this[n]){if(x.allowedDomains){for(var A=!1,B=0;B<x.allowedDomains.length;B++)if(k=="https://"+x.allowedDomains[B]){A=!0;break}if(!A){l(null,"Invalid Call: "+n+" is not allowed.");return}}var I=d.functionArgs;Array.isArray(I)||(I=[]);if(x.isAsync)I.push(function(){l(Array.prototype.slice.apply(arguments))}),I.push(function(C){l(null,C||"Unkown Error")}),this[n].apply(this,I);else{var G=this[n].apply(this,I);l([G])}}else l(null,"Invalid Call: "+
-n+" is not found.")}catch(C){l(null,"Invalid Call: An error occurred, "+C.message)}};EditorUi.prototype.openDatabase=function(d,k){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var n=l.open("database",2);n.onupgradeneeded=function(x){try{var A=n.result;1>x.oldVersion&&A.createObjectStore("objects",{keyPath:"key"});2>x.oldVersion&&(A.createObjectStore("files",{keyPath:"title"}),A.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
-isLocalStorage)}catch(B){null!=k&&k(B)}};n.onsuccess=mxUtils.bind(this,function(x){try{var A=n.result;this.database=A;EditorUi.migrateStorageFiles&&(StorageFile.migrate(A),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(B){if((!B||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var I=document.createElement("iframe");I.style.display="none";
-I.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(I);var G=!0,C=!1,R,T=0,S=mxUtils.bind(this,function(){C=!0;this.setDatabaseItem(".drawioMigrated3",!0);I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Q=mxUtils.bind(this,function(){T++;v()}),v=mxUtils.bind(this,function(){try{if(T>=R.length)S();else{var N=R[T];StorageFile.getFileContent(this,N,mxUtils.bind(this,
-function(J){null==J||".scratchpad"==N&&J==this.emptyLibraryXml?I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[N]}),"*"):Q()}),Q)}}catch(J){console.log(J)}}),z=mxUtils.bind(this,function(N){try{this.setDatabaseItem(null,[{title:N.title,size:N.data.length,lastModified:Date.now(),type:N.isLib?"L":"F"},{title:N.title,data:N.data}],Q,Q,["filesInfo","files"])}catch(J){console.log(J)}});B=mxUtils.bind(this,function(N){try{if(N.source==I.contentWindow){var J=
-{};try{J=JSON.parse(N.data)}catch(K){}"init"==J.event?(I.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=J.event||C||(G?null!=J.resp&&0<J.resp.length&&null!=J.resp[0]?(R=J.resp[0],G=!1,v()):S():null!=J.resp&&0<J.resp.length&&null!=J.resp[0]?z(J.resp[0]):Q())}}catch(K){console.log(K)}});window.addEventListener("message",B)}})));d(A);A.onversionchange=
-function(){A.close()}}catch(B){null!=k?k(B):null!=window.console&&console.warn(B)}});n.onerror=k;n.onblocked=function(){}}catch(x){null!=k?k(x):null!=window.console&&console.error(x)}else null!=k&&k(Error("IndexedDB not supported"))}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,k,l,n,x){this.openDatabase(mxUtils.bind(this,function(A){try{x=x||"objects";Array.isArray(x)||(x=[x],d=[d],k=[k]);var B=A.transaction(x,"readwrite");B.oncomplete=l;B.onerror=n;for(A=0;A<x.length;A++)B.objectStore(x[A]).put(null!=
-d&&null!=d[A]?{key:d[A],data:k[A]}:k[A])}catch(I){null!=n&&n(I)}}),n)};EditorUi.prototype.removeDatabaseItem=function(d,k,l,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";Array.isArray(n)||(n=[n],d=[d]);var A=x.transaction(n,"readwrite");A.oncomplete=k;A.onerror=l;for(x=0;x<n.length;x++)A.objectStore(n[x]).delete(d[x])}catch(B){null!=l&&l(B)}}),l)};EditorUi.prototype.getDatabaseItem=function(d,k,l,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";var A=x.transaction([n],
-"readonly").objectStore(n).get(d);A.onsuccess=function(){k(A.result)};A.onerror=l}catch(B){null!=l&&l(B)}}),l)};EditorUi.prototype.getDatabaseItems=function(d,k,l){this.openDatabase(mxUtils.bind(this,function(n){try{l=l||"objects";var x=n.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),A=[];x.onsuccess=function(B){null==B.target.result?d(A):(A.push(B.target.result.value),B.target.result.continue())};x.onerror=k}catch(B){null!=k&&k(B)}}),k)};EditorUi.prototype.getDatabaseItemKeys=
-function(d,k,l){this.openDatabase(mxUtils.bind(this,function(n){try{l=l||"objects";var x=n.transaction([l],"readonly").objectStore(l).getAllKeys();x.onsuccess=function(){d(x.result)};x.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=
-function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,k){var l=this.getCurrentFile();null!=l?l.getComments(d,k):d([])};EditorUi.prototype.addComment=function(d,k,l){var n=this.getCurrentFile();null!=n?n.addComment(d,k,l):k(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=
-d?d.canComment():!0};EditorUi.prototype.newComment=function(d,k){var l=this.getCurrentFile();return null!=l?l.newComment(d,k):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,k)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,k){var l=this.getCurrentFile();null!=l&&l.getRevisions?l.getRevisions(d,k):k({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=
-function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,k,l,n,x,A,B,I){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(d,k,l,n,x,A,B,I)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,k){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,k)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,k,l,n,x,A,B,I,G,C,R,T,S,Q,v,z){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,k,l,n,x,A,B,I,G,C,R,T,S,Q,v,z)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,k,l,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
-return this.editor.convertImages(d,k,l,n)};EditorUi.prototype.convertImageToDataUri=function(d,k){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,k)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,k,l,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,k,l,n)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,k,l,n,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,k,l,n,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],k=0;k<localStorage.length;k++){var l=localStorage.key(k),n=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<n.length){var x=
-"<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(x||n)&&d.push(l)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var k=localStorage.getItem(d);return{title:d,data:k,isLib:"<mxlibrary>"===k.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,f,g,c,p,q){function u(){for(var z=I.getElementsByTagName("div"),N=0,J=0;J<z.length;J++)"none"!=z[J].style.display&&z[J].parentNode==I&&N++;G.style.display=0==N?"block":"none"}function y(z,N,J,K){function m(){N.removeChild(M);N.removeChild(L);D.style.display="block";t.style.display="block"}x={div:N,comment:z,saveCallback:J,deleteOnCancel:K};var t=N.querySelector(".geCommentTxt"),D=N.querySelector(".geCommentActionsList"),M=document.createElement("textarea");M.className=
-"geCommentEditTxtArea";M.style.minHeight=t.offsetHeight+"px";M.value=z.content;N.insertBefore(M,t);var L=document.createElement("div");L.className="geCommentEditBtns";var O=mxUtils.button(mxResources.get("cancel"),function(){K?(N.parentNode.removeChild(N),u()):m();x=null});O.className="geCommentEditBtn";L.appendChild(O);var P=mxUtils.button(mxResources.get("save"),function(){t.innerText="";z.content=M.value;mxUtils.write(t,z.content);m();J(z);x=null});mxEvent.addListener(M,"keydown",mxUtils.bind(this,
-function(U){mxEvent.isConsumed(U)||((mxEvent.isControlDown(U)||mxClient.IS_MAC&&mxEvent.isMetaDown(U))&&13==U.keyCode?(P.click(),mxEvent.consume(U)):27==U.keyCode&&(O.click(),mxEvent.consume(U)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";L.appendChild(P);N.insertBefore(L,t);D.style.display="none";t.style.display="none";M.focus()}function H(z,N){N.innerText="";z=new Date(z.modifiedDate);var J=b.timeSince(z);null==J&&(J=mxResources.get("lessThanAMinute"));mxUtils.write(N,mxResources.get("timeAgo",
-[J],"{1} ago"));N.setAttribute("title",z.toLocaleDateString()+" "+z.toLocaleTimeString())}function E(z){var N=document.createElement("img");N.className="geCommentBusyImg";N.src=IMAGE_PATH+"/spin.gif";z.appendChild(N);z.busyImg=N}function F(z){z.style.border="1px solid red";z.busyImg.parentNode==z&&z.removeChild(z.busyImg)}function d(z){z.style.border="";z.busyImg.parentNode==z&&z.removeChild(z.busyImg)}function k(z,N,J,K,m){function t(X,W,Y){var Z=document.createElement("li");Z.className="geCommentAction";
-var aa=document.createElement("a");aa.className="geCommentActionLnk";mxUtils.write(aa,X);Z.appendChild(aa);mxEvent.addListener(aa,"click",function(fa){W(fa,z);fa.preventDefault();mxEvent.consume(fa)});V.appendChild(Z);Y&&(Z.style.display="none")}function D(){function X(Z){W.push(Y);if(null!=Z.replies)for(var aa=0;aa<Z.replies.length;aa++)Y=Y.nextSibling,X(Z.replies[aa])}var W=[],Y=L;X(z);return{pdiv:Y,replies:W}}function M(X,W,Y,Z,aa){function fa(){E(ka);z.addReply(ha,function(ba){ha.id=ba;z.replies.push(ha);
-d(ka);Y&&Y()},function(ba){ea();F(ka);b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,aa)}function ea(){y(ha,ka,function(ba){fa()},!0)}var ca=D().pdiv,ha=b.newComment(X,b.getCurrentUser());ha.pCommentId=z.id;null==z.replies&&(z.replies=[]);var ka=k(ha,z.replies,ca,K+1);W?ea():fa()}if(m||!z.isResolved){G.style.display="none";var L=document.createElement("div");L.className="geCommentContainer";L.setAttribute("data-commentId",z.id);L.style.marginLeft=20*K+
-5+"px";z.isResolved&&(A.style.opacity="0.7");var O=document.createElement("div");O.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=z.user&&null!=z.user.pictureUrl?z.user.pictureUrl:Editor.userImage;O.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";O.appendChild(P);var U=document.createElement("div");U.className="geCommentUsername";mxUtils.write(U,null!=z.user?z.user.displayName:mxResources.get("unknownUser"));
-P.appendChild(U);U=document.createElement("div");U.className="geCommentDate";U.setAttribute("data-commentId",z.id);H(z,U);P.appendChild(U);L.appendChild(O);O=document.createElement("div");O.className="geCommentTxt";mxUtils.write(O,z.content||"");L.appendChild(O);z.isLocked&&(L.style.opacity="0.5");O=document.createElement("div");O.className="geCommentActions";var V=document.createElement("ul");V.className="geCommentActionsList";O.appendChild(V);l||z.isLocked||0!=K&&!n||t(mxResources.get("reply"),
-function(){M("",!0)},z.isResolved);P=b.getCurrentUser();null==P||null==z.user||P.id!=z.user.id||l||z.isLocked||(t(mxResources.get("edit"),function(){function X(){y(z,L,function(){E(L);z.editComment(z.content,function(){d(L)},function(W){F(L);X();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}X()},z.isResolved),t(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){E(L);z.deleteComment(function(X){if(!0===X){X=L.querySelector(".geCommentTxt");
-X.innerText="";mxUtils.write(X,mxResources.get("msgDeleted"));var W=L.querySelectorAll(".geCommentAction");for(X=0;X<W.length;X++)W[X].parentNode.removeChild(W[X]);d(L);L.style.opacity="0.5"}else{W=D(z).replies;for(X=0;X<W.length;X++)I.removeChild(W[X]);for(X=0;X<N.length;X++)if(N[X]==z){N.splice(X,1);break}G.style.display=0==I.getElementsByTagName("div").length?"block":"none"}},function(X){F(L);b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},z.isResolved));
-l||z.isLocked||0!=K||t(z.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(X){function W(){var Y=X.target;Y.innerText="";z.isResolved=!z.isResolved;mxUtils.write(Y,z.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=z.isResolved?"none":"",aa=D(z).replies,fa="light-dark("+(z.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<aa.length;ea++){aa[ea].style.backgroundColor=fa;for(var ca=aa[ea].querySelectorAll(".geCommentAction"),ha=0;ha<ca.length;ha++)ca[ha]!=
-Y.parentNode&&(ca[ha].style.display=Z);S||(aa[ea].style.display="none")}u()}z.isResolved?M(mxResources.get("reOpened")+": ",!0,W,!1,!0):M(mxResources.get("markedAsResolved"),!1,W,!0)});L.appendChild(O);null!=J?I.insertBefore(L,J.nextSibling):I.appendChild(L);for(J=0;null!=z.replies&&J<z.replies.length;J++)O=z.replies[J],O.isResolved=z.isResolved,k(O,z.replies,null,K+1,m);null!=x&&(x.comment.id==z.id?(m=z.content,z.content=x.comment.content,y(z,L,x.saveCallback,x.deleteOnCancel),z.content=m):null==
-x.comment.id&&x.comment.pCommentId==z.id&&(I.appendChild(x.div),y(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return L}}var l=!b.canComment(),n=b.canReplyToReplies(),x=null,A=document.createElement("div");A.className="geCommentsWin";var B=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.bottom=parseInt(B)+7+"px";A.appendChild(I);var G=document.createElement("span");G.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(G,
-mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=B;C.style.padding="3px 4px 4px 4px";B=document.createElement("a");B.className="geButton";if(!l){var R=B.cloneNode();R.style.backgroundImage="url("+Editor.plusImage+")";R.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(R,"click",function(z){function N(){y(J,K,function(m){E(K);b.addComment(m,function(t){m.id=t;Q.push(m);d(K)},function(t){F(K);
-N();b.handleError(t,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var J=b.newComment("",b.getCurrentUser()),K=k(J,Q,null,0);N();z.preventDefault();mxEvent.consume(z)});C.appendChild(R)}var T=B.cloneNode();T.style.backgroundImage="url("+Editor.checkImage+")";T.setAttribute("title",mxResources.get("showResolved"));var S=!1;mxEvent.addListener(T,"click",function(z){(S=!S)?T.classList.add("geActiveItem"):T.classList.remove("geActiveItem");v();z.preventDefault();mxEvent.consume(z)});
-C.appendChild(T);b.commentsRefreshNeeded()&&(R=B.cloneNode(),R.style.backgroundImage="url("+Editor.refreshImage+")",R.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(R,"click",function(z){v();z.preventDefault();mxEvent.consume(z)}),C.appendChild(R));b.commentsSaveNeeded()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),B.className="geButton geAdaptiveAsset",mxEvent.addListener(B,
-"click",function(z){q();z.preventDefault();mxEvent.consume(z)}),C.appendChild(B));A.appendChild(C);var Q=[],v=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var z=x.div.querySelector(".geCommentEditTxtArea"),N=x.div.querySelector(".geCommentEditBtns");x.comment.content=z.value;z.parentNode.removeChild(z);N.parentNode.removeChild(N)}catch(J){b.handleError(J)}I.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+
-mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function K(m){if(null!=m){m.sort(function(D,M){return new Date(D.modifiedDate)-new Date(M.modifiedDate)});for(var t=0;t<m.length;t++)K(m[t].replies)}}J.sort(function(m,t){return new Date(m.modifiedDate)-new Date(t.modifiedDate)});I.innerText="";I.appendChild(G);G.style.display="block";Q=J;for(J=0;J<Q.length;J++)K(Q[J].replies),k(Q[J],Q,null,0,S);null!=x&&null==x.comment.id&&
-null==x.comment.pCommentId&&(I.appendChild(x.div),y(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(J){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(J&&J.message?": "+J.message:""));this.hasError=!0})):I.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});v();this.refreshComments=v;C=mxUtils.bind(this,function(){function z(t){var D=J[t.id];if(null!=D)for(H(t,D),D=0;null!=t.replies&&D<t.replies.length;D++)z(t.replies[D])}if(this.window.isVisible()){for(var N=
-I.querySelectorAll(".geCommentDate"),J={},K=0;K<N.length;K++){var m=N[K];J[m.getAttribute("data-commentId")]=m}for(K=0;K<Q.length;K++)z(Q[K])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=new mxWindow(mxResources.get("comments"),A,f,g,c,p,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,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,f,g,c,p,q,u,y,H,E,F){var d=document.createElement("div");d.style.textAlign="center";F=null!=F?F:44;var k=document.createElement("div");k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight=F+"px";k.style.lineHeight="1.2em";mxUtils.write(k,f);d.appendChild(k);null!=E&&(k=document.createElement("div"),k.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",E),k.appendChild(f),
-d.appendChild(k));E=document.createElement("div");E.style.textAlign="center";E.style.whiteSpace="nowrap";var l=document.createElement("input");l.setAttribute("type","checkbox");q=mxUtils.button(q||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(l.checked)});q.className="geBtn";null!=y&&(q.innerHTML=y+"<br>"+q.innerHTML,q.style.display="inline-block",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.style.width="40%");b.editor.cancelFirst&&E.appendChild(q);
-var n=mxUtils.button(p||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(l.checked)});E.appendChild(n);null!=u?(n.innerHTML=u+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||E.appendChild(q);d.appendChild(E);H?(E.style.marginTop="10px",k=document.createElement("p"),k.style.marginTop="20px",k.style.marginBottom=
-"0px",k.appendChild(l),p=document.createElement("span"),mxUtils.write(p," "+mxResources.get("rememberThisSetting")),k.appendChild(p),d.appendChild(k),mxEvent.addListener(p,"click",function(x){l.checked=!l.checked;mxEvent.consume(x)})):E.style.marginTop="12px";this.init=function(){n.focus()};this.container=d},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};
+B.style.display="none";"svg"==I&&(mxUtils.write(D,mxResources.get("links")+":"),D.appendChild(V),D.appendChild(B),mxUtils.br(D),mxUtils.br(D),U+=50);l=new CustomDialog(this,D,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=P.value;this.lastEmbedImages=Q.checked;this.lastEmbedFonts=T.checked;this.lastEmbedInclude=O.value;x(P.value,m.checked,!y.checked,C.checked,M.checked,Q.checked&&g,v.value,L.checked,("png"==I||"svg"==I)&&"currentPage"==O.value,V.value,null!=N?N.checked:
+null,null!=t?t.value:null,J.value,T.checked)}),null,l,n);this.showDialog(l.container,340,U,!0,!0,null,null,null,null,!0);P.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?P.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,l,n,x){var A=document.createElement("div");A.style.whiteSpace="nowrap";var B=this.editor.graph;if(null!=g){var I=document.createElement("h3");mxUtils.write(I,g);I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+A.appendChild(I)}var H=this.addCheckbox(A,mxResources.get("fit"),!0),D=this.addCheckbox(A,mxResources.get("shadow"),B.shadowVisible&&n,!n),S=this.addCheckbox(A,l),U=this.addCheckbox(A,mxResources.get("lightbox"),!0),R=this.addEditButton(A,U),P=R.getEditInput(),v=1<B.model.getChildCount(B.model.getRoot()),y=this.addCheckbox(A,mxResources.get("layers"),v,!v);y.style.marginLeft=P.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?
+(v&&y.removeAttribute("disabled"),P.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&U.checked?R.getEditSelect().removeAttribute("disabled"):R.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,A,mxUtils.bind(this,function(){d(H.checked,D.checked,S.checked,U.checked,R.getLink(),y.checked)}),null,mxResources.get("embed"),x);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(d,g,l,n,x,A,B,I){function H(P){var v=" ",y="";n&&(v=" 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!=S?"&page="+S:"")+(x?"&edit=_blank":"")+(A?"&layers=1":"")+"');}})(this);\"",y+=
+"cursor:pointer;");d&&(y+="max-width:100%;");var L="";l&&(L=' width="'+Math.round(D.width)+'" height="'+Math.round(D.height)+'"');B('<img src="'+P+'"'+L+(""!=y?' style="'+y+'"':"")+v+"/>")}var D=this.editor.graph.getGraphBounds(),S=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(P){var v=n?this.getFileData(!0):null;P=this.createImageDataUri(P,v,"png");H(P)}),null,null,null,mxUtils.bind(this,function(P){I({message:mxResources.get("unknownError")})}),
+null,!0,l?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),D.width*D.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var U="";l&&(U="&w="+Math.round(2*D.width)+"&h="+Math.round(2*D.height));var R=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+U+"&xml="+encodeURIComponent(g));R.send(mxUtils.bind(this,function(){200<=R.getStatus()&&299>=R.getStatus()?H("data:image/png;base64,"+R.getText()):I({message:mxResources.get("unknownError")})}))}else I({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(d,g,l,n,x,A,B){var I=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),H=I.getElementsByTagName("a");if(null!=H)for(var D=0;D<H.length;D++){var S=H[D].getAttribute("href");null!=S&&"#"==S.charAt(0)&&"_blank"==H[D].getAttribute("target")&&H[D].removeAttribute("target")}n&&I.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(I);if(l){var U=" ",R="";n&&(U="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"+(x?"&edit=_blank":"")+(A?"&layers=1":"")+"');}})(this);\"",R+="cursor:pointer;");d&&(R+="max-width:100%;");this.editor.convertImages(I,mxUtils.bind(this,function(P){B('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(P))+'"'+(""!=R?' style="'+R+'"':"")+U+"/>")}))}else R="",n&&(g=this.getSelectedPageIndex(),I.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:"")+(x?"&edit=_blank":"")+(A?"&layers=1":"")+"');}}})(this);"),R+="cursor:pointer;"),d&&(d=parseInt(I.getAttribute("width")),x=parseInt(I.getAttribute("height")),I.setAttribute("viewBox","-0.5 -0.5 "+d+" "+x),R+="max-width:100%;max-height:"+x+"px;",I.removeAttribute("height")),""!=R&&I.setAttribute("style",R),this.editor.addFontCss(I),this.editor.graph.mathEnabled&&this.editor.addMathCss(I),B(mxUtils.getXml(I))};EditorUi.prototype.timeSince=function(d){d=
+Math.floor((new Date-d)/1E3);var g=Math.floor(d/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(d/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(d/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(d/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(d/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,g){if(null!=d){var l=null;if("diagram"==d.nodeName)l=
+d;else if("mxfile"==d.nodeName){var n=d.getElementsByTagName("diagram");if(0<n.length){l=n[0];var x=g.getGlobalVariable;g.getGlobalVariable=function(A){return"page"==A?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==A?1:x.apply(this,arguments)}}}null!=l&&(d=Editor.parseDiagramNode(l))}n=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(A){}finally{this.editor.graph=n}return d};EditorUi.prototype.getSvgFileProperties=function(d){return this.getPngFileProperties(d)};
+EditorUi.prototype.getPngFileProperties=function(d){var g=1,l=0;if(null!=d){if(d.hasAttribute("scale")){var n=parseFloat(d.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}d.hasAttribute("border")&&(n=parseInt(d.getAttribute("border")),!isNaN(n)&&0<n&&(l=n))}return{scale:g,border:l}};EditorUi.prototype.getEmbeddedPng=function(d,g,l,n,x){try{var A=this.editor.graph,B=null;if(null!=l&&0<l.length)A=this.createTemporaryGraph(A.getStylesheet()),document.body.appendChild(A.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,
+!0),A),B=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){A=this.createTemporaryGraph(A.getStylesheet());var I=A.getGlobalVariable;A.setBackgroundImage=this.editor.graph.setBackgroundImage;var H=this.pages[0];this.currentPage==H?A.setBackgroundImage(this.editor.graph.backgroundImage):null!=H.viewState&&null!=H.viewState&&A.setBackgroundImage(H.viewState.backgroundImage);A.getGlobalVariable=function(D){return"page"==D?H.getName():"pagenumber"==D?1:I.apply(this,arguments)};document.body.appendChild(A.container);
+A.model.setRoot(H.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(D){try{null==B&&(B=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var S=D.toDataURL("image/png");S=Editor.writeGraphModelToPng(S,"tEXt","mxfile",encodeURIComponent(B));d(S.substring(S.lastIndexOf(",")+1));A!=this.editor.graph&&A.container.parentNode.removeChild(A.container)}catch(U){null!=g&&g(U)}}),null,null,null,mxUtils.bind(this,function(D){null!=g&&g(D)}),null,null,n,null,A.shadowVisible,null,A,x,null,
+null,null,"diagram",null)}catch(D){null!=g&&g(D)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,l,n,x,A,B,I,H,D,S,U,R){I=null!=I?I:!0;S=null!=S?S:0;B=null!=H?H:g.background;B==mxConstants.NONE&&(B=null);null==B&&"none"==g.getAdaptiveColors()&&(B="#ffffff");H=this.editor.graph.createSvgImageExport(null!=d);A=g.getSvg(B,D,S,null,null,A,null,H,null,g.shadowVisible||U,null,R,"diagram");(g.shadowVisible||U)&&g.addSvgShadow(A,null,null,0==S);null!=d&&A.setAttribute("content",d);null!=l&&A.setAttribute("resource",
+l);var P=mxUtils.bind(this,function(v){v=(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(v);null!=x&&x(v);return v});g.mathEnabled&&this.editor.addMathCss(A);if(null!=x)this.embedFonts(A,mxUtils.bind(this,function(v){I?this.editor.convertImages(v,mxUtils.bind(this,function(y){P(y)})):P(v)}));else return P(A)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(d,l),g(d)}catch(n){g(d)}}))}catch(l){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,l,n,x,A,B,I,H,D,S,U,R){H=null!=H?H:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(v){Editor.addRetryToError(v,mxUtils.bind(this,function(){this.exportImage(d,g,l,n,x,A,B,I,H,D,S,U,R)}));this.handleError(v)}))){var P=this.editor.graph.isSelectionEmpty();
+l=null!=l?l:P;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(v){this.spinner.stop();try{this.saveCanvas(v,x?this.getFileData(!0,null,null,null,l,I,null,null,null,null,null,d,A):null,H,null==this.pages||0==this.pages.length,S)}catch(y){this.handleError(y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),null,l,d||1,g,n,null,null,A,B,D,U,R)}catch(v){this.spinner.stop(),this.handleError(v)}}};
+EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.addLocalPagesToMapping=function(d){d=null!=d?d:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)d[this.pages[g].getId()]=this.pages[g].getId();return d};EditorUi.prototype.importXml=function(d,g,l,n,x,A,B){g=null!=g?g:0;l=null!=l?l:0;var I=[];try{var H=this.editor.graph;if(null!=d&&0<d.length){H.model.beginUpdate();try{var D=mxUtils.parseXml(d);d={};var S=this.editor.extractGraphModel(D.documentElement,
+null!=this.pages);if(null!=S&&"mxfile"==S.nodeName&&null!=this.pages){var U=S.getElementsByTagName("diagram");if(1==U.length&&!A){if(S=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(d[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var R=U[0].getAttribute("name");null!=R&&""!=R&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,R))}}else if(0<U.length){A=[];var P=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[U[0].getAttribute("id")]=
+this.pages[0].getId(),R=U[0].getAttribute("name"),null!=R&&""!=R&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],R)),S=Editor.parseDiagramNode(U[0]),n=!1,P=1);for(;P<U.length;P++){var v=U[P].getAttribute("id");U[P].removeAttribute("id");var y=this.updatePageRoot(new DiagramPage(U[P]));d[v]=U[P].getAttribute("id");var L=this.pages.length;null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[L+1]));H.model.execute(new ChangePage(this,y,y,L,!0));A.push(y)}this.updatePageLinks(d,
+A)}}if(null!=S&&"mxGraphModel"===S.nodeName){I=H.importGraphModel(S,g,l,n);if(null!=I)for(this.addLocalPagesToMapping(d),P=0;P<I.length;P++)this.updatePageLinksForCell(d,I[P]);var J=H.parseBackgroundImage(S.getAttribute("backgroundImage"));if(null!=J&&null!=J.originalSrc){this.updateBackgroundPageLink(d,J);var K=new ChangePageSetup(this,null,J);K.ignoreColor=!0;H.model.execute(K)}}B&&H.pasteCellStyles(H.includeDescendants(I),H.defaultVertexStyle,H.defaultEdgeStyle)}finally{H.model.endUpdate()}}}catch(m){if(x)throw m;
+this.handleError(m)}return I};EditorUi.prototype.updatePageLinks=function(d,g){for(var l=0;l<g.length;l++)this.updatePageLinksForCell(d,g[l].root),null!=g[l].viewState&&this.updateBackgroundPageLink(d,g[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var l=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=l&&(g.originalSrc="data:page/id,"+l)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=
+function(d,g){var l=document.createElement("div"),n=this.editor.graph,x=n.getLinkForCell(g);null!=x&&n.setLinkForCell(g,this.updatePageLink(d,x));if(n.isHtmlLabel(g)){l.innerHTML=Graph.sanitizeHtml(n.getLabel(g));for(var A=l.getElementsByTagName("a"),B=!1,I=0;I<A.length;I++)x=A[I].getAttribute("href"),null!=x&&(A[I].setAttribute("href",this.updatePageLink(d,x)),B=!0);B&&n.labelChanged(g,l.innerHTML)}for(I=0;I<n.model.getChildCount(g);I++)this.updatePageLinksForCell(d,n.model.getChildAt(g,I))};EditorUi.prototype.updatePageLink=
+function(d,g){if(Graph.isPageLink(g)){var l=d[g.substring(g.indexOf(",")+1)];g=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var x=0;x<n.actions.length;x++){var A=n.actions[x];if(null!=A.open&&Graph.isPageLink(A.open)){var B=A.open.substring(A.open.indexOf(",")+1);l=d[B];null!=l?A.open="data:page/id,"+l:null==this.getPageById(B)&&delete A.open}}g="data:action/json,"+JSON.stringify(n)}}catch(I){}return g};
+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,l,n,x){var A=mxUtils.bind(this,function(B){this.loadingExtensions=!1;null!=l?l(B):this.handleError(B)});this.createTimeout(null,mxUtils.bind(this,function(B){n=null!=n?n:d.name;var I=mxUtils.bind(this,function(D){B.clear()&&A(D)}),H=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var D=this.isRemoteVisioFormat(n);
+try{var S=n.lastIndexOf(".");if(0<=S&&S<n.length)n.substring(S+1).toUpperCase();else{var U=n.lastIndexOf("/");0<=U&&U<n.length&&(n=n.substring(U+1))}}catch(P){}if(D)if(null==VSS_CONVERT_URL||this.isOffline())I({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{D=new FormData;D.append("file1",d,n);var R=new XMLHttpRequest;R.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));R.responseType="blob";this.addRemoteServiceSecurityCheck(R);
+null!=x&&R.setRequestHeader("x-convert-custom",x);R.onreadystatechange=mxUtils.bind(this,function(){if(4==R.readyState&&B.clear())if(200<=R.status&&299>=R.status)try{var P=R.response;if("text/xml"==P.type){var v=new FileReader;v.onload=mxUtils.bind(this,function(y){try{g(y.target.result)}catch(L){I({message:mxResources.get("errorLoadingFile")})}});v.readAsText(P)}else this.doImportVisio(P,g,I,n)}catch(y){I(y)}else try{""==R.responseType||"text"==R.responseType?I({message:R.responseText}):(v=new FileReader,
+v.onload=function(){try{I({message:JSON.parse(v.result).Message})}catch(y){null!=v.result&&0<v.result.length?I({message:v.result}):I(y)}},v.readAsText(R.response))}catch(y){I({})}});R.send(D)}else if(B.clear())try{this.doImportVisio(d,g,I,n)}catch(P){I(P)}}else I({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?H():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",H,null,null,null,I))}),A)};
+EditorUi.prototype.importGraphML=function(d,g,l){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=l?l(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var A=mxUtils.bind(this,function(I){x.clear()&&n(I)}),B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,g,n)}catch(I){A(I)}else A({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||
+this.isOffline(!0)?B():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,A))}),n)};EditorUi.prototype.exportVisio=function(d){if(this.spinner.spin(document.body,mxResources.get("loading"))){var g=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(l){var n=mxUtils.bind(this,function(A){l.clear()&&g(A)}),x=mxUtils.bind(this,function(){this.loadingExtensions=
+!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(d)||n({message:mxResources.get("unknownError")})}catch(A){n(A)}else n({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,n))}),g):g({message:mxResources.get("serviceUnavailableOrBlocked")})}};
+EditorUi.prototype.convertLucidChart=function(d,g,l){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=l?l(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var A=mxUtils.bind(this,function(I){x.clear()&&n(I)}),B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if("undefined"!==typeof window.LucidImporter)try{var I=JSON.parse(d);g(LucidImporter.importState(I));try{if(null!=window.console&&"1"==urlParams.test){var H=[(new Date).toISOString(),
+"convertLucidChart",I];null!=I.state&&H.push(JSON.parse(I.state));if(null!=I.svgThumbs)for(var D=0;D<I.svgThumbs.length;D++)H.push(Editor.createSvgDataUri(I.svgThumbs[D]));null!=I.thumb&&H.push(I.thumb);console.log.apply(console,H)}}catch(S){}}catch(S){null!=window.console&&console.error(S),A(S)}else A({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(B,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",B,null,null,null,A)},null,null,null,A)},null,null,null,A)},null,null,null,A)},null,null,null,A):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,A))}),n)};EditorUi.prototype.createMermaidXml=function(d,g,l,
+n,x,A){var B=new Graph(document.createElement("div"));l=B.insertVertex(null,null,null,0,0,n,x,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");B.setAttributeForCell(l,"mermaidData",JSON.stringify({data:d,config:g},null,2));null!=A&&B.setAttributeForCell(l,"templatePrompt",A);d=(new mxCodec).encode(B.getModel());return mxUtils.getXml(d)};EditorUi.prototype.getSvgForXml=function(d){var g=null,l=this.createTemporaryGraph(this.editor.graph.getStylesheet());try{document.body.appendChild(l.container),
+(new mxCodec(mxUtils.parseXml(d))).decode(mxUtils.parseXml(d).documentElement,l.getModel()),g=l.getSvg(null,null,null,null,null,null,null,null,null,null,null,null,null,null,!0,!0)}finally{document.body.removeChild(l.container)}return g};EditorUi.prototype.generateOpenAiMermaidDiagram=function(d,g,l,n,x){var A=0,B=mxUtils.bind(this,function(){this.createTimeout(this.editor.generateTimeout,mxUtils.bind(this,function(I){var H="";if(null!=this.drive&&null!=this.drive.getUser()){var D=this.drive.getUser();
+null!=D.email&&0<D.email.indexOf("@")&&(H=D.email.substring(D.email.indexOf("@")+1))}var S={prompt:d,driveDomain:H,options:null!=x?x:{}};EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"enableParser",n,"data",[S],"url",["https://www.draw.io/generate/v3"]);var U=Date.now();H=new mxXmlRequest("https://www.draw.io/generate/v3",JSON.stringify(S),"POST");var R=mxUtils.bind(this,function(v){I.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"data",[S],"error",[v],"time",
+Date.now()-U+" ms"),l(v))}),P=mxUtils.bind(this,function(v){3>A++?I.clear()&&B():R(v)});H.send(mxUtils.bind(this,function(v){if(I.isAlive())if(200<=v.getStatus()&&299>=v.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var L=v.getText();try{L=JSON.parse(L),result=L.result}catch(J){result=L}EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"data",[S],"response",[L],"time",Date.now()-U+" ms");n?"<"==result.charAt(0)?I.clear()&&(L=Editor.extractGraphModelFromText(result),g(null!=
+L&&3==L.length?L[1]:result)):this.parseMermaidDiagram(result,null,mxUtils.bind(this,function(J){this.tryAndHandle(mxUtils.bind(this,function(){I.clear()&&g(J)}),R)}),R,P,!0):this.generateMermaidImage(result,null,mxUtils.bind(this,function(J,K,m){this.tryAndHandle(mxUtils.bind(this,function(){I.clear()&&g(result,J,K,m)}),R)}),R,P)}),R,!0);else{var y={message:mxResources.get("error")+" "+v.getStatus()};try{y=JSON.parse(v.getText()),null!=y.error&&(y.message=y.error)}catch(L){}R(y)}}),R)}),l)});B()};
+EditorUi.prototype.extractMermaidDeclaration=function(d){d=mxUtils.trim(d);"o\n\n"==d.substring(0,3)&&(d=d.substring(3));var g=d.split("```");g=1<g.length?g:d.split("<pre>");g=1<g.length?g:d.split("~~~");g=1<g.length?g:d.split("%%");g=1<g.length?g:d.split("(Begins)");d=mxUtils.trim(1>=g.length?d:g[1]);g=d.split("\n");var l=1<g.length?g[1]:null;if(null!=l){var n=l.indexOf("-");0<n&&(l=l.substring(0,n))}if(0<g.length&&"mermaid"==mxUtils.trim(g[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,
+l))g.shift(),d=mxUtils.trim(g.join("\n")),g=d.split("\n");l=g[0].split(" ")[0].replace(/:$/,"");n=l.indexOf("-");0<n&&(l=l.substring(0,n));0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(d=null);return d};EditorUi.prototype.isSupportedMermaidDiagramType=function(d){return"graph"==d||"flowchart"==d||"sequencediagram"==d||"classdiagram"==d||"statediagram-v2"==d||"statediagram"==d||"erdiagram"==d||"requirementdiagram"==d||"gitgraph"==d||"mindmap"==d||"journey"==d};EditorUi.prototype.getMermaidDiagramType=
+function(d){d=d.split("\n");for(var g=0;g<d.length&&(0==d[g].trim().length||"%%"==d[g].substring(0,2));)g++;if("---"==d[g].trim()){do g++;while(g<d.length&&"---"!=d[g].trim());g++}d=d[g].trim().toLowerCase();g=d.indexOf(" ");return d.substring(0,0<g?g:d.length)};EditorUi.prototype.parseMermaidDiagram=function(d,g,l,n,x,A){var B=!1;A&&"undefined"!==typeof mxMermaidToDrawio&&this.isSupportedMermaidDiagramType(this.getMermaidDiagramType(d))&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(I){B||
+I==this.emptyDiagramXml||(B=!0,l(I))}));this.generateMermaidImage(d,g,mxUtils.bind(this,function(I,H,D){B||(B=!0,l(this.createMermaidXml(d,g,I,H,D)))}),n,x)};EditorUi.prototype.loadMermaid=function(d,g){var l=mxUtils.bind(this,function(x){this.loadingMermaid=!1;g(x)}),n=mxUtils.bind(this,function(){try{this.loadingMermaid=!1,d()}catch(x){l(x)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(n,0):(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+n,null,null,null,l):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",n,null,null,null,l))};EditorUi.prototype.mermaidSvgToDataUri=function(d,g,l,n){try{d=d.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var x=mxUtils.parseXml(d).getElementsByTagName("svg");if(0<x.length&&"error"!=x[0].getAttribute("aria-roledescription")){var A=parseFloat(x[0].getAttribute("width")),B=parseFloat(x[0].getAttribute("height"));if(isNaN(A)||isNaN(B))try{var I=x[0].getAttribute("viewBox").split(/\s+/);
+A=parseFloat(I[2]);B=parseFloat(I[3])}catch(H){A=A||100,B=B||100}g(this.convertDataUri(Editor.createSvgDataUri(d)),A,B)}else null!=n?n():l({message:mxResources.get("invalidInput")})}catch(H){l(H)}};EditorUi.prototype.getMermaidConfig=function(d,g){g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);g.securityLevel="strict";g.startOnLoad=!1;g.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=d.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&
+(g.theme="dark");return g};EditorUi.prototype.generateMermaidImage=function(d,g,l,n,x){var A=mxUtils.bind(this,function(B){null!=n?n(B):this.handleError(B)});this.loadMermaid(mxUtils.bind(this,function(){try{mermaid.mermaidAPI.initialize(this.getMermaidConfig(d,g)),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d).then(mxUtils.bind(this,function(B){this.mermaidSvgToDataUri(B.svg,l,n,x)})).catch(mxUtils.bind(this,function(B){this.removeMermaidErrors();"undefined"!==typeof mxMermaidToDrawio&&
+mxMermaidToDrawio.resetListeners();null!=x?x(B):A(B)}))}catch(B){A(B)}}),A)};EditorUi.prototype.removeMermaidErrors=function(){for(var d=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),g=0;g<d.length;g++)null!=d[g].parentNode&&d[g].parentNode.removeChild(d[g])};EditorUi.prototype.generatePlantUmlImage=function(d,g,l,n){function x(I,H,D){c1=I>>2;c2=(I&3)<<4|H>>4;c3=(H&15)<<2|D>>6;c4=D&63;r="";r+=A(c1&63);r+=A(c2&63);r+=A(c3&63);return r+=A(c4&63)}function A(I){if(10>I)return String.fromCharCode(48+
+I);I-=10;if(26>I)return String.fromCharCode(65+I);I-=26;if(26>I)return String.fromCharCode(97+I);I-=26;return 0==I?"-":1==I?"_":"?"}var B=new XMLHttpRequest;B.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(I){r="";for(i=0;i<I.length;i+=3)r=i+2==I.length?r+x(I.charCodeAt(i),I.charCodeAt(i+1),0):i+1==I.length?r+x(I.charCodeAt(i),0,0):r+x(I.charCodeAt(i),I.charCodeAt(i+1),I.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=
+g&&(B.responseType="blob");B.onload=function(I){if(200<=this.status&&300>this.status)if("txt"==g)l(this.response);else{var H=new FileReader;H.readAsDataURL(this.response);H.onloadend=function(D){var S=new Image;S.onload=function(){try{var U=S.width,R=S.height;if(0==U&&0==R){var P=H.result,v=P.indexOf(","),y=decodeURIComponent(escape(atob(P.substring(v+1)))),L=mxUtils.parseXml(y).getElementsByTagName("svg");0<L.length&&(U=parseFloat(L[0].getAttribute("width")),R=parseFloat(L[0].getAttribute("height")))}l(H.result,
+U,R)}catch(J){n(J)}};S.src=H.result};H.onerror=function(D){n(D)}}else n(I)};B.onerror=function(I){n(I)};B.send()};EditorUi.prototype.insertAsPreText=function(d,g,l){var n=this.editor.graph,x=null;n.getModel().beginUpdate();try{x=n.insertVertex(null,null,"<pre>"+d+"</pre>",g,l,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(x,!0)}finally{n.getModel().endUpdate()}return x};EditorUi.prototype.insertTextAt=function(d,g,l,n,x,A,B,I){A=null!=A?A:!0;B=null!=B?B:!0;if(null!=d)if(Graph.fileSupport&&
+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(R){4==R.readyState&&200<=R.status&&299>=R.status&&this.editor.graph.setSelectionCells(this.insertTextAt(R.responseText,g,l,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var H=this.editor.graph;if("data:application/pdf;base64,"==
+d.substring(0,28)){var D=Editor.extractGraphModelFromPdf(d);if(null!=D&&0<D.length)return this.importXml(D,g,l,A,!0,I)}if(Editor.isPngDataUrl(d)&&(D=Editor.extractGraphModelFromPng(d),null!=D&&0<D.length))return this.importXml(D,g,l,A,!0,I);if("data:image/svg+xml;"==d.substring(0,19))try{D=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(D=d.substring(d.indexOf(",")+1),D=window.atob&&!mxClient.IS_SF?atob(D):Base64.decode(D,!0)):D=decodeURIComponent(d.substring(d.indexOf(",")+1));var S=this.importXml(D,
+g,l,A,!0,I);if(0<S.length)return S}catch(R){}this.loadImage(d,mxUtils.bind(this,function(R){if("data:"==d.substring(0,5))this.resizeImage(R,d,mxUtils.bind(this,function(y,L,J){H.setSelectionCell(H.insertVertex(null,null,"",H.snap(g),H.snap(l),L,J,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(y)+";"))}),B,this.maxImageSize);else{var P=Math.min(1,Math.min(this.maxImageSize/R.width,this.maxImageSize/R.height)),
+v=Math.round(R.width*P);R=Math.round(R.height*P);H.setSelectionCell(H.insertVertex(null,null,"",H.snap(g),H.snap(l),v,R,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";"))}}),mxUtils.bind(this,function(){var R=null;H.getModel().beginUpdate();try{R=H.insertVertex(H.getDefaultParent(),null,d,H.snap(g),H.snap(l),1,1,"text;"+(n?"html=1;":"")),H.updateCellSize(R),H.fireEvent(new mxEventObject("textInserted","cells",[R]))}finally{H.getModel().endUpdate()}H.setSelectionCell(R)}))}else{d=
+Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,l,A,null,I);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(R){this.editor.graph.setSelectionCells(this.importXml(R,g,l,A,null,I))}),mxUtils.bind(this,function(R){this.handleError(R)}));else{H=this.editor.graph;x=null;H.getModel().beginUpdate();try{x=H.insertVertex(H.getDefaultParent(),null,"",H.snap(g),H.snap(l),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));H.fireEvent(new mxEventObject("textInserted",
+"cells",[x]));n&&(d=H.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");x.value=d;H.updateCellSize(x);if(0<this.maxTextWidth&&x.geometry.width>this.maxTextWidth){var U=H.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=U.width;x.geometry.height=U.height}Graph.isLink(x.value)&&H.setLinkForCell(x,x.value);x.geometry.width+=H.gridSize;x.geometry.height+=H.gridSize}finally{H.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=
+function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var g=d.indexOf(";");0<g&&(d=d.substring(0,g)+d.substring(d.indexOf(",",g+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,g){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==
+d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,g){if(d&&Graph.fileSupport){if(null==this.importFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=l}this.importFileInputElt.click()}else{window.openNew=
+!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(B,I){StorageFile.listFiles(this,"F",B,I)});window.openBrowserFile=mxUtils.bind(this,function(B,I,H){StorageFile.getFileContent(this,B,I,H)});window.deleteBrowserFile=mxUtils.bind(this,function(B,I,H){StorageFile.deleteFile(this,B,I,H)});if(!g){var n=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(B){this.hideDialog(B)}));window.openFile.setConsumer(mxUtils.bind(this,
+function(B,I){null!=I&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(I)?(B=new Blob([B],{type:"application/octet-stream"}),this.importVisio(B,mxUtils.bind(this,function(H){this.importXml(H,0,0,!0)}),null,I)):this.editor.graph.setSelectionCells(this.importXml(B,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 x=this.dialog,A=x.close;this.dialog.close=mxUtils.bind(this,function(B){Editor.useLocalStorage=
+n;A.apply(x,arguments);B&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,g,l){var n=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(A){if(mxUtils.isEmptyObject(A.files))l();else{var B=0,I,H=!1;A.forEach(function(D,S){D=S.name.toLowerCase();"diagram/diagram.xml"==D?(H=!0,S.async("string").then(function(U){0==U.indexOf("<mxfile ")?g(U):l()})):0==D.indexOf("versions/")&&
+(D=parseInt(D.substr(9)),D>B&&(B=D,I=S))});0<B?I.async("string").then(function(D){(new XMLHttpRequest).upload&&n.isRemoteFileFormat(D,d.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):n.parseFileData(D,mxUtils.bind(this,function(S){4==S.readyState&&(200<=S.status&&299>=S.status?g(S.responseText):l())}),d.name):l()}):H||l()}},function(A){l(A)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,
+mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,l))};EditorUi.prototype.importFile=function(d,g,l,n,x,A,B,I,H,D,S,U){D=null!=D?D:!0;var R=!1,P=null,v=mxUtils.bind(this,function(y){var L=null;null!=y&&"<mxlibrary"==y.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,y,B)),this.showSidebar()):L=this.importXml(y,l,n,D,null,null!=U?mxEvent.isControlDown(U):null);null!=I&&I(L)});"image"==g.substring(0,5)?(H=!1,"image/png"==g.substring(0,9)&&(S=S?null:this.extractGraphModelFromPng(d),
+null!=S&&0<S.length&&(P=this.importXml(S,l,n,D,null,null!=U?mxEvent.isControlDown(U):null),H=!0)),H||(H=this.editor.graph,S=d.indexOf(";"),0<S&&(d=d.substring(0,S)+d.substring(d.indexOf(",",S+1))),D&&H.isGridEnabled()&&(l=H.snap(l),n=H.snap(n)),S="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(S+="editableCssRules=.*;"),P=[H.insertVertex(null,null,"",l,n,x,A,S+"image="+d+";")])):/(\.*<graphml )/.test(d)?
+(R=!0,this.importGraphML(d,v)):null!=H&&null!=B&&EditorUi.isVisioFilename(B)?(R=!0,this.importVisio(H,v)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,B)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(R=!0,g=mxUtils.bind(this,function(y){4==y.readyState&&(200<=y.status&&299>=y.status?v(y.responseText):null!=I&&(I(null),this.showError(mxResources.get("error"),413==y.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),
+null!=d?this.parseFileData(d,g,B):this.parseFile(H,g,B)):0==d.indexOf("PK")&&null!=H?(R=!0,this.importZipFile(H,v,mxUtils.bind(this,function(){P=this.insertTextAt(this.validateFileData(d),l,n,!0,null,D);I(P)}))):/(\.v(sd|dx))($|\?)/i.test(B)||/(\.vs(s|x))($|\?)/i.test(B)||(P=this.insertTextAt(this.validateFileData(d),l,n,!0,null,D,null,null!=U?mxEvent.isControlDown(U):null));R||null==I||I(P);return P};EditorUi.prototype.importFiles=function(d,g,l,n,x,A,B,I,H,D,S,U,R){n=null!=n?n:this.maxImageSize;
+D=null!=D?D:this.maxImageBytes;var P=null!=g&&null!=l,v=!0;g=null!=g?g:0;l=null!=l?l:0;var y=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var L=S||this.resampleThreshold,J=0;J<d.length;J++)if("image/svg"!==d[J].type.substring(0,9)&&"image/"===d[J].type.substring(0,6)&&d[J].size>L){y=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[d],"x",[g],"y",[l],"maxSize",[n],"maxBytes",[D],"resampleThreshold",[this.resampleThreshold],"largeImages",[y],"crop",[P],"resizeImages",[v],"ignoreEmbeddedXml",
+[U],"evt",[R]);var K=mxUtils.bind(this,function(){var m=this.editor.graph,t=m.gridSize;x=null!=x?x:mxUtils.bind(this,function(T,V,X,W,Y,Z,aa,ja,ea){try{if(null!=T&&"<mxlibrary"==T.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,T,aa)),this.showSidebar(),null;this.isCompatibleString(T)&&1==d.length&&null!=R&&"drop"==R.type&&this.isBlankFile()&&!this.canUndo()&&(P=!1,W=X=0);return this.importFile(T,V,X,W,Y,Z,aa,ja,ea,P,U,R)}catch(ca){return this.handleError(ca),null}});
+A=null!=A?A:mxUtils.bind(this,function(T){m.setSelectionCells(T)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var C=d.length,N=C,M=[],O=mxUtils.bind(this,function(T,V){M[T]=V;if(0==--N){this.spinner.stop();if(null!=I)I(M);else{var X=[];m.getModel().beginUpdate();try{for(T=0;T<M.length;T++){var W=M[T]();null!=W&&(X=X.concat(W))}}finally{m.getModel().endUpdate()}}A(X)}}),Q=0;Q<C;Q++)mxUtils.bind(this,function(T){var V=d[T];if(null!=V){var X=new FileReader;X.onload=mxUtils.bind(this,
+function(W){if(null==B||B(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Y=Graph.clipSvgDataUri(W.target.result),Z=Y.indexOf(","),aa=decodeURIComponent(escape(atob(Y.substring(Z+1)))),ja=mxUtils.parseXml(aa),ea=ja.getElementsByTagName("svg");if(0<ea.length){var ca=ea[0],ka=U?null:ca.getAttribute("content");null!=ka&&"<"!=ka.charAt(0)&&"%"!=ka.charAt(0)&&(ka=unescape(window.atob?atob(ka):Base64.decode(ka,!0)));null!=ka&&"%"==ka.charAt(0)&&(ka=decodeURIComponent(ka));
+null==ka||"<mxfile "!==ka.substring(0,8)&&"<mxGraphModel>"!==ka.substring(0,14)&&"<mxGraphModel "!==ka.substring(0,14)?O(T,mxUtils.bind(this,function(){try{if(null!=ja){var ia=ja.getElementsByTagName("svg");if(0<ia.length){var fa=ia[0],da=fa.getAttribute("width"),ra=fa.getAttribute("height");da=null!=da&&"%"!=da.charAt(da.length-1)?parseFloat(da):NaN;ra=null!=ra&&"%"!=ra.charAt(ra.length-1)?parseFloat(ra):NaN;var pa=fa.getAttribute("viewBox");if(null==pa||0==pa.length)fa.setAttribute("viewBox","0 0 "+
+da+" "+ra);else if(isNaN(da)||isNaN(ra)){var qa=pa.split(" ");3<qa.length&&(da=parseFloat(qa[2]),ra=parseFloat(qa[3]))}Y=Editor.createSvgDataUri(mxUtils.getXml(fa));var sa=Math.min(1,Math.min(n/Math.max(1,da)),n/Math.max(1,ra)),ha=x(Y,V.type,g+T*t,l+T*t,Math.max(1,Math.round(da*sa)),Math.max(1,Math.round(ra*sa)),V.name);if(null!=ha&&(isNaN(da)||isNaN(ra))){var ma=new Image;ma.onload=mxUtils.bind(this,function(){da=Math.max(1,ma.width);ra=Math.max(1,ma.height);ha[0].geometry.width=da;ha[0].geometry.height=
+ra;fa.setAttribute("viewBox","0 0 "+da+" "+ra);Y=Editor.createSvgDataUri(mxUtils.getXml(fa));var ta=Y.indexOf(";");0<ta&&(Y=Y.substring(0,ta)+Y.substring(Y.indexOf(",",ta+1)));m.setCellStyles("image",Y,[ha[0]])});ma.src=Editor.createSvgDataUri(mxUtils.getXml(fa))}return ha}}}catch(ta){}return null})):O(T,mxUtils.bind(this,function(){return x(ka,"text/xml",g+T*t,l+T*t,0,0,V.name)}))}else O(T,mxUtils.bind(this,function(){return null}))}else{Z=!1;if("image/png"==V.type){var la=U?null:this.extractGraphModelFromPng(W.target.result);
+if(null!=la&&0<la.length){var ba=new Image;ba.src=W.target.result;O(T,mxUtils.bind(this,function(){return x(la,"text/xml",g+T*t,l+T*t,ba.width,ba.height,V.name)}));Z=!0}}Z||(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(W.target.result,mxUtils.bind(this,
+function(ia){this.resizeImage(ia,W.target.result,mxUtils.bind(this,function(fa,da,ra){O(T,mxUtils.bind(this,function(){if(null!=fa&&fa.length<D){var pa=v&&this.isResampleImageSize(V.size,S)?Math.min(1,Math.min(n/da,n/ra)):1;return x(fa,V.type,g+T*t,l+T*t,Math.round(da*pa),Math.round(ra*pa),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),v,n,S,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Y=W.target.result,
+x(Y,V.type,g+T*t,l+T*t,240,160,V.name,function(ia){O(T,function(){return ia})},V)}catch(ia){O(T,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(ia,V)}else O(T,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(V.name)?x(null,V.type,g+T*t,l+T*t,240,160,V.name,function(W){O(T,function(){return W})},V):"image"==V.type.substring(0,5)||"application/pdf"==V.type?X.readAsDataURL(V):X.readAsText(V)}})(Q)});if(y){y=[];for(J=0;J<d.length;J++)y.push(d[J]);
+d=y;this.confirmImageResize(function(m){v=m;K()},H)}else K()};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(d,g){g=null!=g?g:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,x=function(A,B){if(A||g)mxSettings.setResizeImages(A?
+B:null),mxSettings.save();l();d(B)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(A){x(A,!0)},function(A){x(A,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):x(!1,n)};EditorUi.prototype.parseFile=function(d,g,
+l){l=null!=l?l:d.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,g,l)});n.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,l){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(l)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(x){}};
+EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,l,n,x,A,B){x=null!=x?x:this.maxImageSize;var I=Math.max(1,d.width),H=Math.max(1,d.height),D=g;if(n&&this.isResampleImageSize(null!=B?B:g.length,A))try{var S=Math.max(I/x,H/x);if(1<S){var U=Math.round(I/S),R=Math.round(H/S),P=document.createElement("canvas");P.width=U;P.height=R;P.getContext("2d").drawImage(d,0,0,U,R);var v=P.toDataURL();if(v.length<g.length){var y=
+document.createElement("canvas");y.width=U;y.height=R;var L=y.toDataURL();v!==L&&(g=v,I=U,H=R)}}}catch(J){}n&&D!=g&&x>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(d,g,l,n,x/1.5,A,B):l(g,I,H)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,l){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!=l&&(n.onerror=l);n.src=d}catch(x){if(null!=
+l)l(x);else throw x;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var p=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());p.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&
+null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var d=this,g=this.editor.graph,l=g.isEnabled;g.isEnabled=function(){return l.apply(this,arguments)&&!d.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(t){var C=t.getEvent();return null==t.getState()&&!mxEvent.isMouseEvent(C)&&
+!g.freehand.isDrawing()||mxEvent.isPopupTrigger(C)&&(null==t.getState()||mxEvent.isControlDown(C)||mxEvent.isShiftDown(C))});g.cellEditor.editPlantUmlData=function(t,C,N){var M=JSON.parse(N);C=new SimpleTextareaDialog(d,M.data,function(O){null!=O&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(O,M.format,function(Q,T,V){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==M.format)g.labelChanged(t,"<pre>"+Q+"</pre>"),g.updateCellSize(t,!0);else{g.setCellStyles("image",
+d.convertDataUri(Q),[t]);var X=g.model.getGeometry(t);null!=X&&(X=X.clone(),X.width=T,X.height=V,g.cellsResized([t],[X],!1))}g.setAttributeForCell(t,"plantUmlData",JSON.stringify({data:O,format:M.format}))}finally{g.getModel().endUpdate()}},function(Q){d.handleError(Q)})});d.showDialog(C.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));C.init()};g.cellEditor.editMermaidData=function(t,C,N){var M=JSON.parse(N);C=new SimpleTextareaDialog(d,M.data,function(O){null!=O&&d.spinner.spin(document.body,
+mxResources.get("inserting"))&&d.generateMermaidImage(O,M.config,function(Q,T,V){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",Q,[t]);var X=g.model.getGeometry(t);null!=X&&(X=X.clone(),X.width=Math.max(X.width,T),X.height=Math.max(X.height,V),g.cellsResized([t],[X],!1));g.setAttributeForCell(t,"mermaidData",JSON.stringify({data:O,config:M.config},null,2))}finally{g.getModel().endUpdate()}},function(Q){d.handleError(Q)})});d.showDialog(C.container,640,420,!0,!0,null,null,
+null,new mxRectangle(0,0,320,280));C.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=function(t,C){try{var N=this.graph.getAttributeForCell(t,"plantUmlData");if(null!=N)this.editPlantUmlData(t,C,N);else if(N=this.graph.getAttributeForCell(t,"mermaidData"),null!=N&&window.isMermaidEnabled)this.editMermaidData(t,C,N);else{var M=g.getCellStyle(t);"1"==mxUtils.getValue(M,"metaEdit","0")?d.showDataDialog(t):n.apply(this,arguments)}}catch(O){d.handleError(O)}};g.getLinkTitle=function(t){return d.getLinkTitle(t)};
+g.customLinkClicked=function(t,C){var N=!1;try{var M=this.getGraphBounds();d.handleCustomLink(t,C);N=!0;d.chromelessResize&&!M.equals(this.getGraphBounds())&&(d.chromelessResize(),this.scrollCellToVisible(C))}catch(O){d.handleError(O)}return N};var x=g.parseBackgroundImage;g.parseBackgroundImage=function(t){var C=x.apply(this,arguments);null!=C&&null!=C.src&&Graph.isPageLink(C.src)&&(C={originalSrc:C.src});return C};var A=g.setBackgroundImage;g.setBackgroundImage=function(t){null!=t&&null!=t.originalSrc&&
+(t=d.createImageForPageLink(t.originalSrc,d.currentPage,this));A.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(t,C){t=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=t){var N=t.indexOf(",");if(0<N)for(t=t.substring(N+1),C=C.getProperty("patches"),
+N=0;N<C.length;N++)if(null!=C[N][EditorUi.DIFF_UPDATE]&&null!=C[N][EditorUi.DIFF_UPDATE][t]||null!=C[N][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(C[N][EditorUi.DIFF_REMOVE],t)){g.refreshBackgroundImage();break}}}));var B=g.getBackgroundImageObject;g.getBackgroundImageObject=function(t,C,N){var M=B.apply(this,arguments);null!=M&&null!=M.originalSrc&&(M=C?d.createImageForPageLink(M.originalSrc,N,null,!0):{src:M.originalSrc});return M};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
+"https://www.drawio.com/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 I=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(t){t=null!=t?t:"";"1"==urlParams.dev&&(t+=(0<t.length?"&":"?")+"dev=1");return I.apply(this,arguments)};var H=g.addClickHandler;g.addClickHandler=function(t,C,N){var M=C;C=function(O,Q,T){if(null==Q){var V=mxEvent.getSource(O);
+"a"==V.nodeName.toLowerCase()&&(Q=V.getAttribute("href"))}null!=Q&&g.isCustomLink(Q)&&(mxEvent.isTouchEvent(O)||!mxEvent.isPopupTrigger(O))&&g.customLinkClicked(Q,T)&&mxEvent.consume(O);null!=M&&M(O,Q,T)};H.call(this,t,C,N)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var D=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(t,C,N){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(t,["zoomIn",
+"zoomOut","-"],null,N);D.apply(this,arguments);g.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(t,["-","addToScratchpad"],null,N);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(t,["-","exitGroup","home"],null,N)};var S=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(t,C,N){if(d.editor.graph.isSelectionEmpty())S.apply(this,arguments),d.menus.addMenuItems(t,["copyAsImage","copyAsSvg"],null,N);else if(this.isShowCellEditItems()?
+this.addPopupDeleteItem(t,C,N):this.addPopupMenuArrangeItems(t,C,N),this.addMenuItems(t,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,N),this.isShowCellEditItems()||this.addPopupDeleteItem(t,C,N),this.addMenuItems(t,["lockUnlock","-"],null,N),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(C)&&g.isCellEditable(C)&&(this.addSubmenu("editCell",t,null,mxResources.get("edit")),t.addSeparator(),g.getModel().isEdge(C))){this.addSubmenu("line",t);var M=g.getModel().getGeometry(C);
+null!=M&&null!=M.points&&0<M.points.length&&this.addMenuItems(t,["clearWaypoints"],null,N)}1==g.getSelectionCount()&&this.addMenuItems(t,["enterGroup"],null,N);M=d.getSelectionState();null!=M.mergeCell?this.addMenuItem(t,"mergeCells"):(1<M.style.colspan||1<M.style.rowspan)&&this.addMenuItem(t,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=
+Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var U=g.getExportVariables;g.getExportVariables=function(){var t=U.apply(this,arguments),C=d.getCurrentFile();null!=C&&(t.filename=C.getTitle());t.pagecount=null!=d.pages?d.pages.length:1;t.page=
+null!=d.currentPage?d.currentPage.getName():"";t.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return t};var R=g.getGlobalVariable;g.getGlobalVariable=function(t){var C=d.getCurrentFile();return"filename"==t&&null!=C?C.getTitle():"page"==t&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==t?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==t?null!=d.pages?d.pages.length:1:R.apply(this,arguments)};var P=null,
+v=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var t=this.getCurrentFile(),C=null!=t&&null!=t.getTitle()?t.getTitle():this.defaultFilename;P!=C&&t==v&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());P=C;v=t}));var y=g.labelLinkClicked;g.labelLinkClicked=function(t,C,N){var M=C.getAttribute("href");if(null==M||!g.isCustomLink(M)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))y.apply(this,arguments);else{if(!g.isEnabled()||null!=t&&
+g.isCellLocked(t.cell))g.customLinkClicked(M),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var t=d.defaultFilename,C=d.getCurrentFile();null!=C&&(t=null!=C.getTitle()?C.getTitle():t);return t};var L=this.actions.get("print");L.setEnabled(!mxClient.IS_IOS||!navigator.standalone);L.visible=L.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!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(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",
+!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),g.addListener(mxEvent.ESCAPE,function(t,C){null!=C&&g.isEnabled()&&!g.isEditing()&&null!=C.getProperty("event")&&d.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&
+g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(t){var C=g.cellEditor.text2,N=null;null!=C&&(mxEvent.addListener(C,"dragleave",function(M){null!=N&&(N.parentNode.removeChild(N),N=null);M.stopPropagation();M.preventDefault()}),mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(M){null==N&&(N=this.highlightElement(C));M.stopPropagation();M.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(M){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<M.dataTransfer.files.length)this.importFiles(M.dataTransfer.files,
+0,0,this.maxImageSize,function(Q,T,V,X,W,Y){g.insertImage(Q,W,Y)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var T=0;T<Q.length;T++)Q[T]()},mxEvent.isControlDown(M));else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var O=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(Q){var T=Math.max(1,Q.width);Q=Math.max(1,Q.height);var V=this.maxImageSize;V=Math.min(1,
+Math.min(V/Math.max(1,T)),V/Math.max(1,Q));g.insertImage(decodeURIComponent(O),T*V,Q*V)})):document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(M.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(M.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"));M.stopPropagation();M.preventDefault()})))}));if(Editor.isSettingsEnabled()){L=
+this.editor.graph.view;var J=mxSettings.getUnit();L.setUnit(J);Editor.pageSizeUnit=J==mxConstants.METERS?mxConstants.MILLIMETERS:J;L.addListener("unitChanged",function(t,C){t=C.getProperty("unit");mxSettings.setUnit(t);mxSettings.save();Editor.pageSizeUnit=t==mxConstants.METERS?mxConstants.MILLIMETERS:t});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,L.unit);
+this.refresh()}if("1"==urlParams.styledev){L=document.getElementById("geFooter");null!=L&&(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)})),L.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,C){0<this.editor.graph.getSelectionCount()?(t=this.editor.graph.getSelectionCell(),t=this.editor.graph.getModel().getStyle(t),this.styleInput.value=t||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var K=this.isSelectionAllowed;this.isSelectionAllowed=function(t){return mxEvent.getSource(t)==this.styleInput?
+!0:K.apply(this,arguments)}}L=document.getElementById("geInfo");null!=L&&L.parentNode.removeChild(L);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var m=null;mxEvent.addListener(g.container,"dragleave",function(t){g.isEnabled()&&(null!=m&&(m.parentNode.removeChild(m),m=null),t.stopPropagation(),t.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(t){null==m&&(m=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();
+t.stopPropagation();t.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(t){null!=m&&(m.parentNode.removeChild(m),m=null);if(g.isEnabled()){var C=mxUtils.convertPoint(g.container,mxEvent.getClientX(t),mxEvent.getClientY(t)),N=t.dataTransfer.files,M=g.view.translate,O=g.view.scale,Q=C.x/O-M.x,T=C.y/O-M.y;if(0<N.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(t)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,
+!0)):(mxEvent.isAltDown(t)&&(T=Q=null),this.importFiles(N,Q,T,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(t),null,null,mxEvent.isShiftDown(t),t));else{mxEvent.isAltDown(t)&&(T=Q=0);var V=0<=mxUtils.indexOf(t.dataTransfer.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):null;C=this.extractGraphModelFromEvent(t,null!=this.pages);if(null!=C)g.setSelectionCells(this.importXml(C,Q,T,!0));else if(0<=mxUtils.indexOf(t.dataTransfer.types,"text/html")){var X=t.dataTransfer.getData("text/html");
+C=document.createElement("div");C.innerHTML=Graph.sanitizeHtml(X);var W=null;N=C.getElementsByTagName("img");null!=N&&1==N.length?(X=N[0].getAttribute("src"),null==X&&(X=N[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||(W=!0)):(N=C.getElementsByTagName("a"),null!=N&&1==N.length?X=N[0].getAttribute("href"):(C=C.getElementsByTagName("pre"),null!=C&&1==C.length&&(X=mxUtils.getTextContent(C[0]))));var Y=!0,Z=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(X,Q,
+T,!0,W,null,Y,mxEvent.isControlDown(t)))});W&&null!=X&&X.length>this.resampleThreshold?this.confirmImageResize(function(aa){Y=aa;Z()},mxEvent.isControlDown(t)):Z()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(aa){var ja=Math.max(1,aa.width);aa=Math.max(1,aa.height);var ea=this.maxImageSize;ea=Math.min(1,Math.min(ea/Math.max(1,ja)),ea/Math.max(1,aa));g.setSelectionCell(g.insertVertex(null,null,"",Q,T,ja*ea,aa*ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+V+";"))}),mxUtils.bind(this,function(aa){g.setSelectionCells(this.insertTextAt(V,Q,T,!0))})):0<=mxUtils.indexOf(t.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(t.dataTransfer.getData("text/plain"),Q,T,!0))}}t.stopPropagation();t.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();
+this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));d=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==d.embedViewport)mxUtils.fit(this.div);else{var t=parseInt(this.div.offsetLeft),C=parseInt(this.div.offsetWidth),
+N=d.embedViewport.x+d.embedViewport.width,M=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),Q=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(t,N-C))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(M,Q-O))+"px";this.div.style.height=Math.min(d.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(d.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(L=
+Editor.currentTheme,"simple"==L||"sketch"==L)this.doSetCurrentTheme(L,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));L=!1;if(null!=urlParams.dark)L=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)L="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||
+L&&"auto"!=mxSettings.settings.darkMode||(L=mxSettings.settings.darkMode);"auto"==L&&this.isAutoDarkModeSupported()&&(L=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof L?"1"==L:L);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(t){this.isAutoDarkMode()&&this.setDarkMode(t.matches)}))}catch(t){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?
+this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",
+mxUtils.bind(this,function(t,C){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&d.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var u=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,
+g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&d<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&d>=g&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=d}u.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,n=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,
+mxUtils.bind(this,function(D){mxEvent.getSource(D)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(D),mxEvent.getClientY(D)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var x=document.createElement("div");x.style.position="absolute";x.style.width="10px";x.style.height="10px";x.style.borderRadius="5px";x.style.border="1px solid gray";x.style.background="#ffffff";x.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(x);
+this.bottomResizer=x;var A=null,B=null,I=null,H=null;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(D){H=parseInt(this.diagramContainer.style.height);B=mxEvent.getClientY(D);n.popupMenuHandler.hideMenu();mxEvent.consume(D)}));x=x.cloneNode(!1);x.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(x);this.rightResizer=x;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(D){I=parseInt(this.diagramContainer.style.width);A=mxEvent.getClientX(D);n.popupMenuHandler.hideMenu();
+mxEvent.consume(D)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(D){var S=!1;null!=A&&(this.diagramContainer.style.width=Math.max(20,I+mxEvent.getClientX(D)-A)+"px",S=!0);null!=B&&(this.diagramContainer.style.height=Math.max(20,H+mxEvent.getClientY(D)-B)+"px",S=!0);S&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),
+function(D){null==A&&null==B||mxEvent.consume(D);B=A=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";g.style.visibility="hidden";d.style.visibility="hidden";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(D){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",
+mxUtils.bind(this,function(D){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";g.style.visibility="hidden";d.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){l.innerHTML=
+"&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow=
+"hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.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(A){var B=mxEvent.getSource(A);null==g.container||!g.isEnabled()||g.isMouseDown||
+g.isEditing()||null!=this.dialog||"INPUT"==B.nodeName||"TEXTAREA"==B.nodeName||"true"==B.contentEditable||224!=A.keyCode&&(mxClient.IS_MAC||17!=A.keyCode)&&(!mxClient.IS_MAC||91!=A.keyCode&&93!=A.keyCode)||n||(l.style.left=g.container.scrollLeft+10+"px",l.style.top=g.container.scrollTop+10+"px",A=g.container.scrollLeft,B=g.container.scrollTop,g.container.appendChild(l),n=!0,l.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=A,g.container.scrollTop=B)}));mxEvent.addListener(document,
+"keyup",mxUtils.bind(this,function(A){var B=A.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=B&&17!=B&&91!=B&&93!=B||(n=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(A){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(l),d()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(A){if(g.isEnabled())try{mxClipboard.copy(g),
+this.copyCells(l,!0),d()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(A){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{if(l.innerHTML="&nbsp;",l.focus(),null!=A.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(A,l,!0,!0)),!mxEvent.isConsumed(A)){var B=g.container.scrollLeft,I=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{g.container.scrollLeft=B,g.container.scrollTop=I,Graph.removePasteFormatting(l.firstChild),
+this.pasteCells(A,l,!1,!0)}catch(H){this.handleError(H)}}),0)}}catch(H){this.handleError(H)}}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=function(A){return mxEvent.getSource(A)==l?!0:x.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,g){mxSettings.setUi(d);(g=this.doSetCurrentTheme(d)||g)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=
+function(d,g){if(null==d||""==d)d=App.isSimpleThemePreferred()?"simple":"kennedy";var l="simple"==Editor.currentTheme&&this.isDefaultTheme(d)||this.isDefaultTheme(Editor.currentTheme)&&"simple"==d||d==Editor.currentTheme;if(l||g)g=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=d,this.switchTheme(d),this.fireEvent(new mxEventObject("currentThemeChanged")),this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(g);return l};EditorUi.prototype.saveScrollState=
+function(d){var g=this.editor.graph.view.translate,l=this.diagramContainer.scrollLeft,n=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(l-=this.embedViewport.x,n-=this.embedViewport.y):(l+=this.embedViewport.x,n+=this.embedViewport.y));g={x:l,y:n,tx:g.x,ty:g.y};d&&(g.boundingRect=this.diagramContainer.getBoundingClientRect());return g};EditorUi.prototype.restoreScrollState=function(d){var g=this.editor.graph.view.scale,l=this.editor.graph.view.translate;if(null!=
+d.boundingRect){var n=this.diagramContainer.getBoundingClientRect();d.x-=d.boundingRect.x-n.x;d.y-=d.boundingRect.y-n.y}this.diagramContainer.scrollLeft=d.x+(l.x-d.tx)*g;this.diagramContainer.scrollTop=d.y+(l.y-d.ty)*g};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var g=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="")}));mxEvent.addListener(d,
+"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||g||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var n=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;g=null!=n&&null!=n.getAttribute("class");if(!g&&null!=n){n=n.getAttribute("title");var x=this.getCurrentFile();x=null!=x?x.savingStatusKey:DrawioFile.prototype.savingStatusKey;
+n==mxResources.get(x)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(x))+'..."src="'+Editor.tailSpin+'"></div>',g=!0)}this.statusContainer.style.display="none";n=32>=d.clientWidth;d.style.visibility=n&&""==this.editor.getStatus()?"hidden":"";if(n||g)this.statusContainer.style.display="",g=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=
+""});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(d){this.destroyWindows(!0);this.updateDefaultStyles();this.switchThemeConstants(d);this.switchCssForTheme(d);this.createMainMenuForTheme(d);this.createFooterMenuForTheme(d);this.createPickerMenuForTheme(d);this.createMenubarForTheme(d);"sketch"==d&&(this.createFormatWindow(),this.createShapesWindow())};EditorUi.prototype.getWindows=function(){var d=[this.sidebarWindow,this.formatWindow,this.freehandWindow];
+null!=this.actions&&(d=d.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(d=d.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return d};EditorUi.prototype.fitWindows=function(){for(var d=this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.fit()};EditorUi.prototype.hideWindows=function(){for(var d=this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.setVisible(!1)};EditorUi.prototype.destroyWindows=
+function(d){null==this.sidebarWindow||d||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||d||(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.chatWindow&&(this.chatWindow.destroy(),this.chatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),
+this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),
+this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(d){var g=this.editor.graph;g.defaultEdgeLength=Graph.prototype.defaultEdgeLength;g.defaultGridEnabled=Graph.prototype.defaultGridEnabled;g.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=d&&"sketch"!=d);if("simple"==d||"sketch"==d){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)g.defaultEdgeLength=
+120;null==urlParams.grid&&(g.defaultGridEnabled=!1);null==urlParams.pv&&(g.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(d){};EditorUi.prototype.createMainMenuForTheme=function(d){};EditorUi.prototype.createFooterMenuForTheme=function(d){};EditorUi.prototype.createPickerMenuForTheme=function(d){};EditorUi.prototype.getNetworkStatus=
+function(){var d=null;if(this.isOffline(!0))d=mxResources.get("offline");else{var g=this.getCurrentFile();null!=g&&(g.invalidChecksum?d=mxResources.get("error")+": "+mxResources.get("checksum"):null==g.sync||g.sync.enabled&&g.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==g.sync||g.sync.isConnected()?g.isRealtimeEnabled()&&g.isRealtimeSupported()&&1<g.getRealtimeState()&&(d=g.getRealtimeError(),d=mxResources.get("realtimeCollaboration")+": "+(null!=d&&null!=d.message?d.message:
+mxResources.get("error"))):d=mxResources.get("notConnected"):d=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return d};EditorUi.prototype.createMenubarForTheme=function(d){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);
+null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(d,g,l,n){l=null!=l?l:"geButton";var x=this.menus.get(d);n=this.menubar.addMenu(mxResources.get(d),x.funct,null,n);n.className=l;n.setAttribute("title",mxResources.get(d));this.menus.menuCreated(x,n,l);null!=g&&(n.style.backgroundImage="url("+g+")",n.innerText="");return n};EditorUi.prototype.addButton=function(d,g,
+l,n){d=this.createToolbarButton(d,g,l);n=null!=n?n:this.container;n.appendChild(d);return d};EditorUi.prototype.createToolbarButton=function(d,g,l){var n=document.createElement("a");n.className="geButton";null!=d&&"data:"==d.substring(0,5)&&(n.style.backgroundImage="url("+d+")");null!=g&&n.setAttribute("title",g);null!=l&&mxEvent.addListener(n,"click",function(x){"disabled"!=n.getAttribute("disabled")&&l(x);mxEvent.consume(x)});mxEvent.preventDefault(n);return n};EditorUi.prototype.createMenuItem=
+function(d,g,l){var n=this.actions.get(d),x=null!=n?n.funct:null,A=this.createToolbarButton(g,mxResources.get(d)+(null!=n&&null!=n.shortcut?" ("+n.shortcut+")":""),x);null==n||l||(d=function(){n.isEnabled()?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",d),n.addListener("stateChanged",d),d());return A};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=this,g=Math.max(10,this.diagramContainer.parentNode.clientWidth-
+256),l="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),g,60,240,l,mxUtils.bind(this,function(A){A.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var n=this.formatWindow.window.toggleMinimized,x=240;this.formatWindow.window.toggleMinimized=function(){n.apply(this,arguments);
+this.minimized?(x=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+x-140+"px"):(this.div.style.width=x+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-x+140)+"px");d.format.refresh();this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(A){mxEvent.getSource(A)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));
+this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var A=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,B=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>A||690>B)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var z=EditorUi.prototype.toggleFormatPanel;
+EditorUi.prototype.toggleFormatPanel=function(d){var g=this.formatWindow;null!=g?g.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):z.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(d){if(this.isShapesPanelVisible()!=d){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));var l=this.hsplitPosition,n=mxUtils.bind(this,function(){this.hsplitPosition=x;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),
+x=d?g:0,A=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(0)":"translateX(-100%)");0!=x&&n();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform "+A+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==x&&n()}),1E3*A)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var G=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():G.apply(this,
+arguments)};EditorUi.prototype.createShapesPanel=function(d){var g=mxUtils.bind(this,function(B,I){var H=this.menus.get(B);B=this.createMenuElement(I,mxUtils.bind(this,function(){H.funct.apply(this,arguments)}));B.setAttribute("title",I);B.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";B.className="geButton";d.parentNode.appendChild(B);return B});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=
+this.actions.get("newLibrary"))g=document.createElement("div"),g.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",g.className="geButton",g.style.left="0px",g.style.right="50%",mxUtils.write(g,mxResources.get("newLibrary")),d.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("newLibrary").funct),g=g.cloneNode(!1),g.style.left="50%",g.style.right="0px",mxUtils.write(g,mxResources.get("openLibrary")),d.appendChild(g),mxEvent.addListener(g,
+"click",this.actions.get("openLibrary").funct);else{var l=g("newLibrary","");l.style.left="0px";l.style.right="50%";var n=document.createElement("span");l.appendChild(n);var x=g("openLibraryFrom","");x.style.borderLeftWidth="1px";x.style.left="50%";x.style.right="0px";var A=document.createElement("span");x.appendChild(A);this.dependsOnLanguage(mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,mxResources.get("newLibrary"));l.setAttribute("title",mxResources.get("newLibrary"));A.innerHTML=
+"";mxUtils.write(A,mxResources.get("openLibraryFrom"));x.setAttribute("title",mxResources.get("openLibraryFrom"))}))}d.appendChild(this.sidebar.container);d.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=
+new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,d-6,g-6,mxUtils.bind(this,function(n){this.createShapesPanel(n)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=
+function(d){this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};EditorUi.prototype.setAndPersistDarkMode=function(d){var g=d;"auto"==d&&(g=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(g);mxSettings.settings.darkMode=d;mxSettings.save();d=mxSettings.getUi();null==urlParams.ui&&"dark"==d&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=
+function(d){this.spinner.spin(document.body,mxResources.get("working"))&&(mxSettings.setLanguage(d),mxSettings.save(),mxClient.language=d,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(d,g){this.dependsOnLanguage(mxUtils.bind(this,function(){d.setAttribute("title",mxResources.get(g))}))};EditorUi.prototype.dependsOnLanguage=function(d){d();
+this.addListener("languageChanged",d)};EditorUi.prototype.setAndPersistHighContrast=function(d){this.setHighContrast(d);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=d,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var d=document.getElementById("high-contrast-stylesheet");return null!=d&&window.matchMedia?(d=d.getAttribute("media"),"all"==d||"not all"!=d&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(d){var g=
+document.getElementById("high-contrast-stylesheet");if(null!=g&&window.matchMedia){var l=window.matchMedia("(forced-colors: active)").matches,n=g.getAttribute("media");(n="all"==n||"not all"!=n&&l)&&!d?g.setAttribute("media",l?"not all":"(forced-colors: active)"):!n&&d&&g.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(d){var g=this.getDiagramContainerOffset();mxSettings.setRulerOn(d);
+mxSettings.save();d||null==this.ruler?d&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.fireEvent(new mxEventObject("rulerVisibleChanged"));d=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=d.x-g.x;this.diagramContainer.scrollTop+=d.x-g.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(d){return!d&&"auto"==urlParams.dark||
+Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(d){mxUtils.lightDarkColorSupported&&(Editor.darkMode=d,d=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container,mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff",null!=d&&(Editor.isDarkMode()?(d.classList.add("geDarkMode"),d.style.colorScheme="dark"):(d.classList.remove("geDarkMode"),d.style.colorScheme="light")),
+null!=this.ruler&&this.ruler.updateStyle(),this.fireEvent(new mxEventObject("darkModeChanged")))};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,g){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,Editor.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),
+this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState(!0))),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:d,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,l=this.sketchPickerMenuElt;
+if(Editor.inlineFullscreen)g.style.left="10px",g.style.top="10px",l.style.left="10px",l.style.top="60px",d.style.top="10px",d.style.right="12px",d.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom=
+"0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var n=this.diagramContainer.getAttribute("data-bounds");if(null!=n){this.diagramContainer.removeAttribute("data-bounds");var x=n.split(" ");n=mxUtils.getDocumentSize();this.diagramContainer.style.top=x[0];this.diagramContainer.style.left=x[1];var A=parseInt(x[2]);x=parseInt(x[3]);A=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,A):A,n.width-80);x=Math.min(null!=
+this.minInlineHeight?Math.max(this.minInlineHeight,x):x,n.height-80);this.diagramContainer.style.width=A+"px";this.diagramContainer.style.height=x+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}g.style.left=this.diagramContainer.offsetLeft+"px";g.style.top=this.diagramContainer.offsetTop-g.offsetHeight-4+"px";l.style.display="";l.style.left=
+this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";d.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-d.offsetWidth+"px";d.style.top=g.style.top;d.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/
+2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;g.style.visibility="";d.style.visibility=""};EditorUi.prototype.doSetSketchMode=
+function(d){Editor.sketchMode!=d&&(Editor.sketchMode=d,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);d.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(d.vertexFontSize=16,d.edgeFontSize=d.vertexFontSize-
+4):"sketch"==Editor.currentTheme?(d.vertexFontSize=20,d.edgeFontSize=d.vertexFontSize-4):(d.vertexFontSize=Graph.prototype.vertexFontSize,d.edgeFontSize=Graph.prototype.edgeFontSize),d.defaultEdgeStyle.fontSize=d.edgeFontSize;if(null==Editor.config||null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.endSize="8",d.defaultEdgeStyle.startSize=
+"8"):"sketch"==Editor.currentTheme&&(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.jettySize="auto",d.defaultEdgeStyle.orthogonalLoop="1",d.defaultEdgeStyle.endArrow="open",d.defaultEdgeStyle.endSize="14",d.defaultEdgeStyle.startSize="14",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&
+null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(d.defaultVertexStyle.sketch="1",d.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,
+d.defaultVertexStyle.hachureGap="4",d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=
+function(d){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var l=d.indexOf(",");0<l&&(g=this.getPageById(d.substring(l+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(g=this.getCustomLinkTitle(d));return g};EditorUi.prototype.getCustomLinkTitle=function(d){var g=mxResources.get("action");if("data:action/json,"==d.substring(0,17))try{var l=JSON.parse(d.substring(17));null!=l&&null!=l.title&&(g=l.title)}catch(n){}return g};
+EditorUi.prototype.handleCustomLink=function(d,g){if(Graph.isPageLink(d))if(g=d.indexOf(","),d=this.getPageById(d.substring(g+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(d,g)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var d=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",
+mxUtils.bind(this,function(g){g.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(g){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(g,l){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));d.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
+this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(g,l){mxSettings.setCreateTarget(d.connectionHandler.isCreateTarget());mxSettings.save()}));d.pageFormat=null!=d.defaultPageFormat?d.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(g,l){mxSettings.setPageFormat(d.pageFormat);mxSettings.save()}));d.view.defaultDarkGridColor=mxSettings.getGridColor(!0);d.view.defaultGridColor=
+mxSettings.getGridColor(!1);d.view.gridColor="light-dark("+d.view.defaultGridColor+", "+d.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(g,l){mxSettings.setGridColor(d.view.defaultGridColor,!1);mxSettings.setGridColor(d.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(g,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),
+this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(g,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));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.writeImageToClipboard=function(d,g,l,n,x,A){n=null!=n?n:"image/png";var B=null==g||null==l?'<img src="'+
+d+'">':'<img src="'+d+'" width="'+g+'" height="'+l+'">',I={"text/html":new Blob([B],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(n)&&(I[n]=this.base64ToBlob(d.substring(d.indexOf(",")+1),n));var H=new ClipboardItem(I);navigator.clipboard.write([H]).then(x)["catch"](A);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[d],"w",g,"h",l,"type",n,"html",[B],"data",[I],"item",[H])};EditorUi.prototype.writeHtmlToClipboard=function(d,g){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(d)],
+{type:"text/plain"}),"text/html":new Blob([d],{type:"text/html"})})])["catch"](g)};EditorUi.prototype.writeTextToClipboard=function(d,g){navigator.clipboard.writeText(d)["catch"](g)};EditorUi.prototype.copySvg=function(d,g,l){try{if(null!=navigator.clipboard&&"function"===typeof window.ClipboardItem){var n=this.editor.graph.getSvg(null,l,null,null,null,null,null,null,null,null,null,null,null,0<d.length?d:null);n.setAttribute("content",g);var x=Editor.createSvgDataUri(mxUtils.getXml(n)),A=parseInt(n.getAttribute("width")),
+B=parseInt(n.getAttribute("height"));this.writeImageToClipboard(x,A,B,"image/svg+xml",null,mxUtils.bind(this,function(I){this.handleError(I)}))}}catch(I){this.handleError(I)}};EditorUi.prototype.copyImage=function(d,g,l){try{l=null!=l?l:4,null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(n,x){try{this.spinner.stop();var A=this.createImageDataUri(n,g,"png"),B=Math.round(parseInt(x.getAttribute("width"))/
+l),I=Math.round(parseInt(x.getAttribute("height"))/l);EditorUi.debug("EditorUi.copyImage",[this],"cells",[d],"xml",[g],"scale",[l]);this.writeImageToClipboard(A,B,I,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var H=this.getBaseFilename(!1)+(null!=g?".drawio":"")+".png";this.saveLocalFile(A.substring(A.lastIndexOf(",")+1),H,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(H){this.handleError(H)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();
+this.handleError(n)}),null,null,l,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(n){this.handleError(n)}};EditorUi.prototype.copyCells=function(d,g){var l=this.editor.graph;if(l.isSelectionEmpty())d.innerText="";else{var n=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),x=mxUtils.getXml(l.encodeCells(n));mxUtils.setTextContent(d,encodeURIComponent(x));g?(l.removeCells(n,!1),l.lastPasteXml=
+null):(l.lastPasteXml=x,l.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeClipboard){var g=this.editor.graph;g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,l,n,x,A){EditorUi.debug("EditorUi.pasteXml",[this],"xml",[d],"pasteAsLabel",
+[g],"compat",[l],"evt",[n],"html",[x],"pt",[A]);x=null!=x?x:!0;var B=this.editor.graph,I=null!=A?A:Editor.pasteAtMousePointer&&B.isMouseInsertPoint()?B.getInsertPoint():null;A=null;B.lastPasteXml==d?null==I&&B.pasteCounter++:(B.lastPasteXml=d,B.pasteCounter=0);var H=B.pasteCounter*B.gridSize;if(l||this.isCompatibleString(d)){B.model.beginUpdate();try{if(A=this.importXml(d,H,H),null!=I){var D=B.getBoundingBoxFromGeometry(A,!0);if(null!=D){var S=Math.round(B.snap(I.x)),U=Math.round(B.snap(I.y));B.cellsMoved(A,
+S-D.x,U-D.y)}}}finally{B.model.endUpdate()}B.setSelectionCells(A)}else if(g&&1==B.getSelectionCount()){g=B.getStartEditingCell(B.getSelectionCell(),n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==B.getCurrentCellStyle(g)[mxConstants.STYLE_SHAPE])B.setCellStyles(mxConstants.STYLE_IMAGE,d,[g]);else{B.model.beginUpdate();try{B.labelChanged(g,d),Graph.isLink(d)&&B.setLinkForCell(g,d)}finally{B.model.endUpdate()}}B.setSelectionCell(g)}else I=null!=I?I:B.getInsertPoint(),B.isMouseInsertPoint()&&
+(H=0,B.lastPasteXml==d&&0<B.pasteCounter&&B.pasteCounter--),A=this.insertTextAt(d,I.x+H,I.y+H,x),B.setSelectionCells(A);B.isSelectionEmpty()||(B.scrollCellToVisible(B.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(B.view.getState(B.getSelectionCell())));return A};EditorUi.prototype.pasteCells=function(d,g,l,n){if(!mxEvent.isConsumed(d)){var x=d.clipboardData,A=this.editor.graph,B=!1,I=g;if(l&&null!=x&&x.getData){var H=x.getData("text/plain"),D=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==
+H.substring(0,18))try{var S=decodeURIComponent(H);this.isCompatibleString(S)&&(D=!0,H=S)}catch(J){}D=D?null:x.getData("text/html");null!=D&&0<D.length?(I=this.parseHtmlData(D),B="text/plain"!=I.getAttribute("data-type")):null!=H&&0<H.length&&(I=document.createElement("div"),mxUtils.setTextContent(I,D))}H=I.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))l=H[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&
+(this.convertLucidChart(l,mxUtils.bind(this,function(J){var K=this.editor.graph;K.lastPasteXml==J?K.pasteCounter++:(K.lastPasteXml=J,K.pasteCounter=0);var m=K.pasteCounter*K.gridSize;K.setSelectionCells(this.importXml(J,m,m));K.scrollCellToVisible(K.getSelectionCell())}),mxUtils.bind(this,function(J){this.handleError(J)})),mxEvent.consume(d));else{var U=!1,R="";R=B?null!=I.textContent&&"<mxfile"==I.textContent.substring(0,7)&&"</mxfile>"==I.textContent.substring(I.textContent.length-9)||"<mxGraphModel"==
+I.textContent.substring(0,13)&&"</mxGraphModel>"==I.textContent.substring(I.textContent.length-15)?I.textContent.replace(/\u00a0/g," "):I.innerHTML:mxUtils.trim(null==I.innerText?mxUtils.getTextContent(I):I.innerText);try{var P=R.lastIndexOf("%3E");0<=P&&P<R.length-3&&(R=R.substring(0,P+3))}catch(J){}try{H=I.getElementsByTagName("span"),(S=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)):decodeURIComponent(R))&&(this.isCompatibleString(S)||0==S.substring(0,20).replace(/\s/g,
+"").indexOf('{"isProtected":'))&&(U=!0,R=S)}catch(J){}S=null;try{if(!U&&""==I.textContent)for(P=0;P<x.items.length;P++){var v=x.items[P];if("file"===v.kind){S=v.getAsFile();break}}}catch(J){}EditorUi.debug("EditorUi.pasteCells",[this],"evt",[d],"realElt",[g.outerHTML],"elt",[I.outerHTML],"useEvent",l,"pasteAsLabel",n,"xml",[R],"compat",U,"asHtml",B,"data",x,"items",[x.items.length],"files",[x.files.length],"types",[JSON.stringify(x.types)],"blob",[S]);try{if(U||null==S)if(null!=R&&0<R.length){if(0==
+R.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var L=mxUtils.bind(this,function(){try{R=(new MiroImporter).importMiroJson(JSON.parse(R)),this.pasteXml(R,n,U,d)}catch(J){console.log("Miro import error:",J)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",L):L()}else this.pasteXml(R,n,U,d,B);mxEvent.consume(d)}else l||(A.lastPasteXml=null,A.pasteCounter=0);else{var y=A.getInsertPoint();this.importFiles([S],y.x,y.y,this.maxImageSize);mxEvent.consume(d)}}catch(J){this.handleError(J)}}}g.innerHTML=
+"&nbsp;"};EditorUi.prototype.pasteFromClipboard=function(d){var g=this.editor.graph;if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,function(l,n,x,A,B){if(null!=l){g.getModel().beginUpdate();try{this.pasteXml(l,!0,null,null,null,d)}finally{g.getModel().endUpdate()}}else l=null!=n?n:null!=x?x:A,null!=l?(d=null!=d?d:g.getInsertPoint(),this.importFiles([l],d.x,d.y,this.maxImageSize)):this.pasteFromLocalClipboard(d)})):
+this.pasteFromLocalClipboard(d)}catch(l){}};EditorUi.prototype.pasteFromLocalClipboard=function(d){var g=this.editor.graph;g.getModel().beginUpdate();try{g.moveCellsTo(mxClipboard.paste(g),d)}finally{g.getModel().endUpdate()}};EditorUi.prototype.installImagePasteHandler=function(){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(g){for(var l=null!=g.clipboardData?g.clipboardData:g.originalEvent.clipboardData,n=!1,x=null,A=0;A<l.types.length;A++)if("text/"===
+l.types[A].substring(0,5)){n=!0;break}for(A=0;A<l.items.length;A++){var B=l.items[A];if("file"===B.kind){x=B.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[g],"data",[l],"items",[l.items.length],"files",[l.files.length],"types",[JSON.stringify(l.types)],"containsText",n,"file",[x],"editing",d.isEditing());var I=mxUtils.bind(this,function(){try{if(!n&&null!=x){if(d.isEditing())this.importFiles([x],0,0,this.maxImageSize,function(D,S,U,R,P,v){d.insertImage(D,P,v)},function(){},
+function(D){return"image/"==D.type.substring(0,6)},function(D){for(var S=0;S<D.length;S++)D[S]()});else{var H=this.editor.graph.getInsertPoint();this.importFiles([x],H.x,H.y,this.maxImageSize)}mxEvent.consume(g)}}catch(D){}});if(!mxEvent.isConsumed(g)&&!n)if(Editor.enableNativeClipboard)navigator.clipboard.read().then(mxUtils.bind(this,function(H){this.readTypeFromClipboardData(H,"image/svg+xml",mxUtils.bind(this,function(D){if(null!=D){D=new Blob([D],{type:"image/svg+xml"});var S=this.editor.graph.getInsertPoint();
+this.importFiles([D],S.x,S.y,this.maxImageSize)}else I()}),"image")}))["catch"](I);else I()}),!1)};EditorUi.prototype.readGraphModelFromClipboard=function(d){navigator.clipboard.read().then(mxUtils.bind(this,function(g){try{EditorUi.debug("EditorUi.readGraphModelFromClipboard",[this],"data",g,"types",null!=g&&0<g.length?[JSON.stringify(g[0].types)]:[]),this.readGraphModelFromHtmlClipboardData(g,mxUtils.bind(this,function(l,n){null!=l?d(l):this.readGraphModelFromImageClipboardData(g,mxUtils.bind(this,
+function(x,A,B){null!=x?d(x):this.readTypeFromClipboardData(g,"text/plain",mxUtils.bind(this,function(I){d(I,A,B,n,g)}))}))}))}catch(l){d(null)}}))["catch"](function(){d(null)})};EditorUi.prototype.readGraphModelFromHtmlClipboardData=function(d,g){this.readTypeFromClipboardData(d,"text/html",mxUtils.bind(this,function(l){var n=null,x=null;try{var A=this.parseHtmlData(l);if(null!=A){n="text/plain"!=A.getAttribute("data-type")?A.innerHTML:mxUtils.trim(null==A.innerText?mxUtils.getTextContent(A):A.innerText);
+try{var B=n.lastIndexOf("%3E");0<=B&&B<n.length-3&&(n=n.substring(0,B+3))}catch(D){}try{null==n&&(l=null,""==A.textContent&&1==A.children.length&&"IMG"==A.firstChild.nodeName&&(l=A.firstChild.getAttribute("src")),null!=l&&0<l.length&&("data:image/png;base64,"==l.substring(0,22)?x=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/png"):"data:image/svg+xml;base64,"==l.substring(0,26)&&(x=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/svg+xml"))))}catch(D){}try{var I=A.getElementsByTagName("span"),
+H=null!=I&&0<I.length?mxUtils.trim(decodeURIComponent(I[0].textContent)):decodeURIComponent(n);this.isCompatibleString(H)&&(n=H)}catch(D){}}}catch(D){}g(this.isCompatibleString(n)?n:null,x)}))};EditorUi.prototype.readGraphModelFromImageClipboardData=function(d,g){this.readTypeFromClipboardData(d,"image/svg+xml",mxUtils.bind(this,function(l,n){var x=null;try{null!=l&&(x=mxUtils.parseXml(l).documentElement.getAttribute("content"))}catch(A){}this.isCompatibleString(x)?g(x):this.readTypeFromClipboardData(d,
+"image/png",mxUtils.bind(this,function(A,B){x=Editor.extractGraphModelFromPng("data:image/png;base64,"+A);this.isCompatibleString(x)?g(x):g(null,n,B)}))}))};EditorUi.prototype.readTypeFromClipboardData=function(d,g,l){var n=!1;if(null!=d&&0<d.length)for(var x=0;x<d.length&&!n;x++)(function(A){0<=mxUtils.indexOf(A.types,g)&&(n=!0,A.getType(g).then(mxUtils.bind(this,function(B){if("image/png"==g)B.arrayBuffer().then(function(I){l(btoa(Graph.arrayBufferToString(I)),B)})["catch"](function(){l(null)});
+else B.text().then(mxUtils.bind(this,function(I){EditorUi.debug("EditorUi.readTypeFromClipboardData",[this],"data",[d],"type",[g],"result",[I]);l(I,B)}))["catch"](function(){l(null)})}))["catch"](function(){l(null)}))})(d[x]);n||l()};EditorUi.prototype.parseHtmlData=function(d){var g=null;if(null!=d&&0<d.length){var l="<meta "==d.substring(0,6);g=document.createElement("div");g.innerHTML=(l?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(d);asHtml=!0;l=g.getElementsByTagName("style");if(null!=l)for(;0<
+l.length;)l[0].parentNode.removeChild(l[0]);if(null!=g.firstChild&&g.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=g.firstChild.nextSibling&&g.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==g.firstChild.nodeName&&"A"==g.firstChild.nextSibling.nodeName&&null==g.firstChild.nextSibling.nextSibling){var n=null==g.firstChild.nextSibling.innerText?mxUtils.getTextContent(g.firstChild.nextSibling):g.firstChild.nextSibling.innerText;n==g.firstChild.nextSibling.getAttribute("href")&&
+(mxUtils.setTextContent(g,n),asHtml=!1)}if(""==g.textContent&&(l=g.getElementsByTagName("img"),1==l.length&&(n=l[0].getAttribute("src"),l=null,null!=n))){if(Editor.isPngDataUrl(n)){var x=Editor.extractGraphModelFromPng(n);null!=x&&0<x.length&&(l=x)}else if("data:image/svg+xml;base64,"==n.substring(0,26)){img=this.base64ToBlob(n.substring(n.indexOf(",")+1),"image/svg+xml");n=Graph.getSvgFromDataUri(n);try{x=mxUtils.parseXml(n).documentElement.getAttribute("content"),this.isCompatibleString(x)&&(l=
+x)}catch(A){}}null!=l&&(mxUtils.setTextContent(g,l),asHtml=!1)}asHtml?Graph.removePasteFormatting(g):g.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[d],"elt",[g],"asHtml",asHtml);return g};EditorUi.prototype.showPrintDialog=function(d,g,l){var n=330;this.editor.graph.isEnabled()&&(n+=40);null!=this.pages&&1<this.pages.length&&(n+=40,this.editor.graph.isEnabled()||(n+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(n+=20);this.showDialog((new PrintDialog(this,
+d,g,l)).container,320,n,!0,!0)};EditorUi.prototype.print=function(d,g){var l=this.editor,n=l.graph,x=this.getPageIndex(this.currentPage),A=null!=x?x+1:1,B=mxUtils.bind(this,function(J,K,m,t){var C=J.useCssTransforms,N=J.currentTranslate,M=J.currentScale,O=J.view.translate,Q=J.view.scale;J.useCssTransforms&&(J.useCssTransforms=!1,J.currentTranslate=new mxPoint(0,0),J.currentScale=1,J.view.translate=new mxPoint(0,0),J.view.scale=1);var T=J.getGraphBounds(),V=0,X=0,W=mxRectangle.fromRectangle(J.pageFormat),
+Y=g.fit||g.crop||!J.pageVisible,Z=g.scale;W.width=Math.ceil(W.width*J.pageScale);W.height=Math.ceil(W.height*J.pageScale);var aa=1;if(g.fit){aa=g.sheetsAcross;var ja=g.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));aa=Math.min(W.height*ja/(T.height/J.view.scale),W.width*aa/(T.width/J.view.scale))}else aa=isNaN(Z)?1:Z;aa*=1;!Y&&J.pageVisible?(Z=J.getPageLayout(),V-=Z.x*W.width,X-=Z.y*W.height):Y=!0;g.crop&&(g.selection&&(T=n.getBoundingBox(n.getSelectionCells())),
+W.width=(T.width+1)*aa/J.view.scale,W.height=(T.height+1)*aa/J.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);t=null!=t?"page/id,"+t:null;if(null==K){K=PrintDialog.createPrintPreview(J,aa,null,0,V,X,Y);K.title=this.getBaseFilename(!0);K.pageSelector=!1;K.mathEnabled=!1;V=g.border;isNaN(V)||(K.pageMargin=V);g.selection&&(K.isCellVisible=function(la){return J.isCellSelected(la)});var ea=K.writeHead;K.writeHead=function(la,ba){ba=null!=ba?ba:"";g.shadows||(ba+='g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');
+mxClient.IS_GC&&(ba+="@media print {\n .MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=l.fontCss&&(ba+=l.fontCss);ea.apply(this,arguments);for(var ia=J.getCustomFonts(),fa=0;fa<ia.length;fa++){var da=ia[fa].name,ra=ia[fa].url;Graph.isCssFontUrl(ra)?la.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(ra))+'" charset="UTF-8" type="text/css">'):(la.writeln('<style type="text/css">'),la.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(da)+
+'";\nsrc: url("'+mxUtils.htmlEntities(ra)+'");\n}'),la.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=K.drawBackgroundImage;K.drawBackgroundImage=function(la){ca.apply(this,arguments);null!=la.node&&(EditorUi.embedSvgImages(la.node),n.disableSvgLinks(la.node,function(ba){ba.setAttribute("href","javascript:void(0)")}))}}var ka=K.addGraphFragment;K.addGraphFragment=function(la,ba,ia,fa,da,ra){ka.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:da.classList.add("geDisableMathJax");
+if(this.graph.shadowVisible)for(var pa=da.getElementsByTagName("svg"),qa=0;qa<pa.length;qa++)J.addSvgShadow(pa[qa])};g.grid&&(K.gridSize=J.gridSize,K.gridSteps=J.view.gridSteps,K.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:J.view.gridColor);K.open(null,null,m,!0,t,W,g.selection?J.getSelectionCells():null)}else{T=J.background;if(null==T||""==T||T==mxConstants.NONE)T="#ffffff";K.backgroundColor=T;K.autoOrigin=Y;g.grid&&(K.gridSize=J.gridSize,K.gridSteps=J.view.gridSteps,K.gridColor=
+Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:J.view.gridColor);K.appendGraph(J,aa,V,X,m,!0,t,W,g.selection?J.getSelectionCells():null);m=J.getCustomFonts();if(null!=K.wnd)for(W=0;W<m.length;W++)V=m[W].name,X=m[W].url,Graph.isCssFontUrl(X)?K.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(X)+'" charset="UTF-8" type="text/css">'):(K.wnd.document.writeln('<style type="text/css">'),K.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(V)+'";\nsrc: url("'+
+mxUtils.htmlEntities(X)+'");\n}'),K.wnd.document.writeln("</style>"))}C&&(J.useCssTransforms=C,J.currentTranslate=N,J.currentScale=M,J.view.translate=O,J.view.scale=Q);return K}),I=g.pagesFrom,H=g.pagesTo,D=!g.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,g);else{D&&(D=g.selection||I==A&&H==A);if(!D&&null!=this.pages&&this.pages.length){D=0;A=this.pages.length-1;g.allPages||(D=parseInt(I)-1,A=parseInt(H)-1);for(var S=D;S<=A;S++){var U=this.pages[S];I=U==this.currentPage?
+n:null;if(null==I){I=this.createTemporaryGraph(n.stylesheet);I.shapeForegroundColor=n.shapeForegroundColor;I.shapeBackgroundColor=n.shapeBackgroundColor;H=!0;var R=D=!1,P=null,v=null;null==U.viewState&&null==U.root&&this.updatePageRoot(U);null!=U.viewState&&(H=U.viewState.pageVisible,D=U.viewState.mathEnabled,R=U.viewState.shadowVisible,P=U.viewState.background,v=U.viewState.backgroundImage,I.pageFormat=U.viewState.pageFormat,I.gridSize=U.viewState.gridSize);null!=v&&null!=v.originalSrc&&(v=this.createImageForPageLink(v.originalSrc,
+U));I.background=P;I.backgroundImage=null!=v?new mxImage(v.src,v.width,v.height,v.x,v.y):null;I.pageVisible=H;I.mathEnabled=D;I.shadowVisible=R;var y=I.getGraphBounds;I.getGraphBounds=function(){var J=y.apply(this,arguments),K=this.backgroundImage;if(null!=K&&null!=K.width&&null!=K.height){var m=this.view.translate,t=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((m.x+K.x)*t,(m.y+K.y)*t,K.width*t,K.height*t))}return J};var L=I.getGlobalVariable;I.getGlobalVariable=function(J){return"page"==
+J?U.getName():"pagenumber"==J?S+1:"pagecount"==J?null!=this.pages?this.pages.length:1:L.apply(this,arguments)};document.body.appendChild(I.container);this.updatePageRoot(U);I.model.setRoot(U.root)}x=B(I,x,S!=A,U.getId());I!=n&&I.container.parentNode.removeChild(I.container)}}else x=B(n);null==x||null==x.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(x.mathEnabled&&(B=x.wnd.document,d||(x.wnd.IMMEDIATE_PRINT=!0),B.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),
+x.closeDocument(),Graph.rewritePageLinks(x.wnd.document,!0),x.mathEnabled||d||PrintDialog.printPreview(x));return x}};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,l=0;l<d.length;l++)mxEvent.addListener(d[l],"dragleave",function(n){null!=g&&(g.parentNode.removeChild(g),g=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(d[l],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(g=this.highlightElement());
+n.stopPropagation();n.preventDefault()})),mxEvent.addListener(d[l],"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 x=this.extractGraphModelFromEvent(n);if(null==
+x){var A=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=A&&(10==document.documentMode||11==document.documentMode?x=A.getData("Text"):(x=null,x=0<=mxUtils.indexOf(A.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(A.types,"text/html")?A.getData("text/html"):null,null!=x&&0<x.length?(A=document.createElement("div"),A.innerHTML=Graph.sanitizeHtml(x),A=A.getElementsByTagName("img"),0<A.length&&(x=A[0].getAttribute("src"))):0<=mxUtils.indexOf(A.types,"text/plain")&&
+(x=A.getData("text/plain"))),null!=x&&(Editor.isPngDataUrl(x)?(x=Editor.extractGraphModelFromPng(x),null!=x&&0<x.length&&this.openLocalFile(x,null,!0)):this.isRemoteFileFormat(x)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(x))).send(mxUtils.bind(this,function(B){200<=B.getStatus()&&299>=B.getStatus()?this.openLocalFile(B.getText(),null,!0):this.showError(mxResources.get("error"),413==B.getStatus()?
+mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(x)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(x):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(x)))))}else this.openLocalFile(x,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var g=0,l=0;if(null==d){var n=document.body;var x=document.documentElement;
+var A=(n.clientWidth||x.clientWidth)-3;n=Math.max(n.clientHeight||0,x.clientHeight)-3}else n=d.getBoundingClientRect(),g=n.top,l=n.left,A=n.width,n=n.height;x=document.createElement("div");x.style.zIndex=mxPopupMenu.prototype.zIndex+2;x.style.border="3px dotted rgb(254, 137, 12)";x.style.pointerEvents="none";x.style.position="absolute";x.style.top=g+"px";x.style.left=l+"px";x.style.width=Math.max(0,A-3)+"px";x.style.height=Math.max(0,n-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(x):
+document.body.appendChild(x);return x};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var g=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=g){var l=new mxCodec(g.ownerDocument),n=new mxGraphModel;l.decode(g,n);g=n.getChildAt(n.getRoot(),0);for(l=0;l<n.getChildCount(g);l++)d.push(n.getChildAt(g,l))}return d};EditorUi.prototype.openFileHandle=function(d,g,l,n,x,A){if(null!=g&&0<g.length){if(!Editor.useCanvasForExport&&/(\.png)$/i.test(g)||/(\.pdf)$/i.test(g))g=g.substring(0,
+g.length-4),/(\.drawio)$/i.test(g)||(g+=".drawio");var B=mxUtils.bind(this,function(H){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==H.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,H,g)),this.showSidebar()}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(H,g,n)});if(EditorUi.isVisioFilename(g))this.importVisio(l,
+mxUtils.bind(this,function(H){this.spinner.stop();B(H)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(H){this.spinner.stop();B(H)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(H){4==H.readyState&&(this.spinner.stop(),200<=H.status&&299>=H.status?B(H.responseText):this.handleError({message:mxResources.get(413==
+H.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(H){this.spinner.stop();this.openLocalFile(H,g,n)}),mxUtils.bind(this,function(H){this.spinner.stop();this.handleError(H)}));else if("<mxlibrary"==d.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,d,l.name)),this.showSidebar()}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(H){this.spinner.stop();B(H)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,g,n)}));else{if("image/png"==l.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==l.type){var I=Editor.extractGraphModelFromPdf(d);null!=
+I&&(x=null,n=!0,d=I)}this.spinner.stop();this.openLocalFile(d,g,n,x,null!=x?l:null,A)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=0;l<d.length;l++)mxUtils.bind(this,function(n){var x=new FileReader;x.onload=mxUtils.bind(this,function(A){try{this.openFileHandle(A.target.result,n.name,n,g)}catch(B){this.handleError(B)}});x.onerror=mxUtils.bind(this,function(A){this.spinner.stop();this.handleError(A);window.openFile=null});"image"!==
+n.type.substring(0,5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?x.readAsText(n):x.readAsDataURL(n)})(d[l])};EditorUi.prototype.openLocalFile=function(d,g,l,n,x,A){var B=this.getCurrentFile(),I=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var H=mxUtils.parseXml(d);null!=H&&(this.editor.setGraphXml(H.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,g||this.defaultFilename,
+l,n,x,A))});if(null!=d&&0<d.length)null==B||!B.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,g),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=B&&B.isModified()?
+this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);g=[];for(var l in d)g.push(l);return g};EditorUi.prototype.addBasenamesForCell=
+function(d,g){function l(B){if(null!=B){var I=B.lastIndexOf(".");0<I&&(B=B.substring(I+1,B.length));null==g[B]&&(g[B]=!0)}}var n=this.editor.graph,x=n.getCellStyle(d);l(mxStencilRegistry.getBasenameForStencil(x[mxConstants.STYLE_SHAPE]));n.model.isEdge(d)&&(l(mxMarker.getPackageForType(x[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(x[mxConstants.STYLE_ENDARROW])));x=n.model.getChildCount(d);for(var A=0;A<x;A++)this.addBasenamesForCell(n.model.getChildAt(d,A),g)};EditorUi.prototype.setGraphEnabled=
+function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;this.editor.graph.setEnabled(d);null!=this.tabContainer&&(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);d||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};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 d=!1;this.installMessageHandler(mxUtils.bind(this,function(g,l,n,x){d||(d=!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(x)try{var A=this.editor.graph;A.setGridEnabled(!1);
+A.pageVisible=!1;var B=A.model.cells,I;for(I in B){var H=B[I];null!=H&&null!=H.style&&(H.style+=";sketch=1;"+(-1==H.style.indexOf("fontFamily=")||-1<H.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(D){console.log(D)}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(d,g){null!=d?this.spinner.spin(document.body,mxResources.get("loading"))&&
+d.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();g(l)})):g(null)};EditorUi.prototype.createLoadMessage=function(d){var g=this.editor.graph;return{event:d,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(d){try{var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var l=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(x){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(x)}),"*")}),null,null,!0,n,1,this.embedExportBorder,null,this.embedExportTheme)}else d||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),
+"*");d||(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")))}catch(x){d||this.handleError(x)}};EditorUi.prototype.installMessageHandler=function(d){var g=null,l=!1,n=!1,x=null,A=mxUtils.bind(this,function(H,D){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,
+function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,A);mxEvent.addListener(window,"message",mxUtils.bind(this,function(H){if(H.source==(window.opener||window.parent)){var D=H.data,S=null,U=mxUtils.bind(this,function(ba){if(null!=ba&&"function"===typeof ba.charAt&&"<"!=ba.charAt(0))try{Editor.isPngDataUrl(ba)?ba=Editor.extractGraphModelFromPng(ba):"data:image/svg+xml;base64,"==ba.substring(0,
+26)?ba=atob(ba.substring(26)):"data:image/svg+xml;utf8,"==ba.substring(0,24)&&(ba=ba.substring(24)),null!=ba&&(""==ba.trim()?ba=null:"%"==ba.charAt(0)?ba=decodeURIComponent(ba):"<"!=ba.charAt(0)&&(ba=Graph.decompress(ba)))}catch(ia){}return ba});if("json"==urlParams.proto){var R=!1;try{D=JSON.parse(D),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[H],"data",[D])}catch(ba){D=null}try{if(null==D)return;if("dialog"==D.action){this.showError(null!=D.titleKey?mxResources.get(D.titleKey):
+D.title,null!=D.messageKey?mxResources.get(D.messageKey):mxUtils.htmlEntities(D.message),null!=D.buttonKey?mxResources.get(D.buttonKey):D.button);null!=D.modified&&(this.editor.modified=D.modified);return}if("layout"==D.action){this.executeLayouts(this.editor.graph.createLayouts(D.layouts));return}if("prompt"==D.action){this.spinner.stop();var P=new FilenameDialog(this,D.defaultValue||"",null!=D.okKey?mxResources.get(D.okKey):D.ok,function(ba){null!=ba?B.postMessage(JSON.stringify({event:"prompt",
+value:ba,message:D}),"*"):B.postMessage(JSON.stringify({event:"prompt-cancel",message:D}),"*")},null!=D.titleKey?mxResources.get(D.titleKey):D.title,null,null,null,null,function(){B.postMessage(JSON.stringify({event:"prompt-cancel",message:D}),"*")});this.showDialog(P.container,300,80,!0,!1);P.init();return}if("draft"==D.action){var v=U(D.xml);this.spinner.stop();P=new DraftDialog(this,mxResources.get("draftFound",[D.name||this.defaultFilename]),v,mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",
+result:"edit",message:D}),"*")}),mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"discard",message:D}),"*")}),D.editKey?mxResources.get(D.editKey):null,D.discardKey?mxResources.get(D.discardKey):null,D.ignore?mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"ignore",message:D}),"*")}):null);this.showDialog(P.container,640,480,!0,!1,mxUtils.bind(this,function(ba){ba&&this.actions.get("exit").funct()}));
+try{P.init()}catch(ba){B.postMessage(JSON.stringify({event:"draft",error:ba.toString(),message:D}),"*")}return}if("template"==D.action){this.spinner.stop();var y=1==D.enableRecent,L=1==D.enableSearch,J=1==D.enableCustomTemp;P=new NewDialog(this,!1,D.templatesOnly?!1:null!=D.callback,mxUtils.bind(this,function(ba,ia,fa,da){ba=ba||this.emptyDiagramXml;null!=D.callback?B.postMessage(JSON.stringify({event:"template",xml:ba,blank:ba==this.emptyDiagramXml,name:ia,tempUrl:fa,libs:da,builtIn:!0,message:D}),
+"*"):(d(ba,H,ba!=this.emptyDiagramXml,D.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,y?mxUtils.bind(this,function(ba){this.remoteInvoke("getRecentDiagrams",[null],null,ba,function(){ba(null,"Network Error!")})}):null,L?mxUtils.bind(this,function(ba,ia){this.remoteInvoke("searchDiagrams",[ba,null],null,ia,function(){ia(null,"Network Error!")})}):null,mxUtils.bind(this,function(ba,ia,fa){B.postMessage(JSON.stringify({event:"template",docUrl:ba,info:ia,name:fa}),
+"*")}),null,null,J?mxUtils.bind(this,function(ba){this.remoteInvoke("getCustomTemplates",null,null,ba,function(){ba({},0)})}):null,1==D.withoutType,null,D.templatesOnly);this.showDialog(P.container,620,460,!0,!1,mxUtils.bind(this,function(ba){null!=this.sidebar&&this.sidebar.hideTooltip();ba&&this.actions.get("exit").funct()}));P.init();return}if("textContent"==D.action){var K=this.getDiagramTextContent();B.postMessage(JSON.stringify({event:"textContent",data:K,message:D}),"*");return}if("status"==
+D.action){this.updateStatus(mxUtils.bind(this,function(){null!=D.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(D.messageKey))):null!=D.message&&this.editor.setStatus(mxUtils.htmlEntities(D.message))}));null!=D.modified&&(this.editor.modified=D.modified);return}if("spinner"==D.action){var m=null!=D.messageKey?mxResources.get(D.messageKey):D.message;null==D.show||D.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("exit"==D.action){this.actions.get("exit").funct();
+return}if("viewport"==D.action){if(null!=D.viewport){var t=this.editor.graph,C=t.view.translate.x,N=t.view.translate.y;this.embedViewport=D.viewport;t.refresh();this.diagramContainer.scrollTop-=(N-t.view.translate.y)*t.view.scale;this.diagramContainer.scrollLeft-=(C-t.view.translate.x)*t.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==D.action){P=null;try{var M=this.diagramContainer.getAttribute("data-scrollState");null!=M&&(this.diagramContainer.removeAttribute("data-scrollState"),
+P=JSON.parse(M))}catch(ba){}Editor.inlineFullscreen=D.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=P&&this.restoreScrollState(P);return}if("snapshot"==D.action){this.sendEmbeddedSvgExport(!0);return}if("export"==D.action){if("png"==D.format||"xmlpng"==D.format){if(null==D.spin&&null==D.spinKey||this.spinner.spin(document.body,null!=D.spinKey?mxResources.get(D.spinKey):D.spin)){var O=null!=D.xml?D.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);t=this.editor.graph;
+var Q=mxUtils.bind(this,function(ba,ia){if(D.withSvg)D.withSvg=!1,this.getEmbeddedSvg(O,this.editor.graph,null,!0,function(da){Q(ba,da)},null,null,D.embedImages,this.editor.graph.background,D.scale,D.border,D.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var fa=this.createLoadMessage("export");fa.format=D.format;fa.message=D;fa.data=ba;fa.svg=ia;fa.xml=O;B.postMessage(JSON.stringify(fa),"*")}}),T=mxUtils.bind(this,function(ba){null==ba&&(ba=Editor.blankImage);"xmlpng"==
+D.format&&(ba=Editor.writeGraphModelToPng(ba,"tEXt","mxfile",encodeURIComponent(O)));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container);Q(ba)}),V=D.pageId||(null!=this.pages?D.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=V){var ba=t.getGlobalVariable;t=this.createTemporaryGraph(t.getStylesheet());for(var ia,fa=0;fa<this.pages.length;fa++)if(this.pages[fa].getId()==
+V){ia=this.updatePageRoot(this.pages[fa]);break}null==ia&&(ia=this.currentPage);t.getGlobalVariable=function(qa){return"page"==qa?ia.getName():"pagenumber"==qa?1:ba.apply(this,arguments)};document.body.appendChild(t.container);t.model.setRoot(ia.root)}if(null!=D.layerIds){var da=t.model,ra=da.getChildCells(da.getRoot()),pa={};for(fa=0;fa<D.layerIds.length;fa++)pa[D.layerIds[fa]]=!0;for(fa=0;fa<ra.length;fa++)da.setVisible(ra[fa],pa[ra[fa].id]||!1)}fa=null;D.keepTheme&&(fa=Editor.isDarkMode()?"dark":
+"light");this.editor.exportToCanvas(mxUtils.bind(this,function(qa){T(qa.toDataURL("image/png"))}),D.width,null,D.background,mxUtils.bind(this,function(){T(null)}),null,null,D.scale,D.transparent,D.shadow,null,t,D.border,null,D.grid,fa)});null!=D.xml&&0<D.xml.length&&(l=!0,this.setFileData(O),l=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==D.format?"1":"0")+(null!=V?"&pageId="+V:"")+(null!=D.layerIds&&0<D.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:D.layerIds})):
+"")+(null!=D.scale?"&scale="+D.scale:"")+"&base64=1&xml="+encodeURIComponent(O))).send(mxUtils.bind(this,function(ba){200<=ba.getStatus()&&299>=ba.getStatus()?Q("data:image/png;base64,"+ba.getText()):T(null)}),mxUtils.bind(this,function(){T(null)}))}}else if(X=mxUtils.bind(this,function(){var ba=this.createLoadMessage("export");ba.message=D;if("html2"==D.format||"html"==D.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ia=this.getXmlFileData();ba.xml=mxUtils.getXml(ia);
+ba.data=this.getFileData(null,null,!0,null,null,null,ia);ba.format=D.format}else if("html"==D.format)ia=this.editor.getGraphXml(),ba.data=this.getHtml(ia,this.editor.graph),ba.xml=mxUtils.getXml(ia),ba.format=D.format;else{mxSvgCanvas2D.prototype.foAltText=null;ia=null!=D.background?D.background:this.editor.graph.background;ia==mxConstants.NONE&&(ia=null);ba.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ba.format="svg";var fa=mxUtils.bind(this,function(ra){this.editor.graph.setEnabled(!0);
+this.spinner.stop();ba.data=D.asText?ra:Editor.createSvgDataUri(ra);B.postMessage(JSON.stringify(ba),"*")}),da="auto";D.keepTheme&&(da=Editor.isDarkMode()?"dark":"light");null!=D.theme&&(da=D.theme);if("xmlsvg"==D.format){if(null==D.spin&&null==D.spinKey||this.spinner.spin(document.body,null!=D.spinKey?mxResources.get(D.spinKey):D.spin)){da=null;if(this.isAutoDarkMode()||Editor.isDarkMode())da="auto";null!=D.theme&&(da=D.theme);this.getEmbeddedSvg(ba.xml,this.editor.graph,null,!0,fa,null,null,D.embedImages,
+ia,D.scale,D.border,D.shadow,da)}}else if(null==D.spin&&null==D.spinKey||this.spinner.spin(document.body,null!=D.spinKey?mxResources.get(D.spinKey):D.spin))this.editor.graph.setEnabled(!1),ia=this.editor.graph.getSvg(ia,D.scale,D.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||D.shadow,null,da),(this.editor.graph.shadowVisible||D.shadow)&&this.editor.graph.addSvgShadow(ia),this.embedFonts(ia,mxUtils.bind(this,function(ra){D.embedImages||null==D.embedImages?this.editor.convertImages(ra,
+mxUtils.bind(this,function(pa){fa(mxUtils.getXml(pa))})):fa(mxUtils.getXml(ra))}));return}B.postMessage(JSON.stringify(ba),"*")}),null!=D.xml&&0<D.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);X()}}l=!0;this.setFileData(D.xml);l=!1;this.editor.graph.mathEnabled||X()}else X();return}if("load"==D.action){R=D.toSketch;n=1==D.autosave;this.hideDialog();null!=D.modified&&null==urlParams.modified&&(urlParams.modified=D.modified);
+null!=D.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=D.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+"+Editor.shiftKey+"+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=D.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=D.noSaveBtn);
+if(null!=D.rough){var Y=Editor.sketchMode;this.doSetSketchMode(D.rough);Y!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=D.dark&&this.setDarkMode(D.dark);null!=D.border&&(this.embedExportBorder=D.border);null!=D.theme&&(this.embedExportTheme=D.theme);null!=D.background&&(this.embedExportBackground=D.background);null!=D.viewport&&(this.embedViewport=D.viewport);this.embedExitPoint=null;if(null!=D.rect){var Z=this.embedExportBorder;this.diagramContainer.style.left=
+Math.max(60,D.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,D.rect.top)+"px";this.minInlineWidth=D.minWidth;this.minInlineHeight=D.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var aa=D.maxFitScale,ja=D.rect.width+2*Z,ea=D.rect.height+2*Z;S=mxUtils.bind(this,function(){var ba=mxUtils.getDocumentSize();ja=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,ja):ja,ba.width-80);ba=
+Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ea):ea,ba.height-80);this.diagramContainer.style.width=ja+"px";this.diagramContainer.style.height=ba+"px";var ia=this.editor.graph;ba=ia.maxFitScale;ia.maxFitScale=aa;ia.fit(2*Z,null,null,null,null,null,ea);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ia.getGraphBounds().width<this.minInlineWidth){var fa=ia.container.scrollTop;this.resetScrollbars();ia.container.scrollTop=fa}ia.maxFitScale=ba;ia.container.scrollTop-=Z;ia.container.scrollLeft-=
+Z;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[D]));ia.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=ia.container.style.top);var da=ia.getGraphBounds();ia.container.clientWidth>da.width+2*Z&&(ia.container.scrollLeft=da.x+(da.width+Z-ia.container.clientWidth)/2)}),10)})}null!=D.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=
+D.noExitBtn);null!=D.title&&null!=this.buttonContainer&&this.setEmbedTitle(D.title);try{D.libs&&this.sidebar.showEntries(D.libs)}catch(ba){}D=null!=D.xmlpng?this.extractGraphModelFromPng(D.xmlpng):null!=D.descriptor?D.descriptor:D.xml}else{if("merge"==D.action){var ca=this.getCurrentFile();null!=ca&&(v=U(D.xml),null!=v&&""!=v&&ca.mergeFile(new LocalFile(this,v),function(){B.postMessage(JSON.stringify({event:"merge",message:D}),"*")},function(ba){B.postMessage(JSON.stringify({event:"merge",message:D,
+error:ba}),"*")}))}else"remoteInvokeReady"==D.action?this.handleRemoteInvokeReady(B):"remoteInvoke"==D.action?this.handleRemoteInvoke(D,H.origin):"remoteInvokeResponse"==D.action?this.handleRemoteInvokeResponse(D):B.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(D)}),"*");return}}catch(ba){this.handleError(ba)}}var ka=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),
+la=mxUtils.bind(this,function(ba,ia){l=!0;try{d(ba,ia,null,R)}catch(fa){this.handleError(fa)}l=!1;null!=urlParams.modified&&this.clearStatus();x=ka();n&&null==g&&(g=mxUtils.bind(this,function(fa,da){fa=ka();fa==x||l||(da=this.createLoadMessage("autosave"),da.xml=fa,(window.opener||window.parent).postMessage(JSON.stringify(da),"*"));x=fa}),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)ia=this.createLoadMessage("load"),ia.xml=ba,B.postMessage(JSON.stringify(ia),
+"*");null!=S&&S()});null!=D&&"function"===typeof D.substring&&"data:application/vnd.visio;base64,"==D.substring(0,34)?(U="0M8R4KGxGuE"==D.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(D.substring(D.indexOf(",")+1)),function(ba){la(ba,H)},mxUtils.bind(this,function(ba){this.handleError(ba)}),U)):null!=D&&"function"===typeof D.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(D,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):
+this.parseFileData(D,mxUtils.bind(this,function(ba){4==ba.readyState&&(200<=ba.status&&299>=ba.status&&"<mxGraphModel"==ba.responseText.substring(0,13)?la(ba.responseText,H):this.handleError({message:413==ba.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=D&&"function"===typeof D.substring&&this.isLucidChartData(D)?this.convertLucidChart(D,mxUtils.bind(this,function(ba){la(ba)}),mxUtils.bind(this,function(ba){this.handleError(ba)})):null==D||"object"!==typeof D||
+null==D.format||null==D.data&&null==D.url?(D=U(D),la(D,H)):this.loadDescriptor(D,mxUtils.bind(this,function(ba){la(ka(),H)}),mxUtils.bind(this,function(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}))}}));var B=window.opener||window.parent;A="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";B.postMessage(A,"*");if("json"==urlParams.proto){var I=this.editor.graph.openLink;this.editor.graph.openLink=function(H,D,S){I.apply(this,arguments);B.postMessage(JSON.stringify({event:"openLink",
+href:H,target:D,allowOpener:S}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,g,l,n){var x=document.createElement("button");x.className="geEmbedBtn geBtn";x.setAttribute("title",d+(null!=l?" ("+l+")":""));mxUtils.write(x,d);n&&x.classList.add("gePrimaryBtn");mxEvent.addListener(x,"click",g);return x};EditorUi.prototype.setEmbedTitle=function(d){d=this.createStatusDiv(d);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||
+"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(d):this.buttonContainer.appendChild(d);this.embedFilenameSpan=d};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var d=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==this.buttonContainer;this.buttonContainer.innerText="";d&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);
+"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+"+Editor.shiftKey+"+S":Editor.ctrlKey+"+S",!0)),"1"==
+urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct))}))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new SimpleTextareaDialog(this,Editor.defaultCsvValue,
+mxUtils.bind(this,function(d){this.importCsv(d)}),mxResources.get("import"),"https://www.drawio.com/blog/insert-from-csv"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,new mxRectangle(0,0,320,280));this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(d){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var g=new TextareaDialog(this,mxResources.get("layout"),d,mxUtils.bind(this,function(l){if(0<l.length)try{var n=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(n));
+this.customLayoutConfig=n;this.hideDialog()}catch(x){this.handleError(x)}}),null,null,null,null,mxUtils.bind(this,function(l,n){var x=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var A=n.value;n.value=JSON.stringify(JSON.parse(A));n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));n.value=A}catch(B){this.handleError(B)}}));x.setAttribute("title",
+"copy");x.className="geBtn";l.appendChild(x)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(d){this.createTimeout(null,mxUtils.bind(this,function(g){var l=mxUtils.bind(this,function(){this.loadingOrgChart=!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),d())}),n=mxUtils.bind(this,function(x){this.loadingOrgChart=!1;g.clear()&&this.handleError(x)});"undefined"!==
+typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():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",l,null,null,null,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",
+l,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(d,g,l){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g,l)}))};EditorUi.prototype.doImportCsv=function(d,g,l){try{var n=d.split("\n"),x=[],A=[],B=[],I={};if(0<n.length){var H={};l=null!=l?l:this.editor.graph;var D=null,S=null,U=null,R=null,P=null,v=null,y=null,L="whiteSpace=wrap;html=1;",J=null,K=null,m="",t="auto",C="auto",N=!1,M=null,O=null,Q=40,T=40,V=100,X=0,W=mxUtils.bind(this,function(){null!=g?
+g(Oa):(l.setSelectionCells(Oa),l.scrollCellToVisible(l.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Y=l.getFreeInsertPoint(),Z=Y.x,aa=Y.y;Y=aa;var ja=null,ea="auto";K=null;for(var ca=[],ka=null,la=null,ba=0;ba<n.length&&"#"==n[ba].charAt(0);){d=n[ba].replace(/\r$/,"");for(ba++;ba<n.length&&"\\"==d.charAt(d.length-1)&&"#"==n[ba].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(n[ba].substring(1)),ba++;if("#"!=d.charAt(1)){var ia=
+d.indexOf(":");if(0<ia){var fa=mxUtils.trim(d.substring(1,ia)),da=mxUtils.trim(d.substring(ia+1));"label"==fa?ja=Graph.sanitizeHtml(da):"labelname"==fa&&0<da.length&&"-"!=da?P=da:"labels"==fa&&0<da.length&&"-"!=da?y=JSON.parse(da):"style"==fa?S=da:"parentstyle"==fa?L=da:"unknownStyle"==fa&&"-"!=da?v=da:"stylename"==fa&&0<da.length&&"-"!=da?R=da:"styles"==fa&&0<da.length&&"-"!=da?U=JSON.parse(da):"vars"==fa&&0<da.length&&"-"!=da?D=JSON.parse(da):"identity"==fa&&0<da.length&&"-"!=da?J=da:"parent"==
+fa&&0<da.length&&"-"!=da?K=da:"namespace"==fa&&0<da.length&&"-"!=da?m=da:"width"==fa?t=da:"height"==fa?C=da:"collapsed"==fa&&"-"!=da?N="true"==da:"left"==fa&&0<da.length?M=da:"top"==fa&&0<da.length?O=da:"ignore"==fa?la=da.split(","):"connect"==fa?ca.push(JSON.parse(da)):"link"==fa?ka=da:"padding"==fa?X=parseFloat(da):"edgespacing"==fa?Q=parseFloat(da):"nodespacing"==fa?T=parseFloat(da):"levelspacing"==fa?V=parseFloat(da):"layout"==fa&&(ea=da)}}}if(null==n[ba])throw Error(mxResources.get("invalidOrMissingFile"));
+var ra=this.editor.csvToArray(n[ba].replace(/\r$/,""));ia=d=null;fa=[];for(da=0;da<ra.length;da++)J==ra[da]&&(d=da),K==ra[da]&&(ia=da),fa.push(mxUtils.trim(ra[da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ja&&(ja="%"+fa[0]+"%");if(null!=ca)for(var pa=0;pa<ca.length;pa++)null==H[ca[pa].to]&&(H[ca[pa].to]={});J=[];for(da=ba+1;da<n.length;da++){var qa=this.editor.csvToArray(n[da].replace(/\r$/,""));if(null==qa){var sa=40<n[da].length?n[da].substring(0,40)+"...":n[da];throw Error(sa+
+" ("+da+"):\n"+mxResources.get("containsValidationErrors"));}0<qa.length&&J.push(qa)}l.model.beginUpdate();try{for(da=0;da<J.length;da++){qa=J[da];var ha=null,ma=null!=d?m+qa[d]:null;n=!1;null!=ma&&(ha=l.model.getCell(ma),n=null==ha||0<=mxUtils.indexOf(x,ha));var ta=new mxCell(ja,new mxGeometry(Z,Y,0,0),S||"whiteSpace=wrap;html=1;");ta.collapsed=N;ta.vertex=!0;ta.id=ma;null==ha||n||l.model.setCollapsed(ha,N);for(var na=0;na<qa.length;na++)l.setAttributeForCell(ta,fa[na],qa[na]),null==ha||n||l.setAttributeForCell(ha,
+fa[na],qa[na]);if(null!=P&&null!=y){var xa=y[ta.getAttribute(P)];null!=xa&&(l.labelChanged(ta,xa),null==ha||n||l.cellLabelChanged(ha,xa))}if(null!=R&&null!=U){var Aa=U[ta.getAttribute(R)];null!=Aa&&(ta.style=Aa)}l.setAttributeForCell(ta,"placeholders","1");ta.style=l.replacePlaceholders(ta,ta.style,D);null==ha||n?l.fireEvent(new mxEventObject("cellsInserted","cells",[ta])):(l.model.setStyle(ha,ta.style),0>mxUtils.indexOf(B,ha)&&B.push(ha),l.fireEvent(new mxEventObject("cellsInserted","cells",[ha])));
+n=null!=ha;ha=ta;if(!n)for(pa=0;pa<ca.length;pa++)H[ca[pa].to][ha.getAttribute(ca[pa].to)]=ha;null!=ka&&"link"!=ka&&(l.setLinkForCell(ha,ha.getAttribute(ka)),l.setAttributeForCell(ha,ka,null));var Ea=l.getPreferredSizeForCell(ha);K=null!=ia?l.model.getCell(m+qa[ia]):null;if(ha.vertex){sa=null!=K?0:Z;ba=null!=K?0:aa;null!=M&&null!=ha.getAttribute(M)&&(ha.geometry.x=sa+parseFloat(ha.getAttribute(M)));null!=O&&null!=ha.getAttribute(O)&&(ha.geometry.y=ba+parseFloat(ha.getAttribute(O)));var va="@"==t.charAt(0)?
+ha.getAttribute(t.substring(1)):null;ha.geometry.width=null!=va&&"auto"!=va?parseFloat(ha.getAttribute(t.substring(1))):"auto"==t||"auto"==va?Ea.width+X:parseFloat(t);var Fa="@"==C.charAt(0)?ha.getAttribute(C.substring(1)):null;ha.geometry.height=null!=Fa&&"auto"!=Fa&&"width"!=C?parseFloat(Fa):"auto"==C||"auto"==Fa?Ea.height+X:"width"==C?ha.geometry.width:parseFloat(C);Y+=ha.geometry.height+T}n?(null==I[ma]&&(I[ma]=[]),I[ma].push(ha)):(x.push(ha),null!=K?(K.style=l.replacePlaceholders(K,L,D),l.addCell(ha,
+K),A.push(K)):B.push(l.addCell(ha)))}for(da=0;da<A.length;da++)va="@"==t.charAt(0)?A[da].getAttribute(t.substring(1)):null,Fa="@"==C.charAt(0)?A[da].getAttribute(C.substring(1)):null,"auto"!=t&&"auto"!=va||"auto"!=C&&"auto"!=Fa||l.updateGroupBounds([A[da]],X,!0);var ya=B.slice(),Oa=B.slice();for(pa=0;pa<ca.length;pa++){var Ca=ca[pa];for(da=0;da<x.length;da++){ha=x[da];var Ga=mxUtils.bind(this,function(Ya,Ra,Ma){var fb=Ra.getAttribute(Ma.from);if(null!=fb&&""!=fb){fb=fb.split(",");for(var Qa=0;Qa<
+fb.length;Qa++){var Ta=H[Ma.to][fb[Qa]];if(null==Ta&&null!=v){Ta=new mxCell(fb[Qa],new mxGeometry(Z,aa,0,0),v);Ta.style=l.replacePlaceholders(Ra,Ta.style,D);var Va=l.getPreferredSizeForCell(Ta);Ta.geometry.width=Va.width+X;Ta.geometry.height=Va.height+X;H[Ma.to][fb[Qa]]=Ta;Ta.vertex=!0;Ta.id=fb[Qa];B.push(l.addCell(Ta))}if(null!=Ta){Va=Ma.label;null!=Ma.fromlabel&&(Va=(Ra.getAttribute(Ma.fromlabel)||"")+(Va||""));null!=Ma.sourcelabel&&(Va=l.replacePlaceholders(Ra,Ma.sourcelabel,D)+(Va||""));null!=
+Ma.tolabel&&(Va=(Va||"")+(Ta.getAttribute(Ma.tolabel)||""));null!=Ma.targetlabel&&(Va=(Va||"")+l.replacePlaceholders(Ta,Ma.targetlabel,D));var hb="target"==Ma.placeholders==!Ma.invert?Ta:Ya;hb=null!=Ma.style?l.replacePlaceholders(hb,Ma.style,D):l.createCurrentEdgeStyle();Va=l.insertEdge(null,null,Va||"",Ma.invert?Ta:Ya,Ma.invert?Ya:Ta,hb);if(null!=Ma.labels)for(hb=0;hb<Ma.labels.length;hb++){var db=Ma.labels[hb],Xa=new mxCell(db.label||hb,new mxGeometry(null!=db.x?db.x:0,null!=db.y?db.y:0,0,0),"resizable=0;html=1;");
+Xa.vertex=!0;Xa.connectable=!1;Xa.geometry.relative=!0;null!=db.placeholders&&(Xa.value=l.replacePlaceholders("target"==db.placeholders==!Ma.invert?Ta:Ya,Xa.value,D));if(null!=db.dx||null!=db.dy)Xa.geometry.offset=new mxPoint(null!=db.dx?db.dx:0,null!=db.dy?db.dy:0);Va.insert(Xa)}if(null!=Ma.data)for(var mb in Ma.data)l.setAttributeForCell(Va,mb,Ma.data[mb]);Oa.push(Va);mxUtils.remove(Ma.invert?Ya:Ta,ya)}}}});Ga(ha,ha,Ca);if(null!=I[ha.id])for(na=0;na<I[ha.id].length;na++)Ga(ha,I[ha.id][na],Ca)}}if(null!=
+la)for(da=0;da<x.length;da++)for(ha=x[da],na=0;na<la.length;na++)l.setAttributeForCell(ha,mxUtils.trim(la[na]),null);if(0<B.length){var Ha=new mxParallelEdgeLayout(l);Ha.spacing=Q;Ha.checkOverlap=!0;var Ja=function(){0<Ha.spacing&&Ha.execute(l.getDefaultParent());for(var Ya=0;Ya<B.length;Ya++){var Ra=l.getCellGeometry(B[Ya]);Ra.x=Math.round(l.snap(Ra.x));Ra.y=Math.round(l.snap(Ra.y));"auto"==t&&(Ra.width=Math.round(l.snap(Ra.width)));"auto"==C&&(Ra.height=Math.round(l.snap(Ra.height)))}};if("["==
+ea.charAt(0)){var La=W;l.view.validate();this.executeLayouts(l.createLayouts(JSON.parse(ea)),function(){Ja();La()});W=null}else if("circle"==ea){var Za=new mxCircleLayout(l);Za.disableEdgeStyle=!1;Za.resetEdges=!1;var $a=Za.isVertexIgnored;Za.isVertexIgnored=function(Ya){return $a.apply(this,arguments)||0>mxUtils.indexOf(B,Ya)};this.executeLayout(function(){Za.execute(l.getDefaultParent());Ja()},!0,W);W=null}else if("horizontaltree"==ea||"verticaltree"==ea||"auto"==ea&&Oa.length==2*B.length-1&&1==
+ya.length){l.view.validate();var pb=new mxCompactTreeLayout(l,"horizontaltree"==ea);pb.levelDistance=T;pb.edgeRouting=!1;pb.resetEdges=!1;pb.sortEdges=!0;this.executeLayout(function(){pb.execute(l.getDefaultParent(),0<ya.length?ya[0]:null)},!0,W);W=null}else if("horizontalflow"==ea||"verticalflow"==ea||"auto"==ea&&1==ya.length){l.view.validate();var Ua=new mxHierarchicalLayout(l,"horizontalflow"==ea?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=T;Ua.parallelEdgeSpacing=
+Q;Ua.interRankCellSpacing=V;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(l.getDefaultParent(),Oa);l.moveCells(Oa,Z,aa)},!0,W);W=null}else if("orgchart"==ea){l.view.validate();var cb=new mxOrgChartLayout(l,2,V,T),eb=cb.isVertexIgnored;cb.isVertexIgnored=function(Ya){return eb.apply(this,arguments)||0>mxUtils.indexOf(B,Ya)};this.executeLayout(function(){cb.execute(l.getDefaultParent());Ja()},!0,W);W=null}else if("organic"==ea||"auto"==ea&&Oa.length>B.length){l.view.validate();var bb=
+new mxFastOrganicLayout(l);bb.forceConstant=3*T;bb.disableEdgeStyle=!1;bb.resetEdges=!1;var ib=bb.isVertexIgnored;bb.isVertexIgnored=function(Ya){return ib.apply(this,arguments)||0>mxUtils.indexOf(B,Ya)};this.executeLayout(function(){bb.execute(l.getDefaultParent());Ja()},!0,W);W=null}}this.hideDialog()}finally{l.model.endUpdate()}null!=W&&W()}}catch(Ya){this.handleError(Ya)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var l=
+"?",n;for(n in urlParams)0>mxUtils.indexOf(d,n)&&null!=urlParams[n]&&(g+=l+n+"="+urlParams[n],l="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),n;for(n in urlParams)0>mxUtils.indexOf(l,n)&&(d=0==g?d+"?":d+"&",null!=urlParams[n]&&(d+=n+"="+
+urlParams[n],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,l,n,x){d=new LinkDialog(this,d,g,l,!0,n,x);this.showDialog(d.container,440,120,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){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++;d&&isLocalStorage&&"1"==urlParams.browser&&
+g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),g=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!l);this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);
+this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);this.actions.get("smartFit").setEnabled(g);this.actions.get("resetView").setEnabled(g);
+this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);this.menus.get("edgeShape").setEnabled(d);this.menus.get("edgeStyle").setEnabled(d);this.menus.get("appearance").setEnabled(mxUtils.lightDarkColorSupported)};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=
+function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var d=this.openLibraries;this.openLibraries=null;if(null!=d)for(var g=0;g<d.length;g++)this.libraryLoaded(d[g].file,d[g].images,d[g].title,null!=d[g].div?"none"!=d[g].div.style.display:d[g].expand)};var E=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){E.apply(this,arguments);var d=this.editor.graph,
+g=this.getCurrentFile(),l=this.getSelectionState(),n=this.isDiagramActive(),x="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=g&&g.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&x);this.actions.get("redo").setEnabled(this.canRedo()&&x);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("explore").setEnabled(n&&(1==l.edges.length||
+1==l.vertices.length));this.actions.get("editConnectionPoints").setEnabled(n&&0==l.edges.length&&1==l.vertices.length);this.actions.get("editImage").setEnabled(n&&l.image&&0<l.cells.length);this.actions.get("crop").setEnabled(n&&l.image&&0<l.cells.length);this.actions.get("pageSetup").setEnabled(n);this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);this.actions.get("copyStyle").setEnabled(n&&!d.isSelectionEmpty());
+this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&n&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);this.actions.get("addToScratchpad").setEnabled(0<l.cells.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("removeFormat").setEnabled(d.isEnabled()&&!d.isSelectionEmpty()&&!d.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);
+this.actions.get("close").setEnabled(null!=g);this.actions.get("properties").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("none"!=this.diagramContainer.style.display);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var F=EditorUi.prototype.destroy;
+EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);F.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,l,n,x,A,B,I){var H=d.editor.graph;if("xml"==l)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==l)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(H.getSvg(n,
+x,A)),"image/svg+xml");else{var D=d.getFileData(!0,null,null,null,null,!0),S=H.getGraphBounds(),U=Math.floor(S.width*x/H.view.scale),R=Math.floor(S.height*x/H.view.scale);if(D.length<=MAX_REQUEST_SIZE&&U*R<MAX_AREA)if(d.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!d.editor.isExportToCanvas()){var P={globalVars:H.getExportVariables()};I&&(P.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});d.saveRequest(g,l,function(v,y){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+
+(y||"0")+(null!=v?"&filename="+encodeURIComponent(v):"")+"&extras="+encodeURIComponent(JSON.stringify(P))+(0<B?"&dpi="+B:"")+"&bg="+(null!=n?n:"none")+"&w="+U+"&h="+R+"&border="+A+"&xml="+encodeURIComponent(D))})}else"png"==l?d.exportImage(x,null==n||"none"==n,!0,!1,!1,A,!0,!1,null,I,B):d.exportImage(x,!1,!0,!1,!1,A,!0,!1,"jpeg",I);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,
+g="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var n=d;this.currentPage!=this.pages[l]&&(n=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[l]),n.model.setRoot(this.pages[l].root));g+=this.pages[l].getName()+" "+n.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},l=document.createElement("div");l.style.whiteSpace="nowrap";var n=document.createElement("h3");
+mxUtils.write(n,mxUtils.htmlEntities(d));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(n);var x=document.createElement("div");x.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";x.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var A={};try{var B=mxSettings.getCustomLibraries();for(d=0;d<B.length;d++){var I=B[d];if("R"==I.substring(0,1)){var H=JSON.parse(decodeURIComponent(I.substring(1)));
+A[H[0]]={id:H[0],title:H[1],downloadUrl:H[2]}}}}catch(D){}this.remoteInvoke("getCustomLibraries",null,null,function(D){x.innerText="";if(0==D.length)x.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var S=0;S<D.length;S++){var U=D[S];A[U.id]&&(g[U.id]=U);var R=this.addCheckbox(x,U.title,A[U.id]);(function(P,v){mxEvent.addListener(v,"change",function(){this.checked?g[P.id]=P:delete g[P.id]})})(U,R)}},mxUtils.bind(this,
+function(D){x.innerText="";var S=document.createElement("div");S.style.padding="8px";S.style.textAlign="center";mxUtils.write(S,mxResources.get("error")+": ");mxUtils.write(S,null!=D&&null!=D.message?D.message:mxResources.get("unknownError"));x.appendChild(S)}));l.appendChild(x);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var D=0,S;for(S in g)null==A[S]&&(D++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],
+null,mxUtils.bind(this,function(R){D--;0==D&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,R,U)),this.showSidebar()}catch(P){this.handleError(P,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){D--;0==D&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[S]));for(S in A)g[S]||this.closeLibrary(new RemoteLibrary(this,null,A[S]));0==D&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");
+this.showDialog(l.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(d){this.remoteWin=
+d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var g=d.msgMarkers,l=this.remoteInvokeCallbacks[g.callbackId];if(null==l)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?l.error&&l.error(d.error.errResp):l.callback&&l.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,l,n,x){var A=
+!0,B=window.setTimeout(mxUtils.bind(this,function(){A=!1;x({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),I=mxUtils.bind(this,function(){window.clearTimeout(B);A&&n.apply(this,arguments)}),H=mxUtils.bind(this,function(){window.clearTimeout(B);A&&x.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:I,error:H});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:l});null!=this.remoteWin?
+this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var l=mxUtils.bind(this,function(D,S){var U={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=S?U.error={errResp:S}:null!=D&&(U.resp=D);this.remoteWin.postMessage(JSON.stringify(U),"*")});try{var n=d.funtionName,x=this.remoteInvokableFns[n];if(null!=x&&"function"===typeof this[n]){if(x.allowedDomains){for(var A=!1,B=0;B<x.allowedDomains.length;B++)if(g=="https://"+x.allowedDomains[B]){A=
+!0;break}if(!A){l(null,"Invalid Call: "+n+" is not allowed.");return}}var I=d.functionArgs;Array.isArray(I)||(I=[]);if(x.isAsync)I.push(function(){l(Array.prototype.slice.apply(arguments))}),I.push(function(D){l(null,D||"Unkown Error")}),this[n].apply(this,I);else{var H=this[n].apply(this,I);l([H])}}else l(null,"Invalid Call: "+n+" is not found.")}catch(D){l(null,"Invalid Call: An error occurred, "+D.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var l=window.indexedDB||
+window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var n=l.open("database",2);n.onupgradeneeded=function(x){try{var A=n.result;1>x.oldVersion&&A.createObjectStore("objects",{keyPath:"key"});2>x.oldVersion&&(A.createObjectStore("files",{keyPath:"title"}),A.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(B){null!=g&&g(B)}};n.onsuccess=mxUtils.bind(this,function(x){try{var A=n.result;this.database=A;EditorUi.migrateStorageFiles&&(StorageFile.migrate(A),
+EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(B){if((!B||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var I=document.createElement("iframe");I.style.display="none";I.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(I);var H=!0,D=!1,S,U=0,R=mxUtils.bind(this,
+function(){D=!0;this.setDatabaseItem(".drawioMigrated3",!0);I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),P=mxUtils.bind(this,function(){U++;v()}),v=mxUtils.bind(this,function(){try{if(U>=S.length)R();else{var L=S[U];StorageFile.getFileContent(this,L,mxUtils.bind(this,function(J){null==J||".scratchpad"==L&&J==this.emptyLibraryXml?I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[L]}),
+"*"):P()}),P)}}catch(J){console.log(J)}}),y=mxUtils.bind(this,function(L){try{this.setDatabaseItem(null,[{title:L.title,size:L.data.length,lastModified:Date.now(),type:L.isLib?"L":"F"},{title:L.title,data:L.data}],P,P,["filesInfo","files"])}catch(J){console.log(J)}});B=mxUtils.bind(this,function(L){try{if(L.source==I.contentWindow){var J={};try{J=JSON.parse(L.data)}catch(K){}"init"==J.event?(I.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=J.event||D||(H?null!=J.resp&&0<J.resp.length&&null!=J.resp[0]?(S=J.resp[0],H=!1,v()):R():null!=J.resp&&0<J.resp.length&&null!=J.resp[0]?y(J.resp[0]):P())}}catch(K){console.log(K)}});window.addEventListener("message",B)}})));d(A);A.onversionchange=function(){A.close()}}catch(B){null!=g?g(B):null!=window.console&&console.warn(B)}});n.onerror=g;n.onblocked=function(){}}catch(x){null!=g?g(x):null!=window.console&&console.error(x)}else null!=
+g&&g(Error("IndexedDB not supported"))}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,l,n,x){this.openDatabase(mxUtils.bind(this,function(A){try{x=x||"objects";Array.isArray(x)||(x=[x],d=[d],g=[g]);var B=A.transaction(x,"readwrite");B.oncomplete=l;B.onerror=n;for(A=0;A<x.length;A++)B.objectStore(x[A]).put(null!=d&&null!=d[A]?{key:d[A],data:g[A]}:g[A])}catch(I){null!=n&&n(I)}}),n)};EditorUi.prototype.removeDatabaseItem=function(d,g,l,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=
+n||"objects";Array.isArray(n)||(n=[n],d=[d]);var A=x.transaction(n,"readwrite");A.oncomplete=g;A.onerror=l;for(x=0;x<n.length;x++)A.objectStore(n[x]).delete(d[x])}catch(B){null!=l&&l(B)}}),l)};EditorUi.prototype.getDatabaseItem=function(d,g,l,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";var A=x.transaction([n],"readonly").objectStore(n).get(d);A.onsuccess=function(){g(A.result)};A.onerror=l}catch(B){null!=l&&l(B)}}),l)};EditorUi.prototype.getDatabaseItems=function(d,g,l){this.openDatabase(mxUtils.bind(this,
+function(n){try{l=l||"objects";var x=n.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),A=[];x.onsuccess=function(B){null==B.target.result?d(A):(A.push(B.target.result.value),B.target.result.continue())};x.onerror=g}catch(B){null!=g&&g(B)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,l){this.openDatabase(mxUtils.bind(this,function(n){try{l=l||"objects";var x=n.transaction([l],"readonly").objectStore(l).getAllKeys();x.onsuccess=function(){d(x.result)};x.onerror=
+g}catch(A){null!=g&&g(A)}}),g)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,g){var l=this.getCurrentFile();null!=l?l.getComments(d,g):d([])};EditorUi.prototype.addComment=
+function(d,g,l){var n=this.getCurrentFile();null!=n?n.addComment(d,g,l):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var l=this.getCurrentFile();return null!=l?l.newComment(d,g):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=
+function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,g){var l=this.getCurrentFile();null!=l&&l.getRevisions?l.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=
+function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,l,n,x,A,B,I){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,g,l,n,x,A,B,I)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");
+return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,l,n,x,A,B,I,H,D,S,U,R,P,v,y){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,g,l,n,x,A,B,I,
+H,D,S,U,R,P,v,y)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,l,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,g,l,n)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,g)};
+EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,g,l,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,l,n)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,l,n,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,
+g,l,n,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var l=localStorage.key(g),n=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<n.length){var x="<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(x||n)&&d.push(l)}}return d};EditorUi.prototype.getLocalStorageFile=
+function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,f,k,c,p,q){function u(){for(var y=I.getElementsByTagName("div"),L=0,J=0;J<y.length;J++)"none"!=y[J].style.display&&y[J].parentNode==I&&L++;H.style.display=0==L?"block":"none"}function z(y,L,J,K){function m(){L.removeChild(N);L.removeChild(M);C.style.display="block";t.style.display="block"}x={div:L,comment:y,saveCallback:J,deleteOnCancel:K};var t=L.querySelector(".geCommentTxt"),C=L.querySelector(".geCommentActionsList"),N=document.createElement("textarea");N.className=
+"geCommentEditTxtArea";N.style.minHeight=t.offsetHeight+"px";N.value=y.content;L.insertBefore(N,t);var M=document.createElement("div");M.className="geCommentEditBtns";var O=mxUtils.button(mxResources.get("cancel"),function(){K?(L.parentNode.removeChild(L),u()):m();x=null});O.className="geCommentEditBtn";M.appendChild(O);var Q=mxUtils.button(mxResources.get("save"),function(){t.innerText="";y.content=N.value;mxUtils.write(t,y.content);m();J(y);x=null});mxEvent.addListener(N,"keydown",mxUtils.bind(this,
+function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(Q.click(),mxEvent.consume(T)):27==T.keyCode&&(O.click(),mxEvent.consume(T)))}));Q.focus();Q.className="geCommentEditBtn gePrimaryBtn";M.appendChild(Q);L.insertBefore(M,t);C.style.display="none";t.style.display="none";N.focus()}function G(y,L){L.innerText="";y=new Date(y.modifiedDate);var J=b.timeSince(y);null==J&&(J=mxResources.get("lessThanAMinute"));mxUtils.write(L,mxResources.get("timeAgo",
+[J],"{1} ago"));L.setAttribute("title",y.toLocaleDateString()+" "+y.toLocaleTimeString())}function E(y){var L=document.createElement("img");L.className="geCommentBusyImg";L.src=IMAGE_PATH+"/spin.gif";y.appendChild(L);y.busyImg=L}function F(y){y.style.border="1px solid red";y.busyImg.parentNode==y&&y.removeChild(y.busyImg)}function d(y){y.style.border="";y.busyImg.parentNode==y&&y.removeChild(y.busyImg)}function g(y,L,J,K,m){function t(X,W,Y){var Z=document.createElement("li");Z.className="geCommentAction";
+var aa=document.createElement("a");aa.className="geCommentActionLnk";mxUtils.write(aa,X);Z.appendChild(aa);mxEvent.addListener(aa,"click",function(ja){W(ja,y);ja.preventDefault();mxEvent.consume(ja)});V.appendChild(Z);Y&&(Z.style.display="none")}function C(){function X(Z){W.push(Y);if(null!=Z.replies)for(var aa=0;aa<Z.replies.length;aa++)Y=Y.nextSibling,X(Z.replies[aa])}var W=[],Y=M;X(y);return{pdiv:Y,replies:W}}function N(X,W,Y,Z,aa){function ja(){E(la);y.addReply(ka,function(ba){ka.id=ba;y.replies.push(ka);
+d(la);Y&&Y()},function(ba){ea();F(la);b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,aa)}function ea(){z(ka,la,function(ba){ja()},!0)}var ca=C().pdiv,ka=b.newComment(X,b.getCurrentUser());ka.pCommentId=y.id;null==y.replies&&(y.replies=[]);var la=g(ka,y.replies,ca,K+1);W?ea():ja()}if(m||!y.isResolved){H.style.display="none";var M=document.createElement("div");M.className="geCommentContainer";M.setAttribute("data-commentId",y.id);M.style.marginLeft=20*K+
+5+"px";y.isResolved&&(A.style.opacity="0.7");var O=document.createElement("div");O.className="geCommentHeader";var Q=document.createElement("img");Q.className="geCommentUserImg";Q.src=null!=y.user&&null!=y.user.pictureUrl?y.user.pictureUrl:Editor.userImage;O.appendChild(Q);Q=document.createElement("div");Q.className="geCommentHeaderTxt";O.appendChild(Q);var T=document.createElement("div");T.className="geCommentUsername";mxUtils.write(T,null!=y.user?y.user.displayName:mxResources.get("unknownUser"));
+Q.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",y.id);G(y,T);Q.appendChild(T);M.appendChild(O);O=document.createElement("div");O.className="geCommentTxt";mxUtils.write(O,y.content||"");M.appendChild(O);y.isLocked&&(M.style.opacity="0.5");O=document.createElement("div");O.className="geCommentActions";var V=document.createElement("ul");V.className="geCommentActionsList";O.appendChild(V);l||y.isLocked||0!=K&&!n||t(mxResources.get("reply"),
+function(){N("",!0)},y.isResolved);Q=b.getCurrentUser();null==Q||null==y.user||Q.id!=y.user.id||l||y.isLocked||(t(mxResources.get("edit"),function(){function X(){z(y,M,function(){E(M);y.editComment(y.content,function(){d(M)},function(W){F(M);X();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}X()},y.isResolved),t(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){E(M);y.deleteComment(function(X){if(!0===X){X=M.querySelector(".geCommentTxt");
+X.innerText="";mxUtils.write(X,mxResources.get("msgDeleted"));var W=M.querySelectorAll(".geCommentAction");for(X=0;X<W.length;X++)W[X].parentNode.removeChild(W[X]);d(M);M.style.opacity="0.5"}else{W=C(y).replies;for(X=0;X<W.length;X++)I.removeChild(W[X]);for(X=0;X<L.length;X++)if(L[X]==y){L.splice(X,1);break}H.style.display=0==I.getElementsByTagName("div").length?"block":"none"}},function(X){F(M);b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},y.isResolved));
+l||y.isLocked||0!=K||t(y.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(X){function W(){var Y=X.target;Y.innerText="";y.isResolved=!y.isResolved;mxUtils.write(Y,y.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=y.isResolved?"none":"",aa=C(y).replies,ja="light-dark("+(y.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<aa.length;ea++){aa[ea].style.backgroundColor=ja;for(var ca=aa[ea].querySelectorAll(".geCommentAction"),ka=0;ka<ca.length;ka++)ca[ka]!=
+Y.parentNode&&(ca[ka].style.display=Z);R||(aa[ea].style.display="none")}u()}y.isResolved?N(mxResources.get("reOpened")+": ",!0,W,!1,!0):N(mxResources.get("markedAsResolved"),!1,W,!0)});M.appendChild(O);null!=J?I.insertBefore(M,J.nextSibling):I.appendChild(M);for(J=0;null!=y.replies&&J<y.replies.length;J++)O=y.replies[J],O.isResolved=y.isResolved,g(O,y.replies,null,K+1,m);null!=x&&(x.comment.id==y.id?(m=y.content,y.content=x.comment.content,z(y,M,x.saveCallback,x.deleteOnCancel),y.content=m):null==
+x.comment.id&&x.comment.pCommentId==y.id&&(I.appendChild(x.div),z(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return M}}var l=!b.canComment(),n=b.canReplyToReplies(),x=null,A=document.createElement("div");A.className="geCommentsWin";var B=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.bottom=parseInt(B)+7+"px";A.appendChild(I);var H=document.createElement("span");H.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(H,
+mxResources.get("noCommentsFound"));var D=document.createElement("div");D.className="geToolbarContainer geCommentsToolbar";D.style.height=B;D.style.padding="3px 4px 4px 4px";B=document.createElement("a");B.className="geButton";if(!l){var S=B.cloneNode();S.style.backgroundImage="url("+Editor.plusImage+")";S.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(S,"click",function(y){function L(){z(J,K,function(m){E(K);b.addComment(m,function(t){m.id=t;P.push(m);d(K)},function(t){F(K);
+L();b.handleError(t,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var J=b.newComment("",b.getCurrentUser()),K=g(J,P,null,0);L();y.preventDefault();mxEvent.consume(y)});D.appendChild(S)}var U=B.cloneNode();U.style.backgroundImage="url("+Editor.checkImage+")";U.setAttribute("title",mxResources.get("showResolved"));var R=!1;mxEvent.addListener(U,"click",function(y){(R=!R)?U.classList.add("geActiveItem"):U.classList.remove("geActiveItem");v();y.preventDefault();mxEvent.consume(y)});
+D.appendChild(U);b.commentsRefreshNeeded()&&(S=B.cloneNode(),S.style.backgroundImage="url("+Editor.refreshImage+")",S.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(S,"click",function(y){v();y.preventDefault();mxEvent.consume(y)}),D.appendChild(S));b.commentsSaveNeeded()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),B.className="geButton geAdaptiveAsset",mxEvent.addListener(B,
+"click",function(y){q();y.preventDefault();mxEvent.consume(y)}),D.appendChild(B));A.appendChild(D);var P=[],v=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var y=x.div.querySelector(".geCommentEditTxtArea"),L=x.div.querySelector(".geCommentEditBtns");x.comment.content=y.value;y.parentNode.removeChild(y);L.parentNode.removeChild(L)}catch(J){b.handleError(J)}I.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+
+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function K(m){if(null!=m){m.sort(function(C,N){return new Date(C.modifiedDate)-new Date(N.modifiedDate)});for(var t=0;t<m.length;t++)K(m[t].replies)}}J.sort(function(m,t){return new Date(m.modifiedDate)-new Date(t.modifiedDate)});I.innerText="";I.appendChild(H);H.style.display="block";P=J;for(J=0;J<P.length;J++)K(P[J].replies),g(P[J],P,null,0,R);null!=x&&null==x.comment.id&&
+null==x.comment.pCommentId&&(I.appendChild(x.div),z(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(J){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(J&&J.message?": "+J.message:""));this.hasError=!0})):I.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});v();this.refreshComments=v;D=mxUtils.bind(this,function(){function y(t){var C=J[t.id];if(null!=C)for(G(t,C),C=0;null!=t.replies&&C<t.replies.length;C++)y(t.replies[C])}if(this.window.isVisible()){for(var L=
+I.querySelectorAll(".geCommentDate"),J={},K=0;K<L.length;K++){var m=L[K];J[m.getAttribute("data-commentId")]=m}for(K=0;K<P.length;K++)y(P[K])}});setInterval(D,6E4);this.refreshCommentsTime=D;this.window=new mxWindow(mxResources.get("comments"),A,f,k,c,p,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,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,f,k,c,p,q,u,z,G,E,F){var d=document.createElement("div");d.style.textAlign="center";F=null!=F?F:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=F+"px";g.style.lineHeight="1.2em";mxUtils.write(g,f);d.appendChild(g);null!=E&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",E),g.appendChild(f),
+d.appendChild(g));E=document.createElement("div");E.style.textAlign="center";E.style.whiteSpace="nowrap";var l=document.createElement("input");l.setAttribute("type","checkbox");q=mxUtils.button(q||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(l.checked)});q.className="geBtn";null!=z&&(q.innerHTML=z+"<br>"+q.innerHTML,q.style.display="inline-block",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.style.width="40%");b.editor.cancelFirst&&E.appendChild(q);
+var n=mxUtils.button(p||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(l.checked)});E.appendChild(n);null!=u?(n.innerHTML=u+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||E.appendChild(q);d.appendChild(E);G?(E.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.style.marginBottom=
+"0px",g.appendChild(l),p=document.createElement("span"),mxUtils.write(p," "+mxResources.get("rememberThisSetting")),g.appendChild(p),d.appendChild(g),mxEvent.addListener(p,"click",function(x){l.checked=!l.checked;mxEvent.consume(x)})):E.style.marginTop="12px";this.init=function(){n.focus()};this.container=d},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};
HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};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,f,g,c,p){if(null!=f)for(var q=0;q<f.length;q++)null!=f[q]&&(b=this.patchPages(b,f[q],g,c,p));return b};
-EditorUi.prototype.patchPages=function(b,f,g,c,p){var q={},u=[],y={},H={},E={},F={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var d in c[EditorUi.DIFF_UPDATE])q[d]=c[EditorUi.DIFF_UPDATE][d];if(null!=f[EditorUi.DIFF_REMOVE])for(c=0;c<f[EditorUi.DIFF_REMOVE].length;c++)H[f[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(c=0;c<f[EditorUi.DIFF_INSERT].length;c++)y[f[EditorUi.DIFF_INSERT][c].previous]=f[EditorUi.DIFF_INSERT][c];if(null!=f[EditorUi.DIFF_UPDATE])for(d in f[EditorUi.DIFF_UPDATE])c=
-f[EditorUi.DIFF_UPDATE][d],null!=c.previous&&(F[c.previous]=d);if(null!=b){var k="";for(c=0;c<b.length;c++){var l=b[c].getId();E[l]=b[c];null!=F[k]||H[l]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][l]&&null!=f[EditorUi.DIFF_UPDATE][l].previous||(F[k]=l);k=l}}var n={},x=mxUtils.bind(this,function(B){var I=null!=B?B.getId():"";if(null!=B&&!n[I]){n[I]=!0;u.push(B);var G=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][I]:null;null!=G&&(this.updatePageRoot(B),null!=G.name&&B.setName(G.name),
-null!=G.view&&this.patchViewState(B,G.view),null!=G.cells&&this.patchPage(B,G.cells,q[B.getId()],p),!g||null==G.cells&&null==G.view||(B.needsUpdate=!0))}B=F[I];null!=B&&(delete F[I],x(E[B]));B=y[I];null!=B&&(delete y[I],A(B))}),A=mxUtils.bind(this,function(B){B=mxUtils.parseXml(B.data).documentElement;B=new DiagramPage(B);this.updatePageRoot(B);var I=E[B.getId()];null==I?x(B):(this.patchPage(I,this.diffPages([I],[B]),q[I.getId()],p),g&&(I.needsUpdate=!0))});x();for(d in F)x(E[F[d]]),delete F[d];for(d in y)A(y[d]),
-delete y[d];return u};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var g in f)try{this.patchViewStateProperty(b,f,g)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,g){b.viewState[g]=JSON.parse(f[g])};
-EditorUi.prototype.createParentLookup=function(b,f){function g(E){var F=c[E];null==F&&(F={inserted:[],moved:{}},c[E]=F);return F}var c={};if(null!=f[EditorUi.DIFF_INSERT])for(var p=0;p<f[EditorUi.DIFF_INSERT].length;p++){var q=f[EditorUi.DIFF_INSERT][p],u=null!=q.parent?q.parent:"",y=null!=q.previous?q.previous:"";g(u).inserted[y]=q}if(null!=f[EditorUi.DIFF_UPDATE])for(var H in f[EditorUi.DIFF_UPDATE])q=f[EditorUi.DIFF_UPDATE][H],null!=q.previous&&(u=q.parent,null==u&&(p=b.getCell(H),null!=p&&(p=
-b.getParent(p),null!=p&&(u=p.getId()))),null!=u&&(g(u).moved[q.previous]=H));return c};
-EditorUi.prototype.patchPage=function(b,f,g,c){var p=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),q=this.createParentLookup(p,f);p.beginUpdate();try{var u=p.updateEdgeParent,y=new mxDictionary,H=[];p.updateEdgeParent=function(A,B){!y.get(A)&&c&&(y.put(A,!0),H.push(A))};var E=q[""],F=null!=E&&null!=E.inserted?E.inserted[""]:null,d=null;null!=F&&(d=this.getCellForJson(F));if(null==d){var k=null!=E&&null!=E.moved?E.moved[""]:null;null!=k&&(d=p.getCell(k))}null!=d&&(p.setRoot(d),
-b.root=d,EditorUi.debug("EditorUi.patchPage: Root changed",d.id));this.patchCellRecursive(b,p,p.root,q,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var l=0;l<f[EditorUi.DIFF_REMOVE].length;l++){k=f[EditorUi.DIFF_REMOVE][l];var n=p.getCell(k);null!=n&&p.remove(n)}if(null!=f[EditorUi.DIFF_UPDATE]){var x=null!=g&&null!=g.cells?g.cells[EditorUi.DIFF_UPDATE]:null;for(k in f[EditorUi.DIFF_UPDATE])n=p.getCell(k),null!=n?this.patchCell(p,n,f[EditorUi.DIFF_UPDATE][k],null!=x?x[k]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",
-k,"diff",[f[EditorUi.DIFF_UPDATE][k]])}if(null!=f[EditorUi.DIFF_INSERT])for(l=0;l<f[EditorUi.DIFF_INSERT].length;l++)F=f[EditorUi.DIFF_INSERT][l],n=p.getCell(F.id),null!=n&&(p.setTerminal(n,p.getCell(F.source),!0),p.setTerminal(n,p.getCell(F.target),!1));p.updateEdgeParent=u;if(c&&0<H.length)for(l=0;l<H.length;l++)p.contains(H[l])&&p.updateEdgeParent(H[l])}finally{p.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,f,g,c,p){if(null!=g){var q=c[g.getId()],u=null!=q&&null!=q.inserted?q.inserted:{};q=null!=q&&null!=q.moved?q.moved:{};for(var y=0,H=f.getChildCount(g),E="",F=0;F<H;F++){var d=f.getChildAt(g,F).getId();null==q[E]&&(null==p[EditorUi.DIFF_UPDATE]||null==p[EditorUi.DIFF_UPDATE][d]||null==p[EditorUi.DIFF_UPDATE][d].previous&&null==p[EditorUi.DIFF_UPDATE][d].parent)&&(q[E]=d);E=d}H=mxUtils.bind(this,function(k,l){var n=null!=k?k.getId():"";null==n&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
-"cell",k);null!=k&&l&&(l=f.getCell(n),null!=l&&l!=k&&(k=null));null!=k&&(f.getChildAt(g,y)!=k&&f.add(g,k,y),this.patchCellRecursive(b,f,k,c,p),y++);return n});for(E=[null];0<E.length;)if(F=E.shift(),F=H(null!=F?F.child:null,null!=F?F.insert:!1),d=q[F],null!=d&&(delete q[F],E.push({child:f.getCell(d)})),d=u[F],null!=d&&(delete u[F],E.push({child:this.getCellForJson(d),insert:!0})),0==E.length){for(F in q)E.push({child:f.getCell(q[F])}),delete q[F];for(F in u)E.push({child:this.getCellForJson(u[F]),
+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,f,k,c,p){if(null!=f)for(var q=0;q<f.length;q++)null!=f[q]&&(b=this.patchPages(b,f[q],k,c,p));return b};
+EditorUi.prototype.patchPages=function(b,f,k,c,p){var q={},u=[],z={},G={},E={},F={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var d in c[EditorUi.DIFF_UPDATE])q[d]=c[EditorUi.DIFF_UPDATE][d];if(null!=f[EditorUi.DIFF_REMOVE])for(c=0;c<f[EditorUi.DIFF_REMOVE].length;c++)G[f[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(c=0;c<f[EditorUi.DIFF_INSERT].length;c++)z[f[EditorUi.DIFF_INSERT][c].previous]=f[EditorUi.DIFF_INSERT][c];if(null!=f[EditorUi.DIFF_UPDATE])for(d in f[EditorUi.DIFF_UPDATE])c=
+f[EditorUi.DIFF_UPDATE][d],null!=c.previous&&(F[c.previous]=d);if(null!=b){var g="";for(c=0;c<b.length;c++){var l=b[c].getId();E[l]=b[c];null!=F[g]||G[l]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][l]&&null!=f[EditorUi.DIFF_UPDATE][l].previous||(F[g]=l);g=l}}var n={},x=mxUtils.bind(this,function(B){var I=null!=B?B.getId():"";if(null!=B&&!n[I]){n[I]=!0;u.push(B);var H=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][I]:null;null!=H&&(this.updatePageRoot(B),null!=H.name&&B.setName(H.name),
+null!=H.view&&this.patchViewState(B,H.view),null!=H.cells&&this.patchPage(B,H.cells,q[B.getId()],p),!k||null==H.cells&&null==H.view||(B.needsUpdate=!0))}B=F[I];null!=B&&(delete F[I],x(E[B]));B=z[I];null!=B&&(delete z[I],A(B))}),A=mxUtils.bind(this,function(B){B=mxUtils.parseXml(B.data).documentElement;B=new DiagramPage(B);this.updatePageRoot(B);var I=E[B.getId()];null==I?x(B):(this.patchPage(I,this.diffPages([I],[B]),q[I.getId()],p),k&&(I.needsUpdate=!0))});x();for(d in F)x(E[F[d]]),delete F[d];for(d in z)A(z[d]),
+delete z[d];return u};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var k in f)try{this.patchViewStateProperty(b,f,k)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,k){b.viewState[k]=JSON.parse(f[k])};
+EditorUi.prototype.createParentLookup=function(b,f){function k(E){var F=c[E];null==F&&(F={inserted:[],moved:{}},c[E]=F);return F}var c={};if(null!=f[EditorUi.DIFF_INSERT])for(var p=0;p<f[EditorUi.DIFF_INSERT].length;p++){var q=f[EditorUi.DIFF_INSERT][p],u=null!=q.parent?q.parent:"",z=null!=q.previous?q.previous:"";k(u).inserted[z]=q}if(null!=f[EditorUi.DIFF_UPDATE])for(var G in f[EditorUi.DIFF_UPDATE])q=f[EditorUi.DIFF_UPDATE][G],null!=q.previous&&(u=q.parent,null==u&&(p=b.getCell(G),null!=p&&(p=
+b.getParent(p),null!=p&&(u=p.getId()))),null!=u&&(k(u).moved[q.previous]=G));return c};
+EditorUi.prototype.patchPage=function(b,f,k,c){var p=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),q=this.createParentLookup(p,f);p.beginUpdate();try{var u=p.updateEdgeParent,z=new mxDictionary,G=[];p.updateEdgeParent=function(A,B){!z.get(A)&&c&&(z.put(A,!0),G.push(A))};var E=q[""],F=null!=E&&null!=E.inserted?E.inserted[""]:null,d=null;null!=F&&(d=this.getCellForJson(F));if(null==d){var g=null!=E&&null!=E.moved?E.moved[""]:null;null!=g&&(d=p.getCell(g))}null!=d&&(p.setRoot(d),
+b.root=d,EditorUi.debug("EditorUi.patchPage: Root changed",d.id));this.patchCellRecursive(b,p,p.root,q,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var l=0;l<f[EditorUi.DIFF_REMOVE].length;l++){g=f[EditorUi.DIFF_REMOVE][l];var n=p.getCell(g);null!=n&&p.remove(n)}if(null!=f[EditorUi.DIFF_UPDATE]){var x=null!=k&&null!=k.cells?k.cells[EditorUi.DIFF_UPDATE]:null;for(g in f[EditorUi.DIFF_UPDATE])n=p.getCell(g),null!=n?this.patchCell(p,n,f[EditorUi.DIFF_UPDATE][g],null!=x?x[g]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",
+g,"diff",[f[EditorUi.DIFF_UPDATE][g]])}if(null!=f[EditorUi.DIFF_INSERT])for(l=0;l<f[EditorUi.DIFF_INSERT].length;l++)F=f[EditorUi.DIFF_INSERT][l],n=p.getCell(F.id),null!=n&&(p.setTerminal(n,p.getCell(F.source),!0),p.setTerminal(n,p.getCell(F.target),!1));p.updateEdgeParent=u;if(c&&0<G.length)for(l=0;l<G.length;l++)p.contains(G[l])&&p.updateEdgeParent(G[l])}finally{p.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,f,k,c,p){if(null!=k){var q=c[k.getId()],u=null!=q&&null!=q.inserted?q.inserted:{};q=null!=q&&null!=q.moved?q.moved:{};for(var z=0,G=f.getChildCount(k),E="",F=0;F<G;F++){var d=f.getChildAt(k,F).getId();null==q[E]&&(null==p[EditorUi.DIFF_UPDATE]||null==p[EditorUi.DIFF_UPDATE][d]||null==p[EditorUi.DIFF_UPDATE][d].previous&&null==p[EditorUi.DIFF_UPDATE][d].parent)&&(q[E]=d);E=d}G=mxUtils.bind(this,function(g,l){var n=null!=g?g.getId():"";null==n&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
+"cell",g);null!=g&&l&&(l=f.getCell(n),null!=l&&l!=g&&(g=null));null!=g&&(f.getChildAt(k,z)!=g&&f.add(k,g,z),this.patchCellRecursive(b,f,g,c,p),z++);return n});for(E=[null];0<E.length;)if(F=E.shift(),F=G(null!=F?F.child:null,null!=F?F.insert:!1),d=q[F],null!=d&&(delete q[F],E.push({child:f.getCell(d)})),d=u[F],null!=d&&(delete u[F],E.push({child:this.getCellForJson(d),insert:!0})),0==E.length){for(F in q)E.push({child:f.getCell(q[F])}),delete q[F];for(F in u)E.push({child:this.getCellForJson(u[F]),
insert:!0}),delete u[F]}}};
-EditorUi.prototype.patchCell=function(b,f,g,c){if(null!=f&&null!=g){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in g?b.setValue(f,g.value):null!=g.xmlValue&&b.setValue(f,mxUtils.parseXml(g.xmlValue).documentElement);null!=c&&null!=c.style||null==g.style||b.setStyle(f,g.style);null!=g.visible&&b.setVisible(f,1==g.visible);null!=g.collapsed&&b.setCollapsed(f,1==g.collapsed);null!=g.vertex&&(f.vertex=1==g.vertex);null!=g.edge&&(f.edge=1==g.edge);null!=g.connectable&&(f.connectable=
-1==g.connectable);null!=g.geometry&&b.setGeometry(f,this.codec.decode(mxUtils.parseXml(g.geometry).documentElement));null!=g.source&&b.setTerminal(f,b.getCell(g.source),!0);null!=g.target&&b.setTerminal(f,b.getCell(g.target),!1);for(var p in g)this.cellProperties[p]||(f[p]=g[p])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var f=null;null!=b&&(f=mxUtils.getXml(b));return f};
-EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var g=0;g<b.length;g++){var c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[g].root));this.editor.graph.saveViewState(b[g].viewState,c);var p=b[g].node.cloneNode(!1);p.appendChild(c);f.appendChild(p)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
-EditorUi.prototype.getPagesForNode=function(b,f){var g=this.editor.extractGraphModel(b,!0,!0);null!=g&&(b=g);f=b.getElementsByTagName(f||"diagram");g=[];if(0<f.length)for(b=0;b<f.length;b++){var c=new DiagramPage(f[b]);this.updatePageRoot(c,!0);g.push(c)}else"mxGraphModel"==b.nodeName&&(c=new DiagramPage(b.ownerDocument.createElement("diagram")),c.setName(mxResources.get("pageWithNumber",[1])),c.node.appendChild(b.cloneNode(!0)),g.push(c));return g};
-EditorUi.prototype.diffPages=function(b,f){var g=[],c=[],p={},q={},u={},y=null;if(null!=b&&null!=f){for(var H=0;H<f.length;H++)q[f[H].getId()]={page:f[H],prev:y},y=f[H];y=null;for(H=0;H<b.length;H++){var E=b[H].getId();f=q[E];if(null==f)c.push(E);else{this.updatePageRoot(b[H]);this.updatePageRoot(f.page);var F=this.diffCells(b[H].root,f.page.root),d={};mxUtils.isEmptyObject(F)||(d.cells=F);F=this.diffViewState(b[H],f.page);mxUtils.isEmptyObject(F)||(d.view=F);if((null!=f.prev?null==y:null!=y)||null!=
-y&&null!=f.prev&&y.getId()!=f.prev.getId())d.previous=null!=f.prev?f.prev.getId():"";null!=f.page.getName()&&b[H].getName()!=f.page.getName()&&(d.name=f.page.getName());mxUtils.isEmptyObject(d)||(u[E]=d)}delete q[b[H].getId()];y=b[H]}for(E in q)f=q[E],g.push({id:f.page.getId(),data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(u)||(p[EditorUi.DIFF_UPDATE]=u);0<c.length&&(p[EditorUi.DIFF_REMOVE]=c);0<g.length&&(p[EditorUi.DIFF_INSERT]=g)}return p};
-EditorUi.prototype.createCellLookup=function(b,f,g){g=null!=g?g:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):g[b.getId()]={cell:b,prev:f};var c=b.getChildCount();f=null;for(var p=0;p<c;p++){var q=b.getChildAt(p);this.createCellLookup(q,f,g);f=q}return g};
-EditorUi.prototype.diffCellRecursive=function(b,f,g,c,p){c=null!=c?c:{};var q=g[b.getId()];delete g[b.getId()];if(null==q)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):p.push(b.getId());else{var u=this.diffCell(b,q.cell);if(null!=u.parent||(null!=q.prev?null==f:null!=f)||null!=f&&null!=q.prev&&f.getId()!=q.prev.getId())u.previous=null!=q.prev?q.prev.getId():"";mxUtils.isEmptyObject(u)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",
-b,"diff",u):c[b.getId()]=u)}q=b.getChildCount();f=null;for(u=0;u<q;u++){var y=b.getChildAt(u);this.diffCellRecursive(y,f,g,c,p);f=y}return c};
-EditorUi.prototype.diffCells=function(b,f){var g={},c=[],p=this.createCellLookup(f);f.id==b.id?(f=[],b=this.diffCellRecursive(b,null,p,null,f),mxUtils.isEmptyObject(b)||(g[EditorUi.DIFF_UPDATE]=b),0<f.length&&(g[EditorUi.DIFF_REMOVE]=f)):EditorUi.debug("EditorUi.diffCells: Root changed",f.id);for(var q in p)b=p[q],c.push(this.getJsonForCell(b.cell,b.prev));0<c.length&&(g[EditorUi.DIFF_INSERT]=c);return g};
-EditorUi.prototype.diffViewState=function(b,f){var g=b.viewState,c=f.viewState,p={};b==this.currentPage&&(g=this.editor.graph.getViewState());f==this.currentPage&&(c=this.editor.graph.getViewState());if(null!=g&&null!=c)for(var q in this.viewStateProperties)this.diffViewStateProperty(g,c,q,p);return p};EditorUi.prototype.diffViewStateProperty=function(b,f,g,c){b=JSON.stringify(this.getViewStateProperty(b,g));f=JSON.stringify(this.getViewStateProperty(f,g));b!=f&&(c[g]=f)};
+EditorUi.prototype.patchCell=function(b,f,k,c){if(null!=f&&null!=k){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in k?b.setValue(f,k.value):null!=k.xmlValue&&b.setValue(f,mxUtils.parseXml(k.xmlValue).documentElement);null!=c&&null!=c.style||null==k.style||b.setStyle(f,k.style);null!=k.visible&&b.setVisible(f,1==k.visible);null!=k.collapsed&&b.setCollapsed(f,1==k.collapsed);null!=k.vertex&&(f.vertex=1==k.vertex);null!=k.edge&&(f.edge=1==k.edge);null!=k.connectable&&(f.connectable=
+1==k.connectable);null!=k.geometry&&b.setGeometry(f,this.codec.decode(mxUtils.parseXml(k.geometry).documentElement));null!=k.source&&b.setTerminal(f,b.getCell(k.source),!0);null!=k.target&&b.setTerminal(f,b.getCell(k.target),!1);for(var p in k)this.cellProperties[p]||(f[p]=k[p])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var f=null;null!=b&&(f=mxUtils.getXml(b));return f};
+EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var k=0;k<b.length;k++){var c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[k].root));this.editor.graph.saveViewState(b[k].viewState,c);var p=b[k].node.cloneNode(!1);p.appendChild(c);f.appendChild(p)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
+EditorUi.prototype.getPagesForNode=function(b,f){var k=this.editor.extractGraphModel(b,!0,!0);null!=k&&(b=k);f=b.getElementsByTagName(f||"diagram");k=[];if(0<f.length)for(b=0;b<f.length;b++){var c=new DiagramPage(f[b]);this.updatePageRoot(c,!0);k.push(c)}else"mxGraphModel"==b.nodeName&&(c=new DiagramPage(b.ownerDocument.createElement("diagram")),c.setName(mxResources.get("pageWithNumber",[1])),c.node.appendChild(b.cloneNode(!0)),k.push(c));return k};
+EditorUi.prototype.diffPages=function(b,f){var k=[],c=[],p={},q={},u={},z=null;if(null!=b&&null!=f){for(var G=0;G<f.length;G++)q[f[G].getId()]={page:f[G],prev:z},z=f[G];z=null;for(G=0;G<b.length;G++){var E=b[G].getId();f=q[E];if(null==f)c.push(E);else{this.updatePageRoot(b[G]);this.updatePageRoot(f.page);var F=this.diffCells(b[G].root,f.page.root),d={};mxUtils.isEmptyObject(F)||(d.cells=F);F=this.diffViewState(b[G],f.page);mxUtils.isEmptyObject(F)||(d.view=F);if((null!=f.prev?null==z:null!=z)||null!=
+z&&null!=f.prev&&z.getId()!=f.prev.getId())d.previous=null!=f.prev?f.prev.getId():"";null!=f.page.getName()&&b[G].getName()!=f.page.getName()&&(d.name=f.page.getName());mxUtils.isEmptyObject(d)||(u[E]=d)}delete q[b[G].getId()];z=b[G]}for(E in q)f=q[E],k.push({id:f.page.getId(),data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(u)||(p[EditorUi.DIFF_UPDATE]=u);0<c.length&&(p[EditorUi.DIFF_REMOVE]=c);0<k.length&&(p[EditorUi.DIFF_INSERT]=k)}return p};
+EditorUi.prototype.createCellLookup=function(b,f,k){k=null!=k?k:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):k[b.getId()]={cell:b,prev:f};var c=b.getChildCount();f=null;for(var p=0;p<c;p++){var q=b.getChildAt(p);this.createCellLookup(q,f,k);f=q}return k};
+EditorUi.prototype.diffCellRecursive=function(b,f,k,c,p){c=null!=c?c:{};var q=k[b.getId()];delete k[b.getId()];if(null==q)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):p.push(b.getId());else{var u=this.diffCell(b,q.cell);if(null!=u.parent||(null!=q.prev?null==f:null!=f)||null!=f&&null!=q.prev&&f.getId()!=q.prev.getId())u.previous=null!=q.prev?q.prev.getId():"";mxUtils.isEmptyObject(u)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",
+b,"diff",u):c[b.getId()]=u)}q=b.getChildCount();f=null;for(u=0;u<q;u++){var z=b.getChildAt(u);this.diffCellRecursive(z,f,k,c,p);f=z}return c};
+EditorUi.prototype.diffCells=function(b,f){var k={},c=[],p=this.createCellLookup(f);f.id==b.id?(f=[],b=this.diffCellRecursive(b,null,p,null,f),mxUtils.isEmptyObject(b)||(k[EditorUi.DIFF_UPDATE]=b),0<f.length&&(k[EditorUi.DIFF_REMOVE]=f)):EditorUi.debug("EditorUi.diffCells: Root changed",f.id);for(var q in p)b=p[q],c.push(this.getJsonForCell(b.cell,b.prev));0<c.length&&(k[EditorUi.DIFF_INSERT]=c);return k};
+EditorUi.prototype.diffViewState=function(b,f){var k=b.viewState,c=f.viewState,p={};b==this.currentPage&&(k=this.editor.graph.getViewState());f==this.currentPage&&(c=this.editor.graph.getViewState());if(null!=k&&null!=c)for(var q in this.viewStateProperties)this.diffViewStateProperty(k,c,q,p);return p};EditorUi.prototype.diffViewStateProperty=function(b,f,k,c){b=JSON.stringify(this.getViewStateProperty(b,k));f=JSON.stringify(this.getViewStateProperty(f,k));b!=f&&(c[k]=f)};
EditorUi.prototype.getViewStateProperty=function(b,f){b=b[f];"backgroundImage"==f&&null!=b&&null!=b.originalSrc?b={originalSrc:b.originalSrc}:"extFonts"==f&&null==b&&(b=[]);return b};
-EditorUi.prototype.getCellForJson=function(b){var f=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,g=b.value;null!=b.xmlValue&&(g=mxUtils.parseXml(b.xmlValue).documentElement);f=new mxCell(g,f,b.style);f.connectable=0!=b.connectable;f.collapsed=1==b.collapsed;f.visible=0!=b.visible;f.vertex=1==b.vertex;f.edge=1==b.edge;f.id=b.id;for(var c in b)this.cellProperties[c]||(f[c]=b[c]);return f};
-EditorUi.prototype.getJsonForCell=function(b,f){var g={id:b.getId()};b.vertex&&(g.vertex=1);b.edge&&(g.edge=1);b.connectable||(g.connectable=0);null!=b.parent&&(g.parent=b.parent.getId());null!=f&&(g.previous=f.getId());null!=b.source&&(g.source=b.source.getId());null!=b.target&&(g.target=b.target.getId());null!=b.style&&(g.style=b.style);null!=b.geometry&&(g.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(g.collapsed=1);b.visible||(g.visible=0);null!=b.value&&("object"===typeof b.value&&
-"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?g.xmlValue=mxUtils.getXml(b.value):g.value=b.value);for(var c in b)this.cellProperties[c]||"function"===typeof b[c]||(g[c]=b[c]);return g};
-EditorUi.prototype.diffCell=function(b,f){function g(u){return null!=u&&"object"===typeof u&&"number"===typeof u.nodeType&&"string"===typeof u.nodeName&&"function"===typeof u.getAttribute}var c={};b.vertex!=f.vertex&&(c.vertex=f.vertex?1:0);b.edge!=f.edge&&(c.edge=f.edge?1:0);b.connectable!=f.connectable&&(c.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())c.parent=null!=f.parent?f.parent.getId():"";
-if((null!=b.source?null==f.source:null!=f.source)||null!=b.source&&null!=f.source&&b.source.getId()!=f.source.getId())c.source=null!=f.source?f.source.getId():"";if((null!=b.target?null==f.target:null!=f.target)||null!=b.target&&null!=f.target&&b.target.getId()!=f.target.getId())c.target=null!=f.target?f.target.getId():"";g(b.value)&&g(f.value)?b.value.isEqualNode(f.value)||(c.xmlValue=mxUtils.getXml(f.value)):b.value!=f.value&&(g(f.value)?c.xmlValue=mxUtils.getXml(f.value):c.value=null!=f.value?
+EditorUi.prototype.getCellForJson=function(b){var f=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,k=b.value;null!=b.xmlValue&&(k=mxUtils.parseXml(b.xmlValue).documentElement);f=new mxCell(k,f,b.style);f.connectable=0!=b.connectable;f.collapsed=1==b.collapsed;f.visible=0!=b.visible;f.vertex=1==b.vertex;f.edge=1==b.edge;f.id=b.id;for(var c in b)this.cellProperties[c]||(f[c]=b[c]);return f};
+EditorUi.prototype.getJsonForCell=function(b,f){var k={id:b.getId()};b.vertex&&(k.vertex=1);b.edge&&(k.edge=1);b.connectable||(k.connectable=0);null!=b.parent&&(k.parent=b.parent.getId());null!=f&&(k.previous=f.getId());null!=b.source&&(k.source=b.source.getId());null!=b.target&&(k.target=b.target.getId());null!=b.style&&(k.style=b.style);null!=b.geometry&&(k.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(k.collapsed=1);b.visible||(k.visible=0);null!=b.value&&("object"===typeof b.value&&
+"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?k.xmlValue=mxUtils.getXml(b.value):k.value=b.value);for(var c in b)this.cellProperties[c]||"function"===typeof b[c]||(k[c]=b[c]);return k};
+EditorUi.prototype.diffCell=function(b,f){function k(u){return null!=u&&"object"===typeof u&&"number"===typeof u.nodeType&&"string"===typeof u.nodeName&&"function"===typeof u.getAttribute}var c={};b.vertex!=f.vertex&&(c.vertex=f.vertex?1:0);b.edge!=f.edge&&(c.edge=f.edge?1:0);b.connectable!=f.connectable&&(c.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())c.parent=null!=f.parent?f.parent.getId():"";
+if((null!=b.source?null==f.source:null!=f.source)||null!=b.source&&null!=f.source&&b.source.getId()!=f.source.getId())c.source=null!=f.source?f.source.getId():"";if((null!=b.target?null==f.target:null!=f.target)||null!=b.target&&null!=f.target&&b.target.getId()!=f.target.getId())c.target=null!=f.target?f.target.getId():"";k(b.value)&&k(f.value)?b.value.isEqualNode(f.value)||(c.xmlValue=mxUtils.getXml(f.value)):b.value!=f.value&&(k(f.value)?c.xmlValue=mxUtils.getXml(f.value):c.value=null!=f.value?
f.value:null);b.style!=f.style&&(c.style=f.style);b.visible!=f.visible&&(c.visible=f.visible?1:0);b.collapsed!=f.collapsed&&(c.collapsed=f.collapsed?1:0);if(!this.isObjectEqual(b.geometry,f.geometry,new mxGeometry)){var p=this.codec.encode(f.geometry);null!=p&&(c.geometry=mxUtils.getXml(p))}for(var q in b)this.cellProperties[q]||"function"===typeof b[q]||"function"===typeof f[q]||b[q]==f[q]||(c[q]=void 0===f[q]?null:f[q]);for(q in f)q in b||this.cellProperties[q]||"function"===typeof b[q]||"function"===
-typeof f[q]||b[q]==f[q]||(c[q]=void 0===f[q]?null:f[q]);return c};EditorUi.prototype.resolveCrossReferences=function(b,f){var g={};mxUtils.isEmptyObject(f)||(this.adoptTheirPages(b,f,g),this.adoptTheirCells(b,f,g));EditorUi.debug("EditorUi.resolveCrossReferences",[this],"ownDiff",b,"theirDiff",f,"resolve",g);return g};
-EditorUi.prototype.adoptTheirPages=function(b,f,g){var c={};if(null!=f[EditorUi.DIFF_INSERT])for(var p=0;p<f[EditorUi.DIFF_INSERT].length;p++)c[f[EditorUi.DIFF_INSERT][p].id]=f[EditorUi.DIFF_INSERT][p];for(var q in b[EditorUi.DIFF_UPDATE])null!=c[q]&&(null==g[EditorUi.DIFF_INSERT]&&(g[EditorUi.DIFF_INSERT]=[]),null==g[EditorUi.DIFF_UPDATE]&&(g[EditorUi.DIFF_UPDATE]={}),g[EditorUi.DIFF_INSERT].push(c[q]),g[EditorUi.DIFF_UPDATE][q]=b[EditorUi.DIFF_UPDATE][q],delete b[EditorUi.DIFF_UPDATE][q])};
-EditorUi.prototype.adoptTheirCells=function(b,f,g){for(var c in b[EditorUi.DIFF_UPDATE]){var p=b[EditorUi.DIFF_UPDATE][c];null!=p.cells&&this.adoptTheirCellsFromPage(p,f,c,g)}};
-EditorUi.prototype.adoptTheirCellsFromPage=function(b,f,g,c){var p=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][g]:null;if(null!=p&&null!=p.cells&&null!=p.cells[EditorUi.DIFF_INSERT]){f=p.cells[EditorUi.DIFF_UPDATE];for(var q={},u=0;u<p.cells[EditorUi.DIFF_INSERT].length;u++){var y=p.cells[EditorUi.DIFF_INSERT][u];q[y.id]=y}p={cells:{}};p.cells[EditorUi.DIFF_INSERT]=[];p.cells[EditorUi.DIFF_UPDATE]={};p.inserted={};this.resolveOwnInsertedCells(b.cells[EditorUi.DIFF_INSERT],q,p);this.resolveOwnUpdatedCells(b.cells[EditorUi.DIFF_UPDATE],
-q,f,p);null==c[EditorUi.DIFF_UPDATE]&&(c[EditorUi.DIFF_UPDATE]={});delete p.inserted;c[EditorUi.DIFF_UPDATE][g]=p}};EditorUi.prototype.resolveOwnInsertedCells=function(b,f,g){if(null!=b)for(var c=0;c<b.length;c++){var p=b[c];null!=p&&(this.adoptParentCell(p.id,null,f,g),this.adoptTerminalCell(p.id,p,f,!0,g),this.adoptTerminalCell(p.id,p,f,!1,g))}};
-EditorUi.prototype.resolveOwnUpdatedCells=function(b,f,g,c){if(null!=b)for(var p in b){var q=f[p];null!=q?(c.inserted[p]||(c.cells[EditorUi.DIFF_INSERT].push(q),c.inserted[p]=!0),c.cells[EditorUi.DIFF_UPDATE][p]=b[p]):null!=g&&(q=g[p],null!=q&&(this.adoptParentCell(p,q,f,c),this.adoptTerminalCell(p,q,f,!0,c,p),this.adoptTerminalCell(p,q,f,!1,c,p)))}};
-EditorUi.prototype.adoptParentCell=function(b,f,g,c){var p=g[b],q=null!=f?f.parent:null!=p?p.parent:null;null!=q&&this.adoptParentCell(q,null,g,c);null!=p?c.inserted[b]||(c.cells[EditorUi.DIFF_INSERT].push(p),c.inserted[b]=!0):null!=f&&(null==c.cells[EditorUi.DIFF_UPDATE][b]&&(c.cells[EditorUi.DIFF_UPDATE][b]={}),c.cells[EditorUi.DIFF_UPDATE][b]=f)};
-EditorUi.prototype.adoptTerminalCell=function(b,f,g,c,p){f=c?f.source:f.target;g=g[f];null!=g&&(p.inserted[f]||(p.cells[EditorUi.DIFF_INSERT].push(g),p.inserted[f]=!0),null==p.cells[EditorUi.DIFF_UPDATE][b]&&(p.cells[EditorUi.DIFF_UPDATE][b]={}),p.cells[EditorUi.DIFF_UPDATE][b][c?"source":"target"]=f)};
-EditorUi.prototype.isObjectEqual=function(b,f,g){if(null==b&&null==f)return!0;if(null!=b?null==f:null!=f)return!1;var c=function(p,q){return null==g||g[p]!=q?!0===q?1:q:void 0};return JSON.stringify(b,c)==JSON.stringify(f,c)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
+typeof f[q]||b[q]==f[q]||(c[q]=void 0===f[q]?null:f[q]);return c};EditorUi.prototype.resolveCrossReferences=function(b,f){var k={};mxUtils.isEmptyObject(f)||(this.adoptTheirPages(b,f,k),this.adoptTheirCells(b,f,k));EditorUi.debug("EditorUi.resolveCrossReferences",[this],"ownDiff",b,"theirDiff",f,"resolve",k);return k};
+EditorUi.prototype.adoptTheirPages=function(b,f,k){var c={};if(null!=f[EditorUi.DIFF_INSERT])for(var p=0;p<f[EditorUi.DIFF_INSERT].length;p++)c[f[EditorUi.DIFF_INSERT][p].id]=f[EditorUi.DIFF_INSERT][p];for(var q in b[EditorUi.DIFF_UPDATE])null!=c[q]&&(null==k[EditorUi.DIFF_INSERT]&&(k[EditorUi.DIFF_INSERT]=[]),null==k[EditorUi.DIFF_UPDATE]&&(k[EditorUi.DIFF_UPDATE]={}),k[EditorUi.DIFF_INSERT].push(c[q]),k[EditorUi.DIFF_UPDATE][q]=b[EditorUi.DIFF_UPDATE][q],delete b[EditorUi.DIFF_UPDATE][q])};
+EditorUi.prototype.adoptTheirCells=function(b,f,k){for(var c in b[EditorUi.DIFF_UPDATE]){var p=b[EditorUi.DIFF_UPDATE][c];null!=p.cells&&this.adoptTheirCellsFromPage(p,f,c,k)}};
+EditorUi.prototype.adoptTheirCellsFromPage=function(b,f,k,c){var p=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][k]:null;if(null!=p&&null!=p.cells&&null!=p.cells[EditorUi.DIFF_INSERT]){f=p.cells[EditorUi.DIFF_UPDATE];for(var q={},u=0;u<p.cells[EditorUi.DIFF_INSERT].length;u++){var z=p.cells[EditorUi.DIFF_INSERT][u];q[z.id]=z}p={cells:{}};p.cells[EditorUi.DIFF_INSERT]=[];p.cells[EditorUi.DIFF_UPDATE]={};p.inserted={};this.resolveOwnInsertedCells(b.cells[EditorUi.DIFF_INSERT],q,p);this.resolveOwnUpdatedCells(b.cells[EditorUi.DIFF_UPDATE],
+q,f,p);null==c[EditorUi.DIFF_UPDATE]&&(c[EditorUi.DIFF_UPDATE]={});delete p.inserted;c[EditorUi.DIFF_UPDATE][k]=p}};EditorUi.prototype.resolveOwnInsertedCells=function(b,f,k){if(null!=b)for(var c=0;c<b.length;c++){var p=b[c];null!=p&&(this.adoptParentCell(p.id,null,f,k),this.adoptTerminalCell(p.id,p,f,!0,k),this.adoptTerminalCell(p.id,p,f,!1,k))}};
+EditorUi.prototype.resolveOwnUpdatedCells=function(b,f,k,c){if(null!=b)for(var p in b){var q=f[p];null!=q?(c.inserted[p]||(c.cells[EditorUi.DIFF_INSERT].push(q),c.inserted[p]=!0),c.cells[EditorUi.DIFF_UPDATE][p]=b[p]):null!=k&&(q=k[p],null!=q&&(this.adoptParentCell(p,q,f,c),this.adoptTerminalCell(p,q,f,!0,c,p),this.adoptTerminalCell(p,q,f,!1,c,p)))}};
+EditorUi.prototype.adoptParentCell=function(b,f,k,c){var p=k[b],q=null!=f?f.parent:null!=p?p.parent:null;null!=q&&this.adoptParentCell(q,null,k,c);null!=p?c.inserted[b]||(c.cells[EditorUi.DIFF_INSERT].push(p),c.inserted[b]=!0):null!=f&&(null==c.cells[EditorUi.DIFF_UPDATE][b]&&(c.cells[EditorUi.DIFF_UPDATE][b]={}),c.cells[EditorUi.DIFF_UPDATE][b]=f)};
+EditorUi.prototype.adoptTerminalCell=function(b,f,k,c,p){f=c?f.source:f.target;k=k[f];null!=k&&(p.inserted[f]||(p.cells[EditorUi.DIFF_INSERT].push(k),p.inserted[f]=!0),null==p.cells[EditorUi.DIFF_UPDATE][b]&&(p.cells[EditorUi.DIFF_UPDATE][b]={}),p.cells[EditorUi.DIFF_UPDATE][b][c?"source":"target"]=f)};
+EditorUi.prototype.isObjectEqual=function(b,f,k){if(null==b&&null==f)return!0;if(null!=b?null==f:null!=f)return!1;var c=function(p,q){return null==k||k[p]!=q?!0===q?1:q:void 0};return JSON.stringify(b,c)==JSON.stringify(f,c)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings())mxSettings.settings.ui=b,mxSettings.save();else{var f=mxSettings.getMainSettings();f.ui=b;localStorage.setItem(".drawio-config",JSON.stringify(f))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){var f=b?mxSettings.settings.darkGridColor:mxSettings.settings.gridColor;mxUtils.isLightDarkColor(f)&&
(f=mxUtils.getLightDarkColor(f),f=b?f.dark:f.light);return f},setGridColor:function(b,f){f?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=
b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],f=0;f<b.length;f++)"string"===typeof b[f]&&(b[f]={name:b[f],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,
@@ -13604,15 +13609,15 @@ null!=b?JSON.parse(b):null;null==b||b.configVersion!=Editor.configVersion||null!
null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=mxGraph.prototype.pageFormat),
null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&(mxSettings.settings.showStartScreen=!1),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=mxGraphView.prototype.defaultGridColor),null==mxSettings.settings.darkGridColor&&(mxSettings.settings.darkGridColor=mxGraphView.prototype.defaultDarkGridColor),null==mxSettings.settings.autosave?mxSettings.settings.autosave=!EditorUi.isElectronApp:EditorUi.isElectronApp&&null==localStorage.getItem("._autoSaveTrans_")&&
(localStorage.setItem("._autoSaveTrans_","1"),mxSettings.settings.autosave=!1,mxSettings.save()),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFilePolling=function(b,f){this.file=b;this.sync=f};DrawioFilePolling.prototype.maxRetries=2;DrawioFilePolling.prototype.minPollDelay=2E3;
-DrawioFilePolling.prototype.start=function(b){if(!this.isConnected()){this.delay=this.maxDelay=b;var f=mxUtils.bind(this,function(){this.poll(0,g)}),g=mxUtils.bind(this,function(){this.thread=setTimeout(f,this.delay);this.delay=Math.min(this.maxDelay,this.delay+2E3)});g();EditorUi.debug("DrawioFilePolling.start",[this],"thread",this.thread,"delay",b,"rev",this.file.getCurrentRevisionId())}};
+DrawioFilePolling.prototype.start=function(b){if(!this.isConnected()){this.delay=this.maxDelay=b;var f=mxUtils.bind(this,function(){this.poll(0,k)}),k=mxUtils.bind(this,function(){this.thread=setTimeout(f,this.delay);this.delay=Math.min(this.maxDelay,this.delay+2E3)});k();EditorUi.debug("DrawioFilePolling.start",[this],"thread",this.thread,"delay",b,"rev",this.file.getCurrentRevisionId())}};
DrawioFilePolling.prototype.updateStatus=function(){this.hasOtherWriters()&&(this.sync.lastMessage=mxResources.get("otherUsersEditing"));this.sync.lastModified=this.file.getLastModifiedDate();this.sync.updateStatus()};
-DrawioFilePolling.prototype.poll=function(b,f){b=null!=b?b:0;var g=mxUtils.bind(this,function(c){b<this.maxRetries?this.retryPoll(mxUtils.bind(this,function(){this.poll(b+1,f)})):f()});this.file.getLatestVersionId(mxUtils.bind(this,function(c){if(-1!=c){var p=this.file.getCurrentRevisionId();c!=p?this.file.getLatestVersion(mxUtils.bind(this,function(q){this.file.mergeFile(q,mxUtils.bind(this,function(){this.delay=this.minPollDelay;this.lastOtherWriter=Date.now();this.updateStatus();f()}),g)}),g):
-(this.updateStatus(),f())}else f()}),g)};DrawioFilePolling.prototype.retryPoll=function(b){var f=300+300*Math.random();window.setTimeout(b,f);EditorUi.debug("StorageFile.retryPoll",[this],"delay",f)};DrawioFilePolling.prototype.stop=function(){EditorUi.debug("DrawioFilePolling.stop",[this],"thread",this.thread);clearTimeout(this.thread);this.thread=null};DrawioFilePolling.prototype.isConnected=function(){return null!=this.thread};
+DrawioFilePolling.prototype.poll=function(b,f){b=null!=b?b:0;var k=mxUtils.bind(this,function(c){b<this.maxRetries?this.retryPoll(mxUtils.bind(this,function(){this.poll(b+1,f)})):f()});this.file.getLatestVersionId(mxUtils.bind(this,function(c){if(-1!=c){var p=this.file.getCurrentRevisionId();c!=p?this.file.getLatestVersion(mxUtils.bind(this,function(q){this.file.mergeFile(q,mxUtils.bind(this,function(){this.delay=this.minPollDelay;this.lastOtherWriter=Date.now();this.updateStatus();f()}),k)}),k):
+(this.updateStatus(),f())}else f()}),k)};DrawioFilePolling.prototype.retryPoll=function(b){var f=300+300*Math.random();window.setTimeout(b,f);EditorUi.debug("StorageFile.retryPoll",[this],"delay",f)};DrawioFilePolling.prototype.stop=function(){EditorUi.debug("DrawioFilePolling.stop",[this],"thread",this.thread);clearTimeout(this.thread);this.thread=null};DrawioFilePolling.prototype.isConnected=function(){return null!=this.thread};
DrawioFilePolling.prototype.hasOtherWriters=function(){return null!=this.lastOtherWriter&&6E4>Date.now()-this.lastOtherWriter};DrawioFileSync=function(b){mxEventSource.call(this);this.lastActivity=Date.now();this.clientId=Editor.guid();this.ui=b.ui;this.file=b;this.onlineListener=mxUtils.bind(this,function(){this.updateOnlineState();this.isConnected()&&!this.ui.isOffline(!0)?this.fileChangedNotify():this.updateStatus()});mxEvent.addListener(window,"offline",this.onlineListener);mxEvent.addListener(window,"online",this.onlineListener);this.autosaveListener=mxUtils.bind(this,function(){this.updateRealtime()});this.ui.editor.addListener("autosaveChanged",
this.autosaveListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(f){this.lastActivity=Date.now();this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",this.activityListener);mxEvent.addListener(window,
"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.file.addListener("realtimeMessage",this.activityListener);this.pusherErrorListener=mxUtils.bind(this,function(f){null!=f.error&&null!=f.error.data&&4004===f.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener=mxUtils.bind(this,function(){this.updateOnlineState();
-this.updateStatus();this.isConnected()&&(this.announced||!Editor.enableRealtimeCache||Editor.p2pSyncNotify?this.announced&&this.fileChangedNotify(null,!0):this.sendJoinMessage())});this.changeListener=mxUtils.bind(this,function(f){this.file.stats.msgReceived++;this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var g=this.stringToObject(f);null!=g&&(EditorUi.debug("DrawioFileSync.message",[this],g,f.length,"bytes"),g.v>DrawioFileSync.PROTOCOL?
-this.file.redirectToNewApp(mxUtils.bind(this,function(){})):g.v===DrawioFileSync.PROTOCOL&&null!=g.d&&this.handleMessageData(g.d))}catch(c){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets;mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.maxSyncMessageSize=9E3;DrawioFileSync.prototype.syncSendMessageDelay=300;
+this.updateStatus();this.isConnected()&&(this.announced||!Editor.enableRealtimeCache||Editor.p2pSyncNotify?this.announced&&this.fileChangedNotify(null,!0):this.sendJoinMessage())});this.changeListener=mxUtils.bind(this,function(f){this.file.stats.msgReceived++;this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var k=this.stringToObject(f);null!=k&&(EditorUi.debug("DrawioFileSync.message",[this],k,f.length,"bytes"),k.v>DrawioFileSync.PROTOCOL?
+this.file.redirectToNewApp(mxUtils.bind(this,function(){})):k.v===DrawioFileSync.PROTOCOL&&null!=k.d&&this.handleMessageData(k.d))}catch(c){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets;mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.maxSyncMessageSize=9E3;DrawioFileSync.prototype.syncSendMessageDelay=300;
DrawioFileSync.prototype.syncReceiveMessageDelay=50;DrawioFileSync.prototype.cleanupDelay=15E3;DrawioFileSync.prototype.syncChangeCounter=0;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;DrawioFileSync.prototype.catchupRetryCount=0;DrawioFileSync.prototype.maxCatchupRetries=15;DrawioFileSync.prototype.maxCacheReadyRetries=1;DrawioFileSync.prototype.cacheReadyDelay=700;DrawioFileSync.prototype.maxOptimisticRetries=6;
DrawioFileSync.prototype.inactivityTimeoutSeconds=1800;DrawioFileSync.prototype.lastActivity=null;
DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=this.file.getChannelId());null==this.key&&(this.key=this.file.getChannelKey());var b=!1;if(this.file.isPolling())"hidden"!=document.visibilityState&&(null==this.polling&&(this.polling=new DrawioFilePolling(this.file,this)),this.polling.start(this.file.getPollingInterval()),b=!0);else if(null==this.pusher&&null!=this.channelId&&"hidden"!=document.visibilityState){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{null!=
@@ -13622,435 +13627,435 @@ DrawioFileSync.prototype.updateRealtime=function(){this.isValidState()&&(this.fi
this.p2pCollab=null))};DrawioFileSync.prototype.initRealtime=function(){this.file.theirPages=this.ui.clonePages(this.ui.pages);this.file.ownPages=this.ui.clonePages(this.ui.pages);this.snapshot=this.file.ownPages};DrawioFileSync.prototype.resetRealtime=function(){var b=this.file.getShadowPages();null!=b&&(b=this.ui.diffPages(b,this.file.ownPages),this.file.patch([b]));this.sendLocalChanges();this.cleanup();this.file.theirPages=null;this.snapshot=this.file.ownPages=null};
DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:null!=this.polling?this.polling.isConnected():!1};DrawioFileSync.prototype.updateOnlineState=function(){"1"!=urlParams.embedRT&&this.file.fireEvent(new mxEventObject("realtimeStateChanged"))};
DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing||(this.enabled&&null!=this.ui.statusContainer?(this.ui.updateStatus(mxUtils.bind(this,function(){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));
-var f=this.lastMessage;this.lastMessage=null;null!=f&&40<f.length&&(f=f.substring(0,40)+"...");var g=this.ui.getNetworkStatus();b=mxResources.get("lastChange",[b]);var c=this.file.isRevisionHistorySupported()?'data-action="revisionHistory" ':"",p=mxUtils.htmlEntities(b)+(this.file.isRevisionHistorySupported()?" - "+mxUtils.htmlEntities(mxResources.get("revisionHistory")):"");this.ui.editor.setStatus("<div "+c+'title="'+p+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?this.file.isLocked()?
-' <img class="geToolbarButton" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+Editor.lockedImage+'"/>':"":'<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(null!=g?'<div class="geStatusBox" title="'+mxUtils.htmlEntities(g)+'">'+mxUtils.htmlEntities(g)+"</div>":"")+(null!=f?' <div class="geStatusBox" data-effect="fade" title="'+mxUtils.htmlEntities(f)+'">'+mxUtils.htmlEntities(f)+
+var f=this.lastMessage;this.lastMessage=null;null!=f&&40<f.length&&(f=f.substring(0,40)+"...");var k=this.ui.getNetworkStatus();b=mxResources.get("lastChange",[b]);var c=this.file.isRevisionHistorySupported()?'data-action="revisionHistory" ':"",p=mxUtils.htmlEntities(b)+(this.file.isRevisionHistorySupported()?" - "+mxUtils.htmlEntities(mxResources.get("revisionHistory")):"");this.ui.editor.setStatus("<div "+c+'title="'+p+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?this.file.isLocked()?
+' <img class="geToolbarButton" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+Editor.lockedImage+'"/>':"":'<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(null!=k?'<div class="geStatusBox" title="'+mxUtils.htmlEntities(k)+'">'+mxUtils.htmlEntities(k)+"</div>":"")+(null!=f?' <div class="geStatusBox" data-effect="fade" title="'+mxUtils.htmlEntities(f)+'">'+mxUtils.htmlEntities(f)+
"</div>":""))})),this.resetUpdateStatusThread()):this.ui.updateStatus(mxUtils.bind(this,function(){this.file.addAllSavedStatus()})))};DrawioFileSync.prototype.resetUpdateStatusThread=function(){null!=this.updateStatusThread&&window.clearInterval(this.updateStatusThread);null!=this.channel&&(this.updateStatusThread=window.setInterval(mxUtils.bind(this,function(){this.updateStatus()}),Editor.updateStatusInterval))};
DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&null!=this.pusher.connection&&this.pusher.connection.bind("state_change",this.connectionListener);null!=this.channel&&this.channel.bind("changed",this.changeListener)};
DrawioFileSync.prototype.notify=function(b){this.file.stats.msgSent++;this.file.isPolling()||(Editor.enableRealtimeCache&&!Editor.p2pSyncNotify?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(b))):null!=this.p2pCollab&&this.p2pCollab.sendNotification(b));EditorUi.debug("DrawioFileSync.notify",[this],"enableRealtimeCache",Editor.enableRealtimeCache,"p2pSyncNotify",Editor.p2pSyncNotify,"msg",b)};
DrawioFileSync.prototype.sendJoinMessage=function(){if(!this.announced){var b=this.file.getCurrentUser(),f={a:"join"};null!=b&&(f.name=encodeURIComponent(b.displayName),f.uid=b.id);this.notify(this.createMessage(f));this.announced=!0}};
DrawioFileSync.prototype.handleMessageData=function(b){"desc"==b.a?this.file.savingFile||this.reloadDescriptor():"join"==b.a||"leave"==b.a?("join"==b.a&&this.file.stats.joined++,null!=b.name&&(this.lastMessage=mxResources.get("join"==b.a?"userJoined":"userLeft",[decodeURIComponent(b.name)]),this.resetUpdateStatusThread(),this.updateStatus())):"change"==b.a?this.receiveRemoteChanges(b):null!=b.m&&(b=new Date(b.m),null==this.lastMessageModified||this.lastMessageModified<b)&&(this.lastMessageModified=
b,this.fileChangedNotify())};DrawioFileSync.prototype.isValidState=function(){return this.ui.getCurrentFile()==this.file&&this.file.sync==this&&!this.file.invalidChecksum&&!this.file.redirectDialogShowing};
-DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){EditorUi.debug("DrawioFileSync.optimisticSync",[this],"attempt",b,"of",this.maxOptimisticRetries,"remoteFileChanged",this.remoteFileChanged);this.remoteFileChanged=!1;this.file.getLatestVersion(mxUtils.bind(this,function(f){this.reloadThread=null;if(null!=f){var g=this.file.getCurrentRevisionId(),c=f.getCurrentRevisionId();
-g==c?this.optimisticSync(b+1):this.file.mergeFile(f,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),mxUtils.bind(this,function(){this.reloadThread=null}))}),(b+1)*this.file.optimisticSyncDelay)))};
-DrawioFileSync.prototype.fileChangedNotify=function(b,f){if(this.isValidState())if(EditorUi.debug("DrawioFileSync.fileChangedNotify",[this],"data",[b],"immediate",f,"saving",this.file.savingFile),this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var g=this.fileChanged(mxUtils.bind(this,function(c){this.updateStatus()}),mxUtils.bind(this,function(c){this.file.handleFileError(c)}),mxUtils.bind(this,function(){return!this.file.savingFile&&
-this.notifyThread!=g}),!0,f)};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++,g=this.createMessage({a:"change",c:b,id:f,t:Date.now()});f=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(g):"1"==urlParams.dev?(g=encodeURIComponent(this.objectToString(g)),0==this.maxSyncMessageSize||g.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+g):f=!0):f=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
+DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){EditorUi.debug("DrawioFileSync.optimisticSync",[this],"attempt",b,"of",this.maxOptimisticRetries,"remoteFileChanged",this.remoteFileChanged);this.remoteFileChanged=!1;this.file.getLatestVersion(mxUtils.bind(this,function(f){this.reloadThread=null;if(null!=f){var k=this.file.getCurrentRevisionId(),c=f.getCurrentRevisionId();
+k==c?this.optimisticSync(b+1):this.file.mergeFile(f,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),mxUtils.bind(this,function(){this.reloadThread=null}))}),(b+1)*this.file.optimisticSyncDelay)))};
+DrawioFileSync.prototype.fileChangedNotify=function(b,f){if(this.isValidState())if(EditorUi.debug("DrawioFileSync.fileChangedNotify",[this],"data",[b],"immediate",f,"saving",this.file.savingFile),this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var k=this.fileChanged(mxUtils.bind(this,function(c){this.updateStatus()}),mxUtils.bind(this,function(c){this.file.handleFileError(c)}),mxUtils.bind(this,function(){return!this.file.savingFile&&
+this.notifyThread!=k}),!0,f)};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++,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(p,q){return p.id<q.id?-1:p.id>q.id?1:0});for(var f=null,g=0;g<this.receivedData.length;g++){var c=JSON.stringify(this.receivedData[g].c);c!=f&&this.doReceiveRemoteChanges(this.receivedData[g].c);
+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(p,q){return p.id<q.id?-1:p.id>q.id?1:0});for(var f=null,k=0;k<this.receivedData.length;k++){var c=JSON.stringify(this.receivedData[k].c);c!=f&&this.doReceiveRemoteChanges(this.receivedData[k].c);
f=c}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};
-DrawioFileSync.prototype.scheduleCleanup=function(b){var f=Math.min(15,Math.floor(this.file.getSize()/5E6));f=0==b?0:this.cleanupDelay+1E3*f;var g=this.cleanupThread;if(1!=b||null!=this.cleanupThread)window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanup(null,mxUtils.bind(this,function(c){this.file.handleFileError(c)}))}),f);EditorUi.debug("DrawioFileSync.scheduleCleanup",[this],"lazy",b,"delay",f,"prev",g,"thread",this.cleanupThread)};
-DrawioFileSync.prototype.cleanup=function(b,f,g){var c=this.cleanupThread;window.clearTimeout(this.cleanupThread);this.cleanupThread=null;if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var p=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.cleanup",[this],"thread",c,"patches",p,"checkFile",g,"checksum",this.ui.getHashValueForPages(this.ui.pages));
-this.file.ignorePatches(p)||this.file.patch(p);g?this.file.getLatestVersion(mxUtils.bind(this,function(q){try{if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()){var u=q.getShadowPages();p=[this.ui.diffPages(this.ui.pages,u),this.ui.diffPages(u,this.file.ownPages)];this.file.ignorePatches(p)||this.file.patch(p);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",q,"patches",p)}null!=b&&b()}catch(y){null!=f&&f(y)}}),f):(document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||
-this.testChecksum(),null!=b&&b())}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",g,"modified",this.file.isModified()))};
-DrawioFileSync.prototype.testChecksum=function(){var b=this.ui.getHashValueForPages(this.ui.pages),f=this.file.getCurrentRevisionId();this.file.getLatestVersion(mxUtils.bind(this,function(g){if(!document.hidden){var c=this.ui.getHashValueForPages(g.getShadowPages()),p=g.getDescriptorChecksum(g.getDescriptor()),q=g.getCurrentRevisionId();EditorUi.debug("DrawioFileSync.testChecksum","local",[this.file],"modified",this.file.isModified(),"inConflictState",this.file.inConflictState,"autosaveThread",this.file.autosaveThread,
-"savingFile",this.file.savingFile,"localFileWasChanged",this.localFileWasChanged,"remoteFileChanged",this.remoteFileChanged,"cleanup",this.cleanupThread,"checksum",b);EditorUi.debug("DrawioFileSync.testChecksum","remote",[g],"rev",q==f,"desc",p==c,"checksum",c);c!=b?(EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums do not match"),this.ui.alert("Checksums do not match")):EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums match")}}),mxUtils.bind(this,function(g){EditorUi.debug("DrawioFileSync.testChecksum",
-[this],"checksum test error",g)}))};DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};
-DrawioFileSync.prototype.extractRemove=function(b){var f={};null!=b[EditorUi.DIFF_REMOVE]&&(f[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var g in b[EditorUi.DIFF_UPDATE]){var c=b[EditorUi.DIFF_UPDATE][g];if(null!=c.cells&&null!=c.cells[EditorUi.DIFF_REMOVE]){null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={});f[EditorUi.DIFF_UPDATE][g]={};var p=f[EditorUi.DIFF_UPDATE][g];p.cells={};p.cells[EditorUi.DIFF_REMOVE]=c.cells[EditorUi.DIFF_REMOVE]}}return f};
-DrawioFileSync.prototype.patchRealtime=function(b,f,g,c){var p=null;if(this.file.isRealtime()){p=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var q=this.extractRemove(this.extractLocal(p)),u=(null==g?b:b.concat(g)).concat([q]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,u,!0,f);mxUtils.isEmptyObject(q)?this.scheduleCleanup(null!=c?!1:null):this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",f,"own",g,
+DrawioFileSync.prototype.scheduleCleanup=function(b){var f=Math.min(15,Math.floor(this.file.getSize()/5E6));f=0==b?0:this.cleanupDelay+1E3*f;var k=this.cleanupThread;if(1!=b||null!=this.cleanupThread)window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanup(null,mxUtils.bind(this,function(c){this.file.handleFileError(c)}))}),f);EditorUi.debug("DrawioFileSync.scheduleCleanup",[this],"lazy",b,"delay",f,"prev",k,"thread",this.cleanupThread)};
+DrawioFileSync.prototype.cleanup=function(b,f,k){var c=this.cleanupThread;window.clearTimeout(this.cleanupThread);this.cleanupThread=null;if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var p=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.cleanup",[this],"thread",c,"patches",p,"checkFile",k,"checksum",this.ui.getHashValueForPages(this.ui.pages));
+this.file.ignorePatches(p)||this.file.patch(p);k?this.file.getLatestVersion(mxUtils.bind(this,function(q){try{if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()){var u=q.getShadowPages();p=[this.ui.diffPages(this.ui.pages,u),this.ui.diffPages(u,this.file.ownPages)];this.file.ignorePatches(p)||this.file.patch(p);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",q,"patches",p)}null!=b&&b()}catch(z){null!=f&&f(z)}}),f):(document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||
+this.testChecksum(),null!=b&&b())}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",k,"modified",this.file.isModified()))};
+DrawioFileSync.prototype.testChecksum=function(){var b=this.ui.getHashValueForPages(this.ui.pages),f=this.file.getCurrentRevisionId();this.file.getLatestVersion(mxUtils.bind(this,function(k){if(!document.hidden){var c=this.ui.getHashValueForPages(k.getShadowPages()),p=k.getDescriptorChecksum(k.getDescriptor()),q=k.getCurrentRevisionId();EditorUi.debug("DrawioFileSync.testChecksum","local",[this.file],"modified",this.file.isModified(),"inConflictState",this.file.inConflictState,"autosaveThread",this.file.autosaveThread,
+"savingFile",this.file.savingFile,"localFileWasChanged",this.localFileWasChanged,"remoteFileChanged",this.remoteFileChanged,"cleanup",this.cleanupThread,"checksum",b);EditorUi.debug("DrawioFileSync.testChecksum","remote",[k],"rev",q==f,"desc",p==c,"checksum",c);c!=b?(EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums do not match"),this.ui.alert("Checksums do not match")):EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums match")}}),mxUtils.bind(this,function(k){EditorUi.debug("DrawioFileSync.testChecksum",
+[this],"checksum test error",k)}))};DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};
+DrawioFileSync.prototype.extractRemove=function(b){var f={};null!=b[EditorUi.DIFF_REMOVE]&&(f[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var k in b[EditorUi.DIFF_UPDATE]){var c=b[EditorUi.DIFF_UPDATE][k];if(null!=c.cells&&null!=c.cells[EditorUi.DIFF_REMOVE]){null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={});f[EditorUi.DIFF_UPDATE][k]={};var p=f[EditorUi.DIFF_UPDATE][k];p.cells={};p.cells[EditorUi.DIFF_REMOVE]=c.cells[EditorUi.DIFF_REMOVE]}}return f};
+DrawioFileSync.prototype.patchRealtime=function(b,f,k,c){var p=null;if(this.file.isRealtime()){p=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var q=this.extractRemove(this.extractLocal(p)),u=(null==k?b:b.concat(k)).concat([q]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,u,!0,f);mxUtils.isEmptyObject(q)?this.scheduleCleanup(null!=c?!1:null):this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",f,"own",k,
"all",p,"local",q,"applied",u,"immediate",c)}return p};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
-DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),f=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.snapshot=b;var g=this.ui.resolveCrossReferences(f,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,g,!0);this.isRealtimeActive()&&this.doSendLocalChanges([g,f])}this.localFileWasChanged=
+DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),f=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.snapshot=b;var k=this.ui.resolveCrossReferences(f,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,k,!0);this.isRealtimeActive()&&this.doSendLocalChanges([k,f])}this.localFileWasChanged=
!1}catch(c){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),b,c)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
-DrawioFileSync.prototype.merge=function(b,f,g,c,p,q,u){try{this.file.stats.merged++;this.lastModified=new Date;var y=this.file.getDescriptorRevisionId(g);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var H=this.ui.clonePages(this.file.getShadowPages()),E=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(H,this.ui.pages):null,F=this.file.isRealtime()?this.ui.diffPages(H,this.file.ownPages):null;H=this.ui.applyPatches(H,b);var d=null==f?null:this.ui.getHashValueForPages(H);
-EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",E,"pending",F,"checksum",f,"current",d,"valid",f==d,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",y,"etag",this.file.getDescriptorEtag(g),"immediate",u);if(null!=f&&f!=d){this.reload(mxUtils.bind(this,function(){null!=c&&c()}),mxUtils.bind(this,function(){null!=p&&p()}),q,null,u);return}this.file.setShadowPages(H);null==this.patchRealtime(b,null,F,u)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?
-E:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),g);null!=c&&c(!0)}catch(n){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=p&&p(n);try{var k=this.file.getCurrentUser(),l=null!=k?k.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),l,n)}catch(x){}}};
-DrawioFileSync.prototype.fileChanged=function(b,f,g,c,p){var q=window.setTimeout(mxUtils.bind(this,function(){null!=g&&g()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"immediate",p,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(u){null!=g&&g()||(this.isValidState()?this.catchup(u,b,f,g,p):null!=f&&f())}),f)):null!=f&&f())}),c?this.cacheReadyDelay:0);return this.notifyThread=
+DrawioFileSync.prototype.merge=function(b,f,k,c,p,q,u){try{this.file.stats.merged++;this.lastModified=new Date;var z=this.file.getDescriptorRevisionId(k);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var G=this.ui.clonePages(this.file.getShadowPages()),E=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(G,this.ui.pages):null,F=this.file.isRealtime()?this.ui.diffPages(G,this.file.ownPages):null;G=this.ui.applyPatches(G,b);var d=null==f?null:this.ui.getHashValueForPages(G);
+EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",E,"pending",F,"checksum",f,"current",d,"valid",f==d,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",z,"etag",this.file.getDescriptorEtag(k),"immediate",u);if(null!=f&&f!=d){this.reload(mxUtils.bind(this,function(){null!=c&&c()}),mxUtils.bind(this,function(){null!=p&&p()}),q,null,u);return}this.file.setShadowPages(G);null==this.patchRealtime(b,null,F,u)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?
+E:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),k);null!=c&&c(!0)}catch(n){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=p&&p(n);try{var g=this.file.getCurrentUser(),l=null!=g?g.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),l,n)}catch(x){}}};
+DrawioFileSync.prototype.fileChanged=function(b,f,k,c,p){var q=window.setTimeout(mxUtils.bind(this,function(){null!=k&&k()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"immediate",p,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(u){null!=k&&k()||(this.isValidState()?this.catchup(u,b,f,k,p):null!=f&&f())}),f)):null!=f&&f())}),c?this.cacheReadyDelay:0);return this.notifyThread=
q};
-DrawioFileSync.prototype.fastForward=function(b){this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.setShadowPages(this.ui.clonePages(this.ui.pages));this.file.theirPages=this.ui.clonePages(this.ui.pages);var f=this.file.ownPages;this.file.ownPages=this.ui.clonePages(this.ui.pages);for(var g=0;g<this.file.ownPages.length;g++)null!=f[g]&&this.ui.getHashValueForPages([this.file.ownPages[g]])!=this.ui.getHashValueForPages([f[g]])&&(this.file.ownPages[g].needsUpdate=!0);f=this.cleanupThread;window.clearTimeout(this.cleanupThread);
+DrawioFileSync.prototype.fastForward=function(b){this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.setShadowPages(this.ui.clonePages(this.ui.pages));this.file.theirPages=this.ui.clonePages(this.ui.pages);var f=this.file.ownPages;this.file.ownPages=this.ui.clonePages(this.ui.pages);for(var k=0;k<this.file.ownPages.length;k++)null!=f[k]&&this.ui.getHashValueForPages([this.file.ownPages[k]])!=this.ui.getHashValueForPages([f[k]])&&(this.file.ownPages[k].needsUpdate=!0);f=this.cleanupThread;window.clearTimeout(this.cleanupThread);
this.cleanupThread=null;"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.fastForward",[this],"desc",[b],"cleanup",f,"checksum",this.ui.getHashValueForPages(this.ui.pages));document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum()};
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,f,g,c,p){if(null!=b&&(null==c||!c())){var q=this.file.getCurrentRevisionId(),u=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",q,"to",u,"immediate",p,"valid",this.isValidState());if(q==u)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),
-document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=f&&f(!0);else if(this.isValidState()){var y=this.file.getDescriptorChecksum(b),H=this.file.getDescriptorSecret(b);if(null!=y&&y==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=f&&f(!0);else if(Editor.enableRealtimeCache&&null!=H&&"1"!=urlParams.lockdown){var E=0,F=!1,d=mxUtils.bind(this,function(){if(null==c||!c())if(q!=this.file.getCurrentRevisionId())null!=f&&
-f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;this.reload(f,g,c,null,p)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(q)+"&to="+encodeURIComponent(u)+(null!=H?"&secret="+encodeURIComponent(H):""),mxUtils.bind(this,function(n){this.file.stats.bytesReceived+=n.getText().length;window.clearTimeout(l);if(k&&(null==c||!c()))if(q!=this.file.getCurrentRevisionId())null!=
-f&&f(!0);else if(this.isValidState()){var x=null,A=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[n],"status",n.getStatus(),"cacheReadyRetryCount",E,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=n.getStatus()&&299>=n.getStatus()&&0<n.getText().length)try{var B=JSON.parse(n.getText());if(null!=B&&0<B.length)for(var I=0;I<B.length;I++){var G=this.stringToObject(B[I]);if(G.v>DrawioFileSync.PROTOCOL){F=!0;A=[];break}else if(G.v===DrawioFileSync.PROTOCOL&&null!=G.d)x=G.d.checksum,
-A.push(G.d.patch);else{F=!0;A=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[B],"status",F?"failed":"ok","temp",A,"checksum",x)}catch(C){A=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<A.length?(this.file.stats.cacheHits++,this.merge(A,x,b,f,g,c,p)):E<=this.maxCacheReadyRetries-1&&!F&&401!=n.getStatus()&&503!=n.getStatus()&&410!=n.getStatus()?(E++,this.file.stats.cacheMiss++,window.setTimeout(d,(E+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
-this.reload(f,g,c,null,p))}catch(C){null!=g&&g(C)}}else null!=g&&g()}),g)}else null!=g&&g()});window.setTimeout(d,this.cacheReadyDelay)}else this.reload(f,g,c,null,p)}else null!=g&&g()}};DrawioFileSync.prototype.reload=function(b,f,g,c,p){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",p);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(q){null!=f&&f(q)}),g,c,p)};
-DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),g=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(g)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;
-EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",g)}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))};
-DrawioFileSync.prototype.createToken=function(b,f,g){var c=!0,p=window.setTimeout(mxUtils.bind(this,function(){c=!1;g({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(q){window.clearTimeout(p);c&&(200<=q.getStatus()&&299>=q.getStatus()?f(q.getText()):g({code:q.getStatus(),message:"Token Error "+q.getStatus()}))}),g)};
+DrawioFileSync.prototype.catchup=function(b,f,k,c,p){if(null!=b&&(null==c||!c())){var q=this.file.getCurrentRevisionId(),u=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",q,"to",u,"immediate",p,"valid",this.isValidState());if(q==u)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),
+document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=f&&f(!0);else if(this.isValidState()){var z=this.file.getDescriptorChecksum(b),G=this.file.getDescriptorSecret(b);if(null!=z&&z==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=f&&f(!0);else if(Editor.enableRealtimeCache&&null!=G&&"1"!=urlParams.lockdown){var E=0,F=!1,d=mxUtils.bind(this,function(){if(null==c||!c())if(q!=this.file.getCurrentRevisionId())null!=f&&
+f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var g=!0,l=window.setTimeout(mxUtils.bind(this,function(){g=!1;this.reload(f,k,c,null,p)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(q)+"&to="+encodeURIComponent(u)+(null!=G?"&secret="+encodeURIComponent(G):""),mxUtils.bind(this,function(n){this.file.stats.bytesReceived+=n.getText().length;window.clearTimeout(l);if(g&&(null==c||!c()))if(q!=this.file.getCurrentRevisionId())null!=
+f&&f(!0);else if(this.isValidState()){var x=null,A=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[n],"status",n.getStatus(),"cacheReadyRetryCount",E,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=n.getStatus()&&299>=n.getStatus()&&0<n.getText().length)try{var B=JSON.parse(n.getText());if(null!=B&&0<B.length)for(var I=0;I<B.length;I++){var H=this.stringToObject(B[I]);if(H.v>DrawioFileSync.PROTOCOL){F=!0;A=[];break}else if(H.v===DrawioFileSync.PROTOCOL&&null!=H.d)x=H.d.checksum,
+A.push(H.d.patch);else{F=!0;A=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[B],"status",F?"failed":"ok","temp",A,"checksum",x)}catch(D){A=[],null!=window.console&&"1"==urlParams.test&&console.log(D)}try{0<A.length?(this.file.stats.cacheHits++,this.merge(A,x,b,f,k,c,p)):E<=this.maxCacheReadyRetries-1&&!F&&401!=n.getStatus()&&503!=n.getStatus()&&410!=n.getStatus()?(E++,this.file.stats.cacheMiss++,window.setTimeout(d,(E+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
+this.reload(f,k,c,null,p))}catch(D){null!=k&&k(D)}}else null!=k&&k()}),k)}else null!=k&&k()});window.setTimeout(d,this.cacheReadyDelay)}else this.reload(f,k,c,null,p)}else null!=k&&k()}};DrawioFileSync.prototype.reload=function(b,f,k,c,p){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",p);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(q){null!=f&&f(q)}),k,c,p)};
+DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),k=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(k)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;
+EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",k)}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))};
+DrawioFileSync.prototype.createToken=function(b,f,k){var c=!0,p=window.setTimeout(mxUtils.bind(this,function(){c=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(q){window.clearTimeout(p);c&&(200<=q.getStatus()&&299>=q.getStatus()?f(q.getText()):k({code:q.getStatus(),message:"Token Error "+q.getStatus()}))}),k)};
DrawioFileSync.prototype.fileSaving=function(){this.file.isOptimisticSync()&&this.notify(this.createMessage({m:Date.now(),type:"optimistic"}));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,f,g,c,p,q){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 u=this.file.getDescriptorSecret(this.file.getDescriptor()),y=this.createMessage({m:this.lastModified.getTime()}),H=this.file.getDescriptorRevisionId(f),E=this.file.getCurrentRevisionId();if(null!=u&&null!=p&&
-"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var F=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);q=null!=q?q:this.ui.getHashValueForPages(b);var d=this.objectToString(this.createMessage({patch:F,checksum:q}));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+
-"&from="+encodeURIComponent(H)+"&to="+encodeURIComponent(E)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(y)))+(null!=u?"&secret="+encodeURIComponent(u):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(d.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(d):"")+(null!=p?"&token="+encodeURIComponent(p):""),mxUtils.bind(this,function(n){window.clearTimeout(l);k&&(200<=n.getStatus()&&299>=n.getStatus()?(Editor.p2pSyncNotify&&this.notify(y),null!=g&&g()):c({message:mxResources.get("realtimeCollaboration")+
-(0!=n.getStatus()?": "+n.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",H,"to",E,"etag",this.file.getCurrentEtag(),"diff",F,d.length,"bytes","msg",y,"checksum",q)}else this.notify(y),null!=g&&g(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",H,"to",E,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};
+DrawioFileSync.prototype.fileSaved=function(b,f,k,c,p,q){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 u=this.file.getDescriptorSecret(this.file.getDescriptor()),z=this.createMessage({m:this.lastModified.getTime()}),G=this.file.getDescriptorRevisionId(f),E=this.file.getCurrentRevisionId();if(null!=u&&null!=p&&
+"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var F=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);q=null!=q?q:this.ui.getHashValueForPages(b);var d=this.objectToString(this.createMessage({patch:F,checksum:q}));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;var g=!0,l=window.setTimeout(mxUtils.bind(this,function(){g=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+
+"&from="+encodeURIComponent(G)+"&to="+encodeURIComponent(E)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(z)))+(null!=u?"&secret="+encodeURIComponent(u):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(d.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(d):"")+(null!=p?"&token="+encodeURIComponent(p):""),mxUtils.bind(this,function(n){window.clearTimeout(l);g&&(200<=n.getStatus()&&299>=n.getStatus()?(Editor.p2pSyncNotify&&this.notify(z),null!=k&&k()):c({message:mxResources.get("realtimeCollaboration")+
+(0!=n.getStatus()?": "+n.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",G,"to",E,"etag",this.file.getCurrentEtag(),"diff",F,d.length,"bytes","msg",z,"checksum",q)}else this.notify(z),null!=k&&k(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",G,"to",E,"etag",this.file.getCurrentEtag())}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,g){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,g):this.fileChanged(f,g)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=g&&g({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
+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?(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),EditorUi.debug("DrawioFileSync.stop",[this])):null!=this.polling&&(this.polling.stop(),
this.polling=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);this.notify(this.createMessage(f))}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"offline",this.onlineListener),mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.removeListener(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.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;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];function mxAsyncCanvas(b){mxAbstractCanvas2D.call(this);this.htmlCanvas=b;b.images=b.images||[];b.subCanvas=b.subCanvas||[]}mxUtils.extend(mxAsyncCanvas,mxAbstractCanvas2D);mxAsyncCanvas.prototype.htmlCanvas=null;mxAsyncCanvas.prototype.canvasIndex=0;mxAsyncCanvas.prototype.waitCounter=0;mxAsyncCanvas.prototype.onComplete=null;mxAsyncCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
-mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.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};mxAsyncCanvas.prototype.rotate=function(b,f,g,c,p){};
+mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.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};mxAsyncCanvas.prototype.rotate=function(b,f,k,c,p){};
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,f,g,c){};mxAsyncCanvas.prototype.roundrect=function(b,f,g,c,p,q){};mxAsyncCanvas.prototype.ellipse=function(b,f,g,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,f,g,c,p,q,u,y){p=this.rewriteImageSource(p);b=this.htmlCanvas.images[p];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[p]=b,b.src=p)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(b,f,g,c,p,q,u,y,H,E,F,d){if(null!=p&&0!=p.length&&(b=this.state.scale,"html"==H&&"function"===typeof html2canvas)){this.incWaitCounter();var k=this.canvasIndex++;html2canvas(p,{onrendered:mxUtils.bind(this,function(l){this.htmlCanvas.subCanvas[k]=l;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(f,g,c,p){return g+g+c+c+p+p});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++};
+mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,f,k,c){};mxAsyncCanvas.prototype.roundrect=function(b,f,k,c,p,q){};mxAsyncCanvas.prototype.ellipse=function(b,f,k,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,f,k,c,p,q,u,z){p=this.rewriteImageSource(p);b=this.htmlCanvas.images[p];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[p]=b,b.src=p)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
+mxAsyncCanvas.prototype.text=function(b,f,k,c,p,q,u,z,G,E,F,d){if(null!=p&&0!=p.length&&(b=this.state.scale,"html"==G&&"function"===typeof html2canvas)){this.incWaitCounter();var g=this.canvasIndex++;html2canvas(p,{onrendered:mxUtils.bind(this,function(l){this.htmlCanvas.subCanvas[g]=l;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(f,k,c,p){return k+k+c+c+p+p});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,f){this.state.dx+=b;this.state.dy+=f;this.ctx.translate(b,f)};
-mxJsCanvas.prototype.rotate=function(b,f,g,c,p){c-=this.state.dx;p-=this.state.dy;this.ctx.translate(c,p);(f||g)&&this.ctx.scale(f?-1:1,g?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-p)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};
-mxJsCanvas.prototype.setGradient=function(b,f,g,c,p,q,u,y,H){g=this.ctx.createLinearGradient(0,c,0,c+q);c=this.state;c.fillColor=b;c.fillAlpha=null!=y?y:1;c.gradientColor=f;c.gradientAlpha=null!=H?H:1;c.gradientDirection=u;b=this.hexToRgb(b);f=this.hexToRgb(f);null!=b&&g.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=f&&g.addColorStop(1,"rgba("+f.r+","+f.g+","+f.b+","+c.gradientAlpha+")");this.ctx.fillStyle=g};
+mxJsCanvas.prototype.rotate=function(b,f,k,c,p){c-=this.state.dx;p-=this.state.dy;this.ctx.translate(c,p);(f||k)&&this.ctx.scale(f?-1:1,k?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-p)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};
+mxJsCanvas.prototype.setGradient=function(b,f,k,c,p,q,u,z,G){k=this.ctx.createLinearGradient(0,c,0,c+q);c=this.state;c.fillColor=b;c.fillAlpha=null!=z?z:1;c.gradientColor=f;c.gradientAlpha=null!=G?G:1;c.gradientDirection=u;b=this.hexToRgb(b);f=this.hexToRgb(f);null!=b&&k.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=f&&k.addColorStop(1,"rgba("+f.r+","+f.g+","+f.b+","+c.gradientAlpha+")");this.ctx.fillStyle=k};
mxJsCanvas.prototype.setStrokeColor=function(b){null!=b&&(b==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=b,this.state.strokeColor=b))};mxJsCanvas.prototype.setStrokeWidth=function(b){this.ctx.lineWidth=b};mxJsCanvas.prototype.setDashed=function(b){if(this.state.dashed=b){b=this.state.dashPattern.split(" ");for(var f=0;f<b.length;f++)b[f]=parseInt(b[f],10);this.setLineDash(b)}else this.setLineDash([0])};
mxJsCanvas.prototype.setLineDash=function(b){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(b)}catch(f){}};mxJsCanvas.prototype.setDashPattern=function(b){this.state.dashPattern=b;if(this.state.dashed){b=b.split(" ");for(var f=0;f<b.length;f++)b[f]=parseInt(b[f],10);this.ctx.setLineDash(b)}};mxJsCanvas.prototype.setLineCap=function(b){this.ctx.lineCap=b};mxJsCanvas.prototype.setLineJoin=function(b){this.ctx.lineJoin=b};
mxJsCanvas.prototype.setMiterLimit=function(b){this.ctx.lineJoin=b};mxJsCanvas.prototype.setFontColor=function(b){this.ctx.fillStyle=b};mxJsCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxJsCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxJsCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
mxJsCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxJsCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxJsCanvas.prototype.setShadow=function(b){(this.state.shadow=b)?(this.setShadowOffset(this.state.shadowDx,this.state.shadowDy),this.setShadowAlpha(this.state.shadowAlpha)):(this.ctx.shadowColor="transparent",this.ctx.shadowBlur=0,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0)};
mxJsCanvas.prototype.setShadowColor=function(b){if(null==b||b==mxConstants.NONE)b=null,this.ctx.shadowColor="transparent";this.state.shadowColor=b;if(this.state.shadow&&null!=b){var f=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;b=this.hexToRgb(b);this.ctx.shadowColor="rgba("+b.r+","+b.g+","+b.b+","+f+")"}};mxJsCanvas.prototype.setShadowAlpha=function(b){this.state.shadowAlpha=b;this.setShadowColor(this.state.shadowColor)};
-mxJsCanvas.prototype.setShadowOffset=function(b,f){this.state.shadowDx=b;this.state.shadowDy=f;this.state.shadow&&(this.ctx.shadowOffsetX=b,this.ctx.shadowOffsetY=f)};mxJsCanvas.prototype.moveTo=function(b,f){this.ctx.moveTo(b,f);this.lastMoveX=b;this.lastMoveY=f};mxJsCanvas.prototype.lineTo=function(b,f){this.ctx.lineTo(b,f);this.lastMoveX=b;this.lastMoveY=f};mxJsCanvas.prototype.quadTo=function(b,f,g,c){this.ctx.quadraticCurveTo(b,f,g,c);this.lastMoveX=g;this.lastMoveY=c};
-mxJsCanvas.prototype.arcTo=function(b,f,g,c,p,q,u){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,f,g,c,p,q,u);if(null!=b)for(f=0;f<b.length;f+=6)this.curveTo(b[f],b[f+1],b[f+2],b[f+3],b[f+4],b[f+5])};mxJsCanvas.prototype.curveTo=function(b,f,g,c,p,q){this.ctx.bezierCurveTo(b,f,g,c,p,q);this.lastMoveX=p;this.lastMoveY=q};mxJsCanvas.prototype.rect=function(b,f,g,c){this.begin();this.moveTo(b,f);this.lineTo(b+g,f);this.lineTo(b+g,f+c);this.lineTo(b,f+c);this.close()};
-mxJsCanvas.prototype.roundrect=function(b,f,g,c,p,q){this.begin();this.moveTo(b+p,f);this.lineTo(b+g-p,f);this.quadTo(b+g,f,b+g,f+q);this.lineTo(b+g,f+c-q);this.quadTo(b+g,f+c,b+g-p,f+c);this.lineTo(b+p,f+c);this.quadTo(b,f+c,b,f+c-q);this.lineTo(b,f+q);this.quadTo(b,f,b+p,f)};mxJsCanvas.prototype.ellipse=function(b,f,g,c){this.ctx.save();this.ctx.translate(b+g/2,f+c/2);this.ctx.scale(g/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
+mxJsCanvas.prototype.setShadowOffset=function(b,f){this.state.shadowDx=b;this.state.shadowDy=f;this.state.shadow&&(this.ctx.shadowOffsetX=b,this.ctx.shadowOffsetY=f)};mxJsCanvas.prototype.moveTo=function(b,f){this.ctx.moveTo(b,f);this.lastMoveX=b;this.lastMoveY=f};mxJsCanvas.prototype.lineTo=function(b,f){this.ctx.lineTo(b,f);this.lastMoveX=b;this.lastMoveY=f};mxJsCanvas.prototype.quadTo=function(b,f,k,c){this.ctx.quadraticCurveTo(b,f,k,c);this.lastMoveX=k;this.lastMoveY=c};
+mxJsCanvas.prototype.arcTo=function(b,f,k,c,p,q,u){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,f,k,c,p,q,u);if(null!=b)for(f=0;f<b.length;f+=6)this.curveTo(b[f],b[f+1],b[f+2],b[f+3],b[f+4],b[f+5])};mxJsCanvas.prototype.curveTo=function(b,f,k,c,p,q){this.ctx.bezierCurveTo(b,f,k,c,p,q);this.lastMoveX=p;this.lastMoveY=q};mxJsCanvas.prototype.rect=function(b,f,k,c){this.begin();this.moveTo(b,f);this.lineTo(b+k,f);this.lineTo(b+k,f+c);this.lineTo(b,f+c);this.close()};
+mxJsCanvas.prototype.roundrect=function(b,f,k,c,p,q){this.begin();this.moveTo(b+p,f);this.lineTo(b+k-p,f);this.quadTo(b+k,f,b+k,f+q);this.lineTo(b+k,f+c-q);this.quadTo(b+k,f+c,b+k-p,f+c);this.lineTo(b+p,f+c);this.quadTo(b,f+c,b,f+c-q);this.lineTo(b,f+q);this.quadTo(b,f,b+p,f)};mxJsCanvas.prototype.ellipse=function(b,f,k,c){this.ctx.save();this.ctx.translate(b+k/2,f+c/2);this.ctx.scale(k/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
-mxJsCanvas.prototype.image=function(b,f,g,c,p,q,u,y){p=this.rewriteImageSource(p);p=this.images[p];if(null!=p&&0<p.height&&0<p.width){var H=this.ctx;H.save();if(q){q=p.width;var E=p.height,F=Math.min(g/q,c/E);b+=(g-q*F)/2;f+=(c-E*F)/2;g=q*F;c=E*F}u&&(H.translate(2*b+g,0),H.scale(-1,1));y&&(H.translate(0,2*f+c),H.scale(1,-1));H.drawImage(p,b,f,g,c);H.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
-mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var b=this.ctx.shadowColor,f=this.ctx.shadowOffsetX,g=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=b;this.ctx.shadowOffsetX=f;this.ctx.shadowOffsetY=g}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(b,f,g,c,p,q,u,y,H,E,F,d){if(null!=p&&0!=p.length){g=this.state.scale;0!=d&&(this.ctx.translate(Math.round(b),Math.round(f)),this.ctx.rotate(d*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-f)));if("html"==H){p=this.subCanvas[this.canvasIndex++];H=p.height;d=p.width;switch(u){case mxConstants.ALIGN_MIDDLE:f-=H/2/g;break;case mxConstants.ALIGN_BOTTOM:f-=H/g}switch(q){case mxConstants.ALIGN_CENTER:b-=d/2/g;break;case mxConstants.ALIGN_RIGHT:b-=d/g}this.ctx.save();
-if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(f)-.5,Math.round(p.width/g),Math.round(p.height/g))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(f)-.5,Math.round(p.width/g),Math.round(p.height/g)));this.ctx.scale(1/g,1/g);this.ctx.drawImage(p,
-Math.round(b*g),Math.round(f*g))}else{this.ctx.save();this.updateFont();d=document.createElement("div");d.innerHTML=p;d.style.position="absolute";d.style.top="-9999px";d.style.left="-9999px";d.style.fontFamily=this.state.fontFamily;d.style.fontWeight="bold";d.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(d);H=[d.offsetWidth,d.offsetHeight];document.body.removeChild(d);p=p.split("\n");d=H[1];this.ctx.textBaseline="top";H=f;switch(u){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";f-=(p.length-1)*d/2;H=f-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",f-=d*(p.length-1),H=f-this.state.fontSize}u=[];d=[];for(g=0;g<p.length;g++)d[g]=b,u[g]=this.ctx.measureText(p[g]).width,null!=q&&q!=mxConstants.ALIGN_LEFT&&(d[g]-=u[g],q==mxConstants.ALIGN_CENTER&&(d[g]+=u[g]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=d[0];q=u[0];for(g=1;g<p.length;g++)b=Math.min(b,d[g]),q=Math.max(q,u[g]);this.ctx.save();
-b=Math.round(b)-.5;H=Math.round(H)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,H,q,this.state.fontSize*mxConstants.LINE_HEIGHT*p.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,H,q,this.state.fontSize*mxConstants.LINE_HEIGHT*p.length));this.ctx.restore()}for(g=0;g<p.length;g++)this.ctx.fillText(p[g],d[g],f),f+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+mxJsCanvas.prototype.image=function(b,f,k,c,p,q,u,z){p=this.rewriteImageSource(p);p=this.images[p];if(null!=p&&0<p.height&&0<p.width){var G=this.ctx;G.save();if(q){q=p.width;var E=p.height,F=Math.min(k/q,c/E);b+=(k-q*F)/2;f+=(c-E*F)/2;k=q*F;c=E*F}u&&(G.translate(2*b+k,0),G.scale(-1,1));z&&(G.translate(0,2*f+c),G.scale(1,-1));G.drawImage(p,b,f,k,c);G.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var b=this.ctx.shadowColor,f=this.ctx.shadowOffsetX,k=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=b;this.ctx.shadowOffsetX=f;this.ctx.shadowOffsetY=k}else this.ctx.fill(),this.ctx.stroke()};
+mxJsCanvas.prototype.text=function(b,f,k,c,p,q,u,z,G,E,F,d){if(null!=p&&0!=p.length){k=this.state.scale;0!=d&&(this.ctx.translate(Math.round(b),Math.round(f)),this.ctx.rotate(d*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-f)));if("html"==G){p=this.subCanvas[this.canvasIndex++];G=p.height;d=p.width;switch(u){case mxConstants.ALIGN_MIDDLE:f-=G/2/k;break;case mxConstants.ALIGN_BOTTOM:f-=G/k}switch(q){case mxConstants.ALIGN_CENTER:b-=d/2/k;break;case mxConstants.ALIGN_RIGHT:b-=d/k}this.ctx.save();
+if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(f)-.5,Math.round(p.width/k),Math.round(p.height/k))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(f)-.5,Math.round(p.width/k),Math.round(p.height/k)));this.ctx.scale(1/k,1/k);this.ctx.drawImage(p,
+Math.round(b*k),Math.round(f*k))}else{this.ctx.save();this.updateFont();d=document.createElement("div");d.innerHTML=p;d.style.position="absolute";d.style.top="-9999px";d.style.left="-9999px";d.style.fontFamily=this.state.fontFamily;d.style.fontWeight="bold";d.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(d);G=[d.offsetWidth,d.offsetHeight];document.body.removeChild(d);p=p.split("\n");d=G[1];this.ctx.textBaseline="top";G=f;switch(u){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";f-=(p.length-1)*d/2;G=f-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",f-=d*(p.length-1),G=f-this.state.fontSize}u=[];d=[];for(k=0;k<p.length;k++)d[k]=b,u[k]=this.ctx.measureText(p[k]).width,null!=q&&q!=mxConstants.ALIGN_LEFT&&(d[k]-=u[k],q==mxConstants.ALIGN_CENTER&&(d[k]+=u[k]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=d[0];q=u[0];for(k=1;k<p.length;k++)b=Math.min(b,d[k]),q=Math.max(q,u[k]);this.ctx.save();
+b=Math.round(b)-.5;G=Math.round(G)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,G,q,this.state.fontSize*mxConstants.LINE_HEIGHT*p.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,G,q,this.state.fontSize*mxConstants.LINE_HEIGHT*p.length));this.ctx.restore()}for(k=0;k<p.length;k++)this.ctx.fillText(p[k],d[k],f),f+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};DrawioClient=function(b,f){mxEventSource.call(this);this.ui=b;this.cookieName=f;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(b){this.user=b;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName),sessionStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+b.toUTCString()}};
-DrawioClient.prototype.getPersistentToken=function(b){var f=null;isLocalStorage&&(f=localStorage.getItem("."+this.cookieName),null==f&&b&&(f=sessionStorage.getItem("."+this.cookieName)));if(null==f&&"undefined"!=typeof Storage){var g=document.cookie;b=this.cookieName+"=";var c=g.indexOf(b);0<=c&&(c+=b.length,f=g.indexOf(";",c),0>f?f=g.length:postCookie=g.substring(f),f=g.substring(c,f),f=0<f.length?f:null,null!=f&&isLocalStorage&&(g=new Date,g.setYear(g.getFullYear()-1),document.cookie=b+"; expires="+
-g.toUTCString(),localStorage.setItem("."+this.cookieName,f)))}return f};DrawioClient.prototype.setPersistentToken=function(b,f){try{if(null!=b)if(isLocalStorage)f?sessionStorage.setItem("."+this.cookieName,b):localStorage.setItem("."+this.cookieName,b);else{if("undefined"!=typeof Storage){var g=new Date;g.setYear(g.getFullYear()+10);var c=this.cookieName+"="+b+"; path=/"+(f?"":"; expires="+g.toUTCString());"https"==document.location.protocol.toLowerCase()&&(c+=";secure");document.cookie=c}}else this.clearPersistentToken()}catch(p){this.ui.handleError(p)}};DrawioUser=function(b,f,g,c,p){this.id=b;this.email=f;this.displayName=g;this.pictureUrl=c;this.locale=p};DriveFile=function(b,f,g){DrawioFile.call(this,b,f);this.desc=g};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return DrawioFile.RESTRICT_EXPORT||null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};
+DrawioClient.prototype.getPersistentToken=function(b){var f=null;isLocalStorage&&(f=localStorage.getItem("."+this.cookieName),null==f&&b&&(f=sessionStorage.getItem("."+this.cookieName)));if(null==f&&"undefined"!=typeof Storage){var k=document.cookie;b=this.cookieName+"=";var c=k.indexOf(b);0<=c&&(c+=b.length,f=k.indexOf(";",c),0>f?f=k.length:postCookie=k.substring(f),f=k.substring(c,f),f=0<f.length?f:null,null!=f&&isLocalStorage&&(k=new Date,k.setYear(k.getFullYear()-1),document.cookie=b+"; expires="+
+k.toUTCString(),localStorage.setItem("."+this.cookieName,f)))}return f};DrawioClient.prototype.setPersistentToken=function(b,f){try{if(null!=b)if(isLocalStorage)f?sessionStorage.setItem("."+this.cookieName,b):localStorage.setItem("."+this.cookieName,b);else{if("undefined"!=typeof Storage){var k=new Date;k.setYear(k.getFullYear()+10);var c=this.cookieName+"="+b+"; path=/"+(f?"":"; expires="+k.toUTCString());"https"==document.location.protocol.toLowerCase()&&(c+=";secure");document.cookie=c}}else this.clearPersistentToken()}catch(p){this.ui.handleError(p)}};DrawioUser=function(b,f,k,c,p){this.id=b;this.email=f;this.displayName=k;this.pictureUrl=c;this.locale=p};DriveFile=function(b,f,k){DrawioFile.call(this,b,f);this.desc=k};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return DrawioFile.RESTRICT_EXPORT||null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};
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.getFileUrl=function(){return"https://drive.google.com/open?authuser=0&id="+this.getId()};
DriveFile.prototype.getFolderUrl=function(){return null!=this.desc.labels&&this.desc.labels.trashed?"https://drive.google.com/drive/trash":null!=this.desc.parents&&0<this.desc.parents.length?"https://drive.google.com/drive/folders/"+this.desc.parents[0].id:null};
-DriveFile.prototype.getPublicUrl=function(b){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(f){if(null!=f&&null!=f.items)for(var g=0;g<f.items.length;g++)if("anyoneWithLink"===f.items[g].id||"anyone"===f.items[g].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,f,g,c,p){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,f,g,c,p)}),g,c,p])};
-DriveFile.prototype.saveFile=function(b,f,g,c,p,q){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(u,y){var H=mxUtils.bind(this,function(E,F){try{var d=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,F,mxUtils.bind(this,function(k,l,n,x){try{this.savingFile=!1,0!=k?(this.setModified(this.getShadowModified()),f&&(this.lastAutosaveRevision=(new Date).getTime()),
-this.autosaveDelay=Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=k,this.fileSaved(l,d,mxUtils.bind(this,function(){this.contentChanged();null!=g&&g(k)}),c,y,n,x)):null!=c&&c(k)}catch(A){if(this.savingFile=!1,null!=c)c(A);else throw A;}}),mxUtils.bind(this,function(k,l){try{this.savingFile=!1,this.isConflict(k)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(l,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
-function(){this.updateFileData();this.setShadowModified(!1);H(E,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(k)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}}),p,p,E,null,u)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}});H(q,f)}))):null!=g&&g()}catch(u){if(null!=c)c(u);else throw u;}};
-DriveFile.prototype.copyFile=function(b,f,g){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,f)}catch(c){f(c)}}),f,null!=g?g:this.ui.getCopyFilename(this,!0))};
-DriveFile.prototype.makeCopy=function(b,f,g){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(g,mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=f&&f()}))};DriveFile.prototype.saveAs=function(b,f,g){this.ui.drive.copyFile(this.getId(),b,f,g)};
-DriveFile.prototype.rename=function(b,f,g){var c=this.getCurrentRevisionId();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(p){this.hasSameExtension(b,this.getTitle())?(this.desc=p,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=f&&f(p)):(this.desc=p,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,f,g))}),g)};
-DriveFile.prototype.move=function(b,f,g){this.ui.drive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.desc=c;this.descriptorChanged();null!=f&&f(c)}),g)};DriveFile.prototype.share=function(){this.ui.drive.showPermissions(this.getId(),this)};DriveFile.prototype.getTitle=function(){return this.desc.title};DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id};
+DriveFile.prototype.getPublicUrl=function(b){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(f){if(null!=f&&null!=f.items)for(var k=0;k<f.items.length;k++)if("anyoneWithLink"===f.items[k].id||"anyone"===f.items[k].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,f,k,c,p){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,f,k,c,p)}),k,c,p])};
+DriveFile.prototype.saveFile=function(b,f,k,c,p,q){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(u,z){var G=mxUtils.bind(this,function(E,F){try{var d=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,F,mxUtils.bind(this,function(g,l,n,x){try{this.savingFile=!1,0!=g?(this.setModified(this.getShadowModified()),f&&(this.lastAutosaveRevision=(new Date).getTime()),
+this.autosaveDelay=Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=g,this.fileSaved(l,d,mxUtils.bind(this,function(){this.contentChanged();null!=k&&k(g)}),c,z,n,x)):null!=c&&c(g)}catch(A){if(this.savingFile=!1,null!=c)c(A);else throw A;}}),mxUtils.bind(this,function(g,l){try{this.savingFile=!1,this.isConflict(g)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(l,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
+function(){this.updateFileData();this.setShadowModified(!1);G(E,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(g)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}}),p,p,E,null,u)}catch(g){if(this.savingFile=!1,null!=c)c(g);else throw g;}});G(q,f)}))):null!=k&&k()}catch(u){if(null!=c)c(u);else throw u;}};
+DriveFile.prototype.copyFile=function(b,f,k){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,f)}catch(c){f(c)}}),f,null!=k?k:this.ui.getCopyFilename(this,!0))};
+DriveFile.prototype.makeCopy=function(b,f,k){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(k,mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=f&&f()}))};DriveFile.prototype.saveAs=function(b,f,k){this.ui.drive.copyFile(this.getId(),b,f,k)};
+DriveFile.prototype.rename=function(b,f,k){var c=this.getCurrentRevisionId();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(p){this.hasSameExtension(b,this.getTitle())?(this.desc=p,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=f&&f(p)):(this.desc=p,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,f,k))}),k)};
+DriveFile.prototype.move=function(b,f,k){this.ui.drive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.desc=c;this.descriptorChanged();null!=f&&f(c)}),k)};DriveFile.prototype.share=function(){this.ui.drive.showPermissions(this.getId(),this)};DriveFile.prototype.getTitle=function(){return this.desc.title};DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id};
DriveFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&this.desc.editable};DriveFile.prototype.isSyncSupported=function(){return!0};DriveFile.prototype.isRealtimeSupported=function(){return!0};DriveFile.prototype.isRealtimeOptional=function(){return null!=this.sync&&this.sync.isConnected()};
-DriveFile.prototype.setRealtimeEnabled=function(b,f,g){null!=this.sync?this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/properties?alt=json&supportsAllDrives=true",method:"POST",contentType:"application/json; charset=UTF-8",params:{key:"collaboration",value:b?"enabled":"0"!=urlParams["fast-sync"]?"disabled":""}},mxUtils.bind(this,function(){this.loadDescriptor(mxUtils.bind(this,function(c){null!=c?(this.sync.descriptorChanged(this.getCurrentEtag()),this.sync.updateDescriptor(c),f()):g()}),
-g)}),g):g()};DriveFile.prototype.isRealtimeEnabled=function(){var b=this.ui.drive.getCustomProperty(this.desc,"collaboration");return DrawioFile.prototype.isRealtimeEnabled.apply(this,arguments)&&"disabled"!=b||Editor.enableRealtime&&"enabled"==b};DriveFile.prototype.isRevisionHistorySupported=function(){return!0};
-DriveFile.prototype.getRevisions=function(b,f){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(g){for(var c=0;c<g.items.length;c++)mxUtils.bind(this,function(p){p.title=p.originalFilename;p.getXml=mxUtils.bind(this,function(q,u){this.ui.drive.getXmlFile(p,mxUtils.bind(this,function(y){q(y.getData())}),u)});p.getUrl=mxUtils.bind(this,function(q){return this.ui.getUrl(window.location.pathname+"?rev="+p.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=
-q?"&page="+q:""))+window.location.hash})})(g.items[c]);b(g.items)}),f)};DriveFile.prototype.getLatestVersion=function(b,f){this.ui.drive.getFile(this.getId(),b,f,!0)};DriveFile.prototype.getChannelId=function(){var b=this.ui.drive.getCustomProperty(this.desc,"channel");null!=b&&(b="G-"+this.getId()+"."+b);return b};DriveFile.prototype.getChannelKey=function(){return this.ui.drive.getCustomProperty(this.desc,"key")};DriveFile.prototype.getLastModifiedDate=function(){return new Date(this.desc.modifiedDate)};
-DriveFile.prototype.getDescriptor=function(){return this.desc};DriveFile.prototype.setDescriptor=function(b){this.desc=b};DriveFile.prototype.getDescriptorChecksum=function(b){var f=this.ui.drive.getCustomProperty(b,"checksum");b=this.getDescriptorSecret(b);var g=null;null!=f&&null!=b&&(tokens=f.split(":"),2==tokens.length&&tokens[0]==b&&(g=tokens[1]));return g};DriveFile.prototype.getDescriptorSecret=function(b){return this.ui.drive.getCustomProperty(b,"secret")};
-DriveFile.prototype.setDescriptorRevisionId=function(b,f){b.headRevisionId=f};DriveFile.prototype.getDescriptorRevisionId=function(b){return b.headRevisionId};DriveFile.prototype.getDescriptorEtag=function(b){return b.etag};DriveFile.prototype.setDescriptorEtag=function(b,f){b.etag=f};DriveFile.prototype.loadPatchDescriptor=function(b,f){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(g){b(g)}),f)};
+DriveFile.prototype.setRealtimeEnabled=function(b,f,k){null!=this.sync?this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/properties?alt=json&supportsAllDrives=true",method:"POST",contentType:"application/json; charset=UTF-8",params:{key:"collaboration",value:b?"enabled":"0"!=urlParams["fast-sync"]?"disabled":""}},mxUtils.bind(this,function(){this.loadDescriptor(mxUtils.bind(this,function(c){null!=c?(this.sync.descriptorChanged(this.getCurrentEtag()),this.sync.updateDescriptor(c),f()):k()}),
+k)}),k):k()};DriveFile.prototype.isRealtimeEnabled=function(){var b=this.ui.drive.getCustomProperty(this.desc,"collaboration");return DrawioFile.prototype.isRealtimeEnabled.apply(this,arguments)&&"disabled"!=b||Editor.enableRealtime&&"enabled"==b};DriveFile.prototype.isRevisionHistorySupported=function(){return!0};
+DriveFile.prototype.getRevisions=function(b,f){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(k){for(var c=0;c<k.items.length;c++)mxUtils.bind(this,function(p){p.title=p.originalFilename;p.getXml=mxUtils.bind(this,function(q,u){this.ui.drive.getXmlFile(p,mxUtils.bind(this,function(z){q(z.getData())}),u)});p.getUrl=mxUtils.bind(this,function(q){return this.ui.getUrl(window.location.pathname+"?rev="+p.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=
+q?"&page="+q:""))+window.location.hash})})(k.items[c]);b(k.items)}),f)};DriveFile.prototype.getLatestVersion=function(b,f){this.ui.drive.getFile(this.getId(),b,f,!0)};DriveFile.prototype.getChannelId=function(){var b=this.ui.drive.getCustomProperty(this.desc,"channel");null!=b&&(b="G-"+this.getId()+"."+b);return b};DriveFile.prototype.getChannelKey=function(){return this.ui.drive.getCustomProperty(this.desc,"key")};DriveFile.prototype.getLastModifiedDate=function(){return new Date(this.desc.modifiedDate)};
+DriveFile.prototype.getDescriptor=function(){return this.desc};DriveFile.prototype.setDescriptor=function(b){this.desc=b};DriveFile.prototype.getDescriptorChecksum=function(b){var f=this.ui.drive.getCustomProperty(b,"checksum");b=this.getDescriptorSecret(b);var k=null;null!=f&&null!=b&&(tokens=f.split(":"),2==tokens.length&&tokens[0]==b&&(k=tokens[1]));return k};DriveFile.prototype.getDescriptorSecret=function(b){return this.ui.drive.getCustomProperty(b,"secret")};
+DriveFile.prototype.setDescriptorRevisionId=function(b,f){b.headRevisionId=f};DriveFile.prototype.getDescriptorRevisionId=function(b){return b.headRevisionId};DriveFile.prototype.getDescriptorEtag=function(b){return b.etag};DriveFile.prototype.setDescriptorEtag=function(b,f){b.etag=f};DriveFile.prototype.loadPatchDescriptor=function(b,f){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(k){b(k)}),f)};
DriveFile.prototype.patchDescriptor=function(b,f){b.headRevisionId=f.headRevisionId;b.modifiedDate=f.modifiedDate;DrawioFile.prototype.patchDescriptor.apply(this,arguments)};DriveFile.prototype.loadDescriptor=function(b,f){this.ui.drive.loadDescriptor(this.getId(),b,f)};DriveFile.prototype.commentsSupported=function(){return!0};
-DriveFile.prototype.getComments=function(b,f){function g(p,q,u){if(q.deleted)return null;u=new DriveComment(p,q.commentId||q.replyId,q.content,q.modifiedDate,q.createdDate,"resolved"==q.status,q.author.isAuthenticatedUser?c:new DrawioUser(q.author.permissionId,q.author.emailAddress,q.author.displayName,q.author.picture.url),u);for(var y=0;null!=q.replies&&y<q.replies.length;y++)u.addReplyDirect(g(p,q.replies[y],q.commentId));return u}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
-this.getId()+"/comments"},mxUtils.bind(this,function(p){for(var q=[],u=0;u<p.items.length;u++){var y=g(this,p.items[u]);null!=y&&q.push(y)}b(q)}),f)};DriveFile.prototype.addComment=function(b,f,g){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(c){f(c.commentId)}),g)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
-DriveFile.prototype.newComment=function(b,f){return new DriveComment(this,null,b,Date.now(),Date.now(),!1,f)};DriveLibrary=function(b,f,g){DriveFile.call(this,b,f,g)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(b,f,g){this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(c){this.desc=c;null!=f&&f(c)}),g)};DriveLibrary.prototype.open=function(){};(function(){var b=null,f={};window.DriveClient=function(g,c){null==c&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(c=!0);mxEventSource.call(this);DrawioClient.call(this,g,"gDriveAuthInfo");this.isExtAuth=c;this.ui=g;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt&&"1"!=urlParams.extAuth&&(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken());
-this.appId=window.DRAWIO_GOOGLE_APP_ID||"671128082532";this.clientId=window.DRAWIO_GOOGLE_CLIENT_ID||"671128082532-jhphbq6d0e1gnsus9mn7vf8a6fjn10mp.apps.googleusercontent.com";this.mimeTypes=this.xmlMimeType+",application/mxe,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy";g=JSON.parse(this.token);null!=g&&null!=g.current&&(this.userId=g.current.userId,this.authCalled=!1)};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);
+DriveFile.prototype.getComments=function(b,f){function k(p,q,u){if(q.deleted)return null;u=new DriveComment(p,q.commentId||q.replyId,q.content,q.modifiedDate,q.createdDate,"resolved"==q.status,q.author.isAuthenticatedUser?c:new DrawioUser(q.author.permissionId,q.author.emailAddress,q.author.displayName,q.author.picture.url),u);for(var z=0;null!=q.replies&&z<q.replies.length;z++)u.addReplyDirect(k(p,q.replies[z],q.commentId));return u}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
+this.getId()+"/comments"},mxUtils.bind(this,function(p){for(var q=[],u=0;u<p.items.length;u++){var z=k(this,p.items[u]);null!=z&&q.push(z)}b(q)}),f)};DriveFile.prototype.addComment=function(b,f,k){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(c){f(c.commentId)}),k)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
+DriveFile.prototype.newComment=function(b,f){return new DriveComment(this,null,b,Date.now(),Date.now(),!1,f)};DriveLibrary=function(b,f,k){DriveFile.call(this,b,f,k)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(b,f,k){this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(c){this.desc=c;null!=f&&f(c)}),k)};DriveLibrary.prototype.open=function(){};(function(){var b=null,f={};window.DriveClient=function(k,c){null==c&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(c=!0);mxEventSource.call(this);DrawioClient.call(this,k,"gDriveAuthInfo");this.isExtAuth=c;this.ui=k;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt&&"1"!=urlParams.extAuth&&(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken());
+this.appId=window.DRAWIO_GOOGLE_APP_ID||"671128082532";this.clientId=window.DRAWIO_GOOGLE_CLIENT_ID||"671128082532-jhphbq6d0e1gnsus9mn7vf8a6fjn10mp.apps.googleusercontent.com";this.mimeTypes=this.xmlMimeType+",application/mxe,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy";k=JSON.parse(this.token);null!=k&&null!=k.current&&(this.userId=k.current.userId,this.authCalled=!1)};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);
DriveClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"google";DriveClient.prototype.GDriveBaseUrl="https://www.googleapis.com/drive/v2";DriveClient.prototype.scopes=["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/userinfo.profile"];DriveClient.prototype.allFields="kind,id,parents,headRevisionId,etag,title,mimeType,modifiedDate,editable,copyable,canComment,labels,properties,downloadUrl,webContentLink,userPermission,fileSize";
DriveClient.prototype.catchupFields="etag,headRevisionId,modifiedDate,properties(key,value)";DriveClient.prototype.enableThumbnails=!0;DriveClient.prototype.thumbnailWidth=1E3;DriveClient.prototype.maxThumbnailSize=2E6;DriveClient.prototype.placeholderThumbnail="iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAACN1BMVEXwhwXvhgX4iwXzhwXgbQzvhgXhbAzocgzqcwzldAoAAADhbgvjcQnmdgrlbgDwhgXsfwXufgjwhgXwgQfziAXxgADibgz4iwX4jAX3iwTpcwr1igXoewjsfgj3igX4iwXqcQv4jAX3iwXtfQnndQrvhAbibArwhwXgbQz//////v39jwX6jQX+/v7fagHfawzdVQDwhADgbhPgbhXwhwPocQ3uvKvwiA/faQDscgzxiAT97+XgciTgcSP6jAXgbQ3gcCHwiRfpcQzwhwfeXQD77ef74NLvhgTvegD66uPgbAf66+TvfADwjCzgcCfwiSD67ObhcjjwiBHhczvwiyrgbxj///777ujgcSHgcB/xiRzgbhveWgDeVwDhdEDgbRDqfgffYgDfXwD97+bvfQDxiz7//vvwiRr118rrcgztggbfZgDfZAD++PT98+3gbBPsgAb99vD33tPgcB7icAvuhAX//Pn66N/00sTyy7vuuqbjekLwhwzkcgr88er449n++vfutp/kh1vgcBvhbwvmdwnwgwDwgADeWQD87eLxxrTssJjqpIf0roHmjWTkhFP759n63czvvanomnjnlHDhczD22cr4y6/wwa/3xKX2wJ3rqpH0tY7qp4vpnoDymlbjf0vxjjntcwzldAroegj/kgX12s7518PzqnnnkWfynmLieUjpewjrdAD40Lj1uZTzpm3idTbiciLydQzzfwnyiQTsfgD3xqnzp3TxlkzgbCrdTwDdSwBLKUlNAAAAJ3RSTlP8/b2X/YH8wb+FAIuIggJbQin5opAM9+a/ubaubyD78NjSyr2WgRp4sjN4AAAI70lEQVR42u2cZ38SQRDGT8WGvfde4E4BxVMRRaKiUURRlJhQRDCCSgQVO/bee++9994+nMt5ywoezFJd/fm8uITi3p9n5mbYkcCpO6rVnVu2YEXd+3dRIySuo7pLv4GjGNKg7j3UHTl1l14PajmG9OFBnx7Ird4PumpYEtf1QXc112l0M7OGKXEfeg3guo3iNIyJG92Jaz61mYYxcaNacs1H/8f6j6X5j1WI/mMVIsawRFEzI49SjwOqAJa43emclk8Rp2c7AFZ+LDGyvXE2kmO2Q1Lq17RSd6ND48QIwFVuLNHTOPbEpTOz8ujMpccHGz0AV5mxIo4TpwUeUPj0YwfAVVYs0Tn7VZjnBUA8v+n6CyfERY8FR/DEJj7MQ6oL85vOvfDUAsuVC8s19s5yXuAppOPnvPk4EeSCsehCeBVTwVzHfE6RcFUQa4an8Qw91kpbw2oz4aoc1sSxniO0WAI/J24wriabmEpizZtM79bc+fr4/tUarEpiLabGElJYRsOGjbJfjGDpJCxtmosRLOEnVpqLESzZLYlLg65H1rAkLo2GESwcROwXI1jELcS1Y6OGQSzEVaupZQJLDiLhYtCtFBcbbslYhOueqKllDwtzwVhTq4RFuBh0C3EdEBl0C3OBWNUrEISLvSD+5GLQLYmLoSqfwcUiFuaqzhYDxiJc981lxqqdVsCGbHPcQLBgrtK3rwLt9tWqhblKxxI9hW3267U5ZHhuBrCKzXl4NIJTS5FrmbmMWGIEDZIouOp0/O6boYQ2jxBXWcdu13fzRILuF/2Ku+aGr96uBbhALHo5Z38+XcfXyVRZVx/+Ed513ldDCCCu0rFE0Xlo2mu5TAj8ki0XV0q6ePHilhi+d/15b9ACQGGusg3AFzc+XSMBCPzu89+CNlnB7zfD8t1z4iaLXUvDVT6sGdMOnv5pi47f6r9Qk9YF3xZ0l8S11UfMArlgLMpZM6bamYy6rWnta9q7TrZrzZPgPgoqg3atubY8WK6D8lQXHfb4p/wSK7vFfxmxSsAPQ96AlZ4LxoLNeompdkUDGQVznL5mLr4ar5ESD3PBWHA9fbpbjlT4pq1Bm6H6w9dwfOd69ePouNDYt3S3ULPGZ96S3YqtAW/Tepz1E8bgAANc+xEXhAX36ut1cslcd6rJq81SIvgEe7lmL3kY5iqxVYvOI9isswp22KeMOcrriJlWai5giwHl+yec73Ma9Mbfz+qOJndKz6hLpR5V1uPxavFuTTt0K1XfpbNeO0wKeUaR2IPBN5sMRlqu1eY8bsFmPeIFUpi0CjIGTLvSZY2EGeYSi3VL9Dgeb0I+SQl9MlcZT4TObZKzfmfS5NZSx1GsLQ5r+8Sxp7ERR/1TtDlUn2qNuGXCrZGM5URlLDiEVzDVkje5fdjXdDsm27XpXChBz4XG0UpYcDOMYaxjGc3wtyJxFtu1PohaI71f2K2imqEONcN4nrMZ9TWbMf81wg9z3VNwC26Gr3enY4ObobLqbccFefuz5AKONpVfzQp2y3NoVvrN32GLNl9orA22lTiM+Nqg5CJY1DueOjkwsdtNgAP7gidR2SWVhFqt3o9QwoKHIuiwDcwX+xT/UWztSlvCaqXGmtQBY1GadQmfh6anuE0XlkhhRFs3tGGkd+tuIVhiJN0M+brj0mlAu46lX0bcbizVLbgZrgwl4JhYA+NQa9TJQUetsSJYHscJvAVct7eJKoUbQudxPYmdirqzsYsIojhjoitD01yadH287J+vpZF1/uGt2K4ttinjshQo2C2XMzI2U64X6WY4tyZq99a7wZS3eA3BpNyrUPn1x00Z0uM1ACzilOfg7EN3VmRo8dN16WYYerYw6G9qCOSDCjQ0jQkufRbalt65LVyapaA/2mClxhK3Rxy3rsyavDxDR/DL5sMLFiyYu/7sXps7z8VldPv2Xl6PnjlTwOOuJQuytH7CXpvXCOQWoZrYeHWd4nw2Q+v22OLGnFSG0Nk1PCi0xjgjpVvTGi8hht9F+ARBGq8dtXmtOSLoDm1FhUSHnihkTecESalHkPAaWVhtFbA8jqvQGBmbt8fWkKtNn0Xw9GvAWK6DX9bBVHjzqtyvvcG9a+jXyC5oKoKV/a4YFG7Yij2ofszlgtaA3ZoRwW+pIOH3w0qZFURNh3oNtKsDsAr9LNvMC0pj93H6hTPpX9ocg8FIgTVvcgFYC03jFLBMi6ix0MDAoi8/lh7Cgt2q0VfNrSX0ayhjTa2IW0tKdotNrMq4NbPkILKZW+xdiSoGgshogfh7Ul7FcIEoFevfrPLC3+XWf6y/CEvHZoFQqlts9sQigqjLxFpQCJauakFcsqhKPXH79rGb6bE2B5Qmu0b91zn0WJtN8Wys9tgtIqfjEf2SWw7XKI8gHuKQ0X0eDsQSI44TaGBN6dYN5dlI/eFj9I7f8GWtoUJYOIgkiq6Ds/gw5T7dZDUqTrfscbLbB9eIB7JmEKsUgiii/4uO8ToBfJlhfif5tEGWEsGTMT4Mr6HDa0BBlP5Y88lcnkdkCtLhnyjMM0+Gcn2WzW6xnd/J8zn+LZq4SUeEvUBaA8LCs6Tk1p1AetXt3JoMWexWZSyr3RK6vSUGrRHbmkRUVgCLpP1HW/L4tgl5tO140mdKKFFhrkTUdxta4xleA8DCXC6n/vCYvPJFa9zAWL4m6qNaA8IiqjW73lreWnJrSj0AJYFZpvwq6RZRzjVUGEtB5tX7DdoqCXaL+PXHuEjdYsuvVqva4Sqv6NdabdW4YLeIKsoFYzHGhYPIGBd2izGuVpPaSVgAV7VEsOQgsuUXdosxLuwWxLVMW0WRK5ExLiiIpN4vq2YYVTiIbPmFgii5xRiXimCBqmIcVSS3WMqvdMqz5VcKqzdKeca4UrnVT/ryR6bi2Opuf64TwYJlfl4FLqu2Zxeux5BRXZnisvZ8103NqTtzoziuGa24+wZVRdVK9W7wyNSX1nYeOmrU6JSmjp6KhH5BR+kGvk++Ld0c/X66rPH4SEQeGl+kpq8a33eAumPqK347durWpzm9hrWhUevi1Hd4ZzVC+gGMHY0TYnDOYwAAAABJRU5ErkJggg==".replace(/\+/g,
"-").replace(/\//g,"_");DriveClient.prototype.placeholderMimeType="image/png";DriveClient.prototype.libraryMimeType="application/vnd.jgraph.mxlibrary";DriveClient.prototype.newAppHostname="app.diagrams.net";DriveClient.prototype.extension=".drawio";DriveClient.prototype.tokenRefreshInterval=0;DriveClient.prototype.lastTokenRefresh=0;DriveClient.prototype.maxRetries=5;DriveClient.prototype.staleEtagMaxRetries=4;DriveClient.prototype.coolOff=1E3;DriveClient.prototype.mimeTypeCheckCoolOff=6E4;DriveClient.prototype.user=
-null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedirectUrl=null;DriveClient.prototype.setUser=function(g){this.user=g;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=g.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(g){this.userId=g;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser=
-function(){return this.user};DriveClient.prototype.getUsersList=function(){var g=[],c=JSON.parse(this.getPersistentToken(!0)),p=null;if(null!=c){null!=c.current&&(p=c.current.userId,g.push(c[p].user),g[0].isCurrent=!0);for(var q in c)"current"!=q&&q!=p&&g.push(c[q].user)}return g};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();
-this.setUser(null);b=null};DriveClient.prototype.execute=function(g){var c=mxUtils.bind(this,function(p){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(q,u){this.authorize(!1,mxUtils.bind(this,function(){null!=u&&u();g()}),mxUtils.bind(this,function(y){var H=null!=y.message?y.message:mxResources.get("cannotLogin");null!=y&&null!=y.error&&403==y.error.code&&null!=y.error.data&&0<y.error.data.length&&"domainPolicy"==y.error.data[0].reason&&(H=y.error.message);this.logout();this.ui.showError(mxResources.get("error"),
-H,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),q)}))});this.authorize(!0,g,c)};DriveClient.prototype.executeRequest=function(g,c,p){try{var q=!0,u=null,y=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var H=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=g;null!=u&&window.clearTimeout(u);u=window.setTimeout(mxUtils.bind(this,
-function(){q=!1;null!=p&&p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:H})}),this.ui.timeout);var E=null,F=!1;"string"===typeof g.params?E=g.params:null!=g.params&&(E=JSON.stringify(g.params),F=!0);var d=g.fullUrl||this.GDriveBaseUrl+g.url;F&&(d+=(0<d.indexOf("?")?"&":"?")+"alt=json");var k=new mxXmlRequest(d,E,g.method||"GET");k.setRequestHeaders=mxUtils.bind(this,function(l,n){if(null!=g.headers)for(var x in g.headers)l.setRequestHeader(x,g.headers[x]);else null!=g.contentType?
-l.setRequestHeader("Content-Type",g.contentType):F&&l.setRequestHeader("Content-Type","application/json");l.setRequestHeader("Authorization","Bearer "+b)});k.send(mxUtils.bind(this,function(l){try{if(window.clearTimeout(u),q){try{var n=JSON.parse(l.getText())}catch(B){n=null}if(200<=l.getStatus()&&299>=l.getStatus())null!=c&&c(n);else{var x=null!=n&&null!=n.error?null!=n.error.data?n.error.data:n.error.errors:null,A=null!=x&&0<x.length?x[0].reason:null;null==p||null==n||null==n.error||-1!=n.error.code&&
-(403!=n.error.code||"domainPolicy"!=A&&"The requested mime type change is forbidden."!=n.error.message)?null!=n&&null!=n.error&&(401==n.error.code||403==n.error.code&&"rateLimitExceeded"!=A)?403==n.error.code&&this.retryAuth||401==n.error.code&&this.retryAuth&&"authError"==A?(null!=p&&p(n),this.retryAuth=!1):(this.retryAuth=!0,this.execute(H)):null!=n&&null!=n.error&&412!=n.error.code&&404!=n.error.code&&400!=n.error.code&&this.currentRequest==g&&y<this.maxRetries?(y++,this.requestThread=window.setTimeout(H,
-Math.round(Math.pow(2,y)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=p&&p(n):p(n)}}}catch(B){if(null!=p)p(B);else throw B;}}))}catch(l){if(null!=p)p(l);else throw l;}});null!=b&&this.authCalled?H():this.execute(H)}catch(E){if(null!=p)p(E);else throw E;}};DriveClient.prototype.createAuthWin=function(g){return window.open(g?g:"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(g,c,p,q,u){this.isExtAuth&&!g?window.parent.driveAuth(mxUtils.bind(this,function(y){this.updateAuthInfo(y,!0,!0,c,p)}),p):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(y){200<=y.getStatus()&&299>=y.getStatus()?this.authorizeStep2(y.getText(),g,c,p,q,u):null!=p&&p(y)}),p)};DriveClient.prototype.updateAuthInfo=function(g,c,p,q,u){b=g.access_token;delete g.access_token;g.expires=Date.now()+1E3*parseInt(g.expires_in);
-g.remember=c;this.resetTokenRefresh(g);this.authCalled=!0;if(p||null==this.user){var y=JSON.stringify(g);this.updateUser(mxUtils.bind(this,function(){var H=JSON.parse(y);this.setPersistentToken(H,!c);null!=q&&q()}),u)}else null!=q&&(this.setPersistentToken(g,!c),q())};DriveClient.prototype.authorizeStep2=function(g,c,p,q,u,y){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 H=
-JSON.parse(this.getPersistentToken(!0));H&&null!=H.current&&(this.userId=H.current.userId)}if(c&&null==this.userId)null!=q&&q();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+g)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(F){try{if(200<=F.getStatus()&&299>=F.getStatus()){var d=JSON.parse(F.getText());this.updateAuthInfo(d,!0,!1,p,q)}else 0!=F.getStatus()&&this.logout(),null!=q&&q(F)}catch(k){if(null!=
-window.console&&console.log("DriveClient.authorizeStep2",k),null!=q)q(k);else throw k;}}),q);else{var E="https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(u?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+g+(this.sameWinRedirectUrl?
-"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(E),y=null):null==y?y=this.createAuthWin(E):y.location=E;null!=y?(window.onGoogleDriveCallback=mxUtils.bind(this,function(F,d){window.onGoogleDriveCallback=null;try{null==F?null!=q&&q({message:mxResources.get("accessDenied")}):this.updateAuthInfo(F,u,!0,p,q)}catch(k){null!=q&&q(k)}finally{null!=d&&d.close()}}),y.focus()):null!=q&&q({message:mxResources.get("allowPopups")})}}catch(F){if(null!=q)q(F);else throw F;
-}};DriveClient.prototype.resetTokenRefresh=function(g){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);null!=g&&null==g.error&&0<g.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(g.expires_in),this.lastTokenRefresh=Date.now(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*g.expires_in))};DriveClient.prototype.checkToken=function(g){var c=
-0<this.lastTokenRefresh;Date.now()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){g();c&&this.fireEvent(new mxEventObject("disconnected"))})):g()};DriveClient.prototype.updateUser=function(g,c){try{var p={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(q){try{var u=JSON.parse(q);this.executeRequest({url:"/about"},mxUtils.bind(this,function(y){var H=
-mxResources.get("notAvailable"),E=H,F=null;null!=y&&null!=y.user&&(H=y.user.emailAddress,E=y.user.displayName,F=null!=y.user.picture?y.user.picture.url:null);this.setUser(new DrawioUser(u.id,H,E,F,u.locale));this.userId=u.id;null!=g&&g()}),c)}catch(y){null!=c&&c(y)}}),c,null,null,null,null,p)}catch(q){if(null!=c)c(q);else throw q;}};DriveClient.prototype.copyFile=function(g,c,p,q){null!=g&&null!=c&&this.executeRequest({url:"/files/"+g+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",
-method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},p,q)};DriveClient.prototype.renameFile=function(g,c,p,q){null!=g&&null!=c&&this.executeRequest(this.createDriveRequest(g,{title:c}),p,q)};DriveClient.prototype.moveFile=function(g,c,p,q){null!=g&&null!=c&&this.executeRequest(this.createDriveRequest(g,{parents:[{kind:"drive#fileLink",id:c}]}),p,q)};DriveClient.prototype.createDriveRequest=function(g,c){return{url:"/files/"+g+"?uploadType=multipart&supportsAllDrives=true",
-method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(g,c,p){return this.getFile(g,c,p,!0,!0)};DriveClient.prototype.loadDescriptor=function(g,c,p,q){this.executeRequest({url:"/files/"+g+"?supportsAllDrives=true&fields="+(null!=q?q:this.allFields)},c,p)};DriveClient.prototype.listFiles=function(g,c,p,q,u){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+
-"') "+(g?" and (title contains '"+g+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(p?" and ('me' in owners)":""))+"&orderBy=modifiedDate desc,title"},q,u)};DriveClient.prototype.getCustomProperty=function(g,c){g=g.properties;var p=null;if(null!=g)for(var q=0;q<g.length;q++)if(g[q].key==c){p=g[q].value;break}return p};DriveClient.prototype.getFile=function(g,c,p,q,u){q=null!=q?q:!1;u=null!=u?u:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+g+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},
-mxUtils.bind(this,function(y){y.title=y.originalFilename;y.headRevisionId=y.id;y.id=g;this.getXmlFile(y,c,p)}),p):this.loadDescriptor(g,mxUtils.bind(this,function(y){try{if(null!=this.user){var H=/\.png$/i.test(y.title);/\.v(dx|sdx?)$/i.test(y.title)||/\.gliffy$/i.test(y.title)||!Editor.useCanvasForExport&&H?this.ui.convertFile(y.downloadUrl,y.title,y.mimeType,this.extension,c,p,null,{Authorization:"Bearer "+b}):q||u||y.mimeType==this.libraryMimeType||y.mimeType==this.xmlMimeType?this.getXmlFile(y,
-c,p,!0,u):this.getXmlFile(y,c,p)}else p({message:mxResources.get("loggedOut")})}catch(E){if(null!=p)p(E);else throw E;}}),p)};DriveClient.prototype.isGoogleRealtimeMimeType=function(g){return null!=g&&"application/vnd.jgraph.mxfile."==g.substring(0,30)};DriveClient.prototype.getXmlFile=function(g,c,p,q,u){try{var y={Authorization:"Bearer "+b},H=g.downloadUrl;if(null==H)null!=p&&p({message:mxResources.get("exportOptionsDisabledDetails")});else{var E=0,F=mxUtils.bind(this,function(){this.ui.editor.loadUrl(H,
-mxUtils.bind(this,function(d){try{if(null==d)p({message:mxResources.get("invalidOrMissingFile")});else if(g.mimeType==this.libraryMimeType||u)g.mimeType!=this.libraryMimeType||u?c(new DriveLibrary(this.ui,d,g)):p({message:mxResources.get("notADiagramFile")});else{var k=!1;if(/\.png$/i.test(g.title)){var l=d.lastIndexOf(",");if(0<l){var n=this.ui.extractGraphModelFromPng(d);if(null!=n&&0<n.length)d=n;else try{n=d.substring(l+1);var x=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):
-atob(n),A=this.ui.editor.extractGraphModel(mxUtils.parseXml(x).documentElement,!0);null==A||0<A.getElementsByTagName("parsererror").length?k=!0:d=x}catch(B){k=!0}}}else/\.pdf$/i.test(g.title)?(n=Editor.extractGraphModelFromPdf(d),null!=n&&0<n.length&&(k=!0,d=n)):"data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)&&(x=d.substring(22),d=window.atob&&!mxClient.IS_SF?atob(x):Base64.decode(x));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,H)?this.ui.parseFileData(d,mxUtils.bind(this,
-function(B){try{4==B.readyState&&(200<=B.status&&299>=B.status?c(new LocalFile(this.ui,B.responseText,g.title+this.extension,!0)):null!=p&&p({message:mxResources.get("errorLoadingFile")}))}catch(I){if(null!=p)p(I);else throw I;}}),g.title):c(k?new LocalFile(this.ui,d,g.title,!0):new DriveFile(this.ui,d,g))}}catch(B){if(null!=p)p(B);else throw B;}}),mxUtils.bind(this,function(d,k){if(E<this.maxRetries&&null!=k&&403==k.getStatus())E++,window.setTimeout(F,2*E*this.coolOff*(1+.1*(Math.random()-.5)));
-else if(null!=p)p(d);else throw d;}),null!=g.mimeType&&"image/"==g.mimeType.substring(0,6)&&"image/svg"!=g.mimeType.substring(0,9)||/\.png$/i.test(g.title)||/\.jpe?g$/i.test(g.title)||/\.pdf$/i.test(g.title),null,null,null,y)});F()}}catch(d){if(null!=p)p(d);else throw d;}};DriveClient.prototype.saveFile=function(g,c,p,q,u,y,H,E,F){try{var d=0;g.saveLevel=1;var k=mxUtils.bind(this,function(S){if(null!=q)q(S);else throw S;}),l=mxUtils.bind(this,function(S){k(S);try{EditorUi.logError(S.message,null,
-null,null,S)}catch(Q){}});if(g.isEditable()&&null!=g.desc){var n=Date.now(),x=g.desc.etag,A=g.desc.modifiedDate,B=g.desc.headRevisionId,I=Editor.useCanvasForExport&&/(\.png)$/i.test(g.getTitle());y=null!=y?y:!1;var G=null,C=!1,R={mimeType:g.desc.mimeType,title:g.getTitle()};if(this.isGoogleRealtimeMimeType(R.mimeType))R.mimeType=this.xmlMimeType,G=g.desc,C=c=!0;else if("application/octet-stream"==R.mimeType||"1"==urlParams["override-mime"]&&R.mimeType!=this.xmlMimeType)R.mimeType=this.xmlMimeType;
-var T=mxUtils.bind(this,function(S,Q,v){try{g.saveLevel=3;var z=g.getData(),N=null,J=null;g.constructor==DriveFile&&(null==E&&(E=[]),null==g.getChannelId()&&E.push({key:"channel",value:Editor.guid(32)}),null==g.getChannelKey()&&E.push({key:"key",value:Editor.guid(32)}),F=null!=F?F:Editor.guid(32),E.push({key:"secret",value:F}),J=this.ui.getPagesForXml(z),N=this.ui.getHashValueForPages(J),E.push({key:"checksum",value:F+":"+N}));v||(null!=S||y||(S=this.placeholderThumbnail,Q=this.placeholderMimeType),
-null!=S&&null!=Q&&(R.thumbnail={image:S,mimeType:Q}));var K=mxUtils.bind(this,function(D){try{if(g.saveDelay=Date.now()-n,g.saveLevel=null,p(D,z,J,N),null!=G){this.executeRequest({url:"/files/"+G.id+"/revisions/"+G.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(M){M.pinned=!0;this.executeRequest({url:"/files/"+G.id+"/revisions/"+G.headRevisionId,method:"PUT",params:M})})));try{EditorUi.logEvent({category:g.convertedFrom+"-CONVERT-FILE-"+g.getHash(),action:"from_"+
-G.id+"."+G.headRevisionId+"-to_"+g.desc.id+"."+g.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=g.sync?"-client_"+g.sync.clientId:"nosync")})}catch(M){}}}catch(M){l(M)}}),m=mxUtils.bind(this,function(D,M){g.saveLevel=4;try{null!=E&&(R.properties=E);var L=H||g.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:g.getCurrentEtag(),O=mxUtils.bind(this,function(V){g.saveLevel=5;try{var X=g.desc.mimeType!=this.xmlMimeType&&g.desc.mimeType!=this.mimeType&&
-g.desc.mimeType!=this.libraryMimeType,W=!0,Y=null;try{Y=window.setTimeout(mxUtils.bind(this,function(){W=!1;k({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(g.getId(),R,D,c||V||X,M,V?null:L,C),mxUtils.bind(this,function(Z){window.clearTimeout(Y);if(W){var aa=null!=Z?(new Date(Z.modifiedDate)).getTime()-(new Date(A)).getTime():0;if(0>=aa||x==Z.etag||c&&B==Z.headRevisionId){var fa=[];null==Z?fa.push("Empty response"):(0>=aa&&fa.push("Invalid modified time"),
-x==Z.etag&&fa.push("Stale etag"),c&&B==Z.headRevisionId&&fa.push("Stale revision"),L=Z.etag);0==fa.length&&fa.push(mxResources.get("unknownError"));aa=fa.join(", ");if(d<this.staleEtagMaxRetries)d++,fa=Math.round(Math.pow(2,d)*this.coolOff*(1+.1*(Math.random()-.5))),window.setTimeout(O,fa),"1"==urlParams.test&&EditorUi.debug("DriveClient: Invalid response","retry",d,"delay",fa,"rev",null!=Z?Z.headRevisionId:"null","errors",aa);else{g.saveLevel=12;k({message:mxResources.get("error")+": "+aa},Z);try{EditorUi.logError("Saving to Google Drive failed",
-null,"id-"+g.desc.id+"-from-"+B+"."+A+"-"+this.ui.hashValue(x)+"-to-"+Z.headRevisionId+"."+Z.modifiedDate+"-"+this.ui.hashValue(Z.etag)+(0<aa.length?"-errors-"+aa:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=g.sync?"-client_"+g.sync.clientId:"-nosync")+"-retries-"+d+"-delay-"+(Date.now()-n))}catch(ea){}}}else K(Z)}}),mxUtils.bind(this,function(Z){window.clearTimeout(Y);if(W){g.saveLevel=6;try{g.isConflict(Z)?this.executeRequest({url:"/files/"+g.getId()+"?supportsAllDrives=true&fields="+
-this.catchupFields},mxUtils.bind(this,function(aa){g.saveLevel=7;try{if(null!=aa&&aa.etag==L)if(d<this.staleEtagMaxRetries){d++;var fa=Math.round(2*d*this.coolOff*(1+.1*(Math.random()-.5)));window.setTimeout(P,fa);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",d,"delay",fa)}else{P(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+g.getHash(),action:"rev_"+g.desc.headRevisionId+"-mod_"+g.desc.modifiedDate+"-size_"+g.getSize()+"-mime_"+g.desc.mimeType+(this.ui.editor.autosave?
-"":"-nosave")+(g.isAutosave()?"":"-noauto")+(g.changeListenerEnabled?"":"-nolisten")+(g.inConflictState?"-conflict":"")+(g.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=g.sync?"-client_"+g.sync.clientId:"-nosync")})}catch(ea){}}else"1"==urlParams.test&&aa.headRevisionId==B&&EditorUi.debug("DriveClient: Remote Etag Changed","local",L,"remote",aa.etag,"rev",g.desc.headRevisionId,"response",[aa],"file",[g]),k(Z,aa)}catch(ea){l(ea)}}),mxUtils.bind(this,function(){k(Z)})):
-k(Z)}catch(aa){l(aa)}}}))}catch(Z){l(Z)}}),P=mxUtils.bind(this,function(V){g.saveLevel=9;if(V||null==L)O(V);else{var X=!0,W=null;try{W=window.setTimeout(mxUtils.bind(this,function(){X=!1;k({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(Y){}this.executeRequest({url:"/files/"+g.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(Y){window.clearTimeout(W);if(X){g.saveLevel=10;try{null!=Y&&Y.headRevisionId==B?("1"==urlParams.test&&L!=Y.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",
-"from",L,"to",Y.etag,"rev",g.desc.headRevisionId,"response",[Y],"file",[g]),L=Y.etag,O(V)):k({error:{code:412}},Y)}catch(Z){l(Z)}}}),mxUtils.bind(this,function(Y){window.clearTimeout(W);X&&(g.saveLevel=11,k(Y))}))}});if(I&&null==S){g.saveLevel=8;var U=new Image;U.onload=mxUtils.bind(this,function(){try{var V=this.thumbnailWidth/U.width,X=document.createElement("canvas");X.width=this.thumbnailWidth;X.height=Math.floor(U.height*V);X.getContext("2d").drawImage(U,0,0,X.width,X.height);var W=X.toDataURL();
-W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");R.thumbnail={image:W,mimeType:"image/png"};P(!1)}catch(Y){try{P(!1)}catch(Z){l(Z)}}});U.src="data:image/png;base64,"+D}else P(!1)}catch(V){l(V)}});if(I){var t=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(D){m(D,!0)}),k,this.ui.getCurrentFile()!=g?z:null,t.scale,t.border)}else m(z,!1)}catch(D){l(D)}});try{g.saveLevel=2,(y||I||g.constructor==DriveLibrary||!this.enableThumbnails||
-"0"==urlParams.thumb||null!=R.mimeType&&"application/vnd.jgraph.mxfile"!=R.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(S){try{var Q=null;try{null!=S&&(Q=S.toDataURL("image/png")),null!=Q&&(Q=Q.length>this.maxThumbnailSize?null:Q.substring(Q.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(v){Q=null}T(Q,"image/png")}catch(v){l(v)}}),20))&&T(null,null,g.constructor!=DriveLibrary)}catch(S){l(S)}}else this.ui.editor.graph.reset(),k({message:mxResources.get("readOnly")})}catch(S){l(S)}};
-DriveClient.prototype.insertFile=function(g,c,p,q,u,y,H){y=null!=y?y:this.xmlMimeType;g={mimeType:y,title:g};null!=p&&(g.parents=[{kind:"drive#fileLink",id:p}]);this.executeRequest(this.createUploadRequest(null,g,c,!1,H),mxUtils.bind(this,function(E){y==this.libraryMimeType?q(new DriveLibrary(this.ui,c,E)):0==E?null!=u&&u({message:mxResources.get("errorSavingFile")}):q(new DriveFile(this.ui,c,E))}),u)};DriveClient.prototype.createUploadRequest=function(g,c,p,q,u,y,H){u=null!=u?u:!1;var E={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};
-null!=y&&(E["If-Match"]=y);g={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=g?"/"+g:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=g?"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!=p?u?p:!window.btoa||
-mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(p):Graph.base64EncodeUnicode(p):"")+"\r\n---------314159265358979323846--"};q||(g.fullUrl+="&newRevision=false");H&&(g.fullUrl+="&pinned=true");return g};DriveClient.prototype.createLinkPicker=function(){var g=f.linkPicker;if(null==g||f.linkPickerToken!=b){f.linkPickerToken=b;g=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),
-p=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);g=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(f.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(g).addView(c).addView(p).addView(google.picker.ViewId.RECENTLY_PICKED)}return g};DriveClient.prototype.pickFile=function(g,c,p){this.filePickerCallback=null!=g?g:mxUtils.bind(this,function(q){this.ui.loadFile("G"+q)});this.filePicked=
-mxUtils.bind(this,function(q){q.action==google.picker.Action.PICKED&&this.filePickerCallback(q.docs[0].id,q.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var q=c?"genericPicker":"filePicker",u=mxUtils.bind(this,function(k){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(k).className&&(mxEvent.removeListener(document,"click",u),this[q].setVisible(!1),p&&p())});if(null==f[q]||f[q+"Token"]!=
-b){f[q+"Token"]=b;var y=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),H=(new google.picker.DocsView).setIncludeFolders(!0),E=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),F=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(y.setMimeTypes("*/*"),H.setMimeTypes("*/*"),E.setMimeTypes("*/*")):(y.setMimeTypes(this.mimeTypes),H.setMimeTypes(this.mimeTypes),E.setMimeTypes(this.mimeTypes));f[q]=(new google.picker.PickerBuilder).setOAuthToken(f[q+
-"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(y).addView(H).addView(E).addView(google.picker.ViewId.RECENTLY_PICKED).addView(F);if(urlParams.gPickerSize){var d=urlParams.gPickerSize.split(",");f[q]=f[q].setSize(d[0],d[1])}urlParams.topBaseUrl&&(f[q]=f[q].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));f[q]=f[q].setCallback(mxUtils.bind(this,function(k){if(k.action==google.picker.Action.PICKED||k.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,
-"click",u),p&&k.action==google.picker.Action.CANCEL&&p();k.action==google.picker.Action.PICKED&&this.filePicked(k)})).build()}mxEvent.addListener(document,"click",u);f[q].setVisible(!0)}catch(k){this.ui.spinner.stop(),this.ui.handleError(k)}}))};DriveClient.prototype.pickFolder=function(g,c){this.folderPickerCallback=g;var p=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var q=
-mxUtils.bind(this,function(F){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(F).className&&(mxEvent.removeListener(document,"click",q),f.folderPicker.setVisible(!1))});if(null==f.folderPicker||f.folderPickerToken!=b){f.folderPickerToken=b;var u=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),y=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),
-H=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");f.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(f.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(u).addView(y).addView(H).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
+null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedirectUrl=null;DriveClient.prototype.setUser=function(k){this.user=k;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=k.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(k){this.userId=k;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser=
+function(){return this.user};DriveClient.prototype.getUsersList=function(){var k=[],c=JSON.parse(this.getPersistentToken(!0)),p=null;if(null!=c){null!=c.current&&(p=c.current.userId,k.push(c[p].user),k[0].isCurrent=!0);for(var q in c)"current"!=q&&q!=p&&k.push(c[q].user)}return k};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();
+this.setUser(null);b=null};DriveClient.prototype.execute=function(k){var c=mxUtils.bind(this,function(p){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(q,u){this.authorize(!1,mxUtils.bind(this,function(){null!=u&&u();k()}),mxUtils.bind(this,function(z){var G=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&&(G=z.error.message);this.logout();this.ui.showError(mxResources.get("error"),
+G,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),q)}))});this.authorize(!0,k,c)};DriveClient.prototype.executeRequest=function(k,c,p){try{var q=!0,u=null,z=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var G=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=k;null!=u&&window.clearTimeout(u);u=window.setTimeout(mxUtils.bind(this,
+function(){q=!1;null!=p&&p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:G})}),this.ui.timeout);var E=null,F=!1;"string"===typeof k.params?E=k.params:null!=k.params&&(E=JSON.stringify(k.params),F=!0);var d=k.fullUrl||this.GDriveBaseUrl+k.url;F&&(d+=(0<d.indexOf("?")?"&":"?")+"alt=json");var g=new mxXmlRequest(d,E,k.method||"GET");g.setRequestHeaders=mxUtils.bind(this,function(l,n){if(null!=k.headers)for(var x in k.headers)l.setRequestHeader(x,k.headers[x]);else null!=k.contentType?
+l.setRequestHeader("Content-Type",k.contentType):F&&l.setRequestHeader("Content-Type","application/json");l.setRequestHeader("Authorization","Bearer "+b)});g.send(mxUtils.bind(this,function(l){try{if(window.clearTimeout(u),q){try{var n=JSON.parse(l.getText())}catch(B){n=null}if(200<=l.getStatus()&&299>=l.getStatus())null!=c&&c(n);else{var x=null!=n&&null!=n.error?null!=n.error.data?n.error.data:n.error.errors:null,A=null!=x&&0<x.length?x[0].reason:null;null==p||null==n||null==n.error||-1!=n.error.code&&
+(403!=n.error.code||"domainPolicy"!=A&&"The requested mime type change is forbidden."!=n.error.message)?null!=n&&null!=n.error&&(401==n.error.code||403==n.error.code&&"rateLimitExceeded"!=A)?403==n.error.code&&this.retryAuth||401==n.error.code&&this.retryAuth&&"authError"==A?(null!=p&&p(n),this.retryAuth=!1):(this.retryAuth=!0,this.execute(G)):null!=n&&null!=n.error&&412!=n.error.code&&404!=n.error.code&&400!=n.error.code&&this.currentRequest==k&&z<this.maxRetries?(z++,this.requestThread=window.setTimeout(G,
+Math.round(Math.pow(2,z)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=p&&p(n):p(n)}}}catch(B){if(null!=p)p(B);else throw B;}}))}catch(l){if(null!=p)p(l);else throw l;}});null!=b&&this.authCalled?G():this.execute(G)}catch(E){if(null!=p)p(E);else throw E;}};DriveClient.prototype.createAuthWin=function(k){return window.open(k?k:"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(k,c,p,q,u){this.isExtAuth&&!k?window.parent.driveAuth(mxUtils.bind(this,function(z){this.updateAuthInfo(z,!0,!0,c,p)}),p):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(z){200<=z.getStatus()&&299>=z.getStatus()?this.authorizeStep2(z.getText(),k,c,p,q,u):null!=p&&p(z)}),p)};DriveClient.prototype.updateAuthInfo=function(k,c,p,q,u){b=k.access_token;delete k.access_token;k.expires=Date.now()+1E3*parseInt(k.expires_in);
+k.remember=c;this.resetTokenRefresh(k);this.authCalled=!0;if(p||null==this.user){var z=JSON.stringify(k);this.updateUser(mxUtils.bind(this,function(){var G=JSON.parse(z);this.setPersistentToken(G,!c);null!=q&&q()}),u)}else null!=q&&(this.setPersistentToken(k,!c),q())};DriveClient.prototype.authorizeStep2=function(k,c,p,q,u,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 G=
+JSON.parse(this.getPersistentToken(!0));G&&null!=G.current&&(this.userId=G.current.userId)}if(c&&null==this.userId)null!=q&&q();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+k)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(F){try{if(200<=F.getStatus()&&299>=F.getStatus()){var d=JSON.parse(F.getText());this.updateAuthInfo(d,!0,!1,p,q)}else 0!=F.getStatus()&&this.logout(),null!=q&&q(F)}catch(g){if(null!=
+window.console&&console.log("DriveClient.authorizeStep2",g),null!=q)q(g);else throw g;}}),q);else{var E="https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(u?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+k+(this.sameWinRedirectUrl?
+"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(E),z=null):null==z?z=this.createAuthWin(E):z.location=E;null!=z?(window.onGoogleDriveCallback=mxUtils.bind(this,function(F,d){window.onGoogleDriveCallback=null;try{null==F?null!=q&&q({message:mxResources.get("accessDenied")}):this.updateAuthInfo(F,u,!0,p,q)}catch(g){null!=q&&q(g)}finally{null!=d&&d.close()}}),z.focus()):null!=q&&q({message:mxResources.get("allowPopups")})}}catch(F){if(null!=q)q(F);else throw F;
+}};DriveClient.prototype.resetTokenRefresh=function(k){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);null!=k&&null==k.error&&0<k.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(k.expires_in),this.lastTokenRefresh=Date.now(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*k.expires_in))};DriveClient.prototype.checkToken=function(k){var c=
+0<this.lastTokenRefresh;Date.now()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){k();c&&this.fireEvent(new mxEventObject("disconnected"))})):k()};DriveClient.prototype.updateUser=function(k,c){try{var p={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(q){try{var u=JSON.parse(q);this.executeRequest({url:"/about"},mxUtils.bind(this,function(z){var G=
+mxResources.get("notAvailable"),E=G,F=null;null!=z&&null!=z.user&&(G=z.user.emailAddress,E=z.user.displayName,F=null!=z.user.picture?z.user.picture.url:null);this.setUser(new DrawioUser(u.id,G,E,F,u.locale));this.userId=u.id;null!=k&&k()}),c)}catch(z){null!=c&&c(z)}}),c,null,null,null,null,p)}catch(q){if(null!=c)c(q);else throw q;}};DriveClient.prototype.copyFile=function(k,c,p,q){null!=k&&null!=c&&this.executeRequest({url:"/files/"+k+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",
+method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},p,q)};DriveClient.prototype.renameFile=function(k,c,p,q){null!=k&&null!=c&&this.executeRequest(this.createDriveRequest(k,{title:c}),p,q)};DriveClient.prototype.moveFile=function(k,c,p,q){null!=k&&null!=c&&this.executeRequest(this.createDriveRequest(k,{parents:[{kind:"drive#fileLink",id:c}]}),p,q)};DriveClient.prototype.createDriveRequest=function(k,c){return{url:"/files/"+k+"?uploadType=multipart&supportsAllDrives=true",
+method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(k,c,p){return this.getFile(k,c,p,!0,!0)};DriveClient.prototype.loadDescriptor=function(k,c,p,q){this.executeRequest({url:"/files/"+k+"?supportsAllDrives=true&fields="+(null!=q?q:this.allFields)},c,p)};DriveClient.prototype.listFiles=function(k,c,p,q,u){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+
+"') "+(k?" and (title contains '"+k+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(p?" and ('me' in owners)":""))+"&orderBy=modifiedDate desc,title"},q,u)};DriveClient.prototype.getCustomProperty=function(k,c){k=k.properties;var p=null;if(null!=k)for(var q=0;q<k.length;q++)if(k[q].key==c){p=k[q].value;break}return p};DriveClient.prototype.getFile=function(k,c,p,q,u){q=null!=q?q:!1;u=null!=u?u:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+k+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},
+mxUtils.bind(this,function(z){z.title=z.originalFilename;z.headRevisionId=z.id;z.id=k;this.getXmlFile(z,c,p)}),p):this.loadDescriptor(k,mxUtils.bind(this,function(z){try{if(null!=this.user){var G=/\.png$/i.test(z.title);/\.v(dx|sdx?)$/i.test(z.title)||/\.gliffy$/i.test(z.title)||!Editor.useCanvasForExport&&G?this.ui.convertFile(z.downloadUrl,z.title,z.mimeType,this.extension,c,p,null,{Authorization:"Bearer "+b}):q||u||z.mimeType==this.libraryMimeType||z.mimeType==this.xmlMimeType?this.getXmlFile(z,
+c,p,!0,u):this.getXmlFile(z,c,p)}else p({message:mxResources.get("loggedOut")})}catch(E){if(null!=p)p(E);else throw E;}}),p)};DriveClient.prototype.isGoogleRealtimeMimeType=function(k){return null!=k&&"application/vnd.jgraph.mxfile."==k.substring(0,30)};DriveClient.prototype.getXmlFile=function(k,c,p,q,u){try{var z={Authorization:"Bearer "+b},G=k.downloadUrl;if(null==G)null!=p&&p({message:mxResources.get("exportOptionsDisabledDetails")});else{var E=0,F=mxUtils.bind(this,function(){this.ui.editor.loadUrl(G,
+mxUtils.bind(this,function(d){try{if(null==d)p({message:mxResources.get("invalidOrMissingFile")});else if(k.mimeType==this.libraryMimeType||u)k.mimeType!=this.libraryMimeType||u?c(new DriveLibrary(this.ui,d,k)):p({message:mxResources.get("notADiagramFile")});else{var g=!1;if(/\.png$/i.test(k.title)){var l=d.lastIndexOf(",");if(0<l){var n=this.ui.extractGraphModelFromPng(d);if(null!=n&&0<n.length)d=n;else try{n=d.substring(l+1);var x=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):
+atob(n),A=this.ui.editor.extractGraphModel(mxUtils.parseXml(x).documentElement,!0);null==A||0<A.getElementsByTagName("parsererror").length?g=!0:d=x}catch(B){g=!0}}}else/\.pdf$/i.test(k.title)?(n=Editor.extractGraphModelFromPdf(d),null!=n&&0<n.length&&(g=!0,d=n)):"data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)&&(x=d.substring(22),d=window.atob&&!mxClient.IS_SF?atob(x):Base64.decode(x));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,G)?this.ui.parseFileData(d,mxUtils.bind(this,
+function(B){try{4==B.readyState&&(200<=B.status&&299>=B.status?c(new LocalFile(this.ui,B.responseText,k.title+this.extension,!0)):null!=p&&p({message:mxResources.get("errorLoadingFile")}))}catch(I){if(null!=p)p(I);else throw I;}}),k.title):c(g?new LocalFile(this.ui,d,k.title,!0):new DriveFile(this.ui,d,k))}}catch(B){if(null!=p)p(B);else throw B;}}),mxUtils.bind(this,function(d,g){if(E<this.maxRetries&&null!=g&&403==g.getStatus())E++,window.setTimeout(F,2*E*this.coolOff*(1+.1*(Math.random()-.5)));
+else if(null!=p)p(d);else throw d;}),null!=k.mimeType&&"image/"==k.mimeType.substring(0,6)&&"image/svg"!=k.mimeType.substring(0,9)||/\.png$/i.test(k.title)||/\.jpe?g$/i.test(k.title)||/\.pdf$/i.test(k.title),null,null,null,z)});F()}}catch(d){if(null!=p)p(d);else throw d;}};DriveClient.prototype.saveFile=function(k,c,p,q,u,z,G,E,F){try{var d=0;k.saveLevel=1;var g=mxUtils.bind(this,function(R){if(null!=q)q(R);else throw R;}),l=mxUtils.bind(this,function(R){g(R);try{EditorUi.logError(R.message,null,
+null,null,R)}catch(P){}});if(k.isEditable()&&null!=k.desc){var n=Date.now(),x=k.desc.etag,A=k.desc.modifiedDate,B=k.desc.headRevisionId,I=Editor.useCanvasForExport&&/(\.png)$/i.test(k.getTitle());z=null!=z?z:!1;var H=null,D=!1,S={mimeType:k.desc.mimeType,title:k.getTitle()};if(this.isGoogleRealtimeMimeType(S.mimeType))S.mimeType=this.xmlMimeType,H=k.desc,D=c=!0;else if("application/octet-stream"==S.mimeType||"1"==urlParams["override-mime"]&&S.mimeType!=this.xmlMimeType)S.mimeType=this.xmlMimeType;
+var U=mxUtils.bind(this,function(R,P,v){try{k.saveLevel=3;var y=k.getData(),L=null,J=null;k.constructor==DriveFile&&(null==E&&(E=[]),null==k.getChannelId()&&E.push({key:"channel",value:Editor.guid(32)}),null==k.getChannelKey()&&E.push({key:"key",value:Editor.guid(32)}),F=null!=F?F:Editor.guid(32),E.push({key:"secret",value:F}),J=this.ui.getPagesForXml(y),L=this.ui.getHashValueForPages(J),E.push({key:"checksum",value:F+":"+L}));v||(null!=R||z||(R=this.placeholderThumbnail,P=this.placeholderMimeType),
+null!=R&&null!=P&&(S.thumbnail={image:R,mimeType:P}));var K=mxUtils.bind(this,function(C){try{if(k.saveDelay=Date.now()-n,k.saveLevel=null,p(C,y,J,L),null!=H){this.executeRequest({url:"/files/"+H.id+"/revisions/"+H.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(N){N.pinned=!0;this.executeRequest({url:"/files/"+H.id+"/revisions/"+H.headRevisionId,method:"PUT",params:N})})));try{EditorUi.logEvent({category:k.convertedFrom+"-CONVERT-FILE-"+k.getHash(),action:"from_"+
+H.id+"."+H.headRevisionId+"-to_"+k.desc.id+"."+k.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=k.sync?"-client_"+k.sync.clientId:"nosync")})}catch(N){}}}catch(N){l(N)}}),m=mxUtils.bind(this,function(C,N){k.saveLevel=4;try{null!=E&&(S.properties=E);var M=G||k.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:k.getCurrentEtag(),O=mxUtils.bind(this,function(V){k.saveLevel=5;try{var X=k.desc.mimeType!=this.xmlMimeType&&k.desc.mimeType!=this.mimeType&&
+k.desc.mimeType!=this.libraryMimeType,W=!0,Y=null;try{Y=window.setTimeout(mxUtils.bind(this,function(){W=!1;g({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(k.getId(),S,C,c||V||X,N,V?null:M,D),mxUtils.bind(this,function(Z){window.clearTimeout(Y);if(W){var aa=null!=Z?(new Date(Z.modifiedDate)).getTime()-(new Date(A)).getTime():0;if(0>=aa||x==Z.etag||c&&B==Z.headRevisionId){var ja=[];null==Z?ja.push("Empty response"):(0>=aa&&ja.push("Invalid modified time"),
+x==Z.etag&&ja.push("Stale etag"),c&&B==Z.headRevisionId&&ja.push("Stale revision"),M=Z.etag);0==ja.length&&ja.push(mxResources.get("unknownError"));aa=ja.join(", ");if(d<this.staleEtagMaxRetries)d++,ja=Math.round(Math.pow(2,d)*this.coolOff*(1+.1*(Math.random()-.5))),window.setTimeout(O,ja),"1"==urlParams.test&&EditorUi.debug("DriveClient: Invalid response","retry",d,"delay",ja,"rev",null!=Z?Z.headRevisionId:"null","errors",aa);else{k.saveLevel=12;g({message:mxResources.get("error")+": "+aa},Z);try{EditorUi.logError("Saving to Google Drive failed",
+null,"id-"+k.desc.id+"-from-"+B+"."+A+"-"+this.ui.hashValue(x)+"-to-"+Z.headRevisionId+"."+Z.modifiedDate+"-"+this.ui.hashValue(Z.etag)+(0<aa.length?"-errors-"+aa:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=k.sync?"-client_"+k.sync.clientId:"-nosync")+"-retries-"+d+"-delay-"+(Date.now()-n))}catch(ea){}}}else K(Z)}}),mxUtils.bind(this,function(Z){window.clearTimeout(Y);if(W){k.saveLevel=6;try{k.isConflict(Z)?this.executeRequest({url:"/files/"+k.getId()+"?supportsAllDrives=true&fields="+
+this.catchupFields},mxUtils.bind(this,function(aa){k.saveLevel=7;try{if(null!=aa&&aa.etag==M)if(d<this.staleEtagMaxRetries){d++;var ja=Math.round(2*d*this.coolOff*(1+.1*(Math.random()-.5)));window.setTimeout(Q,ja);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",d,"delay",ja)}else{Q(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+k.getHash(),action:"rev_"+k.desc.headRevisionId+"-mod_"+k.desc.modifiedDate+"-size_"+k.getSize()+"-mime_"+k.desc.mimeType+(this.ui.editor.autosave?
+"":"-nosave")+(k.isAutosave()?"":"-noauto")+(k.changeListenerEnabled?"":"-nolisten")+(k.inConflictState?"-conflict":"")+(k.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=k.sync?"-client_"+k.sync.clientId:"-nosync")})}catch(ea){}}else"1"==urlParams.test&&aa.headRevisionId==B&&EditorUi.debug("DriveClient: Remote Etag Changed","local",M,"remote",aa.etag,"rev",k.desc.headRevisionId,"response",[aa],"file",[k]),g(Z,aa)}catch(ea){l(ea)}}),mxUtils.bind(this,function(){g(Z)})):
+g(Z)}catch(aa){l(aa)}}}))}catch(Z){l(Z)}}),Q=mxUtils.bind(this,function(V){k.saveLevel=9;if(V||null==M)O(V);else{var X=!0,W=null;try{W=window.setTimeout(mxUtils.bind(this,function(){X=!1;g({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(Y){}this.executeRequest({url:"/files/"+k.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(Y){window.clearTimeout(W);if(X){k.saveLevel=10;try{null!=Y&&Y.headRevisionId==B?("1"==urlParams.test&&M!=Y.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",
+"from",M,"to",Y.etag,"rev",k.desc.headRevisionId,"response",[Y],"file",[k]),M=Y.etag,O(V)):g({error:{code:412}},Y)}catch(Z){l(Z)}}}),mxUtils.bind(this,function(Y){window.clearTimeout(W);X&&(k.saveLevel=11,g(Y))}))}});if(I&&null==R){k.saveLevel=8;var T=new Image;T.onload=mxUtils.bind(this,function(){try{var V=this.thumbnailWidth/T.width,X=document.createElement("canvas");X.width=this.thumbnailWidth;X.height=Math.floor(T.height*V);X.getContext("2d").drawImage(T,0,0,X.width,X.height);var W=X.toDataURL();
+W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");S.thumbnail={image:W,mimeType:"image/png"};Q(!1)}catch(Y){try{Q(!1)}catch(Z){l(Z)}}});T.src="data:image/png;base64,"+C}else Q(!1)}catch(V){l(V)}});if(I){var t=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(C){m(C,!0)}),g,this.ui.getCurrentFile()!=k?y:null,t.scale,t.border)}else m(y,!1)}catch(C){l(C)}});try{k.saveLevel=2,(z||I||k.constructor==DriveLibrary||!this.enableThumbnails||
+"0"==urlParams.thumb||null!=S.mimeType&&"application/vnd.jgraph.mxfile"!=S.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(R){try{var P=null;try{null!=R&&(P=R.toDataURL("image/png")),null!=P&&(P=P.length>this.maxThumbnailSize?null:P.substring(P.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(v){P=null}U(P,"image/png")}catch(v){l(v)}}),20))&&U(null,null,k.constructor!=DriveLibrary)}catch(R){l(R)}}else this.ui.editor.graph.reset(),g({message:mxResources.get("readOnly")})}catch(R){l(R)}};
+DriveClient.prototype.insertFile=function(k,c,p,q,u,z,G){z=null!=z?z:this.xmlMimeType;k={mimeType:z,title:k};null!=p&&(k.parents=[{kind:"drive#fileLink",id:p}]);this.executeRequest(this.createUploadRequest(null,k,c,!1,G),mxUtils.bind(this,function(E){z==this.libraryMimeType?q(new DriveLibrary(this.ui,c,E)):0==E?null!=u&&u({message:mxResources.get("errorSavingFile")}):q(new DriveFile(this.ui,c,E))}),u)};DriveClient.prototype.createUploadRequest=function(k,c,p,q,u,z,G){u=null!=u?u:!1;var E={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};
+null!=z&&(E["If-Match"]=z);k={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=k?"/"+k:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=k?"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!=p?u?p:!window.btoa||
+mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(p):Graph.base64EncodeUnicode(p):"")+"\r\n---------314159265358979323846--"};q||(k.fullUrl+="&newRevision=false");G&&(k.fullUrl+="&pinned=true");return k};DriveClient.prototype.createLinkPicker=function(){var k=f.linkPicker;if(null==k||f.linkPickerToken!=b){f.linkPickerToken=b;k=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),
+p=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);k=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(f.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(k).addView(c).addView(p).addView(google.picker.ViewId.RECENTLY_PICKED)}return k};DriveClient.prototype.pickFile=function(k,c,p){this.filePickerCallback=null!=k?k:mxUtils.bind(this,function(q){this.ui.loadFile("G"+q)});this.filePicked=
+mxUtils.bind(this,function(q){q.action==google.picker.Action.PICKED&&this.filePickerCallback(q.docs[0].id,q.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var q=c?"genericPicker":"filePicker",u=mxUtils.bind(this,function(g){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(g).className&&(mxEvent.removeListener(document,"click",u),this[q].setVisible(!1),p&&p())});if(null==f[q]||f[q+"Token"]!=
+b){f[q+"Token"]=b;var z=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),G=(new google.picker.DocsView).setIncludeFolders(!0),E=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),F=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(z.setMimeTypes("*/*"),G.setMimeTypes("*/*"),E.setMimeTypes("*/*")):(z.setMimeTypes(this.mimeTypes),G.setMimeTypes(this.mimeTypes),E.setMimeTypes(this.mimeTypes));f[q]=(new google.picker.PickerBuilder).setOAuthToken(f[q+
+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(z).addView(G).addView(E).addView(google.picker.ViewId.RECENTLY_PICKED).addView(F);if(urlParams.gPickerSize){var d=urlParams.gPickerSize.split(",");f[q]=f[q].setSize(d[0],d[1])}urlParams.topBaseUrl&&(f[q]=f[q].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));f[q]=f[q].setCallback(mxUtils.bind(this,function(g){if(g.action==google.picker.Action.PICKED||g.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,
+"click",u),p&&g.action==google.picker.Action.CANCEL&&p();g.action==google.picker.Action.PICKED&&this.filePicked(g)})).build()}mxEvent.addListener(document,"click",u);f[q].setVisible(!0)}catch(g){this.ui.spinner.stop(),this.ui.handleError(g)}}))};DriveClient.prototype.pickFolder=function(k,c){this.folderPickerCallback=k;var p=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var q=
+mxUtils.bind(this,function(F){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(F).className&&(mxEvent.removeListener(document,"click",q),f.folderPicker.setVisible(!1))});if(null==f.folderPicker||f.folderPickerToken!=b){f.folderPickerToken=b;var u=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),z=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),
+G=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");f.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(f.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(u).addView(z).addView(G).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
if(urlParams.gPickerSize){var E=urlParams.gPickerSize.split(",");f.folderPicker=f.folderPicker.setSize(E[0],E[1])}urlParams.topBaseUrl&&(f.folderPicker=f.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));f.folderPicker=f.folderPicker.setCallback(mxUtils.bind(this,function(F){F.action!=google.picker.Action.PICKED&&F.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",q);this.folderPickerCallback(F)})).build()}mxEvent.addListener(document,"click",q);f.folderPicker.setVisible(!0)}catch(F){this.ui.spinner.stop(),
this.ui.handleError(F)}}))}catch(q){this.ui.handleError(q)}});c?p():this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop(),this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){p()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)}catch(q){this.ui.handleError(q)}}))};
-DriveClient.prototype.pickLibrary=function(g){this.filePickerCallback=g;this.filePicked=mxUtils.bind(this,function(c){c.action==google.picker.Action.PICKED?this.filePickerCallback(c.docs[0].id):c.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(E){"picker modal-dialog-bg picker-dialog-bg"==
+DriveClient.prototype.pickLibrary=function(k){this.filePickerCallback=k;this.filePicked=mxUtils.bind(this,function(c){c.action==google.picker.Action.PICKED?this.filePickerCallback(c.docs[0].id):c.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(E){"picker modal-dialog-bg picker-dialog-bg"==
mxEvent.getSource(E).className&&(mxEvent.removeListener(document,"click",c),f.libraryPicker.setVisible(!1))});if(null==f.libraryPicker||f.libraryPickerToken!=b){f.libraryPickerToken=b;var p=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),q=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
-u=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),y=(new google.picker.DocsUploadView).setIncludeFolders(!0);f.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(f.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(p).addView(q).addView(u).addView(google.picker.ViewId.RECENTLY_PICKED).addView(y);if(urlParams.gPickerSize){var H=
-urlParams.gPickerSize.split(",");f.libraryPicker=f.libraryPicker.setSize(H[0],H[1])}urlParams.topBaseUrl&&(f.libraryPicker=f.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));f.libraryPicker=f.libraryPicker.setCallback(mxUtils.bind(this,function(E){E.action!=google.picker.Action.PICKED&&E.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);E.action==google.picker.Action.PICKED&&this.filePicked(E)})).build()}mxEvent.addListener(document,"click",c);f.libraryPicker.setVisible(!0)}catch(E){this.ui.spinner.stop(),
-this.ui.handleError(E)}}))};DriveClient.prototype.showPermissions=function(g,c){var p=mxUtils.bind(this,function(){var q=new ConfirmDialog(this.ui,mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){var u=null!=c?c.getFolderUrl():"https://drive.google.com/open?id="+g;this.ui.editor.graph.openLink(u)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(q.container,400,150,!0,!0);q.init()});this.sharingFailed?p():this.checkToken(mxUtils.bind(this,
-function(){try{var q=new gapi.drive.share.ShareClient(this.appId);q.setOAuthToken(b);q.setItemIds([g]);q.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(u){for(var y=!1,H=0;H<u.length;H++)for(var E=0;E<u[H].addedNodes.length;E++){var F=u[H].addedNodes[E];"BUTTON"==F.nodeName&&"ok"==F.getAttribute("name")&&null!=F.parentNode&&null!=F.parentNode.parentNode&&
-"dialog"==F.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,F.click(),p(),y=!0):"DIV"==F.nodeName&&"shr-q-shr-r-shr-xb"==F.className&&(y=!0)}y&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(u){this.ui.handleError(u)}}))};DriveClient.prototype.clearPersistentToken=function(){var g=JSON.parse(this.getPersistentToken(!0))||{};delete g.current;delete g[this.userId];for(var c in g){g.current={userId:c,
-expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(g))};DriveClient.prototype.setPersistentToken=function(g,c){var p=JSON.parse(this.getPersistentToken(!0))||{};g.userId=this.userId;p.current=g;p[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(p),c)}})();DropboxFile=function(b,f,g){DrawioFile.call(this,b,f);this.stat=g};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};
+u=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),z=(new google.picker.DocsUploadView).setIncludeFolders(!0);f.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(f.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(p).addView(q).addView(u).addView(google.picker.ViewId.RECENTLY_PICKED).addView(z);if(urlParams.gPickerSize){var G=
+urlParams.gPickerSize.split(",");f.libraryPicker=f.libraryPicker.setSize(G[0],G[1])}urlParams.topBaseUrl&&(f.libraryPicker=f.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));f.libraryPicker=f.libraryPicker.setCallback(mxUtils.bind(this,function(E){E.action!=google.picker.Action.PICKED&&E.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);E.action==google.picker.Action.PICKED&&this.filePicked(E)})).build()}mxEvent.addListener(document,"click",c);f.libraryPicker.setVisible(!0)}catch(E){this.ui.spinner.stop(),
+this.ui.handleError(E)}}))};DriveClient.prototype.showPermissions=function(k,c){var p=mxUtils.bind(this,function(){var q=new ConfirmDialog(this.ui,mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){var u=null!=c?c.getFolderUrl():"https://drive.google.com/open?id="+k;this.ui.editor.graph.openLink(u)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(q.container,400,150,!0,!0);q.init()});this.sharingFailed?p():this.checkToken(mxUtils.bind(this,
+function(){try{var q=new gapi.drive.share.ShareClient(this.appId);q.setOAuthToken(b);q.setItemIds([k]);q.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(u){for(var z=!1,G=0;G<u.length;G++)for(var E=0;E<u[G].addedNodes.length;E++){var F=u[G].addedNodes[E];"BUTTON"==F.nodeName&&"ok"==F.getAttribute("name")&&null!=F.parentNode&&null!=F.parentNode.parentNode&&
+"dialog"==F.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,F.click(),p(),z=!0):"DIV"==F.nodeName&&"shr-q-shr-r-shr-xb"==F.className&&(z=!0)}z&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(u){this.ui.handleError(u)}}))};DriveClient.prototype.clearPersistentToken=function(){var k=JSON.parse(this.getPersistentToken(!0))||{};delete k.current;delete k[this.userId];for(var c in k){k.current={userId:c,
+expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(k))};DriveClient.prototype.setPersistentToken=function(k,c){var p=JSON.parse(this.getPersistentToken(!0))||{};k.userId=this.userId;p.current=k;p[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(p),c)}})();DropboxFile=function(b,f,k){DrawioFile.call(this,b,f);this.stat=k};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};
DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};DropboxFile.prototype.getFileUrl=function(){return"https://www.dropbox.com/home/Apps"+this.ui.dropbox.appPath+this.stat.path_display};DropboxFile.prototype.getFolderUrl=function(){var b=this.getFileUrl();return b.substring(0,b.lastIndexOf("/"))};
-DropboxFile.prototype.getRevisions=function(b,f){var g=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});g.then(mxUtils.bind(this,function(c){try{for(var p=[],q=c.entries.length-1;0<=q;q--)mxUtils.bind(this,function(u){p.push({modifiedDate:u.client_modified,fileSize:u.size,getXml:mxUtils.bind(this,function(y,H){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:u.rev},y,H)}),getUrl:mxUtils.bind(this,function(y){return this.ui.getUrl(window.location.pathname+"?rev="+
-u.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=y?"&page="+y:""))+window.location.hash})})})(c.entries[q]);b(p)}catch(u){f(u)}}));g["catch"](function(c){f(c)})};DropboxFile.prototype.getLatestVersion=function(b,f){this.ui.dropbox.getFile(this.getId(),b,f)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,f,g,c,p){this.doSave(this.getTitle(),b,f,g,c,p)};DropboxFile.prototype.saveAs=function(b,f,g){this.doSave(b,!1,f,g)};
-DropboxFile.prototype.doSave=function(b,f,g,c,p,q){var u=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=u;this.saveFile(b,f,g,c,p,q)}),c,p,q])};
-DropboxFile.prototype.saveFile=function(b,f,g,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(f=mxUtils.bind(this,function(p){if(p)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var q=mxUtils.bind(this,function(y){var H=this.stat.path_display.lastIndexOf("/");H=1<H?this.stat.path_display.substring(1,H+1):null;this.ui.dropbox.saveFile(b,y,mxUtils.bind(this,function(E){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=E;this.contentChanged();
-null!=g&&g()}),mxUtils.bind(this,function(E){this.savingFile=!1;null!=c&&c(E)}),H)});if(Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var u=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(y){q(this.ui.base64ToBlob(y,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,u.scale,u.border)}else q(this.getData())}catch(y){if(this.savingFile=!1,null!=c)c(y);else throw y;}else null!=c&&c()}),this.getTitle()==b?f(!0):this.ui.dropbox.checkExists(b,
-f)):null!=g&&g()};DropboxFile.prototype.rename=function(b,f,g){this.ui.dropbox.renameFile(this,b,mxUtils.bind(this,function(c){this.hasSameExtension(b,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=f&&f()):(this.stat=c,this.descriptorChanged(),this.save(!0,f,g))}),g)};DropboxLibrary=function(b,f,g){DropboxFile.call(this,b,f,g)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(b,f,g){this.saveFile(b,!1,f,g)};DropboxLibrary.prototype.open=function(){};(function(){var b=null;window.DropboxClient=function(f){DrawioClient.call(this,f,"dbauth");this.client=new Dropbox({clientId:this.clientId})};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio-diagrams/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;DropboxClient.prototype.clientId=window.DRAWIO_DROPBOX_ID;DropboxClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"dropbox";DropboxClient.prototype.logout=
-function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(f,g,c){var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;g({code:App.ERROR_TIMEOUT})}),this.ui.timeout),u=this.client.usersGetCurrentAccount();
-u.then(mxUtils.bind(this,function(y){window.clearTimeout(q);p&&(this.setUser(new DrawioUser(y.account_id,y.email,y.name.display_name)),f())}));u["catch"](mxUtils.bind(this,function(y){window.clearTimeout(q);p&&(null==y||401!==y.status||c?g({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(f,g,!0)}),g)))}))};DropboxClient.prototype.authenticate=function(f,g){(new mxXmlRequest(this.redirectUri+
-"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),f,g):null!=g&&g(c)}),g)};DropboxClient.prototype.authenticateStep2=function(f,g,c){if(null==window.onDropboxCallback){var p=mxUtils.bind(this,function(){var q=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),null,"GET")).send(mxUtils.bind(this,function(u){if(200<=
-u.getStatus()&&299>=u.getStatus())try{b=JSON.parse(u.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),g()}catch(y){c({message:mxResources.get("authFailed"),retry:p})}else this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==u.getStatus()?p():c({message:mxResources.get("accessDenied"),retry:p})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(u,y){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+
-(u?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(H,E){if(q){window.onDropboxCallback=null;q=!1;try{null==H?c({message:mxResources.get("accessDenied"),retry:p}):(null!=y&&y(),b=H.access_token,this.client.setAccessToken(b),this.setUser(null),u&&this.setPersistentToken("remembered"),g())}catch(F){c(F)}finally{null!=
-E&&E.close()}}else null!=E&&E.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onDropboxCallback=null,q=!1,c({message:mxResources.get("accessDenied"),retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(f,g,c){var p=mxUtils.bind(this,function(u){var y=!0,H=window.setTimeout(mxUtils.bind(this,function(){y=!1;c({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout),E=f();E.then(mxUtils.bind(this,
-function(F){window.clearTimeout(H);y&&null!=g&&g(F)}));E["catch"](mxUtils.bind(this,function(F){window.clearTimeout(H);y&&(null==F||500!=F.status&&400!=F.status&&401!=F.status?c({message:mxResources.get("error")+" "+F.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,u?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){q(!0)},c)})}):this.authenticate(function(){p(!0)},c)))}))}),q=mxUtils.bind(this,function(u){null==this.user?
-this.updateUser(function(){q(!0)},c,u):p(u)});null==b?this.authenticate(function(){q(!0)},c):q(!1)};DropboxClient.prototype.getLibrary=function(f,g,c){this.getFile(f,g,c,!0)};DropboxClient.prototype.getFile=function(f,g,c,p){p=null!=p?p:!1;var q=/\.png$/i.test(f);if(/^https:\/\//i.test(f)||/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&q){var u=mxUtils.bind(this,function(){var y=f.split("/");this.ui.convertFile(f,0<y.length?y[y.length-1]:f,null,this.extension,
-g,c)});null!=b?u():this.authenticate(u,c)}else u={path:"/"+f},null!=urlParams.rev&&(u.rev=urlParams.rev),this.readFile(u,mxUtils.bind(this,function(y,H){var E=null;if(0<(q?y.lastIndexOf(","):-1)){var F=this.ui.extractGraphModelFromPng(y);null!=F&&0<F.length?y=F:E=new LocalFile(this,y,f,!0)}g(null!=E?E:p?new DropboxLibrary(this.ui,y,H):new DropboxFile(this.ui,y,H))}),c,q)};DropboxClient.prototype.readFile=function(f,g,c,p){var q=mxUtils.bind(this,function(y){var H=!0,E=window.setTimeout(mxUtils.bind(this,
-function(){H=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),F=this.client.filesGetMetadata({path:"/"+f.path.substring(1),include_deleted:!1});F.then(mxUtils.bind(this,function(d){}));F["catch"](function(d){window.clearTimeout(E);H&&null!=d&&409==d.status&&(H=!1,c({message:mxResources.get("fileNotFound")}))});F=this.client.filesDownload(f);F.then(mxUtils.bind(this,function(d){window.clearTimeout(E);if(H){H=!1;try{var k=new FileReader;k.onload=mxUtils.bind(this,function(l){g(k.result,d)});p?k.readAsDataURL(d.fileBlob):
-k.readAsText(d.fileBlob)}catch(l){c(l)}}}));F["catch"](mxUtils.bind(this,function(d){window.clearTimeout(E);H&&(H=!1,null==d||500!=d.status&&400!=d.status&&401!=d.status?c({message:mxResources.get("error")+" "+d.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){u(!0)},c)})}):this.authenticate(function(){q(!0)},c)))}))}),u=mxUtils.bind(this,function(y){null==this.user?this.updateUser(function(){u(!0)},
-c,y):q(y)});null==b?this.authenticate(function(){u(!0)},c):u(!1)};DropboxClient.prototype.checkExists=function(f,g,c){var p=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+f.toLowerCase(),include_deleted:!1})});this.executePromise(p,mxUtils.bind(this,function(q){c?g(!1,!0,q):this.ui.confirm(mxResources.get("replaceIt",[f]),function(){g(!0,!0,q)},function(){g(!1,!0,q)})}),function(q){g(!0,!1)})};DropboxClient.prototype.renameFile=function(f,g,c,p){if(/[\\\/:\?\*"\|]/.test(g))p({message:mxResources.get("dropboxCharsNotAllowed")});
-else{if(null!=f&&null!=g){var q=f.stat.path_display.substring(1),u=q.lastIndexOf("/");0<u&&(g=q.substring(0,u+1)+g)}null!=f&&null!=g&&f.stat.path_lower.substring(1)!==g.toLowerCase()?this.checkExists(g,mxUtils.bind(this,function(y,H,E){y?(y=mxUtils.bind(this,function(F){F=mxUtils.bind(this,function(){return this.client.filesMove({from_path:f.stat.path_display,to_path:"/"+g,autorename:!1})});this.executePromise(F,c,p)}),H&&E.path_lower.substring(1)!==g.toLowerCase()?(H=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+
-g.toLowerCase()})}),this.executePromise(H,y,p)):y()):p()})):p({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(f,g,c,p){this.insertFile(f,g,c,p,!0)};DropboxClient.prototype.insertFile=function(f,g,c,p,q){q=null!=q?q:!1;this.checkExists(f,mxUtils.bind(this,function(u){u?this.saveFile(f,g,mxUtils.bind(this,function(y){q?c(new DropboxLibrary(this.ui,g,y)):c(new DropboxFile(this.ui,g,y))}),p):p()}))};DropboxClient.prototype.saveFile=function(f,g,c,p,q){if(/[\\\/:\?\*"\|]/.test(f))p({message:mxResources.get("dropboxCharsNotAllowed")});
-else if(15E7<=g.length)p({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(g.length)+" / 150 MB)"});else{q=null!=q?q:"";var u=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+q+f,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([g],{type:"text/plain"})})});this.executePromise(u,c,p)}};DropboxClient.prototype.pickLibrary=function(f){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(g){if(this.ui.spinner.spin(document.body,
-mxResources.get("loading"))){var c=mxUtils.bind(this,function(u){this.ui.spinner.stop();this.ui.handleError(u)}),p=null!=g[0].link?g[0].link.indexOf(this.appPath):-1;if(0<p){var q=decodeURIComponent(g[0].link.substring(p+this.appPath.length-1));this.readFile({path:q},mxUtils.bind(this,function(u,y){if(null!=y&&y.id==g[0].id)try{this.ui.spinner.stop(),f(q.substring(1),new DropboxLibrary(this.ui,u,y))}catch(H){this.ui.handleError(H)}else this.createLibrary(g[0],f,c)}),c)}else this.createLibrary(g[0],
-f,c)}})})};DropboxClient.prototype.createLibrary=function(f,g,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[f.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(f.link,mxUtils.bind(this,function(p){this.insertFile(f.name,p,mxUtils.bind(this,function(q){try{this.ui.spinner.stop(),g(q.getHash().substring(1),q)}catch(u){c(u)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(f,g){null!=
-Dropbox.choose?(f=null!=f?f:mxUtils.bind(this,function(c,p){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):p.getHash(),null,p)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(g)this.ui.spinner.stop(),f(c[0].link);else{var p=mxUtils.bind(this,function(E){this.ui.spinner.stop();this.ui.handleError(E)}),q=mxUtils.bind(this,function(E,F){this.ui.spinner.stop();f(E,
-F)}),u=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!Editor.useCanvasForExport&&u)q(c[0].link);else{var y=null!=c[0].link?c[0].link.indexOf(this.appPath):-1;if(0<y){var H=decodeURIComponent(c[0].link.substring(y+this.appPath.length-1));this.readFile({path:H},mxUtils.bind(this,function(E,F){if(null!=F&&F.id==c[0].id){var d=u?E.lastIndexOf(","):-1;this.ui.spinner.stop();var k=null;0<d&&(d=this.ui.extractGraphModelFromPng(E),null!=d&&0<d.length?E=d:k=new LocalFile(this,
-E,H,!0));f(H.substring(1),null!=k?k:new DropboxFile(this.ui,E,F))}else this.createFile(c[0],q,p)}),p,u)}else this.createFile(c[0],q,p)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(f,g,c){var p=/(\.png)$/i.test(f.name);this.ui.editor.loadUrl(f.link,mxUtils.bind(this,function(q){null!=q&&0<q.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[f.name]),mxUtils.bind(this,
-function(){var u=p?q.lastIndexOf(","):-1;0<u&&(u=this.ui.extractGraphModelFromPng(q.substring(u+1)),null!=u&&0<u.length&&(q=u));this.insertFile(f.name,q,mxUtils.bind(this,function(y){g(f.name,y)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,p)}})();OneDriveFile=function(b,f,g){DrawioFile.call(this,b,f);this.meta=g};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0};
-OneDriveFile.prototype.getFileUrl=function(){var b=this.meta.webUrl;b=b.substring(0,b.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)b="https://onedrive.live.com/?cid="+encodeURIComponent(this.meta.parentReference.driveId)+"&id="+encodeURIComponent(this.meta.id);else if("documentLibrary"==this.meta.parentReference.driveType){var f=this.meta.parentReference.path;f=f.substring(f.indexOf("/root:")+6);var g=this.meta.webUrl;b=g.substring(0,
-g.length-f.length-encodeURIComponent(this.meta.name).length-1);g=g.substring(g.indexOf("/",8));b=b+"/Forms/AllItems.aspx?id="+g+"&parent="+g.substring(0,g.lastIndexOf("/"))}else if("business"==this.meta.parentReference.driveType){b=this.meta["@microsoft.graph.downloadUrl"];var c=b.indexOf("/_layouts/15/download.aspx?");f=g=this.meta.webUrl;g=g.substring(8);g=g.substring(g.indexOf("/"));f=f.substring(0,f.lastIndexOf("/"));f=f.substring(f.indexOf("/",8));b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+
-g+"&parent="+f}}catch(p){}return b};OneDriveFile.prototype.getFolderUrl=function(){var b=this.meta.webUrl,f=encodeURIComponent(this.meta.name);b.substring(b.length-f.length,b.length)==f&&(b=b.substring(0,b.length-f.length));return b};OneDriveFile.prototype.share=function(){this.ui.openLink(this.getFileUrl())};OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};
+DropboxFile.prototype.getRevisions=function(b,f){var k=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});k.then(mxUtils.bind(this,function(c){try{for(var p=[],q=c.entries.length-1;0<=q;q--)mxUtils.bind(this,function(u){p.push({modifiedDate:u.client_modified,fileSize:u.size,getXml:mxUtils.bind(this,function(z,G){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:u.rev},z,G)}),getUrl:mxUtils.bind(this,function(z){return this.ui.getUrl(window.location.pathname+"?rev="+
+u.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=z?"&page="+z:""))+window.location.hash})})})(c.entries[q]);b(p)}catch(u){f(u)}}));k["catch"](function(c){f(c)})};DropboxFile.prototype.getLatestVersion=function(b,f){this.ui.dropbox.getFile(this.getId(),b,f)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,f,k,c,p){this.doSave(this.getTitle(),b,f,k,c,p)};DropboxFile.prototype.saveAs=function(b,f,k){this.doSave(b,!1,f,k)};
+DropboxFile.prototype.doSave=function(b,f,k,c,p,q){var u=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=u;this.saveFile(b,f,k,c,p,q)}),c,p,q])};
+DropboxFile.prototype.saveFile=function(b,f,k,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(f=mxUtils.bind(this,function(p){if(p)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var q=mxUtils.bind(this,function(z){var G=this.stat.path_display.lastIndexOf("/");G=1<G?this.stat.path_display.substring(1,G+1):null;this.ui.dropbox.saveFile(b,z,mxUtils.bind(this,function(E){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=E;this.contentChanged();
+null!=k&&k()}),mxUtils.bind(this,function(E){this.savingFile=!1;null!=c&&c(E)}),G)});if(Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var u=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(z){q(this.ui.base64ToBlob(z,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,u.scale,u.border)}else q(this.getData())}catch(z){if(this.savingFile=!1,null!=c)c(z);else throw z;}else null!=c&&c()}),this.getTitle()==b?f(!0):this.ui.dropbox.checkExists(b,
+f)):null!=k&&k()};DropboxFile.prototype.rename=function(b,f,k){this.ui.dropbox.renameFile(this,b,mxUtils.bind(this,function(c){this.hasSameExtension(b,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=f&&f()):(this.stat=c,this.descriptorChanged(),this.save(!0,f,k))}),k)};DropboxLibrary=function(b,f,k){DropboxFile.call(this,b,f,k)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(b,f,k){this.saveFile(b,!1,f,k)};DropboxLibrary.prototype.open=function(){};(function(){var b=null;window.DropboxClient=function(f){DrawioClient.call(this,f,"dbauth");this.client=new Dropbox({clientId:this.clientId})};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio-diagrams/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;DropboxClient.prototype.clientId=window.DRAWIO_DROPBOX_ID;DropboxClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"dropbox";DropboxClient.prototype.logout=
+function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(f,k,c){var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;k({code:App.ERROR_TIMEOUT})}),this.ui.timeout),u=this.client.usersGetCurrentAccount();
+u.then(mxUtils.bind(this,function(z){window.clearTimeout(q);p&&(this.setUser(new DrawioUser(z.account_id,z.email,z.name.display_name)),f())}));u["catch"](mxUtils.bind(this,function(z){window.clearTimeout(q);p&&(null==z||401!==z.status||c?k({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(f,k,!0)}),k)))}))};DropboxClient.prototype.authenticate=function(f,k){(new mxXmlRequest(this.redirectUri+
+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),f,k):null!=k&&k(c)}),k)};DropboxClient.prototype.authenticateStep2=function(f,k,c){if(null==window.onDropboxCallback){var p=mxUtils.bind(this,function(){var q=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),null,"GET")).send(mxUtils.bind(this,function(u){if(200<=
+u.getStatus()&&299>=u.getStatus())try{b=JSON.parse(u.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),k()}catch(z){c({message:mxResources.get("authFailed"),retry:p})}else this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==u.getStatus()?p():c({message:mxResources.get("accessDenied"),retry:p})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(u,z){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+
+(u?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(G,E){if(q){window.onDropboxCallback=null;q=!1;try{null==G?c({message:mxResources.get("accessDenied"),retry:p}):(null!=z&&z(),b=G.access_token,this.client.setAccessToken(b),this.setUser(null),u&&this.setPersistentToken("remembered"),k())}catch(F){c(F)}finally{null!=
+E&&E.close()}}else null!=E&&E.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onDropboxCallback=null,q=!1,c({message:mxResources.get("accessDenied"),retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(f,k,c){var p=mxUtils.bind(this,function(u){var z=!0,G=window.setTimeout(mxUtils.bind(this,function(){z=!1;c({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout),E=f();E.then(mxUtils.bind(this,
+function(F){window.clearTimeout(G);z&&null!=k&&k(F)}));E["catch"](mxUtils.bind(this,function(F){window.clearTimeout(G);z&&(null==F||500!=F.status&&400!=F.status&&401!=F.status?c({message:mxResources.get("error")+" "+F.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,u?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){q(!0)},c)})}):this.authenticate(function(){p(!0)},c)))}))}),q=mxUtils.bind(this,function(u){null==this.user?
+this.updateUser(function(){q(!0)},c,u):p(u)});null==b?this.authenticate(function(){q(!0)},c):q(!1)};DropboxClient.prototype.getLibrary=function(f,k,c){this.getFile(f,k,c,!0)};DropboxClient.prototype.getFile=function(f,k,c,p){p=null!=p?p:!1;var q=/\.png$/i.test(f);if(/^https:\/\//i.test(f)||/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&q){var u=mxUtils.bind(this,function(){var z=f.split("/");this.ui.convertFile(f,0<z.length?z[z.length-1]:f,null,this.extension,
+k,c)});null!=b?u():this.authenticate(u,c)}else u={path:"/"+f},null!=urlParams.rev&&(u.rev=urlParams.rev),this.readFile(u,mxUtils.bind(this,function(z,G){var E=null;if(0<(q?z.lastIndexOf(","):-1)){var F=this.ui.extractGraphModelFromPng(z);null!=F&&0<F.length?z=F:E=new LocalFile(this,z,f,!0)}k(null!=E?E:p?new DropboxLibrary(this.ui,z,G):new DropboxFile(this.ui,z,G))}),c,q)};DropboxClient.prototype.readFile=function(f,k,c,p){var q=mxUtils.bind(this,function(z){var G=!0,E=window.setTimeout(mxUtils.bind(this,
+function(){G=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),F=this.client.filesGetMetadata({path:"/"+f.path.substring(1),include_deleted:!1});F.then(mxUtils.bind(this,function(d){}));F["catch"](function(d){window.clearTimeout(E);G&&null!=d&&409==d.status&&(G=!1,c({message:mxResources.get("fileNotFound")}))});F=this.client.filesDownload(f);F.then(mxUtils.bind(this,function(d){window.clearTimeout(E);if(G){G=!1;try{var g=new FileReader;g.onload=mxUtils.bind(this,function(l){k(g.result,d)});p?g.readAsDataURL(d.fileBlob):
+g.readAsText(d.fileBlob)}catch(l){c(l)}}}));F["catch"](mxUtils.bind(this,function(d){window.clearTimeout(E);G&&(G=!1,null==d||500!=d.status&&400!=d.status&&401!=d.status?c({message:mxResources.get("error")+" "+d.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,z?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){u(!0)},c)})}):this.authenticate(function(){q(!0)},c)))}))}),u=mxUtils.bind(this,function(z){null==this.user?this.updateUser(function(){u(!0)},
+c,z):q(z)});null==b?this.authenticate(function(){u(!0)},c):u(!1)};DropboxClient.prototype.checkExists=function(f,k,c){var p=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+f.toLowerCase(),include_deleted:!1})});this.executePromise(p,mxUtils.bind(this,function(q){c?k(!1,!0,q):this.ui.confirm(mxResources.get("replaceIt",[f]),function(){k(!0,!0,q)},function(){k(!1,!0,q)})}),function(q){k(!0,!1)})};DropboxClient.prototype.renameFile=function(f,k,c,p){if(/[\\\/:\?\*"\|]/.test(k))p({message:mxResources.get("dropboxCharsNotAllowed")});
+else{if(null!=f&&null!=k){var q=f.stat.path_display.substring(1),u=q.lastIndexOf("/");0<u&&(k=q.substring(0,u+1)+k)}null!=f&&null!=k&&f.stat.path_lower.substring(1)!==k.toLowerCase()?this.checkExists(k,mxUtils.bind(this,function(z,G,E){z?(z=mxUtils.bind(this,function(F){F=mxUtils.bind(this,function(){return this.client.filesMove({from_path:f.stat.path_display,to_path:"/"+k,autorename:!1})});this.executePromise(F,c,p)}),G&&E.path_lower.substring(1)!==k.toLowerCase()?(G=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+
+k.toLowerCase()})}),this.executePromise(G,z,p)):z()):p()})):p({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(f,k,c,p){this.insertFile(f,k,c,p,!0)};DropboxClient.prototype.insertFile=function(f,k,c,p,q){q=null!=q?q:!1;this.checkExists(f,mxUtils.bind(this,function(u){u?this.saveFile(f,k,mxUtils.bind(this,function(z){q?c(new DropboxLibrary(this.ui,k,z)):c(new DropboxFile(this.ui,k,z))}),p):p()}))};DropboxClient.prototype.saveFile=function(f,k,c,p,q){if(/[\\\/:\?\*"\|]/.test(f))p({message:mxResources.get("dropboxCharsNotAllowed")});
+else if(15E7<=k.length)p({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(k.length)+" / 150 MB)"});else{q=null!=q?q:"";var u=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+q+f,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([k],{type:"text/plain"})})});this.executePromise(u,c,p)}};DropboxClient.prototype.pickLibrary=function(f){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(k){if(this.ui.spinner.spin(document.body,
+mxResources.get("loading"))){var c=mxUtils.bind(this,function(u){this.ui.spinner.stop();this.ui.handleError(u)}),p=null!=k[0].link?k[0].link.indexOf(this.appPath):-1;if(0<p){var q=decodeURIComponent(k[0].link.substring(p+this.appPath.length-1));this.readFile({path:q},mxUtils.bind(this,function(u,z){if(null!=z&&z.id==k[0].id)try{this.ui.spinner.stop(),f(q.substring(1),new DropboxLibrary(this.ui,u,z))}catch(G){this.ui.handleError(G)}else this.createLibrary(k[0],f,c)}),c)}else this.createLibrary(k[0],
+f,c)}})})};DropboxClient.prototype.createLibrary=function(f,k,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[f.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(f.link,mxUtils.bind(this,function(p){this.insertFile(f.name,p,mxUtils.bind(this,function(q){try{this.ui.spinner.stop(),k(q.getHash().substring(1),q)}catch(u){c(u)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(f,k){null!=
+Dropbox.choose?(f=null!=f?f:mxUtils.bind(this,function(c,p){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):p.getHash(),null,p)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(k)this.ui.spinner.stop(),f(c[0].link);else{var p=mxUtils.bind(this,function(E){this.ui.spinner.stop();this.ui.handleError(E)}),q=mxUtils.bind(this,function(E,F){this.ui.spinner.stop();f(E,
+F)}),u=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!Editor.useCanvasForExport&&u)q(c[0].link);else{var z=null!=c[0].link?c[0].link.indexOf(this.appPath):-1;if(0<z){var G=decodeURIComponent(c[0].link.substring(z+this.appPath.length-1));this.readFile({path:G},mxUtils.bind(this,function(E,F){if(null!=F&&F.id==c[0].id){var d=u?E.lastIndexOf(","):-1;this.ui.spinner.stop();var g=null;0<d&&(d=this.ui.extractGraphModelFromPng(E),null!=d&&0<d.length?E=d:g=new LocalFile(this,
+E,G,!0));f(G.substring(1),null!=g?g:new DropboxFile(this.ui,E,F))}else this.createFile(c[0],q,p)}),p,u)}else this.createFile(c[0],q,p)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(f,k,c){var p=/(\.png)$/i.test(f.name);this.ui.editor.loadUrl(f.link,mxUtils.bind(this,function(q){null!=q&&0<q.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[f.name]),mxUtils.bind(this,
+function(){var u=p?q.lastIndexOf(","):-1;0<u&&(u=this.ui.extractGraphModelFromPng(q.substring(u+1)),null!=u&&0<u.length&&(q=u));this.insertFile(f.name,q,mxUtils.bind(this,function(z){k(f.name,z)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,p)}})();OneDriveFile=function(b,f,k){DrawioFile.call(this,b,f);this.meta=k};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0};
+OneDriveFile.prototype.getFileUrl=function(){var b=this.meta.webUrl;b=b.substring(0,b.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)b="https://onedrive.live.com/?cid="+encodeURIComponent(this.meta.parentReference.driveId)+"&id="+encodeURIComponent(this.meta.id);else if("documentLibrary"==this.meta.parentReference.driveType){var f=this.meta.parentReference.path;f=f.substring(f.indexOf("/root:")+6);var k=this.meta.webUrl;b=k.substring(0,
+k.length-f.length-encodeURIComponent(this.meta.name).length-1);k=k.substring(k.indexOf("/",8));b=b+"/Forms/AllItems.aspx?id="+k+"&parent="+k.substring(0,k.lastIndexOf("/"))}else if("business"==this.meta.parentReference.driveType){b=this.meta["@microsoft.graph.downloadUrl"];var c=b.indexOf("/_layouts/15/download.aspx?");f=k=this.meta.webUrl;k=k.substring(8);k=k.substring(k.indexOf("/"));f=f.substring(0,f.lastIndexOf("/"));f=f.substring(f.indexOf("/",8));b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+
+k+"&parent="+f}}catch(p){}return b};OneDriveFile.prototype.getFolderUrl=function(){var b=this.meta.webUrl,f=encodeURIComponent(this.meta.name);b.substring(b.length-f.length,b.length)==f&&(b=b.substring(0,b.length-f.length));return b};OneDriveFile.prototype.share=function(){this.ui.openLink(this.getFileUrl())};OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};
OneDriveFile.prototype.getIdOf=function(b,f){return(null!=b.parentReference&&null!=b.parentReference.driveId?b.parentReference.driveId+"/":"")+(null!=f?b.parentReference.id:b.id+(b.folder&&b.folder.isRoot?"/root":""))};OneDriveFile.prototype.getChannelId=function(){return"W-"+DrawioFile.prototype.getChannelId.apply(this,arguments)};OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.getId())};OneDriveFile.prototype.getMode=function(){return App.MODE_ONEDRIVE};
OneDriveFile.prototype.isAutosaveOptional=function(){return!0};OneDriveFile.prototype.getTitle=function(){return this.meta.name};OneDriveFile.prototype.isRenamable=function(){return!0};OneDriveFile.prototype.isOptimisticSync=function(){return!0};OneDriveFile.prototype.isSyncSupported=function(){return!0};OneDriveFile.prototype.getSize=function(){return this.meta.size};OneDriveFile.prototype.isConflict=function(b){return null!=b&&(412==b.getStatus()||409==b.getStatus())};
-OneDriveFile.prototype.getCurrentUser=function(){return null!=this.ui.oneDrive?this.ui.oneDrive.user:null};OneDriveFile.prototype.loadDescriptor=function(b,f){this.ui.oneDrive.executeRequest(this.ui.oneDrive.getItemURL(this.getId()),mxUtils.bind(this,function(g){200<=g.getStatus()&&299>=g.getStatus()?b(JSON.parse(g.getText())):null!=f&&f()}),f)};OneDriveFile.prototype.getLatestVersion=function(b,f){this.ui.oneDrive.getFile(this.getId(),b,f)};OneDriveFile.prototype.getDescriptor=function(){return this.meta};
-OneDriveFile.prototype.setDescriptor=function(b){this.meta=b};OneDriveFile.prototype.getDescriptorEtag=function(b){return b.eTag};OneDriveFile.prototype.setDescriptorEtag=function(b,f){b.eTag=f};OneDriveFile.prototype.loadPatchDescriptor=function(b,f){var g=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(g+"?select=etag,file",mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?b(JSON.parse(c.getText())):f(this.ui.oneDrive.parseRequestText(c))}),f)};
-OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,f,g,c,p){this.doSave(this.getTitle(),b,f,g,c,p)};OneDriveFile.prototype.saveAs=function(b,f,g){this.doSave(b,!1,f,g)};
-OneDriveFile.prototype.doSave=function(b,f,g,c,p,q){var u=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=u;this.saveFile(b,f,g,c,p,q)}),c,p,q])};
-OneDriveFile.prototype.saveFile=function(b,f,g,c,p,q){if(!this.isEditable())null!=g&&g();else if(!this.savingFile)if(this.getTitle()==b){var u=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var y=q||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),H=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(E,F){this.setModified(this.getShadowModified());
-this.savingFile=!1;this.meta=E;this.fileSaved(F,H,mxUtils.bind(this,function(){this.contentChanged();null!=g&&g()}),c)}),mxUtils.bind(this,function(E,F){try{this.savingFile=!1,this.isConflict(F)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();u()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
-c(E)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}}),y)}catch(E){if(this.savingFile=!1,null!=c)c(E);else throw E;}});u()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(y){this.setModified(this.getShadowModified());this.savingFile=!1;null!=g&&g();this.ui.fileLoaded(y)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
-OneDriveFile.prototype.rename=function(b,f,g){var c=this.getCurrentRevisionId();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(p){this.hasSameExtension(b,this.getTitle())?(this.meta=p,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=f&&f(p)):(this.meta=p,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,f,g))}),g)};
-OneDriveFile.prototype.move=function(b,f,g){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.meta=c;this.descriptorChanged();null!=f&&f(c)}),g)};OneDriveLibrary=function(b,f,g){OneDriveFile.call(this,b,f,g)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,f,g){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c){this.desc=c;null!=f&&f(c)}),g)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(f,g,c,p){null==g&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(g=!0);null==c&&(c=null!=window.Editor?Editor.oneDriveInlinePicker:!0);null==p&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(p=!0);DrawioClient.call(this,f,g?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=g;this.inlinePicker=c;this.noLogout=p;f=JSON.parse(this.token);null!=f&&(this.endpointHint=null!=f.endpointHint?f.endpointHint.replace("/Documents",
+OneDriveFile.prototype.getCurrentUser=function(){return null!=this.ui.oneDrive?this.ui.oneDrive.user:null};OneDriveFile.prototype.loadDescriptor=function(b,f){this.ui.oneDrive.executeRequest(this.ui.oneDrive.getItemURL(this.getId()),mxUtils.bind(this,function(k){200<=k.getStatus()&&299>=k.getStatus()?b(JSON.parse(k.getText())):null!=f&&f()}),f)};OneDriveFile.prototype.getLatestVersion=function(b,f){this.ui.oneDrive.getFile(this.getId(),b,f)};OneDriveFile.prototype.getDescriptor=function(){return this.meta};
+OneDriveFile.prototype.setDescriptor=function(b){this.meta=b};OneDriveFile.prototype.getDescriptorEtag=function(b){return b.eTag};OneDriveFile.prototype.setDescriptorEtag=function(b,f){b.eTag=f};OneDriveFile.prototype.loadPatchDescriptor=function(b,f){var k=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(k+"?select=etag,file",mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?b(JSON.parse(c.getText())):f(this.ui.oneDrive.parseRequestText(c))}),f)};
+OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,f,k,c,p){this.doSave(this.getTitle(),b,f,k,c,p)};OneDriveFile.prototype.saveAs=function(b,f,k){this.doSave(b,!1,f,k)};
+OneDriveFile.prototype.doSave=function(b,f,k,c,p,q){var u=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=u;this.saveFile(b,f,k,c,p,q)}),c,p,q])};
+OneDriveFile.prototype.saveFile=function(b,f,k,c,p,q){if(!this.isEditable())null!=k&&k();else if(!this.savingFile)if(this.getTitle()==b){var u=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var z=q||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),G=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(E,F){this.setModified(this.getShadowModified());
+this.savingFile=!1;this.meta=E;this.fileSaved(F,G,mxUtils.bind(this,function(){this.contentChanged();null!=k&&k()}),c)}),mxUtils.bind(this,function(E,F){try{this.savingFile=!1,this.isConflict(F)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();u()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
+c(E)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}}),z)}catch(E){if(this.savingFile=!1,null!=c)c(E);else throw E;}});u()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(z){this.setModified(this.getShadowModified());this.savingFile=!1;null!=k&&k();this.ui.fileLoaded(z)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
+OneDriveFile.prototype.rename=function(b,f,k){var c=this.getCurrentRevisionId();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(p){this.hasSameExtension(b,this.getTitle())?(this.meta=p,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=f&&f(p)):(this.meta=p,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,f,k))}),k)};
+OneDriveFile.prototype.move=function(b,f,k){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.meta=c;this.descriptorChanged();null!=f&&f(c)}),k)};OneDriveLibrary=function(b,f,k){OneDriveFile.call(this,b,f,k)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,f,k){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c){this.desc=c;null!=f&&f(c)}),k)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(f,k,c,p){null==k&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(k=!0);null==c&&(c=null!=window.Editor?Editor.oneDriveInlinePicker:!0);null==p&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(p=!0);DrawioClient.call(this,f,k?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=k;this.inlinePicker=c;this.noLogout=p;f=JSON.parse(this.token);null!=f&&(this.endpointHint=null!=f.endpointHint?f.endpointHint.replace("/Documents",
"/_layouts/15/onedrive.aspx"):f.endpointHint)};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId=window.DRAWIO_MSGRAPH_CLIENT_ID||("test.draw.io"==window.location.hostname?"95e4b4ed-ed5c-4a05-935b-b411b4562ef2":"24b129a6-117b-4394-bdc8-3b9955e5cdef");OneDriveClient.prototype.clientId="app.diagrams.net"==window.location.hostname?"b5ff67d6-3155-4fca-965a-59a3655c4476":OneDriveClient.prototype.clientId;OneDriveClient.prototype.clientId="viewer.diagrams.net"==window.location.hostname?
"417a451a-a343-4788-b6c1-901e63182565":OneDriveClient.prototype.clientId;OneDriveClient.prototype.scopes="user.read files.readwrite.all sites.read.all";OneDriveClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"microsoft";OneDriveClient.prototype.pickerRedirectUri=window.DRAWIO_SERVER_URL+"onedrive3.html";OneDriveClient.prototype.defEndpointHint="api.onedrive.com";OneDriveClient.prototype.endpointHint=OneDriveClient.prototype.defEndpointHint;OneDriveClient.prototype.rootId={id:"root",name:"root",
parentReference:{driveId:"me"}};OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.authUrl="https://login.microsoftonline.com/"+(window.DRAWIO_MSGRAPH_TENANT_ID||"common");OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=
-function(f){if(null==f||""===f)return!1;for(var g=0;g<this.invalidFilenameRegExs.length;g++)if(this.invalidFilenameRegExs[g].test(f))return!1;return!0};OneDriveClient.prototype.get=function(f,g,c){f=new mxXmlRequest(f,null,"GET");f.setRequestHeaders=mxUtils.bind(this,function(p,q){p.setRequestHeader("Authorization","Bearer "+b)});f.send(g,c);return f};OneDriveClient.prototype.updateUser=function(f,g,c){var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;g({code:App.ERROR_TIMEOUT})}),this.ui.timeout);
-this.get(this.baseUrl+"/me",mxUtils.bind(this,function(u){window.clearTimeout(q);if(p)if(200>u.getStatus()||300<=u.getStatus())c?g({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(f,g,!0)}),g));else try{var y=JSON.parse(u.getText());this.setUser(new DrawioUser(y.id,y.mail,y.displayName));f()}catch(H){g(H)}}),mxUtils.bind(this,function(u){window.clearTimeout(q);p&&g(u)}))};OneDriveClient.prototype.resetTokenRefresh=function(f){null!=
-this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<f&&(this.tokenRefreshInterval=1E3*f,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*f))};OneDriveClient.prototype.authenticate=function(f,g,c){this.isExtAuth?(window.oneDriveAuth?window.oneDriveAuth:window.parent.oneDriveAuth)(mxUtils.bind(this,function(p){this.updateAuthInfo(p,!0,null==this.endpointHint,f,g)}),g,null!=
-window.urlParams&&"1"==urlParams.odAuthCancellable):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(p){200<=p.getStatus()&&299>=p.getStatus()?this.authenticateStep2(p.getText(),f,g,c):null!=g&&g({message:mxResources.get("error")+" "+p.getStatus()})}),g)};OneDriveClient.prototype.updateAuthInfo=function(f,g,c,p,q){c&&this.setUser(null);b=f.access_token;delete f.access_token;f.expiresOn=Date.now()+1E3*f.expires_in;this.tokenExpiresOn=f.expiresOn;f.remember=
-g;this.setPersistentToken(JSON.stringify(f),!g);this.resetTokenRefresh(f.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){p()}),q):p()};OneDriveClient.prototype.authenticateStep2=function(f,g,c,p){if(null==window.onOneDriveCallback){var q=mxUtils.bind(this,function(){var u=!0,y=JSON.parse(this.getPersistentToken(!0));null!=y?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),null,"GET")).send(mxUtils.bind(this,
-function(H){if(200<=H.getStatus()&&299>=H.getStatus())try{this.updateAuthInfo(JSON.parse(H.getText()),y.remember,!1,g,c)}catch(E){c({message:mxResources.get("authFailed"),retry:q})}else this.clearPersistentToken(),this.setUser(null),b=null,401!=H.getStatus()&&400!=H.getStatus()||p?c({message:mxResources.get("accessDenied"),retry:q}):q()}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(H,E){var F=this.authUrl+"/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+
-encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(H?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f);F=window.open(F,"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!=F&&(window.onOneDriveCallback=mxUtils.bind(this,function(d,
-k){if(u){window.onOneDriveCallback=null;u=!1;try{null==d?c({message:mxResources.get("accessDenied"),retry:q}):(null!=E&&E(),this.updateAuthInfo(d,H,!0,g,c))}catch(l){c(l)}finally{null!=k&&k.close()}}else null!=k&&k.close()}),F.focus())}),mxUtils.bind(this,function(){u&&(window.onOneDriveCallback=null,u=!1,c({message:mxResources.get("accessDenied"),retry:q}))}))});q()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(f,g){this.get(this.baseUrl+"/me/drive/root",
-mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var p=JSON.parse(c.getText());0<p.webUrl.indexOf(".sharepoint.com")?this.endpointHint=p.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var q=JSON.parse(this.getPersistentToken(!0));null!=q&&(q.endpointHint=this.endpointHint,this.setPersistentToken(JSON.stringify(q),!q.remember));f();return}}catch(u){}g({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),
-g)};OneDriveClient.prototype.executeRequest=function(f,g,c){var p=mxUtils.bind(this,function(q){var u=!0,y=window.setTimeout(mxUtils.bind(this,function(){u=!1;c({code:App.ERROR_TIMEOUT,retry:p})}),this.ui.timeout);this.get(f,mxUtils.bind(this,function(H){window.clearTimeout(y);u&&(200<=H.getStatus()&&299>=H.getStatus()||404==H.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),g(H)):q||401!==H.getStatus()&&400!==H.getStatus()?c(this.parseRequestText(H)):this.authenticate(function(){p(!0)},
-c,q))}),mxUtils.bind(this,function(H){window.clearTimeout(y);u&&c(H)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){p(!0)},c):p(!1)};OneDriveClient.prototype.checkToken=function(f,g){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(f,null!=g?g:this.emptyFn):f()};OneDriveClient.prototype.getItemRef=function(f){var g=f.split("/");return 1<g.length?{driveId:g[0],id:g[1]}:{id:f}};OneDriveClient.prototype.getItemURL=function(f,
-g){var c=f.split("/");return 1<c.length?(f=c[1],(g?"":this.baseUrl)+"/drives/"+c[0]+("root"==f?"/root":"/items/"+f)):(g?"":this.baseUrl)+"/me/drive/items/"+f};OneDriveClient.prototype.getLibrary=function(f,g,c){this.getFile(f,g,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(f){var g=f.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');0<g&&(f=f.substring(0,g));return f};OneDriveClient.prototype.getFile=function(f,
-g,c,p,q){q=null!=q?q:!1;this.executeRequest(this.getItemURL(f),mxUtils.bind(this,function(u){if(200<=u.getStatus()&&299>=u.getStatus()){var y=JSON.parse(u.getText()),H=/\.png$/i.test(y.name);if(/\.v(dx|sdx?)$/i.test(y.name)||/\.gliffy$/i.test(y.name)||/\.pdf$/i.test(y.name)||!Editor.useCanvasForExport&&H)this.ui.convertFile(y["@microsoft.graph.downloadUrl"],y.name,null!=y.file?y.file.mimeType:null,this.extension,g,c);else{var E=!0,F=window.setTimeout(mxUtils.bind(this,function(){E=!1;c({code:App.ERROR_TIMEOUT})}),
-this.ui.timeout);this.ui.editor.loadUrl(y["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(d){try{if(window.clearTimeout(F),E){/\.html$/i.test(y.name)&&(d=this.removeExtraHtmlContent(d));var k=null;if(0<(H?d.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(d);null!=l&&0<l.length?d=l:k=new LocalFile(this.ui,d,y.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)){var n=d.substring(22);d=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n)}Graph.fileSupport&&
-(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,y["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(d,mxUtils.bind(this,function(x){try{4==x.readyState&&(200<=x.status&&299>=x.status?g(new LocalFile(this.ui,x.responseText,y.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=c)c(A);else throw A;}}),y.name):null!=k?g(k):q?g(new OneDriveLibrary(this.ui,d,y)):g(new OneDriveFile(this.ui,d,y))}}catch(x){if(null!=c)c(x);else throw x;}}),mxUtils.bind(this,
-function(d){window.clearTimeout(F);E&&c(this.parseRequestText(d))}),H||null!=y.file&&null!=y.file.mimeType&&("image/"==y.file.mimeType.substring(0,6)&&"image/svg"!=y.file.mimeType.substring(0,9)||"application/pdf"==y.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(u))}),function(u){null!=c&&(null!=u&&null!=u.error&&"ObjectHandle is Invalid"===u.error.message&&(u.error.message=
-mxResources.get("fileNotFoundOrDenied")),c(u))})};OneDriveClient.prototype.renameFile=function(f,g,c,p){null!=f&&null!=g&&(this.isValidFilename(g)?this.checkExists(f.getParentId(),g,!1,mxUtils.bind(this,function(q){q?this.writeFile(this.getItemURL(f.getId()),JSON.stringify({name:g}),"PATCH","application/json",c,p):p()})):p({message:this.invalidFilenameRegExs[0].test(g)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(f,
-g,c,p){g=this.getItemRef(g);var q=this.getItemRef(f);g.driveId!=q.driveId?p({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(f),JSON.stringify({parentReference:g}),"PATCH","application/json",c,p)};OneDriveClient.prototype.insertLibrary=function(f,g,c,p,q){this.insertFile(f,g,c,p,!0,q)};OneDriveClient.prototype.insertFile=function(f,g,c,p,q,u){this.isValidFilename(f)?(q=null!=q?q:!1,this.checkExists(u,f,!0,mxUtils.bind(this,
-function(y){if(y){y="/me/drive/root";null!=u&&(y=this.getItemURL(u,!0));var H=mxUtils.bind(this,function(E){q?c(new OneDriveLibrary(this.ui,g,E)):c(new OneDriveFile(this.ui,g,E))});y=this.baseUrl+y+"/children/"+encodeURIComponent(f)+"/content";4E6<=g.length?this.writeFile(y,"","PUT",null,mxUtils.bind(this,function(E){this.writeLargeFile(this.getItemURL(E.id),g,H,p)}),p):this.writeFile(y,g,"PUT",null,H,p)}else p()}))):p({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):
-mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(f,g,c,p){var q="/me/drive/root";null!=f&&(q=this.getItemURL(f,!0));this.executeRequest(this.baseUrl+q+"/children/"+encodeURIComponent(g),mxUtils.bind(this,function(u){404==u.getStatus()?p(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[g]),function(){p(!0)},function(){p(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),
-function(){p(!1)}))}),function(u){p(!1)},!0)};OneDriveClient.prototype.saveFile=function(f,g,c,p){try{var q=f.getData(),u=mxUtils.bind(this,function(H){var E=mxUtils.bind(this,function(d){g(d,q)}),F=this.getItemURL(f.getId());4E6<=H.length?this.writeLargeFile(F,H,E,c,p):this.writeFile(F+"/content/",H,"PUT",null,E,c,p)});if(Editor.useCanvasForExport&&/(\.png)$/i.test(f.meta.name)){var y=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(H){u(this.ui.base64ToBlob(H,
-"image/png"))}),c,this.ui.getCurrentFile()!=f?q:null,y.scale,y.border)}else u(q)}catch(H){c(H)}};OneDriveClient.prototype.writeLargeFile=function(f,g,c,p,q){try{if(null!=g){var u=(new TextEncoder).encode(g).length,y=mxUtils.bind(this,function(E,F,d,k){try{k=k||0;var l=!0,n=null;n=window.setTimeout(mxUtils.bind(this,function(){l=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var x=g.substr(F,4194304),A=(new TextEncoder).encode(x).length,B=new mxXmlRequest(E,x,"PUT");B.setRequestHeaders=mxUtils.bind(this,
-function(I,G){I.setRequestHeader("Content-Range","bytes "+d+"-"+(d+A-1)+"/"+u)});B.send(mxUtils.bind(this,function(I){window.clearTimeout(n);if(l){var G=I.getStatus();200<=G&&299>=G?(G=F+x.length,G==g.length?c(JSON.parse(I.getText())):y(E,G,d+A,k)):500<=G&&599>=G&&2>k?(k++,y(E,F,d,k)):p(this.parseRequestText(I),I)}}),mxUtils.bind(this,function(I){window.clearTimeout(n);l&&p(this.parseRequestText(I))}))}catch(I){p(I)}}),H=mxUtils.bind(this,function(E){try{var F=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,
-function(){F=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(l){}var k=new mxXmlRequest(f+"/createUploadSession","{}","POST");k.setRequestHeaders=mxUtils.bind(this,function(l,n){l.setRequestHeader("Content-Type","application/json");l.setRequestHeader("Authorization","Bearer "+b);null!=q&&l.setRequestHeader("If-Match",q)});k.send(mxUtils.bind(this,function(l){window.clearTimeout(d);F&&(200<=l.getStatus()&&299>=l.getStatus()?(l=JSON.parse(l.getText()),y(l.uploadUrl,0,0)):E||401!==l.getStatus()?
-p(this.parseRequestText(l),l):this.authenticate(function(){H(!0)},p,E))}),mxUtils.bind(this,function(l){window.clearTimeout(d);F&&p(this.parseRequestText(l))}))}catch(l){p(l)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){H(!0)},p):H(!1)}else p({message:mxResources.get("unknownError")})}catch(E){p(E)}};OneDriveClient.prototype.writeFile=function(f,g,c,p,q,u,y){try{if(null!=f&&null!=g){var H=mxUtils.bind(this,function(E){try{var F=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,
-function(){F=!1;u({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(l){}var k=new mxXmlRequest(f,g,c);k.setRequestHeaders=mxUtils.bind(this,function(l,n){l.setRequestHeader("Content-Type",p||" ");l.setRequestHeader("Authorization","Bearer "+b);null!=y&&l.setRequestHeader("If-Match",y)});k.send(mxUtils.bind(this,function(l){window.clearTimeout(d);F&&(200<=l.getStatus()&&299>=l.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),q(JSON.parse(l.getText()))):E||401!==l.getStatus()?
-u(this.parseRequestText(l),l):this.authenticate(function(){H(!0)},u,E))}),mxUtils.bind(this,function(l){window.clearTimeout(d);F&&u(this.parseRequestText(l))}))}catch(l){u(l)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){H(!0)},u):H(!1)}else u({message:mxResources.get("unknownError")})}catch(E){u(E)}};OneDriveClient.prototype.parseRequestText=function(f){var g={message:mxResources.get("unknownError")};try{g=JSON.parse(f.getText()),g.status=f.getStatus(),g.error&&(g.error.status=
-g.status,g.error.code=g.status)}catch(c){}return g};OneDriveClient.prototype.pickLibrary=function(f){this.pickFile(function(g){f(g)})};OneDriveClient.prototype.createInlinePicker=function(f,g,c){return mxUtils.bind(this,function(){var p=null,q=document.createElement("div");q.style.position="relative";var u=new CustomDialog(this.ui,q,mxUtils.bind(this,function(){var y=p.getSelectedItem();if(null!=y)if(g&&"object"==typeof y.folder)f({value:[y]});else{if(!y.folder&&this.ui.spinner.spin(document.body,
-mxResources.get("loading"))){var H=OneDriveFile.prototype.getIdOf(y);this.executeRequest(this.getItemURL(H),mxUtils.bind(this,function(E){this.ui.spinner.stop();200<=E.getStatus()&&299>=E.getStatus()?(E=JSON.parse(E.getText()),f(H,{value:[E]})):this.ui.handleError({code:E.getStatus()})}),mxUtils.bind(this,function(E){this.ui.spinner.stop();this.ui.handleError(E)}))}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(g?"select":"open"),null,null,null,null,!0);
-this.ui.showDialog(u.container,550,500,!0,!0);q.style.width=parseInt(u.container.parentNode.style.width)-60+"px";q.style.height=parseInt(u.container.parentNode.style.height)-120+"px";p=new mxODPicker(q,null,mxUtils.bind(this,function(y,H,E,F){this.executeRequest(F?y:this.baseUrl+y,function(d){H(JSON.parse(d.getText()))},E)}),mxUtils.bind(this,function(y,H,E,F){this.executeRequest(this.baseUrl+"/drives/"+H+"/items/"+y,function(d){E(JSON.parse(d.getText()))},F)}),null,null,function(y){g?f({value:[y]}):
-f(OneDriveFile.prototype.getIdOf(y))},mxUtils.bind(this,function(y){this.ui.showError(mxResources.get("error"),y)}),g,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=function(f,g){var c=mxUtils.bind(this,function(q){this.ui.showError(mxResources.get("error"),q&&q.message?q.message:q)}),p=mxUtils.bind(this,function(q){var u=this.inlinePicker?this.createInlinePicker(f,!0):mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?
-null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(y){f(y);mxClient.IS_IE11&&(b=y.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});q?u():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){f({value:[this.rootId]})}),u,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,
-!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){p(this.inlinePicker&&g)}),c):p(g)};OneDriveClient.prototype.pickFile=function(f,g){f=null!=f?f:mxUtils.bind(this,function(q){this.ui.loadFile("W"+encodeURIComponent(q))});var c=mxUtils.bind(this,function(q){this.ui.showError(mxResources.get("authFailed"),q&&q.message?q.message:q)}),p=this.inlinePicker?this.createInlinePicker(f,null,g):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,
+function(f){if(null==f||""===f)return!1;for(var k=0;k<this.invalidFilenameRegExs.length;k++)if(this.invalidFilenameRegExs[k].test(f))return!1;return!0};OneDriveClient.prototype.get=function(f,k,c){f=new mxXmlRequest(f,null,"GET");f.setRequestHeaders=mxUtils.bind(this,function(p,q){p.setRequestHeader("Authorization","Bearer "+b)});f.send(k,c);return f};OneDriveClient.prototype.updateUser=function(f,k,c){var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;k({code:App.ERROR_TIMEOUT})}),this.ui.timeout);
+this.get(this.baseUrl+"/me",mxUtils.bind(this,function(u){window.clearTimeout(q);if(p)if(200>u.getStatus()||300<=u.getStatus())c?k({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(f,k,!0)}),k));else try{var z=JSON.parse(u.getText());this.setUser(new DrawioUser(z.id,z.mail,z.displayName));f()}catch(G){k(G)}}),mxUtils.bind(this,function(u){window.clearTimeout(q);p&&k(u)}))};OneDriveClient.prototype.resetTokenRefresh=function(f){null!=
+this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<f&&(this.tokenRefreshInterval=1E3*f,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*f))};OneDriveClient.prototype.authenticate=function(f,k,c){this.isExtAuth?(window.oneDriveAuth?window.oneDriveAuth:window.parent.oneDriveAuth)(mxUtils.bind(this,function(p){this.updateAuthInfo(p,!0,null==this.endpointHint,f,k)}),k,null!=
+window.urlParams&&"1"==urlParams.odAuthCancellable):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(p){200<=p.getStatus()&&299>=p.getStatus()?this.authenticateStep2(p.getText(),f,k,c):null!=k&&k({message:mxResources.get("error")+" "+p.getStatus()})}),k)};OneDriveClient.prototype.updateAuthInfo=function(f,k,c,p,q){c&&this.setUser(null);b=f.access_token;delete f.access_token;f.expiresOn=Date.now()+1E3*f.expires_in;this.tokenExpiresOn=f.expiresOn;f.remember=
+k;this.setPersistentToken(JSON.stringify(f),!k);this.resetTokenRefresh(f.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){p()}),q):p()};OneDriveClient.prototype.authenticateStep2=function(f,k,c,p){if(null==window.onOneDriveCallback){var q=mxUtils.bind(this,function(){var u=!0,z=JSON.parse(this.getPersistentToken(!0));null!=z?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),null,"GET")).send(mxUtils.bind(this,
+function(G){if(200<=G.getStatus()&&299>=G.getStatus())try{this.updateAuthInfo(JSON.parse(G.getText()),z.remember,!1,k,c)}catch(E){c({message:mxResources.get("authFailed"),retry:q})}else this.clearPersistentToken(),this.setUser(null),b=null,401!=G.getStatus()&&400!=G.getStatus()||p?c({message:mxResources.get("accessDenied"),retry:q}):q()}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(G,E){var F=this.authUrl+"/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+
+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(G?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f);F=window.open(F,"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!=F&&(window.onOneDriveCallback=mxUtils.bind(this,function(d,
+g){if(u){window.onOneDriveCallback=null;u=!1;try{null==d?c({message:mxResources.get("accessDenied"),retry:q}):(null!=E&&E(),this.updateAuthInfo(d,G,!0,k,c))}catch(l){c(l)}finally{null!=g&&g.close()}}else null!=g&&g.close()}),F.focus())}),mxUtils.bind(this,function(){u&&(window.onOneDriveCallback=null,u=!1,c({message:mxResources.get("accessDenied"),retry:q}))}))});q()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(f,k){this.get(this.baseUrl+"/me/drive/root",
+mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var p=JSON.parse(c.getText());0<p.webUrl.indexOf(".sharepoint.com")?this.endpointHint=p.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var q=JSON.parse(this.getPersistentToken(!0));null!=q&&(q.endpointHint=this.endpointHint,this.setPersistentToken(JSON.stringify(q),!q.remember));f();return}}catch(u){}k({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),
+k)};OneDriveClient.prototype.executeRequest=function(f,k,c){var p=mxUtils.bind(this,function(q){var u=!0,z=window.setTimeout(mxUtils.bind(this,function(){u=!1;c({code:App.ERROR_TIMEOUT,retry:p})}),this.ui.timeout);this.get(f,mxUtils.bind(this,function(G){window.clearTimeout(z);u&&(200<=G.getStatus()&&299>=G.getStatus()||404==G.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),k(G)):q||401!==G.getStatus()&&400!==G.getStatus()?c(this.parseRequestText(G)):this.authenticate(function(){p(!0)},
+c,q))}),mxUtils.bind(this,function(G){window.clearTimeout(z);u&&c(G)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){p(!0)},c):p(!1)};OneDriveClient.prototype.checkToken=function(f,k){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(f,null!=k?k:this.emptyFn):f()};OneDriveClient.prototype.getItemRef=function(f){var k=f.split("/");return 1<k.length?{driveId:k[0],id:k[1]}:{id:f}};OneDriveClient.prototype.getItemURL=function(f,
+k){var c=f.split("/");return 1<c.length?(f=c[1],(k?"":this.baseUrl)+"/drives/"+c[0]+("root"==f?"/root":"/items/"+f)):(k?"":this.baseUrl)+"/me/drive/items/"+f};OneDriveClient.prototype.getLibrary=function(f,k,c){this.getFile(f,k,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(f){var k=f.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');0<k&&(f=f.substring(0,k));return f};OneDriveClient.prototype.getFile=function(f,
+k,c,p,q){q=null!=q?q:!1;this.executeRequest(this.getItemURL(f),mxUtils.bind(this,function(u){if(200<=u.getStatus()&&299>=u.getStatus()){var z=JSON.parse(u.getText()),G=/\.png$/i.test(z.name);if(/\.v(dx|sdx?)$/i.test(z.name)||/\.gliffy$/i.test(z.name)||/\.pdf$/i.test(z.name)||!Editor.useCanvasForExport&&G)this.ui.convertFile(z["@microsoft.graph.downloadUrl"],z.name,null!=z.file?z.file.mimeType:null,this.extension,k,c);else{var E=!0,F=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(d){try{if(window.clearTimeout(F),E){/\.html$/i.test(z.name)&&(d=this.removeExtraHtmlContent(d));var g=null;if(0<(G?d.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(d);null!=l&&0<l.length?d=l:g=new LocalFile(this.ui,d,z.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)){var n=d.substring(22);d=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n)}Graph.fileSupport&&
+(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,z["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(d,mxUtils.bind(this,function(x){try{4==x.readyState&&(200<=x.status&&299>=x.status?k(new LocalFile(this.ui,x.responseText,z.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=c)c(A);else throw A;}}),z.name):null!=g?k(g):q?k(new OneDriveLibrary(this.ui,d,z)):k(new OneDriveFile(this.ui,d,z))}}catch(x){if(null!=c)c(x);else throw x;}}),mxUtils.bind(this,
+function(d){window.clearTimeout(F);E&&c(this.parseRequestText(d))}),G||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(u))}),function(u){null!=c&&(null!=u&&null!=u.error&&"ObjectHandle is Invalid"===u.error.message&&(u.error.message=
+mxResources.get("fileNotFoundOrDenied")),c(u))})};OneDriveClient.prototype.renameFile=function(f,k,c,p){null!=f&&null!=k&&(this.isValidFilename(k)?this.checkExists(f.getParentId(),k,!1,mxUtils.bind(this,function(q){q?this.writeFile(this.getItemURL(f.getId()),JSON.stringify({name:k}),"PATCH","application/json",c,p):p()})):p({message:this.invalidFilenameRegExs[0].test(k)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(f,
+k,c,p){k=this.getItemRef(k);var q=this.getItemRef(f);k.driveId!=q.driveId?p({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(f),JSON.stringify({parentReference:k}),"PATCH","application/json",c,p)};OneDriveClient.prototype.insertLibrary=function(f,k,c,p,q){this.insertFile(f,k,c,p,!0,q)};OneDriveClient.prototype.insertFile=function(f,k,c,p,q,u){this.isValidFilename(f)?(q=null!=q?q:!1,this.checkExists(u,f,!0,mxUtils.bind(this,
+function(z){if(z){z="/me/drive/root";null!=u&&(z=this.getItemURL(u,!0));var G=mxUtils.bind(this,function(E){q?c(new OneDriveLibrary(this.ui,k,E)):c(new OneDriveFile(this.ui,k,E))});z=this.baseUrl+z+"/children/"+encodeURIComponent(f)+"/content";4E6<=k.length?this.writeFile(z,"","PUT",null,mxUtils.bind(this,function(E){this.writeLargeFile(this.getItemURL(E.id),k,G,p)}),p):this.writeFile(z,k,"PUT",null,G,p)}else p()}))):p({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):
+mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(f,k,c,p){var q="/me/drive/root";null!=f&&(q=this.getItemURL(f,!0));this.executeRequest(this.baseUrl+q+"/children/"+encodeURIComponent(k),mxUtils.bind(this,function(u){404==u.getStatus()?p(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[k]),function(){p(!0)},function(){p(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),
+function(){p(!1)}))}),function(u){p(!1)},!0)};OneDriveClient.prototype.saveFile=function(f,k,c,p){try{var q=f.getData(),u=mxUtils.bind(this,function(G){var E=mxUtils.bind(this,function(d){k(d,q)}),F=this.getItemURL(f.getId());4E6<=G.length?this.writeLargeFile(F,G,E,c,p):this.writeFile(F+"/content/",G,"PUT",null,E,c,p)});if(Editor.useCanvasForExport&&/(\.png)$/i.test(f.meta.name)){var z=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(G){u(this.ui.base64ToBlob(G,
+"image/png"))}),c,this.ui.getCurrentFile()!=f?q:null,z.scale,z.border)}else u(q)}catch(G){c(G)}};OneDriveClient.prototype.writeLargeFile=function(f,k,c,p,q){try{if(null!=k){var u=(new TextEncoder).encode(k).length,z=mxUtils.bind(this,function(E,F,d,g){try{g=g||0;var l=!0,n=null;n=window.setTimeout(mxUtils.bind(this,function(){l=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var x=k.substr(F,4194304),A=(new TextEncoder).encode(x).length,B=new mxXmlRequest(E,x,"PUT");B.setRequestHeaders=mxUtils.bind(this,
+function(I,H){I.setRequestHeader("Content-Range","bytes "+d+"-"+(d+A-1)+"/"+u)});B.send(mxUtils.bind(this,function(I){window.clearTimeout(n);if(l){var H=I.getStatus();200<=H&&299>=H?(H=F+x.length,H==k.length?c(JSON.parse(I.getText())):z(E,H,d+A,g)):500<=H&&599>=H&&2>g?(g++,z(E,F,d,g)):p(this.parseRequestText(I),I)}}),mxUtils.bind(this,function(I){window.clearTimeout(n);l&&p(this.parseRequestText(I))}))}catch(I){p(I)}}),G=mxUtils.bind(this,function(E){try{var F=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,
+function(){F=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(l){}var g=new mxXmlRequest(f+"/createUploadSession","{}","POST");g.setRequestHeaders=mxUtils.bind(this,function(l,n){l.setRequestHeader("Content-Type","application/json");l.setRequestHeader("Authorization","Bearer "+b);null!=q&&l.setRequestHeader("If-Match",q)});g.send(mxUtils.bind(this,function(l){window.clearTimeout(d);F&&(200<=l.getStatus()&&299>=l.getStatus()?(l=JSON.parse(l.getText()),z(l.uploadUrl,0,0)):E||401!==l.getStatus()?
+p(this.parseRequestText(l),l):this.authenticate(function(){G(!0)},p,E))}),mxUtils.bind(this,function(l){window.clearTimeout(d);F&&p(this.parseRequestText(l))}))}catch(l){p(l)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){G(!0)},p):G(!1)}else p({message:mxResources.get("unknownError")})}catch(E){p(E)}};OneDriveClient.prototype.writeFile=function(f,k,c,p,q,u,z){try{if(null!=f&&null!=k){var G=mxUtils.bind(this,function(E){try{var F=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,
+function(){F=!1;u({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(l){}var g=new mxXmlRequest(f,k,c);g.setRequestHeaders=mxUtils.bind(this,function(l,n){l.setRequestHeader("Content-Type",p||" ");l.setRequestHeader("Authorization","Bearer "+b);null!=z&&l.setRequestHeader("If-Match",z)});g.send(mxUtils.bind(this,function(l){window.clearTimeout(d);F&&(200<=l.getStatus()&&299>=l.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),q(JSON.parse(l.getText()))):E||401!==l.getStatus()?
+u(this.parseRequestText(l),l):this.authenticate(function(){G(!0)},u,E))}),mxUtils.bind(this,function(l){window.clearTimeout(d);F&&u(this.parseRequestText(l))}))}catch(l){u(l)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){G(!0)},u):G(!1)}else u({message:mxResources.get("unknownError")})}catch(E){u(E)}};OneDriveClient.prototype.parseRequestText=function(f){var k={message:mxResources.get("unknownError")};try{k=JSON.parse(f.getText()),k.status=f.getStatus(),k.error&&(k.error.status=
+k.status,k.error.code=k.status)}catch(c){}return k};OneDriveClient.prototype.pickLibrary=function(f){this.pickFile(function(k){f(k)})};OneDriveClient.prototype.createInlinePicker=function(f,k,c){return mxUtils.bind(this,function(){var p=null,q=document.createElement("div");q.style.position="relative";var u=new CustomDialog(this.ui,q,mxUtils.bind(this,function(){var z=p.getSelectedItem();if(null!=z)if(k&&"object"==typeof z.folder)f({value:[z]});else{if(!z.folder&&this.ui.spinner.spin(document.body,
+mxResources.get("loading"))){var G=OneDriveFile.prototype.getIdOf(z);this.executeRequest(this.getItemURL(G),mxUtils.bind(this,function(E){this.ui.spinner.stop();200<=E.getStatus()&&299>=E.getStatus()?(E=JSON.parse(E.getText()),f(G,{value:[E]})):this.ui.handleError({code:E.getStatus()})}),mxUtils.bind(this,function(E){this.ui.spinner.stop();this.ui.handleError(E)}))}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(k?"select":"open"),null,null,null,null,!0);
+this.ui.showDialog(u.container,550,500,!0,!0);q.style.width=parseInt(u.container.parentNode.style.width)-60+"px";q.style.height=parseInt(u.container.parentNode.style.height)-120+"px";p=new mxODPicker(q,null,mxUtils.bind(this,function(z,G,E,F){this.executeRequest(F?z:this.baseUrl+z,function(d){G(JSON.parse(d.getText()))},E)}),mxUtils.bind(this,function(z,G,E,F){this.executeRequest(this.baseUrl+"/drives/"+G+"/items/"+z,function(d){E(JSON.parse(d.getText()))},F)}),null,null,function(z){k?f({value:[z]}):
+f(OneDriveFile.prototype.getIdOf(z))},mxUtils.bind(this,function(z){this.ui.showError(mxResources.get("error"),z)}),k,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=function(f,k){var c=mxUtils.bind(this,function(q){this.ui.showError(mxResources.get("error"),q&&q.message?q.message:q)}),p=mxUtils.bind(this,function(q){var u=this.inlinePicker?this.createInlinePicker(f,!0):mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?
+null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(z){f(z);mxClient.IS_IE11&&(b=z.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});q?u():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){f({value:[this.rootId]})}),u,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,
+!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){p(this.inlinePicker&&k)}),c):p(k)};OneDriveClient.prototype.pickFile=function(f,k){f=null!=f?f:mxUtils.bind(this,function(q){this.ui.loadFile("W"+encodeURIComponent(q))});var c=mxUtils.bind(this,function(q){this.ui.showError(mxResources.get("authFailed"),q&&q.message?q.message:q)}),p=this.inlinePicker?this.createInlinePicker(f,null,k):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,
action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference,webUrl",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(q){null!=q&&null!=q.value&&0<q.value.length&&(mxClient.IS_IE11&&(b=q.accessToken),f(OneDriveFile.prototype.getIdOf(q.value[0]),q))}),cancel:mxUtils.bind(this,function(){}),error:c});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});
null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){this.inlinePicker?p():this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),mxUtils.bind(this,function(){this.ui.hideDialog();p()}))).container,300,140,!0,!0)}),c):p()};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var f=localStorage.getItem("odpickerv7cache");null!=f&&'{"odsdkLoginHint":{'==f.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}window.open(this.authUrl+
-"/oauth2/v2.0/logout","logout","width=525,height=525,status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes");this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null}})();GitHubFile=function(b,f,g){DrawioFile.call(this,b,f);this.meta=g;this.peer=this.ui.gitHub};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.share=function(){this.ui.editor.graph.openLink("https://github.com/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/settings/access")};
+"/oauth2/v2.0/logout","logout","width=525,height=525,status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes");this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null}})();GitHubFile=function(b,f,k){DrawioFile.call(this,b,f);this.meta=k;this.peer=this.ui.gitHub};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.share=function(){this.ui.editor.graph.openLink("https://github.com/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/settings/access")};
GitHubFile.prototype.getId=function(){return encodeURIComponent(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:""):""):"")};GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+this.getId())};GitHubFile.prototype.getFileUrl=function(){return"https://github.com/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/blob/"+this.meta.ref+"/"+this.meta.path};
GitHubFile.prototype.getFolderUrl=function(){return"https://github.com/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/tree/"+this.meta.ref+"/"+this.meta.path.split("/").slice(0,-1).join("/")};
GitHubFile.prototype.getPublicUrl=function(b){if(null!=this.meta.download_url)try{""!=(new URL(this.meta.download_url)).search?b(null):mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(f){b(200<=f.getStatus()&&299>=f.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){b(null)}))}catch(f){b(null)}else b(null)};GitHubFile.prototype.isConflict=function(b){return null!=b&&409==b.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};
GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(b,f){this.peer.getFile(this.getId(),b,f)};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(b){this.meta=b};GitHubFile.prototype.getDescriptorEtag=function(b){return b.sha};
-GitHubFile.prototype.setDescriptorEtag=function(b,f){b.sha=f};GitHubFile.prototype.save=function(b,f,g,c,p,q){this.doSave(this.getTitle(),f,g,c,p,q)};GitHubFile.prototype.saveAs=function(b,f,g){this.doSave(b,f,g)};GitHubFile.prototype.doSave=function(b,f,g,c,p,q){var u=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=u;this.saveFile(b,!1,f,g,c,p,q)}),g,c,p])};
-GitHubFile.prototype.saveFile=function(b,f,g,c,p,q,u){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var y=mxUtils.bind(this,function(H){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var E=this.getCurrentEtag(),F=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(d){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,d);this.fileSaved(F,E,mxUtils.bind(this,function(){this.contentChanged();
-null!=g&&g()}),c)}),mxUtils.bind(this,function(d){this.savingFile=!1;this.isConflict(d)?(this.inConflictState=!0,null!=c&&(d.commitMessage=H,c(d))):null!=c&&c(d)}),q,H)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(d){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(k){this.setModified(this.getShadowModified());this.savingFile=!1;
-null!=g&&g();this.ui.fileLoaded(k)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,d,H)}))});null!=u?y(u):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(H){y(H)}),c)}else null!=g&&g()};GitHubLibrary=function(b,f,g){GitHubFile.call(this,b,f,g)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,f,g){this.saveFile(b,!1,f,g)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(f,g){DrawioClient.call(this,f,g||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"github2";GitHubClient.prototype.maxFileSize=
-5E7;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(f){b=f};GitHubClient.prototype.updateUser=function(f,g,c){var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;g({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),u=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),y=this.authToken+" "+b;u.setRequestHeaders=function(H,E){H.setRequestHeader("Authorization",y)};u.send(mxUtils.bind(this,function(){window.clearTimeout(q);p&&(401===
-u.getStatus()?c?g({code:u.getStatus(),message:this.getErrorMessage(u,mxResources.get("accessDenied"))}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(f,g,!0)}),g)):200>u.getStatus()||300<=u.getStatus()?g({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(u.getText()))),f()))}),g)};GitHubClient.prototype.createUser=function(f){return new DrawioUser(f.id,f.email,f.name)};GitHubClient.prototype.authenticate=function(f,g){(new mxXmlRequest(this.redirectUri+
-"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),f,g):null!=g&&g(c)}),g)};GitHubClient.prototype.authenticateStep2=function(f,g,c){if(null==window.onGitHubCallback){var p=mxUtils.bind(this,function(){var q=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),null,"GET")).send(mxUtils.bind(this,function(u){if(200<=
-u.getStatus()&&299>=u.getStatus())try{b=JSON.parse(u.getText()).access_token,this.setUser(null),g()}catch(y){c({message:mxResources.get("authFailed"),retry:p})}else this.clearPersistentToken(),this.setUser(null),b=null,401==u.getStatus()?p():c({message:mxResources.get("accessDenied"),retry:p})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(u,y){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+
-window.location.host+"&token="+f),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(H,E){q?(window.onGitHubCallback=null,q=!1,null==H?c({message:mxResources.get("accessDenied"),retry:p}):(null!=y&&y(),b=H.access_token,this.setUser(null),u&&this.setPersistentToken("remembered"),g(),null!=E&&E.close())):null!=E&&E.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onGitHubCallback=null,q=!1,c({message:mxResources.get("accessDenied"),
-retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(f,g){try{var c=JSON.parse(f.getText());null!=c&&null!=c.message&&(g=c.message)}catch(p){}return g};GitHubClient.prototype.showAuthorizeDialog=function(f,g){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/blog/single-repository-diagrams")}),f,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"),g,480,null,!1)};GitHubClient.prototype.executeRequest=function(f,g,c,p,q){var u=mxUtils.bind(this,function(H){var E=!0,F=window.setTimeout(mxUtils.bind(this,function(){E=!1;c({code:App.ERROR_TIMEOUT,retry:y})}),this.ui.timeout),d=this.authToken+" "+b;f.setRequestHeaders=function(k,l){k.setRequestHeader("Authorization",
-d)};f.send(mxUtils.bind(this,function(){window.clearTimeout(F);var k=mxUtils.bind(this,function(){var x=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){x();y()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(E)if(200<=f.getStatus()&&299>=f.getStatus()||p&&404==f.getStatus())g(f);else if(401===f.getStatus())H?c({code:f.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){y(!0)},
-c)})}):this.authenticate(function(){u(!0)},c);else if(403===f.getStatus()){var l=!1;try{var n=JSON.parse(f.getText());null!=n&&"Resource not accessible by integration"==n.message?k():(null!=n&&null!=n.errors&&0<n.errors.length&&(l="too_large"==n.errors[0].code),c({message:mxResources.get(l?"drawingTooLarge":"forbidden")}))}catch(x){c({message:mxResources.get(l?"drawingTooLarge":"forbidden")})}}else 404===f.getStatus()?q?c({code:f.getStatus(),message:this.getErrorMessage(f,mxResources.get("fileNotFound"))}):
-k():409===f.getStatus()?c({code:f.getStatus(),status:409}):c({code:f.getStatus(),message:this.getErrorMessage(f,mxResources.get("error")+" "+f.getStatus())})}),mxUtils.bind(this,function(k){window.clearTimeout(F);E&&c(k)}))}),y=mxUtils.bind(this,function(H){null==this.user?this.updateUser(function(){y(!0)},c,H):u(H)});null==b?this.authenticate(function(){y(!0)},c):y(!1)};GitHubClient.prototype.getLibrary=function(f,g,c){this.getFile(f,g,c,!0)};GitHubClient.prototype.getSha=function(f,g,c,p,q,u,y){var H=
-"&t="+(new Date).getTime();f=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+g+"/contents/"+c+"?ref="+p+H,null,"HEAD");this.executeRequest(f,mxUtils.bind(this,function(E){try{q(E.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(F){u(F)}}),u,null,y)};GitHubClient.prototype.getFile=function(f,g,c,p,q){p=null!=p?p:!1;var u=f.split("/"),y=u[0],H=u[1],E=u[2];f=u.slice(3,u.length).join("/");u=/\.png$/i.test(f);if(!q&&(/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&
-u))if(null!=b){q=this.baseUrl+"/repos/"+y+"/"+H+"/contents/"+f+"?ref="+E;var F={Authorization:"token "+b};u=f.split("/");this.ui.convertFile(q,0<u.length?u[u.length-1]:f,null,this.extension,g,c,null,F)}else c({message:mxResources.get("accessDenied")});else u="&t="+(new Date).getTime(),f=new mxXmlRequest(this.baseUrl+"/repos/"+y+"/"+H+"/contents/"+f+"?ref="+E+u,null,"GET"),this.executeRequest(f,mxUtils.bind(this,function(d){try{var k=JSON.parse(d.getText());if(""==k.content&&null!=k.git_url){var l=
-new mxXmlRequest(k.git_url,null,"GET");this.executeRequest(l,mxUtils.bind(this,function(n){n=JSON.parse(n.getText());""!=n.content?(k.content=n.content,k.encoding=n.encoding,g(this.createGitHubFile(y,H,E,k,p))):c({message:mxResources.get("errorLoadingFile")})}),c)}else g(this.createGitHubFile(y,H,E,k,p))}catch(n){c(n)}}),c)};GitHubClient.prototype.createGitHubFile=function(f,g,c,p,q){f={org:f,repo:g,ref:c,name:p.name,path:p.path,sha:p.sha,html_url:p.html_url,download_url:p.download_url};g=p.content;
-"base64"===p.encoding&&(/\.jpe?g$/i.test(p.name)?g="data:image/jpeg;base64,"+g:/\.gif$/i.test(p.name)?g="data:image/gif;base64,"+g:/\.png$/i.test(p.name)?(p=this.ui.extractGraphModelFromPng(g),g=null!=p&&0<p.length?p:"data:image/png;base64,"+g):g=Base64.decode(g));return q?new GitHubLibrary(this.ui,g,f):new GitHubFile(this.ui,g,f)};GitHubClient.prototype.insertLibrary=function(f,g,c,p,q){this.insertFile(f,g,c,p,!0,q,!1)};GitHubClient.prototype.insertFile=function(f,g,c,p,q,u,y){q=null!=q?q:!1;u=u.split("/");
-var H=u[0],E=u[1],F=u[2],d=u.slice(3,u.length).join("/");0<d.length&&(d+="/");d+=f;this.checkExists(H+"/"+E+"/"+F+"/"+d,!0,mxUtils.bind(this,function(k,l){k?q?(y||(g=Base64.encode(g)),this.showCommitDialog(f,!0,mxUtils.bind(this,function(n){this.writeFile(H,E,F,d,n,g,l,mxUtils.bind(this,function(x){try{var A=JSON.parse(x.getText());c(this.createGitHubFile(H,E,F,A.content,q))}catch(B){p(B)}}),p)}),p)):c(new GitHubFile(this.ui,g,{org:H,repo:E,ref:F,name:f,path:d,sha:l,isNew:!0})):p()}))};GitHubClient.prototype.showCommitDialog=
-function(f,g,c,p){var q=this.ui.spinner.pause();f=new FilenameDialog(this.ui,mxResources.get(g?"addedFile":"updateFile",[f]),mxResources.get("ok"),mxUtils.bind(this,function(u){q(function(){c(u)})}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){p()}));this.ui.showDialog(f.container,400,80,!0,!1);f.init()};GitHubClient.prototype.writeFile=function(f,g,c,p,q,u,y,H,E){u.length>=this.maxFileSize?E({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(u.length)+
-" / 1 MB)"}):(c={path:p,branch:decodeURIComponent(c),message:q,content:u},null!=y&&(c.sha=y),f=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+g+"/contents/"+p,JSON.stringify(c),"PUT"),this.executeRequest(f,mxUtils.bind(this,function(F){H(F)}),mxUtils.bind(this,function(F){404==F.code&&(F.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,F.code=null);E(F)})))};GitHubClient.prototype.checkExists=function(f,g,c){var p=f.split("/"),q=p[0],u=p[1],y=p[2];f=p.slice(3,p.length).join("/");
-this.getSha(q,u,f,y,mxUtils.bind(this,function(H){if(g){var E=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[f]),function(){E();c(!0,H)},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(H){c(!0)}),!0)};GitHubClient.prototype.saveFile=function(f,g,c,p,q){var u=f.meta.org,y=f.meta.repo,H=f.meta.ref,E=f.meta.path,F=mxUtils.bind(this,function(k,
-l){this.writeFile(u,y,H,E,q,l,k,mxUtils.bind(this,function(n){delete f.meta.isNew;g(JSON.parse(n.getText()).content.sha)}),mxUtils.bind(this,function(n){c(n)}))}),d=mxUtils.bind(this,function(){if(Editor.useCanvasForExport&&/(\.png)$/i.test(E)){var k=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(l){F(f.meta.sha,l)}),c,this.ui.getCurrentFile()!=f?f.getData():null,k.scale,k.border)}else F(f.meta.sha,Base64.encode(f.getData()))});p?this.getSha(u,y,E,
-H,mxUtils.bind(this,function(k){f.meta.sha=k;d()}),c):d()};GitHubClient.prototype.pickLibrary=function(f){this.pickFile(f)};GitHubClient.prototype.pickFolder=function(f){this.showGitHubDialog(!1,f,!0)};GitHubClient.prototype.pickFile=function(f){f=null!=f?f:mxUtils.bind(this,function(g){this.ui.loadFile("H"+encodeURIComponent(g))});this.showGitHubDialog(!0,f)};GitHubClient.prototype.showGitHubDialog=function(f,g,c){var p=null,q=null,u=null,y=null,H=document.createElement("div");H.style.whiteSpace=
-"nowrap";H.style.overflow="hidden";H.style.height="320px";var E=document.createElement("h3");mxUtils.write(E,mxResources.get(f?"selectFile":"selectFolder"));E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(E);E=this.ui.createToolbarButton(Editor.refreshImage,mxResources.get("refresh"),mxUtils.bind(this,function(){C()}));E.style.position="absolute";E.style.right="40px";E.style.top="26px";H.appendChild(E);var F=document.createElement("div");F.style.whiteSpace=
-"nowrap";F.style.border="1px solid lightgray";F.style.boxSizing="border-box";F.style.padding="4px";F.style.overflow="auto";F.style.lineHeight="1.2em";F.style.height="290px";H.appendChild(F);var d=document.createElement("div");d.style.textOverflow="ellipsis";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.padding="4px";d.style.width="100%";var k=new CustomDialog(this.ui,H,mxUtils.bind(this,function(){g(p+"/"+q+"/"+encodeURIComponent(u)+"/"+y)}),null,null,"https://www.drawio.com/blog/single-repository-diagrams",
-null,null,null,null,[[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")})]],"16px");this.ui.showDialog(k.container,420,370,!0,!0);f&&k.okButton.parentNode.removeChild(k.okButton);var l=mxUtils.bind(this,function(R,T,S,Q){var v=document.createElement("a");v.setAttribute("title",R);v.style.cursor="pointer";mxUtils.write(v,R);mxEvent.addListener(v,"click",
-T);Q&&(v.style.textDecoration="underline");null!=S&&(R=d.cloneNode(),R.style.padding=S,R.appendChild(v),v=R);return v}),n=mxUtils.bind(this,function(R){var T=document.createElement("div");T.style.marginBottom="8px";T.appendChild(l(p+"/"+q,mxUtils.bind(this,function(){y=null;C()}),null,!0));R||(mxUtils.write(T," / "),T.appendChild(l(decodeURIComponent(u),mxUtils.bind(this,function(){y=null;G()}),null,!0)));if(null!=y&&0<y.length){var S=y.split("/");for(R=0;R<S.length;R++)(function(Q){mxUtils.write(T,
-" / ");T.appendChild(l(S[Q],mxUtils.bind(this,function(){y=S.slice(0,Q+1).join("/");I()}),null,!0))})(R)}F.appendChild(T)}),x=mxUtils.bind(this,function(R){this.ui.handleError(R,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(y=u=q=p=null,C()):this.ui.hideDialog()}),null,{})}),A=null,B=null,I=mxUtils.bind(this,function(R){null==R&&(F.innerText="",R=1);var T=new mxXmlRequest(this.baseUrl+"/repos/"+p+"/"+q+"/contents/"+y+"?ref="+encodeURIComponent(u)+"&per_page=100&page="+
-R,null,"GET");this.ui.spinner.spin(F,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=B&&(mxEvent.removeListener(F,"scroll",B),B=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 S=mxUtils.bind(this,function(){I(R+1)});mxEvent.addListener(A,"click",S);this.executeRequest(T,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,
-function(){this.ui.spinner.stop();1==R&&(n(),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==y)y=null,C();else{var K=y.split("/");y=K.slice(0,K.length-1).join("/");I()}}),"4px")));var v=JSON.parse(Q.getText());if(null==v||0==v.length)c||(mxUtils.br(F),mxUtils.write(F,mxResources.get("noFiles")));else{var z=!0,N=0,J=mxUtils.bind(this,function(K){for(var m=0;m<v.length;m++)mxUtils.bind(this,function(t,D){if(K==("dir"==t.type)){D=d.cloneNode();D.style.backgroundColor=z?Editor.isDarkMode()?
-"#000000":"#eeeeee":"";z=!z;var M=document.createElement("img");M.src=IMAGE_PATH+"/"+("dir"==t.type?"folder.png":"file.png");M.setAttribute("align","absmiddle");M.style.marginRight="4px";M.style.marginTop="-4px";M.width=20;D.appendChild(M);D.appendChild(l(t.name+("dir"==t.type?"/":""),mxUtils.bind(this,function(){"dir"==t.type?(y=t.path,I()):f&&"file"==t.type&&(this.ui.hideDialog(),g(p+"/"+q+"/"+encodeURIComponent(u)+"/"+t.path))})));F.appendChild(D);N++}})(v[m],m)});J(!0);f&&J(!1)}}))}),x,!0)}),
-G=mxUtils.bind(this,function(R,T){null==R&&(F.innerText="",R=1);var S=new mxXmlRequest(this.baseUrl+"/repos/"+p+"/"+q+"/branches?per_page=100&page="+R,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(F,"scroll",B),B=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 Q=
-mxUtils.bind(this,function(){G(R+1)});mxEvent.addListener(A,"click",Q);this.executeRequest(S,mxUtils.bind(this,function(v){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==R&&(n(!0),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){y=null;C()}),"4px")));var z=JSON.parse(v.getText());if(null==z||0==z.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else if(1==z.length&&T)u=z[0].name,y="",I();else{for(var N=0;N<z.length;N++)mxUtils.bind(this,
-function(J,K){var m=d.cloneNode();m.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";m.appendChild(l(J.name,mxUtils.bind(this,function(){u=J.name;y="";I()})));F.appendChild(m)})(z[N],N);100==z.length&&(F.appendChild(A),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&Q()},mxEvent.addListener(F,"scroll",B))}}))}),x)}),C=mxUtils.bind(this,function(R){null==R&&(F.innerText="",R=1);var T=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+R,null,"GET");k.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=B&&mxEvent.removeListener(F,"scroll",B);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 S=mxUtils.bind(this,function(){C(R+1)});mxEvent.addListener(A,"click",S);this.executeRequest(T,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var v=JSON.parse(Q.getText());
-if(null==v||0==v.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else{1==R&&(F.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var N=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(J){if(null!=J){var K=J.split("/");if(1<K.length){J=K[0];var m=K[1];3>K.length?(p=J,q=m,y=u=null,G()):this.ui.spinner.spin(F,mxResources.get("loading"))&&(K=encodeURIComponent(K.slice(2,K.length).join("/")),this.getFile(J+
-"/"+m+"/"+K,mxUtils.bind(this,function(t){this.ui.spinner.stop();p=t.meta.org;q=t.meta.repo;u=decodeURIComponent(t.meta.ref);y="";I()}),mxUtils.bind(this,function(t){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(N.container,300,80,!0,!1);N.init()}))),mxUtils.br(F),mxUtils.br(F));for(var z=0;z<v.length;z++)mxUtils.bind(this,
-function(N,J){var K=d.cloneNode();K.style.backgroundColor=0==J%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";K.appendChild(l(N.full_name,mxUtils.bind(this,function(){p=N.owner.login;q=N.name;y="";G(null,!0)})));F.appendChild(K)})(v[z],z)}100==v.length&&(F.appendChild(A),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&S()},mxEvent.addListener(F,"scroll",B))}))}),x)});C()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,f,g){DrawioFile.call(this,b,f);this.meta=g;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
-TrelloFile.prototype.save=function(b,f,g){this.doSave(this.getTitle(),f,g)};TrelloFile.prototype.saveAs=function(b,f,g){this.doSave(b,f,g)};TrelloFile.prototype.doSave=function(b,f,g){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,f,g)}),g])};
-TrelloFile.prototype.saveFile=function(b,f,g,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(p){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=p;this.contentChanged();null!=g&&g();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,f,g,c))}),mxUtils.bind(this,
-function(p){this.savingFile=!1;null!=c&&c(p)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(p){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(q){this.savingFile=!1;null!=g&&g();this.ui.fileLoaded(q);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,f,g,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,p)}))):null!=g&&g()};TrelloLibrary=function(b,f,g){TrelloFile.call(this,b,f,g)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,f,g){this.saveFile(b,!1,f,g)};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,f,g){g&&this.logout();g=mxUtils.bind(this,function(c,p){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){localStorage.setItem("drawio_trello_token",localStorage.trello_token);null!=p&&p();b()},error:function(){null!=p&&p();null!=f&&f(mxResources.get("loggedOut"))}})});this.isAuthorized()?g(!0):this.ui.showAuthDialog(this,!0,g)};
-TrelloClient.prototype.getLibrary=function(b,f,g){this.getFile(b,f,g,!1,!0)};
-TrelloClient.prototype.getFile=function(b,f,g,c,p){p=null!=p?p:!1;var q=mxUtils.bind(this,function(){var u=b.split(this.SEPARATOR),y=!0,H=window.setTimeout(mxUtils.bind(this,function(){y=!1;g({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout);Trello.cards.get(u[0]+"/attachments/"+u[1],mxUtils.bind(this,function(E){window.clearTimeout(H);if(y){var F=/\.png$/i.test(E.name),d={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(E.name)||
-/\.gliffy$/i.test(E.name)||!Editor.useCanvasForExport&&F?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(E.url),E.name,E.mimeType,this.extension,f,g,null,d):(y=!0,H=window.setTimeout(mxUtils.bind(this,function(){y=!1;g({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(E.url),mxUtils.bind(this,function(k){window.clearTimeout(H);if(y){E.compoundId=b;if(0<(F?k.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(k);null!=l&&0<l.length&&
-(k=l)}p?f(new TrelloLibrary(this.ui,k,E)):f(new TrelloFile(this.ui,k,E))}}),mxUtils.bind(this,function(k,l){window.clearTimeout(H);y&&(401==l.status?this.authenticate(q,g,!0):g())}),F||null!=E.mimeType&&"image/"==E.mimeType.substring(0,6),null,null,null,d))}}),mxUtils.bind(this,function(E){window.clearTimeout(H);y&&(null!=E&&401==E.status?this.authenticate(q,g,!0):g())}))});this.authenticate(q,g)};TrelloClient.prototype.insertLibrary=function(b,f,g,c,p){this.insertFile(b,f,g,c,!0,p)};
-TrelloClient.prototype.insertFile=function(b,f,g,c,p,q){p=null!=p?p:!1;var u=mxUtils.bind(this,function(){var y=mxUtils.bind(this,function(H){this.writeFile(b,H,q,mxUtils.bind(this,function(E){p?g(new TrelloLibrary(this.ui,f,E)):g(new TrelloFile(this.ui,f,E))}),c)});Editor.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(H){y(this.ui.base64ToBlob(H,"image/png"))}),c,f):y(f)});this.authenticate(u,c)};
-TrelloClient.prototype.saveFile=function(b,f,g){var c=b.meta.compoundId.split(this.SEPARATOR),p=mxUtils.bind(this,function(u){this.writeFile(b.meta.name,u,c[0],function(y){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){f(y)}),mxUtils.bind(this,function(H){null!=H&&401==H.status?this.authenticate(q,g,!0):g()}))},g)}),q=mxUtils.bind(this,function(){Editor.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(u){p(this.ui.base64ToBlob(u,
-"image/png"))}),g,this.ui.getCurrentFile()!=b?b.getData():null):p(b.getData())});this.authenticate(q,g)};
-TrelloClient.prototype.writeFile=function(b,f,g,c,p){if(null!=b&&null!=f)if(f.length>=this.maxFileSize)p({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 10 MB)"});else{var q=mxUtils.bind(this,function(){var u=!0,y=window.setTimeout(mxUtils.bind(this,function(){u=!1;p({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout),H=new FormData;H.append("key",Trello.key());H.append("token",Trello.token());H.append("file","string"===typeof f?new Blob([f]):f,b);H.append("name",
-b);var E=new XMLHttpRequest;E.responseType="json";E.onreadystatechange=mxUtils.bind(this,function(){if(4===E.readyState&&(window.clearTimeout(y),u))if(200==E.status){var F=E.response;F.compoundId=g+this.SEPARATOR+F.id;c(F)}else 401==E.status?this.authenticate(q,p,!0):p()});E.open("POST",this.baseUrl+"cards/"+g+"/attachments");E.send(H)});this.authenticate(q,p)}else p({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
-TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(f){this.ui.showError(mxResources.get("error"),f)}))};TrelloClient.prototype.pickFile=function(b,f){b=null!=b?b:mxUtils.bind(this,function(g){this.ui.loadFile("T"+encodeURIComponent(g))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(g){this.ui.showError(mxResources.get("error"),g,mxResources.get("ok"))}))};
-TrelloClient.prototype.showTrelloDialog=function(b,f){var g=null,c="@me",p=0,q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.overflow="hidden";q.style.height="224px";var u=document.createElement("h3");mxUtils.write(u,b?mxResources.get("selectFile"):mxResources.get("selectCard"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(u);var y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.overflow="auto";y.style.height=
-"194px";q.appendChild(y);q=new CustomDialog(this.ui,q);this.ui.showDialog(q.container,340,290,!0,!0);q.okButton.parentNode.removeChild(q.okButton);var H=mxUtils.bind(this,function(n,x,A){p++;var B=document.createElement("div");B.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==p%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var I=document.createElement("a");I.style.cursor="pointer";if(null!=A){var G=document.createElement("img");
-G.src=A.url;G.width=A.width;G.height=A.height;G.style="border: 1px solid black;margin:5px;vertical-align:middle";I.appendChild(G)}mxUtils.write(I,n);mxEvent.addListener(I,"click",x);B.appendChild(I);return B}),E=mxUtils.bind(this,function(n){this.ui.handleError(n,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),F=mxUtils.bind(this,function(){p=0;y.innerText="";this.ui.spinner.spin(y,mxResources.get("loading"));var n=mxUtils.bind(this,function(){Trello.cards.get(g+
-"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(x){this.ui.spinner.stop();y.appendChild(H("../ [Up]",mxUtils.bind(this,function(){l()})));mxUtils.br(y);null==x||0==x.length?mxUtils.write(y,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var A=0;A<x.length;A++)mxUtils.bind(this,function(B){y.appendChild(H(B.name,mxUtils.bind(this,function(){this.ui.hideDialog();f(g+this.SEPARATOR+B.id)}),null!=B.previews?B.previews[0]:null))})(x[A])})()}),mxUtils.bind(this,function(x){401==
-x.status?this.authenticate(n,E,!0):null!=E&&E(x)}))});n()}),d=null,k=null,l=mxUtils.bind(this,function(n){null==n&&(p=0,y.innerText="",n=1);this.ui.spinner.spin(y,mxResources.get("loading"));null!=d&&null!=d.parentNode&&d.parentNode.removeChild(d);d=document.createElement("a");d.style.display="block";d.style.cursor="pointer";mxUtils.write(d,mxResources.get("more")+"...");var x=mxUtils.bind(this,function(){mxEvent.removeListener(y,"scroll",k);l(n+1)});mxEvent.addListener(d,"click",x);var A=mxUtils.bind(this,
-function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:n-1},mxUtils.bind(this,function(B){this.ui.spinner.stop();B=null!=B?B.cards:null;if(null==B||0==B.length)mxUtils.write(y,mxResources.get("noFiles"));else{1==n&&(y.appendChild(H(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(C){null!=C&&(c=C,l())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(G.container,300,80,!0,!1);G.init()}))),mxUtils.br(y));for(var I=0;I<B.length;I++)mxUtils.bind(this,function(G){y.appendChild(H(G.name,mxUtils.bind(this,function(){b?(g=G.id,F()):(this.ui.hideDialog(),f(G.id))})))})(B[I]);100==B.length&&(y.appendChild(d),k=function(){y.scrollTop>=y.scrollHeight-y.offsetHeight&&x()},mxEvent.addListener(y,"scroll",k))}}),mxUtils.bind(this,function(B){401==B.status?this.authenticate(A,E,!0):null!=E&&E({message:B.responseText})}))});A()});l()};
-TrelloClient.prototype.isAuthorized=function(){try{var b=localStorage.trello_token;null==b&&(b=localStorage.drawio_trello_token,null!=b&&localStorage.setItem("trello_token",b));return null!=b}catch(f){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("drawio_trello_token");Trello.deauthorize()};GitLabFile=function(b,f,g){GitHubFile.call(this,b,f,g);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.getFileUrl=function(){return this.meta.html_url};GitLabFile.prototype.getFolderUrl=function(){var b=this.getFileUrl();return b.substring(0,b.lastIndexOf("/"))};GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+this.meta.org+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};
+GitHubFile.prototype.setDescriptorEtag=function(b,f){b.sha=f};GitHubFile.prototype.save=function(b,f,k,c,p,q){this.doSave(this.getTitle(),f,k,c,p,q)};GitHubFile.prototype.saveAs=function(b,f,k){this.doSave(b,f,k)};GitHubFile.prototype.doSave=function(b,f,k,c,p,q){var u=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=u;this.saveFile(b,!1,f,k,c,p,q)}),k,c,p])};
+GitHubFile.prototype.saveFile=function(b,f,k,c,p,q,u){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var z=mxUtils.bind(this,function(G){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var E=this.getCurrentEtag(),F=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(d){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,d);this.fileSaved(F,E,mxUtils.bind(this,function(){this.contentChanged();
+null!=k&&k()}),c)}),mxUtils.bind(this,function(d){this.savingFile=!1;this.isConflict(d)?(this.inConflictState=!0,null!=c&&(d.commitMessage=G,c(d))):null!=c&&c(d)}),q,G)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(d){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(g){this.setModified(this.getShadowModified());this.savingFile=!1;
+null!=k&&k();this.ui.fileLoaded(g)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,d,G)}))});null!=u?z(u):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(G){z(G)}),c)}else null!=k&&k()};GitHubLibrary=function(b,f,k){GitHubFile.call(this,b,f,k)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,f,k){this.saveFile(b,!1,f,k)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(f,k){DrawioClient.call(this,f,k||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"github2";GitHubClient.prototype.maxFileSize=
+5E7;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(f){b=f};GitHubClient.prototype.updateUser=function(f,k,c){var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),u=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),z=this.authToken+" "+b;u.setRequestHeaders=function(G,E){G.setRequestHeader("Authorization",z)};u.send(mxUtils.bind(this,function(){window.clearTimeout(q);p&&(401===
+u.getStatus()?c?k({code:u.getStatus(),message:this.getErrorMessage(u,mxResources.get("accessDenied"))}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(f,k,!0)}),k)):200>u.getStatus()||300<=u.getStatus()?k({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(u.getText()))),f()))}),k)};GitHubClient.prototype.createUser=function(f){return new DrawioUser(f.id,f.email,f.name)};GitHubClient.prototype.authenticate=function(f,k){(new mxXmlRequest(this.redirectUri+
+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),f,k):null!=k&&k(c)}),k)};GitHubClient.prototype.authenticateStep2=function(f,k,c){if(null==window.onGitHubCallback){var p=mxUtils.bind(this,function(){var q=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),null,"GET")).send(mxUtils.bind(this,function(u){if(200<=
+u.getStatus()&&299>=u.getStatus())try{b=JSON.parse(u.getText()).access_token,this.setUser(null),k()}catch(z){c({message:mxResources.get("authFailed"),retry:p})}else this.clearPersistentToken(),this.setUser(null),b=null,401==u.getStatus()?p():c({message:mxResources.get("accessDenied"),retry:p})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(u,z){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+
+window.location.host+"&token="+f),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(G,E){q?(window.onGitHubCallback=null,q=!1,null==G?c({message:mxResources.get("accessDenied"),retry:p}):(null!=z&&z(),b=G.access_token,this.setUser(null),u&&this.setPersistentToken("remembered"),k(),null!=E&&E.close())):null!=E&&E.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onGitHubCallback=null,q=!1,c({message:mxResources.get("accessDenied"),
+retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(f,k){try{var c=JSON.parse(f.getText());null!=c&&null!=c.message&&(k=c.message)}catch(p){}return k};GitHubClient.prototype.showAuthorizeDialog=function(f,k){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/blog/single-repository-diagrams")}),f,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"),k,480,null,!1)};GitHubClient.prototype.executeRequest=function(f,k,c,p,q){var u=mxUtils.bind(this,function(G){var E=!0,F=window.setTimeout(mxUtils.bind(this,function(){E=!1;c({code:App.ERROR_TIMEOUT,retry:z})}),this.ui.timeout),d=this.authToken+" "+b;f.setRequestHeaders=function(g,l){g.setRequestHeader("Authorization",
+d)};f.send(mxUtils.bind(this,function(){window.clearTimeout(F);var g=mxUtils.bind(this,function(){var x=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){x();z()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(E)if(200<=f.getStatus()&&299>=f.getStatus()||p&&404==f.getStatus())k(f);else if(401===f.getStatus())G?c({code:f.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){z(!0)},
+c)})}):this.authenticate(function(){u(!0)},c);else if(403===f.getStatus()){var l=!1;try{var n=JSON.parse(f.getText());null!=n&&"Resource not accessible by integration"==n.message?g():(null!=n&&null!=n.errors&&0<n.errors.length&&(l="too_large"==n.errors[0].code),c({message:mxResources.get(l?"drawingTooLarge":"forbidden")}))}catch(x){c({message:mxResources.get(l?"drawingTooLarge":"forbidden")})}}else 404===f.getStatus()?q?c({code:f.getStatus(),message:this.getErrorMessage(f,mxResources.get("fileNotFound"))}):
+g():409===f.getStatus()?c({code:f.getStatus(),status:409}):c({code:f.getStatus(),message:this.getErrorMessage(f,mxResources.get("error")+" "+f.getStatus())})}),mxUtils.bind(this,function(g){window.clearTimeout(F);E&&c(g)}))}),z=mxUtils.bind(this,function(G){null==this.user?this.updateUser(function(){z(!0)},c,G):u(G)});null==b?this.authenticate(function(){z(!0)},c):z(!1)};GitHubClient.prototype.getLibrary=function(f,k,c){this.getFile(f,k,c,!0)};GitHubClient.prototype.getSha=function(f,k,c,p,q,u,z){var G=
+"&t="+(new Date).getTime();f=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+k+"/contents/"+c+"?ref="+p+G,null,"HEAD");this.executeRequest(f,mxUtils.bind(this,function(E){try{q(E.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(F){u(F)}}),u,null,z)};GitHubClient.prototype.getFile=function(f,k,c,p,q){p=null!=p?p:!1;var u=f.split("/"),z=u[0],G=u[1],E=u[2];f=u.slice(3,u.length).join("/");u=/\.png$/i.test(f);if(!q&&(/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&
+u))if(null!=b){q=this.baseUrl+"/repos/"+z+"/"+G+"/contents/"+f+"?ref="+E;var F={Authorization:"token "+b};u=f.split("/");this.ui.convertFile(q,0<u.length?u[u.length-1]:f,null,this.extension,k,c,null,F)}else c({message:mxResources.get("accessDenied")});else u="&t="+(new Date).getTime(),f=new mxXmlRequest(this.baseUrl+"/repos/"+z+"/"+G+"/contents/"+f+"?ref="+E+u,null,"GET"),this.executeRequest(f,mxUtils.bind(this,function(d){try{var g=JSON.parse(d.getText());if(""==g.content&&null!=g.git_url){var l=
+new mxXmlRequest(g.git_url,null,"GET");this.executeRequest(l,mxUtils.bind(this,function(n){n=JSON.parse(n.getText());""!=n.content?(g.content=n.content,g.encoding=n.encoding,k(this.createGitHubFile(z,G,E,g,p))):c({message:mxResources.get("errorLoadingFile")})}),c)}else k(this.createGitHubFile(z,G,E,g,p))}catch(n){c(n)}}),c)};GitHubClient.prototype.createGitHubFile=function(f,k,c,p,q){f={org:f,repo:k,ref:c,name:p.name,path:p.path,sha:p.sha,html_url:p.html_url,download_url:p.download_url};k=p.content;
+"base64"===p.encoding&&(/\.jpe?g$/i.test(p.name)?k="data:image/jpeg;base64,"+k:/\.gif$/i.test(p.name)?k="data:image/gif;base64,"+k:/\.png$/i.test(p.name)?(p=this.ui.extractGraphModelFromPng(k),k=null!=p&&0<p.length?p:"data:image/png;base64,"+k):k=Base64.decode(k));return q?new GitHubLibrary(this.ui,k,f):new GitHubFile(this.ui,k,f)};GitHubClient.prototype.insertLibrary=function(f,k,c,p,q){this.insertFile(f,k,c,p,!0,q,!1)};GitHubClient.prototype.insertFile=function(f,k,c,p,q,u,z){q=null!=q?q:!1;u=u.split("/");
+var G=u[0],E=u[1],F=u[2],d=u.slice(3,u.length).join("/");0<d.length&&(d+="/");d+=f;this.checkExists(G+"/"+E+"/"+F+"/"+d,!0,mxUtils.bind(this,function(g,l){g?q?(z||(k=Base64.encode(k)),this.showCommitDialog(f,!0,mxUtils.bind(this,function(n){this.writeFile(G,E,F,d,n,k,l,mxUtils.bind(this,function(x){try{var A=JSON.parse(x.getText());c(this.createGitHubFile(G,E,F,A.content,q))}catch(B){p(B)}}),p)}),p)):c(new GitHubFile(this.ui,k,{org:G,repo:E,ref:F,name:f,path:d,sha:l,isNew:!0})):p()}))};GitHubClient.prototype.showCommitDialog=
+function(f,k,c,p){var q=this.ui.spinner.pause();f=new FilenameDialog(this.ui,mxResources.get(k?"addedFile":"updateFile",[f]),mxResources.get("ok"),mxUtils.bind(this,function(u){q(function(){c(u)})}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){p()}));this.ui.showDialog(f.container,400,80,!0,!1);f.init()};GitHubClient.prototype.writeFile=function(f,k,c,p,q,u,z,G,E){u.length>=this.maxFileSize?E({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(u.length)+
+" / 1 MB)"}):(c={path:p,branch:decodeURIComponent(c),message:q,content:u},null!=z&&(c.sha=z),f=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+k+"/contents/"+p,JSON.stringify(c),"PUT"),this.executeRequest(f,mxUtils.bind(this,function(F){G(F)}),mxUtils.bind(this,function(F){404==F.code&&(F.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,F.code=null);E(F)})))};GitHubClient.prototype.checkExists=function(f,k,c){var p=f.split("/"),q=p[0],u=p[1],z=p[2];f=p.slice(3,p.length).join("/");
+this.getSha(q,u,f,z,mxUtils.bind(this,function(G){if(k){var E=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[f]),function(){E();c(!0,G)},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(G){c(!0)}),!0)};GitHubClient.prototype.saveFile=function(f,k,c,p,q){var u=f.meta.org,z=f.meta.repo,G=f.meta.ref,E=f.meta.path,F=mxUtils.bind(this,function(g,
+l){this.writeFile(u,z,G,E,q,l,g,mxUtils.bind(this,function(n){delete f.meta.isNew;k(JSON.parse(n.getText()).content.sha)}),mxUtils.bind(this,function(n){c(n)}))}),d=mxUtils.bind(this,function(){if(Editor.useCanvasForExport&&/(\.png)$/i.test(E)){var g=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(l){F(f.meta.sha,l)}),c,this.ui.getCurrentFile()!=f?f.getData():null,g.scale,g.border)}else F(f.meta.sha,Base64.encode(f.getData()))});p?this.getSha(u,z,E,
+G,mxUtils.bind(this,function(g){f.meta.sha=g;d()}),c):d()};GitHubClient.prototype.pickLibrary=function(f){this.pickFile(f)};GitHubClient.prototype.pickFolder=function(f){this.showGitHubDialog(!1,f,!0)};GitHubClient.prototype.pickFile=function(f){f=null!=f?f:mxUtils.bind(this,function(k){this.ui.loadFile("H"+encodeURIComponent(k))});this.showGitHubDialog(!0,f)};GitHubClient.prototype.showGitHubDialog=function(f,k,c){var p=null,q=null,u=null,z=null,G=document.createElement("div");G.style.whiteSpace=
+"nowrap";G.style.overflow="hidden";G.style.height="320px";var E=document.createElement("h3");mxUtils.write(E,mxResources.get(f?"selectFile":"selectFolder"));E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";G.appendChild(E);E=this.ui.createToolbarButton(Editor.refreshImage,mxResources.get("refresh"),mxUtils.bind(this,function(){D()}));E.style.position="absolute";E.style.right="40px";E.style.top="26px";G.appendChild(E);var F=document.createElement("div");F.style.whiteSpace=
+"nowrap";F.style.border="1px solid lightgray";F.style.boxSizing="border-box";F.style.padding="4px";F.style.overflow="auto";F.style.lineHeight="1.2em";F.style.height="290px";G.appendChild(F);var d=document.createElement("div");d.style.textOverflow="ellipsis";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.padding="4px";d.style.width="100%";var g=new CustomDialog(this.ui,G,mxUtils.bind(this,function(){k(p+"/"+q+"/"+encodeURIComponent(u)+"/"+z)}),null,null,"https://www.drawio.com/blog/single-repository-diagrams",
+null,null,null,null,[[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")})]],"16px");this.ui.showDialog(g.container,420,370,!0,!0);f&&g.okButton.parentNode.removeChild(g.okButton);var l=mxUtils.bind(this,function(S,U,R,P){var v=document.createElement("a");v.setAttribute("title",S);v.style.cursor="pointer";mxUtils.write(v,S);mxEvent.addListener(v,"click",
+U);P&&(v.style.textDecoration="underline");null!=R&&(S=d.cloneNode(),S.style.padding=R,S.appendChild(v),v=S);return v}),n=mxUtils.bind(this,function(S){var U=document.createElement("div");U.style.marginBottom="8px";U.appendChild(l(p+"/"+q,mxUtils.bind(this,function(){z=null;D()}),null,!0));S||(mxUtils.write(U," / "),U.appendChild(l(decodeURIComponent(u),mxUtils.bind(this,function(){z=null;H()}),null,!0)));if(null!=z&&0<z.length){var R=z.split("/");for(S=0;S<R.length;S++)(function(P){mxUtils.write(U,
+" / ");U.appendChild(l(R[P],mxUtils.bind(this,function(){z=R.slice(0,P+1).join("/");I()}),null,!0))})(S)}F.appendChild(U)}),x=mxUtils.bind(this,function(S){this.ui.handleError(S,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(z=u=q=p=null,D()):this.ui.hideDialog()}),null,{})}),A=null,B=null,I=mxUtils.bind(this,function(S){null==S&&(F.innerText="",S=1);var U=new mxXmlRequest(this.baseUrl+"/repos/"+p+"/"+q+"/contents/"+z+"?ref="+encodeURIComponent(u)+"&per_page=100&page="+
+S,null,"GET");this.ui.spinner.spin(F,mxResources.get("loading"));g.okButton.removeAttribute("disabled");null!=B&&(mxEvent.removeListener(F,"scroll",B),B=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 R=mxUtils.bind(this,function(){I(S+1)});mxEvent.addListener(A,"click",R);this.executeRequest(U,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,
+function(){this.ui.spinner.stop();1==S&&(n(),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==z)z=null,D();else{var K=z.split("/");z=K.slice(0,K.length-1).join("/");I()}}),"4px")));var v=JSON.parse(P.getText());if(null==v||0==v.length)c||(mxUtils.br(F),mxUtils.write(F,mxResources.get("noFiles")));else{var y=!0,L=0,J=mxUtils.bind(this,function(K){for(var m=0;m<v.length;m++)mxUtils.bind(this,function(t,C){if(K==("dir"==t.type)){C=d.cloneNode();C.style.backgroundColor=y?Editor.isDarkMode()?
+"#000000":"#eeeeee":"";y=!y;var N=document.createElement("img");N.src=IMAGE_PATH+"/"+("dir"==t.type?"folder.png":"file.png");N.setAttribute("align","absmiddle");N.style.marginRight="4px";N.style.marginTop="-4px";N.width=20;C.appendChild(N);C.appendChild(l(t.name+("dir"==t.type?"/":""),mxUtils.bind(this,function(){"dir"==t.type?(z=t.path,I()):f&&"file"==t.type&&(this.ui.hideDialog(),k(p+"/"+q+"/"+encodeURIComponent(u)+"/"+t.path))})));F.appendChild(C);L++}})(v[m],m)});J(!0);f&&J(!1)}}))}),x,!0)}),
+H=mxUtils.bind(this,function(S,U){null==S&&(F.innerText="",S=1);var R=new mxXmlRequest(this.baseUrl+"/repos/"+p+"/"+q+"/branches?per_page=100&page="+S,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(F,"scroll",B),B=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 P=
+mxUtils.bind(this,function(){H(S+1)});mxEvent.addListener(A,"click",P);this.executeRequest(R,mxUtils.bind(this,function(v){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==S&&(n(!0),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){z=null;D()}),"4px")));var y=JSON.parse(v.getText());if(null==y||0==y.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else if(1==y.length&&U)u=y[0].name,z="",I();else{for(var L=0;L<y.length;L++)mxUtils.bind(this,
+function(J,K){var m=d.cloneNode();m.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";m.appendChild(l(J.name,mxUtils.bind(this,function(){u=J.name;z="";I()})));F.appendChild(m)})(y[L],L);100==y.length&&(F.appendChild(A),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&P()},mxEvent.addListener(F,"scroll",B))}}))}),x)}),D=mxUtils.bind(this,function(S){null==S&&(F.innerText="",S=1);var U=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+S,null,"GET");g.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=B&&mxEvent.removeListener(F,"scroll",B);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 R=mxUtils.bind(this,function(){D(S+1)});mxEvent.addListener(A,"click",R);this.executeRequest(U,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var v=JSON.parse(P.getText());
+if(null==v||0==v.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else{1==S&&(F.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var L=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(J){if(null!=J){var K=J.split("/");if(1<K.length){J=K[0];var m=K[1];3>K.length?(p=J,q=m,z=u=null,H()):this.ui.spinner.spin(F,mxResources.get("loading"))&&(K=encodeURIComponent(K.slice(2,K.length).join("/")),this.getFile(J+
+"/"+m+"/"+K,mxUtils.bind(this,function(t){this.ui.spinner.stop();p=t.meta.org;q=t.meta.repo;u=decodeURIComponent(t.meta.ref);z="";I()}),mxUtils.bind(this,function(t){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(L.container,300,80,!0,!1);L.init()}))),mxUtils.br(F),mxUtils.br(F));for(var y=0;y<v.length;y++)mxUtils.bind(this,
+function(L,J){var K=d.cloneNode();K.style.backgroundColor=0==J%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";K.appendChild(l(L.full_name,mxUtils.bind(this,function(){p=L.owner.login;q=L.name;z="";H(null,!0)})));F.appendChild(K)})(v[y],y)}100==v.length&&(F.appendChild(A),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&R()},mxEvent.addListener(F,"scroll",B))}))}),x)});D()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,f,k){DrawioFile.call(this,b,f);this.meta=k;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+TrelloFile.prototype.save=function(b,f,k){this.doSave(this.getTitle(),f,k)};TrelloFile.prototype.saveAs=function(b,f,k){this.doSave(b,f,k)};TrelloFile.prototype.doSave=function(b,f,k){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,f,k)}),k])};
+TrelloFile.prototype.saveFile=function(b,f,k,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(p){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=p;this.contentChanged();null!=k&&k();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,f,k,c))}),mxUtils.bind(this,
+function(p){this.savingFile=!1;null!=c&&c(p)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(p){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(q){this.savingFile=!1;null!=k&&k();this.ui.fileLoaded(q);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,f,k,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,p)}))):null!=k&&k()};TrelloLibrary=function(b,f,k){TrelloFile.call(this,b,f,k)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,f,k){this.saveFile(b,!1,f,k)};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,f,k){k&&this.logout();k=mxUtils.bind(this,function(c,p){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){localStorage.setItem("drawio_trello_token",localStorage.trello_token);null!=p&&p();b()},error:function(){null!=p&&p();null!=f&&f(mxResources.get("loggedOut"))}})});this.isAuthorized()?k(!0):this.ui.showAuthDialog(this,!0,k)};
+TrelloClient.prototype.getLibrary=function(b,f,k){this.getFile(b,f,k,!1,!0)};
+TrelloClient.prototype.getFile=function(b,f,k,c,p){p=null!=p?p:!1;var q=mxUtils.bind(this,function(){var u=b.split(this.SEPARATOR),z=!0,G=window.setTimeout(mxUtils.bind(this,function(){z=!1;k({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout);Trello.cards.get(u[0]+"/attachments/"+u[1],mxUtils.bind(this,function(E){window.clearTimeout(G);if(z){var F=/\.png$/i.test(E.name),d={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(E.name)||
+/\.gliffy$/i.test(E.name)||!Editor.useCanvasForExport&&F?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(E.url),E.name,E.mimeType,this.extension,f,k,null,d):(z=!0,G=window.setTimeout(mxUtils.bind(this,function(){z=!1;k({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(E.url),mxUtils.bind(this,function(g){window.clearTimeout(G);if(z){E.compoundId=b;if(0<(F?g.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(g);null!=l&&0<l.length&&
+(g=l)}p?f(new TrelloLibrary(this.ui,g,E)):f(new TrelloFile(this.ui,g,E))}}),mxUtils.bind(this,function(g,l){window.clearTimeout(G);z&&(401==l.status?this.authenticate(q,k,!0):k())}),F||null!=E.mimeType&&"image/"==E.mimeType.substring(0,6),null,null,null,d))}}),mxUtils.bind(this,function(E){window.clearTimeout(G);z&&(null!=E&&401==E.status?this.authenticate(q,k,!0):k())}))});this.authenticate(q,k)};TrelloClient.prototype.insertLibrary=function(b,f,k,c,p){this.insertFile(b,f,k,c,!0,p)};
+TrelloClient.prototype.insertFile=function(b,f,k,c,p,q){p=null!=p?p:!1;var u=mxUtils.bind(this,function(){var z=mxUtils.bind(this,function(G){this.writeFile(b,G,q,mxUtils.bind(this,function(E){p?k(new TrelloLibrary(this.ui,f,E)):k(new TrelloFile(this.ui,f,E))}),c)});Editor.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(G){z(this.ui.base64ToBlob(G,"image/png"))}),c,f):z(f)});this.authenticate(u,c)};
+TrelloClient.prototype.saveFile=function(b,f,k){var c=b.meta.compoundId.split(this.SEPARATOR),p=mxUtils.bind(this,function(u){this.writeFile(b.meta.name,u,c[0],function(z){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){f(z)}),mxUtils.bind(this,function(G){null!=G&&401==G.status?this.authenticate(q,k,!0):k()}))},k)}),q=mxUtils.bind(this,function(){Editor.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(u){p(this.ui.base64ToBlob(u,
+"image/png"))}),k,this.ui.getCurrentFile()!=b?b.getData():null):p(b.getData())});this.authenticate(q,k)};
+TrelloClient.prototype.writeFile=function(b,f,k,c,p){if(null!=b&&null!=f)if(f.length>=this.maxFileSize)p({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 10 MB)"});else{var q=mxUtils.bind(this,function(){var u=!0,z=window.setTimeout(mxUtils.bind(this,function(){u=!1;p({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout),G=new FormData;G.append("key",Trello.key());G.append("token",Trello.token());G.append("file","string"===typeof f?new Blob([f]):f,b);G.append("name",
+b);var E=new XMLHttpRequest;E.responseType="json";E.onreadystatechange=mxUtils.bind(this,function(){if(4===E.readyState&&(window.clearTimeout(z),u))if(200==E.status){var F=E.response;F.compoundId=k+this.SEPARATOR+F.id;c(F)}else 401==E.status?this.authenticate(q,p,!0):p()});E.open("POST",this.baseUrl+"cards/"+k+"/attachments");E.send(G)});this.authenticate(q,p)}else p({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
+TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(f){this.ui.showError(mxResources.get("error"),f)}))};TrelloClient.prototype.pickFile=function(b,f){b=null!=b?b:mxUtils.bind(this,function(k){this.ui.loadFile("T"+encodeURIComponent(k))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(k){this.ui.showError(mxResources.get("error"),k,mxResources.get("ok"))}))};
+TrelloClient.prototype.showTrelloDialog=function(b,f){var k=null,c="@me",p=0,q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.overflow="hidden";q.style.height="224px";var u=document.createElement("h3");mxUtils.write(u,b?mxResources.get("selectFile"):mxResources.get("selectCard"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(u);var z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.overflow="auto";z.style.height=
+"194px";q.appendChild(z);q=new CustomDialog(this.ui,q);this.ui.showDialog(q.container,340,290,!0,!0);q.okButton.parentNode.removeChild(q.okButton);var G=mxUtils.bind(this,function(n,x,A){p++;var B=document.createElement("div");B.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==p%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var I=document.createElement("a");I.style.cursor="pointer";if(null!=A){var H=document.createElement("img");
+H.src=A.url;H.width=A.width;H.height=A.height;H.style="border: 1px solid black;margin:5px;vertical-align:middle";I.appendChild(H)}mxUtils.write(I,n);mxEvent.addListener(I,"click",x);B.appendChild(I);return B}),E=mxUtils.bind(this,function(n){this.ui.handleError(n,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),F=mxUtils.bind(this,function(){p=0;z.innerText="";this.ui.spinner.spin(z,mxResources.get("loading"));var n=mxUtils.bind(this,function(){Trello.cards.get(k+
+"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(x){this.ui.spinner.stop();z.appendChild(G("../ [Up]",mxUtils.bind(this,function(){l()})));mxUtils.br(z);null==x||0==x.length?mxUtils.write(z,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var A=0;A<x.length;A++)mxUtils.bind(this,function(B){z.appendChild(G(B.name,mxUtils.bind(this,function(){this.ui.hideDialog();f(k+this.SEPARATOR+B.id)}),null!=B.previews?B.previews[0]:null))})(x[A])})()}),mxUtils.bind(this,function(x){401==
+x.status?this.authenticate(n,E,!0):null!=E&&E(x)}))});n()}),d=null,g=null,l=mxUtils.bind(this,function(n){null==n&&(p=0,z.innerText="",n=1);this.ui.spinner.spin(z,mxResources.get("loading"));null!=d&&null!=d.parentNode&&d.parentNode.removeChild(d);d=document.createElement("a");d.style.display="block";d.style.cursor="pointer";mxUtils.write(d,mxResources.get("more")+"...");var x=mxUtils.bind(this,function(){mxEvent.removeListener(z,"scroll",g);l(n+1)});mxEvent.addListener(d,"click",x);var A=mxUtils.bind(this,
+function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:n-1},mxUtils.bind(this,function(B){this.ui.spinner.stop();B=null!=B?B.cards:null;if(null==B||0==B.length)mxUtils.write(z,mxResources.get("noFiles"));else{1==n&&(z.appendChild(G(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var H=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(D){null!=D&&(c=D,l())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(H.container,300,80,!0,!1);H.init()}))),mxUtils.br(z));for(var I=0;I<B.length;I++)mxUtils.bind(this,function(H){z.appendChild(G(H.name,mxUtils.bind(this,function(){b?(k=H.id,F()):(this.ui.hideDialog(),f(H.id))})))})(B[I]);100==B.length&&(z.appendChild(d),g=function(){z.scrollTop>=z.scrollHeight-z.offsetHeight&&x()},mxEvent.addListener(z,"scroll",g))}}),mxUtils.bind(this,function(B){401==B.status?this.authenticate(A,E,!0):null!=E&&E({message:B.responseText})}))});A()});l()};
+TrelloClient.prototype.isAuthorized=function(){try{var b=localStorage.trello_token;null==b&&(b=localStorage.drawio_trello_token,null!=b&&localStorage.setItem("trello_token",b));return null!=b}catch(f){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("drawio_trello_token");Trello.deauthorize()};GitLabFile=function(b,f,k){GitHubFile.call(this,b,f,k);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.getFileUrl=function(){return this.meta.html_url};GitLabFile.prototype.getFolderUrl=function(){var b=this.getFileUrl();return b.substring(0,b.lastIndexOf("/"))};GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+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,f){b.last_commit_id=f};GitLabLibrary=function(b,f,g){GitLabFile.call(this,b,f,g)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,f,g){this.saveFile(b,!1,f,g)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(f){GitHubClient.call(this,f,"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.DRAWIO_SERVER_URL+"gitlab";GitLabClient.prototype.authenticate=
-function(f,g){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),f,g):null!=g&&g(c)}),g)};GitLabClient.prototype.authenticateStep2=function(f,g,c){if(null==window.onGitLabCallback){var p=mxUtils.bind(this,function(){var q=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+
-f),null,"GET")).send(mxUtils.bind(this,function(u){if(200<=u.getStatus()&&299>=u.getStatus())try{b=JSON.parse(u.getText()).access_token,this.setToken(b),this.setUser(null),g()}catch(y){c({message:mxResources.get("authFailed"),retry:p})}else this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==u.getStatus()?p():c({message:mxResources.get("accessDenied"),retry:p})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(u,y){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+
-this.clientId+"&scope="+this.scope+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(H,E){q?(window.onGitLabCallback=null,q=!1,null==H?c({message:mxResources.get("accessDenied"),retry:p}):(null!=y&&y(),b=H.access_token,this.setToken(b),this.setUser(null),u&&this.setPersistentToken("remembered"),g(),null!=E&&E.close())):
-null!=E&&E.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onGitLabCallback=null,q=!1,c({message:mxResources.get("accessDenied"),retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(f,g,c,p){var q=mxUtils.bind(this,function(y){var H=!0,E=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),F=this.authToken+
-" "+b;f.setRequestHeaders=function(d,k){d.setRequestHeader("Authorization",F);d.setRequestHeader("PRIVATE_TOKEN",F);d.setRequestHeader("Content-Type","application/json")};f.send(mxUtils.bind(this,function(){window.clearTimeout(E);if(H)if(200<=f.getStatus()&&299>=f.getStatus()||p&&404==f.getStatus())g(f);else if(401===f.getStatus())y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){u(!0)},c)})}):this.authenticate(function(){q(!0)},c);else if(403===
-f.getStatus()){var d=!1;try{var k=JSON.parse(f.getText());null!=k&&null!=k.errors&&0<k.errors.length&&(d="too_large"==k.errors[0].code)}catch(l){}c({message:mxResources.get(d?"drawingTooLarge":"forbidden")})}else 404===f.getStatus()?c({message:this.getErrorMessage(f,mxResources.get("fileNotFound"))}):c({status:f.getStatus(),message:this.getErrorMessage(f,mxResources.get("error")+" "+f.getStatus())})}),mxUtils.bind(this,function(d){window.clearTimeout(E);H&&c(d)}))}),u=mxUtils.bind(this,function(y){null==
-this.user?this.updateUser(function(){u(!0)},c,y):q(y)});null==b?this.authenticate(function(){u(!0)},c):u(!1)};GitLabClient.prototype.getRefIndex=function(f,g,c,p,q,u){if(null!=q)c(f,q);else{var y=f.length-2,H=mxUtils.bind(this,function(){if(2>y)p({message:mxResources.get("fileNotFound")});else{var E=Math.max(y-1,0),F=f.slice(0,E).join("/");E=f[E];var d=f[y],k=f.slice(y+1,f.length).join("/");F=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+E)+"/repository/"+(g?u?"branches?per_page=1&page=1&ref="+
-d:"tree?path="+k+"&ref="+d:"files/"+encodeURIComponent(k)+"?ref="+d);var l=new mxXmlRequest(F,null,"HEAD");this.executeRequest(l,mxUtils.bind(this,function(){200==l.getStatus()?c(f,y):p({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==l.getStatus()?(y--,H()):p({message:mxResources.get("fileNotFound")})}))}});H()}};GitLabClient.prototype.getFile=function(f,g,c,p,q,u){p=null!=p?p:!1;this.getRefIndex(f.split("/"),!1,mxUtils.bind(this,function(y,H){var E=Math.max(H-1,0),
-F=y.slice(0,E).join("/"),d=y[E],k=y[H];f=y.slice(H+1,y.length).join("/");y=/\.png$/i.test(f);if(!q&&(/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&y))if(null!=b){E="&t="+(new Date).getTime();var l=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+d)+"/repository/files/"+encodeURIComponent(f)+"?ref="+k;y=f.split("/");this.ui.convertFile(l+E,0<y.length?y[y.length-1]:f,null,this.extension,g,c,mxUtils.bind(this,function(n,x,A){n=new mxXmlRequest(n,null,
-"GET");this.executeRequest(n,mxUtils.bind(this,function(B){try{x(this.getFileContent(JSON.parse(B.getText())))}catch(I){A(I)}}),A)}))}else c({message:mxResources.get("accessDenied")});else E="&t="+(new Date).getTime(),l=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+d)+"/repository/files/"+encodeURIComponent(f)+"?ref="+k,y=new mxXmlRequest(l+E,null,"GET"),this.executeRequest(y,mxUtils.bind(this,function(n){try{g(this.createGitLabFile(F,d,k,JSON.parse(n.getText()),p,H))}catch(x){c(x)}}),c)}),c,
-u)};GitLabClient.prototype.getFileContent=function(f){var g=f.file_name,c=f.content;"base64"===f.encoding&&(/\.jpe?g$/i.test(g)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(g)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(g)?c="data:application/pdf;base64,"+c:/\.png$/i.test(g)?(f=this.ui.extractGraphModelFromPng(c),c=null!=f&&0<f.length?f:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(f,g,c,p,q,u){var y=DRAWIO_GITLAB_URL+"/";f={org:f,repo:g,
-ref:c,name:p.file_name,path:p.file_path,html_url:y+f+"/"+g+"/blob/"+c+"/"+p.file_path,download_url:y+f+"/"+g+"/raw/"+c+"/"+p.file_path+"?inline=false",last_commit_id:p.last_commit_id,refPos:u};p=this.getFileContent(p);return q?new GitLabLibrary(this.ui,p,f):new GitLabFile(this.ui,p,f)};GitLabClient.prototype.insertFile=function(f,g,c,p,q,u,y){q=null!=q?q:!1;u=u.split("/");this.getRefIndex(u,!0,mxUtils.bind(this,function(H,E){var F=Math.max(E-1,0),d=H.slice(0,F).join("/"),k=H[F],l=H[E];path=H.slice(E+
-1,H.length).join("/");0<path.length&&(path+="/");path+=f;this.checkExists(d+"/"+k+"/"+l+"/"+path,!0,mxUtils.bind(this,function(n,x){n?q?(y||(g=Base64.encode(g)),this.showCommitDialog(f,!0,mxUtils.bind(this,function(A){this.writeFile(d,k,l,path,A,g,x,mxUtils.bind(this,function(B){try{var I=JSON.parse(B.getText());c(this.createGitLabFile(d,k,l,null!=I.content?I.content:I,q,E))}catch(G){p(G)}}),p)}),p)):(n=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,g,{org:d,repo:k,ref:l,name:f,path:path,html_url:n+
-d+"/"+k+"/blob/"+l+"/"+path,download_url:n+d+"/"+k+"/raw/"+l+"/"+path+"?inline=false",refPos:E,last_commit_id:x,isNew:!0}))):p()}))}),p,null,4>=u.length)};GitLabClient.prototype.checkExists=function(f,g,c){this.getFile(f,mxUtils.bind(this,function(p){if(g){var q=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[f]),function(){q();c(!0,p.getCurrentEtag())},function(){q();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(p){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(f,g,c,p,q,u,y,H,E){if(u.length>=this.maxFileSize)E({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(u.length)+" / 10 MB)"});else{var F="POST";c={path:encodeURIComponent(p),branch:decodeURIComponent(c),commit_message:q,content:u,encoding:"base64"};null!=y&&(c.last_commit_id=y,F="PUT");f=this.baseUrl+"/projects/"+encodeURIComponent(f+"/"+g)+"/repository/files/"+
-encodeURIComponent(p);F=new mxXmlRequest(f,JSON.stringify(c),F);this.executeRequest(F,mxUtils.bind(this,function(d){H(d)}),E)}};GitLabClient.prototype.saveFile=function(f,g,c,p,q){var u=f.meta.org,y=f.meta.repo,H=f.meta.ref,E=f.meta.path,F=mxUtils.bind(this,function(k,l){this.writeFile(u,y,H,E,q,l,k,mxUtils.bind(this,function(n){delete f.meta.isNew;this.getFile(u+"/"+y+"/"+H+"/"+E,mxUtils.bind(this,function(x){x.getData()==f.getData()?g(x.getCurrentEtag()):g({content:f.getCurrentEtag()})}),c,null,
-null,f.meta.refPos)}),c)}),d=mxUtils.bind(this,function(){if(Editor.useCanvasForExport&&/(\.png)$/i.test(E)){var k=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(l){F(f.meta.last_commit_id,l)}),c,this.ui.getCurrentFile()!=f?f.getData():null,k.scale,k.border)}else F(f.meta.last_commit_id,Base64.encode(f.getData()))});p?this.getFile(u+"/"+y+"/"+H+"/"+E,mxUtils.bind(this,function(k){f.meta.last_commit_id=k.meta.last_commit_id;d()}),c):d()};GitLabClient.prototype.pickFolder=
-function(f){this.showGitLabDialog(!1,f,!0)};GitLabClient.prototype.pickFile=function(f){f=null!=f?f:mxUtils.bind(this,function(g){this.ui.loadFile("A"+encodeURIComponent(g))});this.showGitLabDialog(!0,f)};GitLabClient.prototype.showGitLabDialog=function(f,g,c){var p=null,q=null,u=null,y=null,H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.overflow="hidden";H.style.height="304px";var E=document.createElement("h3");mxUtils.write(E,mxResources.get(f?"selectFile":"selectFolder"));
-E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(E);var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.border="1px solid lightgray";F.style.boxSizing="border-box";F.style.padding="4px";F.style.overflow="auto";F.style.lineHeight="1.2em";F.style.height="274px";H.appendChild(F);var d=document.createElement("div");d.style.textOverflow="ellipsis";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.padding="4px";d.style.width=
-"100%";var k=new CustomDialog(this.ui,H,mxUtils.bind(this,function(){g(p+"/"+q+"/"+encodeURIComponent(u)+"/"+y)}));this.ui.showDialog(k.container,420,370,!0,!0);f&&k.okButton.parentNode.removeChild(k.okButton);var l=mxUtils.bind(this,function(R,T,S,Q){var v=document.createElement("a");v.setAttribute("title",R);v.style.cursor="pointer";mxUtils.write(v,R);mxEvent.addListener(v,"click",T);Q&&(v.style.textDecoration="underline");null!=S&&(R=d.cloneNode(),R.style.padding=S,R.appendChild(v),v=R);return v}),
-n=mxUtils.bind(this,function(R){var T=document.createElement("div");T.style.marginBottom="8px";T.appendChild(l(p+"/"+q,mxUtils.bind(this,function(){y=null;C()}),null,!0));R||(mxUtils.write(T," / "),T.appendChild(l(decodeURIComponent(u),mxUtils.bind(this,function(){y=null;G()}),null,!0)));if(null!=y&&0<y.length){var S=y.split("/");for(R=0;R<S.length;R++)(function(Q){mxUtils.write(T," / ");T.appendChild(l(S[Q],mxUtils.bind(this,function(){y=S.slice(0,Q+1).join("/");I()}),null,!0))})(R)}F.appendChild(T)}),
-x=mxUtils.bind(this,function(R){this.ui.handleError(R,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(y=u=q=p=null,C()):this.ui.hideDialog()}))}),A=null,B=null,I=mxUtils.bind(this,function(R){null==R&&(F.innerText="",R=1);var T=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/tree?path="+y+"&ref="+u+"&per_page=100&page="+R,null,"GET");this.ui.spinner.spin(F,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=B&&
-(mxEvent.removeListener(F,"scroll",B),B=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 S=mxUtils.bind(this,function(){I(R+1)});mxEvent.addListener(A,"click",S);this.executeRequest(T,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==R&&(n(!u),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==
-y||null==y)y=null,C();else{var K=y.split("/");y=K.slice(0,K.length-1).join("/");I()}}),"4px")));var v=JSON.parse(Q.getText());if(null==v||0==v.length)c||(mxUtils.br(F),mxUtils.write(F,mxResources.get("noFiles")));else{var z=!0,N=0,J=mxUtils.bind(this,function(K){for(var m=0;m<v.length;m++)mxUtils.bind(this,function(t){if(K==("tree"==t.type)){var D=d.cloneNode();D.style.backgroundColor=z?Editor.isDarkMode()?"#000000":"#eeeeee":"";z=!z;var M=document.createElement("img");M.src=IMAGE_PATH+"/"+("tree"==
-t.type?"folder.png":"file.png");M.setAttribute("align","absmiddle");M.style.marginRight="4px";M.style.marginTop="-4px";M.width=20;D.appendChild(M);D.appendChild(l(t.name+("tree"==t.type?"/":""),mxUtils.bind(this,function(){"tree"==t.type?(y=t.path,I()):f&&"blob"==t.type&&(this.ui.hideDialog(),g(p+"/"+q+"/"+u+"/"+t.path))})));F.appendChild(D);N++}})(v[m])});J(!0);f&&J(!1);100==N&&(F.appendChild(A),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&S()},mxEvent.addListener(F,"scroll",B))}}))}),
-x,!0)}),G=mxUtils.bind(this,function(R,T){null==R&&(F.innerText="",R=1);var S=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/branches?per_page=100&page="+R,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(F,"scroll",B),B=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 Q=mxUtils.bind(this,function(){G(R+1)});mxEvent.addListener(A,"click",Q);this.executeRequest(S,mxUtils.bind(this,function(v){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==R&&(n(!0),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){y=null;C()}),"4px")));var z=JSON.parse(v.getText());if(null==z||0==z.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else if(1==z.length&&T)u=z[0].name,y="",I();else{for(var N=
-0;N<z.length;N++)mxUtils.bind(this,function(J,K){var m=d.cloneNode();m.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";m.appendChild(l(J.name,mxUtils.bind(this,function(){u=encodeURIComponent(J.name);y="";I()})));F.appendChild(m)})(z[N],N);100==z.length&&(F.appendChild(A),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&Q()},mxEvent.addListener(F,"scroll",B))}}))}),x)});k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));
-var C=mxUtils.bind(this,function(R){var T=this.ui.spinner,S=0;this.ui.spinner.stop();var Q=function(){T.spin(F,mxResources.get("loading"));S+=1},v=function(){--S;0===S&&T.stop()};null==R&&(F.innerText="",R=1);null!=B&&(mxEvent.removeListener(F,"scroll",B),B=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 z=mxUtils.bind(this,function(){0===S&&C(R+1)});mxEvent.addListener(A,
-"click",z);var N=mxUtils.bind(this,function(K){Q();var m=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(m,mxUtils.bind(this,function(t){this.ui.tryAndHandle(mxUtils.bind(this,function(){K(JSON.parse(t.getText()));v()}))}),x)}),J=mxUtils.bind(this,function(K,m){Q();var t=new mxXmlRequest(this.baseUrl+"/groups/"+K.id+"/projects?per_page=100",null,"GET");this.executeRequest(t,mxUtils.bind(this,function(D){this.ui.tryAndHandle(mxUtils.bind(this,function(){m(K,JSON.parse(D.getText()));
-v()}))}),x)});N(mxUtils.bind(this,function(K){if(null==this.user)mxUtils.write(F,mxResources.get("loggedOut"));else{Q();var m=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+R,null,"GET");this.executeRequest(m,mxUtils.bind(this,function(t){t=JSON.parse(t.getText());if(null!=t&&0!=t.length||null!=K&&0!=K.length){1==R&&(F.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===S){var L=new FilenameDialog(this.ui,"group/project",mxResources.get("ok"),
-mxUtils.bind(this,function(O){null!=O&&(O=O.split("/"),1<O.length?(p=O.slice(0,O.length-1).join("/"),q=O[O.length-1],y="",G(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(L.container,300,80,!0,!1);L.init()}}))),mxUtils.br(F),mxUtils.br(F));for(var D=!0,M=0;M<t.length;M++)mxUtils.bind(this,function(L){var O=d.cloneNode();O.style.backgroundColor=D?Editor.isDarkMode()?"#000000":"#eeeeee":"";D=!D;O.appendChild(l(L.name_with_namespace,
-mxUtils.bind(this,function(){0===S&&(p=L.owner.username,q=L.path,y="",G(null,!0))})));F.appendChild(O)})(t[M]);for(M=0;M<K.length;M++)Q(),J(K[M],mxUtils.bind(this,function(L,O){v();for(var P=0;P<O.length;P++){var U=d.cloneNode();U.style.backgroundColor=D?Editor.isDarkMode()?"#000000":"#eeeeee":"";D=!D;mxUtils.bind(this,function(V){U.appendChild(l(V.name_with_namespace,mxUtils.bind(this,function(){0===S&&(p=L.full_path,q=V.path,y="",G(null,!0))})));F.appendChild(U)})(O[P])}}));v()}else v(),mxUtils.br(F),
-mxUtils.write(F,mxResources.get("repositoryNotFound"));100==t.length&&(F.appendChild(A),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&z()},mxEvent.addListener(F,"scroll",B))}),x)}}))});b?this.user?C():this.updateUser(function(){C()},x,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){C()},x,!0)}),x)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));
-this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,f,g,c,p,q,u){this.file=b;this.id=f;this.content=g;this.modifiedDate=c;this.createdDate=p;this.isResolved=q;this.user=u;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,g,c,p){f()};DrawioComment.prototype.editComment=function(b,f,g){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DriveComment=function(b,f,g,c,p,q,u,y){DrawioComment.call(this,b,f,g,c,p,q,u);this.pCommentId=y};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,f,g,c,p){b={content:b.content};c?b.verb="resolve":p&&(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(q){f(q.replyId)}),g)};
-DriveComment.prototype.editComment=function(b,f,g){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"},f,g)};
-DriveComment.prototype.deleteComment=function(b,f){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,f)};function mxODPicker(b,f,g,c,p,q,u,y,H,E,F,d,k,l){function n(X,W){W=W||document;return W.querySelector(X)}function x(X,W,Y){if(null==X["@microsoft.graph.downloadUrl"])if(null==X.parentReference)Y();else{c(X.id,X.parentReference.driveId,function(fa){x(fa,W,Y)},Y);return}var Z=new XMLHttpRequest;Z.open("GET",X["@microsoft.graph.downloadUrl"]);var aa=X.file?"image/png"==X.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var fa=Z.responseText;
-aa?(fa="data:image/png;base64,"+Editor.base64Encode(fa),fa=Editor.extractGraphModelFromPng(fa)):/\.pdf$/.test(X.name)&&(fa="data:application/pdf;base64,"+Editor.base64Encode(fa),fa=Editor.extractGraphModelFromPdf(fa));var ea=mxUtils.parseXml(fa),ca="mxlibrary"==ea.documentElement.nodeName?ea.documentElement:Editor.extractGraphModel(ea.documentElement);if(null!=ca){W(ca.ownerDocument);return}}catch(ha){}Y()}};(aa||/\.pdf$/.test(X.name))&&Z.overrideMimeType&&Z.overrideMimeType("text/plain; charset=x-user-defined");
-Z.send()}function A(){d&&null!=N?z.exportToCanvas(function(X){X=EditorUi.prototype.createImageDataUri(X,null,"png");u(J,X);q(J)},400,null,null,function(X){console.log(X)},600,null,null,null,null,null,N):(u(J,void 0),q(J))}function B(X){function W(Y){P.style.background="transparent";P.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,Y);P.appendChild(Z);v.stop()}if(null!=P)if(P.style.background="transparent",P.innerText="",null==X||X.folder||/\.drawiolib$/.test(X.name))W(mxResources.get("noPreview"));
-else try{null!=X.remoteItem&&(X=X.remoteItem),M=X,v.spin(P),x(X,function(Y){v.stop();if(M==X)if("mxlibrary"==Y.documentElement.nodeName)W(mxResources.get("noPreview"));else{var Z=Y.getElementsByTagName("diagram");N=AspectDialog.prototype.createViewer(P,0==Z.length?Y.documentElement:Z[0],null,"transparent")}},function(){J=null;W(mxResources.get("notADiagramFile"))})}catch(Y){J=null,W(mxResources.get("notADiagramFile"))}}function I(){var X=n(".odFilesBreadcrumb");if(null!=X){X.innerText="";for(var W=
-0;W<t.length-1;W++){var Y=document.createElement("span");Y.className="odBCFolder";Y.innerHTML=mxUtils.htmlEntities(t[W].name||mxResources.get("home"));X.appendChild(Y);(function(aa,fa){Y.addEventListener("click",function(){f(null);t=t.slice(0,fa);C(aa.driveId,aa.folderId,aa.siteId,aa.name)})})(t[W],W);var Z=document.createElement("span");Z.innerHTML=" &gt; ";X.appendChild(Z)}null!=t[t.length-1]&&(W=document.createElement("span"),W.innerHTML=mxUtils.htmlEntities(1==t.length?mxResources.get(H?"selectFolder":
-"officeSelDiag"):t[t.length-1].name||mxResources.get("home")),X.appendChild(W))}}function G(){if(null!=J&&!m)if("sharepoint"==K)C("site",null,J.id,J.displayName);else if("site"==K)C("subsite",null,J.id,J.name);else{var X=J.folder;J=J.remoteItem?J.remoteItem:J;var W=(J.parentReference?J.parentReference.driveId:null)||K,Y=J.id;X?C(W,Y,null,J.name):A()}}function C(X,W,Y,Z,aa){function fa(sa){v.stop();var va=document.createElement("table");va.className="odFileListGrid";for(var ja=null,ma=0,wa=0;null!=
-sa&&wa<sa.length;wa++){var oa=sa[wa];if(1!=ha||!oa.webUrl||0<oa.webUrl.indexOf("sharepoint.com/sites/")||0>oa.webUrl.indexOf("sharepoint.com/")){var ya=oa.displayName||oa.name,Ca=mxUtils.htmlEntities(oa.description||ya);ha&&(oa.folder=2==ha?{isRoot:!0}:!0);var Fa=null!=oa.folder;if(!H||Fa){var Aa=document.createElement("tr");Aa.className=ma++%2?"odOddRow":"odEvenRow";var Ea=document.createElement("td");Ea.style.width="36px";var Oa=document.createElement("img");Oa.src="/images/"+(Fa?"folder.png":"file.png");
-Oa.className="odFileImg";Ea.appendChild(Oa);Aa.appendChild(Ea);Ea=document.createElement("td");Fa=document.createElement("div");Fa.className="odFileTitle";Fa.innerHTML=mxUtils.htmlEntities(ya);Fa.setAttribute("title",Ca);Ea.appendChild(Fa);Aa.appendChild(Ea);va.appendChild(Aa);null==ja&&(ja=Aa,ja.className+=" odRowSelected",J=oa,K=X,l||f(J));(function(Ba,Da){Aa.addEventListener("dblclick",G);Aa.addEventListener("click",function(){ja!=Da&&(ja.className=ja.className.replace("odRowSelected",""),ja=Da,
-ja.className+=" odRowSelected",J=Ba,K=X,l||f(J))})})(oa,Aa)}}}0==ma?(sa=document.createElement("div"),sa.className="odEmptyFolder",sa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ba.appendChild(sa)):ba.appendChild(va);I();m=!1}function ea(sa){g(sa?sa:ra,function(va){if(ca){var ja=va.value||[];if(l||ha)Array.prototype.push.apply(pa,ja);else{for(var ma=0;ma<ja.length;ma++){var wa=ja[ma],oa=wa.file?wa.file.mimeType:null;(wa.folder||"text/html"==oa||"text/xml"==
-oa||"application/xml"==oa||"image/png"==oa||/\.svg$/.test(wa.name)||/\.html$/.test(wa.name)||/\.xml$/.test(wa.name)||/\.png$/.test(wa.name)||/\.drawio$/.test(wa.name)||/\.drawiolib$/.test(wa.name)||/\.pdf$/.test(wa.name))&&pa.push(wa)}pa.sort(function(ya,Ca){var Fa=ya.name.toLowerCase(),Aa=Ca.name.toLowerCase();return ya.folder&&!Ca.folder?-1:!ya.folder&&Ca.folder?1:Fa<Aa?-1:Fa>Aa?1:0})}va["@odata.nextLink"]&&1E3>pa.length?ea(va["@odata.nextLink"]):(clearTimeout(ka),fa(pa))}},function(va){if(ca){clearTimeout(ka);
-var ja=null;try{ja=JSON.parse(va.responseText).error.message}catch(ma){}y(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ja?" ("+ja+")":""));m=!1;v.stop()}},null!=sa)}if(!m){n(".odCatsList").style.display="block";n(".odFilesSec").style.display="block";null!=P&&(P.innerText="",P.style.top="50%");var ca=m=!0,ha=0;D=arguments;var ka=setTimeout(function(){m=ca=!1;v.stop();y(mxResources.get("timeout"))},2E4),ba=n(".odFilesList");ba.innerText="";v.spin(ba);switch(X){case "recent":t=
-[{name:mxResources.get("recent",null,"Recent"),driveId:X}];var ia=p()||{},la=[],da;for(da in ia)la.push(ia[da]);clearTimeout(ka);fa(la);return;case "shared":var ra="/me/drive/sharedWithMe";t=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:X}];break;case "sharepoint":ra="/sites?search=";t=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:X}];ha=1;break;case "site":t.push({name:Z,driveId:X,folderId:W,siteId:Y});ra="/sites/"+Y+"/drives";ha=2;break;case "subsite":t.push({name:Z,
-driveId:X,folderId:W,siteId:Y});ra="/drives/"+Y+(W?"/items/"+W:"/root")+"/children";break;case "search":X=K;t=[{driveId:X,name:mxResources.get("back",null,"Back")}];aa=encodeURIComponent(aa.replace(/'/g,"\\'"));ra=X?"/drives/"+X+"/root/search(q='"+aa+"')":"/me/drive/root/search(q='"+aa+"')";break;default:null==W?t=[{driveId:X}]:t.push({name:Z,driveId:X,folderId:W}),ra=(X?"/drives/"+X:"/me/drive")+(W?"/items/"+W:"/root")+"/children"}ha||(ra+=(0<ra.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");
-var pa=[];ea()}}function R(X){U.className=U.className.replace("odCatSelected","");U=X;U.className+=" odCatSelected"}function T(X){m||(V=null,C("search",null,null,null,X))}var S="";null==f&&(f=B,S='<div style="text-align: center;" class="odPreview"></div>');null==p&&(p=function(){var X=null;try{X=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(W){}return X});null==q&&(q=function(X){if(null!=X){var W=p()||{};delete X["@microsoft.graph.downloadUrl"];W[X.id]=X;localStorage.setItem("mxODPickerRecentList",
-JSON.stringify(W))}});S='<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 class="geAdaptiveAsset" src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+S+(E?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(F?'<button id="odSubmitBtn" class="odSubmitBtn">'+
-mxUtils.htmlEntities(mxResources.get(H?"select":"open"))+"</button>":"");var Q=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();Q=".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 {"+
-(Q?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(Q?"":"\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 v=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),z=new Editor,N=null,J=null,K=null,m=!1,t=[],D=null,M=null;this.getSelectedItem=function(){null!=J&&q(J);return J};if(null==n("#mxODPickerCss")){var L=document.head||document.getElementsByTagName("head")[0],O=document.createElement("style");L.appendChild(O);O.type="text/css";O.id="mxODPickerCss";O.appendChild(document.createTextNode(Q))}b.innerHTML=
-S;var P=n(".odPreview"),U=n("#odFiles");b=function(X,W){W=W||document;return W.querySelectorAll(X)}(".odCatListTitle");for(S=0;S<b.length;S++)b[S].addEventListener("click",function(){J=M=null;if(!m)switch(R(this),this.id){case "odFiles":C();break;case "odRecent":C("recent");break;case "odShared":C("shared");break;case "odSharepoint":C("sharepoint")}});var V=null;n("#odSearchBox").addEventListener("keyup",function(X){var W=this;null!=V&&clearTimeout(V);13==X.keyCode?T(W.value):V=setTimeout(function(){T(W.value)},
-500)});n("#refreshOD").addEventListener("click",function(){if(null!=D){f(null);var X=t.slice();C.apply(this,D);t=X}});E&&n("#odBackBtn").addEventListener("click",E);F&&n("#odSubmitBtn").addEventListener("click",A);null!=k?(E=k.pop(),"sharepoint"==k[0].driveId&&R(n("#odSharepoint")),t=k,C(E.driveId,E.folderId,E.siteId,E.name)):C()};App=function(b,f,g){EditorUi.call(this,b,f,null!=g?g:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
-(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(c,p,q){if("1"==urlParams.openInSameWin||navigator.standalone)null!=q&&q();else{var u=null;try{u=window.open(c)}catch(y){}null==u||void 0===u?this.showDialog((new PopupDialog(this,c,p,q)).container,340,140,!0,!0):null!=p&&p()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&
+GitLabFile.prototype.setDescriptorEtag=function(b,f){b.last_commit_id=f};GitLabLibrary=function(b,f,k){GitLabFile.call(this,b,f,k)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,f,k){this.saveFile(b,!1,f,k)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(f){GitHubClient.call(this,f,"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.DRAWIO_SERVER_URL+"gitlab";GitLabClient.prototype.authenticate=
+function(f,k){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),f,k):null!=k&&k(c)}),k)};GitLabClient.prototype.authenticateStep2=function(f,k,c){if(null==window.onGitLabCallback){var p=mxUtils.bind(this,function(){var q=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+
+f),null,"GET")).send(mxUtils.bind(this,function(u){if(200<=u.getStatus()&&299>=u.getStatus())try{b=JSON.parse(u.getText()).access_token,this.setToken(b),this.setUser(null),k()}catch(z){c({message:mxResources.get("authFailed"),retry:p})}else this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==u.getStatus()?p():c({message:mxResources.get("accessDenied"),retry:p})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(u,z){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+
+this.clientId+"&scope="+this.scope+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(G,E){q?(window.onGitLabCallback=null,q=!1,null==G?c({message:mxResources.get("accessDenied"),retry:p}):(null!=z&&z(),b=G.access_token,this.setToken(b),this.setUser(null),u&&this.setPersistentToken("remembered"),k(),null!=E&&E.close())):
+null!=E&&E.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onGitLabCallback=null,q=!1,c({message:mxResources.get("accessDenied"),retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(f,k,c,p){var q=mxUtils.bind(this,function(z){var G=!0,E=window.setTimeout(mxUtils.bind(this,function(){G=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),F=this.authToken+
+" "+b;f.setRequestHeaders=function(d,g){d.setRequestHeader("Authorization",F);d.setRequestHeader("PRIVATE_TOKEN",F);d.setRequestHeader("Content-Type","application/json")};f.send(mxUtils.bind(this,function(){window.clearTimeout(E);if(G)if(200<=f.getStatus()&&299>=f.getStatus()||p&&404==f.getStatus())k(f);else if(401===f.getStatus())z?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){u(!0)},c)})}):this.authenticate(function(){q(!0)},c);else if(403===
+f.getStatus()){var d=!1;try{var g=JSON.parse(f.getText());null!=g&&null!=g.errors&&0<g.errors.length&&(d="too_large"==g.errors[0].code)}catch(l){}c({message:mxResources.get(d?"drawingTooLarge":"forbidden")})}else 404===f.getStatus()?c({message:this.getErrorMessage(f,mxResources.get("fileNotFound"))}):c({status:f.getStatus(),message:this.getErrorMessage(f,mxResources.get("error")+" "+f.getStatus())})}),mxUtils.bind(this,function(d){window.clearTimeout(E);G&&c(d)}))}),u=mxUtils.bind(this,function(z){null==
+this.user?this.updateUser(function(){u(!0)},c,z):q(z)});null==b?this.authenticate(function(){u(!0)},c):u(!1)};GitLabClient.prototype.getRefIndex=function(f,k,c,p,q,u){if(null!=q)c(f,q);else{var z=f.length-2,G=mxUtils.bind(this,function(){if(2>z)p({message:mxResources.get("fileNotFound")});else{var E=Math.max(z-1,0),F=f.slice(0,E).join("/");E=f[E];var d=f[z],g=f.slice(z+1,f.length).join("/");F=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+E)+"/repository/"+(k?u?"branches?per_page=1&page=1&ref="+
+d:"tree?path="+g+"&ref="+d:"files/"+encodeURIComponent(g)+"?ref="+d);var l=new mxXmlRequest(F,null,"HEAD");this.executeRequest(l,mxUtils.bind(this,function(){200==l.getStatus()?c(f,z):p({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==l.getStatus()?(z--,G()):p({message:mxResources.get("fileNotFound")})}))}});G()}};GitLabClient.prototype.getFile=function(f,k,c,p,q,u){p=null!=p?p:!1;this.getRefIndex(f.split("/"),!1,mxUtils.bind(this,function(z,G){var E=Math.max(G-1,0),
+F=z.slice(0,E).join("/"),d=z[E],g=z[G];f=z.slice(G+1,z.length).join("/");z=/\.png$/i.test(f);if(!q&&(/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&z))if(null!=b){E="&t="+(new Date).getTime();var l=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+d)+"/repository/files/"+encodeURIComponent(f)+"?ref="+g;z=f.split("/");this.ui.convertFile(l+E,0<z.length?z[z.length-1]:f,null,this.extension,k,c,mxUtils.bind(this,function(n,x,A){n=new mxXmlRequest(n,null,
+"GET");this.executeRequest(n,mxUtils.bind(this,function(B){try{x(this.getFileContent(JSON.parse(B.getText())))}catch(I){A(I)}}),A)}))}else c({message:mxResources.get("accessDenied")});else E="&t="+(new Date).getTime(),l=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+d)+"/repository/files/"+encodeURIComponent(f)+"?ref="+g,z=new mxXmlRequest(l+E,null,"GET"),this.executeRequest(z,mxUtils.bind(this,function(n){try{k(this.createGitLabFile(F,d,g,JSON.parse(n.getText()),p,G))}catch(x){c(x)}}),c)}),c,
+u)};GitLabClient.prototype.getFileContent=function(f){var k=f.file_name,c=f.content;"base64"===f.encoding&&(/\.jpe?g$/i.test(k)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(k)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(k)?c="data:application/pdf;base64,"+c:/\.png$/i.test(k)?(f=this.ui.extractGraphModelFromPng(c),c=null!=f&&0<f.length?f:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(f,k,c,p,q,u){var z=DRAWIO_GITLAB_URL+"/";f={org:f,repo:k,
+ref:c,name:p.file_name,path:p.file_path,html_url:z+f+"/"+k+"/blob/"+c+"/"+p.file_path,download_url:z+f+"/"+k+"/raw/"+c+"/"+p.file_path+"?inline=false",last_commit_id:p.last_commit_id,refPos:u};p=this.getFileContent(p);return q?new GitLabLibrary(this.ui,p,f):new GitLabFile(this.ui,p,f)};GitLabClient.prototype.insertFile=function(f,k,c,p,q,u,z){q=null!=q?q:!1;u=u.split("/");this.getRefIndex(u,!0,mxUtils.bind(this,function(G,E){var F=Math.max(E-1,0),d=G.slice(0,F).join("/"),g=G[F],l=G[E];path=G.slice(E+
+1,G.length).join("/");0<path.length&&(path+="/");path+=f;this.checkExists(d+"/"+g+"/"+l+"/"+path,!0,mxUtils.bind(this,function(n,x){n?q?(z||(k=Base64.encode(k)),this.showCommitDialog(f,!0,mxUtils.bind(this,function(A){this.writeFile(d,g,l,path,A,k,x,mxUtils.bind(this,function(B){try{var I=JSON.parse(B.getText());c(this.createGitLabFile(d,g,l,null!=I.content?I.content:I,q,E))}catch(H){p(H)}}),p)}),p)):(n=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,k,{org:d,repo:g,ref:l,name:f,path:path,html_url:n+
+d+"/"+g+"/blob/"+l+"/"+path,download_url:n+d+"/"+g+"/raw/"+l+"/"+path+"?inline=false",refPos:E,last_commit_id:x,isNew:!0}))):p()}))}),p,null,4>=u.length)};GitLabClient.prototype.checkExists=function(f,k,c){this.getFile(f,mxUtils.bind(this,function(p){if(k){var q=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[f]),function(){q();c(!0,p.getCurrentEtag())},function(){q();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(p){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(f,k,c,p,q,u,z,G,E){if(u.length>=this.maxFileSize)E({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(u.length)+" / 10 MB)"});else{var F="POST";c={path:encodeURIComponent(p),branch:decodeURIComponent(c),commit_message:q,content:u,encoding:"base64"};null!=z&&(c.last_commit_id=z,F="PUT");f=this.baseUrl+"/projects/"+encodeURIComponent(f+"/"+k)+"/repository/files/"+
+encodeURIComponent(p);F=new mxXmlRequest(f,JSON.stringify(c),F);this.executeRequest(F,mxUtils.bind(this,function(d){G(d)}),E)}};GitLabClient.prototype.saveFile=function(f,k,c,p,q){var u=f.meta.org,z=f.meta.repo,G=f.meta.ref,E=f.meta.path,F=mxUtils.bind(this,function(g,l){this.writeFile(u,z,G,E,q,l,g,mxUtils.bind(this,function(n){delete f.meta.isNew;this.getFile(u+"/"+z+"/"+G+"/"+E,mxUtils.bind(this,function(x){x.getData()==f.getData()?k(x.getCurrentEtag()):k({content:f.getCurrentEtag()})}),c,null,
+null,f.meta.refPos)}),c)}),d=mxUtils.bind(this,function(){if(Editor.useCanvasForExport&&/(\.png)$/i.test(E)){var g=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(l){F(f.meta.last_commit_id,l)}),c,this.ui.getCurrentFile()!=f?f.getData():null,g.scale,g.border)}else F(f.meta.last_commit_id,Base64.encode(f.getData()))});p?this.getFile(u+"/"+z+"/"+G+"/"+E,mxUtils.bind(this,function(g){f.meta.last_commit_id=g.meta.last_commit_id;d()}),c):d()};GitLabClient.prototype.pickFolder=
+function(f){this.showGitLabDialog(!1,f,!0)};GitLabClient.prototype.pickFile=function(f){f=null!=f?f:mxUtils.bind(this,function(k){this.ui.loadFile("A"+encodeURIComponent(k))});this.showGitLabDialog(!0,f)};GitLabClient.prototype.showGitLabDialog=function(f,k,c){var p=null,q=null,u=null,z=null,G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.overflow="hidden";G.style.height="304px";var E=document.createElement("h3");mxUtils.write(E,mxResources.get(f?"selectFile":"selectFolder"));
+E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";G.appendChild(E);var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.border="1px solid lightgray";F.style.boxSizing="border-box";F.style.padding="4px";F.style.overflow="auto";F.style.lineHeight="1.2em";F.style.height="274px";G.appendChild(F);var d=document.createElement("div");d.style.textOverflow="ellipsis";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.padding="4px";d.style.width=
+"100%";var g=new CustomDialog(this.ui,G,mxUtils.bind(this,function(){k(p+"/"+q+"/"+encodeURIComponent(u)+"/"+z)}));this.ui.showDialog(g.container,420,370,!0,!0);f&&g.okButton.parentNode.removeChild(g.okButton);var l=mxUtils.bind(this,function(S,U,R,P){var v=document.createElement("a");v.setAttribute("title",S);v.style.cursor="pointer";mxUtils.write(v,S);mxEvent.addListener(v,"click",U);P&&(v.style.textDecoration="underline");null!=R&&(S=d.cloneNode(),S.style.padding=R,S.appendChild(v),v=S);return v}),
+n=mxUtils.bind(this,function(S){var U=document.createElement("div");U.style.marginBottom="8px";U.appendChild(l(p+"/"+q,mxUtils.bind(this,function(){z=null;D()}),null,!0));S||(mxUtils.write(U," / "),U.appendChild(l(decodeURIComponent(u),mxUtils.bind(this,function(){z=null;H()}),null,!0)));if(null!=z&&0<z.length){var R=z.split("/");for(S=0;S<R.length;S++)(function(P){mxUtils.write(U," / ");U.appendChild(l(R[P],mxUtils.bind(this,function(){z=R.slice(0,P+1).join("/");I()}),null,!0))})(S)}F.appendChild(U)}),
+x=mxUtils.bind(this,function(S){this.ui.handleError(S,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(z=u=q=p=null,D()):this.ui.hideDialog()}))}),A=null,B=null,I=mxUtils.bind(this,function(S){null==S&&(F.innerText="",S=1);var U=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/tree?path="+z+"&ref="+u+"&per_page=100&page="+S,null,"GET");this.ui.spinner.spin(F,mxResources.get("loading"));g.okButton.removeAttribute("disabled");null!=B&&
+(mxEvent.removeListener(F,"scroll",B),B=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 R=mxUtils.bind(this,function(){I(S+1)});mxEvent.addListener(A,"click",R);this.executeRequest(U,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==S&&(n(!u),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==
+z||null==z)z=null,D();else{var K=z.split("/");z=K.slice(0,K.length-1).join("/");I()}}),"4px")));var v=JSON.parse(P.getText());if(null==v||0==v.length)c||(mxUtils.br(F),mxUtils.write(F,mxResources.get("noFiles")));else{var y=!0,L=0,J=mxUtils.bind(this,function(K){for(var m=0;m<v.length;m++)mxUtils.bind(this,function(t){if(K==("tree"==t.type)){var C=d.cloneNode();C.style.backgroundColor=y?Editor.isDarkMode()?"#000000":"#eeeeee":"";y=!y;var N=document.createElement("img");N.src=IMAGE_PATH+"/"+("tree"==
+t.type?"folder.png":"file.png");N.setAttribute("align","absmiddle");N.style.marginRight="4px";N.style.marginTop="-4px";N.width=20;C.appendChild(N);C.appendChild(l(t.name+("tree"==t.type?"/":""),mxUtils.bind(this,function(){"tree"==t.type?(z=t.path,I()):f&&"blob"==t.type&&(this.ui.hideDialog(),k(p+"/"+q+"/"+u+"/"+t.path))})));F.appendChild(C);L++}})(v[m])});J(!0);f&&J(!1);100==L&&(F.appendChild(A),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&R()},mxEvent.addListener(F,"scroll",B))}}))}),
+x,!0)}),H=mxUtils.bind(this,function(S,U){null==S&&(F.innerText="",S=1);var R=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/branches?per_page=100&page="+S,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(F,"scroll",B),B=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 P=mxUtils.bind(this,function(){H(S+1)});mxEvent.addListener(A,"click",P);this.executeRequest(R,mxUtils.bind(this,function(v){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==S&&(n(!0),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){z=null;D()}),"4px")));var y=JSON.parse(v.getText());if(null==y||0==y.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else if(1==y.length&&U)u=y[0].name,z="",I();else{for(var L=
+0;L<y.length;L++)mxUtils.bind(this,function(J,K){var m=d.cloneNode();m.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";m.appendChild(l(J.name,mxUtils.bind(this,function(){u=encodeURIComponent(J.name);z="";I()})));F.appendChild(m)})(y[L],L);100==y.length&&(F.appendChild(A),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&P()},mxEvent.addListener(F,"scroll",B))}}))}),x)});g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));
+var D=mxUtils.bind(this,function(S){var U=this.ui.spinner,R=0;this.ui.spinner.stop();var P=function(){U.spin(F,mxResources.get("loading"));R+=1},v=function(){--R;0===R&&U.stop()};null==S&&(F.innerText="",S=1);null!=B&&(mxEvent.removeListener(F,"scroll",B),B=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 y=mxUtils.bind(this,function(){0===R&&D(S+1)});mxEvent.addListener(A,
+"click",y);var L=mxUtils.bind(this,function(K){P();var m=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(m,mxUtils.bind(this,function(t){this.ui.tryAndHandle(mxUtils.bind(this,function(){K(JSON.parse(t.getText()));v()}))}),x)}),J=mxUtils.bind(this,function(K,m){P();var t=new mxXmlRequest(this.baseUrl+"/groups/"+K.id+"/projects?per_page=100",null,"GET");this.executeRequest(t,mxUtils.bind(this,function(C){this.ui.tryAndHandle(mxUtils.bind(this,function(){m(K,JSON.parse(C.getText()));
+v()}))}),x)});L(mxUtils.bind(this,function(K){if(null==this.user)mxUtils.write(F,mxResources.get("loggedOut"));else{P();var m=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+S,null,"GET");this.executeRequest(m,mxUtils.bind(this,function(t){t=JSON.parse(t.getText());if(null!=t&&0!=t.length||null!=K&&0!=K.length){1==S&&(F.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===R){var M=new FilenameDialog(this.ui,"group/project",mxResources.get("ok"),
+mxUtils.bind(this,function(O){null!=O&&(O=O.split("/"),1<O.length?(p=O.slice(0,O.length-1).join("/"),q=O[O.length-1],z="",H(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(M.container,300,80,!0,!1);M.init()}}))),mxUtils.br(F),mxUtils.br(F));for(var C=!0,N=0;N<t.length;N++)mxUtils.bind(this,function(M){var O=d.cloneNode();O.style.backgroundColor=C?Editor.isDarkMode()?"#000000":"#eeeeee":"";C=!C;O.appendChild(l(M.name_with_namespace,
+mxUtils.bind(this,function(){0===R&&(p=M.owner.username,q=M.path,z="",H(null,!0))})));F.appendChild(O)})(t[N]);for(N=0;N<K.length;N++)P(),J(K[N],mxUtils.bind(this,function(M,O){v();for(var Q=0;Q<O.length;Q++){var T=d.cloneNode();T.style.backgroundColor=C?Editor.isDarkMode()?"#000000":"#eeeeee":"";C=!C;mxUtils.bind(this,function(V){T.appendChild(l(V.name_with_namespace,mxUtils.bind(this,function(){0===R&&(p=M.full_path,q=V.path,z="",H(null,!0))})));F.appendChild(T)})(O[Q])}}));v()}else v(),mxUtils.br(F),
+mxUtils.write(F,mxResources.get("repositoryNotFound"));100==t.length&&(F.appendChild(A),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&y()},mxEvent.addListener(F,"scroll",B))}),x)}}))});b?this.user?D():this.updateUser(function(){D()},x,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){D()},x,!0)}),x)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));
+this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,f,k,c,p,q,u){this.file=b;this.id=f;this.content=k;this.modifiedDate=c;this.createdDate=p;this.isResolved=q;this.user=u;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,k,c,p){f()};DrawioComment.prototype.editComment=function(b,f,k){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DriveComment=function(b,f,k,c,p,q,u,z){DrawioComment.call(this,b,f,k,c,p,q,u);this.pCommentId=z};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,f,k,c,p){b={content:b.content};c?b.verb="resolve":p&&(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(q){f(q.replyId)}),k)};
+DriveComment.prototype.editComment=function(b,f,k){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"},f,k)};
+DriveComment.prototype.deleteComment=function(b,f){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,f)};function mxODPicker(b,f,k,c,p,q,u,z,G,E,F,d,g,l){function n(X,W){W=W||document;return W.querySelector(X)}function x(X,W,Y){if(null==X["@microsoft.graph.downloadUrl"])if(null==X.parentReference)Y();else{c(X.id,X.parentReference.driveId,function(ja){x(ja,W,Y)},Y);return}var Z=new XMLHttpRequest;Z.open("GET",X["@microsoft.graph.downloadUrl"]);var aa=X.file?"image/png"==X.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ja=Z.responseText;
+aa?(ja="data:image/png;base64,"+Editor.base64Encode(ja),ja=Editor.extractGraphModelFromPng(ja)):/\.pdf$/.test(X.name)&&(ja="data:application/pdf;base64,"+Editor.base64Encode(ja),ja=Editor.extractGraphModelFromPdf(ja));var ea=mxUtils.parseXml(ja),ca="mxlibrary"==ea.documentElement.nodeName?ea.documentElement:Editor.extractGraphModel(ea.documentElement);if(null!=ca){W(ca.ownerDocument);return}}catch(ka){}Y()}};(aa||/\.pdf$/.test(X.name))&&Z.overrideMimeType&&Z.overrideMimeType("text/plain; charset=x-user-defined");
+Z.send()}function A(){d&&null!=L?y.exportToCanvas(function(X){X=EditorUi.prototype.createImageDataUri(X,null,"png");u(J,X);q(J)},400,null,null,function(X){console.log(X)},600,null,null,null,null,null,L):(u(J,void 0),q(J))}function B(X){function W(Y){Q.style.background="transparent";Q.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,Y);Q.appendChild(Z);v.stop()}if(null!=Q)if(Q.style.background="transparent",Q.innerText="",null==X||X.folder||/\.drawiolib$/.test(X.name))W(mxResources.get("noPreview"));
+else try{null!=X.remoteItem&&(X=X.remoteItem),N=X,v.spin(Q),x(X,function(Y){v.stop();if(N==X)if("mxlibrary"==Y.documentElement.nodeName)W(mxResources.get("noPreview"));else{var Z=Y.getElementsByTagName("diagram");L=AspectDialog.prototype.createViewer(Q,0==Z.length?Y.documentElement:Z[0],null,"transparent")}},function(){J=null;W(mxResources.get("notADiagramFile"))})}catch(Y){J=null,W(mxResources.get("notADiagramFile"))}}function I(){var X=n(".odFilesBreadcrumb");if(null!=X){X.innerText="";for(var W=
+0;W<t.length-1;W++){var Y=document.createElement("span");Y.className="odBCFolder";Y.innerHTML=mxUtils.htmlEntities(t[W].name||mxResources.get("home"));X.appendChild(Y);(function(aa,ja){Y.addEventListener("click",function(){f(null);t=t.slice(0,ja);D(aa.driveId,aa.folderId,aa.siteId,aa.name)})})(t[W],W);var Z=document.createElement("span");Z.innerHTML=" &gt; ";X.appendChild(Z)}null!=t[t.length-1]&&(W=document.createElement("span"),W.innerHTML=mxUtils.htmlEntities(1==t.length?mxResources.get(G?"selectFolder":
+"officeSelDiag"):t[t.length-1].name||mxResources.get("home")),X.appendChild(W))}}function H(){if(null!=J&&!m)if("sharepoint"==K)D("site",null,J.id,J.displayName);else if("site"==K)D("subsite",null,J.id,J.name);else{var X=J.folder;J=J.remoteItem?J.remoteItem:J;var W=(J.parentReference?J.parentReference.driveId:null)||K,Y=J.id;X?D(W,Y,null,J.name):A()}}function D(X,W,Y,Z,aa){function ja(qa){v.stop();var sa=document.createElement("table");sa.className="odFileListGrid";for(var ha=null,ma=0,ta=0;null!=
+qa&&ta<qa.length;ta++){var na=qa[ta];if(1!=ka||!na.webUrl||0<na.webUrl.indexOf("sharepoint.com/sites/")||0>na.webUrl.indexOf("sharepoint.com/")){var xa=na.displayName||na.name,Aa=mxUtils.htmlEntities(na.description||xa);ka&&(na.folder=2==ka?{isRoot:!0}:!0);var Ea=null!=na.folder;if(!G||Ea){var va=document.createElement("tr");va.className=ma++%2?"odOddRow":"odEvenRow";var Fa=document.createElement("td");Fa.style.width="36px";var ya=document.createElement("img");ya.src="/images/"+(Ea?"folder.png":"file.png");
+ya.className="odFileImg";Fa.appendChild(ya);va.appendChild(Fa);Fa=document.createElement("td");Ea=document.createElement("div");Ea.className="odFileTitle";Ea.innerHTML=mxUtils.htmlEntities(xa);Ea.setAttribute("title",Aa);Fa.appendChild(Ea);va.appendChild(Fa);sa.appendChild(va);null==ha&&(ha=va,ha.className+=" odRowSelected",J=na,K=X,l||f(J));(function(Oa,Ca){va.addEventListener("dblclick",H);va.addEventListener("click",function(){ha!=Ca&&(ha.className=ha.className.replace("odRowSelected",""),ha=Ca,
+ha.className+=" odRowSelected",J=Oa,K=X,l||f(J))})})(na,va)}}}0==ma?(qa=document.createElement("div"),qa.className="odEmptyFolder",qa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ba.appendChild(qa)):ba.appendChild(sa);I();m=!1}function ea(qa){k(qa?qa:ra,function(sa){if(ca){var ha=sa.value||[];if(l||ka)Array.prototype.push.apply(pa,ha);else{for(var ma=0;ma<ha.length;ma++){var ta=ha[ma],na=ta.file?ta.file.mimeType:null;(ta.folder||"text/html"==na||"text/xml"==
+na||"application/xml"==na||"image/png"==na||/\.svg$/.test(ta.name)||/\.html$/.test(ta.name)||/\.xml$/.test(ta.name)||/\.png$/.test(ta.name)||/\.drawio$/.test(ta.name)||/\.drawiolib$/.test(ta.name)||/\.pdf$/.test(ta.name))&&pa.push(ta)}pa.sort(function(xa,Aa){var Ea=xa.name.toLowerCase(),va=Aa.name.toLowerCase();return xa.folder&&!Aa.folder?-1:!xa.folder&&Aa.folder?1:Ea<va?-1:Ea>va?1:0})}sa["@odata.nextLink"]&&1E3>pa.length?ea(sa["@odata.nextLink"]):(clearTimeout(la),ja(pa))}},function(sa){if(ca){clearTimeout(la);
+var ha=null;try{ha=JSON.parse(sa.responseText).error.message}catch(ma){}z(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ha?" ("+ha+")":""));m=!1;v.stop()}},null!=qa)}if(!m){n(".odCatsList").style.display="block";n(".odFilesSec").style.display="block";null!=Q&&(Q.innerText="",Q.style.top="50%");var ca=m=!0,ka=0;C=arguments;var la=setTimeout(function(){m=ca=!1;v.stop();z(mxResources.get("timeout"))},2E4),ba=n(".odFilesList");ba.innerText="";v.spin(ba);switch(X){case "recent":t=
+[{name:mxResources.get("recent",null,"Recent"),driveId:X}];var ia=p()||{},fa=[],da;for(da in ia)fa.push(ia[da]);clearTimeout(la);ja(fa);return;case "shared":var ra="/me/drive/sharedWithMe";t=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:X}];break;case "sharepoint":ra="/sites?search=";t=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:X}];ka=1;break;case "site":t.push({name:Z,driveId:X,folderId:W,siteId:Y});ra="/sites/"+Y+"/drives";ka=2;break;case "subsite":t.push({name:Z,
+driveId:X,folderId:W,siteId:Y});ra="/drives/"+Y+(W?"/items/"+W:"/root")+"/children";break;case "search":X=K;t=[{driveId:X,name:mxResources.get("back",null,"Back")}];aa=encodeURIComponent(aa.replace(/'/g,"\\'"));ra=X?"/drives/"+X+"/root/search(q='"+aa+"')":"/me/drive/root/search(q='"+aa+"')";break;default:null==W?t=[{driveId:X}]:t.push({name:Z,driveId:X,folderId:W}),ra=(X?"/drives/"+X:"/me/drive")+(W?"/items/"+W:"/root")+"/children"}ka||(ra+=(0<ra.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");
+var pa=[];ea()}}function S(X){T.className=T.className.replace("odCatSelected","");T=X;T.className+=" odCatSelected"}function U(X){m||(V=null,D("search",null,null,null,X))}var R="";null==f&&(f=B,R='<div style="text-align: center;" class="odPreview"></div>');null==p&&(p=function(){var X=null;try{X=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(W){}return X});null==q&&(q=function(X){if(null!=X){var W=p()||{};delete X["@microsoft.graph.downloadUrl"];W[X.id]=X;localStorage.setItem("mxODPickerRecentList",
+JSON.stringify(W))}});R='<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 class="geAdaptiveAsset" src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+R+(E?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(F?'<button id="odSubmitBtn" class="odSubmitBtn">'+
+mxUtils.htmlEntities(mxResources.get(G?"select":"open"))+"</button>":"");var P=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();P=".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 {"+
+(P?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(P?"":"\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 v=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),y=new Editor,L=null,J=null,K=null,m=!1,t=[],C=null,N=null;this.getSelectedItem=function(){null!=J&&q(J);return J};if(null==n("#mxODPickerCss")){var M=document.head||document.getElementsByTagName("head")[0],O=document.createElement("style");M.appendChild(O);O.type="text/css";O.id="mxODPickerCss";O.appendChild(document.createTextNode(P))}b.innerHTML=
+R;var Q=n(".odPreview"),T=n("#odFiles");b=function(X,W){W=W||document;return W.querySelectorAll(X)}(".odCatListTitle");for(R=0;R<b.length;R++)b[R].addEventListener("click",function(){J=N=null;if(!m)switch(S(this),this.id){case "odFiles":D();break;case "odRecent":D("recent");break;case "odShared":D("shared");break;case "odSharepoint":D("sharepoint")}});var V=null;n("#odSearchBox").addEventListener("keyup",function(X){var W=this;null!=V&&clearTimeout(V);13==X.keyCode?U(W.value):V=setTimeout(function(){U(W.value)},
+500)});n("#refreshOD").addEventListener("click",function(){if(null!=C){f(null);var X=t.slice();D.apply(this,C);t=X}});E&&n("#odBackBtn").addEventListener("click",E);F&&n("#odSubmitBtn").addEventListener("click",A);null!=g?(E=g.pop(),"sharepoint"==g[0].driveId&&S(n("#odSharepoint")),t=g,D(E.driveId,E.folderId,E.siteId,E.name)):D()};App=function(b,f,k){EditorUi.call(this,b,f,null!=k?k:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
+(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(c,p,q){if("1"==urlParams.openInSameWin||navigator.standalone)null!=q&&q();else{var u=null;try{u=window.open(c)}catch(z){}null==u||void 0===u?this.showDialog((new PopupDialog(this,c,p,q)).container,340,140,!0,!0):null!=p&&p()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&
!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(c){null!=window.console&&console.log("Plugin Error:",c,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(c){try{c(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";
App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":"js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="js/jquery/jquery-3.6.0.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL=window.PUSHER_URL||"https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL="js/simplepeer/simplepeer9.10.0.min.js";App.GOOGLE_APIS="drive-share";App.startTime=new Date;
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",nxtcld:"plugins/nextcloud.js",monday:"plugins/monday.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",trees:"plugins/trees/trees.js",
"import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex tips svgdata number sql props text anim update trees replay anon webcola tags".split(" ");
-App.loadScripts=function(b,f,g){for(var c=b.length,p=!1,q=0;q<b.length;q++)mxscript(b[q],function(){0!=--c||p||null==f||f()},null,null,null,function(u,y){p=!0;null!=g&&g(Error(u));console.error("Error loading script",u,y,y.stack)})};
-App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage)try{for(var f=document.cookie.split(";"),g=0;g<f.length;g++){var c=mxUtils.trim(f[g]);if("MODE="==c.substring(0,5)){b=c.substring(5);break}}if(null!=b&&isLocalStorage){var p=new Date;p.setYear(p.getFullYear()-1);document.cookie="MODE=; expires="+p.toUTCString();localStorage.setItem(".mode",b)}}catch(q){}return b};
+App.loadScripts=function(b,f,k){for(var c=b.length,p=!1,q=0;q<b.length;q++)mxscript(b[q],function(){0!=--c||p||null==f||f()},null,null,null,function(u,z){p=!0;null!=k&&k(Error(u));console.error("Error loading script",u,z,z.stack)})};
+App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage)try{for(var f=document.cookie.split(";"),k=0;k<f.length;k++){var c=mxUtils.trim(f[k]);if("MODE="==c.substring(0,5)){b=c.substring(5);break}}if(null!=b&&isLocalStorage){var p=new Date;p.setYear(p.getFullYear()-1);document.cookie="MODE=; expires="+p.toUTCString();localStorage.setItem(".mode",b)}}catch(q){}return b};
(function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode),null==App.mode&&"1"!=urlParams.embed&&(App.mode=App.getStoredMode()),null!=window.mxscript&&"1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=
window.location.hash&&"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=
null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
-App.clearServiceWorker=function(b,f){navigator.serviceWorker.getRegistration().then(function(g){null!=g&&g.unregister().then(function(){null!=b&&(b(),b=null)})})["catch"](function(){null!=f&&f()})};App.isSameDomain=function(b){var f=document.createElement("a");f.href=b;return f.protocol===window.location.protocol||f.host===window.location.host};App.isBuiltInPlugin=function(b){for(var f in App.pluginRegistry)if(App.pluginRegistry[f]==b)return!0;return!1};
+App.clearServiceWorker=function(b,f){navigator.serviceWorker.getRegistration().then(function(k){null!=k&&k.unregister().then(function(){null!=b&&(b(),b=null)})})["catch"](function(){null!=f&&f()})};App.isSameDomain=function(b){var f=document.createElement("a");f.href=b;return f.protocol===window.location.protocol||f.host===window.location.host};App.isBuiltInPlugin=function(b){for(var f in App.pluginRegistry)if(App.pluginRegistry[f]==b)return!0;return!1};
App.isSimpleThemePreferred=function(){var b=navigator.userAgent||navigator.vendor||window.opera;return 1024>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||/android/i.test(b)||/iPad|iPhone|iPod/.test(b)&&!window.MSStream||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints};
-App.main=function(b,f){try{var g=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var F=parseInt(mxSettings.settings.autosaveDelay);!isNaN(F)&&0<F?(DrawioFile.prototype.autosaveDelay=F,EditorUi.debug("Setting autosaveDelay",F)):EditorUi.debug("Invalid autosaveDelay",F)}null!=mxSettings.settings.defaultEdgeLength&&(F=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(F)&&0<F?(Graph.prototype.defaultEdgeLength=F,EditorUi.debug("Using defaultEdgeLength",F)):
-EditorUi.debug("Invalid defaultEdgeLength",F))}}catch(k){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(k.stack)):console.error(k)}try{if(null!=Menus.prototype.defaultFonts)for(F=0;F<Menus.prototype.defaultFonts.length;F++){var d=Menus.prototype.defaultFonts[F];"string"!==typeof d&&null!=d.fontFamily&&null!=d.fontUrl&&Graph.addFont(d.fontFamily,d.fontUrl)}mxResources.loadDefaultBundle=!1;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,
-mxLanguage))}catch(k){document.body.innerHTML="",d=document.createElement("pre"),mxUtils.write(d,k.stack),document.body.appendChild(d)}},c=function(F){mxUtils.getAll("1"!=urlParams.dev?[F]:[F,STYLE_PATH+"/default.xml"],function(d){function k(){try{try{null==Editor.currentTheme&&"1"!=urlParams.embed&&(1==urlParams.dev||1==urlParams.test||"test.draw.io"===window.location.hostname||"www.draw.io"===window.location.hostname||"preprod.diagrams.net"===window.location.hostname||"app.diagrams.net"===window.location.hostname||
+App.main=function(b,f){try{var k=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var F=parseInt(mxSettings.settings.autosaveDelay);!isNaN(F)&&0<F?(DrawioFile.prototype.autosaveDelay=F,EditorUi.debug("Setting autosaveDelay",F)):EditorUi.debug("Invalid autosaveDelay",F)}null!=mxSettings.settings.defaultEdgeLength&&(F=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(F)&&0<F?(Graph.prototype.defaultEdgeLength=F,EditorUi.debug("Using defaultEdgeLength",F)):
+EditorUi.debug("Invalid defaultEdgeLength",F))}}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):console.error(g)}try{if(null!=Menus.prototype.defaultFonts)for(F=0;F<Menus.prototype.defaultFonts.length;F++){var d=Menus.prototype.defaultFonts[F];"string"!==typeof d&&null!=d.fontFamily&&null!=d.fontUrl&&Graph.addFont(d.fontFamily,d.fontUrl)}mxResources.loadDefaultBundle=!1;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,
+mxLanguage))}catch(g){document.body.innerHTML="",d=document.createElement("pre"),mxUtils.write(d,g.stack),document.body.appendChild(d)}},c=function(F){mxUtils.getAll("1"!=urlParams.dev?[F]:[F,STYLE_PATH+"/default.xml"],function(d){function g(){try{try{null==Editor.currentTheme&&"1"!=urlParams.embed&&(1==urlParams.dev||1==urlParams.test||"test.draw.io"===window.location.hostname||"www.draw.io"===window.location.hostname||"preprod.diagrams.net"===window.location.hostname||"app.diagrams.net"===window.location.hostname||
"jgraph.github.io"===window.location.hostname||/drawio-dev\.pages\.dev$/.test(window.location.hostname))&&App.isSimpleThemePreferred()&&(Editor.currentTheme="simple")}catch(I){}"kennedy"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");"1"==urlParams.transparent&&(document.body.style.background="transparent");var B=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));null!=window.mxscript&&
("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)}):"undefined"===typeof window.Dropbox&&(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(B);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,B,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(I){EditorUi.isElectronApp?
(mxLog.show(),mxLog.debug(I.stack)):(EditorUi.logError(I.message,null,null,null,I),window.setTimeout(function(){alert(I.message)},1))}}mxResources.parse(d[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var l=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=l){EditorUi.debug("Setting configuration",JSON.stringify(l));if(null!=l.merge){var n=localStorage.getItem(Editor.configurationKey);if(null!=
n)try{var x=JSON.parse(n),A;for(A in l.merge)x[A]=l.merge[A];l=x}catch(B){window.location.hash="",alert(B)}else l=l.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(l)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(B){window.location.hash="",alert(B)}1<d.length&&(Graph.prototype.defaultThemes["default-style2"]=d[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=
-d[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?k():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],k,function(B){document.body.innerHTML="";var I=document.createElement("pre");mxUtils.write(I,B.stack);document.body.appendChild(I)}))},function(d){d=document.getElementById("geStatus");null!=d&&(d.innerHTML="Error loading page. <a>Please try refreshing.</a>",d.getElementsByTagName("a")[0].onclick=function(){mxLanguage=
+d[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?g():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],g,function(B){document.body.innerHTML="";var I=document.createElement("pre");mxUtils.write(I,B.stack);document.body.appendChild(I)}))},function(d){d=document.getElementById("geStatus");null!=d&&(d.innerHTML="Error loading page. <a>Please try refreshing.</a>",d.getElementsByTagName("a")[0].onclick=function(){mxLanguage=
"en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';else if(Editor.loadCompatibleCss(),App.isMainCalled=!0,window.onerror=function(F,
-d,k,l,n){EditorUi.logError("Global: "+(null!=F?F:""),d,k,l,n,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",F,"\nURL:",d,"\nLine:",k,"\nColumn:",l,"\nError:",n)):console.error("Message:",F,"\nURL:",d,"\nLine:",k,"\nColumn:",l,"\nError:",n);window.setTimeout(function(){alert("Error: "+(null!=F?F:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==
+d,g,l,n){EditorUi.logError("Global: "+(null!=F?F:""),d,g,l,n,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",F,"\nURL:",d,"\nLine:",g,"\nColumn:",l,"\nError:",n)):console.error("Message:",F,"\nURL:",d,"\nLine:",g,"\nColumn:",l,"\nError:",n);window.setTimeout(function(){alert("Error: "+(null!=F?F:""))},100)},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 p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p)}"1"==urlParams.embed&&document.body.classList.add("geEmbed");null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"!=urlParams.enableSW&&
"1"==urlParams.dev)?(EditorUi.debug("App.main","Uninstalling service worker"),App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")})):Editor.enableServiceWorker&&navigator.serviceWorker.getRegistration().then(function(F){null!=F?(EditorUi.debug("App.main","Updating service worker"),F.update()):!Editor.isSettingsEnabled()||null!=mxSettings.settings&&!mxSettings.settings.isNew||"1"==urlParams.enableSW?(EditorUi.debug("App.main","Installing service worker"),navigator.serviceWorker.register("service-worker.js")):
EditorUi.debug("App.main","Skipping service worker (first load)")})}catch(F){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&("1"!=urlParams.embedRT||"1"==urlParams.lockdown)||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var q=
null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var u=JSON.parse(localStorage.getItem(mxSettings.key));null!=u&&(q=u.plugins)}catch(F){}u=urlParams.p;App.initPluginCallback();null!=u&&App.loadPlugins(u.split(";"));if(null!=q&&0<q.length&&"0"!=urlParams.plugins)for(p=0;p<q.length;p++)try{("/"==q[p].charAt(0)&&(q[p]=PLUGINS_BASE_PATH+q[p]),App.isSameDomain(q[p]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(q[p])?null==
App.pluginsLoaded[q[p]]&&(App.pluginsLoaded[q[p]]=!0,App.embedModePluginsCount++,mxscript(q[p])):null!=window.console&&console.log("Unknown plugin:",q[p]):null!=window.console&&console.log("Blocked plugin:",q[p])}catch(F){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",
-null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var y=window.opener||window.parent,H=function(F){if(F.source==y)try{var d=JSON.parse(F.data);null!=d&&"configure"==d.action&&(mxEvent.removeListener(window,"message",H),Editor.configure(d.config),mxSettings.load(),null!=d.config.darkColor&&document.body.style.setProperty("--dark-color",d.config.darkColor),d.colorSchemeMeta&&mxmeta("color-scheme",
-"dark light"),g())}catch(k){null!=window.console&&console.log("Error in configure message: "+k,F.data)}};mxEvent.addListener(window,"message",H);y.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(F){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(F.stack)):console.error(F)}if(isLocalStorage&&
-null!=localStorage&&"1"!=urlParams.embed){var E=localStorage.getItem(Editor.configurationKey);if(null!=E)try{E=JSON.parse(E),null!=E&&(EditorUi.debug("Using local configuration",E),Editor.configure(E),mxSettings.load())}catch(F){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(F.stack)):console.error(F)}}}g()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(F){document.body.innerHTML="",q=
+null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var z=window.opener||window.parent,G=function(F){if(F.source==z)try{var d=JSON.parse(F.data);null!=d&&"configure"==d.action&&(mxEvent.removeListener(window,"message",G),Editor.configure(d.config),mxSettings.load(),null!=d.config.darkColor&&document.body.style.setProperty("--dark-color",d.config.darkColor),d.colorSchemeMeta&&mxmeta("color-scheme",
+"dark light"),k())}catch(g){null!=window.console&&console.log("Error in configure message: "+g,F.data)}};mxEvent.addListener(window,"message",G);z.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(F){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(F.stack)):console.error(F)}if(isLocalStorage&&
+null!=localStorage&&"1"!=urlParams.embed){var E=localStorage.getItem(Editor.configurationKey);if(null!=E)try{E=JSON.parse(E),null!=E&&(EditorUi.debug("Using local configuration",E),Editor.configure(E),mxSettings.load())}catch(F){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(F.stack)):console.error(F)}}}k()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(F){document.body.innerHTML="",q=
document.createElement("pre"),mxUtils.write(q,F.stack),document.body.appendChild(q)}};mxUtils.extend(App,EditorUi);App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
-App.loadPlugins=function(b,f){EditorUi.debug("Loading plugins",b);for(var g=0;g<b.length;g++)if(null!=b[g]&&0<b[g].length)try{if(null!=App.pluginRegistry[b[g]]){var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[g]];null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?f?mxinclude(c):mxscript(c):f?mxinclude(c):mxscript(drawDevUrl+c))}else null!=window.console&&console.log("Unknown plugin:",b[g])}catch(p){null!=window.console&&console.log("Error loading plugin:",
-b[g],p)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
+App.loadPlugins=function(b,f){EditorUi.debug("Loading plugins",b);for(var k=0;k<b.length;k++)if(null!=b[k]&&0<b[k].length)try{if(null!=App.pluginRegistry[b[k]]){var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[k]];null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?f?mxinclude(c):mxscript(c):f?mxinclude(c):mxscript(drawDevUrl+c))}else null!=window.console&&console.log("Unknown plugin:",b[k])}catch(p){null!=window.console&&console.log("Error loading plugin:",
+b[k],p)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};
App.prototype.init=function(){if(!App.blockedAncestorFrames()){this.buttonContainer=this.createButtonContainer();EditorUi.prototype.init.apply(this,arguments);this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(!0)}));try{this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||
"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this),null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()}))}catch(u){null!=window.console&&console.log("GitHubClient disabled: "+u.message)}try{this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this),null!=this.gitLab&&this.gitLab.addListener("userChanged",
mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()}))}catch(u){null!=window.console&&console.log("GitLabClient disabled: "+u.message)}if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){if("undefined"!==typeof OneDrive)try{this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",
this.oneDrive))}catch(u){null!=window.console&&console.log("OneDriveClient disabled: "+u.message)}else null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var f=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded",
-"client",this.trello))}catch(u){null!=window.console&&console.log("TrelloClient disabled: "+u.message)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var g=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var u=mxUtils.bind(this,function(){try{this.drive=new DriveClient(this),this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries();"1"!=urlParams.dev&&
-this.checkLicense()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))}catch(y){null!=window.console&&console.log("DriveClient disabled: "+y.message)}});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,u),window.DrawGapiClientCallback=null):u()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=g)});g()}if("1"!=urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){if("function"===typeof Dropbox){window.DrawDropboxClientCallback=
+"client",this.trello))}catch(u){null!=window.console&&console.log("TrelloClient disabled: "+u.message)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var k=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var u=mxUtils.bind(this,function(){try{this.drive=new DriveClient(this),this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries();"1"!=urlParams.dev&&
+this.checkLicense()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))}catch(z){null!=window.console&&console.log("DriveClient disabled: "+z.message)}});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,u),window.DrawGapiClientCallback=null):u()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=k)});k()}if("1"!=urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){if("function"===typeof Dropbox){window.DrawDropboxClientCallback=
null;try{this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(u){null!=window.console&&console.log("DropboxClient disabled: "+u.message)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=c)});c()}if("1"!=urlParams.embed&&(this.setGraphEnabled(!1),"1"==urlParams.local?this.setMode(App.MODE_DEVICE):
this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(u){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),mxUtils.bind(this,function(){u.prompt()}),!0,!0)})),!this.isOwnGDriveDomain()||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var u=this.getCurrentFile();u=null!=u?u.getMode():
null;mxClient.IS_CHROMEAPP||mxClient.IS_ANDROID||mxClient.IS_IOS||EditorUi.isElectronApp||this.isOffline()||null!=urlParams.open||"1"==urlParams.extAuth||u!=App.MODE_DEVICE&&u!=App.MODE_BROWSER||this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||!Editor.enableRealtimeCache||this.editor.chromeless&&!this.editor.editable))){var p=window.setTimeout(mxUtils.bind(this,function(){Editor.enableRealtimeCache=
!1}),Editor.cacheTimeout);mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(u){Editor.enableRealtimeCache=200<=u.getStatus()&&299>=u.getStatus();window.clearTimeout(p)}),function(){Editor.enableRealtimeCache=!1;window.clearTimeout(p)})}this.updateHeader();if(null!=this.menubar){if("sketch"!=Editor.currentTheme&&("simple"!=Editor.currentTheme||"1"!=urlParams.embed)){var q=mxUtils.bind(this,function(){"1"!=urlParams.embed?this.menubar.container.appendChild(this.buttonContainer):this.toolbarContainer.appendChild(this.buttonContainer)});
this.addListener("languageChanged",q);this.addListener("currentThemeChanged",q);q()}("kennedy"==Editor.currentTheme&&"1"==urlParams.embed||"atlas"==Editor.currentTheme&&"1"!=urlParams.embed)&&this.setCompactMode(!0);if("atlas"==Editor.currentTheme||"1"==urlParams.atlas)this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.className="geSmallAppIcon","1"!=urlParams.embed&&(this.icon.style.cursor=
"pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(u){this.appIconClicked(u)}))),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild)}this.editor.graph.isViewer()&&this.initializeViewerMode()}};
-App.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&b.substring(0,b.length-1);b="";for(var f=0;f<window.location.ancestorOrigins.length;f++)if(b+=" -> "+window.location.ancestorOrigins[f],b.endsWith("dan6v7pm1f1a1.cloudfront.net")||b.endsWith("confluence-cloud-excalidraw-2-ll3likebca-uc.a.run.app"))return!0}}catch(g){}return!1};
+App.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&b.substring(0,b.length-1);b="";for(var f=0;f<window.location.ancestorOrigins.length;f++)if(b+=" -> "+window.location.ancestorOrigins[f],b.endsWith("dan6v7pm1f1a1.cloudfront.net")||b.endsWith("confluence-cloud-excalidraw-2-ll3likebca-uc.a.run.app"))return!0}}catch(k){}return!1};
App.prototype.scheduleSanityCheck=function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.sanityCheckThread||(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};
App.prototype.sanityCheck=function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()&&b.isAutosave()&&b.isOverdue()){b.getHash();b.savingFile&&null!=b.savingFileTime&&(Date.now(),b.savingFileTime.getTime());null!=b.ageStart&&(Date.now(),b.ageStart.getTime());b.isAutosave();null!=b.opened&&(Date.now(),b.opened.getTime());null!=b.lastSaved&&(Date.now(),b.lastSaved.getTime());null!=b.lastChanged&&(Date.now(),b.lastChanged.getTime());Date.now();App.startTime.getTime();var f=null!=b.sync?"client_"+
b.sync.clientId:"nosync";b.constructor==DriveFile&&null!=b.desc&&null!=this.drive&&(f+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType);f=mxResources.get("ensureDataSaved");null!=b.lastSaved&&(f=this.timeSince(b.lastSaved),null==f&&(f=mxResources.get("lessThanAMinute")),f=mxResources.get("lastSaved",[f]));this.spinner.stop();this.showError(mxResources.get("unsavedChanges"),f,mxResources.get("ignore"),
@@ -14059,567 +14064,566 @@ App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&this.isOwnGDr
App.prototype.searchHelp=function(b){var f="https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(b);this.openLink(f);0<b.length&&EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:b})};
App.prototype.showNameConfBanner=function(){this.showBanner("ConfFooter","Try draw.io for Confluence",mxUtils.bind(this,function(){this.openLink("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence")}),!0)};App.prototype.showDownloadDesktopBanner=function(){this.showBanner("DesktopFooter",mxResources.get("downloadDesktop"),mxUtils.bind(this,function(){this.openLink("https://get.diagrams.net/")}),!0,!0)};
App.prototype.showRatingBanner=function(){if(!(this.bannerShowing||this.hideBannerratingFooter||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeratingFooter)){var b=document.createElement("div");b.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(b.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(b.style,
-"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get("close"));f.setAttribute("border","0");f.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(f);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var g=document.createElement("img");
-g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.setAttribute("title","1 star");g.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");g.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(g);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.setAttribute("title","2 star");c.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");c.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get("close"));f.setAttribute("border","0");f.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(f);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var k=document.createElement("img");
+k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.setAttribute("title","1 star");k.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");k.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(k);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.setAttribute("title","2 star");c.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");c.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(c);var p=document.createElement("img");p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.setAttribute("title","3 star");p.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");p.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(p);var q=document.createElement("img");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.setAttribute("title","4 star");q.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");q.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(q);this.bannerShowing=!0;var u=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);u()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);u()}));mxEvent.addListener(c,"click",mxUtils.bind(this,
-function(y){mxEvent.consume(y);u()}));mxEvent.addListener(p,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);u()}));mxEvent.addListener(q,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");u()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){u()}),1E3)});window.setTimeout(mxUtils.bind(this,
+b.appendChild(q);this.bannerShowing=!0;var u=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(z){mxEvent.consume(z);u()}));mxEvent.addListener(k,"click",mxUtils.bind(this,function(z){mxEvent.consume(z);u()}));mxEvent.addListener(c,"click",mxUtils.bind(this,
+function(z){mxEvent.consume(z);u()}));mxEvent.addListener(p,"click",mxUtils.bind(this,function(z){mxEvent.consume(z);u()}));mxEvent.addListener(q,"click",mxUtils.bind(this,function(z){mxEvent.consume(z);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");u()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){u()}),1E3)});window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(f,6E4)}};
-App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var g=f.lastIndexOf("@"),c=0<=g?f.substring(g+1):"";b=Editor.crc32(b.id);"gmail.com"!==c.toLowerCase()&&mxUtils.post("/license","domain="+encodeURIComponent(c)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(p){try{if(200<=p.getStatus()&&299>=p.getStatus()){var q=p.getText();if(0<q.length){var u=JSON.parse(q);
-null!=u&&this.handleLicense(u,c)}}}catch(y){}}))}};App.prototype.handleLicense=function(b,f){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
-App.prototype.addRecent=function(b,f,g){if(isLocalStorage&&null!=localStorage){f=null!=f?f:"";var c=this.getRecent(f);if(null==c)c=[];else for(var p=0;p<c.length;p++)c[p].mode==b.mode&&c[p].id==b.id&&c.splice(p,1);null!=c&&(g=null!=g?g:10,c.unshift(b),c=c.slice(0,g),localStorage.setItem(".recent"+f,JSON.stringify(c)))}};App.prototype.getRecent=function(b){if(isLocalStorage&&null!=localStorage){try{var f=localStorage.getItem(".recent"+(null!=b?b:""));if(null!=f)return JSON.parse(f)}catch(g){}return null}};
+App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var k=f.lastIndexOf("@"),c=0<=k?f.substring(k+1):"";b=Editor.crc32(b.id);"gmail.com"!==c.toLowerCase()&&mxUtils.post("/license","domain="+encodeURIComponent(c)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(p){try{if(200<=p.getStatus()&&299>=p.getStatus()){var q=p.getText();if(0<q.length){var u=JSON.parse(q);
+null!=u&&this.handleLicense(u,c)}}}catch(z){}}))}};App.prototype.handleLicense=function(b,f){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
+App.prototype.addRecent=function(b,f,k){if(isLocalStorage&&null!=localStorage){f=null!=f?f:"";var c=this.getRecent(f);if(null==c)c=[];else for(var p=0;p<c.length;p++)c[p].mode==b.mode&&c[p].id==b.id&&c.splice(p,1);null!=c&&(k=null!=k?k:10,c.unshift(b),c=c.slice(0,k),localStorage.setItem(".recent"+f,JSON.stringify(c)))}};App.prototype.getRecent=function(b){if(isLocalStorage&&null!=localStorage){try{var f=localStorage.getItem(".recent"+(null!=b?b:""));if(null!=f)return JSON.parse(f)}catch(k){}return null}};
App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent"+(null!=b?b:""))}catch(f){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");this.unloading=!0;var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return this.logIfModified(b),mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,f=this.getCurrentFile();null==f||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=f&&(b=(null!=f.getTitle()?f.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};
-App.prototype.getThumbnail=function(b,f,g){g=null!=g?g:0;var c=!1;try{var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;f(null)}),this.timeout),u=mxUtils.bind(this,function(Q){window.clearTimeout(q);p&&f(Q)});null==this.thumbImageCache&&(this.thumbImageCache={});var y=this.editor.graph,H=y.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var E=y.getGlobalVariable;y=this.createTemporaryGraph(y.getStylesheet());y.setBackgroundImage=this.editor.graph.setBackgroundImage;
-var F=this.pages[0];this.currentPage==F?y.setBackgroundImage(H):null!=F.viewState&&null!=F.viewState&&(H=F.viewState.backgroundImage,y.setBackgroundImage(H));y.getGlobalVariable=function(Q){return"page"==Q?F.getName():"pagenumber"==Q?1:E.apply(this,arguments)};y.getGlobalVariable=E;document.body.appendChild(y.container);y.model.setRoot(F.root)}if(mxClient.IS_CHROMEAPP||Editor.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(Q){try{y!=this.editor.graph&&null!=y.container.parentNode&&
-y.container.parentNode.removeChild(y.container)}catch(v){Q=null}u(Q)}),b,this.thumbImageCache,"#ffffff",function(){u()},null,null,null,null,null,null,y,g,null,null,null,"diagram",null),c=!0;else if(Editor.canvasSupported&&null!=this.getCurrentFile()){var d=document.createElement("canvas"),k=y.getGraphBounds(),l=y.view.translate,n=y.view.scale;null!=H&&(k=mxRectangle.fromRectangle(k),k.add(new mxRectangle((l.x+H.x)*n,(l.y+H.y)*n,H.width*n,H.height*n)));var x=b/k.width;x=Math.min(1,Math.min(3*b/(4*
-k.height),x));var A=Math.floor(k.x),B=Math.floor(k.y);d.setAttribute("width",Math.ceil(x*(k.width+4)));d.setAttribute("height",Math.ceil(x*(k.height+4)));var I=d.getContext("2d");I.scale(x,x);I.translate(-A,-B);var G=y.background;if(null==G||""==G||G==mxConstants.NONE)G="#ffffff";I.save();I.fillStyle=G;I.fillRect(A,B,Math.ceil(k.width+4),Math.ceil(k.height+4));I.restore();if(null!=H){var C=new Image;C.src=H.src;I.drawImage(C,H.x*x,H.y*x,H.width*x,H.height*x)}var R=new mxJsCanvas(d),T=new mxAsyncCanvas(this.thumbImageCache);
-R.images=this.thumbImageCache.images;var S=new mxImageExport;S.drawShape=function(Q,v){Q.shape instanceof mxShape&&Q.shape.checkBounds()&&(v.save(),v.translate(.5,.5),Q.shape.paint(v),v.translate(-.5,-.5),v.restore())};S.drawText=function(Q,v){};S.drawState(y.getView().getState(y.model.root),T);T.finish(mxUtils.bind(this,function(){try{S.drawState(y.getView().getState(y.model.root),R),y!=this.editor.graph&&null!=y.container.parentNode&&y.container.parentNode.removeChild(y.container)}catch(Q){d=null}u(d)}));
-c=!0}}catch(Q){c=!1,null!=y&&y!=this.editor.graph&&null!=y.container.parentNode&&y.container.parentNode.removeChild(y.container)}c||window.clearTimeout(q);return c};
-(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(f,g){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();f=null!=c?c.getMode():f;null==this.updateTitleListener&&(this.updateTitleListener=mxUtils.bind(this,function(){f==App.MODE_GOOGLE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])):f==App.MODE_DROPBOX?this.appIcon.setAttribute("title",
-mxResources.get("openIt",[mxResources.get("dropbox")])):f==App.MODE_ONEDRIVE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])):this.appIcon.removeAttribute("title")}),this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTitleListener()})));this.updateTitleListener()}if(g)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var p=new Date;p.setYear(p.getFullYear()+1);document.cookie="MODE="+f+"; expires="+
+App.prototype.getThumbnail=function(b,f,k){k=null!=k?k:0;var c=!1;try{var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;f(null)}),this.timeout),u=mxUtils.bind(this,function(P){window.clearTimeout(q);p&&f(P)});null==this.thumbImageCache&&(this.thumbImageCache={});var z=this.editor.graph,G=z.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var E=z.getGlobalVariable;z=this.createTemporaryGraph(z.getStylesheet());z.setBackgroundImage=this.editor.graph.setBackgroundImage;
+var F=this.pages[0];this.currentPage==F?z.setBackgroundImage(G):null!=F.viewState&&null!=F.viewState&&(G=F.viewState.backgroundImage,z.setBackgroundImage(G));z.getGlobalVariable=function(P){return"page"==P?F.getName():"pagenumber"==P?1:E.apply(this,arguments)};z.getGlobalVariable=E;document.body.appendChild(z.container);z.model.setRoot(F.root)}if(mxClient.IS_CHROMEAPP||Editor.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(P){try{z!=this.editor.graph&&null!=z.container.parentNode&&
+z.container.parentNode.removeChild(z.container)}catch(v){P=null}u(P)}),b,this.thumbImageCache,"#ffffff",function(){u()},null,null,null,null,null,null,z,k,null,null,null,"diagram",null),c=!0;else if(Editor.canvasSupported&&null!=this.getCurrentFile()){var d=document.createElement("canvas"),g=z.getGraphBounds(),l=z.view.translate,n=z.view.scale;null!=G&&(g=mxRectangle.fromRectangle(g),g.add(new mxRectangle((l.x+G.x)*n,(l.y+G.y)*n,G.width*n,G.height*n)));var x=b/g.width;x=Math.min(1,Math.min(3*b/(4*
+g.height),x));var A=Math.floor(g.x),B=Math.floor(g.y);d.setAttribute("width",Math.ceil(x*(g.width+4)));d.setAttribute("height",Math.ceil(x*(g.height+4)));var I=d.getContext("2d");I.scale(x,x);I.translate(-A,-B);var H=z.background;if(null==H||""==H||H==mxConstants.NONE)H="#ffffff";I.save();I.fillStyle=H;I.fillRect(A,B,Math.ceil(g.width+4),Math.ceil(g.height+4));I.restore();if(null!=G){var D=new Image;D.src=G.src;I.drawImage(D,G.x*x,G.y*x,G.width*x,G.height*x)}var S=new mxJsCanvas(d),U=new mxAsyncCanvas(this.thumbImageCache);
+S.images=this.thumbImageCache.images;var R=new mxImageExport;R.drawShape=function(P,v){P.shape instanceof mxShape&&P.shape.checkBounds()&&(v.save(),v.translate(.5,.5),P.shape.paint(v),v.translate(-.5,-.5),v.restore())};R.drawText=function(P,v){};R.drawState(z.getView().getState(z.model.root),U);U.finish(mxUtils.bind(this,function(){try{R.drawState(z.getView().getState(z.model.root),S),z!=this.editor.graph&&null!=z.container.parentNode&&z.container.parentNode.removeChild(z.container)}catch(P){d=null}u(d)}));
+c=!0}}catch(P){c=!1,null!=z&&z!=this.editor.graph&&null!=z.container.parentNode&&z.container.parentNode.removeChild(z.container)}c||window.clearTimeout(q);return c};
+(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(f,k){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();f=null!=c?c.getMode():f;null==this.updateTitleListener&&(this.updateTitleListener=mxUtils.bind(this,function(){f==App.MODE_GOOGLE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])):f==App.MODE_DROPBOX?this.appIcon.setAttribute("title",
+mxResources.get("openIt",[mxResources.get("dropbox")])):f==App.MODE_ONEDRIVE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])):this.appIcon.removeAttribute("title")}),this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTitleListener()})));this.updateTitleListener()}if(k)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var p=new Date;p.setYear(p.getFullYear()+1);document.cookie="MODE="+f+"; expires="+
p.toUTCString()}}catch(q){}}})();
-App.prototype.appIconClicked=function(b){var f=this.getCurrentFile(),g=null!=f?f.getMode():null;f=null!=f?mxEvent.isAltDown(b)?f.getFolderUrl():f.getFileUrl():null;null!=f?this.openLink(f):g==App.MODE_GOOGLE?this.openLink("https://drive.google.com/?authuser=0"):g==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):g==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):g==App.MODE_GITHUB?this.openLink("https://github.com/"):g==App.MODE_GITLAB?this.openLink(DRAWIO_GITLAB_URL):g==App.MODE_TRELLO?
-this.openLink("https://trello.com/"):g==App.MODE_DEVICE?this.openLink("https://get.draw.io/"):this.openLink("https://www.drawio.com/");mxEvent.consume(b)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};
-App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var f=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(f.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(g,c,p){this.spinner.stop();null==c&&(c=urlParams.title,p=!0,c=null!=c?decodeURIComponent(c):this.defaultFilename);0<(Editor.useCanvasForExport?
--1:".png"==c.substring(c.length-4))&&(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,g,c):new LocalFile(this,g,c,p))}))}}catch(g){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
+App.prototype.appIconClicked=function(b){var f=this.getCurrentFile(),k=null!=f?f.getMode():null;f=null!=f?mxEvent.isAltDown(b)?f.getFolderUrl():f.getFileUrl():null;null!=f?this.openLink(f):k==App.MODE_GOOGLE?this.openLink("https://drive.google.com/?authuser=0"):k==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):k==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):k==App.MODE_GITHUB?this.openLink("https://github.com/"):k==App.MODE_GITLAB?this.openLink(DRAWIO_GITLAB_URL):k==App.MODE_TRELLO?
+this.openLink("https://trello.com/"):k==App.MODE_DEVICE?this.openLink("https://get.draw.io/"):this.openLink("https://www.drawio.com/");mxEvent.consume(b)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};
+App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var f=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(f.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(k,c,p){this.spinner.stop();null==c&&(c=urlParams.title,p=!0,c=null!=c?decodeURIComponent(c):this.defaultFilename);0<(Editor.useCanvasForExport?
+-1:".png"==c.substring(c.length-4))&&(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,k,c):new LocalFile(this,k,c,p))}))}}catch(k){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
App.prototype.load=function(){try{if("1"!=urlParams.embed)try{if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(b){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash=
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}catch(b){this.handleError(b)}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})}catch(b){EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(b.stack)):(EditorUi.logError(b.message,null,null,null,b),alert(b.message))}};
-App.prototype.showRefreshDialog=function(b,f){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),f||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var g=this.getCurrentFile();null!=g&&g.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&
+App.prototype.showRefreshDialog=function(b,f){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),f||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&k.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&
(b=this.createRealtimeNotice(),b.style.left="0",b.style.right="0",b.style.borderRadius="0",b.style.borderLeftStyle="none",b.style.borderRightStyle="none",b.style.marginBottom="26px",b.style.padding="8px 0 8px 0",this.dialog.container.appendChild(b)))};
App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var f=document.createElement("div");f.className="geAlert";f.style.zIndex=2E9;f.style.left="50%";f.style.top="-100%";f.style.maxWidth="80%";f.style.width="max-content";f.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
-b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");f.appendChild(b);mxEvent.addListener(b,"click",function(g){null!=f.parentNode&&(f.parentNode.removeChild(f),mxEvent.consume(g))});document.body.appendChild(f);window.setTimeout(function(){f.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(f.style,"transition","all 2s ease");f.style.opacity="0";window.setTimeout(function(){null!=f.parentNode&&f.parentNode.removeChild(f)},
+b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");f.appendChild(b);mxEvent.addListener(b,"click",function(k){null!=f.parentNode&&(f.parentNode.removeChild(f),mxEvent.consume(k))});document.body.appendChild(f);window.setTimeout(function(){f.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(f.style,"transition","all 2s ease");f.style.opacity="0";window.setTimeout(function(){null!=f.parentNode&&f.parentNode.removeChild(f)},
2E3)},15E3)}};
-App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(H,E,F,d,k){"ResizeObserver loop limit exceeded"!=H&&(EditorUi.logError("Uncaught: "+(null!=H?H:""),E,F,d,k,null,!0),b.handleError({message:H},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(H){var E=this.getCurrentFile();EditorUi.debug("storage event",[H],
-[E]);null!=E&&".draft-alive-check"==H.key&&null!=H.newValue&&null!=E.draftId&&(this.draftAliveCheck=H.newValue,E.saveDraft())}))}catch(H){}var f=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(H){try{var E=this.getDiagramId();if(E!=f){f=E;var F=this.getCurrentFile();null!=F&&F.getHash()==E||this.loadFile(E,!0)}else{var d=this.getHashObject();if(null!=d&&null!=d.pageId&&null!=this.currentPage&&d.pageId!=this.currentPage.getId()){var k=this.getPageById(d.pageId);
-null!=k&&this.selectPage(k)}}}catch(l){null!=document.body&&this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=null!=n?n.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(H){this.handleError(H,mxResources.get("errorLoadingFile"))}))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}else if((null==
-window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var g=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var H=mxUtils.bind(this,function(d){Editor.isPngDataUrl(d)&&(d=Editor.extractGraphModelFromPng(d));var k=urlParams.title;k=null!=k?decodeURIComponent(k):this.defaultFilename;d=new LocalFile(this,
-d,k,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(d.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(d);this.editor.chromeless||(d.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),E=window.opener||window.parent;if(E!=window){var F=urlParams.create;null!=F?H(E[decodeURIComponent(F)]):(F=urlParams.data,null!=F?H(decodeURIComponent(F)):this.spinner.spin(document.body,mxResources.get("loading"))&&
-this.createTimeout(2E3,mxUtils.bind(this,function(d){this.installMessageHandler(mxUtils.bind(this,function(k,l){l.source==E&&d.clear()&&(this.spinner.stop(),H(k))}))}),mxUtils.bind(this,function(d){this.handleError(d)})))}}else if(null==this.dialog)if("1"==urlParams.demo)F=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=F;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,
-!0),this.actions.get("insertTemplate").funct();else{F=!1;try{F=null!=window.opener&&null!=window.opener.openFile}catch(d){}F?this.spinner.spin(document.body,mxResources.get("loading")):(F=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=F&&0!=F.length||this.editor.isChromelessView()?null!=F&&0<F.length?this.loadFile(F,null,null,mxUtils.bind(this,function(){var d=decodeURIComponent(urlParams.viewbox||"");if(""!=d)try{var k=JSON.parse(d);this.editor.graph.fitWindow(k,
-k.border)}catch(l){console.error(l)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),c=decodeURIComponent(urlParams.create||"");null!=window.location.hash&&"#create="==window.location.hash.substring(0,8)&&(c=decodeURIComponent(window.location.hash.substring(8)));if((null==window.location.hash||1>=window.location.hash.length||"#create="==window.location.hash.substring(0,
-8))&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var p=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),q=mxUtils.bind(this,function(H){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,H,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var E=urlParams.title;E=null!=E?decodeURIComponent(E):this.defaultFilename;H=this.getServiceCount(!0);
-isLocalStorage&&H++;var F=4>=H?2:6<H?4:3;E=new CreateDialog(this,E,mxUtils.bind(this,function(d,k){if(null==k){this.hideDialog();var l=Editor.useLocalStorage;this.createFile(0<d.length?d:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=l}else this.pickFolder(k,mxUtils.bind(this,function(n){this.createFile(d,this.getFileData(!0),null,k,null,!0,n)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,F,null,null,null,this.editor.fileExtensions);this.showDialog(E.container,
-420,H>F?390:280,!0,!1,mxUtils.bind(this,function(d){d&&null==this.getCurrentFile()&&this.showSplash()}));E.init()}});if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))if("{"==c.charAt(0)){this.spinner.stop();c=JSON.parse(c);var u=mxUtils.bind(this,function(H){this.createFile(null!=H.filename?H.filename:this.defaultFilename,H,null,null,mxUtils.bind(this,function(){this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct();window.history.replaceState(null,null,window.location.pathname+
-this.getSearch(["create"]));window.location.hash="R"+Graph.compress(H)}),!0,null,!0)}),y=c.data;c.compressed&&(y=Graph.decompress(y));"mermaid"==c.type?window.isMermaidEnabled?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(H){H!=this.emptyDiagramXml&&u(H)})),this.generateMermaidImage(y,null,function(){},mxUtils.bind(this,function(H){for(var E=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),F=0;F<E.length;F++)E[F].parentNode.removeChild(E[F]);mxMermaidToDrawio.resetListeners();
-this.handleError(H)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):"generate"==c.type&&this.spinner.spin(document.body,mxResources.get("generate")+" '"+y+"'")&&this.generateDiagram(y,mxUtils.bind(this,function(H){this.spinner.stop();u(H)}),mxUtils.bind(this,function(H){this.handleError(H,mxResources.get("errorLoadingFile"))}))}else try{null!=window.opener&&null!=window.opener[c]?q(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(H){this.handleError(H,
-mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(H){q(H)},mxUtils.bind(this,function(H){this.handleError(H,mxResources.get("errorLoadingFile"),p)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state","splash"])),window.location.hash=
-"G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&
-window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),g())}}catch(H){this.handleError(H)}};
-App.prototype.openTemplateDialog=function(b){var f=this.editor.graph;f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(b=new NewDialog(this,null,!1,mxUtils.bind(this,function(g){this.hideDialog();if(null!=g){var c=this.editor.graph.getFreeInsertPoint(!0);f.setSelectionCells(this.importXml(g,Math.max(c.x,20),Math.max(c.y,20),!0,null,null,!0));f.scrollCellToVisible(f.getSelectionCell())}}),null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"),null,null,b),this.showDialog(b.container,
-620,460,!0,!0,mxUtils.bind(this,function(){this.sidebar.hideTooltip()})),b.init())};
-App.prototype.generateDiagram=function(b,f,g){var c=!1,p=null,q='Write a detailed and complex MermaidJS declaration for "'+(""!=b?b:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(u){u!=this.emptyDiagramXml&&(c=!0,p=u)}));this.generateOpenAiMermaidDiagram(q,function(u,y,H,E){p=c?p:this.createMermaidXml(u,EditorUi.defaultMermaidConfig,y,H,E,b);
-f(p,y)},g)};App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var g=this.getCurrentFile();null!=g&&(g.fileChanged(),null!=f&&f())}),0)}),null,null,!0)};
-App.prototype.filterDrafts=function(b,f,g){function c(){g(p)}var p=[];try{this.getDatabaseItems(mxUtils.bind(this,function(q){EditorUi.debug("App.filterDrafts",[this],"items",q);for(var u=0;u<q.length;u++)try{var y=q[u].key;if(null!=y&&".draft_"==y.substring(0,7)){var H=JSON.parse(q[u].data);null!=H&&"draft"==H.type&&H.aliveCheck!=f&&(null==b&&null==H.fileObject||null!=H.fileObject&&H.fileObject.path==b)&&(H.key=y,p.push(H))}}catch(E){}c()}),c)}catch(q){c()}};
-App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(f){if(1==f.length)this.loadDraft(f[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[0].key)}));else if(1<f.length){var g=new Date(f[0].modified);g=new DraftDialog(this,1<f.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
-[g.toLocaleDateString()+" "+g.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c&&null!=f[c]?c:0;this.loadDraft(f[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[c].key)}))}),mxUtils.bind(this,function(c,p){this.removeDatabaseItem(f[""!=c?c:0].key);null!=p&&p()}),null,null,null,1<f.length?f:null);this.showDialog(g.container,640,480,!0,!1,mxUtils.bind(this,function(c){c&&("0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
-this.getFileData(),null,null,null,null,null,!0))}));g.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(f){}};
-App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var f=this.getServiceCount(!0),g=mxUtils.bind(this,function(){var p=new SplashDialog(this);this.showDialog(p.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(q,u){!q&&!u||mxClient.IS_CHROMEAPP||(q=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=q)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.mode&&!b)null==urlParams.create&&g();else{b=4==f?2:3;var c=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();g()}),b);this.showDialog(c.container,3>b?200:300,3<f?320:210,!0,!1)}}};
-App.prototype.addLanguageMenu=function(b,f,g){var c=null;null!=this.menus.get("language")&&(c=document.createElement("div"),this.setElementTitle(c,"language"),c.className="geAdaptiveAsset",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="right center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="19px 19px",c.style.width="19px",c.style.height="19px",mxUtils.setOpacity(c,40),c.style.position="absolute",c.style.cursor="pointer",c.style.bottom="20px",c.style.right=
-null!=g?g:"22px",f&&(c.style.direction="rtl",c.style.textAlign="right",c.style.right=null!=g?g:"24px",f=document.createElement("span"),f.style.display="inline-block",f.style.fontSize="12px",f.style.margin="2px 24px 0 0",f.style.userSelect="none",mxUtils.write(f,mxResources.get("language")),c.appendChild(f),f.className="geAdaptiveAsset"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(p){this.editor.graph.popupMenuHandler.hideMenu();var q=new mxPopupMenu(this.menus.get("language").funct);
+App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(E,F,d,g,l){"ResizeObserver loop limit exceeded"!=E&&(EditorUi.logError("Uncaught: "+(null!=E?E:""),F,d,g,l,null,!0),b.handleError({message:E},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(E){var F=this.getCurrentFile();EditorUi.debug("storage event",[E],
+[F]);null!=F&&".draft-alive-check"==E.key&&null!=E.newValue&&null!=F.draftId&&(this.draftAliveCheck=E.newValue,F.saveDraft())}))}catch(E){}var f=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(E){try{var F=this.getDiagramId();if(F!=f){f=F;var d=this.getCurrentFile();null!=d&&d.getHash()==F||this.loadFile(F,!0)}else{var g=this.getHashObject();if(null!=g&&null!=g.pageId&&null!=this.currentPage&&g.pageId!=this.currentPage.getId()){var l=this.getPageById(g.pageId);
+null!=l&&this.selectPage(l)}}}catch(n){null!=document.body&&this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var x=this.getCurrentFile();window.location.hash=null!=x?x.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(E){this.handleError(E,mxResources.get("errorLoadingFile"))}))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}else if((null==
+window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var k=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var E=mxUtils.bind(this,function(g){Editor.isPngDataUrl(g)&&(g=Editor.extractGraphModelFromPng(g));var l=urlParams.title;l=null!=l?decodeURIComponent(l):this.defaultFilename;g=new LocalFile(this,
+g,l,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(g.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(g);this.editor.chromeless||(g.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),F=window.opener||window.parent;if(F!=window){var d=urlParams.create;null!=d?E(F[decodeURIComponent(d)]):(d=urlParams.data,null!=d?E(decodeURIComponent(d)):this.spinner.spin(document.body,mxResources.get("loading"))&&
+this.createTimeout(2E3,mxUtils.bind(this,function(g){this.installMessageHandler(mxUtils.bind(this,function(l,n){n.source==F&&g.clear()&&(this.spinner.stop(),E(l))}))}),mxUtils.bind(this,function(g){this.handleError(g)})))}}else if(null==this.dialog)if("1"==urlParams.demo)d=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=d;else{d=!1;try{d=null!=window.opener&&null!=window.opener.openFile}catch(g){}d?this.spinner.spin(document.body,
+mxResources.get("loading")):(d=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=d&&0!=d.length||this.editor.isChromelessView()?null!=d&&0<d.length?this.loadFile(d,null,null,mxUtils.bind(this,function(){var g=decodeURIComponent(urlParams.viewbox||"");if(""!=g)try{var l=JSON.parse(g);this.editor.graph.fitWindow(l,l.border)}catch(n){console.error(n)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,
+this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),c=decodeURIComponent(urlParams.create||"");null!=window.location.hash&&"#create="==window.location.hash.substring(0,8)&&(c=decodeURIComponent(window.location.hash.substring(8)));null!=urlParams["smart-template"]&&(null==window.location.hash||1>=window.location.hash.length)&&(c=JSON.stringify({type:"generate",data:decodeURIComponent(urlParams["smart-template"])}));if((null==window.location.hash||1>=window.location.hash.length||
+"#create="==window.location.hash.substring(0,8))&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var p=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),q=mxUtils.bind(this,function(E){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,E,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var F=urlParams.title;F=null!=F?decodeURIComponent(F):
+this.defaultFilename;E=this.getServiceCount(!0);isLocalStorage&&E++;var d=4>=E?2:6<E?4:3;F=new CreateDialog(this,F,mxUtils.bind(this,function(g,l){if(null==l){this.hideDialog();var n=Editor.useLocalStorage;this.createFile(0<g.length?g:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=n}else this.pickFolder(l,mxUtils.bind(this,function(x){this.createFile(g,this.getFileData(!0),null,l,null,!0,x)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,d,null,
+null,null,this.editor.fileExtensions);this.showDialog(F.container,420,E>d?390:280,!0,!1,mxUtils.bind(this,function(g){g&&null==this.getCurrentFile()&&this.showSplash()}));F.init()}});if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))if("{"==c.charAt(0)){this.spinner.stop();c=JSON.parse(c);var u=mxUtils.bind(this,function(E){this.spinner.stop();this.createFile(null!=c.filename?c.filename:this.defaultFilename,E,null,null,mxUtils.bind(this,function(){this.editor.chromeless&&!this.editor.editable||
+this.actions.get("fitWindow").funct();window.history.replaceState(null,null,window.location.pathname+this.getSearch(["create"]));window.location.hash="R"+Graph.compress(E)}),!0,null,!0)}),z=c.data;c.compressed&&(z=Graph.decompress(z));if("mermaid"==c.type&&this.spinner.spin(document.body,mxResources.get("loading")))window.isMermaidEnabled?this.parseMermaidDiagram(z,null,mxUtils.bind(this,function(E){u(E)}),mxUtils.bind(this,function(E){this.handleError(E)}),null,!0):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
+mxResources.get("errorLoadingFile"));else if("generate"==c.type&&this.spinner.spin(document.body,mxResources.get("generate")+" '"+z+"'"))this.generateOpenAiMermaidDiagram(z,function(E){u(E)},mxUtils.bind(this,function(E){this.handleError(E,mxResources.get("errorLoadingFile"))}),!0,{complexity:"high"});else if("csv"==c.type){var G=this.createTemporaryGraph(this.editor.graph.getStylesheet());this.importCsv(z,mxUtils.bind(this,function(){var E=new mxCodec;u(mxUtils.getXml(E.encode(G.getModel())))}),
+G)}else this.handleError({message:mxResources.get("invalidCallFnNotFound",[c.type])},mxResources.get("errorLoadingFile"))}else try{null!=window.opener&&null!=window.opener[c]?q(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(E){q(E)},mxUtils.bind(this,function(E){this.handleError(E,mxResources.get("errorLoadingFile"),p)}))}else(null==window.location.hash||1>=window.location.hash.length)&&
+null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state","splash"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,
+null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),k())}}catch(E){this.handleError(E)}};
+App.prototype.openGenerateDialog=function(b){null==this.chatWindow?(this.chatWindow=new ChatWindow(this,224,104,280,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("chat"))})),this.chatWindow.window.addListener("hide",function(){this.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),this.fireEvent(new mxEventObject("chat"))):this.chatWindow.window.setVisible(!0);null!=b&&this.chatWindow.generate(b)};
+App.prototype.openTemplateDialog=function(b){var f=this.editor.graph;f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(b=new NewDialog(this,null,!1,mxUtils.bind(this,function(k){this.hideDialog();if(null!=k){var c=this.editor.graph.getFreeInsertPoint(!0);f.setSelectionCells(this.importXml(k,Math.max(c.x,20),Math.max(c.y,20),!0,null,null,!0));f.scrollCellToVisible(f.getSelectionCell())}}),null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"),null,null,b),this.showDialog(b.container,
+620,460,!0,!0,mxUtils.bind(this,function(){this.sidebar.hideTooltip()})),b.init())};App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&(k.fileChanged(),null!=f&&f())}),0)}),null,null,!0)};
+App.prototype.filterDrafts=function(b,f,k){function c(){k(p)}var p=[];try{this.getDatabaseItems(mxUtils.bind(this,function(q){EditorUi.debug("App.filterDrafts",[this],"items",q);for(var u=0;u<q.length;u++)try{var z=q[u].key;if(null!=z&&".draft_"==z.substring(0,7)){var G=JSON.parse(q[u].data);null!=G&&"draft"==G.type&&G.aliveCheck!=f&&(null==b&&null==G.fileObject||null!=G.fileObject&&G.fileObject.path==b)&&(G.key=z,p.push(G))}}catch(E){}c()}),c)}catch(q){c()}};
+App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(f){if(1==f.length)this.loadDraft(f[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[0].key)}));else if(1<f.length){var k=new Date(f[0].modified);k=new DraftDialog(this,1<f.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
+[k.toLocaleDateString()+" "+k.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c&&null!=f[c]?c:0;this.loadDraft(f[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[c].key)}))}),mxUtils.bind(this,function(c,p){this.removeDatabaseItem(f[""!=c?c:0].key);null!=p&&p()}),null,null,null,1<f.length?f:null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(c){c&&("0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
+this.getFileData(),null,null,null,null,null,!0))}));k.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(f){}};
+App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var f=this.getServiceCount(!0),k=mxUtils.bind(this,function(){var p=new SplashDialog(this);this.showDialog(p.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(q,u){!q&&!u||mxClient.IS_CHROMEAPP||(q=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=q)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.mode&&!b)null==urlParams.create&&k();else{b=4==f?2:3;var c=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();k()}),b);this.showDialog(c.container,3>b?200:300,3<f?320:210,!0,!1)}}};
+App.prototype.addLanguageMenu=function(b,f,k){var c=null;null!=this.menus.get("language")&&(c=document.createElement("div"),this.setElementTitle(c,"language"),c.className="geAdaptiveAsset",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="right center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="19px 19px",c.style.width="19px",c.style.height="19px",mxUtils.setOpacity(c,40),c.style.position="absolute",c.style.cursor="pointer",c.style.bottom="20px",c.style.right=
+null!=k?k:"22px",f&&(c.style.direction="rtl",c.style.textAlign="right",c.style.right=null!=k?k:"24px",f=document.createElement("span"),f.style.display="inline-block",f.style.fontSize="12px",f.style.margin="2px 24px 0 0",f.style.userSelect="none",mxUtils.write(f,mxResources.get("language")),c.appendChild(f),f.className="geAdaptiveAsset"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(p){this.editor.graph.popupMenuHandler.hideMenu();var q=new mxPopupMenu(this.menus.get("language").funct);
q.smartSeparators=!0;q.showDisabled=!0;q.autoExpand=!0;q.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(q,arguments);q.destroy()});var u=mxUtils.getOffset(c);q.popup(u.x,u.y+c.offsetHeight,null,p);this.setCurrentMenu(q)})),b.appendChild(c));return c};
-App.prototype.loadFileSystemEntry=function(b,f,g){g=null!=g?g:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var p=new FileReader;p.onload=mxUtils.bind(this,function(q){var u=mxUtils.bind(this,function(y){try{if(null!=f){var H=q.target.result;"image/png"==c.type&&(H=this.extractGraphModelFromPng(H));f(new LocalFile(this,H,c.name,null,b,c,y))}else this.openFileHandle(q.target.result,c.name,c,!1,b,y)}catch(E){g(E)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,
-function(y){u("denied"!==y)})):b.createWritable().then(mxUtils.bind(this,function(){u(!0)}),mxUtils.bind(this,function(y){u(!1)}))});p.onerror=g;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||"image/svg"===c.type.substring(0,9)?p.readAsText(c):p.readAsDataURL(c)}),g)}catch(c){g(c)}};
-App.prototype.createFileSystemOptions=function(b){var f=[],g=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(g=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var p={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};p.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==g?f.splice(0,0,
-p):this.editor.diagramFileTypes[c].extension==g?f.splice(0,0,p):f.push(p)}return{types:f,suggestedName:b}};App.prototype.showSaveFilePicker=function(b,f,g){f=null!=f?f:mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)});g=null!=g?g:this.createFileSystemOptions();window.showSaveFilePicker(g).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(p){b(c,p)}),f)}),f)};
+App.prototype.loadFileSystemEntry=function(b,f,k){k=null!=k?k:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var p=new FileReader;p.onload=mxUtils.bind(this,function(q){var u=mxUtils.bind(this,function(z){try{if(null!=f){var G=q.target.result;"image/png"==c.type&&(G=this.extractGraphModelFromPng(G));f(new LocalFile(this,G,c.name,null,b,c,z))}else this.openFileHandle(q.target.result,c.name,c,!1,b,z)}catch(E){k(E)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,
+function(z){u("denied"!==z)})):b.createWritable().then(mxUtils.bind(this,function(){u(!0)}),mxUtils.bind(this,function(z){u(!1)}))});p.onerror=k;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||"image/svg"===c.type.substring(0,9)?p.readAsText(c):p.readAsDataURL(c)}),k)}catch(c){k(c)}};
+App.prototype.createFileSystemOptions=function(b){var f=[],k=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(k=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var p={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};p.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==k?f.splice(0,0,
+p):this.editor.diagramFileTypes[c].extension==k?f.splice(0,0,p):f.push(p)}return{types:f,suggestedName:b}};App.prototype.showSaveFilePicker=function(b,f,k){f=null!=f?f:mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)});k=null!=k?k:this.createFileSystemOptions();window.showSaveFilePicker(k).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(p){b(c,p)}),f)}),f)};
App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var f=this.getServiceForName(b);if(null!=f)f.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(u){null!=u&&0<u.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(u[0])}),
-mxUtils.bind(this,function(u){"AbortError"!=u.name&&this.handleError(u)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.openFiles(g.files),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.openFileInputElt=g}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
-null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(u,y){StorageFile.listFiles(this,"F",u,y)});window.openBrowserFile=mxUtils.bind(this,function(u,y,H){StorageFile.getFileContent(this,u,y,H)});window.deleteBrowserFile=mxUtils.bind(this,function(u,y,H){StorageFile.deleteFile(this,u,y,H)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(u,y){var H=mxUtils.bind(this,function(){Editor.useCanvasForExport||".png"!=y.substring(y.length-4)||(y=y.substring(0,y.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,u,y):new LocalFile(this,u,y))}),E=this.getCurrentFile();null!=E&&E.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H()}));var p=this.dialog,q=p.close;this.dialog.close=mxUtils.bind(this,function(u){Editor.useLocalStorage=
+mxUtils.bind(this,function(u){"AbortError"!=u.name&&this.handleError(u)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.openFiles(k.files),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.openFileInputElt=k}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
+null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(u,z){StorageFile.listFiles(this,"F",u,z)});window.openBrowserFile=mxUtils.bind(this,function(u,z,G){StorageFile.getFileContent(this,u,z,G)});window.deleteBrowserFile=mxUtils.bind(this,function(u,z,G){StorageFile.deleteFile(this,u,z,G)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
+function(u,z){var G=mxUtils.bind(this,function(){Editor.useCanvasForExport||".png"!=z.substring(z.length-4)||(z=z.substring(0,z.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,u,z):new LocalFile(this,u,z))}),E=this.getCurrentFile();null!=E&&E.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):G()}));var p=this.dialog,q=p.close;this.dialog.close=mxUtils.bind(this,function(u){Editor.useLocalStorage=
c;q.apply(p,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(u){this.handleError(u)}};
-App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;var f=mxUtils.bind(this,function(q){try{this.loadLibrary(q);this.showSidebar();try{this.sidebar.palettes[q.getHash()][0].scrollIntoView({behavior:"smooth"})}catch(u){}}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}});if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var g=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?
-this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=g&&g.pickLibrary(mxUtils.bind(this,function(q,u){null!=u?f(u):this.spinner.spin(document.body,mxResources.get("loading"))&&g.getLibrary(q,mxUtils.bind(this,function(y){this.spinner.stop();f(y)}),mxUtils.bind(this,function(y){this.handleError(y,null!=y?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var c=document.createElement("input");
-c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=c.files){for(var q=0;q<c.files.length;q++)mxUtils.bind(this,function(u){var y=new FileReader;y.onload=mxUtils.bind(this,function(H){f(new LocalLibrary(this,H.target.result,u.name))});y.readAsText(u)})(c.files[q]);c.type="";c.type="file";c.value=""}}));c.style.display="none";document.body.appendChild(c);this.libFileInputElt=c}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
-mxUtils.bind(this,function(q,u){StorageFile.listFiles(this,"L",q,u)});window.openBrowserFile=mxUtils.bind(this,function(q,u,y){StorageFile.getFileContent(this,q,u,y)});window.deleteBrowserFile=mxUtils.bind(this,function(q,u,y){StorageFile.deleteFile(this,q,u,y)});var p=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(q){this.hideDialog(q)}));window.openFile.setConsumer(mxUtils.bind(this,function(q,u){f(b==App.MODE_BROWSER?new StorageLibrary(this,
+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;var f=mxUtils.bind(this,function(q){try{this.loadLibrary(q);this.showSidebar();try{this.sidebar.palettes[q.getHash()][0].scrollIntoView({behavior:"smooth"})}catch(u){}}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}});if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var k=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?
+this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=k&&k.pickLibrary(mxUtils.bind(this,function(q,u){null!=u?f(u):this.spinner.spin(document.body,mxResources.get("loading"))&&k.getLibrary(q,mxUtils.bind(this,function(z){this.spinner.stop();f(z)}),mxUtils.bind(this,function(z){this.handleError(z,null!=z?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var c=document.createElement("input");
+c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=c.files){for(var q=0;q<c.files.length;q++)mxUtils.bind(this,function(u){var z=new FileReader;z.onload=mxUtils.bind(this,function(G){f(new LocalLibrary(this,G.target.result,u.name))});z.readAsText(u)})(c.files[q]);c.type="";c.type="file";c.value=""}}));c.style.display="none";document.body.appendChild(c);this.libFileInputElt=c}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
+mxUtils.bind(this,function(q,u){StorageFile.listFiles(this,"L",q,u)});window.openBrowserFile=mxUtils.bind(this,function(q,u,z){StorageFile.getFileContent(this,q,u,z)});window.deleteBrowserFile=mxUtils.bind(this,function(q,u,z){StorageFile.deleteFile(this,q,u,z)});var p=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(q){this.hideDialog(q)}));window.openFile.setConsumer(mxUtils.bind(this,function(q,u){f(b==App.MODE_BROWSER?new StorageLibrary(this,
q,u):new LocalLibrary(this,q,u))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=p;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,f,g,c,p,q,u){try{c=null!=c?c:this.mode;p=null!=p?p:!1;q=null!=q?q:!1;var y=this.createLibraryDataFromImages(f),H=mxUtils.bind(this,function(d){this.spinner.stop();null!=u&&u();this.handleError(d,null!=d?mxResources.get("errorSavingFile"):null)});null==g&&c==App.MODE_DEVICE&&(g=new LocalLibrary(this,y,b));if(null==g)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
-this.drive.insertFile(b,y,d,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(k,f)}),H,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,y,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(k,f)}),H,d):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
-y,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(k,f)}),H,d):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,y,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(k,f)}),H,d):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,y,mxUtils.bind(this,function(k){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(k,f)}),H,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,y,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(k,f)}),H,d):c==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,y,b),mxUtils.bind(this,function(k){this.hideDialog(!0);this.libraryLoaded(k,f)}),H):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));
-else if(p||this.spinner.spin(document.body,mxResources.get("saving"))){g.setData(y);var E=mxUtils.bind(this,function(){g.save(!0,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);q||this.libraryLoaded(g,f);null!=u&&u()}),H)});if(b!=g.getTitle()){var F=g.getHash();g.rename(b,mxUtils.bind(this,function(d){g.constructor!=LocalLibrary&&F!=g.getHash()&&(mxSettings.removeCustomLibrary(F),mxSettings.addCustomLibrary(g.getHash()));this.removeLibrarySidebar(F);E()}),H)}else E()}}catch(d){this.handleError(d)}};
-App.prototype.saveFile=function(b,f){var g=this.getCurrentFile(),c=this.mode;if(null!=g){var p=mxUtils.bind(this,function(){EditorUi.enableDrafts&&g.removeDraft();this.getCurrentFile()==g||g.isModified()||(g.getMode()!=App.MODE_DEVICE?this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))})):this.clearStatus());null!=f&&f()});if(b||null==g.getTitle()||null!=g.invalidFileHandle||null==this.mode)if(null!=g&&g.constructor==LocalFile&&
-null!=g.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,function(y,H){g.invalidFileHandle=null;g.fileHandle=y;g.title=H.name;g.desc=H;g.editable=null;this.save(H.name,p)}),null,this.createFileSystemOptions(g.getTitle()));else{b=null!=g.getTitle()?g.getTitle():this.defaultFilename;var q=mxUtils.bind(this,function(y,H,E,F){if(null!=y&&0<y.length)if(/(\.pdf)$/i.test(y))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),
-mxUtils.bind(this,function(){E.value=y.split(".").slice(0,-1).join(".");E.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==c&&H==App.MODE_DEVICE)null!=g&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(k,l){g.fileHandle=k;g.mode=App.MODE_DEVICE;g.title=l.name;g.desc=l;this.setMode(App.MODE_DEVICE);this.save(l.name,p)}),mxUtils.bind(this,
-function(k){"AbortError"!=k.name&&this.handleError(k)}),this.createFileSystemOptions(y)):(this.setMode(App.MODE_DEVICE),this.save(y,p));else if("download"==H)(new LocalFile(this,null,y)).save();else if("_blank"==H)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(c!=H){var d=mxUtils.bind(this,function(k){var l=this.editor.graph,n=l.getSelectionCells(),x=l.getViewState(),
-A=this.currentPage;this.createFile(y,this.getFileData(/(\.xml)$/i.test(y)||0>y.indexOf(".")||/(\.drawio)$/i.test(y),/(\.svg)$/i.test(y),/(\.html)$/i.test(y)),null,H,p,null==this.mode,k,null,null,mxUtils.bind(this,function(){this.restoreViewState(A,x,n)}))});null!=F?d(F):this.pickFolder(H,d)}else null!=H&&this.save(y,p)}),u=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(y,H,E){q(y.value,H,y,E);this.hideDialog()}),u?null:["_blank"]);this.showDialog(b.container,
-420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(g.getTitle(),p)}};
-App.prototype.loadTemplate=function(b,f,g,c,p){var q=!1,u=b,y=null!=c?c:b;c=/\.png$/i.test(y)||/\.pdf$/i.test(y);var H=EditorUi.isVisioFilename(y);this.editor.isCorsEnabledForUrl(u)||(q=c||H,u="t="+(new Date).getTime(),u=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+u+(q?"&base64=1":""));this.editor.loadUrl(u,mxUtils.bind(this,function(E){try{var F=q?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(E):atob(E):E;if(H||this.isVisioData(F))H||(y=p?this.isRemoteVisioData(F)?"raw.vss":"raw.vssx":
-this.isRemoteVisioData(F)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(E.substring(E.indexOf(",")+1)),function(d){f(d)},g,y);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,y))this.isExternalDataComms()?this.parseFileData(F,mxUtils.bind(this,function(d){4==d.readyState&&200<=d.status&&299>=d.status&&"<mxGraphModel"==d.responseText.substring(0,13)&&f(d.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g);else if(this.isLucidChartData(F))this.convertLucidChart(F,
-mxUtils.bind(this,function(d){f(d)}),mxUtils.bind(this,function(d){g(d)}));else{if(/(\.png)($|\?)/i.test(y)||Editor.isPngData(F))F=Editor.extractGraphModelFromPng(E);f(F)}}catch(d){g(d)}}),g,/(\.png)($|\?)/i.test(y)||H,null,null,q)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};
+App.prototype.saveLibrary=function(b,f,k,c,p,q,u){try{c=null!=c?c:this.mode;p=null!=p?p:!1;q=null!=q?q:!1;var z=this.createLibraryDataFromImages(f),G=mxUtils.bind(this,function(d){this.spinner.stop();null!=u&&u();this.handleError(d,null!=d?mxResources.get("errorSavingFile"):null)});null==k&&c==App.MODE_DEVICE&&(k=new LocalLibrary(this,z,b));if(null==k)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+this.drive.insertFile(b,z,d,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(g,f)}),G,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,z,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(g,f)}),G,d):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
+z,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(g,f)}),G,d):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,z,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(g,f)}),G,d):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,z,mxUtils.bind(this,function(g){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(g,f)}),G,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,z,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(g,f)}),G,d):c==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,z,b),mxUtils.bind(this,function(g){this.hideDialog(!0);this.libraryLoaded(g,f)}),G):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));
+else if(p||this.spinner.spin(document.body,mxResources.get("saving"))){k.setData(z);var E=mxUtils.bind(this,function(){k.save(!0,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);q||this.libraryLoaded(k,f);null!=u&&u()}),G)});if(b!=k.getTitle()){var F=k.getHash();k.rename(b,mxUtils.bind(this,function(d){k.constructor!=LocalLibrary&&F!=k.getHash()&&(mxSettings.removeCustomLibrary(F),mxSettings.addCustomLibrary(k.getHash()));this.removeLibrarySidebar(F);E()}),G)}else E()}}catch(d){this.handleError(d)}};
+App.prototype.saveFile=function(b,f){var k=this.getCurrentFile(),c=this.mode;if(null!=k){var p=mxUtils.bind(this,function(){EditorUi.enableDrafts&&k.removeDraft();this.getCurrentFile()==k||k.isModified()||(k.getMode()!=App.MODE_DEVICE?this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))})):this.clearStatus());null!=f&&f()});if(b||null==k.getTitle()||null!=k.invalidFileHandle||null==this.mode)if(null!=k&&k.constructor==LocalFile&&
+null!=k.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,function(z,G){k.invalidFileHandle=null;k.fileHandle=z;k.title=G.name;k.desc=G;k.editable=null;this.save(G.name,p)}),null,this.createFileSystemOptions(k.getTitle()));else{b=null!=k.getTitle()?k.getTitle():this.defaultFilename;var q=mxUtils.bind(this,function(z,G,E,F){if(null!=z&&0<z.length)if(/(\.pdf)$/i.test(z))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),
+mxUtils.bind(this,function(){E.value=z.split(".").slice(0,-1).join(".");E.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==c&&G==App.MODE_DEVICE)null!=k&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(g,l){k.fileHandle=g;k.mode=App.MODE_DEVICE;k.title=l.name;k.desc=l;this.setMode(App.MODE_DEVICE);this.save(l.name,p)}),mxUtils.bind(this,
+function(g){"AbortError"!=g.name&&this.handleError(g)}),this.createFileSystemOptions(z)):(this.setMode(App.MODE_DEVICE),this.save(z,p));else if("download"==G)(new LocalFile(this,null,z)).save();else if("_blank"==G)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(c!=G){var d=mxUtils.bind(this,function(g){var l=this.editor.graph,n=l.getSelectionCells(),x=l.getViewState(),
+A=this.currentPage;this.createFile(z,this.getFileData(/(\.xml)$/i.test(z)||0>z.indexOf(".")||/(\.drawio)$/i.test(z),/(\.svg)$/i.test(z),/(\.html)$/i.test(z)),null,G,p,null==this.mode,g,null,null,mxUtils.bind(this,function(){this.restoreViewState(A,x,n)}))});null!=F?d(F):this.pickFolder(G,d)}else null!=G&&this.save(z,p)}),u=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(z,G,E){q(z.value,G,z,E);this.hideDialog()}),u?null:["_blank"]);this.showDialog(b.container,
+420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(k.getTitle(),p)}};
+App.prototype.loadTemplate=function(b,f,k,c,p){var q=!1,u=b,z=null!=c?c:b;c=/\.png$/i.test(z)||/\.pdf$/i.test(z);var G=EditorUi.isVisioFilename(z);this.editor.isCorsEnabledForUrl(u)||(q=c||G,u="t="+(new Date).getTime(),u=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+u+(q?"&base64=1":""));this.editor.loadUrl(u,mxUtils.bind(this,function(E){try{var F=q?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(E):atob(E):E;if(G||this.isVisioData(F))G||(z=p?this.isRemoteVisioData(F)?"raw.vss":"raw.vssx":
+this.isRemoteVisioData(F)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(E.substring(E.indexOf(",")+1)),function(d){f(d)},k,z);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,z))this.isExternalDataComms()?this.parseFileData(F,mxUtils.bind(this,function(d){4==d.readyState&&200<=d.status&&299>=d.status&&"<mxGraphModel"==d.responseText.substring(0,13)&&f(d.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k);else if(this.isLucidChartData(F))this.convertLucidChart(F,
+mxUtils.bind(this,function(d){f(d)}),mxUtils.bind(this,function(d){k(d)}));else{if(/(\.png)($|\?)/i.test(z)||Editor.isPngData(F))F=Editor.extractGraphModelFromPng(E);f(F)}}catch(d){k(d)}}),k,/(\.png)($|\?)/i.test(z)||G,null,null,q)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};
App.prototype.isModeEnabled=function(b){return b==App.MODE_GOOGLE?"function"===typeof window.DriveClient&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode):b==App.MODE_GITHUB?null!=this.gitHub:b==App.MODE_GITLAB?null!=this.gitLab:b==App.MODE_DROPBOX?"function"===typeof window.DropboxClient&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&
mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):b==App.MODE_ONEDRIVE?"function"===typeof window.OneDriveClient&&("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode):b==App.MODE_TRELLO?"function"===
typeof window.TrelloClient&&"1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):!1};App.prototype.isModeReady=function(b){return null!=this.getServiceForName(b)&&(b!=App.MODE_DROPBOX||"undefined"!==typeof Dropbox.choose)};
-App.prototype.uncompressPages=function(b){if(null!=b)try{var f=mxUtils.parseXml(b);if("mxfile"==f.documentElement.nodeName){for(var g=f.documentElement.getElementsByTagName("diagram"),c=0;c<g.length;c++){var p=Editor.parseDiagramNode(g[c],!0);null!=p&&(mxUtils.setTextContent(g[c],""),g[c].appendChild(p))}b=mxUtils.getPrettyXml(f.documentElement)}}catch(q){}return b};
-App.prototype.createFile=function(b,f,g,c,p,q,u,y,H,E){EditorUi.debug("App.createFile",[this],"title",[b],"data",[f],"libs",[g],"mode",[c]);c=y?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;null==f||Editor.defaultCompressed||(f=this.uncompressPages(f));var F=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(l){F();null==l&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():
-null!=l&&this.handleError(l)});try{var k=mxUtils.bind(this,function(l){F();this.fileCreated(l,g,q,p,H,E)});c==App.MODE_GOOGLE&&null!=this.drive?(null==u&&null!=this.stateArg&&null!=this.stateArg.folderId&&(u=this.stateArg.folderId),this.drive.insertFile(b,f,u,k,d)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,k,d,!1,u):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,k,d,!1,u):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,k,d,!1,u):c==App.MODE_DROPBOX&&
-null!=this.dropbox?this.dropbox.insertFile(b,f,k,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,k,d,!1,u):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,k,d):!y&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(F(),this.showSaveFilePicker(mxUtils.bind(this,function(l,n){var x=new LocalFile(this,f,n.name,null,l,n);x.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(x,g,q,p,H,E)}),d,!0)}),mxUtils.bind(this,function(l){"AbortError"!=l.name&&d(l)}),this.createFileSystemOptions(b))):
-(F(),this.fileCreated(new LocalFile(this,f,b,null==c),g,q,p,H,E))}catch(l){F(),this.handleError(l)}}};
-App.prototype.fileCreated=function(b,f,g,c,p,q){EditorUi.debug("App.fileCreated",[this],"file",[b],"libs",[f],"replace",[g]);var u=window.location.pathname;null!=f&&0<f.length&&(u+="?libs="+f);null!=p&&0<p.length&&(u+="?clibs="+p);u=this.getUrl(u);b.getMode()!=App.MODE_DEVICE&&(u+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var y=b.getData();y=0<y.length?this.editor.extractGraphModel(mxUtils.parseXml(y).documentElement,!0):null;var H=window.location.protocol+
-"//"+window.location.hostname+u,E=y,F=null;null!=y&&/\.svg$/i.test(b.getTitle())&&(F=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(F.container),E=this.decodeNodeIntoGraph(E,F));b.setData(this.createFileData(y,F,b,H));null!=F&&F.container.parentNode.removeChild(F.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){d();var l=this.getCurrentFile();null==g&&null!=l&&(g=!l.isModified()&&(null==l.getMode()||EditorUi.isElectronApp));
-var n=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,q);g&&this.updateStatus(mxUtils.bind(this,function(){b.addAllSavedStatus()}));null!=f&&this.sidebar.showEntries(f);if(null!=p){for(var A=[],B=p.split(";"),I=0;I<B.length;I++)A.push(decodeURIComponent(B[I]));this.loadLibraries(A)}null!=c&&c()}),x=mxUtils.bind(this,function(){g||null==l||!l.isModified()?n():this.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges"))});
-null==g||g?x():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),null==b.getMode())),window.geOpenWindow(u,null,x))});b.constructor==LocalFile?k():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){k()}),mxUtils.bind(this,function(l){d();null!=l&&"AbortError"==l.name||this.handleError(l)}))}};
-App.prototype.loadFile=function(b,f,g,c,p){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var q=mxUtils.bind(this,function(){if(null==b||0==b.length)this.clearStatus(),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var H=mxUtils.bind(this,function(l){this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=
-null!=n?n.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(l){null!=l?(this.fileLoaded(new StorageFile(this,l,b)),null!=c&&c()):H({message:mxResources.get("fileNotFound")})}),H)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var l=this.getCurrentFile();window.location.hash=null!=l?l.getHash():""}));else if(null!=g)this.spinner.stop(),this.fileLoaded(g),
+App.prototype.uncompressPages=function(b){if(null!=b)try{var f=mxUtils.parseXml(b);if("mxfile"==f.documentElement.nodeName){for(var k=f.documentElement.getElementsByTagName("diagram"),c=0;c<k.length;c++){var p=Editor.parseDiagramNode(k[c],!0);null!=p&&(mxUtils.setTextContent(k[c],""),k[c].appendChild(p))}b=mxUtils.getPrettyXml(f.documentElement)}}catch(q){}return b};
+App.prototype.createFile=function(b,f,k,c,p,q,u,z,G,E){EditorUi.debug("App.createFile",[this],"title",[b],"data",[f],"libs",[k],"mode",[c]);c=z?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;null==f||Editor.defaultCompressed||(f=this.uncompressPages(f));var F=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(l){F();null==l&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():
+null!=l&&this.handleError(l)});try{var g=mxUtils.bind(this,function(l){F();this.fileCreated(l,k,q,p,G,E)});c==App.MODE_GOOGLE&&null!=this.drive?(null==u&&null!=this.stateArg&&null!=this.stateArg.folderId&&(u=this.stateArg.folderId),this.drive.insertFile(b,f,u,g,d)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,g,d,!1,u):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,g,d,!1,u):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,g,d,!1,u):c==App.MODE_DROPBOX&&
+null!=this.dropbox?this.dropbox.insertFile(b,f,g,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,g,d,!1,u):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,g,d):!z&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(F(),this.showSaveFilePicker(mxUtils.bind(this,function(l,n){var x=new LocalFile(this,f,n.name,null,l,n);x.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(x,k,q,p,G,E)}),d,!0)}),mxUtils.bind(this,function(l){"AbortError"!=l.name&&d(l)}),this.createFileSystemOptions(b))):
+(F(),this.fileCreated(new LocalFile(this,f,b,null==c),k,q,p,G,E))}catch(l){F(),this.handleError(l)}}};
+App.prototype.fileCreated=function(b,f,k,c,p,q){EditorUi.debug("App.fileCreated",[this],"file",[b],"libs",[f],"replace",[k]);var u=window.location.pathname;null!=f&&0<f.length&&(u+="?libs="+f);null!=p&&0<p.length&&(u+="?clibs="+p);u=this.getUrl(u);b.getMode()!=App.MODE_DEVICE&&(u+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var z=b.getData();z=0<z.length?this.editor.extractGraphModel(mxUtils.parseXml(z).documentElement,!0):null;var G=window.location.protocol+
+"//"+window.location.hostname+u,E=z,F=null;null!=z&&/\.svg$/i.test(b.getTitle())&&(F=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(F.container),E=this.decodeNodeIntoGraph(E,F));b.setData(this.createFileData(z,F,b,G));null!=F&&F.container.parentNode.removeChild(F.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){d();var l=this.getCurrentFile();null==k&&null!=l&&(k=!l.isModified()&&(null==l.getMode()||EditorUi.isElectronApp));
+var n=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,q);k&&this.updateStatus(mxUtils.bind(this,function(){b.addAllSavedStatus()}));null!=f&&this.sidebar.showEntries(f);if(null!=p){for(var A=[],B=p.split(";"),I=0;I<B.length;I++)A.push(decodeURIComponent(B[I]));this.loadLibraries(A)}null!=c&&c()}),x=mxUtils.bind(this,function(){k||null==l||!l.isModified()?n():this.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges"))});
+null==k||k?x():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),null==b.getMode())),window.geOpenWindow(u,null,x))});b.constructor==LocalFile?g():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){g()}),mxUtils.bind(this,function(l){d();null!=l&&"AbortError"==l.name||this.handleError(l)}))}};
+App.prototype.loadFile=function(b,f,k,c,p){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var q=mxUtils.bind(this,function(){if(null==b||0==b.length)this.clearStatus(),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var G=mxUtils.bind(this,function(l){this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=
+null!=n?n.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(l){null!=l?(this.fileLoaded(new StorageFile(this,l,b)),null!=c&&c()):G({message:mxResources.get("fileNotFound")})}),G)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var l=this.getCurrentFile();window.location.hash=null!=l?l.getHash():""}));else if(null!=k)this.spinner.stop(),this.fileLoaded(k),
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(l,n){this.spinner.stop();this.fileLoaded(new EmbedFile(this,l,n));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"))}));
else if("U"==b.charAt(0)){var F=decodeURIComponent(b.substring(1)),d=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=F.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var l=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var n=F.substring(31,F.lastIndexOf("&ex"));this.loadFile("G"+n,f,null,mxUtils.bind(this,function(){var x=this.getCurrentFile();null!=x&&this.editor.chromeless&&!this.editor.editable&&(x.getHash=
function(){return"G"+n},window.location.hash="#"+x.getHash());null!=c&&c()}));return!0}return!1});!l()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",l);return!0});this.loadTemplate(F,mxUtils.bind(this,function(l){this.spinner.stop();if(null!=l&&0<l.length){var n=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var x=F,A=F.lastIndexOf("."),B=x.lastIndexOf("/");A>B&&0<B&&(x=x.substring(B+1,A),A=F.substring(A),Editor.useCanvasForExport||
".png"!=A||(A=".drawio"),".svg"===A||".xml"===A||".html"===A||".png"===A||".drawio"===A)&&(n=x+A)}l=new LocalFile(this,l,null!=urlParams.title?decodeURIComponent(urlParams.title):n,!0);l.getHash=function(){return b};this.fileLoaded(l,!0)?null!=c&&c():d()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else d()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){d()||(this.spinner.stop(),
-this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var k=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var l=this.getServiceForName(k);if(null==l)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var x=this.getCurrentFile();window.location.hash=null!=
+this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var g=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var l=this.getServiceForName(g);if(null==l)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var x=this.getCurrentFile();window.location.hash=null!=
x?x.getHash():""}));else{var n=b.charAt(0);b=decodeURIComponent(b.substring(1));l.getFile(b,mxUtils.bind(this,function(x){this.spinner.stop();this.fileLoaded(x);var A=this.getCurrentFile();if(null==A)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){A.getHash=function(){return n+b};x="#"+A.getHash();try{var B=this.getHashObject();null==B||mxUtils.isEmptyObject(B)||(x=x+"#"+encodeURIComponent(JSON.stringify(B)))}catch(I){}window.location.replace(x)}else x==
A&&null==x.getMode()&&this.updateStatus(mxUtils.bind(this,function(){var I=mxResources.get("copyCreated");this.editor.setStatus('<div title="'+I+'" class="geStatusAlert">'+I+"</div>")}));null!=c&&c()}),mxUtils.bind(this,function(x){null!=window.console&&null!=x&&console.log("error in loadFile:",b,x);var A=mxUtils.bind(this,function(){var B=this.getCurrentFile();null==B?(window.location.hash="",this.showSplash()):window.location.hash="#"+B.getHash()});null==x||"AbortError"!=x.name?this.handleError(x,
-null!=x?mxResources.get("errorLoadingFile"):null,A,null,null,"#"+n+b):A()}))}})()}}),u=this.getCurrentFile(),y=mxUtils.bind(this,function(){p||null==u||!u.isModified()?q():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=u&&(window.location.hash=u.getHash())}),q,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length||null==f&&null!=u&&!u.isModified()&&this.isBlankFile()?y():null==u||f?y():this.showDialog((new PopupDialog(this,this.getUrl()+
-"#"+b,null,y)).container,340,140,!0,!0)};
+null!=x?mxResources.get("errorLoadingFile"):null,A,null,null,"#"+n+b):A()}))}})()}}),u=this.getCurrentFile(),z=mxUtils.bind(this,function(){p||null==u||!u.isModified()?q():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=u&&(window.location.hash=u.getHash())}),q,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length||null==f&&null!=u&&!u.isModified()&&this.isBlankFile()?z():null==u||f?z():this.showDialog((new PopupDialog(this,this.getUrl()+
+"#"+b,null,z)).container,340,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var f=b.getTitle();b.constructor!=LocalLibrary&&(f+="\n"+b.getHash());b.constructor==DriveLibrary?f+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?f+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?f+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?f+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?f+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?f+=" ("+
-mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(g){for(var c=0;c<g.length;c++)""!=g[c]&&0>mxUtils.indexOf(f,g[c])&&f.push(g[c])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)};
-App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var g=mxUtils.bind(this,function(E,F){F||mxSettings.removeCustomLibrary(E);delete this.loadedLibraries[E]}),c=0,p=[],q=0<b.length&&"L.scratchpad"==b[0]?1:0,u=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var E=b.length-1;0<=E;E--)null!=p[E]&&this.loadLibrary(p[E],E<=q);null!=f&&f()}});if(null!=b)for(var y=0;y<b.length;y++){var H=encodeURIComponent(decodeURIComponent(b[y]));
-mxUtils.bind(this,function(E,F){if(null!=E&&0<E.length&&null==this.loadedLibraries[E]&&null==this.sidebar.palettes[E]){this.loadedLibraries[E]=!0;c++;var d=mxUtils.bind(this,function(B){p[F]=B;c--;u()}),k=mxUtils.bind(this,function(B){g(E,B);c--;u()}),l=E.substring(0,1);if("L"==l)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var B=decodeURIComponent(E.substring(1));StorageFile.getFileContent(this,B,mxUtils.bind(this,function(I){".scratchpad"==B&&null==
-I&&(I=this.emptyLibraryXml);null!=I?d(new StorageLibrary(this,I,B)):k()}),k)}catch(I){k()}}),0);else if("U"==l){var n=decodeURIComponent(E.substring(1));this.isOffline()?k(!0):this.loadTemplate(n,mxUtils.bind(this,function(B){null!=B&&0<B.length?d(new UrlLibrary(this,B,n)):k()}),function(){k()},null,!0)}else if("R"==l){l=decodeURIComponent(E.substring(1));try{l=JSON.parse(l);var x={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[x.downloadUrl],null,mxUtils.bind(this,function(B){try{d(new RemoteLibrary(this,
-B,x))}catch(I){k()}}),function(){k()})}catch(B){k()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(E.substring(1)),function(B){d(B)},k)}catch(B){k()}else{var A=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(A=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&(A=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(A=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(A=this.dropbox):"W"==l&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(A=this.oneDrive);null!=A?A.getLibrary(decodeURIComponent(E.substring(1)),mxUtils.bind(this,function(B){try{d(B)}catch(I){k()}}),function(B){k()}):k(!0)}}})(H,y)}u()}};
+mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(k){for(var c=0;c<k.length;c++)""!=k[c]&&0>mxUtils.indexOf(f,k[c])&&f.push(k[c])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)};
+App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var k=mxUtils.bind(this,function(E,F){F||mxSettings.removeCustomLibrary(E);delete this.loadedLibraries[E]}),c=0,p=[],q=0<b.length&&"L.scratchpad"==b[0]?1:0,u=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var E=b.length-1;0<=E;E--)null!=p[E]&&this.loadLibrary(p[E],E<=q);null!=f&&f()}});if(null!=b)for(var z=0;z<b.length;z++){var G=encodeURIComponent(decodeURIComponent(b[z]));
+mxUtils.bind(this,function(E,F){if(null!=E&&0<E.length&&null==this.loadedLibraries[E]&&null==this.sidebar.palettes[E]){this.loadedLibraries[E]=!0;c++;var d=mxUtils.bind(this,function(B){p[F]=B;c--;u()}),g=mxUtils.bind(this,function(B){k(E,B);c--;u()}),l=E.substring(0,1);if("L"==l)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var B=decodeURIComponent(E.substring(1));StorageFile.getFileContent(this,B,mxUtils.bind(this,function(I){".scratchpad"==B&&null==
+I&&(I=this.emptyLibraryXml);null!=I?d(new StorageLibrary(this,I,B)):g()}),g)}catch(I){g()}}),0);else if("U"==l){var n=decodeURIComponent(E.substring(1));this.isOffline()?g(!0):this.loadTemplate(n,mxUtils.bind(this,function(B){null!=B&&0<B.length?d(new UrlLibrary(this,B,n)):g()}),function(){g()},null,!0)}else if("R"==l){l=decodeURIComponent(E.substring(1));try{l=JSON.parse(l);var x={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[x.downloadUrl],null,mxUtils.bind(this,function(B){try{d(new RemoteLibrary(this,
+B,x))}catch(I){g()}}),function(){g()})}catch(B){g()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(E.substring(1)),function(B){d(B)},g)}catch(B){g()}else{var A=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(A=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&(A=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(A=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(A=this.dropbox):"W"==l&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(A=this.oneDrive);null!=A?A.getLibrary(decodeURIComponent(E.substring(1)),mxUtils.bind(this,function(B){try{d(B)}catch(I){g()}}),function(B){g()}):g(!0)}}})(G,z)}u()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer)if(EditorUi.isElectronApp||this.isOffline()||(null!=urlParams.notif?this.fetchAndShowNotification(urlParams.notif):"1"!=urlParams.extAuth&&"atlas"!=Editor.currentTheme&&this.fetchAndShowNotification("online",this.mode)),this.isStandaloneApp()||"simple"==Editor.currentTheme&&"1"!=urlParams.embed)this.buttonContainer.style.display="none",null!=this.notificationBtn&&this.notificationBtn.parentNode!=this.sketchMenubarElt&&this.sketchMenubarElt.appendChild(this.notificationBtn);
else{this.buttonContainer.style.display="";var b=this.getCurrentFile();null!=this.notificationBtn&&this.notificationBtn.parentNode!=this.buttonContainer&&this.buttonContainer.appendChild(this.notificationBtn);"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&(null==this.commentButton&&(this.commentButton=document.createElement("a"),this.setElementTitle(this.commentButton,"comments"),this.commentButton.className="geButton geRoundButton",this.commentButton.style.backgroundImage="url("+Editor.commentImage+
")",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton)),this.commentButton.style.display=this.commentsSupported()?"":"none");if(null==this.shareButton){this.shareButton=document.createElement("button");this.shareButton.className="geBtn gePrimaryBtn";var f=document.createElement("div");f.className="geButton";f.style.backgroundImage="url("+Editor.groupImage+")";this.shareButton.appendChild(f);
this.dependsOnLanguage(mxUtils.bind(this,function(){f.innerHTML="";mxUtils.write(f,mxResources.get("share"));this.shareButton.setAttribute("title",mxResources.get("share"))}));mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()}));this.buttonContainer.appendChild(this.shareButton)}this.shareButton.style.display=null!=b&&"kennedy"==Editor.currentTheme&&"1"!=urlParams.embed?"":"none";if("simple"!=Editor.currentTheme){if(null==this.userButton){this.userButton=
-document.createElement("a");this.userButton.className="geButton geRoundButton";var g=document.createElement("img");this.userButton.appendChild(g);mxEvent.addListener(this.userButton,"click",mxUtils.bind(this,function(y){this.toggleUserPanel();var H=this.userButton.getBoundingClientRect(),E=window.innerWidth||document.documentElement.clientWidth;this.userPanel.style.top=H.bottom+"px";this.userPanel.style.right=E-H.right+"px";mxEvent.consume(y)}));var c=document.createElement("img");c.style.position=
-"absolute";c.style.width="10px";this.userButton.appendChild(c);this.buttonContainer.appendChild(this.userButton)}if(!this.unloading){g=this.userButton.getElementsByTagName("img")[0];c=this.userButton.getElementsByTagName("img")[1];var p=mxResources.get("changeUser"),q=this.getMainUser();null!=q&&null!=q.displayName&&(p=q.displayName);null!=q&&null!=q.pictureUrl?(g.classList.remove("geAdaptiveAsset"),g.src=q.pictureUrl,c.style.top="3px",c.style.right="0"):(g.classList.add("geAdaptiveAsset"),g.src=
-Editor.userImage,c.style.top="6px",c.style.right="4px");if(null!=b&&b.isRealtimeEnabled()&&b.isRealtimeSupported()){c.style.display="";g=b.getRealtimeError();var u=b.getRealtimeState();p+=" (";1==u?(c.src=Editor.syncImage,p+=mxResources.get("online")):(c.src=Editor.syncProblemImage,p=null!=g&&null!=g.message?p+g.message:p+mxResources.get("disconnected"));p+=")"}else c.style.display="none",c.src=Editor.cloudImage;this.userButton.setAttribute("title",p);this.userButton.style.display="draw.io"!=this.getServiceName()||
+document.createElement("a");this.userButton.className="geButton geRoundButton";var k=document.createElement("img");this.userButton.appendChild(k);mxEvent.addListener(this.userButton,"click",mxUtils.bind(this,function(z){this.toggleUserPanel();var G=this.userButton.getBoundingClientRect(),E=window.innerWidth||document.documentElement.clientWidth;this.userPanel.style.top=G.bottom+"px";this.userPanel.style.right=E-G.right+"px";mxEvent.consume(z)}));var c=document.createElement("img");c.style.position=
+"absolute";c.style.width="10px";this.userButton.appendChild(c);this.buttonContainer.appendChild(this.userButton)}if(!this.unloading){k=this.userButton.getElementsByTagName("img")[0];c=this.userButton.getElementsByTagName("img")[1];var p=mxResources.get("changeUser"),q=this.getMainUser();null!=q&&null!=q.displayName&&(p=q.displayName);null!=q&&null!=q.pictureUrl?(k.classList.remove("geAdaptiveAsset"),k.src=q.pictureUrl,c.style.top="3px",c.style.right="0"):(k.classList.add("geAdaptiveAsset"),k.src=
+Editor.userImage,c.style.top="6px",c.style.right="4px");if(null!=b&&b.isRealtimeEnabled()&&b.isRealtimeSupported()){c.style.display="";k=b.getRealtimeError();var u=b.getRealtimeState();p+=" (";1==u?(c.src=Editor.syncImage,p+=mxResources.get("online")):(c.src=Editor.syncProblemImage,p=null!=k&&null!=k.message?p+k.message:p+mxResources.get("disconnected"));p+=")"}else c.style.display="none",c.src=Editor.cloudImage;this.userButton.setAttribute("title",p);this.userButton.style.display="draw.io"!=this.getServiceName()||
null==q||"1"==urlParams.embed||this.isStandaloneApp()||null==b?"none":""}}}};
-App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif&&null!=NOTIFICATIONS_URL){b=b||"online";var g=null,c=mxUtils.bind(this,function(p){p=p.filter(function(H){return!H.targets||-1<H.targets.indexOf(b)||null!=f&&-1<H.targets.indexOf(f)});for(var q=b+"NotifReadTS",u=isLocalStorage?parseInt(localStorage.getItem(q)):!0,y=0;y<p.length;y++)p[y].isNew=!u||p[y].timestamp>u;this.showNotification(p,q)});try{isLocalStorage&&(g=JSON.parse(localStorage.getItem(".notifCache")))}catch(p){}null==
-g||g.ts+864E5<Date.now()?(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus())try{var q=JSON.parse(p.getText());q.sort(function(u,y){return y.timestamp-u.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:q}));this.fetchingNotif=!1;c(q)}catch(u){}}))):c(g.notifs)}};
-App.prototype.showNotification=function(b,f){function g(E){var F=document.querySelector(".geNotification-count");null!=F&&(F.innerHTML=E,F.style.display=0==E?"none":"",F=document.querySelector(".geNotification-bell"),F.style.animation=0==E?"none":"",F.className="geNotification-bell"+(0==E?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==E?"none":"")}var c=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var p=c=0;p<b.length;p++)b[p].isNew&&
+App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif&&null!=NOTIFICATIONS_URL){b=b||"online";var k=null,c=mxUtils.bind(this,function(p){p=p.filter(function(G){return!G.targets||-1<G.targets.indexOf(b)||null!=f&&-1<G.targets.indexOf(f)});for(var q=b+"NotifReadTS",u=isLocalStorage?parseInt(localStorage.getItem(q)):!0,z=0;z<p.length;z++)p[z].isNew=!u||p[z].timestamp>u;this.showNotification(p,q)});try{isLocalStorage&&(k=JSON.parse(localStorage.getItem(".notifCache")))}catch(p){}null==
+k||k.ts+864E5<Date.now()?(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus())try{var q=JSON.parse(p.getText());q.sort(function(u,z){return z.timestamp-u.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:q}));this.fetchingNotif=!1;c(q)}catch(u){}}))):c(k.notifs)}};
+App.prototype.showNotification=function(b,f){function k(E){var F=document.querySelector(".geNotification-count");null!=F&&(F.innerHTML=E,F.style.display=0==E?"none":"",F=document.querySelector(".geNotification-bell"),F.style.animation=0==E?"none":"",F.className="geNotification-bell"+(0==E?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==E?"none":"")}var c=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var p=c=0;p<b.length;p++)b[p].isNew&&
c++;if(0==c)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var q=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var E=this.notificationWin.querySelectorAll(".circle.active"),F=0;F<E.length;F++)E[F].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className=
"geNotification-box";c=document.createElement("span");c.className="geNotification-count";this.notificationBtn.appendChild(c);this.notifCount=c;c=document.createElement("div");c.className="geNotification-bell";p=document.createElement("span");p.className="geBell-top";c.appendChild(p);p=document.createElement("span");p.className="geBell-middle";c.appendChild(p);p=document.createElement("span");p.className="geBell-bottom";c.appendChild(p);p=document.createElement("span");p.className="geBell-rad";c.appendChild(p);
this.notificationBtn.appendChild(c);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);p=document.createElement("div");p.className="header";c=document.createElement("span");c.className="title";c.textContent=mxResources.get("notifications");p.appendChild(c);c=document.createElement("span");c.className="closeBtn";c.textContent="x";p.appendChild(c);this.notificationWin.appendChild(p);
p=document.createElement("div");p.className="notifications clearfix";var u=document.createElement("div");u.setAttribute("id","geNotifList");u.style.position="relative";p.appendChild(u);this.notificationWin.appendChild(p);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var E=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=
-E.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=E.right-this.notificationWin.clientWidth+"px";g(0)}else q()}));mxEvent.addListener(c,"click",q)}else this.notificationBtn.style.display="";var y=0,H=document.getElementById("geNotifList");if(null!=H){H.innerHTML='<div class="line"></div>';for(p=0;p<b.length;p++)(function(E,F){F.isNew&&y++;var d=document.createElement("div");d.className="notification";E=E.timeSince(new Date(F.timestamp));null==E&&(E=mxResources.get("lessThanAMinute"));
-d.innerHTML='<div class="circle'+(F.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[E],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(F.content)+"</p>";F.link&&mxEvent.addListener(d,"click",function(){window.open(F.link,"notifWin")});H.appendChild(d)})(this,b[p]);g(y)}}};
-App.prototype.save=function(b,f){var g=this.getCurrentFile(),c=!0,p=mxUtils.bind(this,function(){c&&(c=!1,g.handleFileSuccess(!0),null!=f&&f())}),q=mxUtils.bind(this,function(u){if(c){c=!1;Editor.addRetryToError(u,mxUtils.bind(this,function(){this.save(b,f)}));if(null!=u&&null!=u.retry){var y=u.retry;u.retry=function(){c=!0;try{g.isModified()?y():p()}catch(H){q(H)}}}g.handleFileError(u,null==u||"AbortError"!=u.name)}});if(null!=g&&this.spinner.spin(document.body,mxResources.get("saving"),q,3*this.timeout))try{this.clearStatus(),
-this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==g.getTitle()?g.save(!0,p,q):g.saveAs(b,p,q)}catch(u){q(u)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};
+E.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=E.right-this.notificationWin.clientWidth+"px";k(0)}else q()}));mxEvent.addListener(c,"click",q)}else this.notificationBtn.style.display="";var z=0,G=document.getElementById("geNotifList");if(null!=G){G.innerHTML='<div class="line"></div>';for(p=0;p<b.length;p++)(function(E,F){F.isNew&&z++;var d=document.createElement("div");d.className="notification";E=E.timeSince(new Date(F.timestamp));null==E&&(E=mxResources.get("lessThanAMinute"));
+d.innerHTML='<div class="circle'+(F.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[E],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(F.content)+"</p>";F.link&&mxEvent.addListener(d,"click",function(){window.open(F.link,"notifWin")});G.appendChild(d)})(this,b[p]);k(z)}}};
+App.prototype.save=function(b,f){var k=this.getCurrentFile(),c=!0,p=mxUtils.bind(this,function(){c&&(c=!1,k.handleFileSuccess(!0),null!=f&&f())}),q=mxUtils.bind(this,function(u){if(c){c=!1;Editor.addRetryToError(u,mxUtils.bind(this,function(){this.save(b,f)}));if(null!=u&&null!=u.retry){var z=u.retry;u.retry=function(){c=!0;try{k.isModified()?z():p()}catch(G){q(G)}}}k.handleFileError(u,null==u||"AbortError"!=u.name)}});if(null!=k&&this.spinner.spin(document.body,mxResources.get("saving"),q,3*this.timeout))try{this.clearStatus(),
+this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==k.getTitle()?k.save(!0,p,q):k.saveAs(b,p,q)}catch(u){q(u)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};
App.prototype.getTitleForService=function(b){return b==App.MODE_GOOGLE?mxResources.get("googleDrive"):b==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):EditorUi.prototype.getTitleForService.apply(this,arguments)};
-App.prototype.pickFolder=function(b,f,g,c,p,q){g=null!=g?g:!0;this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);var u=this.spinner.pause();g&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(y){u();if(y.action==google.picker.Action.PICKED){var H=null;null!=y.docs&&0<y.docs.length&&"folder"==y.docs[0].type&&(H=y.docs[0].id);f(q?y:H)}}),p):g&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(y){u();
-if(null!=y&&null!=y.value&&0<y.value.length){var H=OneDriveFile.prototype.getIdOf(y.value[0]);f(q?y:H)}}),c):g&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(y){u();f(y)})):g&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(y){u();f(y)})):g&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(y){u();f(y)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(b,f,g,c,p,q){p==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,c?this.base64ToBlob(b,g):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)})):p==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,q,mxUtils.bind(this,function(u){this.spinner.stop()}),
-mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),g,c):p==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,c?this.base64ToBlob(b,g):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),!1,q):p==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this,
+App.prototype.pickFolder=function(b,f,k,c,p,q){k=null!=k?k:!0;this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);var u=this.spinner.pause();k&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(z){u();if(z.action==google.picker.Action.PICKED){var G=null;null!=z.docs&&0<z.docs.length&&"folder"==z.docs[0].type&&(G=z.docs[0].id);f(q?z:G)}}),p):k&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(z){u();
+if(null!=z&&null!=z.value&&0<z.value.length){var G=OneDriveFile.prototype.getIdOf(z.value[0]);f(q?z:G)}}),c):k&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(z){u();f(z)})):k&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(z){u();f(z)})):k&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(z){u();f(z)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(b,f,k,c,p,q){p==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,c?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)})):p==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,q,mxUtils.bind(this,function(u){this.spinner.stop()}),
+mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),k,c):p==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,c?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),!1,q):p==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this,
function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),!0,q,c):p==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),!0,q,c):p==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,c?this.base64ToBlob(b,
-g):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),!1,q):p==App.MODE_BROWSER&&(null!=window.StorageFile&&!c&&this.spinner.spin(document.body,mxResources.get("saving"))?(g="<mxlibrary"==b.substring(0,10)?new StorageLibrary(this,b,f):new StorageFile(this,b,f),StorageFile.doInsertFile(g,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}))):(g=mxUtils.bind(this,
-function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?g():this.confirm(mxResources.get("replaceIt",[f]),g)))};
-App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fname.innerText="";var f=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,f)}f=this.editor.graph;var g=b.isEditable();f.isEnabled()&&!g&&f.reset();f.setEnabled(g);null==urlParams.rev&&(this.updateDocumentTitle(),f=b.getHash(),0<f.length?(f!=this.getDiagramId()&&(window.location.hash=f),this.updateHashObject()):0<window.location.hash.length&&(window.location.hash=
+k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),!1,q):p==App.MODE_BROWSER&&(null!=window.StorageFile&&!c&&this.spinner.spin(document.body,mxResources.get("saving"))?(k="<mxlibrary"==b.substring(0,10)?new StorageLibrary(this,b,f):new StorageFile(this,b,f),StorageFile.doInsertFile(k,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}))):(k=mxUtils.bind(this,
+function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?k():this.confirm(mxResources.get("replaceIt",[f]),k)))};
+App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fname.innerText="";var f=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,f)}f=this.editor.graph;var k=b.isEditable();f.isEnabled()&&!k&&f.reset();f.setEnabled(k);null==urlParams.rev&&(this.updateDocumentTitle(),f=b.getHash(),0<f.length?(f!=this.getDiagramId()&&(window.location.hash=f),this.updateHashObject()):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,f,g,c){var p=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(q){try{null!=g&&g(q,mxUtils.bind(this,function(){this.hideDialog();p()}))}catch(u){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(u.message))}))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(q){null!=c&&c(q);q&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,f,g,c,p,q,u,y){var H=f;/\.svg$/i.test(H)||(H=H.substring(0,f.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(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var F=new XMLHttpRequest;F.open("GET",b,!0);E||(F.responseType="blob");if(y)for(var d in y)F.setRequestHeader(d,y[d]);F.onload=mxUtils.bind(this,function(){if(200<=
-F.status&&299>=F.status){var l=null;E?(l=JSON.parse(F.responseText),l=this.base64ToBlob(l.content,"application/octet-stream")):l=new Blob([F.response],{type:"application/octet-stream"});this.importVisio(l,mxUtils.bind(this,function(n){p(new LocalFile(this,n,H,!0))}),q,f)}else null!=q&&q({message:mxResources.get("errorLoadingFile")})});F.onerror=q;F.send()}else{var k=mxUtils.bind(this,function(l){try{if(/\.pdf$/i.test(f)){var n=Editor.extractGraphModelFromPdf(l);null!=n&&0<n.length&&p(new LocalFile(this,
-n,H,!0))}else/\.png$/i.test(f)?(n=this.extractGraphModelFromPng(l),null!=n?p(new LocalFile(this,n,H,!0)):p(new LocalFile(this,l,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,b)?this.parseFileData(l,mxUtils.bind(this,function(x){4==x.readyState&&(200<=x.status&&299>=x.status?p(new LocalFile(this,x.responseText,H,!0)):null!=q&&q({message:mxResources.get("errorLoadingFile")}))}),f):p(new LocalFile(this,l,H,!0))}catch(x){null!=q&&q(x)}});g=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
-/\.pdf$/i.test(f)||null!=g&&"image/"==g.substring(0,6);E?mxUtils.get(b,mxUtils.bind(this,function(l){if(200<=l.getStatus()&&299>=l.getStatus()){if(null!=p){l=JSON.parse(l.getText());var n=l.content;"base64"===l.encoding&&(n=/\.png$/i.test(f)?"data:image/png;base64,"+n:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+n:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):atob(n));k(n)}}else null!=q&&q({code:App.ERROR_UNKNOWN})}),function(){null!=q&&q({code:App.ERROR_UNKNOWN})},!1,this.timeout,
-function(){null!=q&&q({code:App.ERROR_TIMEOUT,retry:fn})},y):null!=u?u(b,k,q,g):this.editor.loadUrl(b,k,q,g,null,null,null,y)}};
+App.prototype.showAuthDialog=function(b,f,k,c){var p=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(q){try{null!=k&&k(q,mxUtils.bind(this,function(){this.hideDialog();p()}))}catch(u){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(u.message))}))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(q){null!=c&&c(q);q&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(b,f,k,c,p,q,u,z){var G=f;/\.svg$/i.test(G)||(G=G.substring(0,f.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(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var F=new XMLHttpRequest;F.open("GET",b,!0);E||(F.responseType="blob");if(z)for(var d in z)F.setRequestHeader(d,z[d]);F.onload=mxUtils.bind(this,function(){if(200<=
+F.status&&299>=F.status){var l=null;E?(l=JSON.parse(F.responseText),l=this.base64ToBlob(l.content,"application/octet-stream")):l=new Blob([F.response],{type:"application/octet-stream"});this.importVisio(l,mxUtils.bind(this,function(n){p(new LocalFile(this,n,G,!0))}),q,f)}else null!=q&&q({message:mxResources.get("errorLoadingFile")})});F.onerror=q;F.send()}else{var g=mxUtils.bind(this,function(l){try{if(/\.pdf$/i.test(f)){var n=Editor.extractGraphModelFromPdf(l);null!=n&&0<n.length&&p(new LocalFile(this,
+n,G,!0))}else/\.png$/i.test(f)?(n=this.extractGraphModelFromPng(l),null!=n?p(new LocalFile(this,n,G,!0)):p(new LocalFile(this,l,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,b)?this.parseFileData(l,mxUtils.bind(this,function(x){4==x.readyState&&(200<=x.status&&299>=x.status?p(new LocalFile(this,x.responseText,G,!0)):null!=q&&q({message:mxResources.get("errorLoadingFile")}))}),f):p(new LocalFile(this,l,G,!0))}catch(x){null!=q&&q(x)}});k=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
+/\.pdf$/i.test(f)||null!=k&&"image/"==k.substring(0,6);E?mxUtils.get(b,mxUtils.bind(this,function(l){if(200<=l.getStatus()&&299>=l.getStatus()){if(null!=p){l=JSON.parse(l.getText());var n=l.content;"base64"===l.encoding&&(n=/\.png$/i.test(f)?"data:image/png;base64,"+n:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+n:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):atob(n));g(n)}}else null!=q&&q({code:App.ERROR_UNKNOWN})}),function(){null!=q&&q({code:App.ERROR_UNKNOWN})},!1,this.timeout,
+function(){null!=q&&q({code:App.ERROR_TIMEOUT,retry:fn})},z):null!=u?u(b,g,q,k):this.editor.loadUrl(b,g,q,k,null,null,null,z)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.className="geAppIcon";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(u){this.appIconClicked(u)}));mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var u=this.getCurrentFile();null!=u&&(u=u.getMode(),u==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage=
"url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):u==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):u==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):u==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize=
"70%"):u==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="90%"):u==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70%"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=b;this.appIcon.style.backgroundSize=""}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);
-this.fnameWrapper=document.createElement("div");this.fname=document.createElement("a");this.fnameWrapper.className="geFilenameContainer";this.fname.className="geFilename";mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(u){var y=this.getCurrentFile();null!=y&&y.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(u)}));mxEvent.preventDefault(this.fname);this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&
-this.menubarContainer.appendChild(this.fnameWrapper);var f=document.createElement("div");f.className="geToolbar geToolbarEnd";this.toolbarContainer.appendChild(f);var g=document.createElement("a");g.style.backgroundImage="url('"+Editor.fullscreenImage+"')";g.className="geButton";f.appendChild(g);mxEvent.addListener(g,"click",mxUtils.bind(this,function(u){var y=this.fullscreenMode;"atlas"!=Editor.currentTheme&&"1"!=urlParams.embed&&this.setCompactMode(!y,null,Editor.transitionDelay);this.toggleShapesPanel(y);
-this.toggleFormatPanel(y);this.fullscreenMode=!y;g.style.backgroundImage="url('"+(this.fullscreenMode?Editor.fullscreenExitImage:Editor.fullscreenImage)+"')";mxEvent.consume(u)}));mxEvent.preventDefault(g);var c=document.createElement("a");c.className="geButton";f.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(u){this.actions.get("format").funct();mxEvent.consume(u)}));mxEvent.preventDefault(c);var p=mxUtils.bind(this,function(){c.style.backgroundImage=0<this.formatWidth?
+this.fnameWrapper=document.createElement("div");this.fname=document.createElement("a");this.fnameWrapper.className="geFilenameContainer";this.fname.className="geFilename";mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(u){var z=this.getCurrentFile();null!=z&&z.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(u)}));mxEvent.preventDefault(this.fname);this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&
+this.menubarContainer.appendChild(this.fnameWrapper);var f=document.createElement("div");f.className="geToolbar geToolbarEnd";this.toolbarContainer.appendChild(f);var k=document.createElement("a");k.style.backgroundImage="url('"+Editor.fullscreenImage+"')";k.className="geButton";f.appendChild(k);mxEvent.addListener(k,"click",mxUtils.bind(this,function(u){var z=this.fullscreenMode;"atlas"!=Editor.currentTheme&&"1"!=urlParams.embed&&this.setCompactMode(!z,null,Editor.transitionDelay);this.toggleShapesPanel(z);
+this.toggleFormatPanel(z);this.fullscreenMode=!z;k.style.backgroundImage="url('"+(this.fullscreenMode?Editor.fullscreenExitImage:Editor.fullscreenImage)+"')";mxEvent.consume(u)}));mxEvent.preventDefault(k);var c=document.createElement("a");c.className="geButton";f.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(u){this.actions.get("format").funct();mxEvent.consume(u)}));mxEvent.preventDefault(c);var p=mxUtils.bind(this,function(){c.style.backgroundImage=0<this.formatWidth?
"url('"+Editor.rightPanelCloseImage+"')":"url('"+Editor.rightPanelOpenImage+"')"});this.addListener("formatWidthChanged",p);p();var q=document.createElement("a");q.style.backgroundImage="url('"+(this.compactMode?Editor.chevronDownImage:Editor.chevronUpImage)+"')";q.className="geButton";"1"!=urlParams.embed&&"atlas"!=Editor.currentTheme&&(f.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(u){this.setCompactMode(!this.compactMode,!0,Editor.transitionDelay);mxEvent.consume(u)})),
-mxEvent.preventDefault(q),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof q.click&&window.setTimeout(mxUtils.bind(this,function(){q.click()}),0),this.addListener("compactModeChanged",mxUtils.bind(this,function(){q.style.backgroundImage="url('"+(this.compactMode?Editor.chevronDownImage:Editor.chevronUpImage)+"')"})));this.dependsOnLanguage(mxUtils.bind(this,function(){this.fname.setAttribute("title",mxResources.get("rename"));g.setAttribute("title",mxResources.get("fullscreen"));q.setAttribute("title",
+mxEvent.preventDefault(q),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof q.click&&window.setTimeout(mxUtils.bind(this,function(){q.click()}),0),this.addListener("compactModeChanged",mxUtils.bind(this,function(){q.style.backgroundImage="url('"+(this.compactMode?Editor.chevronDownImage:Editor.chevronUpImage)+"')"})));this.dependsOnLanguage(mxUtils.bind(this,function(){this.fname.setAttribute("title",mxResources.get("rename"));k.setAttribute("title",mxResources.get("fullscreen"));q.setAttribute("title",
mxResources.get("collapseExpand"));c.setAttribute("title",mxResources.get("format")+" ("+Editor.ctrlKey+"+"+Editor.shiftKey+"+P)")}))}};
-App.prototype.setCompactMode=function(b,f,g){var c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;g=null!=g?g:0;window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.menubarContainer.style,"transition","all "+g+"s ease-in-out");mxUtils.setPrefixedStyle(this.toolbarContainer.style,"transition","all "+g+"s ease-in-out");b?c.classList.add("geCompactMode"):c.classList.remove("geCompactMode");window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(this.menubarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.toolbarContainer.style,"transition",null);this.compactMode=b;this.refresh(!0);this.fireEvent(new mxEventObject("compactModeChanged"));isLocalStorage&&f&&(mxSettings.settings.compactMode=this.compactMode,mxSettings.save())}),1E3*g)}),0)};
+App.prototype.setCompactMode=function(b,f,k){var c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;k=null!=k?k:0;window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.menubarContainer.style,"transition","all "+k+"s ease-in-out");mxUtils.setPrefixedStyle(this.toolbarContainer.style,"transition","all "+k+"s ease-in-out");b?c.classList.add("geCompactMode"):c.classList.remove("geCompactMode");window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(this.menubarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.toolbarContainer.style,"transition",null);this.compactMode=b;this.refresh(!0);this.fireEvent(new mxEventObject("compactModeChanged"));isLocalStorage&&f&&(mxSettings.settings.compactMode=this.compactMode,mxSettings.save())}),1E3*k)}),0)};
App.prototype.getMainUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&(b=this.gitLab.getUser());return b};
App.prototype.hideUserPanel=function(){null!=this.userPanel&&null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)};
App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog geInlineDialog";b.style.minWidth="300px";this.userPanel=b;mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(u){mxEvent.isConsumed(u)||this.hideUserPanel()}))}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var f=!1;this.userPanel.innerText="";b=document.createElement("div");b.className="geButton";b.setAttribute("title",
-mxResources.get("close"));b.style.backgroundImage="url("+Editor.crossImage+")";b.style.position="absolute";b.style.right="0px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var g=this.drive.getUsersList();if(0<g.length){var c=mxUtils.bind(this,function(u,y){var H=this.getCurrentFile();null!=H&&H.constructor==DriveFile?(this.spinner.spin(document.body,y),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,
-function(){this.spinner.stop();u()}),2E3)):u()});b=mxUtils.bind(this,function(u){var y=document.createElement("tr"),H=document.createElement("td");H.setAttribute("valig","middle");H.style.height="59px";H.style.width="66px";var E=document.createElement("img");E.setAttribute("width","50");E.setAttribute("height","50");E.setAttribute("border","0");E.setAttribute("src",null!=u.pictureUrl?u.pictureUrl:Editor.userImage);E.style.borderRadius="50%";E.style.margin="4px 8px 0 8px";H.appendChild(E);y.appendChild(H);
-H=document.createElement("td");H.setAttribute("valign","middle");H.style.whiteSpace="nowrap";H.style.paddingTop="4px";H.style.maxWidth="0";H.style.overflow="hidden";H.style.textOverflow="ellipsis";mxUtils.write(H,u.displayName+(u.isCurrent&&1<g.length?" ("+mxResources.get("default")+")":""));null!=u.email&&(mxUtils.br(H),E=document.createElement("small"),E.style.color="gray",mxUtils.write(E,u.email),H.appendChild(E));E=document.createElement("div");E.style.marginTop="4px";var F=document.createElement("i");
-mxUtils.write(F,mxResources.get("googleDrive"));E.appendChild(F);H.appendChild(E);y.appendChild(H);u.isCurrent?y.setAttribute("title","User ID: "+u.id):(y.setAttribute("title",mxResources.get("login")+" (User ID: "+u.id+")"),y.style.cursor="pointer",y.style.opacity="0.3",mxEvent.addListener(y,"mouseenter",mxUtils.bind(this,function(){y.style.opacity="1"})),mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(){y.style.opacity="0.3"})),mxEvent.addListener(y,"click",mxUtils.bind(this,function(d){this.hideUserPanel();
-c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(u);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(k){this.handleError(k)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(d)})));return y});f=!0;var p=document.createElement("table");p.style.borderSpacing="0";p.style.fontSize="10pt";p.style.width="100%";p.style.padding="10px";for(var q=0;q<g.length;q++)p.appendChild(b(g[q]));
+mxResources.get("close"));b.style.backgroundImage="url("+Editor.crossImage+")";b.style.position="absolute";b.style.right="0px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var k=this.drive.getUsersList();if(0<k.length){var c=mxUtils.bind(this,function(u,z){var G=this.getCurrentFile();null!=G&&G.constructor==DriveFile?(this.spinner.spin(document.body,z),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,
+function(){this.spinner.stop();u()}),2E3)):u()});b=mxUtils.bind(this,function(u){var z=document.createElement("tr"),G=document.createElement("td");G.setAttribute("valig","middle");G.style.height="59px";G.style.width="66px";var E=document.createElement("img");E.setAttribute("width","50");E.setAttribute("height","50");E.setAttribute("border","0");E.setAttribute("src",null!=u.pictureUrl?u.pictureUrl:Editor.userImage);E.style.borderRadius="50%";E.style.margin="4px 8px 0 8px";G.appendChild(E);z.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,u.displayName+(u.isCurrent&&1<k.length?" ("+mxResources.get("default")+")":""));null!=u.email&&(mxUtils.br(G),E=document.createElement("small"),E.style.color="gray",mxUtils.write(E,u.email),G.appendChild(E));E=document.createElement("div");E.style.marginTop="4px";var F=document.createElement("i");
+mxUtils.write(F,mxResources.get("googleDrive"));E.appendChild(F);G.appendChild(E);z.appendChild(G);u.isCurrent?z.setAttribute("title","User ID: "+u.id):(z.setAttribute("title",mxResources.get("login")+" (User ID: "+u.id+")"),z.style.cursor="pointer",z.style.opacity="0.3",mxEvent.addListener(z,"mouseenter",mxUtils.bind(this,function(){z.style.opacity="1"})),mxEvent.addListener(z,"mouseleave",mxUtils.bind(this,function(){z.style.opacity="0.3"})),mxEvent.addListener(z,"click",mxUtils.bind(this,function(d){this.hideUserPanel();
+c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(u);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(g){this.handleError(g)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(d)})));return z});f=!0;var p=document.createElement("table");p.style.borderSpacing="0";p.style.fontSize="10pt";p.style.width="100%";p.style.padding="10px";for(var q=0;q<k.length;q++)p.appendChild(b(k[q]));
this.userPanel.appendChild(p);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";p=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));
-p.className="geBtn";p.style.float="right";b.appendChild(p);p=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var u=this.drive.createAuthWin();u.blur();window.focus();c(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(y){this.handleError(y)}),!0,u)}),mxResources.get("closingFile")+"...")}));p.className="geBtn";p.style.margin="0px";
-b.appendChild(p);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(u,y,H,E){if(null!=u){f&&this.userPanel.appendChild(document.createElement("hr"));f=!0;var F=document.createElement("table");F.style.borderSpacing="0";F.style.fontSize="10pt";F.style.width="100%";F.style.padding="10px";var d=document.createElement("tbody"),k=document.createElement("tr"),l=document.createElement("td");l.setAttribute("valig","top");l.style.width="40px";if(null!=y){var n=document.createElement("img");n.setAttribute("width",
-"40");n.setAttribute("height","40");n.setAttribute("border","0");n.setAttribute("src",y);n.style.marginRight="6px";l.appendChild(n)}k.appendChild(l);l=document.createElement("td");l.setAttribute("valign","middle");l.style.whiteSpace="nowrap";l.style.maxWidth="0";l.style.overflow="hidden";l.style.textOverflow="ellipsis";mxUtils.write(l,u.displayName);null!=u.email&&(mxUtils.br(l),y=document.createElement("small"),y.style.color="gray",mxUtils.write(y,u.email),l.appendChild(y));null!=E&&(u=document.createElement("div"),
-u.style.marginTop="4px",y=document.createElement("i"),mxUtils.write(y,E),u.appendChild(y),l.appendChild(u));k.appendChild(l);d.appendChild(k);F.appendChild(d);this.userPanel.appendChild(F);u=document.createElement("div");u.style.textAlign="center";u.style.padding="10px";u.style.whiteSpace="nowrap";null!=H&&(H=mxUtils.button(mxResources.get("signOut"),H),H.className="geBtn",u.appendChild(H));this.userPanel.appendChild(u)}});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",
-mxUtils.bind(this,function(){var u=this.getCurrentFile();if(null!=u&&u.constructor==DropboxFile){var y=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var u=
-this.getCurrentFile();if(null!=u&&u.constructor==OneDriveFile){var y=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var u=this.getCurrentFile();if(null!=u&&u.constructor==GitHubFile){var y=
-mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var u=this.getCurrentFile();if(null!=u&&u.constructor==GitLabFile){var y=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=
-""});u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var u=this.getCurrentFile();if(null!=u&&u.constructor==TrelloFile){var y=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});u.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(p=this.getCurrentFile(),null!=p&&p.isRealtimeEnabled()&&p.isRealtimeSupported()&&(b=document.createElement("div"),b.style.padding="10px",b.style.whiteSpace="nowrap",b.style.borderTop="1px solid rgb(224, 224, 224)",b.style.marginTop="4px",b.style.textAlign="center",b.style.padding="10px",b.style.fontSize="9pt",q=p.getRealtimeError(),1!=p.getRealtimeState()&&
+p.className="geBtn";p.style.float="right";b.appendChild(p);p=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var u=this.drive.createAuthWin();u.blur();window.focus();c(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(z){this.handleError(z)}),!0,u)}),mxResources.get("closingFile")+"...")}));p.className="geBtn";p.style.margin="0px";
+b.appendChild(p);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(u,z,G,E){if(null!=u){f&&this.userPanel.appendChild(document.createElement("hr"));f=!0;var F=document.createElement("table");F.style.borderSpacing="0";F.style.fontSize="10pt";F.style.width="100%";F.style.padding="10px";var d=document.createElement("tbody"),g=document.createElement("tr"),l=document.createElement("td");l.setAttribute("valig","top");l.style.width="40px";if(null!=z){var n=document.createElement("img");n.setAttribute("width",
+"40");n.setAttribute("height","40");n.setAttribute("border","0");n.setAttribute("src",z);n.style.marginRight="6px";l.appendChild(n)}g.appendChild(l);l=document.createElement("td");l.setAttribute("valign","middle");l.style.whiteSpace="nowrap";l.style.maxWidth="0";l.style.overflow="hidden";l.style.textOverflow="ellipsis";mxUtils.write(l,u.displayName);null!=u.email&&(mxUtils.br(l),z=document.createElement("small"),z.style.color="gray",mxUtils.write(z,u.email),l.appendChild(z));null!=E&&(u=document.createElement("div"),
+u.style.marginTop="4px",z=document.createElement("i"),mxUtils.write(z,E),u.appendChild(z),l.appendChild(u));g.appendChild(l);d.appendChild(g);F.appendChild(d);this.userPanel.appendChild(F);u=document.createElement("div");u.style.textAlign="center";u.style.padding="10px";u.style.whiteSpace="nowrap";null!=G&&(G=mxUtils.button(mxResources.get("signOut"),G),G.className="geBtn",u.appendChild(G));this.userPanel.appendChild(u)}});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",
+mxUtils.bind(this,function(){var u=this.getCurrentFile();if(null!=u&&u.constructor==DropboxFile){var z=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):z()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var u=
+this.getCurrentFile();if(null!=u&&u.constructor==OneDriveFile){var z=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):z()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var u=this.getCurrentFile();if(null!=u&&u.constructor==GitHubFile){var z=
+mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):z()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var u=this.getCurrentFile();if(null!=u&&u.constructor==GitLabFile){var z=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=
+""});u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):z()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var u=this.getCurrentFile();if(null!=u&&u.constructor==TrelloFile){var z=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});u.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):z()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(p=this.getCurrentFile(),null!=p&&p.isRealtimeEnabled()&&p.isRealtimeSupported()&&(b=document.createElement("div"),b.style.padding="10px",b.style.whiteSpace="nowrap",b.style.borderTop="1px solid rgb(224, 224, 224)",b.style.marginTop="4px",b.style.textAlign="center",b.style.padding="10px",b.style.fontSize="9pt",q=p.getRealtimeError(),1!=p.getRealtimeState()&&
(mxUtils.write(b,mxResources.get("realtimeCollaboration")+": "+(null!=q&&null!=q.message?q.message:mxResources.get("disconnected"))),this.userPanel.appendChild(b))));document.body.appendChild(this.userPanel)}};
App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
-Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(g){return this.editorUi.createHelpIcon(g)};Menus.prototype.addLinkToItem=function(g,c){null!=g&&g.firstChild.nextSibling.appendChild(this.createHelpLink(c))};
-Menus.prototype.removeCustomFont=function(g,c){for(var p=0;p<this.customFonts.length;p++)if(this.customFonts[p].name==g&&this.customFonts[p].url==c){this.customFonts.splice(p,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(g,c){for(var p=0;p<this.customFonts.length;p++)if(this.customFonts[p].name==g&&this.customFonts[p].url==c)return!0;for(p=0;p<this.defaultFonts.length;p++){var q=this.defaultFonts[p];
-if("string"!==typeof q&&q.fontFamily==g&&q.fontUrl==c||"string"===typeof q&&q==g&&null==c)return!0}return!1};Menus.prototype.addCustomFont=function(g,c){null==g||this.containsFont(g,c)||(this.customFonts.push({name:g,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var f=Menus.prototype.init;Menus.prototype.init=function(){function g(v,z,N){c.editor.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),
-"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(J,K,m,t,D,M,L,O,P,U,V,X,W){var Y=parseInt(J);!isNaN(Y)&&0<Y&&(c.exportImage(Y/100,K&&"png"==v,m,t,D&&"png"==v,L,!O,P,v,V,null,X,W),null!=N&&N(J,K,m,t,D,M,L,O,P,U,V,X,W))}),!0,z,v,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(J,K,m,t,D){c.downloadFile(K&&"png"==v?"xmlpng":v,null,null,J,null,null,m,t,D)}),!1,!0)}f.apply(this,arguments);
-var c=this.editorUi,p=c.editor.graph,q=mxUtils.bind(p,p.isEnabled);"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(v){return"file"!=v}));c.actions.addAction("new...",function(){var v=c.isOffline(),z=new NewDialog(c,v,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(z.container,v?350:620,v?70:460,!0,!0,function(N){null!=c.sidebar&&c.sidebar.hideTooltip();N&&null==c.getCurrentFile()&&c.showSplash()});z.init()});Editor.enableChatGpt&&
-c.isExternalDataComms()&&"draw.io"==c.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(c.actions.put("generate",new Action("generate...",function(){c.openTemplateDialog("")})).isEnabled=q);c.actions.put("insertTemplate",new Action("template...",function(){c.openTemplateDialog()})).isEnabled=q;var u=c.actions.addAction("shareCursor",function(){c.setShareCursorPosition(!c.isShareCursorPosition())});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isShareCursorPosition()});
-u=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isShowRemoteCursors()});u=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.POINTS});u=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});u.setToggleAction(!0);
-u.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});u=c.actions.addAction("millimeters",function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});u=c.actions.addAction("meters",function(){c.editor.graph.view.setUnit(mxConstants.METERS)});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});
-this.put("units",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,["points","inches","millimeters","meters"],z);"min"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme||c.menus.addMenuItems(v,["-","pageScale"],z)})));u=c.actions.addAction("pageTabs",function(){c.setTabContainerVisible(!c.isTabContainerVisible(),!0)});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isTabContainerVisible()});u=c.actions.addAction("ruler",function(){c.setRulerVisible(!c.isRulerVisible())});
-u.setEnabled(Editor.canvasSupported&&9!=document.documentMode);u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isRulerVisible()});u=c.actions.addAction("fullscreen",function(){if("1"==urlParams.embedInline)c.setInlineFullscreen(!Editor.inlineFullscreen);else{var v=mxUtils.isAncestorNode(document.body,c.container)?c.container:c.editor.graph.container;null!=v&&(null==document.fullscreenElement?(document.body.requestFullscreen(),v.classList.add("geFullscreen")):(document.exitFullscreen(),
-v.classList.remove("geFullscreen")))}});u.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;u.setToggleAction(!0);u.setSelectedCallback(function(){return"1"==urlParams.embedInline?Editor.inlineFullscreen:null!=document.fullscreenElement});u=c.actions.put("lightMode",new Action("light",function(v){c.setAndPersistDarkMode(!1)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return!c.isAutoDarkMode(!0)&&!Editor.isDarkMode()});
-u=c.actions.put("darkMode",new Action("dark",function(v){c.setAndPersistDarkMode(!0)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return!c.isAutoDarkMode(!0)&&Editor.isDarkMode()});u=c.actions.put("autoMode",new Action("automatic",function(v){c.setAndPersistDarkMode("auto")}));u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isAutoDarkMode(!0)});c.actions.addAction("properties...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){v=new FilePropertiesDialog(c,v);
-c.showDialog(v.container,340,200,!0,!0);v.init()})}).isEnabled=q;window.mxFreehand&&(u=c.actions.put("insertFreehand",new Action("freehand...",function(){p.isEnabled()&&(null==c.freehandWindow&&(c.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,180,126,!0)),p.freehand.isDrawing()?p.freehand.stopDrawing():p.freehand.startDrawing(),c.freehandWindow.window.setVisible(p.freehand.isDrawing()))},null,null,"X")),u.isEnabled=function(){return q()},u.setToggleAction(!0),u.setSelectedCallback(function(){return null!=
-c.freehandWindow&&c.freehandWindow.window.isVisible()}));c.actions.put("exportXml",new Action("formatXml...",function(){var v=document.createElement("div");v.style.whiteSpace="nowrap";var z=null==c.pages||1>=c.pages.length,N=document.createElement("h3");mxUtils.write(N,mxResources.get("formatXml"));N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(N);var J=c.addCheckbox(v,mxResources.get("selectionOnly"),!1,p.isSelectionEmpty()),K=c.addCheckbox(v,mxResources.get("compressed"),
-Editor.defaultCompressed),m=c.addCheckbox(v,mxResources.get("allPages"),!z,z);m.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?m.setAttribute("disabled","disabled"):m.removeAttribute("disabled")});v=new CustomDialog(c,v,mxUtils.bind(this,function(){c.downloadFile("xml",!K.checked,null,!J.checked,z||!m.checked)}),null,mxResources.get("export"));c.showDialog(v.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action("url...",function(){c.showPublishLinkDialog(mxResources.get("url"),
-null,null,null,null,null,null,null,function(v,z,N,J,K,m,t,D,M,L,O,P,U){t=[];J&&M&&t.push("tags=%7B%7D");v=new EmbedDialog(c,c.createLink(v,z,U,J,K,m,null,!0,t,null,N,null,P));c.showDialog(v.container,450,270,!0,!0);v.init()},null,!0,!0)}));c.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showHtmlDialog(mxResources.get("export"),null,v,function(z,N,J,K,m,t,D,M,L,O,P,U){c.createHtml(z,N,J,K,m,t,D,M,L,O,P,mxUtils.bind(this,function(V,
-X){var W=c.getBaseFilename(D);V='\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(W)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+X+"\n</body>\n</html>";c.saveData(W+(".drawio"==W.substring(W.lenth-7)?"":".drawio")+".html","html",V,"text/html")}),U)})})}));c.actions.put("exportPdf",new Action("formatPdf...",function(){c.showPrintDialog(mxResources.get("formatPdf"),EditorUi.isElectronApp||
-!c.isOffline()&&!c.printPdfExport?mxUtils.bind(this,function(v,z){v=null!=c.pages?c.pages.length:1;var N=null==c.pages||1>=c.pages.length,J=c.getPageIndex(c.currentPage);J=null!=J?J+1:1;c.downloadFile("pdf",null,null,!z.selection,N||!z.allPages&&z.pagesFrom==J&&z.pagesTo==J,!z.crop,z.transparent,z.scale,null,z.grid,z.includeCopy,z.allPages||z.pagesFrom==J&&z.pagesTo==J?null:{from:Math.max(0,Math.min(v-1,z.pagesFrom-1)),to:Math.max(0,Math.min(v-1,z.pagesTo-1))},z.border,z.fit,z.sheetsAcross,z.sheetsDown,
-z.shadows)}):null,mxResources.get("export"))}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function v(){null!=z&&z.removeDraft();c.fileLoaded(new LocalFile(c,c.emptyDiagramXml))}var z=c.getCurrentFile();null!=z&&z.isModified()?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){if(1==p.getSelectionCount()){var v=p.getSelectionCell(),
-z=p.view.getState(v);null!=z&&null!=z.shape&&null!=z.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,z){c.spinner.stop();v=new RevisionDialog(c,v,z);c.showDialog(v.container,640,480,!0,!0);v.init()}),mxUtils.bind(this,function(v){c.handleError(null!=
-v?v:mxResources.get("notAvailable"))})):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");u=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");"none"==DrawioFile.SYNC&&(u.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))},null,null,null,navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown);"undefined"!==typeof MathJax&&(u=c.actions.addAction("mathematicalTypesetting",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;
-v.ignoreImage=!0;v.mathEnabled=!c.isMathEnabled();p.model.execute(v)}),u.setToggleAction(!0),u.setSelectedCallback(function(){return c.isMathEnabled()}),u.isEnabled=q);u=c.actions.put("defaultAdaptiveColors",new Action("defaultAdaptiveColors",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.adaptiveColors="default";p.model.execute(v)}));u.getTitle=function(){return mxResources.get("default")+" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())+")"};u.setToggleAction(!0);
-u.setSelectedCallback(function(){return null==p.adaptiveColors});u=c.actions.put("automaticAdaptiveColors",new Action("automatic",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.adaptiveColors="auto";p.model.execute(v)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return"auto"==p.adaptiveColors});u=c.actions.put("simpleAdaptiveColors",new Action("simple",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.adaptiveColors="simple";p.model.execute(v)}));
-u.setToggleAction(!0);u.setSelectedCallback(function(){return"simple"==p.adaptiveColors});u=c.actions.put("noAdaptiveColors",new Action("none",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.adaptiveColors="none";p.model.execute(v)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return"none"==p.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors",
-"noAdaptiveColors"],z)})));isLocalStorage&&(u=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());urlParams.splash=mxSettings.getShowStartScreen()?"1":"0";mxSettings.save()}),u.setToggleAction(!0),u.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var y=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});y.setToggleAction(!0);y.setSelectedCallback(function(){return y.isEnabled()&&
-c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var v=p.getSelectionCells(),z=[],N=0;N<v.length;N++)p.getModel().isVertex(v[N])&&z.push(v[N]);0<z.length&&(v=new EditGeometryDialog(c,z),c.showDialog(v.container,200,270,!0,!0),v.init())},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+M");c.actions.addAction("copyStyle",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var v=p.getSelectionCell(),z=p.getCellStyle(v,!1);c.copiedStyle={};var N=[],J=[],K;for(K in z)N.push(z[K]),
-J.push(K);p.copyCellStyles([v],J,N,c.copiedStyle,c.copiedStyle,null,null,null,!0)}},null,null,Editor.altKey+"+C");c.actions.addAction("pasteStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&null!=c.copiedStyle&&p.pasteCellStyles(p.includeDescendants(p.getSelectionCells()),c.copiedStyle,c.copiedStyle,!0)},null,null,Editor.altKey+"+V");c.actions.put("exportSvg",new Action("formatSvg...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",
-mxUtils.bind(this,function(v,z,N,J,K,m,t,D,M,L,O,P,U,V){v=parseInt(v);c.lastExportSvgEditable=K;!isNaN(v)&&0<v&&c.exportSvg(v/100,z,N,J,K,m,t,!D,M,L,P,U,V)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action("formatPng...",function(){g("png",c.lastExportPngEditable,function(v,z,N,J,K){c.lastExportPngEditable=K})}));c.actions.put("exportJpg",new Action("formatJpg...",function(){g("jpeg")}));c.actions.put("exportWebp",new Action("formatWebp...",function(){g("webp")}));u=c.actions.addAction("copyAsImage",
-mxUtils.bind(this,function(){var v=mxUtils.sortCells(p.model.getTopmostCells(p.getSelectionCells())),z=mxUtils.getXml(0==v.length?c.editor.getGraphXml():p.encodeCells(v));c.copyImage(v,z)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+X");u.visible=Editor.enableNativeClipboard&&c.editor.isExportToCanvas();u=c.actions.addAction("copyAsSvg",mxUtils.bind(this,function(){var v=mxUtils.sortCells(p.model.getTopmostCells(p.getSelectionCells())),z=mxUtils.getXml(0==v.length?c.editor.getGraphXml():p.encodeCells(v));
-c.copySvg(v,z)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+"+Editor.shiftKey+"+X");u.visible=Editor.enableNativeClipboard&&c.editor.isExportToCanvas();u=c.actions.put("shadowVisible",new Action("shadow",function(){p.setShadowVisible(!p.shadowVisible)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return p.shadowVisible});c.actions.put("about",new Action("v"+EditorUi.VERSION,function(v,z){c.isOwnGDriveDomain()&&mxEvent.isShiftDown(z)&&("1"==urlParams.test?(EditorUi.debug("Debug output disabled"),
-urlParams.test="0"):(urlParams.test="1",EditorUi.debug("Debug output enabled")))}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("downloadDesktop...",function(){c.openLink("https://get.diagrams.net/")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},
-mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||navigator.standalone?c.openLink("https://app.diagrams.net/shortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?c.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});u=c.actions.addAction("tags",mxUtils.bind(this,
-function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");u.setToggleAction(!0);
-u.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModel||null==Editor.gptUrl||c.isOffline()||EditorUi.isElectronApp||(u=c.actions.addAction("chatWindowTitle",mxUtils.bind(this,function(){null==this.chatWindow?(this.chatWindow=new ChatWindow(c,220,document.body.offsetHeight-380,250,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("chat"))})),
-this.chatWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("chat"))):this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),u.setToggleAction(!0),u.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));u=c.actions.addAction("findReplace",mxUtils.bind(this,function(v,z){c.showSearchWindow(p.isEnabled()&&(null==z||!mxEvent.isShiftDown(z)))}),
-null,null,Editor.ctrlKey+"+F");u=new Action("exportVsdx",function(){var v=null==c.pages||1>=c.pages.length;if(v)c.exportVisio();else{var z=document.createElement("div");z.style.whiteSpace="nowrap";var N=document.createElement("h3");mxUtils.write(N,mxResources.get("formatVsdx"));N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";z.appendChild(N);var J=c.addCheckbox(z,mxResources.get("allPages"),!v,v);J.style.marginBottom="16px";v=new CustomDialog(c,z,mxUtils.bind(this,
-function(){c.exportVisio(!J.checked)}),null,mxResources.get("export"));c.showDialog(v.container,300,130,!0,!0)}});u.getTitle=function(){return mxResources.get("formatVsdx")+" (beta)..."};c.actions.put("exportVsdx",u);isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginRight="8px";v.checked=mxSettings.getShowStartScreen();v.defaultChecked=v.checked;if(Editor.isSettingsEnabled()&&
-("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var z=document.createElement("span");z.style.display="flex";z.style.alignItems="center";z.style.cssFloat="right";z.style.cursor="pointer";z.style.userSelect="none";z.style.marginTop="-3px";z.appendChild(v);mxUtils.write(z,mxResources.get("showStartScreen"));mxEvent.addListener(z,"click",function(J){mxEvent.getSource(J)!=v&&(v.checked=!v.checked)});header=z}z=[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),
-function(){try{localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(J){c.handleError(J)}})}]];if(!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS){var N=c.actions.get("plugins");null==N||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||z.push([mxResources.get("plugins"),N.funct])}EditorUi.isElectronApp||z.push([mxResources.get("link"),function(J,K){if(0<K.value.length)try{var m=
-JSON.parse(K.value),t=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(m)),D=new EmbedDialog(c,t);c.showDialog(D.container,450,240,!0);D.init()}catch(M){c.handleError(M)}else c.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=c.getServiceName()&&"1"!=urlParams.embed&&z.push([mxResources.get("preferences"),function(){c.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),
-function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(J){c.handleError(J)}})}]])}]);c.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,z,v.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=v.parentNode&&(mxSettings.setShowStartScreen(v.checked),mxSettings.save())})});
-(mxClient.IS_CHROMEAPP||isLocalStorage)&&this.put("language",new Menu(mxUtils.bind(this,function(v,z){var N=mxLanguage;null==urlParams.lang&&isLocalStorage&&(N=mxSettings.settings.language);var J=mxUtils.bind(this,function(m){var t=""==m?mxResources.get("automatic"):mxLanguageMap[m],D=null;""!=t&&(D=v.addItem(t,null,mxUtils.bind(this,function(){c.setAndPersistLanguage(m)}),z),(m==N||""==m&&null==N)&&v.addCheckmark(D,Editor.checkmarkImage));return D});J("");v.addSeparator(z);for(var K in mxLanguageMap)J(K)})));
-c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){c.showCustomLayoutDialog(JSON.stringify(c.customLayoutConfig,null,2))});c.actions.put("adaptiveColors",new Action("adaptiveColors",function(v){null==c.adaptiveColorsWindow&&(c.adaptiveColorsWindow=new AdaptiveColorsWindow(c,document.body.offsetWidth-520,80,200,160));c.adaptiveColorsWindow.window.setVisible(!0)}));
-u=this.get("viewZoom");var H=u.funct;u.funct=mxUtils.bind(this,function(v,z){H.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(v,["-","outline","fullscreen"],z)});u=this.get("layout");var E=u.funct;u.funct=function(v,z){E.apply(this,arguments);v.addItem(mxResources.get("orgChart"),null,function(){var N=null,J=20,K=20,m=function(){"undefined"!==typeof mxOrgChartLayout&&null!=N&&c.tryAndHandle(mxUtils.bind(this,function(){var V=c.editor.graph,X=new mxOrgChartLayout(V,
-N,J,K),W=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&(W=V.getSelectionCell());X.execute(W)}))},t=document.createElement("div"),D=document.createElement("div");D.style.marginTop="6px";D.style.display="inline-block";D.style.width="180px";mxUtils.write(D,mxResources.get("orgChartType")+": ");t.appendChild(D);var M=document.createElement("select");M.style.width="160px";M.style.boxSizing="border-box";D=[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 L=0;L<D.length;L++){var O=document.createElement("option");mxUtils.write(O,D[L]);O.value=L;2==L&&O.setAttribute("selected","selected");M.appendChild(O)}mxEvent.addListener(M,"change",function(){N=M.value});t.appendChild(M);D=document.createElement("div");D.style.marginTop="6px";D.style.display="inline-block";D.style.width="180px";mxUtils.write(D,
-mxResources.get("parentChildSpacing")+": ");t.appendChild(D);var P=document.createElement("input");P.type="number";P.value=J;P.style.width="160px";P.style.boxSizing="border-box";t.appendChild(P);mxEvent.addListener(P,"change",function(){J=P.value});D=document.createElement("div");D.style.marginTop="6px";D.style.display="inline-block";D.style.width="180px";mxUtils.write(D,mxResources.get("siblingSpacing")+": ");t.appendChild(D);var U=document.createElement("input");U.type="number";U.value=K;U.style.width=
-"160px";U.style.boxSizing="border-box";t.appendChild(U);mxEvent.addListener(U,"change",function(){K=U.value});D=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(M.value),parentChildSpacing:parseInt(P.value),siblingSpacing:parseInt(U.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(V,null,2))});D.className="geBtn";t=new CustomDialog(c,t,function(){null==N&&(N=2);c.loadOrgChartLayouts(m)},null,null,null,D);c.showDialog(t.container,
-355,140,!0,!0)},z,null,q());v.addSeparator(z);v.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var N=new mxParallelEdgeLayout(p);N.checkOverlap=!0;c.prompt(mxResources.get("spacing"),N.spacing,mxUtils.bind(this,function(J){c.tryAndHandle(mxUtils.bind(this,function(){N.spacing=J;c.executeLayout(function(){N.execute(p.getDefaultParent(),p.isSelectionEmpty()?null:p.getSelectionCells())},!1)}))}))}))}),z);v.addSeparator(z);c.menus.addMenuItem(v,
-"runLayout",z,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(v,z){if(mxClient.IS_CHROMEAPP||!c.isOffline()&&!navigator.standalone){var N=v.addItem(mxResources.get("search")+":",null,null,z,null,null,!1);N.style.cursor="default";var J=document.createElement("input");J.setAttribute("type","text");J.setAttribute("size","25");J.style.borderWidth="1px";J.style.marginLeft="8px";mxEvent.addListener(J,"keydown",mxUtils.bind(this,function(K){var m=mxUtils.trim(J.value);
-13==K.keyCode&&0<m.length?(this.editorUi.searchHelp(m),J.value="",window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==K.keyCode&&(J.value="")}));N.firstChild.nextSibling.appendChild(J);mxEvent.addGestureListeners(J,function(K){document.activeElement!=J&&J.focus();mxEvent.consume(K)},function(K){mxEvent.consume(K)},function(K){mxEvent.consume(K)});window.setTimeout(function(){J.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.drawio.com")}),
-c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),c.actions.put("desktopZoomIn",new Action("zoomIn",function(){c.desktopZoomIn()})),c.actions.put("desktopZoomOut",new Action("zoomOut",function(){c.desktopZoomOut()})),c.actions.put("desktopResetZoom",new Action("actualSize",function(){c.desktopResetZoom()})),this.addMenuItems(v,"- keyboardShortcuts quickStart website support -".split(" "),z),"1"!=urlParams.disableUpdate&&this.addMenuItems(v,["check4Updates","-"],z),this.addMenuItems(v,
-"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),z)):this.addMenuItems(v,"- keyboardShortcuts quickStart downloadDesktop support - about".split(" "),z)}else this.addMenuItems(v,["keyboardShortcuts","-","about"],z);"1"==urlParams.test&&(v.addSeparator(z),this.addSubmenu("testDevelop",v,z))})));c.actions.addAction("languageCode...",function(){var v=new FilenameDialog(c,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(z){null!=z&&(Graph.diagramLanguage=
-0<z.length?z:null,Graph.translateDiagram=!0,p.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");c.showDialog(v.container,340,80,!0,!0);v.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,["languageCode","-"],z);z=v.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;p.refresh()},z);Graph.translateDiagram||v.addCheckmark(z,Editor.checkmarkImage)})));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("testChecksum=Checksum");mxResources.parse("testCheckPages=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");
-mxResources.parse("testPerformance=Performance");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var v=p.cloneCells(p.getSelectionCells()),z=p.getBoundingBoxFromGeometry(v,!0);v=p.moveCells(v,-z.x,-z.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+z.width+", "+z.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(p.encodeCells(v)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function v(t){return null==
-t||null==t.boundingBox||!isNaN(t.boundingBox.x)&&!isNaN(t.boundingBox.y)&&!isNaN(t.boundingBox.width)&&!isNaN(t.boundingBox.height)}var z=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),N=p.view.translate,J=p.view.scale;p.insertVertex(p.getDefaultParent(),null,"",z.x/J-N.x,z.y/J-N.y,z.width/J,z.height/J,"fillColor=none;strokeColor=red;");var K=0,m=0;p.view.states.visit(function(t,D){t=!0;v(D.shape)||(console.log("invalid shape",D.cell.id,D.shape),t=!1);v(D.text)||(console.log("invalid text",
-D.cell.id,D.text),t=!1);t||K++;m++});console.log("states checked",m,"invalid",K)}));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(z){if(0<z.length)try{var N=function(D){function M(aa){if(null==Z[aa]){if(Z[aa]=!0,null!=P[aa]){for(;0<P[aa].length;){var fa=P[aa].pop();M(fa)}delete P[aa]}}else mxLog.debug(L+": Visited: "+aa)}var L=D.parentNode.id,
-O=D.childNodes;D={};for(var P={},U=null,V={},X=0;X<O.length;X++){var W=O[X];if(null!=W.id&&0<W.id.length)if(null==D[W.id]){D[W.id]=W.id;var Y=W.getAttribute("parent");null==Y?null!=U?mxLog.debug(L+": Multiple roots: "+W.id):U=W.id:(null==P[Y]&&(P[Y]=[]),P[Y].push(W.id))}else V[W.id]=W.id}O=Object.keys(V);0<O.length?(O=L+": "+O.length+" Duplicates: "+O.join(", "),mxLog.debug(O+" (see console)")):mxLog.debug(L+": Checked");var Z={};null==U?mxLog.debug(L+": No root"):(M(U),Object.keys(Z).length!=Object.keys(D).length&&
-(mxLog.debug(L+": Invalid tree: (see console)"),console.log(L+": Invalid tree",P)))};"<"!=z.charAt(0)&&(z=Graph.decompress(z),mxLog.debug("See console for uncompressed XML"),console.log("xml",z));var J=mxUtils.parseXml(z),K=c.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=K&&0<K.length)try{var m=c.getHashValueForPages(K);mxLog.debug("Checksum: ",m)}catch(D){mxLog.debug("Error: ",D.message)}else mxLog.debug("No pages found for checksum");var t=J.getElementsByTagName("root");for(z=0;z<t.length;z++)N(t[z]);
-mxLog.show()}catch(D){c.handleError(D),null!=window.console&&console.error(D)}});c.showDialog(v.container,620,460,!0,!0);v.init()}));var F=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var v=new TextareaDialog(c,"Diff/Sync:","",function(z){var N=c.getCurrentFile();if(0<z.length&&null!=N)try{var J=JSON.parse(z);N.patch([J],null,!0,!0);c.hideDialog()}catch(K){c.handleError(K)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(z,N){F=c.getPagesForXml(c.getFileData(!0));
-v.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(F)}],["Diff",function(z,N){try{v.textarea.value=JSON.stringify(c.diffPages(F,c.pages),null,2)}catch(J){c.handleError(J)}}]]);null==F?(F=c.getPagesForXml(c.getFileData(!0)),v.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(F)):v.textarea.value=JSON.stringify(c.diffPages(F,c.pages),null,2);c.showDialog(v.container,620,460,!0,!0);v.init()}else c.alert("No pages")}));
-c.actions.addAction("testChecksum",mxUtils.bind(this,function(){var v=c.getCurrentFile();null!=c.pages&&null!=v?c.spinner.spin(document.body,mxResources.get("loading"))&&v.getLatestVersion(function(z){c.spinner.stop();var N=c.getHashValueForPages(c.pages),J=v.getCurrentRevisionId(),K=c.getHashValueForPages(z.getShadowPages()),m=z.getDescriptorChecksum(z.getDescriptor()),t=z.getCurrentRevisionId();console.log("Local File",[v],"modified",v.isModified(),"checksum",N);console.log("Remote File",[z],"rev",
-t==J,"desc",m==K,"checksum",K);c.alert("Checksums "+(K==N?"match":"no not match"))},function(z){console.log("Error getLatestVersion",z);c.handleError(z)}):console.log("Checksum: no file or pages")}));c.actions.addAction("testCheckPages",mxUtils.bind(this,function(){var v=c.getCurrentFile();console.log("editorUi",c,"file",v);if(null!=v&&v.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(v.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(v.theirPages));console.log("diff ownPages/theirPages",
-c.diffPages(v.ownPages,v.theirPages));var z=v.getShadowPages();null!=z&&(console.log("Checksum shadowPages",c.getHashValueForPages(z)),console.log("diff shadowPages/ownPages",c.diffPages(z,v.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(v.ownPages,z)),console.log("diff theirPages/shadowPages",c.diffPages(v.theirPages,z)));null!=v.sync&&null!=v.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(v.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(v.ownPages,
-v.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(v.theirPages,v.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(v.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(v.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(v.theirPages,c.pages)))}null!=v&&console.log("Shadow pages",[c.getXmlForPages(v.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));
-c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var v=c.getCurrentFile();null!=v&&v.isRealtime()&&null!=v.shadowPages&&(console.log("patching actualPages to shadowPages",v.patch([c.diffPages(v.shadowPages,c.pages)])),v.ownPages=c.clonePages(c.pages),v.theirPages=c.clonePages(c.pages),v.shadowPages=c.clonePages(c.pages),null!=v.sync&&(v.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){p.model.beginUpdate();
-try{var v=p.model.cells,z=0,N=[],J=[],K;for(K in v){var m=v[K],t=p.getCurrentCellStyle(m)[mxConstants.STYLE_IMAGE];null!=t&&"data:"==t.substring(0,5)&&(null==N[t]&&(N[t]=(N[t]||0)+1,z++),J.push(m))}p.setCellStyles(mxConstants.STYLE_IMAGE,null,J);console.log("Removed",z,"image(s) from",J.length,"cell(s): ",[J,N])}finally{p.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,p.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var v=
-new mxImageExport,z=p.getGraphBounds(),N=p.view.scale,J=mxUtils.createXmlDocument(),K=J.createElement("output");J.appendChild(K);J=new mxXmlCanvas2D(K);J.translate(Math.floor((1-z.x)/N),Math.floor((1-z.y)/N));J.scale(1/N);var m=0,t=J.save;J.save=function(){m++;t.apply(this,arguments)};var D=J.restore;J.restore=function(){m--;D.apply(this,arguments)};var M=v.drawShape;v.drawShape=function(L){mxLog.debug("entering shape",L,m);M.apply(this,arguments);mxLog.debug("leaving shape",L,m)};v.drawState(p.getView().getState(p.model.root),
-J);mxLog.show();mxLog.debug(mxUtils.getXml(K));mxLog.debug("stateCounter",m)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var d=null,k=null,l=null,n=null,x=null,A=null,B=null,I=null;c.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=d?(p.view.revalidate=d,d=null):(d=p.view.revalidate,p.view.revalidate=function(){var v=Date.now(),z=d.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",
-[this],"time",Date.now()-v+" ms","args",arguments);return z});null!=k?(c.selectPage=k,k=null):(k=c.selectPage,c.selectPage=function(){var v=Date.now(),z=k.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-v+" ms","args",arguments);return z});null!=l?(c.diffPages=l,l=null):(l=c.diffPages,c.diffPages=function(){var v=Date.now(),z=l.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-v+" ms","args",arguments);
-return z});null!=n?(c.patchPages=n,n=null):(n=c.patchPages,c.patchPages=function(){var v=Date.now(),z=n.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-v+" ms","args",arguments);return z});null!=x?(c.clonePages=x,x=null):(x=c.clonePages,c.clonePages=function(){var v=Date.now(),z=x.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-v+" ms","args",arguments);return z});null!=B?(c.getHashValueForPages=B,
-B=null):(B=c.getHashValueForPages,c.getHashValueForPages=function(){var v=Date.now(),z=B.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-v+" ms","args",arguments);return z});null!=I?(c.resolveCrossReferences=I,I=null):(I=c.resolveCrossReferences,c.resolveCrossReferences=function(){var v=Date.now(),z=I.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-v+" ms","args",arguments);return z});
-null!=A?(c.getFileData=A,A=null):(A=c.getFileData,c.getFileData=function(){var v=Date.now(),z=A.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",[this],"time",Date.now()-v+" ms","args",arguments);return z});EditorUi.debug("[Performance]",null!=d?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),
-z);var N=v.addItem(mxResources.get("testPerformance"),null,function(){c.actions.get("testPerformance").funct()},z);null!=d&&v.addCheckmark(N,Editor.checkmarkImage);this.addMenuItems(v,["-","testShowConsole"],z)})))}c.actions.put("shapes",new Action("moreShapes...",function(v){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("shape...",function(v){p.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=q;c.isOffline()||("1"!=urlParams.embed&&(c.actions.put("embedNotion",new Action("notion...",function(){var v=document.createElement("div");v.style.position="absolute";v.style.bottom="30px";
-v.style.textAlign="center";v.style.width="100%";v.style.left="0px";var z=document.createElement("a");z.setAttribute("href","javascript:void(0);");z.setAttribute("target","_blank");z.style.cursor="pointer";mxUtils.write(z,mxResources.get("getNotionChromeExtension"));v.appendChild(z);mxUtils.setPrefixedStyle(z.style,"transition","all 1s ease");mxUtils.setOpacity(z,0);window.setTimeout(function(){mxUtils.setOpacity(z,100)},300);mxEvent.addListener(z,"click",function(N){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
-mxEvent.consume(N)});c.getPublicUrl(c.getCurrentFile(),function(N){c.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",v,N,c.getCurrentFile(),function(J,K,m,t,D,M,L,O,P,U,V,X){L=["border=0"];P&&L.push("tags=%7B%7D");J=new EmbedDialog(c,c.createLink(J,K,!0,t,D,M,"public"==U?N:null,null,L,null,m,null,X));c.showDialog(J.container,450,240,!0,!0);J.init()},null,!0)})})),c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")})),
-c.actions.put("embedHtml",new Action("html...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",v,function(z,N,J,K,m,t,D,M,L,O,P,U){c.createHtml(z,N,J,K,m,t,D,M,L,O,P,mxUtils.bind(this,function(V,X){var W=new EmbedDialog(c,"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+V+"\n"+X+"\n",null,null,function(){try{var Y=window.open();if(null!=Y&&null!=Y.document){var Z=Y.document;"CSS1Compat"===document.compatMode&&
-Z.writeln("<!DOCTYPE html>");Z.writeln("<html>");Z.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Z.writeln("<body>");Z.writeln(V);var aa=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;aa&&Z.writeln(X);Z.writeln("</body>");Z.writeln("</html>");Z.close();if(!aa){var fa=Y.document.createElement("div");fa.marginLeft="26px";fa.marginTop="26px";mxUtils.write(fa,mxResources.get("updatingDocument"));var ea=Y.document.createElement("img");
-ea.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ea.style.marginLeft="6px";fa.appendChild(ea);Y.document.body.insertBefore(fa,Y.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(X)[1];Z.body.appendChild(ca);fa.parentNode.removeChild(fa)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})}catch(ca){c.handleError(ca)}});
-c.showDialog(W.container,450,240,!0,!0);W.init()}),U)})})})),c.actions.put("liveImage",new Action("Live image...",function(){var v=c.getCurrentFile();null!=v&&c.getPublicUrl(v,function(z){null!=z?(z=new EmbedDialog(c,'<img src="'+(v.constructor!=DriveFile?z:"https://drive.google.com/uc?id="+v.getId())+'"/>'),c.showDialog(z.container,450,240,!0,!0),z.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})})),c.actions.put("embedImage",new Action("image...",function(){c.showEmbedImageDialog(function(v,
-z,N,J,K,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(v,z,N,J,K,m,function(t){c.spinner.stop();t=new EmbedDialog(c,t);c.showDialog(t.container,450,240,!0,!0);t.init()},function(t){c.spinner.stop();c.handleError(t)})},mxResources.get("image"),mxResources.get("retina"),c.editor.isExportToCanvas())})),c.actions.put("embedSvg",new Action("formatSvg...",function(){c.showEmbedImageDialog(function(v,z,N,J,K,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(v,
-z,N,J,K,m,function(t){c.spinner.stop();t=new EmbedDialog(c,t);c.showDialog(t.container,450,240,!0,!0);t.init()},function(t){c.spinner.stop();c.handleError(t)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")})),c.actions.put("embedIframe",new Action("iframe...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){var z=p.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,z.height/p.view.scale))+
-2,null,null,null,v,c.getCurrentFile(),function(N,J,K,m,t,D,M,L,O,P,U,V){var X=[];O&&X.push("tags=%7B%7D");N=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+M+";height:"+L+';" src="'+c.createLink(N,J,!0,m,t,D,"public"==P?v:null,null,X,null,K,U,V)+'"'+(U?' allowtransparency="true"':"")+"></iframe>");c.showDialog(N.container,450,240,!0,!0);N.init()},!0,!0)})})));c.actions.put("publishLink",new Action("link...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showPublishLinkDialog(null,
-null,null,null,null,null,v,c.getCurrentFile(),function(z,N,J,K,m,t,D,M,L,O,P,U){D=[];K&&L&&D.push("tags=%7B%7D");z=new EmbedDialog(c,c.createLink(z,N,!0,K,m,t,"public"==O?v:null,null,D,null,J,null,U));c.showDialog(z.container,450,240,!0,!0);z.init()},null,!0)})},null,null,null,!c.isOffline()));if(isLocalStorage||mxClient.IS_CHROMEAPP)u=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),u.setToggleAction(!0),u.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&
+Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(k){return this.editorUi.createHelpIcon(k)};Menus.prototype.addLinkToItem=function(k,c){null!=k&&k.firstChild.nextSibling.appendChild(this.createHelpLink(c))};
+Menus.prototype.removeCustomFont=function(k,c){for(var p=0;p<this.customFonts.length;p++)if(this.customFonts[p].name==k&&this.customFonts[p].url==c){this.customFonts.splice(p,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(k,c){for(var p=0;p<this.customFonts.length;p++)if(this.customFonts[p].name==k&&this.customFonts[p].url==c)return!0;for(p=0;p<this.defaultFonts.length;p++){var q=this.defaultFonts[p];
+if("string"!==typeof q&&q.fontFamily==k&&q.fontUrl==c||"string"===typeof q&&q==k&&null==c)return!0}return!1};Menus.prototype.addCustomFont=function(k,c){null==k||this.containsFont(k,c)||(this.customFonts.push({name:k,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var f=Menus.prototype.init;Menus.prototype.init=function(){function k(v,y,L){c.editor.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),
+"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(J,K,m,t,C,N,M,O,Q,T,V,X,W){var Y=parseInt(J);!isNaN(Y)&&0<Y&&(c.exportImage(Y/100,K&&"png"==v,m,t,C&&"png"==v,M,!O,Q,v,V,null,X,W),null!=L&&L(J,K,m,t,C,N,M,O,Q,T,V,X,W))}),!0,y,v,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(J,K,m,t,C){c.downloadFile(K&&"png"==v?"xmlpng":v,null,null,J,null,null,m,t,C)}),!1,!0)}f.apply(this,arguments);
+var c=this.editorUi,p=c.editor.graph,q=mxUtils.bind(p,p.isEnabled);"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(v){return"file"!=v}));c.actions.addAction("new...",function(){var v=c.isOffline(),y=new NewDialog(c,v,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(y.container,v?350:620,v?70:460,!0,!0,function(L){null!=c.sidebar&&c.sidebar.hideTooltip();L&&null==c.getCurrentFile()&&c.showSplash()});y.init()});if(Editor.enableChatGpt&&
+c.isExternalDataComms()&&"draw.io"==c.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var u=c.actions.put("generate",new Action("generate",function(){null!=c.chatWindow?c.chatWindow.window.setVisible(!c.chatWindow.window.isVisible()):c.openGenerateDialog("")}));u.isEnabled=function(){return q()};u.setToggleAction(!0);u.setSelectedCallback(function(){return null!=c.chatWindow&&c.chatWindow.window.isVisible()})}c.actions.put("insertTemplate",new Action("template...",
+function(){c.openTemplateDialog()})).isEnabled=q;u=c.actions.addAction("shareCursor",function(){c.setShareCursorPosition(!c.isShareCursorPosition())});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isShareCursorPosition()});u=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isShowRemoteCursors()});u=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});
+u.setToggleAction(!0);u.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.POINTS});u=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});u=c.actions.addAction("millimeters",function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});
+u=c.actions.addAction("meters",function(){c.editor.graph.view.setUnit(mxConstants.METERS)});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(v,y){this.addMenuItems(v,["points","inches","millimeters","meters"],y);"min"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme||c.menus.addMenuItems(v,["-","pageScale"],y)})));u=c.actions.addAction("pageTabs",function(){c.setTabContainerVisible(!c.isTabContainerVisible(),
+!0)});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isTabContainerVisible()});u=c.actions.addAction("ruler",function(){c.setRulerVisible(!c.isRulerVisible())});u.setEnabled(Editor.canvasSupported&&9!=document.documentMode);u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isRulerVisible()});u=c.actions.addAction("fullscreen",function(){if("1"==urlParams.embedInline)c.setInlineFullscreen(!Editor.inlineFullscreen);else{var v=mxUtils.isAncestorNode(document.body,c.container)?
+c.container:c.editor.graph.container;null!=v&&(null==document.fullscreenElement?(document.body.requestFullscreen(),v.classList.add("geFullscreen")):(document.exitFullscreen(),v.classList.remove("geFullscreen")))}});u.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;u.setToggleAction(!0);u.setSelectedCallback(function(){return"1"==urlParams.embedInline?Editor.inlineFullscreen:null!=document.fullscreenElement});u=c.actions.put("lightMode",
+new Action("light",function(v){c.setAndPersistDarkMode(!1)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return!c.isAutoDarkMode(!0)&&!Editor.isDarkMode()});u=c.actions.put("darkMode",new Action("dark",function(v){c.setAndPersistDarkMode(!0)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return!c.isAutoDarkMode(!0)&&Editor.isDarkMode()});u=c.actions.put("autoMode",new Action("automatic",function(v){c.setAndPersistDarkMode("auto")}));u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isAutoDarkMode(!0)});
+c.actions.addAction("properties...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){v=new FilePropertiesDialog(c,v);c.showDialog(v.container,340,200,!0,!0);v.init()})}).isEnabled=q;window.mxFreehand&&(u=c.actions.put("insertFreehand",new Action("freehand...",function(){p.isEnabled()&&(null==c.freehandWindow&&(c.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,180,126,!0)),p.freehand.isDrawing()?p.freehand.stopDrawing():p.freehand.startDrawing(),c.freehandWindow.window.setVisible(p.freehand.isDrawing()))},
+null,null,"X")),u.isEnabled=function(){return q()},u.setToggleAction(!0),u.setSelectedCallback(function(){return null!=c.freehandWindow&&c.freehandWindow.window.isVisible()}));c.actions.put("exportXml",new Action("formatXml...",function(){var v=document.createElement("div");v.style.whiteSpace="nowrap";var y=null==c.pages||1>=c.pages.length,L=document.createElement("h3");mxUtils.write(L,mxResources.get("formatXml"));L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(L);
+var J=c.addCheckbox(v,mxResources.get("selectionOnly"),!1,p.isSelectionEmpty()),K=c.addCheckbox(v,mxResources.get("compressed"),Editor.defaultCompressed),m=c.addCheckbox(v,mxResources.get("allPages"),!y,y);m.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?m.setAttribute("disabled","disabled"):m.removeAttribute("disabled")});v=new CustomDialog(c,v,mxUtils.bind(this,function(){c.downloadFile("xml",!K.checked,null,!J.checked,y||!m.checked)}),null,mxResources.get("export"));
+c.showDialog(v.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action("url...",function(){c.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(v,y,L,J,K,m,t,C,N,M,O,Q,T){t=[];J&&N&&t.push("tags=%7B%7D");v=new EmbedDialog(c,c.createLink(v,y,T,J,K,m,null,!0,t,null,L,null,Q));c.showDialog(v.container,450,270,!0,!0);v.init()},null,!0,!0)}));c.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){c.getPublicUrl(c.getCurrentFile(),
+function(v){c.showHtmlDialog(mxResources.get("export"),null,v,function(y,L,J,K,m,t,C,N,M,O,Q,T){c.createHtml(y,L,J,K,m,t,C,N,M,O,Q,mxUtils.bind(this,function(V,X){var W=c.getBaseFilename(C);V='\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(W)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+X+"\n</body>\n</html>";c.saveData(W+(".drawio"==W.substring(W.lenth-7)?"":".drawio")+".html","html",
+V,"text/html")}),T)})})}));c.actions.put("exportPdf",new Action("formatPdf...",function(){c.showPrintDialog(mxResources.get("formatPdf"),EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport?mxUtils.bind(this,function(v,y){v=null!=c.pages?c.pages.length:1;var L=null==c.pages||1>=c.pages.length,J=c.getPageIndex(c.currentPage);J=null!=J?J+1:1;c.downloadFile("pdf",null,null,!y.selection,L||!y.allPages&&y.pagesFrom==J&&y.pagesTo==J,!y.crop,y.transparent,y.scale,null,y.grid,y.includeCopy,y.allPages||
+y.pagesFrom==J&&y.pagesTo==J?null:{from:Math.max(0,Math.min(v-1,y.pagesFrom-1)),to:Math.max(0,Math.min(v-1,y.pagesTo-1))},y.border,y.fit,y.sheetsAcross,y.sheetsDown,y.shadows)}):null,mxResources.get("export"))}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function v(){null!=y&&y.removeDraft();c.fileLoaded(new LocalFile(c,c.emptyDiagramXml))}var y=c.getCurrentFile();null!=y&&y.isModified()?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),
+mxResources.get("discardChanges")):v()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){if(1==p.getSelectionCount()){var v=p.getSelectionCell(),y=p.view.getState(v);null!=y&&null!=y.shape&&null!=y.shape.stencil&&(v=new EditShapeDialog(c,v,mxResources.get("editShape")),c.showDialog(v.container,640,480,!0,!1,null,null,null,new mxRectangle(0,0,300,200)),v.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&
+c.getRevisions(mxUtils.bind(this,function(v,y){c.spinner.stop();v=new RevisionDialog(c,v,y);c.showDialog(v.container,640,480,!0,!0);v.init()}),mxUtils.bind(this,function(v){c.handleError(null!=v?v:mxResources.get("notAvailable"))})):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");u=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==
+DrawioFile.SYNC)},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");"none"==DrawioFile.SYNC&&(u.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))},null,null,null,navigator.onLine&&"1"!=
+urlParams.stealth&&"1"!=urlParams.lockdown);"undefined"!==typeof MathJax&&(u=c.actions.addAction("mathematicalTypesetting",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.mathEnabled=!c.isMathEnabled();p.model.execute(v)}),u.setToggleAction(!0),u.setSelectedCallback(function(){return c.isMathEnabled()}),u.isEnabled=q);u=c.actions.put("defaultAdaptiveColors",new Action("defaultAdaptiveColors",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.adaptiveColors=
+"default";p.model.execute(v)}));u.getTitle=function(){return mxResources.get("default")+" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())+")"};u.setToggleAction(!0);u.setSelectedCallback(function(){return null==p.adaptiveColors});u=c.actions.put("automaticAdaptiveColors",new Action("automatic",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.adaptiveColors="auto";p.model.execute(v)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return"auto"==p.adaptiveColors});
+u=c.actions.put("simpleAdaptiveColors",new Action("simple",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.adaptiveColors="simple";p.model.execute(v)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return"simple"==p.adaptiveColors});u=c.actions.put("noAdaptiveColors",new Action("none",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.adaptiveColors="none";p.model.execute(v)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return"none"==
+p.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(v,y){this.addMenuItems(v,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],y)})));isLocalStorage&&(u=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());urlParams.splash=mxSettings.getShowStartScreen()?"1":"0";mxSettings.save()}),u.setToggleAction(!0),u.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));
+var z=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});z.setToggleAction(!0);z.setSelectedCallback(function(){return z.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var v=p.getSelectionCells(),y=[],L=0;L<v.length;L++)p.getModel().isVertex(v[L])&&y.push(v[L]);0<y.length&&(v=new EditGeometryDialog(c,y),c.showDialog(v.container,200,270,!0,!0),v.init())},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+M");c.actions.addAction("copyStyle",
+function(){if(p.isEnabled()&&1==p.getSelectionCount()){var v=p.getSelectionCell(),y=p.getCellStyle(v,!1);c.copiedStyle={};var L=[],J=[],K;for(K in y)L.push(y[K]),J.push(K);p.copyCellStyles([v],J,L,c.copiedStyle,c.copiedStyle,null,null,null,!0)}},null,null,Editor.altKey+"+C");c.actions.addAction("pasteStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&null!=c.copiedStyle&&p.pasteCellStyles(p.includeDescendants(p.getSelectionCells()),c.copiedStyle,c.copiedStyle,!0)},null,null,Editor.altKey+"+V");
+c.actions.put("exportSvg",new Action("formatSvg...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(v,y,L,J,K,m,t,C,N,M,O,Q,T,V){v=parseInt(v);c.lastExportSvgEditable=K;!isNaN(v)&&0<v&&c.exportSvg(v/100,y,L,J,K,m,t,!C,N,M,Q,T,V)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action("formatPng...",function(){k("png",c.lastExportPngEditable,function(v,y,L,J,K){c.lastExportPngEditable=
+K})}));c.actions.put("exportJpg",new Action("formatJpg...",function(){k("jpeg")}));c.actions.put("exportWebp",new Action("formatWebp...",function(){k("webp")}));u=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var v=mxUtils.sortCells(p.model.getTopmostCells(p.getSelectionCells())),y=mxUtils.getXml(0==v.length?c.editor.getGraphXml():p.encodeCells(v));c.copyImage(v,y)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+X");u.visible=Editor.enableNativeClipboard&&c.editor.isExportToCanvas();
+u=c.actions.addAction("copyAsSvg",mxUtils.bind(this,function(){var v=mxUtils.sortCells(p.model.getTopmostCells(p.getSelectionCells())),y=mxUtils.getXml(0==v.length?c.editor.getGraphXml():p.encodeCells(v));c.copySvg(v,y)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+"+Editor.shiftKey+"+X");u.visible=Editor.enableNativeClipboard&&c.editor.isExportToCanvas();u=c.actions.put("shadowVisible",new Action("shadow",function(){p.setShadowVisible(!p.shadowVisible)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return p.shadowVisible});
+c.actions.put("about",new Action("v"+EditorUi.VERSION,function(v,y){c.isOwnGDriveDomain()&&mxEvent.isShiftDown(y)&&("1"==urlParams.test?(EditorUi.debug("Debug output disabled"),urlParams.test="0"):(urlParams.test="1",EditorUi.debug("Debug output enabled")))}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("downloadDesktop...",
+function(){c.openLink("https://get.diagrams.net/")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||navigator.standalone?c.openLink("https://app.diagrams.net/shortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?
+c.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});u=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),
+c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");u.setToggleAction(!0);u.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModels||null==Editor.gptUrl||c.isOffline()||EditorUi.isElectronApp||(u=c.actions.addAction("generate",mxUtils.bind(this,function(){null==c.chatWindow?c.openGenerateDialog():c.chatWindow.window.setVisible(!c.chatWindow.window.isVisible())})),
+u.setToggleAction(!0),u.setSelectedCallback(mxUtils.bind(this,function(){return null!=c.chatWindow&&c.chatWindow.window.isVisible()})));u=c.actions.addAction("findReplace",mxUtils.bind(this,function(v,y){c.showSearchWindow(p.isEnabled()&&(null==y||!mxEvent.isShiftDown(y)))}),null,null,Editor.ctrlKey+"+F");u=new Action("exportVsdx",function(){var v=null==c.pages||1>=c.pages.length;if(v)c.exportVisio();else{var y=document.createElement("div");y.style.whiteSpace="nowrap";var L=document.createElement("h3");
+mxUtils.write(L,mxResources.get("formatVsdx"));L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(L);var J=c.addCheckbox(y,mxResources.get("allPages"),!v,v);J.style.marginBottom="16px";v=new CustomDialog(c,y,mxUtils.bind(this,function(){c.exportVisio(!J.checked)}),null,mxResources.get("export"));c.showDialog(v.container,300,130,!0,!0)}});u.getTitle=function(){return mxResources.get("formatVsdx")+" (beta)..."};c.actions.put("exportVsdx",u);isLocalStorage&&
+null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginRight="8px";v.checked=mxSettings.getShowStartScreen();v.defaultChecked=v.checked;if(Editor.isSettingsEnabled()&&("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var y=document.createElement("span");y.style.display="flex";y.style.alignItems="center";y.style.cssFloat="right";y.style.cursor=
+"pointer";y.style.userSelect="none";y.style.marginTop="-3px";y.appendChild(v);mxUtils.write(y,mxResources.get("showStartScreen"));mxEvent.addListener(y,"click",function(J){mxEvent.getSource(J)!=v&&(v.checked=!v.checked)});header=y}y=[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(J){c.handleError(J)}})}]];if(!c.isOfflineApp()&&isLocalStorage&&
+c.mode!=App.MODE_ATLAS){var L=c.actions.get("plugins");null==L||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||y.push([mxResources.get("plugins"),L.funct])}EditorUi.isElectronApp||y.push([mxResources.get("link"),function(J,K){if(0<K.value.length)try{var m=JSON.parse(K.value),t=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(m)),C=new EmbedDialog(c,t);c.showDialog(C.container,450,240,!0);C.init()}catch(N){c.handleError(N)}else c.handleError({message:mxResources.get("invalidInput")})}]);
+"atlassian"!=c.getServiceName()&&"1"!=urlParams.embed&&y.push([mxResources.get("preferences"),function(){c.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(J){c.handleError(J)}})}]])}]);c.showLocalStorageDialog(mxResources.get("configuration")+
+":",Editor.configurationKey,y,v.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=v.parentNode&&(mxSettings.setShowStartScreen(v.checked),mxSettings.save())})});(mxClient.IS_CHROMEAPP||isLocalStorage)&&this.put("language",new Menu(mxUtils.bind(this,function(v,y){var L=mxLanguage;null==urlParams.lang&&isLocalStorage&&(L=mxSettings.settings.language);var J=mxUtils.bind(this,function(m){var t=""==m?mxResources.get("automatic"):mxLanguageMap[m],C=null;""!=t&&(C=v.addItem(t,
+null,mxUtils.bind(this,function(){c.setAndPersistLanguage(m)}),y),(m==L||""==m&&null==L)&&v.addCheckmark(C,Editor.checkmarkImage));return C});J("");v.addSeparator(y);for(var K in mxLanguageMap)J(K)})));c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){c.showCustomLayoutDialog(JSON.stringify(c.customLayoutConfig,null,2))});c.actions.put("adaptiveColors",
+new Action("adaptiveColors",function(v){null==c.adaptiveColorsWindow&&(c.adaptiveColorsWindow=new AdaptiveColorsWindow(c,document.body.offsetWidth-520,80,200,160));c.adaptiveColorsWindow.window.setVisible(!0)}));u=this.get("viewZoom");var G=u.funct;u.funct=mxUtils.bind(this,function(v,y){G.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(v,["-","outline","fullscreen"],y)});u=this.get("layout");var E=u.funct;u.funct=function(v,y){E.apply(this,arguments);
+v.addItem(mxResources.get("orgChart"),null,function(){var L=null,J=20,K=20,m=function(){"undefined"!==typeof mxOrgChartLayout&&null!=L&&c.tryAndHandle(mxUtils.bind(this,function(){var V=c.editor.graph,X=new mxOrgChartLayout(V,L,J,K),W=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&(W=V.getSelectionCell());X.execute(W)}))},t=document.createElement("div"),C=document.createElement("div");C.style.marginTop="6px";C.style.display="inline-block";C.style.width="180px";mxUtils.write(C,
+mxResources.get("orgChartType")+": ");t.appendChild(C);var N=document.createElement("select");N.style.width="160px";N.style.boxSizing="border-box";C=[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 M=0;M<C.length;M++){var O=document.createElement("option");mxUtils.write(O,C[M]);O.value=M;2==M&&O.setAttribute("selected",
+"selected");N.appendChild(O)}mxEvent.addListener(N,"change",function(){L=N.value});t.appendChild(N);C=document.createElement("div");C.style.marginTop="6px";C.style.display="inline-block";C.style.width="180px";mxUtils.write(C,mxResources.get("parentChildSpacing")+": ");t.appendChild(C);var Q=document.createElement("input");Q.type="number";Q.value=J;Q.style.width="160px";Q.style.boxSizing="border-box";t.appendChild(Q);mxEvent.addListener(Q,"change",function(){J=Q.value});C=document.createElement("div");
+C.style.marginTop="6px";C.style.display="inline-block";C.style.width="180px";mxUtils.write(C,mxResources.get("siblingSpacing")+": ");t.appendChild(C);var T=document.createElement("input");T.type="number";T.value=K;T.style.width="160px";T.style.boxSizing="border-box";t.appendChild(T);mxEvent.addListener(T,"change",function(){K=T.value});C=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(N.value),parentChildSpacing:parseInt(Q.value),
+siblingSpacing:parseInt(T.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(V,null,2))});C.className="geBtn";t=new CustomDialog(c,t,function(){null==L&&(L=2);c.loadOrgChartLayouts(m)},null,null,null,C);c.showDialog(t.container,355,140,!0,!0)},y,null,q());v.addSeparator(y);v.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var L=new mxParallelEdgeLayout(p);L.checkOverlap=!0;c.prompt(mxResources.get("spacing"),L.spacing,
+mxUtils.bind(this,function(J){c.tryAndHandle(mxUtils.bind(this,function(){L.spacing=J;c.executeLayout(function(){L.execute(p.getDefaultParent(),p.isSelectionEmpty()?null:p.getSelectionCells())},!1)}))}))}))}),y);v.addSeparator(y);c.menus.addMenuItem(v,"runLayout",y,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(v,y){if(mxClient.IS_CHROMEAPP||!c.isOffline()&&!navigator.standalone){var L=v.addItem(mxResources.get("search")+":",null,null,y,null,null,!1);
+L.style.cursor="default";var J=document.createElement("input");J.setAttribute("type","text");J.setAttribute("size","25");J.style.borderWidth="1px";J.style.marginLeft="8px";mxEvent.addListener(J,"keydown",mxUtils.bind(this,function(K){var m=mxUtils.trim(J.value);13==K.keyCode&&0<m.length?(this.editorUi.searchHelp(m),J.value="",window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==K.keyCode&&(J.value="")}));L.firstChild.nextSibling.appendChild(J);mxEvent.addGestureListeners(J,
+function(K){document.activeElement!=J&&J.focus();mxEvent.consume(K)},function(K){mxEvent.consume(K)},function(K){mxEvent.consume(K)});window.setTimeout(function(){J.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.drawio.com")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),c.actions.put("desktopZoomIn",new Action("zoomIn",function(){c.desktopZoomIn()})),c.actions.put("desktopZoomOut",new Action("zoomOut",function(){c.desktopZoomOut()})),
+c.actions.put("desktopResetZoom",new Action("actualSize",function(){c.desktopResetZoom()})),this.addMenuItems(v,"- keyboardShortcuts quickStart website support -".split(" "),y),"1"!=urlParams.disableUpdate&&this.addMenuItems(v,["check4Updates","-"],y),this.addMenuItems(v,"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),y)):this.addMenuItems(v,"- keyboardShortcuts quickStart downloadDesktop support - about".split(" "),y)}else this.addMenuItems(v,["keyboardShortcuts",
+"-","about"],y);"1"==urlParams.test&&(v.addSeparator(y),this.addSubmenu("testDevelop",v,y))})));c.actions.addAction("languageCode...",function(){var v=new FilenameDialog(c,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(y){null!=y&&(Graph.diagramLanguage=0<y.length?y:null,Graph.translateDiagram=!0,p.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");c.showDialog(v.container,340,80,!0,!0);v.init()});this.put("diagramLanguage",
+new Menu(mxUtils.bind(this,function(v,y){this.addMenuItems(v,["languageCode","-"],y);y=v.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;p.refresh()},y);Graph.translateDiagram||v.addCheckmark(y,Editor.checkmarkImage)})));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("testChecksum=Checksum");mxResources.parse("testCheckPages=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");mxResources.parse("testPerformance=Performance");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var v=p.cloneCells(p.getSelectionCells()),
+y=p.getBoundingBoxFromGeometry(v,!0);v=p.moveCells(v,-y.x,-y.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+y.width+", "+y.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(p.encodeCells(v)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function v(t){return null==t||null==t.boundingBox||!isNaN(t.boundingBox.x)&&!isNaN(t.boundingBox.y)&&!isNaN(t.boundingBox.width)&&!isNaN(t.boundingBox.height)}var y=p.isSelectionEmpty()?p.getGraphBounds():
+p.getBoundingBox(p.getSelectionCells()),L=p.view.translate,J=p.view.scale;p.insertVertex(p.getDefaultParent(),null,"",y.x/J-L.x,y.y/J-L.y,y.width/J,y.height/J,"fillColor=none;strokeColor=red;");var K=0,m=0;p.view.states.visit(function(t,C){t=!0;v(C.shape)||(console.log("invalid shape",C.cell.id,C.shape),t=!1);v(C.text)||(console.log("invalid text",C.cell.id,C.text),t=!1);t||K++;m++});console.log("states checked",m,"invalid",K)}));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(y){if(0<y.length)try{var L=function(C){function N(aa){if(null==Z[aa]){if(Z[aa]=!0,null!=Q[aa]){for(;0<Q[aa].length;){var ja=Q[aa].pop();N(ja)}delete Q[aa]}}else mxLog.debug(M+": Visited: "+aa)}var M=C.parentNode.id,O=C.childNodes;C={};for(var Q={},T=null,V={},X=0;X<O.length;X++){var W=O[X];if(null!=W.id&&0<W.id.length)if(null==C[W.id]){C[W.id]=W.id;var Y=
+W.getAttribute("parent");null==Y?null!=T?mxLog.debug(M+": Multiple roots: "+W.id):T=W.id:(null==Q[Y]&&(Q[Y]=[]),Q[Y].push(W.id))}else V[W.id]=W.id}O=Object.keys(V);0<O.length?(O=M+": "+O.length+" Duplicates: "+O.join(", "),mxLog.debug(O+" (see console)")):mxLog.debug(M+": Checked");var Z={};null==T?mxLog.debug(M+": No root"):(N(T),Object.keys(Z).length!=Object.keys(C).length&&(mxLog.debug(M+": Invalid tree: (see console)"),console.log(M+": Invalid tree",Q)))};"<"!=y.charAt(0)&&(y=Graph.decompress(y),
+mxLog.debug("See console for uncompressed XML"),console.log("xml",y));var J=mxUtils.parseXml(y),K=c.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=K&&0<K.length)try{var m=c.getHashValueForPages(K);mxLog.debug("Checksum: ",m)}catch(C){mxLog.debug("Error: ",C.message)}else mxLog.debug("No pages found for checksum");var t=J.getElementsByTagName("root");for(y=0;y<t.length;y++)L(t[y]);mxLog.show()}catch(C){c.handleError(C),null!=window.console&&console.error(C)}});c.showDialog(v.container,
+620,460,!0,!0);v.init()}));var F=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var v=new TextareaDialog(c,"Diff/Sync:","",function(y){var L=c.getCurrentFile();if(0<y.length&&null!=L)try{var J=JSON.parse(y);L.patch([J],null,!0,!0);c.hideDialog()}catch(K){c.handleError(K)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(y,L){F=c.getPagesForXml(c.getFileData(!0));v.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+
+c.getHashValueForPages(F)}],["Diff",function(y,L){try{v.textarea.value=JSON.stringify(c.diffPages(F,c.pages),null,2)}catch(J){c.handleError(J)}}]]);null==F?(F=c.getPagesForXml(c.getFileData(!0)),v.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(F)):v.textarea.value=JSON.stringify(c.diffPages(F,c.pages),null,2);c.showDialog(v.container,620,460,!0,!0);v.init()}else c.alert("No pages")}));c.actions.addAction("testChecksum",mxUtils.bind(this,function(){var v=
+c.getCurrentFile();null!=c.pages&&null!=v?c.spinner.spin(document.body,mxResources.get("loading"))&&v.getLatestVersion(function(y){c.spinner.stop();var L=c.getHashValueForPages(c.pages),J=v.getCurrentRevisionId(),K=c.getHashValueForPages(y.getShadowPages()),m=y.getDescriptorChecksum(y.getDescriptor()),t=y.getCurrentRevisionId();console.log("Local File",[v],"modified",v.isModified(),"checksum",L);console.log("Remote File",[y],"rev",t==J,"desc",m==K,"checksum",K);c.alert("Checksums "+(K==L?"match":
+"no not match"))},function(y){console.log("Error getLatestVersion",y);c.handleError(y)}):console.log("Checksum: no file or pages")}));c.actions.addAction("testCheckPages",mxUtils.bind(this,function(){var v=c.getCurrentFile();console.log("editorUi",c,"file",v);if(null!=v&&v.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(v.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(v.theirPages));console.log("diff ownPages/theirPages",c.diffPages(v.ownPages,v.theirPages));
+var y=v.getShadowPages();null!=y&&(console.log("Checksum shadowPages",c.getHashValueForPages(y)),console.log("diff shadowPages/ownPages",c.diffPages(y,v.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(v.ownPages,y)),console.log("diff theirPages/shadowPages",c.diffPages(v.theirPages,y)));null!=v.sync&&null!=v.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(v.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(v.ownPages,v.sync.snapshot)),console.log("diff theirPages/snapshot",
+c.diffPages(v.theirPages,v.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(v.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(v.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(v.theirPages,c.pages)))}null!=v&&console.log("Shadow pages",[c.getXmlForPages(v.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",
+mxUtils.bind(this,function(){console.log("editorUi",c);var v=c.getCurrentFile();null!=v&&v.isRealtime()&&null!=v.shadowPages&&(console.log("patching actualPages to shadowPages",v.patch([c.diffPages(v.shadowPages,c.pages)])),v.ownPages=c.clonePages(c.pages),v.theirPages=c.clonePages(c.pages),v.shadowPages=c.clonePages(c.pages),null!=v.sync&&(v.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){p.model.beginUpdate();try{var v=p.model.cells,y=0,L=
+[],J=[],K;for(K in v){var m=v[K],t=p.getCurrentCellStyle(m)[mxConstants.STYLE_IMAGE];null!=t&&"data:"==t.substring(0,5)&&(null==L[t]&&(L[t]=(L[t]||0)+1,y++),J.push(m))}p.setCellStyles(mxConstants.STYLE_IMAGE,null,J);console.log("Removed",y,"image(s) from",J.length,"cell(s): ",[J,L])}finally{p.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,p.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var v=new mxImageExport,
+y=p.getGraphBounds(),L=p.view.scale,J=mxUtils.createXmlDocument(),K=J.createElement("output");J.appendChild(K);J=new mxXmlCanvas2D(K);J.translate(Math.floor((1-y.x)/L),Math.floor((1-y.y)/L));J.scale(1/L);var m=0,t=J.save;J.save=function(){m++;t.apply(this,arguments)};var C=J.restore;J.restore=function(){m--;C.apply(this,arguments)};var N=v.drawShape;v.drawShape=function(M){mxLog.debug("entering shape",M,m);N.apply(this,arguments);mxLog.debug("leaving shape",M,m)};v.drawState(p.getView().getState(p.model.root),
+J);mxLog.show();mxLog.debug(mxUtils.getXml(K));mxLog.debug("stateCounter",m)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var d=null,g=null,l=null,n=null,x=null,A=null,B=null,I=null;c.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=d?(p.view.revalidate=d,d=null):(d=p.view.revalidate,p.view.revalidate=function(){var v=Date.now(),y=d.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",
+[this],"time",Date.now()-v+" ms","args",arguments);return y});null!=g?(c.selectPage=g,g=null):(g=c.selectPage,c.selectPage=function(){var v=Date.now(),y=g.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-v+" ms","args",arguments);return y});null!=l?(c.diffPages=l,l=null):(l=c.diffPages,c.diffPages=function(){var v=Date.now(),y=l.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-v+" ms","args",arguments);
+return y});null!=n?(c.patchPages=n,n=null):(n=c.patchPages,c.patchPages=function(){var v=Date.now(),y=n.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-v+" ms","args",arguments);return y});null!=x?(c.clonePages=x,x=null):(x=c.clonePages,c.clonePages=function(){var v=Date.now(),y=x.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-v+" ms","args",arguments);return y});null!=B?(c.getHashValueForPages=B,
+B=null):(B=c.getHashValueForPages,c.getHashValueForPages=function(){var v=Date.now(),y=B.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-v+" ms","args",arguments);return y});null!=I?(c.resolveCrossReferences=I,I=null):(I=c.resolveCrossReferences,c.resolveCrossReferences=function(){var v=Date.now(),y=I.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-v+" ms","args",arguments);return y});
+null!=A?(c.getFileData=A,A=null):(A=c.getFileData,c.getFileData=function(){var v=Date.now(),y=A.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",[this],"time",Date.now()-v+" ms","args",arguments);return y});EditorUi.debug("[Performance]",null!=d?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(v,y){this.addMenuItems(v,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),
+y);var L=v.addItem(mxResources.get("testPerformance"),null,function(){c.actions.get("testPerformance").funct()},y);null!=d&&v.addCheckmark(L,Editor.checkmarkImage);this.addMenuItems(v,["-","testShowConsole"],y)})))}c.actions.put("shapes",new Action("moreShapes...",function(v){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("shape...",function(v){p.isEnabled()&&(v=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),v.vertex=!0,v=new EditShapeDialog(c,v,mxResources.get("editShape")),c.showDialog(v.container,640,480,!0,!1,null,null,null,new mxRectangle(0,0,300,200)),v.init())})).isEnabled=q;c.isOffline()||("1"!=urlParams.embed&&(c.actions.put("embedNotion",new Action("notion...",function(){var v=document.createElement("div");v.style.position=
+"absolute";v.style.bottom="30px";v.style.textAlign="center";v.style.width="100%";v.style.left="0px";var y=document.createElement("a");y.setAttribute("href","javascript:void(0);");y.setAttribute("target","_blank");y.style.cursor="pointer";mxUtils.write(y,mxResources.get("getNotionChromeExtension"));v.appendChild(y);mxUtils.setPrefixedStyle(y.style,"transition","all 1s ease");mxUtils.setOpacity(y,0);window.setTimeout(function(){mxUtils.setOpacity(y,100)},300);mxEvent.addListener(y,"click",function(L){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
+mxEvent.consume(L)});c.getPublicUrl(c.getCurrentFile(),function(L){c.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",v,L,c.getCurrentFile(),function(J,K,m,t,C,N,M,O,Q,T,V,X){M=["border=0"];Q&&M.push("tags=%7B%7D");J=new EmbedDialog(c,c.createLink(J,K,!0,t,C,N,"public"==T?L:null,null,M,null,m,null,X));c.showDialog(J.container,450,240,!0,!0);J.init()},null,!0)})})),c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")})),
+c.actions.put("embedHtml",new Action("html...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",v,function(y,L,J,K,m,t,C,N,M,O,Q,T){c.createHtml(y,L,J,K,m,t,C,N,M,O,Q,mxUtils.bind(this,function(V,X){var W=new EmbedDialog(c,"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+V+"\n"+X+"\n",null,null,function(){try{var Y=window.open();if(null!=Y&&null!=Y.document){var Z=Y.document;"CSS1Compat"===document.compatMode&&
+Z.writeln("<!DOCTYPE html>");Z.writeln("<html>");Z.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Z.writeln("<body>");Z.writeln(V);var aa=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;aa&&Z.writeln(X);Z.writeln("</body>");Z.writeln("</html>");Z.close();if(!aa){var ja=Y.document.createElement("div");ja.marginLeft="26px";ja.marginTop="26px";mxUtils.write(ja,mxResources.get("updatingDocument"));var ea=Y.document.createElement("img");
+ea.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ea.style.marginLeft="6px";ja.appendChild(ea);Y.document.body.insertBefore(ja,Y.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(X)[1];Z.body.appendChild(ca);ja.parentNode.removeChild(ja)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})}catch(ca){c.handleError(ca)}});
+c.showDialog(W.container,450,240,!0,!0);W.init()}),T)})})})),c.actions.put("liveImage",new Action("Live image...",function(){var v=c.getCurrentFile();null!=v&&c.getPublicUrl(v,function(y){null!=y?(y=new EmbedDialog(c,'<img src="'+(v.constructor!=DriveFile?y:"https://drive.google.com/uc?id="+v.getId())+'"/>'),c.showDialog(y.container,450,240,!0,!0),y.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})})),c.actions.put("embedImage",new Action("image...",function(){c.showEmbedImageDialog(function(v,
+y,L,J,K,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(v,y,L,J,K,m,function(t){c.spinner.stop();t=new EmbedDialog(c,t);c.showDialog(t.container,450,240,!0,!0);t.init()},function(t){c.spinner.stop();c.handleError(t)})},mxResources.get("image"),mxResources.get("retina"),c.editor.isExportToCanvas())})),c.actions.put("embedSvg",new Action("formatSvg...",function(){c.showEmbedImageDialog(function(v,y,L,J,K,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(v,
+y,L,J,K,m,function(t){c.spinner.stop();t=new EmbedDialog(c,t);c.showDialog(t.container,450,240,!0,!0);t.init()},function(t){c.spinner.stop();c.handleError(t)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")})),c.actions.put("embedIframe",new Action("iframe...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){var y=p.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,y.height/p.view.scale))+
+2,null,null,null,v,c.getCurrentFile(),function(L,J,K,m,t,C,N,M,O,Q,T,V){var X=[];O&&X.push("tags=%7B%7D");L=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+N+";height:"+M+';" src="'+c.createLink(L,J,!0,m,t,C,"public"==Q?v:null,null,X,null,K,T,V)+'"'+(T?' allowtransparency="true"':"")+"></iframe>");c.showDialog(L.container,450,240,!0,!0);L.init()},!0,!0)})})));c.actions.put("publishLink",new Action("link...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showPublishLinkDialog(null,
+null,null,null,null,null,v,c.getCurrentFile(),function(y,L,J,K,m,t,C,N,M,O,Q,T){C=[];K&&M&&C.push("tags=%7B%7D");y=new EmbedDialog(c,c.createLink(y,L,!0,K,m,t,"public"==O?v:null,null,C,null,J,null,T));c.showDialog(y.container,450,240,!0,!0);y.init()},null,!0)})},null,null,null,!c.isOffline()));if(isLocalStorage||mxClient.IS_CHROMEAPP)u=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),u.setToggleAction(!0),u.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&
c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&(u=c.actions.addAction("highContrast",function(){c.setAndPersistHighContrast(!c.isHighContrast())}),u.setToggleAction(!0),u.setSelectedCallback(function(){return c.isHighContrast()}));u=c.actions.addAction("search",function(){if(null!=c.sidebar){var v=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",
!v);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!v,mxSettings.save())}});u.label=mxResources.get("searchShapes");u.setToggleAction(!0);u.setSelectedCallback(function(){return null!=c.sidebar&&c.sidebar.isEntryVisible("search")});c.actions.get("clearDefaultStyle").funct=function(v){p.isEnabled()&&(c.clearDefaultStyle(),Editor.sketchMode&&c.setSketchMode(!1))};"1"==urlParams.embed&&(c.actions.get("saveAs").setEnabled(!1),c.actions.get("save").funct=function(v){p.isEditing()&&p.stopEditing();
-var z="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var N=c.createLoadMessage("save");N.xml=z;!0!==v||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(N.exit=!0);z=JSON.stringify(N)}(window.opener||window.parent).postMessage(z,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.clearStatus());v=c.getCurrentFile();null==v||v.constructor==EmbedFile||v.constructor==LocalFile&&
-null==v.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var v=function(){c.editor.modified=!1;var z="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):
-"";(window.opener||window.parent).postMessage(z,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(v,z){c.editor.isExportToCanvas()?(this.addMenuItems(v,["exportPng"],z),Editor.jpgSupported&&this.addMenuItems(v,["exportJpg"],z),Editor.webpSupported&&this.addMenuItems(v,["exportWebp"],z)):c.isOffline()||
-mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPng","exportJpg"],z);this.addMenuItems(v,["exportSvg","-"],z);c.isOffline()||c.printPdfExport?this.addMenuItems(v,["exportPdf"],z):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPdf"],z);!c.vsdxExportEnabled()||mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(v,["exportVsdx"],z);this.addMenuItems(v,["-","exportHtml","exportXml","exportUrl"],z);c.isOffline()||(v.addSeparator(z),
-this.addMenuItem(v,"export",z).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||c.isOffline()||this.addMenuItems(v,["publishLink"],z);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||c.isOffline()||(v.addSeparator(z),c.menus.addSubmenu("embed",v,z))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(v,z){function N(m){m.pickFile(function(t){c.spinner.spin(document.body,
-mxResources.get("loading"))&&m.getFile(t,function(D){var M="data:image/"==D.getData().substring(0,11)?K(D.getTitle()):"text/xml";/\.svg$/i.test(D.getTitle())&&!c.editor.isDataSvg(D.getData())&&(D.setData(Editor.createSvgDataUri(D.getData())),M="image/svg+xml");J(D.getData(),M,D.getTitle())},function(D){c.handleError(D,null!=D?mxResources.get("errorLoadingFile"):null)},m==c.drive)},!0)}var J=mxUtils.bind(this,function(m,t,D){var M=p.view,L=p.getGraphBounds(),O=p.snap(Math.ceil(Math.max(0,L.x/M.scale-
-M.translate.x)+4*p.gridSize)),P=p.snap(Math.ceil(Math.max(0,(L.y+L.height)/M.scale-M.translate.y)+4*p.gridSize));"data:image/"==m.substring(0,11)?c.loadImage(m,mxUtils.bind(this,function(U){var V=!0,X=mxUtils.bind(this,function(){c.resizeImage(U,m,mxUtils.bind(this,function(W,Y,Z){W=V?Math.min(1,Math.min(c.maxImageSize/Y,c.maxImageSize/Z)):1;c.importFile(m,t,O,P,Math.round(Y*W),Math.round(Z*W),D,function(aa){c.spinner.stop();p.setSelectionCells(aa);p.scrollCellToVisible(p.getSelectionCell())})}),
-V)});m.length>c.resampleThreshold?c.confirmImageResize(function(W){V=W;X()}):X()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(m,t,O,P,0,0,D,function(U){c.spinner.stop();p.setSelectionCells(U);p.scrollCellToVisible(p.getSelectionCell())})}),K=mxUtils.bind(this,function(m){var t="text/xml";/\.png$/i.test(m)?t="image/png":/\.jpe?g$/i.test(m)?t="image/jpg":/\.gif$/i.test(m)?t="image/gif":/\.pdf$/i.test(m)&&(t="application/pdf");return t});"undefined"!=
-typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){N(c.drive)},z):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){N(c.oneDrive)},z):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},z,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){N(c.dropbox)},z):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);v.addSeparator(z);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){N(c.gitHub)},z);c.isModeReady(App.MODE_GITLAB)&&v.addItem(mxResources.get("gitlab")+"...",null,function(){N(c.gitLab)},
-z);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){N(c.trello)},z):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);v.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},z);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},z);c.isOffline()||
-(v.addSeparator(z),v.addItem(mxResources.get("url")+"...",null,function(){var m=new FilenameDialog(c,"",mxResources.get("import"),function(t){if(null!=t&&0<t.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var D=/(\.png)($|\?)/i.test(t)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(t),function(M){J(M,D,t)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==D)}},mxResources.get("url"));c.showDialog(m.container,
-300,80,!0,!0);m.init()},z))}))).isEnabled=q;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(v,z){var N=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&(750>N&&this.addSubmenu("viewZoom",v,z,mxResources.get("zoom")),460>N&&c.isPageMenuVisible()&&this.addSubmenu("pages",v,z),320>N&&this.addSubmenu("insert",v,z),360>N&&"1"!=urlParams.embed&&"draw.io"==c.getServiceName()&&this.addSubmenu("share",v,z))})));this.put("appearance",
-new Menu(mxUtils.bind(this,function(v,z){if(c.isAutoDarkModeSupported()){var N=c.menus.addMenuItem(v,"autoMode",z);null!=N&&N.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}this.addMenuItems(v,["lightMode","darkMode","-"],z);N=c.menus.addMenuItem(v,"highContrast",z);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(N,"https://github.com/jgraph/drawio/issues/4296")})));c.actions.addAction("addToScratchpad",
-function(v){p.isSelectionEmpty()||null==c.addSelectionToScratchpad||c.addSelectionToScratchpad(v)});c.actions.addAction("accounts...",function(){c.toggleUserPanel();c.userPanel.style.right="10px";c.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(v,z){var N="1"==urlParams.sketch?"sketch":mxSettings.getUi(),J=v.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},z),K=v.addItem(mxResources.get("classic"),null,function(){c.setCurrentTheme("kennedy")},
-z),m=!1;if("kennedy"==N||"dark"==N)v.addCheckmark(K,Editor.checkmarkImage),m=!0;for(var t=0;t<Editor.themes.length;t++)mxUtils.bind(this,function(D){K=v.addItem(mxResources.get("min"==D?"minimal":D),null,function(){c.setCurrentTheme(D)},z);N==D&&(v.addCheckmark(K,Editor.checkmarkImage),m=!0);"simple"==D&&v.addSeparator(z)})(Editor.themes[t]);m||v.addCheckmark(J,Editor.checkmarkImage)})));u=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var v=this.editorUi.getCurrentFile();
-if(null!=v)if(v.constructor==LocalFile&&null!=v.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(N,J){v.invalidFileHandle=null;v.fileHandle=N;v.title=J.name;v.desc=J;c.save(J.name)}),null,c.createFileSystemOptions(v.getTitle()));else{var z=null!=v.getTitle()?v.getTitle():this.editorUi.defaultFilename;z=new FilenameDialog(this.editorUi,z,mxResources.get("rename"),mxUtils.bind(this,function(N){null!=N&&0<N.length&&null!=v&&N!=v.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&
-v.rename(N,mxUtils.bind(this,function(J){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(J){this.editorUi.handleError(J,null!=J?mxResources.get("errorRenamingFile"):null)}))}),v.constructor==DriveFile||v.constructor==StorageFile?mxResources.get("diagramName"):null,function(N){if(null!=N&&0<N.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,FilenameDialog.filenameHelpLink,null,null,c.editor.fileExtensions);this.editorUi.showDialog(z.container,
-340,100,!0,!0);z.init()}}));u.isEnabled=function(){return this.enabled&&q.apply(this,arguments)};u.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var v=c.getCurrentFile();if(null!=v){var z=c.getCopyFilename(v);v.constructor==DriveFile?(z=new SaveDialog(c,z,mxUtils.bind(this,function(N,J,K){c.hideDialog();v.copyFile(mxUtils.bind(this,function(m){v.move(K,mxUtils.bind(this,function(t){c.spinner.stop()}),mxUtils.bind(this,function(t){c.handleError(t)}))}),
-mxUtils.bind(this,function(m){c.handleError(m)}),N.value)}),null,null,null,null,null,null,[App.MODE_GOOGLE],mxResources.get("ok")),c.showDialog(z.container,420,150,!0,!1,mxUtils.bind(this,function(){c.hideDialog()})),z.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),z)}}));u=new Action("openFolder",function(v,z){v=c.getCurrentFile();null!=v&&c.openLink(v.getFolderUrl())});u.getTitle=function(){return mxResources.get("openIt",[mxResources.get("folder")])+"..."};c.actions.put("openFolder",
-u);c.actions.addAction("openFile...",mxUtils.bind(this,function(){var v=c.getCurrentFile();null!=v&&c.openLink(v.getFileUrl())}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var v=c.getCurrentFile();if(v.getMode()==App.MODE_GOOGLE||v.getMode()==App.MODE_ONEDRIVE){var z=new SaveDialog(c,"",mxUtils.bind(this,function(N,J,K){c.hideDialog();c.spinner.spin(document.body,mxResources.get("moving"))&&v.move(K,mxUtils.bind(this,function(m){c.spinner.stop()}),mxUtils.bind(this,function(m){c.handleError(m)}))}),
-null,null,null,null,null,v.getMode());c.showDialog(z.container,420,70,!0,!1,mxUtils.bind(this,function(){c.hideDialog()}));z.init()}}));this.put("publish",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,["publishLink","presentationMode"],z)})));EditorUi.isElectronApp||!c.isOwnGDriveDomain()||"draw.io"!=c.getServiceName()||navigator.standalone||c.actions.put("presentationMode",new Action("presentationMode...",function(){var v=null!=c.getCurrentFile()?c.getCurrentFile().getTitle():null;
-c.editor.editAsNew(c.getFileData(!0),v,!0,null!=c.currentPage?c.currentPage.getId():null)}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var v=c.getCurrentFile();null!=v&&v.share()}catch(z){c.handleError(z)}})).isEnabled=q;this.put("embed",new Menu(mxUtils.bind(this,function(v,z){var N=c.getCurrentFile();null==N||N.getMode()!=App.MODE_GOOGLE&&N.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(N.getTitle())||this.addMenuItems(v,["liveImage","-"],z);this.addMenuItems(v,
-["embedImage","embedSvg","-","embedHtml"],z);navigator.standalone||c.isOffline()||this.addMenuItems(v,["embedIframe"],z);this.addMenuItems(v,["-","microsoftOffice","-","embedNotion"],z)})));u=function(v){var z=mxResources.get(v)+"...";c.actions.put(v,new Action(z,function(N){if("fromText"==v||"formatSql"==v||"plantUml"==v||"mermaid"==v){var J=new ParseDialog(c,z,v);c.showDialog(J.container,640,420,!0,!1,null,null,null,new mxRectangle(0,0,440,280))}else J=new CreateGraphDialog(c,z,v),c.showDialog(J.container,
+var y="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var L=c.createLoadMessage("save");L.xml=y;!0!==v||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(L.exit=!0);y=JSON.stringify(L)}(window.opener||window.parent).postMessage(y,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.clearStatus());v=c.getCurrentFile();null==v||v.constructor==EmbedFile||v.constructor==LocalFile&&
+null==v.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var v=function(){c.editor.modified=!1;var y="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):
+"";(window.opener||window.parent).postMessage(y,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(v,y){c.editor.isExportToCanvas()?(this.addMenuItems(v,["exportPng"],y),Editor.jpgSupported&&this.addMenuItems(v,["exportJpg"],y),Editor.webpSupported&&this.addMenuItems(v,["exportWebp"],y)):c.isOffline()||
+mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPng","exportJpg"],y);this.addMenuItems(v,["exportSvg","-"],y);c.isOffline()||c.printPdfExport?this.addMenuItems(v,["exportPdf"],y):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPdf"],y);!c.vsdxExportEnabled()||mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(v,["exportVsdx"],y);this.addMenuItems(v,["-","exportHtml","exportXml","exportUrl"],y);c.isOffline()||(v.addSeparator(y),
+this.addMenuItem(v,"export",y).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||c.isOffline()||this.addMenuItems(v,["publishLink"],y);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||c.isOffline()||(v.addSeparator(y),c.menus.addSubmenu("embed",v,y))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(v,y){function L(m){m.pickFile(function(t){c.spinner.spin(document.body,
+mxResources.get("loading"))&&m.getFile(t,function(C){var N="data:image/"==C.getData().substring(0,11)?K(C.getTitle()):"text/xml";/\.svg$/i.test(C.getTitle())&&!c.editor.isDataSvg(C.getData())&&(C.setData(Editor.createSvgDataUri(C.getData())),N="image/svg+xml");J(C.getData(),N,C.getTitle())},function(C){c.handleError(C,null!=C?mxResources.get("errorLoadingFile"):null)},m==c.drive)},!0)}var J=mxUtils.bind(this,function(m,t,C){var N=p.view,M=p.getGraphBounds(),O=p.snap(Math.ceil(Math.max(0,M.x/N.scale-
+N.translate.x)+4*p.gridSize)),Q=p.snap(Math.ceil(Math.max(0,(M.y+M.height)/N.scale-N.translate.y)+4*p.gridSize));"data:image/"==m.substring(0,11)?c.loadImage(m,mxUtils.bind(this,function(T){var V=!0,X=mxUtils.bind(this,function(){c.resizeImage(T,m,mxUtils.bind(this,function(W,Y,Z){W=V?Math.min(1,Math.min(c.maxImageSize/Y,c.maxImageSize/Z)):1;c.importFile(m,t,O,Q,Math.round(Y*W),Math.round(Z*W),C,function(aa){c.spinner.stop();p.setSelectionCells(aa);p.scrollCellToVisible(p.getSelectionCell())})}),
+V)});m.length>c.resampleThreshold?c.confirmImageResize(function(W){V=W;X()}):X()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(m,t,O,Q,0,0,C,function(T){c.spinner.stop();p.setSelectionCells(T);p.scrollCellToVisible(p.getSelectionCell())})}),K=mxUtils.bind(this,function(m){var t="text/xml";/\.png$/i.test(m)?t="image/png":/\.jpe?g$/i.test(m)?t="image/jpg":/\.gif$/i.test(m)?t="image/gif":/\.pdf$/i.test(m)&&(t="application/pdf");return t});"undefined"!=
+typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){L(c.drive)},y):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){L(c.oneDrive)},y):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){L(c.dropbox)},y):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);v.addSeparator(y);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){L(c.gitHub)},y);c.isModeReady(App.MODE_GITLAB)&&v.addItem(mxResources.get("gitlab")+"...",null,function(){L(c.gitLab)},
+y);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){L(c.trello)},y):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);v.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},y);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},y);c.isOffline()||
+(v.addSeparator(y),v.addItem(mxResources.get("url")+"...",null,function(){var m=new FilenameDialog(c,"",mxResources.get("import"),function(t){if(null!=t&&0<t.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var C=/(\.png)($|\?)/i.test(t)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(t),function(N){J(N,C,t)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==C)}},mxResources.get("url"));c.showDialog(m.container,
+300,80,!0,!0);m.init()},y))}))).isEnabled=q;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(v,y){var L=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&(750>L&&this.addSubmenu("viewZoom",v,y,mxResources.get("zoom")),460>L&&c.isPageMenuVisible()&&this.addSubmenu("pages",v,y),320>L&&this.addSubmenu("insert",v,y),360>L&&"1"!=urlParams.embed&&"draw.io"==c.getServiceName()&&this.addSubmenu("share",v,y))})));this.put("appearance",
+new Menu(mxUtils.bind(this,function(v,y){if(c.isAutoDarkModeSupported()){var L=c.menus.addMenuItem(v,"autoMode",y);null!=L&&L.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}this.addMenuItems(v,["lightMode","darkMode","-"],y);L=c.menus.addMenuItem(v,"highContrast",y);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(L,"https://github.com/jgraph/drawio/issues/4296")})));c.actions.addAction("addToScratchpad",
+function(v){p.isSelectionEmpty()||null==c.addSelectionToScratchpad||c.addSelectionToScratchpad(v)});c.actions.addAction("accounts...",function(){c.toggleUserPanel();c.userPanel.style.right="10px";c.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(v,y){var L="1"==urlParams.sketch?"sketch":mxSettings.getUi(),J=v.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},y),K=v.addItem(mxResources.get("classic"),null,function(){c.setCurrentTheme("kennedy")},
+y),m=!1;if("kennedy"==L||"dark"==L)v.addCheckmark(K,Editor.checkmarkImage),m=!0;for(var t=0;t<Editor.themes.length;t++)mxUtils.bind(this,function(C){K=v.addItem(mxResources.get("min"==C?"minimal":C),null,function(){c.setCurrentTheme(C)},y);L==C&&(v.addCheckmark(K,Editor.checkmarkImage),m=!0);"simple"==C&&v.addSeparator(y)})(Editor.themes[t]);m||v.addCheckmark(J,Editor.checkmarkImage)})));u=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var v=this.editorUi.getCurrentFile();
+if(null!=v)if(v.constructor==LocalFile&&null!=v.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(L,J){v.invalidFileHandle=null;v.fileHandle=L;v.title=J.name;v.desc=J;c.save(J.name)}),null,c.createFileSystemOptions(v.getTitle()));else{var y=null!=v.getTitle()?v.getTitle():this.editorUi.defaultFilename;y=new FilenameDialog(this.editorUi,y,mxResources.get("rename"),mxUtils.bind(this,function(L){null!=L&&0<L.length&&null!=v&&L!=v.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&
+v.rename(L,mxUtils.bind(this,function(J){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(J){this.editorUi.handleError(J,null!=J?mxResources.get("errorRenamingFile"):null)}))}),v.constructor==DriveFile||v.constructor==StorageFile?mxResources.get("diagramName"):null,function(L){if(null!=L&&0<L.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,FilenameDialog.filenameHelpLink,null,null,c.editor.fileExtensions);this.editorUi.showDialog(y.container,
+340,100,!0,!0);y.init()}}));u.isEnabled=function(){return this.enabled&&q.apply(this,arguments)};u.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var v=c.getCurrentFile();if(null!=v){var y=c.getCopyFilename(v);v.constructor==DriveFile?(y=new SaveDialog(c,y,mxUtils.bind(this,function(L,J,K){c.hideDialog();v.copyFile(mxUtils.bind(this,function(m){v.move(K,mxUtils.bind(this,function(t){c.spinner.stop()}),mxUtils.bind(this,function(t){c.handleError(t)}))}),
+mxUtils.bind(this,function(m){c.handleError(m)}),L.value)}),null,null,null,null,null,null,[App.MODE_GOOGLE],mxResources.get("ok")),c.showDialog(y.container,420,150,!0,!1,mxUtils.bind(this,function(){c.hideDialog()})),y.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),y)}}));u=new Action("openFolder",function(v,y){v=c.getCurrentFile();null!=v&&c.openLink(v.getFolderUrl())});u.getTitle=function(){return mxResources.get("openIt",[mxResources.get("folder")])+"..."};c.actions.put("openFolder",
+u);c.actions.addAction("openFile...",mxUtils.bind(this,function(){var v=c.getCurrentFile();null!=v&&c.openLink(v.getFileUrl())}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var v=c.getCurrentFile();if(v.getMode()==App.MODE_GOOGLE||v.getMode()==App.MODE_ONEDRIVE){var y=new SaveDialog(c,"",mxUtils.bind(this,function(L,J,K){c.hideDialog();c.spinner.spin(document.body,mxResources.get("moving"))&&v.move(K,mxUtils.bind(this,function(m){c.spinner.stop()}),mxUtils.bind(this,function(m){c.handleError(m)}))}),
+null,null,null,null,null,v.getMode());c.showDialog(y.container,420,70,!0,!1,mxUtils.bind(this,function(){c.hideDialog()}));y.init()}}));this.put("publish",new Menu(mxUtils.bind(this,function(v,y){this.addMenuItems(v,["publishLink","presentationMode"],y)})));EditorUi.isElectronApp||!c.isOwnGDriveDomain()||"draw.io"!=c.getServiceName()||navigator.standalone||c.actions.put("presentationMode",new Action("presentationMode...",function(){var v=null!=c.getCurrentFile()?c.getCurrentFile().getTitle():null;
+c.editor.editAsNew(c.getFileData(!0),v,!0,null!=c.currentPage?c.currentPage.getId():null)}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var v=c.getCurrentFile();null!=v&&v.share()}catch(y){c.handleError(y)}})).isEnabled=q;this.put("embed",new Menu(mxUtils.bind(this,function(v,y){var L=c.getCurrentFile();null==L||L.getMode()!=App.MODE_GOOGLE&&L.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(L.getTitle())||this.addMenuItems(v,["liveImage","-"],y);this.addMenuItems(v,
+["embedImage","embedSvg","-","embedHtml"],y);navigator.standalone||c.isOffline()||this.addMenuItems(v,["embedIframe"],y);this.addMenuItems(v,["-","microsoftOffice","-","embedNotion"],y)})));u=function(v){var y=mxResources.get(v)+"...";c.actions.put(v,new Action(y,function(L){if("fromText"==v||"formatSql"==v||"plantUml"==v||"mermaid"==v){var J=new ParseDialog(c,y,v);c.showDialog(J.container,640,420,!0,!1,null,null,null,new mxRectangle(0,0,440,280))}else J=new CreateGraphDialog(c,y,v),c.showDialog(J.container,
620,420,!0,!1,function(K,m){if(m)return c.confirm(mxResources.get("areYouSure"),function(){c.hideDialog()}),!1;null!=J.graph&&(null!=J.graph.container.parentNode&&J.graph.container.parentNode.removeChild(J.graph.container),J.graph.destroy(),J.graph=null)});J.init()})).isEnabled=q};u("mermaid");u("horizontalFlow");u("verticalFlow");u("horizontalTree");u("verticalTree");u("radialTree");u("organic");u("circle");u("fromText");u("formatSql");("https://plant-aws.diagrams.net"!=window.PLANT_URL||EditorUi.enablePlantUml&&
-!c.isOffline())&&u("plantUml");var G=function(v){p.getModel().beginUpdate();try{v=p.addCell(v),p.fireEvent(new mxEventObject("cellsInserted","cells",[v])),p.model.isVertex(v)&&p.isAutoSizeCell(v)&&p.updateCellSize(v)}finally{p.getModel().endUpdate()}p.scrollCellToVisible(v);p.setSelectionCell(v);p.container.focus();p.editAfterInsert&&p.startEditing(v);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(p.view.getState(v))},0);return v},C=function(v,z,N,J,K){v=new mxCell(v,new mxGeometry(0,
-0,z,N),J);v.vertex=!0;null==K&&(K=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([v],!0)));v.geometry.x=K.x;v.geometry.y=K.y;return G(v)};c.actions.put("insertText",new Action("text",function(v){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&p.startEditingAtCell(C("Text",60,30,p.appendFontSize(Editor.defaultTextStyle,p.vertexFontSize),null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint()))},null,null,"A")).isEnabled=q;c.actions.put("insertRectangle",
-new Action("rectangle",function(v){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&C("",120,60,"whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint())},null,null,"D")).isEnabled=q;c.actions.put("insertNote",new Action("note",function(v){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&C("",140,160,"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;",
-null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint())},null,null,"S")).isEnabled=q;c.actions.put("insertEllipse",new Action("ellipse",function(v){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&C("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint())},null,null,"F")).isEnabled=q;c.actions.put("insertRhombus",new Action("rhombus",function(v){p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())&&C("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint())},null,null,"R")).isEnabled=q;c.actions.put("insertEdge",new Action("line",function(v){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var z=p.defaultEdgeLength;v=null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint();null==v&&(v=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([N],
-!0)));var N=new mxCell("",new mxGeometry(0,0,z,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");N.geometry.setTerminalPoint(v,!0);N.geometry.setTerminalPoint(new mxPoint(v.x+N.geometry.width,v.y),!1);N.geometry.points=[];N.geometry.relative=!0;N.edge=!0;G(N)}},null,null,"C")).isEnabled=q;u=c.actions.put("toggleShapes",new Action("shapes",function(){null!=c.sidebarWindow?c.sidebarWindow.window.setVisible(!c.sidebarWindow.window.isVisible()):c.toggleShapesPanel(!c.isShapesPanelVisible())},
-null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+K"));u.setToggleAction(!0);u.setSelectedCallback(mxUtils.bind(this,function(){return null!=c.sidebarWindow&&c.sidebarWindow.window.isVisible()||null==c.sidebarWindow&&0<c.hsplitPosition}));this.put("insert",new Menu(mxUtils.bind(this,function(v,z){"sketch"==Editor.currentTheme?(c.menus.addMenuItems(v,["toggleShapes"],z),c.menus.addSubmenu("table",v,z),v.addSeparator(z),c.menus.addMenuItems(v,["insertImage","insertLink","-"],z),c.insertTemplateEnabled&&
-!c.isOffline()&&c.menus.addMenuItems(v,["insertTemplate"],z),c.menus.addMenuItems(v,["generate"],z),window.isMermaidEnabled&&c.menus.addMenuItems(v,["mermaid"],z),v.addSeparator(z),c.menus.addSubmenu("insertAdvanced",v,z,mxResources.get("advanced")),c.menus.addSubmenu("layout",v,z)):(this.addMenuItems(v,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),z),window.isMermaidEnabled&&this.addMenuItems(v,
-["mermaid"],z),c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(v,["-","insertTemplate"],z),c.menus.addMenuItems(v,["generate","-"],z),"min"==uiTheme||"simple"==Editor.currentTheme?(this.addSubmenu("layout",v,z),this.addSubmenu("insertLayout",v,z,mxResources.get("insert")),v.addSeparator(z),this.addSubmenu("table",v,z)):this.addSubmenu("insertLayout",v,z,mxResources.get("layout")),this.addSubmenu("insertAdvanced",v,z,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,
-function(v,z){c.menus.addInsertTableCellItem(v,z)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),z)})));c.actions.put("csv",new Action(mxResources.get("csv")+"...",function(){p.popupMenuHandler.hideMenu();c.showImportCsvDialog()})).isEnabled=q;this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(v,z){var N=["fromText","plantUml","formatSql","csv"];EditorUi.enablePlantUml||
-N.splice(1,1);this.addMenuItems(v,N,z);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(v,["-","createShape","editDiagram"],z)})));this.put("openRecent",new Menu(function(v,z){var N=c.getRecent();if(null!=N){for(var J=0;J<N.length;J++)(function(K){var m=K.mode;m==App.MODE_GOOGLE?m="googleDrive":m==App.MODE_ONEDRIVE&&(m="oneDrive");v.addItem(K.title+" ("+mxResources.get(m)+")",null,function(){c.loadFile(K.id)},z)})(N[J]);v.addSeparator(z)}v.addItem(mxResources.get("reset"),
-null,function(){c.resetRecent()},z)}));this.put("openFrom",new Menu(function(v,z){null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},z):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},z):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},z):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);v.addSeparator(z);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},z);c.isModeReady(App.MODE_GITLAB)&&
-v.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},z);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},z):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);v.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},z);"1"!=
-urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},z);c.isOffline()||(v.addSeparator(z),v.addItem(mxResources.get("url")+"...",null,function(){var N=new FilenameDialog(c,"",mxResources.get("open"),function(J){null!=J&&0<J.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(J):window.geOpenWindow((mxClient.IS_CHROMEAPP?"https://app.diagrams.net/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(J)))},
-mxResources.get("url"));c.showDialog(N.container,300,80,!0,!0);N.init()},z))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(v,z){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},z):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));
-c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},z):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},z):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);v.addSeparator(z);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},z);c.isModeReady(App.MODE_GITLAB)&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},z);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,
-null,null,null,App.MODE_TRELLO)},z):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);v.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},z);"1"==
-urlParams.confLib&&v.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showLibraryDialog(null,null,null,null,"CONF_LIB")},z)})),this.put("openLibraryFrom",new Menu(function(v,z){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},z):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
-z,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},z):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},z):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
-"...)",null,function(){},z,null,!1);v.addSeparator(z);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},z);c.isModeReady(App.MODE_GITLAB)&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},z);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},z):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+
-mxResources.get("loading")+"...)",null,function(){},z,null,!1);v.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},z);c.isOffline()||(v.addSeparator(z),v.addItem(mxResources.get("url")+"...",null,function(){var N=new FilenameDialog(c,"",mxResources.get("open"),function(J){if(null!=J&&
+!c.isOffline())&&u("plantUml");var H=function(v){p.getModel().beginUpdate();try{v=p.addCell(v),p.fireEvent(new mxEventObject("cellsInserted","cells",[v])),p.model.isVertex(v)&&p.isAutoSizeCell(v)&&p.updateCellSize(v)}finally{p.getModel().endUpdate()}p.scrollCellToVisible(v);p.setSelectionCell(v);p.container.focus();p.editAfterInsert&&p.startEditing(v);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(p.view.getState(v))},0);return v},D=function(v,y,L,J,K){v=new mxCell(v,new mxGeometry(0,
+0,y,L),J);v.vertex=!0;null==K&&(K=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([v],!0)));v.geometry.x=K.x;v.geometry.y=K.y;return H(v)};c.actions.put("insertText",new Action("text",function(v){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&p.startEditingAtCell(D("Text",60,30,p.appendFontSize(Editor.defaultTextStyle,p.vertexFontSize),null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint()))},null,null,"A")).isEnabled=q;c.actions.put("insertRectangle",
+new Action("rectangle",function(v){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&D("",120,60,"whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint())},null,null,"D")).isEnabled=q;c.actions.put("insertNote",new Action("note",function(v){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&D("",140,160,"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;",
+null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint())},null,null,"S")).isEnabled=q;c.actions.put("insertEllipse",new Action("ellipse",function(v){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&D("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint())},null,null,"F")).isEnabled=q;c.actions.put("insertRhombus",new Action("rhombus",function(v){p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())&&D("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint())},null,null,"R")).isEnabled=q;c.actions.put("insertEdge",new Action("line",function(v){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var y=p.defaultEdgeLength;v=null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint();null==v&&(v=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([L],
+!0)));var L=new mxCell("",new mxGeometry(0,0,y,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");L.geometry.setTerminalPoint(v,!0);L.geometry.setTerminalPoint(new mxPoint(v.x+L.geometry.width,v.y),!1);L.geometry.points=[];L.geometry.relative=!0;L.edge=!0;H(L)}},null,null,"C")).isEnabled=q;u=c.actions.put("toggleShapes",new Action("shapes",function(){null!=c.sidebarWindow?c.sidebarWindow.window.setVisible(!c.sidebarWindow.window.isVisible()):c.toggleShapesPanel(!c.isShapesPanelVisible())},
+null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+K"));u.setToggleAction(!0);u.setSelectedCallback(mxUtils.bind(this,function(){return null!=c.sidebarWindow&&c.sidebarWindow.window.isVisible()||null==c.sidebarWindow&&0<c.hsplitPosition}));this.put("insert",new Menu(mxUtils.bind(this,function(v,y){"sketch"==Editor.currentTheme?(c.menus.addMenuItems(v,["toggleShapes"],y),c.menus.addSubmenu("table",v,y),v.addSeparator(y),c.menus.addMenuItems(v,["insertImage","insertLink","-"],y),c.insertTemplateEnabled&&
+!c.isOffline()&&c.menus.addMenuItems(v,["insertTemplate"],y),c.menus.addMenuItems(v,["generate"],y),window.isMermaidEnabled&&c.menus.addMenuItems(v,["mermaid"],y),v.addSeparator(y),c.menus.addSubmenu("insertAdvanced",v,y,mxResources.get("advanced")),c.menus.addSubmenu("layout",v,y)):(this.addMenuItems(v,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),y),window.isMermaidEnabled&&this.addMenuItems(v,
+["mermaid"],y),c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(v,["-","insertTemplate"],y),c.menus.addMenuItems(v,["generate","-"],y),"min"==uiTheme||"simple"==Editor.currentTheme?(this.addSubmenu("layout",v,y),this.addSubmenu("insertLayout",v,y,mxResources.get("insert")),v.addSeparator(y),this.addSubmenu("table",v,y)):this.addSubmenu("insertLayout",v,y,mxResources.get("layout")),this.addSubmenu("insertAdvanced",v,y,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,
+function(v,y){c.menus.addInsertTableCellItem(v,y)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(v,y){this.addMenuItems(v,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),y)})));c.actions.put("csv",new Action(mxResources.get("csv")+"...",function(){p.popupMenuHandler.hideMenu();c.showImportCsvDialog()})).isEnabled=q;this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(v,y){var L=["fromText","plantUml","formatSql","csv"];EditorUi.enablePlantUml||
+L.splice(1,1);this.addMenuItems(v,L,y);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(v,["-","createShape","editDiagram"],y)})));this.put("openRecent",new Menu(function(v,y){var L=c.getRecent();if(null!=L){for(var J=0;J<L.length;J++)(function(K){var m=K.mode;m==App.MODE_GOOGLE?m="googleDrive":m==App.MODE_ONEDRIVE&&(m="oneDrive");v.addItem(K.title+" ("+mxResources.get(m)+")",null,function(){c.loadFile(K.id)},y)})(L[J]);v.addSeparator(y)}v.addItem(mxResources.get("reset"),
+null,function(){c.resetRecent()},y)}));this.put("openFrom",new Menu(function(v,y){null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},y):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},y):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},y):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);v.addSeparator(y);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},y);c.isModeReady(App.MODE_GITLAB)&&
+v.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},y);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},y):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);v.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},y);"1"!=
+urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},y);c.isOffline()||(v.addSeparator(y),v.addItem(mxResources.get("url")+"...",null,function(){var L=new FilenameDialog(c,"",mxResources.get("open"),function(J){null!=J&&0<J.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(J):window.geOpenWindow((mxClient.IS_CHROMEAPP?"https://app.diagrams.net/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(J)))},
+mxResources.get("url"));c.showDialog(L.container,300,80,!0,!0);L.init()},y))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(v,y){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},y):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1));
+c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},y):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},y):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+
+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);v.addSeparator(y);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},y);c.isModeReady(App.MODE_GITLAB)&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},y);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,
+null,null,null,App.MODE_TRELLO)},y):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);v.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},y);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},y);"1"==
+urlParams.confLib&&v.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showLibraryDialog(null,null,null,null,"CONF_LIB")},y)})),this.put("openLibraryFrom",new Menu(function(v,y){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},y):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
+y,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},y):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},y):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
+"...)",null,function(){},y,null,!1);v.addSeparator(y);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},y);c.isModeReady(App.MODE_GITLAB)&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},y);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},y):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+
+mxResources.get("loading")+"...)",null,function(){},y,null,!1);v.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},y);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},y);c.isOffline()||(v.addSeparator(y),v.addItem(mxResources.get("url")+"...",null,function(){var L=new FilenameDialog(c,"",mxResources.get("open"),function(J){if(null!=J&&
0<J.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var K=J;c.editor.isCorsEnabledForUrl(J)||(K=PROXY_URL+"?url="+encodeURIComponent(J));mxUtils.get(K,function(m){if(200<=m.getStatus()&&299>=m.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(c,m.getText(),J)),c.showSidebar()}catch(t){c.handleError(t,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},
-mxResources.get("url"));c.showDialog(N.container,300,80,!0,!0);N.init()},z));"1"==urlParams.confLib&&(v.addSeparator(z),v.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},z))})));this.put("edit",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,"undo redo - cut copy copyAsImage copyAsSvg paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+mxResources.get("url"));c.showDialog(L.container,300,80,!0,!0);L.init()},y));"1"==urlParams.confLib&&(v.addSeparator(y),v.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},y))})));this.put("edit",new Menu(mxUtils.bind(this,function(v,y){this.addMenuItems(v,"undo redo - cut copy copyAsImage copyAsSvg paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry editConnectionPoints - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
u=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var v=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(v);this.commentsWindow.refreshCommentsTime();v&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));u.setToggleAction(!0);u.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(v,z){var N=
-c.getCurrentFile();c.menus.addMenuItems(v,"toggleShapes format ruler - findReplace layers tags chatWindowTitle outline -".split(" "),z);c.commentsSupported()&&c.menus.addMenuItems(v,["-","comments"],z);null!=N&&N.isRealtimeEnabled()&&N.isRealtimeSupported()&&c.menus.addMenuItems(v,["-","showRemoteCursors","shareCursor"],z);c.menus.addMenuItems(v,["-","fullscreen"],z)};this.put("view",new Menu(mxUtils.bind(this,function(v,z){if("simple"==Editor.currentTheme){var N=c.getCurrentFile();c.menus.addMenuItems(v,
-["toggleShapes","format"],z);c.isPageMenuVisible()&&c.menus.addMenuItems(v,["pageTabs"],z);c.menus.addMenuItems(v,["ruler","-","search"],z);if(isLocalStorage||mxClient.IS_CHROMEAPP){var J=c.menus.addMenuItem(v,"scratchpad",z);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(J,"https://www.drawio.com/doc/faq/scratchpad")}c.menus.addMenuItems(v,"- findReplace layers tags chatWindowTitle outline -".split(" "),z);c.commentsSupported()&&c.menus.addMenuItems(v,["comments"],
-z);null!=N&&N.isRealtimeEnabled()&&N.isRealtimeSupported()&&this.addMenuItems(v,["showRemoteCursors"],z);this.addMenuItems(v,["-","fullscreen"],z)}else{this.addMenuItems(v,["format","outline","layers","tags","chatWindowTitle"].concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(v,["-","search"],z);if(isLocalStorage||mxClient.IS_CHROMEAPP)J=this.addMenuItem(v,"scratchpad",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/scratchpad");
-this.addMenuItems(v,["toggleShapes","-","pageView","pageScale"]);this.addSubmenu("units",v,z);v.addSeparator(z);c.isPageMenuVisible()&&c.menus.addMenuItems(v,["pageTabs"],z);this.addMenuItems(v,"ruler - tooltips animations - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),z);"1"!=urlParams.sketch&&this.addMenuItems(v,["-","fullscreen"],z)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),
-z)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(v,z){var N=c.currentPage;null!=N&&(v.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){c.renamePage(N,N.getName())}),z),v.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){c.removePage(N)}),z),1<c.pages.length&&(c.menus.addSubmenu("movePage",v,z,mxResources.get("move")),v.addSeparator(z)),v.addSeparator(z),v.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){c.duplicatePage(N,
-mxResources.get("copyOf",[N.getName()]))}),z),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||v.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){c.editor.editAsNew(c.getFileData(!0,null,null,null,!0,!0))}),z)))})));this.put("pages",new Menu(mxUtils.bind(this,function(v,z){var N=c.currentPage;c.editor.graph.isLightboxView()||(v.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{c.insertPage()}catch(K){c.handleError(K)}}),
-z,null,c.editor.graph.isEnabled()),v.addSeparator(z));if(null!=c.pages)for(var J=0;J<c.pages.length;J++)mxUtils.bind(this,function(K){var m=null;m=c.pages[K]==N&&!c.editor.graph.isLightboxView()&&c.editor.graph.isEnabled()?c.menus.addSubmenu("currentPage",v,z,c.getShortPageName(N)):v.addItem(c.getShortPageName(c.pages[K]),null,mxUtils.bind(this,function(){c.selectPage(c.pages[K])}),z);var t=c.pages[K].getId();m.setAttribute("title",c.pages[K].getName()+" ("+(K+1)+"/"+c.pages.length+")"+(null!=t?" ["+
-t+"]":""));c.pages[K]==N&&v.addCheckmark(m,Editor.checkmarkImage)})(J)})));if(EditorUi.isElectronApp){var R="1"==urlParams.enableSpellCheck;u=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();R=!R;c.alert(mxResources.get("restartForChangeRequired"))});u.setToggleAction(!0);u.setSelectedCallback(function(){return R});var T="1"==urlParams.enableStoreBkp;u=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();T=!T});u.setToggleAction(!0);u.setSelectedCallback(function(){return T});
-var S="1"==urlParams.isGoogleFontsEnabled;u=c.actions.addAction("googleFonts",function(){c.toggleGoogleFonts();S=!S;c.alert(mxResources.get("restartForChangeRequired"))});u.setToggleAction(!0);u.setSelectedCallback(function(){return S});c.actions.addAction("openDevTools",function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var v=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(z){z=parseInt(z);0<=z&&(EditorUi.draftSaveDelay=
-1E3*z,EditorUi.enableDrafts=0<z,mxSettings.setDraftSaveDelay(z),mxSettings.save())}),mxResources.get("draftSaveInt"));c.showDialog(v.container,320,80,!0,!0);v.init()})}var Q=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(v,z){if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){null==Q||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",v,z);"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||
-"1"==urlParams.embedInline||c.menus.addSubmenu("appearance",v,z);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",v,z);v.addSeparator(z);c.menus.addSubmenu("units",v,z);c.menus.addMenuItems(v,"- copyConnect collapseExpand - tooltips animations -".split(" "),z);var N=c.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=N&&N.isRealtimeEnabled()&&N.isRealtimeSupported()&&this.addMenuItems(v,["showRemoteCursors"],z),c.menus.addMenuItems(v,["ruler","-"],
-z));EditorUi.isElectronApp&&c.menus.addMenuItems(v,"- googleFonts spellCheck autoBkp drafts -".split(" "),z);this.addSubmenu("diagramLanguage",v,z);v.addSeparator(z);c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(v,"configuration",z);v.addSeparator(z)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",v,z),"1"==urlParams.embed&&"1"!=urlParams.atlas||c.menus.addSubmenu("appearance",v,z),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",
-v,z),EditorUi.isElectronApp&&this.addMenuItems(v,"- googleFonts spellCheck autoBkp drafts -".split(" "),z),v.addSeparator(z),N=this.addSubmenu("adaptiveColors",v,z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(N,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(N=this.addMenuItem(v,"mathematicalTypesetting",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(N,"https://www.drawio.com/doc/faq/math-typesetting")),
-"1"!=urlParams.embed&&(N=c.getCurrentFile(),null!=N&&N.isRealtimeEnabled()&&N.isRealtimeSupported()&&this.addMenuItems(v,["-","showRemoteCursors","shareCursor"],z),v.addSeparator(z),(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(v,["showStartScreen"],z),this.addMenuItems(v,["autosave"],z)),this.addMenuItems(v,["-","copyConnect","collapseExpand","-"],z),this.addSubmenu("diagramLanguage",v,z),this.addMenuItems(v,["editDiagram","-"],z),!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(v,
-"plugins",z),this.addMenuItems(v,["configuration"],z)})));this.put("movePage",new Menu(mxUtils.bind(this,function(v,z){var N=c.currentPage,J=c.getPageIndex(N);if(null!=c.pages)for(var K=0;K<c.pages.length;K++)K!=J&&function(m){v.addItem(c.getShortPageName(c.pages[m]),null,function(){c.movePage(J,m);c.scrollToPage(N,!0)},z)}(K)})));this.put("share",new Menu(mxUtils.bind(this,function(v,z){if(!c.isStandaloneApp()){var N=c.isOffline(!0)?mxResources.get("offline"):c.getNetworkStatus();null!=N&&(v.addItem(N,
-null,null,z,null,!1),v.addSeparator(z));c.menus.addMenuItems(v,["share"],z)}this.addMenuItem(v,"publishLink",z,null,null,mxResources.get("publish")+"...");EditorUi.isElectronApp||!c.isOwnGDriveDomain()||"draw.io"!=c.getServiceName()||navigator.standalone||this.addMenuItem(v,"presentationMode",z);null!=c.getMainUser()&&this.addMenuItems(v,["accounts"],z)})));this.put("diagram",new Menu(mxUtils.bind(this,function(v,z){var N=c.getCurrentFile();"simple"!=Editor.currentTheme&&(c.menus.addSubmenu("extras",
-v,z,mxResources.get("settings")),v.addSeparator(z));var J="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)c.menus.addMenuItems(v,["new","open"],z),c.menus.addSubmenu("openRecent",v,z),c.menus.addMenuItems(v,"- synchronize properties - save saveAs -".split(" "),z);else if(c.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(v,["-","save"],z);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&
-"0"!=urlParams.saveAndExit||c.mode==App.MODE_ATLAS)c.menus.addMenuItems(v,["saveAndExit"],z),null!=N&&N.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["revisionHistory"],z);v.addSeparator(z)}else c.mode==App.MODE_ATLAS?c.menus.addMenuItems(v,["save","synchronize","-"],z):"1"!=urlParams.noFileMenu&&(c.menus.addSubmenu("file",v,z),v.addSeparator(z),"min"==Editor.currentTheme&&(c.menus.addMenuItems(v,"toggleShapes format layers tags chatWindowTitle - findReplace".split(" "),z),c.commentsSupported()&&
-c.menus.addMenuItems(v,["comments"],z),v.addSeparator(z)));c.menus.addSubmenu("exportAs",v,z);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"atlassian"==c.getServiceName()?c.menus.addMenuItems(v,["import"],z):"1"!=urlParams.noFileMenu&&c.menus.addSubmenu("importFrom",v,z);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme?(c.menus.addMenuItems(v,["-","findReplace"],z),c.commentsSupported()&&c.menus.addMenuItems(v,["comments","-"],z),c.menus.addMenuItems(v,"toggleShapes format layers tags chatWindowTitle -".split(" "),
-z),c.menus.addMenuItems(v,["pageSetup"],z)):"min"!=Editor.currentTheme&&(this.addMenuItems(v,["-"],z),this.addSubmenu("newLibrary",v,z),this.addSubmenu("openLibraryFrom",v,z));v.addSeparator(z);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(v,["print"],z);J||"min"==Editor.currentTheme||null==N||null==c.fileNode||"1"==urlParams.embedInline||(J=null!=N.getTitle()?N.getTitle():c.defaultFilename,/(\.html)$/i.test(J)||this.addMenuItems(v,["-","properties"]));v.addSeparator(z);
-"simple"==Editor.currentTheme&&(c.menus.addSubmenu("extras",v,z,mxResources.get("settings")),v.addSeparator(z));c.menus.addSubmenu("help",v,z);v.addSeparator(z);"1"==urlParams.embed&&("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(v,["save"],z),"1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(c.menus.addMenuItems(v,["saveAndExit"],z),null!=N&&N.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["revisionHistory"],z));"1"!=urlParams.embed&&
-c.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&c.mode!=App.MODE_ATLAS||c.menus.addMenuItems(v,["exit"],z);"1"!=urlParams.embed&&null!=N&&"undefined"==typeof AtlasFile&&c.menus.addMenuItems(v,["-","close"],z)})));this.put("save",new Menu(mxUtils.bind(this,function(v,z){var N=c.getCurrentFile();null==N||N.constructor!=DriveFile&&N.constructor!=OneDriveFile?(c.menus.addMenuItems(v,["save","saveAs","-","rename"],z),this.addMenuItems(v,[c.isOfflineApp()?"upload":"makeCopy"],z)):c.menus.addMenuItems(v,
-["save","makeCopy","-","rename","moveToFolder"],z);c.menus.addMenuItems(v,["-","autosave"],z);null!=N&&N.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["-","revisionHistory"],z)})));this.put("file",new Menu(mxUtils.bind(this,function(v,z){var N="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",v,z),this.addSubmenu("exportAs",v,z),this.addSubmenu("embed",v,z),"1"==urlParams.libraries&&(this.addMenuItems(v,
-["-"],z),this.addSubmenu("newLibrary",v,z),this.addSubmenu("openLibraryFrom",v,z)),c.isRevisionHistorySupported()&&this.addMenuItems(v,["-","revisionHistory"],z),this.addMenuItems(v,["-","pageSetup","print","-","rename"],z),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(v,["saveAndExit"],z):(this.addMenuItems(v,["save"],z),"1"==urlParams.saveAndExit&&this.addMenuItems(v,["saveAndExit"],z))),"1"!=urlParams.noExitBtn&&this.addMenuItems(v,["exit"],
-z);else if(N){N=c.getCurrentFile();c.menus.addMenuItems(v,["new"],z);c.menus.addSubmenu("openFrom",v,z);isLocalStorage&&this.addSubmenu("openRecent",v,z);v.addSeparator(z);c.menus.addMenuItems(v,["-","save"],z);null!=N&&N.constructor==DriveFile||c.menus.addMenuItems(v,["saveAs"],z);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==N||N.constructor==LocalFile&&null==N.fileHandle||c.menus.addMenuItems(v,["synchronize"],z);v.addSeparator(z);null!=N&&("simple"==Editor.currentTheme||N.constructor!=
-DriveFile&&N.constructor!=GitHubFile&&N.constructor!=OneDriveFile||c.menus.addMenuItems(v,["share"],z),"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.addMenuItem(v,"publishLink",z,null,null,mxResources.get("publish")+"..."),"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||EditorUi.isElectronApp||!c.isOwnGDriveDomain()||"draw.io"!=c.getServiceName()||navigator.standalone||this.addMenuItem(v,"presentationMode",z));v.addSeparator(z);
-null!=N&&N.isRenamable()&&this.addMenuItems(v,["rename"],z);c.isOfflineApp()?this.addMenuItems(v,["upload"],z):(c.menus.addMenuItems(v,["makeCopy"],z),null!=N&&(N.constructor!=OneDriveFile&&N.constructor!=DriveFile||c.menus.addMenuItems(v,["moveToFolder"],z),v.addSeparator(z),null!=N.getFolderUrl()&&c.menus.addMenuItems(v,["openFolder"],z),null!=N.getFileUrl()&&c.menus.addMenuItems(v,["openFile"],z)));v.addSeparator(z);null!=N&&N.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["revisionHistory"],
-z);if(null!=N&&null!=c.fileNode&&"1"!=urlParams.embedInline){var J=null!=N.getTitle()?N.getTitle():c.defaultFilename;(N.constructor==DriveFile&&null!=N.sync&&N.sync.isConnected()||!/(\.html)$/i.test(J))&&this.addMenuItems(v,["properties"],z)}"simple"==Editor.currentTheme&&c.menus.addMenuItems(v,["-","autosave"],z)}else N=this.editorUi.getCurrentFile(),null!=N&&N.constructor==DriveFile?(N.isRestricted()&&this.addMenuItems(v,["exportOptionsDisabled"],z),this.addMenuItems(v,["save","-","share"],z),J=
-this.addMenuItem(v,"synchronize",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/synchronize"),v.addSeparator(z)):this.addMenuItems(v,["new"],z),this.addSubmenu("openFrom",v,z),isLocalStorage&&this.addSubmenu("openRecent",v,z),null!=N&&N.constructor==DriveFile?this.addMenuItems(v,"new - rename makeCopy openFolder moveToFolder".split(" "),z):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==N||N.constructor==LocalFile&&null==
-N.fileHandle||(v.addSeparator(z),J=this.addMenuItem(v,"synchronize",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(v,["-","save","saveAs","-"],z),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==N||this.addMenuItems(v,["share","-"],z),null!=N&&N.isRenamable()&&this.addMenuItems(v,["rename"],z),c.isOfflineApp()?this.addMenuItems(v,["upload"],
-z):(this.addMenuItems(v,["makeCopy"],z),null!=N&&(N.constructor==OneDriveFile&&this.addMenuItems(v,["moveToFolder"],z),null!=N.getFolderUrl()&&c.menus.addMenuItems(v,["openFolder"],z)))),v.addSeparator(z),this.addSubmenu("importFrom",v,z),this.addSubmenu("exportAs",v,z),c.isOffline()||(v.addSeparator(z),this.addSubmenu("embed",v,z),this.addSubmenu("publish",v,z)),v.addSeparator(z),this.addSubmenu("newLibrary",v,z),this.addSubmenu("openLibraryFrom",v,z),c.isRevisionHistorySupported()&&this.addMenuItems(v,
-["-","revisionHistory"],z),null!=N&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(J=null!=N.getTitle()?N.getTitle():c.defaultFilename,(N.constructor==DriveFile&&null!=N.sync&&N.sync.isConnected()||!/(\.html)$/i.test(J))&&this.addMenuItems(v,["-","properties"])),this.addMenuItems(v,["-","pageSetup"],z),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["print"],z),this.addMenuItems(v,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(v,z){function N(O){var P=encodeURIComponent(O.name)+
-(null==O.url?"":"@"+encodeURIComponent(O.url));if(!K[P]){for(var U=O.name,V=0;null!=M[U.toLowerCase()];)U=O.name+" ("+ ++V+")";null==D[P]&&(L.push({name:O.name,url:O.url,label:U,title:O.url}),M[U.toLowerCase()]=O,D[P]=O)}}for(var J=mxUtils.bind(this,function(O,P,U,V,X){var W=c.editor.graph,Y=this.styleChange(v,null!=V?V:O,[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],[O,null!=P?encodeURIComponent(P):null,null],null,z,function(){W.setFont(O,P);c.fireEvent(new mxEventObject("styleChanged","keys",
-[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[O,null!=P?encodeURIComponent(P):null,null],"cells",[W.cellEditor.getEditingCell()]))},function(){W.updateLabelElements(W.getSelectionCells(),function(Z){Z.removeAttribute("face");Z.style.fontFamily=null;"PRE"==Z.nodeName&&W.replaceElement(Z,"div")})});U&&(U=document.createElement("img"),U.className="geAdaptiveAsset",U.setAttribute("src",Editor.crossImage),U.setAttribute("title",mxResources.get("delete")),U.setAttribute("valign","absmiddle"),
-U.setAttribute("border","0"),U.style.position="relative",U.style.top="2px",U.style.width="14px",U.style.cursor="default",U.style.margin="0 3px",Y.firstChild.nextSibling.nextSibling.appendChild(U),mxEvent.addListener(U,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Z){this.removeCustomFont(O,P);this.editorUi.hideCurrentMenu();mxEvent.consume(Z)})));Graph.addFont(O,P);Y.firstChild.nextSibling.style.fontFamily=O;X=null!=V?V:O;null!=P&&(X+=" ("+P+")");Y.setAttribute("title",X)}),
-K={},m=0;m<this.defaultFonts.length;m++){var t=this.defaultFonts[m];"string"===typeof t?J(t):null!=t.fontFamily&&null!=t.fontUrl&&(K[encodeURIComponent(t.fontFamily)+"@"+encodeURIComponent(t.fontUrl)]=!0,J(t.fontFamily,t.fontUrl))}v.addSeparator(z);var D={},M={},L=[];for(m=0;m<this.customFonts.length;m++)N(this.customFonts[m]);L.sort(function(O,P){return O.label<P.label?-1:O.label>P.label?1:0});if(0<L.length){for(m=0;m<L.length;m++)J(L[m].name,L[m].url,!0,L[m].label);v.addSeparator(z)}v.addItem(mxResources.get("reset"),
-null,mxUtils.bind(this,function(){this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),z);v.addSeparator(z);v.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,P=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],U="s",V=null;if(O.isEditing()){var X=O.getSelectedEditingElement();if(null!=X){var W=mxUtils.getCurrentStyle(X);if(null!=W){P=mxUtils.getCssFontFamily(W.fontFamily);W=O.getView().getState(O.cellEditor.getEditingCell());
-V=null!=W?W.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=X&&X!=O.cellEditor.textarea;){if(X.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=X.getAttribute("data-font-src")){V=X.getAttribute("data-font-src");break}else if(X.getAttribute("face")==P){V=null;break}X=X.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?(V=null,U="g"):U="w")}}}else W=O.getView().getState(O.getSelectionCell()),null!=W&&(P=W.style[mxConstants.STYLE_FONTFAMILY]||P,X=W.style.fontSource,null!=X&&(X=decodeURIComponent(X),
-Graph.isGoogleFontUrl(X)?U="g":(U="w",V=X)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Y=null;document.activeElement==O.cellEditor.textarea&&(Y=O.cellEditor.saveSelection());P=new FontDialog(this.editorUi,P,V,U,mxUtils.bind(this,function(Z,aa,fa){null!=Y&&(O.cellEditor.restoreSelection(Y),Y=null);if(null!=Z&&0<Z.length)if(this.addCustomFont(Z,aa),O.isEditing())O.setFont(Z,aa);else{O.getModel().beginUpdate();try{O.stopEditing(!1),
-O.setCellStyles(mxConstants.STYLE_FONTFAMILY,Z),O.setCellStyles("fontSource",null!=aa?encodeURIComponent(aa):null),O.setCellStyles("FType",null)}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(P.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);P.init()}),z,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;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)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,f,g){this.ui=b;this.page=f;this.previous=this.name=g}
-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,f,g){this.ui=b;this.oldIndex=f;this.newIndex=g}
-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,f,g){this.ui=b;this.previousPage=this.page=f;null!=f&&(this.ui.updatePageRoot(f),null!=g&&(f.viewState=g))}
-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var f=this.ui.editor,g=f.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(f.getGraphXml(!0)));b.viewState=g.getViewState();b.root=g.model.root;null!=b.model&&b.model.rootChanged(b.root);g.view.clear(b.root,!0);g.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;
-g.model.prefix=Editor.guid()+"-";g.model.rootChanged(b.root);g.setViewState(b.viewState);g.gridEnabled=g.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);f.graph.fireEvent(new mxEventObject(mxEvent.ROOT));f.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,f,g,c,p){SelectPage.call(this,b,g);this.relatedPage=f;this.index=c;this.previousIndex=null;this.noSelect=p}mxUtils.extend(ChangePage,SelectPage);
+this.commentsWindow.window.setVisible(v);this.commentsWindow.refreshCommentsTime();v&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));u.setToggleAction(!0);u.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(v,y){var L=
+c.getCurrentFile();c.menus.addMenuItems(v,"toggleShapes format ruler - findReplace layers tags outline generate -".split(" "),y);c.commentsSupported()&&c.menus.addMenuItems(v,["-","comments"],y);null!=L&&L.isRealtimeEnabled()&&L.isRealtimeSupported()&&c.menus.addMenuItems(v,["-","showRemoteCursors","shareCursor"],y);c.menus.addMenuItems(v,["-","fullscreen"],y)};this.put("view",new Menu(mxUtils.bind(this,function(v,y){if("simple"==Editor.currentTheme){var L=c.getCurrentFile();c.menus.addMenuItems(v,
+["toggleShapes","format"],y);c.isPageMenuVisible()&&c.menus.addMenuItems(v,["pageTabs"],y);c.menus.addMenuItems(v,["ruler","-","search"],y);if(isLocalStorage||mxClient.IS_CHROMEAPP){var J=c.menus.addMenuItem(v,"scratchpad",y);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(J,"https://www.drawio.com/doc/faq/scratchpad")}c.menus.addMenuItems(v,"- findReplace layers tags outline generate -".split(" "),y);c.commentsSupported()&&c.menus.addMenuItems(v,["comments"],
+y);null!=L&&L.isRealtimeEnabled()&&L.isRealtimeSupported()&&this.addMenuItems(v,["showRemoteCursors"],y);this.addMenuItems(v,["-","fullscreen"],y)}else{this.addMenuItems(v,["format","outline","layers","tags","generate"].concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(v,["-","search"],y);if(isLocalStorage||mxClient.IS_CHROMEAPP)J=this.addMenuItem(v,"scratchpad",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/scratchpad");
+this.addMenuItems(v,["toggleShapes","-","pageView","pageScale"]);this.addSubmenu("units",v,y);v.addSeparator(y);c.isPageMenuVisible()&&c.menus.addMenuItems(v,["pageTabs"],y);this.addMenuItems(v,"ruler - tooltips animations - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),y);"1"!=urlParams.sketch&&this.addMenuItems(v,["-","fullscreen"],y)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(v,y){this.addMenuItems(v,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),
+y)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(v,y){var L=c.currentPage;null!=L&&(v.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){c.renamePage(L,L.getName())}),y),v.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){c.removePage(L)}),y),1<c.pages.length&&(c.menus.addSubmenu("movePage",v,y,mxResources.get("move")),v.addSeparator(y)),v.addSeparator(y),v.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){c.duplicatePage(L,
+mxResources.get("copyOf",[L.getName()]))}),y),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||v.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){c.editor.editAsNew(c.getFileData(!0,null,null,null,!0,!0))}),y)))})));this.put("pages",new Menu(mxUtils.bind(this,function(v,y){var L=c.currentPage;c.editor.graph.isLightboxView()||(v.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{c.insertPage()}catch(K){c.handleError(K)}}),
+y,null,c.editor.graph.isEnabled()),v.addSeparator(y));if(null!=c.pages)for(var J=0;J<c.pages.length;J++)mxUtils.bind(this,function(K){var m=null;m=c.pages[K]==L&&!c.editor.graph.isLightboxView()&&c.editor.graph.isEnabled()?c.menus.addSubmenu("currentPage",v,y,c.getShortPageName(L)):v.addItem(c.getShortPageName(c.pages[K]),null,mxUtils.bind(this,function(){c.selectPage(c.pages[K])}),y);var t=c.pages[K].getId();m.setAttribute("title",c.pages[K].getName()+" ("+(K+1)+"/"+c.pages.length+")"+(null!=t?" ["+
+t+"]":""));c.pages[K]==L&&v.addCheckmark(m,Editor.checkmarkImage)})(J)})));if(EditorUi.isElectronApp){var S="1"==urlParams.enableSpellCheck;u=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();S=!S;c.alert(mxResources.get("restartForChangeRequired"))});u.setToggleAction(!0);u.setSelectedCallback(function(){return S});var U="1"==urlParams.enableStoreBkp;u=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();U=!U});u.setToggleAction(!0);u.setSelectedCallback(function(){return U});
+var R="1"==urlParams.isGoogleFontsEnabled;u=c.actions.addAction("googleFonts",function(){c.toggleGoogleFonts();R=!R;c.alert(mxResources.get("restartForChangeRequired"))});u.setToggleAction(!0);u.setSelectedCallback(function(){return R});c.actions.addAction("openDevTools",function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var v=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(y){y=parseInt(y);0<=y&&(EditorUi.draftSaveDelay=
+1E3*y,EditorUi.enableDrafts=0<y,mxSettings.setDraftSaveDelay(y),mxSettings.save())}),mxResources.get("draftSaveInt"));c.showDialog(v.container,320,80,!0,!0);v.init()})}var P=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(v,y){if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){null==P||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",v,y);"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||
+"1"==urlParams.embedInline||c.menus.addSubmenu("appearance",v,y);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",v,y);v.addSeparator(y);c.menus.addSubmenu("units",v,y);c.menus.addMenuItems(v,"- copyConnect collapseExpand - tooltips animations -".split(" "),y);var L=c.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=L&&L.isRealtimeEnabled()&&L.isRealtimeSupported()&&this.addMenuItems(v,["showRemoteCursors"],y),c.menus.addMenuItems(v,["ruler","-"],
+y));EditorUi.isElectronApp&&c.menus.addMenuItems(v,"- googleFonts spellCheck autoBkp drafts -".split(" "),y);this.addSubmenu("diagramLanguage",v,y);v.addSeparator(y);c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(v,"configuration",y);v.addSeparator(y)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",v,y),"1"==urlParams.embed&&"1"!=urlParams.atlas||c.menus.addSubmenu("appearance",v,y),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",
+v,y),EditorUi.isElectronApp&&this.addMenuItems(v,"- googleFonts spellCheck autoBkp drafts -".split(" "),y),v.addSeparator(y),L=this.addSubmenu("adaptiveColors",v,y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(L,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(L=this.addMenuItem(v,"mathematicalTypesetting",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(L,"https://www.drawio.com/doc/faq/math-typesetting")),
+"1"!=urlParams.embed&&(L=c.getCurrentFile(),null!=L&&L.isRealtimeEnabled()&&L.isRealtimeSupported()&&this.addMenuItems(v,["-","showRemoteCursors","shareCursor"],y),v.addSeparator(y),(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(v,["showStartScreen"],y),this.addMenuItems(v,["autosave"],y)),this.addMenuItems(v,["-","copyConnect","collapseExpand","-"],y),this.addSubmenu("diagramLanguage",v,y),this.addMenuItems(v,["editDiagram","-"],y),!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(v,
+"plugins",y),this.addMenuItems(v,["configuration"],y)})));this.put("movePage",new Menu(mxUtils.bind(this,function(v,y){var L=c.currentPage,J=c.getPageIndex(L);if(null!=c.pages)for(var K=0;K<c.pages.length;K++)K!=J&&function(m){v.addItem(c.getShortPageName(c.pages[m]),null,function(){c.movePage(J,m);c.scrollToPage(L,!0)},y)}(K)})));this.put("share",new Menu(mxUtils.bind(this,function(v,y){if(!c.isStandaloneApp()){var L=c.isOffline(!0)?mxResources.get("offline"):c.getNetworkStatus();null!=L&&(v.addItem(L,
+null,null,y,null,!1),v.addSeparator(y));c.menus.addMenuItems(v,["share"],y)}this.addMenuItem(v,"publishLink",y,null,null,mxResources.get("publish")+"...");EditorUi.isElectronApp||!c.isOwnGDriveDomain()||"draw.io"!=c.getServiceName()||navigator.standalone||this.addMenuItem(v,"presentationMode",y);null!=c.getMainUser()&&this.addMenuItems(v,["accounts"],y)})));this.put("diagram",new Menu(mxUtils.bind(this,function(v,y){var L=c.getCurrentFile();"simple"!=Editor.currentTheme&&(c.menus.addSubmenu("extras",
+v,y,mxResources.get("settings")),v.addSeparator(y));var J="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)c.menus.addMenuItems(v,["new","open"],y),c.menus.addSubmenu("openRecent",v,y),c.menus.addMenuItems(v,"- synchronize properties - save saveAs -".split(" "),y);else if(c.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(v,["-","save"],y);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&
+"0"!=urlParams.saveAndExit||c.mode==App.MODE_ATLAS)c.menus.addMenuItems(v,["saveAndExit"],y),null!=L&&L.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["revisionHistory"],y);v.addSeparator(y)}else c.mode==App.MODE_ATLAS?c.menus.addMenuItems(v,["save","synchronize","-"],y):"1"!=urlParams.noFileMenu&&(c.menus.addSubmenu("file",v,y),v.addSeparator(y),"min"==Editor.currentTheme&&(c.menus.addMenuItems(v,"toggleShapes format layers tags generate - findReplace".split(" "),y),c.commentsSupported()&&
+c.menus.addMenuItems(v,["comments"],y),v.addSeparator(y)));c.menus.addSubmenu("exportAs",v,y);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"atlassian"==c.getServiceName()?c.menus.addMenuItems(v,["import"],y):"1"!=urlParams.noFileMenu&&c.menus.addSubmenu("importFrom",v,y);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme?(c.menus.addMenuItems(v,["-","findReplace"],y),c.commentsSupported()&&c.menus.addMenuItems(v,["comments","-"],y),c.menus.addMenuItems(v,"toggleShapes format layers tags generate -".split(" "),
+y),c.menus.addMenuItems(v,["pageSetup"],y)):"min"!=Editor.currentTheme&&(this.addMenuItems(v,["-"],y),this.addSubmenu("newLibrary",v,y),this.addSubmenu("openLibraryFrom",v,y));v.addSeparator(y);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(v,["print"],y);J||"min"==Editor.currentTheme||null==L||null==c.fileNode||"1"==urlParams.embedInline||(J=null!=L.getTitle()?L.getTitle():c.defaultFilename,/(\.html)$/i.test(J)||this.addMenuItems(v,["-","properties"]));v.addSeparator(y);
+"simple"==Editor.currentTheme&&(c.menus.addSubmenu("extras",v,y,mxResources.get("settings")),v.addSeparator(y));c.menus.addSubmenu("help",v,y);v.addSeparator(y);"1"==urlParams.embed&&("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(v,["save"],y),"1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(c.menus.addMenuItems(v,["saveAndExit"],y),null!=L&&L.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["revisionHistory"],y));"1"!=urlParams.embed&&
+c.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&c.mode!=App.MODE_ATLAS||c.menus.addMenuItems(v,["exit"],y);"1"!=urlParams.embed&&null!=L&&"undefined"==typeof AtlasFile&&c.menus.addMenuItems(v,["-","close"],y)})));this.put("save",new Menu(mxUtils.bind(this,function(v,y){var L=c.getCurrentFile();null==L||L.constructor!=DriveFile&&L.constructor!=OneDriveFile?(c.menus.addMenuItems(v,["save","saveAs","-","rename"],y),this.addMenuItems(v,[c.isOfflineApp()?"upload":"makeCopy"],y)):c.menus.addMenuItems(v,
+["save","makeCopy","-","rename","moveToFolder"],y);c.menus.addMenuItems(v,["-","autosave"],y);null!=L&&L.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["-","revisionHistory"],y)})));this.put("file",new Menu(mxUtils.bind(this,function(v,y){var L="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",v,y),this.addSubmenu("exportAs",v,y),this.addSubmenu("embed",v,y),"1"==urlParams.libraries&&(this.addMenuItems(v,
+["-"],y),this.addSubmenu("newLibrary",v,y),this.addSubmenu("openLibraryFrom",v,y)),c.isRevisionHistorySupported()&&this.addMenuItems(v,["-","revisionHistory"],y),this.addMenuItems(v,["-","pageSetup","print","-","rename"],y),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(v,["saveAndExit"],y):(this.addMenuItems(v,["save"],y),"1"==urlParams.saveAndExit&&this.addMenuItems(v,["saveAndExit"],y))),"1"!=urlParams.noExitBtn&&this.addMenuItems(v,["exit"],
+y);else if(L){L=c.getCurrentFile();c.menus.addMenuItems(v,["new"],y);c.menus.addSubmenu("openFrom",v,y);isLocalStorage&&this.addSubmenu("openRecent",v,y);v.addSeparator(y);c.menus.addMenuItems(v,["-","save"],y);null!=L&&L.constructor==DriveFile||c.menus.addMenuItems(v,["saveAs"],y);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==L||L.constructor==LocalFile&&null==L.fileHandle||c.menus.addMenuItems(v,["synchronize"],y);v.addSeparator(y);null!=L&&("simple"==Editor.currentTheme||L.constructor!=
+DriveFile&&L.constructor!=GitHubFile&&L.constructor!=OneDriveFile||c.menus.addMenuItems(v,["share"],y),"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.addMenuItem(v,"publishLink",y,null,null,mxResources.get("publish")+"..."),"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||EditorUi.isElectronApp||!c.isOwnGDriveDomain()||"draw.io"!=c.getServiceName()||navigator.standalone||this.addMenuItem(v,"presentationMode",y));v.addSeparator(y);
+null!=L&&L.isRenamable()&&this.addMenuItems(v,["rename"],y);c.isOfflineApp()?this.addMenuItems(v,["upload"],y):(c.menus.addMenuItems(v,["makeCopy"],y),null!=L&&(L.constructor!=OneDriveFile&&L.constructor!=DriveFile||c.menus.addMenuItems(v,["moveToFolder"],y),v.addSeparator(y),null!=L.getFolderUrl()&&c.menus.addMenuItems(v,["openFolder"],y),null!=L.getFileUrl()&&c.menus.addMenuItems(v,["openFile"],y)));v.addSeparator(y);null!=L&&L.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["revisionHistory"],
+y);if(null!=L&&null!=c.fileNode&&"1"!=urlParams.embedInline){var J=null!=L.getTitle()?L.getTitle():c.defaultFilename;(L.constructor==DriveFile&&null!=L.sync&&L.sync.isConnected()||!/(\.html)$/i.test(J))&&this.addMenuItems(v,["properties"],y)}"simple"==Editor.currentTheme&&c.menus.addMenuItems(v,["-","autosave"],y)}else L=this.editorUi.getCurrentFile(),null!=L&&L.constructor==DriveFile?(L.isRestricted()&&this.addMenuItems(v,["exportOptionsDisabled"],y),this.addMenuItems(v,["save","-","share"],y),J=
+this.addMenuItem(v,"synchronize",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/synchronize"),v.addSeparator(y)):this.addMenuItems(v,["new"],y),this.addSubmenu("openFrom",v,y),isLocalStorage&&this.addSubmenu("openRecent",v,y),null!=L&&L.constructor==DriveFile?this.addMenuItems(v,"new - rename makeCopy openFolder moveToFolder".split(" "),y):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==L||L.constructor==LocalFile&&null==
+L.fileHandle||(v.addSeparator(y),J=this.addMenuItem(v,"synchronize",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(v,["-","save","saveAs","-"],y),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==L||this.addMenuItems(v,["share","-"],y),null!=L&&L.isRenamable()&&this.addMenuItems(v,["rename"],y),c.isOfflineApp()?this.addMenuItems(v,["upload"],
+y):(this.addMenuItems(v,["makeCopy"],y),null!=L&&(L.constructor==OneDriveFile&&this.addMenuItems(v,["moveToFolder"],y),null!=L.getFolderUrl()&&c.menus.addMenuItems(v,["openFolder"],y)))),v.addSeparator(y),this.addSubmenu("importFrom",v,y),this.addSubmenu("exportAs",v,y),c.isOffline()||(v.addSeparator(y),this.addSubmenu("embed",v,y),this.addSubmenu("publish",v,y)),v.addSeparator(y),this.addSubmenu("newLibrary",v,y),this.addSubmenu("openLibraryFrom",v,y),c.isRevisionHistorySupported()&&this.addMenuItems(v,
+["-","revisionHistory"],y),null!=L&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(J=null!=L.getTitle()?L.getTitle():c.defaultFilename,(L.constructor==DriveFile&&null!=L.sync&&L.sync.isConnected()||!/(\.html)$/i.test(J))&&this.addMenuItems(v,["-","properties"])),this.addMenuItems(v,["-","pageSetup"],y),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["print"],y),this.addMenuItems(v,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(v,y){function L(O){var Q=encodeURIComponent(O.name)+
+(null==O.url?"":"@"+encodeURIComponent(O.url));if(!K[Q]){for(var T=O.name,V=0;null!=N[T.toLowerCase()];)T=O.name+" ("+ ++V+")";null==C[Q]&&(M.push({name:O.name,url:O.url,label:T,title:O.url}),N[T.toLowerCase()]=O,C[Q]=O)}}for(var J=mxUtils.bind(this,function(O,Q,T,V,X){var W=c.editor.graph,Y=this.styleChange(v,null!=V?V:O,[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],[O,null!=Q?encodeURIComponent(Q):null,null],null,y,function(){W.setFont(O,Q);c.fireEvent(new mxEventObject("styleChanged","keys",
+[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[O,null!=Q?encodeURIComponent(Q):null,null],"cells",[W.cellEditor.getEditingCell()]))},function(){W.updateLabelElements(W.getSelectionCells(),function(Z){Z.removeAttribute("face");Z.style.fontFamily=null;"PRE"==Z.nodeName&&W.replaceElement(Z,"div")})});T&&(T=document.createElement("img"),T.className="geAdaptiveAsset",T.setAttribute("src",Editor.crossImage),T.setAttribute("title",mxResources.get("delete")),T.setAttribute("valign","absmiddle"),
+T.setAttribute("border","0"),T.style.position="relative",T.style.top="2px",T.style.width="14px",T.style.cursor="default",T.style.margin="0 3px",Y.firstChild.nextSibling.nextSibling.appendChild(T),mxEvent.addListener(T,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Z){this.removeCustomFont(O,Q);this.editorUi.hideCurrentMenu();mxEvent.consume(Z)})));Graph.addFont(O,Q);Y.firstChild.nextSibling.style.fontFamily=O;X=null!=V?V:O;null!=Q&&(X+=" ("+Q+")");Y.setAttribute("title",X)}),
+K={},m=0;m<this.defaultFonts.length;m++){var t=this.defaultFonts[m];"string"===typeof t?J(t):null!=t.fontFamily&&null!=t.fontUrl&&(K[encodeURIComponent(t.fontFamily)+"@"+encodeURIComponent(t.fontUrl)]=!0,J(t.fontFamily,t.fontUrl))}v.addSeparator(y);var C={},N={},M=[];for(m=0;m<this.customFonts.length;m++)L(this.customFonts[m]);M.sort(function(O,Q){return O.label<Q.label?-1:O.label>Q.label?1:0});if(0<M.length){for(m=0;m<M.length;m++)J(M[m].name,M[m].url,!0,M[m].label);v.addSeparator(y)}v.addItem(mxResources.get("reset"),
+null,mxUtils.bind(this,function(){this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),y);v.addSeparator(y);v.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,Q=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],T="s",V=null;if(O.isEditing()){var X=O.getSelectedEditingElement();if(null!=X){var W=mxUtils.getCurrentStyle(X);if(null!=W){Q=mxUtils.getCssFontFamily(W.fontFamily);W=O.getView().getState(O.cellEditor.getEditingCell());
+V=null!=W?W.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=X&&X!=O.cellEditor.textarea;){if(X.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=X.getAttribute("data-font-src")){V=X.getAttribute("data-font-src");break}else if(X.getAttribute("face")==Q){V=null;break}X=X.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?(V=null,T="g"):T="w")}}}else W=O.getView().getState(O.getSelectionCell()),null!=W&&(Q=W.style[mxConstants.STYLE_FONTFAMILY]||Q,X=W.style.fontSource,null!=X&&(X=decodeURIComponent(X),
+Graph.isGoogleFontUrl(X)?T="g":(T="w",V=X)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Y=null;document.activeElement==O.cellEditor.textarea&&(Y=O.cellEditor.saveSelection());Q=new FontDialog(this.editorUi,Q,V,T,mxUtils.bind(this,function(Z,aa,ja){null!=Y&&(O.cellEditor.restoreSelection(Y),Y=null);if(null!=Z&&0<Z.length)if(this.addCustomFont(Z,aa),O.isEditing())O.setFont(Z,aa);else{O.getModel().beginUpdate();try{O.stopEditing(!1),
+O.setCellStyles(mxConstants.STYLE_FONTFAMILY,Z),O.setCellStyles("fontSource",null!=aa?encodeURIComponent(aa):null),O.setCellStyles("FType",null)}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(Q.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);Q.init()}),y,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;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)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,f,k){this.ui=b;this.page=f;this.previous=this.name=k}
+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,f,k){this.ui=b;this.oldIndex=f;this.newIndex=k}
+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,f,k){this.ui=b;this.previousPage=this.page=f;null!=f&&(this.ui.updatePageRoot(f),null!=k&&(f.viewState=k))}
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var f=this.ui.editor,k=f.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(f.getGraphXml(!0)));b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;
+k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root);k.setViewState(b.viewState);k.gridEnabled=k.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);f.graph.fireEvent(new mxEventObject(mxEvent.ROOT));f.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,f,k,c,p){SelectPage.call(this,b,k);this.relatedPage=f;this.index=c;this.previousIndex=null;this.noSelect=p}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};function ReplaceDiagram(b,f){this.ui=b;this.data=f}
-ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,f=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var g=new mxCodec(this.data.ownerDocument),c=new mxGraphModel;g.decode(this.data,c);this.data=f;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=c.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,
+ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,f=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var k=new mxCodec(this.data.ownerDocument),c=new mxGraphModel;k.decode(this.data,c);this.data=f;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=c.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,
!0);b.model.rootChanged(c.root);b.fireEvent(new mxEventObject(mxEvent.ROOT))};EditorUi.prototype.tabContainerVisible=!0;EditorUi.prototype.setTabContainerVisible=function(b,f){Editor.isSettingsEnabled()&&f&&(mxSettings.settings.pages=b,mxSettings.save());this.tabContainerVisible=b;this.updateTabContainer()};EditorUi.prototype.isTabContainerVisible=function(){return this.tabContainerVisible};EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
-EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&null!=b)for(var g=0;g<this.pages.length;g++)if(this.pages[g]==b){f=g;break}return f};EditorUi.prototype.getPageById=function(b,f){f=null!=f?f:this.pages;if(null!=f)for(var g=0;g<f.length;g++)if(f[g].getId()==b)return f[g];return null};
-EditorUi.prototype.createImageForPageLink=function(b,f,g,c){var p=b.indexOf(","),q=null;0<p&&(p=this.getPageById(b.substring(p+1)),null!=p&&p!=f&&(q=this.getImageForPage(p,f,g,c),q.originalSrc=b));null==q&&(q={originalSrc:b});return q};
+EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){f=k;break}return f};EditorUi.prototype.getPageById=function(b,f){f=null!=f?f:this.pages;if(null!=f)for(var k=0;k<f.length;k++)if(f[k].getId()==b)return f[k];return null};
+EditorUi.prototype.createImageForPageLink=function(b,f,k,c){var p=b.indexOf(","),q=null;0<p&&(p=this.getPageById(b.substring(p+1)),null!=p&&p!=f&&(q=this.getImageForPage(p,f,k,c),q.originalSrc=b));null==q&&(q={originalSrc:b});return q};
EditorUi.prototype.pageSelected=function(){var b=this.editor.graph,f=this.currentPage;null!=f&&(b.tooltipHandler.hide(),null==f.viewState||null==f.viewState.scrollTop||null==f.viewState.scrollLeft?(b.selectUnlockedLayer(),this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollleft=0,b.container.scrollTop=0,this.chromelessResize())):b.setScrollbarPositions(f.viewState,b.view.translate.x,b.view.translate.y),this.updateTabContainer(),this.scrollToPage())};
-EditorUi.prototype.getImageForPage=function(b,f,g,c){g=null!=g?g:this.editor.graph;var p=g.getGlobalVariable;g=this.createTemporaryGraph(g.getStylesheet());var q=this.getPageIndex(null!=f?f:this.currentPage);g.getGlobalVariable=function(y){return"pagenumber"==y?q+1:"page"==y&&null!=f?f.getName():p.apply(this,arguments)};document.body.appendChild(g.container);this.updatePageRoot(b);g.setAdaptiveColors(b.viewState.adaptiveColors);g.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=
-"";c=g.getSvg(null,null,null,null,null,null,null,null,null,null,c,null,null,null,!0,!0);var u=g.getGraphBounds();document.body.removeChild(g.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(c)),u.width,u.height,u.x,u.y)};
+EditorUi.prototype.getImageForPage=function(b,f,k,c){k=null!=k?k:this.editor.graph;var p=k.getGlobalVariable;k=this.createTemporaryGraph(k.getStylesheet());var q=this.getPageIndex(null!=f?f:this.currentPage);k.getGlobalVariable=function(z){return"pagenumber"==z?q+1:"page"==z&&null!=f?f.getName():p.apply(this,arguments)};document.body.appendChild(k.container);this.updatePageRoot(b);k.setAdaptiveColors(b.viewState.adaptiveColors);k.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=
+"";c=k.getSvg(null,null,null,null,null,null,null,null,null,null,c,null,null,null,!0,!0);var u=k.getGraphBounds();document.body.removeChild(k.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(c)),u.width,u.height,u.x,u.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,f=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){f.apply(b.view,
-arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(u,y){u=y.getProperty("edit").changes;for(y=0;y<u.length;y++)if(u[y]instanceof RenamePage||u[y]instanceof ChangePage||u[y]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==u.length&&u[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var g=b.sizeDidChange,c=null,p=this;b.sizeDidChange=
-function(){var u=g.apply(this,arguments);null!=p.currentPage&&c!=p.currentPage&&(c=p.currentPage,p.pageSelected());return u};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var q=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",q);this.editor.addListener("pagesPatched",q);this.editor.addListener("pageRenamed",q);this.editor.addListener("pageMoved",q);this.editor.addListener("fileLoaded",q);
-this.editor.addListener("pageSelected",mxUtils.bind(this,function(u,y){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(u,y){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
-EditorUi.prototype.scrollToPage=function(b,f){var g=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),c=null!=b?b:this.currentPage;null!=g&&null!=this.tabScroller&&this.tabScroller.children.length>g&&null!=this.tabScroller.children[g]&&(c!=this.lastScrollPage||f)&&(this.tabScroller.children[g].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[g].className="geTab gePageTab geActivePage",this.lastScrollPage=c)};
-EditorUi.prototype.restoreViewState=function(b,f,g){b=null!=b?this.getPageById(b.getId()):null;var c=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(c.setViewState(f),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+f.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+f.scrollTop,c.restoreSelection(g))};
-Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),p=parseFloat(b.getAttribute("pageHeight")),q=b.getAttribute("background"),u=this.parseBackgroundImage(b.getAttribute("backgroundImage")),y=b.getAttribute("extFonts");if(y)try{y=y.split("|").map(function(H){H=H.split("^");return{name:H[0],url:H[1]}})}catch(H){console.log("ExtFonts format error: "+H.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=q&&0<q.length?q:null,backgroundImage:u,pageScale:isNaN(g)?mxGraph.prototype.pageScale:g,pageFormat:isNaN(c)||isNaN(p)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,c,p),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:y||[]}};
-Graph.prototype.saveViewState=function(b,f,g,c,p){g||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),
-f.setAttribute("fold",null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);g=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=g&&(f.setAttribute("pageWidth",g.width),f.setAttribute("pageHeight",g.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),c=this.getBackgroundImageObject(b.backgroundImage,
+arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(u,z){u=z.getProperty("edit").changes;for(z=0;z<u.length;z++)if(u[z]instanceof RenamePage||u[z]instanceof ChangePage||u[z]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==u.length&&u[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var k=b.sizeDidChange,c=null,p=this;b.sizeDidChange=
+function(){var u=k.apply(this,arguments);null!=p.currentPage&&c!=p.currentPage&&(c=p.currentPage,p.pageSelected());return u};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var q=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",q);this.editor.addListener("pagesPatched",q);this.editor.addListener("pageRenamed",q);this.editor.addListener("pageMoved",q);this.editor.addListener("fileLoaded",q);
+this.editor.addListener("pageSelected",mxUtils.bind(this,function(u,z){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(u,z){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
+EditorUi.prototype.scrollToPage=function(b,f){var k=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),c=null!=b?b:this.currentPage;null!=k&&null!=this.tabScroller&&this.tabScroller.children.length>k&&null!=this.tabScroller.children[k]&&(c!=this.lastScrollPage||f)&&(this.tabScroller.children[k].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[k].className="geTab gePageTab geActivePage",this.lastScrollPage=c)};
+EditorUi.prototype.restoreViewState=function(b,f,k){b=null!=b?this.getPageById(b.getId()):null;var c=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(c.setViewState(f),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+f.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+f.scrollTop,c.restoreSelection(k))};
+Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),p=parseFloat(b.getAttribute("pageHeight")),q=b.getAttribute("background"),u=this.parseBackgroundImage(b.getAttribute("backgroundImage")),z=b.getAttribute("extFonts");if(z)try{z=z.split("|").map(function(G){G=G.split("^");return{name:G[0],url:G[1]}})}catch(G){console.log("ExtFonts format error: "+G.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=q&&0<q.length?q:null,backgroundImage:u,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(c)||isNaN(p)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,c,p),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:z||[]}};
+Graph.prototype.saveViewState=function(b,f,k,c,p){k||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),
+f.setAttribute("fold",null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(f.setAttribute("pageWidth",k.width),f.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),c=this.getBackgroundImageObject(b.backgroundImage,
c,p),null!=c&&f.setAttribute("backgroundImage",JSON.stringify(c)));f.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");f.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?f.removeAttribute("adaptiveColors"):f.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&f.setAttribute("extFonts",b.extFonts.map(function(q){return q.name+"^"+q.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,adaptiveColors:this.adaptiveColors,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
Graph.prototype.setViewState=function(b,f){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.adaptiveColors=b.adaptiveColors;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;
-this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var g=this.extFonts;this.extFonts=b.extFonts||[];if(f&&null!=g)for(f=0;f<g.length;f++){var c=document.getElementById("extFont_"+g[f].name);null!=c&&c.parentNode.removeChild(c)}for(f=0;f<this.extFonts.length;f++)this.addExtFont(this.extFonts[f].name,
+this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(f&&null!=k)for(f=0;f<k.length;f++){var c=document.getElementById("extFont_"+k[f].name);null!=c&&c.parentNode.removeChild(c)}for(f=0;f<this.extFonts.length;f++)this.addExtFont(this.extFonts[f].name,
this.extFonts[f].url,!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,
this.pageFormat="undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.adaptiveColors=
-null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,f,g){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=f*this.view.scale+b.scrollLeft,this.container.scrollTop=g*this.view.scale+b.scrollTop)};
-Graph.prototype.addExtFont=function(b,f,g){if(b&&f){var c="extFont_"+b;if(null==document.getElementById(c))if(0==f.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",f,null,c);else{document.getElementsByTagName("head");var p=document.createElement("style");p.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+f+'");\n}'));p.setAttribute("id",c);document.getElementsByTagName("head")[0].appendChild(p)}if(!g){null==this.extFonts&&(this.extFonts=[]);g=this.extFonts;
-c=!0;for(p=0;p<g.length;p++)if(g[p].name==b){c=!1;break}c&&this.extFonts.push({name:b,url:f})}}};
-EditorUi.prototype.updatePageRoot=function(b,f){if(null==b.root){f=this.editor.extractGraphModel(b.node,null,f);var g=Editor.extractParserError(f);if(g)throw Error(g);null!=f?(b.graphModelNode=f,b.viewState=this.editor.graph.createViewState(f),g=new mxCodec(f.ownerDocument),b.root=g.decode(f).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){f=this.editor.extractGraphModel(b.node);
-if(g=Editor.extractParserError(f))throw Error(g);null!=f&&(b.graphModelNode=f)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)f=new mxCell,f.setId("1"),b.root.insert(f),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};
-EditorUi.prototype.updateDiagramData=function(b,f){if(null==this.getPageIndex(b.page))this.insertPage(null,null,f);else{var g=new mxCodec(b.node.ownerDocument),c=new mxGraphModel;g.decode(b.node,c);g=new mxCodec(f.ownerDocument);var p=new mxGraphModel;g.decode(f,p);this.selectPage(b.page);f=this.diffCells(c.root,p.root);this.patchPage(b.page,f,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};
-EditorUi.prototype.selectPage=function(b,f,g){try{if(b!=this.currentPage){var c=this.editor.graph;c.isEditing()&&c.stopEditing(!1);f=null!=f?f:!1;c.isMouseDown=!1;c.reset();var p=c.model.createUndoableEdit();p.ignoreEdit=!0;var q=new SelectPage(this,b,g);q.execute();p.add(q);p.notify();f||c.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",p))}}catch(u){this.handleError(u)}};
+null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,f,k){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=f*this.view.scale+b.scrollLeft,this.container.scrollTop=k*this.view.scale+b.scrollTop)};
+Graph.prototype.addExtFont=function(b,f,k){if(b&&f){var c="extFont_"+b;if(null==document.getElementById(c))if(0==f.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",f,null,c);else{document.getElementsByTagName("head");var p=document.createElement("style");p.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+f+'");\n}'));p.setAttribute("id",c);document.getElementsByTagName("head")[0].appendChild(p)}if(!k){null==this.extFonts&&(this.extFonts=[]);k=this.extFonts;
+c=!0;for(p=0;p<k.length;p++)if(k[p].name==b){c=!1;break}c&&this.extFonts.push({name:b,url:f})}}};
+EditorUi.prototype.updatePageRoot=function(b,f){if(null==b.root){f=this.editor.extractGraphModel(b.node,null,f);var k=Editor.extractParserError(f);if(k)throw Error(k);null!=f?(b.graphModelNode=f,b.viewState=this.editor.graph.createViewState(f),k=new mxCodec(f.ownerDocument),b.root=k.decode(f).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){f=this.editor.extractGraphModel(b.node);
+if(k=Editor.extractParserError(f))throw Error(k);null!=f&&(b.graphModelNode=f)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)f=new mxCell,f.setId("1"),b.root.insert(f),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};
+EditorUi.prototype.updateDiagramData=function(b,f){if(null==this.getPageIndex(b.page))this.insertPage(null,null,f);else{var k=new mxCodec(b.node.ownerDocument),c=new mxGraphModel;k.decode(b.node,c);k=new mxCodec(f.ownerDocument);var p=new mxGraphModel;k.decode(f,p);this.selectPage(b.page);f=this.diffCells(c.root,p.root);this.patchPage(b.page,f,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};
+EditorUi.prototype.selectPage=function(b,f,k){try{if(b!=this.currentPage){var c=this.editor.graph;c.isEditing()&&c.stopEditing(!1);f=null!=f?f:!1;c.isMouseDown=!1;c.reset();var p=c.model.createUndoableEdit();p.ignoreEdit=!0;var q=new SelectPage(this,b,k);q.execute();p.add(q);p.notify();f||c.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",p))}}catch(u){this.handleError(u)}};
EditorUi.prototype.selectNextPage=function(b){var f=this.currentPage;null!=f&&null!=this.pages&&(f=mxUtils.indexOf(this.pages,f),b?this.selectPage(this.pages[mxUtils.mod(f+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(f-1,this.pages.length)]))};
-EditorUi.prototype.insertPage=function(b,f,g){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),g),f=null!=f?f:this.pages.length,f=new ChangePage(this,b,b,f),this.editor.graph.model.execute(f));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
-EditorUi.prototype.createPage=function(b,f,g){f=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f,g);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var g=this.pages[f].getName();null!=g&&0<g.length&&(b[g]=g)}f=this.pages.length;do g=mxResources.get("pageWithNumber",[++f]);while(null!=b[g]);return g};
-EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,g=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=g){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(g==this.pages.length-1?g--:g++,c=this.pages[g]):1>=this.pages.length&&(c=this.insertPage(),f.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,c))}finally{f.model.endUpdate()}}}catch(p){this.handleError(p)}return b};
-EditorUi.prototype.duplicatePage=function(b,f){var g=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var p=b.node.cloneNode(!1);p.removeAttribute("id");var q={},u=c.createCellLookup([c.model.root]);g=new DiagramPage(p);g.root=c.cloneCell(c.model.root,null,q);var y=new mxGraphModel;y.prefix=Editor.guid()+"-";y.setRoot(g.root);c.updateCustomLinks(c.createCellMapping(q,u),[g.root]);g.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(g);
-g.viewState.scale=1;delete g.viewState.scrollLeft;delete g.viewState.scrollTop;delete g.viewState.currentRoot;delete g.viewState.defaultParent;g.setName(f);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(H){this.handleError(H)}return g};EditorUi.prototype.initDiagramNode=function(b,f){null==f&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,f);EditorUi.removeChildNodes(b.node);b.node.appendChild(f)};
-EditorUi.prototype.clonePages=function(b){for(var f=[],g=[],c=0;c<b.length;c++)try{g.push(this.clonePage(b[c]))}catch(p){f.push(mxResources.get("pageWithNumber",[c+1])+": "+p.toString())}if(0<f.length){b=Error(f.join("\n"));try{0<g.length&&(b.fallbackFileData=this.getXmlForPages(g))}catch(p){}throw b;}return g};
-EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),g=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(g,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);f.diagramModified=b.diagramModified;return f};
-EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(g){null!=g&&0<g.length&&this.editor.graph.model.execute(new RenamePage(this,b,g))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};
+EditorUi.prototype.insertPage=function(b,f,k){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),k),f=null!=f?f:this.pages.length,f=new ChangePage(this,b,b,f),this.editor.graph.model.execute(f));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
+EditorUi.prototype.createPage=function(b,f,k){f=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f,k);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var k=this.pages[f].getName();null!=k&&0<k.length&&(b[k]=k)}f=this.pages.length;do k=mxResources.get("pageWithNumber",[++f]);while(null!=b[k]);return k};
+EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,c=this.pages[k]):1>=this.pages.length&&(c=this.insertPage(),f.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,c))}finally{f.model.endUpdate()}}}catch(p){this.handleError(p)}return b};
+EditorUi.prototype.duplicatePage=function(b,f){var k=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var p=b.node.cloneNode(!1);p.removeAttribute("id");var q={},u=c.createCellLookup([c.model.root]);k=new DiagramPage(p);k.root=c.cloneCell(c.model.root,null,q);var z=new mxGraphModel;z.prefix=Editor.guid()+"-";z.setRoot(k.root);c.updateCustomLinks(c.createCellMapping(q,u),[k.root]);k.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(k);
+k.viewState.scale=1;delete k.viewState.scrollLeft;delete k.viewState.scrollTop;delete k.viewState.currentRoot;delete k.viewState.defaultParent;k.setName(f);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(G){this.handleError(G)}return k};EditorUi.prototype.initDiagramNode=function(b,f){null==f&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,f);EditorUi.removeChildNodes(b.node);b.node.appendChild(f)};
+EditorUi.prototype.clonePages=function(b){for(var f=[],k=[],c=0;c<b.length;c++)try{k.push(this.clonePage(b[c]))}catch(p){f.push(mxResources.get("pageWithNumber",[c+1])+": "+p.toString())}if(0<f.length){b=Error(f.join("\n"));try{0<k.length&&(b.fallbackFileData=this.getXmlForPages(k))}catch(p){}throw b;}return k};
+EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);f.diagramModified=b.diagramModified;return f};
+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer geTabItem";return b};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&!this.isTabContainerVisible())this.tabContainer.style.display="none";else if(null!=this.tabContainer&&null!=this.pages){this.tabContainer.style.display="";var b=this.editor.graph,f=document.createElement("div");f.className="geTabScroller";for(var g=null,c=0;c<this.pages.length;c++)mxUtils.bind(this,function(p,q){q.className="geTab gePageTab";this.pages[p]==this.currentPage&&q.classList.add("geActivePage");q.setAttribute("draggable",
-"true");mxEvent.addListener(q,"dragstart",mxUtils.bind(this,function(u){b.isEnabled()?(mxClient.IS_FF&&u.dataTransfer.setData("Text","<diagram/>"),g=p):mxEvent.consume(u)}));mxEvent.addListener(q,"dragend",mxUtils.bind(this,function(u){g=null;u.stopPropagation();u.preventDefault()}));mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(u){null!=g&&(u.dataTransfer.dropEffect="move");u.stopPropagation();u.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(u){null!=g&&
-p!=g&&this.movePage(g,p);u.stopPropagation();u.preventDefault()}));f.appendChild(q)})(c,this.createTabForPage(this.pages[c],c+1));c=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(f);this.leftScrollTab=this.createLeftScrollTab();
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&!this.isTabContainerVisible())this.tabContainer.style.display="none";else if(null!=this.tabContainer&&null!=this.pages){this.tabContainer.style.display="";var b=this.editor.graph,f=document.createElement("div");f.className="geTabScroller";for(var k=null,c=0;c<this.pages.length;c++)mxUtils.bind(this,function(p,q){q.className="geTab gePageTab";this.pages[p]==this.currentPage&&q.classList.add("geActivePage");q.setAttribute("draggable",
+"true");mxEvent.addListener(q,"dragstart",mxUtils.bind(this,function(u){b.isEnabled()?(mxClient.IS_FF&&u.dataTransfer.setData("Text","<diagram/>"),k=p):mxEvent.consume(u)}));mxEvent.addListener(q,"dragend",mxUtils.bind(this,function(u){k=null;u.stopPropagation();u.preventDefault()}));mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(u){null!=k&&(u.dataTransfer.dropEffect="move");u.stopPropagation();u.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(u){null!=k&&
+p!=k&&this.movePage(k,p);u.stopPropagation();u.preventDefault()}));f.appendChild(q)})(c,this.createTabForPage(this.pages[c],c+1));c=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(f);this.leftScrollTab=this.createLeftScrollTab();
this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);this.tabScroller=f;this.tabScroller.scrollLeft=c;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(p){this.checkTabScrollerOverflow()}))}};
EditorUi.prototype.checkTabScrollerOverflow=function(){null!=this.tabScroller&&null!=this.tabContainer&&2<this.tabContainer.children.length&&(this.tabScroller.scrollWidth>this.tabScroller.offsetWidth?(this.leftScrollTab.style.display="",this.rightScrollTab.style.display="",0==this.tabScroller.scrollLeft?this.leftScrollTab.classList.add("mxDisabled"):this.leftScrollTab.classList.remove("mxDisabled"),Math.ceil(this.tabScroller.scrollLeft)+this.tabScroller.offsetWidth>=this.tabScroller.scrollWidth?this.rightScrollTab.classList.add("mxDisabled"):
this.rightScrollTab.classList.remove("mxDisabled")):(this.leftScrollTab.style.display="none",this.rightScrollTab.style.display="none"))};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};EditorUi.prototype.createTab=function(){var b=document.createElement("div");b.className="geTab";return b};
-EditorUi.prototype.getShortPageName=function(b){var f=null;null!=b&&(f=b.getName(),null!=f&&36<f.length&&(f=f.substring(0,34)+"..."));return f};EditorUi.prototype.createControlTab=function(b,f,g){var c=this.createTab();c.className="geTab geControlTab";null!=b&&c.setAttribute("title",b);b=document.createElement("div");b.className="geButton";b.style.backgroundImage="url("+f+")";c.appendChild(b);mxEvent.addListener(c,"click",g);return c};
+EditorUi.prototype.getShortPageName=function(b){var f=null;null!=b&&(f=b.getName(),null!=f&&36<f.length&&(f=f.substring(0,34)+"..."));return f};EditorUi.prototype.createControlTab=function(b,f,k){var c=this.createTab();c.className="geTab geControlTab";null!=b&&c.setAttribute("title",b);b=document.createElement("div");b.className="geButton";b.style.backgroundImage="url("+f+")";c.appendChild(b);mxEvent.addListener(c,"click",k);return c};
EditorUi.prototype.createPageInsertTab=function(){return this.createControlTab(mxResources.get("insertPage"),Editor.plusImage,mxUtils.bind(this,function(b){try{this.insertPage()}catch(f){this.handleError(f)}mxEvent.consume(b)}))};
EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(null,Editor.chevronLeftImage,mxUtils.bind(this,function(b){var f=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:-f,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft-=f;mxEvent.consume(b)}))};
EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,mxUtils.bind(this,function(b){var f=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:f,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=f;mxEvent.consume(b)}))};
-EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(mxUtils.bind(this,function(p,q){this.menus.get("pages").funct(p,q)}));f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});var g=mxEvent.getClientX(b),c=mxEvent.getClientY(b);f.popup(g,
-c,null,b);this.setCurrentMenu(f);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,f){var g=this.createTab(),c=b.getName()||mxResources.get("untitled"),p=b.getId();g.setAttribute("title",c+(null!=p?" ("+p+")":"")+" ["+f+"]");f=document.createElement("span");f.style.maxWidth="160px";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,c);g.appendChild(f);this.addTabListeners(b,g);return g};
-EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var g=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(H){this.renamePage(b);mxEvent.consume(H)}));var c=document.createElement("div");c.style.backgroundImage="url("+Editor.thinExpandImage+")";c.className="geButton";f.appendChild(c);var p=!1,q=!1,u=mxUtils.bind(this,function(H){p=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||q||this.selectPage(b)}),y=mxUtils.bind(this,
-function(H){if(!g.isMouseDown&&(q&&(mxEvent.isTouchEvent(H)||mxEvent.getSource(H)==c)||mxEvent.isPopupTrigger(H))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(H)||!p)){var E=new mxPopupMenu(this.createPageMenu(b));E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var F=mxEvent.getClientX(H),d=mxEvent.getClientY(H);E.popup(F,d,null,H);
-this.setCurrentMenu(E,f)}mxEvent.consume(H)});mxEvent.addGestureListeners(c,u,null,y);mxEvent.addGestureListeners(f,u,null,y)};
-EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(g,c){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||g.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),c));this.editor.graph.isEnabled()&&(g.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",
-[b.getName()]))}),c),g.addSeparator(c),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",g,c,mxResources.get("move")),g.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c),g.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),c))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,p,q,u,y){p=null!=p?p:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var H=q.slice(),E=0;E<q.length;E++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[E]),"treeFolding","0")&&this.foldTreeCell(c,q[E]);q=H;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(c,p){this.model.beginUpdate();try{var q=
-[];this.traverse(p,!0,mxUtils.bind(this,function(y,H){var E=null!=H&&this.isTreeEdge(H);E&&q.push(H);y==p||null!=H&&!E||q.push(y);return(null==H||E)&&(y==p||!this.model.isCollapsed(y))}));this.model.setCollapsed(p,c);for(var u=0;u<q.length;u++)this.model.setVisible(q[u],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,p,q,u,y,H){return this.model.filterCells(this.getEdges(c,p,q,u,y,H),mxUtils.bind(this,
+EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(mxUtils.bind(this,function(p,q){this.menus.get("pages").funct(p,q)}));f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});var k=mxEvent.getClientX(b),c=mxEvent.getClientY(b);f.popup(k,
+c,null,b);this.setCurrentMenu(f);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,f){var k=this.createTab(),c=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",c+(null!=p?" ("+p+")":"")+" ["+f+"]");f=document.createElement("span");f.style.maxWidth="160px";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,c);k.appendChild(f);this.addTabListeners(b,k);return k};
+EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var k=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(G){this.renamePage(b);mxEvent.consume(G)}));var c=document.createElement("div");c.style.backgroundImage="url("+Editor.thinExpandImage+")";c.className="geButton";f.appendChild(c);var p=!1,q=!1,u=mxUtils.bind(this,function(G){p=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);k.isMouseDown||q||this.selectPage(b)}),z=mxUtils.bind(this,
+function(G){if(!k.isMouseDown&&(q&&(mxEvent.isTouchEvent(G)||mxEvent.getSource(G)==c)||mxEvent.isPopupTrigger(G))&&(k.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(G)||!p)){var E=new mxPopupMenu(this.createPageMenu(b));E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var F=mxEvent.getClientX(G),d=mxEvent.getClientY(G);E.popup(F,d,null,G);
+this.setCurrentMenu(E,f)}mxEvent.consume(G)});mxEvent.addGestureListeners(c,u,null,z);mxEvent.addGestureListeners(f,u,null,z)};
+EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(k,c){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),c));this.editor.graph.isEnabled()&&(k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",
+[b.getName()]))}),c),k.addSeparator(c),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",k,c,mxResources.get("move")),k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c),k.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),c))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,p,q,u,z){p=null!=p?p:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var G=q.slice(),E=0;E<q.length;E++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[E]),"treeFolding","0")&&this.foldTreeCell(c,q[E]);q=G;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(c,p){this.model.beginUpdate();try{var q=
+[];this.traverse(p,!0,mxUtils.bind(this,function(z,G){var E=null!=G&&this.isTreeEdge(G);E&&q.push(G);z==p||null!=G&&!E||q.push(z);return(null==G||E)&&(z==p||!this.model.isCollapsed(z))}));this.model.setCollapsed(p,c);for(var u=0;u<q.length;u++)this.model.setVisible(q[u],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,p,q,u,z,G){return this.model.filterCells(this.getEdges(c,p,q,u,z,G),mxUtils.bind(this,
function(E){return this.isTreeEdge(E)}))};Graph.prototype.getIncomingTreeEdges=function(c,p){return this.getTreeEdges(c,p,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,p){return this.getTreeEdges(c,p,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(K){return x.isVertex(K)&&q(K)}function p(K){var m=!1;null!=K&&(m="1"==
-n.getCurrentCellStyle(K).treeMoving);return m}function q(K){var m=!1;null!=K&&(K=x.getParent(K),m=n.view.getState(K),m="tree"==(null!=m?m.style:n.getCellStyle(K)).containerType);return m}function u(K){var m=!1;null!=K&&(K=x.getParent(K),m=n.view.getState(K),n.view.getState(K),m=null!=(null!=m?m.style:n.getCellStyle(K)).childLayout);return m}function y(K){K=n.view.getState(K);if(null!=K){var m=n.getIncomingTreeEdges(K.cell);if(0<m.length&&(m=n.view.getState(m[0]),null!=m&&(m=m.absolutePoints,null!=
-m&&0<m.length&&(m=m[m.length-1],null!=m)))){if(m.y==K.y&&Math.abs(m.x-K.getCenterX())<K.width/2)return mxConstants.DIRECTION_SOUTH;if(m.y==K.y+K.height&&Math.abs(m.x-K.getCenterX())<K.width/2)return mxConstants.DIRECTION_NORTH;if(m.x>K.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function H(K,m){m=null!=m?m:!0;n.model.beginUpdate();try{var t=n.model.getParent(K),D=n.getIncomingTreeEdges(K),M=n.cloneCells([D[0],K]);n.model.setTerminal(M[0],n.model.getTerminal(D[0],
-!0),!0);var L=y(K),O=t.geometry;L==mxConstants.DIRECTION_SOUTH||L==mxConstants.DIRECTION_NORTH?M[1].geometry.x+=m?K.geometry.width+10:-M[1].geometry.width-10:M[1].geometry.y+=m?K.geometry.height+10:-M[1].geometry.height-10;n.view.currentRoot!=t&&(M[1].geometry.x-=O.x,M[1].geometry.y-=O.y);var P=n.view.getState(K),U=n.view.scale;if(null!=P){var V=mxRectangle.fromRectangle(P);L==mxConstants.DIRECTION_SOUTH||L==mxConstants.DIRECTION_NORTH?V.x+=(m?K.geometry.width+10:-M[1].geometry.width-10)*U:V.y+=(m?
-K.geometry.height+10:-M[1].geometry.height-10)*U;var X=n.getOutgoingTreeEdges(n.model.getTerminal(D[0],!0));if(null!=X){for(var W=L==mxConstants.DIRECTION_SOUTH||L==mxConstants.DIRECTION_NORTH,Y=O=D=0;Y<X.length;Y++){var Z=n.model.getTerminal(X[Y],!1);if(L==y(Z)){var aa=n.view.getState(Z);Z!=K&&null!=aa&&(W&&m!=aa.getCenterX()<P.getCenterX()||!W&&m!=aa.getCenterY()<P.getCenterY())&&mxUtils.intersects(V,aa)&&(D=10+Math.max(D,(Math.min(V.x+V.width,aa.x+aa.width)-Math.max(V.x,aa.x))/U),O=10+Math.max(O,
-(Math.min(V.y+V.height,aa.y+aa.height)-Math.max(V.y,aa.y))/U))}}W?O=0:D=0;for(Y=0;Y<X.length;Y++)if(Z=n.model.getTerminal(X[Y],!1),L==y(Z)&&(aa=n.view.getState(Z),Z!=K&&null!=aa&&(W&&m!=aa.getCenterX()<P.getCenterX()||!W&&m!=aa.getCenterY()<P.getCenterY()))){var fa=[];n.traverse(aa.cell,!0,function(ea,ca){var ha=null!=ca&&n.isTreeEdge(ca);ha&&fa.push(ca);(null==ca||ha)&&fa.push(ea);return null==ca||ha});n.moveCells(fa,(m?1:-1)*D,(m?1:-1)*O)}}}return n.addCells(M,t)}finally{n.model.endUpdate()}}function E(K){n.model.beginUpdate();
-try{var m=y(K),t=n.getIncomingTreeEdges(K),D=n.cloneCells([t[0],K]);n.model.setTerminal(t[0],D[1],!1);n.model.setTerminal(D[0],D[1],!0);n.model.setTerminal(D[0],K,!1);var M=n.model.getParent(K),L=M.geometry,O=[];n.view.currentRoot!=M&&(D[1].geometry.x-=L.x,D[1].geometry.y-=L.y);n.traverse(K,!0,function(V,X){var W=null!=X&&n.isTreeEdge(X);W&&O.push(X);(null==X||W)&&O.push(V);return null==X||W});var P=K.geometry.width+40,U=K.geometry.height+40;m==mxConstants.DIRECTION_SOUTH?P=0:m==mxConstants.DIRECTION_NORTH?
-(P=0,U=-U):m==mxConstants.DIRECTION_WEST?(P=-P,U=0):m==mxConstants.DIRECTION_EAST&&(U=0);n.moveCells(O,P,U);return n.addCells(D,M)}finally{n.model.endUpdate()}}function F(K,m){n.model.beginUpdate();try{var t=n.model.getParent(K),D=n.getIncomingTreeEdges(K),M=y(K);0==D.length&&(D=[n.createEdge(t,null,"",null,null,n.createCurrentEdgeStyle())],M=m);var L=n.cloneCells([D[0],K]);n.model.setTerminal(L[0],K,!0);null==n.model.getTerminal(L[0],!1)&&(n.model.setTerminal(L[0],L[1],!1),n.applyNewEdgeStyle(L[1],
-[L[0]],M));D=n.getOutgoingTreeEdges(K);var O=t.geometry;m=[];n.view.currentRoot==t&&(O=new mxRectangle);for(var P=0;P<D.length;P++){var U=n.model.getTerminal(D[P],!1);null!=U&&m.push(U)}var V=n.view.getBounds(m),X=n.view.translate,W=n.view.scale;M==mxConstants.DIRECTION_SOUTH?(L[1].geometry.x=null==V?K.geometry.x+(K.geometry.width-L[1].geometry.width)/2:(V.x+V.width)/W-X.x-O.x+10,L[1].geometry.y+=L[1].geometry.height-O.y+40):M==mxConstants.DIRECTION_NORTH?(L[1].geometry.x=null==V?K.geometry.x+(K.geometry.width-
-L[1].geometry.width)/2:(V.x+V.width)/W-X.x+-O.x+10,L[1].geometry.y-=L[1].geometry.height+O.y+40):(L[1].geometry.x=M==mxConstants.DIRECTION_WEST?L[1].geometry.x-(L[1].geometry.width+O.x+40):L[1].geometry.x+(L[1].geometry.width-O.x+40),L[1].geometry.y=null==V?K.geometry.y+(K.geometry.height-L[1].geometry.height)/2:(V.y+V.height)/W-X.y+-O.y+10);return n.addCells(L,t)}finally{n.model.endUpdate()}}function d(K,m,t){K=n.getOutgoingTreeEdges(K);t=n.view.getState(t);var D=[];if(null!=t&&null!=K){for(var M=
-0;M<K.length;M++){var L=n.view.getState(n.model.getTerminal(K[M],!1));null!=L&&(!m&&Math.min(L.x+L.width,t.x+t.width)>=Math.max(L.x,t.x)||m&&Math.min(L.y+L.height,t.y+t.height)>=Math.max(L.y,t.y))&&D.push(L)}D.sort(function(O,P){return m?O.x+O.width-P.x-P.width:O.y+O.height-P.y-P.height})}return D}function k(K,m){var t=y(K),D=m==mxConstants.DIRECTION_EAST||m==mxConstants.DIRECTION_WEST;(t==mxConstants.DIRECTION_EAST||t==mxConstants.DIRECTION_WEST)==D&&t!=m?l.actions.get("selectParent").funct():t==
-m?(m=n.getOutgoingTreeEdges(K),null!=m&&0<m.length&&n.setSelectionCell(n.model.getTerminal(m[0],!1))):(t=n.getIncomingTreeEdges(K),null!=t&&0<t.length&&(D=d(n.model.getTerminal(t[0],!0),D,K),K=n.view.getState(K),null!=K&&(K=mxUtils.indexOf(D,K),0<=K&&(K+=m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_WEST?-1:1,0<=K&&K<=D.length-1&&n.setSelectionCell(D[K].cell)))))}var l=this,n=l.editor.graph,x=n.getModel(),A=l.menus.createPopupMenu;l.menus.createPopupMenu=function(K,m,t){A.apply(this,arguments);
-if(1==n.getSelectionCount()){m=n.getSelectionCell();var D=n.getOutgoingTreeEdges(m);K.addSeparator();0<D.length&&(c(n.getSelectionCell())&&this.addMenuItems(K,["selectChildren"],null,t),this.addMenuItems(K,["selectDescendants"],null,t));c(n.getSelectionCell())?(K.addSeparator(),0<n.getIncomingTreeEdges(m).length&&this.addMenuItems(K,["selectSiblings","selectParent"],null,t)):0<n.model.getEdgeCount(m)&&this.addMenuItems(K,["selectConnections"],null,t)}};l.actions.addAction("selectChildren",function(K){if(n.isEnabled()&&
-1==n.getSelectionCount()){var m=n.getSelectionCell();K=mxEvent.isControlDown(K)?null:n.getOutgoingTreeEdges(m);if(null!=K&&0<K.length){m=[];for(var t=0;t<K.length;t++)m.push(n.model.getTerminal(K[t],!1));n.setSelectionCells(m)}else n.setSelectionCells(n.model.getChildren(m))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");l.actions.addAction("selectDescendants",function(K){var m=n.getSelectionCell();if(n.isEnabled()&&null!=m){var t=[];mxEvent.isControlDown(K)||n.traverse(m,!0,function(D,M){var L=
-null!=M&&n.isTreeEdge(M);L&&mxEvent.isControlDown(K)&&t.push(M);(null==M||L)&&t.push(D);return null==M||L});if(0==t.length||1==t.length&&t[0]==m)t=n.model.getDescendants(m);n.setSelectionCells(t)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");l.actions.addAction("selectParent",function(K){var m=n.getSelectionCell();n.isEnabled()&&null!=m&&(K=mxEvent.isControlDown(K)?null:n.getIncomingTreeEdges(m),null!=K&&0<K.length?n.setSelectionCell(n.model.getTerminal(K[0],!0)):n.selectParentCell())},null,
-null,Editor.altKey+"+"+Editor.shiftKey+"+P");l.actions.addAction("selectSiblings",function(K){if(n.isEnabled()&&1==n.getSelectionCount()){var m=n.getSelectionCell(),t=mxEvent.isControlDown(K)?null:n.getIncomingTreeEdges(m);K=[];if(null!=t&&0<t.length&&(t=n.getOutgoingTreeEdges(n.model.getTerminal(t[0],!0)),null!=t))for(var D=0;D<t.length;D++)K.push(n.model.getTerminal(t[D],!1));0==K.length&&(K=n.model.getChildren(n.model.getParent(m)));n.setSelectionCells(K)}},null,null,Editor.altKey+"+"+Editor.shiftKey+
-"+S");var B=n.removeCells;n.removeCells=function(K,m){m=null!=m?m:!0;null==K&&(K=this.getDeletableCells(this.getSelectionCells()));m&&(K=this.getDeletableCells(this.addAllEdges(K)));for(var t=[],D=0;D<K.length;D++){var M=K[D];x.isEdge(M)&&q(M)&&(t.push(M),M=x.getTerminal(M,!1));if(c(M)){var L=[];n.traverse(M,!0,function(O,P){var U=null!=P&&n.isTreeEdge(P);U&&L.push(P);(null==P||U)&&L.push(O);return null==P||U});0<L.length&&(t=t.concat(L),M=n.getIncomingTreeEdges(K[D]),K=K.concat(M))}else null!=M&&
-t.push(K[D])}K=t;return B.apply(this,arguments)};l.hoverIcons.getStateAt=function(K,m,t){return c(K.cell)?null:this.graph.view.getState(this.graph.getCellAt(m,t))};var I=n.duplicateCells;n.duplicateCells=function(K,m){K=null!=K?K:this.getSelectionCells();for(var t=K.slice(0),D=0;D<t.length;D++){var M=n.view.getState(t[D]);if(null!=M&&c(M.cell)){var L=n.getIncomingTreeEdges(M.cell);for(M=0;M<L.length;M++)mxUtils.remove(L[M],K)}}this.model.beginUpdate();try{var O=I.call(this,K,m);if(O.length==K.length)for(D=
-0;D<K.length;D++)if(c(K[D])){var P=n.getIncomingTreeEdges(O[D]);L=n.getIncomingTreeEdges(K[D]);if(0==P.length&&0<L.length){var U=this.cloneCell(L[0]);this.addEdge(U,n.getDefaultParent(),this.model.getTerminal(L[0],!0),O[D])}}}finally{this.model.endUpdate()}return O};var G=n.moveCells;n.moveCells=function(K,m,t,D,M,L,O){for(var P=null,U=[],V=0;V<K.length;V++)(p(K[V])||c(K[V]))&&!u(K[V])&&this.isCellCollapsed(K[V])?U=U.concat(this.getSubtree(K[V])):U.push(K[V]);K=mxUtils.removeDuplicates(U);this.model.beginUpdate();
-try{U=M;var X=this.getCurrentCellStyle(M);if(null!=K&&c(M)&&"1"==mxUtils.getValue(X,"treeFolding","0")){for(V=0;V<K.length;V++)if(c(K[V])||n.model.isEdge(K[V])&&null==n.model.getTerminal(K[V],!0)){M=n.model.getParent(K[V]);break}if(null!=U&&M!=U&&null!=this.view.getState(K[0])){var W=n.getIncomingTreeEdges(K[0]);if(0<W.length){var Y=n.view.getState(n.model.getTerminal(W[0],!0));if(null!=Y){var Z=n.view.getState(U);null!=Z&&(m=(Z.getCenterX()-Y.getCenterX())/n.view.scale,t=(Z.getCenterY()-Y.getCenterY())/
-n.view.scale)}}}}P=G.apply(this,arguments);if(null!=P&&null!=K&&P.length==K.length)for(V=0;V<P.length;V++)if(this.model.isEdge(P[V]))c(U)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[V],!0))&&this.model.setTerminal(P[V],U,!0);else if(c(K[V])&&(W=n.getIncomingTreeEdges(K[V]),0<W.length))if(!D)c(U)&&0>mxUtils.indexOf(K,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],U,!0);else if(0==n.getIncomingTreeEdges(P[V]).length){X=U;if(null==X||X==n.model.getParent(K[V]))X=n.model.getTerminal(W[0],
-!0);D=this.cloneCell(W[0]);this.addEdge(D,n.getDefaultParent(),X,P[V])}}finally{this.model.endUpdate()}return P};if(null!=l.sidebar){var C=l.sidebar.dropAndConnect;l.sidebar.dropAndConnect=function(K,m,t,D){var M=n.model,L=null;M.beginUpdate();try{if(L=C.apply(this,arguments),c(K))for(var O=0;O<L.length;O++)if(M.isEdge(L[O])&&null==M.getTerminal(L[O],!0)){M.setTerminal(L[O],K,!0);var P=n.getCellGeometry(L[O]);P.points=null;null!=P.getTerminalPoint(!0)&&P.setTerminalPoint(null,!0)}}finally{M.endUpdate()}return L}}var R=
-{67:l.actions.get("selectChildren"),88:l.actions.get("selectDescendants"),80:l.actions.get("selectParent"),83:l.actions.get("selectSiblings")},T={67:l.actions.get("copyStyle"),86:l.actions.get("pasteStyle")},S=l.onKeyDown;l.onKeyDown=function(K){try{var m=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=m){var t=mxEvent.isAltDown(K)&&mxEvent.isShiftDown(K)?R[K.keyCode]:mxEvent.isAltDown(K)?T[K.keyCode]:null;null!=t?(t.funct(K),mxEvent.consume(K)):c(m)&&(t=null,0<n.getIncomingTreeEdges(m).length&&
-(9==K.which?t=mxEvent.isShiftDown(K)?E(m):F(m):13==K.which&&(t=H(m,!mxEvent.isShiftDown(K)))),null!=t&&0<t.length?(1==t.length&&n.model.isEdge(t[0])?n.setSelectionCell(n.model.getTerminal(t[0],!1)):n.setSelectionCell(t[t.length-1]),null!=l.hoverIcons&&l.hoverIcons.update(n.view.getState(m)),n.startEditingAtCell(m),mxEvent.consume(K)):37==K.keyCode?(k(m,mxConstants.DIRECTION_WEST),mxEvent.consume(K)):38==K.keyCode?(k(m,mxConstants.DIRECTION_NORTH),mxEvent.consume(K)):39==K.keyCode?(k(m,mxConstants.DIRECTION_EAST),
-mxEvent.consume(K)):40==K.keyCode&&(k(m,mxConstants.DIRECTION_SOUTH),mxEvent.consume(K)))}}catch(D){l.handleError(D)}mxEvent.isConsumed(K)||S.apply(this,arguments)};var Q=n.connectVertex;n.connectVertex=function(K,m,t,D,M,L,O){var P=n.getIncomingTreeEdges(K);if(c(K)){var U=y(K),V=U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST,X=m==mxConstants.DIRECTION_EAST||m==mxConstants.DIRECTION_WEST;return U==m||0==P.length?F(K,m):V==X?E(K):H(K,m!=mxConstants.DIRECTION_NORTH&&m!=mxConstants.DIRECTION_WEST)}return Q.apply(this,
-arguments)};n.getSubtree=function(K){var m=[K];!p(K)&&!c(K)||u(K)||n.traverse(K,!0,function(t,D){var M=null!=D&&n.isTreeEdge(D);M&&0>mxUtils.indexOf(m,D)&&m.push(D);(null==D||M)&&0>mxUtils.indexOf(m,t)&&m.push(t);return null==D||M});return m};var v=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){v.apply(this,arguments);(p(this.state.cell)||c(this.state.cell))&&!u(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?
+n.getCurrentCellStyle(K).treeMoving);return m}function q(K){var m=!1;null!=K&&(K=x.getParent(K),m=n.view.getState(K),m="tree"==(null!=m?m.style:n.getCellStyle(K)).containerType);return m}function u(K){var m=!1;null!=K&&(K=x.getParent(K),m=n.view.getState(K),n.view.getState(K),m=null!=(null!=m?m.style:n.getCellStyle(K)).childLayout);return m}function z(K){K=n.view.getState(K);if(null!=K){var m=n.getIncomingTreeEdges(K.cell);if(0<m.length&&(m=n.view.getState(m[0]),null!=m&&(m=m.absolutePoints,null!=
+m&&0<m.length&&(m=m[m.length-1],null!=m)))){if(m.y==K.y&&Math.abs(m.x-K.getCenterX())<K.width/2)return mxConstants.DIRECTION_SOUTH;if(m.y==K.y+K.height&&Math.abs(m.x-K.getCenterX())<K.width/2)return mxConstants.DIRECTION_NORTH;if(m.x>K.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function G(K,m){m=null!=m?m:!0;n.model.beginUpdate();try{var t=n.model.getParent(K),C=n.getIncomingTreeEdges(K),N=n.cloneCells([C[0],K]);n.model.setTerminal(N[0],n.model.getTerminal(C[0],
+!0),!0);var M=z(K),O=t.geometry;M==mxConstants.DIRECTION_SOUTH||M==mxConstants.DIRECTION_NORTH?N[1].geometry.x+=m?K.geometry.width+10:-N[1].geometry.width-10:N[1].geometry.y+=m?K.geometry.height+10:-N[1].geometry.height-10;n.view.currentRoot!=t&&(N[1].geometry.x-=O.x,N[1].geometry.y-=O.y);var Q=n.view.getState(K),T=n.view.scale;if(null!=Q){var V=mxRectangle.fromRectangle(Q);M==mxConstants.DIRECTION_SOUTH||M==mxConstants.DIRECTION_NORTH?V.x+=(m?K.geometry.width+10:-N[1].geometry.width-10)*T:V.y+=(m?
+K.geometry.height+10:-N[1].geometry.height-10)*T;var X=n.getOutgoingTreeEdges(n.model.getTerminal(C[0],!0));if(null!=X){for(var W=M==mxConstants.DIRECTION_SOUTH||M==mxConstants.DIRECTION_NORTH,Y=O=C=0;Y<X.length;Y++){var Z=n.model.getTerminal(X[Y],!1);if(M==z(Z)){var aa=n.view.getState(Z);Z!=K&&null!=aa&&(W&&m!=aa.getCenterX()<Q.getCenterX()||!W&&m!=aa.getCenterY()<Q.getCenterY())&&mxUtils.intersects(V,aa)&&(C=10+Math.max(C,(Math.min(V.x+V.width,aa.x+aa.width)-Math.max(V.x,aa.x))/T),O=10+Math.max(O,
+(Math.min(V.y+V.height,aa.y+aa.height)-Math.max(V.y,aa.y))/T))}}W?O=0:C=0;for(Y=0;Y<X.length;Y++)if(Z=n.model.getTerminal(X[Y],!1),M==z(Z)&&(aa=n.view.getState(Z),Z!=K&&null!=aa&&(W&&m!=aa.getCenterX()<Q.getCenterX()||!W&&m!=aa.getCenterY()<Q.getCenterY()))){var ja=[];n.traverse(aa.cell,!0,function(ea,ca){var ka=null!=ca&&n.isTreeEdge(ca);ka&&ja.push(ca);(null==ca||ka)&&ja.push(ea);return null==ca||ka});n.moveCells(ja,(m?1:-1)*C,(m?1:-1)*O)}}}return n.addCells(N,t)}finally{n.model.endUpdate()}}function E(K){n.model.beginUpdate();
+try{var m=z(K),t=n.getIncomingTreeEdges(K),C=n.cloneCells([t[0],K]);n.model.setTerminal(t[0],C[1],!1);n.model.setTerminal(C[0],C[1],!0);n.model.setTerminal(C[0],K,!1);var N=n.model.getParent(K),M=N.geometry,O=[];n.view.currentRoot!=N&&(C[1].geometry.x-=M.x,C[1].geometry.y-=M.y);n.traverse(K,!0,function(V,X){var W=null!=X&&n.isTreeEdge(X);W&&O.push(X);(null==X||W)&&O.push(V);return null==X||W});var Q=K.geometry.width+40,T=K.geometry.height+40;m==mxConstants.DIRECTION_SOUTH?Q=0:m==mxConstants.DIRECTION_NORTH?
+(Q=0,T=-T):m==mxConstants.DIRECTION_WEST?(Q=-Q,T=0):m==mxConstants.DIRECTION_EAST&&(T=0);n.moveCells(O,Q,T);return n.addCells(C,N)}finally{n.model.endUpdate()}}function F(K,m){n.model.beginUpdate();try{var t=n.model.getParent(K),C=n.getIncomingTreeEdges(K),N=z(K);0==C.length&&(C=[n.createEdge(t,null,"",null,null,n.createCurrentEdgeStyle())],N=m);var M=n.cloneCells([C[0],K]);n.model.setTerminal(M[0],K,!0);null==n.model.getTerminal(M[0],!1)&&(n.model.setTerminal(M[0],M[1],!1),n.applyNewEdgeStyle(M[1],
+[M[0]],N));C=n.getOutgoingTreeEdges(K);var O=t.geometry;m=[];n.view.currentRoot==t&&(O=new mxRectangle);for(var Q=0;Q<C.length;Q++){var T=n.model.getTerminal(C[Q],!1);null!=T&&m.push(T)}var V=n.view.getBounds(m),X=n.view.translate,W=n.view.scale;N==mxConstants.DIRECTION_SOUTH?(M[1].geometry.x=null==V?K.geometry.x+(K.geometry.width-M[1].geometry.width)/2:(V.x+V.width)/W-X.x-O.x+10,M[1].geometry.y+=M[1].geometry.height-O.y+40):N==mxConstants.DIRECTION_NORTH?(M[1].geometry.x=null==V?K.geometry.x+(K.geometry.width-
+M[1].geometry.width)/2:(V.x+V.width)/W-X.x+-O.x+10,M[1].geometry.y-=M[1].geometry.height+O.y+40):(M[1].geometry.x=N==mxConstants.DIRECTION_WEST?M[1].geometry.x-(M[1].geometry.width+O.x+40):M[1].geometry.x+(M[1].geometry.width-O.x+40),M[1].geometry.y=null==V?K.geometry.y+(K.geometry.height-M[1].geometry.height)/2:(V.y+V.height)/W-X.y+-O.y+10);return n.addCells(M,t)}finally{n.model.endUpdate()}}function d(K,m,t){K=n.getOutgoingTreeEdges(K);t=n.view.getState(t);var C=[];if(null!=t&&null!=K){for(var N=
+0;N<K.length;N++){var M=n.view.getState(n.model.getTerminal(K[N],!1));null!=M&&(!m&&Math.min(M.x+M.width,t.x+t.width)>=Math.max(M.x,t.x)||m&&Math.min(M.y+M.height,t.y+t.height)>=Math.max(M.y,t.y))&&C.push(M)}C.sort(function(O,Q){return m?O.x+O.width-Q.x-Q.width:O.y+O.height-Q.y-Q.height})}return C}function g(K,m){var t=z(K),C=m==mxConstants.DIRECTION_EAST||m==mxConstants.DIRECTION_WEST;(t==mxConstants.DIRECTION_EAST||t==mxConstants.DIRECTION_WEST)==C&&t!=m?l.actions.get("selectParent").funct():t==
+m?(m=n.getOutgoingTreeEdges(K),null!=m&&0<m.length&&n.setSelectionCell(n.model.getTerminal(m[0],!1))):(t=n.getIncomingTreeEdges(K),null!=t&&0<t.length&&(C=d(n.model.getTerminal(t[0],!0),C,K),K=n.view.getState(K),null!=K&&(K=mxUtils.indexOf(C,K),0<=K&&(K+=m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_WEST?-1:1,0<=K&&K<=C.length-1&&n.setSelectionCell(C[K].cell)))))}var l=this,n=l.editor.graph,x=n.getModel(),A=l.menus.createPopupMenu;l.menus.createPopupMenu=function(K,m,t){A.apply(this,arguments);
+if(1==n.getSelectionCount()){m=n.getSelectionCell();var C=n.getOutgoingTreeEdges(m);K.addSeparator();0<C.length&&(c(n.getSelectionCell())&&this.addMenuItems(K,["selectChildren"],null,t),this.addMenuItems(K,["selectDescendants"],null,t));c(n.getSelectionCell())?(K.addSeparator(),0<n.getIncomingTreeEdges(m).length&&this.addMenuItems(K,["selectSiblings","selectParent"],null,t)):0<n.model.getEdgeCount(m)&&this.addMenuItems(K,["selectConnections"],null,t)}};l.actions.addAction("selectChildren",function(K){if(n.isEnabled()&&
+1==n.getSelectionCount()){var m=n.getSelectionCell();K=mxEvent.isControlDown(K)?null:n.getOutgoingTreeEdges(m);if(null!=K&&0<K.length){m=[];for(var t=0;t<K.length;t++)m.push(n.model.getTerminal(K[t],!1));n.setSelectionCells(m)}else n.setSelectionCells(n.model.getChildren(m))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");l.actions.addAction("selectDescendants",function(K){var m=n.getSelectionCell();if(n.isEnabled()&&null!=m){var t=[];mxEvent.isControlDown(K)||n.traverse(m,!0,function(C,N){var M=
+null!=N&&n.isTreeEdge(N);M&&mxEvent.isControlDown(K)&&t.push(N);(null==N||M)&&t.push(C);return null==N||M});if(0==t.length||1==t.length&&t[0]==m)t=n.model.getDescendants(m);n.setSelectionCells(t)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");l.actions.addAction("selectParent",function(K){var m=n.getSelectionCell();n.isEnabled()&&null!=m&&(K=mxEvent.isControlDown(K)?null:n.getIncomingTreeEdges(m),null!=K&&0<K.length?n.setSelectionCell(n.model.getTerminal(K[0],!0)):n.selectParentCell())},null,
+null,Editor.altKey+"+"+Editor.shiftKey+"+P");l.actions.addAction("selectSiblings",function(K){if(n.isEnabled()&&1==n.getSelectionCount()){var m=n.getSelectionCell(),t=mxEvent.isControlDown(K)?null:n.getIncomingTreeEdges(m);K=[];if(null!=t&&0<t.length&&(t=n.getOutgoingTreeEdges(n.model.getTerminal(t[0],!0)),null!=t))for(var C=0;C<t.length;C++)K.push(n.model.getTerminal(t[C],!1));0==K.length&&(K=n.model.getChildren(n.model.getParent(m)));n.setSelectionCells(K)}},null,null,Editor.altKey+"+"+Editor.shiftKey+
+"+S");var B=n.removeCells;n.removeCells=function(K,m){m=null!=m?m:!0;null==K&&(K=this.getDeletableCells(this.getSelectionCells()));m&&(K=this.getDeletableCells(this.addAllEdges(K)));for(var t=[],C=0;C<K.length;C++){var N=K[C];x.isEdge(N)&&q(N)&&(t.push(N),N=x.getTerminal(N,!1));if(c(N)){var M=[];n.traverse(N,!0,function(O,Q){var T=null!=Q&&n.isTreeEdge(Q);T&&M.push(Q);(null==Q||T)&&M.push(O);return null==Q||T});0<M.length&&(t=t.concat(M),N=n.getIncomingTreeEdges(K[C]),K=K.concat(N))}else null!=N&&
+t.push(K[C])}K=t;return B.apply(this,arguments)};l.hoverIcons.getStateAt=function(K,m,t){return c(K.cell)?null:this.graph.view.getState(this.graph.getCellAt(m,t))};var I=n.duplicateCells;n.duplicateCells=function(K,m){K=null!=K?K:this.getSelectionCells();for(var t=K.slice(0),C=0;C<t.length;C++){var N=n.view.getState(t[C]);if(null!=N&&c(N.cell)){var M=n.getIncomingTreeEdges(N.cell);for(N=0;N<M.length;N++)mxUtils.remove(M[N],K)}}this.model.beginUpdate();try{var O=I.call(this,K,m);if(O.length==K.length)for(C=
+0;C<K.length;C++)if(c(K[C])){var Q=n.getIncomingTreeEdges(O[C]);M=n.getIncomingTreeEdges(K[C]);if(0==Q.length&&0<M.length){var T=this.cloneCell(M[0]);this.addEdge(T,n.getDefaultParent(),this.model.getTerminal(M[0],!0),O[C])}}}finally{this.model.endUpdate()}return O};var H=n.moveCells;n.moveCells=function(K,m,t,C,N,M,O){for(var Q=null,T=[],V=0;V<K.length;V++)(p(K[V])||c(K[V]))&&!u(K[V])&&this.isCellCollapsed(K[V])?T=T.concat(this.getSubtree(K[V])):T.push(K[V]);K=mxUtils.removeDuplicates(T);this.model.beginUpdate();
+try{T=N;var X=this.getCurrentCellStyle(N);if(null!=K&&c(N)&&"1"==mxUtils.getValue(X,"treeFolding","0")){for(V=0;V<K.length;V++)if(c(K[V])||n.model.isEdge(K[V])&&null==n.model.getTerminal(K[V],!0)){N=n.model.getParent(K[V]);break}if(null!=T&&N!=T&&null!=this.view.getState(K[0])){var W=n.getIncomingTreeEdges(K[0]);if(0<W.length){var Y=n.view.getState(n.model.getTerminal(W[0],!0));if(null!=Y){var Z=n.view.getState(T);null!=Z&&(m=(Z.getCenterX()-Y.getCenterX())/n.view.scale,t=(Z.getCenterY()-Y.getCenterY())/
+n.view.scale)}}}}Q=H.apply(this,arguments);if(null!=Q&&null!=K&&Q.length==K.length)for(V=0;V<Q.length;V++)if(this.model.isEdge(Q[V]))c(T)&&0>mxUtils.indexOf(Q,this.model.getTerminal(Q[V],!0))&&this.model.setTerminal(Q[V],T,!0);else if(c(K[V])&&(W=n.getIncomingTreeEdges(K[V]),0<W.length))if(!C)c(T)&&0>mxUtils.indexOf(K,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],T,!0);else if(0==n.getIncomingTreeEdges(Q[V]).length){X=T;if(null==X||X==n.model.getParent(K[V]))X=n.model.getTerminal(W[0],
+!0);C=this.cloneCell(W[0]);this.addEdge(C,n.getDefaultParent(),X,Q[V])}}finally{this.model.endUpdate()}return Q};if(null!=l.sidebar){var D=l.sidebar.dropAndConnect;l.sidebar.dropAndConnect=function(K,m,t,C){var N=n.model,M=null;N.beginUpdate();try{if(M=D.apply(this,arguments),c(K))for(var O=0;O<M.length;O++)if(N.isEdge(M[O])&&null==N.getTerminal(M[O],!0)){N.setTerminal(M[O],K,!0);var Q=n.getCellGeometry(M[O]);Q.points=null;null!=Q.getTerminalPoint(!0)&&Q.setTerminalPoint(null,!0)}}finally{N.endUpdate()}return M}}var S=
+{67:l.actions.get("selectChildren"),88:l.actions.get("selectDescendants"),80:l.actions.get("selectParent"),83:l.actions.get("selectSiblings")},U={67:l.actions.get("copyStyle"),86:l.actions.get("pasteStyle")},R=l.onKeyDown;l.onKeyDown=function(K){try{var m=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=m){var t=mxEvent.isAltDown(K)&&mxEvent.isShiftDown(K)?S[K.keyCode]:mxEvent.isAltDown(K)?U[K.keyCode]:null;null!=t?(t.funct(K),mxEvent.consume(K)):c(m)&&(t=null,0<n.getIncomingTreeEdges(m).length&&
+(9==K.which?t=mxEvent.isShiftDown(K)?E(m):F(m):13==K.which&&(t=G(m,!mxEvent.isShiftDown(K)))),null!=t&&0<t.length?(1==t.length&&n.model.isEdge(t[0])?n.setSelectionCell(n.model.getTerminal(t[0],!1)):n.setSelectionCell(t[t.length-1]),null!=l.hoverIcons&&l.hoverIcons.update(n.view.getState(m)),n.startEditingAtCell(m),mxEvent.consume(K)):37==K.keyCode?(g(m,mxConstants.DIRECTION_WEST),mxEvent.consume(K)):38==K.keyCode?(g(m,mxConstants.DIRECTION_NORTH),mxEvent.consume(K)):39==K.keyCode?(g(m,mxConstants.DIRECTION_EAST),
+mxEvent.consume(K)):40==K.keyCode&&(g(m,mxConstants.DIRECTION_SOUTH),mxEvent.consume(K)))}}catch(C){l.handleError(C)}mxEvent.isConsumed(K)||R.apply(this,arguments)};var P=n.connectVertex;n.connectVertex=function(K,m,t,C,N,M,O){var Q=n.getIncomingTreeEdges(K);if(c(K)){var T=z(K),V=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,X=m==mxConstants.DIRECTION_EAST||m==mxConstants.DIRECTION_WEST;return T==m||0==Q.length?F(K,m):V==X?E(K):G(K,m!=mxConstants.DIRECTION_NORTH&&m!=mxConstants.DIRECTION_WEST)}return P.apply(this,
+arguments)};n.getSubtree=function(K){var m=[K];!p(K)&&!c(K)||u(K)||n.traverse(K,!0,function(t,C){var N=null!=C&&n.isTreeEdge(C);N&&0>mxUtils.indexOf(m,C)&&m.push(C);(null==C||N)&&0>mxUtils.indexOf(m,t)&&m.push(t);return null==C||N});return m};var v=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){v.apply(this,arguments);(p(this.state.cell)||c(this.state.cell))&&!u(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?
null==this.moveHandle&&(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),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(K){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(K),mxEvent.getClientY(K),
-this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(K);this.graph.isMouseDown=!0;l.hoverIcons.reset();mxEvent.consume(K)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var z=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){z.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 N=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(K){N.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=K?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(K,m){J.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=g.apply(this,arguments),p=this.graph,q=this;return c.concat([this.addEntry("tree container",function(){var u=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");u.vertex=!0;var y=new mxCell("Parent",
-new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.vertex=!0;var H=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-E.geometry.relative=!0;E.edge=!0;y.insertEdge(E,!0);H.insertEdge(E,!1);u.insert(E);u.insert(y);u.insert(H);return q.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var u=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");u.vertex=!0;var y=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-y.vertex=!0;var H=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');H.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
-E.geometry.relative=!0;E.edge=!0;y.insertEdge(E,!0);H.insertEdge(E,!1);var F=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-F.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),E.style);d.geometry.relative=!0;d.edge=!0;y.insertEdge(d,!0);F.insertEdge(d,!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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),E.style);l.geometry.relative=!0;l.edge=!0;y.insertEdge(l,!0);k.insertEdge(l,!1);var n=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),E.style);x.geometry.relative=!0;x.edge=!0;y.insertEdge(x,!0);n.insertEdge(x,!1);u.insert(E);u.insert(d);u.insert(l);u.insert(x);u.insert(y);u.insert(H);u.insert(F);u.insert(k);u.insert(n);return q.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var u=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
+this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(K);this.graph.isMouseDown=!0;l.hoverIcons.reset();mxEvent.consume(K)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var y=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){y.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 L=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(K){L.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=K?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(K,m){J.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=k.apply(this,arguments),p=this.graph,q=this;return c.concat([this.addEntry("tree container",function(){var u=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");u.vertex=!0;var z=new mxCell("Parent",
+new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');z.vertex=!0;var G=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+E.geometry.relative=!0;E.edge=!0;z.insertEdge(E,!0);G.insertEdge(E,!1);u.insert(E);u.insert(z);u.insert(G);return q.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var u=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");u.vertex=!0;var z=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+z.vertex=!0;var G=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');G.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
+E.geometry.relative=!0;E.edge=!0;z.insertEdge(E,!0);G.insertEdge(E,!1);var F=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+F.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),E.style);d.geometry.relative=!0;d.edge=!0;z.insertEdge(d,!0);F.insertEdge(d,!1);var g=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+g.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),E.style);l.geometry.relative=!0;l.edge=!0;z.insertEdge(l,!0);g.insertEdge(l,!1);var n=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),E.style);x.geometry.relative=!0;x.edge=!0;z.insertEdge(x,!0);n.insertEdge(x,!1);u.insert(E);u.insert(d);u.insert(l);u.insert(x);u.insert(z);u.insert(G);u.insert(F);u.insert(g);u.insert(n);return q.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var u=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
u.vertex=!0;return q.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var u=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-u.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");y.geometry.setTerminalPoint(new mxPoint(-40,40),!0);y.geometry.relative=!0;y.edge=!0;u.insertEdge(y,!1);return q.createVertexTemplateFromCells([u,y],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var u=new mxCell("Sub Topic",new mxGeometry(0,0,80,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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');u.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
-y.geometry.setTerminalPoint(new mxPoint(-40,40),!0);y.geometry.relative=!0;y.edge=!0;u.insertEdge(y,!1);return q.createVertexTemplateFromCells([u,y],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree orgchart organization division",function(){var u=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.vertex=!0;var y=new mxCell("Organization",new mxGeometry(80,
-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.setAttributeForCell(y,"treeRoot","1");y.vertex=!0;var H=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-E.geometry.relative=!0;E.edge=!0;y.insertEdge(E,!0);H.insertEdge(E,!1);var F=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");d.geometry.relative=
-!0;d.edge=!0;y.insertEdge(d,!0);F.insertEdge(d,!1);u.insert(E);u.insert(d);u.insert(y);u.insert(H);u.insert(F);return q.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree root",function(){var u=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.setAttributeForCell(u,"treeRoot","1");u.vertex=!0;return q.createVertexTemplateFromCells([u],
-u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree division",function(){var u=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-y.geometry.setTerminalPoint(new mxPoint(0,0),!0);y.geometry.relative=!0;y.edge=!0;u.insertEdge(y,!1);return q.createVertexTemplateFromCells([u,y],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree sub sections",function(){var u=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");u.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
-y.geometry.setTerminalPoint(new mxPoint(110,-40),!0);y.geometry.relative=!0;y.edge=!0;u.insertEdge(y,!1);var H=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");H.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),y.style);E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;H.insertEdge(E,!1);return q.createVertexTemplateFromCells([y,E,u,H],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(E,F){if(EditorUi.windowed){var d=E.editor.graph;d.popupMenuHandler.hideMenu();null==E.formatWindow?(E.formatWindow=new WrapperWindow(E,"",Math.max(10,E.diagramContainer.clientWidth-248),60,240,Math.min(566,d.container.clientHeight-10),function(k){k.className="geSidebarContainer geFormatContainer";E.createFormat(k).init()}),E.dependsOnLanguage(mxUtils.bind(this,function(){E.formatWindow.window.setTitle(mxResources.get("format"))})),E.formatWindow.window.addListener(mxEvent.SHOW,
+u.vertex=!0;var z=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");z.geometry.setTerminalPoint(new mxPoint(-40,40),!0);z.geometry.relative=!0;z.edge=!0;u.insertEdge(z,!1);return q.createVertexTemplateFromCells([u,z],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var u=new mxCell("Sub Topic",new mxGeometry(0,0,80,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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');u.vertex=!0;var z=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
+z.geometry.setTerminalPoint(new mxPoint(-40,40),!0);z.geometry.relative=!0;z.edge=!0;u.insertEdge(z,!1);return q.createVertexTemplateFromCells([u,z],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree orgchart organization division",function(){var u=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.vertex=!0;var z=new mxCell("Organization",new mxGeometry(80,
+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.setAttributeForCell(z,"treeRoot","1");z.vertex=!0;var G=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+E.geometry.relative=!0;E.edge=!0;z.insertEdge(E,!0);G.insertEdge(E,!1);var F=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");d.geometry.relative=
+!0;d.edge=!0;z.insertEdge(d,!0);F.insertEdge(d,!1);u.insert(E);u.insert(d);u.insert(z);u.insert(G);u.insert(F);return q.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree root",function(){var u=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.setAttributeForCell(u,"treeRoot","1");u.vertex=!0;return q.createVertexTemplateFromCells([u],
+u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree division",function(){var u=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.vertex=!0;var z=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+z.geometry.setTerminalPoint(new mxPoint(0,0),!0);z.geometry.relative=!0;z.edge=!0;u.insertEdge(z,!1);return q.createVertexTemplateFromCells([u,z],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree sub sections",function(){var u=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");u.vertex=!0;var z=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
+z.geometry.setTerminalPoint(new mxPoint(110,-40),!0);z.geometry.relative=!0;z.edge=!0;u.insertEdge(z,!1);var G=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");G.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),z.style);E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;G.insertEdge(E,!1);return q.createVertexTemplateFromCells([z,E,u,G],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.initMinimalTheme=function(){function b(E,F){if(EditorUi.windowed){var d=E.editor.graph;d.popupMenuHandler.hideMenu();null==E.formatWindow?(E.formatWindow=new WrapperWindow(E,"",Math.max(10,E.diagramContainer.clientWidth-248),60,240,Math.min(566,d.container.clientHeight-10),function(g){g.className="geSidebarContainer geFormatContainer";E.createFormat(g).init()}),E.dependsOnLanguage(mxUtils.bind(this,function(){E.formatWindow.window.setTitle(mxResources.get("format"))})),E.formatWindow.window.addListener(mxEvent.SHOW,
mxUtils.bind(this,function(){E.formatWindow.window.fit()})),E.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):E.formatWindow.window.setVisible(null!=F?F:!E.formatWindow.window.isVisible())}else null==E.formatElt&&(E.formatElt=E.createSidebarContainer(),E.createFormat(E.formatElt).init(),E.formatElt.style.border="none",E.formatElt.style.width="240px",E.formatElt.style.borderLeftWidth="1px",E.formatElt.style.borderLeftStyle="solid",E.formatElt.style.right="0px"),F=E.diagramContainer.parentNode,
-null!=E.formatElt.parentNode?(E.formatElt.parentNode.removeChild(E.formatElt),F.style.right="0px"):(F.parentNode.appendChild(E.formatElt),F.style.right=E.formatElt.style.width)}function f(E,F){if(EditorUi.windowed){var d=E.editor.graph;d.popupMenuHandler.hideMenu();null==E.sidebarWindow?(E.sidebarWindow=new WrapperWindow(E,"",10,56,Math.min(d.container.clientWidth-10,218)-6,Math.min(d.container.clientHeight-40,650)-6,function(k){E.createShapesPanel(k)}),E.dependsOnLanguage(mxUtils.bind(this,function(){E.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
-E.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){E.sidebarWindow.window.fit()})),E.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),E.sidebarWindow.window.setVisible(!0),isLocalStorage&&E.getLocalData("sidebar",function(k){E.sidebar.showEntries(k,null,!0)}),E.restoreLibraries()):E.sidebarWindow.window.setVisible(null!=F?F:!E.sidebarWindow.window.isVisible())}else null==E.sidebarElt&&(E.sidebarElt=E.createSidebarContainer(),E.createShapesPanel(E.sidebarElt),E.sidebarElt.style.border=
-"none",E.sidebarElt.style.width="210px",E.sidebarElt.style.borderRight="1px solid gray"),F=E.diagramContainer.parentNode,null!=E.sidebarElt.parentNode?(E.sidebarElt.parentNode.removeChild(E.sidebarElt),F.style.left="0px"):(F.parentNode.appendChild(E.sidebarElt),F.style.left=E.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var g=0;try{g=window.innerWidth||document.documentElement.clientWidth||
+null!=E.formatElt.parentNode?(E.formatElt.parentNode.removeChild(E.formatElt),F.style.right="0px"):(F.parentNode.appendChild(E.formatElt),F.style.right=E.formatElt.style.width)}function f(E,F){if(EditorUi.windowed){var d=E.editor.graph;d.popupMenuHandler.hideMenu();null==E.sidebarWindow?(E.sidebarWindow=new WrapperWindow(E,"",10,56,Math.min(d.container.clientWidth-10,218)-6,Math.min(d.container.clientHeight-40,650)-6,function(g){E.createShapesPanel(g)}),E.dependsOnLanguage(mxUtils.bind(this,function(){E.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
+E.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){E.sidebarWindow.window.fit()})),E.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),E.sidebarWindow.window.setVisible(!0),isLocalStorage&&E.getLocalData("sidebar",function(g){E.sidebar.showEntries(g,null,!0)}),E.restoreLibraries()):E.sidebarWindow.window.setVisible(null!=F?F:!E.sidebarWindow.window.isVisible())}else null==E.sidebarElt&&(E.sidebarElt=E.createSidebarContainer(),E.createShapesPanel(E.sidebarElt),E.sidebarElt.style.border=
+"none",E.sidebarElt.style.width="210px",E.sidebarElt.style.borderRight="1px solid gray"),F=E.diagramContainer.parentNode,null!=E.sidebarElt.parentNode?(E.sidebarElt.parentNode.removeChild(E.sidebarElt),F.style.left="0px"):(F.parentNode.appendChild(E.sidebarElt),F.style.left=E.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var k=0;try{k=window.innerWidth||document.documentElement.clientWidth||
document.body.clientWidth}catch(E){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
"#C0C0C0";mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;EditorUi.prototype.closableScratchpad=!1;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=
-function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var c=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){c.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var p=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(E,F){null!=F.shortcut&&900>g&&!mxClient.IS_IOS?E.firstChild.nextSibling.setAttribute("title",F.shortcut):p.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
+function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var c=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){c.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var p=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(E,F){null!=F.shortcut&&900>k&&!mxClient.IS_IOS?E.firstChild.nextSibling.setAttribute("title",F.shortcut):p.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
function(E){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=E?E:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();q.apply(this,arguments)};var u=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(E){u.apply(this,
arguments);if(E){var F=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=F&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=F&&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(){};EditorUi.prototype.installFormatToolbar=function(E){var F=
-this.editor.graph,d=document.createElement("div");d.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%;";F.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(k,l){0<F.getSelectionCount()?(E.appendChild(d),d.innerHTML="Selected: "+F.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var y=!1;EditorUi.prototype.initFormatWindow=
-function(){if(!y&&null!=this.formatWindow){y=!0;var E=this.formatWindow.window.toggleMinimized,F=240;this.formatWindow.window.toggleMinimized=function(){E.apply(this,arguments);this.minimized?(F=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+F-140+"px"):(this.div.style.width=F+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-F+140)+"px");this.fit()};
-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(d){mxEvent.getSource(d)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var H=EditorUi.prototype.init;EditorUi.prototype.init=function(){function E(D,M,L){var O=n.menus.get(D);M=B.addMenu(mxResources.get(D),mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));M.className="geButton";M.setAttribute("title",mxResources.get(D));n.menus.menuCreated(O,M,"geButton");null!=L&&
-(M.style.backgroundImage="url("+L+")",M.innerText="");return M}function F(D,M,L,O,P,U){var V=document.createElement("a");V.className="geButton";A.appendChild(V);null!=U?V.style.backgroundImage="url("+U+")":mxUtils.write(V,D);mxEvent.addListener(V,"click",function(X){"disabled"!=V.getAttribute("disabled")&&M(X);mxEvent.consume(X)});mxEvent.preventDefault(V);null!=O&&V.setAttribute("title",O);null!=P&&(D=function(){P.isEnabled()?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},P.addListener("stateChanged",
-D),x.addListener("enabledChanged",D),D());return V}function d(D,M,L){M=document.createElement("div");M.className="geButtonGroup";for(L=0;L<D.length;L++)null!=D[L]&&M.appendChild(D[L]);A.appendChild(M);return M}function k(){g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;A.innerHTML="";var D=1E3>g,M=E("diagram",null,D?Editor.menuImage:null);d([M,F(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),n.actions.get("image"),
-D?Editor.shapesImage:null),F(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),D?Editor.formatImage:null)]);M=E("insert",!0,D?T:null);d([M,F(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),D?Editor.trashImage:null)]);x.isEnabled()||M.setAttribute("disabled","disabled");K.setAttribute("title",mxResources.get("undo")+" ("+N.shortcut+")");
-m.setAttribute("title",mxResources.get("redo")+" ("+J.shortcut+")");t.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=g&&(d([K,m]),520<=g&&d([t,640<=g?F("",v.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",v,Editor.zoomInImage):null,640<=g?F("",z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",z,Editor.zoomOutImage):null]));A.appendChild(n.statusContainer);A.appendChild(n.buttonContainer)}H.apply(this,arguments);var l=mxUtils.isAncestorNode(document.body,
-this.container)?this.container:this.editor.graph.container;null!=l&&(l.classList.add("geSimple"),l.classList.add("geMinimal"),l.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=g||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"));EditorUi.windowed&&
-1E3<=g&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var A=document.createElement("div");A.className="geMenubarContainer";var B=new Menubar(n,A),I=n.hideCurrentMenu;n.hideCurrentMenu=function(){I.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var G=n.descriptorChanged;n.descriptorChanged=function(){G.apply(this,arguments);var D=n.getCurrentFile();if(null!=D&&null!=D.getTitle()){var M=D.getMode();
-"google"==M?M="googleDrive":"github"==M?M="gitHub":"gitlab"==M?M="gitLab":"onedrive"==M&&(M="oneDrive");M=mxResources.get(M);A.setAttribute("title",D.getTitle()+(null!=M?" ("+M+")":""))}else A.removeAttribute("title")};n.setStatusText(n.editor.getStatus());A.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();A.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var C=this.createZoomInput(!0),R=n.updateTabContainer;
-n.updateTabContainer=function(){R.apply(this,arguments);n.tabContainer.appendChild(C)};var T=Editor.addBoxImage;if(null!=n.hoverIcons){var S=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||S.apply(this,arguments)}}if(null!=x.freehand){var Q=x.freehand.createStyle;x.freehand.createStyle=function(D){return Q.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());
-var v=n.actions.get("zoomIn"),z=n.actions.get("zoomOut");l=n.actions.get("resetView");var N=n.actions.get("undo"),J=n.actions.get("redo"),K=F("",N.funct,null,"",N,Editor.undoImage),m=F("",J.funct,null,"",J,Editor.redoImage),t=F("",function(D){mxEvent.isAltDown(D)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(D)},!0,"",l,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,null)});
-n.container.appendChild(n.tabContainer);n.container.appendChild(A);n.updateTabContainer();!EditorUi.windowed&&1E3<=g&&b(this,!0);k();n.addListener("lockedChanged",k);n.addListener("languageChanged",k);n.editor.graph.addListener("enabledChanged",k);mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();
-null!=n.menus.chatWindow&&n.menus.chatWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,p,q,u){var y=p.y,H=p.x,E=!1,F=!1;if(null!=this.states&&null!=c&&null!=p){var d=this,k=new mxCellState,l=this.graph.getView().scale,n=Math.max(2,this.getGuideTolerance()/2);k.x=c.x+H;k.y=c.y+y;k.width=c.width;k.height=c.height;for(var x=[],A=[],B=0;B<this.states.length;B++){var I=this.states[B];I instanceof mxCellState&&(u||!this.graph.isCellSelected(I.cell))&&((k.x>=I.x&&k.x<=I.x+I.width||I.x>=k.x&&I.x<=k.x+k.width)&&(k.y>
-I.y+I.height+4||k.y+k.height+4<I.y)?x.push(I):(k.y>=I.y&&k.y<=I.y+I.height||I.y>=k.y&&I.y<=k.y+k.height)&&(k.x>I.x+I.width+4||k.x+k.width+4<I.x)&&A.push(I))}var G=0,C=0,R=I=0,T=0,S=0,Q=0,v=0,z=5*l;if(1<x.length){x.push(k);x.sort(function(m,t){return m.y-t.y});var N=!1;B=k==x[0];l=k==x[x.length-1];if(!B&&!l)for(B=1;B<x.length-1;B++)if(k==x[B]){l=x[B-1];B=x[B+1];I=C=R=(B.y-l.y-l.height-k.height)/2;break}for(B=0;B<x.length-1;B++){l=x[B];var J=x[B+1],K=k==l||k==J;J=J.y-l.y-l.height;N|=k==l;if(0==C&&0==
-G)C=J,G=1;else if(Math.abs(C-J)<=(K||1==B&&N?n:0))G+=1;else if(1<G&&N){x=x.slice(0,B+1);break}else if(3<=x.length-B&&!N)G=0,I=C=0!=R?R:0,x.splice(0,0==B?1:B),B=-1;else break;0!=I||K||(C=I=J)}3==x.length&&x[1]==k&&(I=0)}if(1<A.length){A.push(k);A.sort(function(m,t){return m.x-t.x});N=!1;B=k==A[0];l=k==A[A.length-1];if(!B&&!l)for(B=1;B<A.length-1;B++)if(k==A[B]){l=A[B-1];B=A[B+1];Q=S=v=(B.x-l.x-l.width-k.width)/2;break}for(B=0;B<A.length-1;B++){l=A[B];J=A[B+1];K=k==l||k==J;J=J.x-l.x-l.width;N|=k==l;
-if(0==S&&0==T)S=J,T=1;else if(Math.abs(S-J)<=(K||1==B&&N?n:0))T+=1;else if(1<T&&N){A=A.slice(0,B+1);break}else if(3<=A.length-B&&!N)T=0,Q=S=0!=v?v:0,A.splice(0,0==B?1:B),B=-1;else break;0!=Q||K||(S=Q=J)}3==A.length&&A[1]==k&&(Q=0)}n=function(m,t,D,M){var L=[];if(M){M=z;var O=0}else M=0,O=z;L.push(new mxPoint(m.x-M,m.y-O));L.push(new mxPoint(m.x+M,m.y+O));L.push(m);L.push(t);L.push(new mxPoint(t.x-M,t.y-O));L.push(new mxPoint(t.x+M,t.y+O));if(null!=D)return D.points=L,D;m=new mxPolyline(L,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);m.dialect=mxConstants.DIALECT_SVG;m.pointerEvents=!1;m.init(d.graph.getView().getOverlayPane());return m};S=function(m,t){if(m&&null!=d.guidesArrHor)for(m=0;m<d.guidesArrHor.length;m++)d.guidesArrHor[m].node.style.visibility="hidden";if(t&&null!=d.guidesArrVer)for(m=0;m<d.guidesArrVer.length;m++)d.guidesArrVer[m].node.style.visibility="hidden"};if(1<T&&T==A.length-1){T=[];v=d.guidesArrHor;E=[];H=0;B=A[0]==k?1:0;N=A[B].y+A[B].height;if(0<Q)for(B=0;B<A.length-1;B++)l=
-A[B],J=A[B+1],k==l?(H=J.x-l.width-Q,E.push(new mxPoint(H+l.width+z,N)),E.push(new mxPoint(J.x-z,N))):k==J?(E.push(new mxPoint(l.x+l.width+z,N)),H=l.x+l.width+Q,E.push(new mxPoint(H-z,N))):(E.push(new mxPoint(l.x+l.width+z,N)),E.push(new mxPoint(J.x-z,N)));else l=A[0],B=A[2],H=l.x+l.width+(B.x-l.x-l.width-k.width)/2,E.push(new mxPoint(l.x+l.width+z,N)),E.push(new mxPoint(H-z,N)),E.push(new mxPoint(H+k.width+z,N)),E.push(new mxPoint(B.x-z,N));for(B=0;B<E.length;B+=2)A=E[B],Q=E[B+1],A=n(A,Q,null!=v?
-v[B/2]:null),A.node.style.visibility="visible",A.redraw(),T.push(A);for(B=E.length/2;null!=v&&B<v.length;B++)v[B].destroy();d.guidesArrHor=T;H-=c.x;E=!0}else S(!0);if(1<G&&G==x.length-1){T=[];v=d.guidesArrVer;F=[];y=0;B=x[0]==k?1:0;G=x[B].x+x[B].width;if(0<I)for(B=0;B<x.length-1;B++)l=x[B],J=x[B+1],k==l?(y=J.y-l.height-I,F.push(new mxPoint(G,y+l.height+z)),F.push(new mxPoint(G,J.y-z))):k==J?(F.push(new mxPoint(G,l.y+l.height+z)),y=l.y+l.height+I,F.push(new mxPoint(G,y-z))):(F.push(new mxPoint(G,l.y+
-l.height+z)),F.push(new mxPoint(G,J.y-z)));else l=x[0],B=x[2],y=l.y+l.height+(B.y-l.y-l.height-k.height)/2,F.push(new mxPoint(G,l.y+l.height+z)),F.push(new mxPoint(G,y-z)),F.push(new mxPoint(G,y+k.height+z)),F.push(new mxPoint(G,B.y-z));for(B=0;B<F.length;B+=2)A=F[B],Q=F[B+1],A=n(A,Q,null!=v?v[B/2]:null,!0),A.node.style.visibility="visible",A.redraw(),T.push(A);for(B=F.length/2;null!=v&&B<v.length;B++)v[B].destroy();d.guidesArrVer=T;y-=c.y;F=!0}else S(!1,!0)}if(E||F)return k=new mxPoint(H,y),x=b.call(this,
-c,k,q,u),E&&!F?k.y=x.y:F&&!E&&(k.x=x.x),x.y!=k.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),x.x!=k.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),k;S(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){f.call(this,c);var p=this.guidesArrVer,q=this.guidesArrHor;if(null!=p)for(var u=0;u<p.length;u++)p[u].node.style.visibility=c?"visible":"hidden";if(null!=
-q)for(u=0;u<q.length;u++)q[u].node.style.visibility=c?"visible":"hidden"};var g=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){g.call(this);var c=this.guidesArrVer,p=this.guidesArrHor;if(null!=c){for(var q=0;q<c.length;q++)c[q].destroy();this.guidesArrVer=null}if(null!=p){for(q=0;q<p.length;q++)p[q].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,g,c){function p(){var G=b.getDiagramContainerOffset(),C=b.diagramContainer;d.style.top=C.offsetTop-G.y+"px";d.style.left=C.offsetLeft-G.x+"px";d.style.width=(g?0:C.offsetWidth)+H+"px";d.style.height=(g?C.offsetHeight:0)+H+"px"}function q(G,C,R){if(null!=u)return G;var T;return function(){var S=this,Q=arguments,v=R&&!T;clearTimeout(T);T=setTimeout(function(){T=null;R||G.apply(S,Q)},C);v&&G.apply(S,Q)}}var u=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||
-window.msRequestAnimationFrame,y=window.cancelAnimationFrame||window.mozCancelAnimationFrame,H=this.RULER_THICKNESS,E=this;this.unit=f;var F=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},d=document.createElement("div");d.className="geRuler";d.style.position="fixed";this.updateStyle=mxUtils.bind(this,
-function(){F=Editor.isDarkMode()?{outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};d.style[g?"borderRight":"borderBottom"]="0.5px solid "+F.strokeClr;d.style.borderLeft="0.5px solid "+F.strokeClr});this.updateStyle();b.diagramContainer.appendChild(d);mxEvent.disableContextMenu(d);this.editorUiRefresh=b.refresh;b.refresh=function(G){E.editorUiRefresh.apply(b,
-arguments);p()};p();var k=document.createElement("canvas");k.width=d.offsetWidth;k.height=d.offsetHeight;d.style.overflow="hidden";k.style.position="relative";d.appendChild(k);var l=k.getContext("2d");this.ui=b;var n=b.editor.graph;this.graph=n;this.container=d;this.canvas=k;var x=function(G,C,R,T,S){G=Math.round(G);C=Math.round(C);R=Math.round(R);T=Math.round(T);l.beginPath();l.moveTo(G+.5,C+.5);l.lineTo(R+.5,T+.5);l.stroke();S&&(g?(l.save(),l.translate(G,C),l.rotate(-Math.PI/2),l.fillText(S,0,0),
-l.restore()):l.fillText(S,G,C))},A=function(){l.clearRect(0,0,k.width,k.height);l.beginPath();l.lineWidth=.7;l.strokeStyle=F.strokeClr;l.setLineDash([]);l.font="9px Arial";l.textAlign="center";var G=n.view.scale,C=n.view.getBackgroundPageBounds(),R=n.view.translate,T=n.pageVisible;R=T?H+(g?C.y-n.container.scrollTop:C.x-n.container.scrollLeft):H+(g?R.y*G-n.container.scrollTop:R.x*G-n.container.scrollLeft);var S=0;T&&(S=n.getPageLayout(),S=g?S.y*n.pageFormat.height:S.x*n.pageFormat.width);var Q;switch(E.unit){case mxConstants.POINTS:var v=
-Q=10;var z=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:Q=10;v=mxConstants.PIXELS_PER_MM;z=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:Q=20;v=mxConstants.PIXELS_PER_MM;z=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:Q=.5>=G||4<=G?8:16,v=mxConstants.PIXELS_PER_INCH/Q,z=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var N=v;2<=G?N=v/(2*Math.floor(G/2)):.5>=G&&(N=v*Math.floor(1/G/2)*(E.unit==mxConstants.MILLIMETERS?2:1));v=null;C=T?Math.min(R+(g?C.height:C.width),g?
-k.height:k.width):g?k.height:k.width;if(T)if(l.fillStyle=F.outBkgClr,g){var J=R-H;0<J&&l.fillRect(0,H,H,J);C<k.height&&l.fillRect(0,C,H,k.height)}else J=R-H,0<J&&l.fillRect(H,0,J,H),C<k.width&&l.fillRect(C,0,k.width,H);l.fillStyle=F.fontClr;for(T=T?R:R%(N*G);T<=C;T+=N*G)if(J=Math.round((T-R)/G/N),!(T<H||J==v)){v=J;var K=null;0==J%Q&&(K=E.formatText(S+J*N)+"");g?x(H-z[Math.abs(J)%Q],T,H,T,K):x(T,H-z[Math.abs(J)%Q],T,H,K)}l.lineWidth=1;x(g?0:H,g?H:0,H,H);l.fillStyle=F.cornerClr;l.fillRect(0,0,H,H)},
-B=-1,I=function(){null!=u?(null!=y&&y(B),B=u(A)):A()};this.drawRuler=I;this.sizeListener=f=q(function(){var G=n.container;g?(G=G.offsetHeight+H,k.height!=G&&(k.height=G,d.style.height=G+"px",I())):(G=G.offsetWidth+H,k.width!=G&&(k.width=G,d.style.width=G+"px",I()))},10);this.pageListener=function(){I()};this.scrollListener=c=q(function(){var G=g?n.container.scrollTop:n.container.scrollLeft;E.lastScroll!=G&&(E.lastScroll=G,I())},10);this.unitListener=function(G,C){E.setUnit(C.getProperty("unit"))};
-n.addListener(mxEvent.SIZE,f);n.container.addEventListener("scroll",c);n.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(G){F=G;d.style.background=F.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(G,C,R,T){if(g&&4<G.height||!g&&4<G.width){if(null!=E.guidePart)try{l.putImageData(E.guidePart.imgData1,
-E.guidePart.x1,E.guidePart.y1),l.putImageData(E.guidePart.imgData2,E.guidePart.x2,E.guidePart.y2),l.putImageData(E.guidePart.imgData3,E.guidePart.x3,E.guidePart.y3)}catch(M){}var S=E.origGuideMove.apply(this,arguments);try{l.lineWidth=.5;l.strokeStyle=F.guideClr;l.setLineDash([2]);if(g){var Q=G.y+S.y+H-this.graph.container.scrollTop;var v=0;var z=Q+G.height/2;var N=H/2;var J=Q+G.height;var K=0;var m=l.getImageData(v,Q-1,H,3);x(v,Q,H,Q);Q--;var t=l.getImageData(N,z-1,H,3);x(N,z,H,z);z--;var D=l.getImageData(K,
-J-1,H,3);x(K,J,H,J);J--}else Q=0,v=G.x+S.x+H-this.graph.container.scrollLeft,z=H/2,N=v+G.width/2,J=0,K=v+G.width,m=l.getImageData(v-1,Q,3,H),x(v,Q,v,H),v--,t=l.getImageData(N-1,z,3,H),x(N,z,N,H),N--,D=l.getImageData(K-1,J,3,H),x(K,J,K,H),K--;if(null==E.guidePart||E.guidePart.x1!=v||E.guidePart.y1!=Q)E.guidePart={imgData1:m,x1:v,y1:Q,imgData2:t,x2:N,y2:z,imgData3:D,x3:K,y3:J}}catch(M){}}else S=E.origGuideMove.apply(this,arguments);return S};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
-function(){var G=E.origGuideDestroy.apply(this,arguments);if(null!=E.guidePart)try{l.putImageData(E.guidePart.imgData1,E.guidePart.x1,E.guidePart.y1),l.putImageData(E.guidePart.imgData2,E.guidePart.x2,E.guidePart.y2),l.putImageData(E.guidePart.imgData3,E.guidePart.x3,E.guidePart.y3),E.guidePart=null}catch(C){}return G}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
+this.editor.graph,d=document.createElement("div");d.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%;";F.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(g,l){0<F.getSelectionCount()?(E.appendChild(d),d.innerHTML="Selected: "+F.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var z=!1;EditorUi.prototype.initFormatWindow=
+function(){if(!z&&null!=this.formatWindow){z=!0;var E=this.formatWindow.window.toggleMinimized,F=240;this.formatWindow.window.toggleMinimized=function(){E.apply(this,arguments);this.minimized?(F=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+F-140+"px"):(this.div.style.width=F+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-F+140)+"px");this.fit()};
+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(d){mxEvent.getSource(d)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var G=EditorUi.prototype.init;EditorUi.prototype.init=function(){function E(C,N,M){var O=n.menus.get(C);N=B.addMenu(mxResources.get(C),mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));N.className="geButton";N.setAttribute("title",mxResources.get(C));n.menus.menuCreated(O,N,"geButton");null!=M&&
+(N.style.backgroundImage="url("+M+")",N.innerText="");return N}function F(C,N,M,O,Q,T){var V=document.createElement("a");V.className="geButton";A.appendChild(V);null!=T?V.style.backgroundImage="url("+T+")":mxUtils.write(V,C);mxEvent.addListener(V,"click",function(X){"disabled"!=V.getAttribute("disabled")&&N(X);mxEvent.consume(X)});mxEvent.preventDefault(V);null!=O&&V.setAttribute("title",O);null!=Q&&(C=function(){Q.isEnabled()?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},Q.addListener("stateChanged",
+C),x.addListener("enabledChanged",C),C());return V}function d(C,N,M){N=document.createElement("div");N.className="geButtonGroup";for(M=0;M<C.length;M++)null!=C[M]&&N.appendChild(C[M]);A.appendChild(N);return N}function g(){k=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;A.innerHTML="";var C=1E3>k,N=E("diagram",null,C?Editor.menuImage:null);d([N,F(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),n.actions.get("image"),
+C?Editor.shapesImage:null),F(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),C?Editor.formatImage:null)]);N=E("insert",!0,C?U:null);d([N,F(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),C?Editor.trashImage:null)]);x.isEnabled()||N.setAttribute("disabled","disabled");K.setAttribute("title",mxResources.get("undo")+" ("+L.shortcut+")");
+m.setAttribute("title",mxResources.get("redo")+" ("+J.shortcut+")");t.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=k&&(d([K,m]),520<=k&&d([t,640<=k?F("",v.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",v,Editor.zoomInImage):null,640<=k?F("",y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",y,Editor.zoomOutImage):null]));A.appendChild(n.statusContainer);A.appendChild(n.buttonContainer)}G.apply(this,arguments);var l=mxUtils.isAncestorNode(document.body,
+this.container)?this.container:this.editor.graph.container;null!=l&&(l.classList.add("geSimple"),l.classList.add("geMinimal"),l.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=k||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"));EditorUi.windowed&&
+1E3<=k&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var A=document.createElement("div");A.className="geMenubarContainer";var B=new Menubar(n,A),I=n.hideCurrentMenu;n.hideCurrentMenu=function(){I.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var H=n.descriptorChanged;n.descriptorChanged=function(){H.apply(this,arguments);var C=n.getCurrentFile();if(null!=C&&null!=C.getTitle()){var N=C.getMode();
+"google"==N?N="googleDrive":"github"==N?N="gitHub":"gitlab"==N?N="gitLab":"onedrive"==N&&(N="oneDrive");N=mxResources.get(N);A.setAttribute("title",C.getTitle()+(null!=N?" ("+N+")":""))}else A.removeAttribute("title")};n.setStatusText(n.editor.getStatus());A.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();A.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var D=this.createZoomInput(!0),S=n.updateTabContainer;
+n.updateTabContainer=function(){S.apply(this,arguments);n.tabContainer.appendChild(D)};var U=Editor.addBoxImage;if(null!=n.hoverIcons){var R=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||R.apply(this,arguments)}}if(null!=x.freehand){var P=x.freehand.createStyle;x.freehand.createStyle=function(C){return P.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());
+var v=n.actions.get("zoomIn"),y=n.actions.get("zoomOut");l=n.actions.get("resetView");var L=n.actions.get("undo"),J=n.actions.get("redo"),K=F("",L.funct,null,"",L,Editor.undoImage),m=F("",J.funct,null,"",J,Editor.redoImage),t=F("",function(C){mxEvent.isAltDown(C)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(C)},!0,"",l,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,null)});
+n.container.appendChild(n.tabContainer);n.container.appendChild(A);n.updateTabContainer();!EditorUi.windowed&&1E3<=k&&b(this,!0);g();n.addListener("lockedChanged",g);n.addListener("languageChanged",g);n.editor.graph.addListener("enabledChanged",g);mxEvent.addListener(window,"resize",function(){g();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();
+null!=n.menus.chatWindow&&n.menus.chatWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,p,q,u){var z=p.y,G=p.x,E=!1,F=!1;if(null!=this.states&&null!=c&&null!=p){var d=this,g=new mxCellState,l=this.graph.getView().scale,n=Math.max(2,this.getGuideTolerance()/2);g.x=c.x+G;g.y=c.y+z;g.width=c.width;g.height=c.height;for(var x=[],A=[],B=0;B<this.states.length;B++){var I=this.states[B];I instanceof mxCellState&&(u||!this.graph.isCellSelected(I.cell))&&((g.x>=I.x&&g.x<=I.x+I.width||I.x>=g.x&&I.x<=g.x+g.width)&&(g.y>
+I.y+I.height+4||g.y+g.height+4<I.y)?x.push(I):(g.y>=I.y&&g.y<=I.y+I.height||I.y>=g.y&&I.y<=g.y+g.height)&&(g.x>I.x+I.width+4||g.x+g.width+4<I.x)&&A.push(I))}var H=0,D=0,S=I=0,U=0,R=0,P=0,v=0,y=5*l;if(1<x.length){x.push(g);x.sort(function(m,t){return m.y-t.y});var L=!1;B=g==x[0];l=g==x[x.length-1];if(!B&&!l)for(B=1;B<x.length-1;B++)if(g==x[B]){l=x[B-1];B=x[B+1];I=D=S=(B.y-l.y-l.height-g.height)/2;break}for(B=0;B<x.length-1;B++){l=x[B];var J=x[B+1],K=g==l||g==J;J=J.y-l.y-l.height;L|=g==l;if(0==D&&0==
+H)D=J,H=1;else if(Math.abs(D-J)<=(K||1==B&&L?n:0))H+=1;else if(1<H&&L){x=x.slice(0,B+1);break}else if(3<=x.length-B&&!L)H=0,I=D=0!=S?S:0,x.splice(0,0==B?1:B),B=-1;else break;0!=I||K||(D=I=J)}3==x.length&&x[1]==g&&(I=0)}if(1<A.length){A.push(g);A.sort(function(m,t){return m.x-t.x});L=!1;B=g==A[0];l=g==A[A.length-1];if(!B&&!l)for(B=1;B<A.length-1;B++)if(g==A[B]){l=A[B-1];B=A[B+1];P=R=v=(B.x-l.x-l.width-g.width)/2;break}for(B=0;B<A.length-1;B++){l=A[B];J=A[B+1];K=g==l||g==J;J=J.x-l.x-l.width;L|=g==l;
+if(0==R&&0==U)R=J,U=1;else if(Math.abs(R-J)<=(K||1==B&&L?n:0))U+=1;else if(1<U&&L){A=A.slice(0,B+1);break}else if(3<=A.length-B&&!L)U=0,P=R=0!=v?v:0,A.splice(0,0==B?1:B),B=-1;else break;0!=P||K||(R=P=J)}3==A.length&&A[1]==g&&(P=0)}n=function(m,t,C,N){var M=[];if(N){N=y;var O=0}else N=0,O=y;M.push(new mxPoint(m.x-N,m.y-O));M.push(new mxPoint(m.x+N,m.y+O));M.push(m);M.push(t);M.push(new mxPoint(t.x-N,t.y-O));M.push(new mxPoint(t.x+N,t.y+O));if(null!=C)return C.points=M,C;m=new mxPolyline(M,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);m.dialect=mxConstants.DIALECT_SVG;m.pointerEvents=!1;m.init(d.graph.getView().getOverlayPane());return m};R=function(m,t){if(m&&null!=d.guidesArrHor)for(m=0;m<d.guidesArrHor.length;m++)d.guidesArrHor[m].node.style.visibility="hidden";if(t&&null!=d.guidesArrVer)for(m=0;m<d.guidesArrVer.length;m++)d.guidesArrVer[m].node.style.visibility="hidden"};if(1<U&&U==A.length-1){U=[];v=d.guidesArrHor;E=[];G=0;B=A[0]==g?1:0;L=A[B].y+A[B].height;if(0<P)for(B=0;B<A.length-1;B++)l=
+A[B],J=A[B+1],g==l?(G=J.x-l.width-P,E.push(new mxPoint(G+l.width+y,L)),E.push(new mxPoint(J.x-y,L))):g==J?(E.push(new mxPoint(l.x+l.width+y,L)),G=l.x+l.width+P,E.push(new mxPoint(G-y,L))):(E.push(new mxPoint(l.x+l.width+y,L)),E.push(new mxPoint(J.x-y,L)));else l=A[0],B=A[2],G=l.x+l.width+(B.x-l.x-l.width-g.width)/2,E.push(new mxPoint(l.x+l.width+y,L)),E.push(new mxPoint(G-y,L)),E.push(new mxPoint(G+g.width+y,L)),E.push(new mxPoint(B.x-y,L));for(B=0;B<E.length;B+=2)A=E[B],P=E[B+1],A=n(A,P,null!=v?
+v[B/2]:null),A.node.style.visibility="visible",A.redraw(),U.push(A);for(B=E.length/2;null!=v&&B<v.length;B++)v[B].destroy();d.guidesArrHor=U;G-=c.x;E=!0}else R(!0);if(1<H&&H==x.length-1){U=[];v=d.guidesArrVer;F=[];z=0;B=x[0]==g?1:0;H=x[B].x+x[B].width;if(0<I)for(B=0;B<x.length-1;B++)l=x[B],J=x[B+1],g==l?(z=J.y-l.height-I,F.push(new mxPoint(H,z+l.height+y)),F.push(new mxPoint(H,J.y-y))):g==J?(F.push(new mxPoint(H,l.y+l.height+y)),z=l.y+l.height+I,F.push(new mxPoint(H,z-y))):(F.push(new mxPoint(H,l.y+
+l.height+y)),F.push(new mxPoint(H,J.y-y)));else l=x[0],B=x[2],z=l.y+l.height+(B.y-l.y-l.height-g.height)/2,F.push(new mxPoint(H,l.y+l.height+y)),F.push(new mxPoint(H,z-y)),F.push(new mxPoint(H,z+g.height+y)),F.push(new mxPoint(H,B.y-y));for(B=0;B<F.length;B+=2)A=F[B],P=F[B+1],A=n(A,P,null!=v?v[B/2]:null,!0),A.node.style.visibility="visible",A.redraw(),U.push(A);for(B=F.length/2;null!=v&&B<v.length;B++)v[B].destroy();d.guidesArrVer=U;z-=c.y;F=!0}else R(!1,!0)}if(E||F)return g=new mxPoint(G,z),x=b.call(this,
+c,g,q,u),E&&!F?g.y=x.y:F&&!E&&(g.x=x.x),x.y!=g.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),x.x!=g.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),g;R(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){f.call(this,c);var p=this.guidesArrVer,q=this.guidesArrHor;if(null!=p)for(var u=0;u<p.length;u++)p[u].node.style.visibility=c?"visible":"hidden";if(null!=
+q)for(u=0;u<q.length;u++)q[u].node.style.visibility=c?"visible":"hidden"};var k=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){k.call(this);var c=this.guidesArrVer,p=this.guidesArrHor;if(null!=c){for(var q=0;q<c.length;q++)c[q].destroy();this.guidesArrVer=null}if(null!=p){for(q=0;q<p.length;q++)p[q].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,k,c){function p(){var H=b.getDiagramContainerOffset(),D=b.diagramContainer;d.style.top=D.offsetTop-H.y+"px";d.style.left=D.offsetLeft-H.x+"px";d.style.width=(k?0:D.offsetWidth)+G+"px";d.style.height=(k?D.offsetHeight:0)+G+"px"}function q(H,D,S){if(null!=u)return H;var U;return function(){var R=this,P=arguments,v=S&&!U;clearTimeout(U);U=setTimeout(function(){U=null;S||H.apply(R,P)},D);v&&H.apply(R,P)}}var u=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||
+window.msRequestAnimationFrame,z=window.cancelAnimationFrame||window.mozCancelAnimationFrame,G=this.RULER_THICKNESS,E=this;this.unit=f;var F=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},d=document.createElement("div");d.className="geRuler";d.style.position="fixed";this.updateStyle=mxUtils.bind(this,
+function(){F=Editor.isDarkMode()?{outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};d.style[k?"borderRight":"borderBottom"]="0.5px solid "+F.strokeClr;d.style.borderLeft="0.5px solid "+F.strokeClr});this.updateStyle();b.diagramContainer.appendChild(d);mxEvent.disableContextMenu(d);this.editorUiRefresh=b.refresh;b.refresh=function(H){E.editorUiRefresh.apply(b,
+arguments);p()};p();var g=document.createElement("canvas");g.width=d.offsetWidth;g.height=d.offsetHeight;d.style.overflow="hidden";g.style.position="relative";d.appendChild(g);var l=g.getContext("2d");this.ui=b;var n=b.editor.graph;this.graph=n;this.container=d;this.canvas=g;var x=function(H,D,S,U,R){H=Math.round(H);D=Math.round(D);S=Math.round(S);U=Math.round(U);l.beginPath();l.moveTo(H+.5,D+.5);l.lineTo(S+.5,U+.5);l.stroke();R&&(k?(l.save(),l.translate(H,D),l.rotate(-Math.PI/2),l.fillText(R,0,0),
+l.restore()):l.fillText(R,H,D))},A=function(){l.clearRect(0,0,g.width,g.height);l.beginPath();l.lineWidth=.7;l.strokeStyle=F.strokeClr;l.setLineDash([]);l.font="9px Arial";l.textAlign="center";var H=n.view.scale,D=n.view.getBackgroundPageBounds(),S=n.view.translate,U=n.pageVisible;S=U?G+(k?D.y-n.container.scrollTop:D.x-n.container.scrollLeft):G+(k?S.y*H-n.container.scrollTop:S.x*H-n.container.scrollLeft);var R=0;U&&(R=n.getPageLayout(),R=k?R.y*n.pageFormat.height:R.x*n.pageFormat.width);var P;switch(E.unit){case mxConstants.POINTS:var v=
+P=10;var y=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:P=10;v=mxConstants.PIXELS_PER_MM;y=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:P=20;v=mxConstants.PIXELS_PER_MM;y=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:P=.5>=H||4<=H?8:16,v=mxConstants.PIXELS_PER_INCH/P,y=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var L=v;2<=H?L=v/(2*Math.floor(H/2)):.5>=H&&(L=v*Math.floor(1/H/2)*(E.unit==mxConstants.MILLIMETERS?2:1));v=null;D=U?Math.min(S+(k?D.height:D.width),k?
+g.height:g.width):k?g.height:g.width;if(U)if(l.fillStyle=F.outBkgClr,k){var J=S-G;0<J&&l.fillRect(0,G,G,J);D<g.height&&l.fillRect(0,D,G,g.height)}else J=S-G,0<J&&l.fillRect(G,0,J,G),D<g.width&&l.fillRect(D,0,g.width,G);l.fillStyle=F.fontClr;for(U=U?S:S%(L*H);U<=D;U+=L*H)if(J=Math.round((U-S)/H/L),!(U<G||J==v)){v=J;var K=null;0==J%P&&(K=E.formatText(R+J*L)+"");k?x(G-y[Math.abs(J)%P],U,G,U,K):x(U,G-y[Math.abs(J)%P],U,G,K)}l.lineWidth=1;x(k?0:G,k?G:0,G,G);l.fillStyle=F.cornerClr;l.fillRect(0,0,G,G)},
+B=-1,I=function(){null!=u?(null!=z&&z(B),B=u(A)):A()};this.drawRuler=I;this.sizeListener=f=q(function(){var H=n.container;k?(H=H.offsetHeight+G,g.height!=H&&(g.height=H,d.style.height=H+"px",I())):(H=H.offsetWidth+G,g.width!=H&&(g.width=H,d.style.width=H+"px",I()))},10);this.pageListener=function(){I()};this.scrollListener=c=q(function(){var H=k?n.container.scrollTop:n.container.scrollLeft;E.lastScroll!=H&&(E.lastScroll=H,I())},10);this.unitListener=function(H,D){E.setUnit(D.getProperty("unit"))};
+n.addListener(mxEvent.SIZE,f);n.container.addEventListener("scroll",c);n.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(H){F=H;d.style.background=F.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(H,D,S,U){if(k&&4<H.height||!k&&4<H.width){if(null!=E.guidePart)try{l.putImageData(E.guidePart.imgData1,
+E.guidePart.x1,E.guidePart.y1),l.putImageData(E.guidePart.imgData2,E.guidePart.x2,E.guidePart.y2),l.putImageData(E.guidePart.imgData3,E.guidePart.x3,E.guidePart.y3)}catch(N){}var R=E.origGuideMove.apply(this,arguments);try{l.lineWidth=.5;l.strokeStyle=F.guideClr;l.setLineDash([2]);if(k){var P=H.y+R.y+G-this.graph.container.scrollTop;var v=0;var y=P+H.height/2;var L=G/2;var J=P+H.height;var K=0;var m=l.getImageData(v,P-1,G,3);x(v,P,G,P);P--;var t=l.getImageData(L,y-1,G,3);x(L,y,G,y);y--;var C=l.getImageData(K,
+J-1,G,3);x(K,J,G,J);J--}else P=0,v=H.x+R.x+G-this.graph.container.scrollLeft,y=G/2,L=v+H.width/2,J=0,K=v+H.width,m=l.getImageData(v-1,P,3,G),x(v,P,v,G),v--,t=l.getImageData(L-1,y,3,G),x(L,y,L,G),L--,C=l.getImageData(K-1,J,3,G),x(K,J,K,G),K--;if(null==E.guidePart||E.guidePart.x1!=v||E.guidePart.y1!=P)E.guidePart={imgData1:m,x1:v,y1:P,imgData2:t,x2:L,y2:y,imgData3:C,x3:K,y3:J}}catch(N){}}else R=E.origGuideMove.apply(this,arguments);return R};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
+function(){var H=E.origGuideDestroy.apply(this,arguments);if(null!=E.guidePart)try{l.putImageData(E.guidePart.imgData1,E.guidePart.x1,E.guidePart.y1),l.putImageData(E.guidePart.imgData2,E.guidePart.x2,E.guidePart.y2),l.putImageData(E.guidePart.imgData3,E.guidePart.x3,E.guidePart.y3),E.guidePart=null}catch(D){}return H}}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(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
-function mxDualRuler(b,f){var g=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return g};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(c){var p=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
+function mxDualRuler(b,f){var k=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return k};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(c){var p=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
function(q){p=null!=b.currentMenu;mxEvent.consume(q)}),null,mxUtils.bind(this,function(q){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(q)||mxEvent.isPopupTrigger(q))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(q)||!p){var u=new mxPopupMenu(mxUtils.bind(this,function(E,F){b.menus.addMenuItems(E,["points","inches","millimeters","meters"],F)}));u.smartSeparators=!0;u.showDisabled=!0;u.autoExpand=!0;u.hideMenu=mxUtils.bind(this,
-function(){mxPopupMenu.prototype.hideMenu.apply(u,arguments);b.resetCurrentMenu();u.destroy()});var y=mxEvent.getClientX(q),H=mxEvent.getClientY(q);u.popup(y,H,null,q);b.setCurrentMenu(u,c)}mxEvent.consume(q)}}))});f(this.hRuler.container);f(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 f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var g=mxFreehand.prototype.MILD_SMOOTHING,c=null,p=[],q,u=[],y,H=!1,E=!0,F=!0,d=!0,k=!0,l=[],n=!1,x=!1,A=!1,B="default",I={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},G=!0;this.setClosedPath=function(z){H=z};this.setAutoClose=function(z){E=z};this.setAutoInsert=
-function(z){F=z};this.setAutoScroll=function(z){d=z};this.setOpenFill=function(z){k=z};this.setStopClickEnabled=function(z){x=z};this.setSelectInserted=function(z){A=z};this.setSmoothing=function(z){g=z};this.getSmoothing=function(){return g};this.setPerfectFreehandMode=function(z){G=z};this.isPerfectFreehandMode=function(){return G};this.setBrushSize=function(z){I.size=z};this.getBrushSize=function(){return I.size};var C=function(z){n=z;b.getRubberband().setEnabled(!z);b.graphHandler.setSelectEnabled(!z);
-b.graphHandler.setMoveEnabled(!z);z?b.container.classList.add("geFreehandMode"):b.container.classList.remove("geFreehandMode");b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){C(!0)};this.isDrawing=function(){return n};var R=mxUtils.bind(this,function(z){if(c){var N=y.length,J=x&&0<u.length&&null!=y&&2>y.length;J||u.push.apply(u,y);y=[];u.push(null);p.push(c);c=null;(J||F)&&this.stopDrawing();F&&(!J||2<=N)&&this.startDrawing();mxEvent.consume(z)}}),T=new mxCell;
-T.edge=!0;this.getStrokeColor=function(z){var N=null!=B?B:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(T),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=N||z||(N=b.shapeForegroundColor);return N};this.setStrokeColor=function(z){B=z};this.createStyle=function(z){var N=";fillColor=none;";G&&(N=";lineShape=1;");N+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+z+N};this.stopDrawing=function(){if(0<p.length){if(G){for(var z=
-[],N=0;N<u.length;N++)null!=u[N]&&z.push([u[N].x,u[N].y]);z=PerfectFreehand.getStroke(z,I);u=[];for(N=0;N<z.length;N++)u.push({x:z[N][0],y:z[N][1]});u.push(null)}z=u[0].x;var J=u[0].x,K=u[0].y,m=u[0].y;for(N=1;N<u.length;N++)null!=u[N]&&(z=Math.max(z,u[N].x),J=Math.min(J,u[N].x),K=Math.max(K,u[N].y),m=Math.min(m,u[N].y));z-=J;K-=m;if(0<z&&0<K){var t=100/z,D=100/K;u.map(function(U){if(null==U)return U;U.x=(U.x-J)*t;U.y=(U.y-m)*D;return U});var M='<shape strokewidth="inherit"><foreground>',L=0;for(N=
-0;N<u.length;N++){var O=u[N];if(null==O){O=!1;L=u[L];var P=u[N-1];!H&&E&&(O=L.x-P.x,P=L.y-P.y,O=Math.sqrt(O*O+P*P)<=b.tolerance);if(H||O)M+='<line x="'+L.x.toFixed(2)+'" y="'+L.y.toFixed(2)+'"/>';M+="</path>"+(k||H||O?"<fillstroke/>":"<stroke/>");L=N+1}else M=N==L?M+('<path><move x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>'):M+('<line x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>')}M+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){N=this.createStyle("stencil("+
-Graph.compress(M)+")");M=b.view.scale;L=b.view.translate;N=new mxCell("",new mxGeometry(J/M-L.x,m/M-L.y,z/M,K/M),N);N.vertex=1;b.model.beginUpdate();try{N=b.addCell(N),b.fireEvent(new mxEventObject("cellsInserted","cells",[N])),b.fireEvent(new mxEventObject("freehandInserted","cell",N))}finally{b.model.endUpdate()}A&&b.setSelectionCells([N])}}for(N=0;N<p.length;N++)p[N].parentNode.removeChild(p[N]);c=null;p=[];u=[]}C(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(z,N){n&&N.getProperty("event").consume()}));
-b.addMouseListener({mouseDown:mxUtils.bind(this,function(z,N){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(z=N.getEvent(),n&&!mxEvent.isPopupTrigger(z)&&!mxEvent.isMiddleMouseButton(z)&&!mxEvent.isMultiTouchEvent(z))){var J=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);J=Math.max(1,J*b.view.scale);var K=this.getStrokeColor();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",G?K:"none");c.setAttribute("pointer-events","none");c.setAttribute("stroke",
-K);c.setAttribute("stroke-width",J);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(K=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",K=K.split(" ").map(function(m){return parseFloat(m)*J}).join(" "),c.setAttribute("stroke-dasharray",K));l=[];z=S(z);Q(z);q="M"+z.x+" "+z.y;u.push(z);y=[];c.setAttribute("d",G?PerfectFreehand.getSvgPathFromStroke([[z.x,z.y]],I):q);f.appendChild(c);N.consume()}}),mouseMove:mxUtils.bind(this,function(z,N){if(null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){z=
-N.getEvent();z=S(z);Q(z);var J=v(0);if(J)if(u.push(J),G){var K=[];for(J=0;J<u.length;J++)K.push([u[J].x,u[J].y]);y=[];for(var m=2;m<l.length;m+=2)J=v(m),K.push([J.x,J.y]),y.push(J);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(K,I))}else{q+=" L"+J.x+" "+J.y;K="";y=[];for(m=2;m<l.length;m+=2)J=v(m),K+=" L"+J.x+" "+J.y,y.push(J);c.setAttribute("d",q+K)}d&&(J=b.view.translate,b.scrollRectToVisible((new mxRectangle(z.x-J.x,z.y-J.y)).grow(20)));N.consume()}}),mouseUp:mxUtils.bind(this,function(z,
-N){null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(R(N.getEvent()),N.consume())})});var S=function(z){return mxUtils.convertPoint(b.container,mxEvent.getClientX(z),mxEvent.getClientY(z))},Q=function(z){for(l.push(z);l.length>g;)l.shift()},v=function(z){var N=l.length;if(1===N%2||N>=g){var J=0,K=0,m,t=0;for(m=z;m<N;m++)t++,z=l[m],J+=z.x,K+=z.y;return{x:J/t,y:K/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,f,g){function c(L,O){try{if(!v){var P=f.file.getCurrentUser();if(Q&&null!=P&&null!=P.displayName){var U={from:C,id:x,type:L,sessionId:f.clientId,userId:P.id,username:P.displayName,data:O,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};U={bytes:f.objectToString(U),data:"aes"};U=JSON.stringify(U);z&&"cursor"!=L&&EditorUi.debug("P2PCollab: sending to socket server",[U]);x++;P=!z&&("cursor"==L||"selectionChange"==L);S&&!P&&m("message",U);if(P)for(p2pId in T)T[p2pId].send(U)}}}catch(V){null!=
-window.console&&console.error(V,L,O)}}function p(L){if(b.shareCursorPosition&&!F.isMouseDown){var O=mxUtils.getOffset(F.container),P=F.view.translate,U=F.view.scale,V=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:V,x:Math.round((L.getX()-O.x+F.container.scrollLeft)/U-P.x),y:Math.round((L.getY()-O.y+F.container.scrollTop)/U-P.y)})}}function q(L,O){var P=null!=b.currentPage?b.currentPage.getId():null;if(null!=L&&null!=L.cursor&&null!=L.lastCursor)if(null!=L.lastCursor.hide||!b.isShowRemoteCursors()||
-null!=L.lastCursor.pageId&&L.lastCursor.pageId!=P)L.cursor.style.display="none";else{P=function(){var Z=Math.max(F.container.scrollLeft,Math.min(F.container.scrollLeft+F.container.clientWidth-L.cursor.clientWidth,X)),aa=Math.max(F.container.scrollTop-22,Math.min(F.container.scrollTop+F.container.clientHeight-L.cursor.clientHeight,W));Y.style.opacity=Z!=X||aa!=W?0:1;L.cursor.style.left=Z+"px";L.cursor.style.top=aa+"px";L.cursor.style.display=""};var U=F.view.translate,V=F.view.scale,X=(U.x+L.lastCursor.x)*
-V+8,W=(U.y+L.lastCursor.y)*V-12,Y=L.cursor.getElementsByTagName("img")[0];O?(mxUtils.setPrefixedStyle(L.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(Y.style,"transition","all 900ms ease-out"),window.setTimeout(P,0)):(mxUtils.setPrefixedStyle(L.cursor.style,"transition",null),mxUtils.setPrefixedStyle(Y.style,"transition",null),P())}}function u(L,O){try{var P=function(){if(null==n[V]){var ca=G[V];null==ca&&(ca=d%l.length,G[V]=ca,d++);var ha=l[ca];ca=11<ca?"black":"white";
-n[V]={cursor:document.createElement("div"),color:ha,selection:{}};B[O]=V;X=n[V].cursor;X.style.pointerEvents="none";X.style.position="absolute";X.style.display="none";X.style.opacity="0.9";var ka=document.createElement("img");mxUtils.setPrefixedStyle(ka.style,"transform","rotate(-45deg)translateX(-14px)");ka.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ha+'" fill="'+ha+'"/>').src);ka.style.width="10px";X.appendChild(ka);ka=document.createElement("div");
-ka.style.backgroundColor=ha;ka.style.color=ca;ka.style.fontSize="9pt";ka.style.padding="3px 7px";ka.style.marginTop="8px";ka.style.borderRadius="10px";ka.style.maxWidth="100px";ka.style.overflow="hidden";ka.style.textOverflow="ellipsis";ka.style.whiteSpace="nowrap";mxUtils.write(ka,U);X.appendChild(ka);b.diagramContainer.appendChild(X)}else X=n[V].cursor;W=n[V].selection};if(!v){L=JSON.parse(L);null!=L.bytes&&(L=f.stringToObject(L.bytes));z&&"cursor"!=L.type&&EditorUi.debug("P2PCollab: msg received",
-[L]);if(null!=O){if(L.from==C||A[L.from]>=L.id){EditorUi.debug("P2PCollab: Dropped Message",L,C,A[L.from]);return}A[L.from]=L.id}var U=L.username?L.username:"Anonymous",V=L.sessionId,X,W;null!=n[V]&&(clearTimeout(n[V].inactiveTO),n[V].inactiveTO=setTimeout(function(){H(null,V)},12E4));var Y=L.data;switch(L.type){case "cursor":P();n[V].lastCursor=Y;q(n[V],!0);break;case "diff":try{L=null!=Y.patch?f.stringToObject(decodeURIComponent(Y.patch)):Y.diff,f.receiveRemoteChanges(L.d)}catch(ca){EditorUi.debug("P2PCollab: Diff msg error",
-ca)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var Z=null!=b.currentPage?b.currentPage.getId():null;if(null==Z||null!=Y.pageId&&Y.pageId==Z){P();for(P=0;P<Y.removed.length;P++){var aa=Y.removed[P];if(null!=aa){var fa=W[aa];delete W[aa];null!=fa&&fa.destroy()}}for(P=0;P<Y.added.length;P++)if(aa=Y.added[P],null!=aa){var ea=F.model.getCell(aa);null!=ea&&(W[aa]=F.highlightCell(ea,n[V].color,6E4,70,3))}}}break;case "notify":L=null!=Y.data?f.stringToObject(decodeURIComponent(Y.data)):
-Y.msg,f.handleMessageData(L.d)}f.file.fireEvent(new mxEventObject("realtimeMessage","message",L))}}catch(ca){null!=window.console&&console.warn(ca,L,O)}}function y(L,O){if(!z&&SimplePeer.WEBRTC_SUPPORT){var P=new SimplePeer({initiator:O,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});P.on("signal",function(U){m("sendSignal",{to:L,from:C,signal:U})});P.on("error",function(U){delete R[L];EditorUi.debug("P2PCollab: p2p socket error",U);!v&&O&&P.destroyed&&I[L]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",
-L),y(L,!0))});P.on("connect",function(){delete R[L];null==T[L]||T[L].destroyed?(T[L]=P,I[L]=!0,EditorUi.debug("P2PCollab: p2p socket connected",L)):(P.noP2PMapDel=!0,P.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",L))});P.on("close",function(){P.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",L),E(B[L]),delete T[L])});P.on("data",u);return R[L]=P}}function H(L,O){E(O||B[L]);null!=L&&(delete B[L],I[L]=!1)}function E(L){var O=n[L];if(null!=O){var P=O.selection,U;for(U in P)null!=
-P[U]&&P[U].destroy();null!=O.cursor&&null!=O.cursor.parentNode&&O.cursor.parentNode.removeChild(O.cursor);clearTimeout(O.inactiveTO);delete n[L]}}var F=b.editor.graph,d=0,k=null,l="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),n={},x=1,A={},B={},I={},G={},C,R={},T={},S=!0,Q=!1,v=!1,z="0"!=urlParams["no-p2p"],N=!1,J=0,K=null,m=mxUtils.bind(this,function(L,O){if(!v)try{null!=
-k?(k.send(JSON.stringify({action:L,msg:O})),z||EditorUi.debug("P2PCollab: sending to socket server",[L],[O])):this.joinFile(!0)}catch(P){K=P,f.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,P)}});this.sendMessage=c;this.sendDiff=function(L){this.sendMessage("diff",{diff:L})};this.sendNotification=function(L){this.sendMessage("notify",{msg:L})};this.getState=function(){return null!=k?k.readyState:3};this.getLastError=function(){return K};
-this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(L,O){},mouseMove:function(L,O){var P,U=-1;return function(){clearTimeout(P);var V=this,X=arguments,W=function(){P=null;U=Date.now();L.apply(V,X)};Date.now()-U>O?W():P=setTimeout(W,O)}}(function(L,O){p(O)},300),mouseUp:function(L,O){p(O)}};F.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);
-var t=mxGraphHandler.prototype.maxCells,D=null,M={};this.selectionChangeListener=function(L,O){var P=function(U){return null!=U?U.id:null};null!=D&&window.clearTimeout(D);D=window.setTimeout(function(){for(var U=F.getSelectionCount()>t?[]:F.getSelectionCells().map(P),V=null!=b.currentPage?b.currentPage.getId():null,X={},W=[],Y=[],Z=0;Z<U.length;Z++){var aa=U[Z];null!=aa&&(X[aa]=!0,null==M[aa]&&Y.push(aa))}for(aa in M)X[aa]||W.push(aa);M=X;c("selectionChange",{pageId:V,removed:W,added:Y})},300)};F.getSelectionModel().addListener(mxEvent.CHANGE,
-this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var L in n)q(n[L])});mxEvent.addListener(F.container,"scroll",this.cursorHandler);F.getView().addListener(mxEvent.SCALE,this.cursorHandler);F.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);F.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(L){if(!v)try{N&&
-(EditorUi.debug("P2PCollab: joinInProgress on",N),K="busy");N=++J;try{null!=k&&1==k.readyState&&(EditorUi.debug("P2PCollab: force closing socket on",k.joinId),k.close(1E3),k=null)}catch(U){EditorUi.debug("P2PCollab: closing socket error",U)}var O=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+g);null==k&&(k=O);O.addEventListener("open",function(U){k=O;k.joinId=N;N=!1;f.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",k.joinId);Editor.enableRealtimeCache||
-window.setTimeout(function(){f.sendJoinMessage()},0);L&&f.scheduleCleanup()});O.addEventListener("message",function(U){try{z||EditorUi.debug("P2PCollab: msg received",[U]);var V=JSON.parse(U.data);z&&"message"!=V.action&&EditorUi.debug("P2PCollab: msg received",[U]);switch(V.action){case "message":u(V.msg,V.from);break;case "clientsList":var X=V.msg;C=X.cId;Q=!0;for(V=0;V<X.list.length;V++)y(X.list[V],!0);break;case "signal":var W=V.msg;if(!z){if(R[W.from])var Y=R[W.from];else Y=y(W.from,!1),S=!0;
-Y.signal(W.signal)}break;case "newClient":S=!0;break;case "clientLeft":H(V.msg);break;case "sendSignalFailed":var Z=V.msg;EditorUi.debug("P2PCollab: signal failed (socket not found on server)",Z);delete R[Z.to];I[Z.to]=!1}}catch(aa){null!=window.console&&console.warn(aa,U)}});var P=!1;O.addEventListener("close",mxUtils.bind(this,function(U){EditorUi.debug("P2PCollab: WebSocket closed",O.joinId,"reconnecting",U.code,U.reason);EditorUi.debug("P2PCollab: closing socket on",O.joinId);v||1E3==U.code||
-J!=O.joinId||(N==J&&(EditorUi.debug("P2PCollab: joinInProgress in close on",O.joinId),N=!1),P||(EditorUi.debug("P2PCollab: calling rejoin on",O.joinId),window.setTimeout(mxUtils.bind(this,function(){P=!0;this.joinFile(!0)}),500)));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));O.addEventListener("error",mxUtils.bind(this,function(U){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",U);EditorUi.debug("P2PCollab: error socket on",O.joinId);v||J!=O.joinId||(N==J&&(EditorUi.debug("P2PCollab: joinInProgress in error on",
-O.joinId),N=!1),P||(EditorUi.debug("P2PCollab: calling rejoin on",O.joinId),P=!0,this.joinFile(!0)));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(U){K=U,f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!v){EditorUi.debug("P2PCollab: destroyed");v=!0;for(sessionId in n)E(sessionId);null!=this.mouseListeners&&F.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&
-F.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(F.container,"scroll",this.cursorHandler),F.view.removeListener(this.cursorHandler),b.editor.removeListener(this.cursorHandler),b.removeListener(this.cursorHandler));null!=k&&1<=k.readyState&&(k.close(1E3),k=null);for(var L in T)null!=T[L]&&T[L].destroy();f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}
+function(){mxPopupMenu.prototype.hideMenu.apply(u,arguments);b.resetCurrentMenu();u.destroy()});var z=mxEvent.getClientX(q),G=mxEvent.getClientY(q);u.popup(z,G,null,q);b.setCurrentMenu(u,c)}mxEvent.consume(q)}}))});f(this.hRuler.container);f(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 f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var k=mxFreehand.prototype.MILD_SMOOTHING,c=null,p=[],q,u=[],z,G=!1,E=!0,F=!0,d=!0,g=!0,l=[],n=!1,x=!1,A=!1,B="default",I={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},H=!0;this.setClosedPath=function(y){G=y};this.setAutoClose=function(y){E=y};this.setAutoInsert=
+function(y){F=y};this.setAutoScroll=function(y){d=y};this.setOpenFill=function(y){g=y};this.setStopClickEnabled=function(y){x=y};this.setSelectInserted=function(y){A=y};this.setSmoothing=function(y){k=y};this.getSmoothing=function(){return k};this.setPerfectFreehandMode=function(y){H=y};this.isPerfectFreehandMode=function(){return H};this.setBrushSize=function(y){I.size=y};this.getBrushSize=function(){return I.size};var D=function(y){n=y;b.getRubberband().setEnabled(!y);b.graphHandler.setSelectEnabled(!y);
+b.graphHandler.setMoveEnabled(!y);y?b.container.classList.add("geFreehandMode"):b.container.classList.remove("geFreehandMode");b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){D(!0)};this.isDrawing=function(){return n};var S=mxUtils.bind(this,function(y){if(c){var L=z.length,J=x&&0<u.length&&null!=z&&2>z.length;J||u.push.apply(u,z);z=[];u.push(null);p.push(c);c=null;(J||F)&&this.stopDrawing();F&&(!J||2<=L)&&this.startDrawing();mxEvent.consume(y)}}),U=new mxCell;
+U.edge=!0;this.getStrokeColor=function(y){var L=null!=B?B:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(U),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=L||y||(L=b.shapeForegroundColor);return L};this.setStrokeColor=function(y){B=y};this.createStyle=function(y){var L=";fillColor=none;";H&&(L=";lineShape=1;");L+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+y+L};this.stopDrawing=function(){if(0<p.length){if(H){for(var y=
+[],L=0;L<u.length;L++)null!=u[L]&&y.push([u[L].x,u[L].y]);y=PerfectFreehand.getStroke(y,I);u=[];for(L=0;L<y.length;L++)u.push({x:y[L][0],y:y[L][1]});u.push(null)}y=u[0].x;var J=u[0].x,K=u[0].y,m=u[0].y;for(L=1;L<u.length;L++)null!=u[L]&&(y=Math.max(y,u[L].x),J=Math.min(J,u[L].x),K=Math.max(K,u[L].y),m=Math.min(m,u[L].y));y-=J;K-=m;if(0<y&&0<K){var t=100/y,C=100/K;u.map(function(T){if(null==T)return T;T.x=(T.x-J)*t;T.y=(T.y-m)*C;return T});var N='<shape strokewidth="inherit"><foreground>',M=0;for(L=
+0;L<u.length;L++){var O=u[L];if(null==O){O=!1;M=u[M];var Q=u[L-1];!G&&E&&(O=M.x-Q.x,Q=M.y-Q.y,O=Math.sqrt(O*O+Q*Q)<=b.tolerance);if(G||O)N+='<line x="'+M.x.toFixed(2)+'" y="'+M.y.toFixed(2)+'"/>';N+="</path>"+(g||G||O?"<fillstroke/>":"<stroke/>");M=L+1}else N=L==M?N+('<path><move x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>'):N+('<line x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>')}N+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){L=this.createStyle("stencil("+
+Graph.compress(N)+")");N=b.view.scale;M=b.view.translate;L=new mxCell("",new mxGeometry(J/N-M.x,m/N-M.y,y/N,K/N),L);L.vertex=1;b.model.beginUpdate();try{L=b.addCell(L),b.fireEvent(new mxEventObject("cellsInserted","cells",[L])),b.fireEvent(new mxEventObject("freehandInserted","cell",L))}finally{b.model.endUpdate()}A&&b.setSelectionCells([L])}}for(L=0;L<p.length;L++)p[L].parentNode.removeChild(p[L]);c=null;p=[];u=[]}D(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(y,L){n&&L.getProperty("event").consume()}));
+b.addMouseListener({mouseDown:mxUtils.bind(this,function(y,L){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(y=L.getEvent(),n&&!mxEvent.isPopupTrigger(y)&&!mxEvent.isMiddleMouseButton(y)&&!mxEvent.isMultiTouchEvent(y))){var J=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);J=Math.max(1,J*b.view.scale);var K=this.getStrokeColor();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",H?K:"none");c.setAttribute("pointer-events","none");c.setAttribute("stroke",
+K);c.setAttribute("stroke-width",J);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(K=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",K=K.split(" ").map(function(m){return parseFloat(m)*J}).join(" "),c.setAttribute("stroke-dasharray",K));l=[];y=R(y);P(y);q="M"+y.x+" "+y.y;u.push(y);z=[];c.setAttribute("d",H?PerfectFreehand.getSvgPathFromStroke([[y.x,y.y]],I):q);f.appendChild(c);L.consume()}}),mouseMove:mxUtils.bind(this,function(y,L){if(null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){y=
+L.getEvent();y=R(y);P(y);var J=v(0);if(J)if(u.push(J),H){var K=[];for(J=0;J<u.length;J++)K.push([u[J].x,u[J].y]);z=[];for(var m=2;m<l.length;m+=2)J=v(m),K.push([J.x,J.y]),z.push(J);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(K,I))}else{q+=" L"+J.x+" "+J.y;K="";z=[];for(m=2;m<l.length;m+=2)J=v(m),K+=" L"+J.x+" "+J.y,z.push(J);c.setAttribute("d",q+K)}d&&(J=b.view.translate,b.scrollRectToVisible((new mxRectangle(y.x-J.x,y.y-J.y)).grow(20)));L.consume()}}),mouseUp:mxUtils.bind(this,function(y,
+L){null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(S(L.getEvent()),L.consume())})});var R=function(y){return mxUtils.convertPoint(b.container,mxEvent.getClientX(y),mxEvent.getClientY(y))},P=function(y){for(l.push(y);l.length>k;)l.shift()},v=function(y){var L=l.length;if(1===L%2||L>=k){var J=0,K=0,m,t=0;for(m=y;m<L;m++)t++,y=l[m],J+=y.x,K+=y.y;return{x:J/t,y:K/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,f,k){function c(M,O){try{if(!v){var Q=f.file.getCurrentUser();if(P&&null!=Q&&null!=Q.displayName){var T={from:D,id:x,type:M,sessionId:f.clientId,userId:Q.id,username:Q.displayName,data:O,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};T={bytes:f.objectToString(T),data:"aes"};T=JSON.stringify(T);y&&"cursor"!=M&&EditorUi.debug("P2PCollab: sending to socket server",[T]);x++;Q=!y&&("cursor"==M||"selectionChange"==M);R&&!Q&&m("message",T);if(Q)for(p2pId in U)U[p2pId].send(T)}}}catch(V){null!=
+window.console&&console.error(V,M,O)}}function p(M){if(b.shareCursorPosition&&!F.isMouseDown){var O=mxUtils.getOffset(F.container),Q=F.view.translate,T=F.view.scale,V=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:V,x:Math.round((M.getX()-O.x+F.container.scrollLeft)/T-Q.x),y:Math.round((M.getY()-O.y+F.container.scrollTop)/T-Q.y)})}}function q(M,O){var Q=null!=b.currentPage?b.currentPage.getId():null;if(null!=M&&null!=M.cursor&&null!=M.lastCursor)if(null!=M.lastCursor.hide||!b.isShowRemoteCursors()||
+null!=M.lastCursor.pageId&&M.lastCursor.pageId!=Q)M.cursor.style.display="none";else{Q=function(){var Z=Math.max(F.container.scrollLeft,Math.min(F.container.scrollLeft+F.container.clientWidth-M.cursor.clientWidth,X)),aa=Math.max(F.container.scrollTop-22,Math.min(F.container.scrollTop+F.container.clientHeight-M.cursor.clientHeight,W));Y.style.opacity=Z!=X||aa!=W?0:1;M.cursor.style.left=Z+"px";M.cursor.style.top=aa+"px";M.cursor.style.display=""};var T=F.view.translate,V=F.view.scale,X=(T.x+M.lastCursor.x)*
+V+8,W=(T.y+M.lastCursor.y)*V-12,Y=M.cursor.getElementsByTagName("img")[0];O?(mxUtils.setPrefixedStyle(M.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(Y.style,"transition","all 900ms ease-out"),window.setTimeout(Q,0)):(mxUtils.setPrefixedStyle(M.cursor.style,"transition",null),mxUtils.setPrefixedStyle(Y.style,"transition",null),Q())}}function u(M,O){try{var Q=function(){if(null==n[V]){var ca=H[V];null==ca&&(ca=d%l.length,H[V]=ca,d++);var ka=l[ca];ca=11<ca?"black":"white";
+n[V]={cursor:document.createElement("div"),color:ka,selection:{}};B[O]=V;X=n[V].cursor;X.style.pointerEvents="none";X.style.position="absolute";X.style.display="none";X.style.opacity="0.9";var la=document.createElement("img");mxUtils.setPrefixedStyle(la.style,"transform","rotate(-45deg)translateX(-14px)");la.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ka+'" fill="'+ka+'"/>').src);la.style.width="10px";X.appendChild(la);la=document.createElement("div");
+la.style.backgroundColor=ka;la.style.color=ca;la.style.fontSize="9pt";la.style.padding="3px 7px";la.style.marginTop="8px";la.style.borderRadius="10px";la.style.maxWidth="100px";la.style.overflow="hidden";la.style.textOverflow="ellipsis";la.style.whiteSpace="nowrap";mxUtils.write(la,T);X.appendChild(la);b.diagramContainer.appendChild(X)}else X=n[V].cursor;W=n[V].selection};if(!v){M=JSON.parse(M);null!=M.bytes&&(M=f.stringToObject(M.bytes));y&&"cursor"!=M.type&&EditorUi.debug("P2PCollab: msg received",
+[M]);if(null!=O){if(M.from==D||A[M.from]>=M.id){EditorUi.debug("P2PCollab: Dropped Message",M,D,A[M.from]);return}A[M.from]=M.id}var T=M.username?M.username:"Anonymous",V=M.sessionId,X,W;null!=n[V]&&(clearTimeout(n[V].inactiveTO),n[V].inactiveTO=setTimeout(function(){G(null,V)},12E4));var Y=M.data;switch(M.type){case "cursor":Q();n[V].lastCursor=Y;q(n[V],!0);break;case "diff":try{M=null!=Y.patch?f.stringToObject(decodeURIComponent(Y.patch)):Y.diff,f.receiveRemoteChanges(M.d)}catch(ca){EditorUi.debug("P2PCollab: Diff msg error",
+ca)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var Z=null!=b.currentPage?b.currentPage.getId():null;if(null==Z||null!=Y.pageId&&Y.pageId==Z){Q();for(Q=0;Q<Y.removed.length;Q++){var aa=Y.removed[Q];if(null!=aa){var ja=W[aa];delete W[aa];null!=ja&&ja.destroy()}}for(Q=0;Q<Y.added.length;Q++)if(aa=Y.added[Q],null!=aa){var ea=F.model.getCell(aa);null!=ea&&(W[aa]=F.highlightCell(ea,n[V].color,6E4,70,3))}}}break;case "notify":M=null!=Y.data?f.stringToObject(decodeURIComponent(Y.data)):
+Y.msg,f.handleMessageData(M.d)}f.file.fireEvent(new mxEventObject("realtimeMessage","message",M))}}catch(ca){null!=window.console&&console.warn(ca,M,O)}}function z(M,O){if(!y&&SimplePeer.WEBRTC_SUPPORT){var Q=new SimplePeer({initiator:O,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});Q.on("signal",function(T){m("sendSignal",{to:M,from:D,signal:T})});Q.on("error",function(T){delete S[M];EditorUi.debug("P2PCollab: p2p socket error",T);!v&&O&&Q.destroyed&&I[M]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",
+M),z(M,!0))});Q.on("connect",function(){delete S[M];null==U[M]||U[M].destroyed?(U[M]=Q,I[M]=!0,EditorUi.debug("P2PCollab: p2p socket connected",M)):(Q.noP2PMapDel=!0,Q.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",M))});Q.on("close",function(){Q.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",M),E(B[M]),delete U[M])});Q.on("data",u);return S[M]=Q}}function G(M,O){E(O||B[M]);null!=M&&(delete B[M],I[M]=!1)}function E(M){var O=n[M];if(null!=O){var Q=O.selection,T;for(T in Q)null!=
+Q[T]&&Q[T].destroy();null!=O.cursor&&null!=O.cursor.parentNode&&O.cursor.parentNode.removeChild(O.cursor);clearTimeout(O.inactiveTO);delete n[M]}}var F=b.editor.graph,d=0,g=null,l="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),n={},x=1,A={},B={},I={},H={},D,S={},U={},R=!0,P=!1,v=!1,y="0"!=urlParams["no-p2p"],L=!1,J=0,K=null,m=mxUtils.bind(this,function(M,O){if(!v)try{null!=
+g?(g.send(JSON.stringify({action:M,msg:O})),y||EditorUi.debug("P2PCollab: sending to socket server",[M],[O])):this.joinFile(!0)}catch(Q){K=Q,f.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,Q)}});this.sendMessage=c;this.sendDiff=function(M){this.sendMessage("diff",{diff:M})};this.sendNotification=function(M){this.sendMessage("notify",{msg:M})};this.getState=function(){return null!=g?g.readyState:3};this.getLastError=function(){return K};
+this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(M,O){},mouseMove:function(M,O){var Q,T=-1;return function(){clearTimeout(Q);var V=this,X=arguments,W=function(){Q=null;T=Date.now();M.apply(V,X)};Date.now()-T>O?W():Q=setTimeout(W,O)}}(function(M,O){p(O)},300),mouseUp:function(M,O){p(O)}};F.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);
+var t=mxGraphHandler.prototype.maxCells,C=null,N={};this.selectionChangeListener=function(M,O){var Q=function(T){return null!=T?T.id:null};null!=C&&window.clearTimeout(C);C=window.setTimeout(function(){for(var T=F.getSelectionCount()>t?[]:F.getSelectionCells().map(Q),V=null!=b.currentPage?b.currentPage.getId():null,X={},W=[],Y=[],Z=0;Z<T.length;Z++){var aa=T[Z];null!=aa&&(X[aa]=!0,null==N[aa]&&Y.push(aa))}for(aa in N)X[aa]||W.push(aa);N=X;c("selectionChange",{pageId:V,removed:W,added:Y})},300)};F.getSelectionModel().addListener(mxEvent.CHANGE,
+this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var M in n)q(n[M])});mxEvent.addListener(F.container,"scroll",this.cursorHandler);F.getView().addListener(mxEvent.SCALE,this.cursorHandler);F.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);F.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(M){if(!v)try{L&&
+(EditorUi.debug("P2PCollab: joinInProgress on",L),K="busy");L=++J;try{null!=g&&1==g.readyState&&(EditorUi.debug("P2PCollab: force closing socket on",g.joinId),g.close(1E3),g=null)}catch(T){EditorUi.debug("P2PCollab: closing socket error",T)}var O=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+k);null==g&&(g=O);O.addEventListener("open",function(T){g=O;g.joinId=L;L=!1;f.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",g.joinId);Editor.enableRealtimeCache||
+window.setTimeout(function(){f.sendJoinMessage()},0);M&&f.scheduleCleanup()});O.addEventListener("message",function(T){try{y||EditorUi.debug("P2PCollab: msg received",[T]);var V=JSON.parse(T.data);y&&"message"!=V.action&&EditorUi.debug("P2PCollab: msg received",[T]);switch(V.action){case "message":u(V.msg,V.from);break;case "clientsList":var X=V.msg;D=X.cId;P=!0;for(V=0;V<X.list.length;V++)z(X.list[V],!0);break;case "signal":var W=V.msg;if(!y){if(S[W.from])var Y=S[W.from];else Y=z(W.from,!1),R=!0;
+Y.signal(W.signal)}break;case "newClient":R=!0;break;case "clientLeft":G(V.msg);break;case "sendSignalFailed":var Z=V.msg;EditorUi.debug("P2PCollab: signal failed (socket not found on server)",Z);delete S[Z.to];I[Z.to]=!1}}catch(aa){null!=window.console&&console.warn(aa,T)}});var Q=!1;O.addEventListener("close",mxUtils.bind(this,function(T){EditorUi.debug("P2PCollab: WebSocket closed",O.joinId,"reconnecting",T.code,T.reason);EditorUi.debug("P2PCollab: closing socket on",O.joinId);v||1E3==T.code||
+J!=O.joinId||(L==J&&(EditorUi.debug("P2PCollab: joinInProgress in close on",O.joinId),L=!1),Q||(EditorUi.debug("P2PCollab: calling rejoin on",O.joinId),window.setTimeout(mxUtils.bind(this,function(){Q=!0;this.joinFile(!0)}),500)));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));O.addEventListener("error",mxUtils.bind(this,function(T){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",T);EditorUi.debug("P2PCollab: error socket on",O.joinId);v||J!=O.joinId||(L==J&&(EditorUi.debug("P2PCollab: joinInProgress in error on",
+O.joinId),L=!1),Q||(EditorUi.debug("P2PCollab: calling rejoin on",O.joinId),Q=!0,this.joinFile(!0)));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(T){K=T,f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!v){EditorUi.debug("P2PCollab: destroyed");v=!0;for(sessionId in n)E(sessionId);null!=this.mouseListeners&&F.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&
+F.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(F.container,"scroll",this.cursorHandler),F.view.removeListener(this.cursorHandler),b.editor.removeListener(this.cursorHandler),b.removeListener(this.cursorHandler));null!=g&&1<=g.readyState&&(g.close(1E3),g=null);for(var M in U)null!=U[M]&&U[M].destroy();f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}
;
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index 254f3867e..0506df148 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -3360,12 +3360,6 @@ App.prototype.start = function()
null, null, null, null, null, true);
Editor.useLocalStorage = prev;
}
- else if (urlParams['smart-template'] != null)
- {
- this.createFile(this.defaultFilename, null,
- null, null, null, null, null, true);
- this.actions.get('insertTemplate').funct();
- }
else
{
var waiting = false;
@@ -3439,6 +3433,14 @@ App.prototype.start = function()
value = decodeURIComponent(window.location.hash.substring(8));
}
+ if (urlParams['smart-template'] != null && (window.location.hash == null ||
+ window.location.hash.length <= 1))
+ {
+ value = JSON.stringify({
+ type: 'generate', data: decodeURIComponent(urlParams['smart-template'])
+ });
+ }
+
if ((window.location.hash == null || window.location.hash.length <= 1 ||
window.location.hash.substring(0, 8) == '#create=') &&
value.length > 0 && this.spinner.spin(document.body, mxResources.get('loading')))
@@ -3523,11 +3525,12 @@ App.prototype.start = function()
this.spinner.stop();
value = JSON.parse(value);
- var createDiagram = mxUtils.bind(this, function(data)
+ var createDiagram = mxUtils.bind(this, function(xml)
{
- this.createFile((data.filename != null) ?
- data.filename : this.defaultFilename,
- data, null, null, mxUtils.bind(this, function()
+ this.spinner.stop();
+ this.createFile((value.filename != null) ?
+ value.filename : this.defaultFilename,
+ xml, null, null, mxUtils.bind(this, function()
{
if (!this.editor.chromeless || this.editor.editable)
{
@@ -3537,7 +3540,7 @@ App.prototype.start = function()
window.history.replaceState(null, null,
window.location.pathname +
this.getSearch(['create']));
- window.location.hash = 'R' + Graph.compress(data);
+ window.location.hash = 'R' + Graph.compress(xml);
}), true, null, true);
});
@@ -3547,35 +3550,19 @@ App.prototype.start = function()
{
data = Graph.decompress(data);
}
-
- if (value.type == 'mermaid')
+
+ if (value.type == 'mermaid' && this.spinner.spin(
+ document.body, mxResources.get('loading')))
{
if (window.isMermaidEnabled)
{
- mxMermaidToDrawio.addListener(mxUtils.bind(this, function(data)
- {
- if (data != this.emptyDiagramXml)
- {
- createDiagram(data);
- }
- }));
-
- this.generateMermaidImage(data, null, function()
+ this.parseMermaidDiagram(data, null, mxUtils.bind(this, function(xml)
{
- // callback implemented above
- }, mxUtils.bind(this, function(e)
+ createDiagram(xml);
+ }), mxUtils.bind(this, function(e)
{
- // Removes div in document with an ID that starts with dgeMermaidOutput
- var divs = document.querySelectorAll('div[id^="dgeMermaidOutput"]');
-
- for (var i = 0; i < divs.length; i++)
- {
- divs[i].parentNode.removeChild(divs[i]);
- }
-
- mxMermaidToDrawio.resetListeners();
this.handleError(e);
- }));
+ }), null, true);
}
else
{
@@ -3588,14 +3575,30 @@ App.prototype.start = function()
document.body, mxResources.get('generate') +
' \''+ data + '\''))
{
- this.generateDiagram(data, mxUtils.bind(this, function(xml)
+ this.generateOpenAiMermaidDiagram(data, function(xml)
{
- this.spinner.stop();
createDiagram(xml);
- }), mxUtils.bind(this, function(e)
+ }, mxUtils.bind(this, function(e)
{
this.handleError(e, mxResources.get('errorLoadingFile'));
- }));
+ }), true, {complexity: 'high'});
+ }
+ else if (value.type == 'csv')
+ {
+ var graph = this.createTemporaryGraph(this.editor.graph.getStylesheet());
+
+ this.importCsv(data, mxUtils.bind(this, function()
+ {
+ var codec = new mxCodec();
+ createDiagram(mxUtils.getXml(
+ codec.encode(graph.getModel())));
+ }), graph);
+ }
+ else
+ {
+ this.handleError(
+ {message: mxResources.get('invalidCallFnNotFound', [value.type])},
+ mxResources.get('errorLoadingFile'));
}
}
else
@@ -3693,6 +3696,36 @@ App.prototype.start = function()
}
};
+/**
+ *
+ */
+App.prototype.openGenerateDialog = function(prompt)
+{
+ if (this.chatWindow == null)
+ {
+ this.chatWindow = new ChatWindow(this, 224, 104, 280, 320);
+ this.chatWindow.window.addListener('show', mxUtils.bind(this, function()
+ {
+ this.fireEvent(new mxEventObject('chat'));
+ }));
+ this.chatWindow.window.addListener('hide', function()
+ {
+ this.fireEvent(new mxEventObject('chat'));
+ });
+ this.chatWindow.window.setVisible(true);
+ this.fireEvent(new mxEventObject('chat'));
+ }
+ else
+ {
+ this.chatWindow.window.setVisible(true);
+ }
+
+ if (prompt != null)
+ {
+ this.chatWindow.generate(prompt);
+ }
+};
+
/**
* Generate a diagram for the given description.
*/
@@ -3727,42 +3760,6 @@ App.prototype.openTemplateDialog = function(generatePrompt)
}
};
-/**
- * Generate a diagram for the given description.
- */
-App.prototype.generateDiagram = function(desc, success, error)
-{
- var listenerTriggered = false;
- var xmlResult = null;
-
- var prompt = 'Write a detailed and complex MermaidJS declaration for ' +
- '"' + (desc != '' ? desc : 'something random') + '" ' +
- 'using correct MermaidJS syntax and do not ' +
- 'provide additional text in your response.';
-
- if (typeof mxMermaidToDrawio !== 'undefined')
- {
- mxMermaidToDrawio.addListener(mxUtils.bind(this, function(modelXml)
- {
- if (modelXml != this.emptyDiagramXml)
- {
- listenerTriggered = true;
- xmlResult = modelXml;
- }
- }));
- }
-
- this.generateOpenAiMermaidDiagram(prompt,
- function(mermaidData, imageData, w, h)
- {
- xmlResult = (listenerTriggered) ? xmlResult :
- this.createMermaidXml(mermaidData,
- EditorUi.defaultMermaidConfig,
- imageData, w, h, desc);
- success(xmlResult, imageData);
- }, error);
-};
-
/**
* Checks for orphaned drafts.
*/
diff --git a/src/main/webapp/js/diagramly/Devel.js b/src/main/webapp/js/diagramly/Devel.js
index b39b1fddf..ba8818256 100644
--- a/src/main/webapp/js/diagramly/Devel.js
+++ b/src/main/webapp/js/diagramly/Devel.js
@@ -11,34 +11,8 @@ if (!mxIsElectron)
(function()
{
var hashes = 'default-src \'self\'; ' +
- 'script-src %script-src% \'self\' https://viewer.diagrams.net https://apis.google.com https://*.pusher.com ' +
- // Below are the SHAs of the two script blocks in index.html.
- // These must be updated here and in the CDN after changes.
- // Note: Desktop app uses only the newest hashes (replace it in electron.js [The one in index.html needs to be changed only if the second script block changes])
- //----------------------------------------------------------//
- //------------- Bootstrap script in index.html -------------//
- //----------------------------------------------------------//
- // Version 24.4.4
- '\'sha256-f6cHSTUnCvbQqwa6rKcbWIpgN9dLl0ROfpEKTQUQPr8=\' ' +
- //---------------------------------------------------------//
- //------------- App.main script in index.html -------------//
- //---------------------------------------------------------//
- // Version 13.8.2
- '\'sha256-vS/MxlVD7nbY7AnV+0t1Ap338uF7vrcs7y23KjERhKc=\' ' +
- //---------------------------------------------------------//
- '; ';
+ 'script-src %script-src% \'self\' https://viewer.diagrams.net https://apis.google.com https://*.pusher.com; ';
- var styleHashes = '\'sha256-pVoUz0B9cDvBP/6KP+5uOMqPh1c14hF0KFqSELqeyNQ=\' ' + // index.html
- '\'sha256-D9Gy46rimBnLRtBqv9U464kXQ5oT5JvkurboVMjtN0Q=\' ' + // MinimalCss/Light
- '\'sha256-C9BzsAi3ukZpBZzbdTpUNpxHfPR/+KJbeueKj1U6QGY=\' ' + // MinimalCss/Dark
- '\'sha256-7kY8ozVqKLIIBwZ24dhdmZkM26PsOlZmEi72RhmZKoM=\' ' + // mxTooltipHandler.js
- '\'sha256-kuk5TvxZ/Kwuobo4g6uasb1xRQwr1+nfa1A3YGePO7U=\' ' + // MathJax
- '\'sha256-ByOXYIXIkfNC3flUR/HoxR4Ak0pjOEF1q8XmtuIa6po=\' ' + // purify.min.js
- '\'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=\' ' + // spin.min.js
- '\'sha256-nzHi23DROym7G011m6y0DyDd9mvQL2hSJ0Gy3g2T/5Q=\' ' + // dropins.js
- '\'sha256-xjAW8oXqJlP0CWqxT9s80kgOtOjvENMmfnnfulL6p1A=\' ' + // gapi
- '\'unsafe-hashes\'; '; // Required for hashes for style attribute
-
var directives = 'connect-src %connect-src% \'self\' https://*.draw.io https://*.diagrams.net ' +
'https://*.googleapis.com wss://app.diagrams.net wss://*.pusher.com https://*.pusher.com ' +
'https://api.github.com https://raw.githubusercontent.com https://gitlab.com ' +
@@ -49,11 +23,9 @@ if (!mxIsElectron)
// www.draw.io required for browser data migration to app.diagrams.net and
// viewer.diagrams.net required for iframe embed preview
'frame-src %frame-src% \'self\' https://viewer.diagrams.net https://www.draw.io https://*.google.com; ' +
- 'style-src %style-src% \'self\' https://fonts.googleapis.com ' +
- // Replaces unsafe-inline style-src with hashes with safe-style-src URL parameter
- ((urlParams['safe-style-src'] == '1') ? styleHashes : '\'unsafe-inline\'; ') +
- 'base-uri \'none\';' +
- 'child-src \'self\';' +
+ 'style-src %style-src% \'self\' https://fonts.googleapis.com \'unsafe-inline\'; ' +
+ 'base-uri \'none\'; ' +
+ 'child-src \'self\'; ' +
'object-src \'none\';';
var csp = hashes + directives;
@@ -85,8 +57,8 @@ if (!mxIsElectron)
'media-src * data:; ' +
'font-src * data:; ' +
'style-src \'self\' https://fonts.googleapis.com \'unsafe-inline\'; ' +
- 'base-uri \'none\';' +
- 'object-src \'none\';' +
+ 'base-uri \'none\'; ' +
+ 'object-src \'none\'; ' +
'worker-src https://viewer.diagrams.net/service-worker.js;'
console.log('viewer.diagrams.net:', viewer_diagrams_net);
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 471b0c478..6b66abd04 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -1731,8 +1731,6 @@ var ParseDialog = function(editorUi, title, defaultType)
function parse(text, type, evt)
{
- var lines = text.split('\n');
-
if (type == 'plantUmlPng' || type == 'plantUmlSvg' || type == 'plantUmlTxt')
{
if (editorUi.spinner.spin(document.body, mxResources.get('inserting')))
@@ -1799,92 +1797,25 @@ var ParseDialog = function(editorUi, title, defaultType)
{
if (editorUi.spinner.spin(document.body, mxResources.get('inserting')))
{
- var k = 0;
-
- while (k < lines.length && (lines[k].trim().length == 0 ||
- lines[k].substring(0, 2) == '%%'))
- {
- k++;
- }
-
- if (lines[k].trim() == '---')
- {
- do
- {
- k++;
- }
- while (k < lines.length && lines[k].trim() != '---');
-
- k++;
- }
-
- var diagramType = lines[k].trim().toLowerCase();
- var sp = diagramType.indexOf(' ');
- diagramType = diagramType.substring(0, sp > 0 ? sp : diagramType.length);
- // TODO Better to add only what we support?
- var inDrawioFormat = typeof mxMermaidToDrawio !== 'undefined' &&
- type == 'mermaid2drawio' && (diagramType == 'graph' ||
- diagramType == 'flowchart' || diagramType == 'sequencediagram' ||
- diagramType == 'classdiagram' || diagramType == 'statediagram-v2' ||
- diagramType == 'statediagram' || diagramType == 'erdiagram' ||
- diagramType == 'requirementdiagram' || diagramType == 'gitgraph' ||
- diagramType == 'mindmap' || diagramType == 'journey');
-
- var graph = editorUi.editor.graph;
-
- if (inDrawioFormat)
- {
- mxMermaidToDrawio.addListener(mxUtils.bind(this, function(modelXml)
- {
- editorUi.spinner.stop();
- graph.setSelectionCells(editorUi.importXml(modelXml,
- Math.max(insertPoint.x, 20),
- Math.max(insertPoint.y, 20),
- true, null, null, true));
- graph.scrollCellToVisible(graph.getSelectionCell());
- }));
- }
-
- editorUi.generateMermaidImage(text, null, function(data, w, h)
+ editorUi.parseMermaidDiagram(text, null, mxUtils.bind(this, function(xml)
{
- if (inDrawioFormat) return;
-
- insertPoint = (mxEvent.isAltDown(evt)) ? insertPoint : graph.getCenterInsertPoint(new mxRectangle(0, 0, w, h));
editorUi.spinner.stop();
- var cell = null;
-
- graph.getModel().beginUpdate();
- try
- {
- cell = graph.insertVertex(null, null, null, insertPoint.x, insertPoint.y,
- w, h, 'shape=image;noLabel=1;verticalAlign=top;imageAspect=1;' +
- 'image=' + data + ';')
- graph.setAttributeForCell(cell, 'mermaidData',
- JSON.stringify({data: text}, null, 2));
- }
- finally
- {
- graph.getModel().endUpdate();
- }
-
- if (cell != null)
- {
- graph.setSelectionCell(cell);
- graph.scrollCellToVisible(cell);
- }
- }, function(e)
+ var graph = editorUi.editor.graph;
+ graph.setSelectionCells(
+ editorUi.importXml(xml,
+ Math.max(insertPoint.x, 20),
+ Math.max(insertPoint.y, 20),
+ true, null, null, true));
+ graph.scrollCellToVisible(graph.getSelectionCell());
+ }), mxUtils.bind(this, function(e)
{
- if (typeof mxMermaidToDrawio !== 'undefined')
- {
- mxMermaidToDrawio.resetListeners();
- }
-
editorUi.handleError(e);
- });
+ }), null, type == 'mermaid2drawio');
}
}
else if (type == 'table')
{
+ var lines = text.split('\n');
var tableCell = null;
var cells = [];
var dx = 0;
@@ -1992,6 +1923,8 @@ var ParseDialog = function(editorUi, title, defaultType)
}
else if (type == 'list')
{
+ var lines = text.split('\n');
+
if (lines.length > 0)
{
var graph = editorUi.editor.graph;
@@ -2933,250 +2866,6 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
var lastAiXml = null;
var lastAiTitle = null;
- function createSmartTemplateContent()
- {
- var content = document.createElement('div');
- content.style.position = 'absolute';
- content.style.overflow = 'visible';
- content.style.left = '8px';
- content.style.right = '8px';
- content.style.bottom = '8px';
- content.style.top = '8px';
-
- mxUtils.write(content, mxResources.get('describeYourDiagram') + ':');
- mxUtils.br(content);
-
- var description = document.createElement('input');
- description.setAttribute('type', 'text');
- description.setAttribute('placeholder', mxResources.get('processForHiringNewEmployee'));
- description.style.width = '100%';
- description.style.marginTop = '6px';
- description.style.marginBottom = '4px';
- description.style.boxSizing = 'border-box';
- content.appendChild(description);
-
- content.init = function()
- {
- description.focus();
- };
-
- mxUtils.br(content);
-
- var preview = document.createElement('div');
- preview.style.top = '86px'
- preview.style.left = '0';
- preview.style.right = '0';
- preview.style.bottom = '0';
- preview.style.margin = '0';
- preview.style.borderRadius = '0';
- preview.style.width = 'auto';
- preview.style.height = 'auto';
- preview.style.position = 'absolute';
- preview.style.border = '1px solid #424242';
- preview.className = 'geTemplate';
-
- var previewText = document.createElement('div');
- previewText.style.boxSizing = 'border-box';
- previewText.style.position = 'absolute';
- previewText.style.fontSize = '14px';
- previewText.style.textAlign = 'center';
- previewText.style.top = '50%';
-
- mxUtils.write(previewText, mxResources.get('blankDiagram'));
- preview.appendChild(previewText);
-
- // Adds diagram type options
- var typeSelect = document.createElement('select');
- typeSelect.className = 'geBtn';
- typeSelect.style.maxWidth = '160px';
- typeSelect.style.marginLeft = '0px';
-
- var option = document.createElement('option');
- mxUtils.write(option, mxResources.get('diagramType'));
- option.setAttribute('value', '');
- typeSelect.appendChild(option);
-
- for (var i = 0; i < EditorUi.mermaidDiagramTypes.length; i++)
- {
- var option = document.createElement('option');
- var type = EditorUi.mermaidDiagramTypes[i];
- var key = type;
-
- if (type == urlParams['smart-template-type'])
- {
- option.setAttribute('selected', 'selected');
- }
-
- // Maps types to translations
- if (key == 'erDiagram')
- {
- key = 'entityRelationshipDiagram';
- }
-
- var title = mxResources.get(key, null, key.charAt(0).toUpperCase() +
- key.substring(1).replace(/[A-Z]/g, ' $&'));
- option.setAttribute('value', type);
- mxUtils.write(option, title);
- typeSelect.appendChild(option);
- }
-
- var button = mxUtils.button(mxResources.get('generate'), function()
- {
- var desc = description.value;
- var type = typeSelect.value.replace(/([A-Z])/g, " $1").toLowerCase();
- var prompt = 'Write the declaration code for a detailed and complex ' +
- (type != '' ? type : 'graph') + ' that shows "' + (desc != '' ? desc :
- 'something random') + '" using correct MermaidJS syntax and do not ' +
- 'provide additional text in your response.';
- var type = ((typeSelect.value != '') ? (' (' + mxUtils.trim(
- mxUtils.getTextContent(typeSelect.options[
- typeSelect.selectedIndex])) + ')') : '');
- var useMermaidFormat = typeSelect.value == 'gantt' || typeSelect.value == 'pie' ||
- typeSelect.value == 'timeline' || typeSelect.value == 'quadrantchart' ||
- typeSelect.value == 'c4context';
- var title = description.value + type;
-
- if (typeof mxMermaidToDrawio !== 'undefined')
- {
- mxMermaidToDrawio.addListener(mxUtils.bind(this, function(modelXml)
- {
- if (!useMermaidFormat)
- {
- templateXml = modelXml;
- lastAiXml = templateXml;
- lastAiTitle = 'Smart Template: ' + title;
- }
- }));
- }
-
- if (editorUi.spinner.spin(preview, mxResources.get('generate') + ' \''+ desc + '\''))
- {
- editorUi.generateOpenAiMermaidDiagram(prompt,
- function(mermaidData, imageData, w, h)
- {
- editorUi.spinner.stop();
- preview.innerHTML = '';
- var img = document.createElement('img');
- img.setAttribute('title', mxResources.get('preview'));
- img.src = 'data:image/svg+xml;base64,' +
- imageData.substring(imageData.indexOf(',') + 1);
- img.style.cursor = 'pointer';
- img.style.width = '95%';
- img.style.height = '95%';
- preview.appendChild(img);
-
- var xml = editorUi.createMermaidXml(mermaidData,
- EditorUi.defaultMermaidConfig,
- imageData, w, h, title);
-
- // Updates template XML for insert button
- var previewXml = '<mxfile><diagram>' + Graph.compress(xml) + '</diagram></mxfile>';
-
- if (useMermaidFormat || typeof mxMermaidToDrawio === 'undefined')
- {
- templateXml = xml;
- lastAiXml = xml;
- }
-
- var magnify = magnifyImage.cloneNode(true);
- preview.appendChild(magnify);
-
- var mouseDownHandler = function(evt)
- {
- wasVisible = editorUi.sidebar.tooltip != null &&
- editorUi.sidebar.tooltip.style.display != 'none';
- };
-
- var mouseUpHandler = function(evt)
- {
- if (!wasVisible)
- {
- showTooltip(previewXml, mxEvent.getClientX(evt),
- mxEvent.getClientY(evt), img, title);
- }
- };
-
- mxEvent.addGestureListeners(img, mouseDownHandler, null, mouseUpHandler);
- mxEvent.addGestureListeners(magnify, mouseDownHandler, null, mouseUpHandler);
- }, function(e)
- {
- editorUi.spinner.stop();
-
- if (mxMermaidToDrawio.resetListeners != null)
- {
- mxMermaidToDrawio.resetListeners();
- }
-
- editorUi.handleError(e);
- }
- );
- }
- });
-
- button.setAttribute('disabled', 'disabled');
- button.className = 'geBtn gePrimaryBtn';
-
- var updateState = function()
- {
- window.setTimeout(function()
- {
- if (description.value != '')
- {
- button.removeAttribute('disabled');
- }
- else
- {
- button.setAttribute('disabled', 'disabled');
- }
- }, 0);
- };
-
- var temp = (generatePrompt != null) ? generatePrompt :
- urlParams['smart-template'];
-
- if (temp != null && temp != '1')
- {
- description.value = decodeURIComponent(temp);
- updateState();
-
- if (temp != '' && (generatePrompt != null ||
- urlParams['smart-template-generate'] == '1'))
- {
- window.setTimeout(function()
- {
- button.click();
- }, 0);
- }
- }
-
- mxEvent.addListener(description, 'change', updateState);
- mxEvent.addListener(description, 'keydown', updateState);
- mxEvent.addListener(description, 'cut', updateState);
- mxEvent.addListener(description, 'paste', updateState);
-
- mxEvent.addListener(description, 'keydown', function(e)
- {
- if (e.keyCode == 13)
- {
- button.click();
- }
- });
-
- var buttons = document.createElement('div');
- buttons.style.height = '40px';
- buttons.style.marginTop = '4px';
- buttons.style.marginBottom = '4px';
- buttons.style.whiteSpace = 'nowrap';
- buttons.style.overflowX = 'auto';
- buttons.style.overflowY = 'hidden';
- buttons.appendChild(typeSelect);
- buttons.appendChild(button);
- content.appendChild(buttons);
- content.appendChild(preview);
-
- return content;
- };
-
function create()
{
if (selectedElt == generateElt && templateXml == null &&
@@ -3349,7 +3038,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
var w = 140;
var h = w;
var generateElt = null;
- var generateBackground = 'url(' + Editor.sparklesImage + ')';
+ var generateBackground = 'url(' + Editor.thinSparklesImage + ')';
var generateForm = document.createElement('div');
generateForm.className = 'geGenerateDiagramForm';
@@ -3532,20 +3221,19 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
generatePreview.style.display = '';
generateForm.style.display = 'none';
- editorUi.generateDiagram(desc, mxUtils.bind(this, function(xml, imageData)
+ editorUi.generateOpenAiMermaidDiagram(desc, function(xml)
{
generatingDiagram = false;
if (selectedElt == generateElt && generateForm.style.display == 'none')
{
- generateBackground = 'url(' + 'data:image/svg+xml;base64,' +
- imageData.substring(imageData.indexOf(',') + 1) + ')';
+ generateBackground = 'url(' + Editor.createSvgDataUri(
+ mxUtils.getXml(editorUi.getSvgForXml(xml))) + ')';
generateElt.setAttribute('title', desc);
magnifyGenerate.style.display = '';
templateXml = xml;
lastAiXml = xml;
lastAiTitle = desc;
-
stopInput();
if (insertWasPressed)
@@ -3553,7 +3241,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
create();
}
}
- }), mxUtils.bind(this, function(e)
+ }, mxUtils.bind(this, function(e)
{
generatingDiagram = false;
@@ -3565,7 +3253,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
magnifyGenerate.style.visibility = 'hidden';
editorUi.handleError(e);
}
- }));
+ }), true);
}
else if (lastAiTitle != null)
{
@@ -3886,15 +3574,6 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
categories['basic'].push({title: 'generate', type: 'generative'});
}
- if (Editor.enableChatGpt &&
- editorUi.isExternalDataComms() &&
- editorUi.getServiceName() == 'draw.io' &&
- typeof mxMermaidToDrawio !== 'undefined' &&
- window.isMermaidEnabled)
- {
- categories['smartTemplate'] = {content: createSmartTemplateContent()};
- }
-
function resetTemplates()
{
if (lastEntry != null)
@@ -4163,13 +3842,6 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
}
}
});
-
- // Selects smart template section
- if (cat == 'smartTemplate' && (generatePrompt != null ||
- urlParams['smart-template'] != null))
- {
- entry.click();
- }
};
for (var cat in categories)
@@ -8842,44 +8514,64 @@ var ChatWindow = function(editorUi, x, y, w, h)
var graph = editorUi.editor.graph;
var div = document.createElement('div');
- div.style.textAlign = 'center';
+ div.style.display = 'flex';
+ div.style.flexDirection = 'column';
div.style.overflow = 'hidden';
div.style.height = '100%';
-
+ div.style.padding = '10px 12px 20px 12px';
+ div.style.boxSizing = 'border-box';
+
+ mxEvent.addGestureListeners(div, mxUtils.bind(this, function(evt)
+ {
+ if (editorUi.sidebar != null)
+ {
+ editorUi.sidebar.hideTooltip();
+ }
+ }), null, null);
+
var hist = document.createElement('div');
- hist.style.position = 'absolute';
+ hist.style.flexGrow = '1';
hist.style.overflow = 'auto';
- hist.style.top = '0px';
- hist.style.left = '0px';
- hist.style.right = '0px';
- hist.style.bottom = '104px';
+ hist.style.fontSize = '12px';
+ hist.style.marginRight = '-8px';
+ hist.style.paddingRight = '8px';
+ mxEvent.addListener(hist, 'scroll', function()
+ {
+ if (editorUi.sidebar != null)
+ {
+ editorUi.sidebar.hideTooltip();
+ }
+ });
+
div.appendChild(hist);
var user = document.createElement('div');
- user.style.position = 'absolute';
- user.style.boxSizing = 'border-box';
- user.style.borderRadius = '4px';
- user.style.border = '1px solid lightgray';
- user.style.margin = '8px 8px 16px 8px';
+ user.style.borderRadius = '20px';
+ user.style.backgroundColor = 'light-dark(#e0e0e0, #3a3a3a)';
user.style.padding = '8px';
- user.style.left = '0px';
- user.style.right = '0px';
- user.style.bottom = '0px';
- user.style.padding = '6px';
- user.style.height = '80px';
+ user.style.marginTop = '8px';
- var selects = document.createElement('div');
- selects.style.display = 'flex';
- selects.style.gap = '6px';
- selects.style.marginBottom = '6px';
+ var options = document.createElement('div');
+ options.style.display = 'flex';
+ options.style.gap = '6px';
+ options.style.paddingRight = '8px';
+ options.style.justifyContent = 'start';
var typeSelect = document.createElement('select');
+ typeSelect.style.borderColor = 'transparent';
typeSelect.style.textOverflow = 'ellipsis';
- typeSelect.style.flexGrow = '1';
- typeSelect.style.padding = '4px';
+ typeSelect.style.padding = '5px';
typeSelect.style.minWidth = '0';
- user.appendChild(selects);
+
+ if (typeof mxMermaidToDrawio !== 'undefined' && window.isMermaidEnabled)
+ {
+ var createOption = document.createElement('option');
+ createOption.setAttribute('value', 'createPublic');
+ mxUtils.write(createOption, mxResources.get('create') +
+ ' (' + mxResources.get('diagramIsPublic') + ')');
+ typeSelect.appendChild(createOption);
+ }
var includeOption = document.createElement('option');
includeOption.setAttribute('value', 'includeCopyOfMyDiagram');
@@ -8890,54 +8582,40 @@ var ChatWindow = function(editorUi, x, y, w, h)
selectionOption.setAttribute('value', 'selectionOnly');
mxUtils.write(selectionOption, mxResources.get('selectionOnly'));
typeSelect.appendChild(selectionOption);
- selects.appendChild(typeSelect);
-
+
if (typeof mxMermaidToDrawio !== 'undefined' && window.isMermaidEnabled)
{
var createOption = document.createElement('option');
createOption.setAttribute('value', 'create');
mxUtils.write(createOption, mxResources.get('create'));
typeSelect.appendChild(createOption);
+ typeSelect.value = 'create';
}
var helpOption = document.createElement('option');
helpOption.setAttribute('value', 'help');
mxUtils.write(helpOption, mxResources.get('help'));
typeSelect.appendChild(helpOption);
+ typeSelect.value = 'createPublic';
- var resetOption = document.createElement('option');
- resetOption.setAttribute('value', 'reset');
- mxUtils.write(resetOption, mxResources.get('reset'));
- typeSelect.appendChild(resetOption);
-
- // Adds diagram type options
- var diagramType = document.createElement('select');
- diagramType.style.textOverflow = 'ellipsis';
- diagramType.style.flexGrow = '1';
- diagramType.style.padding = '4px';
- diagramType.style.minWidth = '0';
+ // Adds a drop down for selecting the model from Editor.gptModels
+ var modelSelect = typeSelect.cloneNode(false);
- for (var i = 0; i < EditorUi.mermaidDiagramTypes.length; i++)
+ for (var key in Editor.gptModels)
{
- var option = document.createElement('option');
- var type = EditorUi.mermaidDiagramTypes[i];
- var key = type;
-
- // Maps types to translations
- if (key == 'erDiagram')
+ var value = Editor.gptModels[key];
+
+ if ((value.substring(0, 4) == 'gpt-' && Editor.gptApiKey != null) ||
+ (value.substring(0, 7) == 'gemini-' && Editor.geminiApiKey != null))
{
- key = 'entityRelationshipDiagram';
+ var modelOption = document.createElement('option');
+ modelOption.setAttribute('value', value);
+ mxUtils.write(modelOption, key);
+ modelSelect.appendChild(modelOption);
}
-
- var title = mxResources.get(key, null, key.charAt(0).toUpperCase() +
- key.substring(1).replace(/[A-Z]/g, ' $&'));
- option.setAttribute('value', type);
- mxUtils.write(option, title);
- diagramType.appendChild(option);
}
-
- selects.appendChild(diagramType);
-
+
+ var publicChat = modelSelect.children.length == 0;
var inner = document.createElement('div');
inner.style.whiteSpace = 'nowrap';
inner.style.textOverflow = 'clip';
@@ -8949,7 +8627,7 @@ var ChatWindow = function(editorUi, x, y, w, h)
inp.style.outline = 'none';
inp.style.border = 'none';
inp.style.background = 'transparent';
- inp.style.padding = '8px 26px 8px 8px';
+ inp.style.padding = '6px 30px 6px 10px';
inp.style.boxSizing = 'border-box';
inner.appendChild(inp);
@@ -8961,7 +8639,7 @@ var ChatWindow = function(editorUi, x, y, w, h)
sendImg.style.cursor = 'pointer';
sendImg.style.opacity = '0.5';
sendImg.style.height = '19px';
- sendImg.style.left = '-24px';
+ sendImg.style.left = '-28px';
sendImg.style.top = '5px';
// Needed to block event transparency in IE
@@ -8970,17 +8648,11 @@ var ChatWindow = function(editorUi, x, y, w, h)
inner.appendChild(sendImg);
user.appendChild(inner);
- if (!graph.isSelectionEmpty())
- {
- typeSelect.value = 'selectionOnly';
- }
- else if (!editorUi.isDiagramEmpty())
- {
- typeSelect.value = 'includeCopyOfMyDiagram';
- }
- else
+ if (!publicChat)
{
- typeSelect.value = 'help';
+ options.appendChild(typeSelect);
+ options.appendChild(modelSelect);
+ user.appendChild(options);
}
var ignoreChange = false;
@@ -8989,41 +8661,29 @@ var ChatWindow = function(editorUi, x, y, w, h)
var updateDropdowns = function()
{
inp.setAttribute('placeholder', mxResources.get(
- (typeSelect.value == 'create') ?
+ (typeSelect.value == 'create' ||
+ typeSelect.value == 'createPublic') ?
'describeYourDiagram' :
'askMeAnything'));
-
- if (typeSelect.value == 'create')
- {
- typeSelect.style.width = '';
- diagramType.style.display = '';
- }
- else
- {
- typeSelect.style.width = '100%';
- diagramType.style.display = 'none';
- }
};
updateDropdowns();
- mxEvent.addListener(typeSelect, 'change', function()
+ function typeChanged()
{
if (!ignoreChange)
{
- if (typeSelect.value == 'reset')
- {
- typeSelect.value = lastType;
- hist.innerHTML = '';
- updateDropdowns();
- }
- else
- {
- lastType = typeSelect.value;
+ lastType = typeSelect.value;
updateDropdowns();
- }
}
- });
+
+ modelSelect.style.display =
+ (typeSelect.value == 'createPublic') ?
+ 'none' : '';
+ };
+
+ mxEvent.addListener(typeSelect, 'change', typeChanged);
+ typeChanged();
function updateType()
{
@@ -9068,51 +8728,13 @@ var ChatWindow = function(editorUi, x, y, w, h)
function createBubble()
{
var bubble = document.createElement('div');
- bubble.style.display = 'block';
- bubble.style.position = 'relative';
- bubble.style.backgroundColor = '#e0e0e0';
- bubble.style.borderRadius = '4px';
- bubble.style.wordWrap = 'break-word';
bubble.style.textAlign = 'left';
bubble.style.padding = '6px';
- bubble.style.margin = '12px';
- bubble.style.left = '0px';
- bubble.style.right = '0px';
+ bubble.style.margin = '6px 0';
return bubble;
}
- function createButton(label, fn, layout)
- {
- var button = document.createElement('button');
- button.className = 'geBtn gePrimaryBtn';
- button.style.padding = '4px';
- button.style.height = 'auto';
- button.style.position = 'relative';
-
- if (layout == 'flex')
- {
- button.style.overflow = 'hidden';
- button.style.textOverflow = 'ellipsis';
- button.style.whiteSpace = 'nowrap';
- button.style.margin = '0px';
- button.style.flexGrow = '1';
- }
- else
- {
- button.style.display = 'block';
- button.style.margin = '8px';
- button.style.left = '50%';
- button.style.transform = 'translateX(-50%)';
- }
-
- mxUtils.write(button, label);
- button.setAttribute('title', label);
- mxEvent.addListener(button, 'click', fn);
-
- return button;
- };
-
function addBubble(text)
{
var bubble = createBubble();
@@ -9122,78 +8744,116 @@ var ChatWindow = function(editorUi, x, y, w, h)
return bubble;
};
- function trimStart(text)
+ function addMessage(prompt)
{
- var index = text.indexOf('```');
+ var elts = [];
+ var bubble = addBubble(prompt);
+ elts.push(bubble);
- if (index >= 0)
- {
- text = text.substring(text, 0, index + 6);
- }
+ bubble.style.marginBottom = '2px';
+ bubble.style.marginLeft = '40%';
+ bubble.style.borderRadius = '10px';
+ bubble.style.backgroundColor = 'light-dark(#e0e0e0, #3a3a3a)';
- return text;
- };
+ var buttons = document.createElement('div');
+ buttons.className = 'geInlineButtons';
+ buttons.style.display = 'flex';
+ buttons.style.justifyContent = 'end';
+ elts.push(buttons);
- function trimEnd(text)
- {
- var index = text.lastIndexOf('```');
+ var btn = document.createElement('img');
+ btn.className = 'geAdaptiveAsset geLibraryButton';
+ btn.setAttribute('src', Editor.trashImage);
+ btn.setAttribute('title', mxResources.get('remove'));
+ buttons.appendChild(btn);
- if (index >= 0)
+ mxEvent.addListener(btn, 'click', mxUtils.bind(this, function(evt)
{
- text = text.substring(index + 3);
- }
-
- return text;
- };
+ if (mxEvent.isShiftDown(evt))
+ {
+ hist.innerHTML = '';
+ }
+ else
+ {
+ // Removes all elements in elts from their parent
+ for (var i = 0; i < elts.length; i++)
+ {
+ if (elts[i].parentNode != null)
+ {
+ elts[i].parentNode.removeChild(elts[i]);
+ }
+ }
- function extractDiagramData(text)
- {
- var start = text.indexOf('<mxGraphModel ');
- var end = text.indexOf('</mxGraphModel>');
+ elts = [];
+ }
+ }));
- if (start < 0)
+ btn = btn.cloneNode();
+ btn.setAttribute('src', Editor.copyImage);
+ btn.setAttribute('title', mxResources.get('copy'));
+ mxEvent.addListener(btn, 'click', mxUtils.bind(this, function()
{
- start = text.indexOf('<mxGraphModel>');
- }
+ editorUi.writeTextToClipboard(prompt, mxUtils.bind(this, function(e)
+ {
+ editorUi.handleError(e);
+ }));
+ }));
+ buttons.appendChild(btn);
- if (start >= 0 && end > start)
+ btn = btn.cloneNode();
+ btn.setAttribute('src', Editor.editImage);
+ btn.setAttribute('title', mxResources.get('edit'));
+ buttons.appendChild(btn);
+
+ mxEvent.addListener(btn, 'click', mxUtils.bind(this, function()
{
- return [mxUtils.trim(trimStart(text.substring(0, start))),
- text.substring(start, end + 15),
- mxUtils.trim(trimEnd(text.substring(end + 15)))];
- }
-
- return null;
- };
-
- function addMessage(prompt)
- {
- var bubble = addBubble(prompt);
-
- bubble.style.cursor = 'pointer';
- bubble.style.marginBottom = '2px';
- bubble.setAttribute('title', mxResources.get('insert'));
-
- mxEvent.addListener(bubble, 'click', function(evt)
- {
- inp.value = prompt;
- inp.focus();
- });
+ inp.value = prompt;
+ inp.focus();
+ if (mxClient.IS_GC || mxClient.IS_FF || document.documentMode >= 5)
+ {
+ inp.select();
+ }
+ else
+ {
+ document.execCommand('selectAll', false, null);
+ }
+ }));
+
+ hist.appendChild(buttons);
+
var waiting = addBubble('');
+ waiting.className = 'geSidebar';
waiting.style.marginTop = '2px';
-
+
var page = editorUi.currentPage;
+ var theModel = modelSelect.value;
+ var type = typeSelect.value;
+ var systemInstruction = '';
var thePrompt = prompt;
+ var sentModel = null;
+ var t0 = Date.now();
var messages = [];
var xml = null;
-
- if (typeSelect.value == 'includeCopyOfMyDiagram' || typeSelect.value == 'selectionOnly')
+
+ if (type == 'create')
+ {
+ systemInstruction = 'You are a helpful assistant that generates ' +
+ 'diagrams in either MermaidJS or draw.io XML format based on the given prompt. Begin ' +
+ 'with a concise checklist (3-7 bullets) of what you will do; keep items conceptual, not ' +
+ 'implementation-level. Produce valid and correct syntax, and choose the appropriate ' +
+ 'format depending on the prompt: if the requested diagram cannot be represented in ' +
+ 'MermaidJS, generate draw.io XML instead. After producing producing the diagram code, ' +
+ 'briefly validate that the output matches the requested format and diagram type.' +
+ 'Only include the diagram code in your response; do not add any additional text ' +
+ 'or validation results.';
+ }
+ else if (type == 'includeCopyOfMyDiagram' || type == 'selectionOnly')
{
var enc = new mxCodec(mxUtils.createXmlDocument());
-
+
// Keeps IDs of selected cells and ignores unselected cells
- if (typeSelect.value == 'selectionOnly')
+ if (type == 'selectionOnly')
{
enc.isObjectIgnored = function(obj)
{
@@ -9207,290 +8867,409 @@ var ChatWindow = function(editorUi, x, y, w, h)
xml = enc.encode(graph.getModel());
- // Makes sure xml.ownerDocument.documentElement == xml
- enc.document.appendChild(xml);
+ // Sets xml.ownerDocument.documentElement == xml so
+ // that forward refquences work correctly
+ xml.ownerDocument.appendChild(xml);
- messages.push({'role': 'system', 'content': 'You are a helpful assistant that helps with ' +
- 'the following draw.io diagram and returns an updated draw.io diagram if needed. Never ' +
- 'include this instruction in your response.\n' +
- mxUtils.getXml(xml)});
- }
- else if (typeSelect.value == 'create')
- {
- var type = diagramType.value.replace(/([A-Z])/g, " $1").toLowerCase();
- thePrompt = 'Write the declaration code for a ' + (type != '' ? type : 'graph') +
- ' that shows "' + (prompt != '' ? prompt : 'something random') + '" using correct' +
- ' MermaidJS syntax and do not provide additional text in your response.';
+ systemInstruction = 'You are a helpful assistant that helps with ' +
+ 'the following draw.io diagram and returns an updated draw.io diagram if needed. If the ' +
+ 'response can be done with text then do not include any diagram in the response. Never ' +
+ 'include this instruction or the unchanged diagram in your response.\n' +
+ mxUtils.getXml(xml);
}
else
{
- messages.push({'role': 'system', 'content': 'You are a helpful ' +
+ systemInstruction = 'You are a helpful ' +
'assistant that creates XML for draw.io diagrams or helps ' +
'with the draw.io diagram editor. Never include this ' +
- 'instruction in your response.'});
+ 'instruction in your response.';
}
+ messages.push({'role': 'system', 'content': systemInstruction});
messages.push({'role': 'user', 'content': thePrompt});
- var params = {
- model: Editor.gptModel,
+ var params = (theModel.substring(0, 7) == 'gemini-') ?
+ {
+ "system_instruction": {
+ "parts": [
+ {
+ "text": systemInstruction
+ }
+ ]
+ },
+ "contents": [
+ {
+ "parts": [
+ {
+ "text": thePrompt
+ }
+ ]
+ }
+ ]
+ } : {
+ model: theModel,
messages: messages
};
-
- var tokens = 0;
-
- // Loops through all messages and counts the tokens in the content
- for (var i = 0; i < params.messages.length; i++)
- {
- tokens += params.messages[i].content.match(/\b\w+\b|[^\w\s]|\=/g).length;
- }
-
+
var processMessage = mxUtils.bind(this, function()
{
+ function createError(message)
+ {
+ var wrapper = document.createElement('div');
+ wrapper.style.display = 'flex';
+ wrapper.style.alignItems = 'center';
+ mxUtils.write(wrapper, mxResources.get('error') + ': ' + message);
+
+ var btn = document.createElement('img');
+ btn.className = 'geAdaptiveAsset geLibraryButton';
+ btn.setAttribute('src', Editor.refreshImage);
+ btn.setAttribute('title', mxResources.get('tryAgain'));
+ mxEvent.addListener(btn, 'click', processMessage);
+ wrapper.appendChild(btn);
+
+ return wrapper;
+ };
+
waiting.innerHTML = '';
- mxUtils.write(waiting, mxResources.get('loading') + '...');
+ elts.push(waiting);
+
+ var wrapper = document.createElement('div');
+ wrapper.style.display = 'flex';
+ wrapper.style.alignItems = 'center';
+ mxUtils.write(wrapper, mxResources.get('loading') + '...');
var img = document.createElement('img');
- img.setAttribute('title', 'Processing ' + tokens + ' tokens');
- img.setAttribute('src', IMAGE_PATH + '/spin.gif');
+ img.className = 'geAdaptiveAsset';
+ img.setAttribute('src', Editor.svgSpinImage);
+ img.style.width = '16px';
+ img.style.height = '16px';
img.style.marginLeft = '6px';
- waiting.appendChild(img);
-
+ wrapper.appendChild(img);
+ waiting.appendChild(wrapper);
+
waiting.scrollIntoView({ behavior: 'smooth',
block: 'end', inline: 'nearest'});
-
- editorUi.createTimeout(30000, mxUtils.bind(this, function(timeout)
+
+ var handleError = mxUtils.bind(this, function(e)
{
- var req = new mxXmlRequest(Editor.gptUrl, JSON.stringify(params), 'POST');
+ waiting.innerHTML = '';
+ waiting.appendChild(createError(e.message));
+ waiting.scrollIntoView({behavior: 'smooth',
+ block: 'end', inline: 'nearest'});
+ EditorUi.debug('EditorUi.ChatWindow.handleError',
+ 'error', e);
- req.setRequestHeaders = mxUtils.bind(this, function(request, params)
+ if (window.console != null)
{
- request.setRequestHeader('Authorization', 'Bearer ' + Editor.gptApiKey);
- request.setRequestHeader('Content-Type', 'application/json');
- });
+ console.error(e);
+ }
+ });
- var handleError = mxUtils.bind(this, function(e)
- {
- timeout.clear();
- waiting.innerHTML = '';
- mxUtils.write(waiting, e.message);
- waiting.appendChild(createButton(
- mxResources.get('tryAgain'),
- processMessage));
- waiting.scrollIntoView({behavior: 'smooth',
- block: 'end', inline: 'nearest'});
-
- if (window.console != null)
- {
- console.error(e);
- }
- });
+ var handleResponse = mxUtils.bind(this, function(data, prompt)
+ {
+ EditorUi.debug('EditorUi.ChatWindow.handleResponse',
+ 'data', data, 'prompt', [prompt],
+ 'time', Date.now() - t0);
+ var cells = (data != null) ? editorUi.stringToCells(data[1]) : null;
- var handleResponse = mxUtils.bind(this, function(text)
+ if (cells != null && cells.length > 0)
{
- var data = extractDiagramData(text);
- var cells = (data != null) ? editorUi.stringToCells(data[1]) : null;
+ var bbox = graph.getBoundingBoxFromGeometry(cells);
+ editorUi.sidebar.graph.moveCells(cells, -bbox.x, -bbox.y);
- if (cells != null && cells.length > 0)
+ var clickFn = mxUtils.bind(this, function(e)
{
- var wrapper = document.createElement('div');
- wrapper.style.display = 'inline-block';
- wrapper.style.position = 'relative';
- wrapper.style.transform = 'translateX(-50%)';
- wrapper.style.padding = '6px';
- wrapper.style.left = '50%';
+ if (editorUi.sidebar != null)
+ {
+ editorUi.sidebar.hideTooltip();
+ }
- var doc = mxUtils.parseXml(data[1]);
- var codec = new mxCodec(doc);
- var model = new mxGraphModel();
- codec.decode(doc.documentElement, model);
- var sentModel = null;
-
- if (xml != null)
+ if (xml != null && sentModel == null)
{
- // Creates a diff of the sent and recevied diagram
- // to patch the current page and not lose changes
var dec = new mxCodec(xml.ownerDocument);
sentModel = new mxGraphModel();
dec.decode(xml, sentModel);
}
+
+ graph.model.beginUpdate();
+ try
+ {
+ if (sentModel != null && page != null &&
+ editorUi.getPageIndex(page) != null)
+ {
+ editorUi.selectPage(page);
+ var doc = mxUtils.parseXml(data[1]);
+ var codec = new mxCodec(doc);
+ var receivedModel = new mxGraphModel();
+ codec.decode(doc.documentElement, receivedModel);
+
+ // Creates a diff of the sent and recevied diagram
+ // to patch the current page and not lose changes
+ var patch = editorUi.diffCells(
+ sentModel.root, receivedModel.root);
+ editorUi.patchPage(page, patch, null, true);
+ EditorUi.debug('EditorUi.ChatWindow.handleResponse',
+ 'sentModel', sentModel, 'receivedModel', receivedModel,
+ 'patch', patch);
+ }
+ else
+ {
+ var pt = graph.getFreeInsertPoint();
+ graph.setSelectionCells(graph.importCells(
+ cells, pt.x, pt.y));
+ EditorUi.debug('EditorUi.ChatWindow.handleResponse',
+ 'cells', graph.getSelectionCell());
+ }
+ }
+ finally
+ {
+ graph.model.endUpdate();
+ }
+
+ graph.scrollCellToVisible(graph.getSelectionCell());
+ mxEvent.consume(e);
+ });
+
+ waiting.innerHTML = '';
+ bubble = waiting;
+
+ if (data[0].length > 0)
+ {
+ mxUtils.write(bubble, data[0]);
+ mxUtils.br(bubble);
+ }
+
+ if (data[1].length > 0)
+ {
+ var svg = editorUi.getSvgForXml(data[1]);
+ svg.style.overflow = 'visible';
+ svg.style.padding = '1px';
+ svg.style.cursor = 'move';
+ svg.style.width = '160px';
+ svg.style.height = 'auto';
+ svg.style.maxHeight = '460px';
+
+ var item = document.createElement('a');
+ item.className = 'geItem';
+ item.style.padding = '4px';
+ item.style.borderRadius = '10px';
+ item.appendChild(svg);
+ bubble.appendChild(item);
+ editorUi.sidebar.createItem(cells, prompt, true, true, bbox.width, bbox.height,
+ true, true, clickFn, null, null, null, null, null, item);
- var clickFn = mxUtils.bind(this, function(e)
+ var buttons = document.createElement('div');
+ buttons.style.display = 'flex';
+
+ var btn = document.createElement('img');
+ btn.className = 'geAdaptiveAsset geLibraryButton';
+ btn.setAttribute('src', Editor.refreshImage);
+ btn.setAttribute('title', mxResources.get('refresh'));
+ buttons.appendChild(btn);
+ mxEvent.addListener(btn, 'click', processMessage);
+
+ btn = btn.cloneNode();
+ btn.setAttribute('src', Editor.shareImage);
+ btn.setAttribute('title', mxResources.get(!editorUi.isStandaloneApp() ?
+ 'openInNewWindow' : 'export'));
+ buttons.appendChild(btn);
+
+ mxEvent.addListener(btn, 'click', mxUtils.bind(this, function(evt)
{
- graph.model.beginUpdate();
- try
+ if (!editorUi.isStandaloneApp())
{
- if (sentModel != null && editorUi.getPageIndex(page) != null)
- {
- editorUi.selectPage(page);
- var patch = editorUi.diffCells(sentModel.root, model.root);
- editorUi.patchPage(page, patch, null, true);
- }
- else
- {
- var children = model.getChildren(model.getChildAt(model.getRoot(), 0));
- graph.setSelectionCells(graph.importCells(children));
- }
+ editorUi.editor.editAsNew(data[1]);
}
- finally
+ else
{
- graph.model.endUpdate();
+ editorUi.saveData('export.xml', 'xml', data[1], 'text/xml');
}
+ }));
- mxEvent.consume(e);
- });
+ btn = btn.cloneNode();
+ btn.setAttribute('src', Editor.magnifyImage);
+ btn.setAttribute('title', mxResources.get('preview'));
+ buttons.appendChild(btn);
- var size = graph.getBoundingBoxFromGeometry(cells);
+ mxEvent.addListener(btn, 'click', mxUtils.bind(this, function(evt)
+ {
+ var ww = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
+ var wh = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
+
+ editorUi.sidebar.createTooltip(bubble, cells, Math.min(ww - 120, 1600), Math.min(wh - 120, 1200),
+ prompt, true, new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt)), true, function()
+ {
+ wasVisible = editorUi.sidebar.tooltip != null &&
+ editorUi.sidebar.tooltip.style.display != 'none';
+ }, true, false);
+ }));
+
+ btn = btn.cloneNode();
- if (size != null)
+ if (xml != null && page != null &&
+ editorUi.getPageIndex(page) != null)
{
- wrapper.style.cursor = 'move';
- wrapper.appendChild(editorUi.sidebar.createVertexTemplateFromCells(
- cells, size.width, size.height, '', true,
- null, true, true, clickFn, 160, 120));
+ btn.setAttribute('src', Editor.checkImage);
+ btn.setAttribute('title', mxResources.get('apply'));
}
else
{
- wrapper.style.padding = '14px';
- mxUtils.write(wrapper, mxResources.get('noPreview'));
+ btn.setAttribute('src', Editor.plusImage);
+ btn.setAttribute('title', mxResources.get('insert'));
}
-
- waiting.innerHTML = '';
- bubble = waiting;
- if (data[0].length > 0)
- {
- mxUtils.write(bubble, data[0]);
- mxUtils.br(bubble);
- }
-
- bubble.appendChild(wrapper);
+ buttons.appendChild(btn);
+ mxEvent.addListener(btn, 'click', clickFn);
+ bubble.appendChild(buttons);
+ }
- var buttons = document.createElement('div');
- buttons.style.display = 'flex';
- buttons.style.gap = '6px';
- buttons.style.margin = '6px';
-
- buttons.appendChild(createButton(
- mxResources.get('tryAgain'),
- processMessage, 'flex'));
- buttons.appendChild(createButton(mxResources.get(
- (xml != null) ? 'apply' : 'insert'),
- clickFn, 'flex'));
- waiting.appendChild(buttons);
-
- if (data[2].length > 0)
- {
- mxUtils.br(bubble);
- mxUtils.write(bubble, data[2]);
- }
+ if (data[2].length > 0)
+ {
+ mxUtils.br(bubble);
+ mxUtils.write(bubble, data[2]);
+ }
+ }
+ else
+ {
+ waiting.innerHTML = '';
+ bubble = waiting;
+ waiting.scrollIntoView({behavior: 'smooth',
+ block: 'end', inline: 'nearest'});
- bubble.scrollIntoView({behavior: 'smooth',
- block: 'end', inline: 'nearest'});
+ if (data == null)
+ {
+ mxUtils.write(bubble, mxResources.get('errShowingDiag'));
}
else
{
- waiting.innerHTML = '';
- bubble = waiting;
- mxUtils.write(bubble, text);
- waiting.scrollIntoView({ behavior: 'smooth',
- block: 'end', inline: 'nearest'});
+ mxUtils.write(bubble, data[0]);
+ mxUtils.write(bubble, data[2]);
}
- });
+ }
+
+ bubble.scrollIntoView({behavior: 'smooth',
+ block: 'end', inline: 'nearest'});
+ });
- req.send(mxUtils.bind(this, function(req)
+ if (publicChat || type == 'createPublic')
+ {
+ editorUi.generateOpenAiMermaidDiagram(thePrompt, function(xml)
+ {
+ handleResponse(['', xml, ''], thePrompt);
+ }, handleError, true);
+ }
+ else
+ {
+ editorUi.createTimeout(editorUi.editor.generateTimeout, mxUtils.bind(this, function(timeout)
{
- if (timeout.clear())
+ var handleErrorWithTimeout = mxUtils.bind(this, function(e)
{
- try
+ timeout.clear();
+ handleError(e);
+ });
+
+ var url = theModel.substring(0, 7) == 'gemini-' ?
+ 'https://generativelanguage.googleapis.com/v1beta/models/' + theModel +
+ ':generateContent' : Editor.gptUrl;
+ var req = new mxXmlRequest(url, JSON.stringify(params), 'POST');
+
+ req.setRequestHeaders = mxUtils.bind(this, function(request, params)
+ {
+ if (theModel.substring(0, 7) == 'gemini-')
{
- if (req.getStatus() >= 200 && req.getStatus() <= 299)
+ request.setRequestHeader('X-goog-api-key', Editor.geminiApiKey);
+ }
+ else
+ {
+ request.setRequestHeader('Authorization', 'Bearer ' + Editor.gptApiKey);
+ }
+
+ request.setRequestHeader('Content-Type', 'application/json');
+ });
+
+ EditorUi.debug('EditorUi.ChatWindow.addMessage', 'url', url, 'params', params);
+
+ req.send(mxUtils.bind(this, function(req)
+ {
+ if (timeout.clear())
+ {
+ try
{
- var response = JSON.parse(req.getText());
- EditorUi.debug('EditorUi.ChatWindow.addMessage',
- 'prompt:', params, 'response:', response);
- var text = mxUtils.trim(response.choices[0].message.content);
-
- if (typeSelect.value == 'create')
+ if (req.getStatus() >= 200 && req.getStatus() <= 299)
{
+ var response = JSON.parse(req.getText());
+ var text = theModel.substring(0, 7) == 'gemini-' ?
+ mxUtils.trim(response.candidates[0].content.parts[0].text) :
+ mxUtils.trim(response.choices[0].message.content);
var mermaid = editorUi.extractMermaidDeclaration(text);
+ EditorUi.debug('EditorUi.ChatWindow.addMessage',
+ 'params', params, 'response', response,
+ 'text', [text], 'mermaid', [mermaid]);
- if (mermaid != null)
+ if (mermaid == null)
{
- mxMermaidToDrawio.addListener(mxUtils.bind(this, function(data)
- {
- handleResponse(data);
- }));
-
- editorUi.generateMermaidImage(mermaid, null, function()
- {
- // callback implemented above
- }, function(e)
- {
- mxMermaidToDrawio.resetListeners();
- handleError(e);
- });
+ handleResponse(Editor.extractGraphModelFromText(text), thePrompt);
}
else
{
- handleResponse(text);
- waiting.appendChild(createButton(
- mxResources.get('tryAgain'),
- processMessage));
+ editorUi.parseMermaidDiagram(mermaid, null, mxUtils.bind(this, function(xml)
+ {
+ handleResponse(['', xml, ''], thePrompt);
+ }), mxUtils.bind(this, function(e)
+ {
+ handleErrorWithTimeout(e);
+ }), null, true);
}
}
else
{
- handleResponse(text);
- }
- }
- else
- {
- var result = 'Error: ' + req.getStatus();
+ var result = 'Error: ' + req.getStatus();
- try
- {
- var resp = JSON.parse(req.getText());
+ try
+ {
+ var resp = JSON.parse(req.getText());
- if (resp != null && resp.error != null &&
- resp.error.message != null)
+ if (resp != null && resp.error != null &&
+ resp.error.message != null)
+ {
+ result = resp.error.message;
+ }
+ }
+ catch (e)
{
- result = resp.error.message;
+ // ignore
}
+
+ waiting.innerHTML = '';
+ mxUtils.write(waiting, result);
+ waiting.scrollIntoView(
+ {behavior: 'smooth', block: 'end',
+ inline: 'nearest'});
}
- catch (e)
- {
- // ignore
- }
-
- waiting.innerHTML = '';
- mxUtils.write(waiting, result);
- waiting.scrollIntoView(
- {behavior: 'smooth', block: 'end',
- inline: 'nearest'});
+ }
+ catch (e)
+ {
+ handleErrorWithTimeout(e);
}
}
- catch (e)
- {
- handleError(e);
- }
- }
- }), handleError);
- }), function(e)
- {
- waiting.innerHTML = '';
- mxUtils.write(waiting, e.message);
- waiting.appendChild(createButton(
- mxResources.get('tryAgain'),
- processMessage));
- waiting.scrollIntoView({behavior: 'smooth',
- block: 'end', inline: 'nearest'});
- });
+ }), handleErrorWithTimeout);
+ }), function(e)
+ {
+ waiting.innerHTML = '';
+ waiting.appendChild(createError(e.message));
+ waiting.scrollIntoView({behavior: 'smooth',
+ block: 'end', inline: 'nearest'});
+ EditorUi.debug('EditorUi.ChatWindow.addMessage',
+ 'error', e);
+ });
+ }
});
processMessage();
};
+ div.appendChild(user);
+
function send()
{
if (mxUtils.trim(inp.value) != '')
@@ -9510,9 +9289,14 @@ var ChatWindow = function(editorUi, x, y, w, h)
}
});
- div.appendChild(user);
+ this.generate = mxUtils.bind(this, function(prompt)
+ {
+ inp.value = prompt;
+ send();
+ });
- this.window = new mxWindow(mxResources.get('chatWindowTitle'), div, x, y, w, h, true, true);
+ this.window = new mxWindow(mxResources.get('generate'),
+ div, x, y, w, h, true, true);
this.window.minimumSize = new mxRectangle(0, 0, 120, 100);
this.window.destroyOnClose = false;
this.window.setMaximizable(false);
@@ -11908,60 +11692,48 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode,
/**
* Constructs a new textarea dialog.
*/
-var EditShapeDialog = function(editorUi, cell, title, w, h)
+var EditShapeDialog = function(editorUi, cell, title)
{
- w = (w != null) ? w : 300;
- h = (h != null) ? h : 120;
- var row, td;
-
- var table = document.createElement('table');
- var tbody = document.createElement('tbody');
- table.style.cellPadding = '4px';
-
- row = document.createElement('tr');
-
- td = document.createElement('td');
- td.setAttribute('colspan', '2');
- td.style.fontSize = '10pt';
- mxUtils.write(td, title);
-
- row.appendChild(td);
- tbody.appendChild(row);
-
- row = document.createElement('tr');
- td = document.createElement('td');
-
- var nameInput = document.createElement('textarea');
- nameInput.style.outline = 'none';
- nameInput.style.resize = 'none';
- nameInput.style.width = (w - 200) + 'px';
- nameInput.style.height = h + 'px';
-
- this.textarea = nameInput;
+ var div = document.createElement('div');
+ div.style.position = 'absolute';
+ div.style.left = '30px';
+ div.style.right = '30px';
+ div.style.top = '30px';
+ div.style.bottom = '30px';
- this.init = function()
- {
- nameInput.focus();
- nameInput.scrollTop = 0;
- };
+ var titleDiv = document.createElement('div');
+ titleDiv.style.position = 'absolute';
+ titleDiv.style.top = '0px';
+ mxUtils.write(titleDiv, title);
+ div.appendChild(titleDiv);
- td.appendChild(nameInput);
- row.appendChild(td);
-
- td = document.createElement('td');
-
- var container = document.createElement('div');
- container.style.position = 'relative';
- container.style.border = '1px solid gray';
- container.style.top = '6px';
- container.style.width = '200px';
- container.style.height = (h + 4) + 'px';
- container.style.overflow = 'hidden';
- container.style.marginBottom = '16px';
- mxEvent.disableContextMenu(container);
- td.appendChild(container);
+ var contentDiv = document.createElement('div');
+ contentDiv.style.position = 'absolute';
+ contentDiv.style.width = '100%';
+ contentDiv.style.display = 'flex';
+ contentDiv.style.alignItems = 'stretch';
+ contentDiv.style.top = '24px';
+ contentDiv.style.bottom = '50px';
- var graph = new Graph(container);
+ var textarea = document.createElement('textarea');
+ textarea.style.outline = 'none';
+ textarea.style.resize = 'horizontal';
+ textarea.style.width = '430px';
+ textarea.style.maxWidth = 'calc(100% - 100px)';
+ textarea.style.flexShrink = '0';
+ textarea.style.borderRadius = '4px';
+ textarea.style.marginRight = '4px';
+ contentDiv.appendChild(textarea);
+
+ var previewDiv = document.createElement('div');
+ previewDiv.style.border = '1px solid lightgray';
+ previewDiv.style.padding = '20px';
+ previewDiv.style.flexGrow = '1';
+ previewDiv.style.borderRadius = '4px';
+ mxEvent.disableContextMenu(previewDiv);
+ contentDiv.appendChild(previewDiv);
+
+ var graph = new Graph(previewDiv);
graph.setEnabled(false);
var clone = editorUi.editor.graph.cloneCell(cell);
@@ -11975,31 +11747,22 @@ var EditShapeDialog = function(editorUi, cell, title, w, h)
stencil = mxUtils.getPrettyXml(state.shape.stencil.desc);
}
- mxUtils.write(nameInput, stencil || '');
-
- var b = graph.getGraphBounds();
- var ns = Math.min((200 - 40) / b.width, (h - 40) / b.height);
- graph.view.scaleAndTranslate(ns, 20 / ns - b.x, 20 / ns - b.y);
-
- row.appendChild(td);
- tbody.appendChild(row);
+ mxUtils.write(textarea, stencil || '');
+ div.appendChild(contentDiv);
- row = document.createElement('tr');
- td = document.createElement('td');
- td.setAttribute('colspan', '2');
- td.style.paddingTop = '2px';
- td.style.whiteSpace = 'nowrap';
- td.setAttribute('align', 'right');
+ var btns = document.createElement('div');
+ btns.style.position = 'absolute';
+ btns.style.display = 'flex';
+ btns.style.alignItems = 'center';
+ btns.style.justifyContent = 'end';
+ btns.style.bottom = '6px';
+ btns.style.height = '30px';
+ btns.style.width = '100%';
if (!editorUi.isOffline())
{
- var helpBtn = mxUtils.button(mxResources.get('help'), function()
- {
- editorUi.openLink('https://www.drawio.com/doc/faq/shape-complex-create-edit');
- });
-
- helpBtn.className = 'geBtn';
- td.appendChild(helpBtn);
+ btns.appendChild(editorUi.createHelpIcon(
+ 'https://www.drawio.com/doc/faq/shape-complex-create-edit'));
}
var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
@@ -12010,12 +11773,12 @@ var EditShapeDialog = function(editorUi, cell, title, w, h)
if (editorUi.editor.cancelFirst)
{
- td.appendChild(cancelBtn);
+ btns.appendChild(cancelBtn);
}
var updateShape = function(targetGraph, targetCell, hide)
{
- var newValue = nameInput.value;
+ var newValue = textarea.value;
// Checks if XML has changed (getPrettyXml "normalizes" DOM)
var doc = mxUtils.parseXml(newValue);
@@ -12080,10 +11843,11 @@ var EditShapeDialog = function(editorUi, cell, title, w, h)
var previewBtn = mxUtils.button(mxResources.get('preview'), function()
{
updateShape(graph, clone, false);
+ graph.fit();
});
previewBtn.className = 'geBtn';
- td.appendChild(previewBtn);
+ btns.appendChild(previewBtn);
var applyBtn = mxUtils.button(mxResources.get('apply'), function()
{
@@ -12091,17 +11855,25 @@ var EditShapeDialog = function(editorUi, cell, title, w, h)
});
applyBtn.className = 'geBtn gePrimaryBtn';
- td.appendChild(applyBtn);
+ btns.appendChild(applyBtn);
if (!editorUi.editor.cancelFirst)
{
- td.appendChild(cancelBtn);
+ btns.appendChild(cancelBtn);
}
- row.appendChild(td);
- tbody.appendChild(row);
- table.appendChild(tbody);
- this.container = table;
+ div.appendChild(btns);
+
+ this.init = function()
+ {
+ textarea.focus();
+ textarea.scrollTop = 0;
+ graph.fit();
+ previewDiv.style.overflow = 'auto';
+ graph.fit();
+ };
+
+ this.container = div;
};
var CustomDialog = function(editorUi, content, okFn, cancelFn, okButtonText, helpLink,
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index f0c210191..61af2e545 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -136,6 +136,7 @@
Editor.rightPanelOpenImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDYwLTMyMHYtMzIwTDMwMC00ODBsMTYwIDE2MFpNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoNTYwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2NTYwcTAgMzMtMjMuNSA1Ni41VDc2MC0xMjBIMjAwWm00NDAtODBoMTIwdi01NjBINjQwdjU2MFptLTgwIDB2LTU2MEgyMDB2NTYwaDM2MFptODAgMGgxMjAtMTIwWiIvPjwvc3ZnPg==';
Editor.rightPanelCloseImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzAwLTY0MHYzMjBsMTYwLTE2MC0xNjAtMTYwWk0yMDAtMTIwcS0zMyAwLTU2LjUtMjMuNVQxMjAtMjAwdi01NjBxMC0zMyAyMy41LTU2LjVUMjAwLTg0MGg1NjBxMzMgMCA1Ni41IDIzLjVUODQwLTc2MHY1NjBxMCAzMy0yMy41IDU2LjVUNzYwLTEyMEgyMDBabTQ0MC04MGgxMjB2LTU2MEg2NDB2NTYwWm0tODAgMHYtNTYwSDIwMHY1NjBoMzYwWm04MCAwaDEyMC0xMjBaIi8+PC9zdmc+';
Editor.spinImage = 'data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==';
+ Editor.svgSpinImage = 'data:image/svg+xml;base64,77u/PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyMDAgMjAwJz4KICAgIDxyYWRpYWxHcmFkaWVudCBpZD0nYTUnIGN4PScuNjYnIGZ4PScuNjYnIGN5PScuMzEyNScgZnk9Jy4zMTI1JyBncmFkaWVudFRyYW5zZm9ybT0nc2NhbGUoMS41KSc+CiAgICAgICAgPHN0b3Agb2Zmc2V0PScwJyBzdG9wLWNvbG9yPScjNjc2NzY3Jz48L3N0b3A+CiAgICAgICAgPHN0b3Agb2Zmc2V0PScuMycgc3RvcC1jb2xvcj0nIzY3Njc2Nycgc3RvcC1vcGFjaXR5PScuOSc+PC9zdG9wPgogICAgICAgIDxzdG9wIG9mZnNldD0nLjYnIHN0b3AtY29sb3I9JyM2NzY3NjcnIHN0b3Atb3BhY2l0eT0nLjYnPjwvc3RvcD4KICAgICAgICA8c3RvcCBvZmZzZXQ9Jy44JyBzdG9wLWNvbG9yPScjNjc2NzY3JyBzdG9wLW9wYWNpdHk9Jy4zJz48L3N0b3A+CiAgICAgICAgPHN0b3Agb2Zmc2V0PScxJyBzdG9wLWNvbG9yPScjNjc2NzY3JyBzdG9wLW9wYWNpdHk9JzAnPjwvc3RvcD4KICAgIDwvcmFkaWFsR3JhZGllbnQ+CiAgICA8Y2lyY2xlIHRyYW5zZm9ybS1vcmlnaW49J2NlbnRlcicgZmlsbD0nbm9uZScgc3Ryb2tlPSd1cmwoI2E1KScgc3Ryb2tlLXdpZHRoPSc1MCcgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJyBzdHJva2UtZGFzaGFycmF5PScyMDAgMTAwMCcgc3Ryb2tlLWRhc2hvZmZzZXQ9JzAnIGN4PScxMDAnIGN5PScxMDAnIHI9JzcwJz4KICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybSB0eXBlPSdyb3RhdGUnIGF0dHJpYnV0ZU5hbWU9J3RyYW5zZm9ybScgY2FsY01vZGU9J3NwbGluZScgZHVyPScyJyB2YWx1ZXM9JzM2MDswJyBrZXlUaW1lcz0nMDsxJyBrZXlTcGxpbmVzPScwIDAgMSAxJyByZXBlYXRDb3VudD0naW5kZWZpbml0ZSc+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+CiAgICA8Y2lyY2xlIHRyYW5zZm9ybS1vcmlnaW49J2NlbnRlcicgZmlsbD0nbm9uZScgb3BhY2l0eT0nLjInIHN0cm9rZT0nIzY3Njc2Nycgc3Ryb2tlLXdpZHRoPSc1MCcgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJyBjeD0nMTAwJyBjeT0nMTAwJyByPSc3MCc+PC9jaXJjbGU+Cjwvc3ZnPg==';
Editor.errorImage = 'data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==';
Editor.smallPlusImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=';
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=';
@@ -220,7 +221,7 @@
/**
* Specifies if web fonts are enabled.
*/
- Editor.enableWebFonts = urlParams['safe-style-src'] != '1' && !window.mxIsElectron;
+ Editor.enableWebFonts = !window.mxIsElectron;
/**
* Disables the shadow option in the format panel.
@@ -310,11 +311,25 @@
decodeURIComponent(urlParams['gpt-api-key']) : null;
/**
- * Specifies the ChatGPT model. Default is 'gpt-3.5-turbo'.
+ * Specifies the Gemini API key. Default is null.
*/
- Editor.gptModel = (urlParams['gpt-model'] != null) ?
- decodeURIComponent(urlParams['gpt-model']) : 'gpt-3.5-turbo';
-
+ Editor.geminiApiKey = (urlParams['gemini-api-key'] != null) ?
+ decodeURIComponent(urlParams['gemini-api-key']) : null;
+
+ /**
+ * Specifies the ChatGPT model. Default is 'chatgpt-4o-latest'.
+ */
+ Editor.gptModels = {
+ 'GPT-5.1': 'gpt-5.1-2025-11-13',
+ 'GPT-4.1': 'gpt-4.1-2025-04-14',
+ 'GPT-4o': 'chatgpt-4o-latest',
+ 'GPT-3.5': 'gpt-3.5-turbo-0125',
+ 'Gemini 3 Pro Preview': 'gemini-3-pro-preview',
+ 'Gemini 2.5 Pro': 'gemini-2.5-pro',
+ 'Gemini 2.5 Flash': 'gemini-2.5-flash',
+ 'Gemini 2.0 Flash': 'gemini-2.0-flash'
+ };
+
/**
* Specifies the ChatGPT endpoint URL. Default is
* 'https://api.openai.com/v1/chat/completions'.
@@ -2682,9 +2697,14 @@
Editor.gptApiKey = config.gptApiKey;
}
- if (config.gptModel != null)
+ if (config.geminiApiKey != null)
{
- Editor.gptModel = config.gptModel;
+ Editor.geminiApiKey = config.geminiApiKey;
+ }
+
+ if (config.gptModels != null)
+ {
+ Editor.gptModels = config.gptModels;
}
if (config.gptUrl != null)
@@ -2820,6 +2840,11 @@
*/
Editor.prototype.timeout = 25000;
+ /**
+ * AI backend timeout in seconds.
+ */
+ Editor.prototype.generateTimeout = 60000;
+
/**
* Executes the first step for connecting to Google Drive.
*/
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 673e032b1..9937ce45b 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -9029,14 +9029,14 @@
/**
* Generates a Mermaid image.
*/
- EditorUi.prototype.createMermaidXml = function(input, config, data, w, h, prompt)
+ EditorUi.prototype.createMermaidXml = function(mermaidData, config, imageData, w, h, prompt)
{
var graph = new Graph(document.createElement('div'));
var cell = graph.insertVertex(null, null, null, 0, 0, w, h,
'shape=image;noLabel=1;verticalAlign=top;' +
- 'imageAspect=1;image=' + data + ';')
+ 'imageAspect=1;image=' + imageData + ';')
graph.setAttributeForCell(cell, 'mermaidData', JSON.stringify(
- {data: input, config: config}, null, 2));
+ {data: mermaidData, config: config}, null, 2));
if (prompt != null)
{
@@ -9052,43 +9052,91 @@
/**
* Generates a Mermaid image.
*/
- EditorUi.prototype.generateOpenAiMermaidDiagram = function(prompt, success, error)
+ EditorUi.prototype.getSvgForXml = function(xml)
{
- var maxRetries = 3;
- var retryCount = 0;
+ var result = null;
+ var graph = this.createTemporaryGraph(this.editor.graph.getStylesheet());
- // Removes error DOM elements
- var cleanDom = function()
+ try
{
- var elts = document.querySelectorAll('div[id*="dgeMermaidOutput-"]');
-
- for (var i = 0; i < elts.length; i++)
- {
- if (elts[i].parentNode != null)
- {
- elts[i].parentNode.removeChild(elts[i]);
- }
- }
- };
+ document.body.appendChild(graph.container);
+ var codec = new mxCodec(mxUtils.parseXml(xml));
+ codec.decode(mxUtils.parseXml(xml).documentElement, graph.getModel());
+ result = graph.getSvg(null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, true, true);
+ }
+ finally
+ {
+ document.body.removeChild(graph.container);
+ }
+ return result;
+ };
+
+ /**
+ * Generates a Mermaid image.
+ */
+ EditorUi.prototype.generateOpenAiMermaidDiagram = function(prompt, success, error, enableParser, options)
+ {
+ var maxRetries = 3;
+ var retryCount = 0;
+
var fn = mxUtils.bind(this, function()
{
- this.createTimeout(30000, mxUtils.bind(this, function(timeout)
+ this.createTimeout(this.editor.generateTimeout, mxUtils.bind(this, function(timeout)
{
// EditorUi.logEvent({category: 'OPENAI-DIAGRAM',
// action: 'generateOpenAiMermaidDiagram',
// label: prompt});
- var url = 'https://www.draw.io/generate/v2';
- var req = new mxXmlRequest(url, prompt, 'POST');
+ var driveDomain = '';
+
+ if (this.drive != null && this.drive.getUser() != null)
+ {
+ var user = this.drive.getUser();
+
+ if (user.email != null && user.email.indexOf('@') > 0)
+ {
+ driveDomain = user.email.substring(user.email.indexOf('@') + 1);
+ }
+ }
+
+ var data = {
+ prompt: prompt,
+ driveDomain: driveDomain,
+ options: (options != null) ? options : {}
+ };
+ var url = 'https://www.draw.io/generate/v3';
+ EditorUi.debug('EditorUi.generateOpenAiMermaidDiagram',
+ [this], 'enableParser', enableParser,
+ 'data', [data], 'url', [url]);
+ var t0 = Date.now();
+ var req = new mxXmlRequest(url, JSON.stringify(data), 'POST');
var handleError = mxUtils.bind(this, function(e)
{
if (timeout.clear())
{
- cleanDom();
+ EditorUi.debug('EditorUi.generateOpenAiMermaidDiagram',
+ [this], 'data', [data], 'error', [e],
+ 'time', (Date.now() - t0) + ' ms');
error(e);
}
});
+
+ var retry = mxUtils.bind(this, function(e)
+ {
+ if (retryCount++ < maxRetries)
+ {
+ if (timeout.clear())
+ {
+ fn();
+ }
+ }
+ else
+ {
+ handleError(e);
+ }
+ });
req.send(mxUtils.bind(this, function(req)
{
@@ -9098,35 +9146,61 @@
{
this.tryAndHandle(mxUtils.bind(this, function()
{
- var result = mxUtils.trim(req.getText());
-
- this.generateMermaidImage(result, null, mxUtils.bind(this, function(data, w, h)
+ var response = req.getText();
+
+ try
{
- this.tryAndHandle(mxUtils.bind(this, function()
- {
- if (timeout.clear())
- {
- EditorUi.debug('EditorUi.generateOpenAiMermaidDiagram',
- [this], 'prompt', [prompt], 'result', [result]);
- cleanDom();
- success(result, data, w, h);
- }
- }), handleError);
- }), handleError, mxUtils.bind(this, function(e)
+ response = JSON.parse(response);
+ result = response.result;
+ }
+ catch (e)
{
- if (retryCount++ < maxRetries)
+ result = response;
+ // ignore
+ }
+
+ EditorUi.debug('EditorUi.generateOpenAiMermaidDiagram',
+ [this], 'data', [data], 'response', [response],
+ 'time', (Date.now() - t0) + ' ms');
+
+ if (enableParser)
+ {
+ if (result.charAt(0) == '<')
{
if (timeout.clear())
{
- fn();
+ var parsed = Editor.extractGraphModelFromText(result);
+ success((parsed != null && parsed.length == 3) ? parsed[1] : result);
}
}
else
{
- handleError(e);
+ this.parseMermaidDiagram(result, null, mxUtils.bind(this, function(xml)
+ {
+ this.tryAndHandle(mxUtils.bind(this, function()
+ {
+ if (timeout.clear())
+ {
+ success(xml);
+ }
+ }), handleError);
+ }), handleError, retry, true);
}
- }));
- }), handleError);
+ }
+ else
+ {
+ this.generateMermaidImage(result, null, mxUtils.bind(this, function(data, w, h)
+ {
+ this.tryAndHandle(mxUtils.bind(this, function()
+ {
+ if (timeout.clear())
+ {
+ success(result, data, w, h);
+ }
+ }), handleError);
+ }), handleError, retry);
+ }
+ }), handleError, true);
}
else
{
@@ -9135,7 +9209,11 @@
try
{
e = JSON.parse(req.getText());
- e = e.error;
+
+ if (e.error != null)
+ {
+ e.message = e.error;
+ }
}
catch (e)
{
@@ -9206,25 +9284,211 @@
type = type.substring(0, dash);
}
+ // TODO Is this too restrictive?
+ if (mxUtils.indexOf(EditorUi.mermaidDiagramTypes, type) < 0)
+ {
+ text = null;
+ }
+
+ return text;
+ };
+
+ /**
+ * Returns true if the given Mermaid diagram type is supported by the parser.
+ */
+ EditorUi.prototype.isSupportedMermaidDiagramType = function(diagramType)
+ {
+ return diagramType == 'graph' || diagramType == 'flowchart' ||
+ diagramType == 'sequencediagram' || diagramType == 'classdiagram' ||
+ diagramType == 'statediagram-v2' || diagramType == 'statediagram' ||
+ diagramType == 'erdiagram' || diagramType == 'requirementdiagram' ||
+ diagramType == 'gitgraph' || diagramType == 'mindmap' ||
+ diagramType == 'journey';
+ };
+
+ /**
+ * Extracts the Mermaid diagram type from the given data.
+ */
+ EditorUi.prototype.getMermaidDiagramType = function(data)
+ {
+ var lines = data.split('\n');
+ var k = 0;
+
+ while (k < lines.length && (lines[k].trim().length == 0 ||
+ lines[k].substring(0, 2) == '%%'))
+ {
+ k++;
+ }
+
+ if (lines[k].trim() == '---')
+ {
+ do
+ {
+ k++;
+ }
+ while (k < lines.length && lines[k].trim() != '---');
+
+ k++;
+ }
+
+ var diagramType = lines[k].trim().toLowerCase();
+ var sp = diagramType.indexOf(' ');
+
+ return diagramType.substring(0, sp > 0 ?
+ sp : diagramType.length);
+ };
+
+ /**
+ * Parses the given mermaid diagram and returns diagram XML.
+ */
+ EditorUi.prototype.parseMermaidDiagram = function(data, config, success, error, parseErrorHandler, enableParser)
+ {
+ var returned = false;
+
+ if (enableParser && typeof mxMermaidToDrawio !== 'undefined' &&
+ this.isSupportedMermaidDiagramType(this.getMermaidDiagramType(data)))
+ {
+ mxMermaidToDrawio.addListener(mxUtils.bind(this, function(xml)
+ {
+ if (!returned && xml != this.emptyDiagramXml)
+ {
+ returned = true;
+ success(xml);
+ }
+ }));
+ }
+
+ this.generateMermaidImage(data, config, mxUtils.bind(this, function(imageData, w, h)
+ {
+ if (!returned)
+ {
+ returned = true;
+ success(this.createMermaidXml(data, config, imageData, w, h));
+ }
+ }), error, parseErrorHandler);
+ };
+
+ /**
+ * Loads the Mermaid library extension.
+ */
+ EditorUi.prototype.loadMermaid = function(success, error)
+ {
+ var onerror = mxUtils.bind(this, function(e)
+ {
+ this.loadingMermaid = false;
+ error(e);
+ });
+
+ var onsuccess = mxUtils.bind(this, function()
+ {
+ try
+ {
+ this.loadingMermaid = false;
+ success();
+ }
+ catch (e)
+ {
+ onerror(e);
+ }
+ });
+
+ if (typeof mermaid === 'undefined' && !this.loadingMermaid && !this.isOffline(true))
+ {
+ this.loadingMermaid = true;
+
+ if (urlParams['dev'] == '1')
+ {
+ mxscript('js/mermaid/mermaid.min.js', onsuccess,
+ null, null, null, onerror);
+ }
+ else
+ {
+ mxscript(window.DRAWIO_SERVER_URL + 'js/extensions.min.js',
+ onsuccess, null, null, null, onerror);
+ }
+ }
+ else
+ {
+ window.setTimeout(onsuccess, 0);
+ }
+ };
+
+ /**
+ * Gets the width and height for the given SVG image.
+ */
+ EditorUi.prototype.mermaidSvgToDataUri = function(svg, success, error, parseError)
+ {
try
{
- if (type == 'mindmap' && lines.length > 2)
+ // Fixes common errors in SVG data
+ svg = svg.replace(/xlink:href/g, 'href').replace(/<br>/g, '<br/>');
+ var doc = mxUtils.parseXml(svg);
+ var svgs = doc.getElementsByTagName('svg');
+
+ if (svgs.length > 0 && svgs[0].getAttribute('aria-roledescription') != 'error')
{
- text = extractMermaidMindmap(lines);
+ var w = parseFloat(svgs[0].getAttribute('width'));
+ var h = parseFloat(svgs[0].getAttribute('height'));
+
+ if (isNaN(w) || isNaN(h))
+ {
+ try
+ {
+ var viewBox = svgs[0].getAttribute('viewBox').split(/\s+/);
+ w = parseFloat(viewBox[2]);
+ h = parseFloat(viewBox[3]);
+ }
+ catch(e)
+ {
+ //Any size such that it shows up
+ w = w || 100;
+ h = h || 100;
+ }
+ }
+
+ success(this.convertDataUri(Editor.createSvgDataUri(svg)), w, h);
+ }
+ else
+ {
+ if (parseError != null)
+ {
+ parseError();
+ }
+ else
+ {
+ error({message: mxResources.get('invalidInput')});
+ }
}
}
catch (e)
{
- // ignore
+ error(e);
}
-
- // TODO Is this too restrictive?
- if (mxUtils.indexOf(EditorUi.mermaidDiagramTypes, type) < 0)
+ };
+
+ /**
+ * Generates a Mermaid image.
+ */
+ EditorUi.prototype.getMermaidConfig = function(data, config)
+ {
+ config = (config != null) ? config : mxUtils.clone(EditorUi.defaultMermaidConfig);
+ config.securityLevel = 'strict';
+ config.startOnLoad = false;
+ config.maxTextSize = 900000;
+
+ // Math labels
+ if (typeof mxMermaidToDrawio !== 'undefined' && config.flowchart && data.indexOf('$$') >= 0)
{
- text = null;
+ config.flowchart.htmlLabels = true;
+ mxMermaidToDrawio.htmlLabels = true;
}
-
- return text;
+
+ if (Editor.isDarkMode())
+ {
+ config.theme = 'dark';
+ }
+
+ return config;
};
/**
@@ -9234,8 +9498,6 @@
{
var onerror = mxUtils.bind(this, function(e)
{
- this.loadingMermaid = false;
-
if (error != null)
{
error(e);
@@ -9246,139 +9508,59 @@
}
});
- var delayed = mxUtils.bind(this, function()
+ this.loadMermaid(mxUtils.bind(this, function()
{
try
{
- this.loadingMermaid = false;
-
- config = (config != null) ? config : mxUtils.clone(EditorUi.defaultMermaidConfig);
- config.securityLevel = 'strict';
- config.startOnLoad = false;
- config.maxTextSize = 900000;
+ mermaid.mermaidAPI.initialize(this.getMermaidConfig(data, config));
- // Math labels
- if (typeof mxMermaidToDrawio !== 'undefined' && config.flowchart && data.indexOf('$$') >= 0)
- {
- config.flowchart.htmlLabels = true;
- mxMermaidToDrawio.htmlLabels = true;
- }
-
- if (Editor.isDarkMode())
- {
- config.theme = 'dark';
- }
-
- var renderCallback = mxUtils.bind(this, function(svg)
- {
- try
+ mermaid.mermaidAPI.render('geMermaidOutput-' + new Date().getTime(),
+ data).then(mxUtils.bind(this, function(result)
{
- // Workaround for namespace errors in SVG output for IE
- if (mxClient.IS_IE || mxClient.IS_IE11)
+ this.mermaidSvgToDataUri(result.svg, success, error, parseErrorHandler);
+ })).catch(mxUtils.bind(this, function(e)
+ {
+ this.removeMermaidErrors();
+
+ // LATER: Move to calling code where listener is registered
+ if (typeof mxMermaidToDrawio !== 'undefined')
{
- svg = svg.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g, '').
- replace(/ (NS xml|\S*):space="preserve"/g, ' xml:space="preserve"');
+ mxMermaidToDrawio.resetListeners();
}
-
- // Fix common errors in SVG output
- svg = svg.replace(/xlink:href/g, 'href').replace(/<br>/g, '<br/>');
- var doc = mxUtils.parseXml(svg);
- var svgs = doc.getElementsByTagName('svg');
-
- if (svgs.length > 0 && svgs[0].getAttribute('aria-roledescription') != 'error')
+ if (parseErrorHandler != null)
{
- var w = parseFloat(svgs[0].getAttribute('width'));
- var h = parseFloat(svgs[0].getAttribute('height'));
-
- if (isNaN(w) || isNaN(h))
- {
- try
- {
- var viewBox = svgs[0].getAttribute('viewBox').split(/\s+/);
- w = parseFloat(viewBox[2]);
- h = parseFloat(viewBox[3]);
- }
- catch(e)
- {
- //Any size such that it shows up
- w = w || 100;
- h = h || 100;
- }
- }
-
- success(this.convertDataUri(Editor.createSvgDataUri(svg)), w, h);
+ parseErrorHandler(e);
}
else
{
- if (parseErrorHandler != null)
- {
- parseErrorHandler();
- }
- else
- {
- error({message: mxResources.get('invalidInput')});
- }
+ onerror(e);
}
- }
- catch (e)
- {
- error(e);
- }
- });
-
- mermaid.mermaidAPI.initialize(config);
-
- mermaid.mermaidAPI.render('geMermaidOutput-' + new Date().getTime(), data).then(function(result)
- {
- renderCallback(result.svg);
- }).catch(function(e)
- {
- if (parseErrorHandler != null)
- {
- parseErrorHandler(e);
- }
- else
- {
- error(e);
- }
- });
+ }));
}
catch (e)
{
- error(e);
+ onerror(e);
}
- });
+ }), onerror);
+ };
+
+ /**
+ * Removes div in document with an ID that starts with dgeMermaidOutput
+ */
+ EditorUi.prototype.removeMermaidErrors = function()
+ {
+ var elts = document.querySelectorAll('div[id*="dgeMermaidOutput-"]');
- if (typeof mermaid === 'undefined' && !this.loadingMermaid && !this.isOffline(true))
+ for (var i = 0; i < elts.length; i++)
{
- this.loadingMermaid = true;
-
- if (urlParams['dev'] == '1')
- {
- if (urlParams['mermaidToDrawioTest'] == '1')
- {
- mxMermaidToDrawio.addListener(mxUtils.bind(this, function(modelXml)
- {
- this.importXml(modelXml, null, null, null, null, null, true);
- }));
- }
-
- mxscript('js/mermaid/mermaid.min.js', delayed,
- null, null, null, onerror);
- }
- else
+ if (elts[i].parentNode != null)
{
- mxscript(window.DRAWIO_SERVER_URL + 'js/extensions.min.js', delayed,
- null, null, null, onerror);
+ elts[i].parentNode.removeChild(elts[i]);
}
}
- else
- {
- window.setTimeout(delayed, 0);
- }
};
-
+
/**
* Generates a plant UML image. Possible types are svg, png and txt.
*/
@@ -12859,6 +13041,12 @@
this.freehandWindow = null;
}
+ if (this.chatWindow != null)
+ {
+ this.chatWindow.destroy();
+ this.chatWindow = null;
+ }
+
if (this.actions.outlineWindow != null)
{
this.actions.outlineWindow.destroy();
@@ -18060,18 +18248,18 @@
/**
*
*/
- EditorUi.prototype.importCsv = function(text, done)
+ EditorUi.prototype.importCsv = function(text, done, graph)
{
this.loadOrgChartLayouts(mxUtils.bind(this, function()
{
- this.doImportCsv(text, done);
+ this.doImportCsv(text, done, graph);
}));
};
/**
*
*/
- EditorUi.prototype.doImportCsv = function(text, done)
+ EditorUi.prototype.doImportCsv = function(text, done, graph)
{
try
{
@@ -18087,7 +18275,7 @@
var lookups = {};
// Default values
- var graph = this.editor.graph;
+ graph = (graph != null) ? graph : this.editor.graph;
var vars = null;
var style = null;
var styles = null;
@@ -18450,7 +18638,7 @@
}
// Sets the geometry
- var size = this.editor.graph.getPreferredSizeForCell(cell);
+ var size = graph.getPreferredSizeForCell(cell);
var parent = (parentIndex != null) ? graph.model.getCell(
namespace + values[parentIndex]) : null;
@@ -18563,7 +18751,7 @@
{
ref = new mxCell(refs[j], new mxGeometry(x0, y0, 0, 0), unknownStyle);
ref.style = graph.replacePlaceholders(dataCell, ref.style, vars);
- var refSize = this.editor.graph.getPreferredSizeForCell(ref);
+ var refSize = graph.getPreferredSizeForCell(ref);
ref.geometry.width = refSize.width + padding;
ref.geometry.height = refSize.height + padding;
lookups[edge.to][refs[j]] = ref;
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index 22afb43a3..d04e156bd 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -138,10 +138,29 @@
typeof mxMermaidToDrawio !== 'undefined' &&
window.isMermaidEnabled)
{
- editorUi.actions.put('generate', new Action('generate' + '...', function()
+ var generateAction = editorUi.actions.put('generate', new Action('generate', function()
{
- editorUi.openTemplateDialog('');
- })).isEnabled = isGraphEnabled;
+ if (editorUi.chatWindow != null)
+ {
+ editorUi.chatWindow.window.setVisible(!editorUi.chatWindow.window.isVisible());
+ }
+ else
+ {
+ editorUi.openGenerateDialog('');
+ }
+ }));
+
+ generateAction.isEnabled = function()
+ {
+ return isGraphEnabled();
+ };
+
+ generateAction.setToggleAction(true);
+
+ generateAction.setSelectedCallback(function()
+ {
+ return editorUi.chatWindow != null && editorUi.chatWindow.window.isVisible();
+ });
}
editorUi.actions.put('insertTemplate', new Action('template' + '...', function()
@@ -490,8 +509,9 @@
if (state != null && state.shape != null && state.shape.stencil != null)
{
- var dlg = new EditShapeDialog(editorUi, cell, mxResources.get('editShape') + ':', 630, 400);
- editorUi.showDialog(dlg.container, 640, 480, true, false);
+ var dlg = new EditShapeDialog(editorUi, cell, mxResources.get('editShape'));
+ editorUi.showDialog(dlg.container, 640, 480, true, false,
+ null, null, null, new mxRectangle(0, 0, 300, 200));
dlg.init();
}
}
@@ -900,32 +920,22 @@
action.setToggleAction(true);
action.setSelectedCallback(mxUtils.bind(this, function() { return this.tagsWindow != null && this.tagsWindow.window.isVisible(); }));
- if (Editor.gptApiKey != null && Editor.gptModel != null && Editor.gptUrl != null &&
+ if (Editor.gptApiKey != null && Editor.gptModels != null && Editor.gptUrl != null &&
!editorUi.isOffline() && !EditorUi.isElectronApp)
{
- action = editorUi.actions.addAction('chatWindowTitle', mxUtils.bind(this, function()
+ action = editorUi.actions.addAction('generate', mxUtils.bind(this, function()
{
- if (this.chatWindow == null)
+ if (editorUi.chatWindow == null)
{
- this.chatWindow = new ChatWindow(editorUi, 220, document.body.offsetHeight - 380, 250, 320);
- this.chatWindow.window.addListener('show', mxUtils.bind(this, function()
- {
- editorUi.fireEvent(new mxEventObject('chat'));
- }));
- this.chatWindow.window.addListener('hide', function()
- {
- editorUi.fireEvent(new mxEventObject('chat'));
- });
- this.chatWindow.window.setVisible(true);
- editorUi.fireEvent(new mxEventObject('chat'));
+ editorUi.openGenerateDialog();
}
else
{
- this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible());
+ editorUi.chatWindow.window.setVisible(!editorUi.chatWindow.window.isVisible());
}
}));
action.setToggleAction(true);
- action.setSelectedCallback(mxUtils.bind(this, function() { return this.chatWindow != null && this.chatWindow.window.isVisible(); }));
+ action.setSelectedCallback(mxUtils.bind(this, function() { return editorUi.chatWindow != null && editorUi.chatWindow.window.isVisible(); }));
}
action = editorUi.actions.addAction('findReplace', mxUtils.bind(this, function(arg1, evt)
@@ -2304,11 +2314,13 @@
{
if (graph.isEnabled())
{
- var cell = new mxCell('', new mxGeometry(0, 0, 120, 120), editorUi.defaultCustomShapeStyle);
+ var cell = new mxCell('', new mxGeometry(0, 0, 120, 120),
+ editorUi.defaultCustomShapeStyle);
cell.vertex = true;
-
- var dlg = new EditShapeDialog(editorUi, cell, mxResources.get('editShape') + ':', 630, 400);
- editorUi.showDialog(dlg.container, 640, 480, true, false);
+
+ var dlg = new EditShapeDialog(editorUi, cell, mxResources.get('editShape'));
+ editorUi.showDialog(dlg.container, 640, 480, true, false,
+ null, null, null, new mxRectangle(0, 0, 300, 200));
dlg.init();
}
})).isEnabled = isGraphEnabled;
@@ -4169,8 +4181,9 @@
{
this.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy', 'copyAsImage', 'copyAsSvg', 'paste',
'delete', '-', 'duplicate', '-', 'findReplace', '-', 'editData', 'editTooltip', '-',
- 'editStyle', 'editGeometry', '-', 'edit', '-', 'editLink', 'openLink', '-',
- 'selectVertices', 'selectEdges', 'selectAll', 'selectNone', '-', 'lockUnlock']);
+ 'editStyle', 'editGeometry', 'editConnectionPoints', '-', 'edit', '-',
+ 'editLink', 'openLink', '-', 'selectVertices', 'selectEdges', 'selectAll', 'selectNone', '-',
+ 'lockUnlock']);
})));
var action = editorUi.actions.addAction('comments', mxUtils.bind(this, function()
@@ -4224,7 +4237,7 @@
{
var file = editorUi.getCurrentFile();
editorUi.menus.addMenuItems(menu, ['toggleShapes', 'format', 'ruler', '-',
- 'findReplace', 'layers', 'tags', 'chatWindowTitle', 'outline', '-'], parent);
+ 'findReplace', 'layers', 'tags', 'outline', 'generate', '-'], parent);
if (editorUi.commentsSupported())
{
@@ -4265,7 +4278,7 @@
}
editorUi.menus.addMenuItems(menu, ['-', 'findReplace',
- 'layers', 'tags', 'chatWindowTitle', 'outline', '-'], parent);
+ 'layers', 'tags', 'outline', 'generate', '-'], parent);
if (editorUi.commentsSupported())
{
@@ -4281,7 +4294,7 @@
}
else
{
- this.addMenuItems(menu, (['format', 'outline', 'layers', 'tags', 'chatWindowTitle']).
+ this.addMenuItems(menu, (['format', 'outline', 'layers', 'tags', 'generate']).
concat((editorUi.commentsSupported()) ?
['comments', '-'] : ['-']));
@@ -4736,7 +4749,7 @@
if (Editor.currentTheme == 'min')
{
editorUi.menus.addMenuItems(menu, ['toggleShapes', 'format',
- 'layers', 'tags', 'chatWindowTitle', '-',
+ 'layers', 'tags', 'generate', '-',
'findReplace'], parent);
if (editorUi.commentsSupported())
@@ -4769,7 +4782,7 @@
}
editorUi.menus.addMenuItems(menu, ['toggleShapes', 'format',
- 'layers', 'tags', 'chatWindowTitle', '-'], parent);
+ 'layers', 'tags', 'generate', '-'], parent);
editorUi.menus.addMenuItems(menu, ['pageSetup'], parent);
}
else if (Editor.currentTheme != 'min')
diff --git a/src/main/webapp/js/grapheditor/Editor.js b/src/main/webapp/js/grapheditor/Editor.js
index 851cb9667..4bec8e065 100644
--- a/src/main/webapp/js/grapheditor/Editor.js
+++ b/src/main/webapp/js/grapheditor/Editor.js
@@ -165,7 +165,8 @@ Editor.extensionImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3d
Editor.colorDropperImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTYgNDJ2LTguNGwxOC44NS0xOC44NS0zLjYtMy42TDIzLjMgOS4xbDQuNiA0LjZMMzUgNi42cS41NS0uNTUgMS4xNzUtLjU1dDEuMTc1LjU1bDQuMDUgNC4wNXEuNTUuNTUuNTUgMS4xNzVUNDEuNCAxM2wtNy4xIDcuMSA0LjYgNC42LTIuMDUgMi4wNS0zLjYtMy42TDE0LjQgNDJabTMtM2g0LjM1TDMxLjEgMjEuMjVsLTQuMzUtNC4zNUw5IDM0LjY1Wm0yMy4xNS0yMSA2LjItNi4yLTIuMTUtMi4xNS02LjIgNi4yWm0wIDBMMzAgMTUuODUgMzIuMTUgMThaIi8+PC9zdmc+';
Editor.magnifyImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik03ODQtMTIwIDUzMi0zNzJxLTMwIDI0LTY5IDM4dC04MyAxNHEtMTA5IDAtMTg0LjUtNzUuNVQxMjAtNTgwcTAtMTA5IDc1LjUtMTg0LjVUMzgwLTg0MHExMDkgMCAxODQuNSA3NS41VDY0MC01ODBxMCA0NC0xNCA4M3QtMzggNjlsMjUyIDI1Mi01NiA1NlpNMzgwLTQwMHE3NSAwIDEyNy41LTUyLjVUNTYwLTU4MHEwLTc1LTUyLjUtMTI3LjVUMzgwLTc2MHEtNzUgMC0xMjcuNSA1Mi41VDIwMC01ODBxMCA3NSA1Mi41IDEyNy41VDM4MC00MDBaIi8+PC9zdmc+';
Editor.sendImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik0xMjAtMTYwdi02NDBsNzYwIDMyMC03NjAgMzIwWm04MC0xMjAgNDc0LTIwMC00NzQtMjAwdjE0MGwyNDAgNjAtMjQwIDYwdjE0MFptMCAwdi00MDAgNDAwWiIvPjwvc3ZnPg==';
-Editor.sparklesImage = 'data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KDTwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIFRyYW5zZm9ybWVkIGJ5OiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4KPHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBpZD0iaWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgZmlsbD0iI2ZjZmY0NyIgZGF0YS1kYXJrcmVhZGVyLWlubGluZS1maWxsPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6ICNkNmQ4NTA7IC0tZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlOiAjZDZkODUwOyIgc3Ryb2tlPSIjZmNmZjQ3IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIj4KDTxnIGlkPSJTVkdSZXBvX2JnQ2FycmllciIgc3Ryb2tlLXdpZHRoPSIwIi8+Cg08ZyBpZD0iU1ZHUmVwb190cmFjZXJDYXJyaWVyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KDTxnIGlkPSJTVkdSZXBvX2ljb25DYXJyaWVyIj4KDTxwYXRoIGQ9Ik0yNTkuOTIsMjYyLjkxLDIxNi40LDE0OS43N2E5LDksMCwwLDAtMTYuOCwwTDE1Ni4wOCwyNjIuOTFhOSw5LDAsMCwxLTUuMTcsNS4xN0wzNy43NywzMTEuNmE5LDksMCwwLDAsMCwxNi44bDExMy4xNCw0My41MmE5LDksMCwwLDEsNS4xNyw1LjE3TDE5OS42LDQ5MC4yM2E5LDksMCwwLDAsMTYuOCwwbDQzLjUyLTExMy4xNGE5LDksMCwwLDEsNS4xNy01LjE3TDM3OC4yMywzMjguNGE5LDksMCwwLDAsMC0xNi44TDI2NS4wOSwyNjguMDhBOSw5LDAsMCwxLDI1OS45MiwyNjIuOTFaIiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KDTxwb2x5Z29uIHBvaW50cz0iMTA4IDY4IDg4IDE2IDY4IDY4IDE2IDg4IDY4IDEwOCA4OCAxNjAgMTA4IDEwOCAxNjAgODggMTA4IDY4IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KDTxwb2x5Z29uIHBvaW50cz0iNDI2LjY3IDExNy4zMyA0MDAgNDggMzczLjMzIDExNy4zMyAzMDQgMTQ0IDM3My4zMyAxNzAuNjcgNDAwIDI0MCA0MjYuNjcgMTcwLjY3IDQ5NiAxNDQgNDI2LjY3IDExNy4zMyIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMTkuOTY4IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6ICMxODFhMWI7Ii8+Cg08L2c+Cg08L3N2Zz4=';
+Editor.sparklesImage = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjU5LjkyLDI2Mi45MSwyMTYuNCwxNDkuNzdhOSw5LDAsMCwwLTE2LjgsMEwxNTYuMDgsMjYyLjkxYTksOSwwLDAsMS01LjE3LDUuMTdMMzcuNzcsMzExLjZhOSw5LDAsMCwwLDAsMTYuOGwxMTMuMTQsNDMuNTJhOSw5LDAsMCwxLDUuMTcsNS4xN0wxOTkuNiw0OTAuMjNhOSw5LDAsMCwwLDE2LjgsMGw0My41Mi0xMTMuMTRhOSw5LDAsMCwxLDUuMTctNS4xN0wzNzguMjMsMzI4LjRhOSw5LDAsMCwwLDAtMTYuOEwyNjUuMDksMjY4LjA4QTksOSwwLDAsMSwyNTkuOTIsMjYyLjkxWiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iNDAiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KPHBvbHlnb24gcG9pbnRzPSIxMDggNjggODggMTYgNjggNjggMTYgODggNjggMTA4IDg4IDE2MCAxMDggMTA4IDE2MCA4OCAxMDggNjgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzAwMDAwMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjMwIi8+Cjxwb2x5Z29uIHBvaW50cz0iNDI2LjY3IDExNy4zMyA0MDAgNDggMzczLjMzIDExNy4zMyAzMDQgMTQ0IDM3My4zMyAxNzAuNjcgNDAwIDI0MCA0MjYuNjcgMTcwLjY3IDQ5NiAxNDQgNDI2LjY3IDExNy4zMyIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMzAiLz4KPC9zdmc+';
+Editor.thinSparklesImage = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjU5LjkyLDI2Mi45MSwyMTYuNCwxNDkuNzdhOSw5LDAsMCwwLTE2LjgsMEwxNTYuMDgsMjYyLjkxYTksOSwwLDAsMS01LjE3LDUuMTdMMzcuNzcsMzExLjZhOSw5LDAsMCwwLDAsMTYuOGwxMTMuMTQsNDMuNTJhOSw5LDAsMCwxLDUuMTcsNS4xN0wxOTkuNiw0OTAuMjNhOSw5LDAsMCwwLDE2LjgsMGw0My41Mi0xMTMuMTRhOSw5LDAsMCwxLDUuMTctNS4xN0wzNzguMjMsMzI4LjRhOSw5LDAsMCwwLDAtMTYuOEwyNjUuMDksMjY4LjA4QTksOSwwLDAsMSwyNTkuOTIsMjYyLjkxWiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMTkuOTY4IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6ICMxODFhMWI7Ii8+Cjxwb2x5Z29uIHBvaW50cz0iMTA4IDY4IDg4IDE2IDY4IDY4IDE2IDg4IDY4IDEwOCA4OCAxNjAgMTA4IDEwOCAxNjAgODggMTA4IDY4IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiLz4KPHBvbHlnb24gcG9pbnRzPSI0MjYuNjcgMTE3LjMzIDQwMCA0OCAzNzMuMzMgMTE3LjMzIDMwNCAxNDQgMzczLjMzIDE3MC42NyA0MDAgMjQwIDQyNi42NyAxNzAuNjcgNDk2IDE0NCA0MjYuNjcgMTE3LjMzIiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiLz4KPC9zdmc+';
Editor.arrowRightImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDAwLTI4MHYtNDAwbDIwMCAyMDAtMjAwIDIwMFoiLz48L3N2Zz4=';
Editor.arrowDownImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTM2MCAyODAtNTYwaDQwMEw0ODAtMzYwWiIvPjwvc3ZnPg==';
Editor.arrowUpImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJtMjgwLTQwMCAyMDAtMjAwIDIwMCAyMDBIMjgwWiIvPjwvc3ZnPg==';
@@ -224,6 +225,7 @@ Editor.copyImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My
Editor.doubleArrowUpImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJtMjk2LTIyNC01Ni01NiAyNDAtMjQwIDI0MCAyNDAtNTYgNTYtMTg0LTE4My0xODQgMTgzWm0wLTI0MC01Ni01NiAyNDAtMjQwIDI0MCAyNDAtNTYgNTYtMTg0LTE4My0xODQgMTgzWiIvPjwvc3ZnPg==';
Editor.doubleArrowDownImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTIwMCAyNDAtNDQwbDU2LTU2IDE4NCAxODMgMTg0LTE4MyA1NiA1Ni0yNDAgMjQwWm0wLTI0MEwyNDAtNjgwbDU2LTU2IDE4NCAxODMgMTg0LTE4MyA1NiA1Ni0yNDAgMjQwWiIvPjwvc3ZnPg==';
Editor.opacityImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMWYxZjFmIj48cGF0aCBkPSJNNDgwLTEyMHEtMTMzIDAtMjI2LjUtOTJUMTYwLTQzNnEwLTY1IDI1LTEyMS41VDI1NC02NThsMjI2LTIyMiAyMjYgMjIycTQ0IDQ0IDY5IDEwMC41VDgwMC00MzZxMCAxMzItOTMuNSAyMjRUNDgwLTEyMFpNMjQyLTQwMGg0NzRxMTItNzItMTMuNS0xMjNUNjUwLTYwMEw0ODAtNzY4IDMxMC02MDBxLTI3IDI2LTUzIDc3dC0xNSAxMjNaIi8+PC9zdmc+';
+Editor.shareImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMWYxZjFmIj48cGF0aCBkPSJNMjQwLTgwcS0zMyAwLTU2LjUtMjMuNVQxNjAtMTYwdi00MDBxMC0zMyAyMy41LTU2LjVUMjQwLTY0MGgxMjB2ODBIMjQwdjQwMGg0ODB2LTQwMEg2MDB2LTgwaDEyMHEzMyAwIDU2LjUgMjMuNVQ4MDAtNTYwdjQwMHEwIDMzLTIzLjUgNTYuNVQ3MjAtODBIMjQwWm0yMDAtMjQwdi00NDdsLTY0IDY0LTU2LTU3IDE2MC0xNjAgMTYwIDE2MC01NiA1Ny02NC02NHY0NDdoLTgwWiIvPjwvc3ZnPg==';
/**
* All fill styles supported by rough.js.
@@ -379,6 +381,55 @@ Editor.convertHtmlToText = function(label)
}
};
+/**
+ *
+ */
+Editor.extractGraphModelFromText = function(text)
+{
+ var start = text.indexOf('<mxGraphModel ');
+ var end = text.indexOf('</mxGraphModel>');
+
+ if (start < 0)
+ {
+ start = text.indexOf('<mxGraphModel>');
+ }
+
+ function trimStart(text)
+ {
+ var index = text.indexOf('```');
+
+ if (index >= 0)
+ {
+ text = text.substring(text, 0, index + 6);
+ }
+
+ return text;
+ };
+
+ function trimEnd(text)
+ {
+ var index = text.lastIndexOf('```');
+
+ if (index >= 0)
+ {
+ text = text.substring(index + 3);
+ }
+
+ return text;
+ };
+
+ if (start >= 0 && end > start)
+ {
+ return [mxUtils.trim(trimStart(text.substring(0, start))),
+ text.substring(start, end + 15),
+ mxUtils.trim(trimEnd(text.substring(end + 15)))];
+ }
+ else
+ {
+ return [text, '', ''];
+ }
+};
+
/**
* Extracts the XML from the compressed or non-compressed text chunk.
*/
diff --git a/src/main/webapp/js/grapheditor/Graph.js b/src/main/webapp/js/grapheditor/Graph.js
index 4a6b120be..5662c6f5f 100644
--- a/src/main/webapp/js/grapheditor/Graph.js
+++ b/src/main/webapp/js/grapheditor/Graph.js
@@ -3087,7 +3087,7 @@ Graph.prototype.connectionArrowsEnabled = true;
/**
* Specifies the regular expression for matching placeholders.
*/
-Graph.prototype.placeholderPattern = new RegExp('%(date\{.*\}|[^%^\{^\}^ ^"^ \'^=^;]+)%', 'g');
+Graph.prototype.placeholderPattern = new RegExp('%(date\{.*\}|[^%\{\}"\'=;]+)%', 'g');
/**
* Specifies the regular expression for matching placeholders.
@@ -5524,7 +5524,26 @@ Graph.prototype.replacePlaceholders = function(cell, str, vars, translate)
if (tmp == null)
{
- tmp = this.getGlobalVariable(name);
+ if ((name.substring(0, 9) == 'pagecount' && name.length > 9) ||
+ name.substring(0, 10) == 'pagenumber' && name.length > 10)
+ {
+ var matches = name.match(/(pagecount|pagenumber)[\s]*([+-])[\s]*(\d+)/);
+
+ if (matches != null)
+ {
+ tmp = this.getGlobalVariable(matches[1]);
+
+ if (matches.length > 3)
+ {
+ var num = parseInt(matches[3]);
+ tmp += ((matches[2] == '+') ? num : -num);
+ }
+ }
+ }
+ else
+ {
+ tmp = this.getGlobalVariable(name);
+ }
}
if (tmp == null && vars != null)
diff --git a/src/main/webapp/js/grapheditor/Sidebar.js b/src/main/webapp/js/grapheditor/Sidebar.js
index cd3735b04..8d1a6150a 100644
--- a/src/main/webapp/js/grapheditor/Sidebar.js
+++ b/src/main/webapp/js/grapheditor/Sidebar.js
@@ -630,8 +630,8 @@ Sidebar.prototype.createTooltip = function(elt, cells, w, h, title, showLabel, o
// Workaround for ignored position CSS style in IE9
// (changes to relative without the following line)
this.tooltip.style.position = 'absolute';
- this.tooltip.style.left = left + 'px';
- this.tooltip.style.top = top + 'px';
+ this.tooltip.style.left = Math.max(0, left) + 'px';
+ this.tooltip.style.top = Math.max(0, top) + 'px';
mxUtils.fit(this.tooltip, this.tooltipBorder);
this.lastCreated = Date.now();
@@ -1252,17 +1252,15 @@ Sidebar.prototype.addSearchPalette = function(expand)
!editorUi.isOffline() &&
editorUi.isOwnGDriveDomain() &&
editorUi.isExternalDataComms() &&
- editorUi.getServiceName() == 'draw.io')
+ editorUi.getServiceName() == 'draw.io' &&
+ typeof mxMermaidToDrawio !== 'undefined' &&
+ window.isMermaidEnabled)
{
- if (typeof mxMermaidToDrawio !== 'undefined' &&
- window.isMermaidEnabled)
+ menu.addItem(mxResources.get('generate'), null, mxUtils.bind(this, function()
{
- menu.addItem(mxResources.get('generate'), null, mxUtils.bind(this, function()
- {
- editorUi.openTemplateDialog(encodeURIComponent(input.value));
- input.value = '';
- }), parent);
- }
+ editorUi.openGenerateDialog(input.value);
+ input.value = '';
+ }), parent);
}
if (!editorUi.isOffline() &&
@@ -2755,16 +2753,21 @@ Sidebar.prototype.createSection = function(title)
*/
Sidebar.prototype.createItem = function(cells, title, showLabel, showTitle, width, height,
allowCellsInserted, showTooltip, clickFn, thumbWidth, thumbHeight, icon, startEditing,
- sourceCell)
+ sourceCell, useElt)
{
showTooltip = (showTooltip != null) ? showTooltip : true;
thumbWidth = (thumbWidth != null) ? thumbWidth : this.thumbWidth;
thumbHeight = (thumbHeight != null) ? thumbHeight : this.thumbHeight;
-
- var elt = document.createElement('a');
- var border = 2 * this.thumbBorder;
- elt.style.width = (thumbWidth + border) + 'px';
- elt.style.height = (thumbHeight + border) + 'px';
+
+ var elt = useElt;
+
+ if (elt == null)
+ {
+ elt = document.createElement('a');
+ var border = 2 * this.thumbBorder;
+ elt.style.width = (thumbWidth + border) + 'px';
+ elt.style.height = (thumbHeight + border) + 'px';
+ }
// Blocks default click action
mxEvent.addListener(elt, 'click', function(evt)
@@ -2790,7 +2793,7 @@ Sidebar.prototype.createItem = function(cells, title, showLabel, showTitle, widt
elt.style.backgroundPosition = 'center';
elt.style.backgroundSize = '24px 24px';
}
- else
+ else if (useElt == null)
{
elt.className = 'geItem';
this.createThumb(originalCells, thumbWidth, thumbHeight,
@@ -2830,7 +2833,7 @@ Sidebar.prototype.createItem = function(cells, title, showLabel, showTitle, widt
}));
}
}
- else
+ else if (useElt == null)
{
elt.style.backgroundImage = 'url(' + Editor.svgBrokenImage.src + ')';
elt.setAttribute('title', title);
diff --git a/src/main/webapp/js/grapheditor/Toolbar.js b/src/main/webapp/js/grapheditor/Toolbar.js
index 2a484c366..192c1b148 100644
--- a/src/main/webapp/js/grapheditor/Toolbar.js
+++ b/src/main/webapp/js/grapheditor/Toolbar.js
@@ -58,16 +58,18 @@ Toolbar.prototype.init = function()
var insertMenu = this.addMenu(this.editorUi.menus.get('insert'), null, Editor.plusImage);
insertMenu.setAttribute('data-min-width', 300);
-
var shapesElt = insertMenu.cloneNode(true);
shapesElt.setAttribute('data-min-width', 330);
shapesElt.style.backgroundImage = 'url(' + Editor.shapesImage + ')';
this.editorUi.addShapePicker(shapesElt, true);
this.container.appendChild(shapesElt);
-
var tableMenu = this.addTableDropDown();
tableMenu.setAttribute('data-min-width', 360);
+ this.addSeparator(null, 360);
+ this.addItems(['insertFreehand', 'generate'], null, null,
+ [Editor.freehandImage, Editor.sparklesImage], 420);
+
this.editorUi.dependsOnLanguage(mxUtils.bind(this, function()
{
if (this.edgeShapeMenu != null)
@@ -601,11 +603,15 @@ Toolbar.prototype.addItems = function(keys, c, ignoreDisabled, icons, minWidth)
{
var elt = this.addItem((icons != null) ?
icons[i] : null, key, c, ignoreDisabled);
- items.push(elt);
- if (minWidth != null)
+ if (elt != null)
{
- elt.setAttribute('data-min-width', minWidth);
+ items.push(elt);
+
+ if (minWidth != null)
+ {
+ elt.setAttribute('data-min-width', minWidth);
+ }
}
}
}
diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js
index 59b6f2c2d..9ab24ecb3 100644
--- a/src/main/webapp/js/integrate.min.js
+++ b/src/main/webapp/js/integrate.min.js
@@ -68,7 +68,7 @@ b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlPa
"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);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"29.0.3",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.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"29.2.2",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:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -1897,7 +1897,8 @@ mxCodec.prototype.decodeCell=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&
mxCodec.prototype.insertIntoGraph=function(a){var b=a.parent,c=a.getTerminal(!0),d=a.getTerminal(!1);a.setTerminal(null,!1);a.setTerminal(null,!0);a.parent=null;if(null!=b){if(b==a)throw Error(b.id+": Self Reference");b.insert(a)}null!=c&&c.insertEdge(a,!0);null!=d&&d.insertEdge(a,!1)};mxCodec.prototype.setAttribute=function(a,b,c){null!=b&&null!=c&&a.setAttribute(b,c)};
function mxObjectCodec(a,b,c,d){this.template=a;this.exclude=null!=b?b:[];this.idrefs=null!=c?c:[];this.mapping=null!=d?d:[];this.reverse={};for(var e in this.mapping)this.reverse[this.mapping[e]]=e}mxObjectCodec.allowEval=!1;mxObjectCodec.prototype.template=null;mxObjectCodec.prototype.exclude=null;mxObjectCodec.prototype.idrefs=null;mxObjectCodec.prototype.mapping=null;mxObjectCodec.prototype.reverse=null;mxObjectCodec.prototype.getName=function(){return mxUtils.getFunctionName(this.template.constructor)};
mxObjectCodec.prototype.cloneTemplate=function(){return new this.template.constructor};mxObjectCodec.prototype.getFieldName=function(a){if(null!=a){var b=this.reverse[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.getAttributeName=function(a){if(null!=a){var b=this.mapping[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.isExcluded=function(a,b,c,d){return b==mxObjectIdentity.FIELD_NAME||0<=mxUtils.indexOf(this.exclude,b)};
-mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));for(var d in b){var e=d,f=b[e];null==f||this.isExcluded(b,e,f,!0)||(mxUtils.isInteger(e)&&(e=null),this.encodeValue(a,b,e,f,c))}};
+mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};
+mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));var d=[],e;for(e in b){var f=e,g=b[f];null==g||this.isExcluded(b,f,g,!0)||(mxUtils.isInteger(f)?this.encodeValue(a,b,null,g,c):d.push({name:f,value:g}))}d.sort(function(k,l){return k.name<l.name?-1:k.name>l.name?1:0});for(e=0;e<d.length;e++)this.encodeValue(a,b,d[e].name,d[e].value,c)};
mxObjectCodec.prototype.encodeValue=function(a,b,c,d,e){if(null!=d){if(this.isReference(b,c,d,!0)){var f=a.getId(d);if(null==f){mxLog.warn("mxObjectCodec.encode: No ID for "+this.getName()+"."+c+"="+d);return}d=f}f=this.template[c];if(null==c||a.encodeDefaults||f!=d)c=this.getAttributeName(c),this.writeAttribute(a,b,c,d,e)}};mxObjectCodec.prototype.writeAttribute=function(a,b,c,d,e){"object"!=typeof d?this.writePrimitiveAttribute(a,b,c,d,e):this.writeComplexAttribute(a,b,c,d,e)};
mxObjectCodec.prototype.writePrimitiveAttribute=function(a,b,c,d,e){d=this.convertAttributeToXml(a,b,c,d,e);null==c?(b=a.document.createElement("add"),"function"==typeof d?b.appendChild(a.document.createTextNode(d)):a.setAttribute(b,"value",d),e.appendChild(b)):"function"!=typeof d&&a.setAttribute(e,c,d)};
mxObjectCodec.prototype.writeComplexAttribute=function(a,b,c,d,e){a=a.encode(d);null!=a?(null!=c&&a.setAttribute("as",c),e.appendChild(a)):mxLog.warn("mxObjectCodec.encode: No node for "+this.getName()+"."+c+": "+d)};mxObjectCodec.prototype.convertAttributeToXml=function(a,b,c,d){this.isBooleanAttribute(a,b,c,d)&&(d=1==d?"1":"0");return d};mxObjectCodec.prototype.isBooleanAttribute=function(a,b,c,d){return"undefined"==typeof d.length&&(1==d||0==d)};
@@ -1958,7 +1959,8 @@ Editor.expandMoreImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy
Editor.extensionImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTguOCAyMUg1cS0uODI1IDAtMS40MTMtLjU4N1EzIDE5LjgyNSAzIDE5di0zLjhxMS4yIDAgMi4xLS43NjIuOS0uNzYzLjktMS45MzggMC0xLjE3NS0uOS0xLjkzOFE0LjIgOS44IDMgOS44VjZxMC0uODI1LjU4Ny0xLjQxMlE0LjE3NSA0IDUgNGg0cTAtMS4wNS43MjUtMS43NzVRMTAuNDUgMS41IDExLjUgMS41cTEuMDUgMCAxLjc3NS43MjVRMTQgMi45NSAxNCA0aDRxLjgyNSAwIDEuNDEzLjU4OFEyMCA1LjE3NSAyMCA2djRxMS4wNSAwIDEuNzc1LjcyNS43MjUuNzI1LjcyNSAxLjc3NSAwIDEuMDUtLjcyNSAxLjc3NVEyMS4wNSAxNSAyMCAxNXY0cTAgLjgyNS0uNTg3IDEuNDEzUTE4LjgyNSAyMSAxOCAyMWgtMy44cTAtMS4yNS0uNzg3LTIuMTI1UTEyLjYyNSAxOCAxMS41IDE4dC0xLjkxMi44NzVROC44IDE5Ljc1IDguOCAyMVpNNSAxOWgyLjEyNXEuNi0xLjY1IDEuOTI1LTIuMzI1UTEwLjM3NSAxNiAxMS41IDE2cTEuMTI1IDAgMi40NS42NzUgMS4zMjUuNjc1IDEuOTI1IDIuMzI1SDE4di02aDJxLjIgMCAuMzUtLjE1LjE1LS4xNS4xNS0uMzUgMC0uMi0uMTUtLjM1UTIwLjIgMTIgMjAgMTJoLTJWNmgtNlY0cTAtLjItLjE1LS4zNS0uMTUtLjE1LS4zNS0uMTUtLjIgMC0uMzUuMTVRMTEgMy44IDExIDR2Mkg1djIuMnExLjM1LjUgMi4xNzUgMS42NzVROCAxMS4wNSA4IDEyLjVxMCAxLjQyNS0uODI1IDIuNlQ1IDE2LjhabTcuNzUtNy43NVoiLz48L3N2Zz4=";
Editor.colorDropperImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTYgNDJ2LTguNGwxOC44NS0xOC44NS0zLjYtMy42TDIzLjMgOS4xbDQuNiA0LjZMMzUgNi42cS41NS0uNTUgMS4xNzUtLjU1dDEuMTc1LjU1bDQuMDUgNC4wNXEuNTUuNTUuNTUgMS4xNzVUNDEuNCAxM2wtNy4xIDcuMSA0LjYgNC42LTIuMDUgMi4wNS0zLjYtMy42TDE0LjQgNDJabTMtM2g0LjM1TDMxLjEgMjEuMjVsLTQuMzUtNC4zNUw5IDM0LjY1Wm0yMy4xNS0yMSA2LjItNi4yLTIuMTUtMi4xNS02LjIgNi4yWm0wIDBMMzAgMTUuODUgMzIuMTUgMThaIi8+PC9zdmc+";
Editor.magnifyImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik03ODQtMTIwIDUzMi0zNzJxLTMwIDI0LTY5IDM4dC04MyAxNHEtMTA5IDAtMTg0LjUtNzUuNVQxMjAtNTgwcTAtMTA5IDc1LjUtMTg0LjVUMzgwLTg0MHExMDkgMCAxODQuNSA3NS41VDY0MC01ODBxMCA0NC0xNCA4M3QtMzggNjlsMjUyIDI1Mi01NiA1NlpNMzgwLTQwMHE3NSAwIDEyNy41LTUyLjVUNTYwLTU4MHEwLTc1LTUyLjUtMTI3LjVUMzgwLTc2MHEtNzUgMC0xMjcuNSA1Mi41VDIwMC01ODBxMCA3NSA1Mi41IDEyNy41VDM4MC00MDBaIi8+PC9zdmc+";
-Editor.sendImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik0xMjAtMTYwdi02NDBsNzYwIDMyMC03NjAgMzIwWm04MC0xMjAgNDc0LTIwMC00NzQtMjAwdjE0MGwyNDAgNjAtMjQwIDYwdjE0MFptMCAwdi00MDAgNDAwWiIvPjwvc3ZnPg==";Editor.sparklesImage="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KDTwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIFRyYW5zZm9ybWVkIGJ5OiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4KPHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBpZD0iaWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgZmlsbD0iI2ZjZmY0NyIgZGF0YS1kYXJrcmVhZGVyLWlubGluZS1maWxsPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6ICNkNmQ4NTA7IC0tZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlOiAjZDZkODUwOyIgc3Ryb2tlPSIjZmNmZjQ3IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIj4KDTxnIGlkPSJTVkdSZXBvX2JnQ2FycmllciIgc3Ryb2tlLXdpZHRoPSIwIi8+Cg08ZyBpZD0iU1ZHUmVwb190cmFjZXJDYXJyaWVyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KDTxnIGlkPSJTVkdSZXBvX2ljb25DYXJyaWVyIj4KDTxwYXRoIGQ9Ik0yNTkuOTIsMjYyLjkxLDIxNi40LDE0OS43N2E5LDksMCwwLDAtMTYuOCwwTDE1Ni4wOCwyNjIuOTFhOSw5LDAsMCwxLTUuMTcsNS4xN0wzNy43NywzMTEuNmE5LDksMCwwLDAsMCwxNi44bDExMy4xNCw0My41MmE5LDksMCwwLDEsNS4xNyw1LjE3TDE5OS42LDQ5MC4yM2E5LDksMCwwLDAsMTYuOCwwbDQzLjUyLTExMy4xNGE5LDksMCwwLDEsNS4xNy01LjE3TDM3OC4yMywzMjguNGE5LDksMCwwLDAsMC0xNi44TDI2NS4wOSwyNjguMDhBOSw5LDAsMCwxLDI1OS45MiwyNjIuOTFaIiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KDTxwb2x5Z29uIHBvaW50cz0iMTA4IDY4IDg4IDE2IDY4IDY4IDE2IDg4IDY4IDEwOCA4OCAxNjAgMTA4IDEwOCAxNjAgODggMTA4IDY4IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KDTxwb2x5Z29uIHBvaW50cz0iNDI2LjY3IDExNy4zMyA0MDAgNDggMzczLjMzIDExNy4zMyAzMDQgMTQ0IDM3My4zMyAxNzAuNjcgNDAwIDI0MCA0MjYuNjcgMTcwLjY3IDQ5NiAxNDQgNDI2LjY3IDExNy4zMyIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMTkuOTY4IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6ICMxODFhMWI7Ii8+Cg08L2c+Cg08L3N2Zz4=";
+Editor.sendImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik0xMjAtMTYwdi02NDBsNzYwIDMyMC03NjAgMzIwWm04MC0xMjAgNDc0LTIwMC00NzQtMjAwdjE0MGwyNDAgNjAtMjQwIDYwdjE0MFptMCAwdi00MDAgNDAwWiIvPjwvc3ZnPg==";Editor.sparklesImage="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjU5LjkyLDI2Mi45MSwyMTYuNCwxNDkuNzdhOSw5LDAsMCwwLTE2LjgsMEwxNTYuMDgsMjYyLjkxYTksOSwwLDAsMS01LjE3LDUuMTdMMzcuNzcsMzExLjZhOSw5LDAsMCwwLDAsMTYuOGwxMTMuMTQsNDMuNTJhOSw5LDAsMCwxLDUuMTcsNS4xN0wxOTkuNiw0OTAuMjNhOSw5LDAsMCwwLDE2LjgsMGw0My41Mi0xMTMuMTRhOSw5LDAsMCwxLDUuMTctNS4xN0wzNzguMjMsMzI4LjRhOSw5LDAsMCwwLDAtMTYuOEwyNjUuMDksMjY4LjA4QTksOSwwLDAsMSwyNTkuOTIsMjYyLjkxWiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iNDAiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KPHBvbHlnb24gcG9pbnRzPSIxMDggNjggODggMTYgNjggNjggMTYgODggNjggMTA4IDg4IDE2MCAxMDggMTA4IDE2MCA4OCAxMDggNjgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzAwMDAwMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjMwIi8+Cjxwb2x5Z29uIHBvaW50cz0iNDI2LjY3IDExNy4zMyA0MDAgNDggMzczLjMzIDExNy4zMyAzMDQgMTQ0IDM3My4zMyAxNzAuNjcgNDAwIDI0MCA0MjYuNjcgMTcwLjY3IDQ5NiAxNDQgNDI2LjY3IDExNy4zMyIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMzAiLz4KPC9zdmc+";
+Editor.thinSparklesImage="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjU5LjkyLDI2Mi45MSwyMTYuNCwxNDkuNzdhOSw5LDAsMCwwLTE2LjgsMEwxNTYuMDgsMjYyLjkxYTksOSwwLDAsMS01LjE3LDUuMTdMMzcuNzcsMzExLjZhOSw5LDAsMCwwLDAsMTYuOGwxMTMuMTQsNDMuNTJhOSw5LDAsMCwxLDUuMTcsNS4xN0wxOTkuNiw0OTAuMjNhOSw5LDAsMCwwLDE2LjgsMGw0My41Mi0xMTMuMTRhOSw5LDAsMCwxLDUuMTctNS4xN0wzNzguMjMsMzI4LjRhOSw5LDAsMCwwLDAtMTYuOEwyNjUuMDksMjY4LjA4QTksOSwwLDAsMSwyNTkuOTIsMjYyLjkxWiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMTkuOTY4IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6ICMxODFhMWI7Ii8+Cjxwb2x5Z29uIHBvaW50cz0iMTA4IDY4IDg4IDE2IDY4IDY4IDE2IDg4IDY4IDEwOCA4OCAxNjAgMTA4IDEwOCAxNjAgODggMTA4IDY4IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiLz4KPHBvbHlnb24gcG9pbnRzPSI0MjYuNjcgMTE3LjMzIDQwMCA0OCAzNzMuMzMgMTE3LjMzIDMwNCAxNDQgMzczLjMzIDE3MC42NyA0MDAgMjQwIDQyNi42NyAxNzAuNjcgNDk2IDE0NCA0MjYuNjcgMTE3LjMzIiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiLz4KPC9zdmc+";
Editor.arrowRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDAwLTI4MHYtNDAwbDIwMCAyMDAtMjAwIDIwMFoiLz48L3N2Zz4=";Editor.arrowDownImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTM2MCAyODAtNTYwaDQwMEw0ODAtMzYwWiIvPjwvc3ZnPg==";
Editor.arrowUpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJtMjgwLTQwMCAyMDAtMjAwIDIwMCAyMDBIMjgwWiIvPjwvc3ZnPg==";Editor.refreshImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTE2MHEtMTM0IDAtMjI3LTkzdC05My0yMjdxMC0xMzQgOTMtMjI3dDIyNy05M3E2OSAwIDEzMiAyOC41VDcyMC02OTB2LTExMGg4MHYyODBINTIwdi04MGgxNjhxLTMyLTU2LTg3LjUtODhUNDgwLTcyMHEtMTAwIDAtMTcwIDcwdC03MCAxNzBxMCAxMDAgNzAgMTcwdDE3MCA3MHE3NyAwIDEzOS00NHQ4Ny0xMTZoODRxLTI4IDEwNi0xMTQgMTczdC0xOTYgNjdaIi8+PC9zdmc+";
Editor.checkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzgyLTI0MCAxNTQtNDY4bDU3LTU3IDE3MSAxNzEgMzY3LTM2NyA1NyA1Ny00MjQgNDI0WiIvPjwvc3ZnPg==";Editor.dockRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoNTYwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2NTYwcTAgMzMtMjMuNSA1Ni41VDc2MC0xMjBIMjAwWm0xMjAtODB2LTU2MEgyMDB2NTYwaDEyMFptODAgMGgzNjB2LTU2MEg0MDB2NTYwWm0tODAgMEgyMDBoMTIwWiIvPjwvc3ZnPg==";
@@ -1994,11 +1996,12 @@ Editor.removeRowImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy5
Editor.checkmarkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjJweCIgaGVpZ2h0PSIxOHB4IiB2ZXJzaW9uPSIxLjEiPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDQgMCkiIGQ9Ik03LjE4MSwxNS4wMDdhMSwxLDAsMCwxLS43OTMtMC4zOTFMMy4yMjIsMTAuNUExLDEsMCwxLDEsNC44MDgsOS4yNzRMNy4xMzIsMTIuM2w2LjA0NC04Ljg2QTEsMSwwLDEsMSwxNC44Myw0LjU2OWwtNi44MjMsMTBhMSwxLDAsMCwxLS44LjQzN0g3LjE4MVoiIGZpbGw9IiMwMDAwMDAiLz48L3N2Zz4=";
Editor.swapImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzIwLTQ0MHYtMjg3TDIxNy02MjRsLTU3LTU2IDIwMC0yMDAgMjAwIDIwMC01NyA1Ni0xMDMtMTAzdjI4N2gtODBaTTYwMC04MCA0MDAtMjgwbDU3LTU2IDEwMyAxMDN2LTI4N2g4MHYyODdsMTAzLTEwMyA1NyA1Nkw2MDAtODBaIi8+PC9zdmc+";Editor.copyImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNzYwLTIwMEgzMjBxLTMzIDAtNTYuNS0yMy41VDI0MC0yODB2LTU2MHEwLTMzIDIzLjUtNTYuNVQzMjAtOTIwaDI4MGwyNDAgMjQwdjQwMHEwIDMzLTIzLjUgNTYuNVQ3NjAtMjAwWk01NjAtNjQwdi0yMDBIMzIwdjU2MGg0NDB2LTM2MEg1NjBaTTE2MC00MHEtMzMgMC01Ni41LTIzLjVUODAtMTIwdi01NjBoODB2NTYwaDQ0MHY4MEgxNjBabTE2MC04MDB2MjAwLTIwMCA1NjAtNTYwWiIvPjwvc3ZnPg==";
Editor.doubleArrowUpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJtMjk2LTIyNC01Ni01NiAyNDAtMjQwIDI0MCAyNDAtNTYgNTYtMTg0LTE4My0xODQgMTgzWm0wLTI0MC01Ni01NiAyNDAtMjQwIDI0MCAyNDAtNTYgNTYtMTg0LTE4My0xODQgMTgzWiIvPjwvc3ZnPg==";Editor.doubleArrowDownImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTIwMCAyNDAtNDQwbDU2LTU2IDE4NCAxODMgMTg0LTE4MyA1NiA1Ni0yNDAgMjQwWm0wLTI0MEwyNDAtNjgwbDU2LTU2IDE4NCAxODMgMTg0LTE4MyA1NiA1Ni0yNDAgMjQwWiIvPjwvc3ZnPg==";
-Editor.opacityImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMWYxZjFmIj48cGF0aCBkPSJNNDgwLTEyMHEtMTMzIDAtMjI2LjUtOTJUMTYwLTQzNnEwLTY1IDI1LTEyMS41VDI1NC02NThsMjI2LTIyMiAyMjYgMjIycTQ0IDQ0IDY5IDEwMC41VDgwMC00MzZxMCAxMzItOTMuNSAyMjRUNDgwLTEyMFpNMjQyLTQwMGg0NzRxMTItNzItMTMuNS0xMjNUNjUwLTYwMEw0ODAtNzY4IDMxMC02MDBxLTI3IDI2LTUzIDc3dC0xNSAxMjNaIi8+PC9zdmc+";
+Editor.opacityImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMWYxZjFmIj48cGF0aCBkPSJNNDgwLTEyMHEtMTMzIDAtMjI2LjUtOTJUMTYwLTQzNnEwLTY1IDI1LTEyMS41VDI1NC02NThsMjI2LTIyMiAyMjYgMjIycTQ0IDQ0IDY5IDEwMC41VDgwMC00MzZxMCAxMzItOTMuNSAyMjRUNDgwLTEyMFpNMjQyLTQwMGg0NzRxMTItNzItMTMuNS0xMjNUNjUwLTYwMEw0ODAtNzY4IDMxMC02MDBxLTI3IDI2LTUzIDc3dC0xNSAxMjNaIi8+PC9zdmc+";Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMWYxZjFmIj48cGF0aCBkPSJNMjQwLTgwcS0zMyAwLTU2LjUtMjMuNVQxNjAtMTYwdi00MDBxMC0zMyAyMy41LTU2LjVUMjQwLTY0MGgxMjB2ODBIMjQwdjQwMGg0ODB2LTQwMEg2MDB2LTgwaDEyMHEzMyAwIDU2LjUgMjMuNVQ4MDAtNTYwdjQwMHEwIDMzLTIzLjUgNTYuNVQ3MjAtODBIMjQwWm0yMDAtMjQwdi00NDdsLTY0IDY0LTU2LTU3IDE2MC0xNjAgMTYwIDE2MC01NiA1Ny02NC02NHY0NDdoLTgwWiIvPjwvc3ZnPg==";
Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];
Editor.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=[];Editor.ctrlKey=mxClient.IS_MAC?"⌘":"Ctrl";Editor.altKey=mxClient.IS_MAC?"⌥":"Alt";Editor.shiftKey=mxClient.IS_MAC?"⇧":"Shift";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;
Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;Editor.enableNativeClipboard=window==window.top&&null!=navigator.clipboard&&null!=navigator.clipboard.read;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#121212";Editor.darkColorVar="--ge-dark-color";Editor.fontSizeUnit="px";Editor.transitionDelay=.1;Editor.pageSizeUnit=mxConstants.INCHES;Editor.isDarkMode=function(){return Editor.darkMode};
Editor.isPngDataUrl=function(a){return null!=a&&"data:image/png;"==a.substring(0,15)};Editor.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};Editor.convertHtmlToText=function(a){if(null!=a){var b=document.createElement("div");b.innerHTML=Graph.sanitizeHtml(a);return mxUtils.extractTextWithWhitespace(b.childNodes)}return null};
+Editor.extractGraphModelFromText=function(a){function b(d){var h=d.indexOf("```");0<=h&&(d=d.substring(d,0,h+6));return d}function e(d){var h=d.lastIndexOf("```");0<=h&&(d=d.substring(h+3));return d}var f=a.indexOf("<mxGraphModel "),g=a.indexOf("</mxGraphModel>");0>f&&(f=a.indexOf("<mxGraphModel>"));return 0<=f&&g>f?[mxUtils.trim(b(a.substring(0,f))),a.substring(f,g+15),mxUtils.trim(e(a.substring(g+15)))]:[a,"",""]};
Editor.extractGraphModelFromPng=function(a){var b=null;try{var e=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(e):Base64.decode(e,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(g,d,h){g=f.substring(g+8,g+8+h);"zTXt"==d?(h=g.indexOf(String.fromCharCode(0)),"mxGraphModel"==g.substring(0,h)&&(g=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(h+2)),{to:"string"}).replace(/\+/g," "),null!=g&&0<g.length&&(b=g))):"tEXt"==d&&(g=g.split(String.fromCharCode(0)),1<g.length&&("mxGraphModel"==
g[0]||"mxfile"==g[0])&&(b=g[1]));if(null!=b||"IDAT"==d)return!0}))}catch(g){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};Editor.getLabelForStylename=function(a){var b=a.match(/^([A-Za-z]*)(\d*)$/);null!=b&&1<b.length&&(a=mxUtils.trim(b[1].replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,function(e){return e.toUpperCase()}).replace(/Color[s]?/g,"")),a=mxUtils.trim(a+(0<b[2].length?" ("+b[2]+")":"")));return a};
Editor.soundex=function(a){if(null==a||0==a.length)return"";var b=[],e=1;b[0]=a[0].toUpperCase();for(var f=1,g=a.length;f<g;f++){var d=a[f].toUpperCase().charCodeAt(0)-65;if(0<=d&&25>=d&&"0"!="01230120022455012603010202"[d]&&("01230120022455012603010202"[d]!=b[e-1]&&(b[e]="01230120022455012603010202"[d],e++),3<e))break}if(3>=e)for(;3>=e;)b[e]="0",e++;return b.join("")};
@@ -2037,8 +2040,8 @@ this.container.parentNode.removeChild(this.container)};
var ErrorDialog=function(a,b,e,f,g,d,h,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div");w.style.textAlign="center";if(null!=b){var y=document.createElement("div");y.style.padding="0px";y.style.margin="0px";y.style.fontSize="18px";y.style.paddingBottom="16px";y.style.marginBottom="10px";y.style.borderBottom="1px solid #c0c0c0";y.style.color="gray";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.overflow="hidden";mxUtils.write(y,b);y.setAttribute("title",b);w.appendChild(y)}b=
document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"<br/>"));b.innerHTML=Graph.sanitizeHtml(e);w.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=u&&u()}),k.className="geBtn",e.appendChild(k));
var A=mxUtils.button(f,function(){p&&a.hideDialog();null!=g&&g()});A.className="geBtn";e.appendChild(A);null!=h&&(f=mxUtils.button(h,function(){p&&a.hideDialog();null!=m&&m()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){A.focus()};w.appendChild(e);this.container=w},PrintDialog=function(a,b,e,f){this.create(a,b,e,f)};
-PrintDialog.prototype.create=function(a){function b(A){var D=h.checked||k.checked,E=parseInt(w.value)/100;isNaN(E)&&(E=1,w.value="100%");mxClient.IS_SF&&(E*=.75);var F=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/e.pageScale;if(D){var M=h.checked?1:parseInt(u.value);isNaN(M)||(H=mxUtils.getScaleForPageCount(M,e,F))}var N=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*E);F.height=Math.ceil(F.height*E);H*=E;!D&&e.pageVisible?(E=e.getPageLayout(),M-=E.x*F.width,N-=E.y*F.height):
-D=!0;D=PrintDialog.createPrintPreview(e,H,F,0,M,N,D);D.open();A&&PrintDialog.printPreview(D)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var h=document.createElement("input");h.setAttribute("type","checkbox");var m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(h);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));
+PrintDialog.prototype.create=function(a){function b(A){var E=h.checked||k.checked,D=parseInt(w.value)/100;isNaN(D)&&(D=1,w.value="100%");mxClient.IS_SF&&(D*=.75);var F=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/e.pageScale;if(E){var M=h.checked?1:parseInt(u.value);isNaN(M)||(H=mxUtils.getScaleForPageCount(M,e,F))}var N=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*D);F.height=Math.ceil(F.height*D);H*=D;!E&&e.pageVisible?(D=e.getPageLayout(),M-=D.x*F.width,N-=D.y*F.height):
+E=!0;E=PrintDialog.createPrintPreview(e,H,F,0,M,N,E);E.open();A&&PrintDialog.printPreview(E)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var h=document.createElement("input");h.setAttribute("type","checkbox");var m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(h);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));
m.appendChild(p);mxEvent.addListener(p,"click",function(A){h.checked=!h.checked;k.checked=!h.checked;mxEvent.consume(A)});mxEvent.addListener(h,"change",function(){k.checked=!h.checked});d.appendChild(m);g.appendChild(d);d=d.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(k);p=document.createElement("span");mxUtils.write(p," "+mxResources.get("posterPrint")+":");m.appendChild(p);mxEvent.addListener(p,
"click",function(A){k.checked=!k.checked;h.checked=!k.checked;mxEvent.consume(A)});d.appendChild(m);var u=document.createElement("input");u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.setAttribute("size","4");u.setAttribute("disabled","disabled");u.style.width="50px";m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(u);mxUtils.write(m," "+mxResources.get("pages")+" (max)");d.appendChild(m);g.appendChild(d);mxEvent.addListener(k,"change",
function(){k.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled");h.checked=!k.checked});d=d.cloneNode(!1);m=document.createElement("td");mxUtils.write(m,mxResources.get("pageScale")+":");d.appendChild(m);m=document.createElement("td");var w=document.createElement("input");w.setAttribute("value","100 %");w.setAttribute("size","5");w.style.width="50px";m.appendChild(w);d.appendChild(m);g.appendChild(d);d=document.createElement("tr");m=document.createElement("td");m.colSpan=2;
@@ -2046,18 +2049,18 @@ m.style.paddingTop="20px";m.setAttribute("align","right");p=mxUtils.button(mxRes
m.appendChild(p);d.appendChild(m);g.appendChild(d);f.appendChild(g);this.container=f};PrintDialog.printPreview=function(a){try{null!=a.wnd&&window.setTimeout(function(){a.wnd.focus();a.wnd.print();a.wnd.close()},500)}catch(b){}};
PrintDialog.createPrintPreview=function(a,b,e,f,g,d,h){b=new mxPrintPreview(a,b,e,f,g,d);b.title=mxResources.get("preview");b.addPageCss=!mxClient.IS_SF;b.printBackgroundImage=!0;b.autoOrigin=h;h=a.background;if(null==h||""==h||h==mxConstants.NONE)h="#ffffff";b.backgroundColor=h;var m=b.isTextLabel;b.isTextLabel=function(k){return"geHint"==!k.className&&m.apply(this,arguments)};var p=b.getLinkForCellState;b.getLinkForCellState=function(k){return a.getAbsoluteUrl(p.apply(this,arguments))};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){var E=w;null!=E&&null!=E.originalSrc&&(E=a.createImageForPageLink(E.originalSrc,null));null!=E&&null!=E.src?(u.style.backgroundImage="url("+E.src+")",u.style.display="inline-block"):(u.style.backgroundImage="",u.style.display="none");u.style.backgroundColor="";null!=y&&y!=mxConstants.NONE&&(u.style.backgroundColor=y,u.style.display="inline-block")}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");
+var PageSetupDialog=function(a){function b(){var D=w;null!=D&&null!=D.originalSrc&&(D=a.createImageForPageLink(D.originalSrc,null));null!=D&&null!=D.src?(u.style.backgroundImage="url("+D.src+")",u.style.display="inline-block"):(u.style.backgroundImage="",u.style.display="none");u.style.backgroundColor="";null!=y&&y!=mxConstants.NONE&&(u.style.backgroundColor=y,u.style.display="inline-block")}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");
var d=document.createElement("tr");var h=document.createElement("td");h.style.verticalAlign="top";h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("paperSize")+":");d.appendChild(h);h=document.createElement("td");h.style.verticalAlign="top";h.style.fontSize="10pt";var m=PageSetupDialog.addPageFormatPanel(h,"pagesetupdialog",e.pageFormat);d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");mxUtils.write(h,mxResources.get("gridSize")+":");d.appendChild(h);
-h=document.createElement("td");h.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=e.getGridSize();h.appendChild(p);mxEvent.addListener(p,"change",function(){var E=parseInt(p.value);p.value=Math.max(1,isNaN(E)?e.getGridSize():E)});d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");mxUtils.write(h,mxResources.get("background")+":");
+h=document.createElement("td");h.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=e.getGridSize();h.appendChild(p);mxEvent.addListener(p,"change",function(){var D=parseInt(p.value);p.value=Math.max(1,isNaN(D)?e.getGridSize():D)});d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");mxUtils.write(h,mxResources.get("background")+":");
d.appendChild(h);h=document.createElement("td");var k=document.createElement("button");k.className="geBtn";k.style.margin="0px";mxUtils.write(k,mxResources.get("change")+"...");var u=document.createElement("div");u.style.display="inline-block";u.style.verticalAlign="middle";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";u.style.backgroundSize="contain";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.height="32px";
-u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var w=e.backgroundImage,y=e.background,A=e.shadowVisible,D=function(E){a.showBackgroundImageDialog(function(F,H,M,N){H||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),w=F,A=N);y=M;b()},w,y,!0);mxEvent.consume(E)};mxEvent.addListener(k,"click",D);mxEvent.addListener(u,"click",D);b();h.appendChild(u);h.appendChild(k);d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");
-h.colSpan=2;h.style.paddingTop="16px";h.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&h.appendChild(k);D=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var E=parseInt(p.value);isNaN(E)||e.gridSize===E||e.setGridSize(E);E=new ChangePageSetup(a,y,w,m.get());E.ignoreColor=e.background==y;E.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=w?w.src:null);null!=A&&
-(E.shadowVisible=A);e.pageFormat.width==E.previousFormat.width&&e.pageFormat.height==E.previousFormat.height&&E.ignoreColor&&E.ignoreImage&&E.shadowVisible==e.shadowVisible||e.model.execute(E)});D.className="geBtn gePrimaryBtn";h.appendChild(D);a.editor.cancelFirst||h.appendChild(k);d.appendChild(h);g.appendChild(d);f.appendChild(g);this.container=f};
+u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var w=e.backgroundImage,y=e.background,A=e.shadowVisible,E=function(D){a.showBackgroundImageDialog(function(F,H,M,N){H||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),w=F,A=N);y=M;b()},w,y,!0);mxEvent.consume(D)};mxEvent.addListener(k,"click",E);mxEvent.addListener(u,"click",E);b();h.appendChild(u);h.appendChild(k);d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");
+h.colSpan=2;h.style.paddingTop="16px";h.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&h.appendChild(k);E=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(p.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,y,w,m.get());D.ignoreColor=e.background==y;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=w?w.src:null);null!=A&&
+(D.shadowVisible=A);e.pageFormat.width==D.previousFormat.width&&e.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage&&D.shadowVisible==e.shadowVisible||e.model.execute(D)});E.className="geBtn gePrimaryBtn";h.appendChild(E);a.editor.cancelFirst||h.appendChild(k);d.appendChild(h);g.appendChild(d);f.appendChild(g);this.container=f};
PageSetupDialog.addPageFormatPanel=function(a,b,e,f){b="format-"+b;var g=document.createElement("input");g.setAttribute("name",b);g.setAttribute("type","radio");g.setAttribute("value","portrait");var d=document.createElement("input");d.setAttribute("name",b);d.setAttribute("type","radio");d.setAttribute("value","landscape");var h=document.createElement("select");h.style.position="relative";h.style.marginBottom="4px";h.style.borderRadius="4px";h.style.borderWidth="1px";h.style.borderStyle="solid";
h.style.boxSizing="border-box";h.style.padding="2px";h.style.width="210px";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";g.style.marginRight="6px";m.appendChild(g);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));m.appendChild(b);d.style.marginLeft="10px";d.style.marginRight="6px";m.appendChild(d);var p=document.createElement("span");p.style.width="100px";mxUtils.write(p,
mxResources.get("landscape"));m.appendChild(p);var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.marginLeft="4px";k.style.fontSize="12px";k.style.width="210px";k.style.height="24px";var u=document.createElement("input");u.setAttribute("size","7");u.setAttribute("title",mxResources.get("width"));u.style.textAlign="right";k.appendChild(u);mxUtils.write(k," x ");var w=document.createElement("input");w.setAttribute("size","7");w.setAttribute("title",mxResources.get("height"));w.style.textAlign=
-"right";k.appendChild(w);var y=document.createElement("select");y.style.marginLeft="4px";y.style.maxWidth="78px";y.style.width="78px";for(var A=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],D=0;D<A.length;D++){var E=document.createElement("option");E.setAttribute("value",A[D].unit);mxUtils.write(E,A[D].label);y.appendChild(E)}y.value=Editor.pageSizeUnit;k.appendChild(y);
-m.style.display="none";k.style.display="none";var F={},H=PageSetupDialog.getFormats();for(D=0;D<H.length;D++)A=H[D],F[A.key]=A,E=document.createElement("option"),E.setAttribute("value",A.key),mxUtils.write(E,A.title),h.appendChild(E);var M=function(){h.value="custom";for(var J=0;J<H.length;J++){var V=H[J];null!=V.format&&("a4"==V.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==V.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),
+"right";k.appendChild(w);var y=document.createElement("select");y.style.marginLeft="4px";y.style.maxWidth="78px";y.style.width="78px";for(var A=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],E=0;E<A.length;E++){var D=document.createElement("option");D.setAttribute("value",A[E].unit);mxUtils.write(D,A[E].label);y.appendChild(D)}y.value=Editor.pageSizeUnit;k.appendChild(y);
+m.style.display="none";k.style.display="none";var F={},H=PageSetupDialog.getFormats();for(E=0;E<H.length;E++)A=H[E],F[A.key]=A,D=document.createElement("option"),D.setAttribute("value",A.key),mxUtils.write(D,A.title),h.appendChild(D);var M=function(){h.value="custom";for(var J=0;J<H.length;J++){var V=H[J];null!=V.format&&("a4"==V.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==V.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),
e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==V.format.width&&e.height==V.format.height?(h.value=V.key,g.setAttribute("checked","checked"),g.defaultChecked=!0,g.checked=!0,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,detected=!0):e.width==V.format.height&&e.height==V.format.width&&(h.value=V.key,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,d.setAttribute("checked","checked"),d.defaultChecked=!0,detected=d.checked=!0))}"custom"==
h.value?(u.value=Editor.toUnit(e.width,y.value),w.value=Editor.toUnit(e.height,y.value),g.setAttribute("checked","checked"),h.value="custom",m.style.display="none",k.style.display=""):(m.style.display="",k.style.display="none")};M();a.appendChild(h);mxUtils.br(a);a.appendChild(m);a.appendChild(k);var N=function(J,V){J=F[h.value];null!=J.format?(u.value=Editor.toUnit(d.checked?J.format.height:J.format.width,y.value),w.value=Editor.toUnit(d.checked?J.format.width:J.format.height,y.value),k.style.display=
"none",m.style.display=""):(m.style.display="none",k.style.display="");J=parseFloat(u.value);if(isNaN(J)||0>=J)u.value=Editor.toUnit(e.width,y.value);J=parseFloat(w.value);if(isNaN(J)||0>=J)w.value=Editor.toUnit(e.height,y.value);J=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(u.value),y.value)),Math.floor(Editor.fromUnit(parseFloat(w.value),y.value)));V||J.width==e.width&&J.height==e.height||(e=J,null!=f&&f(e))};mxEvent.addListener(b,"click",function(J){g.checked=!0;N(J);mxEvent.consume(J)});
@@ -2066,28 +2069,28 @@ Editor.pageSizeUnit),y.value);Editor.pageSizeUnit=y.value;N(J,!0);mxEvent.consum
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,b,e,f,g,d,h,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div"),y=document.createElement("div");y.style.width="100%";y.style.display="grid";y.style.gap="5px 8px";y.style.gridAutoColumns="auto 1fr";y.style.boxSizing="border-box";y.style.padding="3px";var A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.justifyContent="flex-end";A.style.minWidth="0";var D=document.createElement("div");D.style.display="inline-block";
-D.style.textOverflow="ellipsis";D.style.whiteSpace="nowrap";D.style.overflow="hidden";D.style.fontSize="10pt";D.style.padding="2px 0";D.setAttribute("title",g||mxResources.get("filename"));mxUtils.write(D,(g||mxResources.get("filename"))+":");A.appendChild(D);y.appendChild(A);var E=document.createElement("input");E.setAttribute("value",b||"");E.style.flexGrow="1";var F=mxUtils.button(e,function(){if(null==d||d(E.value))p&&a.hideDialog(),f(E.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
-g||null==h)if(null!=u?Editor.selectFilename(E):(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=y.parentNode;if(null!=H){var M=null;mxEvent.addListener(H,"dragleave",function(N){null!=M&&(M.style.backgroundColor="",M=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(N){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=E,M.style.backgroundColor=
-"#ebf2f9");N.stopPropagation();N.preventDefault()}));mxEvent.addListener(H,"drop",mxUtils.bind(this,function(N){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")&&(E.value=decodeURIComponent(N.dataTransfer.getData("text/uri-list")),F.click());N.stopPropagation();N.preventDefault()}))}}};A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.gap="4px";A.style.whiteSpace="nowrap";A.appendChild(E);y.appendChild(A);
-null==g&&null!=h||null==u||null==a.editor.diagramFileTypes||(A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.textOverflow="ellipsis",A.style.justifyContent="flex-end",A.style.fontSize="10pt",mxUtils.write(A,mxResources.get("type")+":"),y.appendChild(A),A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.whiteSpace="nowrap",y.appendChild(A),b=FilenameDialog.createFileTypes(a,E,a.editor.diagramFileTypes),
+var FilenameDialog=function(a,b,e,f,g,d,h,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div"),y=document.createElement("div");y.style.width="100%";y.style.display="grid";y.style.gap="5px 8px";y.style.gridAutoColumns="auto 1fr";y.style.boxSizing="border-box";y.style.padding="3px";var A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.justifyContent="flex-end";A.style.minWidth="0";var E=document.createElement("div");E.style.display="inline-block";
+E.style.textOverflow="ellipsis";E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.fontSize="10pt";E.style.padding="2px 0";E.setAttribute("title",g||mxResources.get("filename"));mxUtils.write(E,(g||mxResources.get("filename"))+":");A.appendChild(E);y.appendChild(A);var D=document.createElement("input");D.setAttribute("value",b||"");D.style.flexGrow="1";var F=mxUtils.button(e,function(){if(null==d||d(D.value))p&&a.hideDialog(),f(D.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
+g||null==h)if(null!=u?Editor.selectFilename(D):(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=y.parentNode;if(null!=H){var M=null;mxEvent.addListener(H,"dragleave",function(N){null!=M&&(M.style.backgroundColor="",M=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(N){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=D,M.style.backgroundColor=
+"#ebf2f9");N.stopPropagation();N.preventDefault()}));mxEvent.addListener(H,"drop",mxUtils.bind(this,function(N){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(N.dataTransfer.getData("text/uri-list")),F.click());N.stopPropagation();N.preventDefault()}))}}};A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.gap="4px";A.style.whiteSpace="nowrap";A.appendChild(D);y.appendChild(A);
+null==g&&null!=h||null==u||null==a.editor.diagramFileTypes||(A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.textOverflow="ellipsis",A.style.justifyContent="flex-end",A.style.fontSize="10pt",mxUtils.write(A,mxResources.get("type")+":"),y.appendChild(A),A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.whiteSpace="nowrap",y.appendChild(A),b=FilenameDialog.createFileTypes(a,D,a.editor.diagramFileTypes),
b.style.width="100%",A.appendChild(b));null!=h&&y.appendChild(h);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=u?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");A=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=k&&k()});A.className="geBtn";null==m||a.isOffline()||row.appendChild(a.createHelpIcon(m));
-a.editor.cancelFirst&&row.appendChild(A);mxEvent.addListener(E,"keypress",function(H){13==H.keyCode&&F.click()});row.appendChild(F);a.editor.cancelFirst||row.appendChild(A);y.appendChild(row);w.appendChild(y);this.container=w};FilenameDialog.filenameHelpLink=null;
+a.editor.cancelFirst&&row.appendChild(A);mxEvent.addListener(D,"keypress",function(H){13==H.keyCode&&F.click()});row.appendChild(F);a.editor.cancelFirst||row.appendChild(A);y.appendChild(row);w.appendChild(y);this.container=w};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createFileTypes=function(a,b,e){var f=document.createElement("select");for(a=0;a<e.length;a++){var g=document.createElement("option");g.setAttribute("value",a);mxUtils.write(g,mxResources.get(e[a].description)+" (."+e[a].extension+")");f.appendChild(g)}mxEvent.addListener(f,"change",function(d){d=e[f.value].extension;var h=b.value.lastIndexOf(".drawio.");h=0<h?h:b.value.lastIndexOf(".");"drawio"!=d&&(d="drawio."+d);b.value=0<h?b.value.substring(0,h+1)+d:b.value+"."+d;"createEvent"in
document?(d=document.createEvent("HTMLEvents"),d.initEvent("change",!1,!0),b.dispatchEvent(d)):b.fireEvent("onchange")});a=function(d){d=b.value.toLowerCase();for(var h=0,m=0;m<e.length;m++){var p=e[m].extension,k=null;"drawio"!=p&&(k=p,p=".drawio."+p);if(d.substring(d.length-p.length-1)=="."+p||null!=k&&d.substring(d.length-k.length-1)=="."+k){h=m;break}}f.value=h};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return f};
var WrapperWindow=function(a,b,e,f,g,d,h,m){m=null!=m?m:document.createElement("div");this.window=new mxWindow(b,m,e,f,g,d,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);a.installResizeHandler(this,!0);h(m)};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var h=this.graph;if(null!=h.container&&!h.transparentBackground){if(h.pageVisible){var m=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var p=h.container.firstChild;null!=p&&p.nodeType!=mxConstants.NODETYPE_ELEMENT;)p=p.nextSibling;null!=p&&(this.backgroundPageShape=this.createBackgroundPageShape(m),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(h.container),p.style.position="absolute",h.container.insertBefore(this.backgroundPageShape.node,p),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(k){h.dblClick(k)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(k){h.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){null!=
h.tooltipHandler&&h.tooltipHandler.isHideOnHover()&&h.tooltipHandler.hide();h.isMouseDown&&!mxEvent.isConsumed(k)&&h.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){h.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(k))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=m,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(h,m,p){var k=this.graph;h=null!=h?h:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,w=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,y=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",A="none",D="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){D=
-10;mxClient.IS_SVG?(A=unescape(encodeURIComponent(this.createSvgGrid(y,h))),A=window.btoa?btoa(A):Base64.encode(A,!0),A="url(data:image/svg+xml;base64,"+A+")",D=k.gridSize*this.scale*this.gridSteps*h):A="url("+this.gridImage+")";var E=y=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var F=k.gridSize*this.scale*this.gridSteps,H=m%F;F=p%F;null!=k.view.backgroundPageShape&&(E=this.getBackgroundPageBounds(),y=1+E.x,E=1+E.y);D=-Math.round(D-mxUtils.mod(this.translate.x*
-this.scale-y+m,D)+H*h)+"px "+-Math.round(D-mxUtils.mod(this.translate.y*this.scale-E+p,D)+F*h)+"px"}h=k.view.canvas;null!=h.ownerSVGElement&&(h=h.ownerSVGElement);y=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=D,k.view.backgroundPageShape.node.style.backgroundImage=A,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=w,k.view.backgroundPageShape.node.style.colorScheme=
-"none"==k.getAdaptiveColors()?"light":"",h.style.backgroundImage="none",h.style.backgroundColor="",k.container.style.backgroundColor=y?k.diagramBackgroundColor:""):(h.style.backgroundPosition=D,h.style.backgroundImage=A,"1"==urlParams.transparent?k.container.style.background="transparent":!y||null!=k.background&&k.background!=mxConstants.NONE?h.style.backgroundColor=u:(h.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(h,
+mxGraphView.prototype.validateBackgroundStyles=function(h,m,p){var k=this.graph;h=null!=h?h:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,w=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,y=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",A="none",E="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){E=
+10;mxClient.IS_SVG?(A=unescape(encodeURIComponent(this.createSvgGrid(y,h))),A=window.btoa?btoa(A):Base64.encode(A,!0),A="url(data:image/svg+xml;base64,"+A+")",E=k.gridSize*this.scale*this.gridSteps*h):A="url("+this.gridImage+")";var D=y=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var F=k.gridSize*this.scale*this.gridSteps,H=m%F;F=p%F;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),y=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*
+this.scale-y+m,E)+H*h)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale-D+p,E)+F*h)+"px"}h=k.view.canvas;null!=h.ownerSVGElement&&(h=h.ownerSVGElement);y=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=A,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=w,k.view.backgroundPageShape.node.style.colorScheme=
+"none"==k.getAdaptiveColors()?"light":"",h.style.backgroundImage="none",h.style.backgroundColor="",k.container.style.backgroundColor=y?k.diagramBackgroundColor:""):(h.style.backgroundPosition=E,h.style.backgroundImage=A,"1"==urlParams.transparent?k.container.style.background="transparent":!y||null!=k.background&&k.background!=mxConstants.NONE?h.style.backgroundColor=u:(h.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(h,
m){for(var p=this.graph.gridSize*this.scale*(null!=m?m:1);p<this.minGridSize;)p*=2;m=this.gridSteps*p;for(var k=[],u=1;u<this.gridSteps;u++){var w=u*p;k.push("M 0 "+w+" L "+m+" "+w+" M "+w+" 0 L "+w+" "+m)}h=mxUtils.getLightDarkColor(h);p="color-scheme: light dark;";mxClient.IS_SF&&(p="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+p+'" width="'+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(h.cssText)+';" stroke="'+h.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(h.cssText)+';" stroke="'+h.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,m){a.apply(this,arguments);
if(null!=this.shiftPreview1){var p=this.view.canvas;null!=p.ownerSVGElement&&(p=p.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+h,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";p.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(h,m,p){var k=this.view.scale,u=this.view.translate,w=this.pageFormat,y=k*this.pageScale,A=this.view.getBackgroundPageBounds();
-m=A.width;p=A.height;var D=new mxRectangle(k*u.x,k*u.y,w.width*y,w.height*y),E=(h=h&&Math.min(D.width,D.height)>this.minPageBreakDist)?Math.ceil(p/D.height)-1:0,F=h?Math.ceil(m/D.width)-1:0,H=A.x+m,M=A.y+p;null==this.horizontalPageBreaks&&0<E&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);h=mxUtils.bind(this,function(N){if(null!=N){for(var J=N==this.horizontalPageBreaks?E:F,V=0;V<=J;V++){var W=N==this.horizontalPageBreaks?[new mxPoint(Math.round(A.x),
-Math.round(A.y+(V+1)*D.height)),new mxPoint(Math.round(H),Math.round(A.y+(V+1)*D.height))]:[new mxPoint(Math.round(A.x+(V+1)*D.width),Math.round(A.y)),new mxPoint(Math.round(A.x+(V+1)*D.width),Math.round(M))];null!=N[V]?(N[V].points=W,N[V].redraw()):(W=new mxPolyline(W,this.pageBreakColor),W.dialect=this.dialect,W.isDashed=this.pageBreakDashed,W.pointerEvents=!1,W.init(this.view.backgroundPane),W.redraw(),N[V]=W)}for(V=J;V<N.length;V++)null!=N[V]&&N[V].destroy();N.splice(J,N.length-J)}});h(this.horizontalPageBreaks);
+m=A.width;p=A.height;var E=new mxRectangle(k*u.x,k*u.y,w.width*y,w.height*y),D=(h=h&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,F=h?Math.ceil(m/E.width)-1:0,H=A.x+m,M=A.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);h=mxUtils.bind(this,function(N){if(null!=N){for(var J=N==this.horizontalPageBreaks?D:F,V=0;V<=J;V++){var W=N==this.horizontalPageBreaks?[new mxPoint(Math.round(A.x),
+Math.round(A.y+(V+1)*E.height)),new mxPoint(Math.round(H),Math.round(A.y+(V+1)*E.height))]:[new mxPoint(Math.round(A.x+(V+1)*E.width),Math.round(A.y)),new mxPoint(Math.round(A.x+(V+1)*E.width),Math.round(M))];null!=N[V]?(N[V].points=W,N[V].redraw()):(W=new mxPolyline(W,this.pageBreakColor),W.dialect=this.dialect,W.isDashed=this.pageBreakDashed,W.pointerEvents=!1,W.init(this.view.backgroundPane),W.redraw(),N[V]=W)}for(V=J;V<N.length;V++)null!=N[V]&&N[V].destroy();N.splice(J,N.length-J)}});h(this.horizontalPageBreaks);
h(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(h,m,p){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var h=
e.apply(this,arguments);h.intersects=mxUtils.bind(this,function(m,p){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(h,arguments)});return h};mxGraphView.prototype.createBackgroundPageShape=function(h){return new mxRectangleShape(h,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var h=this.getGraphBounds(),m=0<h.width?h.x/this.scale-this.translate.x:0,p=0<h.height?h.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,
u=this.graph.pageScale,w=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/w);var y=Math.floor(Math.min(0,p)/k);return new mxRectangle(this.scale*(this.translate.x+u*w),this.scale*(this.translate.y+y*k),this.scale*(Math.ceil(Math.max(1,m+h.width/this.scale)/w)-u)*w,this.scale*(Math.ceil(Math.max(1,p+h.height/this.scale)/k)-y)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,m){f.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
@@ -2104,10 +2107,10 @@ navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{Y=[parseInt(ba[1],10),p
(b=g.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=g.graphHandler){var u=g.graphHandler.start;g.graphHandler.start=function(){null!=f.hoverIcons&&f.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(Y){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(Y)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(Y)-ba.y-this.diagramContainer.clientHeight?
this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(Y,ba){return f.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(Y){16==Y.which?this.shiftDown=!0:32!=Y.which||g.isEditing()?mxEvent.isConsumed(Y)||27!=Y.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),g.container.style.cursor="move",g.isEditing()||
mxEvent.getSource(Y)!=g.container||mxEvent.consume(Y))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(Y){g.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=g.panningHandler.isForcePanningEvent;g.panningHandler.isForcePanningEvent=function(Y){return y.apply(this,arguments)||f.isSpaceDown()||mxEvent.isMouseEvent(Y.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(Y.getEvent()))&&
-(!mxEvent.isControlDown(Y.getEvent())&&mxEvent.isRightMouseButton(Y.getEvent())||mxEvent.isMiddleMouseButton(Y.getEvent()))};var A=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(Y){return A.apply(this,arguments)||13==Y.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y)||mxClient.IS_SF&&mxEvent.isShiftDown(Y))};var D=g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return f.isSpaceDown()||D.apply(this,arguments)};var E=mxUtils.bind(this,
+(!mxEvent.isControlDown(Y.getEvent())&&mxEvent.isRightMouseButton(Y.getEvent())||mxEvent.isMiddleMouseButton(Y.getEvent()))};var A=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(Y){return A.apply(this,arguments)||13==Y.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y)||mxClient.IS_SF&&mxEvent.isShiftDown(Y))};var E=g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return f.isSpaceDown()||E.apply(this,arguments)};var D=mxUtils.bind(this,
function(){if(null!=this.toolbar)for(var Y=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ba=this.toolbar.container.firstChild;null!=ba;){var L=ba.getAttribute("data-min-width");null!=L&&parseInt(L)>Y?ba.style.display="none":ba.style.display="";ba=ba.nextSibling}}),F=!1,H=null,M=null,N=null,J=mxUtils.bind(this,function(){if(null!=this.toolbar&&F!=g.cellEditor.isContentEditing()){for(var Y=this.toolbar.container.firstChild,ba=[];null!=Y;){var L=Y.nextSibling;Y.parentNode.removeChild(Y);
-ba.push(Y);Y=L}Y=this.toolbar.fontMenu;L=this.toolbar.sizeMenu;if(null==N)this.toolbar.createTextToolbar();else{for(var U=0;U<N.length;U++)this.toolbar.container.appendChild(N[U]);this.toolbar.fontMenu=H;this.toolbar.sizeMenu=M}F=g.cellEditor.isContentEditing();H=Y;M=L;N=ba;E()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();J()}));this.addListener("currentThemeChanged",E);mxEvent.addListener(window,"resize",
-E);E();g.isTouchPopupMenuEnabled=function(){return null==f.dialog};var V=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){V.apply(this,arguments);J();if(g.cellEditor.isContentEditing()){var Y=!1,ba=function(){Y||(Y=!0,window.setTimeout(function(){var L=g.getSelectedEditingElement();null!=L&&(L=mxUtils.getCurrentStyle(L),null!=L&&null!=f.toolbar&&(f.toolbar.setFontName(mxUtils.getCssFontFamily(L.fontFamily)),f.toolbar.setFontSize(parseInt(L.fontSize))));Y=!1},0))};mxEvent.addListener(g.cellEditor.textarea,
+ba.push(Y);Y=L}Y=this.toolbar.fontMenu;L=this.toolbar.sizeMenu;if(null==N)this.toolbar.createTextToolbar();else{for(var U=0;U<N.length;U++)this.toolbar.container.appendChild(N[U]);this.toolbar.fontMenu=H;this.toolbar.sizeMenu=M}F=g.cellEditor.isContentEditing();H=Y;M=L;N=ba;D()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();J()}));this.addListener("currentThemeChanged",D);mxEvent.addListener(window,"resize",
+D);D();g.isTouchPopupMenuEnabled=function(){return null==f.dialog};var V=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){V.apply(this,arguments);J();if(g.cellEditor.isContentEditing()){var Y=!1,ba=function(){Y||(Y=!0,window.setTimeout(function(){var L=g.getSelectedEditingElement();null!=L&&(L=mxUtils.getCurrentStyle(L),null!=L&&null!=f.toolbar&&(f.toolbar.setFontName(mxUtils.getCssFontFamily(L.fontFamily)),f.toolbar.setFontSize(parseInt(L.fontSize))));Y=!1},0))};mxEvent.addListener(g.cellEditor.textarea,
"input",ba);mxEvent.addListener(g.cellEditor.textarea,"touchend",ba);mxEvent.addListener(g.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(g.cellEditor.textarea,"keyup",ba);ba()}};var W=g.cellEditor.stopEditing;g.cellEditor.stopEditing=function(Y,ba){try{W.apply(this,arguments),J()}catch(L){f.handleError(L)}};g.container.setAttribute("tabindex","0");g.container.style.cursor="default";if(window.self===window.top&&null!=g.container.parentNode)try{g.container.focus()}catch(Y){}var T=g.fireMouseEvent;
g.fireMouseEvent=function(Y,ba,L){try{Y==mxEvent.MOUSE_DOWN&&this.container.focus(),T.apply(this,arguments)}catch(U){f.handleError(U)}};var O=g.foldCells;g.foldCells=function(Y,ba,L,U,X){try{O.apply(this,arguments)}catch(ia){f.handleError(ia)}};g.popupMenuHandler.autoExpand=!0;null!=this.menus&&(g.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(Y,ba,L){this.menus.createPopupMenu(Y,ba,L)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(Y){g.popupMenuHandler.hideMenu()}));
this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};g.connectionHandler.addListener(mxEvent.CONNECT,function(Y,ba){var L=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(L.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=f.hoverIcons&&f.hoverIcons.update(g.view.getState(L[L.length-1]))},0));g.pasteCellStyles(L)});var fa=null,S=null;a=mxUtils.bind(this,function(){if(null!=this.toolbar){var Y=this.getSelectionState();g.isEnabled()&&
@@ -2127,7 +2130,7 @@ arguments);e.updateActionStates()};a.showLinkDialog=mxUtils.bind(e,e.showLinkDia
EditorUi.prototype.createSelectionState=function(){for(var a=this.editor.graph,b=a.getSelectionCells(),e=this.initSelectionState(),f=!0,g=0;g<b.length;g++){var d=a.getCurrentCellStyle(b[g]);"0"!=mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(e,b[g],b,f),f=!1)}this.updateSelectionStateForTableCells(e);if(Editor.enableCustomProperties){e.customProperties={};a=e.vertices;b=e.edges;for(g=0;g<a.length;g++)this.findCommonProperties(a[g],e.customProperties,0==g,e);
for(g=0;g<b.length;g++)this.findCommonProperties(b[g],e.customProperties,0==a.length&&0==g,e)}return e};
EditorUi.prototype.findCommonProperties=function(a,b,e,f){f=mxUtils.bind(this,function(k){if(null!=k)if(e)for(var u=0;u<k.length;u++)b[k[u].name]=k[u];else for(var w in b)if(null!=w){var y=!1;for(u=0;u<k.length;u++)if(k[u].name==w&&k[u].type==b[w].type){y=!0;break}y||delete b[w]}});var g=this.editor.graph,d=g.view.getState(a);if(null!=d&&null!=d.shape){if(!d.shape.commonCustomPropAdded){d.shape.commonCustomPropAdded=!0;d.shape.customProperties=d.shape.customProperties||[];if(null!=d.shape&&null!=
-d.shape.stencil&&null!=d.shape.stencil.desc){var h=d.shape.stencil,m=[],p=mxUtils.bind(this,function(k){k=h.desc.getElementsByTagName(k);for(var u=[],w=0;w<k.length;w++){var y=k[w].getAttribute("color");if(!mxUtils.isValidColor(y)&&!m[y]){m[y]=!0;var A=k[w].getAttribute("name");A=null!=A?A:Editor.getLabelForStylename(y);var D=k[w].getAttribute("default");D=null!=D?D:h.getDefaultColorValue(k[w],g);u.push({name:y,type:"color",primary:"false"!=k[w].getAttribute("primary"),defVal:D,defaultColor:D,undefinedColor:D,
+d.shape.stencil&&null!=d.shape.stencil.desc){var h=d.shape.stencil,m=[],p=mxUtils.bind(this,function(k){k=h.desc.getElementsByTagName(k);for(var u=[],w=0;w<k.length;w++){var y=k[w].getAttribute("color");if(!mxUtils.isValidColor(y)&&!m[y]){m[y]=!0;var A=k[w].getAttribute("name");A=null!=A?A:Editor.getLabelForStylename(y);var E=k[w].getAttribute("default");E=null!=E?E:h.getDefaultColorValue(k[w],g);u.push({name:y,type:"color",primary:"false"!=k[w].getAttribute("primary"),defVal:E,defaultColor:E,undefinedColor:E,
dispName:A})}}return u});Array.prototype.push.apply(d.shape.customProperties,p("fillcolor"));Array.prototype.push.apply(d.shape.customProperties,p("strokecolor"));Array.prototype.push.apply(d.shape.customProperties,p("fontcolor"))}d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)}f(d.shape.customProperties)}a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(k){}};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
EditorUi.prototype.updateSelectionStateForTableCells=function(a){if(1<a.cells.length&&a.cell){var b=mxUtils.sortCells(a.cells),e=this.editor.graph.model,f=e.getParent(b[0]),g=e.getParent(f);if(null!=f&&null!=g){for(var d=f.getIndex(b[0]),h=g.getIndex(f),m=null,p=1,k=1,u=0,w=h<g.getChildCount()-1?e.getChildAt(e.getChildAt(g,h+1),d):null;u<b.length-1;){var y=b[++u];null==w||w!=y||null!=m&&p!=m||(m=p,p=0,k++,f=e.getParent(w),w=h+k<g.getChildCount()?e.getChildAt(e.getChildAt(g,h+k),d):null);var A=this.editor.graph.view.getState(y);
@@ -2135,23 +2138,23 @@ if(y==e.getChildAt(f,d+p)&&null!=A&&1==mxUtils.getValue(A.style,"colspan",1)&&1=
EditorUi.prototype.createTimeout=function(a,b,e){var f=!0,g=null,d=mxUtils.bind(this,function(m){g.clear()&&(f=!1,m=null!=m?m:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(a,b,e)})},null!=e?e(m):this.handleError(m))}),h=window.setTimeout(d,null!=a?a:this.timeout);g={clear:function(){window.clearTimeout(h);return f},isAlive:function(){return f}};null!=b&&this.tryAndHandle(mxUtils.bind(this,function(){b(g)}),d);return g};
EditorUi.prototype.tryAndHandle=function(a,b){try{a()}catch(e){null!=b?b(e):this.handleError(e)}};
EditorUi.prototype.removeUserDefinedDarkColors=function(a,b,e){var f=this.editor.graph;a=null!=a?a:f.getSelectionCells();var g=Graph.colorStyles,d=document.createElement("div");f.model.beginUpdate();try{for(var h=0;h<a.length;h++)if(f.model.isEdge(a[h])||f.model.isVertex(a[h])){var m=f.getCellStyle(a[h],!1);if(null!=m)for(var p=0;p<g.length;p++)try{var k=m[g[p]];if(mxUtils.isLightDarkColor(k)){var u=mxUtils.getLightDarkColor(k);f.setCellStyles(g[p],u.light,[a[h]])}}catch(y){}b&&f.isHtmlLabel(a[h])&&
-"0"!=mxUtils.getValue(m,"html","0")&&(d.innerHTML=Graph.sanitizeHtml(f.getLabel(a[h])),Graph.addLightDarkColors(d,null,null,function(y,A,D){return mxUtils.isLightDarkColor(D)?(D=mxUtils.getLightDarkColor(D),y.style.setProperty(A,D.light),!0):!1})&&f.cellLabelChanged(a[h],d.innerHTML))}if(e&&mxUtils.isLightDarkColor(f.background)){u=mxUtils.getLightDarkColor(f.background);var w=new ChangePageSetup(this,u.light);w.ignoreImage=!0;f.model.execute(w)}}finally{f.model.endUpdate()}return a};
+"0"!=mxUtils.getValue(m,"html","0")&&(d.innerHTML=Graph.sanitizeHtml(f.getLabel(a[h])),Graph.addLightDarkColors(d,null,null,function(y,A,E){return mxUtils.isLightDarkColor(E)?(E=mxUtils.getLightDarkColor(E),y.style.setProperty(A,E.light),!0):!1})&&f.cellLabelChanged(a[h],d.innerHTML))}if(e&&mxUtils.isLightDarkColor(f.background)){u=mxUtils.getLightDarkColor(f.background);var w=new ChangePageSetup(this,u.light);w.ignoreImage=!0;f.model.execute(w)}}finally{f.model.endUpdate()}return a};
EditorUi.prototype.updateSelectionStateForCell=function(a,b,e,f){e=this.editor.graph;a.cells.push(b);if(e.getModel().isVertex(b)){a.connections=0<e.model.getEdgeCount(b);a.unlocked=a.unlocked&&!e.isCellLocked(b);a.resizable=a.resizable&&e.isCellResizable(b);a.rotatable=a.rotatable&&e.isCellRotatable(b);a.movable=a.movable&&e.isCellMovable(b)&&!e.isTableRow(b)&&!e.isTableCell(b);a.swimlane=a.swimlane||e.isSwimlane(b);a.table=a.table||e.isTable(b);a.cell=a.cell||e.isTableCell(b);a.row=a.row||e.isTableRow(b);
a.vertices.push(b);var g=e.getCellGeometry(b);if(null!=g&&(0<g.width?null==a.width?a.width=g.width:a.width!=g.width&&(a.width=""):a.containsLabel=!0,0<g.height?null==a.height?a.height=g.height:a.height!=g.height&&(a.height=""):a.containsLabel=!0,!g.relative||null!=g.offset)){var d=g.relative?g.offset.x:g.x;g=g.relative?g.offset.y:g.y;null==a.x?a.x=d:a.x!=d&&(a.x="");null==a.y?a.y=g:a.y!=g&&(a.y="")}}else e.getModel().isEdge(b)&&(a.edges.push(b),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable=
!1);d=e.view.getState(b);null!=d&&(a.html=a.html&&e.isHtmlLabel(b),a.autoSize=a.autoSize||e.isAutoSizeState(d),a.glass=a.glass&&e.isGlassState(d),a.rounded=a.rounded&&e.isRoundedState(d),a.lineJumps=a.lineJumps&&e.isLineJumpState(d),a.image=a.image||e.isImageState(d),a.shadow=a.shadow&&e.isShadowState(d),a.fill=a.fill&&e.isFillState(d),a.gradient=a.fill&&e.isGradientState(d),a.stroke=a.stroke&&e.isStrokeState(d),b=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||
"image"==b,e.mergeStyle(d.style,a.style,f))};
EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(p,k){"mouseDown"==k.getProperty("eventName")&&b.hideShapePicker()}));var e=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",e);a.addListener(mxEvent.ESCAPE,e);a.view.addListener(mxEvent.SCALE,e);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,e);a.getSelectionModel().addListener(mxEvent.CHANGE,e);var f=a.popupMenuHandler.isMenuShowing;
a.popupMenuHandler.isMenuShowing=function(){return f.apply(this,arguments)||null!=b.shapePicker||null!=b.currentMenu};var g=a.dblClick;a.dblClick=function(p,k){if(this.isEnabled())if(null!=k||null==b.sidebar||mxEvent.isShiftDown(p)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{var u=mxUtils.convertPoint(this.container,mxEvent.getClientX(p),mxEvent.getClientY(p));mxEvent.consume(p);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.x,u.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-e);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var h=this.hoverIcons.execute;this.hoverIcons.execute=function(p,k,u){var w=u.getEvent();this.graph.isCloneEvent(w)||mxEvent.isShiftDown(w)?h.apply(this,arguments):this.graph.connectVertex(p.cell,k,this.graph.defaultEdgeLength,w,null,null,mxUtils.bind(this,function(y,A,D){var E=a.getCompositeParent(p.cell);y=a.getCellGeometry(E);for(u.consume();null!=E&&a.model.isVertex(E)&&null!=y&&y.relative;)cell=
-E,E=a.model.getParent(cell),y=a.getCellGeometry(E);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.getGraphX(),u.getGraphY(),E,mxUtils.bind(this,function(F){D(F);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(F))}),k)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,w,this)}))};var m=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m);m=window.setTimeout(mxUtils.bind(this,function(){var u=
-k.getProperty("arrow"),w=k.getProperty("direction"),y=k.getProperty("event");u=u.getBoundingClientRect();var A=mxUtils.getOffset(a.container),D=a.container.scrollLeft+u.x-A.x;A=a.container.scrollTop+u.y-A.y;var E=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=b.showShapePicker(D,A,E,mxUtils.bind(this,function(H){null!=H&&a.connectVertex(E,w,a.defaultEdgeLength,y,!0,!1,function(M,N,J){J(H);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(H))},
-function(M){a.selectCellsForConnectVertex(M)},y,this.hoverIcons)}),w,!0);null!=F&&(this.centerShapePicker(F,u,D,A,w),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){b.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m)}))}};
+e);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var h=this.hoverIcons.execute;this.hoverIcons.execute=function(p,k,u){var w=u.getEvent();this.graph.isCloneEvent(w)||mxEvent.isShiftDown(w)?h.apply(this,arguments):this.graph.connectVertex(p.cell,k,this.graph.defaultEdgeLength,w,null,null,mxUtils.bind(this,function(y,A,E){var D=a.getCompositeParent(p.cell);y=a.getCellGeometry(D);for(u.consume();null!=D&&a.model.isVertex(D)&&null!=y&&y.relative;)cell=
+D,D=a.model.getParent(cell),y=a.getCellGeometry(D);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.getGraphX(),u.getGraphY(),D,mxUtils.bind(this,function(F){E(F);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(F))}),k)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,w,this)}))};var m=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m);m=window.setTimeout(mxUtils.bind(this,function(){var u=
+k.getProperty("arrow"),w=k.getProperty("direction"),y=k.getProperty("event");u=u.getBoundingClientRect();var A=mxUtils.getOffset(a.container),E=a.container.scrollLeft+u.x-A.x;A=a.container.scrollTop+u.y-A.y;var D=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=b.showShapePicker(E,A,D,mxUtils.bind(this,function(H){null!=H&&a.connectVertex(D,w,a.defaultEdgeLength,y,!0,!1,function(M,N,J){J(H);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(H))},
+function(M){a.selectCellsForConnectVertex(M)},y,this.hoverIcons)}),w,!0);null!=F&&(this.centerShapePicker(F,u,E,A,w),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){b.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m)}))}};
EditorUi.prototype.centerShapePicker=function(a,b,e,f,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(e-=d.width/2-10,f-=d.height+6):g==mxConstants.DIRECTION_SOUTH?(e-=d.width/2-10,f+=b.height+6):g==mxConstants.DIRECTION_WEST?(e-=d.width+6,f-=d.height/2-10):g==mxConstants.DIRECTION_EAST&&(e+=b.width+6,f-=d.height/2-10);a.style.left=e+"px";a.style.top=f+"px"};
EditorUi.prototype.showShapePicker=function(a,b,e,f,g,d,h,m,p){var k=null;this.editor.graph.freehand.isDrawing()||(m=m||null==e,k=this.createShapePicker(a,b,e,f,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,d,m),d,h,m,p),null!=k&&(null==this.hoverIcons||d||this.hoverIcons.reset(),a=this.editor.graph,a.popupMenuHandler.hideMenu(),a.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=f,this.shapePicker=k));return k};
-EditorUi.prototype.createShapePicker=function(a,b,e,f,g,d,h,m,p,k,u){u=null!=u?u:!0;var w=this.editor.graph,y=null;p=null!=p?p:function(E){E=E[0];var F=0,H=0,M=E.geometry;null!=M&&(w.model.isEdge(E)&&(E=M.getTerminalPoint(!1),M=new mxRectangle(0,0,E.x,E.y)),F=M.width/2,H=M.height/2);return new mxPoint(w.snap(Math.round(a/w.view.scale)-w.view.translate.x-F),w.snap(Math.round(b/w.view.scale)-w.view.translate.y-H))};if(null!=h&&0<h.length){var A=this;w=this.editor.graph;y=document.createElement("div");
-g=w.view.getState(e);var D=null==e||null!=g&&w.isTransparentState(g)?null:w.copyStyle(e);y.className="geShapePicker";y.setAttribute("title",mxResources.get("sidebarTooltip"));y.style.left=Math.round(a)+"px";y.style.top=Math.round(b)+"px";mxClient.IS_POINTER&&(y.style.touchAction="none");m||mxUtils.setPrefixedStyle(y.style,"transform","translate(-22px,-22px)");w.container.appendChild(y);g=mxUtils.bind(this,function(E){var F=document.createElement("a");y.appendChild(F);null!=D&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(D,[E]):this.sidebar.graph.pasteCellStyles([E],w.currentVertexStyle,w.currentEdgeStyle);var H=E.geometry;w.model.isEdge(E)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([E],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=w.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==e&&w.isSelectionEmpty()){var N=w.cloneCell(E);if(null!=f)f(N);else{var J=p([N]);w.model.isEdge(N)?
-N.geometry.translate(J.x,J.y):(N.geometry.x=J.x,N.geometry.y=J.y);w.model.beginUpdate();try{w.addCell(N),w.model.isVertex(N)&&w.isAutoSizeCell(N)&&w.updateCellSize(N)}finally{w.model.endUpdate()}w.setSelectionCell(N);w.scrollCellToVisible(N);u&&w.startEditing(N);null!=A.hoverIcons&&A.hoverIcons.update(w.view.getState(N))}}else N=w.getEditableCells(null!=e?[e]:w.getSelectionCells()),w.updateShapes(E,N);null!=d&&d(M);mxEvent.consume(M)}}),25,25,null,null,e),H.style.display="flex",H.style.alignItems=
+EditorUi.prototype.createShapePicker=function(a,b,e,f,g,d,h,m,p,k,u){u=null!=u?u:!0;var w=this.editor.graph,y=null;p=null!=p?p:function(D){D=D[0];var F=0,H=0,M=D.geometry;null!=M&&(w.model.isEdge(D)&&(D=M.getTerminalPoint(!1),M=new mxRectangle(0,0,D.x,D.y)),F=M.width/2,H=M.height/2);return new mxPoint(w.snap(Math.round(a/w.view.scale)-w.view.translate.x-F),w.snap(Math.round(b/w.view.scale)-w.view.translate.y-H))};if(null!=h&&0<h.length){var A=this;w=this.editor.graph;y=document.createElement("div");
+g=w.view.getState(e);var E=null==e||null!=g&&w.isTransparentState(g)?null:w.copyStyle(e);y.className="geShapePicker";y.setAttribute("title",mxResources.get("sidebarTooltip"));y.style.left=Math.round(a)+"px";y.style.top=Math.round(b)+"px";mxClient.IS_POINTER&&(y.style.touchAction="none");m||mxUtils.setPrefixedStyle(y.style,"transform","translate(-22px,-22px)");w.container.appendChild(y);g=mxUtils.bind(this,function(D){var F=document.createElement("a");y.appendChild(F);null!=E&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(E,[D]):this.sidebar.graph.pasteCellStyles([D],w.currentVertexStyle,w.currentEdgeStyle);var H=D.geometry;w.model.isEdge(D)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([D],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=w.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==e&&w.isSelectionEmpty()){var N=w.cloneCell(D);if(null!=f)f(N);else{var J=p([N]);w.model.isEdge(N)?
+N.geometry.translate(J.x,J.y):(N.geometry.x=J.x,N.geometry.y=J.y);w.model.beginUpdate();try{w.addCell(N),w.model.isVertex(N)&&w.isAutoSizeCell(N)&&w.updateCellSize(N)}finally{w.model.endUpdate()}w.setSelectionCell(N);w.scrollCellToVisible(N);u&&w.startEditing(N);null!=A.hoverIcons&&A.hoverIcons.update(w.view.getState(N))}}else N=w.getEditableCells(null!=e?[e]:w.getSelectionCells()),w.updateShapes(D,N);null!=d&&d(M);mxEvent.consume(M)}}),25,25,null,null,e),H.style.display="flex",H.style.alignItems=
"center",H.style.justifyContent="center",F.appendChild(H))});for(k=0;k<(m?Math.min(h.length,4):h.length);k++)g(h[k]);h=y.offsetTop+y.clientHeight-(w.container.scrollTop+w.container.offsetHeight);0<h&&(y.style.top=Math.max(w.container.scrollTop+22,b-h)+"px");h=y.offsetLeft+y.clientWidth-(w.container.scrollLeft+w.container.offsetWidth);0<h&&(y.style.left=Math.max(w.container.scrollLeft+22,a-h)+"px")}return y};
EditorUi.prototype.getCellsForShapePicker=function(a,b,e){var f=this.editor.graph,g=mxUtils.bind(this,function(d,h,m,p){return f.createVertex(null,null,p||"",0,0,h||120,m||60,d,!1)});b=mxUtils.bind(this,function(d,h,m){d=new mxCell(m||"",new mxGeometry(0,0,f.defaultEdgeLength+20,0),d);d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(d.geometry.width,null!=h?h:0),!1);d.geometry.points=null!=h?[new mxPoint(d.geometry.width/2,h)]:[];d.geometry.relative=!0;d.edge=
!0;return d});if(null!=a)try{a=f.cloneCell(a),f.model.isVertex(a)&&null!=a.geometry&&(a.geometry.x=0,a.geometry.y=0)}catch(d){a=null}null==a&&(a=g(f.appendFontSize(Editor.defaultTextStyle,f.vertexFontSize),60,30,"Text"));a=[a,g("whiteSpace=wrap;html=1;"),g("ellipse;whiteSpace=wrap;html=1;",80,80),g("rhombus;whiteSpace=wrap;html=1;",80,80),g("rounded=1;whiteSpace=wrap;html=1;"),g("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),g("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",
@@ -2171,7 +2174,7 @@ EditorUi.prototype.getImageForEdgeStyle=function(a){var b=Format.orthogonalImage
null)?Format.verticalElbowImage.src:Format.horizontalElbowImage.src:"isometricEdgeStyle"==e&&(b="vertical"==mxUtils.getValue(a,mxConstants.STYLE_ELBOW,null)?Format.verticalIsometricImage.src:Format.horizontalIsometricImage.src);return b};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(null!=navigator.clipboard||!mxClipboard.isEmpty())&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var h=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{h=h||d.getSelectionCells();h=d.getExportableCells(d.model.getTopmostCells(h));for(var m={},p=d.createCellLookup(h),k=d.cloneCells(h,null,m),u=new mxGraphModel,w=u.getChildAt(u.getRoot(),
-0),y=0;y<k.length;y++){u.add(w,k[y]);var A=d.view.getState(h[y]);if(null!=A){var D=d.getCellGeometry(k[y]);null!=D&&D.relative&&!u.isEdge(h[y])&&null==p[mxObjectIdentity.get(u.getParent(h[y]))]&&(D.offset=null,D.relative=!1,D.x=A.x/A.view.scale-A.view.translate.x,D.y=A.y/A.view.scale-A.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(m,p),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return h};var e=mxClipboard.paste;mxClipboard.paste=function(d){var h=
+0),y=0;y<k.length;y++){u.add(w,k[y]);var A=d.view.getState(h[y]);if(null!=A){var E=d.getCellGeometry(k[y]);null!=E&&E.relative&&!u.isEdge(h[y])&&null==p[mxObjectIdentity.get(u.getParent(h[y]))]&&(E.offset=null,E.relative=!1,E.x=A.x/A.view.scale-A.view.translate.x,E.y=A.y/A.view.scale-A.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(m,p),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return h};var e=mxClipboard.paste;mxClipboard.paste=function(d){var h=
null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):h=e.apply(this,arguments);a.updatePasteActionStates();return h};var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,h){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var ca=this.graph.getPageLayout(),P=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+ca.x*P.width),this.scale*(this.translate.y+ca.y*P.height),this.scale*ca.width*
@@ -2187,8 +2190,8 @@ mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appe
": "+this.currentPage.getName());p.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(ca-1,this.pages.length)].getName());u.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(ca+1,this.pages.length)].getName())}});p.style.paddingLeft="0px";p.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var y=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",p.style.display=
"",k.style.display="inline-block"):(u.style.display="none",p.style.display="none",k.style.display="none");w()});if(null!=this.menus){var A=this.menus.get("pages");null!=A&&mxEvent.addListener(k,"click",mxUtils.bind(this,function(ca){var P=new mxPopupMenu(A.funct);P.smartSeparators=!0;P.showDisabled=!0;P.autoExpand=!0;P.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(P,arguments);P.destroy()});var da=mxUtils.getOffset(k);P.popup(da.x,da.y+k.offsetHeight,null,ca);mxEvent.addListener(P.div,
"mouseleave",mxUtils.bind(this,function(){P.hideMenu()}))}))}this.editor.addListener("resetGraphView",y);this.editor.addListener("pageSelected",w)}d(mxUtils.bind(this,function(ca){this.actions.get("zoomOut").funct();mxEvent.consume(ca)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(ca){this.actions.get("zoomIn").funct();mxEvent.consume(ca)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(ca){a.isLightboxView()?
-(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(ca)}),Editor.zoomFitImage,mxResources.get("fit"));var D=null,E=null,F=mxUtils.bind(this,function(ca){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);D=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);D=null;E=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";E=null}),
-600)}),ca||200)}),H=mxUtils.bind(this,function(ca){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,ca||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=d(mxUtils.bind(this,function(ca){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
+(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(ca)}),Editor.zoomFitImage,mxResources.get("fit"));var E=null,D=null,F=mxUtils.bind(this,function(ca){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);E=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);E=null;D=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";D=null}),
+600)}),ca||200)}),H=mxUtils.bind(this,function(ca){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,ca||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=d(mxUtils.bind(this,function(ca){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var P=M.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
P.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));P=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
P.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(ca)}),Editor.layersImage,mxResources.get("layers")),N=a.getModel();N.addListener(mxEvent.CHANGE,function(){M.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(ca){if(null!=this.editor.editButtonFunc)this.editor.editButtonFunc();
@@ -2283,14 +2286,14 @@ EditorUi.prototype.showDataDialog=function(a){null!=a&&"undefined"!==typeof wind
EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(f){f=new ChangePageSetup(this,null,f);f.ignoreColor=!0;this.editor.graph.model.execute(f)});var e=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=e&&0<e.length?(b=new Image,b.onload=function(){a(new mxImage(e,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=e):a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b};
EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward",88:"copyAsSvg"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};
-EditorUi.prototype.createKeyHandler=function(a){function b(w,y,A){if(!f.isSelectionEmpty()&&f.isEnabled()){y=null!=y?y:1;var D=f.getCompositeParents(f.getSelectionCells()),E=0<D.length?D[0]:null;if(null!=E)if(A){f.getModel().beginUpdate();try{for(E=0;E<D.length;E++)if(f.getModel().isVertex(D[E])&&f.isCellResizable(D[E])){var F=f.getCellGeometry(D[E]);null!=F&&(F=F.clone(),37==w?F.width=Math.max(0,F.width-y):38==w?F.height=Math.max(0,F.height-y):39==w?F.width+=y:40==w&&(F.height+=y),f.getModel().setGeometry(D[E],
-F))}}finally{f.getModel().endUpdate()}}else{F=f.model.getParent(E);var H=f.getView().scale;A=null;1==f.getSelectionCount()&&f.model.isVertex(E)&&null!=f.layoutManager&&!f.isCellLocked(E)&&(A=f.layoutManager.getLayout(F));if(null!=A&&A.constructor==mxStackLayout)y=F.getIndex(E),37==w||38==w?f.model.add(F,E,Math.max(0,y-1)):(39==w||40==w)&&f.model.add(F,E,Math.min(f.model.getChildCount(F),y+1));else{var M=f.graphHandler;null!=M&&(null==M.first&&M.start(E,0,0,f.getMovableCells(D)),null!=M.first&&(E=
-D=0,37==w?D=-y:38==w?E=-y:39==w?D=y:40==w&&(E=y),M.currentDx+=D*H,M.currentDy+=E*H,M.checkPreview(),M.updatePreview()),null!=h&&window.clearTimeout(h),h=window.setTimeout(function(){if(null!=M.first){var N=M.roundLength(M.currentDx/H),J=M.roundLength(M.currentDy/H);M.moveCells(M.cells,N,J);M.reset()}},400))}}}}var e=this,f=this.editor.graph,g=new mxKeyHandler(f),d=g.isEventIgnored;g.isEventIgnored=function(w){return!(mxEvent.isShiftDown(w)&&9==w.keyCode)&&(!this.isControlDown(w)||mxEvent.isShiftDown(w)||
+EditorUi.prototype.createKeyHandler=function(a){function b(w,y,A){if(!f.isSelectionEmpty()&&f.isEnabled()){y=null!=y?y:1;var E=f.getCompositeParents(f.getSelectionCells()),D=0<E.length?E[0]:null;if(null!=D)if(A){f.getModel().beginUpdate();try{for(D=0;D<E.length;D++)if(f.getModel().isVertex(E[D])&&f.isCellResizable(E[D])){var F=f.getCellGeometry(E[D]);null!=F&&(F=F.clone(),37==w?F.width=Math.max(0,F.width-y):38==w?F.height=Math.max(0,F.height-y):39==w?F.width+=y:40==w&&(F.height+=y),f.getModel().setGeometry(E[D],
+F))}}finally{f.getModel().endUpdate()}}else{F=f.model.getParent(D);var H=f.getView().scale;A=null;1==f.getSelectionCount()&&f.model.isVertex(D)&&null!=f.layoutManager&&!f.isCellLocked(D)&&(A=f.layoutManager.getLayout(F));if(null!=A&&A.constructor==mxStackLayout)y=F.getIndex(D),37==w||38==w?f.model.add(F,D,Math.max(0,y-1)):(39==w||40==w)&&f.model.add(F,D,Math.min(f.model.getChildCount(F),y+1));else{var M=f.graphHandler;null!=M&&(null==M.first&&M.start(D,0,0,f.getMovableCells(E)),null!=M.first&&(D=
+E=0,37==w?E=-y:38==w?D=-y:39==w?E=y:40==w&&(D=y),M.currentDx+=E*H,M.currentDy+=D*H,M.checkPreview(),M.updatePreview()),null!=h&&window.clearTimeout(h),h=window.setTimeout(function(){if(null!=M.first){var N=M.roundLength(M.currentDx/H),J=M.roundLength(M.currentDy/H);M.moveCells(M.cells,N,J);M.reset()}},400))}}}}var e=this,f=this.editor.graph,g=new mxKeyHandler(f),d=g.isEventIgnored;g.isEventIgnored=function(w){return!(mxEvent.isShiftDown(w)&&9==w.keyCode)&&(!this.isControlDown(w)||mxEvent.isShiftDown(w)||
90!=w.keyCode&&89!=w.keyCode&&188!=w.keyCode&&190!=w.keyCode&&85!=w.keyCode&&83!=w.keyCode)&&(66!=w.keyCode&&73!=w.keyCode||!this.isControlDown(w)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=w.keyCode&&107!=w.keyCode||!this.isControlDown(w)&&!mxEvent.isShiftDown(w)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};g.isEnabledForEvent=function(w){return!mxEvent.isConsumed(w)&&this.isGraphEvent(w)&&this.isEnabled()&&
(null==e.dialogs||0==e.dialogs.length)};g.isControlDown=function(w){return mxEvent.isControlDown(w)||mxClient.IS_MAC&&w.metaKey};var h=null,m={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},p=g.getFunction;mxKeyHandler.prototype.getFunction=function(w){if(f.isEnabled()){var y=null;mxEvent.isShiftDown(w)&&this.isControlDown(w)&&mxEvent.isAltDown(w)?y=e.actions.get(e.ctrlAltShiftActions[w.keyCode]):mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)?
y=e.actions.get(e.altShiftActions[w.keyCode]):this.isControlDown(w)&&mxEvent.isAltDown(w)&&(y=e.actions.get(e.ctrlAltActions[w.keyCode]));if(null!=y)return y.funct;if("/"==w.key&&!this.isControlDown(w)&&!mxEvent.isAltDown(w))return function(){var A=document.getElementById("geOmniSearch");null!=A&&30<A.clientWidth&&A.focus()};if(null!=m[w.keyCode]&&!f.isSelectionEmpty())if(!this.isControlDown(w)&&mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)){if(f.model.isVertex(f.getSelectionCell()))return function(){var A=
f.connectVertex(f.getSelectionCell(),m[w.keyCode],f.defaultEdgeLength,w,!0);null!=A&&0<A.length&&(1==A.length&&f.model.isEdge(A[0])?f.setSelectionCell(f.model.getTerminal(A[0],!1)):f.setSelectionCell(A[A.length-1]),f.scrollCellToVisible(f.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(f.view.getState(f.getSelectionCell())))}}else return this.isControlDown(w)?function(){b(w.keyCode,mxEvent.isShiftDown(w)?f.gridSize:null,!0)}:function(){b(w.keyCode,mxEvent.isShiftDown(w)?f.gridSize:null)}}return p.apply(this,
-arguments)};g.bindAction=mxUtils.bind(this,function(w,y,A,D){var E=this.actions.get(A);null!=E&&(A=function(){E.isEnabled()&&E.funct.apply(this,arguments)},y?D?g.bindControlShiftKey(w,A):g.bindControlKey(w,A):D?g.bindShiftKey(w,A):g.bindKey(w,A))});var k=this,u=g.escape;g.escape=function(w){u.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){f.exitGroup()});g.bindControlShiftKey(35,function(){f.enterGroup()});g.bindShiftKey(36,function(){f.home()});g.bindKey(35,function(){f.refresh()});
+arguments)};g.bindAction=mxUtils.bind(this,function(w,y,A,E){var D=this.actions.get(A);null!=D&&(A=function(){D.isEnabled()&&D.funct.apply(this,arguments)},y?E?g.bindControlShiftKey(w,A):g.bindControlKey(w,A):E?g.bindShiftKey(w,A):g.bindKey(w,A))});var k=this,u=g.escape;g.escape=function(w){u.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){f.exitGroup()});g.bindControlShiftKey(35,function(){f.enterGroup()});g.bindShiftKey(36,function(){f.home()});g.bindKey(35,function(){f.refresh()});
g.bindAction(80,!0,"print");g.bindAction(107,!0,"zoomIn");g.bindAction(109,!0,"zoomOut");g.bindAction(61,!0,"zoomIn");g.bindAction(187,!0,"zoomIn");g.bindAction(222,!0,"zoomIn");g.bindAction(173,!0,"zoomOut");g.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)g.bindAction(79,!0,"outline",!0),g.bindControlKey(36,function(){f.isEnabled()&&f.foldCells(!0)}),g.bindControlKey(35,function(){f.isEnabled()&&f.foldCells(!1)}),g.bindControlKey(13,function(){k.ctrlEnter()}),g.bindAction(8,
!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),
g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(90,!0,"redo",!0),g.bindAction(89,!0,"redo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,
@@ -2335,7 +2338,7 @@ mxResources.get("close"));w.className="geButton";this.tooltip.appendChild(w);thi
100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/u.width,this.maxTooltipHeight/u.height))/100),u=this.graph2.getGraphBounds()):(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+e+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",u.width*=e,u.height*=e)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");e=u.width+2*this.tooltipBorder+4;f=u.height+2*this.tooltipBorder;this.tooltip.style.overflow=
"visible";this.tooltip.style.width=e+"px";m=e;this.tooltipTitles&&null!=g&&0<g.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTopStyle="solid",this.tooltipTitle.style.borderTopWidth="1px",this.tooltipTitle.style.textAlign="center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position="absolute",this.tooltipTitle.style.paddingTop="6px",this.tooltipTitle.style.bottom="6px",this.tooltip.appendChild(this.tooltipTitle)):
this.tooltipTitle.innerText="",this.tooltipTitle.style.display="",mxUtils.write(this.tooltipTitle,g),this.tooltipTitle.setAttribute("title",g),m=Math.min(this.maxTooltipWidth,Math.max(e,this.tooltipTitle.scrollWidth+4)),g=this.tooltipTitle.offsetHeight+10,f+=g,this.tooltipTitle.style.marginTop=2-g+"px"):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");m>e&&(this.tooltip.style.width=m+"px");this.tooltip.style.height=f+"px";g=-Math.round(u.x-this.tooltipBorder)+
-(m>e?(m-e)/2:0);e=-Math.round(u.y-this.tooltipBorder);h=null!=h?h:this.getTooltipOffset(a,u);a=h.x;h=h.y;0!=g||0!=e?this.graph2.view.canvas.setAttribute("transform","translate("+g+","+e+")"):this.graph2.view.canvas.removeAttribute("transform");this.tooltip.style.position="absolute";this.tooltip.style.left=a+"px";this.tooltip.style.top=h+"px";mxUtils.fit(this.tooltip,this.tooltipBorder);this.lastCreated=Date.now()};
+(m>e?(m-e)/2:0);e=-Math.round(u.y-this.tooltipBorder);h=null!=h?h:this.getTooltipOffset(a,u);a=h.x;h=h.y;0!=g||0!=e?this.graph2.view.canvas.setAttribute("transform","translate("+g+","+e+")"):this.graph2.view.canvas.removeAttribute("transform");this.tooltip.style.position="absolute";this.tooltip.style.left=Math.max(0,a)+"px";this.tooltip.style.top=Math.max(0,h)+"px";mxUtils.fit(this.tooltip,this.tooltipBorder);this.lastCreated=Date.now()};
Sidebar.prototype.showTooltip=function(a,b,e,f,g,d){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var h=mxUtils.bind(this,function(){this.createTooltip(a,b,e,f,g,d)});null!=this.tooltip&&"none"!=this.tooltip.style.display?h():this.thread=window.setTimeout(h,this.tooltipDelay);this.currentElt=a}};
Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,b,e,f,g){null==a&&(a="");null!=f&&(a+=" "+f);return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(g,b,e,f)}))};
Sidebar.prototype.addEntries=function(a){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(e){var f=e.data,g=null!=e.title?e.title:"";null!=e.tags&&(g+=" "+e.tags);null!=f&&0<g.length?this.addEntry(g,mxUtils.bind(this,function(){f=this.editorUi.convertDataUri(f);var d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(d+="aspect=fixed;");return this.createVertexTemplate(d+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0)})):null!=e.xml&&0<g.length&&this.addEntry(g,
@@ -2348,20 +2351,20 @@ Sidebar.prototype.isEntryIgnored=function(a,b){b=!b;if(null!=a.parentLibraries&&
Sidebar.prototype.searchEntries=function(a,b,e,f,g,d){if(null!=this.taglist&&null!=a){"mxgraph."==a.substring(0,8)&&0>a.indexOf(" ")&&8<a.lastIndexOf(".")&&(a=a.substring(8).replace(/\./g," "));var h=a.toLowerCase().split(" ");a=new mxDictionary;g=(e+1)*b;for(var m=[],p=0,k=0;k<h.length;k++){var u=Editor.soundex(h[k].replace(/\.*\d*$/,""));if(0<u.length){m=this.taglist[h[k]];var w=null!=m?m.entries.slice():[];m=this.taglist[u];w=null!=m?w.concat(m.entries):w;u=new mxDictionary;if(0<w.length){m=[];
for(var y=0;y<w.length;y++){var A=w[y];if(0==p==(null==a.get(A))&&null==u.get(A)&&(u.put(A,A),!this.isEntryIgnored(A,d)&&(m.push(A),k==h.length-1&&m.length==g))){f(m.slice(e*b,g),g,!0,h);return}}}else m=[];a=u;p++}}d=m.length;f(m.slice(e*b,(e+1)*b),d,!1,h)}else f([],null,null,h)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],e={},f=0;f<a.length;f++)null==e[a[f]]&&(e[a[f]]="1",b.push(a[f]));return b.join(" ")}return null};
Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,e){};
-Sidebar.prototype.addSearchPalette=function(a){function b(S,aa){E=aa;S=S.firstChild.nextSibling.nextSibling;aa=document.createElement("span");aa.style.color="gray";aa.innerHTML="Enter";S.appendChild(aa)}function e(){k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));F.style.display="none";M=p.value="";O()}var f=this.editorUi,g=f.editor.graph,d=document.createElement("div");d.style.visibility="hidden";this.appendChild(d);var h=document.createElement("div");
+Sidebar.prototype.addSearchPalette=function(a){function b(S,aa){D=aa;S=S.firstChild.nextSibling.nextSibling;aa=document.createElement("span");aa.style.color="gray";aa.innerHTML="Enter";S.appendChild(aa)}function e(){k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));F.style.display="none";M=p.value="";O()}var f=this.editorUi,g=f.editor.graph,d=document.createElement("div");d.style.visibility="hidden";this.appendChild(d);var h=document.createElement("div");
h.className="geSidebar geSearchSidebar";a||(h.style.display="none");var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";var p=document.createElement("input");p.setAttribute("id","geOmniSearch");p.setAttribute("placeholder",mxResources.get("typeSlashToSearch"));p.setAttribute("type","text");m.appendChild(p);var k=document.createElement("img");k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));
k.className="geAdaptiveAsset";m.appendChild(k);h.appendChild(m);var u=!1;mxEvent.addGestureListeners(p,mxUtils.bind(this,function(S){u=!1;mxClient.IS_TOUCH||mxEvent.getSource(S)!=p||document.activeElement==p||(p.focus(),mxClient.IS_GC||mxClient.IS_FF?p.select():document.execCommand("selectAll",!1,null),u=!0)}),mxUtils.bind(this,function(S){mxEvent.getSource(S)==p&&u&&mxEvent.consume(S)}),mxUtils.bind(this,function(S){u&&(mxEvent.consume(S),u=!1)}));var w=[],y=mxUtils.bind(this,function(S,aa){f.hideCurrentMenu();
-mxUtils.remove(S,w);w.unshift(S);5<w.length&&w.pop();S.funct.apply(this,aa);p.value=null}),A="about deleteAll showBoundingBox createSidebarEntry downloadDesktop toggleGoogleFonts".split(" "),D=mxUtils.bind(this,function(S){var aa=null,Y;for(Y in f.actions.actions){var ba=0>A.indexOf(Y)&&"test"!=Y.substring(0,4)?f.actions.get(Y):null;if(null!=ba&&ba.isEnabled()&&ba.visible){if(Y.toLowerCase()==S)return ba;for(var L=S.toLowerCase().split(" "),U=0,X=0;X<L.length;X++)0==L[X].length?U++:(0<=Y.toLowerCase().indexOf(L[X])||
-0<=ba.getTitle().toLowerCase().indexOf(L[X]))&&U++;U==L.length&&(0>w.indexOf(aa)||null!=aa&&!aa.isEnabled())&&(aa=ba)}}return aa}),E=null;f.addMenuHandler(p,mxUtils.bind(this,function(S,aa){function Y(ja){if(null!=ja&&ja.visible){var ta=S.addItem(ja.getTitle(),null,function(){y(ja,arguments)},aa,null,ja.isEnabled());ja.toggleAction&&ja.isSelected()&&S.addCheckmark(ta,Editor.checkmarkImage);null!=E||!ja.isEnabled()||0!=p.value.length&&U!=ja||b(ta,function(){y(ja,arguments);g.container.focus()})}}var ba=
-p.value.toLowerCase();E=null;var L=S.addItem(mxResources.get("searchShapes"),null,mxUtils.bind(this,function(){fa()}),aa);b(L,function(){fa()});S.addItem(mxResources.get("findInDiagram"),null,mxUtils.bind(this,function(){f.hideCurrentMenu();f.showSearchWindow(!0,p.value);p.value=""}),aa);Editor.enableChatGpt&&!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&"draw.io"==f.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&S.addItem(mxResources.get("generate"),
-null,mxUtils.bind(this,function(){f.openTemplateDialog(encodeURIComponent(p.value));p.value=""}),aa);!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&S.addItem(mxResources.get("help"),null,mxUtils.bind(this,function(){f.searchHelp(p.value);p.value=""}),aa);S.addSeparator();var U=0<p.value.length?D(ba):null;Y(U);for(L=0;L<w.length;L++)w[L]!=U&&Y(w[L]);if(0<ba.length&&null!=f.pages)for(S.addSeparator(),L=0;L<f.pages.length&&!function(ja){if(null!=ja.getName()&&0<=ja.getName().toLowerCase().indexOf(ba)){var ta=
-function(){f.selectPage(ja);g.container.focus();p.value=""},ca=S.addItem(ja.getName()+" ("+mxResources.get("page")+")",null,ta,aa);null==E&&b(ca,ta);return!0}return!1}(f.pages[L]);L++);if(0<ba.length&&null!=f.sidebar&&null!=f.sidebar.entries)for(S.addSeparator(),L=0;L<f.sidebar.entries.length;L++)for(var X=f.sidebar.entries[L].entries,ia=0;ia<X.length;ia++)(function(ja){var ta=f.sidebar.getConfigurationById(ja.id),ca=ja.title.toLowerCase().split(" ");null!=ta&&0<=mxUtils.indexOf(ca,ba)&&(ca=function(){var P=
-f.sidebar.showPalettes(ta.prefix||"",ta.libs||[ta.id],!0);p.value="";null!=P&&1<P.length&&(null==P[1].firstChild||null!=P[1].firstChild.firstChild&&"none"!=P[1].firstChild.style.display||P[0].click(),P[0].scrollIntoView({behavior:"smooth"}))},ja=S.addItem(ja.title+" ("+mxResources.get("openLibrary")+")",null,ca,aa),null==E&&b(ja,ca));return!0})(X[ia])}),null,!0);var F=document.createElement("div");F.style.display="none";F.style.paddingTop="8px";F.style.alignItems="center";F.style.justifyContent="center";
+mxUtils.remove(S,w);w.unshift(S);5<w.length&&w.pop();S.funct.apply(this,aa);p.value=null}),A="about deleteAll showBoundingBox createSidebarEntry downloadDesktop toggleGoogleFonts".split(" "),E=mxUtils.bind(this,function(S){var aa=null,Y;for(Y in f.actions.actions){var ba=0>A.indexOf(Y)&&"test"!=Y.substring(0,4)?f.actions.get(Y):null;if(null!=ba&&ba.isEnabled()&&ba.visible){if(Y.toLowerCase()==S)return ba;for(var L=S.toLowerCase().split(" "),U=0,X=0;X<L.length;X++)0==L[X].length?U++:(0<=Y.toLowerCase().indexOf(L[X])||
+0<=ba.getTitle().toLowerCase().indexOf(L[X]))&&U++;U==L.length&&(0>w.indexOf(aa)||null!=aa&&!aa.isEnabled())&&(aa=ba)}}return aa}),D=null;f.addMenuHandler(p,mxUtils.bind(this,function(S,aa){function Y(ja){if(null!=ja&&ja.visible){var ta=S.addItem(ja.getTitle(),null,function(){y(ja,arguments)},aa,null,ja.isEnabled());ja.toggleAction&&ja.isSelected()&&S.addCheckmark(ta,Editor.checkmarkImage);null!=D||!ja.isEnabled()||0!=p.value.length&&U!=ja||b(ta,function(){y(ja,arguments);g.container.focus()})}}var ba=
+p.value.toLowerCase();D=null;var L=S.addItem(mxResources.get("searchShapes"),null,mxUtils.bind(this,function(){fa()}),aa);b(L,function(){fa()});S.addItem(mxResources.get("findInDiagram"),null,mxUtils.bind(this,function(){f.hideCurrentMenu();f.showSearchWindow(!0,p.value);p.value=""}),aa);Editor.enableChatGpt&&!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&"draw.io"==f.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&S.addItem(mxResources.get("generate"),
+null,mxUtils.bind(this,function(){f.openGenerateDialog(p.value);p.value=""}),aa);!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&S.addItem(mxResources.get("help"),null,mxUtils.bind(this,function(){f.searchHelp(p.value);p.value=""}),aa);S.addSeparator();var U=0<p.value.length?E(ba):null;Y(U);for(L=0;L<w.length;L++)w[L]!=U&&Y(w[L]);if(0<ba.length&&null!=f.pages)for(S.addSeparator(),L=0;L<f.pages.length&&!function(ja){if(null!=ja.getName()&&0<=ja.getName().toLowerCase().indexOf(ba)){var ta=
+function(){f.selectPage(ja);g.container.focus();p.value=""},ca=S.addItem(ja.getName()+" ("+mxResources.get("page")+")",null,ta,aa);null==D&&b(ca,ta);return!0}return!1}(f.pages[L]);L++);if(0<ba.length&&null!=f.sidebar&&null!=f.sidebar.entries)for(S.addSeparator(),L=0;L<f.sidebar.entries.length;L++)for(var X=f.sidebar.entries[L].entries,ia=0;ia<X.length;ia++)(function(ja){var ta=f.sidebar.getConfigurationById(ja.id),ca=ja.title.toLowerCase().split(" ");null!=ta&&0<=mxUtils.indexOf(ca,ba)&&(ca=function(){var P=
+f.sidebar.showPalettes(ta.prefix||"",ta.libs||[ta.id],!0);p.value="";null!=P&&1<P.length&&(null==P[1].firstChild||null!=P[1].firstChild.firstChild&&"none"!=P[1].firstChild.style.display||P[0].click(),P[0].scrollIntoView({behavior:"smooth"}))},ja=S.addItem(ja.title+" ("+mxResources.get("openLibrary")+")",null,ca,aa),null==D&&b(ja,ca));return!0})(X[ia])}),null,!0);var F=document.createElement("div");F.style.display="none";F.style.paddingTop="8px";F.style.alignItems="center";F.style.justifyContent="center";
var H=mxUtils.button(mxResources.get("moreResults"),function(){fa()});H.setAttribute("title",mxResources.get("moreResults"));H.className="geBtn gePrimaryBtn";H.style.borderRadius="16px";H.style.padding="8px 12px";F.appendChild(H);h.appendChild(F);var M="",N=!1,J=!1,V=0,W={},T=12,O=mxUtils.bind(this,function(){N=!1;this.currentSearch=null;for(var S=h.firstChild;null!=S;){var aa=S.nextSibling;S!=m&&S!=F&&S.parentNode.removeChild(S);S=aa}});mxEvent.addListener(k,"click",function(){k.getAttribute("src")!=
Editor.magnifyImage&&e();p.focus()});var fa=mxUtils.bind(this,function(){f.hideCurrentMenu();T=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=p.value){if(null!=F.parentNode&&(M!=p.value&&(O(),M=p.value,W={},J=!1,V=0),!N&&!J)){H.setAttribute("disabled","true");F.style.display="flex";H.style.cursor="wait";H.innerHTML="";mxUtils.write(H,mxResources.get("loading")+"...");N=!0;var S={};this.currentSearch=S;try{this.searchEntries(M,T,V,mxUtils.bind(this,
function(aa,Y,ba,L){if(this.currentSearch==S){aa=null!=aa?aa:[];N=!1;V++;this.insertSearchHint(h,M,T,V,aa,Y,ba,L);0==aa.length&&1==V&&(M="");null!=F.parentNode&&F.parentNode.removeChild(F);for(Y=0;Y<aa.length;Y++)mxUtils.bind(this,function(U){try{var X=U();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(U,!1)&&(X.style.opacity=this.closedLibraryOpacity);null==W[X.innerHTML]?(W[X.innerHTML]=null!=U.parentLibraries?U.parentLibraries.slice():[],h.appendChild(X)):null!=
U.parentLibraries&&(W[X.innerHTML]=W[X.innerHTML].concat(U.parentLibraries));mxEvent.addGestureListeners(X,null,null,mxUtils.bind(this,function(ia){var ja=W[X.innerHTML];mxEvent.isPopupTrigger(ia)&&this.showPopupMenuForEntry(X,ja,ia)}));mxEvent.disableContextMenu(X)}catch(ia){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(ia.stack)):console.error(ia))}})(aa[Y]);ba?(H.removeAttribute("disabled"),H.innerHTML="",mxUtils.write(H,mxResources.get("moreResults"))):
-(H.innerHTML=mxResources.get("reset"),F.style.display="none",J=!0);H.style.cursor="";h.appendChild(F)}}),mxUtils.bind(this,function(){H.style.cursor=""}),this.searchClosedLibraries)}catch(aa){f.handleError(aa)}}}else O(),M=p.value="",W={},F.style.display="none",J=!1,p.focus()});this.searchShapes=function(S){p.value=S;fa()};mxEvent.addListener(p,"keydown",mxUtils.bind(this,function(S){13==S.keyCode&&null!=E?(E(S,S),mxEvent.consume(S)):9==S.keyCode?(g.container.focus(),mxEvent.consume(S)):27==S.keyCode&&
+(H.innerHTML=mxResources.get("reset"),F.style.display="none",J=!0);H.style.cursor="";h.appendChild(F)}}),mxUtils.bind(this,function(){H.style.cursor=""}),this.searchClosedLibraries)}catch(aa){f.handleError(aa)}}}else O(),M=p.value="",W={},F.style.display="none",J=!1,p.focus()});this.searchShapes=function(S){p.value=S;fa()};mxEvent.addListener(p,"keydown",mxUtils.bind(this,function(S){13==S.keyCode&&null!=D?(D(S,S),mxEvent.consume(S)):9==S.keyCode?(g.container.focus(),mxEvent.consume(S)):27==S.keyCode&&
(e(),mxEvent.consume(S))}));a=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){""==p.value?(k.setAttribute("src",Editor.magnifyImage),k.setAttribute("title",mxResources.get("search"))):(k.setAttribute("src",Editor.crossImage),k.setAttribute("title",mxResources.get("reset")));""==p.value?(J=!0,F.style.display="none"):p.value!=M?(F.style.display="none",J=!1):N||(F.style.display=J?"none":"flex")}),0)});mxEvent.addListener(p,"keyup",a);mxEvent.addListener(p,"paste",a);mxEvent.addListener(p,
"cut",a);mxEvent.addListener(p,"mousedown",function(S){S.stopPropagation&&S.stopPropagation();S.cancelBubble=!0});mxEvent.addListener(p,"selectstart",function(S){S.stopPropagation&&S.stopPropagation();S.cancelBubble=!0});a=document.createElement("div");a.appendChild(h);this.appendChild(a);this.palettes.search=[d,a]};
Sidebar.prototype.insertSearchHint=function(a,b,e,f,g,d,h,m){0==g.length&&1==f&&(e=document.createElement("div"),e.className="geSidebarText",b=mxResources.get("noResultsFor",[b]),e.setAttribute("title",b),mxUtils.write(e,b),a.appendChild(e))};
@@ -2474,17 +2477,17 @@ a.width,(e-2*this.thumbBorder)/a.height))/100,this.graph.view.scaleAndTranslate(
null!=w?"visible":"hidden";k.style.left=(null!=u?u:this.thumbBorder-1)+"px";k.style.top=k.style.left;k.style.width=b+"px";k.style.height=e+"px";k.style.visibility="";k.style.minWidth="";k.style.minHeight="";this.disablePointerEvents(k);f.appendChild(k);this.sidebarTitles&&null!=g&&0!=h&&(f.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",
b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,g),f.appendChild(b));return a};
Sidebar.prototype.createSection=function(a){return mxUtils.bind(this,function(){var b=document.createElement("div");b.setAttribute("title",a);b.style.textOverflow="ellipsis";b.style.whiteSpace="nowrap";b.style.textAlign="center";b.style.overflow="hidden";b.style.width="100%";b.style.padding="14px 0";mxUtils.write(b,a);return b})};
-Sidebar.prototype.createItem=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var D=document.createElement("a"),E=2*this.thumbBorder;D.style.width=k+E+"px";D.style.height=u+E+"px";mxEvent.addListener(D,"click",function(H){mxEvent.consume(H)});var F=new mxRectangle(0,0,g,d);null!=a&&0<a.length?(E=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(E),this.initialDefaultVertexStyle,this.initialDefaultEdgeStyle),
-null!=w?(D.className="geButton",D.style.backgroundImage="url("+w+")",D.style.backgroundRepeat="no-repeat",D.style.backgroundPosition="center",D.style.backgroundSize="24px 24px"):(D.className="geItem",this.createThumb(E,k,u,D,b,e,f,g,d)),1<a.length||a[0].vertex?(f=this.createDragSource(D,this.createDropHandler(a,!0,h,F,y,A),this.createDragPreview(g,d),a,F,y),this.addClickHandler(D,f,a,p,y),f.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):
-null!=a[0]&&a[0].edge&&(f=this.createDragSource(D,this.createDropHandler(a,!1,h,F,y,A),this.createDragPreview(g,d),a,F,y),this.addClickHandler(D,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(D,null,mxUtils.bind(this,function(H){mxEvent.isMouseEvent(H)&&this.showTooltip(D,a,F.width,F.height,b,e)}))):(D.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",D.setAttribute("title",b));return D};
+Sidebar.prototype.createItem=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A,E){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var D=E;if(null==D){D=document.createElement("a");var F=2*this.thumbBorder;D.style.width=k+F+"px";D.style.height=u+F+"px"}mxEvent.addListener(D,"click",function(M){mxEvent.consume(M)});var H=new mxRectangle(0,0,g,d);null!=a&&0<a.length?(F=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(F),this.initialDefaultVertexStyle,this.initialDefaultEdgeStyle),
+null!=w?(D.className="geButton",D.style.backgroundImage="url("+w+")",D.style.backgroundRepeat="no-repeat",D.style.backgroundPosition="center",D.style.backgroundSize="24px 24px"):null==E&&(D.className="geItem",this.createThumb(F,k,u,D,b,e,f,g,d)),1<a.length||a[0].vertex?(f=this.createDragSource(D,this.createDropHandler(a,!0,h,H,y,A),this.createDragPreview(g,d),a,H,y),this.addClickHandler(D,f,a,p,y),f.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):
+null!=a[0]&&a[0].edge&&(f=this.createDragSource(D,this.createDropHandler(a,!1,h,H,y,A),this.createDragPreview(g,d),a,H,y),this.addClickHandler(D,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(D,null,mxUtils.bind(this,function(M){mxEvent.isMouseEvent(M)&&this.showTooltip(D,a,H.width,H.height,b,e)}))):null==E&&(D.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",D.setAttribute("title",b));return D};
Sidebar.prototype.createDropHandler=function(a,b,e,f,g,d){e=null!=e?e:!0;return mxUtils.bind(this,function(h,m,p,k,u,w){for(w=w?null:mxEvent.isTouchEvent(m)||mxEvent.isPenEvent(m)?document.elementFromPoint(mxEvent.getClientX(m),mxEvent.getClientY(m)):mxEvent.getSource(m);null!=w&&w!=this.container;)w=w.parentNode;if(null==w&&h.isEnabled()){a=h.getImportableCells(a);if(0<a.length){h.stopEditing();w=null==p||mxEvent.isAltDown(m)?!1:h.isValidDropTarget(p,a,m);var y=null;null==p||w||(p=null);if(!h.isCellLocked(p||
-h.getDefaultParent())){h.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&h.isSplitTarget(p,a,m)){var A=h.view.scale,D=h.view.translate,E=(k+D.x)*A,F=(u+D.y)*A,H=h.cloneCells(a);h.splitEdge(p,H,null,k-f.width/2,u-f.height/2,E,F);y=H}else if(0<a.length&&(y=h.importCells(a,k,u,p),h.model.isVertex(d)&&1==y.length&&h.model.isVertex(y[0]))){var M=h.insertEdge(h.model.getParent(d),null,"",d,y[0],h.createCurrentEdgeStyle());h.applyNewEdgeStyle(d,[M]);y.push(M);h.connectionHandler.insertBeforeSource&&
-h.insertEdgeBeforeCell(M,d)}if(null!=h.layoutManager){var N=h.layoutManager.getLayout(p);if(null!=N){A=h.view.scale;D=h.view.translate;E=(k+D.x)*A;F=(u+D.y)*A;for(var J=0;J<y.length;J++)N.moveCell(y[J],E,F)}}!e||null!=m&&mxEvent.isShiftDown(m)||h.fireEvent(new mxEventObject("cellsInserted","cells",y));for(J=0;J<y.length;J++)h.model.isVertex(y[J])&&h.isAutoSizeCell(y[J])&&h.updateCellSize(y[J])}catch(V){this.editorUi.handleError(V)}finally{h.model.endUpdate()}null!=y&&0<y.length&&(h.scrollCellToVisible(y[0]),
+h.getDefaultParent())){h.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&h.isSplitTarget(p,a,m)){var A=h.view.scale,E=h.view.translate,D=(k+E.x)*A,F=(u+E.y)*A,H=h.cloneCells(a);h.splitEdge(p,H,null,k-f.width/2,u-f.height/2,D,F);y=H}else if(0<a.length&&(y=h.importCells(a,k,u,p),h.model.isVertex(d)&&1==y.length&&h.model.isVertex(y[0]))){var M=h.insertEdge(h.model.getParent(d),null,"",d,y[0],h.createCurrentEdgeStyle());h.applyNewEdgeStyle(d,[M]);y.push(M);h.connectionHandler.insertBeforeSource&&
+h.insertEdgeBeforeCell(M,d)}if(null!=h.layoutManager){var N=h.layoutManager.getLayout(p);if(null!=N){A=h.view.scale;E=h.view.translate;D=(k+E.x)*A;F=(u+E.y)*A;for(var J=0;J<y.length;J++)N.moveCell(y[J],D,F)}}!e||null!=m&&mxEvent.isShiftDown(m)||h.fireEvent(new mxEventObject("cellsInserted","cells",y));for(J=0;J<y.length;J++)h.model.isVertex(y[J])&&h.isAutoSizeCell(y[J])&&h.updateCellSize(y[J])}catch(V){this.editorUi.handleError(V)}finally{h.model.endUpdate()}null!=y&&0<y.length&&(h.scrollCellToVisible(y[0]),
h.setSelectionCells(y));(g||h.editAfterInsert&&null!=m&&mxEvent.isMouseEvent(m)&&null!=y&&1==y.length)&&window.setTimeout(function(){h.startEditing(y[0])},0)}}mxEvent.consume(m)}})};Sidebar.prototype.createDragPreview=function(a,b){var e=document.createElement("div");e.className="geDragPreview";e.style.width=a+"px";e.style.height=b+"px";return e};
-Sidebar.prototype.dropAndConnect=function(a,b,e,f,g,d,h){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:h;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),y=m.getCellGeometry(b[f]),A=m.model.getParent(a),D=!0;if(null!=m.layoutManager){var E=m.layoutManager.getLayout(A);null!=E&&E.constructor==mxStackLayout&&(D=!1)}k=m.model.isEdge(a)?null:m.view.getState(A);var F=E=0;if(null!=k){var H=k.origin;E=H.x;
-F=H.y}var M=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&D),N=m.getCellAt((p.x+E+m.view.translate.x)*m.view.scale,(p.y+F+m.view.translate.y)*m.view.scale,null,null,null,function(fa,S,aa){return!m.isContainer(fa.cell)});if(null!=N&&N!=A)k=m.view.getState(N),null!=k&&(H=k.origin,A=N,M=!0,m.model.isEdge(a)||(p.x-=H.x-E,p.y-=H.y-F));else if(!D||m.isTableRow(a)||m.isTableCell(a))p.x+=E,p.y+=F;E=y.x;F=y.y;m.model.isEdge(b[f])&&(F=E=0);k=b=m.importCells(b,p.x-(M?E:0),p.y-
+Sidebar.prototype.dropAndConnect=function(a,b,e,f,g,d,h){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:h;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),y=m.getCellGeometry(b[f]),A=m.model.getParent(a),E=!0;if(null!=m.layoutManager){var D=m.layoutManager.getLayout(A);null!=D&&D.constructor==mxStackLayout&&(E=!1)}k=m.model.isEdge(a)?null:m.view.getState(A);var F=D=0;if(null!=k){var H=k.origin;D=H.x;
+F=H.y}var M=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&E),N=m.getCellAt((p.x+D+m.view.translate.x)*m.view.scale,(p.y+F+m.view.translate.y)*m.view.scale,null,null,null,function(fa,S,aa){return!m.isContainer(fa.cell)});if(null!=N&&N!=A)k=m.view.getState(N),null!=k&&(H=k.origin,A=N,M=!0,m.model.isEdge(a)||(p.x-=H.x-D,p.y-=H.y-F));else if(!E||m.isTableRow(a)||m.isTableCell(a))p.x+=D,p.y+=F;D=y.x;F=y.y;m.model.isEdge(b[f])&&(F=D=0);k=b=m.importCells(b,p.x-(M?D:0),p.y-
(M?F:0),M?A:null);if(m.model.isEdge(a))m.model.setTerminal(a,b[f],e==mxConstants.DIRECTION_NORTH),null!=h&&null!=d&&(m.model.remove(b[h]),m.updateShapes(b[h],[a]));else if(m.model.isEdge(b[f])&&null==d){m.model.setTerminal(b[f],a,!0);var J=m.getCellGeometry(b[f]),V=null!=J?J.getTerminalPoint(!0):null;J.points=null;if(null!=V)for(e=0;e<b.length;e++)if(m.model.isEdge(b[e])&&e!=f){var W=m.getCellGeometry(b[e]),T=null!=W?W.getTerminalPoint(!0):null;null!=T&&T.x==V.x&&T.y==V.y&&m.model.setTerminal(b[e],
-a,!0)}if(null!=J.getTerminalPoint(!1))J.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(M&&m.model.isVertex(A)){var O=m.view.getState(A);H=O.cell!=m.view.currentRoot?O.origin:new mxPoint(0,0);m.cellsMoved(b,H.x,H.y,null,null,!0)}}else null!=d&&(y=m.getCellGeometry(b[d]),E=p.x-Math.round(y.x),F=p.y-Math.round(y.y),p.x=Math.round(y.x),p.y=Math.round(y.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,E,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=h?m.model.setTerminal(b[h],a,!0):b.push(m.insertEdge(null,
+a,!0)}if(null!=J.getTerminalPoint(!1))J.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(M&&m.model.isVertex(A)){var O=m.view.getState(A);H=O.cell!=m.view.currentRoot?O.origin:new mxPoint(0,0);m.cellsMoved(b,H.x,H.y,null,null,!0)}}else null!=d&&(y=m.getCellGeometry(b[d]),D=p.x-Math.round(y.x),F=p.y-Math.round(y.y),p.x=Math.round(y.x),p.y=Math.round(y.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,D,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=h?m.model.setTerminal(b[h],a,!0):b.push(m.insertEdge(null,
null,"",a,b[f],m.createCurrentEdgeStyle())));null!=g&&mxEvent.isShiftDown(g)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(fa){this.editorUi.handleError(fa)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=h&&1<k.length&&k.splice(h,1);return k};
Sidebar.prototype.getDropAndConnectGeometry=function(a,b,e,f){var g=this.editorUi.editor.graph,d=g.view,h=1<f.length,m=g.view.getState(a),p=g.getCellGeometry(a);f=g.getCellGeometry(b);null!=m&&null!=p&&null!=f&&(f=f.clone(),g.model.isEdge(a)?(p=m.absolutePoints,b=p[0],g=p[p.length-1],e==mxConstants.DIRECTION_NORTH?(f.x=b.x/d.scale-d.translate.x-f.width/2,f.y=b.y/d.scale-d.translate.y-f.height/2):(f.x=g.x/d.scale-d.translate.x-f.width/2,f.y=g.y/d.scale-d.translate.y-f.height/2)):(p.relative&&(p=p.clone(),
p.x=(m.x-d.translate.x)/d.scale,p.y=(m.y-d.translate.y)/d.scale),d=g.defaultEdgeLength,g.model.isEdge(b)&&null!=f.getTerminalPoint(!0)&&null!=f.getTerminalPoint(!1)?(b=f.getTerminalPoint(!0),g=f.getTerminalPoint(!1),d=g.x-b.x,b=g.y-b.y,d=Math.sqrt(d*d+b*b),f.x=p.getCenterX(),f.y=p.getCenterY(),f.width=1,f.height=1,e==mxConstants.DIRECTION_NORTH?(f.height=d,f.y=p.y-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1)):e==mxConstants.DIRECTION_EAST?(f.width=d,f.x=p.x+p.width,f.setTerminalPoint(new mxPoint(f.x+
@@ -2493,7 +2496,7 @@ f.width/2+d:e==mxConstants.DIRECTION_SOUTH?f.y=f.y+p.height/2+f.height/2+d:e==mx
2):e==mxConstants.DIRECTION_WEST&&(f.x-=p.getCenterX()+p.width/2,f.y-=p.getCenterY()))))));return f};Sidebar.prototype.isDropStyleEnabled=function(a,b){var e=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(e=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return e};
Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};Sidebar.prototype.disablePointerEvents=function(a){mxUtils.visitNodes(a,mxUtils.bind(this,function(b){b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.pointerEvents="none",b.removeAttribute("pointer-events"))}))};
Sidebar.prototype.createDragSource=function(a,b,e,f,g,d){function h(oa,za){var Aa=mxUtils.createImage(oa.src);Aa.style.width=oa.width+"px";Aa.style.height=oa.height+"px";null!=za&&Aa.setAttribute("title",za);mxUtils.setOpacity(Aa,oa==this.refreshTarget?30:20);Aa.style.position="absolute";Aa.style.cursor="crosshair";return Aa}function m(oa,za,Aa,Ma){null!=Ma.parentNode&&(mxUtils.contains(Aa,oa,za)?(mxUtils.setOpacity(Ma,100),U=Ma):mxUtils.setOpacity(Ma,Ma==S?30:20));return Aa}var p=this.editorUi,k=
-p.editor.graph,u=null,w=null,y=this;d=0;for(var A=this.livePreview,D=0;D<f.length&&A;D++)d+=k.model.getDescendants(f[D]).length,A=d<k.graphHandler.maxLivePreview;for(D=0;D<f.length&&(null==w&&k.model.isVertex(f[D])?w=D:null==u&&k.model.isEdge(f[D])&&null==k.model.getTerminal(f[D],!0)&&(u=D),null==w||null==u);D++);var E=this.isDropStyleEnabled(f,w),F=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(oa,za,Aa,Ma,Pa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
+p.editor.graph,u=null,w=null,y=this;d=0;for(var A=this.livePreview,E=0;E<f.length&&A;E++)d+=k.model.getDescendants(f[E]).length,A=d<k.graphHandler.maxLivePreview;for(E=0;E<f.length&&(null==w&&k.model.isVertex(f[E])?w=E:null==u&&k.model.isEdge(f[E])&&null==k.model.getTerminal(f[E],!0)&&(u=E),null==w||null==u);E++);var D=this.isDropStyleEnabled(f,w),F=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(oa,za,Aa,Ma,Pa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
J&&U==S){var Ka=oa.isCellSelected(J.cell)?oa.getSelectionCells():[J.cell];oa.updateShapes(oa.model.isEdge(J.cell)?f[0]:f[w],Ka,!0);oa.setSelectionCells(Ka)}else null!=f&&null!=U&&null!=M&&U!=S?(Ka=oa.model.isEdge(M.cell)||null==u?w:u,oa.setSelectionCells(this.dropAndConnect(M.cell,f,L,Ka,za,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(oa.view.getState(oa.getSelectionCell()))}),e,0,0,k.autoscroll,!0,!0);A&&(F.createDragElement=mxUtils.bind(this,function(){return F.createPreviewElement(this.graph)}),
F.createPreviewElement=mxUtils.bind(this,function(oa){var za=document.createElement("a");za.className="geItem";za.style.overflow="visible";oa=oa.view.scale;za.style.width=oa*Math.max(1,g.width)+"px";za.style.height=oa*Math.max(1,g.height)+"px";mxUtils.setOpacity(za,50);var Aa=k.cloneCells(f);this.graph.pasteCellStyles(k.includeDescendants(Aa),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);y.createThumb(Aa,oa*Math.max(1,g.width),oa*Math.max(1,g.height),za,null,null,null,null,null,k.shapeBackgroundColor,
0,oa);return za}));var H=F.mouseDown;F.mouseDown=function(oa){mxEvent.isPopupTrigger(oa)||mxEvent.isMultiTouchEvent(oa)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),H.apply(this,arguments))};var M=null,N=null,J=null,V=!1,W=h(this.triangleUp,mxResources.get("connect")),T=h(this.triangleRight,mxResources.get("connect")),O=h(this.triangleDown,mxResources.get("connect")),fa=h(this.triangleLeft,mxResources.get("connect")),S=h(this.refreshTarget,mxResources.get("replace")),aa=null,Y=h(this.roundDrop),
@@ -2503,7 +2506,7 @@ null:oa.getCellGeometry(M.cell),Ja=oa.getCellGeometry(f[Ma]),ra=oa.model.getPare
Pa.height*Aa.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=F.currentHighlight&&null!=F.currentHighlight.state&&oa.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*Aa.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-
g.height*Aa.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var ta=(new Date).getTime(),ca=0,P=null,da=this.editorUi.editor.graph.getCellStyle(f[0]);F.getDropTarget=mxUtils.bind(this,function(oa,za,Aa,Ma){var Pa=mxEvent.isAltDown(Ma)||
null==f?null:oa.getCellAt(za,Aa,null,null,null,function(Wa,Xa,bb){return oa.isContainer(Wa.cell)&&"0"!=mxUtils.getValue(Wa.style,"dropTarget","1")});if(null!=Pa&&!this.graph.isCellConnectable(Pa)&&!this.graph.model.isEdge(Pa)){var Ka=this.graph.getModel().getParent(Pa);this.graph.getModel().isVertex(Ka)&&this.graph.isCellConnectable(Ka)&&(Pa=Ka)}oa.isCellLocked(Pa)&&(Pa=null);var Ja=oa.view.getState(Pa);Ka=U=null;P!=Ja?(ta=(new Date).getTime(),ca=0,P=Ja,null!=this.updateThread&&window.clearTimeout(this.updateThread),
-null!=Ja&&(this.updateThread=window.setTimeout(function(){null==U&&(P=Ja,F.getDropTarget(oa,za,Aa,Ma))},this.dropTargetDelay+10))):ca=(new Date).getTime()-ta;if(E&&2500>ca&&null!=Ja&&!mxEvent.isShiftDown(Ma)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(da,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,
+null!=Ja&&(this.updateThread=window.setTimeout(function(){null==U&&(P=Ja,F.getDropTarget(oa,za,Aa,Ma))},this.dropTargetDelay+10))):ca=(new Date).getTime()-ta;if(D&&2500>ca&&null!=Ja&&!mxEvent.isShiftDown(Ma)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(da,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,
mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(da,mxConstants.STYLE_SHAPE)||1500<ca||oa.model.isEdge(Ja.cell))&&ca>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ja)&&(oa.model.isVertex(Ja.cell)&&null!=w||oa.model.isEdge(Ja.cell)&&oa.model.isEdge(f[0]))){if(oa.isCellEditable(Ja.cell)){J=Ja;var ra=oa.model.isEdge(Ja.cell)?oa.view.getPoint(Ja):new mxPoint(Ja.getCenterX(),Ja.getCenterY());ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/
2,this.refreshTarget.width,this.refreshTarget.height);S.style.left=Math.floor(ra.x)+"px";S.style.top=Math.floor(ra.y)+"px";null==aa&&(oa.container.appendChild(S),aa=S.parentNode);m(za,Aa,ra,S)}}else null==J||!mxUtils.contains(J,za,Aa)||1500<ca&&!mxEvent.isShiftDown(Ma)?(J=null,null!=aa&&(S.parentNode.removeChild(S),aa=null)):null!=J&&null!=aa&&(ra=oa.model.isEdge(J.cell)?oa.view.getPoint(J):new mxPoint(J.getCenterX(),J.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/
2,this.refreshTarget.width,this.refreshTarget.height),m(za,Aa,ra,S));if(V&&null!=M&&!mxEvent.isAltDown(Ma)&&null==U){Ka=mxRectangle.fromRectangle(M);if(oa.model.isEdge(M.cell)){var Da=M.absolutePoints;null!=Y.parentNode&&(ra=Da[0],Ka.add(m(za,Aa,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),Y)));null!=ba.parentNode&&(Da=Da[Da.length-1],Ka.add(m(za,Aa,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,
@@ -2519,7 +2522,7 @@ Ka.length;ra++)null!=Ka[ra].parentNode&&Ka[ra].parentNode.removeChild(Ka[ra]);V|
Sidebar.prototype.itemClicked=function(a,b,e,f){f=this.editorUi.editor.graph;f.container.focus();if(mxEvent.isAltDown(e)&&1==f.getSelectionCount()){for(var g=b=null,d=0;d<a.length&&(null==g&&f.model.isVertex(a[d])?g=d:null==b&&f.model.isEdge(a[d])&&null==f.model.getTerminal(a[d],!0)&&(b=d),null==g||null==b);d++);d=null==b?g:b;f.setSelectionCells(this.dropAndConnect(f.getSelectionCell(),a,mxEvent.isMetaDown(e)||mxEvent.isControlDown(e)?mxEvent.isShiftDown(e)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:
mxEvent.isShiftDown(e)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,d,e,g,b));f.scrollCellToVisible(f.getSelectionCell())}else mxEvent.isShiftDown(e)&&!f.isSelectionEmpty()?(e=f.getEditableCells(f.getSelectionCells()),f.updateShapes(a[0],e,!0),f.scrollCellToVisible(e)):(a=mxEvent.isAltDown(e)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(a,!0)),b.drop(f,e,null,a.x,a.y,!0))};
Sidebar.prototype.addClickHandler=function(a,b,e,f){var g=b.getGraphForEvent,d=b.mouseDown,h=b.mouseMove,m=b.mouseUp,p=this.editorUi.editor.graph.tolerance,k=!1,u=null,w=this,y=null;b.getGraphForEvent=function(A){return k?g.apply(this,arguments):null};b.mouseDown=function(A){d.apply(this,arguments);u=new mxPoint(mxEvent.getClientX(A),mxEvent.getClientY(A));y=a.style.opacity;k=!1;""==y&&(y="1");null!=this.dragElement&&(this.dragElement.style.display="none")};b.mouseMove=function(A){(k=null!=u&&(Math.abs(u.x-
-mxEvent.getClientX(A))>p||Math.abs(u.y-mxEvent.getClientY(A))>p))&&null!=this.dragElement&&"none"==this.dragElement.style.display&&(this.dragElement.style.display="");h.apply(this,arguments)};b.mouseUp=function(A){try{mxEvent.isPopupTrigger(A)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=f&&f(A),mxEvent.isConsumed(A)||w.itemClicked(e,b,A,a)),m.apply(b,arguments),u=null,w.currentElt=a}catch(D){b.reset(),w.editorUi.handleError(D)}}};
+mxEvent.getClientX(A))>p||Math.abs(u.y-mxEvent.getClientY(A))>p))&&null!=this.dragElement&&"none"==this.dragElement.style.display&&(this.dragElement.style.display="");h.apply(this,arguments)};b.mouseUp=function(A){try{mxEvent.isPopupTrigger(A)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=f&&f(A),mxEvent.isConsumed(A)||w.itemClicked(e,b,A,a)),m.apply(b,arguments),u=null,w.currentElt=a}catch(E){b.reset(),w.editorUi.handleError(E)}}};
Sidebar.prototype.createVertexTemplateEntry=function(a,b,e,f,g,d,h,m){null!=m&&null!=g&&(m+=" "+g);m=null!=m&&0<m.length?m:null!=g?g.toLowerCase():"";return this.addEntry(m,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,e,f,g,d,h)}))};Sidebar.prototype.createVertexTemplate=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A){a=[new mxCell(null!=f?f:"",new mxGeometry(0,0,b,e),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,e,g,d,h,m,p,k,u,w,y,A)};
Sidebar.prototype.createVertexTemplateFromData=function(a,b,e,f,g,d,h,m){var p=null;try{var k=mxUtils.parseXml(Graph.decompress(a)),u=new mxCodec(k),w=new mxGraphModel;u.decode(k.documentElement,w);p=this.graph.cloneCells(w.root.getChildAt(0).children)}catch(y){f=mxResources.get("error")+": "+y.message}return this.createVertexTemplateFromCells(p,b,e,f,g,d,h,m)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A){return this.createItem(a,f,g,d,b,e,h,m,p,k,u,w,y,A)};
Sidebar.prototype.createEdgeTemplateEntry=function(a,b,e,f,g,d,h,m,p){h=null!=h&&0<h.length?h:g.toLowerCase();return this.addEntry(h,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,b,e,f,g,d,m,p)}))};
@@ -2532,8 +2535,8 @@ Sidebar.prototype.setContentVisible=function(a,b){var e=Editor.transitionDelay;m
(mxUtils.setPrefixedStyle(a.style,"transform","scaleY(0)"),window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(a.style,"transform",null);mxUtils.setPrefixedStyle(a.style,"transition",null);a.style.display="none"}),1E3*e))};Sidebar.prototype.removePalette=function(a){var b=this.palettes[a];if(null!=b){this.palettes[a]=null;for(a=0;a<b.length;a++)this.container.removeChild(b[a]);return!0}return!1};
Sidebar.prototype.addImagePalette=function(a,b,e,f,g,d,h){for(var m=[],p=0;p<g.length;p++)mxUtils.bind(this,function(k,u,w){if(null==w&&(null==e||"img/lib/clip_art/"!=e.substring(0,17))){w=k.lastIndexOf("/");var y=k.lastIndexOf(".");w=k.substring(0<=w?w+1:0,0<=y?y:k.length).replace(/[-_]/g," ")}m.push(this.createVertexTemplateEntry("image;html=1;image="+e+k+f,this.defaultImageWidth,this.defaultImageHeight,"",u,null!=u,null,this.filterTags(w)))})(g[p],null!=d?d[p]:null,null!=h?h[g[p]]:null);this.addPaletteFunctions(a,
b,!1,m)};Sidebar.prototype.getTagsForStencil=function(a,b,e){a=a.split(".");for(var f=1;f<a.length;f++)a[f]=a[f].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=e&&a.push(e);return a.slice(1,a.length)};
-Sidebar.prototype.addStencilPalette=function(a,b,e,f,g,d,h,m,p,k){h=null!=h?h:1;if(this.addStencilsToIndex){var u=[];if(null!=p)for(k=0;k<p.length;k++)u.push(p[k]);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(w,y,A,D,E){if(null==g||0>mxUtils.indexOf(g,y)){A=this.getTagsForStencil(w,y);var F=null!=m?m[y]:null;null!=F&&A.push(F);u.push(this.createVertexTemplateEntry("shape="+w+y.toLowerCase()+f,Math.round(D*h),Math.round(E*h),"",y.replace(/_/g," "),null,null,this.filterTags(A.join(" "))))}}),
-!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(w){null==f&&(f="");null!=d&&d.call(this,w);if(null!=p)for(var y=0;y<p.length;y++)p[y](w);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(A,D,E,F,H){(null==g||0>mxUtils.indexOf(g,D))&&w.appendChild(this.createVertexTemplate("shape="+A+D.toLowerCase()+f,Math.round(F*h),Math.round(H*h),"",D.replace(/_/g," "),!0))}),!0)}))};
+Sidebar.prototype.addStencilPalette=function(a,b,e,f,g,d,h,m,p,k){h=null!=h?h:1;if(this.addStencilsToIndex){var u=[];if(null!=p)for(k=0;k<p.length;k++)u.push(p[k]);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(w,y,A,E,D){if(null==g||0>mxUtils.indexOf(g,y)){A=this.getTagsForStencil(w,y);var F=null!=m?m[y]:null;null!=F&&A.push(F);u.push(this.createVertexTemplateEntry("shape="+w+y.toLowerCase()+f,Math.round(E*h),Math.round(D*h),"",y.replace(/_/g," "),null,null,this.filterTags(A.join(" "))))}}),
+!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(w){null==f&&(f="");null!=d&&d.call(this,w);if(null!=p)for(var y=0;y<p.length;y++)p[y](w);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(A,E,D,F,H){(null==g||0>mxUtils.indexOf(g,E))&&w.appendChild(this.createVertexTemplate("shape="+A+E.toLowerCase()+f,Math.round(F*h),Math.round(H*h),"",E.replace(/_/g," "),!0))}),!0)}))};
Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.escapeListener&&(this.editorUi.editor.graph.removeListener(this.escapeListener),this.escapeListener=null);null!=this.refreshListener&&(this.editorUi.removeListener(this.refreshListener),this.refreshListener=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,
mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?
"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var g=0;g<a.length;g++)f=f.replace(new RegExp("&"+a[g][0]+";","g"),"&#"+a[g][1]+";");return b(f)};var e=mxUtils.getSizeForString;mxUtils.getSizeForString=function(f,g,d,h){return e(Graph.sanitizeHtml(f),g,d,h)}})();
@@ -2564,8 +2567,8 @@ mouseUp:mxUtils.bind(this,function(L,U){k=h=m=p=null})})}this.cellRenderer.minSv
null,"simple"==L.view.graph.getAdaptiveColors())&&(L.lastSanitizedLabelValue=y.innerHTML)),U=L.lastSanitizedLabelValue));return U};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);
this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(L,U){return!1};this.alternateEdgeStyle="vertical";null==f&&this.loadStylesheet();var A=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=A.apply(this,arguments);if(this.graph.pageVisible){var U=[],X=this.graph.pageFormat,ia=this.graph.pageScale,ja=X.width*ia;X=X.height*ia;ia=this.graph.view.translate;for(var ta=this.graph.view.scale,ca=this.graph.getPageLayout(),P=0;P<ca.width;P++)U.push(new mxRectangle(((ca.x+
P)*ja+ia.x)*ta,(ca.y*X+ia.y)*ta,ja*ta,X*ta));for(P=1;P<ca.height;P++)U.push(new mxRectangle((ca.x*ja+ia.x)*ta,((ca.y+P)*X+ia.y)*ta,ja*ta,X*ta));L=U.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(L,U){return null==L.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(L){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,
-arguments)};var D=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var U=D.apply(this,arguments),X=new mxDictionary,ia=[],ja=0;ja<U.length;ja++){var ta=this.graph.isTableCell(L)&&this.graph.isTableCell(U[ja])&&this.graph.isCellSelected(U[ja])?this.graph.model.getParent(U[ja]):this.graph.isTableRow(L)&&this.graph.isTableRow(U[ja])&&this.graph.isCellSelected(U[ja])?U[ja]:this.graph.getCompositeParent(U[ja]);null==ta||X.get(ta)||(X.put(ta,!0),ia.push(ta))}return ia};var E=this.graphHandler.start;
-this.graphHandler.start=function(L,U,X,ia){var ja=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?ja=!0:L=this.graph.model.getParent(L));ja||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));E.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,U){U=this.graph.getCompositeParent(U);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(L,U,X,ia,ja,ta){var ca=
+arguments)};var E=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var U=E.apply(this,arguments),X=new mxDictionary,ia=[],ja=0;ja<U.length;ja++){var ta=this.graph.isTableCell(L)&&this.graph.isTableCell(U[ja])&&this.graph.isCellSelected(U[ja])?this.graph.model.getParent(U[ja]):this.graph.isTableRow(L)&&this.graph.isTableRow(U[ja])&&this.graph.isCellSelected(U[ja])?U[ja]:this.graph.getCompositeParent(U[ja]);null==ta||X.get(ta)||(X.put(ta,!0),ia.push(ta))}return ia};var D=this.graphHandler.start;
+this.graphHandler.start=function(L,U,X,ia){var ja=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?ja=!0:L=this.graph.model.getParent(L));ja||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,U){U=this.graph.getCompositeParent(U);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(L,U,X,ia,ja,ta){var ca=
mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=ia&&this.graph.applyNewEdgeStyle(ia,[ca]);return ca};var F=new mxRubberband(this);this.getRubberband=function(){return F};var H=(new Date).getTime(),M=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;N.apply(this,arguments);L!=this.currentState?(H=(new Date).getTime(),M=0):M=(new Date).getTime()-H};var J=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=
function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<M||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&J.apply(this,arguments)};var V=this.isToggleEvent;this.isToggleEvent=function(L){return V.apply(this,arguments)||mxEvent.isShiftDown(L)};var W=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(W=this.container.style.cursor,
this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=W)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};var T=this.click;this.click=function(L){var U=null==L.state&&null!=L.sourceState&&this.isCellLocked(this.getLayerForCell(L.sourceState.cell));if(this.isEnabled()&&!U||L.isConsumed())return T.apply(this,arguments);
@@ -2590,7 +2593,7 @@ Graph.createSvgNode=function(a,b,e,f,g){var d=mxUtils.createXmlDocument(),h=null
e+"px");h.setAttribute("height",f+"px");h.setAttribute("viewBox",a+" "+b+" "+e+" "+f);d.appendChild(h);return h};
Graph.htmlToPng=function(a,b,e,f,g,d){g=null!=g?g:"";d=null!=d?d:Editor.htmlRasterScale;var h=document.createElement("canvas");h.width=b*d;h.height=e*d;var m=document.createElement("img");m.onload=mxUtils.bind(this,function(){try{var k=h.getContext("2d");k.scale(d,d);k.drawImage(m,0,0);f(h.toDataURL())}catch(u){f(null)}});var p=mxUtils.createXmlDocument();p=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");a=(new mxSvgCanvas2D(p)).convertHtml(a);m.onerror=
function(k){f(null)};m.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+b+'" height="'+e+'">'+(""!=g?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+g+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+a+"</div></foreignObject></svg>")};
-Graph.addLightDarkColors=function(a,b,e,f){function g(y,A,D){return null!=f?f(y,A,D):mxUtils.isValidColor(D)?(null==h&&null!=b&&(h={}),null!=h&&(h[A]=y.style.getPropertyValue(A)),D=mxUtils.getLightDarkColor(D,null,null,e),y.style.setProperty(A,D.cssText),!0):!1}for(var d=a.getElementsByTagName("*"),h=null,m=!1,p=0;p<d.length;p++)if(d[p]!=a&&null!=d[p].style){h=null;for(var k=0;k<d[p].style.length;k++){var u=d[p].style.item(k),w=d[p].style.getPropertyValue(u);m=g(d[p],u,w)||m}"FONT"==d[p].nodeName&&
+Graph.addLightDarkColors=function(a,b,e,f){function g(y,A,E){return null!=f?f(y,A,E):mxUtils.isValidColor(E)?(null==h&&null!=b&&(h={}),null!=h&&(h[A]=y.style.getPropertyValue(A)),E=mxUtils.getLightDarkColor(E,null,null,e),y.style.setProperty(A,E.cssText),!0):!1}for(var d=a.getElementsByTagName("*"),h=null,m=!1,p=0;p<d.length;p++)if(d[p]!=a&&null!=d[p].style){h=null;for(var k=0;k<d[p].style.length;k++){var u=d[p].style.item(k),w=d[p].style.getPropertyValue(u);m=g(d[p],u,w)||m}"FONT"==d[p].nodeName&&
""==d[p].style.getPropertyValue("color")&&(w=d[p].getAttribute("color"),m=g(d[p],"color",w)||m);null!=b&&null!=h&&d[p].setAttribute(b,JSON.stringify(h))}return m};Graph.removeLightDarkColors=function(a,b){a=a.getElementsByTagName("*");for(var e=!1,f=0;f<a.length;f++)try{var g=a[f].getAttribute(b);if(null!=g){a[f].removeAttribute(b);var d=JSON.parse(g),h;for(h in d){var m=d[h];""==m?(a[f].style[h]=null,""==a[f].getAttribute("style")&&a[f].removeAttribute("style")):a[f].style[h]=m;e=!0}}}catch(p){}return e};
Graph.getGivenColor=function(a,b){var e=null;if(a.nodeType==mxConstants.NODETYPE_ELEMENT){try{var f=a.getAttribute(Graph.backupStyleAttribute);if(null!=f){var g=JSON.parse(f);null!=g&&null!=g[b]&&("color"==b&&"FONT"==a.nodeName&&""==g[b]&&null!=a.getAttribute("color")?e=a.getAttribute("color"):""!=g[b]&&(e=g[b]))}}catch(d){}null==e&&""!=a.style[b]&&(e=a.style[b])}return e};
Graph.setTextColor=function(a,b,e){for(var f=e?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,g=e?"color":"background-color",d=a.getElementsByTagName("*"),h=[],m=0;m<d.length;m++)h.push({node:d[m],value:d[m].style[g]});document.execCommand(e?"forecolor":"backcolor",!1,f);a=a.getElementsByTagName("*");for(m=0;m<a.length;m++){if(m<h.length&&h[m].node==a[m]&&h[m].value!=a[m].style[g]&&""==a[m].style[g])try{if(d=a[m].getAttribute(Graph.backupStyleAttribute),null!=d){var p=JSON.parse(d);p[g]=
@@ -2601,16 +2604,16 @@ Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var e=a.b
Graph.arrayBufferIndexOfString=function(a,b,e){var f=b.charCodeAt(0),g=1,d=-1;for(e=e||0;e<a.byteLength;e++)if(a[e]==f){d=e;break}for(e=d+1;-1<d&&e<a.byteLength&&e<d+b.length-1;e++){if(a[e]!=b.charCodeAt(g))return Graph.arrayBufferIndexOfString(a,b,d+1);g++}return g==b.length-1?d:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};
Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return e?b:Graph.zapGremlins(b)};
Graph.fadeNodes=function(a,b,e,f,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,e);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=f&&f()},g)},0)};
-Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,g){function d(w){w.view.states.visit(function(y,A){null!=A.shape&&w.model.isEdge(w.model.getParent(A.cell))?A.shape.node.parentNode.appendChild(A.shape.node):null!=A.text&&w.model.isEdge(A.cell)&&A.text.node.parentNode.appendChild(A.text.node)})}function h(w,y){if(w.getModel().isVertex(y)){var A=w.container.offsetWidth/2,D=w.container.offsetHeight/2;w.rootCell=
-y.referenceCell||y;w.getModel().beginUpdate();try{pageSize=null!=e&&null!=e.pageSize?e.pageSize:8+Math.max(0,Math.floor(Math.min(w.container.offsetWidth-800/120,w.container.offsetHeight-600)/30));for(var E=y.referenceCell||y,F=f.model.getCell(E.sourceCellId),H=f.getEdges(F,null,!0,!0,!1,!0),M=[],N=0;N<H.length;N++)null!=H[N].getTerminal(!0)&&null!=H[N].getTerminal(!1)&&f.isCellVisible(H[N])&&!f.isEdgeIgnored(H[N])&&f.isCellVisible(H[N].getTerminal(!0))&&f.isCellVisible(H[N].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(H[N]))&&
-M.push(H[N]);M=H=M;if(null!=y.startIndex||0<pageSize&&H.length>pageSize){var J=y.startIndex||0;M=H.slice(Math.max(0,J),Math.min(H.length,J+pageSize))}M=f.getOpposites(M,F).concat(M);var V=w.cloneCells(M);for(N=0;N<M.length;N++)if(V[N].sourceCellId=M[N].id,w.model.isEdge(V[N]))for(V[N].geometry.x=0,V[N].geometry.y=0,V[N].geometry.points=null,V[N].setStyle(V[N].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),V[N].setTerminal(E,
+Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,g){function d(w){w.view.states.visit(function(y,A){null!=A.shape&&w.model.isEdge(w.model.getParent(A.cell))?A.shape.node.parentNode.appendChild(A.shape.node):null!=A.text&&w.model.isEdge(A.cell)&&A.text.node.parentNode.appendChild(A.text.node)})}function h(w,y){if(w.getModel().isVertex(y)){var A=w.container.offsetWidth/2,E=w.container.offsetHeight/2;w.rootCell=
+y.referenceCell||y;w.getModel().beginUpdate();try{pageSize=null!=e&&null!=e.pageSize?e.pageSize:8+Math.max(0,Math.floor(Math.min(w.container.offsetWidth-800/120,w.container.offsetHeight-600)/30));for(var D=y.referenceCell||y,F=f.model.getCell(D.sourceCellId),H=f.getEdges(F,null,!0,!0,!1,!0),M=[],N=0;N<H.length;N++)null!=H[N].getTerminal(!0)&&null!=H[N].getTerminal(!1)&&f.isCellVisible(H[N])&&!f.isEdgeIgnored(H[N])&&f.isCellVisible(H[N].getTerminal(!0))&&f.isCellVisible(H[N].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(H[N]))&&
+M.push(H[N]);M=H=M;if(null!=y.startIndex||0<pageSize&&H.length>pageSize){var J=y.startIndex||0;M=H.slice(Math.max(0,J),Math.min(H.length,J+pageSize))}M=f.getOpposites(M,F).concat(M);var V=w.cloneCells(M);for(N=0;N<M.length;N++)if(V[N].sourceCellId=M[N].id,w.model.isEdge(V[N]))for(V[N].geometry.x=0,V[N].geometry.y=0,V[N].geometry.points=null,V[N].setStyle(V[N].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),V[N].setTerminal(D,
null==V[N].getTerminal(!0)),F=0;F<V[N].getChildCount();F++){var W=V[N].getChildAt(F);null!=W.geometry&&W.geometry.relative&&(W.setStyle(W.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),W.geometry.offset=new mxPoint(0,0),W.geometry.y=0,W.geometry.x=.5>W.geometry.x?-.8:.5<W.geometry.x?.8:0)}if(0<y.startIndex){var T=w.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((y.startIndex||0)/pageSize)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
-T.referenceCell=E;T.startIndex=Math.max(0,(y.startIndex||0)-pageSize);V.splice(0,0,T)}if(H.length>(y.startIndex||0)+pageSize){var O=w.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((y.startIndex||0)/pageSize)+2)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");O.referenceCell=E;O.startIndex=(y.startIndex||0)+pageSize;V.splice(0,0,O)}for(var fa in w.getModel().cells){var S=w.getModel().getCell(fa);S!=w.rootCell&&!w.getModel().isAncestor(w.rootCell,
-S)&&w.getModel().isVertex(S)&&w.removeCells([S])}w.addCells(V);var aa=w.getModel().getGeometry(w.rootCell);null!=aa&&(aa=aa.clone(),aa.x=A-aa.width/2,aa.y=D-aa.height/3,w.getModel().setGeometry(w.rootCell,aa));y=[];for(fa in w.getModel().cells)S=w.getModel().getCell(fa),S!=w.rootCell&&w.getModel().isVertex(S)&&w.getModel().getParent(S)==w.getDefaultParent()&&(y.push(S),aa=w.getModel().getGeometry(S),null!=aa&&(aa.x=A-aa.width/2,aa.y=D-aa.height/2));var Y=y.length,ba=2*Math.PI/Y,L=Math.max(minSize,
+T.referenceCell=D;T.startIndex=Math.max(0,(y.startIndex||0)-pageSize);V.splice(0,0,T)}if(H.length>(y.startIndex||0)+pageSize){var O=w.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((y.startIndex||0)/pageSize)+2)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");O.referenceCell=D;O.startIndex=(y.startIndex||0)+pageSize;V.splice(0,0,O)}for(var fa in w.getModel().cells){var S=w.getModel().getCell(fa);S!=w.rootCell&&!w.getModel().isAncestor(w.rootCell,
+S)&&w.getModel().isVertex(S)&&w.removeCells([S])}w.addCells(V);var aa=w.getModel().getGeometry(w.rootCell);null!=aa&&(aa=aa.clone(),aa.x=A-aa.width/2,aa.y=E-aa.height/3,w.getModel().setGeometry(w.rootCell,aa));y=[];for(fa in w.getModel().cells)S=w.getModel().getCell(fa),S!=w.rootCell&&w.getModel().isVertex(S)&&w.getModel().getParent(S)==w.getDefaultParent()&&(y.push(S),aa=w.getModel().getGeometry(S),null!=aa&&(aa.x=A-aa.width/2,aa.y=E-aa.height/2));var Y=y.length,ba=2*Math.PI/Y,L=Math.max(minSize,
Math.min(w.container.offsetWidth/2-40,w.container.offsetHeight/2-80));for(A=0;A<Y;A++)aa=w.getModel().getGeometry(y[A]),null!=aa&&(aa=aa.clone(),aa.x+=L*Math.sin(A*ba),aa.y+=L*Math.cos(A*ba),w.getModel().setGeometry(y[A],aa))}finally{w.getModel().endUpdate()}}}var m=document.createElement("div");m.style.position="absolute";m.style.display="block";m.style.overflow="auto";m.style.width="100%";m.style.height="100%";m.style.left="0px";m.style.top="0px";m.style.zIndex=2;m.style.background=f.background==
mxConstants.NONE||null==f.background?"light-dark(#ffffff,"+Editor.darkColor+")":f.background;var p=document.createElement("img");p.setAttribute("src",Editor.closeBlackImage);p.style.position="absolute";p.style.cursor="pointer";p.style.right="10px";p.style.top="10px";m.appendChild(p);var k=document.createElement("div");k.style.position="absolute";k.style.cursor="pointer";k.style.right="38px";k.style.top="14px";k.style.textAlign="right";k.style.verticalAlign="top";mxUtils.write(k,mxResources.get("close"));
m.appendChild(k);document.body.appendChild(m);var u=function(w){27==w.keyCode&&p.click()};mxEvent.addListener(document,"keydown",u);(function(w){var y=new Graph(w);y.keepEdgesInBackground=!0;y.isCellResizable=function(){return!1};y.isCellRotatable=function(){return!1};y.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};y.getFoldingImage=function(){return null};var A=function(){mxEvent.removeListener(document,"keydown",u);w.parentNode.removeChild(w);f.scrollCellToVisible(g)};
-mxEvent.addListener(p,"click",A);mxEvent.addListener(k,"click",A);y.setEnabled(!1);var D=y.click;y.click=function(M){var N=M.getCell(),J=null!=N?null!=N.referenceCell?N.referenceCell:N:null;null!=N&&0<y.getEdges(J).length?h(y,N):D.apply(this,arguments)};A=y.container.offsetWidth/2;var E=y.container.offsetHeight/3;y.model.beginUpdate();var F=y.importCells([g])[0];F.sourceCellId=g.id;F.geometry.x=A-F.geometry.width/2;F.geometry.y=E-F.geometry.height/2;y.model.endUpdate();var H=!1;y.getModel().addListener(mxEvent.CHANGE,
+mxEvent.addListener(p,"click",A);mxEvent.addListener(k,"click",A);y.setEnabled(!1);var E=y.click;y.click=function(M){var N=M.getCell(),J=null!=N?null!=N.referenceCell?N.referenceCell:N:null;null!=N&&0<y.getEdges(J).length?h(y,N):E.apply(this,arguments)};A=y.container.offsetWidth/2;var D=y.container.offsetHeight/3;y.model.beginUpdate();var F=y.importCells([g])[0];F.sourceCellId=g.id;F.geometry.x=A-F.geometry.width/2;F.geometry.y=D-F.geometry.height/2;y.model.endUpdate();var H=!1;y.getModel().addListener(mxEvent.CHANGE,
function(M,N){H||(M=N.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,y.labelsVisible=!1,H=!0,mxEffects.animateChanges(y,M,function(){var J=new mxParallelEdgeLayout(y);J.spacing=60;var V=J.layout;J.layout=function(W){J.spacing=Math.min(60,Math.max(30,60-5*W.length));V.apply(this,arguments)};J.execute(y.getDefaultParent());mxText.prototype.enableBoundingBox=!0;y.labelsVisible=!0;y.tooltipHandler.hide();y.refresh();d(y);H=!1}))});h(y,F)})(m)})(a,b)};
Graph.removeKeys=function(a,b){for(var e in a)b(e)&&delete a[e]};Graph.setTransitionForNodes=function(a,b){for(var e=0;e<a.length;e++)mxUtils.setPrefixedStyle(a[e].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var e=0;e<a.length;e++)a[e].style.opacity=b};
Graph.removePasteFormatting=function(a,b){for(;null!=a;){null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild,!0);var e=a.nextSibling;if(a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style){"#000000"==a.style.color&&(a.style.color="");if("SPAN"==a.nodeName&&"Apple-tab-span"==a.className){var f=Graph.createTabNode(4);a.parentNode.replaceChild(f,a);a=f}if("P"==a.nodeName&&"p1"==a.className){for(;null!=a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);null!=e&&"P"==e.nodeName&&"p1"==
@@ -2624,7 +2627,7 @@ Graph.createRemoveIcon=function(a,b){var e=document.createElement("img");e.setAt
Graph.rewritePageLinks=function(a,b){function e(g,d){var h=g.getAttribute(d);if(null!=h){Graph.isPageLink(h)&&(h="#"+h.substring(h.indexOf(":")+1));var m=d;b&&"xlink:href"==d&&(g.removeAttribute(d),m="href");g.setAttribute(m,h)}}a=a.getElementsByTagName("a");if(null!=a)for(var f=0;f<a.length;f++)e(a[f],"href"),e(a[f],"xlink:href")};Graph.isLink=function(a){return null!=a&&a.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;
Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBackground=!1;Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, #000000)";Graph.prototype.shapeForegroundColor="light-dark(#000000, #ffffff)";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";
-Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
+Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%{}\"'=;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";
Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(e,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var g=e.view.graph.tolerance,d=!0,h=null,m=mxUtils.bind(this,function(u){d=!0;h=new mxPoint(mxEvent.getClientX(u),mxEvent.getClientY(u))}),p=mxUtils.bind(this,function(u){d=d&&null!=h&&Math.abs(h.x-mxEvent.getClientX(u))<g&&Math.abs(h.y-mxEvent.getClientY(u))<g}),k=mxUtils.bind(this,function(u){if(d)for(var w=mxEvent.getSource(u);null!=
@@ -2637,14 +2640,14 @@ h.shape?h.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.ge
mxUtils.getValue(h.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(h){return!0};Graph.prototype.getVerticesAndEdges=function(h,m){h=null!=h?h:!0;m=null!=m?m:!0;var p=this.model;return p.filterDescendants(function(k){return h&&p.isVertex(k)||m&&p.isEdge(k)},p.getRoot())};Graph.prototype.applyNewEdgeStyle=function(h,m,p){h=this.getCellStyle(h).newEdgeStyle;if(null!=h){this.model.beginUpdate();try{var k=JSON.parse(h),u;for(u in k)this.setCellStyles(u,k[u],m),"edgeStyle"==
u&&"elbowEdgeStyle"==k[u]&&null!=p&&this.setCellStyles("elbow",p==mxConstants.DIRECTION_SOUTH||p==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",m)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(h){for(var m={},p=0;p<h.length;p++){var k=this.view.getState(h[p]);null!=k&&this.mergeStyle(k.style,m,0==p)}return m};Graph.prototype.mergeStyle=function(h,m,p){if(null!=h){var k={},u;for(u in h){var w=h[u];null!=w&&(k[u]=!0,null==m[u]&&p?m[u]=w:m[u]!=w&&delete m[u])}for(u in m)k[u]||
delete m[u]}};Graph.prototype.getStartEditingCell=function(h,m){m=this.getCellStyle(h);m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,0));this.isTable(h)&&(!this.isSwimlane(h)||0==m)&&""==this.getLabel(h)&&0<this.model.getChildCount(h)&&(h=this.model.getChildAt(h,0),m=this.getCellStyle(h),m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(h)&&(!this.isSwimlane(h)||0==m)&&""==this.getLabel(h)&&0<this.model.getChildCount(h))for(m=0;m<this.model.getChildCount(h);m++){var p=
-this.model.getChildAt(h,m);if(this.isCellEditable(p)){h=p;break}}return h};Graph.prototype.copyStyle=function(h){return this.getCellStyle(h,!1)};Graph.prototype.pasteStyle=function(h,m,p,k){null!=h&&(k||(p=null!=p?p:Graph.cellStyles,Graph.removeKeys(h,function(u){return 0>mxUtils.indexOf(p,u)})),this.updateCellStyles(h,m))};Graph.prototype.copyCellStyles=function(h,m,p,k,u,w,y){var A=!1,D=!1;if(0<h.length)for(var E=0;E<h.length&&(A=this.getModel().isVertex(h[E])||A,!(D=this.getModel().isEdge(h[E])||
-D)||!A);E++);else D=A=!0;A=A&&!w;D=D&&!y;for(E=0;E<m.length;E++)if(h=0<=mxUtils.indexOf(Graph.textStyles,m[E]),"strokeColor"!=m[E]||null!=p[E]&&"none"!=p[E])if(0<=mxUtils.indexOf(Graph.cellStyles,m[E])||"shape"==m[E])if("shape"!=m[E]&&(A||h)&&(null==p[E]?delete k[m[E]]:k[m[E]]=p[E]),D||h)null==p[E]?delete u[m[E]]:u[m[E]]=p[E]};Graph.prototype.includeDescendants=function(h){for(var m=[],p=0;p<h.length;p++)m=m.concat(this.model.getDescendants(h[p]));return m};Graph.prototype.pasteCellStyles=function(h,
-m,p,k,u){m=null!=m?m:this.currentVertexStyle;p=null!=p?p:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var w=0;w<h.length;w++){var y=h[w],A=this.model.getStyle(y),D=!1;null!=y.style&&(pairs=y.style.split(";"),D=D||0<=mxUtils.indexOf(pairs,"text"));if(D)var E=Graph.textStyles;else if(E=Graph.cellStyles.slice(),!k)for(var F=null!=A?A.split(";"):[],H=0;H<F.length;H++){var M=F[H],N=M.indexOf("=");if(0<=N){var J=M.substring(0,N),V=mxUtils.indexOf(E,J);0<=V&&E.splice(V,
-1);for(D=0;D<Graph.cellStyleGroups.length;D++){var W=Graph.cellStyleGroups[D];if(0<=mxUtils.indexOf(W,J))for(var T=0;T<W.length;T++){var O=mxUtils.indexOf(E,W[T]);0<=O&&E.splice(O,1)}}}}var fa=this.model.isEdge(y);D=fa?p:m;for(H=0;H<E.length;H++){J=E[H];var S=D[J];null!=S&&("edgeStyle"!=J||u)&&(fa||!fa&&0>mxUtils.indexOf(Graph.edgeStyles,J))&&(A=mxUtils.setStyle(A,J,S),"fontFamily"==J&&null==D.fontSource&&(A=mxUtils.setStyle(A,"fontSource",null)),fa&&"rounded"==J&&"1"==S&&null==D.curved&&(A=mxUtils.setStyle(A,
+this.model.getChildAt(h,m);if(this.isCellEditable(p)){h=p;break}}return h};Graph.prototype.copyStyle=function(h){return this.getCellStyle(h,!1)};Graph.prototype.pasteStyle=function(h,m,p,k){null!=h&&(k||(p=null!=p?p:Graph.cellStyles,Graph.removeKeys(h,function(u){return 0>mxUtils.indexOf(p,u)})),this.updateCellStyles(h,m))};Graph.prototype.copyCellStyles=function(h,m,p,k,u,w,y){var A=!1,E=!1;if(0<h.length)for(var D=0;D<h.length&&(A=this.getModel().isVertex(h[D])||A,!(E=this.getModel().isEdge(h[D])||
+E)||!A);D++);else E=A=!0;A=A&&!w;E=E&&!y;for(D=0;D<m.length;D++)if(h=0<=mxUtils.indexOf(Graph.textStyles,m[D]),"strokeColor"!=m[D]||null!=p[D]&&"none"!=p[D])if(0<=mxUtils.indexOf(Graph.cellStyles,m[D])||"shape"==m[D])if("shape"!=m[D]&&(A||h)&&(null==p[D]?delete k[m[D]]:k[m[D]]=p[D]),E||h)null==p[D]?delete u[m[D]]:u[m[D]]=p[D]};Graph.prototype.includeDescendants=function(h){for(var m=[],p=0;p<h.length;p++)m=m.concat(this.model.getDescendants(h[p]));return m};Graph.prototype.pasteCellStyles=function(h,
+m,p,k,u){m=null!=m?m:this.currentVertexStyle;p=null!=p?p:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var w=0;w<h.length;w++){var y=h[w],A=this.model.getStyle(y),E=!1;null!=y.style&&(pairs=y.style.split(";"),E=E||0<=mxUtils.indexOf(pairs,"text"));if(E)var D=Graph.textStyles;else if(D=Graph.cellStyles.slice(),!k)for(var F=null!=A?A.split(";"):[],H=0;H<F.length;H++){var M=F[H],N=M.indexOf("=");if(0<=N){var J=M.substring(0,N),V=mxUtils.indexOf(D,J);0<=V&&D.splice(V,
+1);for(E=0;E<Graph.cellStyleGroups.length;E++){var W=Graph.cellStyleGroups[E];if(0<=mxUtils.indexOf(W,J))for(var T=0;T<W.length;T++){var O=mxUtils.indexOf(D,W[T]);0<=O&&D.splice(O,1)}}}}var fa=this.model.isEdge(y);E=fa?p:m;for(H=0;H<D.length;H++){J=D[H];var S=E[J];null!=S&&("edgeStyle"!=J||u)&&(fa||!fa&&0>mxUtils.indexOf(Graph.edgeStyles,J))&&(A=mxUtils.setStyle(A,J,S),"fontFamily"==J&&null==E.fontSource&&(A=mxUtils.setStyle(A,"fontSource",null)),fa&&"rounded"==J&&"1"==S&&null==E.curved&&(A=mxUtils.setStyle(A,
"curved",null)))}Editor.simpleLabels&&(A=mxUtils.setStyle(mxUtils.setStyle(A,"html",null),"whiteSpace",null));this.model.setStyle(y,A)}}finally{this.model.endUpdate()}return h};Graph.prototype.updateCellStyles=function(h,m){this.model.beginUpdate();try{for(var p=0;p<m.length;p++)if(this.model.isVertex(m[p])||this.model.isEdge(m[p])){var k=this.getCellStyle(m[p],!1),u=k[mxConstants.STYLE_PERIMETER],w=!1;for(A in h){var y=h[A];if(k[A]!=y){if(A==mxConstants.STYLE_SHAPE&&"umlLifeline"==k[A]&&"umlLifeline"!=
y){w=!0;var A="participant"}this.setCellStyles(A,y,[m[p]])}}w&&this.setCellStyles(mxConstants.STYLE_PERIMETER,u,[m[p]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=
-function(h,m,p,k,u,w){this.useCssTransforms&&(h=h/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(h,m,p,k,u,w){k=null!=k?k:!0;u=null!=u?u:!0;null==p&&(p=this.getCurrentRoot(),null==p&&(p=this.getModel().getRoot()));if(null!=p)for(var y=this.model.getChildCount(p)-1;0<=y;y--){var A=this.model.getChildAt(p,y),D=this.getScaledCellAt(h,m,A,k,u,w);if(null!=D)return D;if(this.isCellVisible(A)&&
-(u&&this.model.isEdge(A)||k&&this.model.isVertex(A))&&(D=this.view.getState(A),null!=D&&(null==w||!w(D,h,m))&&this.intersects(D,h,m)))return A}return null};Graph.prototype.isRecursiveVertexResize=function(h){return!this.isSwimlane(h.cell)&&0<this.model.getChildCount(h.cell)&&!this.isCellCollapsed(h.cell)&&"1"==mxUtils.getValue(h.style,"recursiveResize","1")&&null==mxUtils.getValue(h.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(h){for(var m=this.getCellGeometry(h);null!=m&&
+function(h,m,p,k,u,w){this.useCssTransforms&&(h=h/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(h,m,p,k,u,w){k=null!=k?k:!0;u=null!=u?u:!0;null==p&&(p=this.getCurrentRoot(),null==p&&(p=this.getModel().getRoot()));if(null!=p)for(var y=this.model.getChildCount(p)-1;0<=y;y--){var A=this.model.getChildAt(p,y),E=this.getScaledCellAt(h,m,A,k,u,w);if(null!=E)return E;if(this.isCellVisible(A)&&
+(u&&this.model.isEdge(A)||k&&this.model.isVertex(A))&&(E=this.view.getState(A),null!=E&&(null==w||!w(E,h,m))&&this.intersects(E,h,m)))return A}return null};Graph.prototype.isRecursiveVertexResize=function(h){return!this.isSwimlane(h.cell)&&0<this.model.getChildCount(h.cell)&&!this.isCellCollapsed(h.cell)&&"1"==mxUtils.getValue(h.style,"recursiveResize","1")&&null==mxUtils.getValue(h.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(h){for(var m=this.getCellGeometry(h);null!=m&&
m.relative;)h=this.getModel().getParent(h),m=this.getCellGeometry(h);return h};Graph.prototype.isPart=function(h){return"1"==mxUtils.getValue(this.getCurrentCellStyle(h),"part","0")||this.isTableCell(h)||this.isTableRow(h)};Graph.prototype.getCompositeParents=function(h){for(var m=new mxDictionary,p=[],k=0;k<h.length;k++){var u=this.getCompositeParent(h[k]);this.isTableCell(u)&&(u=this.graph.model.getParent(u));this.isTableRow(u)&&(u=this.graph.model.getParent(u));null==u||m.get(u)||(m.put(u,!0),
p.push(u))}return p};Graph.prototype.getReferenceTerminal=function(h){if(null!=h){var m=this.getCellGeometry(h);null!=m&&m.relative&&(h=this.model.getParent(h))}null!=h&&this.model.isEdge(h)&&(h=this.model.getParent(h));null!=h&&(h=this.getCompositeParent(h));return h};Graph.prototype.getCompositeParent=function(h){for(;this.isPart(h);){var m=this.model.getParent(h);if(!this.model.isVertex(m))break;h=m}return h};Graph.prototype.filterSelectionCells=function(h){var m=this.getSelectionCells();if(null!=
h){for(var p=[],k=0;k<m.length;k++)h(m[k])||p.push(m[k]);m=p}return m};var a=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(h){if(this.useCssTransforms){var m=this.currentScale,p=this.currentTranslate;h=new mxRectangle((h.x+2*p.x)*m-p.x,(h.y+2*p.y)*m-p.y,h.width*m,h.height*m)}a.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(h){h=this.strokeWidth;this.graph.useCssTransforms&&(h/=this.graph.currentScale);return h};mxGraphView.prototype.getGraphBounds=
@@ -2682,16 +2685,17 @@ Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);ret
Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var f=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,h=function(H,M){H=String(H);for(M=M||2;H.length<M;)H="0"+H;return H};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(f.masks[b]||b||f.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var m=e?"getUTC":"get",p=a[m+"Date"](),k=a[m+"Day"](),u=a[m+"Month"](),w=a[m+"FullYear"](),y=a[m+"Hours"](),A=a[m+"Minutes"](),D=a[m+"Seconds"]();m=a[m+"Milliseconds"]();var E=e?0:a.getTimezoneOffset(),F={d:p,dd:h(p),ddd:f.i18n.dayNames[k],dddd:f.i18n.dayNames[k+7],m:u+1,mm:h(u+1),mmm:f.i18n.monthNames[u],mmmm:f.i18n.monthNames[u+
-12],yy:String(w).slice(2),yyyy:w,h:y%12||12,hh:h(y%12||12),H:y,HH:h(y),M:A,MM:h(A),s:D,ss:h(D),l:h(m,3),L:h(99<m?Math.round(m/10):m),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:e?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<E?"-":"+")+h(100*Math.floor(Math.abs(E)/60)+Math.abs(E)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in F?F[H]:H.slice(1,
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(f.masks[b]||b||f.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var m=e?"getUTC":"get",p=a[m+"Date"](),k=a[m+"Day"](),u=a[m+"Month"](),w=a[m+"FullYear"](),y=a[m+"Hours"](),A=a[m+"Minutes"](),E=a[m+"Seconds"]();m=a[m+"Milliseconds"]();var D=e?0:a.getTimezoneOffset(),F={d:p,dd:h(p),ddd:f.i18n.dayNames[k],dddd:f.i18n.dayNames[k+7],m:u+1,mm:h(u+1),mmm:f.i18n.monthNames[u],mmmm:f.i18n.monthNames[u+
+12],yy:String(w).slice(2),yyyy:w,h:y%12||12,hh:h(y%12||12),H:y,HH:h(y),M:A,MM:h(A),s:E,ss:h(E),l:h(m,3),L:h(99<m?Math.round(m/10):m),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:e?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<D?"-":"+")+h(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in F?F[H]:H.slice(1,
H.length-1)})};Graph.prototype.getLayerForCell=function(a){for(;null!=a&&!this.model.isLayer(a);)a=this.model.getParent(a);return a};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){b=this.getLayerForCell(a[0]);for(var e=1;e<a.length;e++)if(!this.model.isAncestor(b,a[e])){b=null;break}}return b};
Graph.prototype.createLayersDialog=function(a,b){var e=document.createElement("div");e.style.position="absolute";for(var f=this.getModel(),g=f.getChildCount(f.root),d=0;d<g;d++)mxUtils.bind(this,function(h){function m(){f.isVisible(h)?(u.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(k,75)):(u.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(k,25))}var p=this.convertValueToString(h)||mxResources.get("background")||"Background",k=document.createElement("div");k.style.overflow=
"hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";k.style.cursor="pointer";k.setAttribute("title",mxResources.get(f.isVisible(h)?"hideIt":"show",[p]));var u=document.createElement("img");u.setAttribute("draggable","false");u.setAttribute("align","absmiddle");u.setAttribute("border","0");u.style.position="relative";u.style.width="16px";u.style.padding="0px 6px 0 4px";b&&(u.style.filter="invert(100%)",u.style.top="-2px");k.appendChild(u);mxUtils.write(k,p);e.appendChild(k);
mxEvent.addListener(k,"click",function(){f.setVisible(h,!f.isVisible(h));m();null!=a&&a(h)});m()})(f.getChildAt(f.root,d));return e};
Graph.prototype.replacePlaceholders=function(a,b,e,f){f=[];if(null!=b){for(var g=0;match=this.placeholderPattern.exec(b);){var d=match[0];if(2<d.length&&"%label%"!=d&&"%tooltip%"!=d){var h=null;if(match.index>g&&"%"==b.charAt(match.index-1))h=d.substring(1);else{var m=d.substring(1,d.length-1),p={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==m)h=a.id;else if("width"===m.substring(0,5)&&this.model.isVertex(a)){var k=this.getCellGeometry(a);
null!=k&&(h=k.width,5<m.length&&(h=Editor.toUnit(h,p[m.substring(6)])))}else if("height"==m.substring(0,6)&&this.model.isVertex(a))k=this.getCellGeometry(a),null!=k&&(h=k.height,6<m.length&&(h=Editor.toUnit(h,p[m.substring(7)])));else if("length"==m.substring(0,6)){for(k=a;null!=k&&!this.model.isEdge(k);)k=this.model.getParent(k);k=this.view.getState(k);null!=k&&(h=Math.round(k.length/this.view.scale),6<m.length&&(h=Editor.toUnit(h,p[m.substring(7)])))}else if(0>m.indexOf("{"))for(p=a;null==h&&null!=
-p;)null!=p.value&&"object"==typeof p.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(h=p.getAttribute(m+"_"+Graph.diagramLanguage)),null==h&&(h=p.hasAttribute(m)?null!=p.getAttribute(m)?p.getAttribute(m):"":null)),p=this.model.getParent(p);null==h&&(h=this.getGlobalVariable(m));null==h&&null!=e&&(h=e[m])}f.push(b.substring(g,match.index)+(null!=h?h:d));g=match.index+d.length}}f.push(b.substring(g))}return f.join("")};
-Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var f=this.model.getCell(a[e].id);null!=f&&b.push(f)}this.setSelectionCells(b)}else this.clearSelection()};Graph.prototype.selectCellForEvent=function(a,b){mxEvent.isShiftDown(b)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),a)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
+p;)null!=p.value&&"object"==typeof p.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(h=p.getAttribute(m+"_"+Graph.diagramLanguage)),null==h&&(h=p.hasAttribute(m)?null!=p.getAttribute(m)?p.getAttribute(m):"":null)),p=this.model.getParent(p);null==h&&("pagecount"==m.substring(0,9)&&9<m.length||"pagenumber"==m.substring(0,10)&&10<m.length?(p=m.match(/(pagecount|pagenumber)[\s]*([+-])[\s]*(\d+)/),null!=p&&(h=this.getGlobalVariable(p[1]),3<p.length&&(k=parseInt(p[3]),h+="+"==p[2]?k:-k))):
+h=this.getGlobalVariable(m));null==h&&null!=e&&(h=e[m])}f.push(b.substring(g,match.index)+(null!=h?h:d));g=match.index+d.length}}f.push(b.substring(g))}return f.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var f=this.model.getCell(a[e].id);null!=f&&b.push(f)}this.setSelectionCells(b)}else this.clearSelection()};
+Graph.prototype.selectCellForEvent=function(a,b){mxEvent.isShiftDown(b)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),a)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
Graph.prototype.selectTableRange=function(a,b){var e=!1;if(this.isTableCell(a)&&this.isTableCell(b)){var f=this.model.getParent(a),g=this.model.getParent(f),d=this.model.getParent(b);if(g==this.model.getParent(d)){a=f.getIndex(a);f=g.getIndex(f);var h=d.getIndex(b),m=g.getIndex(d);d=Math.max(f,m);b=Math.min(a,h);a=Math.max(a,h);h=[];for(f=Math.min(f,m);f<=d;f++){m=this.model.getChildAt(g,f);for(var p=b;p<=a;p++)h.push(this.model.getChildAt(m,p))}0<h.length&&(1<h.length||1<this.getSelectionCount()||
!this.isCellSelected(h[0]))&&(this.setSelectionCells(h),e=!0)}}return e};
Graph.prototype.snapCellsToGrid=function(a,b){this.getModel().beginUpdate();try{for(var e=0;e<a.length;e++){var f=a[e],g=this.getCellGeometry(f);if(null!=g){g=g.clone();if(this.getModel().isVertex(f))g.x=Math.round(g.x/b)*b,g.y=Math.round(g.y/b)*b,g.width=Math.round(g.width/b)*b,g.height=Math.round(g.height/b)*b;else if(this.getModel().isEdge(f)&&null!=g.points)for(var d=0;d<g.points.length;d++)g.points[d].x=Math.round(g.points[d].x/b)*b,g.points[d].y=Math.round(g.points[d].y/b)*b;this.getModel().setGeometry(f,
@@ -2702,11 +2706,11 @@ Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.mo
Graph.prototype.insertEdgeBeforeCell=function(a,b){for(var e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=a.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==a.parent&&(b=e.parent.getIndex(e),this.model.add(e.parent,a,b))};
Graph.prototype.connectVertex=function(a,b,e,f,g,d,h,m){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var p=this.isCloneConnectSource(a),k=p?a:this.getCompositeParent(a),u=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(k.geometry.x,k.geometry.y);b==mxConstants.DIRECTION_NORTH?(u.x+=k.geometry.width/2,u.y-=e):b==
mxConstants.DIRECTION_SOUTH?(u.x+=k.geometry.width/2,u.y+=k.geometry.height+e):(u.x=b==mxConstants.DIRECTION_WEST?u.x-e:u.x+(k.geometry.width+e),u.y+=k.geometry.height/2);var w=this.view.getState(this.model.getParent(a));e=this.view.scale;var y=this.view.translate;k=y.x*e;y=y.y*e;null!=w&&this.model.isVertex(w.cell)&&(k=w.x,y=w.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(u.x+=a.parent.geometry.x,u.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(k+u.x*e,y+u.y*e)).grow(40*e);d=null!=d?
-this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var A=null,D=null;if(null!=d){d=d.reverse();for(var E=0;E<d.length;E++)if(!this.isCellLocked(d[E])&&!this.model.isEdge(d[E])&&d[E]!=a)if(!this.model.isAncestor(a,d[E])&&this.isContainer(d[E])&&(null==A||d[E]==this.model.getParent(a)))A=d[E];else if(null==D&&this.isCellConnectable(d[E])&&!this.model.isAncestor(d[E],a)&&!this.isSwimlane(d[E])){var F=this.view.getState(d[E]);null==w||null==F||mxUtils.intersects(w,F)||(D=d[E])}}var H=
-!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||g;H&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var M=[],N=D;D=A;g=mxUtils.bind(this,function(J){if(null==h||null!=J||null==D&&p){this.model.beginUpdate();try{if(null==N&&H){var V=this.getAbsoluteParent(null!=J?J:a);V=p?a:this.getCompositeParent(V);N=null!=J?J:this.duplicateCells([V],
-!1)[0];null!=J&&this.addCells([N],this.model.getParent(a),null,null,null,!0);var W=this.getCellGeometry(N);null!=W&&(null!=J&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=W.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=W.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-W.width/2:u.x+W.width/2),W.x=u.x-W.width/2,W.y=u.y-W.height/2);null!=A?(this.addCells([N],A,null,null,null,!0),D=null):H&&!p&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var T=mxEvent.isControlDown(f)&&
-mxEvent.isShiftDown(f)&&H||null==D&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,N,this.createCurrentEdgeStyle());null!=T&&(M.push(T),this.applyNewEdgeStyle(a,[T],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(T,a));if(null==D&&null!=N&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var O=a.parent.getIndex(a);this.model.add(a.parent,N,O)}null==D&&null!=N&&M.push(N);null==N&&null!=T&&T.geometry.setTerminalPoint(u,!1);null!=T&&this.fireEvent(new mxEventObject("cellsInserted",
-"cells",[T]))}finally{this.model.endUpdate()}}if(null!=m)m(M);else return M});if(null==h||null!=N||!H||null==D&&p)return g(N);h(k+u.x*e,y+u.y*e,g)};
+this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var A=null,E=null;if(null!=d){d=d.reverse();for(var D=0;D<d.length;D++)if(!this.isCellLocked(d[D])&&!this.model.isEdge(d[D])&&d[D]!=a)if(!this.model.isAncestor(a,d[D])&&this.isContainer(d[D])&&(null==A||d[D]==this.model.getParent(a)))A=d[D];else if(null==E&&this.isCellConnectable(d[D])&&!this.model.isAncestor(d[D],a)&&!this.isSwimlane(d[D])){var F=this.view.getState(d[D]);null==w||null==F||mxUtils.intersects(w,F)||(E=d[D])}}var H=
+!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||g;H&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var M=[],N=E;E=A;g=mxUtils.bind(this,function(J){if(null==h||null!=J||null==E&&p){this.model.beginUpdate();try{if(null==N&&H){var V=this.getAbsoluteParent(null!=J?J:a);V=p?a:this.getCompositeParent(V);N=null!=J?J:this.duplicateCells([V],
+!1)[0];null!=J&&this.addCells([N],this.model.getParent(a),null,null,null,!0);var W=this.getCellGeometry(N);null!=W&&(null!=J&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=W.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=W.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-W.width/2:u.x+W.width/2),W.x=u.x-W.width/2,W.y=u.y-W.height/2);null!=A?(this.addCells([N],A,null,null,null,!0),E=null):H&&!p&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var T=mxEvent.isControlDown(f)&&
+mxEvent.isShiftDown(f)&&H||null==E&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,N,this.createCurrentEdgeStyle());null!=T&&(M.push(T),this.applyNewEdgeStyle(a,[T],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(T,a));if(null==E&&null!=N&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var O=a.parent.getIndex(a);this.model.add(a.parent,N,O)}null==E&&null!=N&&M.push(N);null==N&&null!=T&&T.geometry.setTerminalPoint(u,!1);null!=T&&this.fireEvent(new mxEventObject("cellsInserted",
+"cells",[T]))}finally{this.model.endUpdate()}}if(null!=m)m(M);else return M});if(null==h||null!=N||!H||null==E&&p)return g(N);h(k+u.x*e,y+u.y*e,g)};
Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),e=[],f,g=0;g<a.length;g++)if(f=a[g],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(b.innerHTML=Graph.sanitizeHtml(this.getLabel(f)),f=mxUtils.extractTextWithWhitespace([b])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&e.push(f);return e.join(" ")};
Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var e=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var f=a;null==e&&null!=f;)null!=f.value&&"object"==typeof f.value&&(e=f.hasAttribute(b)?null!=f.getAttribute(b)?f.getAttribute(b):"":null),f=this.model.getParent(f)}else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=b.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a,b){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),b||(a=mxUtils.removeJavascriptProtocol(a)),a):null};
@@ -2792,25 +2796,25 @@ TableLayout.prototype.getRowLayout=function(a,b){var e=this.graph.model.getChild
TableLayout.prototype.layoutRow=function(a,b,e,f){var g=this.graph.getModel(),d=g.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var h=a.x,m=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var p=0;p<d.length;p++){var k=this.graph.getCellGeometry(d[p]);null!=k&&(k=k.clone(),k.y=a.y,k.height=e-a.y-a.height,null!=b?(k.x=b[p],k.width=b[p+1]-k.x,p==d.length-1&&p<b.length-2&&(k.width=f-k.x-a.x-a.width)):(k.x=h,h+=k.width,p==d.length-1?k.width=f-a.x-a.width-m:m+=k.width),k.alternateBounds=new mxRectangle(0,
0,k.width,k.height),g.setGeometry(d[p],k))}return m};
TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getCellGeometry(a),f=this.graph.getCellStyle(a),g="1"==mxUtils.getValue(f,"resizeLastRow","0"),d="1"==mxUtils.getValue(f,"resizeLast","0");f="1"==mxUtils.getValue(f,"fixedRows","0");var h=this.graph.getModel(),m=0;h.beginUpdate();try{for(var p=e.height-b.y-b.height,k=e.width-b.x-b.width,u=h.getChildCells(a,!0),w=0;w<u.length;w++)h.setVisible(u[w],!0);var y=this.getSize(u,!1);if(0<p&&0<k&&0<
-u.length&&0<y){if(g){var A=this.graph.getCellGeometry(u[u.length-1]);null!=A&&(A=A.clone(),A.height=p-y+A.height,h.setGeometry(u[u.length-1],A))}var D=d?null:this.getRowLayout(u[0],k),E=[],F=b.y;for(w=0;w<u.length;w++)A=this.graph.getCellGeometry(u[w]),null!=A&&(A=A.clone(),A.x=b.x,A.width=k,A.y=Math.round(F),F=g||f?F+A.height:F+A.height/y*p,A.height=Math.round(F)-A.y,h.setGeometry(u[w],A)),m=Math.max(m,this.layoutRow(u[w],D,A.height,k,E));f&&p<y&&(e=e.clone(),e.height=F+b.height,h.setGeometry(a,
+u.length&&0<y){if(g){var A=this.graph.getCellGeometry(u[u.length-1]);null!=A&&(A=A.clone(),A.height=p-y+A.height,h.setGeometry(u[u.length-1],A))}var E=d?null:this.getRowLayout(u[0],k),D=[],F=b.y;for(w=0;w<u.length;w++)A=this.graph.getCellGeometry(u[w]),null!=A&&(A=A.clone(),A.x=b.x,A.width=k,A.y=Math.round(F),F=g||f?F+A.height:F+A.height/y*p,A.height=Math.round(F)-A.y,h.setGeometry(u[w],A)),m=Math.max(m,this.layoutRow(u[w],E,A.height,k,D));f&&p<y&&(e=e.clone(),e.height=F+b.height,h.setGeometry(a,
e));d&&k<m+Graph.minTableColumnWidth&&(e=e.clone(),e.width=m+b.width+b.x+Graph.minTableColumnWidth,h.setGeometry(a,e));this.graph.visitTableCells(a,mxUtils.bind(this,function(H){h.setVisible(H.cell,H.actual.cell==H.cell);if(H.actual.cell!=H.cell){if(H.actual.row==H.row){var M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo;H.actual.geo.width+=M.width}H.actual.col==H.col&&(M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo,H.actual.geo.height+=M.height)}}))}else for(w=0;w<u.length;w++)h.setVisible(u[w],
!1)}finally{h.endUpdate()}}};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(w,y){y=null!=y?y:!0;var A=this.getState(w);null!=A&&y&&this.graph.model.isEdge(A.cell)&&null!=A.style&&1!=A.style[mxConstants.STYLE_CURVED]&&!A.invalid&&this.updateLineJumps(A)&&this.graph.cellRenderer.redraw(A,!1,this.isRendering());A=b.apply(this,
arguments);null!=A&&y&&this.graph.model.isEdge(A.cell)&&null!=A.style&&1!=A.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(A);return A};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(w){var y=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
-y)for(var A=null,D=0;D<y.length;D++)if("hidden"!=y[D].getAttribute("visibility")){if(!(null!=A&&A!=y[D].getAttribute("d")||null!=w&&0!=--w))return y[D]}else null==A&&(A=y[D].getAttribute("d"));return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(w){e.apply(this,
+y)for(var A=null,E=0;E<y.length;E++)if("hidden"!=y[E].getAttribute("visibility")){if(!(null!=A&&A!=y[E].getAttribute("d")||null!=w&&0!=--w))return y[E]}else null==A&&(A=y[E].getAttribute("d"));return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(w){e.apply(this,
arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var f=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(w){w=f.apply(this,arguments);null!=this.state&&(w.adaptiveColors=this.state.view.graph.getAdaptiveColors());return w};var g=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(w,y){return g.apply(this,arguments)||null!=w.routedPoints&&null!=y.routedPoints&&!mxUtils.equalPoints(y.routedPoints,w.routedPoints)};
-var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var y=w.absolutePoints;if(Graph.lineJumpsEnabled){var A=null!=w.routedPoints,D=null;if(null!=y&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var E=function(ba,L,U){var X=new mxPoint(L,U);X.type=ba;D.push(X);
-X=null!=w.routedPoints?w.routedPoints[D.length-1]:null;return null==X||X.type!=ba||X.x!=L||X.y!=U},F=.5*this.scale;A=!1;D=[];for(var H=0;H<y.length-1;H++){for(var M=y[H+1],N=y[H],J=[],V=y[H+2];H<y.length-2&&mxUtils.ptSegDistSq(N.x,N.y,V.x,V.y,M.x,M.y)<1*this.scale*this.scale;)M=V,H++,V=y[H+2];A=E(0,N.x,N.y)||A;for(var W=0;W<this.validEdges.length;W++){var T=this.validEdges[W],O=T.absolutePoints;if(null!=O&&mxUtils.intersects(w,T)&&"1"!=T.style.noJump){var fa=null;for(T=0;T<O.length-1;T++){var S=O[T+
+var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var y=w.absolutePoints;if(Graph.lineJumpsEnabled){var A=null!=w.routedPoints,E=null;if(null!=y&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var D=function(ba,L,U){var X=new mxPoint(L,U);X.type=ba;E.push(X);
+X=null!=w.routedPoints?w.routedPoints[E.length-1]:null;return null==X||X.type!=ba||X.x!=L||X.y!=U},F=.5*this.scale;A=!1;E=[];for(var H=0;H<y.length-1;H++){for(var M=y[H+1],N=y[H],J=[],V=y[H+2];H<y.length-2&&mxUtils.ptSegDistSq(N.x,N.y,V.x,V.y,M.x,M.y)<1*this.scale*this.scale;)M=V,H++,V=y[H+2];A=D(0,N.x,N.y)||A;for(var W=0;W<this.validEdges.length;W++){var T=this.validEdges[W],O=T.absolutePoints;if(null!=O&&mxUtils.intersects(w,T)&&"1"!=T.style.noJump){var fa=null;for(T=0;T<O.length-1;T++){var S=O[T+
1],aa=O[T];for(V=O[T+2];T<O.length-2&&mxUtils.ptSegDistSq(aa.x,aa.y,V.x,V.y,S.x,S.y)<1*this.scale*this.scale;)S=V,T++,V=O[T+2];var Y=mxUtils.intersection(N.x,N.y,M.x,M.y,aa.x,aa.y,S.x,S.y);if(null!=Y&&(Math.abs(Y.x-N.x)>F||Math.abs(Y.y-N.y)>F)&&(Math.abs(Y.x-M.x)>F||Math.abs(Y.y-M.y)>F)&&(null==fa||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,fa.x,fa.y)>F||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,aa.x,aa.y)>F)&&(null==V||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,V.x,V.y)>F||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,S.x,S.y)>F)){V=
-Y.x-N.x;fa=Y.y-N.y;Y={distSq:V*V+fa*fa,x:Y.x,y:Y.y};for(V=0;V<J.length;V++)if(J[V].distSq>Y.distSq){J.splice(V,0,Y);Y=null;break}null==Y||0!=J.length&&J[J.length-1].x===Y.x&&J[J.length-1].y===Y.y||J.push(Y)}fa=aa}}}for(T=0;T<J.length;T++)A=E(1,J[T].x,J[T].y)||A}Y=y[y.length-1];A=E(0,Y.x,Y.y)||A}w.routedPoints=D;return A}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,y,A){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==
-this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)h.apply(this,arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,E=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,M=null,N=null,J=[],V=null;w.begin();for(var W=0;W<this.state.routedPoints.length;W++){var T=this.state.routedPoints[W],O=new mxPoint(T.x/
-this.scale,T.y/this.scale);0==W?O=y[0]:W==this.state.routedPoints.length-1&&(O=y[y.length-1]);var fa=!1;if(null!=M&&1==T.type){var S=this.state.routedPoints[W+1];T=S.x/this.scale-O.x;S=S.y/this.scale-O.y;T=T*T+S*S;null==V&&(V=new mxPoint(O.x-M.x,O.y-M.y),N=Math.sqrt(V.x*V.x+V.y*V.y),0<N?(V.x=V.x*E/N,V.y=V.y*E/N):V=null);T>E*E&&0<N&&(T=M.x-O.x,S=M.y-O.y,T=T*T+S*S,T>E*E&&(fa=new mxPoint(O.x-V.x,O.y-V.y),T=new mxPoint(O.x+V.x,O.y+V.y),J.push(fa),this.addPoints(w,J,A,D,!1,null,H),J=0>Math.round(V.x)||
-0==Math.round(V.x)&&0>=Math.round(V.y)?1:-1,H=!1,"sharp"==F?(w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.lineTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x,T.y)):"line"==F?(w.moveTo(fa.x+V.y*J,fa.y-V.x*J),w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.moveTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x+V.y*J,T.y-V.x*J),w.moveTo(T.x,T.y)):"arc"==F?(J*=1.3,w.curveTo(fa.x-V.y*J,fa.y+V.x*J,T.x-V.y*J,T.y+V.x*J,T.x,T.y)):(w.moveTo(T.x,T.y),H=!0),J=[T],fa=!0))}else V=null;fa||(J.push(O),M=O)}this.addPoints(w,J,A,D,!1,null,H);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;
-mxGraphView.prototype.getFixedTerminalPoint=function(w,y,A,D){return null!=y&&"centerPerimeter"==y.style[mxConstants.STYLE_PERIMETER]?new mxPoint(y.getCenterX(),y.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,y,A,D){if(null==y||null==w||"1"!=y.style.snapToPoint&&"1"!=w.style.snapToPoint)p.apply(this,arguments);else{y=this.getTerminalPort(w,y,D);var E=this.getNextPoint(w,A,D),F=this.graph.isOrthogonal(w),
-H=mxUtils.toRadians(Number(y.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(y.getCenterX(),y.getCenterY());if(0!=H){var N=Math.cos(-H),J=Math.sin(-H);E=mxUtils.getRotatedPoint(E,N,J,M)}N=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(w.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);E=this.getPerimeterPoint(y,E,0==H&&F,N);0!=H&&(N=Math.cos(H),J=Math.sin(H),E=mxUtils.getRotatedPoint(E,N,J,M));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,
-y,A,D,E),D)}};mxGraphView.prototype.snapToAnchorPoint=function(w,y,A,D,E){if(null!=y&&null!=w){w=this.graph.getAllConnectionConstraints(y);D=A=null;if(null!=w)for(var F=0;F<w.length;F++){var H=this.graph.getConnectionPoint(y,w[F]);if(null!=H){var M=(H.x-E.x)*(H.x-E.x)+(H.y-E.y)*(H.y-E.y);if(null==D||M<D)A=H,D=M}}null!=A&&(E=A)}return E};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,y,A){var D=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&
-null!=A.state&&(D=A.state.view.graph.replacePlaceholders(A.state.cell,D));return D};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(w){if(null!=w.style&&"undefined"!==typeof pako){var y=mxUtils.getValue(w.style,mxConstants.STYLE_SHAPE,null);if(null!=y&&"string"===typeof y&&"stencil("==y.substring(0,8))try{var A=y.substring(8,y.length-1),D=mxUtils.parseXml(Graph.decompress(A));return new mxShape(new mxStencil(D.documentElement))}catch(E){null!=window.console&&
-console.log("Error in shape: "+E)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(a){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[a]};mxStencilRegistry.setFileLoaded=function(a){mxStencilRegistry.filesLoaded[a]=!0};
+Y.x-N.x;fa=Y.y-N.y;Y={distSq:V*V+fa*fa,x:Y.x,y:Y.y};for(V=0;V<J.length;V++)if(J[V].distSq>Y.distSq){J.splice(V,0,Y);Y=null;break}null==Y||0!=J.length&&J[J.length-1].x===Y.x&&J[J.length-1].y===Y.y||J.push(Y)}fa=aa}}}for(T=0;T<J.length;T++)A=D(1,J[T].x,J[T].y)||A}Y=y[y.length-1];A=D(0,Y.x,Y.y)||A}w.routedPoints=E;return A}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,y,A){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==
+this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)h.apply(this,arguments);else{var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,D=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,M=null,N=null,J=[],V=null;w.begin();for(var W=0;W<this.state.routedPoints.length;W++){var T=this.state.routedPoints[W],O=new mxPoint(T.x/
+this.scale,T.y/this.scale);0==W?O=y[0]:W==this.state.routedPoints.length-1&&(O=y[y.length-1]);var fa=!1;if(null!=M&&1==T.type){var S=this.state.routedPoints[W+1];T=S.x/this.scale-O.x;S=S.y/this.scale-O.y;T=T*T+S*S;null==V&&(V=new mxPoint(O.x-M.x,O.y-M.y),N=Math.sqrt(V.x*V.x+V.y*V.y),0<N?(V.x=V.x*D/N,V.y=V.y*D/N):V=null);T>D*D&&0<N&&(T=M.x-O.x,S=M.y-O.y,T=T*T+S*S,T>D*D&&(fa=new mxPoint(O.x-V.x,O.y-V.y),T=new mxPoint(O.x+V.x,O.y+V.y),J.push(fa),this.addPoints(w,J,A,E,!1,null,H),J=0>Math.round(V.x)||
+0==Math.round(V.x)&&0>=Math.round(V.y)?1:-1,H=!1,"sharp"==F?(w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.lineTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x,T.y)):"line"==F?(w.moveTo(fa.x+V.y*J,fa.y-V.x*J),w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.moveTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x+V.y*J,T.y-V.x*J),w.moveTo(T.x,T.y)):"arc"==F?(J*=1.3,w.curveTo(fa.x-V.y*J,fa.y+V.x*J,T.x-V.y*J,T.y+V.x*J,T.x,T.y)):(w.moveTo(T.x,T.y),H=!0),J=[T],fa=!0))}else V=null;fa||(J.push(O),M=O)}this.addPoints(w,J,A,E,!1,null,H);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;
+mxGraphView.prototype.getFixedTerminalPoint=function(w,y,A,E){return null!=y&&"centerPerimeter"==y.style[mxConstants.STYLE_PERIMETER]?new mxPoint(y.getCenterX(),y.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,y,A,E){if(null==y||null==w||"1"!=y.style.snapToPoint&&"1"!=w.style.snapToPoint)p.apply(this,arguments);else{y=this.getTerminalPort(w,y,E);var D=this.getNextPoint(w,A,E),F=this.graph.isOrthogonal(w),
+H=mxUtils.toRadians(Number(y.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(y.getCenterX(),y.getCenterY());if(0!=H){var N=Math.cos(-H),J=Math.sin(-H);D=mxUtils.getRotatedPoint(D,N,J,M)}N=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(w.style[E?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);D=this.getPerimeterPoint(y,D,0==H&&F,N);0!=H&&(N=Math.cos(H),J=Math.sin(H),D=mxUtils.getRotatedPoint(D,N,J,M));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,
+y,A,E,D),E)}};mxGraphView.prototype.snapToAnchorPoint=function(w,y,A,E,D){if(null!=y&&null!=w){w=this.graph.getAllConnectionConstraints(y);E=A=null;if(null!=w)for(var F=0;F<w.length;F++){var H=this.graph.getConnectionPoint(y,w[F]);if(null!=H){var M=(H.x-D.x)*(H.x-D.x)+(H.y-D.y)*(H.y-D.y);if(null==E||M<E)A=H,E=M}}null!=A&&(D=A)}return D};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,y,A){var E=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&
+null!=A.state&&(E=A.state.view.graph.replacePlaceholders(A.state.cell,E));return E};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(w){if(null!=w.style&&"undefined"!==typeof pako){var y=mxUtils.getValue(w.style,mxConstants.STYLE_SHAPE,null);if(null!=y&&"string"===typeof y&&"stencil("==y.substring(0,8))try{var A=y.substring(8,y.length-1),E=mxUtils.parseXml(Graph.decompress(A));return new mxShape(new mxStencil(E.documentElement))}catch(D){null!=window.console&&
+console.log("Error in shape: "+D)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(a){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[a]};mxStencilRegistry.setFileLoaded=function(a){mxStencilRegistry.filesLoaded[a]=!0};
mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var f=0;f<b.length;f++){var g=b[f];if(!mxStencilRegistry.isFileLoaded(g))if(mxStencilRegistry.setFileLoaded(g),".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g,
null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var d=mxUtils.load(g);null!=d&&200<=d.getStatus()&&299>=d.getStatus()&&eval.call(window,d.getText())}}catch(h){null!=window.console&&console.log("error in getStencil:",a,e,b,g,h)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0])){b=a[1];for(var e=2;e<a.length-1;e++)b+="/"+a[e]}return b};
@@ -2852,8 +2856,8 @@ null!=C&&C.constructor==mxStackLayout&&(B=!1))}return B};Graph.prototype.getPref
!1);C.setTerminal(Q,ka,!0);C.setTerminal(Q,Z,!1);var ha=C.getGeometry(Q);if(null!=ha){ha=ha.clone();null!=ha.points&&ha.points.reverse();var la=ha.getTerminalPoint(!0),ya=ha.getTerminalPoint(!1);ha.setTerminalPoint(la,!1);ha.setTerminalPoint(ya,!0);C.setGeometry(Q,ha);var La=this.view.getState(Q),Ha=this.view.getState(Z),xa=this.view.getState(ka);if(null!=La){var Ga=null!=Ha?this.getConnectionConstraint(La,Ha,!0):null,va=null!=xa?this.getConnectionConstraint(La,xa,!1):null;this.setConnectionConstraint(Q,
Z,!0,va);this.setConnectionConstraint(Q,ka,!1,Ga);var ua=mxUtils.getValue(La.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(La.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[Q]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[Q])}G.push(Q)}}else if(C.isVertex(Q)&&(ha=this.getCellGeometry(Q),null!=ha)){if(!(this.isTable(Q)||this.isTableRow(Q)||this.isTableCell(Q)||this.isSwimlane(Q))){ha=ha.clone();
ha.x+=ha.width/2-ha.height/2;ha.y+=ha.height/2-ha.width/2;var Sa=ha.width;ha.width=ha.height;ha.height=Sa;C.setGeometry(Q,ha)}var Qa=this.view.getState(Q);if(null!=Qa){var Na=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ra=mxUtils.getValue(Qa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Na[mxUtils.mod(mxUtils.indexOf(Na,Ra)+(B?-1:1),Na.length)],[Q])}G.push(Q)}}}finally{C.endUpdate()}return G};
-Graph.prototype.stencilHasPlaceholders=function(q){if(null!=q&&null!=q.fgNode)for(q=q.fgNode.firstChild;null!=q;){if("text"==q.nodeName&&"1"==q.getAttribute("placeholders"))return!0;q=q.nextSibling}return!1};var D=Graph.prototype.processChange;Graph.prototype.processChange=function(q){if(q instanceof mxGeometryChange&&(this.isTableCell(q.cell)||this.isTableRow(q.cell))&&(null==q.previous&&null!=q.geometry||null!=q.previous&&!q.previous.equals(q.geometry))){var B=q.cell;this.isTableCell(B)&&(B=this.model.getParent(B));
-this.isTableRow(B)&&(B=this.model.getParent(B));var C=this.view.getState(B);null!=C&&null!=C.shape&&(this.view.invalidate(B),C.shape.bounds=null)}D.apply(this,arguments);q instanceof mxValueChange&&null!=q.cell&&null!=q.cell.value&&"object"==typeof q.cell.value&&this.invalidateDescendantsWithPlaceholders(q.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(q){q=this.model.getDescendants(q);if(0<q.length)for(var B=0;B<q.length;B++){var C=this.view.getState(q[B]);null!=C&&null!=C.shape&&
+Graph.prototype.stencilHasPlaceholders=function(q){if(null!=q&&null!=q.fgNode)for(q=q.fgNode.firstChild;null!=q;){if("text"==q.nodeName&&"1"==q.getAttribute("placeholders"))return!0;q=q.nextSibling}return!1};var E=Graph.prototype.processChange;Graph.prototype.processChange=function(q){if(q instanceof mxGeometryChange&&(this.isTableCell(q.cell)||this.isTableRow(q.cell))&&(null==q.previous&&null!=q.geometry||null!=q.previous&&!q.previous.equals(q.geometry))){var B=q.cell;this.isTableCell(B)&&(B=this.model.getParent(B));
+this.isTableRow(B)&&(B=this.model.getParent(B));var C=this.view.getState(B);null!=C&&null!=C.shape&&(this.view.invalidate(B),C.shape.bounds=null)}E.apply(this,arguments);q instanceof mxValueChange&&null!=q.cell&&null!=q.cell.value&&"object"==typeof q.cell.value&&this.invalidateDescendantsWithPlaceholders(q.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(q){q=this.model.getDescendants(q);if(0<q.length)for(var B=0;B<q.length;B++){var C=this.view.getState(q[B]);null!=C&&null!=C.shape&&
null!=C.shape.stencil&&this.stencilHasPlaceholders(C.shape.stencil)?this.removeStateForCell(q[B]):this.isReplacePlaceholders(q[B])&&this.view.invalidate(q[B],!1,!1)}};Graph.prototype.replaceElement=function(q,B){B=q.ownerDocument.createElement(null!=B?B:"span");for(var C=Array.prototype.slice.call(q.attributes);attr=C.pop();)B.setAttribute(attr.nodeName,attr.nodeValue);B.innerHTML=q.innerHTML;q.parentNode.replaceChild(B,q)};Graph.prototype.processElements=function(q,B){if(null!=q){q=q.getElementsByTagName("*");
for(var C=0;C<q.length;C++)null!=q[C]&&B(q[C])}};Graph.prototype.updateLabelElements=function(q,B,C){q=null!=q?q:this.getSelectionCells();for(var G=document.createElement("div"),K=0;K<q.length;K++){var Q=this.getCurrentCellStyle(q[K]);if(null!=Q&&"1"==Q.html&&(Q=this.convertValueToString(q[K]),null!=Q&&0<Q.length)){G.innerHTML=Graph.sanitizeHtml(Q);for(var Z=G.getElementsByTagName(null!=C?C:"*"),ka=0;ka<Z.length;ka++)B(Z[ka]);G.innerHTML!=Q&&this.cellLabelChanged(q[K],G.innerHTML)}}};Graph.prototype.cellLabelChanged=
function(q,B,C){B=Graph.zapGremlins(B);this.model.beginUpdate();try{if(null!=q.value&&"object"==typeof q.value){if(this.isReplacePlaceholders(q)&&null!=q.getAttribute("placeholder"))for(var G=q.getAttribute("placeholder"),K=q;null!=K;){if(K==this.model.getRoot()||null!=K.value&&"object"==typeof K.value&&K.hasAttribute(G)){this.setAttributeForCell(K,G,B);break}K=this.model.getParent(K)}var Q=q.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&Q.hasAttribute("label_"+Graph.diagramLanguage)?
@@ -2861,7 +2865,7 @@ Q.setAttribute("label_"+Graph.diagramLanguage,B):Q.setAttribute("label",B);B=Q}m
this.isCellDeletable(K.cell)&&this.isTransparentState(K)){for(var Q=!0,Z=0;Z<this.model.getChildCount(K.cell)&&Q;Z++)B.get(this.model.getChildAt(K.cell,Z))||(Q=!1);Q&&q.push(K.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(q){for(var B=[],C=0;C<q.length;C++)this.isCellDeletable(q[C])&&this.isTransparentState(this.view.getState(q[C]))&&B.push(q[C]);q=B;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=
function(q,B){this.setAttributeForCell(q,"link",B)};Graph.prototype.setTooltipForCell=function(q,B){var C="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(q.value)&&q.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(C="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(q,C,B)};Graph.prototype.getAttributeForCell=function(q,B,C){q=null!=q.value&&"object"===typeof q.value?q.value.getAttribute(B):null;return null!=q?q:C};Graph.prototype.setAttributeForCell=function(q,
B,C){if(null!=q.value&&"object"==typeof q.value)var G=q.value.cloneNode(!0);else G=mxUtils.createXmlDocument().createElement("UserObject"),G.setAttribute("label",q.value||"");null!=C?G.setAttribute(B,C):G.removeAttribute(B);this.model.setValue(q,G)};Graph.prototype.isTargetShape=function(q,B,C){q=mxUtils.getValue(this.getCurrentCellStyle(q),mxConstants.STYLE_SHAPE,"");for(C=0;C<B.length;C++){var G=mxUtils.getValue(this.getCurrentCellStyle(B[C]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(G,
-q))return!0}return!1};var E=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,B,C,G){if(mxEvent.isAltDown(B))return null;for(var K=0;K<q.length;K++){var Q=this.model.getParent(q[K]);if(this.model.isEdge(Q)&&0>mxUtils.indexOf(q,Q))return null}Q=E.apply(this,arguments);var Z=!0;for(K=0;K<q.length&&Z;K++)Z=Z&&this.isTableRow(q[K]);Z&&(this.isTableCell(Q)&&(Q=this.model.getParent(Q)),this.isTableRow(Q)&&(Q=this.model.getParent(Q)),this.isTable(Q)||(Q=null));return Q};Graph.prototype.click=
+q))return!0}return!1};var D=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,B,C,G){if(mxEvent.isAltDown(B))return null;for(var K=0;K<q.length;K++){var Q=this.model.getParent(q[K]);if(this.model.isEdge(Q)&&0>mxUtils.indexOf(q,Q))return null}Q=D.apply(this,arguments);var Z=!0;for(K=0;K<q.length&&Z;K++)Z=Z&&this.isTableRow(q[K]);Z&&(this.isTableCell(Q)&&(Q=this.model.getParent(Q)),this.isTableRow(Q)&&(Q=this.model.getParent(Q)),this.isTable(Q)||(Q=null));return Q};Graph.prototype.click=
function(q){mxGraph.prototype.click.call(this,q);this.firstClickState=q.getState();this.firstClickSource=q.getSource()};Graph.prototype.dblClick=function(q,B){this.isEnabled()&&(B=this.insertTextForEvent(q,B),mxGraph.prototype.dblClick.call(this,q,B))};Graph.prototype.insertTextForEvent=function(q,B){var C=mxUtils.convertPoint(this.container,mxEvent.getClientX(q),mxEvent.getClientY(q));if(null!=q&&!this.model.isVertex(B)){var G=this.model.isEdge(B)?this.view.getState(B):null,K=mxEvent.getSource(q);
this.firstClickState!=G||this.firstClickSource!=K||null!=G&&null!=G.text&&null!=G.text.node&&null!=G.text.boundingBox&&(mxUtils.contains(G.text.boundingBox,C.x,C.y)||mxUtils.isAncestorNode(G.text.node,mxEvent.getSource(q)))||(null!=G||this.isCellLocked(this.getDefaultParent()))&&(null==G||this.isCellLocked(G.cell))||!(null!=G||mxClient.IS_SVG&&K==this.view.getCanvas().ownerSVGElement)||(null==G&&(G=this.view.getState(this.getCellAt(C.x,C.y))),B=this.addText(C.x,C.y,G))}return B};Graph.prototype.getInsertPoint=
function(q){q=this.getGridSize();var B=this.container.scrollLeft/this.view.scale-this.view.translate.x,C=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var G=this.getPageLayout(),K=this.getPageSize();B=Math.max(B,G.x*K.width);C=Math.max(C,G.y*K.height)}return new mxPoint(this.snap(B+q),this.snap(C+q))};Graph.prototype.getFreeInsertPoint=function(q){var B=this.view,C=this.getGraphBounds(),G=this.getInsertPoint(q);q=this.snap(Math.round(Math.max(G.x,C.x/B.scale-
@@ -3040,34 +3044,34 @@ Format.processMenuIcon=function(a,b){var e=a.getElementsByTagName("img");0<e.len
Format.prototype.init=function(){var a=this.editorUi,b=a.editor,e=b.graph;this.update=mxUtils.bind(this,function(f,g){this.refresh()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.update);e.getModel().addListener(mxEvent.CHANGE,this.update);e.addListener(mxEvent.EDITING_STARTED,this.update);e.addListener(mxEvent.EDITING_STOPPED,this.update);e.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);e.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
this.update);a.addListener("lockedChanged",this.update);a.addListener("languageChanged",this.update);a.addListener("formatWidthChanged",this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};
Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))};
-Format.prototype.immediateRefresh=function(){if(0!=this.container.offsetWidth){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatContent";var f=document.createElement("div");f.className="geFormatTitle";this.container.appendChild(e);var g=a.getSelectionState(),d=g.containsLabel,h=null,m=null,p=mxUtils.bind(this,function(D,E,F,H){var M=mxUtils.bind(this,function(J,V){h!=D&&(V||(d?this.labelIndex=F:b.isSelectionEmpty()?this.diagramIndex=F:this.currentIndex=
-F),null!=h&&h.classList.remove("geActiveFormatTitle"),h=D,h.classList.add("geActiveFormatTitle"),m!=E&&(null!=m&&(m.style.display="none"),m=E,m.style.display=""))});mxEvent.addListener(D,"click",M);var N=d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex;(H&&null==h||F==N)&&M(null,H&&null==h)}),k=0;if(b.isSelectionEmpty()){var u=document.createElement("div");mxUtils.write(u,mxResources.get("diagram"));f.appendChild(u);f.setAttribute("title",mxResources.get("diagram"));e.appendChild(f);
+Format.prototype.immediateRefresh=function(){if(0!=this.container.offsetWidth){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatContent";var f=document.createElement("div");f.className="geFormatTitle";this.container.appendChild(e);var g=a.getSelectionState(),d=g.containsLabel,h=null,m=null,p=mxUtils.bind(this,function(E,D,F,H){var M=mxUtils.bind(this,function(J,V){h!=E&&(V||(d?this.labelIndex=F:b.isSelectionEmpty()?this.diagramIndex=F:this.currentIndex=
+F),null!=h&&h.classList.remove("geActiveFormatTitle"),h=E,h.classList.add("geActiveFormatTitle"),m!=D&&(null!=m&&(m.style.display="none"),m=D,m.style.display=""))});mxEvent.addListener(E,"click",M);var N=d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex;(H&&null==h||F==N)&&M(null,H&&null==h)}),k=0;if(b.isSelectionEmpty()){var u=document.createElement("div");mxUtils.write(u,mxResources.get("diagram"));f.appendChild(u);f.setAttribute("title",mxResources.get("diagram"));e.appendChild(f);
g=e.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);g.style.display="none";var w=f.cloneNode(!1);p(f,g,k++);var y=e.cloneNode(!1);y.style.display="none";u=document.createElement("div");mxUtils.write(u,mxResources.get("style"));w.appendChild(u);w.setAttribute("title",mxResources.get("style"));e.appendChild(w);this.panels.push(new DiagramStylePanel(this,a,y));this.container.appendChild(y);p(w,y,k++,!0)}else if(b.isEditing())u=document.createElement("div"),
mxUtils.write(u,mxResources.get("text")),f.appendChild(u),f.setAttribute("title",mxResources.get("text")),e.appendChild(f),y=e.cloneNode(!1),y.style.display="none",this.panels.push(new TextFormatPanel(this,a,y)),this.container.appendChild(y),p(f,y,k++,!0);else{w=f.cloneNode(!1);var A=w.cloneNode(!1);0<g.cells.length&&(u=document.createElement("div"),mxUtils.write(u,mxResources.get("style")),f.appendChild(u),f.setAttribute("title",mxResources.get("style")),e.appendChild(f),y=e.cloneNode(!1),y.style.display=
"none",this.panels.push(new StyleFormatPanel(this,a,y)),this.container.appendChild(y),p(f,y,k++));u=document.createElement("div");mxUtils.write(u,mxResources.get("text"));w.appendChild(u);w.setAttribute("title",mxResources.get("text"));e.appendChild(w);y=e.cloneNode(!1);y.style.display="none";this.panels.push(new TextFormatPanel(this,a,y));this.container.appendChild(y);u=document.createElement("div");mxUtils.write(u,mxResources.get("arrange"));A.appendChild(u);A.setAttribute("title",mxResources.get("arrange"));
e.appendChild(A);f=e.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?p(w,y,k++):w.style.display="none";p(A,f,k++,!0)}e.className="geFormatTitleContainer"}};BaseFormatPanel=function(a,b,e){this.format=a;this.editorUi=b;this.container=e;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="transparent";
-BaseFormatPanel.prototype.installInputHandler=function(a,b,e,f,g,d,h,m,p){d=null!=d?d:"";m=null!=m?m:!1;var k=this.editorUi,u=k.editor.graph;f=null!=f?f:1;g=null!=g?g:999;var w=null,y=!1,A=null,D=mxUtils.bind(this,function(E){var F=m?parseFloat(a.value):parseInt(a.value);p&&(F=this.fromUnit(F));if(F!=A){A=F;isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(f,isNaN(F)?e:F));if(u.cellEditor.isContentEditing()&&h)y||(y=!0,null!=w&&(u.cellEditor.restoreSelection(w),
+BaseFormatPanel.prototype.installInputHandler=function(a,b,e,f,g,d,h,m,p){d=null!=d?d:"";m=null!=m?m:!1;var k=this.editorUi,u=k.editor.graph;f=null!=f?f:1;g=null!=g?g:999;var w=null,y=!1,A=null,E=mxUtils.bind(this,function(D){var F=m?parseFloat(a.value):parseInt(a.value);p&&(F=this.fromUnit(F));if(F!=A){A=F;isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(f,isNaN(F)?e:F));if(u.cellEditor.isContentEditing()&&h)y||(y=!0,null!=w&&(u.cellEditor.restoreSelection(w),
w=null),h(F),a.value=(p?this.inUnit(F):F)+d,y=!1);else if(F!=mxUtils.getValue(k.getSelectionState().style,b,e)){u.isEditing()&&u.stopEditing(!0);u.getModel().beginUpdate();try{var H=k.getSelectionState().cells;u.setCellStyles(b,F,H);b==mxConstants.STYLE_FONTSIZE&&u.updateLabelElements(H,function(N){N.removeAttribute("size");N.style.fontSize="";""==N.getAttribute("style")&&N.removeAttribute("style")});for(var M=0;M<H.length;M++)0==u.model.getChildCount(H[M])&&u.autoSizeCell(H[M],!1);k.fireEvent(new mxEventObject("styleChanged",
-"keys",[b],"values",[F],"cells",H))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(F):F)+d}mxEvent.consume(E)});h&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(E){document.activeElement==u.cellEditor.textarea&&(w=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",D);mxEvent.addListener(a,"blur",D);return D};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";return a};
+"keys",[b],"values",[F],"cells",H))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(F):F)+d}mxEvent.consume(D)});h&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(D){document.activeElement==u.cellEditor.textarea&&(w=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",E);mxEvent.addListener(a,"blur",E);return E};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";return a};
BaseFormatPanel.prototype.createTitle=function(a){var b=document.createElement("div");b.className="geFormatSectionTitle";mxUtils.write(b,a);return b};
BaseFormatPanel.prototype.addAction=function(a,b){var e=this.editorUi.actions.get(b);b=null;if(null!=e&&e.isEnabled()){b=mxUtils.button(e.getTitle(),mxUtils.bind(this,function(g){try{e.funct(g,g)}catch(d){this.editorUi.handleError(d)}}));var f=null!=e.shortcut?" ("+e.shortcut+")":"";b.setAttribute("title",e.getTitle()+f);b.style.marginBottom="2px";b.className="geFullWidthElement";a.appendChild(b)}return b};
BaseFormatPanel.prototype.addActions=function(a,b){for(var e=null,f=null,g=0,d=0;d<b.length;d++){var h=this.addAction(a,b[d]);null!=h&&(g++,0==mxUtils.mod(g,2)&&(f.style.marginRight="4px",f.style.width="104px",h.style.width="104px",e.parentNode.removeChild(e)),e=mxUtils.br(a),f=h)}return g};
-BaseFormatPanel.prototype.createStepper=function(a,b,e,f,g,d,h){function m(y,A,D){""==a.value&&(a.value=null!=d?d:A);A=h?parseFloat(a.value):parseInt(a.value);isNaN(A)||(a.value=A+y,null!=b&&b(D))}e=null!=e?e:1;var p=10*e;f=document.createElement("div");f.className="geBtnStepper";f.style.position="absolute";f.style.left="200px";var k=document.createElement("div");k.style.height="9px";k.style.backgroundImage="url("+Editor.arrowUpImage+")";k.style.width="10px";f.appendChild(k);var u=k.cloneNode(!1);
+BaseFormatPanel.prototype.createStepper=function(a,b,e,f,g,d,h){function m(y,A,E){""==a.value&&(a.value=null!=d?d:A);A=h?parseFloat(a.value):parseInt(a.value);isNaN(A)||(a.value=A+y,null!=b&&b(E))}e=null!=e?e:1;var p=10*e;f=document.createElement("div");f.className="geBtnStepper";f.style.position="absolute";f.style.left="200px";var k=document.createElement("div");k.style.height="9px";k.style.backgroundImage="url("+Editor.arrowUpImage+")";k.style.width="10px";f.appendChild(k);var u=k.cloneNode(!1);
u.style.backgroundImage="url("+Editor.arrowDownImage+")";f.appendChild(u);mxEvent.addGestureListeners(k,function(y){mxEvent.consume(y)},null,function(y){m(mxEvent.isShiftDown(y)?p:e,"0",y);mxEvent.consume(y)});mxEvent.addGestureListeners(u,function(y){mxEvent.consume(y)},null,function(y){m(-(mxEvent.isShiftDown(y)?p:e),"2",y);mxEvent.consume(y)});if(g){var w=null;mxEvent.addGestureListeners(f,function(y){mxEvent.consume(y)},null,function(y){if(null!=w){try{w.select()}catch(A){}w=null;mxEvent.consume(y)}})}else mxEvent.addListener(f,
"click",function(y){mxEvent.consume(y)});return f};
BaseFormatPanel.prototype.createOption=function(a,b,e,f,g){var d=document.createElement("div");d.className="geFormatEntry";var h=document.createElement("input");h.setAttribute("type","checkbox");d.appendChild(h);var m=document.createElement("span");m.className="geStyleLabel";m.setAttribute("title",a);mxUtils.write(m,a);d.appendChild(m);var p=!1,k=b(),u=function(w,y){p||(p=!0,w?(h.setAttribute("checked","checked"),h.defaultChecked=!0,h.checked=!0):(h.removeAttribute("checked"),h.defaultChecked=!1,
h.checked=!1),k!=w&&(k=w,b()!=k&&e(k,y)),p=!1)};mxEvent.addListener(d,"click",function(w){if("disabled"!=h.getAttribute("disabled")){var y=mxEvent.getSource(w);if(y==d||y==m)h.checked=!h.checked;u(h.checked,w)}});u(k);null!=f&&(f.install(u),this.listeners.push(f));null!=g&&g(d);return d};
BaseFormatPanel.prototype.createCellOption=function(a,b,e,f,g,d,h,m,p){var k=this.editorUi,u=k.editor.graph;f=null!=f?"null"==f?null:f:1;g=null!=g?"null"==g?null:g:0;var w=null!=p?u.getCommonStyle(p):k.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(w,b,e)!=g},function(y){m&&u.stopEditing();if(null!=h)h.funct();else{u.getModel().beginUpdate();try{var A=null!=p?p:k.getSelectionState().cells;y=y?f:g;u.setCellStyles(b,y,A);null!=d&&d(A,y);k.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[y],"cells",A))}finally{u.getModel().endUpdate()}}},{install:function(y){this.listener=function(){y(mxUtils.getValue(w,b,e)!=g)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,g,d,h,m,p,k){function u(T,O){"default"!=T||O||(T=m);"default"!=T&&p&&(T=mxUtils.getLightDarkColor(T),T=k()?T.dark:T.light);return T}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var y=this.editorUi.editor.graph,A=document.createElement("div");A.className="geFormatEntry";var D=document.createElement("input");D.setAttribute("type","checkbox");h||A.appendChild(D);var E=document.createElement("span");mxUtils.write(E,a);A.appendChild(E);var F=
+BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,g,d,h,m,p,k){function u(T,O){"default"!=T||O||(T=m);"default"!=T&&p&&(T=mxUtils.getLightDarkColor(T),T=k()?T.dark:T.light);return T}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var y=this.editorUi.editor.graph,A=document.createElement("div");A.className="geFormatEntry";var E=document.createElement("input");E.setAttribute("type","checkbox");h||A.appendChild(E);var D=document.createElement("span");mxUtils.write(D,a);A.appendChild(D);var F=
b(),H=!1,M=null,N=null,J=document.createElement("input");J.setAttribute("type","color");J.style.position="relative";J.style.visibility="hidden";J.style.top="10px";J.style.width="0px";J.style.height="0px";J.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(M=document.createElement("img"),M.src=Editor.colorDropperImage,M.className="geColorDropper geAdaptiveAsset",mxEvent.addListener(M,"click",function(T){J.value=u(F);J.click();mxEvent.consume(T)}));var V=null,W=function(T,O){H||
(H=!0,null!=d&&d(T),O||(null!=V&&(y.cellEditor.restoreSelection(V),V=null),e(T)),F=b(),T=mxUtils.getLightDarkColor("default"!=F?F:m),O=document.createElement("div"),O.style.width="21px",O.style.height="12px",O.style.margin="2px 18px 2px 3px",O.style.borderWidth="1px",O.style.borderStyle="solid",O.style.backgroundColor=T.cssText,N.innerText="",N.appendChild(O),!p&&mxUtils.isLightDarkColor(F)&&T.light!=T.dark?O.style.background="linear-gradient(to right bottom, "+T.cssText+" 50%, "+mxUtils.invertLightDarkColor(T).cssText+
-" 50.3%)":p&&w&&(O.style.backgroundColor=k()?T.dark:T.light),null!=M?(O.style.width="21px",O.style.margin="2px 18px 2px 3px",O.appendChild(M)):(O.style.width="36px",O.style.margin="3px"),null!=F&&F!=mxConstants.NONE&&1<F.length&&"string"===typeof F&&(T="#"==F.charAt(0)?F.substring(1).toUpperCase():F,T=ColorDialog.prototype.colorNames[T],null!=T?N.setAttribute("title",T):"default"==F?N.setAttribute("title",mxResources.get("useBlackAndWhite")):N.setAttribute("title",F)),y.isSpecialColor(F)?D.style.display=
-"none":(D.style.display="",null!=F&&F!=mxConstants.NONE?(D.setAttribute("checked","checked"),D.defaultChecked=!0,D.checked=!0):(D.removeAttribute("checked"),D.defaultChecked=!1,D.checked=!1)),N.style.display=D.checked||h?"":"none",H=!1)};A.appendChild(J);mxEvent.addListener(J,"change",function(){var T=J.value;if(!p){var O=mxUtils.getLightDarkColor(F);k()?O.dark=T:O.light=T;T="light-dark("+O.light+", "+O.dark+")"}W(T)});N=mxUtils.button("",mxUtils.bind(this,function(T){var O=m;p&&k()&&mxUtils.isLightDarkColor(O)&&
-(O=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(F,!0),function(fa){W(fa)},"default"==f?"default":null,O,p);mxEvent.consume(T)}));N.className="geColorBtn";N.style.display=D.checked||h?"":"none";A.appendChild(N);a=null!=F&&"string"===typeof F&&"#"==F.charAt(0)?F.substring(1).toUpperCase():F;a=ColorDialog.prototype.colorNames[a];null!=a&&N.setAttribute("title",a);h||(mxEvent.addListener(A,"click",function(T){T=mxEvent.getSource(T);if(T==D||"INPUT"!=T.nodeName)T!=D&&(D.checked=!D.checked),
-D.checked||null==F||F==mxConstants.NONE||f==mxConstants.NONE||(f=u(F)),W(D.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(D,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})),mxEvent.addGestureListeners(A,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})));W(F,!0);null!=g&&g.install(function(){W(F,!0)},this.listeners.push(g));return A};
-BaseFormatPanel.prototype.createArrayCellColorOption=function(a,b,e,f,g,d,h){var m=this.editorUi,p=m.editor.graph,k=p.getCellStyle(p.getSelectionCell(),!1);k=null!=k?null!=k[b]?k[b]:h:null;for(var u=null!=k?mxUtils.parseColorList(k):[],w=document.createElement("div"),y=0;y<u.length;y++)mxUtils.bind(this,function(A){w.appendChild(this.createColorOption(a+" ("+(A+1)+")",function(){return u[y]},function(D){p.getModel().beginUpdate();try{var E=m.getSelectionState().cells;u[A]=D;var F=u.join(",");p.setCellStyles(b,
-F,E);null!=g&&g(D);m.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",E))}finally{p.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(D){this.listener=function(){var E=p.getCellStyle(p.getSelectionCell(),!1);null!=E&&(E=null!=E?null!=E[b]?E[b]:h:null,u=null!=E?mxUtils.parseColorList(E):[],D(u[y],!0))};p.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){p.getModel().removeListener(this.listener)}},f,null,d))})(y);return w};
+" 50.3%)":p&&w&&(O.style.backgroundColor=k()?T.dark:T.light),null!=M?(O.style.width="21px",O.style.margin="2px 18px 2px 3px",O.appendChild(M)):(O.style.width="36px",O.style.margin="3px"),null!=F&&F!=mxConstants.NONE&&1<F.length&&"string"===typeof F&&(T="#"==F.charAt(0)?F.substring(1).toUpperCase():F,T=ColorDialog.prototype.colorNames[T],null!=T?N.setAttribute("title",T):"default"==F?N.setAttribute("title",mxResources.get("useBlackAndWhite")):N.setAttribute("title",F)),y.isSpecialColor(F)?E.style.display=
+"none":(E.style.display="",null!=F&&F!=mxConstants.NONE?(E.setAttribute("checked","checked"),E.defaultChecked=!0,E.checked=!0):(E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1)),N.style.display=E.checked||h?"":"none",H=!1)};A.appendChild(J);mxEvent.addListener(J,"change",function(){var T=J.value;if(!p){var O=mxUtils.getLightDarkColor(F);k()?O.dark=T:O.light=T;T="light-dark("+O.light+", "+O.dark+")"}W(T)});N=mxUtils.button("",mxUtils.bind(this,function(T){var O=m;p&&k()&&mxUtils.isLightDarkColor(O)&&
+(O=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(F,!0),function(fa){W(fa)},"default"==f?"default":null,O,p);mxEvent.consume(T)}));N.className="geColorBtn";N.style.display=E.checked||h?"":"none";A.appendChild(N);a=null!=F&&"string"===typeof F&&"#"==F.charAt(0)?F.substring(1).toUpperCase():F;a=ColorDialog.prototype.colorNames[a];null!=a&&N.setAttribute("title",a);h||(mxEvent.addListener(A,"click",function(T){T=mxEvent.getSource(T);if(T==E||"INPUT"!=T.nodeName)T!=E&&(E.checked=!E.checked),
+E.checked||null==F||F==mxConstants.NONE||f==mxConstants.NONE||(f=u(F)),W(E.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(E,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})),mxEvent.addGestureListeners(A,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})));W(F,!0);null!=g&&g.install(function(){W(F,!0)},this.listeners.push(g));return A};
+BaseFormatPanel.prototype.createArrayCellColorOption=function(a,b,e,f,g,d,h){var m=this.editorUi,p=m.editor.graph,k=p.getCellStyle(p.getSelectionCell(),!1);k=null!=k?null!=k[b]?k[b]:h:null;for(var u=null!=k?mxUtils.parseColorList(k):[],w=document.createElement("div"),y=0;y<u.length;y++)mxUtils.bind(this,function(A){w.appendChild(this.createColorOption(a+" ("+(A+1)+")",function(){return u[y]},function(E){p.getModel().beginUpdate();try{var D=m.getSelectionState().cells;u[A]=E;var F=u.join(",");p.setCellStyles(b,
+F,D);null!=g&&g(E);m.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",D))}finally{p.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(E){this.listener=function(){var D=p.getCellStyle(p.getSelectionCell(),!1);null!=D&&(D=null!=D?null!=D[b]?D[b]:h:null,u=null!=D?mxUtils.parseColorList(D):[],E(u[y],!0))};p.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){p.getModel().removeListener(this.listener)}},f,null,d))})(y);return w};
BaseFormatPanel.prototype.createCellColorOption=function(a,b,e,f,g,d,h,m){function p(){var y=u.getCellStyle(u.getSelectionCell(),!1);return null!=y?null!=y[b]?y[b]:h:null}var k=this.editorUi,u=k.editor.graph,w=p();return null!=w&&m&&1<mxUtils.parseColorList(w).length?this.createArrayCellColorOption(a,b,e,f,g,d,h):this.createColorOption(a,p,function(y){u.getModel().beginUpdate();try{var A=k.getSelectionState().cells;u.setCellStyles(b,y,A);null!=g&&g(y);k.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[y],"cells",A))}finally{u.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(y){this.listener=function(){var A=u.getCellStyle(u.getSelectionCell(),!1);null!=A&&y(null!=A[b]?A[b]:h,!0)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}},f,null,d)};
BaseFormatPanel.prototype.addArrow=function(a){var b=document.createElement("div");b.className="geAdaptiveAsset geArrow";b.style.backgroundImage="url("+Editor.thinExpandImage+")";a.className="geStyleBtn";a.appendChild(b);return b};
@@ -3105,44 +3109,44 @@ BaseFormatPanel.prototype.getUnit=function(a){var b="";switch(this.editorUi.edit
BaseFormatPanel.prototype.fromUnit=function(a){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return a;case mxConstants.INCHES:return a*mxConstants.PIXELS_PER_INCH;case mxConstants.MILLIMETERS:return a*mxConstants.PIXELS_PER_MM;case mxConstants.METERS:return a*mxConstants.PIXELS_PER_MM*1E3}};BaseFormatPanel.prototype.isFloatUnit=function(){return this.editorUi.editor.graph.view.unit!=mxConstants.POINTS};
BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return 1;case mxConstants.INCHES:return.1;case mxConstants.MILLIMETERS:return.5;case mxConstants.METERS:return.001}};
ArrangePanel.prototype.addGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=f.getModel(),d=e.getSelectionState(),h=this.createPanel();h.style.height="60px";var m=document.createElement("div");m.className="geStyleLabel";m.style.position="absolute";m.style.fontWeight="bold";m.style.marginTop="4px";m.style.maxWidth="50px";mxUtils.write(m,mxResources.get("size"));h.appendChild(m);var p=this.addUnitInput(h,this.getUnit(),87,52,function(){A.apply(this,arguments)},this.getUnitStep(),null,
-null,this.isFloatUnit()),k=this.addUnitInput(h,this.getUnit(),16,52,function(){D.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());m=document.createElement("div");m.style.backgroundImage="url("+Editor.autosizeImage+")";m.className="geButton";m.style.margin="0";m.style.width="21px";m.style.height="21px";m.style.left="52px";mxUtils.setOpacity(m,50);mxEvent.addListener(m,"click",function(){e.actions.get("autosize").funct()});h.appendChild(m);d.row?(p.style.visibility="hidden",p.nextSibling.style.visibility=
+null,this.isFloatUnit()),k=this.addUnitInput(h,this.getUnit(),16,52,function(){E.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());m=document.createElement("div");m.style.backgroundImage="url("+Editor.autosizeImage+")";m.className="geButton";m.style.margin="0";m.style.width="21px";m.style.height="21px";m.style.left="52px";mxUtils.setOpacity(m,50);mxEvent.addListener(m,"click",function(){e.actions.get("autosize").funct()});h.appendChild(m);d.row?(p.style.visibility="hidden",p.nextSibling.style.visibility=
"hidden"):this.addLabel(h,mxResources.get("width"),87,64).style.marginTop="0px";this.addLabel(h,mxResources.get("height"),16,64).style.marginTop="0px";mxUtils.br(h);var u=document.createElement("div");u.className="geFormatEntry";u.style.marginTop="14px";var w=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");w.className="geFullWidthElement";u.appendChild(w);d.cell||d.row?m.style.visibility="hidden":h.appendChild(u);var y=w.getElementsByTagName("input")[0];
-this.addKeyHandler(p,W);this.addKeyHandler(k,W);var A=this.addGeometryHandler(p,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));if(f.isTableCell(Y))return f.setTableColumnWidth(Y,aa-S.width,!0),!0;0<S.width&&(y.checked&&(S.height=Math.round(S.height*aa*100/S.width)/100),S.width=aa)});var D=this.addGeometryHandler(k,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));f.isTableCell(Y)&&(Y=g.getParent(Y));if(f.isTableRow(Y))return f.setTableRowHeight(Y,aa-S.height),!0;0<S.height&&(y.checked&&(S.width=Math.round(S.width*
-aa*100/S.height)/100),S.height=aa)});(d.resizable||d.row||d.cell)&&a.appendChild(h);var E=this.createPanel();E.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));E.appendChild(m);var F=this.addUnitInput(E,this.getUnit(),87,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),H=this.addUnitInput(E,this.getUnit(),16,
-52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(E);u=!0;var M=null,N=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var J=f.getCellGeometry(d.vertices[0]);if(null!=J&&J.relative){mxUtils.br(E);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));E.appendChild(m);M=this.addGenericInput(E," %",87,52,function(){return Math.round(1E3*J.x)/
-10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=J.clone(),J.x=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});if(g.isEdge(g.getParent(d.vertices[0]))){u=!1;var V=null;N=this.addUnitInput(E,this.getUnit(),16,52,function(){V.apply(this,arguments)});V=this.addGeometryHandler(N,function(S,aa){S.y=b.fromUnit(aa)})}else N=this.addGenericInput(E," %",16,52,function(){return Math.round(1E3*J.y)/10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=
-J.clone(),J.y=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});mxUtils.br(E)}}a.appendChild(E)}this.addLabel(E,mxResources.get(u?"left":"line"),87,64);this.addLabel(E,mxResources.get(u?"top":"orthogonal"),16,64);var W=mxUtils.bind(this,function(S,aa,Y){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(Y||document.activeElement!=p)p.value=this.inUnit(d.width)+
-" "+this.getUnit();if(Y||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){S=f.getCellGeometry(d.vertices[0]);E.style.display="";if(Y||document.activeElement!=F)F.value=this.inUnit(d.x)+" "+this.getUnit();if(Y||document.activeElement!=H)H.value=this.inUnit(d.y)+" "+this.getUnit();null!=S&&S.relative&&(null==M||!Y&&document.activeElement==M||(M.value=Math.round(1E3*S.x)/10+" %"),null==N||
-!Y&&document.activeElement==N||(g.isEdge(g.getParent(d.vertices[0]))?N.value=this.inUnit(S.y)+" "+this.getUnit():N.value=Math.round(1E3*S.y)/10+" %"))}else E.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(W)}});g.addListener(mxEvent.CHANGE,W);this.addKeyHandler(F,W);this.addKeyHandler(H,W);W();var T=this.addGeometryHandler(F,function(S,aa){aa=b.fromUnit(aa);S.relative?(S.offset=null!=S.offset?S.offset:new mxPoint,S.offset.x=aa):S.x=aa});var O=this.addGeometryHandler(H,
+this.addKeyHandler(p,W);this.addKeyHandler(k,W);var A=this.addGeometryHandler(p,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));if(f.isTableCell(Y))return f.setTableColumnWidth(Y,aa-S.width,!0),!0;0<S.width&&(y.checked&&(S.height=Math.round(S.height*aa*100/S.width)/100),S.width=aa)});var E=this.addGeometryHandler(k,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));f.isTableCell(Y)&&(Y=g.getParent(Y));if(f.isTableRow(Y))return f.setTableRowHeight(Y,aa-S.height),!0;0<S.height&&(y.checked&&(S.width=Math.round(S.width*
+aa*100/S.height)/100),S.height=aa)});(d.resizable||d.row||d.cell)&&a.appendChild(h);var D=this.createPanel();D.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));D.appendChild(m);var F=this.addUnitInput(D,this.getUnit(),87,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),H=this.addUnitInput(D,this.getUnit(),16,
+52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(D);u=!0;var M=null,N=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var J=f.getCellGeometry(d.vertices[0]);if(null!=J&&J.relative){mxUtils.br(D);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));D.appendChild(m);M=this.addGenericInput(D," %",87,52,function(){return Math.round(1E3*J.x)/
+10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=J.clone(),J.x=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});if(g.isEdge(g.getParent(d.vertices[0]))){u=!1;var V=null;N=this.addUnitInput(D,this.getUnit(),16,52,function(){V.apply(this,arguments)});V=this.addGeometryHandler(N,function(S,aa){S.y=b.fromUnit(aa)})}else N=this.addGenericInput(D," %",16,52,function(){return Math.round(1E3*J.y)/10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=
+J.clone(),J.y=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});mxUtils.br(D)}}a.appendChild(D)}this.addLabel(D,mxResources.get(u?"left":"line"),87,64);this.addLabel(D,mxResources.get(u?"top":"orthogonal"),16,64);var W=mxUtils.bind(this,function(S,aa,Y){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(Y||document.activeElement!=p)p.value=this.inUnit(d.width)+
+" "+this.getUnit();if(Y||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){S=f.getCellGeometry(d.vertices[0]);D.style.display="";if(Y||document.activeElement!=F)F.value=this.inUnit(d.x)+" "+this.getUnit();if(Y||document.activeElement!=H)H.value=this.inUnit(d.y)+" "+this.getUnit();null!=S&&S.relative&&(null==M||!Y&&document.activeElement==M||(M.value=Math.round(1E3*S.x)/10+" %"),null==N||
+!Y&&document.activeElement==N||(g.isEdge(g.getParent(d.vertices[0]))?N.value=this.inUnit(S.y)+" "+this.getUnit():N.value=Math.round(1E3*S.y)/10+" %"))}else D.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(W)}});g.addListener(mxEvent.CHANGE,W);this.addKeyHandler(F,W);this.addKeyHandler(H,W);W();var T=this.addGeometryHandler(F,function(S,aa){aa=b.fromUnit(aa);S.relative?(S.offset=null!=S.offset?S.offset:new mxPoint,S.offset.x=aa):S.x=aa});var O=this.addGeometryHandler(H,
function(S,aa){aa=b.fromUnit(aa);S.relative?(S.offset=null!=S.offset?S.offset:new mxPoint,S.offset.y=aa):S.y=aa});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))&&(J=f.getCellGeometry(d.vertices[0]),null!=J&&J.relative)){var fa=document.createElement("select");fa.style.position="absolute";fa.style.width="134px";fa.style.left="77px";m=document.createElement("option");m.setAttribute("value","none");m.setAttribute("title",mxResources.get("move"));mxUtils.write(m,
mxResources.get("move")+"...");fa.appendChild(m);m=document.createElement("option");m.setAttribute("value","start");m.setAttribute("title",mxResources.get("linestart"));mxUtils.write(m,mxResources.get("linestart"));fa.appendChild(m);m=document.createElement("option");m.setAttribute("value","center");m.setAttribute("title",mxResources.get("center"));mxUtils.write(m,mxResources.get("center"));fa.appendChild(m);m=document.createElement("option");m.setAttribute("value","end");m.setAttribute("title",mxResources.get("lineend"));
-mxUtils.write(m,mxResources.get("lineend"));fa.appendChild(m);mxEvent.addListener(fa,"change",function(S){if("none"!=fa.value){g.beginUpdate();try{J=J.clone(),J.x="start"==fa.value?-1:"end"==fa.value?1:0,J.y=0,J.offset=new mxPoint,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}fa.value="none"});mxUtils.br(E);mxUtils.br(E);E.appendChild(fa)}a.appendChild(E)}};
+mxUtils.write(m,mxResources.get("lineend"));fa.appendChild(m);mxEvent.addListener(fa,"change",function(S){if("none"!=fa.value){g.beginUpdate();try{J=J.clone(),J.x="start"==fa.value?-1:"end"==fa.value?1:0,J.y=0,J.offset=new mxPoint,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}fa.value="none"});mxUtils.br(D);mxUtils.br(D);D.appendChild(fa)}a.appendChild(D)}};
ArrangePanel.prototype.addGeometryHandler=function(a,b){function e(m){if(""!=a.value){var p=parseFloat(a.value);if(isNaN(p))a.value=d+" "+h.getUnit();else if(p!=d){g.getModel().beginUpdate();try{for(var k=f.getSelectionState().cells,u=0;u<k.length;u++)if(g.getModel().isVertex(k[u])){var w=g.getCellGeometry(k[u]);if(null!=w&&(w=w.clone(),!b(w,p,k[u]))){var y=g.view.getState(k[u]);null!=y&&g.isRecursiveVertexResize(y)&&g.resizeChildCells(k[u],w);g.getModel().setGeometry(k[u],w);g.constrainChildCells(k[u])}}}finally{g.getModel().endUpdate()}d=
p;a.value=p+" "+h.getUnit()}}mxEvent.consume(m)}var f=this.editorUi,g=f.editor.graph,d=null,h=this;mxEvent.addListener(a,"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function e(h){if(""!=a.value){var m=parseFloat(a.value);if(isNaN(m))a.value=d+" pt";else if(m!=d){g.getModel().beginUpdate();try{for(var p=f.getSelectionState().cells,k=0;k<p.length;k++)if(g.getModel().isEdge(p[k])){var u=g.getCellGeometry(p[k]);null!=u&&(u=u.clone(),b(u,m),g.getModel().setGeometry(p[k],u))}}finally{g.getModel().endUpdate()}d=m;a.value=m+" pt"}}mxEvent.consume(h)}var f=this.editorUi,g=f.editor.graph,d=null;mxEvent.addListener(a,
"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
-ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=this.createPanel(),h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));d.appendChild(h);var m=this.addUnitInput(d,"pt",12,44,function(){p.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,E);var p=mxUtils.bind(this,function(J){var V=parseInt(m.value);
+ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=this.createPanel(),h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));d.appendChild(h);var m=this.addUnitInput(d,"pt",12,44,function(){p.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,D);var p=mxUtils.bind(this,function(J){var V=parseInt(m.value);
V=Math.min(999,Math.max(1,isNaN(V)?1:V));if(V!=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var W=e.getSelectionState().cells;f.setCellStyles("width",V,W);e.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[V],"cells",W))}m.value=V+" pt";mxEvent.consume(J)});mxEvent.addListener(m,"blur",p);mxEvent.addListener(m,"change",p);a.appendChild(d);var k=this.createPanel();k.style.paddingBottom="30px";h=document.createElement("div");h.style.position=
"absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("linestart"));k.appendChild(h);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){F.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),w=this.addUnitInput(k,this.getUnit(),16,52,function(){H.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),87,64);this.addLabel(k,mxResources.get("top"),16,64);a.appendChild(k);
-this.addKeyHandler(u,E);this.addKeyHandler(w,E);var y=this.createPanel();y.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("lineend"));y.appendChild(h);var A=this.addUnitInput(y,this.getUnit(),87,52,function(){M.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),D=this.addUnitInput(y,this.getUnit(),16,52,function(){N.apply(this,arguments)},this.getUnitStep(),null,
-null,this.isFloatUnit());mxUtils.br(y);this.addLabel(y,mxResources.get("left"),87,64);this.addLabel(y,mxResources.get("top"),16,64);a.appendChild(y);this.addKeyHandler(A,E);this.addKeyHandler(D,E);var E=mxUtils.bind(this,function(J,V,W){g=e.getSelectionState();J=g.cells[0];if("link"==g.style.shape||"flexArrow"==g.style.shape){if(d.style.display="",W||document.activeElement!=m)W=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=W+" pt"}else d.style.display=
-"none";1==g.cells.length&&f.model.isEdge(J)?(W=f.model.getGeometry(J),null!=W&&null!=W.sourcePoint&&null==f.model.getTerminal(J,!0)?(u.value=this.inUnit(W.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(W.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=W&&null!=W.targetPoint&&null==f.model.getTerminal(J,!1)?(A.value=this.inUnit(W.targetPoint.x)+" "+this.getUnit(),D.value=this.inUnit(W.targetPoint.y)+" "+this.getUnit()):y.style.display="none"):(k.style.display="none",y.style.display=
-"none")});var F=this.addEdgeGeometryHandler(u,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.x=b.fromUnit(V))});var H=this.addEdgeGeometryHandler(w,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.y=b.fromUnit(V))});var M=this.addEdgeGeometryHandler(A,function(J,V){null!=J.targetPoint&&(J.targetPoint.x=b.fromUnit(V))});var N=this.addEdgeGeometryHandler(D,function(J,V){null!=J.targetPoint&&(J.targetPoint.y=b.fromUnit(V))});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});
-E()};TextFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.appendChild(this.addFont(this.createPanel()));this.container.appendChild(this.addFontOps(this.createPanel()))};TextFormatPanel.prototype.addFontOps=function(a){0==this.addActions(a,["removeFormat"])&&(a.style.display="none");return a};
+this.addKeyHandler(u,D);this.addKeyHandler(w,D);var y=this.createPanel();y.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("lineend"));y.appendChild(h);var A=this.addUnitInput(y,this.getUnit(),87,52,function(){M.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),E=this.addUnitInput(y,this.getUnit(),16,52,function(){N.apply(this,arguments)},this.getUnitStep(),null,
+null,this.isFloatUnit());mxUtils.br(y);this.addLabel(y,mxResources.get("left"),87,64);this.addLabel(y,mxResources.get("top"),16,64);a.appendChild(y);this.addKeyHandler(A,D);this.addKeyHandler(E,D);var D=mxUtils.bind(this,function(J,V,W){g=e.getSelectionState();J=g.cells[0];if("link"==g.style.shape||"flexArrow"==g.style.shape){if(d.style.display="",W||document.activeElement!=m)W=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=W+" pt"}else d.style.display=
+"none";1==g.cells.length&&f.model.isEdge(J)?(W=f.model.getGeometry(J),null!=W&&null!=W.sourcePoint&&null==f.model.getTerminal(J,!0)?(u.value=this.inUnit(W.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(W.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=W&&null!=W.targetPoint&&null==f.model.getTerminal(J,!1)?(A.value=this.inUnit(W.targetPoint.x)+" "+this.getUnit(),E.value=this.inUnit(W.targetPoint.y)+" "+this.getUnit()):y.style.display="none"):(k.style.display="none",y.style.display=
+"none")});var F=this.addEdgeGeometryHandler(u,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.x=b.fromUnit(V))});var H=this.addEdgeGeometryHandler(w,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.y=b.fromUnit(V))});var M=this.addEdgeGeometryHandler(A,function(J,V){null!=J.targetPoint&&(J.targetPoint.x=b.fromUnit(V))});var N=this.addEdgeGeometryHandler(E,function(J,V){null!=J.targetPoint&&(J.targetPoint.y=b.fromUnit(V))});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});
+D()};TextFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.appendChild(this.addFont(this.createPanel()));this.container.appendChild(this.addFontOps(this.createPanel()))};TextFormatPanel.prototype.addFontOps=function(a){0==this.addActions(a,["removeFormat"])&&(a.style.display="none");return a};
TextFormatPanel.prototype.addFont=function(a){function b(q){q=null!=q?q.fontSize:null;return null!=q&&"px"==q.substring(q.length-2)?parseFloat(q):mxConstants.DEFAULT_FONTSIZE}function e(q,B){if(null!=q&&""!=q.textContent){q.style.lineHeight="";var C=mxUtils.getCurrentStyle(q);parseFloat(C.fontSize)*B/100!=parseFloat(C.lineHeight)?q.style.lineHeight=B+"%":""==q.getAttribute("style")&&q.removeAttribute("style")}}function f(q,B){B?q.classList.add("geActiveItem"):q.classList.remove("geActiveItem")}var g=
this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=this.createTitle(mxResources.get("font"));a.appendChild(m);m=this.createPanel();m.className="geFormatEntry";if(d.cellEditor.isContentEditing()){var p=m.cloneNode(),k=g.toolbar.addMenu(g.menus.get("formatBlock"),mxResources.get("style"),null,p);this.addArrow(k);k.style.margin="0px";k.style.position="relative";k.classList.add("geFullWidthElement");a.appendChild(p)}k=m.cloneNode(!1);a.appendChild(k);p=this.createPanel();var u=g.toolbar.addMenu(g.menus.get("fontFamily"),
"Helvetica",null,k);this.addArrow(u);u.style.margin="0px";u.style.position="relative";u.classList.add("geFullWidthElement");"inherit"==h.style[mxConstants.STYLE_FONTFAMILY]&&(k.style.display="none");k=m.cloneNode(!1);var w=g.toolbar.addItems(["bold","italic","underline"],k,!0,[Editor.boldImage,Editor.italicImage,Editor.underlineImage]);w[0].setAttribute("title",mxResources.get("bold")+" ("+g.actions.get("bold").shortcut+")");w[1].setAttribute("title",mxResources.get("italic")+" ("+g.actions.get("italic").shortcut+
-")");w[2].setAttribute("title",mxResources.get("underline")+" ("+g.actions.get("underline").shortcut+")");var y=g.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);var A=m.cloneNode(!1),D=function(q){return function(){return q()}},E=g.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",
-[mxConstants.ALIGN_LEFT],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),A),F=g.addButton(Editor.alignCenterImage,mxResources.get("center"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),
-A),H=g.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),A);d.cellEditor.isContentEditing()&&(V=g.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",
-!1,null)},k));var M=g.addButton(Editor.alignTopImage,mxResources.get("top"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),A),N=g.addButton(Editor.alignMiddleImage,mxResources.get("middle"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),A),J=g.addButton(Editor.alignBottomImage,mxResources.get("bottom"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),
+")");w[2].setAttribute("title",mxResources.get("underline")+" ("+g.actions.get("underline").shortcut+")");var y=g.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);var A=m.cloneNode(!1),E=function(q){return function(){return q()}},D=g.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",
+[mxConstants.ALIGN_LEFT],"cells",h.cells))}:E(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),A),F=g.addButton(Editor.alignCenterImage,mxResources.get("center"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",h.cells))}:E(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),
+A),H=g.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",h.cells))}:E(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),A);d.cellEditor.isContentEditing()&&(V=g.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",
+!1,null)},k));var M=g.addButton(Editor.alignTopImage,mxResources.get("top"),E(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),A),N=g.addButton(Editor.alignMiddleImage,mxResources.get("middle"),E(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),A),J=g.addButton(Editor.alignBottomImage,mxResources.get("bottom"),E(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),
A);a.appendChild(A);var V,W,T,O;if(d.cellEditor.isContentEditing()){M.style.display="none";N.style.display="none";J.style.display="none";y.style.display="none";var fa=g.addButton(Editor.alignJustifyImage,mxResources.get("block"),function(){document.execCommand("justifyfull",!1,null)},A);fa.style.marginRight="9px";var S=g.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},A);S.style.marginLeft="10px";var aa=g.addButton(Editor.superscriptImage,
-mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},A);S.style.marginLeft="10px";D=A.cloneNode(!1);D.style.paddingTop="4px";A=[g.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},D),g.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},D),g.addButton(Editor.indentImage,mxResources.get("increaseIndent"),
-function(){document.execCommand("indent",!1,null)},D),g.addButton(Editor.outdentImage,mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},D),g.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},D),g.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},D)];A[A.length-2].style.marginLeft="10px";a.appendChild(D)}else w[2].style.marginRight="12px",H.style.marginRight=
+mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},A);S.style.marginLeft="10px";E=A.cloneNode(!1);E.style.paddingTop="4px";A=[g.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},E),g.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},E),g.addButton(Editor.indentImage,mxResources.get("increaseIndent"),
+function(){document.execCommand("indent",!1,null)},E),g.addButton(Editor.outdentImage,mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},E),g.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},E),g.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},E)];A[A.length-2].style.marginLeft="10px";a.appendChild(E)}else w[2].style.marginRight="12px",H.style.marginRight=
"12px";A=m.cloneNode(!1);mxUtils.write(A,mxResources.get("position"));var Y=document.createElement("select");Y.style.left="114px";Y.style.width="98px";var ba="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),L={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,
mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,
-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(D=0;D<ba.length;D++){var U=document.createElement("option");U.setAttribute("value",ba[D]);mxUtils.write(U,mxResources.get(ba[D]));Y.appendChild(U)}A.appendChild(Y);ba=A.cloneNode(!1);mxUtils.write(ba,mxResources.get("writingDirection"));var X=Y.cloneNode(!1);U=["automatic","leftToRight","rightToLeft"];h.html&&(U.push("vertical-leftToRight"),
-U.push("vertical-rightToLeft"));var ia={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(D=0;D<U.length;D++){var ja=document.createElement("option");ja.setAttribute("value",U[D]);"vertical-"==U[D].substring(0,9)?mxUtils.write(ja,mxResources.get("vertical")+" ("+mxResources.get(U[D].substring(9))+")"):mxUtils.write(ja,mxResources.get(U[D]));
+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(E=0;E<ba.length;E++){var U=document.createElement("option");U.setAttribute("value",ba[E]);mxUtils.write(U,mxResources.get(ba[E]));Y.appendChild(U)}A.appendChild(Y);ba=A.cloneNode(!1);mxUtils.write(ba,mxResources.get("writingDirection"));var X=Y.cloneNode(!1);U=["automatic","leftToRight","rightToLeft"];h.html&&(U.push("vertical-leftToRight"),
+U.push("vertical-rightToLeft"));var ia={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(E=0;E<U.length;E++){var ja=document.createElement("option");ja.setAttribute("value",U[E]);"vertical-"==U[E].substring(0,9)?mxUtils.write(ja,mxResources.get("vertical")+" ("+mxResources.get(U[E].substring(9))+")"):mxUtils.write(ja,mxResources.get(U[E]));
X.appendChild(ja)}ba.appendChild(X);d.isEditing()||(a.appendChild(A),mxEvent.addListener(Y,"change",function(q){d.getModel().beginUpdate();try{var B=L[Y.value];null!=B&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,B[0],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,B[1],h.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,B[2],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,B[3],h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(q)}),a.appendChild(ba),mxEvent.addListener(X,
"change",function(q){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,ia[X.value],h.cells);mxEvent.consume(q)}));var ta=document.createElement("input");ta.style.position="absolute";ta.style.left="146px";ta.style.width="52px";k.appendChild(ta);A=this.installInputHandler(ta,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," "+Editor.fontSizeUnit,function(q){if(null!=d.getSelectedEditingElement()){ta.value=q+" "+Editor.fontSizeUnit;document.execCommand("fontSize",!1,"1");for(var B=d.cellEditor.textarea.getElementsByTagName("font"),
C=0;C<B.length;C++)if("1"==B[C].getAttribute("size")){B[C].removeAttribute("size");B[C].style.fontSize="";var G=mxUtils.getCurrentStyle(B[C]);q!=b(G)?B[C].style.fontSize=q+"px":""==B[C].getAttribute("style")&&B[C].removeAttribute("style")}}},!0);A=this.createStepper(ta,A,1,!0,Menus.prototype.defaultFontSize);A.style.display=ta.style.display;A.style.left="198px";"inherit"==h.style[mxConstants.STYLE_FONTSIZE]&&(ta.style.display="none",A.style.display="none");k.appendChild(A);var ca=null,P=d.shapeBackgroundColor,
@@ -3152,7 +3156,7 @@ da=null,ma=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundC
h.cells)))},"default",{install:function(q){da=q},destroy:function(){da=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(q){oa.style.display=q==mxConstants.NONE?"none":"";za.style.display=oa.style.display},function(q){q==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",h.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,
null,h.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,q,h.cells);d.updateLabelElements(h.cells,function(B){B.removeAttribute("color");B.style.color=null})},d.shapeForegroundColor);"inherit"==h.style[mxConstants.STYLE_FONTCOLOR]&&(k.style.display="none");k.style.fontWeight="bold";p.appendChild(k);p.appendChild(oa);k=this.createCellOption(mxResources.get("shadow"),mxConstants.STYLE_TEXT_SHADOW,0);k.style.width="100%";k.style.fontWeight="bold";Editor.enableShadowOption||(k.getElementsByTagName("input")[0].setAttribute("disabled",
"disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(p.appendChild(za),p.appendChild(k));a.appendChild(p);p=this.createPanel();p.style.paddingTop="2px";p.style.paddingBottom="4px";A=d.filterSelectionCells(mxUtils.bind(this,function(q){var B=d.view.getState(q);return null==B||d.getModel().isEdge(q)||d.isAutoSizeState(B)}));k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,A);k.style.fontWeight="bold";0<A.length&&p.appendChild(k);
-A=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,g.actions.get("formattedText"));A.style.fontWeight="bold";p.appendChild(A);D=d.view.getState(d.getSelectionCell());(A="1"==mxUtils.getValue(h.style,"html",0))&&(1<d.getSelectionCount()&&"1"==h.style.convertToSvg||1==d.getSelectionCount()&&null!=D&&null!=D.text&&null!=D.text.node&&0==D.text.node.getElementsByTagName("foreignObject").length)&&(k.style.opacity="0.5",k.getElementsByTagName("input")[0].setAttribute("disabled",
+A=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,g.actions.get("formattedText"));A.style.fontWeight="bold";p.appendChild(A);E=d.view.getState(d.getSelectionCell());(A="1"==mxUtils.getValue(h.style,"html",0))&&(1<d.getSelectionCount()&&"1"==h.style.convertToSvg||1==d.getSelectionCount()&&null!=E&&null!=E.text&&null!=E.text.node&&0==E.text.node.getElementsByTagName("foreignObject").length)&&(k.style.opacity="0.5",k.getElementsByTagName("input")[0].setAttribute("disabled",
"disabled"));k=this.createCellOption(mxResources.get("lblToSvg"),"convertToSvg","0");k.style.fontWeight="bold";p.appendChild(k);A||(k.style.opacity="0.5",k.getElementsByTagName("input")[0].setAttribute("disabled","disabled"));if(!g.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)k.getElementsByTagName("span")[0].style.maxWidth="172px",k.appendChild(g.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/5165"));k=this.createPanel();k.style.height="86px";A=document.createElement("div");
A.style.position="absolute";A.style.width="70px";A.style.marginTop="0px";A.style.fontWeight="bold";mxUtils.write(A,mxResources.get("spacing"));k.appendChild(A);var Aa=this.addUnitInput(k,this.getUnit(),87,52,function(){eb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ma=this.addUnitInput(k,this.getUnit(),16,52,function(){bb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),
16,64);mxUtils.br(k);mxUtils.br(k);var Pa=this.addUnitInput(k,this.getUnit(),158,52,function(){ab.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ka=this.addUnitInput(k,this.getUnit(),87,52,function(){fb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ja=this.addUnitInput(k,this.getUnit(),16,52,function(){qb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,
@@ -3166,8 +3170,8 @@ function(q){if(null!=W){var B=W.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*
"1"),G.style.border="1px solid "+C,G.style.borderCollapse="collapse")})}}),m),g.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(q){if(null!=W){var B=W.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(C,G,K,Q){return"#"+("0"+Number(G).toString(16)).substr(-2)+("0"+Number(K).toString(16)).substr(-2)+("0"+Number(Q).toString(16)).substr(-2)});g.pickColor(B,function(C){var G=null==T||null!=q&&mxEvent.isShiftDown(q)?
W:T;d.processElements(G,function(K){K.style.backgroundColor=null});G.style.backgroundColor=null==C||C==mxConstants.NONE?"":C})}}),m),g.addButton(Editor.spacingImage,mxResources.get("spacing"),function(){if(null!=W){var q=W.getAttribute("cellPadding")||0;q=new FilenameDialog(g,q,mxResources.get("apply"),mxUtils.bind(this,function(B){null!=B&&0<B.length?W.setAttribute("cellPadding",B):W.removeAttribute("cellPadding")}),mxResources.get("spacing"));g.showDialog(q.container,300,80,!0,!0);q.init()}},m),
g.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=W&&W.setAttribute("align","left")},m),g.addButton(Editor.alignCenterImage,mxResources.get("center"),function(){null!=W&&W.setAttribute("align","center")},m),g.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=W&&W.setAttribute("align","right")},m)];A[2].style.marginRight="10px";p.appendChild(m);a.appendChild(p);var Wa=p}else a.appendChild(p),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),
-mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(D=0;3>D;D++)(function(q){mxEvent.addListener(w[q],"click",function(){f(w[q],""==w[q].style.backgroundImage)})})(D);var Xa=mxUtils.bind(this,function(q,B,C){h=g.getSelectionState();q=mxUtils.getValue(h.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.toolbar.setMenuText(u,
-mxUtils.getValue(h.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));f(y,"0"==mxUtils.getValue(h.style,mxConstants.STYLE_HORIZONTAL,"1"));if(C||document.activeElement!=ta)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ta.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(E,q==mxConstants.ALIGN_LEFT);f(F,q==mxConstants.ALIGN_CENTER);f(H,q==mxConstants.ALIGN_RIGHT);
+mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(E=0;3>E;E++)(function(q){mxEvent.addListener(w[q],"click",function(){f(w[q],""==w[q].style.backgroundImage)})})(E);var Xa=mxUtils.bind(this,function(q,B,C){h=g.getSelectionState();q=mxUtils.getValue(h.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.toolbar.setMenuText(u,
+mxUtils.getValue(h.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));f(y,"0"==mxUtils.getValue(h.style,mxConstants.STYLE_HORIZONTAL,"1"));if(C||document.activeElement!=ta)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ta.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(D,q==mxConstants.ALIGN_LEFT);f(F,q==mxConstants.ALIGN_CENTER);f(H,q==mxConstants.ALIGN_RIGHT);
q=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);f(M,q==mxConstants.ALIGN_TOP);f(N,q==mxConstants.ALIGN_MIDDLE);f(J,q==mxConstants.ALIGN_BOTTOM);q=mxUtils.getValue(h.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);B=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);Y.value=q==mxConstants.ALIGN_LEFT&&B==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&B==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&
B==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&B==mxConstants.ALIGN_BOTTOM?"bottomLeft":q==mxConstants.ALIGN_CENTER&&B==mxConstants.ALIGN_BOTTOM?"bottom":q==mxConstants.ALIGN_RIGHT&&B==mxConstants.ALIGN_BOTTOM?"bottomRight":q==mxConstants.ALIGN_LEFT?"left":q==mxConstants.ALIGN_RIGHT?"right":"center";q=mxUtils.getValue(h.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);q==mxConstants.TEXT_DIRECTION_RTL?X.value="rightToLeft":q==mxConstants.TEXT_DIRECTION_LTR?
X.value="leftToRight":q!=mxConstants.TEXT_DIRECTION_AUTO&&h.html?q==mxConstants.TEXT_DIRECTION_VERTICAL_LR?X.value="vertical-leftToRight":q==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(X.value="vertical-rightToLeft"):X.value="automatic";if(C||document.activeElement!=Ma)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING,2)),Ma.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(C||document.activeElement!=Aa)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_TOP,0)),Aa.value=
@@ -3178,8 +3182,8 @@ window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement
d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(xa).display)return xa;xa=xa.parentNode}return null},K=mxUtils.getCurrentStyle(q),Q=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,Z=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(K);if(window.getSelection)for(var ka=q.getElementsByTagName("*"),ha=window.getSelection(),la=0;la<ka.length&&(!ha.containsNode(ka[la],!0)||null==ka[la].style||(null==Z&&""!=ka[la].style.fontSize&&(Z=parseFloat(ka[la].style.fontSize)),
null==Q&&""!=ka[la].style.lineHeight&&(Q=ka[la].style.lineHeight),null==Z||null==Q));la++);null==Z&&(Z=b(K));if(null==Q)for(ka=q;null!=ka&&ka!=d.cellEditor.textarea.parentNode;){if(null!=ka.style&&""!=ka.style.lineHeight){Q=ka.style.lineHeight;break}ka=ka.parentNode}if(null!=K){f(w[0],"bold"==K.fontWeight||400<K.fontWeight||C("B")||C("STRONG"));f(w[1],"italic"==K.fontStyle||C("I")||C("EM"));f(w[2],"underline"==K.textDecorationLine||C("U"));f(V,"line-through"==K.textDecorationLine||C("STRIKE"));f(aa,
C("SUP"));f(S,C("SUB"));var ya=G(q);if(null!=ya){C=function(xa,Ga){Ha.push({name:xa,dispName:Ga,type:"string",getValue:function(){return La[xa]},valueChanged:function(va,ua){var Sa=ya.style,Qa=va;parseInt(Qa)==Qa&&(Qa+="px",null!=ua&&(ua.value=Qa));Sa[xa]=Qa;""==va&&null!=ua&&(ua.value=La[xa])}})};var La=mxUtils.getCurrentStyle(ya),Ha=[];C("paddingTop","Padding Top");C("paddingRight","Padding Right");C("paddingLeft","Padding Left");C("paddingBottom","Padding Bottom");C("marginTop","Margin Top");C("marginRight",
-"Margin Right");C("marginLeft","Margin Left");C("marginBottom","Margin Bottom");C=this.createPanel();this.addProperties(C,Ha,h,!0);null!=hb?hb.parentNode.replaceChild(C,hb):a.appendChild(C);hb=C}d.cellEditor.isTableSelected()?(f(fa,B(K.textAlign,"justify")),f(E,B(K.textAlign,"left")),f(F,B(K.textAlign,"center")),f(H,B(K.textAlign,"right"))):(C=d.cellEditor.align||mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),B(K.textAlign,"justify")?(f(fa,B(K.textAlign,"justify")),f(E,
-!1),f(F,!1),f(H,!1)):(f(fa,!1),f(E,C==mxConstants.ALIGN_LEFT),f(F,C==mxConstants.ALIGN_CENTER),f(H,C==mxConstants.ALIGN_RIGHT)));W=d.getParentByName(q,"TABLE",d.cellEditor.textarea);O=null==W?null:d.getParentByName(q,"TR",W);T=null==W?null:d.getParentByNames(q,["TD","TH"],W);Wa.style.display=null!=W?"":"none";document.activeElement!=ta&&(ta.value=isNaN(Z)?"":Z+" "+Editor.fontSizeUnit,"string"===typeof Q&&0<Q.indexOf("%")?Da.value=Q.replace("%"," %"):(B=parseFloat(Q),isNaN(B)?Da.value="120 %":Da.value=
+"Margin Right");C("marginLeft","Margin Left");C("marginBottom","Margin Bottom");C=this.createPanel();this.addProperties(C,Ha,h,!0);null!=hb?hb.parentNode.replaceChild(C,hb):a.appendChild(C);hb=C}d.cellEditor.isTableSelected()?(f(fa,B(K.textAlign,"justify")),f(D,B(K.textAlign,"left")),f(F,B(K.textAlign,"center")),f(H,B(K.textAlign,"right"))):(C=d.cellEditor.align||mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),B(K.textAlign,"justify")?(f(fa,B(K.textAlign,"justify")),f(D,
+!1),f(F,!1),f(H,!1)):(f(fa,!1),f(D,C==mxConstants.ALIGN_LEFT),f(F,C==mxConstants.ALIGN_CENTER),f(H,C==mxConstants.ALIGN_RIGHT)));W=d.getParentByName(q,"TABLE",d.cellEditor.textarea);O=null==W?null:d.getParentByName(q,"TR",W);T=null==W?null:d.getParentByNames(q,["TD","TH"],W);Wa.style.display=null!=W?"":"none";document.activeElement!=ta&&(ta.value=isNaN(Z)?"":Z+" "+Editor.fontSizeUnit,"string"===typeof Q&&0<Q.indexOf("%")?Da.value=Q.replace("%"," %"):(B=parseFloat(Q),isNaN(B)?Da.value="120 %":Da.value=
Math.round(100*B)+" %"));null!=da&&(ma=d.getTextColor(q,!0),da(ma,!0));null!=ca&&(P=d.getTextColor(q,!1),ca(P,!0));g.toolbar.setMenuText(u,mxUtils.getCssFontFamily(K.fontFamily))}}cb=!1}),0))});mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,"touchend",m);mxEvent.addListener(d.cellEditor.textarea,"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};
StyleFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();if(!a.containsLabel&&0<a.cells.length){a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==String(a.style.image).substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel()));a.fill&&this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));this.container.appendChild(this.addLineJumps(this.createPanel()));
@@ -3187,8 +3191,8 @@ var b=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPA
StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),e=document.createElement("style");mxUtils.setTextContent(e,a);b.body.appendChild(e);return e.sheet.cssRules};
StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var e=b.style.editableCssRules;if(null!=e){var f=new RegExp(e),g=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?decodeURIComponent(escape(atob(g))):Base64.decode(g,!0),h=mxUtils.parseXml(d);if(null!=h){var m="light"==h.documentElement.style.colorScheme||"0"==mxUtils.getValue(b.style,
"darkMode",null),p=""==h.documentElement.style.colorScheme,k=h.getElementsByTagName("style");for(b=0;b<k.length;b++){var u=this.getCssRules(mxUtils.getTextContent(k[b]));for(e=0;e<u.length;e++)this.addSvgRule(a,u[e],h,k[b],u,e,f,m,p)}}}}catch(w){}return a};StyleFormatPanel.prototype.getColorSchemeFromCss=function(a){return(a=a.match(/color-scheme\s*:\s*([^;]+)/i))?a[1].trim():null};
-StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,g,d,h,m,p){var k=this.editorUi,u=k.editor.graph;h.test(b.selectorText)&&(h=mxUtils.bind(this,function(w,y,A,D){var E=mxUtils.trim(w.style.getPropertyValue(y));if(""!=E&&"url("!=E.substring(0,4)){var F=E;"transparent"==F?F=mxConstants.NONE:(E=mxUtils.isLightDarkColor(F))&&D?D=!1:E||D||(F="light-dark("+F+", "+F+")");w=this.createColorOption(A+" "+w.selectorText,function(){return F},mxUtils.bind(this,function(H){g[d].style.setProperty(y,H==mxConstants.NONE?
-"transparent":mxUtils.getLightDarkColor(H).cssText);H="";p&&mxUtils.isLightDarkColor(g[d].style[y])&&(e.documentElement.style.colorScheme="light dark");for(var M=0;M<g.length;M++)H+=g[M].cssText+" ";f.textContent=H;H=mxUtils.getXml(e.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(H))):Base64.encode(H,!0)),k.getSelectionState().cells)}),"#ffffff",{install:function(H){},destroy:function(){}},null,null,null,D);a.appendChild(w);
+StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,g,d,h,m,p){var k=this.editorUi,u=k.editor.graph;h.test(b.selectorText)&&(h=mxUtils.bind(this,function(w,y,A,E){var D=mxUtils.trim(w.style.getPropertyValue(y));if(""!=D&&"url("!=D.substring(0,4)){var F=D;"transparent"==F?F=mxConstants.NONE:(D=mxUtils.isLightDarkColor(F))&&E?E=!1:D||E||(F="light-dark("+F+", "+F+")");w=this.createColorOption(A+" "+w.selectorText,function(){return F},mxUtils.bind(this,function(H){g[d].style.setProperty(y,H==mxConstants.NONE?
+"transparent":mxUtils.getLightDarkColor(H).cssText);H="";p&&mxUtils.isLightDarkColor(g[d].style[y])&&(e.documentElement.style.colorScheme="light dark");for(var M=0;M<g.length;M++)H+=g[M].cssText+" ";f.textContent=H;H=mxUtils.getXml(e.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(H))):Base64.encode(H,!0)),k.getSelectionState().cells)}),"#ffffff",{install:function(H){},destroy:function(){}},null,null,null,E);a.appendChild(w);
a.style.display=""}}),h(b,"fill",mxResources.get("fill"),m),h(b,"stroke",mxResources.get("line"),m),h(b,"stop-color",mxResources.get("gradient"),m))};
StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState();if(1==b.cells.length){var e=document.createElement("select");e.style.position="relative";e.style.marginBottom="2px";e.className="geFullWidthElement";var f="edit copyAsText editLink editShape editImage editData copyData pasteData editConnectionPoints editGeometry editTooltip editStyle".split(" "),g=null;if(null!=this.editorUi.sidebar){var d=this.editorUi.sidebar.getKeyStyle(b.cells[0].style);g=this.editorUi.sidebar.getLibsForStyle(d);
null!=g||this.editorUi.sidebar.isSearchIndexLoaded()||null==b.style.shape||"mxgraph."!=String(b.style.shape).substring(0,8)||(g=[])}null!=g&&f.push("openLibrary");for(d=0;d<f.length;d++){var h=this.editorUi.actions.get(f[d]);if(null==h||h.enabled){var m=document.createElement("option");m.setAttribute("value",f[d]);var p=mxResources.get(f[d]);mxUtils.write(m,p+"...");null!=h&&null!=h.shortcut&&(p+=" ("+h.shortcut+")");m.setAttribute("title",p);e.appendChild(m)}}1<e.children.length&&(a.appendChild(e),
@@ -3197,11 +3201,11 @@ f=f.view.getState(f.getSelectionCell()),null!=f&&null!=mxUtils.getValue(f.style,
StyleFormatPanel.prototype.addFill=function(a){function b(){h.innerHTML="";A=1;for(var F=0;F<Editor.fillStyles.length;F++){var H=document.createElement("option");H.setAttribute("value",Editor.fillStyles[F].val);mxUtils.write(H,Editor.fillStyles[F].dispName);h.appendChild(H)}}var e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=document.createElement("select");d.style.position="absolute";d.style.left="76px";d.style.width="86px";var h=d.cloneNode(!1);mxEvent.addListener(d,"click",function(F){mxEvent.consume(F)});
mxEvent.addListener(h,"click",function(F){mxEvent.consume(F)});var m=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(F){d.style.display=null==F||F==mxConstants.NONE?"none":""},function(F){f.updateCellStyles({gradientColor:F},f.getSelectionCells())},f.getDefaultColor(g.style,mxConstants.STYLE_GRADIENTCOLOR,f.shapeForegroundColor,f.shapeBackgroundColor));m.style.fontWeight="bold";var p="image"==g.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:
mxConstants.STYLE_FILLCOLOR,k=this.createCellColorOption(mxResources.get("fill"),p,"default",null,mxUtils.bind(this,function(F){f.setCellStyles(p,F,g.cells)}),f.getDefaultColor(g.style,p,f.shapeBackgroundColor,f.shapeForegroundColor));k.style.fontWeight="bold";var u=mxUtils.getValue(g.style,p,null);m.style.display=null!=u&&u!=mxConstants.NONE&&g.fill&&"image"!=g.style.shape?"":"none";var w=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,
-mxConstants.DIRECTION_RADIAL];for(u=0;u<w.length;u++){var y=document.createElement("option");y.setAttribute("value",w[u]);mxUtils.write(y,mxResources.get(w[u]));d.appendChild(y)}m.appendChild(d);var A;b();g.gradient&&k.appendChild(h);var D=mxUtils.bind(this,function(){g=e.getSelectionState();var F=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),H=mxUtils.getValue(g.style,"fillStyle","auto");""==F&&(F=mxConstants.DIRECTION_SOUTH);d.value=F;a.style.display=
+mxConstants.DIRECTION_RADIAL];for(u=0;u<w.length;u++){var y=document.createElement("option");y.setAttribute("value",w[u]);mxUtils.write(y,mxResources.get(w[u]));d.appendChild(y)}m.appendChild(d);var A;b();g.gradient&&k.appendChild(h);var E=mxUtils.bind(this,function(){g=e.getSelectionState();var F=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),H=mxUtils.getValue(g.style,"fillStyle","auto");""==F&&(F=mxConstants.DIRECTION_SOUTH);d.value=F;a.style.display=
g.fill?"":"none";F=mxUtils.getValue(g.style,p,null);if(g.fill&&null!=F&&F!=mxConstants.NONE&&"filledEdge"!=g.style.shape){if("1"==g.style.sketch){if(2!=A){h.innerHTML="";A=2;for(F=0;F<Editor.roughFillStyles.length;F++){var M=document.createElement("option");M.setAttribute("value",Editor.roughFillStyles[F].val);mxUtils.write(M,Editor.roughFillStyles[F].dispName);h.appendChild(M)}h.value="auto"}}else 1!=A&&b();h.value=H;h.value||(H="auto",h.value=H);h.style.display="1"==g.style.sketch||"none"==d.style.display?
-"":"none";m.style.display=!g.gradient||g.containsImage||"1"==g.style.sketch&&"solid"!=H&&"auto"!=H?"none":""}else h.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});D();mxEvent.addListener(d,"change",function(F){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,d.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],
-"cells",g.cells));mxEvent.consume(F)});mxEvent.addListener(h,"change",function(F){f.setCellStyles("fillStyle",h.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[h.value],"cells",g.cells));mxEvent.consume(F)});a.appendChild(k);a.appendChild(m);var E={};k=this.getCustomColors();for(u=0;u<k.length;u++)E[k[u].key]||(E[k[u].key]=!0,a.appendChild(this.createCellColorOption(k[u].title,k[u].key,k[u].defaultValue,null,null,k[u].defaultColorValue,k[u].undefinedColor,
-!0)));k=mxUtils.bind(this,function(F,H,M){if(null!=F){F=F.split(",");H=null!=H?H.split(","):null;for(var N=0;N<F.length;N++)if(!E[F[N]]){E[F[N]]=!0;var J=null!=H?H[mxUtils.mod(N,H.length)]:null,V=null!=J?J:"default";a.appendChild(this.createCellColorOption(Editor.getLabelForStylename(F[N]),F[N],V,null,null,M,J,!0))}}});k(g.style.fillColorStyles,g.style.defaultFillColors,f.shapeBackgroundColor);k(g.style.strokeColorStyles,g.style.defaultStrokeColors,f.shapeForegroundColor);return a};
+"":"none";m.style.display=!g.gradient||g.containsImage||"1"==g.style.sketch&&"solid"!=H&&"auto"!=H?"none":""}else h.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});E();mxEvent.addListener(d,"change",function(F){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,d.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],
+"cells",g.cells));mxEvent.consume(F)});mxEvent.addListener(h,"change",function(F){f.setCellStyles("fillStyle",h.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[h.value],"cells",g.cells));mxEvent.consume(F)});a.appendChild(k);a.appendChild(m);var D={};k=this.getCustomColors();for(u=0;u<k.length;u++)D[k[u].key]||(D[k[u].key]=!0,a.appendChild(this.createCellColorOption(k[u].title,k[u].key,k[u].defaultValue,null,null,k[u].defaultColorValue,k[u].undefinedColor,
+!0)));k=mxUtils.bind(this,function(F,H,M){if(null!=F){F=F.split(",");H=null!=H?H.split(","):null;for(var N=0;N<F.length;N++)if(!D[F[N]]){D[F[N]]=!0;var J=null!=H?H[mxUtils.mod(N,H.length)]:null,V=null!=J?J:"default";a.appendChild(this.createCellColorOption(Editor.getLabelForStylename(F[N]),F[N],V,null,null,M,J,!0))}}});k(g.style.fillColorStyles,g.style.defaultFillColors,f.shapeBackgroundColor);k(g.style.strokeColorStyles,g.style.defaultStrokeColors,f.shapeForegroundColor);return a};
StyleFormatPanel.prototype.getCustomColors=function(){var a=this.editorUi,b=a.editor.graph;a=a.getSelectionState();var e=[];if(null!=a.customProperties)for(var f in a.customProperties){var g=a.customProperties[f];if(null!=g&&g.primary&&("color"==g.type||"color"==g.subType)&&("function"!==typeof g.isVisible||g.isVisible(a,this))){var d="color"==g.subType?g.subDefVal:g.defVal;d=null!=d?d:b.shapeBackgroundColor;e.push({title:g.dispName,defaultValue:d,defaultColorValue:null!=g.defaultColor?g.defaultColor:
d,undefinedColor:g.undefinedColor,key:g.name})}}a.swimlane&&(b=this.editorUi.editor.graph,e.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default",defaultColorValue:b.shapeBackgroundColor}));return e};
StyleFormatPanel.prototype.addDashPattern=function(a,b){var e=b.split(" ");if(2<=e.length){for(var f=0,g=0;g<e.length;g++)f+=parseInt(e[g]);b=Graph.createSvgImage(f,1,'<line transform="translate(0,1)" x1="0" y1="0" x2="'+f+'" y2="0" stroke-dasharray="'+b+'" stroke-width="2" stroke="black"/>',f,1);a.style.backgroundImage="url("+b.src+")";a.style.backgroundSize=f+"px 1px";a.style.backgroundRepeat="repeat-x"}else a.style.borderBottomStyle=b};
@@ -3209,15 +3213,15 @@ StyleFormatPanel.prototype.addStroke=function(a){function b(P){var da=f.fromUnit
Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",h.cells)));N.value=f.inUnit(da)+" "+f.getUnit();mxEvent.consume(P)}var f=this,g=this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=document.createElement("div");m.className="geFormatEntry";h.stroke||(m.style.display="none");var p=document.createElement("select");
p.style.position="absolute";p.style.left="72px";p.style.width="90px";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));p.appendChild(w)}mxEvent.addListener(p,"change",function(P){d.getModel().beginUpdate();try{var da=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],ma=["0","0"];"rounded"==p.value?ma=["1","0"]:"curved"==p.value&&(ma=["0","1"]);for(var Ia=0;Ia<da.length;Ia++)d.setCellStyles(da[Ia],
ma[Ia],h.cells);g.fireEvent(new mxEventObject("styleChanged","keys",da,"values",ma,"cells",h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(P)});mxEvent.addListener(p,"click",function(P){mxEvent.consume(P)});var y="image"==h.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;k="image"==h.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(k,y,"default",null,mxUtils.bind(this,function(P){d.setCellStyles(y,P,h.cells);if(null==P||
-P==mxConstants.NONE){P=[];for(var da=0;da<h.cells.length;da++)(d.isTableCell(h.cells[da])||d.isTableRow(h.cells[da]))&&P.push(h.cells[da]);0<P.length&&d.setCellStyles(y,"inherit",P)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(p);var A=m.cloneNode(!1);A.style.position="relative";var D=mxUtils.bind(this,function(P,da,ma,Ia,oa){P=this.editorUi.menus.styleChange(P,"",Ia,oa,"",null);Ia=document.createElement("div");this.addDashPattern(Ia,ma);P.firstChild.firstChild.className="geStyleMenuItem";
-P.firstChild.firstChild.style.width=da+"px";P.firstChild.firstChild.appendChild(Ia);return P}),E=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(P,110,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(P,110,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
-["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(P,110,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(P,110,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");D(P,110,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");
-D(P,110,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(P,110,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,A),F=A.cloneNode(!1),H=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){var da=[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,mxConstants.STYLE_DASHED,"width"];Format.processMenuIcon(this.editorUi.menus.styleChange(P,
+P==mxConstants.NONE){P=[];for(var da=0;da<h.cells.length;da++)(d.isTableCell(h.cells[da])||d.isTableRow(h.cells[da]))&&P.push(h.cells[da]);0<P.length&&d.setCellStyles(y,"inherit",P)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(p);var A=m.cloneNode(!1);A.style.position="relative";var E=mxUtils.bind(this,function(P,da,ma,Ia,oa){P=this.editorUi.menus.styleChange(P,"",Ia,oa,"",null);Ia=document.createElement("div");this.addDashPattern(Ia,ma);P.firstChild.firstChild.className="geStyleMenuItem";
+P.firstChild.firstChild.style.width=da+"px";P.firstChild.firstChild.appendChild(Ia);return P}),D=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){E(P,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(P,110,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");E(P,110,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
+["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");E(P,110,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");E(P,110,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");E(P,110,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");
+E(P,110,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(P,110,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,A),F=A.cloneNode(!1),H=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){var da=[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,mxConstants.STYLE_DASHED,"width"];Format.processMenuIcon(this.editorUi.menus.styleChange(P,
"",da,[null,null,null,null,null],"",null,null,null,!0,Format.connectionImage.src)).setAttribute("title",mxResources.get("line"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["link",null,null,null,null],"",null,null,null,!0,Format.linkEdgeImage.src)).setAttribute("title",mxResources.get("link"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["flexArrow",null,null,null,null],"",null,null,null,!0,Format.arrowImage.src)).setAttribute("title",mxResources.get("arrow"));
Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["arrow",null,null,null,null],"",null,null,null,!0,Format.simpleArrowImage.src)).setAttribute("title",mxResources.get("simpleArrow"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["filledEdge",null,null,null,null],"",null,null,null,!0,Format.filledEdgeImage.src)).setAttribute("title","Filled Edge");Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["pipe",null,null,null,null],"",null,null,null,!0,Format.pipeEdgeImage.src)).setAttribute("title",
-"Pipe");Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["wire",null,null,"1",null],"",null,null,null,!0,Format.wireEdgeImage.src)).setAttribute("title","Wire")})),"",null,F);H.setAttribute("title",mxResources.get("connection"));w=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,40,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(P,40,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
-["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(P,40,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(P,40,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(P,40,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");D(P,40,
-"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(P,40,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(P,40,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,F);k=A.cloneNode(!1);var M=document.createElement("input");M.style.position="absolute";
+"Pipe");Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["wire",null,null,"1",null],"",null,null,null,!0,Format.wireEdgeImage.src)).setAttribute("title","Wire")})),"",null,F);H.setAttribute("title",mxResources.get("connection"));w=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){E(P,40,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(P,40,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
+["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");E(P,40,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");E(P,40,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");E(P,40,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");E(P,40,
+"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");E(P,40,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(P,40,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,F);k=A.cloneNode(!1);var M=document.createElement("input");M.style.position="absolute";
M.style.width="52px";M.style.left="148px";M.setAttribute("title",mxResources.get("linewidth"));A.appendChild(M);var N=M.cloneNode(!0);N.style.width="56px";N.style.left="144px";F.appendChild(N);var J=this.createStepper(M,b,this.getUnitStep(),null,null,this.isFloatUnit());J.style.display=M.style.display;A.appendChild(J);J=this.createStepper(N,e,this.getUnitStep(),null,null,this.isFloatUnit());J.style.display=N.style.display;F.appendChild(J);mxEvent.addListener(M,"blur",b);mxEvent.addListener(M,"change",
b);mxEvent.addListener(N,"blur",e);mxEvent.addListener(N,"change",e);var V=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){"arrow"!=h.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",mxResources.get("straight")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],null,null,!0,Format.orthogonalImage.src)).setAttribute("title",mxResources.get("orthogonal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],null,null,!0,Format.horizontalElbowImage.src)).setAttribute("title",mxResources.get("vertical")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
@@ -3254,9 +3258,9 @@ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STY
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)").setAttribute("title",
mxResources.get("block"));P.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=P.div&&mxUtils.fit(P.div)}),0)}})),"",null,k);H.style.width="67px";H.style.marginRight="2px";w.style.width="67px";w.style.marginRight="2px";V.style.width="67px";V.style.marginRight="2px";W.style.width="67px";W.style.marginRight="2px";T.style.width="67px";T.style.marginRight="2px";this.addArrow(H).appendChild(document.createElement("div"));this.addArrow(V).appendChild(document.createElement("div"));
-this.addArrow(W);this.addArrow(T);E.style.width="142px";E=this.addArrow(E);w=this.addArrow(w);var O=document.createElement("div");O.className="gePatternPreview";O.style.width="100px";O.style.borderBottomStyle="solid";E.appendChild(O);var fa=document.createElement("div");fa.className="gePatternPreview";fa.style.width="36px";fa.style.borderBottomStyle="solid";w.appendChild(fa);a.appendChild(u);a.appendChild(F);a.appendChild(A);u=A.cloneNode(!1);u.style.display="block";u.style.height="60px";u.style.paddingTop=
+this.addArrow(W);this.addArrow(T);D.style.width="142px";D=this.addArrow(D);w=this.addArrow(w);var O=document.createElement("div");O.className="gePatternPreview";O.style.width="100px";O.style.borderBottomStyle="solid";D.appendChild(O);var fa=document.createElement("div");fa.className="gePatternPreview";fa.style.width="36px";fa.style.borderBottomStyle="solid";w.appendChild(fa);a.appendChild(u);a.appendChild(F);a.appendChild(A);u=A.cloneNode(!1);u.style.display="block";u.style.height="60px";u.style.paddingTop=
"2px";w=document.createElement("div");w.style.position="absolute";w.style.maxWidth="78px";w.style.overflow="hidden";w.style.textOverflow="ellipsis";w.style.marginTop="4px";w.style.fontWeight="normal";mxUtils.write(w,mxResources.get("size"));u.appendChild(w);var S=this.addUnitInput(u,this.getUnit(),82,52,function(){X.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),aa=this.addUnitInput(u,this.getUnit(),16,52,function(){ja.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());
-mxUtils.br(u);E=document.createElement("div");E.style.height="8px";u.appendChild(E);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("spacing"));u.appendChild(w);var Y=this.addUnitInput(u,this.getUnit(),82,52,function(){ia.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ba=this.addUnitInput(u,this.getUnit(),16,52,function(){ta.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("linestart"),82,62).style.fontSize=
+mxUtils.br(u);D=document.createElement("div");D.style.height="8px";u.appendChild(D);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("spacing"));u.appendChild(w);var Y=this.addUnitInput(u,this.getUnit(),82,52,function(){ia.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ba=this.addUnitInput(u,this.getUnit(),16,52,function(){ta.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("linestart"),82,62).style.fontSize=
"10px";this.addLabel(u,mxResources.get("lineend"),16,62).style.fontSize="10px";mxUtils.br(u);m=m.cloneNode(!1);m.className="geFormatEntry";w=document.createElement("div");mxUtils.write(w,mxResources.get("perimeter"));m.appendChild(w);var L=this.addUnitInput(m,this.getUnit(),16,52,function(){ca.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());h.edges.length==h.cells.length?(a.appendChild(k),a.appendChild(u)):h.vertices.length==h.cells.length&&a.appendChild(m);var U=mxUtils.bind(this,
function(P,da,ma){function Ia(oa,za,Aa,Ma){Aa=Aa.getElementsByTagName("div")[0];null!=Aa&&g.updateCssForMarker(Aa,Ma,h.style.shape,oa,za);return Aa}h=g.getSelectionState();if(ma||document.activeElement!=M)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),M.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=N)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),N.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();p.style.visibility=
"connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape||"pipe"==h.style.shape?"":"hidden";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(h.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");O.style.borderBottom="1px solid black";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_DASHED,null)&&(P=mxUtils.getValue(h.style,mxConstants.STYLE_DASH_PATTERN,""),2<=String(P).split(" ").length?(O.style.borderBottom="1px solid transparent",
@@ -3271,9 +3275,9 @@ d.style.left="72px";d.style.width="72px";g=["none","arc","gap","sharp","line"];f
mxEvent.addListener(d,"click",function(w){mxEvent.consume(w)});a.appendChild(d);var p=this.addUnitInput(a,this.getUnit(),16,52,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());var k=this.installInputHandler(p,"jumpSize",Graph.defaultJumpSize,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var u=mxUtils.bind(this,function(w,y,A){f=b.getSelectionState();d.value=mxUtils.getValue(f.style,"jumpStyle","none");if(A||document.activeElement!=p)w=parseInt(mxUtils.getValue(f.style,
"jumpSize",Graph.defaultJumpSize)),p.value=isNaN(w)?"":this.inUnit(w)+" "+this.getUnit()});this.addKeyHandler(p,u);e.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){e.getModel().removeListener(u)}});u()}else a.style.display="none";return a};
StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState(),g=document.createElement("table");g.className="geFullWidthElement";g.style.fontWeight="bold";g.style.tableLayout="fixed";var d=document.createElement("tbody"),h=document.createElement("tr");h.style.padding="0px";var m=document.createElement("td");m.style.padding="0px";m.style.width="50%";m.style.verticalAlign="top";var p=m.cloneNode(!0);p.style.paddingLeft="8px";h.appendChild(m);h.appendChild(p);
-d.appendChild(h);g.appendChild(d);a.appendChild(g);var k=m,u=mxUtils.bind(this,function(y,A,D,E){y=this.createCellOption(y,A,D,null,null,E);y.style.alignItems="top";k.appendChild(y);k=k==m?p:m;return y}),w=mxUtils.bind(this,function(y,A,D){f=b.getSelectionState();m.innerText="";p.innerText="";k=m;f.rounded&&u(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);f.swimlane&&u(mxResources.get("divider"),"swimlaneLine",1);u(mxResources.get("sketch"),"sketch",0,function(F,H){e.updateCellStyles({sketch:H?
-"1":null,curveFitting:H?Editor.sketchDefaultCurveFitting:null,jiggle:H?Editor.sketchDefaultJiggle:null},F)});f.glass&&u(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);y=u(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);Editor.enableShadowOption||(y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(y,60));0<f.edges.length&&0==f.vertices.length&&u(mxResources.get("flowAnimation",null,"Flow Animation"),"flowAnimation",0);if(null!=f.customProperties)for(var E in f.customProperties)y=
-f.customProperties[E],null!=y&&"bool"==y.type&&y.primary&&("function"!==typeof y.isVisible||y.isVisible(f,this))&&u(y.dispName,E,y.defVal?"1":"0")});e.getModel().addListener(mxEvent.CHANGE,w);this.listeners.push({destroy:function(){e.getModel().removeListener(w)}});w();return a};StyleFormatPanel.prototype.addStyleOps=function(a){1==this.editorUi.getSelectionState().cells.length&&this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};
+d.appendChild(h);g.appendChild(d);a.appendChild(g);var k=m,u=mxUtils.bind(this,function(y,A,E,D){y=this.createCellOption(y,A,E,null,null,D);y.style.alignItems="top";k.appendChild(y);k=k==m?p:m;return y}),w=mxUtils.bind(this,function(y,A,E){f=b.getSelectionState();m.innerText="";p.innerText="";k=m;f.rounded&&u(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);f.swimlane&&u(mxResources.get("divider"),"swimlaneLine",1);u(mxResources.get("sketch"),"sketch",0,function(F,H){e.updateCellStyles({sketch:H?
+"1":null,curveFitting:H?Editor.sketchDefaultCurveFitting:null,jiggle:H?Editor.sketchDefaultJiggle:null},F)});f.glass&&u(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);y=u(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);Editor.enableShadowOption||(y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(y,60));0<f.edges.length&&0==f.vertices.length&&u(mxResources.get("flowAnimation",null,"Flow Animation"),"flowAnimation",0);if(null!=f.customProperties)for(var D in f.customProperties)y=
+f.customProperties[D],null!=y&&"bool"==y.type&&y.primary&&("function"!==typeof y.isVisible||y.isVisible(f,this))&&u(y.dispName,D,y.defVal?"1":"0")});e.getModel().addListener(mxEvent.CHANGE,w);this.listeners.push({destroy:function(){e.getModel().removeListener(w)}});w();return a};StyleFormatPanel.prototype.addStyleOps=function(a){1==this.editorUi.getSelectionState().cells.length&&this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};
mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.init=function(){this.container.appendChild(this.addView(this.createPanel()))};
DiagramStylePanel.prototype.getGlobalStyleButtons=function(){var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatEntry";var f=document.createElement("input");f.setAttribute("type","checkbox");f.checked=Editor.sketchMode;e.appendChild(f);mxUtils.write(e,mxResources.get("sketch"));mxEvent.addListener(e,"click",function(d){if(b.isEnabled()){var h=!Editor.sketchMode;b.updateCellStyles({sketch:h?"1":null,curveFitting:h?Editor.sketchDefaultCurveFitting:null,jiggle:h?
Editor.sketchDefaultJiggle:null},b.getVerticesAndEdges());a.setSketchMode(h);mxEvent.consume(d)}});e=[e,mxUtils.button(mxResources.get("rounded"),mxUtils.bind(this,function(d){var h=b.getVerticesAndEdges(),m=!0;if(0<h.length)for(var p=0;p<h.length;p++){var k=b.getCellStyle(h[p]);if(0==mxUtils.getValue(k,mxConstants.STYLE_ROUNDED,0)){m=!1;break}}m=!m;b.updateCellStyles({rounded:m?"1":"0"},h);m?(b.currentEdgeStyle.rounded="1",b.currentVertexStyle.rounded="1"):(delete b.currentEdgeStyle.rounded,delete b.currentVertexStyle.rounded);
@@ -3293,10 +3297,10 @@ S!=mxConstants.STYLE_STROKECOLOR)p&&f.isEdge(T)&&S==mxConstants.STYLE_FONTCOLOR?
"light",fa.parentNode.appendChild(S))}),w=document.createElement("div");w.style.whiteSpace="normal";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var y=mxUtils.bind(this,function(V,W,T,O,fa){var S=this.format.cachedStyleEntries[fa];null==S&&(S=document.createElement("div"),S.className="geGraphStylePreview",p||null==O||null==O.background||(S.style.backgroundColor=O.background),u(V,W,T,O,S),mxEvent.addGestureListeners(S,mxUtils.bind(this,function(aa){S.style.opacity=
.6}),null,mxUtils.bind(this,function(aa){S.style.opacity="";e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(V,e.currentVertexStyle);k(V,e.currentEdgeStyle);k(W,e.currentVertexStyle);k(T,e.currentEdgeStyle);f.beginUpdate();try{var Y=d.slice(),ba;for(ba in V)Y.push(ba);h(Y,O);if(!p){var L=new ChangePageSetup(b,null!=O?O.background:null);L.ignoreImage=!0;f.execute(L);f.execute(new ChangeGridColor(b,null!=O&&null!=O.gridColor?O.gridColor:
g))}}finally{f.endUpdate()}})),mxClient.IS_TOUCH||(mxEvent.addListener(S,"mouseenter",mxUtils.bind(this,function(aa){var Y=e.getCellStyle;aa=e.background;var ba=e.view.gridColor;p||(e.background=null!=O?O.background:null,e.view.gridColor=null!=O&&null!=O.gridColor?O.gridColor:g);e.getCellStyle=function(L,U){U=null!=U?U:!0;var X=mxUtils.clone(Y.apply(this,arguments)),ia=e.stylesheet.getDefaultVertexStyle(),ja=W;f.isEdge(L)&&(ia=e.stylesheet.getDefaultEdgeStyle(),ja=T);m(X,d,ia);k(V,X,L,O);k(ja,X,L,
-O);U&&(X=this.postProcessCellStyle(L,X));return X};e.refresh();e.getCellStyle=Y;e.background=aa;e.view.gridColor=ba})),mxEvent.addListener(S,"mouseleave",mxUtils.bind(this,function(aa){e.refresh()}))),this.format.cachedStyleEntries[fa]=S);w.appendChild(S)}),A=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var D=[],E=mxUtils.bind(this,function(){0<D.length&&(D[this.format.currentStylePage].style.background="#84d7ff");
-for(var V=10*this.format.currentStylePage;V<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);V++){var W=Editor.styles[V];y(W.commonStyle,W.vertexStyle,W.edgeStyle,W.graph,V)}}),F=mxUtils.bind(this,function(V){0<=V&&V<A&&(D[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=V,E())});if(1<A){var H=document.createElement("div");H.className="geSwitcher";H.style.width="200px";for(var M=0;M<A;M++){var N=document.createElement("div");
-N.className="geSwitcherDot";mxUtils.bind(this,function(V,W){mxEvent.addListener(N,"click",mxUtils.bind(this,function(){F(V)}))})(M,N);H.appendChild(N);D.push(N)}a.appendChild(H);E();if(15>A&&0<D.length){M=document.createElement("div");M.className="geButton";M.style.backgroundImage="url("+Editor.chevronLeftImage+")";var J=M.cloneNode(!1);J.style.backgroundImage="url("+Editor.chevronRightImage+")";H.insertBefore(M,D[0]);H.appendChild(J);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage-
-1,A))}));mxEvent.addListener(J,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage+1,A))}))}}else E();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
+O);U&&(X=this.postProcessCellStyle(L,X));return X};e.refresh();e.getCellStyle=Y;e.background=aa;e.view.gridColor=ba})),mxEvent.addListener(S,"mouseleave",mxUtils.bind(this,function(aa){e.refresh()}))),this.format.cachedStyleEntries[fa]=S);w.appendChild(S)}),A=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var E=[],D=mxUtils.bind(this,function(){0<E.length&&(E[this.format.currentStylePage].style.background="#84d7ff");
+for(var V=10*this.format.currentStylePage;V<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);V++){var W=Editor.styles[V];y(W.commonStyle,W.vertexStyle,W.edgeStyle,W.graph,V)}}),F=mxUtils.bind(this,function(V){0<=V&&V<A&&(E[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=V,D())});if(1<A){var H=document.createElement("div");H.className="geSwitcher";H.style.width="200px";for(var M=0;M<A;M++){var N=document.createElement("div");
+N.className="geSwitcherDot";mxUtils.bind(this,function(V,W){mxEvent.addListener(N,"click",mxUtils.bind(this,function(){F(V)}))})(M,N);H.appendChild(N);E.push(N)}a.appendChild(H);D();if(15>A&&0<E.length){M=document.createElement("div");M.className="geButton";M.style.backgroundImage="url("+Editor.chevronLeftImage+")";var J=M.cloneNode(!1);J.style.backgroundImage="url("+Editor.chevronRightImage+")";H.insertBefore(M,E[0]);H.appendChild(J);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage-
+1,A))}));mxEvent.addListener(J,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage+1,A))}))}}else D();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return e.pageVisible},function(d){b.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(e.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
if(e.isEnabled()){if(this.showBackgroundImageOption){var f=this.createOption(mxResources.get("background"),function(){return null!=e.backgroundImage},function(d){d||(d=new ChangePageSetup(b,null,null),d.ignoreColor=!0,e.model.execute(d))},{install:function(d){this.listener=function(){d(null!=e.backgroundImage)};b.addListener("backgroundImageChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}),g=f.getElementsByTagName("input")[0];null!=g&&(g.style.visibility=null!=e.backgroundImage?
@@ -3314,7 +3318,7 @@ DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(thi
DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var f=PageSetupDialog.addPageFormatPanel(a,"formatpanel",e.pageFormat,function(d){if(null==e.pageFormat||e.pageFormat.width!=d.width||e.pageFormat.height!=d.height)d=new ChangePageSetup(b,null,null,d),d.ignoreColor=!0,d.ignoreImage=!0,e.model.execute(d)});this.addKeyHandler(f.widthInput,function(){f.set(e.pageFormat)});this.addKeyHandler(f.heightInput,
function(){f.set(e.pageFormat)});var g=function(){f.set(e.pageFormat)};b.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){b.removeListener(g)}});e.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){e.getModel().removeListener(g)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};
DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,l,t){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=t?t:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function e(){mxSwimlane.call(this)}function f(){mxCylinder.call(this)}function g(){mxConnector.call(this)}function d(){mxCylinder.call(this)}function h(){mxActor.call(this)}function m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function w(){mxShape.call(this)}
-function y(){mxShape.call(this)}function A(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function D(){mxActor.call(this)}function E(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function H(){mxActor.call(this)}function M(){mxActor.call(this)}function N(){mxActor.call(this)}function J(){mxActor.call(this)}function V(){mxActor.call(this)}function W(){mxActor.call(this)}function T(){mxActor.call(this)}function O(c,l){this.canvas=c;this.canvas.setLineJoin("round");
+function y(){mxShape.call(this)}function A(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function E(){mxActor.call(this)}function D(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function H(){mxActor.call(this)}function M(){mxActor.call(this)}function N(){mxActor.call(this)}function J(){mxActor.call(this)}function V(){mxActor.call(this)}function W(){mxActor.call(this)}function T(){mxActor.call(this)}function O(c,l){this.canvas=c;this.canvas.setLineJoin("round");
this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,O.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,O.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,O.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,O.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
O.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,O.prototype.arcTo)}function fa(){mxRectangleShape.call(this)}function S(){mxRectangleShape.call(this)}function aa(){mxActor.call(this)}function Y(){mxActor.call(this)}function ba(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function U(){mxRectangleShape.call(this)}function X(){mxCylinder.call(this)}function ia(){mxShape.call(this)}function ja(){mxShape.call(this)}function ta(){mxEllipse.call(this)}
function ca(){mxShape.call(this)}function P(){mxShape.call(this)}function da(){mxRectangleShape.call(this)}function ma(){mxShape.call(this)}function Ia(){mxShape.call(this)}function oa(){mxShape.call(this)}function za(){mxShape.call(this)}function Aa(){mxShape.call(this)}function Ma(){mxCylinder.call(this)}function Pa(){mxCylinder.call(this)}function Ka(){mxRectangleShape.call(this)}function Ja(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function Da(){mxArrowConnector.call(this);
@@ -3338,10 +3342,10 @@ c.begin(),c.moveTo(n-v,0),c.lineTo(n-v,v),c.lineTo(n,v),c.close(),c.fill()),c.be
15;w.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(n*Math.tan(v),.5*r);c.translate(l,t);c.begin();c.moveTo(.5*n,0);c.lineTo(n,v);c.lineTo(n,r-v);c.lineTo(.5*n,r);c.lineTo(0,r-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*n,2*v);c.lineTo(n,v);c.moveTo(.5*n,2*v);c.lineTo(.5*n,r);c.stroke()};mxCellRenderer.registerShape("isoCube2",
w);mxUtils.extend(y,mxShape);y.prototype.size=15;y.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*
n,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",y);mxUtils.extend(A,mxCylinder);A.prototype.size=15;A.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),x=mxUtils.getValue(this.style,"lid",!0);c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),x?(c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v)):(c.moveTo(0,0),c.arcTo(.5*n,v,0,0,0,.5*n,v),c.arcTo(.5*n,v,
-0,0,0,n,0)),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),x&&(c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*n,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",A);mxUtils.extend(D,mxActor);D.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n/2,.5*r,n,0);c.quadTo(.5*n,r/2,n,r);c.quadTo(n/2,.5*r,0,r);c.quadTo(.5*n,r/2,0,0);c.end()};mxCellRenderer.registerShape("switch",D);mxUtils.extend(E,
-mxCylinder);E.prototype.tabWidth=60;E.prototype.tabHeight=20;E.prototype.tabPosition="right";E.prototype.arcSize=.1;E.prototype.isRoundable=function(){return!0};E.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),x=mxUtils.getValue(this.style,
+0,0,0,n,0)),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),x&&(c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*n,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",A);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n/2,.5*r,n,0);c.quadTo(.5*n,r/2,n,r);c.quadTo(n/2,.5*r,0,r);c.quadTo(.5*n,r/2,0,0);c.end()};mxCellRenderer.registerShape("switch",E);mxUtils.extend(D,
+mxCylinder);D.prototype.tabWidth=60;D.prototype.tabHeight=20;D.prototype.tabPosition="right";D.prototype.arcSize=.1;D.prototype.isRoundable=function(){return!0};D.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),x=mxUtils.getValue(this.style,
"rounded",!1),I=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));I||(z*=Math.min(n,r));z=Math.min(z,.5*n,.5*(r-t));l=Math.max(l,z);l=Math.min(n-z,l);x||(z=0);c.begin();"left"==v?(c.moveTo(Math.max(z,0),t),c.lineTo(Math.max(z,0),0),c.lineTo(l,0),c.lineTo(l,t)):(c.moveTo(n-l,t),c.lineTo(n-l,0),c.lineTo(n-Math.max(z,0),0),c.lineTo(n-Math.max(z,0),t));x?(c.moveTo(0,z+t),c.arcTo(z,z,0,0,1,z,t),c.lineTo(n-z,t),c.arcTo(z,z,0,0,1,n,z+t),c.lineTo(n,
-r-z),c.arcTo(z,z,0,0,1,n-z,r),c.lineTo(z,r),c.arcTo(z,z,0,0,1,0,r-z)):(c.moveTo(0,t),c.lineTo(n,t),c.lineTo(n,r),c.lineTo(0,r));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,t+20),c.lineTo(n-20,t+10),c.lineTo(n-10,t+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",E);E.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",
+r-z),c.arcTo(z,z,0,0,1,n-z,r),c.lineTo(z,r),c.arcTo(z,z,0,0,1,0,r-z)):(c.moveTo(0,t),c.lineTo(n,t),c.lineTo(n,r),c.lineTo(0,r));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,t+20),c.lineTo(n-20,t+10),c.lineTo(n-10,t+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",D);D.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",
15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));r||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?
new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(F,mxCylinder);F.prototype.arcSize=.1;F.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);var v=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));
t=mxUtils.getValue(this.style,"umlStateConnection",null);x||(l*=Math.min(n,r));l=Math.min(l,.5*n,.5*r);v||(l=0);v=0;null!=t&&(v=10);c.begin();c.moveTo(v,l);c.arcTo(l,l,0,0,1,v+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,r-l);c.arcTo(l,l,0,0,1,n-l,r);c.lineTo(v+l,r);c.arcTo(l,l,0,0,1,v,r-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,r-20,10,10,3,3),c.stroke(),c.roundrect(n-20,r-20,10,10,3,3),c.stroke(),
@@ -3351,7 +3355,7 @@ mxActor);M.prototype.size=.4;M.prototype.redrawPath=function(c,l,t,n,r){l=r*Math
n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=n,new mxRectangle(c.x,c.y+l,t,n-2*l);l*=t;return new mxRectangle(c.x+l,c.y,t-2*l,n)}return c};mxCellRenderer.registerShape("tape",M);mxUtils.extend(N,mxActor);N.prototype.size=.3;N.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};N.prototype.redrawPath=
function(c,l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,0);c.lineTo(n,0);c.lineTo(n,r-l/2);c.quadTo(3*n/4,r-1.4*l,n/2,r-l/2);c.quadTo(n/4,r-l*(1-1.4),0,r-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",N);var Ya=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,t,n){var r=mxUtils.getValue(this.style,"size");return null!=r?n*Math.max(0,Math.min(1,r)):Ya.apply(this,arguments)};
mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};A.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*
-l*this.scale))}return null};E.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));
+l*this.scale))}return null};D.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));
r||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};F.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,
"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(J,mxActor);J.prototype.size=.2;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,
"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("parallelogram",J);mxUtils.extend(V,mxActor);V.prototype.size=.2;V.prototype.fixedSize=
@@ -3522,8 +3526,8 @@ return l},internalStorage:function(c){var l=[Va(c,["dx","dy"],function(t){var n=
l.push(ib(c));return l},module:function(c){return[Va(c,["jettyWidth","jettyHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",Ma.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",Ma.prototype.jettyHeight)));return new mxPoint(l.x+t/2,l.y+2*n)},function(l,t){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,
t.y-l.y))/2)})]},corner:function(c){return[Va(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",eb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",eb.prototype.dy)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},tee:function(c){return[Va(c,["dx","dy"],function(l){var t=
Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",fb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",fb.prototype.dy)));return new mxPoint(l.x+(l.width+t)/2,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,t.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},singleArrow:vb(1),doubleArrow:vb(.5),"mxgraph.arrows2.wedgeArrow":db(20,20),"mxgraph.arrows2.wedgeArrowDashed":db(20,
-20),"mxgraph.arrows2.wedgeArrowDashed2":db(20,20),folder:function(c){return[Va(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",E.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",E.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,
-t.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,
+20),"mxgraph.arrows2.wedgeArrowDashed2":db(20,20),folder:function(c){return[Va(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",D.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",D.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,
+t.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,
Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},tape:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[Va(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",w.isoAngle))))*Math.PI/
200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(y.prototype.size),cylinder3:wb(A.prototype.size),offPageConnector:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-
t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(t){var n=Math.max(0,Math.min(t.width/2,t.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(t.x+n,t.y+n)},function(t,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));
@@ -3547,7 +3551,7 @@ mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwim
"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));return c};A.prototype.getConstraints=function(c,l,t){c=[];l=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};E.prototype.getConstraints=
+0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};D.prototype.getConstraints=
function(c,l,t){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),r=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),r))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3560,7 +3564,7 @@ Z.prototype.constraints=mxEllipse.prototype.constraints;La.prototype.constraints
.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
@@ -3583,8 +3587,8 @@ function(c,l,t){c=[];var n=Math.min(t,l),r=Math.max(0,Math.min(n,n*parseFloat(mx
0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,n));return c};da.prototype.constraints=null;q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
.9),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];za.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function e(k,u,w,y,A){A.getModel().beginUpdate();try{var D=A.getCellGeometry(k);null!=D&&w&&y&&(w/=y,D=D.clone(),1<w?D.height=D.width/w:D.width=D.height*w,A.getModel().setGeometry(k,
-D));A.setCellStyles(mxConstants.STYLE_CLIP_PATH,u,[k]);A.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[k])}finally{A.getModel().endUpdate()}}var f=this.editorUi,g=f.editor,d=g.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(f.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";f.openFile()});var m=new Action("smartFit",function(){d.popupMenuHandler.hideMenu();var k=d.view.scale,
+Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function e(k,u,w,y,A){A.getModel().beginUpdate();try{var E=A.getCellGeometry(k);null!=E&&w&&y&&(w/=y,E=E.clone(),1<w?E.height=E.width/w:E.width=E.height*w,A.getModel().setGeometry(k,
+E));A.setCellStyles(mxConstants.STYLE_CLIP_PATH,u,[k]);A.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[k])}finally{A.getModel().endUpdate()}}var f=this.editorUi,g=f.editor,d=g.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(f.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";f.openFile()});var m=new Action("smartFit",function(){d.popupMenuHandler.hideMenu();var k=d.view.scale,
u=d.container.scrollLeft,w=d.container.scrollTop,y=d.view.translate.x,A=d.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(k-d.view.scale)&&5>Math.abs(u-d.container.scrollLeft)&&5>Math.abs(w-d.container.scrollTop)&&y==d.view.translate.x&&A==d.view.translate.y&&f.actions.get("fitWindow").funct()},null,null,"Enter");m.getTitle=function(){return mxResources.get("fitWindow")+" / "+mxResources.get("resetView")};this.put("smartFit",m);this.addAction("keyPressEnter",function(){d.isSelectionEmpty()?
f.actions.get("smartFit").funct():d.isEnabled()&&d.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){f.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(k,u){try{var w=mxUtils.parseXml(k);g.graph.setSelectionCells(g.graph.importGraphModel(w.documentElement))}catch(y){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+y.message)}}));f.showDialog((new OpenDialog(this)).container,
320,220,!0,!0,function(){window.openFile=null})}).isEnabled=h;this.addAction("save",function(){f.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=h;this.addAction("saveAs...",function(){f.saveFile(!0)},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+S");this.addAction("export...",function(){f.showDialog((new ExportDialog(f)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var k=new EditDiagramDialog(f);f.showDialog(k.container,620,420,!0,!1,null,null,null,new mxRectangle(0,
@@ -3592,8 +3596,8 @@ f.actions.get("smartFit").funct():d.isEnabled()&&d.startEditingAtCell()});this.a
this.addAction("cut",function(){var k=null;try{k=f.copyXml(),null!=k&&d.removeCells(k,!1)}catch(u){}try{null==k&&mxClipboard.cut(d)}catch(u){f.handleError(u)}},null,"",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{f.copyXml()}catch(k){}try{mxClipboard.copy(d)}catch(k){f.handleError(k)}},null,"",Editor.ctrlKey+"+C");this.addAction("paste",function(){f.pasteFromClipboard()},!1,"",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(k){f.pasteFromClipboard(d.popupMenuHandler.getTriggerPoint())});
this.addAction("swap",function(){var k=d.getSelectionCells();2==k.length&&d.swapShapes(k[0],k[1])});this.addAction("copySize",function(){var k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.getModel().isVertex(k)&&(k=d.getCellGeometry(k),null!=k&&(f.copiedSize=new mxRectangle(k.x,k.y,k.width,k.height)))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+F");this.addAction("pasteSize",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedSize){d.getModel().beginUpdate();try{for(var k=d.getResizableCells(d.getSelectionCells()),
u=0;u<k.length;u++)if(d.getModel().isVertex(k[u])){var w=d.getCellGeometry(k[u]);null!=w&&(w=w.clone(),w.width=f.copiedSize.width,w.height=f.copiedSize.height,d.getModel().setGeometry(k[u],w))}}finally{d.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+V");this.addAction("copyData",function(){var k=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&&null!=k&&(k=k.cloneValue(),null==k||isNaN(k.nodeType)||(f.copiedValue=k))},null,null,Editor.altKey+"+"+Editor.shiftKey+
-"+B");this.addAction("copyAsText",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k)try{d.isHtmlLabel(k)?f.writeHtmlToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)})):f.writeTextToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)}))}catch(u){f.handleError(u)}});this.addAction("pasteData",function(k,u){function w(D,E){var F=y.getValue(D);E=D.cloneValue(E);E.removeAttribute("placeholders");null==F||isNaN(F.nodeType)||E.setAttribute("placeholders",
-F.getAttribute("placeholders"));null!=k&&mxEvent.isShiftDown(k)||E.setAttribute("label",d.convertValueToString(D));y.setValue(D,E)}k=null!=u?u:k;var y=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedValue){y.beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());if(0==A.length)w(y.getRoot(),f.copiedValue);else for(u=0;u<A.length;u++)w(A[u],f.copiedValue)}finally{y.endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+E");this.addAction("delete",function(k,u){k=
+"+B");this.addAction("copyAsText",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k)try{d.isHtmlLabel(k)?f.writeHtmlToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)})):f.writeTextToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)}))}catch(u){f.handleError(u)}});this.addAction("pasteData",function(k,u){function w(E,D){var F=y.getValue(E);D=E.cloneValue(D);D.removeAttribute("placeholders");null==F||isNaN(F.nodeType)||D.setAttribute("placeholders",
+F.getAttribute("placeholders"));null!=k&&mxEvent.isShiftDown(k)||D.setAttribute("label",d.convertValueToString(E));y.setValue(E,D)}k=null!=u?u:k;var y=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedValue){y.beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());if(0==A.length)w(y.getRoot(),f.copiedValue);else for(u=0;u<A.length;u++)w(A[u],f.copiedValue)}finally{y.endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+E");this.addAction("delete",function(k,u){k=
null!=u?u:k;null!=k&&mxEvent.isShiftDown(k)?b():a(null!=k&&(mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)||mxEvent.isAltDown(k)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(k){f.handleError(k)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action("merge",
function(){var k=f.getSelectionState();if(null!=k.mergeCell){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",k.rowspan,[k.mergeCell]),d.setCellStyles("colspan",k.colspan,[k.mergeCell])}finally{d.getModel().endUpdate()}}}));this.put("unmergeCells",new Action("unmerge",function(){var k=f.getSelectionState();if(0<k.cells.length){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",null,k.cells),d.setCellStyles("colspan",null,k.cells)}finally{d.getModel().endUpdate()}}}));m=new Action("turn",
function(k,u){k=null!=u?u:k;d.turnShapes(d.getResizableCells(d.getSelectionCells()),null!=k?mxEvent.isShiftDown(k):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R");m.getTitle=function(){return mxResources.get("turn")+" / "+mxResources.get("reverse")};this.put("turn",m);this.put("selectConnections",new Action("selectEdges",function(k){k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.addSelectionCells(d.getEdges(k))}));this.addAction("selectVertices",function(){d.selectVertices(null,!0)},null,
@@ -3608,7 +3612,7 @@ null==w&&(w=k.value.getAttribute("tooltip"));null!=w&&(u=w)}u=new TextareaDialog
!0)||"";f.showLinkDialog(u,mxResources.get("ok"),function(w,y,A){d.getModel().beginUpdate();try{d.setLinkForCell(k,0<w.length?w:null),d.setAttributeForCell(k,"linkTarget",A)}finally{d.getModel().endUpdate()}},!0,d.getLinkTargetForCell(k))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+L");this.put("insertImage",new Action("image...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),f.actions.get("image").funct())})).isEnabled=h;this.addAction("editImage...",function(){f.actions.get("image").funct()});
this.put("insertLink",new Action("link...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&f.showLinkDialog("",mxResources.get("ok"),function(k,u,w){k=mxUtils.trim(k);if(0<k.length){var y=null,A=d.getLinkTitle(k);null!=u&&0<u.length&&(y=u[0].iconUrl,A=u[0].name||u[0].type,A=A.charAt(0).toUpperCase()+A.substring(1),30<A.length&&(A=A.substring(0,30)+"..."));u=new mxCell(A,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=y?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+
y:"spacing=10;"));u.vertex=!0;y=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([u],!0));u.geometry.x=y.x;u.geometry.y=y.y;d.setAttributeForCell(u,"linkTarget",w);d.setLinkForCell(u,k);d.cellSizeUpdated(u,!0);d.getModel().beginUpdate();try{u=d.addCell(u),d.fireEvent(new mxEventObject("cellsInserted","cells",[u]))}finally{d.getModel().endUpdate()}d.setSelectionCell(u);d.scrollCellToVisible(d.getSelectionCell())}},!0)},null,null,"L")).isEnabled=h;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var k=
-d.getSelectedElement(),u=d.getParentByName(k,"A",d.cellEditor.textarea),w="";if(null==u&&null!=k&&null!=k.getElementsByTagName)for(var y=k.getElementsByTagName("a"),A=0;A<y.length&&null==u;A++)y[A].textContent==k.textContent&&(u=y[A]);null!=u&&"A"==u.nodeName&&(w=u.getAttribute("href")||"",d.selectNode(u));var D=d.cellEditor.saveSelection();f.showLinkDialog(w,mxResources.get("ok"),mxUtils.bind(this,function(E){d.cellEditor.restoreSelection(D);null!=E&&d.insertLink(E)}))}else d.isSelectionEmpty()?
+d.getSelectedElement(),u=d.getParentByName(k,"A",d.cellEditor.textarea),w="";if(null==u&&null!=k&&null!=k.getElementsByTagName)for(var y=k.getElementsByTagName("a"),A=0;A<y.length&&null==u;A++)y[A].textContent==k.textContent&&(u=y[A]);null!=u&&"A"==u.nodeName&&(w=u.getAttribute("href")||"",d.selectNode(u));var E=d.cellEditor.saveSelection();f.showLinkDialog(w,mxResources.get("ok"),mxUtils.bind(this,function(D){d.cellEditor.restoreSelection(E);null!=D&&d.insertLink(D)}))}else d.isSelectionEmpty()?
this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=h;this.addAction("autosize",function(){var k=d.getSelectionCells();if(null!=k){d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var w=k[u];d.getModel().isVertex(w)&&(0<d.getModel().getChildCount(w)?d.updateGroupBounds([w],0,!0):d.updateCellSize(w))}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});
this.addAction("formattedText",function(){d.stopEditing();var k=d.getCommonStyle(d.getSelectionCells());k="1"==mxUtils.getValue(k,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var u=d.getEditableCells(d.getSelectionCells()),w=0;w<u.length;w++)if(state=d.getView().getState(u[w]),null!=state){var y=mxUtils.getValue(state.style,"html","0");if("1"==y&&null==k)d.removeTextStyleForCell(state.cell),d.setCellStyles("html",k,[u[w]]);else if("0"==y&&"1"==k){var A=mxUtils.htmlEntities(d.convertValueToString(state.cell),
!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(A=A.replace(/\n/g,"<br/>"));d.cellLabelChanged(state.cell,Graph.sanitizeHtml(A));d.setCellStyles("html",k,[u[w]])}}f.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=k?k:"0"],"cells",u))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var k=d.getView().getState(d.getSelectionCell()),u="wrap";d.stopEditing();null!=k&&"wrap"==k.style[mxConstants.STYLE_WHITE_SPACE]&&(u=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
@@ -3622,8 +3626,8 @@ f.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});m.setToggleAction(!0)
m.setToggleAction(!0);m.setSelectedCallback(function(){return d.pageVisible});m=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;f.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionArrowsEnabled});m=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());f.fireEvent(new mxEventObject("connectionPointsChanged"))},
null,null,Editor.altKey+"+"+Editor.shiftKey+"+O");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});m=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());f.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});m.isEnabled=h;m=this.addAction("autosave",function(){f.editor.setAutosave(!f.editor.autosave)});
m.setToggleAction(!0);m.setSelectedCallback(function(){return f.editor.autosave});m.isEnabled=h;m.visible=!1;this.addAction("help",function(){var k="";mxResources.isLanguageSupported(mxClient.language)&&(k="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+k+".html")});var p=!1;m=new Action("about",function(){p||(f.showDialog((new AboutDialog(f)).container,320,280,!0,!0,function(){p=!1}),p=!0)});m.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",m);m=
-mxUtils.bind(this,function(k,u,w,y){return this.addAction(k,function(){if(null!=w&&d.cellEditor.isContentEditing())w();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,u,A);(u&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(A,function(E){E.style.fontWeight=null;"B"==E.nodeName&&d.replaceElement(E)}):(u&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(A,
-function(E){E.style.fontStyle=null;"I"==E.nodeName&&d.replaceElement(E)}):(u&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(A,function(E){E.style.textDecoration=null;"U"==E.nodeName&&d.replaceElement(E)});for(var D=0;D<A.length;D++)0==d.model.getChildCount(A[D])&&d.autoSizeCell(A[D],!1)}finally{d.getModel().endUpdate()}}},null,null,y)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,
+mxUtils.bind(this,function(k,u,w,y){return this.addAction(k,function(){if(null!=w&&d.cellEditor.isContentEditing())w();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,u,A);(u&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(A,function(D){D.style.fontWeight=null;"B"==D.nodeName&&d.replaceElement(D)}):(u&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(A,
+function(D){D.style.fontStyle=null;"I"==D.nodeName&&d.replaceElement(D)}):(u&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(A,function(D){D.style.textDecoration=null;"U"==D.nodeName&&d.replaceElement(D)});for(var E=0;E<A.length;E++)0==d.model.getChildCount(A[E])&&d.autoSizeCell(A[E],!1)}finally{d.getModel().endUpdate()}}},null,null,y)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,
function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){f.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",d.shapeForegroundColor)});this.addAction("strokeColor...",function(){f.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("fillColor...",function(){f.menus.pickColor(mxConstants.STYLE_FILLCOLOR,
null,null,"default",d.shapeBackgroundColor)});this.addAction("gradientColor...",function(){f.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("backgroundColor...",function(){f.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor",null,"default",d.shapeBackgroundColor)});this.addAction("borderColor...",function(){f.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("removeFormat",
function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&!d.isEditing()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.removeTextStyleForCell(k[u],!0)}finally{d.getModel().endUpdate()}}});this.addAction("vertical",function(){f.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){f.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,
@@ -3639,10 +3643,10 @@ null!=k.handler&&k.handler.removePoint(k.handler.state,k.index)});this.addAction
this.addAction("clearWaypoints",function(){var k=d.getSelectionCells();if(null!=k){k=d.getEditableCells(d.addAllEdges(k));d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var w=k[u];if(d.getModel().isEdge(w)){var y=d.getCellGeometry(w);null!=y&&(y=y.clone(),y.points=null,y.x=0,y.y=0,y.offset=null,d.getModel().setGeometry(w,y))}}}finally{d.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+R");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&
document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,
Math.max(1,k-1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" + (Numpad)");m=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,k+1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" - (Numpad)");this.addAction("image...",function(){if(d.isEnabled()&&
-!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),w="",y=null;null!=u&&(w=u.style[mxConstants.STYLE_IMAGE]||w,y=u.style[mxConstants.STYLE_CLIP_PATH]||y);var A=d.cellEditor.saveSelection();f.showImageDialog(k,w,function(D,E,F,H,M,N){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(A),d.insertImage(D,E,F);else{var J=d.getSelectionCells();if(null!=D&&(0<D.length||0<J.length)){var V=null;
-d.getModel().beginUpdate();try{if(0==J.length){J=[d.insertVertex(d.getDefaultParent(),null,"",0,0,E,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var W=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(J,!0));J[0].geometry.x=W.x;J[0].geometry.y=W.y;null!=H&&e(J[0],H,M,N,d);V=J;d.fireEvent(new mxEventObject("cellsInserted","cells",V))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<D.length?D:null,J);var T=d.getCurrentCellStyle(J[0]);"image"!=T[mxConstants.STYLE_SHAPE]&&
-"label"!=T[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",J):0==D.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,J);null==H&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,J);if(null!=E&&null!=F)for(D=0;D<J.length;D++){var O=J[D];if("0"!=d.getCurrentCellStyle(O).expand){var fa=d.getModel().getGeometry(O);null!=fa&&(fa=fa.clone(),fa.width=E,fa.height=F,d.getModel().setGeometry(O,fa))}null!=H&&e(O,H,M,N,d)}}finally{d.getModel().endUpdate()}null!=V&&(d.setSelectionCells(V),
-d.scrollCellToVisible(V[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,y)}}).isEnabled=h;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],y=u[mxConstants.STYLE_SHAPE];w&&"image"==y&&(u=new CropImageDialog(f,w,u[mxConstants.STYLE_CLIP_PATH],function(A,D,E){e(k,A,D,E,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=h;m=this.addAction("layers",
+!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),w="",y=null;null!=u&&(w=u.style[mxConstants.STYLE_IMAGE]||w,y=u.style[mxConstants.STYLE_CLIP_PATH]||y);var A=d.cellEditor.saveSelection();f.showImageDialog(k,w,function(E,D,F,H,M,N){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(A),d.insertImage(E,D,F);else{var J=d.getSelectionCells();if(null!=E&&(0<E.length||0<J.length)){var V=null;
+d.getModel().beginUpdate();try{if(0==J.length){J=[d.insertVertex(d.getDefaultParent(),null,"",0,0,D,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var W=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(J,!0));J[0].geometry.x=W.x;J[0].geometry.y=W.y;null!=H&&e(J[0],H,M,N,d);V=J;d.fireEvent(new mxEventObject("cellsInserted","cells",V))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<E.length?E:null,J);var T=d.getCurrentCellStyle(J[0]);"image"!=T[mxConstants.STYLE_SHAPE]&&
+"label"!=T[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",J):0==E.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,J);null==H&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,J);if(null!=D&&null!=F)for(E=0;E<J.length;E++){var O=J[E];if("0"!=d.getCurrentCellStyle(O).expand){var fa=d.getModel().getGeometry(O);null!=fa&&(fa=fa.clone(),fa.width=D,fa.height=F,d.getModel().setGeometry(O,fa))}null!=H&&e(O,H,M,N,d)}}finally{d.getModel().endUpdate()}null!=V&&(d.setSelectionCells(V),
+d.scrollCellToVisible(V[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,y)}}).isEnabled=h;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],y=u[mxConstants.STYLE_SHAPE];w&&"image"==y&&(u=new CropImageDialog(f,w,u[mxConstants.STYLE_CLIP_PATH],function(A,E,D){e(k,A,E,D,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=h;m=this.addAction("layers",
mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(f,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),f.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),
null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("format",mxUtils.bind(this,function(){f.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return f.isFormatPanelVisible()}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?
(this.outlineWindow=new OutlineWindow(f,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),f.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+
@@ -3692,20 +3696,20 @@ w&&0<w.length&&(e.scrollCellToVisible(w[0]),e.setSelectionCells(w))}),b):(m&&(b=
b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),Editor.removeColumnImage,mxUtils.bind(this,function(){if(null!=f)try{h?e.deleteLane(f):e.deleteTableColumn(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("deleteColumn"))),p&&(b=a.addItem(mxResources.get("insertRowBefore"),Editor.addRowAboveImage,mxUtils.bind(this,function(){try{h?e.insertLane(f,!0):e.insertTableRow(f,!0)}catch(k){this.editorUi.handleError(k)}})),
b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),Editor.addRowBelowImage,mxUtils.bind(this,function(){try{h?e.insertLane(f,!1):e.insertTableRow(f,!1)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),Editor.removeRowImage,mxUtils.bind(this,function(){try{h?e.deleteLane(f):e.deleteTableRow(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",
mxResources.get("deleteRow")),p=this.editorUi.getSelectionState(),null!=p.mergeCell?this.addMenuItem(a,"mergeCells"):(1<p.style.colspan||1<p.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};
-Menus.prototype.addInsertTableItem=function(a,b,e,f){function g(A){y=d.getParentByName(mxEvent.getSource(A),"TD");var D=!1;if(null!=y){w=d.getParentByName(y,"TR");var E=mxEvent.isMouseEvent(A)?2:4,F=k,H=Math.min(20,w.sectionRowIndex+E);E=Math.min(20,y.cellIndex+E);for(var M=F.rows.length;M<H;M++)for(var N=F.insertRow(M),J=0;J<F.rows[0].cells.length;J++)N.insertCell(-1);for(M=0;M<F.rows.length;M++)for(N=F.rows[M],J=N.cells.length;J<E;J++)N.insertCell(-1);u.innerHTML=y.cellIndex+1+"x"+(w.sectionRowIndex+
-1);for(F=0;F<k.rows.length;F++)for(H=k.rows[F],E=0;E<H.cells.length;E++)M=H.cells[E],F==w.sectionRowIndex&&E==y.cellIndex&&(D="blue"==M.style.backgroundColor),M.style.backgroundColor=F<=w.sectionRowIndex&&E<=y.cellIndex?"blue":"transparent"}mxEvent.consume(A);return D}f=null!=f?f:!0;var d=this.editorUi.editor.graph;b=null!=b?b:mxUtils.bind(this,function(A,D,E){if(null!=d.getParentByName(mxEvent.getSource(A),"TD")&&null!=d.cellEditor.textarea){var F=d.cellEditor.textarea.getElementsByTagName("table");
-A=[];for(var H=0;H<F.length;H++)A.push(F[H]);d.container.focus();H=d;F=H.pasteHtmlAtCaret;for(var M=["<table>"],N=0;N<D;N++){M.push("<tr>");for(var J=0;J<E;J++)M.push("<td><br></td>");M.push("</tr>")}M.push("</table>");D=M.join("");F.call(H,D);D=d.cellEditor.textarea.getElementsByTagName("table");if(D.length==A.length+1)for(H=D.length-1;0<=H;H--)if(0==H||D[H]!=A[H-1]){d.selectNode(D[H].rows[0].cells[0]);break}}});null==e&&(a.div.classList.add("geToolbarMenu"),a.labels=!1);a=a.addItem("",null,null,
+Menus.prototype.addInsertTableItem=function(a,b,e,f){function g(A){y=d.getParentByName(mxEvent.getSource(A),"TD");var E=!1;if(null!=y){w=d.getParentByName(y,"TR");var D=mxEvent.isMouseEvent(A)?2:4,F=k,H=Math.min(20,w.sectionRowIndex+D);D=Math.min(20,y.cellIndex+D);for(var M=F.rows.length;M<H;M++)for(var N=F.insertRow(M),J=0;J<F.rows[0].cells.length;J++)N.insertCell(-1);for(M=0;M<F.rows.length;M++)for(N=F.rows[M],J=N.cells.length;J<D;J++)N.insertCell(-1);u.innerHTML=y.cellIndex+1+"x"+(w.sectionRowIndex+
+1);for(F=0;F<k.rows.length;F++)for(H=k.rows[F],D=0;D<H.cells.length;D++)M=H.cells[D],F==w.sectionRowIndex&&D==y.cellIndex&&(E="blue"==M.style.backgroundColor),M.style.backgroundColor=F<=w.sectionRowIndex&&D<=y.cellIndex?"blue":"transparent"}mxEvent.consume(A);return E}f=null!=f?f:!0;var d=this.editorUi.editor.graph;b=null!=b?b:mxUtils.bind(this,function(A,E,D){if(null!=d.getParentByName(mxEvent.getSource(A),"TD")&&null!=d.cellEditor.textarea){var F=d.cellEditor.textarea.getElementsByTagName("table");
+A=[];for(var H=0;H<F.length;H++)A.push(F[H]);d.container.focus();H=d;F=H.pasteHtmlAtCaret;for(var M=["<table>"],N=0;N<E;N++){M.push("<tr>");for(var J=0;J<D;J++)M.push("<td><br></td>");M.push("</tr>")}M.push("</table>");E=M.join("");F.call(H,E);E=d.cellEditor.textarea.getElementsByTagName("table");if(E.length==A.length+1)for(H=E.length-1;0<=H;H--)if(0==H||E[H]!=A[H-1]){d.selectNode(E[H].rows[0].cells[0]);break}}});null==e&&(a.div.classList.add("geToolbarMenu"),a.labels=!1);a=a.addItem("",null,null,
e,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";e=a.getElementsByTagName("td");1<e.length&&(e[1].style.display="none",e[2].style.display="none");a.firstChild.innerText="";var h=document.createElement("input");h.setAttribute("id","geTitleOption");h.setAttribute("type","checkbox");h.style.verticalAlign="middle";e=document.createElement("label");mxUtils.write(e,mxResources.get("title"));e.setAttribute("for","geTitleOption");e.style.verticalAlign="middle";mxEvent.addGestureListeners(e,
null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));mxEvent.addGestureListeners(h,null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");m.style.verticalAlign="middle";var p=document.createElement("label");mxUtils.write(p,mxResources.get("container"));p.setAttribute("for","geContainerOption");p.style.verticalAlign="middle";mxEvent.addGestureListeners(p,null,null,mxUtils.bind(this,
-function(A){mxEvent.consume(A)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));f&&(a.firstChild.appendChild(h),a.firstChild.appendChild(e),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(p),mxUtils.br(a.firstChild));var k=function(A,D){var E=document.createElement("table");E.className="geInsertTablePicker";E.setAttribute("border","1");E.style.borderCollapse="collapse";E.style.borderStyle="solid";E.style.marginBottom="4px";
-E.style.marginTop="8px";E.setAttribute("cellPadding","8");for(var F=0;F<A;F++)for(var H=E.insertRow(F),M=0;M<D;M++)H.insertCell(-1);return E}(5,5);a.firstChild.appendChild(k);var u=document.createElement("div");u.style.textAlign="center";u.style.padding="4px";u.style.width="100%";u.innerHTML="1x1";a.firstChild.appendChild(u);var w=null,y=null;mxEvent.addGestureListeners(k,null,null,mxUtils.bind(this,function(A){var D=g(A);null!=y&&null!=w&&D&&(b(A,w.sectionRowIndex+1,y.cellIndex+1,h.checked,m.checked),
+function(A){mxEvent.consume(A)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));f&&(a.firstChild.appendChild(h),a.firstChild.appendChild(e),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(p),mxUtils.br(a.firstChild));var k=function(A,E){var D=document.createElement("table");D.className="geInsertTablePicker";D.setAttribute("border","1");D.style.borderCollapse="collapse";D.style.borderStyle="solid";D.style.marginBottom="4px";
+D.style.marginTop="8px";D.setAttribute("cellPadding","8");for(var F=0;F<A;F++)for(var H=D.insertRow(F),M=0;M<E;M++)H.insertCell(-1);return D}(5,5);a.firstChild.appendChild(k);var u=document.createElement("div");u.style.textAlign="center";u.style.padding="4px";u.style.width="100%";u.innerHTML="1x1";a.firstChild.appendChild(u);var w=null,y=null;mxEvent.addGestureListeners(k,null,null,mxUtils.bind(this,function(A){var E=g(A);null!=y&&null!=w&&E&&(b(A,w.sectionRowIndex+1,y.cellIndex+1,h.checked,m.checked),
window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(k,"mouseover",g)};
-Menus.prototype.edgeStyleChange=function(a,b,e,f,g,d,h,m){return this.showIconOnly(a.addItem(b,m,mxUtils.bind(this,function(){var p=this.editorUi.editor.graph;p.stopEditing(!1);p.getModel().beginUpdate();try{for(var k=p.getSelectionCells(),u=[],w=0;w<k.length;w++){var y=k[w];if(p.getModel().isEdge(y)){if(h){var A=p.getCellGeometry(y);null!=A&&(A=A.clone(),A.points=null,p.getModel().setGeometry(y,A))}for(var D=0;D<e.length;D++)p.setCellStyles(e[D],f[D],[y]);u.push(y)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
+Menus.prototype.edgeStyleChange=function(a,b,e,f,g,d,h,m){return this.showIconOnly(a.addItem(b,m,mxUtils.bind(this,function(){var p=this.editorUi.editor.graph;p.stopEditing(!1);p.getModel().beginUpdate();try{for(var k=p.getSelectionCells(),u=[],w=0;w<k.length;w++){var y=k[w];if(p.getModel().isEdge(y)){if(h){var A=p.getCellGeometry(y);null!=A&&(A=A.clone(),A.points=null,p.getModel().setGeometry(y,A))}for(var E=0;E<e.length;E++)p.setCellStyles(e[E],f[E],[y]);u.push(y)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
"cells",u,"keys",e,"values",f,"force",0==k.length))}finally{p.getModel().endUpdate()}}),d,g))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};
Menus.prototype.styleChange=function(a,b,e,f,g,d,h,m,p,k){var u=this.createStyleChangeFunction(e,f);a=a.addItem(b,k,mxUtils.bind(this,function(){var w=this.editorUi.editor.graph;null!=h&&w.cellEditor.isContentEditing()?h():u(m)}),d,g);p&&this.showIconOnly(a);return a};
Menus.prototype.createStyleChangeFunction=function(a,b){return mxUtils.bind(this,function(e){var f=this.editorUi.editor.graph;f.stopEditing(!1);f.getModel().beginUpdate();try{for(var g=f.getEditableCells(f.getSelectionCells()),d=!1,h=0;h<a.length;h++)if(f.setCellStyles(a[h],b[h],g),a[h]==mxConstants.STYLE_ALIGN&&f.updateLabelElements(g,function(m){m.removeAttribute("align");m.style.textAlign=null}),a[h]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[h])d=!0;if(d)for(d=0;d<g.length;d++)0==f.model.getChildCount(g[d])&&
f.autoSizeCell(g[d],!1);null!=e&&e();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",b,"cells",g))}finally{f.getModel().endUpdate()}})};
-Menus.prototype.promptChange=function(a,b,e,f,g,d,h,m,p,k){return a.addItem(b,null,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph,w=f,y=u.getView().getState(u.getSelectionCell());null!=y&&(w=y.style[g]||w);var A=null!=k?k():!0;w=new FilenameDialog(this.editorUi,w,mxResources.get("apply"),mxUtils.bind(this,function(D){if(null!=D&&0<D.length){if(A){u.getModel().beginUpdate();try{u.stopEditing(!1),u.setCellStyles(g,D)}finally{u.getModel().endUpdate()}}null!=m&&m(D)}}),mxResources.get("enterValue")+
+Menus.prototype.promptChange=function(a,b,e,f,g,d,h,m,p,k){return a.addItem(b,null,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph,w=f,y=u.getView().getState(u.getSelectionCell());null!=y&&(w=y.style[g]||w);var A=null!=k?k():!0;w=new FilenameDialog(this.editorUi,w,mxResources.get("apply"),mxUtils.bind(this,function(E){if(null!=E&&0<E.length){if(A){u.getModel().beginUpdate();try{u.stopEditing(!1),u.setCellStyles(g,E)}finally{u.getModel().endUpdate()}}null!=m&&m(E)}}),mxResources.get("enterValue")+
(0<e.length?" "+e:""),null,null,null,null,function(){null!=m&&null!=k&&m(null)});this.editorUi.showDialog(w.container,300,80,!0,!0);w.init()}),d,p,h)};
Menus.prototype.pickColor=function(a,b,e,f,g,d){this.editorUi.tryAndHandle(mxUtils.bind(this,function(){var h=this.editorUi.editor.graph;if(null!=b&&h.cellEditor.isContentEditing()){var m=h.getSelectedEditingElement();null!=m&&null!=h.cellEditor.textarea&&(m=h.getTextColor(m,"forecolor"==b),this.editorUi.pickColor(m,mxUtils.bind(this,function(k){null!=h.cellEditor.textarea&&(Graph.setTextColor(h.cellEditor.textarea,k,"forecolor"==b),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",
["forecolor"==b?mxConstants.STYLE_FONTCOLOR:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[k],"cells",[h.cellEditor.getEditingCell()])))}),f,g,d))}else{var p=h.getCellStyle(h.getSelectionCell(),!1);m=mxConstants.NONE;null!=p&&(m=p[a]||m);this.editorUi.pickColor(m,ColorDialog.createApplyFunction(this.editorUi,a),f,g,d)}}))};
@@ -3730,8 +3734,8 @@ Menu.prototype.execute=function(a,b){this.funct(a,b)};EditorUi.prototype.createM
Toolbar.prototype.init=function(){var a=this.addMenu(this.editorUi.menus.get("viewPanels"),null,Editor.dockRightImage);a.setAttribute("data-min-width","720");this.addSeparator(null,720);var b=this.editorUi.createZoomInput();b.setAttribute("data-min-width","580");this.container.appendChild(b);this.addSeparator(null,580);this.addItems(["zoomIn","zoomOut"],null,null,[Editor.zoomInImage,Editor.zoomOutImage],460);this.addSeparator(null,460);this.addItems(["undo","redo"],null,null,[Editor.undoImage,Editor.redoImage]);
this.addSeparator(null,260);this.addItems(["delete"],null,null,[Editor.trashImage],260);this.addSeparator(null,300);this.addItems(["toFront","toBack"],null,null,[Editor.toFrontImage,Editor.toBackImage],660);this.addSeparator(null,660);this.addItems(["fillColor"],null,null,[Editor.fillColorImage],740);this.addItems(["strokeColor"],null,null,[Editor.strokeColorImage],780);this.addItems(["shadow"],null,null,[Editor.shadowImage],820);this.addSeparator(null,820);this.edgeShapeMenu=this.addMenu(this.editorUi.menus.get("edgeShape"));
this.edgeShapeMenu.setAttribute("data-min-width",440);this.edgeStyleMenu=this.addMenu(this.editorUi.menus.get("edgeStyle"));this.edgeStyleMenu.setAttribute("data-min-width",480);this.addSeparator(null,480);var e=this.addMenu(this.editorUi.menus.get("insert"),null,Editor.plusImage);e.setAttribute("data-min-width",300);var f=e.cloneNode(!0);f.setAttribute("data-min-width",330);f.style.backgroundImage="url("+Editor.shapesImage+")";this.editorUi.addShapePicker(f,!0);this.container.appendChild(f);var g=
-this.addTableDropDown();g.setAttribute("data-min-width",360);this.editorUi.dependsOnLanguage(mxUtils.bind(this,function(){null!=this.edgeShapeMenu&&this.edgeShapeMenu.setAttribute("title",mxResources.get("connection"));null!=this.edgeStyleMenu&&this.edgeStyleMenu.setAttribute("title",mxResources.get("waypoints"));a.setAttribute("title",mxResources.get("view")+" ("+mxResources.get("panTooltip")+")");e.setAttribute("title",mxResources.get("insert")+" ("+mxResources.get("doubleClickTooltip")+")");f.setAttribute("title",
-mxResources.get("shapes"));g.setAttribute("title",mxResources.get("table"))}))};Toolbar.prototype.appendDropDownImageHtml=function(a){a.style.backgroundImage="url("+Editor.thinExpandImage+")";a.style.backgroundPosition="right 0px top 50%";a.style.paddingRight="16px"};
+this.addTableDropDown();g.setAttribute("data-min-width",360);this.addSeparator(null,360);this.addItems(["insertFreehand","generate"],null,null,[Editor.freehandImage,Editor.sparklesImage],420);this.editorUi.dependsOnLanguage(mxUtils.bind(this,function(){null!=this.edgeShapeMenu&&this.edgeShapeMenu.setAttribute("title",mxResources.get("connection"));null!=this.edgeStyleMenu&&this.edgeStyleMenu.setAttribute("title",mxResources.get("waypoints"));a.setAttribute("title",mxResources.get("view")+" ("+mxResources.get("panTooltip")+
+")");e.setAttribute("title",mxResources.get("insert")+" ("+mxResources.get("doubleClickTooltip")+")");f.setAttribute("title",mxResources.get("shapes"));g.setAttribute("title",mxResources.get("table"))}))};Toolbar.prototype.appendDropDownImageHtml=function(a){a.style.backgroundImage="url("+Editor.thinExpandImage+")";a.style.backgroundPosition="right 0px top 50%";a.style.paddingRight="16px"};
Toolbar.prototype.addTableDropDown=function(){var a=this.addMenu(new Menu(mxUtils.bind(this,function(e){this.editorUi.menus.addInsertTableCellItem(e)})),null,Editor.tableImage),b=this.editorUi.menus.get("insert");null!=b&&"function"===typeof a.setEnabled&&b.addListener("stateChanged",function(){a.setEnabled(b.enabled)});return a};
Toolbar.prototype.setFontName=function(a){if(null!=this.fontMenu){this.fontMenu.innerText="";var b=document.createElement("span");mxUtils.write(b,a);this.fontMenu.appendChild(b);this.appendDropDownImageHtml(this.fontMenu)}};Toolbar.prototype.setFontSize=function(a){if(null!=this.sizeMenu){this.sizeMenu.innerText="";var b=document.createElement("span");mxUtils.write(b,a);this.sizeMenu.appendChild(b);this.appendDropDownImageHtml(this.sizeMenu)}};
Toolbar.prototype.createTextToolbar=function(){var a=this.editorUi,b=a.editor.graph,e=this.addMenu(this.editorUi.menus.get("formatBlock"),"");e.style.width="54px";e.setAttribute("data-min-width",360);this.appendDropDownImageHtml(e);this.addSeparator(null,360);var f=this.addMenu(this.editorUi.menus.get("fontFamily"),"");this.fontMenu=f;this.fontMenu.style.width="82px";this.fontMenu.setAttribute("data-min-width",240);this.setFontName(Menus.prototype.defaultFont);this.addSeparator(null,280);var g=this.addMenu(this.editorUi.menus.get("fontSize"),
@@ -3746,50 +3750,50 @@ p.addItem("",Editor.removeFormatImage,mxUtils.bind(this,function(){document.exec
!1,null)}))})),null,Editor.plusImage);h.setAttribute("data-min-width",700);this.addSeparator(null,700);var m=this.addMenu(new Menu(mxUtils.bind(this,function(p){var k=b.getSelectedElement(),u=b.getParentByNames(k,["TD","TH"],b.cellEditor.text2),w=b.getParentByName(k,"TR",b.cellEditor.text2);if(null==w)this.editorUi.menus.addInsertTableItem(p);else{var y=b.getParentByName(w,"TABLE",b.cellEditor.text2);k=p.addItem("",Editor.addColumnLeftImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(y,
null!=u?u.cellIndex:0))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertColumnBefore"));k=p.addItem("",Editor.addColumnRightImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(y,null!=u?u.cellIndex+1:-1))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertColumnAfter"));k=p.addItem("Delete column",Editor.removeColumnImage,mxUtils.bind(this,function(){if(null!=u)try{b.deleteColumn(y,u.cellIndex)}catch(A){this.editorUi.handleError(A)}}));
k.setAttribute("title",mxResources.get("deleteColumn"));k=p.addItem("",Editor.addRowAboveImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(y,w.sectionRowIndex))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertRowBefore"));k=p.addItem("",Editor.addRowBelowImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(y,w.sectionRowIndex+1))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertRowAfter"));k=p.addItem("",
-Editor.removeRowImage,mxUtils.bind(this,function(){try{b.deleteRow(y,w.sectionRowIndex)}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("deleteRow"));k=p.addItem("",Editor.strokeColorImage,mxUtils.bind(this,function(){var A=y.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(D,E,F,H){return"#"+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,
-function(D){null==D||D==mxConstants.NONE?(y.removeAttribute("border"),y.style.border="",y.style.borderCollapse=""):(y.setAttribute("border","1"),y.style.border="1px solid "+D,y.style.borderCollapse="collapse")})}));k.setAttribute("title",mxResources.get("borderColor"));k=p.addItem("",Editor.fillColorImage,mxUtils.bind(this,function(){var A=y.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(D,E,F,H){return"#"+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+
-("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(D){y.style.backgroundColor=null==D||D==mxConstants.NONE?"":D})}));k.setAttribute("title",mxResources.get("backgroundColor"));k=p.addItem("",Editor.spacingImage,mxUtils.bind(this,function(){var A=y.getAttribute("cellPadding")||0;A=new FilenameDialog(this.editorUi,A,mxResources.get("apply"),mxUtils.bind(this,function(D){null!=D&&0<D.length?y.setAttribute("cellPadding",D):y.removeAttribute("cellPadding")}),mxResources.get("spacing"));
+Editor.removeRowImage,mxUtils.bind(this,function(){try{b.deleteRow(y,w.sectionRowIndex)}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("deleteRow"));k=p.addItem("",Editor.strokeColorImage,mxUtils.bind(this,function(){var A=y.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(E,D,F,H){return"#"+("0"+Number(D).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,
+function(E){null==E||E==mxConstants.NONE?(y.removeAttribute("border"),y.style.border="",y.style.borderCollapse=""):(y.setAttribute("border","1"),y.style.border="1px solid "+E,y.style.borderCollapse="collapse")})}));k.setAttribute("title",mxResources.get("borderColor"));k=p.addItem("",Editor.fillColorImage,mxUtils.bind(this,function(){var A=y.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(E,D,F,H){return"#"+("0"+Number(D).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+
+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(E){y.style.backgroundColor=null==E||E==mxConstants.NONE?"":E})}));k.setAttribute("title",mxResources.get("backgroundColor"));k=p.addItem("",Editor.spacingImage,mxUtils.bind(this,function(){var A=y.getAttribute("cellPadding")||0;A=new FilenameDialog(this.editorUi,A,mxResources.get("apply"),mxUtils.bind(this,function(E){null!=E&&0<E.length?y.setAttribute("cellPadding",E):y.removeAttribute("cellPadding")}),mxResources.get("spacing"));
this.editorUi.showDialog(A.container,300,80,!0,!0);A.init()}));k.setAttribute("title",mxResources.get("spacing"));k=p.addItem("",Editor.alignLeftImage,mxUtils.bind(this,function(){y.setAttribute("align","left")}));k.setAttribute("title",mxResources.get("left"));k=p.addItem("",Editor.alignCenterImage,mxUtils.bind(this,function(){y.setAttribute("align","center")}));k.setAttribute("title",mxResources.get("center"));k=p.addItem("",Editor.alignRightImage,mxUtils.bind(this,function(){y.setAttribute("align",
"right")}));k.setAttribute("title",mxResources.get("right"))}})),null,Editor.tableImage);m.setAttribute("data-min-width",740);this.editorUi.dependsOnLanguage(mxUtils.bind(this,function(){e.innerText=mxResources.get("style");d.setAttribute("title",mxResources.get("format"));e.setAttribute("title",mxResources.get("style"));f.setAttribute("title",mxResources.get("fontFamily"));g.setAttribute("title",mxResources.get("fontSize"));h.setAttribute("title",mxResources.get("insert"));m.setAttribute("title",
mxResources.get("table"))}))};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.setMenuText=function(a,b){a.getElementsByTagName("span")[0].innerText=b};Toolbar.prototype.setMenuIcon=function(a,b){a.style.backgroundImage="url("+b+")"};
Toolbar.prototype.addMenu=function(a,b,e,f){var g=this.editorUi.createMenuElement("",a.funct);this.editorUi.menus.menuCreated(a,g,"geButton");null!=e?g.style.backgroundImage="url("+e+")":null!=b&&(a=document.createElement("span"),mxUtils.write(a,b),g.appendChild(a));f=null!=f?f:this.container;f.appendChild(g);return g};
-Toolbar.prototype.addSeparator=function(a,b){a=null!=a?a:this.container;var e=document.createElement("div");e.className="geSeparator";a.appendChild(e);null!=b&&e.setAttribute("data-min-width",b);return e};Toolbar.prototype.addItems=function(a,b,e,f,g){for(var d=[],h=0;h<a.length;h++){var m=a[h];"-"==m?d.push(this.addSeparator(b,g)):(m=this.addItem(null!=f?f[h]:null,m,b,e),d.push(m),null!=g&&m.setAttribute("data-min-width",g))}return d};
+Toolbar.prototype.addSeparator=function(a,b){a=null!=a?a:this.container;var e=document.createElement("div");e.className="geSeparator";a.appendChild(e);null!=b&&e.setAttribute("data-min-width",b);return e};Toolbar.prototype.addItems=function(a,b,e,f,g){for(var d=[],h=0;h<a.length;h++){var m=a[h];"-"==m?d.push(this.addSeparator(b,g)):(m=this.addItem(null!=f?f[h]:null,m,b,e),null!=m&&(d.push(m),null!=g&&m.setAttribute("data-min-width",g)))}return d};
Toolbar.prototype.addItem=function(a,b,e){var f=this.editorUi.actions.get(b),g=null;null!=f&&(g=this.editorUi.addButton(a,"",f.funct,null!=e?e:this.container),this.editorUi.dependsOnLanguage(mxUtils.bind(this,function(){var d=f.getTitle();null!=f.shortcut&&(d+=" ("+f.shortcut+")");g.setAttribute("title",d)})),a=mxUtils.bind(this,function(){f.enabled?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}),f.addListener("stateChanged",a),a());return g};
-Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(E,F,H){if(null==E)return[H,H,H];var M=Math.floor(E),
-N=H*(1-F);E=H*(1-F*(M%2?E-M:1-(E-M)));switch(M){case 6:case 0:return[H,E,N];case 1:return[E,H,N];case 2:return[N,H,E];case 3:return[N,E,H];case 4:return[E,N,H];case 5:return[H,N,E]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage+
+Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(D,F,H){if(null==D)return[H,H,H];var M=Math.floor(D),
+N=H*(1-F);D=H*(1-F*(M%2?D-M:1-(D-M)));switch(M){case 6:case 0:return[H,D,N];case 1:return[D,H,N];case 2:return[N,H,D];case 3:return[N,D,H];case 4:return[D,N,H];case 5:return[H,N,D]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage+
")";e.style.position="absolute";e.style.overflow="hidden";e.style.cursor="crosshair";e.style.width="181px";e.style.height="101px";e.style.left="6px";e.style.top="4px";var f=document.createElement("div");f.style.background="url("+this.crossImage+")";f.style.pointerEvents="none";f.style.position="absolute";f.style.width="15px";f.style.height="15px";f.style.left="-8px";f.style.top="-8px";var g=[0,0,1],d=1;e.appendChild(f);b.appendChild(e);sliderBox=document.createElement("div");sliderBox.style.position=
-"absolute";sliderBox.style.cursor="pointer";sliderBox.style.width="38px";sliderBox.style.height="110px";sliderBox.style.left="199px";sliderBox.style.top="4px";var h=document.createElement("div");h.style.border="1px solid light-dark(black, white)";h.style.pointerEvents="none";h.style.overflow="hidden";h.style.position="absolute";h.style.width="16px";h.style.height="101px";h.style.left="9px";h.style.top="0px";var m=!1,p=!1,k=mxUtils.bind(this,function(E){var F=Math.round(100*(1-g[1]));f.style.left=
-Math.round(g[0]/6*180)-8+"px";f.style.top=F-8+"px";F=h.childNodes;var H=a(g[0],g[1],1);if(null!=H){for(var M=0;M<F.length;M++)F[M].style.backgroundColor="rgb("+H[0]*(1-M/F.length)*255+", "+H[1]*(1-M/F.length)*255+", "+H[2]*(1-M/F.length)*255+")";D.style.top=Math.round(100*(1-g[2]))-4+"px";F=a(g[0],g[1],g[2]);F="#"+("0"+Math.round(255*F[0]).toString(16)).slice(-2)+("0"+Math.round(255*F[1]).toString(16)).slice(-2)+("0"+Math.round(255*F[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):
-"");1!=E&&this.fireEvent(new mxEventObject("change","color",mxUtils.rgba2hex(F)))}}),u=mxUtils.bind(this,function(E){0==g[2]&&(g[2]=1);m=!0;y(E)}),w=mxUtils.bind(this,function(E){p=!0;y(E)}),y=mxUtils.bind(this,function(E){if(m){var F=e.getBoundingClientRect(),H=mxEvent.getClientX(E)-F.left;E=mxEvent.getClientY(E)-F.top;f.style.left=H-8+"px";f.style.top=E-8+"px";H*=6/180;E=1-E/100;F=void 0;0>H&&(H=0);6<H&&(H=6);0>E&&(E=0);1<E&&(E=1);0>F&&(F=0);1<F&&(F=1);H=a(null==H?g[0]:g[0]=H,null==E?g[1]:g[1]=
-E,null==F?g[2]:g[2]=F);this.fromString("#"+("0"+Math.floor(255*H[0]).toString(16)).slice(-2)+("0"+Math.floor(255*H[1]).toString(16)).slice(-2)+("0"+Math.floor(255*H[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):""))}else p&&(F=sliderBox.getBoundingClientRect(),E=mxEvent.getClientY(E)-F.top,g[2]=Math.max(Math.min(1,1-E/100),0),k())}),A=mxUtils.bind(this,function(){m=p=!1});mxEvent.addGestureListeners(e,u);mxEvent.addGestureListeners(sliderBox,w);mxEvent.addGestureListeners(b,
-null,y,A);mxEvent.addListener(b,"mouseleave",A);for(u=0;101>u;u+=4)w=document.createElement("div"),w.style.height="4px",w.style.pointerEvents="none",h.appendChild(w);b.appendChild(h);var D=document.createElement("div");D.style.background="url("+this.arrowImage+")";D.style.position="absolute";D.style.pointerEvents="none";D.style.width="7px";D.style.height="11px";D.style.left="2px";D.style.top="-3px";sliderBox.appendChild(D);sliderBox.appendChild(h);b.appendChild(sliderBox);this.fromString=function(E,
-F){F=null!=F?F:!1;if(null==E||""==E||mxUtils.isVarColor(E)||E==mxConstants.NONE)E="#ffffff",F=!0;E=mxUtils.parseColor(E);var H=E.r/255,M=E.g/255,N=E.b/255,J=Math.min(Math.min(H,M),N);var V=Math.max(Math.max(H,M),N);var W=V-J;0===W?V=[null,0,V]:(H=H===J?3+(N-M)/W:M===J?5+(H-N)/W:1+(M-H)/W,V=[6===H?0:H,W/V,V]);null!=V[0]&&(g[0]=V[0]);0!=V[2]&&(g[1]=V[1]);g[2]=V[2];d=E.a;k(F)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";
+"absolute";sliderBox.style.cursor="pointer";sliderBox.style.width="38px";sliderBox.style.height="110px";sliderBox.style.left="199px";sliderBox.style.top="4px";var h=document.createElement("div");h.style.border="1px solid light-dark(black, white)";h.style.pointerEvents="none";h.style.overflow="hidden";h.style.position="absolute";h.style.width="16px";h.style.height="101px";h.style.left="9px";h.style.top="0px";var m=!1,p=!1,k=mxUtils.bind(this,function(D){var F=Math.round(100*(1-g[1]));f.style.left=
+Math.round(g[0]/6*180)-8+"px";f.style.top=F-8+"px";F=h.childNodes;var H=a(g[0],g[1],1);if(null!=H){for(var M=0;M<F.length;M++)F[M].style.backgroundColor="rgb("+H[0]*(1-M/F.length)*255+", "+H[1]*(1-M/F.length)*255+", "+H[2]*(1-M/F.length)*255+")";E.style.top=Math.round(100*(1-g[2]))-4+"px";F=a(g[0],g[1],g[2]);F="#"+("0"+Math.round(255*F[0]).toString(16)).slice(-2)+("0"+Math.round(255*F[1]).toString(16)).slice(-2)+("0"+Math.round(255*F[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):
+"");1!=D&&this.fireEvent(new mxEventObject("change","color",mxUtils.rgba2hex(F)))}}),u=mxUtils.bind(this,function(D){0==g[2]&&(g[2]=1);m=!0;y(D)}),w=mxUtils.bind(this,function(D){p=!0;y(D)}),y=mxUtils.bind(this,function(D){if(m){var F=e.getBoundingClientRect(),H=mxEvent.getClientX(D)-F.left;D=mxEvent.getClientY(D)-F.top;f.style.left=H-8+"px";f.style.top=D-8+"px";H*=6/180;D=1-D/100;F=void 0;0>H&&(H=0);6<H&&(H=6);0>D&&(D=0);1<D&&(D=1);0>F&&(F=0);1<F&&(F=1);H=a(null==H?g[0]:g[0]=H,null==D?g[1]:g[1]=
+D,null==F?g[2]:g[2]=F);this.fromString("#"+("0"+Math.floor(255*H[0]).toString(16)).slice(-2)+("0"+Math.floor(255*H[1]).toString(16)).slice(-2)+("0"+Math.floor(255*H[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):""))}else p&&(F=sliderBox.getBoundingClientRect(),D=mxEvent.getClientY(D)-F.top,g[2]=Math.max(Math.min(1,1-D/100),0),k())}),A=mxUtils.bind(this,function(){m=p=!1});mxEvent.addGestureListeners(e,u);mxEvent.addGestureListeners(sliderBox,w);mxEvent.addGestureListeners(b,
+null,y,A);mxEvent.addListener(b,"mouseleave",A);for(u=0;101>u;u+=4)w=document.createElement("div"),w.style.height="4px",w.style.pointerEvents="none",h.appendChild(w);b.appendChild(h);var E=document.createElement("div");E.style.background="url("+this.arrowImage+")";E.style.position="absolute";E.style.pointerEvents="none";E.style.width="7px";E.style.height="11px";E.style.left="2px";E.style.top="-3px";sliderBox.appendChild(E);sliderBox.appendChild(h);b.appendChild(sliderBox);this.fromString=function(D,
+F){F=null!=F?F:!1;if(null==D||""==D||mxUtils.isVarColor(D)||D==mxConstants.NONE)D="#ffffff",F=!0;D=mxUtils.parseColor(D);var H=D.r/255,M=D.g/255,N=D.b/255,J=Math.min(Math.min(H,M),N);var V=Math.max(Math.max(H,M),N);var W=V-J;0===W?V=[null,0,V]:(H=H===J?3+(N-M)/W:M===J?5+(H-N)/W:1+(M-H)/W,V=[6===H?0:H,W/V,V]);null!=V[0]&&(g[0]=V[0]);0!=V[2]&&(g[1]=V[1]);g[2]=V[2];d=D.a;k(F)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";
ColorPicker.prototype.crossImage="data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=";ColorPicker.prototype.arrowImage="data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7";
var ColorDialog=function(a,b,e,f,g,d,h){function m(da){return mxUtils.color2hex("#"+da).substring(1).toUpperCase()}function p(){Y.src="none"==aa.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(da,ma){da||"none"==aa.style.display?(aa.style.display="flex",!1!==ma&&O.focus()):aa.style.display="none";p()}function u(da){""==da.value&&null!=N&&V?da.style.background=da==O?N.dark:N.light:""==da.value||da.value==mxConstants.NONE||mxUtils.isVarColor(da.value)?da.style.background="transparent":
da.style.background="#"+da.value;da.style.color="transparent"==da.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(da.style.background)?"#ffffff":"#000000"}function w(){u(W);u(O)}function y(da){V!=da&&(da?h&&null!=N?(W.value=N.light.substring(1).toUpperCase(),da=!1):(W.value="",O.value="",fa.value="automatic",W.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),O.setAttribute("title",mxResources.get("useBlackAndWhite")),W.setAttribute("title",mxResources.get("useBlackAndWhite"))):
(""==W.value&&null!=N&&(W.value=N.light.substring(1).toUpperCase()),W.removeAttribute("placeholder"),W.removeAttribute("title"),""==O.value&&null!=N&&(O.style.background=N.dark,da=mxUtils.getCurrentStyle(O),O.value=mxUtils.rgba2hex(da.backgroundColor).substring(1).toUpperCase()),O.removeAttribute("placeholder"),O.removeAttribute("title"),da=!1));V=da}function A(da){"#"==da.value.charAt(0)&&(da.value=da.value.substring(1));var ma=da.value,Ia=ma.toLowerCase();null==g||""!=ma&&"automatic"!=Ia&&"default"!=
Ia&&Ia!=mxResources.get("default").toLowerCase()&&Ia!=mxResources.get("automatic").toLowerCase()||null==N?(da.value==mxConstants.NONE||mxUtils.isVarColor(da.value)||(da.value=m(da.value),ia.fromString("#"+da.value)),y(!1),da!=O||W.value==mxConstants.NONE&&O.value==mxConstants.NONE||(fa.value="custom"),da==W&&"automatic"==fa.value&&(W.value==mxConstants.NONE?O.value=mxConstants.NONE:mxUtils.isVarColor(W.value)?O.value=W.value:O.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+da.value)).substring(1).toUpperCase()),
-w()):U.click()}function D(){var da=W.value,ma=O.value;if(V&&null!=N||(/(^#?[a-zA-Z0-9]*$)/.test(da)||mxUtils.isVarColor(da))&&(/(^#?[a-zA-Z0-9]*$)/.test(ma)||mxUtils.isVarColor(ma))){if(V)da="default";else if(""==da&&(da=mxConstants.NONE),""==ma&&(ma=mxConstants.NONE),da==mxConstants.NONE||mxUtils.isVarColor(da)||"#"==da.charAt(0)||(da="#"+m(da)),ma==mxConstants.NONE||mxUtils.isVarColor(ma)||"#"==ma.charAt(0)||(ma="#"+m(ma)),da!=mxConstants.NONE&&ma!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,
-12),"automatic"!=fa.value&&ma!=mxConstants.NONE?da==mxConstants.NONE?ColorDialog.addRecentColor(ma.substring(1),12):ColorDialog.addRecentColor("light-dark("+da+","+ma+")",12):da!=mxConstants.NONE&&ColorDialog.addRecentColor(da.substring(1),12),"none"!=da||"none"!=ma)da=da==mxConstants.NONE?"transparent":da,ma=ma==mxConstants.NONE?"transparent":ma,h||"automatic"==fa.value||(da="light-dark("+da+","+ma+")");X(da);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function E(){mxClient.IS_TOUCH||
-window.setTimeout(function(){ja.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)},0)}function F(){ja.value!=mxConstants.NONE&&""!=ja.value&&ia.fromString("#"+ja.value,!0)}function H(){var da=ca(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);da.style.marginBottom="8px";return da}function M(da){13==da.keyCode&&(A(mxEvent.getSource(da)),D())}var N=null!=d?mxUtils.getLightDarkColor(d,null,null,
+w()):U.click()}function E(){var da=W.value,ma=O.value;if(V&&null!=N||(/(^#?[a-zA-Z0-9]*$)/.test(da)||mxUtils.isVarColor(da))&&(/(^#?[a-zA-Z0-9]*$)/.test(ma)||mxUtils.isVarColor(ma))){if(V)da="default";else if(""==da&&(da=mxConstants.NONE),""==ma&&(ma=mxConstants.NONE),da==mxConstants.NONE||mxUtils.isVarColor(da)||"#"==da.charAt(0)||(da="#"+m(da)),ma==mxConstants.NONE||mxUtils.isVarColor(ma)||"#"==ma.charAt(0)||(ma="#"+m(ma)),da!=mxConstants.NONE&&ma!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,
+12),"automatic"!=fa.value&&ma!=mxConstants.NONE?da==mxConstants.NONE?ColorDialog.addRecentColor(ma.substring(1),12):ColorDialog.addRecentColor("light-dark("+da+","+ma+")",12):da!=mxConstants.NONE&&ColorDialog.addRecentColor(da.substring(1),12),"none"!=da||"none"!=ma)da=da==mxConstants.NONE?"transparent":da,ma=ma==mxConstants.NONE?"transparent":ma,h||"automatic"==fa.value||(da="light-dark("+da+","+ma+")");X(da);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function D(){mxClient.IS_TOUCH||
+window.setTimeout(function(){ja.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)},0)}function F(){ja.value!=mxConstants.NONE&&""!=ja.value&&ia.fromString("#"+ja.value,!0)}function H(){var da=ca(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);da.style.marginBottom="8px";return da}function M(da){13==da.keyCode&&(A(mxEvent.getSource(da)),E())}var N=null!=d?mxUtils.getLightDarkColor(d,null,null,
h):null,J=a.editor.graph;this.editorUi=a;var V=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var W=document.createElement("input");W.style.textOverflow="ellipsis";W.style.margin="0 0 0 4px";W.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var T=document.createElement("div");T.style.display="flex";T.style.alignItems="center";d.appendChild(T);
var O=document.createElement("input");O.style.textOverflow="ellipsis";O.style.margin="0 4px";O.style.maxWidth="70px";O.style.width="100%";var fa=document.createElement("select");fa.style.textOverflow="ellipsis";fa.style.width="100%";var S=document.createElement("option");S.setAttribute("value","automatic");mxUtils.write(S,mxResources.get("automatic"));fa.appendChild(S);S=document.createElement("option");S.setAttribute("value","custom");mxUtils.write(S,mxResources.get("userDefined"));fa.appendChild(S);
fa.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var aa=document.createElement("div");aa.style.padding="0 6px 0 6px";S=document.createElement("img");S.setAttribute("title",mxResources.get("dark"));S.className="geAdaptiveAsset";S.src=Editor.thinDarkImage;S.style.width="20px";aa.appendChild(S);mxEvent.addListener(S,"click",function(){O.focus()});aa.appendChild(O);aa.appendChild(fa);aa.style.display="flex";aa.style.alignItems="center";S=document.createElement("div");S.style.display="flex";S.style.alignItems=
"center";S.style.userSelect="none";S.style.cursor="pointer";S.style.padding="2px 0 2px 0";var Y=document.createElement("img");Y.setAttribute("title",mxResources.get("dark"));Y.className="geAdaptiveAsset";Y.style.marginLeft="-2px";S.appendChild(Y);mxUtils.write(S,mxResources.get("advanced"));var ba=document.createElement("img");ba.setAttribute("title",mxResources.get("swap"));ba.className="geAdaptiveAsset";ba.style.marginLeft="6px";ba.style.width="16px";ba.style.height="16px";ba.style.cursor="pointer";
ba.src=Editor.swapImage;mxEvent.addListener(ba,"click",function(da){k(!0,!1);fa.value="custom";y(!1);var ma=W.value;W.value=O.value;O.value=ma;w();ja.focus();mxEvent.consume(da)});S.appendChild(ba);var L=ba.cloneNode();L.setAttribute("title",mxResources.get("copy"));L.style.marginLeft="2px";L.src=Editor.doubleArrowUpImage;mxEvent.addListener(L,"click",function(da){k(!0,!1);fa.value="custom";y(!1);ja==O?W.value=O.value:O.value=W.value;w();ja.focus();mxEvent.consume(da)});S.appendChild(L);ba=L.cloneNode();
ba.setAttribute("title",mxResources.get("opacity"));ba.src=Editor.opacityImage;mxEvent.addListener(ba,"click",function(da){var ma=mxUtils.parseColor("#"+ja.value);ma=String(Math.floor(Math.max(0,Math.min(100*ma.a,100))));a.prompt(mxResources.get("opacity")+" (0-100)",ma,function(Ia){!isNaN(Ia)&&""!==Ia&&0<=Ia&&100>=Ia&&(y(!1),W.value=mxUtils.rgba2hex(mxUtils.addAlphaToColor("#"+W.value,Ia/100,!0)).substring(1).toUpperCase(),O.value=mxUtils.rgba2hex(mxUtils.addAlphaToColor("#"+O.value,Ia/100,!0)).substring(1).toUpperCase(),
-w(),ja.focus())});mxEvent.consume(da)});S.appendChild(ba);p();mxEvent.addListener(S,"click",function(){k();p();ColorDialog.collapsed="none"==aa.style.display});var U=mxUtils.button("",function(){y(!0);w();ja.focus();""==ja.value&&null!=N&&V&&ia.fromString(ja==O?N.dark:N.light,!0)});mxEvent.addListener(fa,"change",function(da){"automatic"==fa.value?(W.focus(),A(W)):(y(!1),O.focus(),E());w();mxEvent.consume(da)});mxEvent.addListener(W,"change",function(){A(W)});mxEvent.addListener(O,"change",function(){A(O)});
-var X=null!=e?e:this.createApplyFunction();this.init=function(){E()};var ia=new ColorPicker,ja=Editor.isDarkMode()&&("auto"==J.getAdaptiveColors()||"simple"==J.getAdaptiveColors()&&"custom"==fa.value)&&!h?O:W;mxEvent.addListener(W,"focus",function(){ja=W;F();L.src=Editor.doubleArrowDownImage});mxEvent.addListener(O,"focus",function(){ja=O;F();L.src=Editor.doubleArrowUpImage});ia.addListener("change",function(da,ma){da=ma.getProperty("color").substring(1).toUpperCase();ja.value.toUpperCase()!=da&&
+w(),ja.focus())});mxEvent.consume(da)});S.appendChild(ba);p();mxEvent.addListener(S,"click",function(){k();p();ColorDialog.collapsed="none"==aa.style.display});var U=mxUtils.button("",function(){y(!0);w();ja.focus();""==ja.value&&null!=N&&V&&ia.fromString(ja==O?N.dark:N.light,!0)});mxEvent.addListener(fa,"change",function(da){"automatic"==fa.value?(W.focus(),A(W)):(y(!1),O.focus(),D());w();mxEvent.consume(da)});mxEvent.addListener(W,"change",function(){A(W)});mxEvent.addListener(O,"change",function(){A(O)});
+var X=null!=e?e:this.createApplyFunction();this.init=function(){D()};var ia=new ColorPicker,ja=Editor.isDarkMode()&&("auto"==J.getAdaptiveColors()||"simple"==J.getAdaptiveColors()&&"custom"==fa.value)&&!h?O:W;mxEvent.addListener(W,"focus",function(){ja=W;F();L.src=Editor.doubleArrowDownImage});mxEvent.addListener(O,"focus",function(){ja=O;F();L.src=Editor.doubleArrowUpImage});ia.addListener("change",function(da,ma){da=ma.getProperty("color").substring(1).toUpperCase();ja.value.toUpperCase()!=da&&
(ja.value=da,A(ja),window.setTimeout(function(){ja.focus()},0))});e=document.createElement("div");e.appendChild(ia.div);var ta=document.createElement("div");ta.style.display="flex";ta.style.flexFlow="row wrap";ta.style.justifyContent="center";ta.style.paddingTop="10px";var ca=mxUtils.bind(this,function(da,ma,Ia,oa){ma=null!=ma?ma:12;var za=document.createElement("table");za.style.borderCollapse="collapse";za.setAttribute("cellspacing","0");za.style.marginBottom="20px";za.style.cellSpacing="0px";za.style.marginLeft=
"1px";var Aa=document.createElement("tbody");za.appendChild(Aa);for(var Ma=da.length/ma,Pa=0;Pa<Ma;Pa++){for(var Ka=document.createElement("tr"),Ja=0;Ja<ma;Ja++)mxUtils.bind(this,function(ra){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==ra&&(ra=Ia);if(null!=ra){Da.style.borderWidth="1px";if(ra==mxConstants.NONE||null==ra)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(mxUtils.isLightDarkColor(ra)){var Wa=
mxUtils.getLightDarkColor(ra);Da.style.background="linear-gradient(to right bottom, "+Wa.cssText+" 50%, "+mxUtils.invertLightDarkColor(Wa).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+ra;Wa=this.colorNames[String(ra).toUpperCase()];null!=Wa&&Da.setAttribute("title",Wa)}Ka.appendChild(Da);null!=ra&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(ra==mxConstants.NONE){ja==O&&O.value==mxConstants.NONE?W.value=mxConstants.NONE:ja.value=mxConstants.NONE;if(ja==W||ja==O&&
-W.value==mxConstants.NONE)fa.value="automatic";A(ja);window.setTimeout(function(){ja.focus()},0)}else if(mxUtils.isLightDarkColor(ra)){k(!0);fa.value="custom";var Xa=mxUtils.getLightDarkColor(ra);W.value=Xa.light.substring(1).toUpperCase();O.value=Xa.dark.substring(1).toUpperCase();A(W);A(O);ja==W?ia.fromString(Xa.light):ia.fromString(Xa.dark)}else ia.fromString("#"+ra)}),mxEvent.addListener(Da,"dblclick",D))})(da[Pa*ma+Ja]);Aa.appendChild(Ka)}oa&&(da=document.createElement("td"),da.setAttribute("title",
+W.value==mxConstants.NONE)fa.value="automatic";A(ja);window.setTimeout(function(){ja.focus()},0)}else if(mxUtils.isLightDarkColor(ra)){k(!0);fa.value="custom";var Xa=mxUtils.getLightDarkColor(ra);W.value=Xa.light.substring(1).toUpperCase();O.value=Xa.dark.substring(1).toUpperCase();A(W);A(O);ja==W?ia.fromString(Xa.light):ia.fromString(Xa.dark)}else ia.fromString("#"+ra)}),mxEvent.addListener(Da,"dblclick",E))})(da[Pa*ma+Ja]);Aa.appendChild(Ka)}oa&&(da=document.createElement("td"),da.setAttribute("title",
mxResources.get("reset")),da.className="geAdaptiveAsset",da.style.border="1px solid black",da.style.padding="0px",da.style.width="16px",da.style.height="16px",da.style.backgroundImage="url('"+Editor.crossImage+"')",da.style.backgroundPosition="center center",da.style.backgroundSize="14px 14px",da.style.backgroundRepeat="no-repeat",da.style.cursor="pointer",Ka.appendChild(da),mxEvent.addListener(da,"click",function(){ColorDialog.resetRecentColors();za.parentNode.replaceChild(H(),za)}));ta.appendChild(za);
return za});h||(d.appendChild(S),!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==J.getAdaptiveColors()||"automatic"!=fa.value||(aa.style.display="none",p()),S=document.createElement("img"),S.setAttribute("title",mxResources.get("light")),S.className="geAdaptiveAsset",S.src=Editor.thinLightImage,S.style.width="20px",T.appendChild(S),mxEvent.addListener(S,"click",function(){W.focus()}));T.appendChild(W);null!=N&&(U.setAttribute("title",mxResources.get(h?"default":"useBlackAndWhite")),U.style.cursor=
"pointer",U.style.position="relative",U.style.marginLeft="4px",U.innerText="",J=document.createElement("div"),J.style.display="inline-block",J.style.verticalAlign="middle",J.style.borderStyle="solid",J.style.borderWidth="1px",J.style.marginTop="-2px",J.style.width="12px",J.style.height="12px",h?J.style.backgroundColor=N.light:J.style.backgroundImage="linear-gradient(to right bottom, "+N.cssText+" 50%, "+mxUtils.invertLightDarkColor(N).cssText+" 50.3%)",U.appendChild(J),T.appendChild(U),mxEvent.addListener(U,
-"dblclick",D));var P=document.createElement("input");P.setAttribute("type","color");P.style.position="relative";P.style.visibility="hidden";P.style.top="10px";P.style.width="0px";P.style.height="0px";P.style.border="none";e.style.whiteSpace="nowrap";T.appendChild(P);J=mxUtils.button("",function(){document.activeElement==P?W.focus():(P.value="#"+W.value,P.click())});J.style.cursor="pointer";S=document.createElement("img");S.src=Editor.colorDropperImage;S.className="geAdaptiveAsset";S.style.position=
+"dblclick",E));var P=document.createElement("input");P.setAttribute("type","color");P.style.position="relative";P.style.visibility="hidden";P.style.top="10px";P.style.width="0px";P.style.height="0px";P.style.border="none";e.style.whiteSpace="nowrap";T.appendChild(P);J=mxUtils.button("",function(){document.activeElement==P?W.focus():(P.value="#"+W.value,P.click())});J.style.cursor="pointer";S=document.createElement("img");S.src=Editor.colorDropperImage;S.className="geAdaptiveAsset";S.style.position=
"relative";S.style.verticalAlign="middle";S.style.marginTop="-2px";S.style.width="auto";S.style.height="14px";J.appendChild(S);T.appendChild(J);e.appendChild(d);mxEvent.addListener(P,"change",function(){ia.fromString(P.value)});h||e.appendChild(aa);H();d=ca(this.presetColors);d.style.marginBottom="8px";d=ca(this.defaultColors);d.style.marginBottom="16px";e.appendChild(ta);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent=
-"end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));T=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});T.className="geBtn";a.editor.cancelFirst&&d.appendChild(T);J=mxUtils.button(mxResources.get("apply"),D);J.className="geBtn gePrimaryBtn";d.appendChild(J);a.editor.cancelFirst||d.appendChild(T);null!=b&&("default"==b?U.click():(T=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==T.light?W.value=mxConstants.NONE:
+"end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));T=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});T.className="geBtn";a.editor.cancelFirst&&d.appendChild(T);J=mxUtils.button(mxResources.get("apply"),E);J.className="geBtn gePrimaryBtn";d.appendChild(J);a.editor.cancelFirst||d.appendChild(T);null!=b&&("default"==b?U.click():(T=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==T.light?W.value=mxConstants.NONE:
mxUtils.isVarColor(T.light)?W.value=T.light:(mxUtils.isRgbColor(T.light)?T.light=mxUtils.rgba2hex(T.light):mxUtils.isHexColor(T.light)||(T.light="#"+m(T.light)),W.value=T.light.substring(1).toUpperCase()),b==mxConstants.NONE||"transparent"==T.dark?O.value=mxConstants.NONE:mxUtils.isVarColor(T.dark)?O.value=T.dark:(mxUtils.isRgbColor(T.dark)?T.dark=mxUtils.rgba2hex(T.dark):mxUtils.isHexColor(T.dark)||(T.dark="#"+m(T.dark)),O.value=T.dark.substring(1).toUpperCase()),F(),w()));h||!ColorDialog.collapsed||
"automatic"!=fa.value||Editor.isDarkMode()||(aa.style.display="none",p());e.appendChild(d);this.picker=ia;this.colorInput=W;mxEvent.addListener(W,"keypress",M);mxEvent.addListener(O,"keypress",M);mxEvent.addListener(e,"keydown",function(da){27==da.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(da))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");
ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
@@ -3799,45 +3803,45 @@ var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("
"http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},SimpleTextareaDialog=function(a,b,e,f,g){var d=document.createElement("div"),h=document.createElement("textarea");h.style.position="absolute";h.style.left="30px";h.style.right="30px";h.style.top="30px";h.style.bottom="100px";
h.style.resize="none";h.setAttribute("wrap","off");h.setAttribute("spellcheck","false");h.setAttribute("autocorrect","off");h.setAttribute("autocomplete","off");h.setAttribute("autocapitalize","off");h.value=null!=b?b:"";d.appendChild(h);b=document.createElement("div");b.style.position="absolute";b.style.bottom="46px";b.style.right="30px";b.style.left="30px";b.style.justifyContent="end";b.style.display="flex";null==g||a.isOffline()||b.appendChild(a.createHelpIcon(g));g=mxUtils.button(mxResources.get("cancel"),
function(){a.hideDialog()});g.setAttribute("title","Escape");g.className="geBtn";a.editor.cancelFirst&&b.appendChild(g);var m=mxUtils.button(null!=f?f:mxResources.get("apply"),function(){a.hideDialog();e(h.value)});m.setAttribute("title","Ctrl+Enter");m.className="geBtn gePrimaryBtn";b.appendChild(m);mxEvent.addListener(h,"keydown",function(p){13==p.keyCode&&mxEvent.isControlDown(p)&&m.click()});a.editor.cancelFirst||b.appendChild(g);this.init=function(){h.focus();h.scrollTop=0};d.appendChild(b);
-this.container=d},TextareaDialog=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A,D){k=null!=k?k:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";m=document.createElement("div");m.style.position="absolute";m.style.left="0px";m.style.right="0px";var E=m.cloneNode(!1),F=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";E.style.top="20px";E.style.bottom="64px";F.style.display="flex";F.style.whiteSpace="nowrap";
-F.style.alignItems="center";F.style.justifyContent="end";F.style.bottom="10px";F.style.height="50px";F.style.textAlign="right";F.style.paddingTop="14px";F.style.boxSizing="border-box";mxUtils.write(m,b);h.appendChild(m);h.appendChild(E);h.appendChild(F);null!=D&&m.appendChild(D);var H=document.createElement("textarea");u?H.setAttribute("wrap","off"):H.style.wordBreak="break-all";H.setAttribute("spellcheck","false");H.setAttribute("autocorrect","off");H.setAttribute("autocomplete","off");H.setAttribute("autocapitalize",
-"off");mxUtils.write(H,e||"");H.style.resize="none";H.style.outline="none";H.style.position="absolute";H.style.boxSizing="border-box";H.style.top="0px";H.style.left="0px";H.style.height="100%";H.style.width="100%";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};E.appendChild(H);null==y||a.isOffline()||F.appendChild(a.createHelpIcon(y));if(null!=A)for(b=0;b<A.length;b++)(function(N,J,V){N=mxUtils.button(N,function(W){J(W,H)});null!=V&&N.setAttribute("title",V);N.className="geBtn";F.appendChild(N)})(A[b][0],
+this.container=d},TextareaDialog=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A,E){k=null!=k?k:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";m=document.createElement("div");m.style.position="absolute";m.style.left="0px";m.style.right="0px";var D=m.cloneNode(!1),F=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";D.style.top="20px";D.style.bottom="64px";F.style.display="flex";F.style.whiteSpace="nowrap";
+F.style.alignItems="center";F.style.justifyContent="end";F.style.bottom="10px";F.style.height="50px";F.style.textAlign="right";F.style.paddingTop="14px";F.style.boxSizing="border-box";mxUtils.write(m,b);h.appendChild(m);h.appendChild(D);h.appendChild(F);null!=E&&m.appendChild(E);var H=document.createElement("textarea");u?H.setAttribute("wrap","off"):H.style.wordBreak="break-all";H.setAttribute("spellcheck","false");H.setAttribute("autocorrect","off");H.setAttribute("autocomplete","off");H.setAttribute("autocapitalize",
+"off");mxUtils.write(H,e||"");H.style.resize="none";H.style.outline="none";H.style.position="absolute";H.style.boxSizing="border-box";H.style.top="0px";H.style.left="0px";H.style.height="100%";H.style.width="100%";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};D.appendChild(H);null==y||a.isOffline()||F.appendChild(a.createHelpIcon(y));if(null!=A)for(b=0;b<A.length;b++)(function(N,J,V){N=mxUtils.button(N,function(W){J(W,H)});null!=V&&N.setAttribute("title",V);N.className="geBtn";F.appendChild(N)})(A[b][0],
A[b][1],A[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&F.appendChild(d);null!=p&&p(F,H);if(null!=f){var M=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();f(H.value)});M.setAttribute("title","Ctrl+Enter");M.className="geBtn gePrimaryBtn";F.appendChild(M);mxEvent.addListener(H,"keydown",function(N){13==N.keyCode&&mxEvent.isControlDown(N)&&M.click()})}a.editor.cancelFirst||
F.appendChild(d);this.container=h},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.position="absolute";b.style.inset="10px";var e=document.createElement("textarea");e.setAttribute("wrap","off");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize","off");e.style.overflow="auto";e.style.resize="none";e.style.position="absolute";e.style.top="20px";e.style.bottom="76px";e.style.left="20px";
e.style.right="20px";var f=a.getDiagramSnapshot();e.value=mxUtils.getPrettyXml(f.node);b.appendChild(e);this.init=function(){e.focus()};Graph.fileSupport&&(e.addEventListener("dragover",function(p){p.stopPropagation();p.preventDefault()},!1),e.addEventListener("drop",function(p){p.stopPropagation();p.preventDefault();if(0<p.dataTransfer.files.length){p=p.dataTransfer.files[0];var k=new FileReader;k.onload=function(u){e.value=u.target.result};k.readAsText(p)}else e.value=a.extractGraphModelFromEvent(p)},
!1));var g=document.createElement("div");g.style.display="flex";g.style.whiteSpace="nowrap";g.style.alignItems="center";g.style.justifyContent="end";g.style.position="absolute";g.style.height="36px";g.style.bottom="24px";g.style.left="20px";g.style.right="20px";var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&g.appendChild(d);var h=document.createElement("select");h.style.textOverflow="ellipsis";h.style.width="196px";h.className=
"geBtn";if(a.editor.graph.isEnabled()){var m=document.createElement("option");m.setAttribute("value","apply");mxUtils.write(m,mxResources.get("apply",null,"Update Existing Drawing"));h.appendChild(m)}a.editor.graph.isEnabled()&&(m=document.createElement("option"),m.setAttribute("value","insert"),mxUtils.write(m,mxResources.get("insert")),h.appendChild(m));m=document.createElement("option");m.setAttribute("value","new");mxUtils.write(m,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&
!navigator.standalone&&h.appendChild(m);g.appendChild(h);m=mxUtils.button(mxResources.get("ok"),function(){var p=Graph.zapGremlins(mxUtils.trim(e.value)),k=null;if("new"==h.value)a.hideDialog(),a.editor.editAsNew(p);else if("apply"==h.value)try{var u=mxUtils.parseXml(p).documentElement,w=Editor.extractParserError(u,mxResources.get("unknownError"));w?(EditorUi.debug("EditDiagramDialogParserError",[this],"node",[u],"cause",[w]),k=mxResources.get("invalidInput")+" ("+w+")"):("mxfile"==u.nodeName?a.editor.setGraphXml(u):
-a.updateDiagramData(f,u),a.hideDialog())}catch(E){k=E}else if("insert"==h.value){a.editor.graph.model.beginUpdate();try{var y=mxUtils.parseXml(p),A=new mxGraphModel;(new mxCodec(y)).decode(y.documentElement,A);var D=A.getChildren(A.getChildAt(A.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(D));a.hideDialog()}catch(E){k=E}finally{a.editor.graph.model.endUpdate()}}null!=k&&a.handleError(k)});m.className="geBtn gePrimaryBtn";g.appendChild(m);a.editor.cancelFirst||g.appendChild(d);
+a.updateDiagramData(f,u),a.hideDialog())}catch(D){k=D}else if("insert"==h.value){a.editor.graph.model.beginUpdate();try{var y=mxUtils.parseXml(p),A=new mxGraphModel;(new mxCodec(y)).decode(y.documentElement,A);var E=A.getChildren(A.getChildAt(A.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(E));a.hideDialog()}catch(D){k=D}finally{a.editor.graph.model.endUpdate()}}null!=k&&a.handleError(k)});m.className="geBtn gePrimaryBtn";g.appendChild(m);a.editor.cancelFirst||g.appendChild(d);
b.appendChild(g);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function b(){var T=u.value,O=T.lastIndexOf(".");u.value=0<O?T.substring(0,O+1)+w.value:T+"."+w.value;"xml"===w.value?(y.setAttribute("disabled","true"),A.setAttribute("disabled","true"),D.setAttribute("disabled","true"),J.setAttribute("disabled","true")):(y.removeAttribute("disabled"),A.removeAttribute("disabled"),D.removeAttribute("disabled"),J.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?M.removeAttribute("disabled"):M.setAttribute("disabled",
-"disabled");"png"===w.value||"jpg"===w.value||"pdf"===w.value?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");"png"===w.value?(E.removeAttribute("disabled"),F.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"))}function e(){A.style.backgroundColor=A.value*D.value>MAX_AREA||0>=A.value?"red":"";D.style.backgroundColor=A.value*D.value>MAX_AREA||0>=D.value?"red":""}var f=a.editor.graph,g=f.getGraphBounds(),d=f.view.scale,h=Math.ceil(g.width/
+var ExportDialog=function(a){function b(){var T=u.value,O=T.lastIndexOf(".");u.value=0<O?T.substring(0,O+1)+w.value:T+"."+w.value;"xml"===w.value?(y.setAttribute("disabled","true"),A.setAttribute("disabled","true"),E.setAttribute("disabled","true"),J.setAttribute("disabled","true")):(y.removeAttribute("disabled"),A.removeAttribute("disabled"),E.removeAttribute("disabled"),J.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?M.removeAttribute("disabled"):M.setAttribute("disabled",
+"disabled");"png"===w.value||"jpg"===w.value||"pdf"===w.value?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");"png"===w.value?(D.removeAttribute("disabled"),F.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"))}function e(){A.style.backgroundColor=A.value*E.value>MAX_AREA||0>=A.value?"red":"";E.style.backgroundColor=A.value*E.value>MAX_AREA||0>=E.value?"red":""}var f=a.editor.graph,g=f.getGraphBounds(),d=f.view.scale,h=Math.ceil(g.width/
d),m=Math.ceil(g.height/d);d=document.createElement("table");var p=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");g.appendChild(k);var u=document.createElement("input");u.setAttribute("value",a.editor.getOrCreateFilename());u.style.width="180px";k=document.createElement("td");k.appendChild(u);g.appendChild(k);
p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");g.appendChild(k);var w=document.createElement("select");w.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));w.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),w.appendChild(k));
k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));w.appendChild(k);k=document.createElement("option");k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));w.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),w.appendChild(k));k=document.createElement("td");k.appendChild(w);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");
k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");g.appendChild(k);var y=document.createElement("input");y.setAttribute("type","number");y.setAttribute("value","100");y.style.width="180px";k=document.createElement("td");k.appendChild(y);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");g.appendChild(k);var A=document.createElement("input");
-A.setAttribute("value",h);A.style.width="180px";k=document.createElement("td");k.appendChild(A);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");g.appendChild(k);var D=document.createElement("input");D.setAttribute("value",m);D.style.width="180px";k=document.createElement("td");k.appendChild(D);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");
-k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");g.appendChild(k);var E=document.createElement("select");E.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");E.appendChild(k);k=document.createElement("option");
-k.setAttribute("value","400");mxUtils.write(k,"400dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));E.appendChild(k);var F=document.createElement("input");F.style.width="180px";F.style.display="none";F.setAttribute("value","100");F.setAttribute("type","number");F.setAttribute("min","50");F.setAttribute("step","50");var H=!1;mxEvent.addListener(E,"change",function(){"custom"==this.value?(this.style.display="none",F.style.display=
-"",F.focus()):(F.value=this.value,H||(y.value=this.value))});mxEvent.addListener(F,"change",function(){var T=parseInt(F.value);isNaN(T)||0>=T?F.style.backgroundColor="red":(F.style.backgroundColor="",H||(y.value=T))});k=document.createElement("td");k.appendChild(E);k.appendChild(F);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var M=document.createElement("input");
+A.setAttribute("value",h);A.style.width="180px";k=document.createElement("td");k.appendChild(A);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");g.appendChild(k);var E=document.createElement("input");E.setAttribute("value",m);E.style.width="180px";k=document.createElement("td");k.appendChild(E);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");
+k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");g.appendChild(k);var D=document.createElement("select");D.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");D.appendChild(k);k=document.createElement("option");
+k.setAttribute("value","400");mxUtils.write(k,"400dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));D.appendChild(k);var F=document.createElement("input");F.style.width="180px";F.style.display="none";F.setAttribute("value","100");F.setAttribute("type","number");F.setAttribute("min","50");F.setAttribute("step","50");var H=!1;mxEvent.addListener(D,"change",function(){"custom"==this.value?(this.style.display="none",F.style.display=
+"",F.focus()):(F.value=this.value,H||(y.value=this.value))});mxEvent.addListener(F,"change",function(){var T=parseInt(F.value);isNaN(T)||0>=T?F.style.backgroundColor="red":(F.style.backgroundColor="",H||(y.value=T))});k=document.createElement("td");k.appendChild(D);k.appendChild(F);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var M=document.createElement("input");
M.setAttribute("type","checkbox");M.checked=null==f.background||f.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(M);mxUtils.write(k,mxResources.get("transparent"));g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");g.appendChild(k);var N=document.createElement("input");N.setAttribute("type","checkbox");N.checked=!1;k=document.createElement("td");k.appendChild(N);
g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");g.appendChild(k);var J=document.createElement("input");J.setAttribute("type","number");J.setAttribute("value",ExportDialog.lastBorderValue);J.style.width="180px";k=document.createElement("td");k.appendChild(J);g.appendChild(k);p.appendChild(g);d.appendChild(p);mxEvent.addListener(w,"change",b);b();mxEvent.addListener(y,"change",
-function(){H=!0;var T=Math.max(0,parseFloat(y.value)||100)/100;y.value=parseFloat((100*T).toFixed(2));0<h?(A.value=Math.floor(h*T),D.value=Math.floor(m*T)):(y.value="100",A.value=h,D.value=m);e()});mxEvent.addListener(A,"change",function(){var T=parseInt(A.value)/h;0<T?(y.value=parseFloat((100*T).toFixed(2)),D.value=Math.floor(m*T)):(y.value="100",A.value=h,D.value=m);e()});mxEvent.addListener(D,"change",function(){var T=parseInt(D.value)/m;0<T?(y.value=parseFloat((100*T).toFixed(2)),A.value=Math.floor(h*
-T)):(y.value="100",A.value=h,D.value=m);e()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var V=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(y.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var T=u.value,O=w.value,fa=Math.max(0,parseFloat(y.value)||100)/100,S=Math.max(0,parseInt(J.value)),aa=f.background,Y=Math.max(1,parseInt(F.value));if(("svg"==O||"png"==O||
+function(){H=!0;var T=Math.max(0,parseFloat(y.value)||100)/100;y.value=parseFloat((100*T).toFixed(2));0<h?(A.value=Math.floor(h*T),E.value=Math.floor(m*T)):(y.value="100",A.value=h,E.value=m);e()});mxEvent.addListener(A,"change",function(){var T=parseInt(A.value)/h;0<T?(y.value=parseFloat((100*T).toFixed(2)),E.value=Math.floor(m*T)):(y.value="100",A.value=h,E.value=m);e()});mxEvent.addListener(E,"change",function(){var T=parseInt(E.value)/m;0<T?(y.value=parseFloat((100*T).toFixed(2)),A.value=Math.floor(h*
+T)):(y.value="100",A.value=h,E.value=m);e()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var V=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(y.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var T=u.value,O=w.value,fa=Math.max(0,parseFloat(y.value)||100)/100,S=Math.max(0,parseInt(J.value)),aa=f.background,Y=Math.max(1,parseInt(F.value));if(("svg"==O||"png"==O||
"pdf"==O)&&M.checked)aa=null;else if(null==aa||aa==mxConstants.NONE)aa="#ffffff";ExportDialog.lastBorderValue=S;ExportDialog.exportFile(a,T,O,aa,fa,S,Y,N.checked)}}));V.className="geBtn gePrimaryBtn";var W=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});W.className="geBtn";a.editor.cancelFirst?(k.appendChild(W),k.appendChild(V)):(k.appendChild(V),k.appendChild(W));g.appendChild(k);p.appendChild(g);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;
ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.exportFile=function(a,b,e,f,g,d,h,m){m=a.editor.graph;if("xml"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,e);else if("svg"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(m.getSvg(f,g,d)),b,e);else{var p=m.getGraphBounds(),k=mxUtils.createXmlDocument(),u=k.createElement("output");k.appendChild(u);k=new mxXmlCanvas2D(u);k.translate(Math.floor((d/g-p.x)/m.view.scale),Math.floor((d/g-p.y)/m.view.scale));k.scale(g/m.view.scale);(new mxImageExport).drawState(m.getView().getState(m.model.root),
k);u="xml="+encodeURIComponent(mxUtils.getXml(u));k=Math.ceil(p.width*g/m.view.scale+2*d);g=Math.ceil(p.height*g/m.view.scale+2*d);u.length<=MAX_REQUEST_SIZE&&k*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+e+"&filename="+encodeURIComponent(b)+"&bg="+(null!=f?f:"none")+"&w="+k+"&h="+g+"&"+u+"&dpi="+h)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
ExportDialog.saveLocalFile=function(a,b,e,f){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(e)+"&format="+f)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
var EditDataDialog=function(a,b){function e(){0<J.value.length?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")}var f=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",d||"");d=h}var m={};try{var p=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=p&&(m=JSON.parse(p))}catch(T){}var k=new mxForm("properties");k.table.style.width=
-"100%";var u=d.attributes,w=[],y=[],A=0,D=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,E=function(T,O){var fa=document.createElement("div");fa.style.position="relative";fa.style.paddingRight="20px";fa.style.boxSizing="border-box";fa.style.width="100%";var S=document.createElement("a"),aa=mxUtils.createImage(Dialog.prototype.closeImage);aa.style.height="9px";aa.style.fontSize="9px";aa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";S.className="geButton";S.setAttribute("title",
-mxResources.get("delete"));S.style.position="absolute";S.style.top="4px";S.style.right="0px";S.style.margin="0px";S.style.width="9px";S.style.height="9px";S.style.cursor="pointer";S.appendChild(aa);O=function(Y){return function(){for(var ba=0,L=0;L<w.length;L++){if(w[L]==Y){y[L]=null;k.table.deleteRow(ba+(null!=D?1:0));break}null!=y[L]&&ba++}}}(O);mxEvent.addListener(S,"click",O);O=T.parentNode;fa.appendChild(T);fa.appendChild(S);O.appendChild(fa)};h=function(T,O,fa){w[T]=O;y[T]=k.addTextarea(w[A]+
-":",fa,2);y[T].style.width="100%";0<fa.indexOf("\n")&&y[T].setAttribute("rows","2");E(y[T],O);null!=m[O]&&0==m[O].editable&&y[T].setAttribute("disabled","disabled")};p=[];for(var F=g.getModel().getParent(b)==g.getModel().getRoot(),H=g.getCellStyle(b),M=0;M<u.length;M++)("label"!=u[M].nodeName||"1"==H.metaEdit||Graph.translateDiagram||F)&&"placeholders"!=u[M].nodeName&&p.push({name:u[M].nodeName,value:u[M].nodeValue});p.sort(function(T,O){return"label"==T.name?1:"label"==O.name?-1:T.name<O.name?-1:
-T.name>O.name?1:0});if(null!=D){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,D);var N=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(T){T=new FilenameDialog(a,D,mxResources.get("apply"),mxUtils.bind(this,function(O){if(null!=O&&0<O.length&&O!=D)if(g.model.isRoot(b)){var fa=a.getPageById(D);if(null!=fa)if(null==a.getPageById(O)){var S=a.getPageIndex(fa);0<=S&&(a.removePage(fa),fa.node.setAttribute("id",
-O),D=O,N.innerHTML=mxUtils.htmlEntities(O),a.insertPage(fa,S))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==g.getModel().getCell(O)?(g.getModel().cellRemoved(b),b.setId(O),D=O,N.innerHTML=mxUtils.htmlEntities(O),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[O])})}),mxResources.get("id"));a.showDialog(T.container,300,80,!0,!0);T.init()})}for(M=0;M<p.length;M++)h(A,p[M].name,p[M].value),A++;p=document.createElement("div");
+"100%";var u=d.attributes,w=[],y=[],A=0,E=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,D=function(T,O){var fa=document.createElement("div");fa.style.position="relative";fa.style.paddingRight="20px";fa.style.boxSizing="border-box";fa.style.width="100%";var S=document.createElement("a"),aa=mxUtils.createImage(Dialog.prototype.closeImage);aa.style.height="9px";aa.style.fontSize="9px";aa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";S.className="geButton";S.setAttribute("title",
+mxResources.get("delete"));S.style.position="absolute";S.style.top="4px";S.style.right="0px";S.style.margin="0px";S.style.width="9px";S.style.height="9px";S.style.cursor="pointer";S.appendChild(aa);O=function(Y){return function(){for(var ba=0,L=0;L<w.length;L++){if(w[L]==Y){y[L]=null;k.table.deleteRow(ba+(null!=E?1:0));break}null!=y[L]&&ba++}}}(O);mxEvent.addListener(S,"click",O);O=T.parentNode;fa.appendChild(T);fa.appendChild(S);O.appendChild(fa)};h=function(T,O,fa){w[T]=O;y[T]=k.addTextarea(w[A]+
+":",fa,2);y[T].style.width="100%";0<fa.indexOf("\n")&&y[T].setAttribute("rows","2");D(y[T],O);null!=m[O]&&0==m[O].editable&&y[T].setAttribute("disabled","disabled")};p=[];for(var F=g.getModel().getParent(b)==g.getModel().getRoot(),H=g.getCellStyle(b),M=0;M<u.length;M++)("label"!=u[M].nodeName||"1"==H.metaEdit||Graph.translateDiagram||F)&&"placeholders"!=u[M].nodeName&&p.push({name:u[M].nodeName,value:u[M].nodeValue});p.sort(function(T,O){return"label"==T.name?1:"label"==O.name?-1:T.name<O.name?-1:
+T.name>O.name?1:0});if(null!=E){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,E);var N=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(T){T=new FilenameDialog(a,E,mxResources.get("apply"),mxUtils.bind(this,function(O){if(null!=O&&0<O.length&&O!=E)if(g.model.isRoot(b)){var fa=a.getPageById(E);if(null!=fa)if(null==a.getPageById(O)){var S=a.getPageIndex(fa);0<=S&&(a.removePage(fa),fa.node.setAttribute("id",
+O),E=O,N.innerHTML=mxUtils.htmlEntities(O),a.insertPage(fa,S))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==g.getModel().getCell(O)?(g.getModel().cellRemoved(b),b.setId(O),E=O,N.innerHTML=mxUtils.htmlEntities(O),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[O])})}),mxResources.get("id"));a.showDialog(T.container,300,80,!0,!0);T.init()})}for(M=0;M<p.length;M++)h(A,p[M].name,p[M].value),A++;p=document.createElement("div");
p.style.position="absolute";p.style.top="30px";p.style.left="30px";p.style.right="30px";p.style.bottom="80px";p.style.overflowY="auto";p.appendChild(k.table);h=document.createElement("div");h.style.display="flex";h.style.alignItems="center";h.style.boxSizing="border-box";h.style.paddingRight="160px";h.style.whiteSpace="nowrap";h.style.marginTop="6px";h.style.width="100%";var J=document.createElement("input");J.setAttribute("placeholder",mxResources.get("enterPropertyName"));J.setAttribute("type",
"text");J.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");J.style.boxSizing="border-box";J.style.borderWidth="1px";J.style.borderStyle="solid";J.style.marginLeft="2px";J.style.padding="4px";J.style.width="100%";h.appendChild(J);p.appendChild(h);f.appendChild(p);var V=mxUtils.button(mxResources.get("addProperty"),function(){var T=J.value;if(0<T.length&&"label"!=T&&"id"!=T&&"placeholders"!=T&&0>T.indexOf(":"))try{var O=mxUtils.indexOf(w,T);if(0<=O&&null!=y[O])y[O].focus();else{d.cloneNode(!1).setAttribute(T,
-"");0<=O&&(w.splice(O,1),y.splice(O,1));w.push(T);var fa=k.addTextarea(T+":","",2);fa.style.width="100%";y.push(fa);E(fa,T);fa.focus()}V.setAttribute("disabled","disabled");J.value=""}catch(S){mxUtils.alert(S)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(J,"keypress",function(T){13==T.keyCode&&V.click()});this.init=function(){0<y.length?y[0].focus():J.focus()};V.setAttribute("title",mxResources.get("addProperty"));V.setAttribute("disabled","disabled");V.style.textOverflow=
+"");0<=O&&(w.splice(O,1),y.splice(O,1));w.push(T);var fa=k.addTextarea(T+":","",2);fa.style.width="100%";y.push(fa);D(fa,T);fa.focus()}V.setAttribute("disabled","disabled");J.value=""}catch(S){mxUtils.alert(S)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(J,"keypress",function(T){13==T.keyCode&&V.click()});this.init=function(){0<y.length?y[0].focus():J.focus()};V.setAttribute("title",mxResources.get("addProperty"));V.setAttribute("disabled","disabled");V.style.textOverflow=
"ellipsis";V.style.position="absolute";V.style.overflow="hidden";V.style.width="144px";V.style.right="0px";V.className="geBtn";h.appendChild(V);p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});p.setAttribute("title","Escape");p.className="geBtn";h=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(T){var O=g.getDataForCells([b],!0);T=new EmbedDialog(a,JSON.stringify(O,null,2),null,null,function(){console.log(O);a.alert("Written to Console (Dev Tools)")},
mxResources.get("export"),null,"Console","data.json");a.showDialog(T.container,450,240,!0,!0);T.init()}));h.setAttribute("title",mxResources.get("export"));h.className="geBtn";var W=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var T=!1,O=0;O<w.length;O++)null==y[O]?d.removeAttribute(w[O]):(d.setAttribute(w[O],y[O].value),T=T||"placeholder"==w[O]&&"1"==d.getAttribute("placeholders"));T&&d.removeAttribute("label");g.getModel().setValue(b,
d)}catch(fa){mxUtils.alert(fa)}});W.setAttribute("title","Ctrl+Enter");W.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keydown",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&W.click()});mxEvent.addListener(J,"keyup",e);mxEvent.addListener(J,"change",e);u=document.createElement("div");u.style.display="flex";u.style.justifyContent="flex-end";u.style.alignItems="center";u.style.position="absolute";u.style.left="30px";u.style.right="30px";u.style.bottom="30px";u.style.height="40px";if(a.editor.graph.getModel().isVertex(b)||
@@ -3858,17 +3862,17 @@ mxResources.get("lockUnlock"));var ta=p.getCurrentCellStyle(ba);"1"==mxUtils.get
P&&p.removeSelectionCells(p.getModel().getDescendants(ba));mxEvent.consume(ca)}});X.appendChild(ja);mxUtils.write(ia,Y);ia.style.display="block";ia.style.whiteSpace="nowrap";ia.style.overflow="hidden";ia.style.textOverflow="ellipsis";ia.style.position="absolute";ia.style.padding="2px";ia.style.left="52px";ia.style.right="8px";X.appendChild(ia);U.appendChild(X);if(p.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)Y=document.createElement("div"),Y.style.display=
"block",Y.style.textAlign="right",Y.style.whiteSpace="nowrap",Y.style.position="absolute",Y.style.right="16px",Y.style.top="6px",0<aa&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toBack")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="&#9660;",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",Y.appendChild(X),mxEvent.addListener(X,"click",function(ca){p.isEnabled()&&p.addCell(ba,p.model.root,aa-
1);mxEvent.consume(ca)})),0<=aa&&aa<A-1&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toFront")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="&#9650;",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",Y.appendChild(X),mxEvent.addListener(X,"click",function(ca){p.isEnabled()&&p.addCell(ba,p.model.root,aa+1);mxEvent.consume(ca)})),U.appendChild(Y);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&
-(U.setAttribute("draggable","true"),U.style.cursor="move")}mxEvent.addListener(U,"dblclick",function(ca){var P=mxEvent.getSource(ca).nodeName;"INPUT"!=P&&"IMG"!=P&&"true"!=ia.contentEditable&&(m(ba),mxEvent.consume(ca))});p.getDefaultParent()==ba&&(U.classList.add("geActivePage"),U.style.fontWeight=p.isEnabled()?"bold":"",D=ba);mxEvent.addListener(U,"click",function(ca){p.isEnabled()&&"true"!=ia.contentEditable&&(p.setDefaultParent(L),p.view.setCurrentRoot(null),mxEvent.isShiftDown(ca)&&p.setSelectionCells(ba.children),
+(U.setAttribute("draggable","true"),U.style.cursor="move")}mxEvent.addListener(U,"dblclick",function(ca){var P=mxEvent.getSource(ca).nodeName;"INPUT"!=P&&"IMG"!=P&&"true"!=ia.contentEditable&&(m(ba),mxEvent.consume(ca))});p.getDefaultParent()==ba&&(U.classList.add("geActivePage"),U.style.fontWeight=p.isEnabled()?"bold":"",E=ba);mxEvent.addListener(U,"click",function(ca){p.isEnabled()&&"true"!=ia.contentEditable&&(p.setDefaultParent(L),p.view.setCurrentRoot(null),mxEvent.isShiftDown(ca)&&p.setSelectionCells(ba.children),
mxEvent.consume(ca))});u.appendChild(U)}p.isEnabled()?(W.classList.remove("mxDisabled"),N.classList.remove("mxDisabled"),V.classList.remove("mxDisabled"),H.classList.remove("mxDisabled")):(W.classList.add("mxDisabled"),N.classList.add("mxDisabled"),V.classList.add("mxDisabled"),H.classList.add("mxDisabled"));A=p.model.getChildCount(p.model.root);u.innerText="";J.clear();for(var fa=A-1;0<=fa;fa--)mxUtils.bind(this,function(aa){O(fa,p.convertValueToString(aa)||mxResources.get("background"),aa,aa)})(p.model.getChildAt(p.model.root,
-fa));var S=p.convertValueToString(D)||mxResources.get("background");W.setAttribute("title",mxResources.get("removeIt",[S]));V.setAttribute("title",mxResources.get("duplicateIt",[S]));p.isSelectionEmpty()&&M.classList.add("mxDisabled");d()}function m(O){if(p.isEnabled()&&null!=O){var fa=J.get(O);if(null!=fa){var S=fa.getElementsByTagName("span");if(null!=S&&0<S.length){var aa=S[0],Y=mxUtils.getTextContent(aa);aa.style.textOverflow="";aa.style.cursor="text";aa.contentEditable="true";aa.focus();document.execCommand("selectAll",
+fa));var S=p.convertValueToString(E)||mxResources.get("background");W.setAttribute("title",mxResources.get("removeIt",[S]));V.setAttribute("title",mxResources.get("duplicateIt",[S]));p.isSelectionEmpty()&&M.classList.add("mxDisabled");d()}function m(O){if(p.isEnabled()&&null!=O){var fa=J.get(O);if(null!=fa){var S=fa.getElementsByTagName("span");if(null!=S&&0<S.length){var aa=S[0],Y=mxUtils.getTextContent(aa);aa.style.textOverflow="";aa.style.cursor="text";aa.contentEditable="true";aa.focus();document.execCommand("selectAll",
!1,null);fa.removeAttribute("draggable");fa.style.cursor="";var ba=function(L){if("true"==aa.contentEditable){aa.contentEditable="false";var U=mxUtils.getTextContent(aa);L&&U!=Y?(U=mxUtils.getTextContent(aa),0<U.length?p.cellLabelChanged(O,U):p.cellLabelChanged(O,mxResources.get("untitledLayer"))):h()}};mxEvent.addListener(aa,"keydown",function(L){if(13==L.keyCode||27==L.keyCode)ba(13==L.keyCode),mxEvent.consume(L)});mxEvent.addListener(aa,"blur",function(L){ba(!0);mxEvent.consume(L)})}}}}var p=a.editor.graph,
k=document.createElement("div");k.style.userSelect="none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom="32px";k.appendChild(u);var w=null,y=null;mxEvent.addListener(k,"dragover",function(O){O.dataTransfer.dropEffect="move";y=0;O.stopPropagation();O.preventDefault()});mxEvent.addListener(k,"drop",function(O){O.stopPropagation();
-O.preventDefault()});var A=null,D=null,E=document.createElement("div");E.className="geToolbarContainer geDialogToolbar";var F=document.createElement("a");F.className="geButton";var H=F.cloneNode(!1);H.style.backgroundImage="url("+Editor.plusImage+")";H.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(H,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(fa)}finally{p.model.endUpdate()}m(fa)}mxEvent.consume(O)});
-p.isEnabled()||H.classList.add("mxDisabled");E.appendChild(H);var M=F.cloneNode();M.style.backgroundImage="url("+Editor.layersImage+")";M.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(M,"click",function(O){if(p.isEnabled()&&!p.isSelectionEmpty()){var fa=mxUtils.getOffset(M);a.showPopupMenu(mxUtils.bind(this,function(S,aa){for(var Y=p.getLayerForCells(p.getSelectionCells()),ba=A-1;0<=ba;ba--)mxUtils.bind(this,function(L){var U="1"==mxUtils.getValue(p.getCurrentCellStyle(L),
-"locked","0"),X=S.addItem(p.convertValueToString(L)||mxResources.get("background"),null,mxUtils.bind(this,function(){U||p.moveCells(p.getSelectionCells(),0,0,!1,L)}),aa,null,null,!U);U?S.addCheckmark(X,Editor.lockedImage):L==Y&&S.addCheckmark(X,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,ba))}),fa.x,fa.y+M.offsetHeight,O)}});E.appendChild(M);var N=F.cloneNode(!1);N.style.backgroundImage="url("+Editor.editImage+")";N.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(N,
-"click",function(O){p.isEnabled()&&a.showDataDialog(D);mxEvent.consume(O)});p.isEnabled()||N.classList.add("mxDisabled");E.appendChild(N);var J=new mxDictionary,V=F.cloneNode(!1);V.style.backgroundImage="url("+Editor.duplicateImage+")";V.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(V,"click",function(O){if(p.isEnabled()){O=null;p.model.beginUpdate();try{O=p.cloneCell(D),p.cellLabelChanged(O,mxResources.get("untitledLayer")),O.setVisible(!0),O=p.addCell(O,p.model.root),p.setDefaultParent(O)}finally{p.model.endUpdate()}null==
-O||p.isCellLocked(O)||p.selectAll(O)}});p.isEnabled()||V.classList.add("mxDisabled");E.appendChild(V);var W=F.cloneNode(!1);W.style.backgroundImage="url("+Editor.trashImage+")";W.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(W,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.model.root.getIndex(D);p.removeCells([D],!1);0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<fa&&fa<=p.model.getChildCount(p.model.root)?
-p.setDefaultParent(p.model.getChildAt(p.model.root,fa-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(O)});p.isEnabled()||W.classList.add("mxDisabled");E.appendChild(W);k.appendChild(E);var T=document.createElement("span");T.setAttribute("title",mxResources.get("selectionOnly"));T.innerHTML="&#8226;";T.style.position="absolute";T.style.fontWeight="bold";T.style.fontSize="16pt";T.style.right="6px";h();p.model.addListener(mxEvent.CHANGE,h);p.addListener("defaultParentChanged",
+O.preventDefault()});var A=null,E=null,D=document.createElement("div");D.className="geToolbarContainer geDialogToolbar";var F=document.createElement("a");F.className="geButton";var H=F.cloneNode(!1);H.style.backgroundImage="url("+Editor.plusImage+")";H.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(H,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(fa)}finally{p.model.endUpdate()}m(fa)}mxEvent.consume(O)});
+p.isEnabled()||H.classList.add("mxDisabled");D.appendChild(H);var M=F.cloneNode();M.style.backgroundImage="url("+Editor.layersImage+")";M.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(M,"click",function(O){if(p.isEnabled()&&!p.isSelectionEmpty()){var fa=mxUtils.getOffset(M);a.showPopupMenu(mxUtils.bind(this,function(S,aa){for(var Y=p.getLayerForCells(p.getSelectionCells()),ba=A-1;0<=ba;ba--)mxUtils.bind(this,function(L){var U="1"==mxUtils.getValue(p.getCurrentCellStyle(L),
+"locked","0"),X=S.addItem(p.convertValueToString(L)||mxResources.get("background"),null,mxUtils.bind(this,function(){U||p.moveCells(p.getSelectionCells(),0,0,!1,L)}),aa,null,null,!U);U?S.addCheckmark(X,Editor.lockedImage):L==Y&&S.addCheckmark(X,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,ba))}),fa.x,fa.y+M.offsetHeight,O)}});D.appendChild(M);var N=F.cloneNode(!1);N.style.backgroundImage="url("+Editor.editImage+")";N.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(N,
+"click",function(O){p.isEnabled()&&a.showDataDialog(E);mxEvent.consume(O)});p.isEnabled()||N.classList.add("mxDisabled");D.appendChild(N);var J=new mxDictionary,V=F.cloneNode(!1);V.style.backgroundImage="url("+Editor.duplicateImage+")";V.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(V,"click",function(O){if(p.isEnabled()){O=null;p.model.beginUpdate();try{O=p.cloneCell(E),p.cellLabelChanged(O,mxResources.get("untitledLayer")),O.setVisible(!0),O=p.addCell(O,p.model.root),p.setDefaultParent(O)}finally{p.model.endUpdate()}null==
+O||p.isCellLocked(O)||p.selectAll(O)}});p.isEnabled()||V.classList.add("mxDisabled");D.appendChild(V);var W=F.cloneNode(!1);W.style.backgroundImage="url("+Editor.trashImage+")";W.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(W,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.model.root.getIndex(E);p.removeCells([E],!1);0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<fa&&fa<=p.model.getChildCount(p.model.root)?
+p.setDefaultParent(p.model.getChildAt(p.model.root,fa-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(O)});p.isEnabled()||W.classList.add("mxDisabled");D.appendChild(W);k.appendChild(D);var T=document.createElement("span");T.setAttribute("title",mxResources.get("selectionOnly"));T.innerHTML="&#8226;";T.style.position="absolute";T.style.fontWeight="bold";T.style.fontSize="16pt";T.style.right="6px";h();p.model.addListener(mxEvent.CHANGE,h);p.addListener("defaultParentChanged",
h);a.addListener("lockedChanged",h);p.selectionModel.addListener(mxEvent.CHANGE,function(){p.isSelectionEmpty()?M.classList.add("mxDisabled"):M.classList.remove("mxDisabled");d()});this.window=new mxWindow(mxResources.get("layers"),k,b,e,f,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){u.scrollTop=u.scrollHeight-u.clientHeight};
this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=h;a.installResizeHandler(this,!0)};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
@@ -12137,542 +12141,537 @@ this.createVertexTemplateEntry(a+"vimeo;fillColor=#1AB7EA;strokeColor=none",62.6
"yahoo","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yammer;fillColor=#0093BE;strokeColor=none",.2*348,59.6,"","Yammer",null,null,this.getTagsForStencil("mxgraph.weblogos","yammer","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yandex",31.8,66.4,"","Yandex",null,null,this.getTagsForStencil("mxgraph.weblogos","yandex","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yelp;fillColor=#C41200;strokeColor=none",.2*317,83,"","Yelp",null,null,this.getTagsForStencil("mxgraph.weblogos",
"yelp","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yoolink",79.2,79.2,"","Yoolink",null,null,this.getTagsForStencil("mxgraph.weblogos","yoolink","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youmob",76,76.2,"","Youmob",null,null,this.getTagsForStencil("mxgraph.weblogos","youmob","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube;fillColor=#FF2626;gradientColor=#B5171F",.2*786,65.8,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos",
"youtube","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube_2;fillColor=#FF2626;gradientColor=#B5171F",.2*232,32.6,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" "))]);this.setCurrentSearchEntryLibrary()}})();
-var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,k){b.raw=k;return b};$jscomp.arrayIteratorImpl=function(b){var k=0;return function(){return k<b.length?{done:!1,value:b[k++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var k="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return k?k.call(b):$jscomp.arrayIterator(b)};
-$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,k,n){if(b==Array.prototype||b==Object.prototype)return b;b[k]=n.value;return b};
-$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var k=0;k<b.length;++k){var n=b[k];if(n&&n.Math==Math)return n}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};
-$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,k){var n=$jscomp.propertyToPolyfillSymbol[k];if(null==n)return b[k];n=b[n];return void 0!==n?n:b[k]};$jscomp.polyfill=function(b,k,n,d){k&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,k,n,d):$jscomp.polyfillUnisolated(b,k,n,d))};
-$jscomp.polyfillUnisolated=function(b,k,n,d){n=$jscomp.global;b=b.split(".");for(d=0;d<b.length-1;d++){var x=b[d];if(!(x in n))return;n=n[x]}b=b[b.length-1];d=n[b];k=k(d);k!=d&&null!=k&&$jscomp.defineProperty(n,b,{configurable:!0,writable:!0,value:k})};
-$jscomp.polyfillIsolated=function(b,k,n,d){var x=b.split(".");b=1===x.length;d=x[0];d=!b&&d in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var z=0;z<x.length-1;z++){var y=x[z];if(!(y in d))return;d=d[y]}x=x[x.length-1];n=$jscomp.IS_SYMBOL_NATIVE&&"es6"===n?d[x]:null;k=k(n);null!=k&&(b?$jscomp.defineProperty($jscomp.polyfills,x,{configurable:!0,writable:!0,value:k}):k!==n&&(void 0===$jscomp.propertyToPolyfillSymbol[x]&&(n=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[x]=$jscomp.IS_SYMBOL_NATIVE?
-$jscomp.global.Symbol(x):$jscomp.POLYFILL_PREFIX+n+"$"+x),$jscomp.defineProperty(d,$jscomp.propertyToPolyfillSymbol[x],{configurable:!0,writable:!0,value:k})))};$jscomp.underscoreProtoCanBeSet=function(){var b={a:!0},k={};try{return k.__proto__=b,k.a}catch(n){}return!1};
-$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(b,k){b.__proto__=k;if(b.__proto__!==k)throw new TypeError(b+" is not extensible");return b}:null;$jscomp.generator={};$jscomp.generator.ensureIteratorResultIsObject_=function(b){if(!(b instanceof Object))throw new TypeError("Iterator result "+b+" is not an object");};
+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,l){b.raw=l;return b};$jscomp.arrayIteratorImpl=function(b){var l=0;return function(){return l<b.length?{done:!1,value:b[l++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var l="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return l?l.call(b):$jscomp.arrayIterator(b)};
+$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,l,n){if(b==Array.prototype||b==Object.prototype)return b;b[l]=n.value;return b};
+$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var l=0;l<b.length;++l){var n=b[l];if(n&&n.Math==Math)return n}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};
+$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,l){var n=$jscomp.propertyToPolyfillSymbol[l];if(null==n)return b[l];n=b[n];return void 0!==n?n:b[l]};$jscomp.polyfill=function(b,l,n,d){l&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,l,n,d):$jscomp.polyfillUnisolated(b,l,n,d))};
+$jscomp.polyfillUnisolated=function(b,l,n,d){n=$jscomp.global;b=b.split(".");for(d=0;d<b.length-1;d++){var v=b[d];if(!(v in n))return;n=n[v]}b=b[b.length-1];d=n[b];l=l(d);l!=d&&null!=l&&$jscomp.defineProperty(n,b,{configurable:!0,writable:!0,value:l})};
+$jscomp.polyfillIsolated=function(b,l,n,d){var v=b.split(".");b=1===v.length;d=v[0];d=!b&&d in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var A=0;A<v.length-1;A++){var z=v[A];if(!(z in d))return;d=d[z]}v=v[v.length-1];n=$jscomp.IS_SYMBOL_NATIVE&&"es6"===n?d[v]:null;l=l(n);null!=l&&(b?$jscomp.defineProperty($jscomp.polyfills,v,{configurable:!0,writable:!0,value:l}):l!==n&&(void 0===$jscomp.propertyToPolyfillSymbol[v]&&(n=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[v]=$jscomp.IS_SYMBOL_NATIVE?
+$jscomp.global.Symbol(v):$jscomp.POLYFILL_PREFIX+n+"$"+v),$jscomp.defineProperty(d,$jscomp.propertyToPolyfillSymbol[v],{configurable:!0,writable:!0,value:l})))};$jscomp.underscoreProtoCanBeSet=function(){var b={a:!0},l={};try{return l.__proto__=b,l.a}catch(n){}return!1};
+$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(b,l){b.__proto__=l;if(b.__proto__!==l)throw new TypeError(b+" is not extensible");return b}:null;$jscomp.generator={};$jscomp.generator.ensureIteratorResultIsObject_=function(b){if(!(b instanceof Object))throw new TypeError("Iterator result "+b+" is not an object");};
$jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null};$jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1};
$jscomp.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};$jscomp.generator.Context.prototype.next_=function(b){this.yieldResult=b};$jscomp.generator.Context.prototype.throw_=function(b){this.abruptCompletion_={exception:b,isException:!0};this.jumpToErrorHandler_()};$jscomp.generator.Context.prototype.return=function(b){this.abruptCompletion_={return:b};this.nextAddress=this.finallyAddress_};
-$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(b){this.abruptCompletion_={jumpTo:b};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(b,k){this.nextAddress=k;return{value:b}};$jscomp.generator.Context.prototype.yieldAll=function(b,k){b=$jscomp.makeIterator(b);var n=b.next();$jscomp.generator.ensureIteratorResultIsObject_(n);if(n.done)this.yieldResult=n.value,this.nextAddress=k;else return this.yieldAllIterator_=b,this.yield(n.value,k)};
-$jscomp.generator.Context.prototype.jumpTo=function(b){this.nextAddress=b};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0};$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(b,k){this.catchAddress_=b;void 0!=k&&(this.finallyAddress_=k)};$jscomp.generator.Context.prototype.setFinallyBlock=function(b){this.catchAddress_=0;this.finallyAddress_=b||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(b,k){this.nextAddress=b;this.catchAddress_=k||0};
-$jscomp.generator.Context.prototype.enterCatchBlock=function(b){this.catchAddress_=b||0;b=this.abruptCompletion_.exception;this.abruptCompletion_=null;return b};$jscomp.generator.Context.prototype.enterFinallyBlock=function(b,k,n){n?this.finallyContexts_[n]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=b||0;this.finallyAddress_=k||0};
-$jscomp.generator.Context.prototype.leaveFinallyBlock=function(b,k){k=this.finallyContexts_.splice(k||0)[0];if(k=this.abruptCompletion_=this.abruptCompletion_||k){if(k.isException)return this.jumpToErrorHandler_();void 0!=k.jumpTo&&this.finallyAddress_<k.jumpTo?(this.nextAddress=k.jumpTo,this.abruptCompletion_=null):this.nextAddress=this.finallyAddress_}else this.nextAddress=b};$jscomp.generator.Context.prototype.forIn=function(b){return new $jscomp.generator.Context.PropertyIterator(b)};
-$jscomp.generator.Context.PropertyIterator=function(b){this.object_=b;this.properties_=[];for(var k in b)this.properties_.push(k);this.properties_.reverse()};$jscomp.generator.Context.PropertyIterator.prototype.getNext=function(){for(;0<this.properties_.length;){var b=this.properties_.pop();if(b in this.object_)return b}return null};$jscomp.generator.Engine_=function(b){this.context_=new $jscomp.generator.Context;this.program_=b};
+$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(b){this.abruptCompletion_={jumpTo:b};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(b,l){this.nextAddress=l;return{value:b}};$jscomp.generator.Context.prototype.yieldAll=function(b,l){b=$jscomp.makeIterator(b);var n=b.next();$jscomp.generator.ensureIteratorResultIsObject_(n);if(n.done)this.yieldResult=n.value,this.nextAddress=l;else return this.yieldAllIterator_=b,this.yield(n.value,l)};
+$jscomp.generator.Context.prototype.jumpTo=function(b){this.nextAddress=b};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0};$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(b,l){this.catchAddress_=b;void 0!=l&&(this.finallyAddress_=l)};$jscomp.generator.Context.prototype.setFinallyBlock=function(b){this.catchAddress_=0;this.finallyAddress_=b||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(b,l){this.nextAddress=b;this.catchAddress_=l||0};
+$jscomp.generator.Context.prototype.enterCatchBlock=function(b){this.catchAddress_=b||0;b=this.abruptCompletion_.exception;this.abruptCompletion_=null;return b};$jscomp.generator.Context.prototype.enterFinallyBlock=function(b,l,n){n?this.finallyContexts_[n]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=b||0;this.finallyAddress_=l||0};
+$jscomp.generator.Context.prototype.leaveFinallyBlock=function(b,l){l=this.finallyContexts_.splice(l||0)[0];if(l=this.abruptCompletion_=this.abruptCompletion_||l){if(l.isException)return this.jumpToErrorHandler_();void 0!=l.jumpTo&&this.finallyAddress_<l.jumpTo?(this.nextAddress=l.jumpTo,this.abruptCompletion_=null):this.nextAddress=this.finallyAddress_}else this.nextAddress=b};$jscomp.generator.Context.prototype.forIn=function(b){return new $jscomp.generator.Context.PropertyIterator(b)};
+$jscomp.generator.Context.PropertyIterator=function(b){this.object_=b;this.properties_=[];for(var l in b)this.properties_.push(l);this.properties_.reverse()};$jscomp.generator.Context.PropertyIterator.prototype.getNext=function(){for(;0<this.properties_.length;){var b=this.properties_.pop();if(b in this.object_)return b}return null};$jscomp.generator.Engine_=function(b){this.context_=new $jscomp.generator.Context;this.program_=b};
$jscomp.generator.Engine_.prototype.next_=function(b){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_.next,b,this.context_.next_);this.context_.next_(b);return this.nextStep_()};
-$jscomp.generator.Engine_.prototype.return_=function(b){this.context_.start_();var k=this.context_.yieldAllIterator_;if(k)return this.yieldAllStep_("return"in k?k["return"]:function(n){return{value:n,done:!0}},b,this.context_.return);this.context_.return(b);return this.nextStep_()};
+$jscomp.generator.Engine_.prototype.return_=function(b){this.context_.start_();var l=this.context_.yieldAllIterator_;if(l)return this.yieldAllStep_("return"in l?l["return"]:function(n){return{value:n,done:!0}},b,this.context_.return);this.context_.return(b);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.throw_=function(b){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_["throw"],b,this.context_.next_);this.context_.throw_(b);return this.nextStep_()};
-$jscomp.generator.Engine_.prototype.yieldAllStep_=function(b,k,n){try{var d=b.call(this.context_.yieldAllIterator_,k);$jscomp.generator.ensureIteratorResultIsObject_(d);if(!d.done)return this.context_.stop_(),d;var x=d.value}catch(z){return this.context_.yieldAllIterator_=null,this.context_.throw_(z),this.nextStep_()}this.context_.yieldAllIterator_=null;n.call(this.context_,x);return this.nextStep_()};
-$jscomp.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var b=this.program_(this.context_);if(b)return this.context_.stop_(),{value:b.value,done:!1}}catch(k){this.context_.yieldResult=void 0,this.context_.throw_(k)}this.context_.stop_();if(this.context_.abruptCompletion_){b=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(b.isException)throw b.exception;return{value:b.return,done:!0}}return{value:void 0,done:!0}};
-$jscomp.generator.Generator_=function(b){this.next=function(k){return b.next_(k)};this.throw=function(k){return b.throw_(k)};this.return=function(k){return b.return_(k)};this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(b,k){k=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(k));$jscomp.setPrototypeOf&&b.prototype&&$jscomp.setPrototypeOf(k,b.prototype);return k};
-$jscomp.asyncExecutePromiseGenerator=function(b){function k(d){return b.next(d)}function n(d){return b.throw(d)}return new Promise(function(d,x){function z(y){y.done?d(y.value):Promise.resolve(y.value).then(k,n).then(z,x)}z(b.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(b){return $jscomp.asyncExecutePromiseGenerator(b())};$jscomp.asyncExecutePromiseGeneratorProgram=function(b){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(b)))};
-DrawioFile=function(b,k){mxEventSource.call(this);this.ui=b;this.setData(k||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;DrawioFile.RESTRICT_EXPORT=!1;mxUtils.extend(DrawioFile,mxEventSource);
+$jscomp.generator.Engine_.prototype.yieldAllStep_=function(b,l,n){try{var d=b.call(this.context_.yieldAllIterator_,l);$jscomp.generator.ensureIteratorResultIsObject_(d);if(!d.done)return this.context_.stop_(),d;var v=d.value}catch(A){return this.context_.yieldAllIterator_=null,this.context_.throw_(A),this.nextStep_()}this.context_.yieldAllIterator_=null;n.call(this.context_,v);return this.nextStep_()};
+$jscomp.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var b=this.program_(this.context_);if(b)return this.context_.stop_(),{value:b.value,done:!1}}catch(l){this.context_.yieldResult=void 0,this.context_.throw_(l)}this.context_.stop_();if(this.context_.abruptCompletion_){b=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(b.isException)throw b.exception;return{value:b.return,done:!0}}return{value:void 0,done:!0}};
+$jscomp.generator.Generator_=function(b){this.next=function(l){return b.next_(l)};this.throw=function(l){return b.throw_(l)};this.return=function(l){return b.return_(l)};this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(b,l){l=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(l));$jscomp.setPrototypeOf&&b.prototype&&$jscomp.setPrototypeOf(l,b.prototype);return l};
+$jscomp.asyncExecutePromiseGenerator=function(b){function l(d){return b.next(d)}function n(d){return b.throw(d)}return new Promise(function(d,v){function A(z){z.done?d(z.value):Promise.resolve(z.value).then(l,n).then(A,v)}A(b.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(b){return $jscomp.asyncExecutePromiseGenerator(b())};$jscomp.asyncExecutePromiseGeneratorProgram=function(b){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(b)))};
+DrawioFile=function(b,l){mxEventSource.call(this);this.ui=b;this.setData(l||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;DrawioFile.RESTRICT_EXPORT=!1;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};
-DrawioFile.prototype.synchronizeFile=function(b,k){if(this.savingFile)null!=k&&k({message:mxResources.get("busy")});else{var n=!0,d=window.setTimeout(mxUtils.bind(this,function(){n=!1;null!=k&&k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,k)})})}),this.ui.timeout),x=mxUtils.bind(this,function(y){n&&(window.clearTimeout(d),null!=k&&k(y))}),z=mxUtils.bind(this,function(){return!n});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,
-function(y){n&&(window.clearTimeout(d),this.sync.cleanup(b,k,y))}),x,z):this.updateFile(mxUtils.bind(this,function(){n&&(window.clearTimeout(d),null!=b&&b())}),x,z)}};
-DrawioFile.prototype.updateFile=function(b,k,n,d,x){null!=n&&n()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",x,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=k&&k():this.getLatestVersion(mxUtils.bind(this,function(z){try{null!=n&&n()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[z]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=k&&k():null!=z?this.mergeFile(z,b,k,
-d,x):this.reloadFile(b,k))}catch(y){null!=k&&k(y)}}),k))};
-DrawioFile.prototype.mergeFile=function(b,k,n,d,x){try{var z=b.getShadowPages();if(null!=z&&0<z.length){var y=this.getShadowPages(),F=[this.ui.diffPages(null!=d?d:y,z)],N=this.ignorePatches(F);if(N)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",N),null!=k&&k();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var K=this.isModified()?this.ui.diffPages(y,
-this.isRealtime()?this.ownPages:this.ui.pages):null,L=this.ui.patchPages(this.ui.clonePages(y),F[0]),c=this.ui.getHashValueForPages(L,{}),f=this.ui.getHashValueForPages(z,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",y,"pages",z,"patched",L,"patches",F,"changes",K,"checksum",c,"current",f,"valid",c==f,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",x);if(null!=c&&c!=f)this.checksumError(n,F,null,null,"mergeFile",
-c,f,b.getCurrentRevisionId());else{this.setShadowPages(z);if(null!=this.sync){var l=this.sync.patchRealtime(F,DrawioFile.LAST_WRITE_WINS?K:null,null,x);null==l||mxUtils.isEmptyObject(l)||F.push(l)}this.patch(F,DrawioFile.LAST_WRITE_WINS?K:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=k&&k()}}catch(v){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=n&&n(v);try{var m=this.getCurrentUser(),t=null!=m?
-m.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),t,v)}catch(B){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(v){null!=n&&n(v)}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var k=new mxCodec(mxUtils.createXmlDocument()),n=k.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var x=k.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(x=this.ui.anonymizeNode(x,!0));x.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,x,!0);n.appendChild(x)}return mxUtils.getPrettyXml(n)};
-DrawioFile.prototype.compressReportData=function(b,k,n){k=null!=k?k:1E4;null!=n&&null!=b&&b.length>n?b=b.substring(0,n)+"[...]":null!=b&&b.length>k&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,k,n,d,x,z,y,F){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var N=this.getCurrentUser(),K=null!=N?N.id:"unknown",L=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(k).length,f=null;if(null!=k&&1E3>c){b=[];for(n=0;n<k.length;n++)b.push(this.ui.anonymizePatch(k[n]));f=JSON.stringify(b);f=null!=f&&1E3>
-f.length?Graph.compress(f):null}this.getLatestVersion(mxUtils.bind(this,function(l){try{var m=null!=f?"report":"error",t=this.ui.getHashValueForPages(l.getShadowPages()),v="unknown",B="unknown",E="unknown";try{var D=null!=l.initialData&&0<l.initialData.length?mxUtils.parseXml(l.initialData).documentElement:null;null!=D&&(null!=D.getAttribute("version")&&(v=D.getAttribute("version")),null!=D.getAttribute("agent")&&(B=D.getAttribute("agent")),null!=D.getAttribute("type")&&(E=D.getAttribute("type")))}catch(A){}EditorUi.logError("Checksum "+
-m+" in "+x,null,this.getMode()+"."+L,"user_"+K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+k.length+(null!=f?"-json_"+f:"")+"-size_"+this.getSize()+(null!=z?"-expected_"+z:"")+(null!=y?"-current_"+y:"")+(null!=F?"-rev_"+this.ui.hashValue(F):"")+(null!=t?"-latest_"+t:"")+"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId())+("-latestVersion_"+v)+("-latestAgent_"+B)+("-latestType_"+E));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+L,action:x,label:"user_"+
-K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+k.length+"-size_"+this.getSize()})}catch(A){}}),function(){})}catch(l){}};
-DrawioFile.prototype.sendErrorReport=function(b,k,n,d){try{var x=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),z=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),y=this.getCurrentUser(),F=null!=y?this.ui.hashValue(y.id):"unknown",N=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",K=this.getTitle(),L=K.lastIndexOf(".");y="xml";0<L&&(y=K.substring(L));var c=null!=n?n.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+y+")\nUser="+F+N+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=k?"\n\n"+k:
-"")+(null!=n?"\n\nError: "+n.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+x+"\n\nData:\n"+z,d)}catch(f){}};
-DrawioFile.prototype.reloadFile=function(b,k){try{this.stats.fileReloaded++;var n=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),d=this.ui.editor.graph,x=d.getSelectionCells(),z=d.getViewState(),y=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(F){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[n],"viewState",[z],"latestFile",F);null!=F?(this.ui.replaceFileData(F.getData(),
-[n]),this.ui.restoreViewState(y,z,x),this.setDescriptor(F.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var N=this.ui.getCurrentFile();null!=N&&(N.stats=this.stats,N.patch([n]),N.fileChanged());this.ui.restoreViewState(y,z,x);null!=b&&b()}else null!=k&&k(this.ui.fileLoadedError)}),!0))}),k)}catch(F){null!=k&&k(F)}};
-DrawioFile.prototype.copyFile=function(b,k){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var k=!0;if(null!=b)for(var n=0;n<b.length&&k;n++)k=k&&mxUtils.isEmptyObject(b[n]);return k};
-DrawioFile.prototype.patch=function(b,k,n,d){if(null!=b){var x=this.ui.editor.undoManager,z=x.history.slice(),y=x.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var N=this.changeListenerEnabled;this.changeListenerEnabled=n;var K=F.foldingEnabled,L=F.mathEnabled,c=F.cellRenderer.redraw;F.cellRenderer.redraw=function(B){B.view.graph.isEditing(B.cell)&&(B.view.graph.scrollCellToVisible(B.cell),B.view.graph.cellEditor.resize());c.apply(this,arguments)};F.model.beginUpdate();
-try{if(n){for(var f=this.ui.pages.slice(),l=this.ui.currentPage,m=this.ui.applyPatches(this.ui.pages,b,!0,k,this.isModified()),t=0;t<m.length;t++){var v=mxUtils.indexOf(this.ui.pages,m[t]);0>v?this.ui.insertPage(m[t],Math.min(t,this.ui.pages.length)):this.ui.movePage(v,t)}for(t=0;t<f.length;t++)0>mxUtils.indexOf(m,f[t])&&this.ui.removePage(f[t]);0<=mxUtils.indexOf(this.ui.pages,l)&&this.ui.selectPage(l,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,k,this.isModified());0==this.ui.pages.length&&
-this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);F.checkDefaultParent()}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=c;this.changeListenerEnabled=N;n||(x.history=z,x.indexOfNextAdd=y,x.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)L!=F.mathEnabled?(this.ui.editor.updateGraphComponents(),F.refresh()):(K!=F.foldingEnabled?
-F.view.revalidate():F.view.validate(),F.sizeDidChange());null!=this.sync&&this.isRealtime()&&!d&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",k,"undoable",n)}return b};
-DrawioFile.prototype.save=function(b,k,n,d,x,z){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",x,"manual",z,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!x&&this.invalidChecksum)if(null!=n)n({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=k&&k();else if(null!=n)n({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(y){if(null!=n)n(y);else throw y;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var k=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=k&&(k.viewState=this.ui.editor.graph.getViewState(),k.needsUpdate=!0)}k=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return k};
+DrawioFile.prototype.synchronizeFile=function(b,l){if(this.savingFile)null!=l&&l({message:mxResources.get("busy")});else{var n=!0,d=window.setTimeout(mxUtils.bind(this,function(){n=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,l)})})}),this.ui.timeout),v=mxUtils.bind(this,function(z){n&&(window.clearTimeout(d),null!=l&&l(z))}),A=mxUtils.bind(this,function(){return!n});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,
+function(z){n&&(window.clearTimeout(d),this.sync.cleanup(b,l,z))}),v,A):this.updateFile(mxUtils.bind(this,function(){n&&(window.clearTimeout(d),null!=b&&b())}),v,A)}};
+DrawioFile.prototype.updateFile=function(b,l,n,d,v){null!=n&&n()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",v,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=l&&l():this.getLatestVersion(mxUtils.bind(this,function(A){try{null!=n&&n()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[A]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=l&&l():null!=A?this.mergeFile(A,b,l,
+d,v):this.reloadFile(b,l))}catch(z){null!=l&&l(z)}}),l))};
+DrawioFile.prototype.mergeFile=function(b,l,n,d,v){try{var A=b.getShadowPages();if(null!=A&&0<A.length){var z=this.getShadowPages(),D=[this.ui.diffPages(null!=d?d:z,A)],P=this.ignorePatches(D);if(P)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",P),null!=l&&l();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var J=this.isModified()?this.ui.diffPages(z,
+this.isRealtime()?this.ownPages:this.ui.pages):null,L=this.ui.patchPages(this.ui.clonePages(z),D[0]),c=this.ui.getHashValueForPages(L,{}),f=this.ui.getHashValueForPages(A,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",z,"pages",A,"patched",L,"patches",D,"changes",J,"checksum",c,"current",f,"valid",c==f,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",v);if(null!=c&&c!=f)this.checksumError(n,D,null,null,"mergeFile",
+c,f,b.getCurrentRevisionId());else{this.setShadowPages(A);if(null!=this.sync){var k=this.sync.patchRealtime(D,DrawioFile.LAST_WRITE_WINS?J:null,null,v);null==k||mxUtils.isEmptyObject(k)||D.push(k)}this.patch(D,DrawioFile.LAST_WRITE_WINS?J:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=l&&l()}}catch(x){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=n&&n(x);try{var m=this.getCurrentUser(),t=null!=m?
+m.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),t,x)}catch(y){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(x){null!=n&&n(x)}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var l=new mxCodec(mxUtils.createXmlDocument()),n=l.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var v=l.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(v=this.ui.anonymizeNode(v,!0));v.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,v,!0);n.appendChild(v)}return mxUtils.getPrettyXml(n)};
+DrawioFile.prototype.compressReportData=function(b,l,n){l=null!=l?l:1E4;null!=n&&null!=b&&b.length>n?b=b.substring(0,n)+"[...]":null!=b&&b.length>l&&(b=Graph.compress(b)+"\n");return b};
+DrawioFile.prototype.checksumError=function(b,l,n,d,v,A,z,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var P=this.getCurrentUser(),J=null!=P?P.id:"unknown",L=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(l).length,f=null;if(null!=l&&1E3>c){b=[];for(n=0;n<l.length;n++)b.push(this.ui.anonymizePatch(l[n]));f=JSON.stringify(b);f=null!=f&&1E3>
+f.length?Graph.compress(f):null}this.getLatestVersion(mxUtils.bind(this,function(k){try{var m=null!=f?"report":"error",t=this.ui.getHashValueForPages(k.getShadowPages()),x="unknown",y="unknown",F="unknown";try{var E=null!=k.initialData&&0<k.initialData.length?mxUtils.parseXml(k.initialData).documentElement:null;null!=E&&(null!=E.getAttribute("version")&&(x=E.getAttribute("version")),null!=E.getAttribute("agent")&&(y=E.getAttribute("agent")),null!=E.getAttribute("type")&&(F=E.getAttribute("type")))}catch(C){}EditorUi.logError("Checksum "+
+m+" in "+v,null,this.getMode()+"."+L,"user_"+J+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+l.length+(null!=f?"-json_"+f:"")+"-size_"+this.getSize()+(null!=A?"-expected_"+A:"")+(null!=z?"-current_"+z:"")+(null!=D?"-rev_"+this.ui.hashValue(D):"")+(null!=t?"-latest_"+t:"")+"-latestRev_"+this.ui.hashValue(k.getCurrentRevisionId())+("-latestVersion_"+x)+("-latestAgent_"+y)+("-latestType_"+F));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+L,action:v,label:"user_"+
+J+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+l.length+"-size_"+this.getSize()})}catch(C){}}),function(){})}catch(k){}};
+DrawioFile.prototype.sendErrorReport=function(b,l,n,d){try{var v=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),A=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),z=this.getCurrentUser(),D=null!=z?this.ui.hashValue(z.id):"unknown",P=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",J=this.getTitle(),L=J.lastIndexOf(".");z="xml";0<L&&(z=J.substring(L));var c=null!=n?n.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+z+")\nUser="+D+P+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=l?"\n\n"+l:
+"")+(null!=n?"\n\nError: "+n.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+v+"\n\nData:\n"+A,d)}catch(f){}};
+DrawioFile.prototype.reloadFile=function(b,l){try{this.stats.fileReloaded++;var n=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),d=this.ui.editor.graph,v=d.getSelectionCells(),A=d.getViewState(),z=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(D){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[n],"viewState",[A],"latestFile",D);null!=D?(this.ui.replaceFileData(D.getData(),
+[n]),this.ui.restoreViewState(z,A,v),this.setDescriptor(D.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var P=this.ui.getCurrentFile();null!=P&&(P.stats=this.stats,P.patch([n]),P.fileChanged());this.ui.restoreViewState(z,A,v);null!=b&&b()}else null!=l&&l(this.ui.fileLoadedError)}),!0))}),l)}catch(D){null!=l&&l(D)}};
+DrawioFile.prototype.copyFile=function(b,l){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var l=!0;if(null!=b)for(var n=0;n<b.length&&l;n++)l=l&&mxUtils.isEmptyObject(b[n]);return l};
+DrawioFile.prototype.patch=function(b,l,n,d){if(null!=b){var v=this.ui.editor.undoManager,A=v.history.slice(),z=v.indexOfNextAdd,D=this.ui.editor.graph;D.container.style.visibility="hidden";var P=this.changeListenerEnabled;this.changeListenerEnabled=n;var J=D.foldingEnabled,L=D.mathEnabled,c=D.cellRenderer.redraw;D.cellRenderer.redraw=function(y){y.view.graph.isEditing(y.cell)&&(y.view.graph.scrollCellToVisible(y.cell),y.view.graph.cellEditor.resize());c.apply(this,arguments)};D.model.beginUpdate();
+try{if(n){for(var f=this.ui.pages.slice(),k=this.ui.currentPage,m=this.ui.applyPatches(this.ui.pages,b,!0,l,this.isModified()),t=0;t<m.length;t++){var x=mxUtils.indexOf(this.ui.pages,m[t]);0>x?this.ui.insertPage(m[t],Math.min(t,this.ui.pages.length)):this.ui.movePage(x,t)}for(t=0;t<f.length;t++)0>mxUtils.indexOf(m,f[t])&&this.ui.removePage(f[t]);0<=mxUtils.indexOf(this.ui.pages,k)&&this.ui.selectPage(k,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,l,this.isModified());0==this.ui.pages.length&&
+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);D.checkDefaultParent()}finally{D.container.style.visibility="";D.model.endUpdate();D.cellRenderer.redraw=c;this.changeListenerEnabled=P;n||(v.history=A,v.indexOfNextAdd=z,v.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)L!=D.mathEnabled?(this.ui.editor.updateGraphComponents(),D.refresh()):(J!=D.foldingEnabled?
+D.view.revalidate():D.view.validate(),D.sizeDidChange());null!=this.sync&&this.isRealtime()&&!d&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",l,"undoable",n)}return b};
+DrawioFile.prototype.save=function(b,l,n,d,v,A){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",v,"manual",A,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!v&&this.invalidChecksum)if(null!=n)n({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=l&&l();else if(null!=n)n({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(z){if(null!=n)n(z);else throw z;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var l=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=l&&(l.viewState=this.ui.editor.graph.getViewState(),l.needsUpdate=!0)}l=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return l};
DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return Editor.defaultCompressed};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};
-DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,k,n){};DrawioFile.prototype.saveFile=function(b,k,n,d){};DrawioFile.prototype.getFileUrl=function(){return null};
+DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,l,n){};DrawioFile.prototype.saveFile=function(b,l,n,d){};DrawioFile.prototype.getFileUrl=function(){return null};
DrawioFile.prototype.getFolderUrl=function(b){return null};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return DrawioFile.RESTRICT_EXPORT};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};
-DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,k,n){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,k,n){};
-DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var k=this.ui.editor.graph,n=k.getSelectionCells(),d=k.getViewState(),x=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(x,
+DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,l,n){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,l,n){};
+DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var l=this.ui.editor.graph,n=l.getSelectionCells(),d=l.getViewState(),v=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(v,
d,n);this.ui.actions.get("share").funct()}))}))}),null,mxResources.get("saveToGoogleDrive",null,"Save to Google Drive"),mxResources.get("cancel")):this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
-DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var k=0;null!=b&&k<b.length;k++){var n=b[k];null!=n.id&&0==n.id.indexOf("extFont_")&&n.parentNode.removeChild(n)}};
+DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var l=0;null!=b&&l<b.length;l++){var n=b[l];null!=n.id&&0==n.id.indexOf("extFont_")&&n.parentNode.removeChild(n)}};
DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();null!=b&&(this.ui.setFileData(b),this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages)));this.installListeners();this.isSyncSupported()&&this.startSync();EditorUi.debug("DrawioFile.open",[this])};DrawioFile.prototype.isPolling=function(){return!1};DrawioFile.prototype.getPollingInterval=function(){return 1E4};DrawioFile.prototype.isSyncSupported=function(){return!1};
DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages&&null!=this.ui.pages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
-DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,k){b(null)};
-DrawioFile.prototype.loadDescriptor=function(b,k){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,k){this.loadDescriptor(mxUtils.bind(this,function(n){b(n)}),k)};DrawioFile.prototype.patchDescriptor=function(b,k){this.setDescriptorEtag(b,this.getDescriptorEtag(k));this.descriptorChanged()};
+DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,l){b(null)};
+DrawioFile.prototype.loadDescriptor=function(b,l){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,l){this.loadDescriptor(mxUtils.bind(this,function(n){b(n)}),l)};DrawioFile.prototype.patchDescriptor=function(b,l){this.setDescriptorEtag(b,this.getDescriptorEtag(l));this.descriptorChanged()};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};
-DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,k){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,k){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
+DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,l){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,l){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};DrawioFile.prototype.getDescriptor=function(){return null};
-DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,k){this.setDescriptorEtag(b,k)};DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,k){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};DrawioFile.prototype.getDescriptorChecksum=function(b){return null};
-DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,k){b=null!=k?k.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
+DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,l){this.setDescriptorEtag(b,l)};DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,l){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};DrawioFile.prototype.getDescriptorChecksum=function(b){return null};
+DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,l){b=null!=l?l.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("tooltipsEnabledChanged",
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
-DrawioFile.prototype.addAllSavedStatus=function(b){if(null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this){b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));var k=this.isRevisionHistorySupported()&&b!=mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+k+'title="'+b+'">'+b+(this.isLocked()?' <img class="geToolbarButton" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+
+DrawioFile.prototype.addAllSavedStatus=function(b){if(null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this){b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));var l=this.isRevisionHistorySupported()&&b!=mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+l+'title="'+b+'">'+b+(this.isLocked()?' <img class="geToolbarButton" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+
Editor.lockedImage+'"/>':"")+"</div>")}};
-DrawioFile.prototype.saveDraft=function(b){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var k={type:"draft",created:this.created,modified:(new Date).getTime(),data:null!=b?b:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(k));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[k])}catch(n){this.removeDraft()}};
+DrawioFile.prototype.saveDraft=function(b){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var l={type:"draft",created:this.created,modified:(new Date).getTime(),data:null!=b?b:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(l));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[l])}catch(n){this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};
-DrawioFile.prototype.addUnsavedStatus=function(b){this.inConflictState||null==this.ui.statusContainer||this.ui.getCurrentFile()!=this||(b instanceof Error&&null!=b.message&&""!=b.message?this.ui.updateStatus(mxUtils.bind(this,function(){var k=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+k+'" data-title="'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+'" data-message="'+mxUtils.htmlEntities(b.message)+'" class="geStatusAlert">'+k+" ("+mxUtils.htmlEntities(b.message)+
-")</div>")})):(this.ui.updateStatus(mxUtils.bind(this,function(){var k=this.getErrorMessage(b);if(null==k&&null!=this.lastSaved){var n=this.ui.timeSince(new Date(this.lastSaved));null!=n&&(k=mxResources.get("lastSaved",[n]))}null!=k&&60<k.length&&(k=k.substring(0,60)+"...");k=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=k&&""!=k?" ("+mxUtils.htmlEntities(k)+")":"");n='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"';this.ui.editor.setStatus("<div "+
-n+' title="'+k+'" class="geStatusAlert">'+k+"</div>")})),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=
-null;this.saveDraft()}),EditorUi.draftSaveDelay||0))))};DrawioFile.prototype.addConflictStatus=function(b,k){this.ui.updateStatus(mxUtils.bind(this,function(){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""),k)}));this.ui.spinner.stop();this.clearAutosave()};
-DrawioFile.prototype.setConflictStatus=function(b,k){this.ui.editor.setStatus('<div title="'+b+'" '+(null!=k?'data-action="statusFunction"':"")+' class="geStatusAlert">'+b+'<img data-link="https://www.drawio.com/doc/faq/synchronize" src="'+Editor.helpImage+'" style="margin-left:2px;cursor:help;"/></div>',k)};
-DrawioFile.prototype.showRefreshDialog=function(b,k,n){null==n&&(n=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,k)})):(this.addConflictStatus(n,mxUtils.bind(this,function(){this.showRefreshDialog(b,k)})),this.ui.showError(mxResources.get("warning")+" ("+n+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(mxUtils.bind(this,
-function(){null!=b&&b();this.ui.alert(mxResources.get("copyCreated"))}),k)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.reloadFile(mxUtils.bind(this,function(){this.ui.spinner.stop();null!=b&&b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=k&&k()}))}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
-DrawioFile.prototype.showCopyDialog=function(b,k,n){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,k)}),null,mxResources.get("overwrite"),n,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
-DrawioFile.prototype.showConflictDialog=function(b,k){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,k){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var n=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),d=mxResources.get("redirectToNewApp");null!=k&&(d+=" ("+k+")");k=mxUtils.bind(this,function(){var x=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==n?window.location.reload():window.location.href=
-n});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),x,mxResources.get("cancel"),mxResources.get("discardChanges")):x()});null!=b?this.isModified()?this.ui.confirm(d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(d,k,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-k)}};
+DrawioFile.prototype.addUnsavedStatus=function(b){this.inConflictState||null==this.ui.statusContainer||this.ui.getCurrentFile()!=this||(b instanceof Error&&null!=b.message&&""!=b.message?this.ui.updateStatus(mxUtils.bind(this,function(){var l=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+l+'" data-title="'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+'" data-message="'+mxUtils.htmlEntities(b.message)+'" class="geStatusAlert">'+l+" ("+mxUtils.htmlEntities(b.message)+
+")</div>")})):(this.ui.updateStatus(mxUtils.bind(this,function(){var l=this.getErrorMessage(b);if(null==l&&null!=this.lastSaved){var n=this.ui.timeSince(new Date(this.lastSaved));null!=n&&(l=mxResources.get("lastSaved",[n]))}null!=l&&60<l.length&&(l=l.substring(0,60)+"...");l=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=l&&""!=l?" ("+mxUtils.htmlEntities(l)+")":"");n='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"';this.ui.editor.setStatus("<div "+
+n+' title="'+l+'" class="geStatusAlert">'+l+"</div>")})),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=
+null;this.saveDraft()}),EditorUi.draftSaveDelay||0))))};DrawioFile.prototype.addConflictStatus=function(b,l){this.ui.updateStatus(mxUtils.bind(this,function(){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""),l)}));this.ui.spinner.stop();this.clearAutosave()};
+DrawioFile.prototype.setConflictStatus=function(b,l){this.ui.editor.setStatus('<div title="'+b+'" '+(null!=l?'data-action="statusFunction"':"")+' class="geStatusAlert">'+b+'<img data-link="https://www.drawio.com/doc/faq/synchronize" src="'+Editor.helpImage+'" style="margin-left:2px;cursor:help;"/></div>',l)};
+DrawioFile.prototype.showRefreshDialog=function(b,l,n){null==n&&(n=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,l)})):(this.addConflictStatus(n,mxUtils.bind(this,function(){this.showRefreshDialog(b,l)})),this.ui.showError(mxResources.get("warning")+" ("+n+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(mxUtils.bind(this,
+function(){null!=b&&b();this.ui.alert(mxResources.get("copyCreated"))}),l)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.reloadFile(mxUtils.bind(this,function(){this.ui.spinner.stop();null!=b&&b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=l&&l()}))}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
+DrawioFile.prototype.showCopyDialog=function(b,l,n){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,l)}),null,mxResources.get("overwrite"),n,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
+DrawioFile.prototype.showConflictDialog=function(b,l){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),l,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
+DrawioFile.prototype.redirectToNewApp=function(b,l){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var n=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),d=mxResources.get("redirectToNewApp");null!=l&&(d+=" ("+l+")");l=mxUtils.bind(this,function(){var v=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==n?window.location.reload():window.location.href=
+n});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()});null!=b?this.isModified()?this.ui.confirm(d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),l,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(d,l,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+l)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified(),"remoteFileChanged",null==this.sync?"n/a":this.sync.remoteFileChanged),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")")})):
this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus()})),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.clearStatus())};
-DrawioFile.prototype.handleFileError=function(b,k){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,k):(this.isModified()&&this.addUnsavedStatus(b),k?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||this.ui.updateStatus(mxUtils.bind(this,function(){var n=this.getErrorMessage(b);null!=n&&60<n.length&&(n=n.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+
+DrawioFile.prototype.handleFileError=function(b,l){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,l):(this.isModified()&&this.addUnsavedStatus(b),l?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||this.ui.updateStatus(mxUtils.bind(this,function(){var n=this.getErrorMessage(b);null!=n&&60<n.length&&(n=n.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+
(null!=n?" ("+mxUtils.htmlEntities(n)+")":"")+"</div>")}))))};
-DrawioFile.prototype.handleConflictError=function(b,k){var n=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(y){this.handleFileError(y,!0)}),x=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,n,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),z=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,n,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(n,d,x):this.invalidChecksum&&k?this.showRefreshDialog(n,d,this.getErrorMessage(b)):k?this.showConflictDialog(x,z):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(n,d)}))};DrawioFile.prototype.getErrorMessage=function(b){var k=null!=b?null!=b.error?b.error.message:b.message:null;null==k&&null!=b&&b.code==App.ERROR_TIMEOUT?k=mxResources.get("timeout"):"0"==k&&(k=mxResources.get("noResponse"));return k};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
-DrawioFile.prototype.compressionChanged=function(b){var k=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=k)for(var n=0;n<k.length;n++){var d=k[n].node;if(null!=d&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=k[n].getId())){var x=d.getElementsByTagName("mxGraphModel");x=0<x.length?x[0]:null;var z=Graph.decompress(mxUtils.getNodeValue(d));b?0==z.length&&null!=x&&(EditorUi.removeChildNodes(d),mxUtils.setTextContent(d,Graph.compressNode(x)),EditorUi.debug("DrawioFile.compressionChanged",
-[this],"Page "+n+" compressed")):0<z.length&&null==x&&(EditorUi.removeChildNodes(d),d.appendChild(mxUtils.parseXml(z).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+n+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};
+DrawioFile.prototype.handleConflictError=function(b,l){var n=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(z){this.handleFileError(z,!0)}),v=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,n,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),A=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,n,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(n,d,v):this.invalidChecksum&&l?this.showRefreshDialog(n,d,this.getErrorMessage(b)):l?this.showConflictDialog(v,A):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(n,d)}))};DrawioFile.prototype.getErrorMessage=function(b){var l=null!=b?null!=b.error?b.error.message:b.message:null;null==l&&null!=b&&b.code==App.ERROR_TIMEOUT?l=mxResources.get("timeout"):"0"==l&&(l=mxResources.get("noResponse"));return l};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.compressionChanged=function(b){var l=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=l)for(var n=0;n<l.length;n++){var d=l[n].node;if(null!=d&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=l[n].getId())){var v=d.getElementsByTagName("mxGraphModel");v=0<v.length?v[0]:null;var A=Graph.decompress(mxUtils.getNodeValue(d));b?0==A.length&&null!=v&&(EditorUi.removeChildNodes(d),mxUtils.setTextContent(d,Graph.compressNode(v)),EditorUi.debug("DrawioFile.compressionChanged",
+[this],"Page "+n+" compressed")):0<A.length&&null==v&&(EditorUi.removeChildNodes(d),d.appendChild(mxUtils.parseXml(A).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+n+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};
DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosaveDelay",this.autosaveDelay,"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"...")})),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),
-this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(k){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(k){this.handleFileError(k)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
-DrawioFile.prototype.createSecret=function(b){var k=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(k,mxUtils.bind(this,function(n){EditorUi.debug("DrawioFile.createSecret",[this],"secret",k,"token",n);b(k,n)}),mxUtils.bind(this,function(){b(k)})):b(k)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,k,n,d,x,z,y){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;z=null!=z?z:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(z),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=n&&n()):this.sync.fileSaved(z,k,n,d,x,y)}catch(K){this.invalidChecksum=
-this.inConflictState=!0;this.descriptorChanged();null!=d&&d(K);try{var F=this.getCurrentUser(),N=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),N,K)}catch(L){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[k],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(K){this.descriptorChanged(),null!=d&&d(K)}};
-DrawioFile.prototype.autosave=function(b,k,n,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());var x=Date.now()-this.lastAutosave<k?b:0;this.clearAutosave();var z=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==z&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",z,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var y=this.isAutosaveRevision();
-y&&(this.lastAutosaveRevision=(new Date).getTime());this.save(y,mxUtils.bind(this,function(F){this.autosaveCompleted();null!=n&&n(F)}),mxUtils.bind(this,function(F){null!=d&&d(F)}))}else this.isModified()||this.ui.clearStatus(),null!=n&&n(null)}catch(F){null!=d&&d(F)}}),x);this.autosaveThread=z;EditorUi.debug("DrawioFile.autosave",[this],"thread",z,"delay",b,"maxDelay",k,"actualDelay",x,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
+this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(l){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(l){this.handleFileError(l)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
+DrawioFile.prototype.createSecret=function(b){var l=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(l,mxUtils.bind(this,function(n){EditorUi.debug("DrawioFile.createSecret",[this],"secret",l,"token",n);b(l,n)}),mxUtils.bind(this,function(){b(l)})):b(l)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
+DrawioFile.prototype.fileSaved=function(b,l,n,d,v,A,z){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;A=null!=A?A:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(A),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=n&&n()):this.sync.fileSaved(A,l,n,d,v,z)}catch(J){this.invalidChecksum=
+this.inConflictState=!0;this.descriptorChanged();null!=d&&d(J);try{var D=this.getCurrentUser(),P=null!=D?D.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),P,J)}catch(L){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[l],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(J){this.descriptorChanged(),null!=d&&d(J)}};
+DrawioFile.prototype.autosave=function(b,l,n,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());var v=Date.now()-this.lastAutosave<l?b:0;this.clearAutosave();var A=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==A&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",A,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var z=this.isAutosaveRevision();
+z&&(this.lastAutosaveRevision=(new Date).getTime());this.save(z,mxUtils.bind(this,function(D){this.autosaveCompleted();null!=n&&n(D)}),mxUtils.bind(this,function(D){null!=d&&d(D)}))}else this.isModified()||this.ui.clearStatus(),null!=n&&n(null)}catch(D){null!=d&&d(D)}}),v);this.autosaveThread=A;EditorUi.debug("DrawioFile.autosave",[this],"thread",A,"delay",b,"maxDelay",l,"actualDelay",v,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
-DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(k){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,k){if(null!=b&&null!=k){var n=b.lastIndexOf(".");b=0<n?b.substring(n):"";n=k.lastIndexOf(".");return b===(0<n?k.substring(n):"")}return b==k};
+DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(l){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,l){if(null!=b&&null!=l){var n=b.lastIndexOf(".");b=0<n?b.substring(n):"";n=l.lastIndexOf(".");return b===(0<n?l.substring(n):"")}return b==l};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,k){b([])};DrawioFile.prototype.addComment=function(b,k,n){k(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,k){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,k)};LocalFile=function(b,k,n,d,x,z,y){DrawioFile.call(this,b,k);this.title=n;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=x;this.desc=z;this.editable=y};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
-LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,k,n,d,x){this.saveAs(this.title,k,n,d,x)};LocalFile.prototype.saveAs=function(b,k,n,d,x){this.saveFile(b,!1,k,n,null,d,x)};
-LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,k){null==this.fileHandle?null!=k&&k({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,k)};
-LocalFile.prototype.saveFile=function(b,k,n,d,x,z,y){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;x||this.updateFileData();var F=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var N=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=n&&n()}),L=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
-!0;var f=mxUtils.bind(this,function(m){this.savingFile=!1;null!=d&&d({error:m})});this.saveDraft(N);this.fileHandle.createWritable().then(mxUtils.bind(this,function(m){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);y||this.desc.lastModified==t.lastModified?m.write(F?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){m.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(v){try{var B=this.desc;this.savingFile=!1;this.desc=v;this.fileSaved(N,B,K,f);this.removeDraft()}catch(E){f(E)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(t){this.invalidFileHandle=!0;f(t)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,F?"image/png":"text/xml",F);else if(c.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf(".");l=0<l?b.substring(l+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(F?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));K()}});F?(k=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){L(c)}),d,this.ui.getCurrentFile()!=this?N:null,k.scale,k.border)):L(N)};
-LocalFile.prototype.rename=function(b,k,n){this.title=b;this.descriptorChanged();null!=k&&k()};LocalLibrary=function(b,k,n){LocalFile.call(this,b,k,n)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,k,n){this.saveFile(b,!1,k,n)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,k,n){DrawioFile.call(this,b,k);this.title=n;this.etag=this.getEtag(k)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};
-StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,k){this.getLatestVersionId(b,k)};StorageFile.prototype.getLatestVersionId=function(b,k){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(n){b(this.getEtag(n))}),k)};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.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,k,n){this.saveAs(this.getTitle(),k,n)};
-StorageFile.prototype.saveAs=function(b,k,n){DrawioFile.prototype.save.apply(this,[!1,mxUtils.bind(this,function(){this.saveFile(this.getTitle(),!1,k,n)}),n])};StorageFile.insertFile=function(b,k,n,d,x,z){StorageFile.doInsertFile(null!=z?z:new StorageFile(b,n,k),d,x)};
-StorageFile.doInsertFile=function(b,k,n){var d=b.getTitle(),x=b.getUi(),z=mxUtils.bind(this,function(y){var F=function(){b.writeFile(d,function(){k(b)},n)};y?x.confirm(mxResources.get("replaceIt",[d]),F,n):F()});StorageFile.getFileContent(x,d,function(y){z(null!=y)},function(){z(!1)})};StorageFile.getFileContent=function(b,k,n,d){b.getDatabaseItem(k,function(x){n(null!=x?x.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(k,n):null!=d&&d()}),"files")};
-StorageFile.getFileInfo=function(b,k,n,d){b.getDatabaseItem(k,function(x){n(x)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(k,function(x){n(null!=x?{title:k}:null)}):null!=d&&d()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(b,k,n,d,x){x=null!=x?x:0;if(this.isEditable()){var z=mxUtils.bind(this,function(){this.writeFile(b,n,d)});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):this instanceof StorageLibrary?z():StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(y){this.isRenamable()&&this.getTitle()!=b&&null!=y?this.ui.confirm(mxResources.get("replaceIt",[b]),z,d):this.getLatestVersion(mxUtils.bind(this,function(F){F.getDescriptor()!=
-this.getDescriptor()?(EditorUi.debug("StorageFile.saveFile",[this],"conflict",[F]),this.mergeFile(F,mxUtils.bind(this,function(){x>=this.maxRetries||this.invalidChecksum||this.inConflictState?(this.inConflictState=!0,null!=d&&d()):this.retrySave(mxUtils.bind(this,function(){this.updateFileData();this.saveFile(b,k,n,d,x+1)}))}),d)):z()}),d)}),d)}else null!=n&&n();EditorUi.debug("StorageFile.saveFile",[this],"title",b,"revision",k,"retry",x)};
-StorageFile.prototype.retrySave=function(b){var k=300+300*Math.random();window.setTimeout(b,k);EditorUi.debug("StorageFile.retrySave",[this],"delay",k)};
-StorageFile.prototype.writeFile=function(b,k,n){this.isRenamable()&&(this.title=b);try{var d=this.getDescriptor(),x=this.getData(),z=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.setDescriptor(this.getEtag(x));this.contentChanged();this.fileSaved(x,d,k,n)});this.setShadowModified(!1);this.ui.setDatabaseItem(null,[{title:this.title,size:x.length,lastModified:Date.now(),type:this.type},{title:this.title,data:x}],z,mxUtils.bind(this,function(){if(null==this.ui.database)try{this.ui.setLocalData(this.title,
-x,z)}catch(y){null!=n&&n(y)}else null!=n&&n()}),["filesInfo","files"])}catch(y){null!=n&&n(y)}};StorageFile.prototype.rename=function(b,k,n){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(x){var z=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,k)}),n)});null!=x?this.ui.confirm(mxResources.get("replaceIt",[b]),z,n):z()}),n):k()};
-StorageFile.prototype.getLatestVersion=function(b,k){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(n){b(new StorageFile(this.ui,n,this.title))}),k)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
-StorageFile.listLocalStorageFiles=function(b){for(var k=[],n=0;n<localStorage.length;n++){var d=localStorage.key(n),x=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<x.length){var z=(null==b||"F"==b)&&("<mxfile "===x.substring(0,8)||"<?xml"===x.substring(0,5)||"\x3c!--[if IE]>"===x.substring(0,12)),y=(null==b||"L"==b)&&"<mxlibrary>"===x.substring(0,11);(z||y)&&k.push({title:d,type:z?"F":"L",size:x.length,lastModified:Date.now()})}}return k};
-StorageFile.migrate=function(b){var k=StorageFile.listLocalStorageFiles();k.push({title:".scratchpad",type:"L"});var n=b.transaction(["files","filesInfo"],"readwrite");b=n.objectStore("files");n=n.objectStore("filesInfo");for(var d=0;d<k.length;d++){var x=k[d],z=localStorage.getItem(x.title);b.add({title:x.title,data:z});n.add(x)}};
-StorageFile.listFiles=function(b,k,n,d){b.getDatabaseItems(function(x){var z=[];if(null!=x)for(var y=0;y<x.length;y++)"."==x[y].title.charAt(0)||null!=k&&x[y].type!=k||z.push(x[y]);n(z)},function(){null==b.database?n(StorageFile.listLocalStorageFiles(k)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,k,n,d){b.removeDatabaseItem([k,k],n,function(){null==b.database?(localStorage.removeItem(k),n()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,k,n){StorageFile.call(this,b,k,n)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,k,n){this.saveFile(b,!1,k,n)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-StorageLibrary.prototype.isRenamable=function(b,k,n){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,k,n){DrawioFile.call(this,b,k);this.title=n;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,k,n){RemoteFile.call(this,b,k,n.title);this.libObj=n};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,k,n){};
-RemoteLibrary.prototype.saveAs=function(b,k,n){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,k,n){StorageFile.call(this,b,k,n);b=n;k=b.lastIndexOf("/");0<=k&&(b=b.substring(k+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,k,n){return!1};UrlLibrary.prototype.saveAs=function(b,k,n){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,k,n){DrawioFile.call(this,b,k);this.desc=n||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,l){b([])};DrawioFile.prototype.addComment=function(b,l,n){l(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,l){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,l)};LocalFile=function(b,l,n,d,v,A,z){DrawioFile.call(this,b,l);this.title=n;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=v;this.desc=A;this.editable=z};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
+LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,l,n,d,v){this.saveAs(this.title,l,n,d,v)};LocalFile.prototype.saveAs=function(b,l,n,d,v){this.saveFile(b,!1,l,n,null,d,v)};
+LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,l){null==this.fileHandle?null!=l&&l({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,l)};
+LocalFile.prototype.saveFile=function(b,l,n,d,v,A,z){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;v||this.updateFileData();var D=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var P=this.getData(),J=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=n&&n()}),L=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
+!0;var f=mxUtils.bind(this,function(m){this.savingFile=!1;null!=d&&d({error:m})});this.saveDraft(P);this.fileHandle.createWritable().then(mxUtils.bind(this,function(m){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);z||this.desc.lastModified==t.lastModified?m.write(D?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){m.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){try{var y=this.desc;this.savingFile=!1;this.desc=x;this.fileSaved(P,y,J,f);this.removeDraft()}catch(F){f(F)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(t){this.invalidFileHandle=!0;f(t)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,D?"image/png":"text/xml",D);else if(c.length<MAX_REQUEST_SIZE){var k=b.lastIndexOf(".");k=0<k?b.substring(k+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+k+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(D?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));J()}});D?(l=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){L(c)}),d,this.ui.getCurrentFile()!=this?P:null,l.scale,l.border)):L(P)};
+LocalFile.prototype.rename=function(b,l,n){this.title=b;this.descriptorChanged();null!=l&&l()};LocalLibrary=function(b,l,n){LocalFile.call(this,b,l,n)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,l,n){this.saveFile(b,!1,l,n)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,l,n){DrawioFile.call(this,b,l);this.title=n;this.etag=this.getEtag(l)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};
+StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,l){this.getLatestVersionId(b,l)};StorageFile.prototype.getLatestVersionId=function(b,l){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(n){b(this.getEtag(n))}),l)};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.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,l,n){this.saveAs(this.getTitle(),l,n)};
+StorageFile.prototype.saveAs=function(b,l,n){DrawioFile.prototype.save.apply(this,[!1,mxUtils.bind(this,function(){this.saveFile(this.getTitle(),!1,l,n)}),n])};StorageFile.insertFile=function(b,l,n,d,v,A){StorageFile.doInsertFile(null!=A?A:new StorageFile(b,n,l),d,v)};
+StorageFile.doInsertFile=function(b,l,n){var d=b.getTitle(),v=b.getUi(),A=mxUtils.bind(this,function(z){var D=function(){b.writeFile(d,function(){l(b)},n)};z?v.confirm(mxResources.get("replaceIt",[d]),D,n):D()});StorageFile.getFileContent(v,d,function(z){A(null!=z)},function(){A(!1)})};StorageFile.getFileContent=function(b,l,n,d){b.getDatabaseItem(l,function(v){n(null!=v?v.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(l,n):null!=d&&d()}),"files")};
+StorageFile.getFileInfo=function(b,l,n,d){b.getDatabaseItem(l,function(v){n(v)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(l,function(v){n(null!=v?{title:l}:null)}):null!=d&&d()}),"filesInfo")};
+StorageFile.prototype.saveFile=function(b,l,n,d,v){v=null!=v?v:0;if(this.isEditable()){var A=mxUtils.bind(this,function(){this.writeFile(b,n,d)});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):this instanceof StorageLibrary?A():StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(z){this.isRenamable()&&this.getTitle()!=b&&null!=z?this.ui.confirm(mxResources.get("replaceIt",[b]),A,d):this.getLatestVersion(mxUtils.bind(this,function(D){D.getDescriptor()!=
+this.getDescriptor()?(EditorUi.debug("StorageFile.saveFile",[this],"conflict",[D]),this.mergeFile(D,mxUtils.bind(this,function(){v>=this.maxRetries||this.invalidChecksum||this.inConflictState?(this.inConflictState=!0,null!=d&&d()):this.retrySave(mxUtils.bind(this,function(){this.updateFileData();this.saveFile(b,l,n,d,v+1)}))}),d)):A()}),d)}),d)}else null!=n&&n();EditorUi.debug("StorageFile.saveFile",[this],"title",b,"revision",l,"retry",v)};
+StorageFile.prototype.retrySave=function(b){var l=300+300*Math.random();window.setTimeout(b,l);EditorUi.debug("StorageFile.retrySave",[this],"delay",l)};
+StorageFile.prototype.writeFile=function(b,l,n){this.isRenamable()&&(this.title=b);try{var d=this.getDescriptor(),v=this.getData(),A=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.setDescriptor(this.getEtag(v));this.contentChanged();this.fileSaved(v,d,l,n)});this.setShadowModified(!1);this.ui.setDatabaseItem(null,[{title:this.title,size:v.length,lastModified:Date.now(),type:this.type},{title:this.title,data:v}],A,mxUtils.bind(this,function(){if(null==this.ui.database)try{this.ui.setLocalData(this.title,
+v,A)}catch(z){null!=n&&n(z)}else null!=n&&n()}),["filesInfo","files"])}catch(z){null!=n&&n(z)}};StorageFile.prototype.rename=function(b,l,n){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(v){var A=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,l)}),n)});null!=v?this.ui.confirm(mxResources.get("replaceIt",[b]),A,n):A()}),n):l()};
+StorageFile.prototype.getLatestVersion=function(b,l){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(n){b(new StorageFile(this.ui,n,this.title))}),l)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
+StorageFile.listLocalStorageFiles=function(b){for(var l=[],n=0;n<localStorage.length;n++){var d=localStorage.key(n),v=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<v.length){var A=(null==b||"F"==b)&&("<mxfile "===v.substring(0,8)||"<?xml"===v.substring(0,5)||"\x3c!--[if IE]>"===v.substring(0,12)),z=(null==b||"L"==b)&&"<mxlibrary>"===v.substring(0,11);(A||z)&&l.push({title:d,type:A?"F":"L",size:v.length,lastModified:Date.now()})}}return l};
+StorageFile.migrate=function(b){var l=StorageFile.listLocalStorageFiles();l.push({title:".scratchpad",type:"L"});var n=b.transaction(["files","filesInfo"],"readwrite");b=n.objectStore("files");n=n.objectStore("filesInfo");for(var d=0;d<l.length;d++){var v=l[d],A=localStorage.getItem(v.title);b.add({title:v.title,data:A});n.add(v)}};
+StorageFile.listFiles=function(b,l,n,d){b.getDatabaseItems(function(v){var A=[];if(null!=v)for(var z=0;z<v.length;z++)"."==v[z].title.charAt(0)||null!=l&&v[z].type!=l||A.push(v[z]);n(A)},function(){null==b.database?n(StorageFile.listLocalStorageFiles(l)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,l,n,d){b.removeDatabaseItem([l,l],n,function(){null==b.database?(localStorage.removeItem(l),n()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,l,n){StorageFile.call(this,b,l,n)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,l,n){this.saveFile(b,!1,l,n)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageLibrary.prototype.isRenamable=function(b,l,n){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,l,n){DrawioFile.call(this,b,l);this.title=n;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,l,n){RemoteFile.call(this,b,l,n.title);this.libObj=n};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,l,n){};
+RemoteLibrary.prototype.saveAs=function(b,l,n){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,l,n){StorageFile.call(this,b,l,n);b=n;l=b.lastIndexOf("/");0<=l&&(b=b.substring(l+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,l,n){return!1};UrlLibrary.prototype.saveAs=function(b,l,n){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,l,n){DrawioFile.call(this,b,l);this.desc=n||{};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,k,n){function d(c,f,l,m,t,v){function B(){mxEvent.addListener(E,"click",null!=v?v:function(){l==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(l,!0);k()})):l==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(l,!0);k()}),function(T){b.spinner.stop();b.handleError(T)}):
-(b.setMode(l,!0),k())})}F++;++y>n&&(mxUtils.br(N),y=1);var E=document.createElement("a");E.style.overflow="hidden";E.style.display="inline-block";E.className="geBaseButton";E.style.boxSizing="border-box";E.style.fontSize="11px";E.style.position="relative";E.style.margin="4px";E.style.marginTop="8px";E.style.marginBottom="0px";E.style.padding="8px 10px 8px 10px";E.style.width="88px";E.style.height="100px";E.style.whiteSpace="nowrap";E.setAttribute("title",f);var D=document.createElement("div");D.style.textOverflow=
-"ellipsis";D.style.overflow="hidden";D.style.position="absolute";D.style.bottom="8px";D.style.left="0px";D.style.right="0px";mxUtils.write(D,f);E.appendChild(D);if(null!=c){var A=document.createElement("img");A.setAttribute("src",c);A.setAttribute("border","0");A.setAttribute("align","absmiddle");A.style.width="60px";A.style.height="60px";A.style.paddingBottom="6px";E.appendChild(A)}else D.style.paddingTop="5px",D.style.whiteSpace="normal",mxClient.IS_IOS?(E.style.padding="0px 10px 20px 10px",E.style.top=
-"6px"):mxClient.IS_FF&&(D.style.paddingTop="0px",D.style.marginTop="-2px");if(null!=t)for(c=0;c<t.length;c++)mxUtils.br(D),mxUtils.write(D,t[c]);if(null!=m&&null==b[m]){A.style.visibility="hidden";mxUtils.setOpacity(D,10);var S=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});S.spin(E);var R=window.setTimeout(function(){null==b[m]&&(S.stop(),E.style.display="none")},3E4);b.addListener("clientLoaded",
-mxUtils.bind(this,function(T,P){null!=b[m]&&P.getProperty("client")==b[m]&&(window.clearTimeout(R),mxUtils.setOpacity(D,100),A.style.visibility="",S.stop(),B(),"drive"==m&&null!=K.parentNode&&K.parentNode.removeChild(K))}))}else B();N.appendChild(E)}n=null!=n?n:2;var x=document.createElement("div");x.style.textAlign="center";x.style.whiteSpace="nowrap";x.style.paddingTop="0px";x.style.paddingBottom="20px";var z=document.createElement("div");z.style.border="1px solid #d3d3d3";z.style.borderWidth="1px 0px 1px 0px";
-z.style.padding="10px 0px 20px 0px";var y=0,F=0,N=document.createElement("div");N.style.paddingTop="2px";z.appendChild(N);var K=document.createElement("p"),L=document.createElement("p");L.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(L,mxResources.get("saveDiagramsTo")+":");x.appendChild(L);x.appendChild(z);y=0;"function"===typeof window.DriveClient&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===
+var StorageDialog=function(b,l,n){function d(c,f,k,m,t,x){function y(){mxEvent.addListener(F,"click",null!=x?x:function(){k==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);l()})):k==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);l()}),function(Q){b.spinner.stop();b.handleError(Q)}):
+(b.setMode(k,!0),l())})}D++;++z>n&&(mxUtils.br(P),z=1);var F=document.createElement("a");F.style.overflow="hidden";F.style.display="inline-block";F.className="geBaseButton";F.style.boxSizing="border-box";F.style.fontSize="11px";F.style.position="relative";F.style.margin="4px";F.style.marginTop="8px";F.style.marginBottom="0px";F.style.padding="8px 10px 8px 10px";F.style.width="88px";F.style.height="100px";F.style.whiteSpace="nowrap";F.setAttribute("title",f);var E=document.createElement("div");E.style.textOverflow=
+"ellipsis";E.style.overflow="hidden";E.style.position="absolute";E.style.bottom="8px";E.style.left="0px";E.style.right="0px";mxUtils.write(E,f);F.appendChild(E);if(null!=c){var C=document.createElement("img");C.setAttribute("src",c);C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="60px";C.style.height="60px";C.style.paddingBottom="6px";F.appendChild(C)}else E.style.paddingTop="5px",E.style.whiteSpace="normal",mxClient.IS_IOS?(F.style.padding="0px 10px 20px 10px",F.style.top=
+"6px"):mxClient.IS_FF&&(E.style.paddingTop="0px",E.style.marginTop="-2px");if(null!=t)for(c=0;c<t.length;c++)mxUtils.br(E),mxUtils.write(E,t[c]);if(null!=m&&null==b[m]){C.style.visibility="hidden";mxUtils.setOpacity(E,10);var S=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});S.spin(F);var U=window.setTimeout(function(){null==b[m]&&(S.stop(),F.style.display="none")},3E4);b.addListener("clientLoaded",
+mxUtils.bind(this,function(Q,O){null!=b[m]&&O.getProperty("client")==b[m]&&(window.clearTimeout(U),mxUtils.setOpacity(E,100),C.style.visibility="",S.stop(),y(),"drive"==m&&null!=J.parentNode&&J.parentNode.removeChild(J))}))}else y();P.appendChild(F)}n=null!=n?n:2;var v=document.createElement("div");v.style.textAlign="center";v.style.whiteSpace="nowrap";v.style.paddingTop="0px";v.style.paddingBottom="20px";var A=document.createElement("div");A.style.border="1px solid #d3d3d3";A.style.borderWidth="1px 0px 1px 0px";
+A.style.padding="10px 0px 20px 0px";var z=0,D=0,P=document.createElement("div");P.style.paddingTop="2px";A.appendChild(P);var J=document.createElement("p"),L=document.createElement("p");L.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(L,mxResources.get("saveDiagramsTo")+":");v.appendChild(L);v.appendChild(A);z=0;"function"===typeof window.DriveClient&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===
typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");
-null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");z=document.createElement("span");z.style.position="absolute";z.style.cursor="pointer";z.style.bottom="27px";z.style.color="gray";z.style.userSelect="none";z.style.textAlign="center";z.style.left="50%";mxUtils.setPrefixedStyle(z.style,"transform","translate(-50%,0)");mxUtils.write(z,mxResources.get("decideLater"));
-x.appendChild(z);mxEvent.addListener(z,"click",function(){b.hideDialog();var c=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=c});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(K.style.padding="7px",K.style.fontSize="9pt",K.style.marginTop="-14px",K.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'+
-mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",x.appendChild(K))},5E3);this.container=x},SplashDialog=function(b){var k=document.createElement("div");k.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var n=b.addLanguageMenu(k,!1,"28px");null!=n&&(n.style.bottom="24px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width=
-"32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var x=document.createElement("div");x.style.margin="8px 0px 0px 0px";x.style.padding="18px 0px 24px 0px";n="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",n=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+"/dropbox-logo.svg",n=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",n=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?
-(d.src=IMAGE_PATH+"/github-logo.svg",n=mxResources.get("github")):b.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",n=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",n=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",n=mxResources.get("trello")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",x.style.paddingBottom="10px",x.style.paddingTop="30px",n=mxResources.get("device"));var z=document.createElement("button");
-z.className="geBigButton";z.style.marginBottom="8px";z.style.fontSize="18px";z.style.padding="10px";z.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)x.style.padding="42px 0px 10px 0px",z.style.marginBottom="12px";else{x.style.border="1px solid #d3d3d3";x.style.borderWidth="1px 0px 1px 0px";var y=document.createElement("table"),F=document.createElement("tbody"),N=document.createElement("tr"),K=document.createElement("td"),L=document.createElement("td");y.setAttribute("align",
-"center");K.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,n);L.style.textAlign="left";L.appendChild(d);N.appendChild(K);N.appendChild(L);F.appendChild(N);y.appendChild(F);k.appendChild(y);n=document.createElement("span");n.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0)");mxUtils.write(n,
-mxResources.get("changeStorage"));mxEvent.addListener(n,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});k.appendChild(n)}mxUtils.write(z,mxResources.get("createNewDiagram"));mxEvent.addListener(z,"click",function(){b.hideDialog();b.actions.get("new").funct()});x.appendChild(z);mxUtils.br(x);z=document.createElement("button");z.className="geBigButton";z.style.marginBottom="22px";z.style.fontSize="18px";z.style.padding="10px";z.style.width="340px";mxUtils.write(z,
-mxResources.get("openExistingDiagram"));mxEvent.addListener(z,"click",function(){b.actions.get("open").funct()});x.appendChild(z);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(n=function(l){z.style.marginBottom="24px";var m=document.createElement("a");m.style.display="inline-block";m.style.color="gray";m.style.cursor="pointer";m.style.marginTop="6px";mxUtils.write(m,mxResources.get("signOut"));z.style.marginBottom="16px";x.style.paddingBottom="18px";mxEvent.addListener(m,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){l()})});x.appendChild(m)},b.mode==App.MODE_GOOGLE&&
-null!=b.drive){var c=b.drive.getUsersList();if(0<c.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");z.style.marginBottom="16px";x.style.paddingBottom="18px";x.appendChild(d);var f=document.createElement("select");f.style.marginLeft="4px";f.style.width="140px";for(n=0;n<c.length;n++)y=document.createElement("option"),mxUtils.write(y,c[n].displayName),y.value=n,f.appendChild(y),y=document.createElement("option"),y.innerHTML="&nbsp;&nbsp;&nbsp;",
-mxUtils.write(y,"<"+c[n].email+">"),y.setAttribute("disabled","disabled"),f.appendChild(y);y=document.createElement("option");mxUtils.write(y,mxResources.get("addAccount"));y.value=c.length;f.appendChild(y);mxEvent.addListener(f,"change",function(){var l=f.value,m=c.length!=l;m&&b.drive.setUser(c[l]);b.drive.authorize(m,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(t){b.handleError(t,null,function(){b.hideDialog();b.showSplash()})},!0)});x.appendChild(f)}else n(function(){b.drive.logout()})}else b.mode!=
-App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?n(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?n(function(){b.gitLab.logout();var l=document.createElement("form");l.setAttribute("method","post");l.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");l.setAttribute("target","_blank");document.body.appendChild(l);l.submit();l.parentNode.removeChild(l)}):b.mode==App.MODE_TRELLO&&
-null!=b.trello?b.trello.isAuthorized()&&n(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&n(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):n(function(){b.oneDrive.logout()});k.appendChild(x);this.container=k},EmbedDialog=function(b,k,n,d,x,z,y,F,N){d=document.createElement("div");var K=/^https?:\/\//.test(k)||/^mailto:\/\//.test(k);null!=z?mxUtils.write(d,z):mxUtils.write(d,mxResources.get(5E5>k.length?K?"link":"mainEmbedNotice":"preview")+":");
-mxUtils.br(d);z=document.createElement("div");z.style.position="absolute";z.style.top="30px";z.style.right="30px";z.style.color="gray";mxUtils.write(z,b.formatFileSize(k.length));d.appendChild(z);var L=document.createElement("textarea");L.setAttribute("autocomplete","off");L.setAttribute("autocorrect","off");L.setAttribute("autocapitalize","off");L.setAttribute("spellcheck","false");L.style.fontFamily="monospace";L.style.wordBreak="break-all";L.style.marginTop="10px";L.style.resize="none";L.style.height=
-"150px";L.style.width="440px";L.style.border="1px solid gray";L.value=mxResources.get("updatingDocument");d.appendChild(L);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>k.length?(L.value=k,L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)):(L.setAttribute("readonly","true"),L.value=mxResources.get("tooLargeUseDownload"))},0)};z=document.createElement("div");z.style.position="absolute";z.style.bottom="36px";
-z.style.right="32px";y=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!K||navigator.standalone||!(K||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(y=mxUtils.button(null!=F?F:mxResources.get(5E5>k.length?"preview":"openInNewWindow"),function(){var f=5E5>k.length?L.value:k;if(null!=x)x(f);else if(K)try{var l=b.openLink(f);null!=l&&(null==n||0<n)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=l&&null!=l.location.href&&l.location.href.substring(0,
-8)!=f.substring(0,8)&&(l.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(t){}}),n||500)}catch(t){b.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var m=window.open();m=null!=m?m.document:null;null!=m?(m.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==k.substring(0,7)?k:mxUtils.htmlEntities(k))+"</body></html>"),m.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),
-y.className="geBtn",z.appendChild(y));if(!K||7500<k.length)F=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=N?N:"embed.txt","txt",k,"text/plain")}),F.className="geBtn",z.appendChild(F);if(!b.isOffline()&&5E5>k.length){F=mxUtils.button("",function(){try{var f="mailto:?subject="+encodeURIComponent(N||b.defaultFilename)+"&body="+encodeURIComponent(L.value);b.openLink(f)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}});
-var c=document.createElement("img");c.className="geAdaptiveAsset";c.setAttribute("src",Editor.mailImage);c.setAttribute("width","18");c.setAttribute("height","18");c.setAttribute("border","0");c.style.marginBottom="5px";F.appendChild(c);F.style.verticalAlign="bottom";F.style.paddingTop="4px";F.style.minWidth="46px";F.className="geBtn";z.appendChild(F)}F=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});z.appendChild(F);c=mxUtils.button(mxResources.get("copy"),function(){L.focus();
-mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>k.length?mxClient.IS_SF||null!=document.documentMode?F.className="geBtn gePrimaryBtn":(z.appendChild(c),c.className="geBtn gePrimaryBtn",F.className="geBtn"):null!=y&&(z.appendChild(y),F.className="geBtn",y.className="geBtn gePrimaryBtn");d.appendChild(z);this.container=d};EmbedDialog.showPreviewOption=!0;
-var CreateGraphDialog=function(b,k,n){var d=document.createElement("div");d.style.textAlign="right";this.init=function(){var x=document.createElement("div");x.style.position="relative";x.style.border="1px solid gray";x.style.boxSizing="border-box";x.style.width="100%";x.style.height="360px";x.style.overflow="hidden";x.style.marginBottom="16px";mxEvent.disableContextMenu(x);d.appendChild(x);var z=new Graph(x);z.setCellsCloneable(!0);z.setPanning(!0);z.setAllowDanglingEdges(!1);z.connectionHandler.select=
-!1;z.view.setTranslate(20,20);z.border=20;z.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&null!=z.view.getDrawPane()&&(x=z.view.getDrawPane().ownerSVGElement,null!=x&&(x.style.position="absolute"));var y="curved=1;";z.cellRenderer.installCellOverlayListeners=function(m,t,v){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(v.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(B){t.fireEvent(new mxEventObject("pointerdown","event",B,
-"state",m))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(v.node,"touchstart",function(B){t.fireEvent(new mxEventObject("pointerdown","event",B,"state",m))})};z.getAllConnectionConstraints=function(){return null};z.connectionHandler.marker.highlight.keepOnTop=!1;z.connectionHandler.createEdgeState=function(m){m=z.createEdge(null,null,null,null,null,y);return new mxCellState(this.graph.view,m,this.graph.getCellStyle(m))};var F=z.getDefaultParent(),N=mxUtils.bind(this,function(m){var t=
-new mxCellOverlay(this.connectImage,"Add outgoing");t.cursor="hand";t.addListener(mxEvent.CLICK,function(v,B){z.connectionHandler.reset();z.clearSelection();var E=z.getCellGeometry(m),D;c(function(){D=z.insertVertex(F,null,"Entry",E.x,E.y,80,30,"rounded=1;");N(D);z.view.refresh(D);z.insertEdge(F,null,"",m,D,y)},function(){z.scrollCellToVisible(D)})});t.addListener("pointerdown",function(v,B){v=B.getProperty("event");B=B.getProperty("state");z.popupMenuHandler.hideMenu();z.stopEditing(!1);var E=mxUtils.convertPoint(z.container,
-mxEvent.getClientX(v),mxEvent.getClientY(v));z.connectionHandler.start(B,E.x,E.y);z.isMouseDown=!0;z.isMouseTrigger=mxEvent.isMouseEvent(v);mxEvent.consume(v)});z.addCellOverlay(m,t)});z.getModel().beginUpdate();try{var K=z.insertVertex(F,null,"Start",0,0,80,30,"ellipse");N(K)}finally{z.getModel().endUpdate()}if("horizontalTree"==n){var L=new mxCompactTreeLayout(z);L.edgeRouting=!1;L.levelDistance=30;L.sortEdges=!0;y="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==n?(L=new mxCompactTreeLayout(z,
-!1),L.edgeRouting=!1,L.levelDistance=30,L.sortEdges=!0,y="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==n?(L=new mxRadialTreeLayout(z,!1),L.edgeRouting=!1,L.levelDistance=80):"verticalFlow"==n?L=new mxHierarchicalLayout(z,mxConstants.DIRECTION_NORTH):"horizontalFlow"==n?L=new mxHierarchicalLayout(z,mxConstants.DIRECTION_WEST):"circle"==n?L=new mxCircleLayout(z):(L=new mxFastOrganicLayout(z,!1),L.forceConstant=80);if(null!=L){var c=function(m,t){z.getModel().beginUpdate();try{null!=m&&m(),
-L.execute(z.getDefaultParent(),K)}catch(v){throw v;}finally{m=new mxMorphing(z),m.addListener(mxEvent.DONE,mxUtils.bind(this,function(){z.getModel().endUpdate();null!=t&&t()})),m.startAnimation()}},f=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(m,t,v,B,E){f.apply(this,arguments);c()};z.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);c()};z.connectionHandler.addListener(mxEvent.CONNECT,function(){c()})}x=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),
-function(){b.hideDialog()})});x.className="geBtn";b.editor.cancelFirst&&d.appendChild(x);var l=mxUtils.button(mxResources.get("insert"),function(m){z.clearCellOverlays();var t=z.getModel().getChildren(z.getDefaultParent());m=mxEvent.isAltDown(m)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(z.getBoundingBoxFromGeometry(t,!0));t=b.editor.graph.importCells(t,m.x,m.y);m=b.editor.graph.view;var v=m.getBounds(t);null!=v&&(v.x-=m.translate.x,v.y-=m.translate.y,b.editor.graph.scrollRectToVisible(v),
-b.editor.graph.setSelectionCells(t));b.hideDialog()});d.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(x);this.graph=z};this.container=d};
+null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");A=document.createElement("span");A.style.position="absolute";A.style.cursor="pointer";A.style.bottom="27px";A.style.color="gray";A.style.userSelect="none";A.style.textAlign="center";A.style.left="50%";mxUtils.setPrefixedStyle(A.style,"transform","translate(-50%,0)");mxUtils.write(A,mxResources.get("decideLater"));
+v.appendChild(A);mxEvent.addListener(A,"click",function(){b.hideDialog();var c=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=c});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(J.style.padding="7px",J.style.fontSize="9pt",J.style.marginTop="-14px",J.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'+
+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",v.appendChild(J))},5E3);this.container=v},SplashDialog=function(b){var l=document.createElement("div");l.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var n=b.addLanguageMenu(l,!1,"28px");null!=n&&(n.style.bottom="24px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width=
+"32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var v=document.createElement("div");v.style.margin="8px 0px 0px 0px";v.style.padding="18px 0px 24px 0px";n="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",n=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+"/dropbox-logo.svg",n=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",n=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?
+(d.src=IMAGE_PATH+"/github-logo.svg",n=mxResources.get("github")):b.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",n=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",n=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",n=mxResources.get("trello")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",v.style.paddingBottom="10px",v.style.paddingTop="30px",n=mxResources.get("device"));var A=document.createElement("button");
+A.className="geBigButton";A.style.marginBottom="8px";A.style.fontSize="18px";A.style.padding="10px";A.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)v.style.padding="42px 0px 10px 0px",A.style.marginBottom="12px";else{v.style.border="1px solid #d3d3d3";v.style.borderWidth="1px 0px 1px 0px";var z=document.createElement("table"),D=document.createElement("tbody"),P=document.createElement("tr"),J=document.createElement("td"),L=document.createElement("td");z.setAttribute("align",
+"center");J.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,n);L.style.textAlign="left";L.appendChild(d);P.appendChild(J);P.appendChild(L);D.appendChild(P);z.appendChild(D);l.appendChild(z);n=document.createElement("span");n.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0)");mxUtils.write(n,
+mxResources.get("changeStorage"));mxEvent.addListener(n,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});l.appendChild(n)}mxUtils.write(A,mxResources.get("createNewDiagram"));mxEvent.addListener(A,"click",function(){b.hideDialog();b.actions.get("new").funct()});v.appendChild(A);mxUtils.br(v);A=document.createElement("button");A.className="geBigButton";A.style.marginBottom="22px";A.style.fontSize="18px";A.style.padding="10px";A.style.width="340px";mxUtils.write(A,
+mxResources.get("openExistingDiagram"));mxEvent.addListener(A,"click",function(){b.actions.get("open").funct()});v.appendChild(A);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(n=function(k){A.style.marginBottom="24px";var m=document.createElement("a");m.style.display="inline-block";m.style.color="gray";m.style.cursor="pointer";m.style.marginTop="6px";mxUtils.write(m,mxResources.get("signOut"));A.style.marginBottom="16px";v.style.paddingBottom="18px";mxEvent.addListener(m,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){k()})});v.appendChild(m)},b.mode==App.MODE_GOOGLE&&
+null!=b.drive){var c=b.drive.getUsersList();if(0<c.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");A.style.marginBottom="16px";v.style.paddingBottom="18px";v.appendChild(d);var f=document.createElement("select");f.style.marginLeft="4px";f.style.width="140px";for(n=0;n<c.length;n++)z=document.createElement("option"),mxUtils.write(z,c[n].displayName),z.value=n,f.appendChild(z),z=document.createElement("option"),z.innerHTML="&nbsp;&nbsp;&nbsp;",
+mxUtils.write(z,"<"+c[n].email+">"),z.setAttribute("disabled","disabled"),f.appendChild(z);z=document.createElement("option");mxUtils.write(z,mxResources.get("addAccount"));z.value=c.length;f.appendChild(z);mxEvent.addListener(f,"change",function(){var k=f.value,m=c.length!=k;m&&b.drive.setUser(c[k]);b.drive.authorize(m,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(t){b.handleError(t,null,function(){b.hideDialog();b.showSplash()})},!0)});v.appendChild(f)}else n(function(){b.drive.logout()})}else b.mode!=
+App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?n(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?n(function(){b.gitLab.logout();var k=document.createElement("form");k.setAttribute("method","post");k.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");k.setAttribute("target","_blank");document.body.appendChild(k);k.submit();k.parentNode.removeChild(k)}):b.mode==App.MODE_TRELLO&&
+null!=b.trello?b.trello.isAuthorized()&&n(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&n(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):n(function(){b.oneDrive.logout()});l.appendChild(v);this.container=l},EmbedDialog=function(b,l,n,d,v,A,z,D,P){d=document.createElement("div");var J=/^https?:\/\//.test(l)||/^mailto:\/\//.test(l);null!=A?mxUtils.write(d,A):mxUtils.write(d,mxResources.get(5E5>l.length?J?"link":"mainEmbedNotice":"preview")+":");
+mxUtils.br(d);A=document.createElement("div");A.style.position="absolute";A.style.top="30px";A.style.right="30px";A.style.color="gray";mxUtils.write(A,b.formatFileSize(l.length));d.appendChild(A);var L=document.createElement("textarea");L.setAttribute("autocomplete","off");L.setAttribute("autocorrect","off");L.setAttribute("autocapitalize","off");L.setAttribute("spellcheck","false");L.style.fontFamily="monospace";L.style.wordBreak="break-all";L.style.marginTop="10px";L.style.resize="none";L.style.height=
+"150px";L.style.width="440px";L.style.border="1px solid gray";L.value=mxResources.get("updatingDocument");d.appendChild(L);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>l.length?(L.value=l,L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)):(L.setAttribute("readonly","true"),L.value=mxResources.get("tooLargeUseDownload"))},0)};A=document.createElement("div");A.style.position="absolute";A.style.bottom="36px";
+A.style.right="32px";z=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!J||navigator.standalone||!(J||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(z=mxUtils.button(null!=D?D:mxResources.get(5E5>l.length?"preview":"openInNewWindow"),function(){var f=5E5>l.length?L.value:l;if(null!=v)v(f);else if(J)try{var k=b.openLink(f);null!=k&&(null==n||0<n)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=k&&null!=k.location.href&&k.location.href.substring(0,
+8)!=f.substring(0,8)&&(k.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(t){}}),n||500)}catch(t){b.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var m=window.open();m=null!=m?m.document:null;null!=m?(m.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==l.substring(0,7)?l:mxUtils.htmlEntities(l))+"</body></html>"),m.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),
+z.className="geBtn",A.appendChild(z));if(!J||7500<l.length)D=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=P?P:"embed.txt","txt",l,"text/plain")}),D.className="geBtn",A.appendChild(D);if(!b.isOffline()&&5E5>l.length){D=mxUtils.button("",function(){try{var f="mailto:?subject="+encodeURIComponent(P||b.defaultFilename)+"&body="+encodeURIComponent(L.value);b.openLink(f)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}});
+var c=document.createElement("img");c.className="geAdaptiveAsset";c.setAttribute("src",Editor.mailImage);c.setAttribute("width","18");c.setAttribute("height","18");c.setAttribute("border","0");c.style.marginBottom="5px";D.appendChild(c);D.style.verticalAlign="bottom";D.style.paddingTop="4px";D.style.minWidth="46px";D.className="geBtn";A.appendChild(D)}D=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});A.appendChild(D);c=mxUtils.button(mxResources.get("copy"),function(){L.focus();
+mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>l.length?mxClient.IS_SF||null!=document.documentMode?D.className="geBtn gePrimaryBtn":(A.appendChild(c),c.className="geBtn gePrimaryBtn",D.className="geBtn"):null!=z&&(A.appendChild(z),D.className="geBtn",z.className="geBtn gePrimaryBtn");d.appendChild(A);this.container=d};EmbedDialog.showPreviewOption=!0;
+var CreateGraphDialog=function(b,l,n){var d=document.createElement("div");d.style.textAlign="right";this.init=function(){var v=document.createElement("div");v.style.position="relative";v.style.border="1px solid gray";v.style.boxSizing="border-box";v.style.width="100%";v.style.height="360px";v.style.overflow="hidden";v.style.marginBottom="16px";mxEvent.disableContextMenu(v);d.appendChild(v);var A=new Graph(v);A.setCellsCloneable(!0);A.setPanning(!0);A.setAllowDanglingEdges(!1);A.connectionHandler.select=
+!1;A.view.setTranslate(20,20);A.border=20;A.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&null!=A.view.getDrawPane()&&(v=A.view.getDrawPane().ownerSVGElement,null!=v&&(v.style.position="absolute"));var z="curved=1;";A.cellRenderer.installCellOverlayListeners=function(m,t,x){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(x.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(y){t.fireEvent(new mxEventObject("pointerdown","event",y,
+"state",m))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(x.node,"touchstart",function(y){t.fireEvent(new mxEventObject("pointerdown","event",y,"state",m))})};A.getAllConnectionConstraints=function(){return null};A.connectionHandler.marker.highlight.keepOnTop=!1;A.connectionHandler.createEdgeState=function(m){m=A.createEdge(null,null,null,null,null,z);return new mxCellState(this.graph.view,m,this.graph.getCellStyle(m))};var D=A.getDefaultParent(),P=mxUtils.bind(this,function(m){var t=
+new mxCellOverlay(this.connectImage,"Add outgoing");t.cursor="hand";t.addListener(mxEvent.CLICK,function(x,y){A.connectionHandler.reset();A.clearSelection();var F=A.getCellGeometry(m),E;c(function(){E=A.insertVertex(D,null,"Entry",F.x,F.y,80,30,"rounded=1;");P(E);A.view.refresh(E);A.insertEdge(D,null,"",m,E,z)},function(){A.scrollCellToVisible(E)})});t.addListener("pointerdown",function(x,y){x=y.getProperty("event");y=y.getProperty("state");A.popupMenuHandler.hideMenu();A.stopEditing(!1);var F=mxUtils.convertPoint(A.container,
+mxEvent.getClientX(x),mxEvent.getClientY(x));A.connectionHandler.start(y,F.x,F.y);A.isMouseDown=!0;A.isMouseTrigger=mxEvent.isMouseEvent(x);mxEvent.consume(x)});A.addCellOverlay(m,t)});A.getModel().beginUpdate();try{var J=A.insertVertex(D,null,"Start",0,0,80,30,"ellipse");P(J)}finally{A.getModel().endUpdate()}if("horizontalTree"==n){var L=new mxCompactTreeLayout(A);L.edgeRouting=!1;L.levelDistance=30;L.sortEdges=!0;z="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==n?(L=new mxCompactTreeLayout(A,
+!1),L.edgeRouting=!1,L.levelDistance=30,L.sortEdges=!0,z="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==n?(L=new mxRadialTreeLayout(A,!1),L.edgeRouting=!1,L.levelDistance=80):"verticalFlow"==n?L=new mxHierarchicalLayout(A,mxConstants.DIRECTION_NORTH):"horizontalFlow"==n?L=new mxHierarchicalLayout(A,mxConstants.DIRECTION_WEST):"circle"==n?L=new mxCircleLayout(A):(L=new mxFastOrganicLayout(A,!1),L.forceConstant=80);if(null!=L){var c=function(m,t){A.getModel().beginUpdate();try{null!=m&&m(),
+L.execute(A.getDefaultParent(),J)}catch(x){throw x;}finally{m=new mxMorphing(A),m.addListener(mxEvent.DONE,mxUtils.bind(this,function(){A.getModel().endUpdate();null!=t&&t()})),m.startAnimation()}},f=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(m,t,x,y,F){f.apply(this,arguments);c()};A.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);c()};A.connectionHandler.addListener(mxEvent.CONNECT,function(){c()})}v=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),
+function(){b.hideDialog()})});v.className="geBtn";b.editor.cancelFirst&&d.appendChild(v);var k=mxUtils.button(mxResources.get("insert"),function(m){A.clearCellOverlays();var t=A.getModel().getChildren(A.getDefaultParent());m=mxEvent.isAltDown(m)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(A.getBoundingBoxFromGeometry(t,!0));t=b.editor.graph.importCells(t,m.x,m.y);m=b.editor.graph.view;var x=m.getBounds(t);null!=x&&(x.x-=m.translate.x,x.y-=m.translate.y,b.editor.graph.scrollRectToVisible(x),
+b.editor.graph.setSelectionCells(t));b.hideDialog()});d.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(v);this.graph=A};this.container=d};
CreateGraphDialog.prototype.connectImage=new mxImage("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==",26,
26);
-var BackgroundImageDialog=function(b,k,n,d,x){function z(){null==u||u==mxConstants.NONE?(q.style.display="none",T.checked=!1):(q.style.backgroundColor=u,q.style.display="",T.checked=!0)}var y=b.editor.graph,F=document.createElement("div");F.style.whiteSpace="nowrap";var N=document.createElement("h2");mxUtils.write(N,mxResources.get("background"));N.style.marginTop="0px";F.appendChild(N);var K=null!=n&&null!=n.originalSrc;N=!1;var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value",
-"url");L.setAttribute("type","radio");L.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geBackgroundImageDialogOption");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginBottom="8px";f.style.width="360px";f.value=K||null==n?"":n.src;var l=document.createElement("select");l.style.width="360px";
-if(null!=b.pages)for(var m=0;m<b.pages.length;m++){var t=document.createElement("option");mxUtils.write(t,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1]));t.setAttribute("value","data:page/id,"+b.pages[m].getId());b.pages[m]==b.currentPage&&t.setAttribute("disabled","disabled");null!=n&&n.originalSrc==t.getAttribute("value")&&(t.setAttribute("selected","selected"),N=!0);l.appendChild(t)}K||null!=b.pages&&1!=b.pages.length||(L.style.display="none",c.style.display="none",l.style.display=
-"none");var v=document.createElement("option"),B=!1,E=!1,D=function(G,H){B||null!=G&&E||(c.checked?null!=H&&H(v.selected?null:l.value):""==f.value||b.isOffline()?(S.value="",R.value="",null!=H&&H("")):(f.value=mxUtils.trim(f.value),b.loadImage(f.value,function(g){S.value=g.width;R.value=g.height;null!=H&&H(f.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));S.value="";R.value="";null!=H&&H(null)})))},A=mxUtils.bind(this,function(G){b.importFiles(G,
-0,0,b.maxBackgroundSize,function(H,g,p,C,I,M){f.value=H;D();f.focus()},function(){},function(H){return"image/"==H.type.substring(0,6)},function(H){for(var g=0;g<H.length;g++)H[g]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){K?l.focus():f.focus();mxEvent.addListener(l,"focus",function(){L.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(f,"focus",function(){c.removeAttribute("checked");L.setAttribute("checked","checked");
-L.checked=!0});if(Graph.fileSupport){f.setAttribute("placeholder",mxResources.get("dragImagesHere"));var G=F.parentNode,H=null;mxEvent.addListener(G,"dragleave",function(g){null!=H&&(H.parentNode.removeChild(H),H=null);g.stopPropagation();g.preventDefault()});mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(g){null==H&&(H=b.highlightElement(G));g.stopPropagation();g.preventDefault()}));mxEvent.addListener(G,"drop",mxUtils.bind(this,function(g){null!=H&&(H.parentNode.removeChild(H),H=null);
-if(0<g.dataTransfer.files.length)A(g.dataTransfer.files);else if(0<=mxUtils.indexOf(g.dataTransfer.types,"text/uri-list")){var p=g.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(p)&&(f.value=decodeURIComponent(p),D())}g.stopPropagation();g.preventDefault()}),!1)}};F.appendChild(L);F.appendChild(f);mxUtils.br(F);m=document.createElement("span");m.style.marginLeft="30px";mxUtils.write(m,mxResources.get("width")+":");F.appendChild(m);var S=document.createElement("input");
-S.setAttribute("type","text");S.style.width="60px";S.style.marginLeft="8px";S.style.marginRight="16px";S.value=null==n||K?"":n.width;F.appendChild(S);mxUtils.write(F,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==n||K?"":n.height;F.appendChild(R);mxUtils.br(F);mxUtils.br(F);mxEvent.addListener(f,"change",D);ImageDialog.filePicked=function(G){G.action==google.picker.Action.PICKED&&
-null!=G.docs[0].thumbnails&&(G=G.docs[0].thumbnails[G.docs[0].thumbnails.length-1],null!=G&&(f.value=G.url,D()));f.focus()};F.appendChild(c);F.appendChild(l);mxUtils.br(F);mxUtils.br(F);K?(c.setAttribute("checked","checked"),c.checked=!0):(L.setAttribute("checked","checked"),L.checked=!0);!N&&c.checked&&(mxUtils.write(v,mxResources.get("pageNotFound")),v.setAttribute("disabled","disabled"),v.setAttribute("selected","selected"),v.setAttribute("value","pageNotFound"),l.appendChild(v),mxEvent.addListener(l,
-"change",function(){null==v.parentNode||v.selected||v.parentNode.removeChild(v)}));n=document.createElement("div");n.style.display=x?"inline-flex":"none";n.style.alignItems="center";n.style.cursor="default";n.style.minWidth="40%";n.style.height="20px";var T=document.createElement("input");T.setAttribute("type","checkbox");T.style.margin="0px 10px 0px 4px";T.style.verticalAlign="bottom";T.defaultChecked=d!=mxConstants.NONE&&null!=d;T.checked=T.defaultChecked;n.appendChild(T);mxUtils.write(n,mxResources.get("fillColor"));
-x=n.cloneNode(!1);var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px 10px 0px 30px";P.style.verticalAlign="bottom";P.defaultChecked=y.shadowVisible;P.checked=P.defaultChecked;x.appendChild(P);mxUtils.write(x,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||P.setAttribute("disabled","disabled");mxEvent.addListener(x,"click",function(G){mxEvent.getSource(G)!=P&&(P.checked=!P.checked)});var q=document.createElement("button");q.style.width="36px";q.style.height=
-"18px";q.style.cursor="pointer";q.style.marginLeft="10px";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";q.style.verticalAlign="bottom";q.className="geColorBtn";var u=d;z();mxEvent.addListener(n,"click",function(G){mxEvent.getSource(G)!=T&&(T.checked=!T.checked);u=T.checked?"#ffffff":null;z()});mxEvent.addListener(q,"click",function(G){b.pickColor(u||"none",function(H){u=H;z()});mxEvent.consume(G)});n.appendChild(q);F.appendChild(n);F.appendChild(x);mxUtils.br(F);
-d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";y=mxUtils.button(mxResources.get("cancel"),function(){B=!0;b.hideDialog()});y.className="geBtn";b.editor.cancelFirst&&d.appendChild(y);x=mxUtils.button(mxResources.get("reset"),function(){f.value="";S.value="";R.value="";L.checked=!0;u=mxConstants.NONE;z();B=!1});mxEvent.addGestureListeners(x,function(){B=!0});x.className="geBtn";x.width="100";d.appendChild(x);if(Graph.fileSupport){var J=document.createElement("input");
-J.setAttribute("multiple","multiple");J.setAttribute("type","file");mxEvent.addListener(J,"change",function(G){null!=J.files&&(A(J.files),J.type="",J.type="file",J.value="")});J.style.display="none";F.appendChild(J);x=mxUtils.button(mxResources.get("open"),function(){J.click()});x.className="geBtn";d.appendChild(x)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();D(null,function(G){k(""!=G&&null!=G?new mxImage(G,S.value,R.value):null,null==G,u,!mxClient.IS_SVG||mxClient.IS_SF?
-null:P.checked)})});mxEvent.addGestureListeners(applyBtn,function(){E=!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(y);F.appendChild(d);this.container=F},ParseDialog=function(b,k,n){function d(l,m,t){var v=l.split("\n");if("plantUmlPng"==m||"plantUmlSvg"==m||"plantUmlTxt"==m){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var B=function(p,C,I,M,O){z=mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(new mxRectangle(0,0,M,O));var Q=
-null;E.getModel().beginUpdate();try{Q="txt"==C?b.insertAsPreText(I,z.x,z.y):E.insertVertex(null,null,null,z.x,z.y,M,O,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(I)+";"),E.setAttributeForCell(Q,"plantUmlData",JSON.stringify({data:p,format:C},null,2))}finally{E.getModel().endUpdate()}null!=Q&&(E.setSelectionCell(Q),E.scrollCellToVisible(Q))},E=b.editor.graph,D="plantUmlTxt"==m?"txt":"plantUmlPng"==m?"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"==
-l&&"svg"==D?window.setTimeout(function(){b.spinner.stop();B(l,D,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(l,D,function(p,C,I){b.spinner.stop();B(l,D,p,C,I)},function(p){b.handleError(p)})}}else if("mermaid"==m||"mermaid2drawio"==m){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var A=0;A<v.length&&(0==v[A].trim().length||"%%"==v[A].substring(0,2));)A++;if("---"==v[A].trim()){do A++;while(A<v.length&&"---"!=v[A].trim());A++}A=v[A].trim().toLowerCase();v=A.indexOf(" ");A=A.substring(0,0<v?v:A.length);var S="undefined"!==typeof mxMermaidToDrawio&&
-"mermaid2drawio"==m&&("graph"==A||"flowchart"==A||"sequencediagram"==A||"classdiagram"==A||"statediagram-v2"==A||"statediagram"==A||"erdiagram"==A||"requirementdiagram"==A||"gitgraph"==A||"mindmap"==A||"journey"==A);E=b.editor.graph;S&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(p){b.spinner.stop();E.setSelectionCells(b.importXml(p,Math.max(z.x,20),Math.max(z.y,20),!0,null,null,!0));E.scrollCellToVisible(E.getSelectionCell())}));b.generateMermaidImage(l,null,function(p,C,I){if(!S){z=
-mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(new mxRectangle(0,0,C,I));b.spinner.stop();var M=null;E.getModel().beginUpdate();try{M=E.insertVertex(null,null,null,z.x,z.y,C,I,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+p+";"),E.setAttributeForCell(M,"mermaidData",JSON.stringify({data:l},null,2))}finally{E.getModel().endUpdate()}null!=M&&(E.setSelectionCell(M),E.scrollCellToVisible(M))}},function(p){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(p)})}}else if("table"==
-m){m=null;var R=[],T=0,P={};for(A=0;A<v.length;A++){var q=mxUtils.trim(v[A]);if("primary key"==q.substring(0,11).toLowerCase()){var u=q.match(/\((.+)\)/);u&&u[1]&&(P[u[1]]=!0);v.splice(A,1)}else 0<q.toLowerCase().indexOf("primary key")&&(P[q.split(" ")[0]]=!0,v[A]=mxUtils.trim(q.replace(/primary key/i,"")))}for(A=0;A<v.length;A++)if(q=mxUtils.trim(v[A]),"create table"==q.substring(0,12).toLowerCase())q=mxUtils.trim(q.substring(12)),"("==q.charAt(q.length-1)&&(q=mxUtils.trim(q.substring(0,q.length-
-1))),m=new mxCell(q,new mxGeometry(T,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),m.vertex=!0,R.push(m),q=b.editor.graph.getPreferredSizeForCell(J),null!=q&&(m.geometry.width=q.width+10);else if(null!=m&&")"==q.charAt(0))T+=m.geometry.width+40,m=null;else if("("!=q&&null!=m){q=q.substring(0,","==q.charAt(q.length-1)?q.length-1:q.length);u=P[q.split(" ")[0]];var J=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;strokeColor=inherit;top=0;left=0;right=0;bottom="+(u?"1":"0")+";");J.vertex=!0;var G=new mxCell(u?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(u?"fontStyle=1;":""));G.vertex=!0;J.insert(G);q=new mxCell(q,new mxGeometry(30,
-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(u?"fontStyle=5;":""));q.vertex=!0;J.insert(q);q=b.editor.graph.getPreferredSizeForCell(q);null!=q&&m.geometry.width<q.width+30&&(m.geometry.width=Math.min(320,Math.max(m.geometry.width,q.width+30)));m.insert(J,u?0:null);m.geometry.height+=30}0<R.length&&(E=b.editor.graph,z=mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(R,
-!0)),E.setSelectionCells(E.importCells(R,z.x,z.y)),E.scrollCellToVisible(E.getSelectionCell()))}else if("list"==m){if(0<v.length){E=b.editor.graph;m=null;R=[];for(A=J=0;A<v.length;A++)";"!=v[A].charAt(0)&&(0==v[A].length?m=null:null==m?(m=new mxCell(v[A],new mxGeometry(J,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),m.vertex=!0,R.push(m),q=E.getPreferredSizeForCell(m),
-null!=q&&m.geometry.width<q.width+10&&(m.geometry.width=q.width+10),J+=m.geometry.width+40):"--"==v[A]?(q=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),q.vertex=!0,m.geometry.height+=q.geometry.height,m.insert(q)):0<v[A].length&&(T=new mxCell(v[A],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-T.vertex=!0,q=E.getPreferredSizeForCell(T),null!=q&&T.geometry.width<q.width&&(T.geometry.width=q.width),m.geometry.width=Math.max(m.geometry.width,T.geometry.width),m.geometry.height+=T.geometry.height,m.insert(T)));if(0<R.length){z=mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(R,!0));E.getModel().beginUpdate();try{R=E.importCells(R,z.x,z.y);q=[];for(A=0;A<R.length;A++)q.push(R[A]),q=q.concat(R[A].children);E.fireEvent(new mxEventObject("cellsInserted","cells",q))}finally{E.getModel().endUpdate()}E.setSelectionCells(R);
-E.scrollCellToVisible(E.getSelectionCell())}}}else{J=function(p){var C=H[p];null==C&&(C=new mxCell(p,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),C.vertex=!0,H[p]=C,R.push(C));return C};var H={};R=[];for(A=0;A<v.length;A++)if(";"!=v[A].charAt(0)){var g=v[A].split("->");2<=g.length&&(u=J(g[0]),G=J(g[g.length-1]),g=new mxCell(2<g.length?g[1]:"",new mxGeometry),g.edge=!0,g.geometry.relative=!0,u.insertEdge(g,!0),G.insertEdge(g,!1),R.push(g))}if(0<R.length){v=document.createElement("div");v.style.visibility=
-"hidden";document.body.appendChild(v);E=new Graph(v);E.getModel().beginUpdate();try{R=E.importCells(R);for(A=0;A<R.length;A++)E.getModel().isVertex(R[A])&&(q=E.getPreferredSizeForCell(R[A]),R[A].geometry.width=Math.max(R[A].geometry.width,q.width),R[A].geometry.height=Math.max(R[A].geometry.height,q.height));A=!0;"horizontalFlow"==m||"verticalFlow"==m?((new mxHierarchicalLayout(E,"horizontalFlow"==m?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(E.getDefaultParent(),R),A=!1):"circle"==
-m?(new mxCircleLayout(E)).execute(E.getDefaultParent()):(T=new mxFastOrganicLayout(E),T.disableEdgeStyle=!1,T.forceConstant=180,T.execute(E.getDefaultParent()));A&&(P=new mxParallelEdgeLayout(E),P.spacing=30,P.execute(E.getDefaultParent()))}finally{E.getModel().endUpdate()}E.clearCellOverlays();q=[];b.editor.graph.getModel().beginUpdate();try{R=E.getModel().getChildren(E.getDefaultParent()),z=mxEvent.isAltDown(t)?z:b.editor.graph.getCenterInsertPoint(E.getBoundingBoxFromGeometry(R,!0)),q=b.editor.graph.importCells(R,
-z.x,z.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",q))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(q);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());E.destroy();v.parentNode.removeChild(v)}}}function x(){return"list"==F.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==F.value||
-"mermaid2drawio"==F.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==F.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==F.value?"@startuml\nskinparam backgroundcolor transparent\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":
-"plantUmlSvg"==F.value||"plantUmlTxt"==F.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var z=b.editor.graph.getFreeInsertPoint();k=document.createElement("div");var y=document.createElement("textarea");y.style.position="absolute";y.style.left="30px";y.style.right="30px";y.style.top=
-"30px";y.style.bottom="100px";y.style.resize="none";y.setAttribute("wrap","off");y.setAttribute("spellcheck","false");y.setAttribute("autocorrect","off");y.setAttribute("autocomplete","off");y.setAttribute("autocapitalize","off");var F=document.createElement("select");F.className="geBtn";if("formatSql"==n||"mermaid"==n&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())F.style.display="none";var N=document.createElement("option");N.setAttribute("value","list");mxUtils.write(N,mxResources.get("list"));
-"plantUml"!=n&&"mermaid"!=n&&F.appendChild(N);null!=n&&"fromText"!=n||N.setAttribute("selected","selected");N=document.createElement("option");N.setAttribute("value","table");mxUtils.write(N,mxResources.get("formatSql"));"formatSql"==n&&(F.appendChild(N),N.setAttribute("selected","selected"));N=document.createElement("option");N.setAttribute("value","mermaid");mxUtils.write(N,mxResources.get("image"));if("mermaid"==n){if("undefined"!==typeof mxMermaidToDrawio){var K=document.createElement("option");
-K.setAttribute("value","mermaid2drawio");K.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("diagram"));F.appendChild(K)}else F.style.display="none";F.appendChild(N)}N=document.createElement("option");N.setAttribute("value","diagram");mxUtils.write(N,mxResources.get("diagram"));K=document.createElement("option");K.setAttribute("value","circle");mxUtils.write(K,mxResources.get("circle"));var L=document.createElement("option");L.setAttribute("value","horizontalFlow");mxUtils.write(L,
-mxResources.get("horizontalFlow"));var c=document.createElement("option");c.setAttribute("value","verticalFlow");mxUtils.write(c,mxResources.get("verticalFlow"));"plantUml"!=n&&"mermaid"!=n&&(F.appendChild(N),F.appendChild(K),F.appendChild(L),F.appendChild(c));N=document.createElement("option");N.setAttribute("value","plantUmlSvg");mxUtils.write(N,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==n&&N.setAttribute("selected","selected");K=document.createElement("option");
-K.setAttribute("value","plantUmlPng");mxUtils.write(K,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");L=document.createElement("option");L.setAttribute("value","plantUmlTxt");mxUtils.write(L,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==n&&(F.appendChild(N),F.appendChild(K),F.appendChild(L));var f=x();y.value=f;k.appendChild(y);N=document.createElement("div");N.style.position="absolute";N.style.bottom=
-"46px";N.style.right="30px";N.style.left="30px";N.style.justifyContent="end";N.style.display="flex";this.init=function(){y.focus()};Graph.fileSupport&&(y.addEventListener("dragover",function(l){l.stopPropagation();l.preventDefault()},!1),y.addEventListener("drop",function(l){l.stopPropagation();l.preventDefault();if(0<l.dataTransfer.files.length){l=l.dataTransfer.files[0];var m=new FileReader;m.onload=function(t){y.value=t.target.result};m.readAsText(l)}},!1));"plantUml"==n&&"https://plant-aws.diagrams.net"==
-window.PLANT_URL&&(K=document.createElement("div"),K.style.display="inline-block",K.style.color="#c00",K.style.fontSize="12px",K.style.marginRight="10px",K.style.display="flex",K.style.alignItems="center",K.innerHTML='<a href="https://github.com/jgraph/drawio/discussions/5074" target="_blank" rel="noopener noreferrer" style="color: #c00; text-decoration: underline;">PlantUML is deprecated</a>',N.appendChild(K));b.isOffline()&&!mxClient.IS_CHROMEAPP||"mermaid"!=n&&"plantUml"!=n||N.appendChild(b.createHelpIcon("mermaid"==
-n?"https://mermaid.js.org/intro/":"https://plantuml.com/"));N.appendChild(F);mxEvent.addListener(F,"change",function(){var l=x();if(0==y.value.length||y.value==f)f=l,y.value=f});n=mxUtils.button(mxResources.get("close"),function(){y.value==f?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});n.className="geBtn";b.editor.cancelFirst&&N.appendChild(n);K=mxUtils.button(mxResources.get("insert"),function(l){try{b.hideDialog(),d(y.value,F.value,l)}catch(m){b.handleError(m)}});
-K.className="geBtn gePrimaryBtn";N.appendChild(K);b.editor.cancelFirst||N.appendChild(n);k.appendChild(N);this.container=k},NewDialog=function(b,k,n,d,x,z,y,F,N,K,L,c,f,l,m,t,v,B,E,D){function A(ma){null!=ma&&(Xa=qb=ma?135:140);ma=!0;if(null!=lb)for(;X<lb.length&&(ma||0!=mxUtils.mod(X,30));){var va=lb[X++];va=G(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,va.type);ma&&va.click();ma=!1}}function S(ma,va,oa,qa,ta,xa){if(null!=
-ma&&mxUtils.isAncestorNode(document.body,qa)){ma=mxUtils.parseXml(ma);ma=Editor.parseDiagramNode(ma.documentElement,null,!0);var Ma=new mxCodec(ma.ownerDocument),Na=new mxGraphModel;Ma.decode(ma,Na);b.sidebar.createTooltip(qa,Na.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=ta?mxResources.get(ta):null,!0,new mxPoint(va,
-oa),!0,function(){ea=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=xa&&P(qa,null,null,xa,infoObj,clibs)},!0,!1)}}function R(){var ma=document.createElement("div");ma.style.position="absolute";ma.style.overflow="visible";ma.style.left="8px";ma.style.right="8px";ma.style.bottom="8px";ma.style.top="8px";mxUtils.write(ma,mxResources.get("describeYourDiagram")+":");mxUtils.br(ma);var va=document.createElement("input");va.setAttribute("type","text");va.setAttribute("placeholder",
-mxResources.get("processForHiringNewEmployee"));va.style.width="100%";va.style.marginTop="6px";va.style.marginBottom="4px";va.style.boxSizing="border-box";ma.appendChild(va);ma.init=function(){va.focus()};mxUtils.br(ma);var oa=document.createElement("div");oa.style.top="86px";oa.style.left="0";oa.style.right="0";oa.style.bottom="0";oa.style.margin="0";oa.style.borderRadius="0";oa.style.width="auto";oa.style.height="auto";oa.style.position="absolute";oa.style.border="1px solid #424242";oa.className=
-"geTemplate";var qa=document.createElement("div");qa.style.boxSizing="border-box";qa.style.position="absolute";qa.style.fontSize="14px";qa.style.textAlign="center";qa.style.top="50%";mxUtils.write(qa,mxResources.get("blankDiagram"));oa.appendChild(qa);var ta=document.createElement("select");ta.className="geBtn";ta.style.maxWidth="160px";ta.style.marginLeft="0px";qa=document.createElement("option");mxUtils.write(qa,mxResources.get("diagramType"));qa.setAttribute("value","");ta.appendChild(qa);for(var xa=
-0;xa<EditorUi.mermaidDiagramTypes.length;xa++){qa=document.createElement("option");var Ma=EditorUi.mermaidDiagramTypes[xa],Na=Ma;Ma==urlParams["smart-template-type"]&&qa.setAttribute("selected","selected");"erDiagram"==Na&&(Na="entityRelationshipDiagram");Na=mxResources.get(Na,null,Na.charAt(0).toUpperCase()+Na.substring(1).replace(/[A-Z]/g," $&"));qa.setAttribute("value",Ma);mxUtils.write(qa,Na);ta.appendChild(qa)}var Qa=mxUtils.button(mxResources.get("generate"),function(){var Ya=va.value,Ua=ta.value.replace(/([A-Z])/g,
-" $1").toLowerCase(),ib="Write the declaration code for a detailed and complex "+(""!=Ua?Ua:"graph")+' that shows "'+(""!=Ya?Ya:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Ua=""!=ta.value?" ("+mxUtils.trim(mxUtils.getTextContent(ta.options[ta.selectedIndex]))+")":"";var Ra="gantt"==ta.value||"pie"==ta.value||"timeline"==ta.value||"quadrantchart"==ta.value||"c4context"==ta.value,Za=va.value+Ua;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,
-function(Ea){Ra||(Fa=ra=Ea,Pa="Smart Template: "+Za)}));b.spinner.spin(oa,mxResources.get("generate")+" '"+Ya+"'")&&b.generateOpenAiMermaidDiagram(ib,function(Ea,mb,eb,vb){b.spinner.stop();oa.innerHTML="";var nb=document.createElement("img");nb.setAttribute("title",mxResources.get("preview"));nb.src="data:image/svg+xml;base64,"+mb.substring(mb.indexOf(",")+1);nb.style.cursor="pointer";nb.style.width="95%";nb.style.height="95%";oa.appendChild(nb);Ea=b.createMermaidXml(Ea,EditorUi.defaultMermaidConfig,
-mb,eb,vb,Za);var xb="<mxfile><diagram>"+Graph.compress(Ea)+"</diagram></mxfile>";if(Ra||"undefined"===typeof mxMermaidToDrawio)Fa=ra=Ea;Ea=Z.cloneNode(!0);oa.appendChild(Ea);mb=function(Ta){ea=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};eb=function(Ta){ea||S(xb,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),nb,Za)};mxEvent.addGestureListeners(nb,mb,null,eb);mxEvent.addGestureListeners(Ea,mb,null,eb)},function(Ea){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();
-b.handleError(Ea)})});Qa.setAttribute("disabled","disabled");Qa.className="geBtn gePrimaryBtn";qa=function(){window.setTimeout(function(){""!=va.value?Qa.removeAttribute("disabled"):Qa.setAttribute("disabled","disabled")},0)};xa=null!=E?E:urlParams["smart-template"];null!=xa&&"1"!=xa&&(va.value=decodeURIComponent(xa),qa(),""==xa||null==E&&"1"!=urlParams["smart-template-generate"]||window.setTimeout(function(){Qa.click()},0));mxEvent.addListener(va,"change",qa);mxEvent.addListener(va,"keydown",qa);
-mxEvent.addListener(va,"cut",qa);mxEvent.addListener(va,"paste",qa);mxEvent.addListener(va,"keydown",function(Ya){13==Ya.keyCode&&Qa.click()});qa=document.createElement("div");qa.style.height="40px";qa.style.marginTop="4px";qa.style.marginBottom="4px";qa.style.whiteSpace="nowrap";qa.style.overflowX="auto";qa.style.overflowY="hidden";qa.appendChild(ta);qa.appendChild(Qa);ma.appendChild(qa);ma.appendChild(oa);return ma}function T(){if(ya==bb&&null==ra&&null!=jb&&null!=$a)d&&b.spinner.spin(document.body,
-mxResources.get("generate")+" '"+$a.value+"'")&&(p=!0,b.hideDialog()),jb.click();else if(p&&b.spinner.stop(),Ca&&null!=l)n||p||b.hideDialog(),l(Ca,Ba,Q.value);else if(d)n||p||b.hideDialog(),d(ra,Q.value,Ha,na);else{var ma=Q.value;if(null!=ma&&0<ma.length){var va=function(qa,ta,xa){b.createFile(xa,ra,null!=na&&0<na.length?na:null,qa,function(){p||b.hideDialog()},null,ta,null,null!=za&&0<za.length?za:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var oa=new SaveDialog(b,ma,mxUtils.bind(this,
-function(qa,ta,xa){va(ta,xa,qa.value)}),null,null,null,null,b.mode);b.showDialog(oa.container,420,150,!0,!1);oa.init()}else b.pickFolder(b.mode,function(qa){va(b.mode,qa,ma)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function P(ma,va,oa,qa,ta,xa,Ma){return ya!=ma?(null!=ya&&(ya.classList.remove("geTemplateSelected"),ya==bb&&(Va.style.display="none",fb.style.display="",La.style.visibility="hidden",Sa.style.visibility=null!=Fa?"visible":"hidden")),ma==bb&&(va=Fa,null!=
-va?(Sa.style.visibility="visible",Sa.style.visibility=null!=Fa?"visible":"hidden",La.style.visibility="visible"):(Va.style.display="",La.style.visibility="hidden",Sa.style.visibility="hidden")),Y.removeAttribute("disabled"),ra=va,na=oa,za=xa,ya=ma,Ca=qa,Ha=Ma,Ba=ta,ya.classList.add("geTemplateSelected"),!0):!1}function q(){Va.style.display="";fb.style.display="none";La.style.visibility="hidden";Sa.style.visibility="hidden";$a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?$a.select():
-document.execCommand("selectAll",!1,null)}function u(){fb.style.backgroundImage=rb;fb.style.backgroundSize="contain";Va.style.display="none";fb.style.display="";La.style.visibility="visible";Sa.style.visibility="visible"}function J(ma){if(!ob){ob=!0;var va=mxUtils.trim($a.value);ma||""==va?null!=Pa&&($a.value=Pa,u()):(fb.style.backgroundImage="url("+Editor.spinImage+")",fb.style.backgroundSize="12px 12px",fb.style.display="",Va.style.display="none",b.generateDiagram(va,mxUtils.bind(this,function(oa,
-qa){ob=!1;ya==bb&&"none"==Va.style.display&&(rb="url(data:image/svg+xml;base64,"+qa.substring(qa.indexOf(",")+1)+")",bb.setAttribute("title",va),Sa.style.display="",Fa=ra=oa,Pa=va,u(),p&&T())}),mxUtils.bind(this,function(oa){ob=!1;ya==bb&&(Va.style.display="",fb.style.display="none",La.style.visibility="hidden",Sa.style.visibility="hidden",b.handleError(oa))})))}}function G(ma,va,oa,qa,ta,xa,Ma,Na,Qa,Ya,Ua,ib){function Ra(Ta,tb){null==mb?(eb=Ta,eb=/^https?:\/\//.test(eb)?b.editor.isCorsEnabledForUrl(eb)?
-eb:PROXY_URL+"?url="+encodeURIComponent(eb):TEMPLATE_PATH+"/"+eb,mxUtils.get(eb,mxUtils.bind(this,function(ub){200<=ub.getStatus()&&299>=ub.getStatus()&&(mb=ub.getText());tb(mb,eb)}))):tb(mb,eb)}function Za(Ta,tb){if(null==ma||aa||b.sidebar.currentElt==Ea)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=ha){var ub="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+ha.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+
-ha.naturalWidth+'" height="'+ha.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";S(ub,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),oa,ma)}else b.sidebar.currentElt=Ea,aa=!0,Ra(ma,function(Db){if(aa&&b.sidebar.currentElt==Ea)try{S(Db,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),Ea,tb)}catch(Eb){b.sidebar.currentElt=null,b.handleError(Eb)}aa=!1})}var Ea=null;if("generative"!=ib||null==bb){Ea=document.createElement("div");Ea.className="geTemplate";var mb=null,
-eb=ma;null!=oa?Ea.setAttribute("title",mxResources.get(oa,null,oa)):null!=qa&&0<qa.length&&Ea.setAttribute("title",qa)}else Ea=bb;var vb=document.createElement("span");vb.className="geAdaptiveAsset";mxUtils.write(vb,mxResources.get(oa,null,oa));if(null!=xa){Ea.style.display="inline-flex";Ea.style.justifyContent="center";Ea.style.alignItems="center";Qa=document.createElement("img");Qa.setAttribute("src",xa);Qa.setAttribute("alt",qa);Qa.style.maxWidth=Xa+"px";Qa.style.maxHeight=qb+"px";ha=Qa;var nb=
-xa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ea.appendChild(Qa);Qa.onerror=function(){this.src!=nb?this.src=nb:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ea,mxUtils.bind(this,function(Ta){P(Ea,null,null,ma,Ma,Ua)}),null,null);mxEvent.addListener(Ea,"dblclick",function(Ta){T();mxEvent.consume(Ta)})}else if(!Ya&&null!=ma&&0<ma.length){var xb=function(Ta){W.spin(Aa)&&Ra(ma,function(tb,ub){W.stop();null!=tb&&(P(Ea,tb,va,null,null,Ua,ub),Ta&&T())})};
-xa=Qa||TEMPLATE_PATH+"/"+ma.substring(0,ma.length-4)+".png";Qa=fb.cloneNode(!1);Qa.style.backgroundImage="url("+xa+")";Qa.style.display="";Ea.appendChild(Qa);null!=oa&&Ea.appendChild(vb);mxEvent.addGestureListeners(Ea,mxUtils.bind(this,function(Ta){xb()}),null,null);mxEvent.addListener(Ea,"dblclick",function(Ta){xb(!0);mxEvent.consume(Ta)})}else Ea.appendChild(vb),"generative"==ib&&null==bb&&(Ea.appendChild(fb),Ea.appendChild(Va),Ea.appendChild(Sa),Ea.appendChild(La),bb=Ea),ta&&P(Ea),null!=Na?(mxEvent.addGestureListeners(Ea,
-null,null,mxUtils.bind(this,function(Ta){P(Ea,null,null,ma,Ma)})),mxEvent.addListener(Ea,"click",Na)):(mxEvent.addListener(Ea,"click",function(Ta){P(Ea,null,null,ma,Ma)&&"generative"==ib&&null==Fa&&q()}),mxEvent.addListener(Ea,"dblclick",function(Ta){"generative"!=ib?T():"none"==Va.style.display&&q();mxEvent.consume(Ta)}));null!=ma&&(xa=Z.cloneNode(!0),Ea.appendChild(xa),mxEvent.addGestureListeners(xa,mxUtils.bind(this,function(Ta){ea=b.sidebar.currentElt==Ea}),null,null),mxEvent.addListener(xa,"click",
-mxUtils.bind(this,function(Ta){ea||Za(Ta,null!=oa?oa:qa);mxEvent.consume(Ta)})));Aa.appendChild(Ea);return Ea}function H(){function ma(Ra,Za){Ra=mxResources.get(Ra,null,Ra.substring(0,1).toUpperCase()+Ra.substring(1));18<Ra.length&&(Ra=Ra.substring(0,18)+"&hellip;");return Ra+(null!=Za?" ("+Za.length+")":"")}function va(Ra,Za,Ea){mxEvent.addListener(Za,"click",function(){cb!=Za&&(null!=cb&&(cb.style.backgroundColor=""),cb=Za,cb.style.backgroundColor=y,Aa.scrollTop=0,Aa.innerText="",X=0,null!=Ja[Ra].content?
-(Aa.appendChild(Ja[Ra].content),ra=Fa,lb=null,null!=Ja[Ra].content.init&&Ja[Ra].content.init()):(lb=Ea?Wa[Ra][Ea]:Ja[Ra],ia=null,A(!1)))});"smartTemplate"!=Ra||null==E&&null==urlParams["smart-template"]||Za.click()}pb&&(pb=!1,mxEvent.addListener(Aa,"scroll",function(Ra){Aa.scrollTop+Aa.clientHeight>=Aa.scrollHeight&&(A(),mxEvent.consume(Ra))}));if(0<ab){var oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(oa,
-mxResources.get("custom"));Ka.appendChild(oa);for(var qa in gb){var ta=document.createElement("div");oa=qa;var xa=gb[qa];18<oa.length&&(oa=oa.substring(0,18)+"&hellip;");ta.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ta.setAttribute("title",oa+" ("+xa.length+")");mxUtils.write(ta,ta.getAttribute("title"));null!=K&&(ta.style.padding=K);Ka.appendChild(ta);(function(Ra,Za){mxEvent.addListener(ta,
-"click",function(){cb!=Za&&(cb.style.backgroundColor="",cb=Za,cb.style.backgroundColor=y,Aa.scrollTop=0,Aa.innerText="",X=0,lb=gb[Ra],ia=null,A(!1))})})(qa,ta)}oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(oa,"draw.io");Ka.appendChild(oa)}for(qa in Ja){oa=xa=null;if(null!=Ja[qa].content)ta=document.createElement(Ma?"ul":"div"),oa=ma(qa),ta.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;",
-ta.setAttribute("title",oa),mxUtils.write(ta,oa),Ka.appendChild(ta),oa=ta;else{var Ma=Wa[qa];oa=ta=document.createElement(Ma?"ul":"div");xa=Ja[qa];var Na=ma(qa,xa);if(null!=Ma){xa=document.createElement("li");var Qa=document.createElement("div");Qa.className="geTempTreeCaret";Qa.setAttribute("title",Na);mxUtils.write(Qa,Na);oa=Qa;xa.appendChild(Qa);Na=document.createElement("ul");Na.className="geTempTreeNested";Na.style.visibility="hidden";for(var Ya in Ma){var Ua=document.createElement("li"),ib=
-ma(Ya,Ma[Ya]);Ua.setAttribute("title",ib);mxUtils.write(Ua,ib);va(qa,Ua,Ya);Na.appendChild(Ua)}xa.appendChild(Na);ta.className="geTempTree";ta.appendChild(xa);(function(Ra,Za){mxEvent.addListener(Za,"click",function(){Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){Ra.style.visibility="hidden"},550);Za.classList.toggle("geTempTreeCaret-down")})})(Na,Qa)}else ta.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;",
-ta.setAttribute("title",Na),mxUtils.write(ta,Na);null!=K&&(ta.style.padding=K);Ka.appendChild(ta)}va(qa,oa);null==cb&&oa.click()}A(!1)}var g=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);n=null!=n?n:!0;x=null!=x?x:!1;y=null!=y?y:"light-dark(#ebf2f9, "+Editor.darkColor+")";L=null!=L?L:EditorUi.templateFile;var p=!1,C=document.createElement("div");C.style.userSelect="none";C.style.height="100%";var I=document.createElement("div");I.style.whiteSpace="nowrap";
-I.style.height="46px";n&&C.appendChild(I);var M=document.createElement("img");M.setAttribute("border","0");M.setAttribute("align","absmiddle");M.style.width="40px";M.style.height="40px";M.style.marginRight="10px";M.style.paddingBottom="4px";M.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";k||g||!n||I.appendChild(M);n&&mxUtils.write(I,(g?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");var O=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?O=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?O=b.dropbox.extension:
-b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?O=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?O=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?O=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(O=b.trello.extension);var Q=document.createElement("input");Q.setAttribute("value",b.defaultFilename+O);Q.style.marginLeft="10px";Q.style.width=k||g?"144px":"244px";this.init=function(){n&&Editor.selectFilename(Q);null!=Aa.parentNode&&null!=Aa.parentNode.parentNode&&mxEvent.addGestureListeners(Aa.parentNode.parentNode,
-mxUtils.bind(this,function(ma){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};if(n)if(I.appendChild(Q),B)Q.style.width=k||g?"350px":"450px";else if(null!=b.editor.diagramFileTypes){var U=FilenameDialog.createFileTypes(b,Q,b.editor.diagramFileTypes);U.style.marginLeft="6px";U.style.width=k||g?"80px":"180px";I.appendChild(U)}var V=!1,X=0,W=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),
-Y=mxUtils.button(t||mxResources.get("create"),function(){Y.setAttribute("disabled","disabled");T();Y.removeAttribute("disabled")});Y.className="geBtn gePrimaryBtn";var Z=document.createElement("img");Z.setAttribute("src",Editor.magnifyImage);Z.setAttribute("title",mxResources.get("preview"));Z.className="geButton geRoundButton";var aa=!1,ha=null,ea=!1;if(c||f){var da=[],ia=null,la=null,ba=null,fa=function(ma){Y.setAttribute("disabled","disabled");for(var va=0;va<da.length;va++)da[va].className=va==
-ma?"geBtn gePrimaryBtn":"geBtn"};V=!0;var ja=document.createElement("div");ja.style.whiteSpace="nowrap";ja.style.height="30px";C.appendChild(ja);var ca=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ka.style.display="";Ia.style.display="";Aa.style.left="160px";fa(0);Aa.scrollTop=0;Aa.innerText="";X=0;ia!=lb&&(lb=ia,Ja=la,ab=ba,Ka.innerText="",H(),ia=null)});da.push(ca);ja.appendChild(ca);var sa=function(ma){Ka.style.display="none";Ia.style.display="none";Aa.style.left="30px";
-fa(ma?-1:1);null==ia&&(ia=lb);Aa.scrollTop=0;Aa.innerText="";W.spin(Aa);var va=function(oa,qa,ta){X=0;W.stop();lb=oa;ta=ta||{};var xa=0,Ma;for(Ma in ta)xa+=ta[Ma].length;if(qa)Aa.innerText=qa;else if(0==oa.length&&0==xa)Aa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(Aa.innerText="",0<xa){Ka.style.display="";Aa.style.left="160px";Ka.innerText="";ab=0;Ja={"draw.io":oa};for(Ma in ta)Ja[Ma]=ta[Ma];H()}else A(!0)};ma?f(wa.value,va):c(va)};if(c){var pa=mxUtils.button(mxResources.get("Recent",
-null,"Recent"),function(){sa()});ja.appendChild(pa);da.push(pa)}if(f){var ua=document.createElement("span");ua.style.marginLeft="10px";ua.innerText=mxResources.get("search")+":";ja.appendChild(ua);var wa=document.createElement("input");wa.style.marginRight="10px";wa.style.marginLeft="10px";wa.style.width="220px";mxEvent.addListener(wa,"keypress",function(ma){13==ma.keyCode&&sa(!0)});ja.appendChild(wa);var ka=mxUtils.button(mxResources.get("search"),function(){sa(!0)});ka.className="geBtn";ja.appendChild(ka)}fa(0)}var na=
-null,za=null,ra=null,ya=null,Ca=null,Ha=null,Ba=null,Fa=null,Pa=null,Aa=document.createElement("div");Aa.style.border="1px solid #d3d3d3";Aa.style.position="absolute";Aa.style.left="160px";Aa.style.right="34px";var Da=(n?72:40)+(V?30:0);Aa.style.top=Da+"px";Aa.style.bottom="68px";Aa.style.margin="6px 0 0 -1px";Aa.style.padding="6px";Aa.style.overflow="auto";var Ia=document.createElement("div");Ia.style.cssText="position:absolute;left:30px;width:128px;top:"+Da+"px;height:22px;margin-top: 6px;white-space: nowrap;";
-var Oa=document.createElement("input");Oa.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";Oa.setAttribute("placeholder",mxResources.get("search"));Oa.setAttribute("type","text");Ia.appendChild(Oa);var Ga=document.createElement("img");Ga.setAttribute("src",Editor.magnifyImage);Ga.setAttribute("title",mxResources.get("search"));Ga.className="geAdaptiveAsset";Ga.style.position="relative";Ga.style.cursor="pointer";Ga.style.outline=
-"none";Ga.style.opacity="0.5";Ga.style.height="16px";Ga.style.left="-20px";Ga.style.top="4px";Ia.appendChild(Ga);mxEvent.addListener(Ga,"click",function(){Ga.getAttribute("src")!=Editor.magnifyImage&&(Ga.setAttribute("src",Editor.magnifyImage),Ga.setAttribute("title",mxResources.get("search")),Oa.value="",null!=sb&&(sb.click(),sb=null));Oa.focus()});mxEvent.addListener(Oa,"keydown",mxUtils.bind(this,function(ma){if(13==ma.keyCode){var va=Oa.value;if(""==va)null!=sb&&(sb.click(),sb=null);else{if(null==
-NewDialog.tagsList[L]){var oa={};for(Ua in Ja)if(null==Ja[Ua].content)for(var qa=Ja[Ua],ta=0;ta<qa.length;ta++){var xa=qa[ta];if(null!=xa.tags)for(var Ma=xa.tags.toLowerCase().split(";"),Na=0;Na<Ma.length;Na++)null==oa[Ma[Na]]&&(oa[Ma[Na]]=[]),oa[Ma[Na]].push(xa)}NewDialog.tagsList[L]=oa}var Qa=va.toLowerCase().split(" ");oa=NewDialog.tagsList[L];if(0<ab&&null==oa.__tagsList__){for(Ua in gb)for(qa=gb[Ua],ta=0;ta<qa.length;ta++)for(xa=qa[ta],Ma=xa.title.split(" "),Ma.push(Ua),Na=0;Na<Ma.length;Na++){var Ya=
-Ma[Na].toLowerCase();null==oa[Ya]&&(oa[Ya]=[]);oa[Ya].push(xa)}oa.__tagsList__=!0}var Ua=[];qa={};for(ta=Ma=0;ta<Qa.length;ta++)if(0<Qa[ta].length){Ya=oa[Qa[ta]];var ib={};Ua=[];if(null!=Ya)for(Na=0;Na<Ya.length;Na++)xa=Ya[Na],0==Ma==(null==qa[xa.url])&&(ib[xa.url]=!0,Ua.push(xa));qa=ib;Ma++}Aa.scrollTop=0;Aa.innerText="";X=0;oa=document.createElement("div");oa.style.padding="6px";oa.style.whiteSpace="nowrap";oa.style.overflow="hidden";oa.style.textOverflow="ellipsis";xa=mxResources.get(0==Ua.length?
-"noResultsFor":"resultsFor",[va]);oa.setAttribute("title",xa);mxUtils.write(oa,xa);Aa.appendChild(oa);null!=cb&&null==sb&&(cb.style.backgroundColor="",sb=cb,cb=oa);lb=Ua;ia=null;A(!1)}mxEvent.consume(ma)}}));mxEvent.addListener(Oa,"keyup",mxUtils.bind(this,function(ma){""==Oa.value?(Ga.setAttribute("src",Editor.magnifyImage),Ga.setAttribute("title",mxResources.get("search"))):(Ga.setAttribute("src",Editor.crossImage),Ga.setAttribute("title",mxResources.get("reset")))}));Da+=23;var Ka=document.createElement("div");
-Ka.style.cssText="position:absolute;left:30px;width:128px;top:"+Da+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(Aa,"scroll",function(){null!=b.sidebar&&b.sidebar.hideTooltip()});var Xa=140,qb=Xa,bb=null,rb="url("+Editor.sparklesImage+")",Va=document.createElement("div");Va.className="geGenerateDiagramForm";Va.style.position="absolute";Va.style.width="100%";Va.style.height="100%";var fb=document.createElement("div");fb.className="geTemplatePreview geAdaptiveAsset";
-fb.style.backgroundImage=rb;var $a=document.createElement("textarea");$a.setAttribute("placeholder",mxResources.get("describeYourDiagram"));$a.className="geGenerateDiagramDescription";var jb=document.createElement("button");jb.className="geBtn gePrimaryBtn geGenerateDiagramButton";jb.setAttribute("disabled","disabled");jb.setAttribute("title",mxResources.get("ok"));mxUtils.write(jb,mxResources.get("ok"));var Sa=Z.cloneNode(!0);Sa.style.display="none";var db=!1;mxEvent.addGestureListeners(Sa,function(ma){db=
-null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(ma){if(!db&&null!=Fa){var va="<mxfile><diagram>"+Graph.compress(Fa)+"</diagram></mxfile>";S(va,mxEvent.getClientX(ma),mxEvent.getClientY(ma),bb,Pa)}});var La=Z.cloneNode(!0);La.setAttribute("src",Editor.editImage);La.setAttribute("title",mxResources.get("edit"));La.style.visibility="hidden";La.style.left="0px";var hb=Z.cloneNode(!0);hb.setAttribute("src",Editor.helpImage);hb.setAttribute("title",mxResources.get("help"));
-mxEvent.addListener(hb,"click",function(ma){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(ma)});Va.appendChild($a);Va.appendChild(jb);Va.appendChild(hb);Va.style.display="none";mxEvent.addListener(La,"click",q);mxEvent.addListener($a,"input",function(){""!=$a.value?jb.removeAttribute("disabled"):jb.setAttribute("disabled","disabled")});var ob=!1;mxEvent.addListener(jb,"click",function(){J()});mxEvent.addListener($a,"keydown",function(ma){13!=ma.keyCode||mxEvent.isShiftDown(ma)?
-27==ma.keyCode&&(J(!0),mxEvent.consume(ma)):(J(),mxEvent.consume(ma))});var Ja={},Wa={},gb={},ab=0,pb=!0,cb=null,sb=null;Ja.basic=D?[]:[{title:"blankDiagram"}];var lb=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ja.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&
-(Ja.smartTemplate={content:R()});if(!k){var yb=function(){mxUtils.get(wb,function(ma){if(!Ab){Ab=!0;ma=ma.getXml().documentElement.firstChild;for(var va={};null!=ma;){if("undefined"!==typeof ma.getAttribute)if("parsererror"==ma.nodeName)null!=window.console&&console.log("Parser error in "+L+": "+ma.textContent);else if("clibs"==ma.nodeName){for(var oa=ma.getAttribute("name"),qa=ma.getElementsByTagName("add"),ta=[],xa=0;xa<qa.length;xa++)ta.push(encodeURIComponent(mxUtils.getTextContent(qa[xa])));
-null!=oa&&0<ta.length&&(va[oa]=ta.join(";"))}else if(ta=ma.getAttribute("url"),null!=ta){qa=ma.getAttribute("section");oa=ma.getAttribute("subsection");if(null==qa&&(xa=ta.indexOf("/"),qa=ta.substring(0,xa),null==oa)){var Ma=ta.indexOf("/",xa+1);-1<Ma&&(oa=ta.substring(xa+1,Ma))}xa=Ja[qa];null==xa&&(xa=[],Ja[qa]=xa);ta=ma.getAttribute("clibs");null!=va[ta]&&(ta=va[ta]);ta={url:ma.getAttribute("url"),libs:ma.getAttribute("libs"),title:ma.getAttribute("title"),tooltip:ma.getAttribute("name")||ma.getAttribute("url"),
-preview:ma.getAttribute("preview"),clibs:ta,tags:ma.getAttribute("tags")};xa.push(ta);null!=oa&&(xa=Wa[qa],null==xa&&(xa={},Wa[qa]=xa),qa=xa[oa],null==qa&&(qa=[],xa[oa]=qa),qa.push(ta))}ma=ma.nextSibling}W.stop();H()}})};C.appendChild(Ia);C.appendChild(Ka);C.appendChild(Aa);var Ab=!1,wb=L;/^https?:\/\//.test(wb)&&!b.editor.isCorsEnabledForUrl(wb)&&(wb=PROXY_URL+"?url="+encodeURIComponent(wb));W.spin(Aa);null!=v?v(function(ma,va){gb=ma;ba=ab=va;yb()},yb):yb();la=Ja}mxEvent.addListener(Q,"keypress",
-function(ma){b.dialog.container.firstChild==C&&13==ma.keyCode&&T()});var kb=document.createElement("div");kb.style.marginTop=k?"4px":"16px";kb.style.textAlign="right";kb.style.position="absolute";kb.style.left="40px";kb.style.bottom="24px";kb.style.right="40px";var zb=mxUtils.button(mxResources.get("cancel"),function(){null!=z&&z();b.hideDialog(!0)});zb.className="geBtn";!b.editor.cancelFirst||x&&null==z||kb.appendChild(zb);if(!(k||"1"==urlParams.embed||x||mxClient.IS_ANDROID||mxClient.IS_IOS)&&"1"!=
-urlParams.noDevice){var Bb=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ma=new FilenameDialog(b,"",mxResources.get("create"),function(va){null!=va&&0<va.length&&b.editor.loadUrl(b.editor.getProxiedUrl(va),function(oa){ra=oa;na=null;templateRealURl=va;b.hideDialog();T()},function(oa){b.handleError(oa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ma.container,300,80,!0,!0);ma.init()});Bb.className="geBtn";kb.appendChild(Bb)}if(Graph.fileSupport&&m){var Cb=mxUtils.button(mxResources.get("import"),
-function(){if(null==b.newDlgFileInputElt){var ma=document.createElement("input");ma.setAttribute("multiple","multiple");ma.setAttribute("type","file");mxEvent.addListener(ma,"change",function(va){b.openFiles(ma.files,!0);ma.value=""});ma.style.display="none";document.body.appendChild(ma);b.newDlgFileInputElt=ma}b.newDlgFileInputElt.click()});Cb.className="geBtn";kb.appendChild(Cb)}kb.appendChild(Y);b.editor.cancelFirst||null!=d||x&&null==z||kb.appendChild(zb);C.appendChild(kb);this.container=C};
-NewDialog.tagsList={};
-var SaveDialog=function(b,k,n,d,x,z,y,F,N,K,L){function c(g,p,C,I,M,O){var Q=null;if((null==d||0>mxUtils.indexOf(d,g))&&(null==N||g==N)&&(null==K||0<=mxUtils.indexOf(K,g))){M=null!=M?M:b.getTitleForService(g);var U=0<=mxUtils.indexOf(u,g);if(U||null!=b.getServiceForName(g)){Q=document.createElement("option");var V="";!U&&b.isOffline(g==App.MODE_GOOGLE&&"1"==urlParams["gapi-stealth"])&&(Q.setAttribute("disabled","disabled"),V=" ("+mxResources.get("offline")+")");if("pick"==O)Q.innerHTML=mxUtils.htmlEntities(M)+
-"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+V,Q.setAttribute("value","pickFolder-"+g),Q.setAttribute("title",M+" - "+mxResources.get("pickFolder")+"...");else{U=g+(null!=C?"-"+C:"");var X=G[U];null!=X&&null!=X.option&&X.option.parentNode.removeChild(X.option);X=null;if(null!=p){"/"==p.charAt(p.length-1)&&(p=p.substring(0,p.length-1));"/"==p.charAt(0)&&(p=p.substring(1));X=p;if(g!=App.MODE_GITHUB&&g==App.MODE_GITLAB){var W=X.lastIndexOf("/");0<=W&&(X=
-X.substring(W+1))}40<X.length&&(X=X.substring(0,20)+"..."+X.substring(X.length-20))}Q.innerHTML=mxUtils.htmlEntities(M)+(null!=X?"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(X):"")+V;Q.setAttribute("title",M+(null!=p?" ("+p+")":"")+(null!=C&&decodeURIComponent(C)!=p?" ["+C+"]":""));Q.setAttribute("value",U);G[U]={option:Q,mode:g,path:p,id:C};SaveDialog.lastValue==U&&null==F&&"disabled"==!Q.getAttribute("disabled")?I=!0:null==I&&("root"==O?I=null==F&&b.mode==g||null!=g&&g==F:"pickFolder-"==
-q.value.substring(0,11)&&(I=!0));I&&Q.setAttribute("selected","selected")}q.appendChild(Q)}}return Q}function f(g){b.pickFolder(g,function(p){var C=null;g==App.MODE_GOOGLE&&null!=p.docs&&0<p.docs.length?C={mode:g,path:p.docs[0].name,id:p.docs[0].id}:g==App.MODE_ONEDRIVE&&null!=p.value&&0<p.value.length?C={mode:g,path:p.value[0].name,id:OneDriveFile.prototype.getIdOf(p.value[0])}:(g==App.MODE_GITHUB||g==App.MODE_GITLAB)&&null!=p&&0<p.length&&(C={mode:g,path:decodeURIComponent(p),id:p});null!=C&&(b.addRecent(C,
-"Folders",5),p=c(C.mode,C.path,C.id,!0),q.innerHTML="",G={},l(),C=q.selectedIndex,q.value=p.value,0>q.selectedIndex&&(q.selectedIndex=C))},!0,!0,!0,!0)}function l(){var g=b.getRecent("Folders"),p=0;if(null!=g&&0<g.length)for(var C=0;C<g.length;C++)null!=c(g[C].mode,g[C].path,g[C].id)&&p++;c(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");c(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(c(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),
+var BackgroundImageDialog=function(b,l,n,d,v){function A(){null==u||u==mxConstants.NONE?(q.style.display="none",Q.checked=!1):(q.style.backgroundColor=u,q.style.display="",Q.checked=!0)}var z=b.editor.graph,D=document.createElement("div");D.style.whiteSpace="nowrap";var P=document.createElement("h2");mxUtils.write(P,mxResources.get("background"));P.style.marginTop="0px";D.appendChild(P);var J=null!=n&&null!=n.originalSrc;P=!1;var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value",
+"url");L.setAttribute("type","radio");L.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geBackgroundImageDialogOption");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginBottom="8px";f.style.width="360px";f.value=J||null==n?"":n.src;var k=document.createElement("select");k.style.width="360px";
+if(null!=b.pages)for(var m=0;m<b.pages.length;m++){var t=document.createElement("option");mxUtils.write(t,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1]));t.setAttribute("value","data:page/id,"+b.pages[m].getId());b.pages[m]==b.currentPage&&t.setAttribute("disabled","disabled");null!=n&&n.originalSrc==t.getAttribute("value")&&(t.setAttribute("selected","selected"),P=!0);k.appendChild(t)}J||null!=b.pages&&1!=b.pages.length||(L.style.display="none",c.style.display="none",k.style.display=
+"none");var x=document.createElement("option"),y=!1,F=!1,E=function(G,H){y||null!=G&&F||(c.checked?null!=H&&H(x.selected?null:k.value):""==f.value||b.isOffline()?(S.value="",U.value="",null!=H&&H("")):(f.value=mxUtils.trim(f.value),b.loadImage(f.value,function(g){S.value=g.width;U.value=g.height;null!=H&&H(f.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));S.value="";U.value="";null!=H&&H(null)})))},C=mxUtils.bind(this,function(G){b.importFiles(G,
+0,0,b.maxBackgroundSize,function(H,g,p,B,K,M){f.value=H;E();f.focus()},function(){},function(H){return"image/"==H.type.substring(0,6)},function(H){for(var g=0;g<H.length;g++)H[g]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){J?k.focus():f.focus();mxEvent.addListener(k,"focus",function(){L.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(f,"focus",function(){c.removeAttribute("checked");L.setAttribute("checked","checked");
+L.checked=!0});if(Graph.fileSupport){f.setAttribute("placeholder",mxResources.get("dragImagesHere"));var G=D.parentNode,H=null;mxEvent.addListener(G,"dragleave",function(g){null!=H&&(H.parentNode.removeChild(H),H=null);g.stopPropagation();g.preventDefault()});mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(g){null==H&&(H=b.highlightElement(G));g.stopPropagation();g.preventDefault()}));mxEvent.addListener(G,"drop",mxUtils.bind(this,function(g){null!=H&&(H.parentNode.removeChild(H),H=null);
+if(0<g.dataTransfer.files.length)C(g.dataTransfer.files);else if(0<=mxUtils.indexOf(g.dataTransfer.types,"text/uri-list")){var p=g.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(p)&&(f.value=decodeURIComponent(p),E())}g.stopPropagation();g.preventDefault()}),!1)}};D.appendChild(L);D.appendChild(f);mxUtils.br(D);m=document.createElement("span");m.style.marginLeft="30px";mxUtils.write(m,mxResources.get("width")+":");D.appendChild(m);var S=document.createElement("input");
+S.setAttribute("type","text");S.style.width="60px";S.style.marginLeft="8px";S.style.marginRight="16px";S.value=null==n||J?"":n.width;D.appendChild(S);mxUtils.write(D,mxResources.get("height")+":");var U=document.createElement("input");U.setAttribute("type","text");U.style.width="60px";U.style.marginLeft="8px";U.style.marginRight="16px";U.value=null==n||J?"":n.height;D.appendChild(U);mxUtils.br(D);mxUtils.br(D);mxEvent.addListener(f,"change",E);ImageDialog.filePicked=function(G){G.action==google.picker.Action.PICKED&&
+null!=G.docs[0].thumbnails&&(G=G.docs[0].thumbnails[G.docs[0].thumbnails.length-1],null!=G&&(f.value=G.url,E()));f.focus()};D.appendChild(c);D.appendChild(k);mxUtils.br(D);mxUtils.br(D);J?(c.setAttribute("checked","checked"),c.checked=!0):(L.setAttribute("checked","checked"),L.checked=!0);!P&&c.checked&&(mxUtils.write(x,mxResources.get("pageNotFound")),x.setAttribute("disabled","disabled"),x.setAttribute("selected","selected"),x.setAttribute("value","pageNotFound"),k.appendChild(x),mxEvent.addListener(k,
+"change",function(){null==x.parentNode||x.selected||x.parentNode.removeChild(x)}));n=document.createElement("div");n.style.display=v?"inline-flex":"none";n.style.alignItems="center";n.style.cursor="default";n.style.minWidth="40%";n.style.height="20px";var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.style.margin="0px 10px 0px 4px";Q.style.verticalAlign="bottom";Q.defaultChecked=d!=mxConstants.NONE&&null!=d;Q.checked=Q.defaultChecked;n.appendChild(Q);mxUtils.write(n,mxResources.get("fillColor"));
+v=n.cloneNode(!1);var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px 10px 0px 30px";O.style.verticalAlign="bottom";O.defaultChecked=z.shadowVisible;O.checked=O.defaultChecked;v.appendChild(O);mxUtils.write(v,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||O.setAttribute("disabled","disabled");mxEvent.addListener(v,"click",function(G){mxEvent.getSource(G)!=O&&(O.checked=!O.checked)});var q=document.createElement("button");q.style.width="36px";q.style.height=
+"18px";q.style.cursor="pointer";q.style.marginLeft="10px";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";q.style.verticalAlign="bottom";q.className="geColorBtn";var u=d;A();mxEvent.addListener(n,"click",function(G){mxEvent.getSource(G)!=Q&&(Q.checked=!Q.checked);u=Q.checked?"#ffffff":null;A()});mxEvent.addListener(q,"click",function(G){b.pickColor(u||"none",function(H){u=H;A()});mxEvent.consume(G)});n.appendChild(q);D.appendChild(n);D.appendChild(v);mxUtils.br(D);
+d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";z=mxUtils.button(mxResources.get("cancel"),function(){y=!0;b.hideDialog()});z.className="geBtn";b.editor.cancelFirst&&d.appendChild(z);v=mxUtils.button(mxResources.get("reset"),function(){f.value="";S.value="";U.value="";L.checked=!0;u=mxConstants.NONE;A();y=!1});mxEvent.addGestureListeners(v,function(){y=!0});v.className="geBtn";v.width="100";d.appendChild(v);if(Graph.fileSupport){var I=document.createElement("input");
+I.setAttribute("multiple","multiple");I.setAttribute("type","file");mxEvent.addListener(I,"change",function(G){null!=I.files&&(C(I.files),I.type="",I.type="file",I.value="")});I.style.display="none";D.appendChild(I);v=mxUtils.button(mxResources.get("open"),function(){I.click()});v.className="geBtn";d.appendChild(v)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();E(null,function(G){l(""!=G&&null!=G?new mxImage(G,S.value,U.value):null,null==G,u,!mxClient.IS_SVG||mxClient.IS_SF?
+null:O.checked)})});mxEvent.addGestureListeners(applyBtn,function(){F=!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(z);D.appendChild(d);this.container=D},ParseDialog=function(b,l,n){function d(k,m,t){if("plantUmlPng"==m||"plantUmlSvg"==m||"plantUmlTxt"==m){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var x=function(g,p,B,K,M){A=mxEvent.isAltDown(t)?A:y.getCenterInsertPoint(new mxRectangle(0,0,K,M));var N=null;y.getModel().beginUpdate();
+try{N="txt"==p?b.insertAsPreText(B,A.x,A.y):y.insertVertex(null,null,null,A.x,A.y,K,M,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(B)+";"),y.setAttributeForCell(N,"plantUmlData",JSON.stringify({data:g,format:p},null,2))}finally{y.getModel().endUpdate()}null!=N&&(y.setSelectionCell(N),y.scrollCellToVisible(N))},y=b.editor.graph,F="plantUmlTxt"==m?"txt":"plantUmlPng"==m?"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"==
+k&&"svg"==F?window.setTimeout(function(){b.spinner.stop();x(k,F,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(k,F,function(g,p,B){b.spinner.stop();x(k,F,g,p,B)},function(g){b.handleError(g)})}}else if("mermaid"==m||"mermaid2drawio"==m)b.spinner.spin(document.body,mxResources.get("inserting"))&&b.parseMermaidDiagram(k,null,mxUtils.bind(this,function(g){b.spinner.stop();var p=b.editor.graph;p.setSelectionCells(b.importXml(g,Math.max(A.x,20),Math.max(A.y,20),!0,null,null,!0));p.scrollCellToVisible(p.getSelectionCell())}),mxUtils.bind(this,function(g){b.handleError(g)}),
+null,"mermaid2drawio"==m);else if("table"==m){var E=k.split("\n");m=null;for(var C=[],S=0,U={},Q=0;Q<E.length;Q++){var O=mxUtils.trim(E[Q]);if("primary key"==O.substring(0,11).toLowerCase()){var q=O.match(/\((.+)\)/);q&&q[1]&&(U[q[1]]=!0);E.splice(Q,1)}else 0<O.toLowerCase().indexOf("primary key")&&(U[O.split(" ")[0]]=!0,E[Q]=mxUtils.trim(O.replace(/primary key/i,"")))}for(Q=0;Q<E.length;Q++)if(O=mxUtils.trim(E[Q]),"create table"==O.substring(0,12).toLowerCase())O=mxUtils.trim(O.substring(12)),"("==
+O.charAt(O.length-1)&&(O=mxUtils.trim(O.substring(0,O.length-1))),m=new mxCell(O,new mxGeometry(S,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),m.vertex=!0,C.push(m),O=b.editor.graph.getPreferredSizeForCell(u),null!=O&&(m.geometry.width=O.width+10);else if(null!=m&&")"==O.charAt(0))S+=m.geometry.width+40,m=null;else if("("!=O&&null!=m){O=O.substring(0,","==O.charAt(O.length-1)?O.length-1:O.length);
+q=U[O.split(" ")[0]];var u=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;strokeColor=inherit;top=0;left=0;right=0;bottom="+(q?"1":"0")+";");u.vertex=!0;var I=new mxCell(q?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(q?"fontStyle=1;":
+""));I.vertex=!0;u.insert(I);O=new mxCell(O,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(q?"fontStyle=5;":""));O.vertex=!0;u.insert(O);O=b.editor.graph.getPreferredSizeForCell(O);null!=O&&m.geometry.width<O.width+30&&(m.geometry.width=Math.min(320,Math.max(m.geometry.width,O.width+30)));m.insert(u,q?0:null);m.geometry.height+=30}0<C.length&&(y=b.editor.graph,A=mxEvent.isAltDown(t)?
+A:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(C,!0)),y.setSelectionCells(y.importCells(C,A.x,A.y)),y.scrollCellToVisible(y.getSelectionCell()))}else if("list"==m){if(E=k.split("\n"),0<E.length){y=b.editor.graph;u=null;C=[];for(Q=m=0;Q<E.length;Q++)";"!=E[Q].charAt(0)&&(0==E[Q].length?u=null:null==u?(u=new mxCell(E[Q],new mxGeometry(m,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+u.vertex=!0,C.push(u),O=y.getPreferredSizeForCell(u),null!=O&&u.geometry.width<O.width+10&&(u.geometry.width=O.width+10),m+=u.geometry.width+40):"--"==E[Q]?(O=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),O.vertex=!0,u.geometry.height+=O.geometry.height,u.insert(O)):0<E[Q].length&&(S=new mxCell(E[Q],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+S.vertex=!0,O=y.getPreferredSizeForCell(S),null!=O&&S.geometry.width<O.width&&(S.geometry.width=O.width),u.geometry.width=Math.max(u.geometry.width,S.geometry.width),u.geometry.height+=S.geometry.height,u.insert(S)));if(0<C.length){A=mxEvent.isAltDown(t)?A:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(C,!0));y.getModel().beginUpdate();try{C=y.importCells(C,A.x,A.y);O=[];for(Q=0;Q<C.length;Q++)O.push(C[Q]),O=O.concat(C[Q].children);y.fireEvent(new mxEventObject("cellsInserted","cells",O))}finally{y.getModel().endUpdate()}y.setSelectionCells(C);
+y.scrollCellToVisible(y.getSelectionCell())}}}else{u=function(g){var p=G[g];null==p&&(p=new mxCell(g,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),p.vertex=!0,G[g]=p,C.push(p));return p};var G={};C=[];for(Q=0;Q<E.length;Q++)if(";"!=E[Q].charAt(0)){var H=E[Q].split("->");2<=H.length&&(q=u(H[0]),I=u(H[H.length-1]),H=new mxCell(2<H.length?H[1]:"",new mxGeometry),H.edge=!0,H.geometry.relative=!0,q.insertEdge(H,!0),I.insertEdge(H,!1),C.push(H))}if(0<C.length){E=document.createElement("div");E.style.visibility=
+"hidden";document.body.appendChild(E);y=new Graph(E);y.getModel().beginUpdate();try{C=y.importCells(C);for(Q=0;Q<C.length;Q++)y.getModel().isVertex(C[Q])&&(O=y.getPreferredSizeForCell(C[Q]),C[Q].geometry.width=Math.max(C[Q].geometry.width,O.width),C[Q].geometry.height=Math.max(C[Q].geometry.height,O.height));Q=!0;"horizontalFlow"==m||"verticalFlow"==m?((new mxHierarchicalLayout(y,"horizontalFlow"==m?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(y.getDefaultParent(),C),Q=!1):"circle"==
+m?(new mxCircleLayout(y)).execute(y.getDefaultParent()):(S=new mxFastOrganicLayout(y),S.disableEdgeStyle=!1,S.forceConstant=180,S.execute(y.getDefaultParent()));Q&&(U=new mxParallelEdgeLayout(y),U.spacing=30,U.execute(y.getDefaultParent()))}finally{y.getModel().endUpdate()}y.clearCellOverlays();O=[];b.editor.graph.getModel().beginUpdate();try{C=y.getModel().getChildren(y.getDefaultParent()),A=mxEvent.isAltDown(t)?A:b.editor.graph.getCenterInsertPoint(y.getBoundingBoxFromGeometry(C,!0)),O=b.editor.graph.importCells(C,
+A.x,A.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",O))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(O);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());y.destroy();E.parentNode.removeChild(E)}}}function v(){return"list"==D.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==D.value||
+"mermaid2drawio"==D.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==D.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==D.value?"@startuml\nskinparam backgroundcolor transparent\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":
+"plantUmlSvg"==D.value||"plantUmlTxt"==D.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var A=b.editor.graph.getFreeInsertPoint();l=document.createElement("div");var z=document.createElement("textarea");z.style.position="absolute";z.style.left="30px";z.style.right="30px";z.style.top=
+"30px";z.style.bottom="100px";z.style.resize="none";z.setAttribute("wrap","off");z.setAttribute("spellcheck","false");z.setAttribute("autocorrect","off");z.setAttribute("autocomplete","off");z.setAttribute("autocapitalize","off");var D=document.createElement("select");D.className="geBtn";if("formatSql"==n||"mermaid"==n&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())D.style.display="none";var P=document.createElement("option");P.setAttribute("value","list");mxUtils.write(P,mxResources.get("list"));
+"plantUml"!=n&&"mermaid"!=n&&D.appendChild(P);null!=n&&"fromText"!=n||P.setAttribute("selected","selected");P=document.createElement("option");P.setAttribute("value","table");mxUtils.write(P,mxResources.get("formatSql"));"formatSql"==n&&(D.appendChild(P),P.setAttribute("selected","selected"));P=document.createElement("option");P.setAttribute("value","mermaid");mxUtils.write(P,mxResources.get("image"));if("mermaid"==n){if("undefined"!==typeof mxMermaidToDrawio){var J=document.createElement("option");
+J.setAttribute("value","mermaid2drawio");J.setAttribute("selected","selected");mxUtils.write(J,mxResources.get("diagram"));D.appendChild(J)}else D.style.display="none";D.appendChild(P)}P=document.createElement("option");P.setAttribute("value","diagram");mxUtils.write(P,mxResources.get("diagram"));J=document.createElement("option");J.setAttribute("value","circle");mxUtils.write(J,mxResources.get("circle"));var L=document.createElement("option");L.setAttribute("value","horizontalFlow");mxUtils.write(L,
+mxResources.get("horizontalFlow"));var c=document.createElement("option");c.setAttribute("value","verticalFlow");mxUtils.write(c,mxResources.get("verticalFlow"));"plantUml"!=n&&"mermaid"!=n&&(D.appendChild(P),D.appendChild(J),D.appendChild(L),D.appendChild(c));P=document.createElement("option");P.setAttribute("value","plantUmlSvg");mxUtils.write(P,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==n&&P.setAttribute("selected","selected");J=document.createElement("option");
+J.setAttribute("value","plantUmlPng");mxUtils.write(J,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");L=document.createElement("option");L.setAttribute("value","plantUmlTxt");mxUtils.write(L,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==n&&(D.appendChild(P),D.appendChild(J),D.appendChild(L));var f=v();z.value=f;l.appendChild(z);P=document.createElement("div");P.style.position="absolute";P.style.bottom=
+"46px";P.style.right="30px";P.style.left="30px";P.style.justifyContent="end";P.style.display="flex";this.init=function(){z.focus()};Graph.fileSupport&&(z.addEventListener("dragover",function(k){k.stopPropagation();k.preventDefault()},!1),z.addEventListener("drop",function(k){k.stopPropagation();k.preventDefault();if(0<k.dataTransfer.files.length){k=k.dataTransfer.files[0];var m=new FileReader;m.onload=function(t){z.value=t.target.result};m.readAsText(k)}},!1));"plantUml"==n&&"https://plant-aws.diagrams.net"==
+window.PLANT_URL&&(J=document.createElement("div"),J.style.display="inline-block",J.style.color="#c00",J.style.fontSize="12px",J.style.marginRight="10px",J.style.display="flex",J.style.alignItems="center",J.innerHTML='<a href="https://github.com/jgraph/drawio/discussions/5074" target="_blank" rel="noopener noreferrer" style="color: #c00; text-decoration: underline;">PlantUML is deprecated</a>',P.appendChild(J));b.isOffline()&&!mxClient.IS_CHROMEAPP||"mermaid"!=n&&"plantUml"!=n||P.appendChild(b.createHelpIcon("mermaid"==
+n?"https://mermaid.js.org/intro/":"https://plantuml.com/"));P.appendChild(D);mxEvent.addListener(D,"change",function(){var k=v();if(0==z.value.length||z.value==f)f=k,z.value=f});n=mxUtils.button(mxResources.get("close"),function(){z.value==f?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});n.className="geBtn";b.editor.cancelFirst&&P.appendChild(n);J=mxUtils.button(mxResources.get("insert"),function(k){try{b.hideDialog(),d(z.value,D.value,k)}catch(m){b.handleError(m)}});
+J.className="geBtn gePrimaryBtn";P.appendChild(J);b.editor.cancelFirst||P.appendChild(n);l.appendChild(P);this.container=l},NewDialog=function(b,l,n,d,v,A,z,D,P,J,L,c,f,k,m,t,x,y,F,E){function C(na){null!=na&&(La=Za=na?135:140);na=!0;if(null!=lb)for(;V<lb.length&&(na||0!=mxUtils.mod(V,30));){var Aa=lb[V++];Aa=I(Aa.url,Aa.libs,Aa.title,Aa.tooltip?Aa.tooltip:Aa.title,Aa.select,Aa.imgUrl,Aa.info,Aa.onClick,Aa.preview,Aa.noImg,Aa.clibs,Aa.type);na&&Aa.click();na=!1}}function S(na,Aa,sa,Da,va,ya){if(null!=
+na&&mxUtils.isAncestorNode(document.body,Da)){na=mxUtils.parseXml(na);na=Editor.parseDiagramNode(na.documentElement,null,!0);var Ka=new mxCodec(na.ownerDocument),Na=new mxGraphModel;Ka.decode(na,Na);b.sidebar.createTooltip(Da,Na.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=va?mxResources.get(va):null,!0,new mxPoint(Aa,
+sa),!0,function(){la=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=ya&&Q(Da,null,null,ya,infoObj,clibs)},!0,!1)}}function U(){if(ra==$a&&null==ua&&null!=bb&&null!=eb)d&&b.spinner.spin(document.body,mxResources.get("generate")+" '"+eb.value+"'")&&(g=!0,b.hideDialog()),bb.click();else if(g&&b.spinner.stop(),za&&null!=k)n||g||b.hideDialog(),k(za,Ga,N.value);else if(d)n||g||b.hideDialog(),d(ua,N.value,Ba,ia);else{var na=N.value;if(null!=na&&0<na.length){var Aa=function(Da,va,
+ya){b.createFile(ya,ua,null!=ia&&0<ia.length?ia:null,Da,function(){g||b.hideDialog()},null,va,null,null!=ma&&0<ma.length?ma:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var sa=new SaveDialog(b,na,mxUtils.bind(this,function(Da,va,ya){Aa(va,ya,Da.value)}),null,null,null,null,b.mode);b.showDialog(sa.container,420,150,!0,!1);sa.init()}else b.pickFolder(b.mode,function(Da){Aa(b.mode,Da,na)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function Q(na,Aa,sa,Da,
+va,ya,Ka){return ra!=na?(null!=ra&&(ra.classList.remove("geTemplateSelected"),ra==$a&&(Ua.style.display="none",cb.style.display="",Ra.style.visibility="hidden",ib.style.visibility=null!=wa?"visible":"hidden")),na==$a&&(Aa=wa,null!=Aa?(ib.style.visibility="visible",ib.style.visibility=null!=wa?"visible":"hidden",Ra.style.visibility="visible"):(Ua.style.display="",Ra.style.visibility="hidden",ib.style.visibility="hidden")),W.removeAttribute("disabled"),ua=Aa,ia=sa,ma=ya,ra=na,za=Da,Ba=Ka,Ga=va,ra.classList.add("geTemplateSelected"),
+!0):!1}function O(){Ua.style.display="";cb.style.display="none";Ra.style.visibility="hidden";ib.style.visibility="hidden";eb.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?eb.select():document.execCommand("selectAll",!1,null)}function q(){cb.style.backgroundImage=pb;cb.style.backgroundSize="contain";Ua.style.display="none";cb.style.display="";Ra.style.visibility="visible";ib.style.visibility="visible"}function u(na){if(!fb){fb=!0;var Aa=mxUtils.trim(eb.value);na||""==Aa?null!=Fa&&
+(eb.value=Fa,q()):(cb.style.backgroundImage="url("+Editor.spinImage+")",cb.style.backgroundSize="12px 12px",cb.style.display="",Ua.style.display="none",b.generateOpenAiMermaidDiagram(Aa,function(sa){fb=!1;ra==$a&&"none"==Ua.style.display&&(pb="url("+Editor.createSvgDataUri(mxUtils.getXml(b.getSvgForXml(sa)))+")",$a.setAttribute("title",Aa),ib.style.display="",wa=ua=sa,Fa=Aa,q(),g&&U())},mxUtils.bind(this,function(sa){fb=!1;ra==$a&&(Ua.style.display="",cb.style.display="none",Ra.style.visibility="hidden",
+ib.style.visibility="hidden",b.handleError(sa))}),!0))}}function I(na,Aa,sa,Da,va,ya,Ka,Na,Sa,jb,ab,nb){function Pa(Wa,qb){null==tb?(ob=Wa,ob=/^https?:\/\//.test(ob)?b.editor.isCorsEnabledForUrl(ob)?ob:PROXY_URL+"?url="+encodeURIComponent(ob):TEMPLATE_PATH+"/"+ob,mxUtils.get(ob,mxUtils.bind(this,function(rb){200<=rb.getStatus()&&299>=rb.getStatus()&&(tb=rb.getText());qb(tb,ob)}))):qb(tb,ob)}function gb(Wa,qb){if(null==na||Z||b.sidebar.currentElt==Ia)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),
+null!=aa){var rb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+aa.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+aa.naturalWidth+'" height="'+aa.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";S(rb,mxEvent.getClientX(Wa),mxEvent.getClientY(Wa),sa,na)}else b.sidebar.currentElt=Ia,Z=!0,Pa(na,function(Cb){if(Z&&b.sidebar.currentElt==Ia)try{S(Cb,
+mxEvent.getClientX(Wa),mxEvent.getClientY(Wa),Ia,qb)}catch(Db){b.sidebar.currentElt=null,b.handleError(Db)}Z=!1})}var Ia=null;if("generative"!=nb||null==$a){Ia=document.createElement("div");Ia.className="geTemplate";var tb=null,ob=na;null!=sa?Ia.setAttribute("title",mxResources.get(sa,null,sa)):null!=Da&&0<Da.length&&Ia.setAttribute("title",Da)}else Ia=$a;var ub=document.createElement("span");ub.className="geAdaptiveAsset";mxUtils.write(ub,mxResources.get(sa,null,sa));if(null!=ya){Ia.style.display=
+"inline-flex";Ia.style.justifyContent="center";Ia.style.alignItems="center";Sa=document.createElement("img");Sa.setAttribute("src",ya);Sa.setAttribute("alt",Da);Sa.style.maxWidth=La+"px";Sa.style.maxHeight=Za+"px";aa=Sa;var xb=ya.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ia.appendChild(Sa);Sa.onerror=function(){this.src!=xb?this.src=xb:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ia,mxUtils.bind(this,function(Wa){Q(Ia,null,null,na,Ka,ab)}),null,
+null);mxEvent.addListener(Ia,"dblclick",function(Wa){U();mxEvent.consume(Wa)})}else if(!jb&&null!=na&&0<na.length){var yb=function(Wa){X.spin(xa)&&Pa(na,function(qb,rb){X.stop();null!=qb&&(Q(Ia,qb,Aa,null,null,ab,rb),Wa&&U())})};ya=Sa||TEMPLATE_PATH+"/"+na.substring(0,na.length-4)+".png";Sa=cb.cloneNode(!1);Sa.style.backgroundImage="url("+ya+")";Sa.style.display="";Ia.appendChild(Sa);null!=sa&&Ia.appendChild(ub);mxEvent.addGestureListeners(Ia,mxUtils.bind(this,function(Wa){yb()}),null,null);mxEvent.addListener(Ia,
+"dblclick",function(Wa){yb(!0);mxEvent.consume(Wa)})}else Ia.appendChild(ub),"generative"==nb&&null==$a&&(Ia.appendChild(cb),Ia.appendChild(Ua),Ia.appendChild(ib),Ia.appendChild(Ra),$a=Ia),va&&Q(Ia),null!=Na?(mxEvent.addGestureListeners(Ia,null,null,mxUtils.bind(this,function(Wa){Q(Ia,null,null,na,Ka)})),mxEvent.addListener(Ia,"click",Na)):(mxEvent.addListener(Ia,"click",function(Wa){Q(Ia,null,null,na,Ka)&&"generative"==nb&&null==wa&&O()}),mxEvent.addListener(Ia,"dblclick",function(Wa){"generative"!=
+nb?U():"none"==Ua.style.display&&O();mxEvent.consume(Wa)}));null!=na&&(ya=Y.cloneNode(!0),Ia.appendChild(ya),mxEvent.addGestureListeners(ya,mxUtils.bind(this,function(Wa){la=b.sidebar.currentElt==Ia}),null,null),mxEvent.addListener(ya,"click",mxUtils.bind(this,function(Wa){la||gb(Wa,null!=sa?sa:Da);mxEvent.consume(Wa)})));xa.appendChild(Ia);return Ia}function G(){function na(Pa,gb){Pa=mxResources.get(Pa,null,Pa.substring(0,1).toUpperCase()+Pa.substring(1));18<Pa.length&&(Pa=Pa.substring(0,18)+"&hellip;");
+return Pa+(null!=gb?" ("+gb.length+")":"")}function Aa(Pa,gb,Ia){mxEvent.addListener(gb,"click",function(){Xa!=gb&&(null!=Xa&&(Xa.style.backgroundColor=""),Xa=gb,Xa.style.backgroundColor=z,xa.scrollTop=0,xa.innerText="",V=0,null!=Qa[Pa].content?(xa.appendChild(Qa[Pa].content),ua=wa,lb=null,null!=Qa[Pa].content.init&&Qa[Pa].content.init()):(lb=Ia?Ta[Pa][Ia]:Qa[Pa],ca=null,C(!1)))})}db&&(db=!1,mxEvent.addListener(xa,"scroll",function(Pa){xa.scrollTop+xa.clientHeight>=xa.scrollHeight&&(C(),mxEvent.consume(Pa))}));
+if(0<hb){var sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,mxResources.get("custom"));Ja.appendChild(sa);for(var Da in Va){var va=document.createElement("div");sa=Da;var ya=Va[Da];18<sa.length&&(sa=sa.substring(0,18)+"&hellip;");va.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";va.setAttribute("title",
+sa+" ("+ya.length+")");mxUtils.write(va,va.getAttribute("title"));null!=J&&(va.style.padding=J);Ja.appendChild(va);(function(Pa,gb){mxEvent.addListener(va,"click",function(){Xa!=gb&&(Xa.style.backgroundColor="",Xa=gb,Xa.style.backgroundColor=z,xa.scrollTop=0,xa.innerText="",V=0,lb=Va[Pa],ca=null,C(!1))})})(Da,va)}sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,"draw.io");Ja.appendChild(sa)}for(Da in Qa){sa=
+ya=null;if(null!=Qa[Da].content)va=document.createElement(Ka?"ul":"div"),sa=na(Da),va.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;",va.setAttribute("title",sa),mxUtils.write(va,sa),Ja.appendChild(va),sa=va;else{var Ka=Ta[Da];sa=va=document.createElement(Ka?"ul":"div");ya=Qa[Da];var Na=na(Da,ya);if(null!=Ka){ya=document.createElement("li");var Sa=document.createElement("div");
+Sa.className="geTempTreeCaret";Sa.setAttribute("title",Na);mxUtils.write(Sa,Na);sa=Sa;ya.appendChild(Sa);Na=document.createElement("ul");Na.className="geTempTreeNested";Na.style.visibility="hidden";for(var jb in Ka){var ab=document.createElement("li"),nb=na(jb,Ka[jb]);ab.setAttribute("title",nb);mxUtils.write(ab,nb);Aa(Da,ab,jb);Na.appendChild(ab)}ya.appendChild(Na);va.className="geTempTree";va.appendChild(ya);(function(Pa,gb){mxEvent.addListener(gb,"click",function(){Pa.style.visibility="visible";
+Pa.classList.toggle("geTempTreeActive");Pa.classList.toggle("geTempTreeNested")&&setTimeout(function(){Pa.style.visibility="hidden"},550);gb.classList.toggle("geTempTreeCaret-down")})})(Na,Sa)}else va.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;",va.setAttribute("title",Na),mxUtils.write(va,Na);null!=J&&(va.style.padding=J);Ja.appendChild(va)}Aa(Da,sa);null==Xa&&sa.click()}C(!1)}
+var H=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);n=null!=n?n:!0;v=null!=v?v:!1;z=null!=z?z:"light-dark(#ebf2f9, "+Editor.darkColor+")";L=null!=L?L:EditorUi.templateFile;var g=!1,p=document.createElement("div");p.style.userSelect="none";p.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";n&&p.appendChild(B);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";l||H||!n||B.appendChild(K);n&&mxUtils.write(B,(H?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");var M=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?M=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?M=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?M=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?M=b.gitHub.extension:b.mode==
+App.MODE_GITLAB&&null!=b.gitLab?M=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(M=b.trello.extension);var N=document.createElement("input");N.setAttribute("value",b.defaultFilename+M);N.style.marginLeft="10px";N.style.width=l||H?"144px":"244px";this.init=function(){n&&Editor.selectFilename(N);null!=xa.parentNode&&null!=xa.parentNode.parentNode&&mxEvent.addGestureListeners(xa.parentNode.parentNode,mxUtils.bind(this,function(na){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};
+if(n)if(B.appendChild(N),y)N.style.width=l||H?"350px":"450px";else if(null!=b.editor.diagramFileTypes){var R=FilenameDialog.createFileTypes(b,N,b.editor.diagramFileTypes);R.style.marginLeft="6px";R.style.width=l||H?"80px":"180px";B.appendChild(R)}var T=!1,V=0,X=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),W=mxUtils.button(t||mxResources.get("create"),function(){W.setAttribute("disabled",
+"disabled");U();W.removeAttribute("disabled")});W.className="geBtn gePrimaryBtn";var Y=document.createElement("img");Y.setAttribute("src",Editor.magnifyImage);Y.setAttribute("title",mxResources.get("preview"));Y.className="geButton geRoundButton";var Z=!1,aa=null,la=!1;if(c||f){var fa=[],ca=null,ja=null,ka=null,ba=function(na){W.setAttribute("disabled","disabled");for(var Aa=0;Aa<fa.length;Aa++)fa[Aa].className=Aa==na?"geBtn gePrimaryBtn":"geBtn"};T=!0;var ha=document.createElement("div");ha.style.whiteSpace=
+"nowrap";ha.style.height="30px";p.appendChild(ha);var ea=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ja.style.display="";Ca.style.display="";xa.style.left="160px";ba(0);xa.scrollTop=0;xa.innerText="";V=0;ca!=lb&&(lb=ca,Qa=ja,hb=ka,Ja.innerText="",G(),ca=null)});fa.push(ea);ha.appendChild(ea);var da=function(na){Ja.style.display="none";Ca.style.display="none";xa.style.left="30px";ba(na?-1:1);null==ca&&(ca=lb);xa.scrollTop=0;xa.innerText="";X.spin(xa);var Aa=function(sa,
+Da,va){V=0;X.stop();lb=sa;va=va||{};var ya=0,Ka;for(Ka in va)ya+=va[Ka].length;if(Da)xa.innerText=Da;else if(0==sa.length&&0==ya)xa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(xa.innerText="",0<ya){Ja.style.display="";xa.style.left="160px";Ja.innerText="";hb=0;Qa={"draw.io":sa};for(Ka in va)Qa[Ka]=va[Ka];G()}else C(!0)};na?f(qa.value,Aa):c(Aa)};if(c){var pa=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){da()});ha.appendChild(pa);fa.push(pa)}if(f){var oa=
+document.createElement("span");oa.style.marginLeft="10px";oa.innerText=mxResources.get("search")+":";ha.appendChild(oa);var qa=document.createElement("input");qa.style.marginRight="10px";qa.style.marginLeft="10px";qa.style.width="220px";mxEvent.addListener(qa,"keypress",function(na){13==na.keyCode&&da(!0)});ha.appendChild(qa);var ta=mxUtils.button(mxResources.get("search"),function(){da(!0)});ta.className="geBtn";ha.appendChild(ta)}ba(0)}var ia=null,ma=null,ua=null,ra=null,za=null,Ba=null,Ga=null,
+wa=null,Fa=null,xa=document.createElement("div");xa.style.border="1px solid #d3d3d3";xa.style.position="absolute";xa.style.left="160px";xa.style.right="34px";var Oa=(n?72:40)+(T?30:0);xa.style.top=Oa+"px";xa.style.bottom="68px";xa.style.margin="6px 0 0 -1px";xa.style.padding="6px";xa.style.overflow="auto";var Ca=document.createElement("div");Ca.style.cssText="position:absolute;left:30px;width:128px;top:"+Oa+"px;height:22px;margin-top: 6px;white-space: nowrap;";var Ea=document.createElement("input");
+Ea.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";Ea.setAttribute("placeholder",mxResources.get("search"));Ea.setAttribute("type","text");Ca.appendChild(Ea);var Ha=document.createElement("img");Ha.setAttribute("src",Editor.magnifyImage);Ha.setAttribute("title",mxResources.get("search"));Ha.className="geAdaptiveAsset";Ha.style.position="relative";Ha.style.cursor="pointer";Ha.style.outline="none";Ha.style.opacity="0.5";Ha.style.height=
+"16px";Ha.style.left="-20px";Ha.style.top="4px";Ca.appendChild(Ha);mxEvent.addListener(Ha,"click",function(){Ha.getAttribute("src")!=Editor.magnifyImage&&(Ha.setAttribute("src",Editor.magnifyImage),Ha.setAttribute("title",mxResources.get("search")),Ea.value="",null!=mb&&(mb.click(),mb=null));Ea.focus()});mxEvent.addListener(Ea,"keydown",mxUtils.bind(this,function(na){if(13==na.keyCode){var Aa=Ea.value;if(""==Aa)null!=mb&&(mb.click(),mb=null);else{if(null==NewDialog.tagsList[L]){var sa={};for(ab in Qa)if(null==
+Qa[ab].content)for(var Da=Qa[ab],va=0;va<Da.length;va++){var ya=Da[va];if(null!=ya.tags)for(var Ka=ya.tags.toLowerCase().split(";"),Na=0;Na<Ka.length;Na++)null==sa[Ka[Na]]&&(sa[Ka[Na]]=[]),sa[Ka[Na]].push(ya)}NewDialog.tagsList[L]=sa}var Sa=Aa.toLowerCase().split(" ");sa=NewDialog.tagsList[L];if(0<hb&&null==sa.__tagsList__){for(ab in Va)for(Da=Va[ab],va=0;va<Da.length;va++)for(ya=Da[va],Ka=ya.title.split(" "),Ka.push(ab),Na=0;Na<Ka.length;Na++){var jb=Ka[Na].toLowerCase();null==sa[jb]&&(sa[jb]=[]);
+sa[jb].push(ya)}sa.__tagsList__=!0}var ab=[];Da={};for(va=Ka=0;va<Sa.length;va++)if(0<Sa[va].length){jb=sa[Sa[va]];var nb={};ab=[];if(null!=jb)for(Na=0;Na<jb.length;Na++)ya=jb[Na],0==Ka==(null==Da[ya.url])&&(nb[ya.url]=!0,ab.push(ya));Da=nb;Ka++}xa.scrollTop=0;xa.innerText="";V=0;sa=document.createElement("div");sa.style.padding="6px";sa.style.whiteSpace="nowrap";sa.style.overflow="hidden";sa.style.textOverflow="ellipsis";ya=mxResources.get(0==ab.length?"noResultsFor":"resultsFor",[Aa]);sa.setAttribute("title",
+ya);mxUtils.write(sa,ya);xa.appendChild(sa);null!=Xa&&null==mb&&(Xa.style.backgroundColor="",mb=Xa,Xa=sa);lb=ab;ca=null;C(!1)}mxEvent.consume(na)}}));mxEvent.addListener(Ea,"keyup",mxUtils.bind(this,function(na){""==Ea.value?(Ha.setAttribute("src",Editor.magnifyImage),Ha.setAttribute("title",mxResources.get("search"))):(Ha.setAttribute("src",Editor.crossImage),Ha.setAttribute("title",mxResources.get("reset")))}));Oa+=23;var Ja=document.createElement("div");Ja.style.cssText="position:absolute;left:30px;width:128px;top:"+
+Oa+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(xa,"scroll",function(){null!=b.sidebar&&b.sidebar.hideTooltip()});var La=140,Za=La,$a=null,pb="url("+Editor.thinSparklesImage+")",Ua=document.createElement("div");Ua.className="geGenerateDiagramForm";Ua.style.position="absolute";Ua.style.width="100%";Ua.style.height="100%";var cb=document.createElement("div");cb.className="geTemplatePreview geAdaptiveAsset";cb.style.backgroundImage=pb;var eb=document.createElement("textarea");
+eb.setAttribute("placeholder",mxResources.get("describeYourDiagram"));eb.className="geGenerateDiagramDescription";var bb=document.createElement("button");bb.className="geBtn gePrimaryBtn geGenerateDiagramButton";bb.setAttribute("disabled","disabled");bb.setAttribute("title",mxResources.get("ok"));mxUtils.write(bb,mxResources.get("ok"));var ib=Y.cloneNode(!0);ib.style.display="none";var Ya=!1;mxEvent.addGestureListeners(ib,function(na){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},
+null,function(na){if(!Ya&&null!=wa){var Aa="<mxfile><diagram>"+Graph.compress(wa)+"</diagram></mxfile>";S(Aa,mxEvent.getClientX(na),mxEvent.getClientY(na),$a,Fa)}});var Ra=Y.cloneNode(!0);Ra.setAttribute("src",Editor.editImage);Ra.setAttribute("title",mxResources.get("edit"));Ra.style.visibility="hidden";Ra.style.left="0px";var Ma=Y.cloneNode(!0);Ma.setAttribute("src",Editor.helpImage);Ma.setAttribute("title",mxResources.get("help"));mxEvent.addListener(Ma,"click",function(na){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");
+mxEvent.consume(na)});Ua.appendChild(eb);Ua.appendChild(bb);Ua.appendChild(Ma);Ua.style.display="none";mxEvent.addListener(Ra,"click",O);mxEvent.addListener(eb,"input",function(){""!=eb.value?bb.removeAttribute("disabled"):bb.setAttribute("disabled","disabled")});var fb=!1;mxEvent.addListener(bb,"click",function(){u()});mxEvent.addListener(eb,"keydown",function(na){13!=na.keyCode||mxEvent.isShiftDown(na)?27==na.keyCode&&(u(!0),mxEvent.consume(na)):(u(),mxEvent.consume(na))});var Qa={},Ta={},Va={},
+hb=0,db=!0,Xa=null,mb=null;Qa.basic=E?[]:[{title:"blankDiagram"}];var lb=Qa.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Qa.basic.push({title:"generate",type:"generative"});if(!l){var vb=function(){mxUtils.get(sb,function(na){if(!zb){zb=!0;na=na.getXml().documentElement.firstChild;for(var Aa={};null!=na;){if("undefined"!==typeof na.getAttribute)if("parsererror"==na.nodeName)null!=window.console&&
+console.log("Parser error in "+L+": "+na.textContent);else if("clibs"==na.nodeName){for(var sa=na.getAttribute("name"),Da=na.getElementsByTagName("add"),va=[],ya=0;ya<Da.length;ya++)va.push(encodeURIComponent(mxUtils.getTextContent(Da[ya])));null!=sa&&0<va.length&&(Aa[sa]=va.join(";"))}else if(va=na.getAttribute("url"),null!=va){Da=na.getAttribute("section");sa=na.getAttribute("subsection");if(null==Da&&(ya=va.indexOf("/"),Da=va.substring(0,ya),null==sa)){var Ka=va.indexOf("/",ya+1);-1<Ka&&(sa=va.substring(ya+
+1,Ka))}ya=Qa[Da];null==ya&&(ya=[],Qa[Da]=ya);va=na.getAttribute("clibs");null!=Aa[va]&&(va=Aa[va]);va={url:na.getAttribute("url"),libs:na.getAttribute("libs"),title:na.getAttribute("title"),tooltip:na.getAttribute("name")||na.getAttribute("url"),preview:na.getAttribute("preview"),clibs:va,tags:na.getAttribute("tags")};ya.push(va);null!=sa&&(ya=Ta[Da],null==ya&&(ya={},Ta[Da]=ya),Da=ya[sa],null==Da&&(Da=[],ya[sa]=Da),Da.push(va))}na=na.nextSibling}X.stop();G()}})};p.appendChild(Ca);p.appendChild(Ja);
+p.appendChild(xa);var zb=!1,sb=L;/^https?:\/\//.test(sb)&&!b.editor.isCorsEnabledForUrl(sb)&&(sb=PROXY_URL+"?url="+encodeURIComponent(sb));X.spin(xa);null!=x?x(function(na,Aa){Va=na;ka=hb=Aa;vb()},vb):vb();ja=Qa}mxEvent.addListener(N,"keypress",function(na){b.dialog.container.firstChild==p&&13==na.keyCode&&U()});var kb=document.createElement("div");kb.style.marginTop=l?"4px":"16px";kb.style.textAlign="right";kb.style.position="absolute";kb.style.left="40px";kb.style.bottom="24px";kb.style.right="40px";
+var wb=mxUtils.button(mxResources.get("cancel"),function(){null!=A&&A();b.hideDialog(!0)});wb.className="geBtn";!b.editor.cancelFirst||v&&null==A||kb.appendChild(wb);if(!(l||"1"==urlParams.embed||v||mxClient.IS_ANDROID||mxClient.IS_IOS)&&"1"!=urlParams.noDevice){var Ab=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var na=new FilenameDialog(b,"",mxResources.get("create"),function(Aa){null!=Aa&&0<Aa.length&&b.editor.loadUrl(b.editor.getProxiedUrl(Aa),function(sa){ua=sa;ia=null;templateRealURl=
+Aa;b.hideDialog();U()},function(sa){b.handleError(sa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(na.container,300,80,!0,!0);na.init()});Ab.className="geBtn";kb.appendChild(Ab)}if(Graph.fileSupport&&m){var Bb=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var na=document.createElement("input");na.setAttribute("multiple","multiple");na.setAttribute("type","file");mxEvent.addListener(na,"change",function(Aa){b.openFiles(na.files,!0);na.value=""});na.style.display=
+"none";document.body.appendChild(na);b.newDlgFileInputElt=na}b.newDlgFileInputElt.click()});Bb.className="geBtn";kb.appendChild(Bb)}kb.appendChild(W);b.editor.cancelFirst||null!=d||v&&null==A||kb.appendChild(wb);p.appendChild(kb);this.container=p};NewDialog.tagsList={};
+var SaveDialog=function(b,l,n,d,v,A,z,D,P,J,L){function c(g,p,B,K,M,N){var R=null;if((null==d||0>mxUtils.indexOf(d,g))&&(null==P||g==P)&&(null==J||0<=mxUtils.indexOf(J,g))){M=null!=M?M:b.getTitleForService(g);var T=0<=mxUtils.indexOf(u,g);if(T||null!=b.getServiceForName(g)){R=document.createElement("option");var V="";!T&&b.isOffline(g==App.MODE_GOOGLE&&"1"==urlParams["gapi-stealth"])&&(R.setAttribute("disabled","disabled"),V=" ("+mxResources.get("offline")+")");if("pick"==N)R.innerHTML=mxUtils.htmlEntities(M)+
+"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+V,R.setAttribute("value","pickFolder-"+g),R.setAttribute("title",M+" - "+mxResources.get("pickFolder")+"...");else{T=g+(null!=B?"-"+B:"");var X=G[T];null!=X&&null!=X.option&&X.option.parentNode.removeChild(X.option);X=null;if(null!=p){"/"==p.charAt(p.length-1)&&(p=p.substring(0,p.length-1));"/"==p.charAt(0)&&(p=p.substring(1));X=p;if(g!=App.MODE_GITHUB&&g==App.MODE_GITLAB){var W=X.lastIndexOf("/");0<=W&&(X=
+X.substring(W+1))}40<X.length&&(X=X.substring(0,20)+"..."+X.substring(X.length-20))}R.innerHTML=mxUtils.htmlEntities(M)+(null!=X?"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(X):"")+V;R.setAttribute("title",M+(null!=p?" ("+p+")":"")+(null!=B&&decodeURIComponent(B)!=p?" ["+B+"]":""));R.setAttribute("value",T);G[T]={option:R,mode:g,path:p,id:B};SaveDialog.lastValue==T&&null==D&&"disabled"==!R.getAttribute("disabled")?K=!0:null==K&&("root"==N?K=null==D&&b.mode==g||null!=g&&g==D:"pickFolder-"==
+q.value.substring(0,11)&&(K=!0));K&&R.setAttribute("selected","selected")}q.appendChild(R)}}return R}function f(g){b.pickFolder(g,function(p){var B=null;g==App.MODE_GOOGLE&&null!=p.docs&&0<p.docs.length?B={mode:g,path:p.docs[0].name,id:p.docs[0].id}:g==App.MODE_ONEDRIVE&&null!=p.value&&0<p.value.length?B={mode:g,path:p.value[0].name,id:OneDriveFile.prototype.getIdOf(p.value[0])}:(g==App.MODE_GITHUB||g==App.MODE_GITLAB)&&null!=p&&0<p.length&&(B={mode:g,path:decodeURIComponent(p),id:p});null!=B&&(b.addRecent(B,
+"Folders",5),p=c(B.mode,B.path,B.id,!0),q.innerHTML="",G={},k(),B=q.selectedIndex,q.value=p.value,0>q.selectedIndex&&(q.selectedIndex=B))},!0,!0,!0,!0)}function k(){var g=b.getRecent("Folders"),p=0;if(null!=g&&0<g.length)for(var B=0;B<g.length;B++)null!=c(g[B].mode,g[B].path,g[B].id)&&p++;c(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");c(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(c(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),
null,null,"root"),c(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&c(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);c(App.MODE_GITHUB,null,null,null,null,"pick");c(App.MODE_GITLAB,null,null,null,null,"pick");c(App.MODE_TRELLO);g=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&g&&c(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=d&&0<=mxUtils.indexOf(d,App.MODE_BROWSER)?!0:null);isLocalStorage&&
-"0"!=urlParams.browser&&c(App.MODE_BROWSER);g&&c("download");Editor.popupsAllowed&&c("_blank",null,null,null,mxResources.get("openInNewWindow"));"pickFolder-"==q.value.substring(0,11)&&(g=document.createElement("option"),g.setAttribute("value",""),g.setAttribute("selected","selected"),mxUtils.write(g,mxResources.get("pickFolder")+"..."),q.insertBefore(g,q.firstChild));J=q.value}function m(){if("pickFolder-"==q.value.substring(0,11)){var g=q.value.substring(11);q.value=J;f(g)}else if(null!=P&&null!=
-G[q.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[P.value].extension){g=b.getExtensionForService(G[q.value].mode);var p=T.value;null!=g&&0>k.indexOf(".")&&0>p.indexOf(".")&&(T.value=p+g)}H.innerHTML="";mxUtils.write(H,null!=L?L:mxResources.get("download"==q.value||"_blank"==q.value||null!=N?"ok":"save"));""==q.value?H.setAttribute("disabled","disabled"):H.removeAttribute("disabled")}var t=document.createElement("div");t.style.display="flex";t.style.flexWrap="wrap";t.style.whiteSpace=
-"nowrap";var v=document.createElement("div");v.style.display="grid";v.style.gap="5px 8px";v.style.gridAutoRows="auto auto 44px";v.style.gridAutoColumns="0fr minmax(0,1fr)";v.style.width="100%";var B=null,E=null;if(null!=x&&null!=z&&"image/"==z.substring(0,6)&&("image/svg"!=z.substring(0,9)||mxClient.IS_SVG)){v.style.display="inline-grid";v.style.flexBasis="75%";B=document.createElement("div");B.style.display="inline-block";B.style.height="auto";B.style.maxWidth="25%";B.style.margin="auto";var D=document.createElement("img"),
-A=y?x:btoa(unescape(encodeURIComponent(x))),S="data:"+z+";base64,"+A;D.setAttribute("src",S);D.style.boxSizing="border-box";D.style.maxHeight="50px";D.style.maxWidth="100%";D.style.paddingLeft="10px";B.appendChild(D);"image/png"!=z&&"image/svg+xml"!=z||"function"!==typeof window.ClipboardItem||null==navigator.clipboard||(E=mxUtils.button(mxResources.get("copy"),function(){b.writeImageToClipboard(S,null,null,z,mxUtils.bind(this,function(){"copy"==F?b.hideDialog():b.alert(mxResources.get("copiedToClipboard"))}),
-mxUtils.bind(this,function(g){b.handleError(g)}))},null,"geBtn"));Editor.popupsAllowed&&(null==d||0>mxUtils.indexOf(d,"_blank"))?(B.setAttribute("title",mxResources.get("openInNewWindow")),B.style.cursor="pointer",mxEvent.addGestureListeners(B,null,null,function(g){mxEvent.isPopupTrigger(g)||b.openInNewWindow(x,z,y)})):B.setAttribute("title",mxResources.get("preview"))}A=document.createElement("div");A.style.display="flex";A.style.padding="1px";A.style.alignItems="center";A.style.justifyContent="flex-end";
-A.style.gridColumn="1";A.style.whiteSpace="nowrap";var R=document.createElement("div");R.style.display="grid";R.style.padding="1px";R.style.alignItems="center";R.style.gridColumn="2";R.style.gridAutoColumns="minmax(0,1fr) auto";R.style.gap="6px";mxUtils.write(A,mxResources.get("saveAs")+":");var T=document.createElement("input");T.setAttribute("type","text");T.setAttribute("value",k);T.style.boxSizing="border-box";T.style.width="100%";R.appendChild(T);null==N&&(v.appendChild(A),v.appendChild(R));
-var P=null;null!=b.editor.diagramFileTypes&&null==z&&null==N&&(A=A.cloneNode(!1),R=R.cloneNode(!1),mxUtils.write(A,mxResources.get("type")+":"),P=FilenameDialog.createFileTypes(b,T,b.editor.diagramFileTypes),P.style.boxSizing="border-box",P.style.width="100%",R.appendChild(P),v.appendChild(A),v.appendChild(R));A=A.cloneNode(!1);R=R.cloneNode(!1);mxUtils.write(A,mxResources.get("where")+":");var q=document.createElement("select");q.style.textOverflow="ellipsis";q.style.gridColumn="1";var u=["browser",
-"device","download","_blank"],J=null,G={};D=mxUtils.button(mxResources.get("reset"),function(){T.value=k;T.dispatchEvent(new Event("change"));b.resetRecent("Folders");q.innerHTML="";q.value="";pickFolderOption=null;G={};l()},null,"geBtn");var H=mxUtils.button("",function(){SaveDialog.lastValue=q.value;var g=G[SaveDialog.lastValue];null!=g&&n(T,g.mode,g.id)},null,"geBtn gePrimaryBtn");mxEvent.addListener(T,"keypress",function(g){13==g.keyCode&&("copy"==F&&null!=E?E.click():H.click())});mxEvent.addListener(q,
-"change",m);l();R.appendChild(q);null!=SaveDialog.lastValue&&null!=G[SaveDialog.lastValue]&&(q.value=SaveDialog.lastValue);m();v.appendChild(A);v.appendChild(R);t.appendChild(v);null!=B&&t.appendChild(B);v=document.createElement("div");v.style.flexBasis="100%";v.style.textAlign="right";v.style.marginTop=null!=z?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||v.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));B=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},
-null,"geBtn");b.editor.cancelFirst&&v.appendChild(B);v.appendChild(D);"copy"==F&&null!=E?(E.className="geBtn gePrimaryBtn",H.className="geBtn",v.appendChild(H),v.appendChild(E)):(null!=E&&v.appendChild(E),v.appendChild(H));b.editor.cancelFirst||v.appendChild(B);t.appendChild(v);this.init=function(){Editor.selectFilename(T)};this.container=t},CreateDialog=function(b,k,n,d,x,z,y,F,N,K,L,c,f,l,m,t,v){function B(q,u,J,G){function H(){mxEvent.addListener(g,"click",function(){var O=J;if(y){var Q=A.value,
-U=Q.lastIndexOf(".");if(0>k.lastIndexOf(".")&&0>U){O=null!=O?O:P.value;var V="";O==App.MODE_GOOGLE?V=b.drive.extension:O==App.MODE_GITHUB?V=b.gitHub.extension:O==App.MODE_GITLAB?V=b.gitLab.extension:O==App.MODE_TRELLO?V=b.trello.extension:O==App.MODE_DROPBOX?V=b.dropbox.extension:O==App.MODE_ONEDRIVE?V=b.oneDrive.extension:O==App.MODE_DEVICE&&(V=".drawio");0<=U&&(Q=Q.substring(0,U));A.value=Q+V}}E(J)})}var g=document.createElement("a");g.style.overflow="hidden";var p=document.createElement("img");
-p.src=q;p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.width="60px";p.style.height="60px";p.style.paddingBottom="6px";g.style.display="inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding="8px 8px 10px 8px";g.style.whiteSpace="nowrap";g.appendChild(p);g.style.color="gray";g.style.fontSize="11px";var C=document.createElement("div");g.appendChild(C);mxUtils.write(C,u);if(null!=G&&null==b[G]){p.style.visibility="hidden";mxUtils.setOpacity(C,
-10);var I=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});I.spin(g);var M=window.setTimeout(function(){null==b[G]&&(I.stop(),g.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[G]&&(window.clearTimeout(M),mxUtils.setOpacity(C,100),p.style.visibility="",I.stop(),H())}))}else H();R.appendChild(g);++T==c&&(mxUtils.br(R),T=0)}function E(q){var u=A.value;
-if(null==q||null!=u&&0<u.length)v&&b.hideDialog(),n(u,q,A)}L="1"==urlParams.noDevice?!1:L;y=null!=y?y:!0;F=null!=F?F:!0;c=null!=c?c:4;v=null!=v?v:!0;z=document.createElement("div");z.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(z);var D=document.createElement("h2");mxUtils.write(D,x||mxResources.get("create"));D.style.marginTop="0px";D.style.marginBottom="24px";z.appendChild(D);x=document.createElement("span");mxUtils.write(x,mxResources.get("filename")+":");x.style.maxWidth="106px";x.style.overflow=
-"hidden";x.style.textOverflow="ellipsis";x.style.display="inline-block";z.appendChild(x);var A=document.createElement("input");A.setAttribute("value",k);A.style.width="180px";A.style.marginLeft="10px";A.style.marginBottom="20px";A.style.maxWidth="70%";this.init=function(){Editor.selectFilename(A)};z.appendChild(A);null!=t&&null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,A,b.editor.diagramFileTypes),t.style.marginLeft="6px",t.style.width="90px",z.appendChild(t));t=null;if("1"!=
-urlParams.noDevice&&null!=f&&null!=l&&"image/"==l.substring(0,6)&&("image/svg"!=l.substring(0,9)||mxClient.IS_SVG)){A.style.width="160px";x=document.createElement("img");var S=m?f:btoa(unescape(encodeURIComponent(f)));x.setAttribute("src","data:"+l+";base64,"+S);x.style.position="absolute";x.style.top="70px";x.style.right="100px";x.style.maxWidth="120px";x.style.maxHeight="80px";mxUtils.setPrefixedStyle(x.style,"transform","translate(50%,-50%)");z.appendChild(x);mxClient.IS_FF||"image/png"!=l||null==
-navigator.clipboard||"function"!==typeof window.ClipboardItem||(t=mxUtils.button(mxResources.get("copy"),function(q){q=b.base64ToBlob(S,"image/png");q=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="data:'+l+";base64,"+S+'">'],{type:"text/html"})});navigator.clipboard.write([q]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(u){b.handleError(u)}))}),t.style.marginTop="6px",t.className="geBtn");N&&Editor.popupsAllowed&&
-(x.style.cursor="pointer",mxEvent.addGestureListeners(x,null,null,function(q){mxEvent.isPopupTrigger(q)||E("_blank")}))}mxUtils.br(z);var R=document.createElement("div");R.style.textAlign="center";var T=0;R.style.marginTop="6px";z.appendChild(R);var P=document.createElement("select");P.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(f,mxResources.get("googleDrive")),
-P.appendChild(f),B(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(f,mxResources.get("oneDrive")),P.appendChild(f),b.mode==App.MODE_ONEDRIVE&&f.setAttribute("selected","selected"),B(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(f=document.createElement("option"),
-f.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(f,mxResources.get("dropbox")),P.appendChild(f),b.mode==App.MODE_DROPBOX&&f.setAttribute("selected","selected"),B(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITHUB),mxUtils.write(f,mxResources.get("github")),P.appendChild(f),B(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&
-(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITLAB),mxUtils.write(f,mxResources.get("gitlab")),P.appendChild(f),B(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_TRELLO),mxUtils.write(f,mxResources.get("trello")),P.appendChild(f),B(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||
-"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)f=document.createElement("option"),f.setAttribute("value",App.MODE_DEVICE),mxUtils.write(f,mxResources.get("device")),P.appendChild(f),b.mode!=App.MODE_DEVICE&&F||f.setAttribute("selected","selected"),L&&B(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);F&&isLocalStorage&&"0"!=urlParams.browser&&(F=document.createElement("option"),F.setAttribute("value",App.MODE_BROWSER),mxUtils.write(F,
-mxResources.get("browser")),P.appendChild(F),b.mode==App.MODE_BROWSER&&F.setAttribute("selected","selected"),B(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));F=document.createElement("div");F.style.marginTop="26px";F.style.textAlign="center";null!=K&&(L=mxUtils.button(mxResources.get("help"),function(){b.openLink(K)}),L.className="geBtn",F.appendChild(L));L=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),
-window.close(),window.location.href=b.getUrl())});L.className="geBtn";b.editor.cancelFirst&&null==d&&F.appendChild(L);null==d&&(f=mxUtils.button(mxResources.get("decideLater"),function(){E(null)}),f.className="geBtn",F.appendChild(f));N&&Editor.popupsAllowed&&(N=mxUtils.button(mxResources.get("openInNewWindow"),function(){E("_blank")}),N.className="geBtn",F.appendChild(N));CreateDialog.showDownloadButton&&(N=mxUtils.button(mxResources.get("download"),function(){E("download")}),N.className="geBtn",
-F.appendChild(N),null!=t&&(N.style.marginTop="6px",F.style.marginTop="6px"));null!=t&&(mxUtils.br(F),F.appendChild(t));b.editor.cancelFirst&&null==d||F.appendChild(L);mxEvent.addListener(A,"keypress",function(q){13==q.keyCode?E(App.MODE_DEVICE):27==q.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});z.appendChild(F);this.container=z};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
-var PopupDialog=function(b,k,n,d,x){x=null!=x?x:!0;var z=document.createElement("div");z.style.textAlign="center";z.style.height="100%";mxUtils.write(z,mxResources.get("fileOpenLocation"));mxUtils.br(z);mxUtils.br(z);var y=mxUtils.button(mxResources.get("openInThisWindow"),function(){x&&b.hideDialog();null!=d&&d()});y.className="geBtn";y.style.marginBottom="8px";y.style.width="280px";z.appendChild(y);mxUtils.br(z);var F=mxUtils.button(mxResources.get("openInNewWindow"),function(){x&&b.hideDialog();
-null!=n&&n();b.openLink(k,null,!0)});F.className="geBtn gePrimaryBtn";F.style.width=y.style.width;z.appendChild(F);mxUtils.br(z);mxUtils.br(z);mxUtils.write(z,mxResources.get("allowPopups"));this.container=z},ImageDialog=function(b,k,n,d,x,z,y,F){function N(){0<c.value.length?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled");"data:"!=c.value.substring(0,5)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")}z=null!=z?z:!0;var K=b.editor.graph,L=document.createElement("div");
-mxUtils.write(L,k);k=document.createElement("div");k.className="geTitle";k.style.backgroundColor="transparent";k.style.borderColor="transparent";k.style.whiteSpace="nowrap";k.style.textOverflow="clip";k.style.cursor="default";k.style.paddingRight="20px";var c=document.createElement("input");c.setAttribute("value",n);c.setAttribute("type","text");c.setAttribute("spellcheck","false");c.setAttribute("autocorrect","off");c.setAttribute("autocomplete","off");c.setAttribute("autocapitalize","off");c.style.marginTop=
+"0"!=urlParams.browser&&c(App.MODE_BROWSER);g&&c("download");Editor.popupsAllowed&&c("_blank",null,null,null,mxResources.get("openInNewWindow"));"pickFolder-"==q.value.substring(0,11)&&(g=document.createElement("option"),g.setAttribute("value",""),g.setAttribute("selected","selected"),mxUtils.write(g,mxResources.get("pickFolder")+"..."),q.insertBefore(g,q.firstChild));I=q.value}function m(){if("pickFolder-"==q.value.substring(0,11)){var g=q.value.substring(11);q.value=I;f(g)}else if(null!=O&&null!=
+G[q.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[O.value].extension){g=b.getExtensionForService(G[q.value].mode);var p=Q.value;null!=g&&0>l.indexOf(".")&&0>p.indexOf(".")&&(Q.value=p+g)}H.innerHTML="";mxUtils.write(H,null!=L?L:mxResources.get("download"==q.value||"_blank"==q.value||null!=P?"ok":"save"));""==q.value?H.setAttribute("disabled","disabled"):H.removeAttribute("disabled")}var t=document.createElement("div");t.style.display="flex";t.style.flexWrap="wrap";t.style.whiteSpace=
+"nowrap";var x=document.createElement("div");x.style.display="grid";x.style.gap="5px 8px";x.style.gridAutoRows="auto auto 44px";x.style.gridAutoColumns="0fr minmax(0,1fr)";x.style.width="100%";var y=null,F=null;if(null!=v&&null!=A&&"image/"==A.substring(0,6)&&("image/svg"!=A.substring(0,9)||mxClient.IS_SVG)){x.style.display="inline-grid";x.style.flexBasis="75%";y=document.createElement("div");y.style.display="inline-block";y.style.height="auto";y.style.maxWidth="25%";y.style.margin="auto";var E=document.createElement("img"),
+C=z?v:btoa(unescape(encodeURIComponent(v))),S="data:"+A+";base64,"+C;E.setAttribute("src",S);E.style.boxSizing="border-box";E.style.maxHeight="50px";E.style.maxWidth="100%";E.style.paddingLeft="10px";y.appendChild(E);"image/png"!=A&&"image/svg+xml"!=A||"function"!==typeof window.ClipboardItem||null==navigator.clipboard||(F=mxUtils.button(mxResources.get("copy"),function(){b.writeImageToClipboard(S,null,null,A,mxUtils.bind(this,function(){"copy"==D?b.hideDialog():b.alert(mxResources.get("copiedToClipboard"))}),
+mxUtils.bind(this,function(g){b.handleError(g)}))},null,"geBtn"));Editor.popupsAllowed&&(null==d||0>mxUtils.indexOf(d,"_blank"))?(y.setAttribute("title",mxResources.get("openInNewWindow")),y.style.cursor="pointer",mxEvent.addGestureListeners(y,null,null,function(g){mxEvent.isPopupTrigger(g)||b.openInNewWindow(v,A,z)})):y.setAttribute("title",mxResources.get("preview"))}C=document.createElement("div");C.style.display="flex";C.style.padding="1px";C.style.alignItems="center";C.style.justifyContent="flex-end";
+C.style.gridColumn="1";C.style.whiteSpace="nowrap";var U=document.createElement("div");U.style.display="grid";U.style.padding="1px";U.style.alignItems="center";U.style.gridColumn="2";U.style.gridAutoColumns="minmax(0,1fr) auto";U.style.gap="6px";mxUtils.write(C,mxResources.get("saveAs")+":");var Q=document.createElement("input");Q.setAttribute("type","text");Q.setAttribute("value",l);Q.style.boxSizing="border-box";Q.style.width="100%";U.appendChild(Q);null==P&&(x.appendChild(C),x.appendChild(U));
+var O=null;null!=b.editor.diagramFileTypes&&null==A&&null==P&&(C=C.cloneNode(!1),U=U.cloneNode(!1),mxUtils.write(C,mxResources.get("type")+":"),O=FilenameDialog.createFileTypes(b,Q,b.editor.diagramFileTypes),O.style.boxSizing="border-box",O.style.width="100%",U.appendChild(O),x.appendChild(C),x.appendChild(U));C=C.cloneNode(!1);U=U.cloneNode(!1);mxUtils.write(C,mxResources.get("where")+":");var q=document.createElement("select");q.style.textOverflow="ellipsis";q.style.gridColumn="1";var u=["browser",
+"device","download","_blank"],I=null,G={};E=mxUtils.button(mxResources.get("reset"),function(){Q.value=l;Q.dispatchEvent(new Event("change"));b.resetRecent("Folders");q.innerHTML="";q.value="";pickFolderOption=null;G={};k()},null,"geBtn");var H=mxUtils.button("",function(){SaveDialog.lastValue=q.value;var g=G[SaveDialog.lastValue];null!=g&&n(Q,g.mode,g.id)},null,"geBtn gePrimaryBtn");mxEvent.addListener(Q,"keypress",function(g){13==g.keyCode&&("copy"==D&&null!=F?F.click():H.click())});mxEvent.addListener(q,
+"change",m);k();U.appendChild(q);null!=SaveDialog.lastValue&&null!=G[SaveDialog.lastValue]&&(q.value=SaveDialog.lastValue);m();x.appendChild(C);x.appendChild(U);t.appendChild(x);null!=y&&t.appendChild(y);x=document.createElement("div");x.style.flexBasis="100%";x.style.textAlign="right";x.style.marginTop=null!=A?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||x.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},
+null,"geBtn");b.editor.cancelFirst&&x.appendChild(y);x.appendChild(E);"copy"==D&&null!=F?(F.className="geBtn gePrimaryBtn",H.className="geBtn",x.appendChild(H),x.appendChild(F)):(null!=F&&x.appendChild(F),x.appendChild(H));b.editor.cancelFirst||x.appendChild(y);t.appendChild(x);this.init=function(){Editor.selectFilename(Q)};this.container=t},CreateDialog=function(b,l,n,d,v,A,z,D,P,J,L,c,f,k,m,t,x){function y(q,u,I,G){function H(){mxEvent.addListener(g,"click",function(){var N=I;if(z){var R=C.value,
+T=R.lastIndexOf(".");if(0>l.lastIndexOf(".")&&0>T){N=null!=N?N:O.value;var V="";N==App.MODE_GOOGLE?V=b.drive.extension:N==App.MODE_GITHUB?V=b.gitHub.extension:N==App.MODE_GITLAB?V=b.gitLab.extension:N==App.MODE_TRELLO?V=b.trello.extension:N==App.MODE_DROPBOX?V=b.dropbox.extension:N==App.MODE_ONEDRIVE?V=b.oneDrive.extension:N==App.MODE_DEVICE&&(V=".drawio");0<=T&&(R=R.substring(0,T));C.value=R+V}}F(I)})}var g=document.createElement("a");g.style.overflow="hidden";var p=document.createElement("img");
+p.src=q;p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.width="60px";p.style.height="60px";p.style.paddingBottom="6px";g.style.display="inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding="8px 8px 10px 8px";g.style.whiteSpace="nowrap";g.appendChild(p);g.style.color="gray";g.style.fontSize="11px";var B=document.createElement("div");g.appendChild(B);mxUtils.write(B,u);if(null!=G&&null==b[G]){p.style.visibility="hidden";mxUtils.setOpacity(B,
+10);var K=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});K.spin(g);var M=window.setTimeout(function(){null==b[G]&&(K.stop(),g.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[G]&&(window.clearTimeout(M),mxUtils.setOpacity(B,100),p.style.visibility="",K.stop(),H())}))}else H();U.appendChild(g);++Q==c&&(mxUtils.br(U),Q=0)}function F(q){var u=C.value;
+if(null==q||null!=u&&0<u.length)x&&b.hideDialog(),n(u,q,C)}L="1"==urlParams.noDevice?!1:L;z=null!=z?z:!0;D=null!=D?D:!0;c=null!=c?c:4;x=null!=x?x:!0;A=document.createElement("div");A.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(A);var E=document.createElement("h2");mxUtils.write(E,v||mxResources.get("create"));E.style.marginTop="0px";E.style.marginBottom="24px";A.appendChild(E);v=document.createElement("span");mxUtils.write(v,mxResources.get("filename")+":");v.style.maxWidth="106px";v.style.overflow=
+"hidden";v.style.textOverflow="ellipsis";v.style.display="inline-block";A.appendChild(v);var C=document.createElement("input");C.setAttribute("value",l);C.style.width="180px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){Editor.selectFilename(C)};A.appendChild(C);null!=t&&null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),t.style.marginLeft="6px",t.style.width="90px",A.appendChild(t));t=null;if("1"!=
+urlParams.noDevice&&null!=f&&null!=k&&"image/"==k.substring(0,6)&&("image/svg"!=k.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";v=document.createElement("img");var S=m?f:btoa(unescape(encodeURIComponent(f)));v.setAttribute("src","data:"+k+";base64,"+S);v.style.position="absolute";v.style.top="70px";v.style.right="100px";v.style.maxWidth="120px";v.style.maxHeight="80px";mxUtils.setPrefixedStyle(v.style,"transform","translate(50%,-50%)");A.appendChild(v);mxClient.IS_FF||"image/png"!=k||null==
+navigator.clipboard||"function"!==typeof window.ClipboardItem||(t=mxUtils.button(mxResources.get("copy"),function(q){q=b.base64ToBlob(S,"image/png");q=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="data:'+k+";base64,"+S+'">'],{type:"text/html"})});navigator.clipboard.write([q]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(u){b.handleError(u)}))}),t.style.marginTop="6px",t.className="geBtn");P&&Editor.popupsAllowed&&
+(v.style.cursor="pointer",mxEvent.addGestureListeners(v,null,null,function(q){mxEvent.isPopupTrigger(q)||F("_blank")}))}mxUtils.br(A);var U=document.createElement("div");U.style.textAlign="center";var Q=0;U.style.marginTop="6px";A.appendChild(U);var O=document.createElement("select");O.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(f,mxResources.get("googleDrive")),
+O.appendChild(f),y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(f,mxResources.get("oneDrive")),O.appendChild(f),b.mode==App.MODE_ONEDRIVE&&f.setAttribute("selected","selected"),y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(f=document.createElement("option"),
+f.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(f,mxResources.get("dropbox")),O.appendChild(f),b.mode==App.MODE_DROPBOX&&f.setAttribute("selected","selected"),y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITHUB),mxUtils.write(f,mxResources.get("github")),O.appendChild(f),y(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&
+(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITLAB),mxUtils.write(f,mxResources.get("gitlab")),O.appendChild(f),y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_TRELLO),mxUtils.write(f,mxResources.get("trello")),O.appendChild(f),y(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||
+"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)f=document.createElement("option"),f.setAttribute("value",App.MODE_DEVICE),mxUtils.write(f,mxResources.get("device")),O.appendChild(f),b.mode!=App.MODE_DEVICE&&D||f.setAttribute("selected","selected"),L&&y(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);D&&isLocalStorage&&"0"!=urlParams.browser&&(D=document.createElement("option"),D.setAttribute("value",App.MODE_BROWSER),mxUtils.write(D,
+mxResources.get("browser")),O.appendChild(D),b.mode==App.MODE_BROWSER&&D.setAttribute("selected","selected"),y(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));D=document.createElement("div");D.style.marginTop="26px";D.style.textAlign="center";null!=J&&(L=mxUtils.button(mxResources.get("help"),function(){b.openLink(J)}),L.className="geBtn",D.appendChild(L));L=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),
+window.close(),window.location.href=b.getUrl())});L.className="geBtn";b.editor.cancelFirst&&null==d&&D.appendChild(L);null==d&&(f=mxUtils.button(mxResources.get("decideLater"),function(){F(null)}),f.className="geBtn",D.appendChild(f));P&&Editor.popupsAllowed&&(P=mxUtils.button(mxResources.get("openInNewWindow"),function(){F("_blank")}),P.className="geBtn",D.appendChild(P));CreateDialog.showDownloadButton&&(P=mxUtils.button(mxResources.get("download"),function(){F("download")}),P.className="geBtn",
+D.appendChild(P),null!=t&&(P.style.marginTop="6px",D.style.marginTop="6px"));null!=t&&(mxUtils.br(D),D.appendChild(t));b.editor.cancelFirst&&null==d||D.appendChild(L);mxEvent.addListener(C,"keypress",function(q){13==q.keyCode?F(App.MODE_DEVICE):27==q.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});A.appendChild(D);this.container=A};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+var PopupDialog=function(b,l,n,d,v){v=null!=v?v:!0;var A=document.createElement("div");A.style.textAlign="center";A.style.height="100%";mxUtils.write(A,mxResources.get("fileOpenLocation"));mxUtils.br(A);mxUtils.br(A);var z=mxUtils.button(mxResources.get("openInThisWindow"),function(){v&&b.hideDialog();null!=d&&d()});z.className="geBtn";z.style.marginBottom="8px";z.style.width="280px";A.appendChild(z);mxUtils.br(A);var D=mxUtils.button(mxResources.get("openInNewWindow"),function(){v&&b.hideDialog();
+null!=n&&n();b.openLink(l,null,!0)});D.className="geBtn gePrimaryBtn";D.style.width=z.style.width;A.appendChild(D);mxUtils.br(A);mxUtils.br(A);mxUtils.write(A,mxResources.get("allowPopups"));this.container=A},ImageDialog=function(b,l,n,d,v,A,z,D){function P(){0<c.value.length?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled");"data:"!=c.value.substring(0,5)?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}A=null!=A?A:!0;var J=b.editor.graph,L=document.createElement("div");
+mxUtils.write(L,l);l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";l.style.paddingRight="20px";var c=document.createElement("input");c.setAttribute("value",n);c.setAttribute("type","text");c.setAttribute("spellcheck","false");c.setAttribute("autocorrect","off");c.setAttribute("autocomplete","off");c.setAttribute("autocapitalize","off");c.style.marginTop=
"6px";c.style.width=(Graph.fileSupport?460:340)-20+"px";c.style.backgroundImage="url('"+Editor.crossImage+"')";c.style.backgroundRepeat="no-repeat";c.style.backgroundPosition="100% 50%";c.style.paddingRight="14px";n=document.createElement("div");n.setAttribute("title",mxResources.get("reset"));n.style.position="relative";n.style.left="-16px";n.style.width="12px";n.style.height="14px";n.style.cursor="pointer";n.style.display="inline-block";n.style.top="3px";n.style.background="url('"+b.editor.transparentImage+
-"')";mxEvent.addListener(n,"click",function(){c.value="";c.focus()});k.appendChild(c);k.appendChild(n);L.appendChild(k);var f=F,l,m,t=function(A,S,R,T){var P="data:"==A.substring(0,5);!b.isOffline()||P&&"undefined"===typeof chrome?0<A.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(A,function(q){b.spinner.stop();b.hideDialog();var u=!1===T?1:null!=S&&null!=R?Math.max(S/q.width,R/q.height):Math.min(1,Math.min(520/q.width,520/q.height));z&&(A=b.convertDataUri(A));d(A,
-Math.round(Number(q.width)*u),Math.round(Number(q.height)*u),f,l,m)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(A,null,null,f,l,m)):(A=b.convertDataUri(A),S=null==S?120:S,R=null==R?100:R,b.hideDialog(),d(A,S,R,f,l,m))},v=function(A,S){if(null!=A){var R=x?null:K.getModel().getGeometry(K.getSelectionCell());null!=R?t(A,R.width,R.height,S):t(A,null,null,S)}else b.hideDialog(),d(null)};this.init=function(){c.focus();
-if(Graph.fileSupport){c.setAttribute("placeholder",mxResources.get("dragImagesHere"));var A=L.parentNode,S=null;mxEvent.addListener(A,"dragleave",function(R){null!=S&&(S.parentNode.removeChild(S),S=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(R){null==S&&(S=b.highlightElement(A));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(A,"drop",mxUtils.bind(this,function(R){null!=S&&(S.parentNode.removeChild(S),S=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,
-0,0,b.maxImageSize,function(P,q,u,J,G,H,g,p){v(P,p)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var q=0;q<P.length;q++)P[q]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var T=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(T)&&v(decodeURIComponent(T))}R.stopPropagation();R.preventDefault()}),!1)}};F=document.createElement("div");F.style.marginTop="14px";F.style.textAlign=
-"center";n=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});n.className="geBtn";b.editor.cancelFirst&&F.appendChild(n);ImageDialog.filePicked=function(A){A.action==google.picker.Action.PICKED&&null!=A.docs[0].thumbnails&&(A=A.docs[0].thumbnails[A.docs[0].thumbnails.length-1],null!=A&&(c.value=A.url));c.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type",
-"file");mxEvent.addListener(B,"change",function(A){null!=B.files&&(b.importFiles(B.files,0,0,b.maxImageSize,function(S,R,T,P,q,u){v(S)},function(){},function(S){return"image/"==S.type.substring(0,6)},function(S){for(var R=0;R<S.length;R++)S[R]()},!0),B.type="",B.type="file",B.value="")});B.style.display="none";document.body.appendChild(B);b.imgDlgFileInputElt=B}k=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});k.className="geBtn";F.appendChild(k)}mxEvent.addListener(c,
-"keypress",function(A){13==A.keyCode&&v(c.value)});var E=mxUtils.button(mxResources.get("crop"),function(){var A=new CropImageDialog(b,c.value,f,function(S,R,T){f=S;l=R;m=T});b.showDialog(A.container,300,390,!0,!0)});y&&(E.className="geBtn",F.appendChild(E));var D=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=c.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var A=b.editor.createImageUrlConverter().convert(c.value),S=new Image;S.onload=function(){b.editor.convertImageToDataUri(A,
-function(R){b.confirmImageResize(function(T){b.resizeImage(S,R,mxUtils.bind(this,function(P,q,u){b.spinner.stop();null!=P&&P.length<b.maxImageBytes?(c.value=P,N()):b.handleError({message:mxResources.get("imageTooBig")})}),T,b.maxImageSize)},S.width>b.maxImageSize||S.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};S.onerror=function(){b.spinner.stop();b.handleError({message:mxResources.get("fileNotFound")})};
-S.src=A}});D.className="geBtn";mxEvent.addListener(c,"change",function(A){f=null;N()});N();F.appendChild(D);y=mxUtils.button(mxResources.get("apply"),function(){v(c.value)});y.className="geBtn gePrimaryBtn";F.appendChild(y);b.editor.cancelFirst||F.appendChild(n);Graph.fileSupport&&(F.style.marginTop="120px",L.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",L.style.backgroundPosition="center 65%",L.style.backgroundRepeat="no-repeat",y=document.createElement("div"),y.style.position="absolute",
-y.style.width="420px",y.style.top="58%",y.style.textAlign="center",y.style.fontSize="18px",y.style.color="#a0c3ff",mxUtils.write(y,mxResources.get("dragImagesHere")),L.appendChild(y));L.appendChild(F);this.container=L},LinkDialog=function(b,k,n,d,x,z,y){function F(A,S){var R=document.createElement("option");mxUtils.write(R,mxResources.get(A));R.value=A;E.appendChild(R);D[A]=S}var N=document.createElement("div");N.style.height="100%";mxUtils.write(N,mxResources.get("editLink")+":");var K=document.createElement("div");
-K.className="geUrlLinkContainer";K.style.backgroundColor="transparent";K.style.borderColor="transparent";K.style.whiteSpace="nowrap";K.style.textOverflow="clip";K.style.cursor="default";var L=document.createElement("input");L.setAttribute("placeholder",mxResources.get("dragUrlsHere"));L.setAttribute("type","text");L.style.marginTop="6px";L.style.width="414px";L.style.boxSizing="border-box";L.style.backgroundRepeat="no-repeat";L.style.backgroundPosition="100% 50%";L.style.paddingRight="16px";L.style.marginBottom=
+"')";mxEvent.addListener(n,"click",function(){c.value="";c.focus()});l.appendChild(c);l.appendChild(n);L.appendChild(l);var f=D,k,m,t=function(C,S,U,Q){var O="data:"==C.substring(0,5);!b.isOffline()||O&&"undefined"===typeof chrome?0<C.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(C,function(q){b.spinner.stop();b.hideDialog();var u=!1===Q?1:null!=S&&null!=U?Math.max(S/q.width,U/q.height):Math.min(1,Math.min(520/q.width,520/q.height));A&&(C=b.convertDataUri(C));d(C,
+Math.round(Number(q.width)*u),Math.round(Number(q.height)*u),f,k,m)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(C,null,null,f,k,m)):(C=b.convertDataUri(C),S=null==S?120:S,U=null==U?100:U,b.hideDialog(),d(C,S,U,f,k,m))},x=function(C,S){if(null!=C){var U=v?null:J.getModel().getGeometry(J.getSelectionCell());null!=U?t(C,U.width,U.height,S):t(C,null,null,S)}else b.hideDialog(),d(null)};this.init=function(){c.focus();
+if(Graph.fileSupport){c.setAttribute("placeholder",mxResources.get("dragImagesHere"));var C=L.parentNode,S=null;mxEvent.addListener(C,"dragleave",function(U){null!=S&&(S.parentNode.removeChild(S),S=null);U.stopPropagation();U.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(U){null==S&&(S=b.highlightElement(C));U.stopPropagation();U.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(U){null!=S&&(S.parentNode.removeChild(S),S=null);if(0<U.dataTransfer.files.length)b.importFiles(U.dataTransfer.files,
+0,0,b.maxImageSize,function(O,q,u,I,G,H,g,p){x(O,p)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var q=0;q<O.length;q++)O[q]()},!mxEvent.isControlDown(U),null,null,!0);else if(0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")){var Q=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(Q)&&x(decodeURIComponent(Q))}U.stopPropagation();U.preventDefault()}),!1)}};D=document.createElement("div");D.style.marginTop="14px";D.style.textAlign=
+"center";n=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});n.className="geBtn";b.editor.cancelFirst&&D.appendChild(n);ImageDialog.filePicked=function(C){C.action==google.picker.Action.PICKED&&null!=C.docs[0].thumbnails&&(C=C.docs[0].thumbnails[C.docs[0].thumbnails.length-1],null!=C&&(c.value=C.url));c.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(C){null!=y.files&&(b.importFiles(y.files,0,0,b.maxImageSize,function(S,U,Q,O,q,u){x(S)},function(){},function(S){return"image/"==S.type.substring(0,6)},function(S){for(var U=0;U<S.length;U++)S[U]()},!0),y.type="",y.type="file",y.value="")});y.style.display="none";document.body.appendChild(y);b.imgDlgFileInputElt=y}l=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});l.className="geBtn";D.appendChild(l)}mxEvent.addListener(c,
+"keypress",function(C){13==C.keyCode&&x(c.value)});var F=mxUtils.button(mxResources.get("crop"),function(){var C=new CropImageDialog(b,c.value,f,function(S,U,Q){f=S;k=U;m=Q});b.showDialog(C.container,300,390,!0,!0)});z&&(F.className="geBtn",D.appendChild(F));var E=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=c.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var C=b.editor.createImageUrlConverter().convert(c.value),S=new Image;S.onload=function(){b.editor.convertImageToDataUri(C,
+function(U){b.confirmImageResize(function(Q){b.resizeImage(S,U,mxUtils.bind(this,function(O,q,u){b.spinner.stop();null!=O&&O.length<b.maxImageBytes?(c.value=O,P()):b.handleError({message:mxResources.get("imageTooBig")})}),Q,b.maxImageSize)},S.width>b.maxImageSize||S.height>b.maxImageSize||U.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};S.onerror=function(){b.spinner.stop();b.handleError({message:mxResources.get("fileNotFound")})};
+S.src=C}});E.className="geBtn";mxEvent.addListener(c,"change",function(C){f=null;P()});P();D.appendChild(E);z=mxUtils.button(mxResources.get("apply"),function(){x(c.value)});z.className="geBtn gePrimaryBtn";D.appendChild(z);b.editor.cancelFirst||D.appendChild(n);Graph.fileSupport&&(D.style.marginTop="120px",L.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",L.style.backgroundPosition="center 65%",L.style.backgroundRepeat="no-repeat",z=document.createElement("div"),z.style.position="absolute",
+z.style.width="420px",z.style.top="58%",z.style.textAlign="center",z.style.fontSize="18px",z.style.color="#a0c3ff",mxUtils.write(z,mxResources.get("dragImagesHere")),L.appendChild(z));L.appendChild(D);this.container=L},LinkDialog=function(b,l,n,d,v,A,z){function D(C,S){var U=document.createElement("option");mxUtils.write(U,mxResources.get(C));U.value=C;F.appendChild(U);E[C]=S}var P=document.createElement("div");P.style.height="100%";mxUtils.write(P,mxResources.get("editLink")+":");var J=document.createElement("div");
+J.className="geUrlLinkContainer";J.style.backgroundColor="transparent";J.style.borderColor="transparent";J.style.whiteSpace="nowrap";J.style.textOverflow="clip";J.style.cursor="default";var L=document.createElement("input");L.setAttribute("placeholder",mxResources.get("dragUrlsHere"));L.setAttribute("type","text");L.style.marginTop="6px";L.style.width="414px";L.style.boxSizing="border-box";L.style.backgroundRepeat="no-repeat";L.style.backgroundPosition="100% 50%";L.style.paddingRight="16px";L.style.marginBottom=
"4px";var c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.backgroundImage="url("+Editor.crossImage+")";c.className="geAdaptiveAsset";c.style.display="inline-block";c.style.position="relative";c.style.top="3px";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";mxEvent.addListener(c,"click",function(){L.value="";L.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value",
-"url");f.setAttribute("type","radio");f.setAttribute("name","geLinkDialogOption");var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","geLinkDialogOption");var m=document.createElement("select");m.style.width="414px";var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.margin="0 6p 0 6px";null!=y&&(t.setAttribute("checked","checked"),t.defaultChecked=
-!0);y=null!=y?y:"_blank";t.setAttribute("title",y);z&&(L.style.width="200px");if(x&&null!=b.pages){null!=k&&Graph.isPageLink(k)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(L.setAttribute("value",k),f.setAttribute("checked","checked"),f.defaultChecked=!0);K.appendChild(f);K.appendChild(L);K.appendChild(c);z&&(K.appendChild(t),mxUtils.write(K,mxResources.get("openInNewWindow")));mxUtils.br(K);K.appendChild(l);x=!1;for(z=0;z<b.pages.length;z++)c=document.createElement("option"),mxUtils.write(c,
-b.pages[z].getName()||mxResources.get("pageWithNumber",[z+1])),c.setAttribute("value","data:page/id,"+b.pages[z].getId()),k==c.getAttribute("value")&&(c.setAttribute("selected","selected"),x=!0),m.appendChild(c);if(!x&&l.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");m.appendChild(v);mxEvent.addListener(m,"change",function(){null==v.parentNode||
-v.selected||v.parentNode.removeChild(v)})}K.appendChild(m)}else L.setAttribute("value",k),K.appendChild(L),K.appendChild(c);N.appendChild(K);var B=mxUtils.button(n,function(){b.hideDialog();d(l.checked?"pageNotFound"!==m.value?m.value:k:L.value,LinkDialog.selectedDocs,t.checked?y:null)});B.style.verticalAlign="middle";B.className="geBtn gePrimaryBtn";this.init=function(){l.checked?m.focus():(L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",
-!1,null));mxEvent.addListener(m,"focus",function(){f.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(L,"focus",function(){l.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var A=N.parentNode,S=null;mxEvent.addListener(A,"dragleave",function(R){null!=S&&(S.parentNode.removeChild(S),S=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(R){null==
-S&&(S=b.highlightElement(A));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(A,"drop",mxUtils.bind(this,function(R){try{null!=S&&(S.parentNode.removeChild(S),S=null),0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")&&(L.value=decodeURIComponent(R.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,B.click())}catch(T){b.handleError(T)}R.stopPropagation();R.preventDefault()}),!1)}};n=document.createElement("div");n.style.marginTop="16px";n.style.textAlign=
-"right";b.isOffline()||n.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));K=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});K.style.verticalAlign="middle";K.className="geBtn";b.editor.cancelFirst&&n.appendChild(K);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(A){if(A.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=A.docs;var S=A.docs[0].url;"application/mxe"==A.docs[0].mimeType||null!=A.docs[0].mimeType&&"application/vnd.jgraph."==
-A.docs[0].mimeType.substring(0,23)?S="https://app.diagrams.net/#G"+A.docs[0].id:"application/vnd.google-apps.folder"==A.docs[0].mimeType&&(S="https://drive.google.com/#folders/"+A.docs[0].id);L.value=S;L.focus()}else LinkDialog.selectedDocs=null;L.focus()};var E=document.createElement("select");E.className="geBtn";E.style.position="relative";E.style.top="1px";E.style.maxWidth="120px";var D={};x=document.createElement("option");mxUtils.write(x,mxResources.get("select")+"...");x.value="";E.appendChild(x);
-"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&F("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var A=b.drive.createLinkPicker();b.linkPicker=A.setCallback(function(S){LinkDialog.filePicked(S)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&F("dropbox",function(){Dropbox.choose({linkType:"direct",
-cancel:function(){},success:function(A){L.value=A[0].link;L.focus()}})});null!=b.oneDrive&&F("oneDrive",function(){b.oneDrive.pickFile(function(A,S){null!=S&&null!=S.value&&0<S.value.length&&(L.value=S.value[0].webUrl,L.focus())},!0)});null!=b.gitHub&&F("github",function(){b.gitHub.pickFile(function(A){if(null!=A){A=A.split("/");var S=A[0],R=A[1],T=A[2];A=A.slice(3,A.length).join("/");L.value="https://github.com/"+S+"/"+R+"/blob/"+T+"/"+A;L.focus()}})});null!=b.gitLab&&F("gitlab",function(){b.gitLab.pickFile(function(A){if(null!=
-A){A=A.split("/");var S=A[0],R=A[1],T=A[2];A=A.slice(3,A.length).join("/");L.value=DRAWIO_GITLAB_URL+"/"+S+"/"+R+"/blob/"+T+"/"+A;L.focus()}})});1<E.children.length&&(n.appendChild(E),mxEvent.addListener(E,"change",function(A){null!=D[E.value]&&(D[E.value](),E.value="")}));mxEvent.addListener(L,"keypress",function(A){13==A.keyCode&&B.click()});n.appendChild(B);b.editor.cancelFirst||n.appendChild(K);N.appendChild(n);this.container=N},RevisionDialog=function(b,k,n){var d=document.createElement("div"),
-x=document.createElement("h3");x.style.marginTop="3px";mxUtils.write(x,mxResources.get("revisionHistory"));d.appendChild(x);x=document.createElement("div");x.style.position="absolute";x.style.overflow="auto";x.style.width="170px";x.style.height="378px";d.appendChild(x);var z=document.createElement("div");z.style.position="absolute";z.style.left="200px";z.style.width="470px";z.style.height="376px";z.style.overflow="hidden";z.style.borderWidth="1px";z.style.borderStyle="solid";var y=document.createElement("div");
-y.style.position="absolute";y.style.display="none";y.style.textAlign="center";y.style.padding="8px";y.style.borderRadius="8px";y.style.left="50%";y.style.top="50%";y.style.whiteSpace="nowrap";y.style.transform="translate(-50%, -50%)";y.style.background="inherit";y.style.border="1px solid";z.appendChild(y);mxEvent.disableContextMenu(z);d.appendChild(z);var F=new Graph(z);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=
-null;F.maxFitScale=null;F.centerZoom=!0;var N=0,K=null,L=0,c=F.getGlobalVariable;F.getGlobalVariable=function(Y){return"page"==Y&&null!=K&&null!=K[L]?K[L].getAttribute("name"):"pagenumber"==Y?L+1:"pagecount"==Y?null!=K?K.length:1:c.apply(this,arguments)};F.getLinkForCell=function(){return null};for(var f=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",
-left:"50%"}),l=b.getCurrentFile(),m=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),t={},v=0;v<m.length;v++)t[m[v].getAttribute("id")]=m[v];var B=null,E=null,D=null,A=null,S=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=D&&F.zoomIn()},20);S.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=D&&F.zoomOut()},20);R.setAttribute("disabled","disabled");var T=b.createToolbarButton(Editor.zoomFitImage,
-mxResources.get("fit"),function(){null!=D&&(1==F.view.scale?(F.maxFitScale=8,F.fit(8)):F.zoomActual(),F.center())},20);T.setAttribute("disabled","disabled");var P=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"));P.setAttribute("disabled","disabled");var q=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"));q.setAttribute("disabled","disabled");var u=z.cloneNode(!1);u.style.pointerEvent="none";z.parentNode.appendChild(u);var J=new Graph(u);J.setTooltips(!1);J.setEnabled(!1);
-J.setPanning(!0);J.panningHandler.ignoreCell=!0;J.panningHandler.useLeftButtonForPanning=!0;J.minFitScale=null;J.maxFitScale=null;J.centerZoom=!0;var G=document.createElement("div");G.style.textAlign="left";G.style.color="gray";G.style.backgroundColor="transparent";G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.style.whiteSpace="nowrap";G.style.cursor="default";G.style.height="100%";G.style.display="inline-flex";G.style.alignItems="center";G.style.flexGrow="1";mxEvent.addListener(G,"click",
-function(){var Y=mxUtils.getTextContent(G);""!=Y&&b.alert(Y)});var H=null;mxEvent.addGestureListeners(P,function(Y){try{var Z=null!=K[N]?t[K[N].getAttribute("id")]:null;mxUtils.setOpacity(P,20);y.innerText="";if(null==Z)y.style.display="inline-block",mxUtils.write(y,mxResources.get("pageNotFound"));else{H=G.innerHTML;G.innerHTML=mxResources.get("current");z.style.display="none";u.style.display="";u.style.backgroundColor=z.style.backgroundColor;var aa=Editor.parseDiagramNode(Z);(new mxCodec(aa.ownerDocument)).decode(aa,
-J.getModel());J.view.scaleAndTranslate(F.view.scale,F.view.translate.x,F.view.translate.y);J.mathEnabled="1"==aa.getAttribute("math");J.setAdaptiveColors(aa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&J.mathEnabled&&Editor.MathJaxRender(J.container)}}catch(ha){y.style.display="inline-block",y.innerText="",mxUtils.write(y,mxResources.get("pageNotFound")+": "+ha.message)}},null,function(){mxUtils.setOpacity(P,60);y.style.display="none";y.innerText="";"none"==z.style.display&&(z.style.display=
-"",G.innerHTML=H,u.style.display="none")});mxEvent.addListener(q,"click",mxUtils.bind(this,function(Y){if(null!=D){Y=b.getPagesForNode(D.documentElement);var Z=b.diffPages(b.pages,Y);Y=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(Z,null,2),function(aa){try{if(0<aa.length&&b.editor.graph.isEnabled()){var ha=[JSON.parse(aa)];b.confirm(mxResources.get("areYouSure"),function(){try{l.patch(ha,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(ea){b.handleError(ea)}})}else b.hideDialog()}catch(ea){b.handleError(ea)}},
-null,null,null,null,function(aa,ha){if(null!=Z[EditorUi.DIFF_UPDATE]){var ea=document.createElement("select"),da=document.createElement("option");mxUtils.write(da,mxResources.get("allPages"));da.setAttribute("value","allPages");ea.appendChild(da);for(var ia in Z[EditorUi.DIFF_UPDATE]){da=document.createElement("option");var la=b.getPageById(ia);null!=la&&(mxUtils.write(da,la.getName()),da.setAttribute("value","page-"+ia),ea.appendChild(da))}ea.style.marginRight="8px";ea.style.order="-1";mxEvent.addListener(ea,
-"change",function(ba){ba=null;if("allPages"!=ea.value){var fa=ea.value.substring(5);null!=Z[EditorUi.DIFF_UPDATE][fa]&&(ba={},ba[EditorUi.DIFF_UPDATE]={},ba[EditorUi.DIFF_UPDATE][fa]=Z[EditorUi.DIFF_UPDATE][fa])}ha.value=JSON.stringify(null==ba?Z:ba,null,2)});2<ea.children.length&&aa.appendChild(ea)}},!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close"));b.showDialog(Y.container,620,460,!0,!0);Y.init()}}));var g=mxUtils.button(mxResources.get("restore"),function(Y){null!=D&&null!=A&&
-b.confirm(mxResources.get("areYouSure"),function(){null!=n?n(A):b.spinner.spin(document.body,mxResources.get("restoring"))&&(g.setAttribute("disabled","disabled"),l.save(!0,function(Z){b.spinner.stop();g.removeAttribute("disabled");b.replaceFileData(A);b.hideDialog()},function(Z){b.spinner.stop();g.removeAttribute("disabled");b.clearStatus();b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});g.className="geBtn gePrimaryBtn";g.setAttribute("disabled","disabled");var p=document.createElement("select");
-p.setAttribute("disabled","disabled");p.style.userSelect="none";p.style.maxWidth="100px";p.style.marginLeft="10px";p.style.display="none";var C=null;mxEvent.addListener(p,"change",function(Y){null!=C&&(C(Y),mxEvent.consume(Y))});var I=mxUtils.button(mxResources.get("open"),function(){null!=D&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(D.documentElement)),b.openLink(b.getUrl(),null,!0))});I.className="geBtn";I.setAttribute("disabled","disabled");
-var M=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});M.className="geBtn";M.setAttribute("disabled","disabled");null!=n&&(I.style.display="none");m=document.createElement("div");m.style.position="absolute";m.style.top="482px";m.style.right="28px";m.style.left="32px";m.style.justifyContent="end";m.style.display="flex";var O=document.createElement("div");O.className="geToolbarContainer";O.style.backgroundColor="transparent";O.style.left="32px";O.style.right=
-"32px";O.style.border="none";O.style.top="442px";var Q=null;if(null!=k&&0<k.length){z.style.cursor="move";var U=document.createElement("table");U.style.borderWidth="1px";U.style.borderStyle="solid";U.style.borderCollapse="collapse";U.style.borderSpacing="0px";U.style.width="100%";var V=document.createElement("tbody"),X=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(N=mxUtils.indexOf(b.pages,b.currentPage));for(v=k.length-1;0<=v;v--){var W=function(Y){var Z=new Date(Y.modifiedDate),
-aa=null;if(0<=Z.getTime()){var ha=function(da){f.stop();y.innerText="";var ia=mxUtils.parseXml(da),la=b.editor.extractGraphModel(ia.documentElement,!0);if(null!=la){var ba=function(pa){null!=pa&&(pa=fa(Editor.parseDiagramNode(pa)));return pa},fa=function(pa){var ua=pa.getAttribute("background");if(null==ua||""==ua||ua==mxConstants.NONE)ua=F.defaultPageBackgroundColor;z.style.backgroundColor=mxUtils.getLightDarkColor(ua);(new mxCodec(pa.ownerDocument)).decode(pa,F.getModel());F.maxFitScale=1;F.fit(8);
-F.center();F.mathEnabled="1"==pa.getAttribute("math");F.setAdaptiveColors(pa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&F.mathEnabled&&Editor.MathJaxRender(F.container);return pa};p.style.display="none";p.innerText="";D=ia;A=da;K=parseSelectFunction=null;L=0;if("mxfile"==la.nodeName){ia=la.getElementsByTagName("diagram");K=[];for(da=0;da<ia.length;da++)K.push(ia[da]);L=Math.min(N,K.length-1);0<K.length&&ba(K[L]);if(1<K.length)for(p.removeAttribute("disabled"),p.style.display="",da=0;da<
-K.length;da++){ia=document.createElement("option");ia.setAttribute("title",ja+" ("+K[da].getAttribute("id")+")");ia.setAttribute("value",da);var ja=K[da].getAttribute("name")||mxResources.get("pageWithNumber",[da+1]);la=b.getPageById(K[da].getAttribute("id"));var ca="";if(null!=la){var sa=new DiagramPage(K[da]);b.getHashValueForPages([la])!=b.getHashValueForPages([sa])&&(ca=" (M)")}else ca=" (X)";mxUtils.write(ia,ja+ca);da==L&&ia.setAttribute("selected","selected");p.appendChild(ia)}C=function(){try{var pa=
-parseInt(p.value);L=N=pa;ba(K[pa])}catch(ua){p.value=N,b.handleError(ua)}}}else fa(la);ja=Y.lastModifyingUserName;null!=ja&&20<ja.length&&(ja=ja.substring(0,20)+"...");G.innerText="";mxUtils.write(G,(null!=ja?ja+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());G.setAttribute("title",aa.getAttribute("title"));S.removeAttribute("disabled");R.removeAttribute("disabled");T.removeAttribute("disabled");P.removeAttribute("disabled");q.removeAttribute("disabled");null!=l&&l.isRestricted()||(b.editor.graph.isEnabled()&&
-g.removeAttribute("disabled"),I.removeAttribute("disabled"),M.removeAttribute("disabled"));mxUtils.setOpacity(S,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(T,60);mxUtils.setOpacity(P,60);mxUtils.setOpacity(q,60)}else p.style.display="none",p.innerText="",G.innerText="",y.innerText="",mxUtils.write(G,mxResources.get("errorLoadingFile")),mxUtils.write(y,mxResources.get("errorLoadingFile"))};aa=document.createElement("tr");aa.style.borderBottomWidth="1px";aa.style.borderBottomStyle="solid";aa.style.fontSize=
-"12px";aa.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding="6px";ea.style.whiteSpace="nowrap";Y==k[k.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===X?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());aa.appendChild(ea);aa.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=Y.fileSize?" "+b.formatFileSize(parseInt(Y.fileSize)):"")+(null!=Y.lastModifyingUserName?
-" "+Y.lastModifyingUserName:""));mxEvent.addListener(aa,"click",function(da){E!=Y&&(f.stop(),null!=B&&(B.style.backgroundColor=""),E=Y,B=aa,B.style.backgroundColor="light-dark(#ebf2f9, #000000)",A=D=null,G.removeAttribute("title"),G.innerText=mxResources.get("loading")+"...",z.style.backgroundColor=F.defaultPageBackgroundColor,y.innerText="",F.getModel().clear(),g.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),T.setAttribute("disabled",
-"disabled"),P.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"),mxUtils.setOpacity(S,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(T,20),mxUtils.setOpacity(P,20),mxUtils.setOpacity(q,20),f.spin(z),Y.getXml(function(ia){if(E==Y)try{ha(ia)}catch(la){G.innerText=mxResources.get("error")+": "+la.message}},function(ia){f.stop();p.style.display="none";p.innerText="";G.innerText="";mxUtils.write(G,mxResources.get("errorLoadingFile"));
-mxUtils.write(y,mxResources.get("errorLoadingFile"))}),mxEvent.consume(da))});mxEvent.addListener(aa,"dblclick",function(da){I.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(da)},!1);V.appendChild(aa)}return aa}(k[v]);null!=W&&v==k.length-1&&(Q=W)}U.appendChild(V);x.appendChild(U)}else null==l||null==b.drive&&l.constructor==window.DriveFile||null==b.dropbox&&l.constructor==window.DropboxFile?(z.style.display="none",
-O.style.display="none",mxUtils.write(x,mxResources.get("notAvailable"))):(z.style.display="none",O.style.display="none",mxUtils.write(x,mxResources.get("noRevisions")));this.init=function(){null!=Q&&Q.click()};x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";O.appendChild(G);O.appendChild(P);O.appendChild(R);O.appendChild(T);O.appendChild(S);O.appendChild(p);O.appendChild(q);b.editor.cancelFirst&&m.appendChild(x);m.appendChild(I);null!=l&&l.constructor==DriveFile&&
-m.appendChild(M);m.appendChild(g);b.editor.cancelFirst||m.appendChild(x);d.appendChild(m);d.appendChild(O);this.container=d},DraftDialog=function(b,k,n,d,x,z,y,F,N){var K=document.createElement("div"),L=document.createElement("div");L.style.marginTop="0px";L.style.whiteSpace="nowrap";L.style.overflow="auto";L.style.lineHeight="normal";mxUtils.write(L,k);K.appendChild(L);var c=document.createElement("select"),f=mxUtils.bind(this,function(){"-1"==c.value?(c.value=c.options[0].value,f(),b.confirm(mxResources.get("areYouSure"),
-null,mxUtils.bind(this,function(){var P=this,q;return $jscomp.asyncExecutePromiseGeneratorProgram(function(u){for(q=0;q<N.length;q++)x.apply(P,[q,mxUtils.bind(P,function(){})]);b.hideDialog(!0);u.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(E=mxUtils.parseXml(N[c.value].data),D=b.editor.extractGraphModel(E.documentElement,!0),A=0,this.init())});if(null!=N){c.style.marginLeft="4px";for(k=0;k<N.length;k++){var l=document.createElement("option");l.setAttribute("value",k);var m=new Date(N[k].created),
-t=new Date(N[k].modified);mxUtils.write(l,m.toLocaleDateString()+" "+m.toLocaleTimeString()+" - "+(m.toDateString(),t.toDateString(),t.toLocaleDateString())+" "+t.toLocaleTimeString());c.appendChild(l)}l=document.createElement("option");l.setAttribute("value","-1");mxUtils.write(l,mxResources.get("deleteAll"));c.appendChild(l);L.appendChild(c);mxEvent.addListener(c,"change",f)}null==n&&(n=N[0].data);var v=document.createElement("div");v.style.position="absolute";v.style.border="1px solid lightGray";
-v.style.marginTop="10px";v.style.left="40px";v.style.right="40px";v.style.top="46px";v.style.bottom="74px";v.style.overflow="hidden";mxEvent.disableContextMenu(v);K.appendChild(v);var B=new Graph(v);B.setEnabled(!1);B.setPanning(!0);B.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";B.panningHandler.ignoreCell=!0;B.panningHandler.useLeftButtonForPanning=!0;B.minFitScale=null;B.maxFitScale=null;B.centerZoom=!0;var E=mxUtils.parseXml(n),D=b.editor.extractGraphModel(E.documentElement,!0),A=0,S=null,
-R=B.getGlobalVariable;B.getGlobalVariable=function(P){return"page"==P&&null!=S&&null!=S[A]?S[A].getAttribute("name"):"pagenumber"==P?A+1:"pagecount"==P?null!=S?S.length:1:R.apply(this,arguments)};B.getLinkForCell=function(){return null};n=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){B.zoomIn()},20);L=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){B.zoomOut()},20);k=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==
-B.view.scale?(B.maxFitScale=8,B.fit(8)):B.zoomActual();B.center()},20);y=mxUtils.button(y||mxResources.get("discard"),function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(q){x.apply(P,[c.value,mxUtils.bind(P,function(){null!=c.parentNode&&(c.options[c.selectedIndex].parentNode.removeChild(c.options[c.selectedIndex]),1<c.options.length?(c.value=c.options[0].value,f()):b.hideDialog(!0))})]);q.jumpToEnd()})}),
-mxResources.get("no"),mxResources.get("yes"))});y.className="geBtn";var T=document.createElement("select");T.style.maxWidth="80px";T.style.position="relative";T.style.top="-2px";T.style.verticalAlign="bottom";T.style.marginRight="6px";T.style.display="none";z=mxUtils.button(z||mxResources.get("edit"),function(){d.apply(this,[c.value])});z.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.position="absolute";l.style.bottom="30px";l.style.right="40px";l.style.textAlign="right";
-m=document.createElement("div");m.className="geToolbarContainer";m.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function P(G){if(null!=G){var H=G.getAttribute("background");if(null==H||""==H||H==mxConstants.NONE)H="light-dark(#ffffff, transparent)";v.style.backgroundColor=H;(new mxCodec(G.ownerDocument)).decode(G,B.getModel());B.maxFitScale=1;B.fit(8);B.center()}return G}function q(G){null!=G&&(G=
-P(Editor.parseDiagramNode(G)));return G}mxEvent.addListener(T,"change",function(G){A=parseInt(T.value);q(S[A]);mxEvent.consume(G)});if("mxfile"==D.nodeName){var u=D.getElementsByTagName("diagram");S=[];for(var J=0;J<u.length;J++)S.push(u[J]);0<S.length&&q(S[A]);T.innerText="";if(1<S.length)for(T.style.display="",J=0;J<S.length;J++)u=document.createElement("option"),mxUtils.write(u,S[J].getAttribute("name")||mxResources.get("pageWithNumber",[J+1])),u.setAttribute("value",J),J==A&&u.setAttribute("selected",
-"selected"),T.appendChild(u);else T.style.display="none"}else P(D)};m.appendChild(T);m.appendChild(n);m.appendChild(L);m.appendChild(k);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});n.className="geBtn";F=null!=F?mxUtils.button(mxResources.get("ignore"),F):null;null!=F&&(F.className="geBtn");b.editor.cancelFirst?(l.appendChild(n),null!=F&&l.appendChild(F),l.appendChild(y),l.appendChild(z)):(l.appendChild(z),l.appendChild(y),null!=F&&l.appendChild(F),l.appendChild(n));K.appendChild(l);
-K.appendChild(m);this.container=K},FindWindow=function(b,k,n,d,x,z){function y(C,I,M){if("object"===typeof I.value&&null!=I.value.attributes){I=I.value.attributes;for(var O=0;O<I.length;O++)if("label"!=I[O].nodeName){var Q=mxUtils.trim(I[O].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==C&&0<=Q.indexOf(M)||null!=C&&C.test(Q))return!0}}return!1}function F(){l?(H.removeAttribute("disabled"),g.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),g.setAttribute("disabled",
-"disabled"));A.value?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}function N(C,I,M){J.innerText="";var O=L.model.getDescendants(L.model.getRoot()),Q=A.value.toLowerCase(),U=R.checked?new RegExp(Q):null,V=null;t=null;c!=Q&&(c=Q,f=null,m=!1);var X=null==f;if(0<Q.length){if(m){m=!1;for(var W,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){W=Y;break}C=(W+1)%b.pages.length;f=null;do m=!1,O=b.pages[C],L=b.createTemporaryGraph(L.getStylesheet()),b.updatePageRoot(O),L.model.setRoot(O.root),
-C=(C+1)%b.pages.length;while(!N(!0,I,M)&&C!=W);f&&(f=null,M?b.editor.graph.model.execute(new SelectPage(b,O)):b.selectPage(O));m=!1;L=b.editor.graph;return N(!0,I,M)}for(Y=0;Y<O.length;Y++){W=L.view.getState(O[Y]);I&&(X=X||W==f);if(null!=W&&null!=W.cell.value&&(X||null==V)&&(L.model.isVertex(W.cell)||L.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(P.innerHTML=L.sanitizeHtml(L.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([P])):label=L.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g,
-" ")).toLowerCase();var Z=0;I&&z&&W==f&&(label=label.substr(v),Z=v);var aa=null==S||""==S.value;if(null==U&&(0<=label.indexOf(Q)||aa&&y(U,W.cell,Q))||null!=U&&(U.test(label)||aa&&y(U,W.cell,Q)))if(z&&(null!=U?(aa=label.match(U),null!=aa&&0<aa.length&&(t=aa[0].toLowerCase(),v=Z+aa.index+t.length)):(t=Q,v=Z+label.indexOf(Q)+t.length)),X){V=W;break}else null==V&&(V=W)}X=X||W==f}}if(null!=V){if(Y==O.length&&T.checked)return f=null,m=!0,N(!0,I,M);f=V;L.scrollCellToVisible(f.cell);L.isEnabled()&&!L.isCellLocked(f.cell)?
-M||L.getSelectionCell()==f.cell&&1==L.getSelectionCount()||L.setSelectionCell(f.cell):L.highlightCell(f.cell)}else{if(!C&&T.checked)return m=!0,N(!0,I,M);L.isEnabled()&&!M&&L.clearSelection()}l=null!=V;z&&!C&&F();return 0==Q.length||null!=V}var K=b.actions.get("findReplace"),L=b.editor.graph,c=null,f=null,l=!1,m=!1,t=null,v=0,B=1,E=document.createElement("div");E.style.userSelect="none";E.style.overflow="hidden";E.style.padding="10px";E.style.height="100%";var D=z?"260px":"200px",A=document.createElement("input");
-A.setAttribute("placeholder",mxResources.get("find"));A.setAttribute("type","text");A.style.marginTop="4px";A.style.marginBottom="6px";A.style.width=D;A.style.fontSize="12px";A.style.borderRadius="4px";A.style.padding="6px";E.appendChild(A);mxUtils.br(E);if(z){var S=document.createElement("input");S.setAttribute("placeholder",mxResources.get("replaceWith"));S.setAttribute("type","text");S.style.marginTop="4px";S.style.marginBottom="6px";S.style.width=D;S.style.fontSize="12px";S.style.borderRadius=
-"4px";S.style.padding="6px";E.appendChild(S);mxUtils.br(E);mxEvent.addListener(S,"input",F)}var R=document.createElement("input");R.setAttribute("id","geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";E.appendChild(R);D=document.createElement("label");D.setAttribute("for","geFindWinRegExChck");E.appendChild(D);mxUtils.write(D,mxResources.get("regularExpression"));E.appendChild(D);D=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");D.style.position=
-"relative";D.style.marginLeft="6px";E.appendChild(D);mxUtils.br(E);var T=document.createElement("input");T.setAttribute("id","geFindWinAllPagesChck");T.setAttribute("type","checkbox");T.style.marginRight="4px";E.appendChild(T);D=document.createElement("label");D.setAttribute("for","geFindWinAllPagesChck");E.appendChild(D);mxUtils.write(D,mxResources.get("allPages"));E.appendChild(D);var P=document.createElement("div");mxUtils.br(E);D=document.createElement("div");D.style.left="0px";D.style.right=
-"0px";D.style.marginTop="6px";D.style.padding="0 6px 0 6px";E.appendChild(D);var q=mxUtils.button(mxResources.get("reset"),function(){J.innerText="";A.value="";A.style.backgroundColor="";z&&(S.value="",F());c=f=null;m=!1;A.focus()});q.setAttribute("title",mxResources.get("reset"));q.style.float="none";q.style.width="120px";q.style.marginTop="6px";q.style.marginLeft="8px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.className="geBtn";z||D.appendChild(q);var u=mxUtils.button(mxResources.get("find"),
-function(){try{A.style.backgroundColor=N()?"":"light-dark(#ffcfcf, #ff0000)"}catch(C){b.handleError(C)}});u.setAttribute("title",mxResources.get("find")+" (Enter)");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";D.appendChild(u);var J=document.createElement("div");J.style.marginTop="10px";if(z){var G=function(C,I,M,O,Q){if(null==Q||"1"!=Q.html)return O=C.toLowerCase().indexOf(I,
-O),0>O?C:C.substr(0,O)+M+C.substr(O+I.length);var U=C;I=mxUtils.htmlEntities(I,!1,!1,!1);Q=[];var V=-1;for(C=C.replace(/<br>/ig,"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(V=C.indexOf("<",V+1));)Q.push(V);V=C.match(/<[^>]*>/g);C=C.replace(/<[^>]*>/g,"");O=C.toLowerCase().indexOf(I,O);if(0>O)return U;U=O+I.length;M=mxUtils.htmlEntities(M);C=C.substr(0,O)+M+C.substr(U);for(var X=0,W=0;W<Q.length;W++){if(Q[W]-X<O)C=C.substr(0,Q[W])+V[W]+C.substr(Q[W]);
-else{var Y=Q[W]-X<U?O+X:Q[W]+(M.length-I.length);C=C.substr(0,Y)+V[W]+C.substr(Y)}X+=V[W].length}return C.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")};D.style.textAlign="center";var H=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=t&&null!=f){var C=f.cell,I=L.getLabel(C);L.isCellEditable(C)&&L.model.setValue(C,G(I,t,S.value,v-t.length,L.getCurrentCellStyle(C)));A.style.backgroundColor=N(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(M){b.handleError(M)}});
-H.setAttribute("title",mxResources.get("replFind"));H.style.float="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");D.appendChild(H);mxUtils.br(D);var g=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=t&&null!=f){var C=f.cell,I=L.getLabel(C);L.model.setValue(C,G(I,t,S.value,v-t.length,L.getCurrentCellStyle(C)));H.setAttribute("disabled",
-"disabled");g.setAttribute("disabled","disabled")}}catch(M){b.handleError(M)}});g.setAttribute("title",mxResources.get("replace"));g.style.float="none";g.style.width="120px";g.style.marginTop="6px";g.style.marginLeft="8px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.className="geBtn gePrimaryBtn";g.setAttribute("disabled","disabled");D.appendChild(g);var p=mxUtils.button(mxResources.get("replaceAll"),function(){J.innerText="";c=null;var C=b.currentPage,I=b.editor.graph.getSelectionCells();
-b.editor.graph.rendering=!1;L.getModel().beginUpdate();try{for(var M=0,O={};N(!1,!0,!0)&&100>M;){var Q=f.cell,U=L.getLabel(Q),V=O[Q.id];if(V&&V.replAllMrk==B&&V.replAllPos>=v)break;O[Q.id]={replAllMrk:B,replAllPos:v};L.isCellEditable(Q)&&(L.model.setValue(Q,G(U,t,S.value,v-t.length,L.getCurrentCellStyle(Q))),M++)}C!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,C));mxUtils.write(J,mxResources.get("matchesRepl",[M]))}catch(X){b.handleError(X)}finally{L.getModel().endUpdate(),b.editor.graph.setSelectionCells(I),
-b.editor.graph.rendering=!0}B++});p.setAttribute("title",mxResources.get("replaceAll"));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");D.appendChild(p);mxUtils.br(D);D.appendChild(q);q=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));q.setAttribute("title",mxResources.get("close"));
-q.style.float="none";q.style.width="120px";q.style.marginTop="6px";q.style.marginLeft="8px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.className="geBtn";D.appendChild(q);mxUtils.br(D);D.appendChild(J)}else D.style.display="flex",D.style.alignItems="center",q.style.width="",u.style.width="";mxEvent.addListener(A,"keyup",function(C){if(91==C.keyCode||93==C.keyCode||17==C.keyCode)mxEvent.consume(C);else if(27==C.keyCode)K.funct();else if(c!=A.value.toLowerCase()||13==C.keyCode)try{A.style.backgroundColor=
-N()?"":"light-dark(#ffcfcf, #ff0000)"}catch(I){A.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(E,"keydown",function(C){70==C.keyCode&&b.keyHandler.isControlDown(C)&&!mxEvent.isShiftDown(C)&&(K.funct(),mxEvent.consume(C))});this.window=new mxWindow(mxResources.get("find")+(z?"/"+mxResources.get("replace"):""),E,k,n,d,x,!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()?(A.focus(),mxClient.IS_GC||mxClient.IS_FF?A.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?T.removeAttribute("disabled"):(T.checked=!1,T.setAttribute("disabled","disabled"))):L.container.focus()}));b.installResizeHandler(this,!1);this.doSearch=function(C){A.focus();A.value=C;u.click()}},FreehandWindow=function(b,k,n,d,x,z){var y=b.editor.graph,F=document.createElement("div");F.style.textAlign=
-"center";F.style.userSelect="none";F.style.overflow="hidden";F.style.height="100%";if(z){var N=function(){var l=y.freehand.getStrokeColor(!0);null!=l&&l!=mxConstants.NONE&&1<l.length&&"string"===typeof l&&("default"==l?l=mxResources.get("useBlackAndWhite"):(l="#"==l.charAt(0)?l.substring(1).toUpperCase():l,l=ColorDialog.prototype.colorNames[l]),null!=l&&L.setAttribute("title",l))},K=document.createElement("input");K.setAttribute("id","geFreehandBrush");K.setAttribute("type","checkbox");K.checked=
-y.freehand.isPerfectFreehandMode();K.style.margin="10px 5px 0px 10px";K.style.float="left";F.appendChild(K);y.freehand.setPerfectFreehandMode(K.checked);z=document.createElement("label");z.setAttribute("for","geFreehandBrush");z.style.float="left";z.style.marginTop="10px";F.appendChild(z);mxUtils.write(z,mxResources.get("brush"));F.appendChild(z);var L=document.createElement("tempDiv");L.style.display="block";L.style.width="100%";L.style.height="100%";L.style.borderRadius="2px";L.style.boxSizing=
-"border-box";L.style.border="1px solid black";L.style.backgroundColor=y.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){L.style.backgroundColor=y.freehand.getStrokeColor()});N();z=mxUtils.button("",mxUtils.bind(this,function(l){b.pickColor(y.freehand.getStrokeColor(!0),function(m){y.freehand.setStrokeColor(m);L.style.backgroundColor=y.freehand.getStrokeColor();N()},"default");mxEvent.consume(l)}));z.style.position="absolute";z.style.boxSizing="border-box";z.style.padding="2px";
-z.style.top="8px";z.style.right="8px";z.style.width="28px";z.style.height="18px";z.className="geColorBtn";z.innerText="";z.appendChild(L);F.appendChild(z);z=document.createElement("img");z.setAttribute("title",mxResources.get("settings"));z.setAttribute("src",Editor.gearImage);z.className="geButton";z.style.position="absolute";z.style.boxSizing="border-box";z.style.padding="2px";z.style.top="8px";z.style.right="38px";z.style.width="18px";z.style.height="18px";z.style.opacity="0.6";F.appendChild(z);
-mxEvent.addListener(z,"click",mxUtils.bind(this,function(l){l=y.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",l,function(m){!isNaN(m)&&0<m&&20>=m&&y.freehand.setSmoothing(parseInt(m))})}));mxUtils.br(F);var c=document.createElement("input");c.setAttribute("type","range");c.setAttribute("min","2");c.setAttribute("max","30");c.setAttribute("value",y.freehand.getBrushSize());c.style.width="90%";c.style.visibility="hidden";F.appendChild(c);mxUtils.br(F);z=function(){y.freehand.setPerfectFreehandMode(K.checked);
-c.style.visibility=K.checked?"visible":"hidden"};mxEvent.addListener(K,"change",z);z();mxEvent.addListener(c,"change",function(){y.freehand.setBrushSize(parseInt(this.value))})}var f=mxUtils.button(mxResources.get("startDrawing"),function(){y.freehand.isDrawing()?y.freehand.stopDrawing():y.freehand.startDrawing()});f.setAttribute("title",mxResources.get("startDrawing")+" (X)");f.style.width="90%";f.style.marginLeft="0px";f.style.position="relative";f.className="geBtn gePrimaryBtn";F.appendChild(f);
-this.window=new mxWindow(mxResources.get("freehand"),F,k,n,d,x,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);y.addListener("freehandStateChanged",mxUtils.bind(this,function(){f.innerText="";mxUtils.write(f,mxResources.get(y.freehand.isDrawing()?"stopDrawing":"startDrawing"));var l=document.createElement("span");l.className="geShortcutKey";l.style.margin="0 2px 4px 0";mxUtils.write(l,"X");f.appendChild(l);f.setAttribute("title",
-mxResources.get(y.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");f.className="geBtn"+(y.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){y.freehand.isDrawing()&&y.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,k,n,d,x){var z=b.editor.graph,y=document.createElement("div");y.style.userSelect="none";y.style.overflow=
-"hidden";y.style.height="100%";var F=document.createElement("div");F.style.display="flex";F.style.alignItems="center";F.style.justifyContent="center";F.style.paddingTop="20px";var N=document.createElement("input");N.setAttribute("type","checkbox");N.style.marginRight="4px";N.checked=!0;var K=document.createElement("input");K.setAttribute("type","checkbox");K.style.marginRight="4px";K.checked=!0;var L=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(z.isSelectionEmpty()?
-z.getVerticesAndEdges():z.getSelectionCells(),N.checked,K.checked)}));L.setAttribute("title","Convert Colors");L.className="geBtn gePrimaryBtn";F.appendChild(L);y.appendChild(F);F=F.cloneNode(!1);F.appendChild(K);F.style.paddingTop="8px";mxUtils.write(F,mxResources.get("background"));y.appendChild(F);F=F.cloneNode(!1);F.appendChild(N);F.style.paddingTop="8px";mxUtils.write(F,mxResources.get("labels"));y.appendChild(F);this.window=new mxWindow(mxResources.get("adaptiveColors"),y,k,n,d,x,!0,!0);this.window.destroyOnClose=
-!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,k,n,d,x){function z(){q=!0;v.value=u;c.isSelectionEmpty()?(E.setAttribute("disabled","disabled"),"selectionOnly"==v.value&&(v.value="includeCopyOfMyDiagram")):E.removeAttribute("disabled");b.isDiagramEmpty()?(B.setAttribute("disabled","disabled"),
-"includeCopyOfMyDiagram"==v.value&&(v.value="help")):B.removeAttribute("disabled");q=!1}function y(G,H,g){var p=document.createElement("button");p.className="geBtn gePrimaryBtn";p.style.padding="4px";p.style.height="auto";p.style.position="relative";"flex"==g?(p.style.overflow="hidden",p.style.textOverflow="ellipsis",p.style.whiteSpace="nowrap",p.style.margin="0px",p.style.flexGrow="1"):(p.style.display="block",p.style.margin="8px",p.style.left="50%",p.style.transform="translateX(-50%)");mxUtils.write(p,
-G);p.setAttribute("title",G);mxEvent.addListener(p,"click",H);return p}function F(G){var H=document.createElement("div");H.style.display="block";H.style.position="relative";H.style.backgroundColor="#e0e0e0";H.style.borderRadius="4px";H.style.wordWrap="break-word";H.style.textAlign="left";H.style.padding="6px";H.style.margin="12px";H.style.left="0px";H.style.right="0px";mxUtils.write(H,G);l.appendChild(H);return H}function N(G){var H=G.indexOf("<mxGraphModel "),g=G.indexOf("</mxGraphModel>");0>H&&
-(H=G.indexOf("<mxGraphModel>"));if(0<=H&&g>H){var p=mxUtils,C=p.trim,I=G.substring(0,H),M=I.indexOf("```");0<=M&&(I=I.substring(I,0,M+6));p=C.call(p,I);H=G.substring(H,g+15);C=mxUtils;I=C.trim;G=G.substring(g+15);g=G.lastIndexOf("```");0<=g&&(G=G.substring(g+3));return[p,H,I.call(C,G)]}return null}function K(G){var H=F(G);H.style.cursor="pointer";H.style.marginBottom="2px";H.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(H,"click",function(X){P.value=G;P.focus()});var g=F("");
-g.style.marginTop="2px";var p=b.currentPage,C=G,I=[],M=null;if("includeCopyOfMyDiagram"==v.value||"selectionOnly"==v.value){var O=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==v.value&&(O.isObjectIgnored=function(X){return X.constructor==mxCell&&!c.model.isRoot(X)&&!c.model.isLayer(X)&&!c.isCellSelected(X)&&!c.isAncestorSelected(X)});M=O.encode(c.getModel());O.document.appendChild(M);I.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+
-mxUtils.getXml(M)})}else"create"==v.value?(C=A.value.replace(/([A-Z])/g," $1").toLowerCase(),C="Write the declaration code for a "+(""!=C?C:"graph")+' that shows "'+(""!=G?G:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):I.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});I.push({role:"user",content:C});
-var Q={model:Editor.gptModel,messages:I},U=0;for(I=0;I<Q.messages.length;I++)U+=Q.messages[I].content.match(/\b\w+\b|[^\w\s]|=/g).length;var V=mxUtils.bind(this,function(){g.innerHTML="";mxUtils.write(g,mxResources.get("loading")+"...");var X=document.createElement("img");X.setAttribute("title","Processing "+U+" tokens");X.setAttribute("src",IMAGE_PATH+"/spin.gif");X.style.marginLeft="6px";g.appendChild(X);g.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,
-function(W){var Y=new mxXmlRequest(Editor.gptUrl,JSON.stringify(Q),"POST");Y.setRequestHeaders=mxUtils.bind(this,function(ha,ea){ha.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ha.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ha){W.clear();g.innerHTML="";mxUtils.write(g,ha.message);g.appendChild(y(mxResources.get("tryAgain"),V));g.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ha)}),aa=mxUtils.bind(this,
-function(ha){var ea=N(ha),da=null!=ea?b.stringToCells(ea[1]):null;if(null!=da&&0<da.length){ha=document.createElement("div");ha.style.display="inline-block";ha.style.position="relative";ha.style.transform="translateX(-50%)";ha.style.padding="6px";ha.style.left="50%";var ia=mxUtils.parseXml(ea[1]),la=new mxCodec(ia),ba=new mxGraphModel;la.decode(ia.documentElement,ba);var fa=null;null!=M&&(ia=new mxCodec(M.ownerDocument),fa=new mxGraphModel,ia.decode(M,fa));ia=mxUtils.bind(this,function(ja){c.model.beginUpdate();
-try{if(null!=fa&&null!=b.getPageIndex(p)){b.selectPage(p);var ca=b.diffCells(fa.root,ba.root);b.patchPage(p,ca,null,!0)}else{var sa=ba.getChildren(ba.getChildAt(ba.getRoot(),0));c.setSelectionCells(c.importCells(sa))}}finally{c.model.endUpdate()}mxEvent.consume(ja)});la=c.getBoundingBoxFromGeometry(da);null!=la?(ha.style.cursor="move",ha.appendChild(b.sidebar.createVertexTemplateFromCells(da,la.width,la.height,"",!0,null,!0,!0,ia,160,120))):(ha.style.padding="14px",mxUtils.write(ha,mxResources.get("noPreview")));
-g.innerHTML="";H=g;0<ea[0].length&&(mxUtils.write(H,ea[0]),mxUtils.br(H));H.appendChild(ha);da=document.createElement("div");da.style.display="flex";da.style.gap="6px";da.style.margin="6px";da.appendChild(y(mxResources.get("tryAgain"),V,"flex"));da.appendChild(y(mxResources.get(null!=M?"apply":"insert"),ia,"flex"));g.appendChild(da);0<ea[2].length&&(mxUtils.br(H),mxUtils.write(H,ea[2]));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else g.innerHTML="",H=g,mxUtils.write(H,ha),
-g.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});Y.send(mxUtils.bind(this,function(ha){if(W.clear())try{if(200<=ha.getStatus()&&299>=ha.getStatus()){var ea=JSON.parse(ha.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",Q,"response:",ea);var da=mxUtils.trim(ea.choices[0].message.content);if("create"==v.value){var ia=b.extractMermaidDeclaration(da);null!=ia?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(fa){aa(fa)})),b.generateMermaidImage(ia,null,
-function(){},function(fa){mxMermaidToDrawio.resetListeners();Z(fa)})):(aa(da),g.appendChild(y(mxResources.get("tryAgain"),V)))}else aa(da)}else{var la="Error: "+ha.getStatus();try{var ba=JSON.parse(ha.getText());null!=ba&&null!=ba.error&&null!=ba.error.message&&(la=ba.error.message)}catch(fa){}g.innerHTML="";mxUtils.write(g,la);g.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(fa){Z(fa)}}),Z)}),function(W){g.innerHTML="";mxUtils.write(g,W.message);g.appendChild(y(mxResources.get("tryAgain"),
-V));g.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});V()}function L(){""!=mxUtils.trim(P.value)&&(K(P.value),P.value="")}var c=b.editor.graph,f=document.createElement("div");f.style.textAlign="center";f.style.overflow="hidden";f.style.height="100%";var l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.top="0px";l.style.left="0px";l.style.right="0px";l.style.bottom="104px";f.appendChild(l);var m=document.createElement("div");m.style.position=
-"absolute";m.style.boxSizing="border-box";m.style.borderRadius="4px";m.style.border="1px solid lightgray";m.style.margin="8px 8px 16px 8px";m.style.padding="8px";m.style.left="0px";m.style.right="0px";m.style.bottom="0px";m.style.padding="6px";m.style.height="80px";var t=document.createElement("div");t.style.display="flex";t.style.gap="6px";t.style.marginBottom="6px";var v=document.createElement("select");v.style.textOverflow="ellipsis";v.style.flexGrow="1";v.style.padding="4px";v.style.minWidth=
-"0";m.appendChild(t);var B=document.createElement("option");B.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(B,mxResources.get("includeCopyOfMyDiagram"));v.appendChild(B);var E=document.createElement("option");E.setAttribute("value","selectionOnly");mxUtils.write(E,mxResources.get("selectionOnly"));v.appendChild(E);t.appendChild(v);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var D=document.createElement("option");D.setAttribute("value","create");mxUtils.write(D,
-mxResources.get("create"));v.appendChild(D)}D=document.createElement("option");D.setAttribute("value","help");mxUtils.write(D,mxResources.get("help"));v.appendChild(D);D=document.createElement("option");D.setAttribute("value","reset");mxUtils.write(D,mxResources.get("reset"));v.appendChild(D);var A=document.createElement("select");A.style.textOverflow="ellipsis";A.style.flexGrow="1";A.style.padding="4px";A.style.minWidth="0";for(D=0;D<EditorUi.mermaidDiagramTypes.length;D++){var S=document.createElement("option"),
-R=EditorUi.mermaidDiagramTypes[D],T=R;"erDiagram"==T&&(T="entityRelationshipDiagram");T=mxResources.get(T,null,T.charAt(0).toUpperCase()+T.substring(1).replace(/[A-Z]/g," $&"));S.setAttribute("value",R);mxUtils.write(S,T);A.appendChild(S)}t.appendChild(A);t=document.createElement("div");t.style.whiteSpace="nowrap";t.style.textOverflow="clip";t.style.cursor="default";var P=document.createElement("input");P.setAttribute("type","text");P.style.width="100%";P.style.outline="none";P.style.border="none";
-P.style.background="transparent";P.style.padding="8px 26px 8px 8px";P.style.boxSizing="border-box";t.appendChild(P);D=document.createElement("img");D.setAttribute("src",Editor.sendImage);D.setAttribute("title",mxResources.get("sendMessage"));D.className="geAdaptiveAsset";D.style.position="relative";D.style.cursor="pointer";D.style.opacity="0.5";D.style.height="19px";D.style.left="-24px";D.style.top="5px";D.style.background="url('"+b.editor.transparentImage+"')";t.appendChild(D);m.appendChild(t);c.isSelectionEmpty()?
-b.isDiagramEmpty()?v.value="help":v.value="includeCopyOfMyDiagram":v.value="selectionOnly";var q=!1,u=v.value,J=function(){P.setAttribute("placeholder",mxResources.get("create"==v.value?"describeYourDiagram":"askMeAnything"));"create"==v.value?(v.style.width="",A.style.display=""):(v.style.width="100%",A.style.display="none")};J();mxEvent.addListener(v,"change",function(){q||("reset"==v.value?(v.value=u,l.innerHTML=""):u=v.value,J())});c.selectionModel.addListener(mxEvent.CHANGE,z);c.getModel().addListener(mxEvent.CHANGE,
-z);z();mxEvent.addListener(D,"click",L);mxEvent.addListener(P,"keydown",function(G){13!=G.keyCode||mxEvent.isShiftDown(G)||L()});f.appendChild(m);this.window=new mxWindow(mxResources.get("chatWindowTitle"),f,k,n,d,x,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){c.getModel().removeListener(z)}));this.window.addListener("show",
-mxUtils.bind(this,function(){this.window.fit();P.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,k,n,d,x){var z=b.editor.graph,y=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)y=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var F=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(N,K){if(z.isEnabled()){var L=new FilenameDialog(b,"",mxResources.get("add"),function(c){b.hideDialog();if(null!=c&&0<c.length){c=
-c.split(" ");for(var f=[],l=[],m=0;m<c.length;m++){var t=mxUtils.trim(c[m]);""!=t&&(l.push(t),0>mxUtils.indexOf(N,t)&&f.push(t))}z.isSelectionEmpty()?K(N.concat(f)):z.addTagsForCells(z.getSelectionCells(),l)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(L.container,320,80,!0,!0);L.init()}},y);y=F.div;this.window=new mxWindow(mxResources.get("tags"),y,k,n,d,x,!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(){F.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,k,n,d){var x=document.createElement("div");x.style.textAlign="center";var z=document.createElement("p");z.style.fontSize="16pt";z.style.padding="0px";z.style.margin="0px";z.style.color="gray";mxUtils.write(z,mxResources.get("authorizationRequired"));var y="Unknown",
-F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("align","absmiddle");F.style.marginRight="10px";k==b.drive?(y=mxResources.get("googleDrive"),F.src=IMAGE_PATH+"/google-drive-logo-white.svg"):k==b.dropbox?(y=mxResources.get("dropbox"),F.src=IMAGE_PATH+"/dropbox-logo-white.svg"):k==b.oneDrive?(y=mxResources.get("oneDrive"),F.src=IMAGE_PATH+"/onedrive-logo-white.svg"):k==b.gitHub?(y=mxResources.get("github"),F.src=IMAGE_PATH+"/github-logo-white.svg"):k==b.gitLab?(y=mxResources.get("gitlab"),
-F.src=IMAGE_PATH+"/gitlab-logo.svg",F.style.width="32px"):k==b.trello&&(y=mxResources.get("trello"),F.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[y]));var N=document.createElement("input");N.setAttribute("type","checkbox");y=mxUtils.button(mxResources.get("authorize"),function(){d(N.checked)});y.insertBefore(F,y.firstChild);y.style.marginTop="6px";y.className="geBigButton";y.style.fontSize="18px";y.style.padding="14px";
-x.appendChild(z);x.appendChild(b);x.appendChild(y);n&&(n=document.createElement("p"),n.style.marginTop="20px",n.appendChild(N),z=document.createElement("span"),mxUtils.write(z," "+mxResources.get("rememberMe")),n.appendChild(z),x.appendChild(n),N.checked=!0,N.defaultChecked=!0,mxEvent.addListener(z,"click",function(K){N.checked=!N.checked;mxEvent.consume(K)}));this.container=x},MoreShapesDialog=function(b,k,n){n=null!=n?n:b.sidebar.entries;var d=document.createElement("div"),x=[];if(null!=b.sidebar.customEntries)for(var z=
-0;z<b.sidebar.customEntries.length;z++){for(var y=b.sidebar.customEntries[z]||{},F={title:b.getResource(y.title),entries:[]},N=0;null!=y.entries&&N<y.entries.length;N++){var K=y.entries[N];F.entries.push({id:K.id,title:b.getResource(K.title),desc:b.getResource(K.desc),image:K.preview})}0<F.entries.length&&x.push(F)}for(z=0;z<n.length;z++)if(null==b.sidebar.enabledLibraries)x.push(n[z]);else{F={title:n[z].title,entries:[]};for(N=0;N<n[z].entries.length;N++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
-n[z].entries[N].id)&&F.entries.push(n[z].entries[N]);0<F.entries.length&&x.push(F)}n=x;if(k){z=mxUtils.bind(this,function(R){for(var T=0;T<R.length;T++)(function(P){var q=m.cloneNode(!1);q.style.fontWeight="bold";q.style.backgroundColor="light-dark(#e5e5e5, #505759)";q.style.padding="6px 0px 6px 20px";mxUtils.write(q,P.title);L.appendChild(q);for(var u=0;u<P.entries.length;u++)(function(J){var G=m.cloneNode(!1);G.style.cursor="pointer";G.style.padding="4px 0px 4px 20px";G.style.whiteSpace="nowrap";
-G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.setAttribute("title",J.title+" ("+J.id+")");var H=document.createElement("input");H.setAttribute("type","checkbox");H.checked=b.sidebar.isEntryVisible(J.id);H.defaultChecked=H.checked;G.appendChild(H);mxUtils.write(G," "+J.title);L.appendChild(G);var g=function(p){if(null==p||"INPUT"!=mxEvent.getSource(p).nodeName){c.style.textAlign="center";c.style.padding="0px";c.style.color="";c.innerText="";if(null!=J.desc){var C=document.createElement("pre");
-C.style.boxSizing="border-box";C.style.fontFamily="inherit";C.style.margin="20px";C.style.right="0px";C.style.textAlign="left";mxUtils.write(C,J.desc);c.appendChild(C)}null!=J.imageCallback?J.imageCallback(c):null!=J.image?(C=document.createElement("img"),C.setAttribute("border","0"),C.style.maxWidth="100%",C.setAttribute("src",J.image),c.appendChild(C)):null==J.desc&&(c.style.padding="20px",c.style.color="rgb(179, 179, 179)",mxUtils.write(c,mxResources.get("noPreview")));null!=f&&(f.style.backgroundColor=
-"");f=G;f.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=p&&mxEvent.consume(p)}};mxEvent.addListener(G,"click",g);mxEvent.addListener(G,"dblclick",function(p){H.checked=!H.checked;mxEvent.consume(p)});l.push(function(){return H.checked?J.id:null});0==T&&0==u&&g()})(P.entries[u])})(R[T])});N=document.createElement("div");N.className="geDialogTitle";mxUtils.write(N,mxResources.get("shapes"));N.style.position="absolute";N.style.top="0px";N.style.left="0px";N.style.lineHeight="40px";N.style.height=
-"40px";N.style.right="0px";var L=document.createElement("div"),c=document.createElement("div");L.style.position="absolute";L.style.top="40px";L.style.left="0px";L.style.width="202px";L.style.bottom="60px";L.style.overflow="auto";c.style.position="absolute";c.style.left="202px";c.style.right="0px";c.style.top="40px";c.style.bottom="60px";c.style.overflow="auto";c.style.borderLeftStyle="solid";c.style.borderLeftWidth="1px";c.style.textAlign="center";var f=null,l=[],m=document.createElement("div");m.style.position=
-"relative";m.style.left="0px";m.style.right="0px";z(n);d.style.padding="30px";d.appendChild(N);d.appendChild(L);d.appendChild(c);n=document.createElement("div");n.className="geDialogFooter";n.style.position="absolute";n.style.paddingRight="16px";n.style.left="0px";n.style.right="0px";n.style.bottom="0px";n.style.height="60px";n.style.lineHeight="52px";var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.position="relative";t.style.top="1px";t.checked=b.sidebar.sidebarTitles;
-t.defaultChecked=t.checked;n.appendChild(t);z=document.createElement("span");mxUtils.write(z," "+mxResources.get("labels"));z.style.paddingRight="20px";n.appendChild(z);mxEvent.addListener(z,"click",function(R){t.checked=!t.checked;mxEvent.consume(R)});var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)z=document.createElement("span"),z.style.paddingRight="20px",z.appendChild(v),mxUtils.write(z," "+mxResources.get("rememberThisSetting")),
-v.style.position="relative",v.style.top="1px",v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(z,"click",function(R){mxEvent.getSource(R)!=v&&(v.checked=!v.checked,mxEvent.consume(R))}),n.appendChild(z);z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});z.className="geBtn";N=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],T=0;T<l.length;T++){var P=l[T].apply(this,arguments);null!=P&&R.push(P)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&
-"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(T=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=T&&0<R.splice(T,1).length)&&b.toggleScratchpad(),T=mxUtils.indexOf(R,"search"),mxSettings.settings.search=0<=T&&0<R.splice(T,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),v.checked&&mxSettings.save());b.sidebar.showEntries(R.join(";"),v.checked,!0);b.setSidebarTitles(t.checked,v.checked)});N.className="geBtn gePrimaryBtn"}else{var B=document.createElement("table");
-z=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";N=document.createElement("tr");B.style.width="100%";k=document.createElement("td");x=document.createElement("td");y=document.createElement("td");var E=mxUtils.bind(this,function(R,T,P){var q=document.createElement("input");q.type="checkbox";B.appendChild(q);q.checked=b.sidebar.isEntryVisible(P);var u=document.createElement("span");mxUtils.write(u,T);T=document.createElement("div");T.style.display="block";T.appendChild(q);
-T.appendChild(u);mxEvent.addListener(u,"click",function(J){q.checked=!q.checked;mxEvent.consume(J)});R.appendChild(T);return function(){return q.checked?P:null}});N.appendChild(k);N.appendChild(x);N.appendChild(y);z.appendChild(N);B.appendChild(z);l=[];var D=0;for(z=0;z<n.length;z++)for(N=0;N<n[z].entries.length;N++)D++;var A=[k,x,y],S=0;for(z=0;z<n.length;z++)(function(R){for(var T=0;T<R.entries.length;T++){var P=R.entries[T];l.push(E(A[Math.floor(S/(D/3))],P.title,P.id));S++}})(n[z]);d.appendChild(B);
-n=document.createElement("div");n.style.marginTop="18px";n.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=!0,n.appendChild(v),z=document.createElement("span"),mxUtils.write(z," "+mxResources.get("rememberThisSetting")),n.appendChild(z),mxEvent.addListener(z,"click",function(R){v.checked=!v.checked;mxEvent.consume(R)}));d.appendChild(n);z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
-z.className="geBtn";N=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],T=0;T<l.length;T++){var P=l[T].apply(this,arguments);null!=P&&R.push(P)}b.sidebar.showEntries(0<R.length?R.join(";"):"",v.checked);b.hideDialog()});N.className="geBtn gePrimaryBtn";n=document.createElement("div");n.style.marginTop="26px";n.style.textAlign="right"}b.editor.cancelFirst?(n.appendChild(z),n.appendChild(N)):(n.appendChild(N),n.appendChild(z));d.appendChild(n);this.container=d},PluginsDialog=function(b,
-k,n,d){function x(){N=!0;if(0==F.length)y.innerText=mxResources.get("noPlugins");else{y.innerText="";for(var l=0;l<F.length;l++){var m=document.createElement("span");m.style.display="flex";m.style.alignItems="center";m.style.whiteSpace="nowrap";var t=document.createElement("img");t.src=Editor.trashImage;t.style.position="relative";t.style.cursor="pointer";t.style.marginRight="4px";t.style.display="inline-block";t.style.width="18px";t.setAttribute("title",mxResources.get("delete"));m.appendChild(t);
-mxUtils.write(m,F[l]);y.appendChild(m);mxUtils.br(y);mxEvent.addListener(t,"click",function(v){return function(){b.confirm(mxResources.get("delete")+' "'+F[v]+'"?',function(){null!=n&&n(F[v]);F.splice(v,1);x()})}}(l))}}}var z=document.createElement("div"),y=document.createElement("div");y.style.height="180px";y.style.overflow="auto";var F=mxSettings.getPlugins().slice(),N=!1;z.appendChild(y);x();N=!1;var K=mxUtils.button(mxResources.get("add"),null!=k?function(){k(function(l){l&&0>mxUtils.indexOf(F,
-l)&&F.push(l);x()})}:function(){var l=document.createElement("div"),m=document.createElement("span");m.style.marginTop="6px";mxUtils.write(m,mxResources.get("builtinPlugins")+": ");l.appendChild(m);var t=document.createElement("select");t.style.width="150px";for(m=0;m<App.publicPlugin.length;m++){var v=document.createElement("option");mxUtils.write(v,App.publicPlugin[m]);v.value=App.publicPlugin[m];t.appendChild(v)}l.appendChild(t);mxUtils.br(l);mxUtils.br(l);m=mxUtils.button(mxResources.get("custom")+
-"...",function(){var B=new FilenameDialog(b,"",mxResources.get("add"),function(E){b.hideDialog();if(null!=E&&0<E.length){E=E.split(";");for(var D=0;D<E.length;D++){var A=E[D],S=App.pluginRegistry[A];null!=S&&(A=S);0<A.length&&0>mxUtils.indexOf(F,A)&&F.push(A)}x()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(B.container,300,80,!0,!0);B.init()});m.className="geBtn";ALLOW_CUSTOM_PLUGINS||(m.style.display="none");l=new CustomDialog(b,l,mxUtils.bind(this,function(){var B=
-App.pluginRegistry[t.value];0>mxUtils.indexOf(F,B)&&(F.push(B),x())}),null,null,null,m);b.showDialog(l.container,360,100,!0,!0)});K.className="geBtn";var L=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});L.className="geBtn";var c=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){N?(mxSettings.setPlugins(F),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});c.className="geBtn gePrimaryBtn";var f=document.createElement("div");
-f.style.marginTop="14px";f.style.textAlign="right";b.isOffline()||f.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(d||f.appendChild(L),f.appendChild(K),f.appendChild(c)):(f.appendChild(K),f.appendChild(c),d||f.appendChild(L));z.appendChild(f);this.container=z},CropImageDialog=function(b,k,n,d){function x(){var R=v.checked,T=B.checked,P=l.geometry,q=N.width,u=N.height,J=(300-q)/2,G=(300-u)/2;P.x<J?(P.width-=J-P.x,P.x=J):P.x+P.width>J+q&&(P.width=J+q-P.x,
-P.x=Math.min(P.x,J+q));P.y<G?(P.height-=G-P.y,P.y=G):P.y+P.height>G+u&&(P.height=G+u-P.y,P.y=Math.min(P.y,G+u));var H=(P.x-J)/q*100;q=100-(P.x+P.width-J)/q*100;J=(P.y-G)/u*100;P=100-(P.y+P.height-G)/u*100;return"inset("+mxUtils.format(J)+"% "+mxUtils.format(q)+"% "+mxUtils.format(P)+"% "+mxUtils.format(H)+"%"+(R?" round "+f+"%":T?" round 50%":"")+")"}function z(R){null!=L&&(!0!==R&&(L.model.setGeometry(l,c.clone()),f=5,D.value=f),L.model.setStyle(l,m+x()),L.selectAll(),E.style.visibility=v.checked?
-"visible":"hidden")}var y=document.createElement("div"),F=document.createElement("div");F.style.height="300px";F.style.width="300px";F.style.display="inline-flex";F.style.justifyContent="center";F.style.alignItems="center";F.style.position="absolute";var N=document.createElement("img");N.onload=function(){function R(){L.model.setStyle(l,m+x())}L=new Graph(K);L.autoExtend=!1;L.autoScroll=!1;L.setGridEnabled(!1);L.setEnabled(!0);L.setPanning(!1);L.setConnectable(!1);L.getRubberband().setEnabled(!1);
-L.graphHandler.allowLivePreview=!1;var T=L.createVertexHandler;L.createVertexHandler=function(){var U=T.apply(this,arguments);U.livePreview=!1;return U};if(null!=n)try{if("inset"==n.substring(0,5)){var P=l.geometry,q=N.width,u=N.height,J=(300-q)/2,G=(300-u)/2,H=n.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),g=parseFloat(H[0]),p=parseFloat(H[1]),C=parseFloat(H[2]),I=parseFloat(H[3]);isFinite(g)&&isFinite(p)&&isFinite(C)&&isFinite(I)?(P.x=I/100*q+J,P.y=g/100*u+G,P.width=(100-p)/100*q+J-P.x,P.height=(100-
-C)/100*u+G-P.y,"round"==H[4]?"50%"==H[5]?B.setAttribute("checked","checked"):(f=parseInt(H[5]),D.value=f,v.setAttribute("checked","checked"),E.style.visibility="visible"):t.setAttribute("checked","checked")):n=null}else n=null}catch(U){}l.style=m+(n?n:x());l.vertex=!0;L.addCell(l,null,null,null,null);L.selectAll();L.addListener(mxEvent.CELLS_MOVED,R);L.addListener(mxEvent.CELLS_RESIZED,R);var M=L.graphHandler.mouseUp,O=L.graphHandler.mouseDown;L.graphHandler.mouseUp=function(){M.apply(this,arguments);
-K.style.backgroundColor="#fff9"};L.graphHandler.mouseDown=function(){O.apply(this,arguments);K.style.backgroundColor=""};L.dblClick=function(){};var Q=L.getSelectionModel().changeSelection;L.getSelectionModel().changeSelection=function(){Q.call(this,[l],[l])}};N.onerror=function(){N.onload=null;N.src=Editor.errorImage};N.setAttribute("src",k);N.style.maxWidth="300px";N.style.maxHeight="300px";F.appendChild(N);y.appendChild(F);var K=document.createElement("div");K.style.width="300px";K.style.height=
-"300px";K.style.overflow="hidden";K.style.backgroundColor="#fff9";y.appendChild(K);var L=null,c=new mxGeometry(100,100,100,100),f=5,l=new mxCell("",c.clone(),""),m="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+k.replace(";base64","")+";clipPath=",t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingRect");t.setAttribute("name","croppingShape");t.setAttribute("checked","checked");t.style.margin="5px";y.appendChild(t);k=document.createElement("label");
-k.setAttribute("for","croppingRect");mxUtils.write(k,mxResources.get("rectangle"));y.appendChild(k);var v=document.createElement("input");v.setAttribute("type","radio");v.setAttribute("id","croppingRounded");v.setAttribute("name","croppingShape");v.style.margin="5px";y.appendChild(v);k=document.createElement("label");k.setAttribute("for","croppingRounded");mxUtils.write(k,mxResources.get("rounded"));y.appendChild(k);var B=document.createElement("input");B.setAttribute("type","radio");B.setAttribute("id",
-"croppingEllipse");B.setAttribute("name","croppingShape");B.style.margin="5px";y.appendChild(B);k=document.createElement("label");k.setAttribute("for","croppingEllipse");mxUtils.write(k,mxResources.get("ellipse"));y.appendChild(k);mxEvent.addListener(t,"change",z);mxEvent.addListener(v,"change",z);mxEvent.addListener(B,"change",z);var E=document.createElement("div");E.style.textAlign="center";E.style.visibility="hidden";var D=document.createElement("input");D.setAttribute("type","range");D.setAttribute("min",
-"1");D.setAttribute("max","49");D.setAttribute("value",f);D.setAttribute("title",mxResources.get("arcSize"));E.appendChild(D);y.appendChild(E);mxEvent.addListener(D,"change",function(){f=this.value;z(!0)});k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";F=mxUtils.button(mxResources.get("apply"),function(){d(x(),l.geometry.width,l.geometry.height);b.hideDialog()});F.className="geBtn gePrimaryBtn";var A=mxUtils.button(mxResources.get("reset"),function(){d(null,
-N.width,N.height);b.hideDialog()});A.className="geBtn";var S=document.createElement("div");S.style.marginTop="10px";S.style.textAlign="right";b.editor.cancelFirst?(S.appendChild(k),S.appendChild(A),S.appendChild(F)):(S.appendChild(A),S.appendChild(F),S.appendChild(k));y.appendChild(S);this.container=y},EditGeometryDialog=function(b,k){var n=b.editor.graph,d=1==k.length?n.getCellGeometry(k[0]):null,x=document.createElement("div"),z=document.createElement("table"),y=document.createElement("tbody"),
-F=document.createElement("tr"),N=document.createElement("td"),K=document.createElement("td");z.style.paddingLeft="6px";mxUtils.write(N,mxResources.get("relative")+":");var L=document.createElement("input");L.setAttribute("type","checkbox");null!=d&&d.relative&&(L.setAttribute("checked","checked"),L.defaultChecked=!0);this.init=function(){L.focus()};K.appendChild(L);F.appendChild(N);F.appendChild(K);y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");K=document.createElement("td");
-mxUtils.write(N,mxResources.get("left")+":");var c=document.createElement("input");c.setAttribute("type","text");c.style.width="100px";c.value=null!=d?d.x:"";K.appendChild(c);F.appendChild(N);F.appendChild(K);y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");K=document.createElement("td");mxUtils.write(N,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=d?d.y:"";K.appendChild(f);F.appendChild(N);
-F.appendChild(K);y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");K=document.createElement("td");mxUtils.write(N,mxResources.get("dx")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=d&&null!=d.offset?d.offset.x:"";K.appendChild(l);F.appendChild(N);F.appendChild(K);y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");K=document.createElement("td");mxUtils.write(N,mxResources.get("dy")+
-":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=d&&null!=d.offset?d.offset.y:"";K.appendChild(m);F.appendChild(N);F.appendChild(K);y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");K=document.createElement("td");mxUtils.write(N,mxResources.get("width")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=d?d.width:"";K.appendChild(t);F.appendChild(N);F.appendChild(K);
-y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");K=document.createElement("td");mxUtils.write(N,mxResources.get("height")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=d?d.height:"";K.appendChild(v);F.appendChild(N);F.appendChild(K);y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");K=document.createElement("td");mxUtils.write(N,mxResources.get("rotation")+":");var B=document.createElement("input");
-B.setAttribute("type","text");B.style.width="100px";B.value=1==k.length?mxUtils.getValue(n.getCellStyle(k[0]),mxConstants.STYLE_ROTATION,0):"";K.appendChild(B);F.appendChild(N);F.appendChild(K);y.appendChild(F);z.appendChild(y);x.appendChild(z);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var E=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();n.getModel().beginUpdate();try{for(var D=0;D<k.length;D++){var A=n.getCellGeometry(k[D]);null!=
-A&&(A=A.clone(),n.isCellMovable(k[D])&&(A.relative=L.checked,0<mxUtils.trim(c.value).length&&(A.x=Number(c.value)),0<mxUtils.trim(f.value).length&&(A.y=Number(f.value)),0<mxUtils.trim(l.value).length&&(null==A.offset&&(A.offset=new mxPoint),A.offset.x=Number(l.value)),0<mxUtils.trim(m.value).length&&(null==A.offset&&(A.offset=new mxPoint),A.offset.y=Number(m.value))),n.isCellResizable(k[D])&&(0<mxUtils.trim(t.value).length&&(A.width=Number(t.value)),0<mxUtils.trim(v.value).length&&(A.height=Number(v.value))),
-n.getModel().setGeometry(k[D],A));0<mxUtils.trim(B.value).length&&n.setCellStyles(mxConstants.STYLE_ROTATION,Number(B.value),[k[D]])}}finally{n.getModel().endUpdate()}});E.className="geBtn gePrimaryBtn";mxEvent.addListener(x,"keypress",function(D){13==D.keyCode&&E.click()});z=document.createElement("div");z.style.marginTop="20px";z.style.textAlign="right";b.editor.cancelFirst?(z.appendChild(d),z.appendChild(E)):(z.appendChild(E),z.appendChild(d));x.appendChild(z);this.container=x},LibraryDialog=function(b,
-k,n,d,x,z,y){function F(q){for(q=document.elementFromPoint(q.clientX,q.clientY);null!=q&&q.parentNode!=t;)q=q.parentNode;var u=null;if(null!=q){var J=t.firstChild;for(u=0;null!=J&&J!=q;)J=J.nextSibling,u++}return u}function N(q,u,J,G,H,g,p,C,I){try{if(b.spinner.stop(),null==u||"image/"==u.substring(0,6))if(null==q&&null!=p||null==B[q]){var M=function(){Z.innerText="";Z.style.cursor="pointer";Z.style.whiteSpace="nowrap";Z.style.textOverflow="ellipsis";mxUtils.write(Z,null!=aa.title&&0<aa.title.length?
-aa.title:mxResources.get("untitled"));Z.style.color=null==aa.title||0==aa.title.length?"#d0d0d0":""};t.style.backgroundImage="";v.style.display="none";var O=H,Q=g;if(H>b.maxImageSize||g>b.maxImageSize){var U=Math.min(1,Math.min(b.maxImageSize/Math.max(1,H)),b.maxImageSize/Math.max(1,g));H*=U;g*=U}O>Q?(Q=Math.round(100*Q/O),O=100):(O=Math.round(100*O/Q),Q=100);var V=document.createElement("div");V.setAttribute("draggable","true");V.style.display="inline-block";V.style.position="relative";V.style.padding=
-"0 12px";V.style.cursor="move";mxUtils.setPrefixedStyle(V.style,"transition","transform .1s ease-in-out");if(null!=q){var X=document.createElement("img");X.setAttribute("src",S.convert(q));X.style.width=O+"px";X.style.height=Q+"px";X.style.margin="10px";X.style.paddingBottom=Math.floor((100-Q)/2)+"px";X.style.paddingLeft=Math.floor((100-O)/2)+"px";V.appendChild(X)}else if(null!=p){var W=b.stringToCells("<"==p.xml.charAt(0)?p.xml:Graph.decompress(p.xml));0<W.length&&(b.sidebar.createThumb(W,100,100,
-V,null,!0,!1,null,null,f.shapeBackgroundColor),V.firstChild.style.display="inline-block",V.firstChild.style.cursor="")}var Y=document.createElement("img");Y.setAttribute("src",Editor.closeBlackImage);Y.setAttribute("border","0");Y.setAttribute("title",mxResources.get("delete"));Y.setAttribute("align","top");Y.style.paddingTop="4px";Y.style.position="absolute";Y.style.marginLeft="-12px";Y.style.zIndex="1";Y.style.cursor="pointer";mxEvent.addListener(Y,"dragstart",function(la){mxEvent.consume(la)});
-(function(la,ba,fa){mxEvent.addListener(Y,"click",function(ja){B[ba]=null;for(var ca=0;ca<c.length;ca++)if(null!=c[ca].data&&c[ca].data==ba||null!=c[ca].xml&&null!=fa&&c[ca].xml==fa.xml){c.splice(ca,1);break}V.parentNode.removeChild(la);0==c.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(ja)});mxEvent.addListener(Y,"dblclick",function(ja){mxEvent.consume(ja)})})(V,q,p);V.appendChild(Y);V.style.marginBottom="30px";var Z=document.createElement("div");
-Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.bottom="-18px";Z.style.left="10px";Z.style.right="10px";Z.style.backgroundColor="light-dark(#ffffff, transparent)";Z.style.overflow="hidden";Z.style.textAlign="center";Z.setAttribute("title",mxResources.get("rename"));var aa=null;null!=q?(aa={data:q,w:H,h:g,title:I},null!=C&&(aa.aspect=C),B[q]=X,c.push(aa)):null!=p&&(p.aspect="fixed",c.push(p),aa=p);mxEvent.addListener(Z,"keydown",function(la){13==la.keyCode&&null!=A&&(A(),A=null,
-mxEvent.consume(la))});M();V.appendChild(Z);mxEvent.addListener(Z,"mousedown",function(la){"true"!=Z.getAttribute("contentEditable")&&mxEvent.consume(la)});W=function(la){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ba=new FilenameDialog(b,aa.title||"",mxResources.get("ok"),function(fa){null!=fa&&(aa.title=fa,M())},mxResources.get("enterValue"));b.showDialog(ba.container,300,80,!0,!0);ba.init();mxEvent.consume(la)}else if("true"!=Z.getAttribute("contentEditable")){null!=
-A&&(A(),A=null);if(null==aa.title||0==aa.title.length)Z.innerText="";Z.style.textOverflow="";Z.style.whiteSpace="";Z.style.cursor="text";Z.style.color="";Z.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(Z.style,"user-select","text");Z.focus();document.execCommand("selectAll",!1,null);A=function(){Z.removeAttribute("contentEditable");Z.style.cursor="pointer";aa.title=mxUtils.getTextContent(Z);M()};mxEvent.consume(la)}};mxEvent.addListener(Z,"click",W);mxEvent.addListener(V,"dblclick",
-W);t.appendChild(V);mxEvent.addListener(V,"dragstart",function(la){null==A&&(null==q&&null!=p&&(Y.style.visibility="hidden",Z.style.visibility="hidden"),mxClient.IS_FF&&null!=p.xml&&la.dataTransfer.setData("Text",p.xml),E=F(la),mxClient.IS_GC&&(V.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(V.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(V,30);Y.style.visibility="";Z.style.visibility=""},0))});mxEvent.addListener(V,"dragend",function(la){"hidden"==Y.style.visibility&&
-(Y.style.visibility="",Z.style.visibility="");E=null;mxUtils.setOpacity(V,100);mxUtils.setPrefixedStyle(V.style,"transform",null)})}else R||(R=!0,b.handleError({message:mxResources.get("fileExists")}));else{H=!1;try{if(O=mxUtils.parseXml(q),"mxlibrary"==O.documentElement.nodeName){Q=JSON.parse(mxUtils.getTextContent(O.documentElement));if(null!=Q&&0<Q.length)for(var ha=0;ha<Q.length;ha++)null!=Q[ha].xml?N(null,null,0,0,0,0,Q[ha]):N(Q[ha].data,null,0,0,Q[ha].w,Q[ha].h,null,"fixed",Q[ha].title);H=!0}else if("mxfile"==
-O.documentElement.nodeName){var ea=O.documentElement.getElementsByTagName("diagram");for(ha=0;ha<ea.length;ha++){var da=Editor.getDiagramNodeXml(ea[ha]);W=b.stringToCells(da);if(0<W.length){var ia=b.editor.graph.getBoundingBoxFromGeometry(W);null!=ia&&N(null,null,0,0,0,0,{xml:da,w:ia.width,h:ia.height})}}H=!0}}catch(la){null!=window.console&&console.error("Error in library dialog: "+la)}H||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(la){null!=window.console&&
-console.log("Error in library dialog: "+la)}return null}function K(q){q.dataTransfer.dropEffect=null!=E?"move":"copy";q.stopPropagation();q.preventDefault()}function L(q){q.stopPropagation();q.preventDefault();R=!1;D=F(q);if(null!=E)null!=D&&D<t.children.length?(c.splice(D>E?D-1:D,0,c.splice(E,1)[0]),t.insertBefore(t.children[E],t.children[D])):(c.push(c.splice(E,1)[0]),t.appendChild(t.children[E]));else if(0<q.dataTransfer.files.length)b.importFiles(q.dataTransfer.files,0,0,b.maxImageSize,T(q));
-else if(0<=mxUtils.indexOf(q.dataTransfer.types,"text/uri-list")){var u=decodeURIComponent(q.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(u)||/(\.png)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.svg)($|\?)/i.test(u))&&b.loadImage(u,function(J){N(u,null,0,0,J.width,J.height);t.scrollTop=t.scrollHeight})}q.stopPropagation();q.preventDefault()}var c=[],f=b.editor.graph;n=document.createElement("div");n.style.height="100%";var l=document.createElement("div");l.style.whiteSpace="nowrap";
-l.style.height="40px";n.appendChild(l);mxUtils.write(l,mxResources.get("filename")+":");null==k&&(k=b.defaultLibraryName+".xml");var m=document.createElement("input");m.setAttribute("value",k);m.style.marginRight="20px";m.style.marginLeft="10px";m.style.width="500px";null==x||x.isRenamable()||m.setAttribute("disabled","true");this.init=function(){if(null==x||x.isRenamable())m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)};l.appendChild(m);
-Editor.enableUncompressedLibraries&&(m.style.width="420px",k=document.createElement("input"),k.setAttribute("type","checkbox"),k.style.marginRight="10px",l.appendChild(k),mxUtils.write(l,mxResources.get("compressed")));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==c.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));n.appendChild(v);var B={},E=null,D=null,A=null;l=function(q){"true"!=mxEvent.getSource(q).getAttribute("contentEditable")&&null!=A&&(A(),A=null,mxEvent.consume(q))};mxEvent.addListener(t,
-"mousedown",l);mxEvent.addListener(t,"pointerdown",l);mxEvent.addListener(t,"touchstart",l);var S=new mxUrlConverter,R=!1;if(null!=d)for(l=0;l<d.length;l++)k=d[l],N(k.data,null,0,0,k.w,k.h,k,k.aspect,k.title);mxEvent.addListener(t,"dragleave",function(q){v.style.cursor="";for(var u=mxEvent.getSource(q);null!=u;){if(u==t||u==v){q.stopPropagation();q.preventDefault();break}u=u.parentNode}});var T=function(q){return function(u,J,G,H,g,p,C,I,M){null!=M&&EditorUi.isVisioFilename(M.name)?b.importVisio(M,
-mxUtils.bind(this,function(O){N(O,J,G,H,g,p,C,"fixed",mxEvent.isAltDown(q)?null:C.substring(0,C.lastIndexOf(".")).replace(/_/g," "))})):null!=M&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(u,M.name)?b.isExternalDataComms()?b.parseFile(M,mxUtils.bind(this,function(O){4==O.readyState&&(b.spinner.stop(),200<=O.status&&299>=O.status&&(N(O.responseText,J,G,H,g,p,C,"fixed",mxEvent.isAltDown(q)?null:C.substring(0,C.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(b.spinner.stop(),
-b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(N(u,J,G,H,g,p,C,"fixed",mxEvent.isAltDown(q)?null:C.substring(0,C.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",K);mxEvent.addListener(t,"drop",L);mxEvent.addListener(v,"dragover",K);mxEvent.addListener(v,"drop",L);n.appendChild(t);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});
-l.setAttribute("id","btnCancel");l.className="geBtn";b.editor.cancelFirst&&d.appendChild(l);"draw.io"!=b.getServiceName()||null==x||x.constructor!=DriveLibrary&&x.constructor!=GitHubLibrary||(k=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(x,function(q){if(null!=q){var u=b.getSearch("create title mode url drive splash state clibs ui".split(" "));u+=(0==u.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(q);q=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
-"/"+u,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(q.container,450,240,!0);q.init()}else x.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(x.getId(),x)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),k.className="geBtn",d.appendChild(k));k=mxUtils.button(mxResources.get("export"),
-function(){var q=b.createLibraryDataFromImages(c),u=m.value;/(\.xml)$/i.test(u)||(u+=".xml");b.isLocalFileSave()?b.saveLocalFile(q,u,"text/xml",null,null,null!=y?y:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(u)+"&format=xml&xml="+encodeURIComponent(q))).simulate(document,"_blank")});k.setAttribute("id","btnDownload");k.className="geBtn";d.appendChild(k);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var P=document.createElement("input");P.setAttribute("multiple",
-"multiple");P.setAttribute("type","file");mxEvent.addListener(P,"change",function(q){R=!1;b.importFiles(P.files,0,0,b.maxImageSize,function(u,J,G,H,g,p,C,I,M){null!=P.files&&(T(q)(u,J,G,H,g,p,C,I,M),P.type="",P.type="file",P.value="")});t.scrollTop=t.scrollHeight});P.style.display="none";document.body.appendChild(P);b.libDlgFileInputElt=P}k=mxUtils.button(mxResources.get("import"),function(){null!=A&&(A(),A=null);b.libDlgFileInputElt.click()});k.setAttribute("id","btnAddImage");k.className="geBtn";
-d.appendChild(k)}k=mxUtils.button(mxResources.get("addImages"),function(){null!=A&&(A(),A=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(q,u,J){R=!1;if(null!=q){if("data:image/"==q.substring(0,11)){var G=q.indexOf(",");0<G&&(q=q.substring(0,G)+";base64,"+q.substring(G+1))}N(q,null,0,0,u,J);t.scrollTop=t.scrollHeight}})});k.setAttribute("id","btnAddImageUrl");k.className="geBtn";d.appendChild(k);this.saveBtnClickHandler=function(q,u,J,G){b.saveLibrary(q,u,J,G)};k=mxUtils.button(mxResources.get("save"),
-mxUtils.bind(this,function(){null!=A&&(A(),A=null);this.saveBtnClickHandler(m.value,c,x,z)}));k.setAttribute("id","btnSave");k.className="geBtn gePrimaryBtn";d.appendChild(k);b.editor.cancelFirst||d.appendChild(l);n.appendChild(d);this.container=n},EditShapeDialog=function(b,k,n,d,x){d=null!=d?d:300;x=null!=x?x:120;var z=document.createElement("table"),y=document.createElement("tbody");z.style.cellPadding="4px";var F=document.createElement("tr");var N=document.createElement("td");N.setAttribute("colspan",
-"2");N.style.fontSize="10pt";mxUtils.write(N,n);F.appendChild(N);y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");var K=document.createElement("textarea");K.style.outline="none";K.style.resize="none";K.style.width=d-200+"px";K.style.height=x+"px";this.textarea=K;this.init=function(){K.focus();K.scrollTop=0};N.appendChild(K);F.appendChild(N);N=document.createElement("td");n=document.createElement("div");n.style.position="relative";n.style.border="1px solid gray";n.style.top=
-"6px";n.style.width="200px";n.style.height=x+4+"px";n.style.overflow="hidden";n.style.marginBottom="16px";mxEvent.disableContextMenu(n);N.appendChild(n);var L=new Graph(n);L.setEnabled(!1);var c=b.editor.graph.cloneCell(k);L.addCells([c]);n=L.view.getState(c);var f="";null!=n.shape&&null!=n.shape.stencil&&(f=mxUtils.getPrettyXml(n.shape.stencil.desc));mxUtils.write(K,f||"");n=L.getGraphBounds();x=Math.min(160/n.width,(x-40)/n.height);L.view.scaleAndTranslate(x,20/x-n.x,20/x-n.y);F.appendChild(N);
-y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");N.setAttribute("colspan","2");N.style.paddingTop="2px";N.style.whiteSpace="nowrap";N.setAttribute("align","right");b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),x.className="geBtn",N.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&N.appendChild(x);
-var l=function(m,t,v){var B=K.value,E=mxUtils.parseXml(B);B=mxUtils.getPrettyXml(E.documentElement);E=E.documentElement.getElementsByTagName("parsererror");if(null!=E&&0<E.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(v&&b.hideDialog(),E=!m.model.contains(t),!v||E||B!=f){B=Graph.compress(B);m.getModel().beginUpdate();try{if(E){var D=b.editor.graph.getFreeInsertPoint();t.geometry.x=D.x;t.geometry.y=D.y;m.addCell(t)}m.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+B+")",[t])}catch(A){throw A;}finally{m.getModel().endUpdate()}E&&(m.setSelectionCell(t),m.scrollCellToVisible(t))}};n=mxUtils.button(mxResources.get("preview"),function(){l(L,c,!1)});n.className="geBtn";N.appendChild(n);n=mxUtils.button(mxResources.get("apply"),function(){l(b.editor.graph,k,!0)});n.className="geBtn gePrimaryBtn";N.appendChild(n);b.editor.cancelFirst||N.appendChild(x);F.appendChild(N);y.appendChild(F);z.appendChild(y);this.container=z},CustomDialog=function(b,k,n,d,x,z,
-y,F,N,K,L,c){var f=document.createElement("div");f.appendChild(k);var l=document.createElement("div");l.style.marginTop=null!=c?c:"30px";l.style.textAlign="right";null!=y&&l.appendChild(y);b.isOffline()||null==z||l.appendChild(b.createHelpIcon(z));k=mxUtils.button(N||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});k.className="geBtn";F&&(k.style.display="none");b.editor.cancelFirst&&l.appendChild(k);x=mxUtils.button(x||mxResources.get("ok"),mxUtils.bind(this,function(){K||b.hideDialog(null,
-null,this.container);if(null!=n){var m=n();if("string"===typeof m){b.showError(mxResources.get("error"),m);return}}K&&b.hideDialog(null,null,this.container)}));l.appendChild(x);x.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(k);if(null!=L)for(F=0;F<L.length;F++)(function(m,t,v){m=mxUtils.button(m,function(B){t(B)});null!=v&&m.setAttribute("title",v);m.className="geBtn";l.appendChild(m)})(L[F][0],L[F][1],L[F][2]);f.appendChild(l);this.cancelBtn=k;this.okButton=x;this.container=
-f},BtnDialog=function(b,k,n,d){var x=document.createElement("div");x.style.textAlign="center";var z=document.createElement("p");z.style.fontSize="16pt";z.style.padding="0px";z.style.margin="0px";z.style.color="gray";mxUtils.write(z,mxResources.get("done"));var y="Unknown",F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("align","absmiddle");F.style.marginRight="10px";k==b.drive?(y=mxResources.get("googleDrive"),F.src=IMAGE_PATH+"/google-drive-logo-white.svg"):k==b.dropbox?
-(y=mxResources.get("dropbox"),F.src=IMAGE_PATH+"/dropbox-logo-white.svg"):k==b.oneDrive?(y=mxResources.get("oneDrive"),F.src=IMAGE_PATH+"/onedrive-logo-white.svg"):k==b.gitHub?(y=mxResources.get("github"),F.src=IMAGE_PATH+"/github-logo-white.svg"):k==b.gitLab?(y=mxResources.get("gitlab"),F.src=IMAGE_PATH+"/gitlab-logo.svg"):k==b.trello&&(y=mxResources.get("trello"),F.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[y],"You are now authorized in {1}"));
-n=mxUtils.button(n,d);n.insertBefore(F,n.firstChild);n.style.marginTop="6px";n.className="geBigButton";n.style.fontSize="18px";n.style.padding="14px";x.appendChild(z);x.appendChild(b);x.appendChild(n);this.container=x},FontDialog=function(b,k,n,d,x){function z(D){this.style.border="";13==D.keyCode&&E.click()}var y=document.createElement("table"),F=document.createElement("tbody");y.style.marginTop="8px";var N=document.createElement("tr");var K=document.createElement("td");K.colSpan=2;K.style.whiteSpace=
-"nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value","sysfonts");L.setAttribute("type","radio");L.setAttribute("name","current-fontdialog");L.setAttribute("id","fontdialog-sysfonts");K.appendChild(L);var c=document.createElement("label");c.setAttribute("for","fontdialog-sysfonts");mxUtils.write(c,mxResources.get("sysFonts",null,"System Fonts"));K.appendChild(c);N.appendChild(K);
-F.appendChild(N);N=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");N.appendChild(K);var f=document.createElement("input");"s"==d&&f.setAttribute("value",k);f.style.marginLeft="4px";f.style.width="250px";f.className="dlg_fontName_s";K=document.createElement("td");K.appendChild(f);N.appendChild(K);F.appendChild(N);N=document.createElement("tr");
-K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","googlefonts");l.setAttribute("type","radio");l.setAttribute("name","current-fontdialog");l.setAttribute("id","fontdialog-googlefonts");K.appendChild(l);c=document.createElement("label");c.setAttribute("for","fontdialog-googlefonts");mxUtils.write(c,mxResources.get("googleFonts",
-null,"Google Fonts"));K.appendChild(c);if(!b.isOffline()||EditorUi.isElectronApp)c=b.createHelpIcon("https://fonts.google.com/"),K.appendChild(c);N.appendChild(K);"0"!=urlParams.isGoogleFontsEnabled&&F.appendChild(N);N=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");N.appendChild(K);var m=document.createElement("input");
-"g"==d&&m.setAttribute("value",k);m.style.marginLeft="4px";m.style.width="250px";m.className="dlg_fontName_g";K=document.createElement("td");K.appendChild(m);N.appendChild(K);"0"!=urlParams.isGoogleFontsEnabled&&F.appendChild(N);N=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","webfonts");
-t.setAttribute("type","radio");t.setAttribute("name","current-fontdialog");t.setAttribute("id","fontdialog-webfonts");K.appendChild(t);c=document.createElement("label");c.setAttribute("for","fontdialog-webfonts");mxUtils.write(c,mxResources.get("webfonts",null,"Web Fonts"));K.appendChild(c);N.appendChild(K);Editor.enableWebFonts&&F.appendChild(N);N=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft=
-"15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");N.appendChild(K);var v=document.createElement("input");"w"==d&&(Editor.enableWebFonts?v.setAttribute("value",k):f.setAttribute("value",k));v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontName_w";K=document.createElement("td");K.appendChild(v);N.appendChild(K);Editor.enableWebFonts&&F.appendChild(N);N=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";
-K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontUrl",null,"Font URL")+":");N.appendChild(K);var B=document.createElement("input");B.setAttribute("value",n||"");B.style.marginLeft="4px";B.style.width="250px";B.className="dlg_fontUrl";K=document.createElement("td");K.appendChild(B);N.appendChild(K);Editor.enableWebFonts&&F.appendChild(N);this.init=function(){var D=f;"g"==d?D=m:"w"==d&&Editor.enableWebFonts&&(D=v);D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-D.select():document.execCommand("selectAll",!1,null)};N=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="20px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");b.isOffline()||K.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();x()});k.className="geBtn";b.editor.cancelFirst&&K.appendChild(k);var E=mxUtils.button(mxResources.get("apply"),function(){if(L.checked){var D=
-f.value;var A="s"}else if(l.checked){D=m.value;var S=Editor.GOOGLE_FONTS+encodeURIComponent(D).replace(/%20/g,"+");A="g"}else t.checked&&(D=v.value,S=B.value,A="w");var R=D;var T=S,P=A,q=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,u=y.querySelector(".dlg_fontName_"+P);null==u||null!=R&&0!=R.length?(u=y.querySelector(".dlg_fontUrl"),null==u||"w"!=P||q.test(T)?R=!0:(u.style.border="1px solid red",R=!1)):(u.style.border="1px solid red",R=!1);R&&(x(D,S,A),b.hideDialog())});
-E.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keypress",z);mxEvent.addListener(m,"keypress",z);mxEvent.addListener(v,"keypress",z);mxEvent.addListener(B,"keypress",z);mxEvent.addListener(f,"focus",function(){L.setAttribute("checked","checked");L.checked=!0});mxEvent.addListener(m,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(v,"focus",function(){t.setAttribute("checked","checked");t.checked=!0});mxEvent.addListener(B,"focus",function(){t.setAttribute("checked",
-"checked");t.checked=!0});K.appendChild(E);b.editor.cancelFirst||K.appendChild(k);N.appendChild(K);F.appendChild(N);y.appendChild(F);this.container=y};
-function AspectDialog(b,k,n,d,x){this.aspect={pageId:k||(b.pages?b.pages[0].getId():null),layerIds:n||[]};k=document.createElement("div");var z=document.createElement("h5");z.style.margin="0 0 10px";mxUtils.write(z,mxResources.get("pages"));k.appendChild(z);n=document.createElement("div");n.className="geAspectDlgList";k.appendChild(n);z=document.createElement("h5");z.style.margin="0 0 10px";mxUtils.write(z,mxResources.get("layers"));k.appendChild(z);z=document.createElement("div");z.className="geAspectDlgList";
-k.appendChild(z);this.pagesContainer=n;this.layersContainer=z;this.ui=b;n=document.createElement("div");n.style.marginTop="16px";n.style.textAlign="center";z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=x&&x()});z.className="geBtn";b.editor.cancelFirst&&n.appendChild(z);var y=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));n.appendChild(y);y.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||n.appendChild(z);y.setAttribute("disabled","disabled");this.okBtn=y;k.appendChild(n);this.container=k}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var k=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(k.getId(),k.getName(),k.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
-AspectDialog.prototype.createViewer=function(b,k,n,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var x=new Graph(b);x.setTooltips(!1);x.setEnabled(!1);x.setPanning(!1);x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;k="mxGraphModel"==k.nodeName?k:Editor.parseDiagramNode(k);if(null!=k){var z=k.getAttribute("background");if(null==z||""==z||z==mxConstants.NONE)z=null!=d?d:"#ffffff";b.style.backgroundColor=z;d=new mxCodec(k.ownerDocument);b=x.getModel();d.decode(k,b);k=b.getChildCount(b.root);
-d=null==n;for(z=0;z<k;z++){var y=b.getChildAt(b.root,z);b.setVisible(y,d||n==y.id)}x.maxFitScale=1;x.fit(0);x.center()}return x};
-AspectDialog.prototype.createPageItem=function(b,k,n){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(k)+"</div>";this.pagesContainer.appendChild(d);var x=this.createViewer(d.childNodes[0],n);k=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;
-this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var z=x.model;z=z.getChildCells(z.getRoot());for(var y=0;y<z.length;y++)this.createLayerItem(z[y],b,x,n)});mxEvent.addListener(d,"click",k);this.aspect.pageId==b&&k()};
-AspectDialog.prototype.createLayerItem=function(b,k,n,d){k=n.convertValueToString(b)||mxResources.get("background")||"Background";var x=document.createElement("div");x.setAttribute("data-layer-id",b.id);x.className="geAspectDlgListItem";x.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(k)+"</div>";this.layersContainer.appendChild(x);this.createViewer(x.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=x.className.indexOf("geAspectDlgListItemSelected")?
-(x.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(x.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(x,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};
-var FilePropertiesDialog=function(b,k){function n(A){var S=K;K=function(R,T){try{A(function(){S(R,T)},T)}catch(P){T(P)}}}var d=document.createElement("table"),x=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var z=b.getCurrentFile(),y=null!=z&&null!=z.getTitle()?z.getTitle():b.defaultFilename,F=/(\.png)$/i.test(y),N=/(\.svg)$/i.test(y),K=function(A,S){A()},L=null!=z?z.isLocked():!1;var c=document.createElement("tr");var f=document.createElement("td");
-f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("locked")+":");c.appendChild(f);var l=document.createElement("input");l.setAttribute("type","checkbox");L&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(l);c.appendChild(f);x.appendChild(c);this.init=function(){l.focus()};n(function(A,S){null!=b.fileNode&&L!=l.checked?window.setTimeout(function(){null!=
-z&&z.setLocked(l.checked);A()},0):A()});if(F||N){y=1;F=0;c=b.fileNode;null!=c&&(c.hasAttribute("scale")&&(y=parseFloat(c.getAttribute("scale"))),c.hasAttribute("border")&&(F=parseInt(c.getAttribute("border"))));c=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("zoom")+":");c.appendChild(f);var m=document.createElement("input");m.setAttribute("value",100*y+"%");m.style.marginLeft="4px";m.style.width="100%";
-f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(m);c.appendChild(f);x.appendChild(c);c=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("borderWidth")+":");c.appendChild(f);var t=document.createElement("input");t.setAttribute("value",F);t.style.marginLeft="4px";t.style.width="100%";f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(t);c.appendChild(f);x.appendChild(c);
-this.init=this.init||function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)};n(function(A,S){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(m.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(t.value))),null!=z&&z.fileChanged());A()})}else if(!/(\.html)$/i.test(y)&&!/(\.svg)$/i.test(y)){var v=null!=z?z.isCompressed():Editor.defaultCompressed;c=document.createElement("tr");f=document.createElement("td");
-f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("compressed")+":");c.appendChild(f);var B=document.createElement("input");B.setAttribute("type","checkbox");v&&(B.setAttribute("checked","checked"),B.defaultChecked=!0);f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(B);c.appendChild(f);x.appendChild(c);this.init=this.init||function(){B.focus()};n(function(A,S){null!=b.fileNode&&v!=
-B.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",B.checked?"true":"false");null!=z&&(z.compressionChanged(B.checked),z.fileChanged());A()},0):A()})}if(null!=z&&z.isRealtimeOptional()){c=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("realtimeCollaboration")+":");c.appendChild(f);var E=document.createElement("input");E.setAttribute("type",
-"checkbox");var D=z.isRealtimeEnabled();if(D="disabled"!=b.drive.getCustomProperty(z.desc,"collaboration"))E.setAttribute("checked","checked"),E.defaultChecked=!0;n(function(A,S){E.checked!=D?z.setRealtimeEnabled(E.checked,A,S):A()});this.init=null!=this.init?this.init:function(){E.focus()};f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(E);f.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));c.appendChild(f);x.appendChild(c)}null!=z&&
-"draw.io"==b.getServiceName()&&0<z.getSize()&&"1"!=urlParams.embed&&(c=document.createElement("tr"),f=document.createElement("td"),f.style.whiteSpace="nowrap",f.style.overflow="hidden",f.style.textOverflow="ellipsis",f.style.fontSize="10pt",mxUtils.write(f,mxResources.get("size")+":"),c.appendChild(f),f=b.formatFileSize(z.getSize()),y=document.createElement("input"),y.setAttribute("title",f),y.setAttribute("value",f),y.setAttribute("disabled","disabled"),y.style.marginLeft="4px",y.style.width="100%",
-f=document.createElement("td"),f.style.whiteSpace="nowrap",f.appendChild(y),c.appendChild(f),x.appendChild(c));null!=k&&(c=document.createElement("tr"),f=document.createElement("td"),f.style.whiteSpace="nowrap",f.style.overflow="hidden",f.style.textOverflow="ellipsis",f.style.fontSize="10pt",mxUtils.write(f,mxResources.get("publicDiagramUrl")+":"),c.appendChild(f),y=document.createElement("a"),y.setAttribute("href",k),y.setAttribute("title",k),y.style.whiteSpace="nowrap",y.style.overflow="hidden",
-y.style.textOverflow="ellipsis",y.style.display="block",y.style.margin="2px 0px 2px 8px",y.style.fontSize="10pt",mxUtils.write(y,k),mxEvent.addListener(y,"click",function(A){b.openLink(k);mxEvent.consume(A)}),f=document.createElement("td"),f.appendChild(y),c.appendChild(f),x.appendChild(c));null!=z&&null!=z.fileObject&&null!=z.fileObject.path&&(c=document.createElement("tr"),f=document.createElement("td"),f.style.whiteSpace="nowrap",f.style.overflow="hidden",f.style.textOverflow="ellipsis",f.style.fontSize=
-"10pt",mxUtils.write(f,mxResources.get("pathFilename")+":"),c.appendChild(f),y=document.createElement("input"),y.setAttribute("title",z.fileObject.path),y.setAttribute("value",z.fileObject.path),y.setAttribute("disabled","disabled"),y.style.marginLeft="4px",y.style.width="100%",f=document.createElement("td"),f.appendChild(y),c.appendChild(f),x.appendChild(c));this.init=null!=this.init?this.init:function(){};y=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-K(function(){b.spinner.stop();b.hideDialog()},function(A){b.spinner.stop();b.handleError(A,mxResources.get("error"))})});y.className="geBtn gePrimaryBtn";c=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="20px";f.style.whiteSpace="nowrap";f.setAttribute("align","right");F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";b.editor.cancelFirst&&f.appendChild(F);f.appendChild(y);b.editor.cancelFirst||f.appendChild(F);c.appendChild(f);
-x.appendChild(c);d.appendChild(x);this.container=d},ConnectionPointsDialog=function(b,k){function n(){null!=x&&x.destroy()}var d=document.createElement("div");d.style.userSelect="none";var x=null;this.init=function(){function z(G,H,g){var p="shape=image;points=[];rotatable=0;resizable=0;connectable=0;editable=0;image="+b.convertDataUri(mxConstraintHandler.prototype.pointImage.src)+";";G=new mxCell("",new mxGeometry(G,H,6,6),p);G.vertex=!0;G.cp=!0;G.constObj=g;return c.addCell(G)}function y(G){G=c.getSelectionCells();
-c.deleteCells(G)}function F(){var G=parseInt(P.value)||0;G=0>G?0:100<G?100:G;P.value=G;var H=parseInt(u.value)||0;H=0>H?0:100<H?100:H;u.value=H;var g=parseInt(q.value)||0,p=parseInt(J.value)||0;g=new mxConnectionConstraint(new mxPoint(G/100,H/100),!1,null,g,p);G=c.getConnectionPoint(m,g);H=c.getSelectionCell();if(null!=H){H.constObj=g;g=H.geometry.clone();p=c.view.scale;var C=c.view.translate;g.x=(G.x-3*p)/p-C.x;g.y=(G.y-3*p)/p-C.y;c.model.setGeometry(H,g)}}function N(G){if(G.constObj)return{x:G.constObj.point.x,
-y:G.constObj.point.y,dx:G.constObj.dx,dy:G.constObj.dy};var H=0,g=0,p=f.geometry,C=mxUtils.format((G.geometry.x+3-p.x)/p.width);G=mxUtils.format((G.geometry.y+3-p.y)/p.height);0>C?(H=C*p.width,C=0):1<C&&(H=(C-1)*p.width,C=1);0>G?(g=G*p.height,G=0):1<G&&(g=(G-1)*p.height,G=1);return{x:C,y:G,dx:parseInt(H),dy:parseInt(g)}}function K(G){if(1==c.getSelectionCount()){var H=c.getSelectionCell();G&&(H.constObj=null);G=N(H);P.value=100*G.x;u.value=100*G.y;q.value=G.dx;J.value=G.dy;T.style.visibility=""}else T.style.visibility=
-"hidden"}var L=document.createElement("div");L.style.width="350px";L.style.height="350px";L.style.overflow="hidden";L.style.borderStyle="solid";L.style.borderWidth="1px";L.style.boxSizing="border-box";mxEvent.disableContextMenu(L);d.appendChild(L);var c=new Graph(L);c.transparentBackground=!1;c.autoExtend=!1;c.autoScroll=!1;c.setGridEnabled(!1);c.setEnabled(!0);c.setPanning(!0);c.setConnectable(!1);c.setTooltips(!1);c.minFitScale=null;c.maxFitScale=null;c.centerZoom=!0;c.maxFitScale=2;L=k.geometry;
-var f=new mxCell(k.value,new mxGeometry(0,0,L.width,L.height),k.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;opacity=50;");f.vertex=!0;c.addCell(f);c.dblClick=function(G,H){if(null!=H&&H!=f)c.setSelectionCell(H);else{H=mxUtils.convertPoint(c.container,mxEvent.getClientX(G),mxEvent.getClientY(G));mxEvent.consume(G);G=c.view.scale;var g=c.view.translate;c.setSelectionCell(z((H.x-3*G)/G-g.x,(H.y-3*G)/G-g.y))}};x=new mxKeyHandler(c);x.bindKey(46,y);x.bindKey(8,y);c.getRubberband().isForceRubberbandEvent=
-function(G){return 0==G.evt.button&&(null==G.getCell()||G.getCell()==f)};c.panningHandler.isForcePanningEvent=function(G){return 2==G.evt.button};var l=c.isCellSelectable;c.isCellSelectable=function(G){return G==f?!1:l.apply(this,arguments)};c.getLinkForCell=function(){return null};var m=c.view.getState(f);L=c.getAllConnectionConstraints(m);for(var t=0;null!=L&&t<L.length;t++){var v=c.getConnectionPoint(m,L[t]);z(v.x-3,v.y-3,L[t])}c.fit(8);c.center();t=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
-function(){c.zoomIn()});v=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){c.zoomOut()});var B=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==c.view.scale?(c.maxFitScale=8,c.fit(8)):c.zoomActual();c.center()}),E=function(){b.prompt(mxResources.get("gridSize"),c.gridSize,function(G){!isNaN(G)&&0<G&&(c.setGridSize(G),c.setGridEnabled(!0),c.refresh())})},D=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(G){mxEvent.isShiftDown(G)?
-E():(c.setGridEnabled(!c.isGridEnabled()),c.refresh())});mxEvent.addListener(D,"dblclick",E);var A=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),y);mxUtils.setOpacity(A,10);L=document.createElement("div");L.style.display="flex";L.style.alignItems="center";L.style.paddingTop="6px";L.appendChild(t);L.appendChild(v);L.appendChild(B);L.appendChild(D);L.appendChild(A);d.appendChild(L);var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","1");S.setAttribute("value",
-"1");S.style.width="45px";S.style.position="relative";S.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";v=["left","right","top","bottom"];for(t=0;t<v.length;t++)B=v[t],D=document.createElement("option"),mxUtils.write(D,mxResources.get(B)),D.value=B,R.appendChild(D);t=mxUtils.button(mxResources.get("add"),function(){var G=parseInt(S.value);G=1>G?1:100<G?100:G;S.value=G;for(var H=R.value,g=f.geometry,p=[],C=0;C<G;C++){switch(H){case "left":var I=g.x;var M=
-g.y+(C+1)*g.height/(G+1);break;case "right":I=g.x+g.width;M=g.y+(C+1)*g.height/(G+1);break;case "top":I=g.x+(C+1)*g.width/(G+1);M=g.y;break;case "bottom":I=g.x+(C+1)*g.width/(G+1),M=g.y+g.height}p.push(z(I-3,M-3))}c.setSelectionCells(p)});t.style.marginLeft="auto";L.appendChild(t);L.appendChild(S);L.appendChild(R);var T=document.createElement("div");T.style.margin="4px 0px 8px 0px";T.style.whiteSpace="nowrap";T.style.height="24px";L=document.createElement("span");mxUtils.write(L,mxResources.get("dx"));
-T.appendChild(L);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.setAttribute("max","100");P.style.width="45px";P.style.margin="0 4px 0 4px";T.appendChild(P);mxUtils.write(T,"%");var q=document.createElement("input");q.setAttribute("type","number");q.style.width="45px";q.style.margin="0 4px 0 4px";T.appendChild(q);mxUtils.write(T,"pt");L=document.createElement("span");mxUtils.write(L,mxResources.get("dy"));L.style.marginLeft="12px";T.appendChild(L);
-var u=document.createElement("input");u.setAttribute("type","number");u.setAttribute("min","0");u.setAttribute("max","100");u.style.width="45px";u.style.margin="0 4px 0 4px";T.appendChild(u);mxUtils.write(T,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px";T.appendChild(J);mxUtils.write(T,"pt");d.appendChild(T);K();c.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<c.getSelectionCount()?mxUtils.setOpacity(A,60):
-mxUtils.setOpacity(A,10);K()});c.addListener(mxEvent.CELLS_MOVED,K);mxEvent.addListener(P,"change",F);mxEvent.addListener(u,"change",F);mxEvent.addListener(q,"change",F);mxEvent.addListener(J,"change",F);L=mxUtils.button(mxResources.get("cancel"),function(){n();b.hideDialog()});L.className="geBtn";t=mxUtils.button(mxResources.get("apply"),function(){var G=c.model.cells,H=[],g=[],p;for(p in G){var C=G[p];C.cp&&g.push(N(C))}g.sort(function(I,M){return I.x!=M.x?I.x-M.x:I.y!=M.y?I.y-M.y:I.dx!=M.dx?I.dx-
-M.dx:I.dy-M.dy});for(G=0;G<g.length;G++)0<G&&g[G].x==g[G-1].x&&g[G].y==g[G-1].y&&g[G].dx==g[G-1].dx&&g[G].dy==g[G-1].dy||H.push("["+g[G].x+","+g[G].y+",0,"+g[G].dx+","+g[G].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[k]);n();b.hideDialog()});t.className="geBtn gePrimaryBtn";v=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[k]);n();b.hideDialog()});v.className="geBtn";B=document.createElement("div");B.style.marginTop="10px";B.style.textAlign=
-"right";b.isOffline()||B.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&B.appendChild(L);B.appendChild(v);B.appendChild(t);b.editor.cancelFirst||B.appendChild(L);d.appendChild(B)};this.destroy=n;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);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)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
+"url");f.setAttribute("type","radio");f.setAttribute("name","geLinkDialogOption");var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","geLinkDialogOption");var m=document.createElement("select");m.style.width="414px";var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.margin="0 6p 0 6px";null!=z&&(t.setAttribute("checked","checked"),t.defaultChecked=
+!0);z=null!=z?z:"_blank";t.setAttribute("title",z);A&&(L.style.width="200px");if(v&&null!=b.pages){null!=l&&Graph.isPageLink(l)?(k.setAttribute("checked","checked"),k.defaultChecked=!0):(L.setAttribute("value",l),f.setAttribute("checked","checked"),f.defaultChecked=!0);J.appendChild(f);J.appendChild(L);J.appendChild(c);A&&(J.appendChild(t),mxUtils.write(J,mxResources.get("openInNewWindow")));mxUtils.br(J);J.appendChild(k);v=!1;for(A=0;A<b.pages.length;A++)c=document.createElement("option"),mxUtils.write(c,
+b.pages[A].getName()||mxResources.get("pageWithNumber",[A+1])),c.setAttribute("value","data:page/id,"+b.pages[A].getId()),l==c.getAttribute("value")&&(c.setAttribute("selected","selected"),v=!0),m.appendChild(c);if(!v&&k.checked){var x=document.createElement("option");mxUtils.write(x,mxResources.get("pageNotFound"));x.setAttribute("disabled","disabled");x.setAttribute("selected","selected");x.setAttribute("value","pageNotFound");m.appendChild(x);mxEvent.addListener(m,"change",function(){null==x.parentNode||
+x.selected||x.parentNode.removeChild(x)})}J.appendChild(m)}else L.setAttribute("value",l),J.appendChild(L),J.appendChild(c);P.appendChild(J);var y=mxUtils.button(n,function(){b.hideDialog();d(k.checked?"pageNotFound"!==m.value?m.value:l:L.value,LinkDialog.selectedDocs,t.checked?z:null)});y.style.verticalAlign="middle";y.className="geBtn gePrimaryBtn";this.init=function(){k.checked?m.focus():(L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",
+!1,null));mxEvent.addListener(m,"focus",function(){f.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(L,"focus",function(){k.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var C=P.parentNode,S=null;mxEvent.addListener(C,"dragleave",function(U){null!=S&&(S.parentNode.removeChild(S),S=null);U.stopPropagation();U.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(U){null==
+S&&(S=b.highlightElement(C));U.stopPropagation();U.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(U){try{null!=S&&(S.parentNode.removeChild(S),S=null),0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")&&(L.value=decodeURIComponent(U.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,y.click())}catch(Q){b.handleError(Q)}U.stopPropagation();U.preventDefault()}),!1)}};n=document.createElement("div");n.style.marginTop="16px";n.style.textAlign=
+"right";b.isOffline()||n.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));J=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});J.style.verticalAlign="middle";J.className="geBtn";b.editor.cancelFirst&&n.appendChild(J);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(C){if(C.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=C.docs;var S=C.docs[0].url;"application/mxe"==C.docs[0].mimeType||null!=C.docs[0].mimeType&&"application/vnd.jgraph."==
+C.docs[0].mimeType.substring(0,23)?S="https://app.diagrams.net/#G"+C.docs[0].id:"application/vnd.google-apps.folder"==C.docs[0].mimeType&&(S="https://drive.google.com/#folders/"+C.docs[0].id);L.value=S;L.focus()}else LinkDialog.selectedDocs=null;L.focus()};var F=document.createElement("select");F.className="geBtn";F.style.position="relative";F.style.top="1px";F.style.maxWidth="120px";var E={};v=document.createElement("option");mxUtils.write(v,mxResources.get("select")+"...");v.value="";F.appendChild(v);
+"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&D("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var C=b.drive.createLinkPicker();b.linkPicker=C.setCallback(function(S){LinkDialog.filePicked(S)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&D("dropbox",function(){Dropbox.choose({linkType:"direct",
+cancel:function(){},success:function(C){L.value=C[0].link;L.focus()}})});null!=b.oneDrive&&D("oneDrive",function(){b.oneDrive.pickFile(function(C,S){null!=S&&null!=S.value&&0<S.value.length&&(L.value=S.value[0].webUrl,L.focus())},!0)});null!=b.gitHub&&D("github",function(){b.gitHub.pickFile(function(C){if(null!=C){C=C.split("/");var S=C[0],U=C[1],Q=C[2];C=C.slice(3,C.length).join("/");L.value="https://github.com/"+S+"/"+U+"/blob/"+Q+"/"+C;L.focus()}})});null!=b.gitLab&&D("gitlab",function(){b.gitLab.pickFile(function(C){if(null!=
+C){C=C.split("/");var S=C[0],U=C[1],Q=C[2];C=C.slice(3,C.length).join("/");L.value=DRAWIO_GITLAB_URL+"/"+S+"/"+U+"/blob/"+Q+"/"+C;L.focus()}})});1<F.children.length&&(n.appendChild(F),mxEvent.addListener(F,"change",function(C){null!=E[F.value]&&(E[F.value](),F.value="")}));mxEvent.addListener(L,"keypress",function(C){13==C.keyCode&&y.click()});n.appendChild(y);b.editor.cancelFirst||n.appendChild(J);P.appendChild(n);this.container=P},RevisionDialog=function(b,l,n){var d=document.createElement("div"),
+v=document.createElement("h3");v.style.marginTop="3px";mxUtils.write(v,mxResources.get("revisionHistory"));d.appendChild(v);v=document.createElement("div");v.style.position="absolute";v.style.overflow="auto";v.style.width="170px";v.style.height="378px";d.appendChild(v);var A=document.createElement("div");A.style.position="absolute";A.style.left="200px";A.style.width="470px";A.style.height="376px";A.style.overflow="hidden";A.style.borderWidth="1px";A.style.borderStyle="solid";var z=document.createElement("div");
+z.style.position="absolute";z.style.display="none";z.style.textAlign="center";z.style.padding="8px";z.style.borderRadius="8px";z.style.left="50%";z.style.top="50%";z.style.whiteSpace="nowrap";z.style.transform="translate(-50%, -50%)";z.style.background="inherit";z.style.border="1px solid";A.appendChild(z);mxEvent.disableContextMenu(A);d.appendChild(A);var D=new Graph(A);D.setTooltips(!1);D.setEnabled(!1);D.setPanning(!0);D.panningHandler.ignoreCell=!0;D.panningHandler.useLeftButtonForPanning=!0;D.minFitScale=
+null;D.maxFitScale=null;D.centerZoom=!0;var P=0,J=null,L=0,c=D.getGlobalVariable;D.getGlobalVariable=function(Y){return"page"==Y&&null!=J&&null!=J[L]?J[L].getAttribute("name"):"pagenumber"==Y?L+1:"pagecount"==Y?null!=J?J.length:1:c.apply(this,arguments)};D.getLinkForCell=function(){return null};for(var f=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",
+left:"50%"}),k=b.getCurrentFile(),m=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),t={},x=0;x<m.length;x++)t[m[x].getAttribute("id")]=m[x];var y=null,F=null,E=null,C=null,S=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=E&&D.zoomIn()},20);S.setAttribute("disabled","disabled");var U=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=E&&D.zoomOut()},20);U.setAttribute("disabled","disabled");var Q=b.createToolbarButton(Editor.zoomFitImage,
+mxResources.get("fit"),function(){null!=E&&(1==D.view.scale?(D.maxFitScale=8,D.fit(8)):D.zoomActual(),D.center())},20);Q.setAttribute("disabled","disabled");var O=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"));O.setAttribute("disabled","disabled");var q=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"));q.setAttribute("disabled","disabled");var u=A.cloneNode(!1);u.style.pointerEvent="none";A.parentNode.appendChild(u);var I=new Graph(u);I.setTooltips(!1);I.setEnabled(!1);
+I.setPanning(!0);I.panningHandler.ignoreCell=!0;I.panningHandler.useLeftButtonForPanning=!0;I.minFitScale=null;I.maxFitScale=null;I.centerZoom=!0;var G=document.createElement("div");G.style.textAlign="left";G.style.color="gray";G.style.backgroundColor="transparent";G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.style.whiteSpace="nowrap";G.style.cursor="default";G.style.height="100%";G.style.display="inline-flex";G.style.alignItems="center";G.style.flexGrow="1";mxEvent.addListener(G,"click",
+function(){var Y=mxUtils.getTextContent(G);""!=Y&&b.alert(Y)});var H=null;mxEvent.addGestureListeners(O,function(Y){try{var Z=null!=J[P]?t[J[P].getAttribute("id")]:null;mxUtils.setOpacity(O,20);z.innerText="";if(null==Z)z.style.display="inline-block",mxUtils.write(z,mxResources.get("pageNotFound"));else{H=G.innerHTML;G.innerHTML=mxResources.get("current");A.style.display="none";u.style.display="";u.style.backgroundColor=A.style.backgroundColor;var aa=Editor.parseDiagramNode(Z);(new mxCodec(aa.ownerDocument)).decode(aa,
+I.getModel());I.view.scaleAndTranslate(D.view.scale,D.view.translate.x,D.view.translate.y);I.mathEnabled="1"==aa.getAttribute("math");I.setAdaptiveColors(aa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&I.mathEnabled&&Editor.MathJaxRender(I.container)}}catch(la){z.style.display="inline-block",z.innerText="",mxUtils.write(z,mxResources.get("pageNotFound")+": "+la.message)}},null,function(){mxUtils.setOpacity(O,60);z.style.display="none";z.innerText="";"none"==A.style.display&&(A.style.display=
+"",G.innerHTML=H,u.style.display="none")});mxEvent.addListener(q,"click",mxUtils.bind(this,function(Y){if(null!=E){Y=b.getPagesForNode(E.documentElement);var Z=b.diffPages(b.pages,Y);Y=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(Z,null,2),function(aa){try{if(0<aa.length&&b.editor.graph.isEnabled()){var la=[JSON.parse(aa)];b.confirm(mxResources.get("areYouSure"),function(){try{k.patch(la,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(fa){b.handleError(fa)}})}else b.hideDialog()}catch(fa){b.handleError(fa)}},
+null,null,null,null,function(aa,la){if(null!=Z[EditorUi.DIFF_UPDATE]){var fa=document.createElement("select"),ca=document.createElement("option");mxUtils.write(ca,mxResources.get("allPages"));ca.setAttribute("value","allPages");fa.appendChild(ca);for(var ja in Z[EditorUi.DIFF_UPDATE]){ca=document.createElement("option");var ka=b.getPageById(ja);null!=ka&&(mxUtils.write(ca,ka.getName()),ca.setAttribute("value","page-"+ja),fa.appendChild(ca))}fa.style.marginRight="8px";fa.style.order="-1";mxEvent.addListener(fa,
+"change",function(ba){ba=null;if("allPages"!=fa.value){var ha=fa.value.substring(5);null!=Z[EditorUi.DIFF_UPDATE][ha]&&(ba={},ba[EditorUi.DIFF_UPDATE]={},ba[EditorUi.DIFF_UPDATE][ha]=Z[EditorUi.DIFF_UPDATE][ha])}la.value=JSON.stringify(null==ba?Z:ba,null,2)});2<fa.children.length&&aa.appendChild(fa)}},!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close"));b.showDialog(Y.container,620,460,!0,!0);Y.init()}}));var g=mxUtils.button(mxResources.get("restore"),function(Y){null!=E&&null!=C&&
+b.confirm(mxResources.get("areYouSure"),function(){null!=n?n(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&(g.setAttribute("disabled","disabled"),k.save(!0,function(Z){b.spinner.stop();g.removeAttribute("disabled");b.replaceFileData(C);b.hideDialog()},function(Z){b.spinner.stop();g.removeAttribute("disabled");b.clearStatus();b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});g.className="geBtn gePrimaryBtn";g.setAttribute("disabled","disabled");var p=document.createElement("select");
+p.setAttribute("disabled","disabled");p.style.userSelect="none";p.style.maxWidth="100px";p.style.marginLeft="10px";p.style.display="none";var B=null;mxEvent.addListener(p,"change",function(Y){null!=B&&(B(Y),mxEvent.consume(Y))});var K=mxUtils.button(mxResources.get("open"),function(){null!=E&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(E.documentElement)),b.openLink(b.getUrl(),null,!0))});K.className="geBtn";K.setAttribute("disabled","disabled");
+var M=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});M.className="geBtn";M.setAttribute("disabled","disabled");null!=n&&(K.style.display="none");m=document.createElement("div");m.style.position="absolute";m.style.top="482px";m.style.right="28px";m.style.left="32px";m.style.justifyContent="end";m.style.display="flex";var N=document.createElement("div");N.className="geToolbarContainer";N.style.backgroundColor="transparent";N.style.left="32px";N.style.right=
+"32px";N.style.border="none";N.style.top="442px";var R=null;if(null!=l&&0<l.length){A.style.cursor="move";var T=document.createElement("table");T.style.borderWidth="1px";T.style.borderStyle="solid";T.style.borderCollapse="collapse";T.style.borderSpacing="0px";T.style.width="100%";var V=document.createElement("tbody"),X=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(P=mxUtils.indexOf(b.pages,b.currentPage));for(x=l.length-1;0<=x;x--){var W=function(Y){var Z=new Date(Y.modifiedDate),
+aa=null;if(0<=Z.getTime()){var la=function(ca){f.stop();z.innerText="";var ja=mxUtils.parseXml(ca),ka=b.editor.extractGraphModel(ja.documentElement,!0);if(null!=ka){var ba=function(oa){null!=oa&&(oa=ha(Editor.parseDiagramNode(oa)));return oa},ha=function(oa){var qa=oa.getAttribute("background");if(null==qa||""==qa||qa==mxConstants.NONE)qa=D.defaultPageBackgroundColor;A.style.backgroundColor=mxUtils.getLightDarkColor(qa);(new mxCodec(oa.ownerDocument)).decode(oa,D.getModel());D.maxFitScale=1;D.fit(8);
+D.center();D.mathEnabled="1"==oa.getAttribute("math");D.setAdaptiveColors(oa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&D.mathEnabled&&Editor.MathJaxRender(D.container);return oa};p.style.display="none";p.innerText="";E=ja;C=ca;J=parseSelectFunction=null;L=0;if("mxfile"==ka.nodeName){ja=ka.getElementsByTagName("diagram");J=[];for(ca=0;ca<ja.length;ca++)J.push(ja[ca]);L=Math.min(P,J.length-1);0<J.length&&ba(J[L]);if(1<J.length)for(p.removeAttribute("disabled"),p.style.display="",ca=0;ca<
+J.length;ca++){ja=document.createElement("option");ja.setAttribute("title",ea+" ("+J[ca].getAttribute("id")+")");ja.setAttribute("value",ca);var ea=J[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);ka=b.getPageById(J[ca].getAttribute("id"));var da="";if(null!=ka){var pa=new DiagramPage(J[ca]);b.getHashValueForPages([ka])!=b.getHashValueForPages([pa])&&(da=" (M)")}else da=" (X)";mxUtils.write(ja,ea+da);ca==L&&ja.setAttribute("selected","selected");p.appendChild(ja)}B=function(){try{var oa=
+parseInt(p.value);L=P=oa;ba(J[oa])}catch(qa){p.value=P,b.handleError(qa)}}}else ha(ka);ea=Y.lastModifyingUserName;null!=ea&&20<ea.length&&(ea=ea.substring(0,20)+"...");G.innerText="";mxUtils.write(G,(null!=ea?ea+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());G.setAttribute("title",aa.getAttribute("title"));S.removeAttribute("disabled");U.removeAttribute("disabled");Q.removeAttribute("disabled");O.removeAttribute("disabled");q.removeAttribute("disabled");null!=k&&k.isRestricted()||(b.editor.graph.isEnabled()&&
+g.removeAttribute("disabled"),K.removeAttribute("disabled"),M.removeAttribute("disabled"));mxUtils.setOpacity(S,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(Q,60);mxUtils.setOpacity(O,60);mxUtils.setOpacity(q,60)}else p.style.display="none",p.innerText="",G.innerText="",z.innerText="",mxUtils.write(G,mxResources.get("errorLoadingFile")),mxUtils.write(z,mxResources.get("errorLoadingFile"))};aa=document.createElement("tr");aa.style.borderBottomWidth="1px";aa.style.borderBottomStyle="solid";aa.style.fontSize=
+"12px";aa.style.cursor="pointer";var fa=document.createElement("td");fa.style.padding="6px";fa.style.whiteSpace="nowrap";Y==l[l.length-1]?mxUtils.write(fa,mxResources.get("current")):Z.toDateString()===X?mxUtils.write(fa,Z.toLocaleTimeString()):mxUtils.write(fa,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());aa.appendChild(fa);aa.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=Y.fileSize?" "+b.formatFileSize(parseInt(Y.fileSize)):"")+(null!=Y.lastModifyingUserName?
+" "+Y.lastModifyingUserName:""));mxEvent.addListener(aa,"click",function(ca){F!=Y&&(f.stop(),null!=y&&(y.style.backgroundColor=""),F=Y,y=aa,y.style.backgroundColor="light-dark(#ebf2f9, #000000)",C=E=null,G.removeAttribute("title"),G.innerText=mxResources.get("loading")+"...",A.style.backgroundColor=D.defaultPageBackgroundColor,z.innerText="",D.getModel().clear(),g.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),Q.setAttribute("disabled",
+"disabled"),O.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"),mxUtils.setOpacity(S,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(O,20),mxUtils.setOpacity(q,20),f.spin(A),Y.getXml(function(ja){if(F==Y)try{la(ja)}catch(ka){G.innerText=mxResources.get("error")+": "+ka.message}},function(ja){f.stop();p.style.display="none";p.innerText="";G.innerText="";mxUtils.write(G,mxResources.get("errorLoadingFile"));
+mxUtils.write(z,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(aa,"dblclick",function(ca){K.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);V.appendChild(aa)}return aa}(l[x]);null!=W&&x==l.length-1&&(R=W)}T.appendChild(V);v.appendChild(T)}else null==k||null==b.drive&&k.constructor==window.DriveFile||null==b.dropbox&&k.constructor==window.DropboxFile?(A.style.display="none",
+N.style.display="none",mxUtils.write(v,mxResources.get("notAvailable"))):(A.style.display="none",N.style.display="none",mxUtils.write(v,mxResources.get("noRevisions")));this.init=function(){null!=R&&R.click()};v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});v.className="geBtn";N.appendChild(G);N.appendChild(O);N.appendChild(U);N.appendChild(Q);N.appendChild(S);N.appendChild(p);N.appendChild(q);b.editor.cancelFirst&&m.appendChild(v);m.appendChild(K);null!=k&&k.constructor==DriveFile&&
+m.appendChild(M);m.appendChild(g);b.editor.cancelFirst||m.appendChild(v);d.appendChild(m);d.appendChild(N);this.container=d},DraftDialog=function(b,l,n,d,v,A,z,D,P){var J=document.createElement("div"),L=document.createElement("div");L.style.marginTop="0px";L.style.whiteSpace="nowrap";L.style.overflow="auto";L.style.lineHeight="normal";mxUtils.write(L,l);J.appendChild(L);var c=document.createElement("select"),f=mxUtils.bind(this,function(){"-1"==c.value?(c.value=c.options[0].value,f(),b.confirm(mxResources.get("areYouSure"),
+null,mxUtils.bind(this,function(){var O=this,q;return $jscomp.asyncExecutePromiseGeneratorProgram(function(u){for(q=0;q<P.length;q++)v.apply(O,[q,mxUtils.bind(O,function(){})]);b.hideDialog(!0);u.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(F=mxUtils.parseXml(P[c.value].data),E=b.editor.extractGraphModel(F.documentElement,!0),C=0,this.init())});if(null!=P){c.style.marginLeft="4px";for(l=0;l<P.length;l++){var k=document.createElement("option");k.setAttribute("value",l);var m=new Date(P[l].created),
+t=new Date(P[l].modified);mxUtils.write(k,m.toLocaleDateString()+" "+m.toLocaleTimeString()+" - "+(m.toDateString(),t.toDateString(),t.toLocaleDateString())+" "+t.toLocaleTimeString());c.appendChild(k)}k=document.createElement("option");k.setAttribute("value","-1");mxUtils.write(k,mxResources.get("deleteAll"));c.appendChild(k);L.appendChild(c);mxEvent.addListener(c,"change",f)}null==n&&(n=P[0].data);var x=document.createElement("div");x.style.position="absolute";x.style.border="1px solid lightGray";
+x.style.marginTop="10px";x.style.left="40px";x.style.right="40px";x.style.top="46px";x.style.bottom="74px";x.style.overflow="hidden";mxEvent.disableContextMenu(x);J.appendChild(x);var y=new Graph(x);y.setEnabled(!1);y.setPanning(!0);y.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var F=mxUtils.parseXml(n),E=b.editor.extractGraphModel(F.documentElement,!0),C=0,S=null,
+U=y.getGlobalVariable;y.getGlobalVariable=function(O){return"page"==O&&null!=S&&null!=S[C]?S[C].getAttribute("name"):"pagenumber"==O?C+1:"pagecount"==O?null!=S?S.length:1:U.apply(this,arguments)};y.getLinkForCell=function(){return null};n=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){y.zoomIn()},20);L=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){y.zoomOut()},20);l=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==
+y.view.scale?(y.maxFitScale=8,y.fit(8)):y.zoomActual();y.center()},20);z=mxUtils.button(z||mxResources.get("discard"),function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var O=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(q){v.apply(O,[c.value,mxUtils.bind(O,function(){null!=c.parentNode&&(c.options[c.selectedIndex].parentNode.removeChild(c.options[c.selectedIndex]),1<c.options.length?(c.value=c.options[0].value,f()):b.hideDialog(!0))})]);q.jumpToEnd()})}),
+mxResources.get("no"),mxResources.get("yes"))});z.className="geBtn";var Q=document.createElement("select");Q.style.maxWidth="80px";Q.style.position="relative";Q.style.top="-2px";Q.style.verticalAlign="bottom";Q.style.marginRight="6px";Q.style.display="none";A=mxUtils.button(A||mxResources.get("edit"),function(){d.apply(this,[c.value])});A.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.right="40px";k.style.textAlign="right";
+m=document.createElement("div");m.className="geToolbarContainer";m.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function O(G){if(null!=G){var H=G.getAttribute("background");if(null==H||""==H||H==mxConstants.NONE)H="light-dark(#ffffff, transparent)";x.style.backgroundColor=H;(new mxCodec(G.ownerDocument)).decode(G,y.getModel());y.maxFitScale=1;y.fit(8);y.center()}return G}function q(G){null!=G&&(G=
+O(Editor.parseDiagramNode(G)));return G}mxEvent.addListener(Q,"change",function(G){C=parseInt(Q.value);q(S[C]);mxEvent.consume(G)});if("mxfile"==E.nodeName){var u=E.getElementsByTagName("diagram");S=[];for(var I=0;I<u.length;I++)S.push(u[I]);0<S.length&&q(S[C]);Q.innerText="";if(1<S.length)for(Q.style.display="",I=0;I<S.length;I++)u=document.createElement("option"),mxUtils.write(u,S[I].getAttribute("name")||mxResources.get("pageWithNumber",[I+1])),u.setAttribute("value",I),I==C&&u.setAttribute("selected",
+"selected"),Q.appendChild(u);else Q.style.display="none"}else O(E)};m.appendChild(Q);m.appendChild(n);m.appendChild(L);m.appendChild(l);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});n.className="geBtn";D=null!=D?mxUtils.button(mxResources.get("ignore"),D):null;null!=D&&(D.className="geBtn");b.editor.cancelFirst?(k.appendChild(n),null!=D&&k.appendChild(D),k.appendChild(z),k.appendChild(A)):(k.appendChild(A),k.appendChild(z),null!=D&&k.appendChild(D),k.appendChild(n));J.appendChild(k);
+J.appendChild(m);this.container=J},FindWindow=function(b,l,n,d,v,A){function z(B,K,M){if("object"===typeof K.value&&null!=K.value.attributes){K=K.value.attributes;for(var N=0;N<K.length;N++)if("label"!=K[N].nodeName){var R=mxUtils.trim(K[N].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==B&&0<=R.indexOf(M)||null!=B&&B.test(R))return!0}}return!1}function D(){k?(H.removeAttribute("disabled"),g.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),g.setAttribute("disabled",
+"disabled"));C.value?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}function P(B,K,M){I.innerText="";var N=L.model.getDescendants(L.model.getRoot()),R=C.value.toLowerCase(),T=U.checked?new RegExp(R):null,V=null;t=null;c!=R&&(c=R,f=null,m=!1);var X=null==f;if(0<R.length){if(m){m=!1;for(var W,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){W=Y;break}B=(W+1)%b.pages.length;f=null;do m=!1,N=b.pages[B],L=b.createTemporaryGraph(L.getStylesheet()),b.updatePageRoot(N),L.model.setRoot(N.root),
+B=(B+1)%b.pages.length;while(!P(!0,K,M)&&B!=W);f&&(f=null,M?b.editor.graph.model.execute(new SelectPage(b,N)):b.selectPage(N));m=!1;L=b.editor.graph;return P(!0,K,M)}for(Y=0;Y<N.length;Y++){W=L.view.getState(N[Y]);K&&(X=X||W==f);if(null!=W&&null!=W.cell.value&&(X||null==V)&&(L.model.isVertex(W.cell)||L.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(O.innerHTML=L.sanitizeHtml(L.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([O])):label=L.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g,
+" ")).toLowerCase();var Z=0;K&&A&&W==f&&(label=label.substr(x),Z=x);var aa=null==S||""==S.value;if(null==T&&(0<=label.indexOf(R)||aa&&z(T,W.cell,R))||null!=T&&(T.test(label)||aa&&z(T,W.cell,R)))if(A&&(null!=T?(aa=label.match(T),null!=aa&&0<aa.length&&(t=aa[0].toLowerCase(),x=Z+aa.index+t.length)):(t=R,x=Z+label.indexOf(R)+t.length)),X){V=W;break}else null==V&&(V=W)}X=X||W==f}}if(null!=V){if(Y==N.length&&Q.checked)return f=null,m=!0,P(!0,K,M);f=V;L.scrollCellToVisible(f.cell);L.isEnabled()&&!L.isCellLocked(f.cell)?
+M||L.getSelectionCell()==f.cell&&1==L.getSelectionCount()||L.setSelectionCell(f.cell):L.highlightCell(f.cell)}else{if(!B&&Q.checked)return m=!0,P(!0,K,M);L.isEnabled()&&!M&&L.clearSelection()}k=null!=V;A&&!B&&D();return 0==R.length||null!=V}var J=b.actions.get("findReplace"),L=b.editor.graph,c=null,f=null,k=!1,m=!1,t=null,x=0,y=1,F=document.createElement("div");F.style.userSelect="none";F.style.overflow="hidden";F.style.padding="10px";F.style.height="100%";var E=A?"260px":"200px",C=document.createElement("input");
+C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=E;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";F.appendChild(C);mxUtils.br(F);if(A){var S=document.createElement("input");S.setAttribute("placeholder",mxResources.get("replaceWith"));S.setAttribute("type","text");S.style.marginTop="4px";S.style.marginBottom="6px";S.style.width=E;S.style.fontSize="12px";S.style.borderRadius=
+"4px";S.style.padding="6px";F.appendChild(S);mxUtils.br(F);mxEvent.addListener(S,"input",D)}var U=document.createElement("input");U.setAttribute("id","geFindWinRegExChck");U.setAttribute("type","checkbox");U.style.marginRight="4px";F.appendChild(U);E=document.createElement("label");E.setAttribute("for","geFindWinRegExChck");F.appendChild(E);mxUtils.write(E,mxResources.get("regularExpression"));F.appendChild(E);E=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");E.style.position=
+"relative";E.style.marginLeft="6px";F.appendChild(E);mxUtils.br(F);var Q=document.createElement("input");Q.setAttribute("id","geFindWinAllPagesChck");Q.setAttribute("type","checkbox");Q.style.marginRight="4px";F.appendChild(Q);E=document.createElement("label");E.setAttribute("for","geFindWinAllPagesChck");F.appendChild(E);mxUtils.write(E,mxResources.get("allPages"));F.appendChild(E);var O=document.createElement("div");mxUtils.br(F);E=document.createElement("div");E.style.left="0px";E.style.right=
+"0px";E.style.marginTop="6px";E.style.padding="0 6px 0 6px";F.appendChild(E);var q=mxUtils.button(mxResources.get("reset"),function(){I.innerText="";C.value="";C.style.backgroundColor="";A&&(S.value="",D());c=f=null;m=!1;C.focus()});q.setAttribute("title",mxResources.get("reset"));q.style.float="none";q.style.width="120px";q.style.marginTop="6px";q.style.marginLeft="8px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.className="geBtn";A||E.appendChild(q);var u=mxUtils.button(mxResources.get("find"),
+function(){try{C.style.backgroundColor=P()?"":"light-dark(#ffcfcf, #ff0000)"}catch(B){b.handleError(B)}});u.setAttribute("title",mxResources.get("find")+" (Enter)");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";E.appendChild(u);var I=document.createElement("div");I.style.marginTop="10px";if(A){var G=function(B,K,M,N,R){if(null==R||"1"!=R.html)return N=B.toLowerCase().indexOf(K,
+N),0>N?B:B.substr(0,N)+M+B.substr(N+K.length);var T=B;K=mxUtils.htmlEntities(K,!1,!1,!1);R=[];var V=-1;for(B=B.replace(/<br>/ig,"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(V=B.indexOf("<",V+1));)R.push(V);V=B.match(/<[^>]*>/g);B=B.replace(/<[^>]*>/g,"");N=B.toLowerCase().indexOf(K,N);if(0>N)return T;T=N+K.length;M=mxUtils.htmlEntities(M);B=B.substr(0,N)+M+B.substr(T);for(var X=0,W=0;W<R.length;W++){if(R[W]-X<N)B=B.substr(0,R[W])+V[W]+B.substr(R[W]);
+else{var Y=R[W]-X<T?N+X:R[W]+(M.length-K.length);B=B.substr(0,Y)+V[W]+B.substr(Y)}X+=V[W].length}return B.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")};E.style.textAlign="center";var H=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=t&&null!=f){var B=f.cell,K=L.getLabel(B);L.isCellEditable(B)&&L.model.setValue(B,G(K,t,S.value,x-t.length,L.getCurrentCellStyle(B)));C.style.backgroundColor=P(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(M){b.handleError(M)}});
+H.setAttribute("title",mxResources.get("replFind"));H.style.float="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");E.appendChild(H);mxUtils.br(E);var g=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=t&&null!=f){var B=f.cell,K=L.getLabel(B);L.model.setValue(B,G(K,t,S.value,x-t.length,L.getCurrentCellStyle(B)));H.setAttribute("disabled",
+"disabled");g.setAttribute("disabled","disabled")}}catch(M){b.handleError(M)}});g.setAttribute("title",mxResources.get("replace"));g.style.float="none";g.style.width="120px";g.style.marginTop="6px";g.style.marginLeft="8px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.className="geBtn gePrimaryBtn";g.setAttribute("disabled","disabled");E.appendChild(g);var p=mxUtils.button(mxResources.get("replaceAll"),function(){I.innerText="";c=null;var B=b.currentPage,K=b.editor.graph.getSelectionCells();
+b.editor.graph.rendering=!1;L.getModel().beginUpdate();try{for(var M=0,N={};P(!1,!0,!0)&&100>M;){var R=f.cell,T=L.getLabel(R),V=N[R.id];if(V&&V.replAllMrk==y&&V.replAllPos>=x)break;N[R.id]={replAllMrk:y,replAllPos:x};L.isCellEditable(R)&&(L.model.setValue(R,G(T,t,S.value,x-t.length,L.getCurrentCellStyle(R))),M++)}B!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,B));mxUtils.write(I,mxResources.get("matchesRepl",[M]))}catch(X){b.handleError(X)}finally{L.getModel().endUpdate(),b.editor.graph.setSelectionCells(K),
+b.editor.graph.rendering=!0}y++});p.setAttribute("title",mxResources.get("replaceAll"));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");E.appendChild(p);mxUtils.br(E);E.appendChild(q);q=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));q.setAttribute("title",mxResources.get("close"));
+q.style.float="none";q.style.width="120px";q.style.marginTop="6px";q.style.marginLeft="8px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.className="geBtn";E.appendChild(q);mxUtils.br(E);E.appendChild(I)}else E.style.display="flex",E.style.alignItems="center",q.style.width="",u.style.width="";mxEvent.addListener(C,"keyup",function(B){if(91==B.keyCode||93==B.keyCode||17==B.keyCode)mxEvent.consume(B);else if(27==B.keyCode)J.funct();else if(c!=C.value.toLowerCase()||13==B.keyCode)try{C.style.backgroundColor=
+P()?"":"light-dark(#ffcfcf, #ff0000)"}catch(K){C.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(F,"keydown",function(B){70==B.keyCode&&b.keyHandler.isControlDown(B)&&!mxEvent.isShiftDown(B)&&(J.funct(),mxEvent.consume(B))});this.window=new mxWindow(mxResources.get("find")+(A?"/"+mxResources.get("replace"):""),F,l,n,d,v,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",
+mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?Q.removeAttribute("disabled"):(Q.checked=!1,Q.setAttribute("disabled","disabled"))):L.container.focus()}));b.installResizeHandler(this,!1);this.doSearch=function(B){C.focus();C.value=B;u.click()}},FreehandWindow=function(b,l,n,d,v,A){var z=b.editor.graph,D=document.createElement("div");D.style.textAlign=
+"center";D.style.userSelect="none";D.style.overflow="hidden";D.style.height="100%";if(A){var P=function(){var k=z.freehand.getStrokeColor(!0);null!=k&&k!=mxConstants.NONE&&1<k.length&&"string"===typeof k&&("default"==k?k=mxResources.get("useBlackAndWhite"):(k="#"==k.charAt(0)?k.substring(1).toUpperCase():k,k=ColorDialog.prototype.colorNames[k]),null!=k&&L.setAttribute("title",k))},J=document.createElement("input");J.setAttribute("id","geFreehandBrush");J.setAttribute("type","checkbox");J.checked=
+z.freehand.isPerfectFreehandMode();J.style.margin="10px 5px 0px 10px";J.style.float="left";D.appendChild(J);z.freehand.setPerfectFreehandMode(J.checked);A=document.createElement("label");A.setAttribute("for","geFreehandBrush");A.style.float="left";A.style.marginTop="10px";D.appendChild(A);mxUtils.write(A,mxResources.get("brush"));D.appendChild(A);var L=document.createElement("tempDiv");L.style.display="block";L.style.width="100%";L.style.height="100%";L.style.borderRadius="2px";L.style.boxSizing=
+"border-box";L.style.border="1px solid black";L.style.backgroundColor=z.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){L.style.backgroundColor=z.freehand.getStrokeColor()});P();A=mxUtils.button("",mxUtils.bind(this,function(k){b.pickColor(z.freehand.getStrokeColor(!0),function(m){z.freehand.setStrokeColor(m);L.style.backgroundColor=z.freehand.getStrokeColor();P()},"default");mxEvent.consume(k)}));A.style.position="absolute";A.style.boxSizing="border-box";A.style.padding="2px";
+A.style.top="8px";A.style.right="8px";A.style.width="28px";A.style.height="18px";A.className="geColorBtn";A.innerText="";A.appendChild(L);D.appendChild(A);A=document.createElement("img");A.setAttribute("title",mxResources.get("settings"));A.setAttribute("src",Editor.gearImage);A.className="geButton";A.style.position="absolute";A.style.boxSizing="border-box";A.style.padding="2px";A.style.top="8px";A.style.right="38px";A.style.width="18px";A.style.height="18px";A.style.opacity="0.6";D.appendChild(A);
+mxEvent.addListener(A,"click",mxUtils.bind(this,function(k){k=z.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",k,function(m){!isNaN(m)&&0<m&&20>=m&&z.freehand.setSmoothing(parseInt(m))})}));mxUtils.br(D);var c=document.createElement("input");c.setAttribute("type","range");c.setAttribute("min","2");c.setAttribute("max","30");c.setAttribute("value",z.freehand.getBrushSize());c.style.width="90%";c.style.visibility="hidden";D.appendChild(c);mxUtils.br(D);A=function(){z.freehand.setPerfectFreehandMode(J.checked);
+c.style.visibility=J.checked?"visible":"hidden"};mxEvent.addListener(J,"change",A);A();mxEvent.addListener(c,"change",function(){z.freehand.setBrushSize(parseInt(this.value))})}var f=mxUtils.button(mxResources.get("startDrawing"),function(){z.freehand.isDrawing()?z.freehand.stopDrawing():z.freehand.startDrawing()});f.setAttribute("title",mxResources.get("startDrawing")+" (X)");f.style.width="90%";f.style.marginLeft="0px";f.style.position="relative";f.className="geBtn gePrimaryBtn";D.appendChild(f);
+this.window=new mxWindow(mxResources.get("freehand"),D,l,n,d,v,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);z.addListener("freehandStateChanged",mxUtils.bind(this,function(){f.innerText="";mxUtils.write(f,mxResources.get(z.freehand.isDrawing()?"stopDrawing":"startDrawing"));var k=document.createElement("span");k.className="geShortcutKey";k.style.margin="0 2px 4px 0";mxUtils.write(k,"X");f.appendChild(k);f.setAttribute("title",
+mxResources.get(z.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");f.className="geBtn"+(z.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){z.freehand.isDrawing()&&z.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,l,n,d,v){var A=b.editor.graph,z=document.createElement("div");z.style.userSelect="none";z.style.overflow=
+"hidden";z.style.height="100%";var D=document.createElement("div");D.style.display="flex";D.style.alignItems="center";D.style.justifyContent="center";D.style.paddingTop="20px";var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.marginRight="4px";P.checked=!0;var J=document.createElement("input");J.setAttribute("type","checkbox");J.style.marginRight="4px";J.checked=!0;var L=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(A.isSelectionEmpty()?
+A.getVerticesAndEdges():A.getSelectionCells(),P.checked,J.checked)}));L.setAttribute("title","Convert Colors");L.className="geBtn gePrimaryBtn";D.appendChild(L);z.appendChild(D);D=D.cloneNode(!1);D.appendChild(J);D.style.paddingTop="8px";mxUtils.write(D,mxResources.get("background"));z.appendChild(D);D=D.cloneNode(!1);D.appendChild(P);D.style.paddingTop="8px";mxUtils.write(D,mxResources.get("labels"));z.appendChild(D);this.window=new mxWindow(mxResources.get("adaptiveColors"),z,l,n,d,v,!0,!0);this.window.destroyOnClose=
+!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,l,n,d,v){function A(){O||(q=t.value,u());E.style.display="createPublic"==t.value?"none":""}function z(){O=!0;t.value=q;L.isSelectionEmpty()?(F.setAttribute("disabled","disabled"),"selectionOnly"==t.value&&(t.value="includeCopyOfMyDiagram")):F.removeAttribute("disabled");
+b.isDiagramEmpty()?(y.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==t.value&&(t.value="help")):y.removeAttribute("disabled");O=!1}function D(I){var G=document.createElement("div");G.style.textAlign="left";G.style.padding="6px";G.style.margin="6px 0";mxUtils.write(G,I);f.appendChild(G);return G}function P(I){var G=[],H=D(I);G.push(H);H.style.marginBottom="2px";H.style.marginLeft="40%";H.style.borderRadius="10px";H.style.backgroundColor="light-dark(#e0e0e0, #3a3a3a)";var g=document.createElement("div");
+g.className="geInlineButtons";g.style.display="flex";g.style.justifyContent="end";G.push(g);var p=document.createElement("img");p.className="geAdaptiveAsset geLibraryButton";p.setAttribute("src",Editor.trashImage);p.setAttribute("title",mxResources.get("remove"));g.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(Y){if(mxEvent.isShiftDown(Y))f.innerHTML="";else{for(Y=0;Y<G.length;Y++)null!=G[Y].parentNode&&G[Y].parentNode.removeChild(G[Y]);G=[]}}));p=p.cloneNode();p.setAttribute("src",
+Editor.copyImage);p.setAttribute("title",mxResources.get("copy"));mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.writeTextToClipboard(I,mxUtils.bind(this,function(Y){b.handleError(Y)}))}));g.appendChild(p);p=p.cloneNode();p.setAttribute("src",Editor.editImage);p.setAttribute("title",mxResources.get("edit"));g.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){Q.value=I;Q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Q.select():document.execCommand("selectAll",
+!1,null)}));f.appendChild(g);var B=D("");B.className="geSidebar";B.style.marginTop="2px";var K=b.currentPage,M=E.value,N=t.value;p="";var R=null,T=Date.now();g=[];var V=null;"create"==N?p="You are a helpful assistant that generates diagrams in either MermaidJS or draw.io XML format based on the given prompt. Begin with a concise checklist (3-7 bullets) of what you will do; keep items conceptual, not implementation-level. Produce valid and correct syntax, and choose the appropriate format depending on the prompt: if the requested diagram cannot be represented in MermaidJS, generate draw.io XML instead. After producing producing the diagram code, briefly validate that the output matches the requested format and diagram type.Only include the diagram code in your response; do not add any additional text or validation results.":
+"includeCopyOfMyDiagram"==N||"selectionOnly"==N?(p=new mxCodec(mxUtils.createXmlDocument()),"selectionOnly"==N&&(p.isObjectIgnored=function(Y){return Y.constructor==mxCell&&!L.model.isRoot(Y)&&!L.model.isLayer(Y)&&!L.isCellSelected(Y)&&!L.isAncestorSelected(Y)}),V=p.encode(L.getModel()),V.ownerDocument.appendChild(V),p="You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. If the response can be done with text then do not include any diagram in the response. Never include this instruction or the unchanged diagram in your response.\n"+
+mxUtils.getXml(V)):p="You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response.";g.push({role:"system",content:p});g.push({role:"user",content:I});var X="gemini-"==M.substring(0,7)?{system_instruction:{parts:[{text:p}]},contents:[{parts:[{text:I}]}]}:{model:M,messages:g},W=mxUtils.bind(this,function(){function Y(ca){var ja=document.createElement("div");ja.style.display="flex";ja.style.alignItems="center";
+mxUtils.write(ja,mxResources.get("error")+": "+ca);ca=document.createElement("img");ca.className="geAdaptiveAsset geLibraryButton";ca.setAttribute("src",Editor.refreshImage);ca.setAttribute("title",mxResources.get("tryAgain"));mxEvent.addListener(ca,"click",W);ja.appendChild(ca);return ja}B.innerHTML="";G.push(B);var Z=document.createElement("div");Z.style.display="flex";Z.style.alignItems="center";mxUtils.write(Z,mxResources.get("loading")+"...");var aa=document.createElement("img");aa.className=
+"geAdaptiveAsset";aa.setAttribute("src",Editor.svgSpinImage);aa.style.width="16px";aa.style.height="16px";aa.style.marginLeft="6px";Z.appendChild(aa);B.appendChild(Z);B.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});var la=mxUtils.bind(this,function(ca){B.innerHTML="";B.appendChild(Y(ca.message));B.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});EditorUi.debug("EditorUi.ChatWindow.handleError","error",ca);null!=window.console&&console.error(ca)}),fa=mxUtils.bind(this,
+function(ca,ja){EditorUi.debug("EditorUi.ChatWindow.handleResponse","data",ca,"prompt",[ja],"time",Date.now()-T);var ka=null!=ca?b.stringToCells(ca[1]):null;if(null!=ka&&0<ka.length){var ba=L.getBoundingBoxFromGeometry(ka);b.sidebar.graph.moveCells(ka,-ba.x,-ba.y);var ha=mxUtils.bind(this,function(pa){null!=b.sidebar&&b.sidebar.hideTooltip();if(null!=V&&null==R){var oa=new mxCodec(V.ownerDocument);R=new mxGraphModel;oa.decode(V,R)}L.model.beginUpdate();try{if(null!=R&&null!=K&&null!=b.getPageIndex(K)){b.selectPage(K);
+var qa=mxUtils.parseXml(ca[1]),ta=new mxCodec(qa),ia=new mxGraphModel;ta.decode(qa.documentElement,ia);var ma=b.diffCells(R.root,ia.root);b.patchPage(K,ma,null,!0);EditorUi.debug("EditorUi.ChatWindow.handleResponse","sentModel",R,"receivedModel",ia,"patch",ma)}else{var ua=L.getFreeInsertPoint();L.setSelectionCells(L.importCells(ka,ua.x,ua.y));EditorUi.debug("EditorUi.ChatWindow.handleResponse","cells",L.getSelectionCell())}}finally{L.model.endUpdate()}L.scrollCellToVisible(L.getSelectionCell());mxEvent.consume(pa)});
+B.innerHTML="";H=B;0<ca[0].length&&(mxUtils.write(H,ca[0]),mxUtils.br(H));if(0<ca[1].length){var ea=b.getSvgForXml(ca[1]);ea.style.overflow="visible";ea.style.padding="1px";ea.style.cursor="move";ea.style.width="160px";ea.style.height="auto";ea.style.maxHeight="460px";var da=document.createElement("a");da.className="geItem";da.style.padding="4px";da.style.borderRadius="10px";da.appendChild(ea);H.appendChild(da);b.sidebar.createItem(ka,ja,!0,!0,ba.width,ba.height,!0,!0,ha,null,null,null,null,null,
+da);ba=document.createElement("div");ba.style.display="flex";ea=document.createElement("img");ea.className="geAdaptiveAsset geLibraryButton";ea.setAttribute("src",Editor.refreshImage);ea.setAttribute("title",mxResources.get("refresh"));ba.appendChild(ea);mxEvent.addListener(ea,"click",W);ea=ea.cloneNode();ea.setAttribute("src",Editor.shareImage);ea.setAttribute("title",mxResources.get(b.isStandaloneApp()?"export":"openInNewWindow"));ba.appendChild(ea);mxEvent.addListener(ea,"click",mxUtils.bind(this,
+function(pa){b.isStandaloneApp()?b.saveData("export.xml","xml",ca[1],"text/xml"):b.editor.editAsNew(ca[1])}));ea=ea.cloneNode();ea.setAttribute("src",Editor.magnifyImage);ea.setAttribute("title",mxResources.get("preview"));ba.appendChild(ea);mxEvent.addListener(ea,"click",mxUtils.bind(this,function(pa){b.sidebar.createTooltip(H,ka,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1600),Math.min((window.innerHeight||document.documentElement.clientHeight||
+document.body.clientHeight)-120,1200),ja,!0,new mxPoint(mxEvent.getClientX(pa),mxEvent.getClientY(pa)),!0,function(){wasVisible=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},!0,!1)}));ea=ea.cloneNode();null!=V&&null!=K&&null!=b.getPageIndex(K)?(ea.setAttribute("src",Editor.checkImage),ea.setAttribute("title",mxResources.get("apply"))):(ea.setAttribute("src",Editor.plusImage),ea.setAttribute("title",mxResources.get("insert")));ba.appendChild(ea);mxEvent.addListener(ea,"click",ha);
+H.appendChild(ba)}0<ca[2].length&&(mxUtils.br(H),mxUtils.write(H,ca[2]))}else B.innerHTML="",H=B,B.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"}),null==ca?mxUtils.write(H,mxResources.get("errShowingDiag")):(mxUtils.write(H,ca[0]),mxUtils.write(H,ca[2]));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});S||"createPublic"==N?b.generateOpenAiMermaidDiagram(I,function(ca){fa(["",ca,""],I)},la,!0):b.createTimeout(b.editor.generateTimeout,mxUtils.bind(this,function(ca){var ja=
+mxUtils.bind(this,function(ha){ca.clear();la(ha)}),ka="gemini-"==M.substring(0,7)?"https://generativelanguage.googleapis.com/v1beta/models/"+M+":generateContent":Editor.gptUrl,ba=new mxXmlRequest(ka,JSON.stringify(X),"POST");ba.setRequestHeaders=mxUtils.bind(this,function(ha,ea){"gemini-"==M.substring(0,7)?ha.setRequestHeader("X-goog-api-key",Editor.geminiApiKey):ha.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ha.setRequestHeader("Content-Type","application/json")});EditorUi.debug("EditorUi.ChatWindow.addMessage",
+"url",ka,"params",X);ba.send(mxUtils.bind(this,function(ha){if(ca.clear())try{if(200<=ha.getStatus()&&299>=ha.getStatus()){var ea=JSON.parse(ha.getText()),da="gemini-"==M.substring(0,7)?mxUtils.trim(ea.candidates[0].content.parts[0].text):mxUtils.trim(ea.choices[0].message.content),pa=b.extractMermaidDeclaration(da);EditorUi.debug("EditorUi.ChatWindow.addMessage","params",X,"response",ea,"text",[da],"mermaid",[pa]);null==pa?fa(Editor.extractGraphModelFromText(da),I):b.parseMermaidDiagram(pa,null,
+mxUtils.bind(this,function(ta){fa(["",ta,""],I)}),mxUtils.bind(this,function(ta){ja(ta)}),null,!0)}else{var oa="Error: "+ha.getStatus();try{var qa=JSON.parse(ha.getText());null!=qa&&null!=qa.error&&null!=qa.error.message&&(oa=qa.error.message)}catch(ta){}B.innerHTML="";mxUtils.write(B,oa);B.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ta){ja(ta)}}),ja)}),function(ca){B.innerHTML="";B.appendChild(Y(ca.message));B.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});
+EditorUi.debug("EditorUi.ChatWindow.addMessage","error",ca)})});W()}function J(){""!=mxUtils.trim(Q.value)&&(P(Q.value),Q.value="")}var L=b.editor.graph,c=document.createElement("div");c.style.display="flex";c.style.flexDirection="column";c.style.overflow="hidden";c.style.height="100%";c.style.padding="10px 12px 20px 12px";c.style.boxSizing="border-box";mxEvent.addGestureListeners(c,mxUtils.bind(this,function(I){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null);var f=document.createElement("div");
+f.style.flexGrow="1";f.style.overflow="auto";f.style.fontSize="12px";f.style.marginRight="-8px";f.style.paddingRight="8px";mxEvent.addListener(f,"scroll",function(){null!=b.sidebar&&b.sidebar.hideTooltip()});c.appendChild(f);var k=document.createElement("div");k.style.borderRadius="20px";k.style.backgroundColor="light-dark(#e0e0e0, #3a3a3a)";k.style.padding="8px";k.style.marginTop="8px";var m=document.createElement("div");m.style.display="flex";m.style.gap="6px";m.style.paddingRight="8px";m.style.justifyContent=
+"start";var t=document.createElement("select");t.style.borderColor="transparent";t.style.textOverflow="ellipsis";t.style.padding="5px";t.style.minWidth="0";if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var x=document.createElement("option");x.setAttribute("value","createPublic");mxUtils.write(x,mxResources.get("create")+" ("+mxResources.get("diagramIsPublic")+")");t.appendChild(x)}var y=document.createElement("option");y.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(y,
+mxResources.get("includeCopyOfMyDiagram"));t.appendChild(y);var F=document.createElement("option");F.setAttribute("value","selectionOnly");mxUtils.write(F,mxResources.get("selectionOnly"));t.appendChild(F);"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(x=document.createElement("option"),x.setAttribute("value","create"),mxUtils.write(x,mxResources.get("create")),t.appendChild(x),t.value="create");x=document.createElement("option");x.setAttribute("value","help");mxUtils.write(x,mxResources.get("help"));
+t.appendChild(x);t.value="createPublic";var E=t.cloneNode(!1);for(U in Editor.gptModels)if(x=Editor.gptModels[U],"gpt-"==x.substring(0,4)&&null!=Editor.gptApiKey||"gemini-"==x.substring(0,7)&&null!=Editor.geminiApiKey){var C=document.createElement("option");C.setAttribute("value",x);mxUtils.write(C,U);E.appendChild(C)}var S=0==E.children.length;var U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.textOverflow="clip";U.style.cursor="default";var Q=document.createElement("input");
+Q.setAttribute("type","text");Q.style.width="100%";Q.style.outline="none";Q.style.border="none";Q.style.background="transparent";Q.style.padding="6px 30px 6px 10px";Q.style.boxSizing="border-box";U.appendChild(Q);x=document.createElement("img");x.setAttribute("src",Editor.sendImage);x.setAttribute("title",mxResources.get("sendMessage"));x.className="geAdaptiveAsset";x.style.position="relative";x.style.cursor="pointer";x.style.opacity="0.5";x.style.height="19px";x.style.left="-28px";x.style.top="5px";
+x.style.background="url('"+b.editor.transparentImage+"')";U.appendChild(x);k.appendChild(U);S||(m.appendChild(t),m.appendChild(E),k.appendChild(m));var O=!1,q=t.value,u=function(){Q.setAttribute("placeholder",mxResources.get("create"==t.value||"createPublic"==t.value?"describeYourDiagram":"askMeAnything"))};u();mxEvent.addListener(t,"change",A);A();L.selectionModel.addListener(mxEvent.CHANGE,z);L.getModel().addListener(mxEvent.CHANGE,z);z();c.appendChild(k);mxEvent.addListener(x,"click",J);mxEvent.addListener(Q,
+"keydown",function(I){13!=I.keyCode||mxEvent.isShiftDown(I)||J()});this.generate=mxUtils.bind(this,function(I){Q.value=I;J()});this.window=new mxWindow(mxResources.get("generate"),c,l,n,d,v,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){L.getModel().removeListener(z)}));this.window.addListener("show",
+mxUtils.bind(this,function(){this.window.fit();Q.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,l,n,d,v){var A=b.editor.graph,z=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)z=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var D=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(P,J){if(A.isEnabled()){var L=new FilenameDialog(b,"",mxResources.get("add"),function(c){b.hideDialog();if(null!=c&&0<c.length){c=
+c.split(" ");for(var f=[],k=[],m=0;m<c.length;m++){var t=mxUtils.trim(c[m]);""!=t&&(k.push(t),0>mxUtils.indexOf(P,t)&&f.push(t))}A.isSelectionEmpty()?J(P.concat(f)):A.addTagsForCells(A.getSelectionCells(),k)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(L.container,320,80,!0,!0);L.init()}},z);z=D.div;this.window=new mxWindow(mxResources.get("tags"),z,l,n,d,v,!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(){D.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,l,n,d){var v=document.createElement("div");v.style.textAlign="center";var A=document.createElement("p");A.style.fontSize="16pt";A.style.padding="0px";A.style.margin="0px";A.style.color="gray";mxUtils.write(A,mxResources.get("authorizationRequired"));var z="Unknown",
+D=document.createElement("img");D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.marginRight="10px";l==b.drive?(z=mxResources.get("googleDrive"),D.src=IMAGE_PATH+"/google-drive-logo-white.svg"):l==b.dropbox?(z=mxResources.get("dropbox"),D.src=IMAGE_PATH+"/dropbox-logo-white.svg"):l==b.oneDrive?(z=mxResources.get("oneDrive"),D.src=IMAGE_PATH+"/onedrive-logo-white.svg"):l==b.gitHub?(z=mxResources.get("github"),D.src=IMAGE_PATH+"/github-logo-white.svg"):l==b.gitLab?(z=mxResources.get("gitlab"),
+D.src=IMAGE_PATH+"/gitlab-logo.svg",D.style.width="32px"):l==b.trello&&(z=mxResources.get("trello"),D.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[z]));var P=document.createElement("input");P.setAttribute("type","checkbox");z=mxUtils.button(mxResources.get("authorize"),function(){d(P.checked)});z.insertBefore(D,z.firstChild);z.style.marginTop="6px";z.className="geBigButton";z.style.fontSize="18px";z.style.padding="14px";
+v.appendChild(A);v.appendChild(b);v.appendChild(z);n&&(n=document.createElement("p"),n.style.marginTop="20px",n.appendChild(P),A=document.createElement("span"),mxUtils.write(A," "+mxResources.get("rememberMe")),n.appendChild(A),v.appendChild(n),P.checked=!0,P.defaultChecked=!0,mxEvent.addListener(A,"click",function(J){P.checked=!P.checked;mxEvent.consume(J)}));this.container=v},MoreShapesDialog=function(b,l,n){n=null!=n?n:b.sidebar.entries;var d=document.createElement("div"),v=[];if(null!=b.sidebar.customEntries)for(var A=
+0;A<b.sidebar.customEntries.length;A++){for(var z=b.sidebar.customEntries[A]||{},D={title:b.getResource(z.title),entries:[]},P=0;null!=z.entries&&P<z.entries.length;P++){var J=z.entries[P];D.entries.push({id:J.id,title:b.getResource(J.title),desc:b.getResource(J.desc),image:J.preview})}0<D.entries.length&&v.push(D)}for(A=0;A<n.length;A++)if(null==b.sidebar.enabledLibraries)v.push(n[A]);else{D={title:n[A].title,entries:[]};for(P=0;P<n[A].entries.length;P++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
+n[A].entries[P].id)&&D.entries.push(n[A].entries[P]);0<D.entries.length&&v.push(D)}n=v;if(l){A=mxUtils.bind(this,function(U){for(var Q=0;Q<U.length;Q++)(function(O){var q=m.cloneNode(!1);q.style.fontWeight="bold";q.style.backgroundColor="light-dark(#e5e5e5, #505759)";q.style.padding="6px 0px 6px 20px";mxUtils.write(q,O.title);L.appendChild(q);for(var u=0;u<O.entries.length;u++)(function(I){var G=m.cloneNode(!1);G.style.cursor="pointer";G.style.padding="4px 0px 4px 20px";G.style.whiteSpace="nowrap";
+G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.setAttribute("title",I.title+" ("+I.id+")");var H=document.createElement("input");H.setAttribute("type","checkbox");H.checked=b.sidebar.isEntryVisible(I.id);H.defaultChecked=H.checked;G.appendChild(H);mxUtils.write(G," "+I.title);L.appendChild(G);var g=function(p){if(null==p||"INPUT"!=mxEvent.getSource(p).nodeName){c.style.textAlign="center";c.style.padding="0px";c.style.color="";c.innerText="";if(null!=I.desc){var B=document.createElement("pre");
+B.style.boxSizing="border-box";B.style.fontFamily="inherit";B.style.margin="20px";B.style.right="0px";B.style.textAlign="left";mxUtils.write(B,I.desc);c.appendChild(B)}null!=I.imageCallback?I.imageCallback(c):null!=I.image?(B=document.createElement("img"),B.setAttribute("border","0"),B.style.maxWidth="100%",B.setAttribute("src",I.image),c.appendChild(B)):null==I.desc&&(c.style.padding="20px",c.style.color="rgb(179, 179, 179)",mxUtils.write(c,mxResources.get("noPreview")));null!=f&&(f.style.backgroundColor=
+"");f=G;f.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=p&&mxEvent.consume(p)}};mxEvent.addListener(G,"click",g);mxEvent.addListener(G,"dblclick",function(p){H.checked=!H.checked;mxEvent.consume(p)});k.push(function(){return H.checked?I.id:null});0==Q&&0==u&&g()})(O.entries[u])})(U[Q])});P=document.createElement("div");P.className="geDialogTitle";mxUtils.write(P,mxResources.get("shapes"));P.style.position="absolute";P.style.top="0px";P.style.left="0px";P.style.lineHeight="40px";P.style.height=
+"40px";P.style.right="0px";var L=document.createElement("div"),c=document.createElement("div");L.style.position="absolute";L.style.top="40px";L.style.left="0px";L.style.width="202px";L.style.bottom="60px";L.style.overflow="auto";c.style.position="absolute";c.style.left="202px";c.style.right="0px";c.style.top="40px";c.style.bottom="60px";c.style.overflow="auto";c.style.borderLeftStyle="solid";c.style.borderLeftWidth="1px";c.style.textAlign="center";var f=null,k=[],m=document.createElement("div");m.style.position=
+"relative";m.style.left="0px";m.style.right="0px";A(n);d.style.padding="30px";d.appendChild(P);d.appendChild(L);d.appendChild(c);n=document.createElement("div");n.className="geDialogFooter";n.style.position="absolute";n.style.paddingRight="16px";n.style.left="0px";n.style.right="0px";n.style.bottom="0px";n.style.height="60px";n.style.lineHeight="52px";var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.position="relative";t.style.top="1px";t.checked=b.sidebar.sidebarTitles;
+t.defaultChecked=t.checked;n.appendChild(t);A=document.createElement("span");mxUtils.write(A," "+mxResources.get("labels"));A.style.paddingRight="20px";n.appendChild(A);mxEvent.addListener(A,"click",function(U){t.checked=!t.checked;mxEvent.consume(U)});var x=document.createElement("input");x.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)A=document.createElement("span"),A.style.paddingRight="20px",A.appendChild(x),mxUtils.write(A," "+mxResources.get("rememberThisSetting")),
+x.style.position="relative",x.style.top="1px",x.checked=!0,x.defaultChecked=!0,mxEvent.addListener(A,"click",function(U){mxEvent.getSource(U)!=x&&(x.checked=!x.checked,mxEvent.consume(U))}),n.appendChild(A);A=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});A.className="geBtn";P=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var U=[],Q=0;Q<k.length;Q++){var O=k[Q].apply(this,arguments);null!=O&&U.push(O)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&
+"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(Q=mxUtils.indexOf(U,".scratchpad"),null!=b.scratchpad!=(0<=Q&&0<U.splice(Q,1).length)&&b.toggleScratchpad(),Q=mxUtils.indexOf(U,"search"),mxSettings.settings.search=0<=Q&&0<U.splice(Q,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),x.checked&&mxSettings.save());b.sidebar.showEntries(U.join(";"),x.checked,!0);b.setSidebarTitles(t.checked,x.checked)});P.className="geBtn gePrimaryBtn"}else{var y=document.createElement("table");
+A=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";P=document.createElement("tr");y.style.width="100%";l=document.createElement("td");v=document.createElement("td");z=document.createElement("td");var F=mxUtils.bind(this,function(U,Q,O){var q=document.createElement("input");q.type="checkbox";y.appendChild(q);q.checked=b.sidebar.isEntryVisible(O);var u=document.createElement("span");mxUtils.write(u,Q);Q=document.createElement("div");Q.style.display="block";Q.appendChild(q);
+Q.appendChild(u);mxEvent.addListener(u,"click",function(I){q.checked=!q.checked;mxEvent.consume(I)});U.appendChild(Q);return function(){return q.checked?O:null}});P.appendChild(l);P.appendChild(v);P.appendChild(z);A.appendChild(P);y.appendChild(A);k=[];var E=0;for(A=0;A<n.length;A++)for(P=0;P<n[A].entries.length;P++)E++;var C=[l,v,z],S=0;for(A=0;A<n.length;A++)(function(U){for(var Q=0;Q<U.entries.length;Q++){var O=U.entries[Q];k.push(F(C[Math.floor(S/(E/3))],O.title,O.id));S++}})(n[A]);d.appendChild(y);
+n=document.createElement("div");n.style.marginTop="18px";n.style.textAlign="center";x=document.createElement("input");isLocalStorage&&(x.setAttribute("type","checkbox"),x.checked=!0,x.defaultChecked=!0,n.appendChild(x),A=document.createElement("span"),mxUtils.write(A," "+mxResources.get("rememberThisSetting")),n.appendChild(A),mxEvent.addListener(A,"click",function(U){x.checked=!x.checked;mxEvent.consume(U)}));d.appendChild(n);A=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
+A.className="geBtn";P=mxUtils.button(mxResources.get("apply"),function(){for(var U=["search"],Q=0;Q<k.length;Q++){var O=k[Q].apply(this,arguments);null!=O&&U.push(O)}b.sidebar.showEntries(0<U.length?U.join(";"):"",x.checked);b.hideDialog()});P.className="geBtn gePrimaryBtn";n=document.createElement("div");n.style.marginTop="26px";n.style.textAlign="right"}b.editor.cancelFirst?(n.appendChild(A),n.appendChild(P)):(n.appendChild(P),n.appendChild(A));d.appendChild(n);this.container=d},PluginsDialog=function(b,
+l,n,d){function v(){P=!0;if(0==D.length)z.innerText=mxResources.get("noPlugins");else{z.innerText="";for(var k=0;k<D.length;k++){var m=document.createElement("span");m.style.display="flex";m.style.alignItems="center";m.style.whiteSpace="nowrap";var t=document.createElement("img");t.src=Editor.trashImage;t.style.position="relative";t.style.cursor="pointer";t.style.marginRight="4px";t.style.display="inline-block";t.style.width="18px";t.setAttribute("title",mxResources.get("delete"));m.appendChild(t);
+mxUtils.write(m,D[k]);z.appendChild(m);mxUtils.br(z);mxEvent.addListener(t,"click",function(x){return function(){b.confirm(mxResources.get("delete")+' "'+D[x]+'"?',function(){null!=n&&n(D[x]);D.splice(x,1);v()})}}(k))}}}var A=document.createElement("div"),z=document.createElement("div");z.style.height="180px";z.style.overflow="auto";var D=mxSettings.getPlugins().slice(),P=!1;A.appendChild(z);v();P=!1;var J=mxUtils.button(mxResources.get("add"),null!=l?function(){l(function(k){k&&0>mxUtils.indexOf(D,
+k)&&D.push(k);v()})}:function(){var k=document.createElement("div"),m=document.createElement("span");m.style.marginTop="6px";mxUtils.write(m,mxResources.get("builtinPlugins")+": ");k.appendChild(m);var t=document.createElement("select");t.style.width="150px";for(m=0;m<App.publicPlugin.length;m++){var x=document.createElement("option");mxUtils.write(x,App.publicPlugin[m]);x.value=App.publicPlugin[m];t.appendChild(x)}k.appendChild(t);mxUtils.br(k);mxUtils.br(k);m=mxUtils.button(mxResources.get("custom")+
+"...",function(){var y=new FilenameDialog(b,"",mxResources.get("add"),function(F){b.hideDialog();if(null!=F&&0<F.length){F=F.split(";");for(var E=0;E<F.length;E++){var C=F[E],S=App.pluginRegistry[C];null!=S&&(C=S);0<C.length&&0>mxUtils.indexOf(D,C)&&D.push(C)}v()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(y.container,300,80,!0,!0);y.init()});m.className="geBtn";ALLOW_CUSTOM_PLUGINS||(m.style.display="none");k=new CustomDialog(b,k,mxUtils.bind(this,function(){var y=
+App.pluginRegistry[t.value];0>mxUtils.indexOf(D,y)&&(D.push(y),v())}),null,null,null,m);b.showDialog(k.container,360,100,!0,!0)});J.className="geBtn";var L=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});L.className="geBtn";var c=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){P?(mxSettings.setPlugins(D),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});c.className="geBtn gePrimaryBtn";var f=document.createElement("div");
+f.style.marginTop="14px";f.style.textAlign="right";b.isOffline()||f.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(d||f.appendChild(L),f.appendChild(J),f.appendChild(c)):(f.appendChild(J),f.appendChild(c),d||f.appendChild(L));A.appendChild(f);this.container=A},CropImageDialog=function(b,l,n,d){function v(){var U=x.checked,Q=y.checked,O=k.geometry,q=P.width,u=P.height,I=(300-q)/2,G=(300-u)/2;O.x<I?(O.width-=I-O.x,O.x=I):O.x+O.width>I+q&&(O.width=I+q-O.x,
+O.x=Math.min(O.x,I+q));O.y<G?(O.height-=G-O.y,O.y=G):O.y+O.height>G+u&&(O.height=G+u-O.y,O.y=Math.min(O.y,G+u));var H=(O.x-I)/q*100;q=100-(O.x+O.width-I)/q*100;I=(O.y-G)/u*100;O=100-(O.y+O.height-G)/u*100;return"inset("+mxUtils.format(I)+"% "+mxUtils.format(q)+"% "+mxUtils.format(O)+"% "+mxUtils.format(H)+"%"+(U?" round "+f+"%":Q?" round 50%":"")+")"}function A(U){null!=L&&(!0!==U&&(L.model.setGeometry(k,c.clone()),f=5,E.value=f),L.model.setStyle(k,m+v()),L.selectAll(),F.style.visibility=x.checked?
+"visible":"hidden")}var z=document.createElement("div"),D=document.createElement("div");D.style.height="300px";D.style.width="300px";D.style.display="inline-flex";D.style.justifyContent="center";D.style.alignItems="center";D.style.position="absolute";var P=document.createElement("img");P.onload=function(){function U(){L.model.setStyle(k,m+v())}L=new Graph(J);L.autoExtend=!1;L.autoScroll=!1;L.setGridEnabled(!1);L.setEnabled(!0);L.setPanning(!1);L.setConnectable(!1);L.getRubberband().setEnabled(!1);
+L.graphHandler.allowLivePreview=!1;var Q=L.createVertexHandler;L.createVertexHandler=function(){var T=Q.apply(this,arguments);T.livePreview=!1;return T};if(null!=n)try{if("inset"==n.substring(0,5)){var O=k.geometry,q=P.width,u=P.height,I=(300-q)/2,G=(300-u)/2,H=n.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),g=parseFloat(H[0]),p=parseFloat(H[1]),B=parseFloat(H[2]),K=parseFloat(H[3]);isFinite(g)&&isFinite(p)&&isFinite(B)&&isFinite(K)?(O.x=K/100*q+I,O.y=g/100*u+G,O.width=(100-p)/100*q+I-O.x,O.height=(100-
+B)/100*u+G-O.y,"round"==H[4]?"50%"==H[5]?y.setAttribute("checked","checked"):(f=parseInt(H[5]),E.value=f,x.setAttribute("checked","checked"),F.style.visibility="visible"):t.setAttribute("checked","checked")):n=null}else n=null}catch(T){}k.style=m+(n?n:v());k.vertex=!0;L.addCell(k,null,null,null,null);L.selectAll();L.addListener(mxEvent.CELLS_MOVED,U);L.addListener(mxEvent.CELLS_RESIZED,U);var M=L.graphHandler.mouseUp,N=L.graphHandler.mouseDown;L.graphHandler.mouseUp=function(){M.apply(this,arguments);
+J.style.backgroundColor="#fff9"};L.graphHandler.mouseDown=function(){N.apply(this,arguments);J.style.backgroundColor=""};L.dblClick=function(){};var R=L.getSelectionModel().changeSelection;L.getSelectionModel().changeSelection=function(){R.call(this,[k],[k])}};P.onerror=function(){P.onload=null;P.src=Editor.errorImage};P.setAttribute("src",l);P.style.maxWidth="300px";P.style.maxHeight="300px";D.appendChild(P);z.appendChild(D);var J=document.createElement("div");J.style.width="300px";J.style.height=
+"300px";J.style.overflow="hidden";J.style.backgroundColor="#fff9";z.appendChild(J);var L=null,c=new mxGeometry(100,100,100,100),f=5,k=new mxCell("",c.clone(),""),m="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+l.replace(";base64","")+";clipPath=",t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingRect");t.setAttribute("name","croppingShape");t.setAttribute("checked","checked");t.style.margin="5px";z.appendChild(t);l=document.createElement("label");
+l.setAttribute("for","croppingRect");mxUtils.write(l,mxResources.get("rectangle"));z.appendChild(l);var x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id","croppingRounded");x.setAttribute("name","croppingShape");x.style.margin="5px";z.appendChild(x);l=document.createElement("label");l.setAttribute("for","croppingRounded");mxUtils.write(l,mxResources.get("rounded"));z.appendChild(l);var y=document.createElement("input");y.setAttribute("type","radio");y.setAttribute("id",
+"croppingEllipse");y.setAttribute("name","croppingShape");y.style.margin="5px";z.appendChild(y);l=document.createElement("label");l.setAttribute("for","croppingEllipse");mxUtils.write(l,mxResources.get("ellipse"));z.appendChild(l);mxEvent.addListener(t,"change",A);mxEvent.addListener(x,"change",A);mxEvent.addListener(y,"change",A);var F=document.createElement("div");F.style.textAlign="center";F.style.visibility="hidden";var E=document.createElement("input");E.setAttribute("type","range");E.setAttribute("min",
+"1");E.setAttribute("max","49");E.setAttribute("value",f);E.setAttribute("title",mxResources.get("arcSize"));F.appendChild(E);z.appendChild(F);mxEvent.addListener(E,"change",function(){f=this.value;A(!0)});l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";D=mxUtils.button(mxResources.get("apply"),function(){d(v(),k.geometry.width,k.geometry.height);b.hideDialog()});D.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("reset"),function(){d(null,
+P.width,P.height);b.hideDialog()});C.className="geBtn";var S=document.createElement("div");S.style.marginTop="10px";S.style.textAlign="right";b.editor.cancelFirst?(S.appendChild(l),S.appendChild(C),S.appendChild(D)):(S.appendChild(C),S.appendChild(D),S.appendChild(l));z.appendChild(S);this.container=z},EditGeometryDialog=function(b,l){var n=b.editor.graph,d=1==l.length?n.getCellGeometry(l[0]):null,v=document.createElement("div"),A=document.createElement("table"),z=document.createElement("tbody"),
+D=document.createElement("tr"),P=document.createElement("td"),J=document.createElement("td");A.style.paddingLeft="6px";mxUtils.write(P,mxResources.get("relative")+":");var L=document.createElement("input");L.setAttribute("type","checkbox");null!=d&&d.relative&&(L.setAttribute("checked","checked"),L.defaultChecked=!0);this.init=function(){L.focus()};J.appendChild(L);D.appendChild(P);D.appendChild(J);z.appendChild(D);D=document.createElement("tr");P=document.createElement("td");J=document.createElement("td");
+mxUtils.write(P,mxResources.get("left")+":");var c=document.createElement("input");c.setAttribute("type","text");c.style.width="100px";c.value=null!=d?d.x:"";J.appendChild(c);D.appendChild(P);D.appendChild(J);z.appendChild(D);D=document.createElement("tr");P=document.createElement("td");J=document.createElement("td");mxUtils.write(P,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=d?d.y:"";J.appendChild(f);D.appendChild(P);
+D.appendChild(J);z.appendChild(D);D=document.createElement("tr");P=document.createElement("td");J=document.createElement("td");mxUtils.write(P,mxResources.get("dx")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=d&&null!=d.offset?d.offset.x:"";J.appendChild(k);D.appendChild(P);D.appendChild(J);z.appendChild(D);D=document.createElement("tr");P=document.createElement("td");J=document.createElement("td");mxUtils.write(P,mxResources.get("dy")+
+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=d&&null!=d.offset?d.offset.y:"";J.appendChild(m);D.appendChild(P);D.appendChild(J);z.appendChild(D);D=document.createElement("tr");P=document.createElement("td");J=document.createElement("td");mxUtils.write(P,mxResources.get("width")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=d?d.width:"";J.appendChild(t);D.appendChild(P);D.appendChild(J);
+z.appendChild(D);D=document.createElement("tr");P=document.createElement("td");J=document.createElement("td");mxUtils.write(P,mxResources.get("height")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=d?d.height:"";J.appendChild(x);D.appendChild(P);D.appendChild(J);z.appendChild(D);D=document.createElement("tr");P=document.createElement("td");J=document.createElement("td");mxUtils.write(P,mxResources.get("rotation")+":");var y=document.createElement("input");
+y.setAttribute("type","text");y.style.width="100px";y.value=1==l.length?mxUtils.getValue(n.getCellStyle(l[0]),mxConstants.STYLE_ROTATION,0):"";J.appendChild(y);D.appendChild(P);D.appendChild(J);z.appendChild(D);A.appendChild(z);v.appendChild(A);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var F=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();n.getModel().beginUpdate();try{for(var E=0;E<l.length;E++){var C=n.getCellGeometry(l[E]);null!=
+C&&(C=C.clone(),n.isCellMovable(l[E])&&(C.relative=L.checked,0<mxUtils.trim(c.value).length&&(C.x=Number(c.value)),0<mxUtils.trim(f.value).length&&(C.y=Number(f.value)),0<mxUtils.trim(k.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.x=Number(k.value)),0<mxUtils.trim(m.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.y=Number(m.value))),n.isCellResizable(l[E])&&(0<mxUtils.trim(t.value).length&&(C.width=Number(t.value)),0<mxUtils.trim(x.value).length&&(C.height=Number(x.value))),
+n.getModel().setGeometry(l[E],C));0<mxUtils.trim(y.value).length&&n.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[l[E]])}}finally{n.getModel().endUpdate()}});F.className="geBtn gePrimaryBtn";mxEvent.addListener(v,"keypress",function(E){13==E.keyCode&&F.click()});A=document.createElement("div");A.style.marginTop="20px";A.style.textAlign="right";b.editor.cancelFirst?(A.appendChild(d),A.appendChild(F)):(A.appendChild(F),A.appendChild(d));v.appendChild(A);this.container=v},LibraryDialog=function(b,
+l,n,d,v,A,z){function D(q){for(q=document.elementFromPoint(q.clientX,q.clientY);null!=q&&q.parentNode!=t;)q=q.parentNode;var u=null;if(null!=q){var I=t.firstChild;for(u=0;null!=I&&I!=q;)I=I.nextSibling,u++}return u}function P(q,u,I,G,H,g,p,B,K){try{if(b.spinner.stop(),null==u||"image/"==u.substring(0,6))if(null==q&&null!=p||null==y[q]){var M=function(){Z.innerText="";Z.style.cursor="pointer";Z.style.whiteSpace="nowrap";Z.style.textOverflow="ellipsis";mxUtils.write(Z,null!=aa.title&&0<aa.title.length?
+aa.title:mxResources.get("untitled"));Z.style.color=null==aa.title||0==aa.title.length?"#d0d0d0":""};t.style.backgroundImage="";x.style.display="none";var N=H,R=g;if(H>b.maxImageSize||g>b.maxImageSize){var T=Math.min(1,Math.min(b.maxImageSize/Math.max(1,H)),b.maxImageSize/Math.max(1,g));H*=T;g*=T}N>R?(R=Math.round(100*R/N),N=100):(N=Math.round(100*N/R),R=100);var V=document.createElement("div");V.setAttribute("draggable","true");V.style.display="inline-block";V.style.position="relative";V.style.padding=
+"0 12px";V.style.cursor="move";mxUtils.setPrefixedStyle(V.style,"transition","transform .1s ease-in-out");if(null!=q){var X=document.createElement("img");X.setAttribute("src",S.convert(q));X.style.width=N+"px";X.style.height=R+"px";X.style.margin="10px";X.style.paddingBottom=Math.floor((100-R)/2)+"px";X.style.paddingLeft=Math.floor((100-N)/2)+"px";V.appendChild(X)}else if(null!=p){var W=b.stringToCells("<"==p.xml.charAt(0)?p.xml:Graph.decompress(p.xml));0<W.length&&(b.sidebar.createThumb(W,100,100,
+V,null,!0,!1,null,null,f.shapeBackgroundColor),V.firstChild.style.display="inline-block",V.firstChild.style.cursor="")}var Y=document.createElement("img");Y.setAttribute("src",Editor.closeBlackImage);Y.setAttribute("border","0");Y.setAttribute("title",mxResources.get("delete"));Y.setAttribute("align","top");Y.style.paddingTop="4px";Y.style.position="absolute";Y.style.marginLeft="-12px";Y.style.zIndex="1";Y.style.cursor="pointer";mxEvent.addListener(Y,"dragstart",function(ka){mxEvent.consume(ka)});
+(function(ka,ba,ha){mxEvent.addListener(Y,"click",function(ea){y[ba]=null;for(var da=0;da<c.length;da++)if(null!=c[da].data&&c[da].data==ba||null!=c[da].xml&&null!=ha&&c[da].xml==ha.xml){c.splice(da,1);break}V.parentNode.removeChild(ka);0==c.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",x.style.display="");mxEvent.consume(ea)});mxEvent.addListener(Y,"dblclick",function(ea){mxEvent.consume(ea)})})(V,q,p);V.appendChild(Y);V.style.marginBottom="30px";var Z=document.createElement("div");
+Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.bottom="-18px";Z.style.left="10px";Z.style.right="10px";Z.style.backgroundColor="light-dark(#ffffff, transparent)";Z.style.overflow="hidden";Z.style.textAlign="center";Z.setAttribute("title",mxResources.get("rename"));var aa=null;null!=q?(aa={data:q,w:H,h:g,title:K},null!=B&&(aa.aspect=B),y[q]=X,c.push(aa)):null!=p&&(p.aspect="fixed",c.push(p),aa=p);mxEvent.addListener(Z,"keydown",function(ka){13==ka.keyCode&&null!=C&&(C(),C=null,
+mxEvent.consume(ka))});M();V.appendChild(Z);mxEvent.addListener(Z,"mousedown",function(ka){"true"!=Z.getAttribute("contentEditable")&&mxEvent.consume(ka)});W=function(ka){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ba=new FilenameDialog(b,aa.title||"",mxResources.get("ok"),function(ha){null!=ha&&(aa.title=ha,M())},mxResources.get("enterValue"));b.showDialog(ba.container,300,80,!0,!0);ba.init();mxEvent.consume(ka)}else if("true"!=Z.getAttribute("contentEditable")){null!=
+C&&(C(),C=null);if(null==aa.title||0==aa.title.length)Z.innerText="";Z.style.textOverflow="";Z.style.whiteSpace="";Z.style.cursor="text";Z.style.color="";Z.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(Z.style,"user-select","text");Z.focus();document.execCommand("selectAll",!1,null);C=function(){Z.removeAttribute("contentEditable");Z.style.cursor="pointer";aa.title=mxUtils.getTextContent(Z);M()};mxEvent.consume(ka)}};mxEvent.addListener(Z,"click",W);mxEvent.addListener(V,"dblclick",
+W);t.appendChild(V);mxEvent.addListener(V,"dragstart",function(ka){null==C&&(null==q&&null!=p&&(Y.style.visibility="hidden",Z.style.visibility="hidden"),mxClient.IS_FF&&null!=p.xml&&ka.dataTransfer.setData("Text",p.xml),F=D(ka),mxClient.IS_GC&&(V.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(V.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(V,30);Y.style.visibility="";Z.style.visibility=""},0))});mxEvent.addListener(V,"dragend",function(ka){"hidden"==Y.style.visibility&&
+(Y.style.visibility="",Z.style.visibility="");F=null;mxUtils.setOpacity(V,100);mxUtils.setPrefixedStyle(V.style,"transform",null)})}else U||(U=!0,b.handleError({message:mxResources.get("fileExists")}));else{H=!1;try{if(N=mxUtils.parseXml(q),"mxlibrary"==N.documentElement.nodeName){R=JSON.parse(mxUtils.getTextContent(N.documentElement));if(null!=R&&0<R.length)for(var la=0;la<R.length;la++)null!=R[la].xml?P(null,null,0,0,0,0,R[la]):P(R[la].data,null,0,0,R[la].w,R[la].h,null,"fixed",R[la].title);H=!0}else if("mxfile"==
+N.documentElement.nodeName){var fa=N.documentElement.getElementsByTagName("diagram");for(la=0;la<fa.length;la++){var ca=Editor.getDiagramNodeXml(fa[la]);W=b.stringToCells(ca);if(0<W.length){var ja=b.editor.graph.getBoundingBoxFromGeometry(W);null!=ja&&P(null,null,0,0,0,0,{xml:ca,w:ja.width,h:ja.height})}}H=!0}}catch(ka){null!=window.console&&console.error("Error in library dialog: "+ka)}H||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ka){null!=window.console&&
+console.log("Error in library dialog: "+ka)}return null}function J(q){q.dataTransfer.dropEffect=null!=F?"move":"copy";q.stopPropagation();q.preventDefault()}function L(q){q.stopPropagation();q.preventDefault();U=!1;E=D(q);if(null!=F)null!=E&&E<t.children.length?(c.splice(E>F?E-1:E,0,c.splice(F,1)[0]),t.insertBefore(t.children[F],t.children[E])):(c.push(c.splice(F,1)[0]),t.appendChild(t.children[F]));else if(0<q.dataTransfer.files.length)b.importFiles(q.dataTransfer.files,0,0,b.maxImageSize,Q(q));
+else if(0<=mxUtils.indexOf(q.dataTransfer.types,"text/uri-list")){var u=decodeURIComponent(q.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(u)||/(\.png)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.svg)($|\?)/i.test(u))&&b.loadImage(u,function(I){P(u,null,0,0,I.width,I.height);t.scrollTop=t.scrollHeight})}q.stopPropagation();q.preventDefault()}var c=[],f=b.editor.graph;n=document.createElement("div");n.style.height="100%";var k=document.createElement("div");k.style.whiteSpace="nowrap";
+k.style.height="40px";n.appendChild(k);mxUtils.write(k,mxResources.get("filename")+":");null==l&&(l=b.defaultLibraryName+".xml");var m=document.createElement("input");m.setAttribute("value",l);m.style.marginRight="20px";m.style.marginLeft="10px";m.style.width="500px";null==v||v.isRenamable()||m.setAttribute("disabled","true");this.init=function(){if(null==v||v.isRenamable())m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)};k.appendChild(m);
+Editor.enableUncompressedLibraries&&(m.style.width="420px",l=document.createElement("input"),l.setAttribute("type","checkbox"),l.style.marginRight="10px",k.appendChild(l),mxUtils.write(k,mxResources.get("compressed")));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==c.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var x=document.createElement("div");x.style.position="absolute";x.style.width="640px";x.style.top="260px";x.style.textAlign="center";x.style.fontSize="22px";x.style.color="#a0c3ff";mxUtils.write(x,mxResources.get("dragImagesHere"));n.appendChild(x);var y={},F=null,E=null,C=null;k=function(q){"true"!=mxEvent.getSource(q).getAttribute("contentEditable")&&null!=C&&(C(),C=null,mxEvent.consume(q))};mxEvent.addListener(t,
+"mousedown",k);mxEvent.addListener(t,"pointerdown",k);mxEvent.addListener(t,"touchstart",k);var S=new mxUrlConverter,U=!1;if(null!=d)for(k=0;k<d.length;k++)l=d[k],P(l.data,null,0,0,l.w,l.h,l,l.aspect,l.title);mxEvent.addListener(t,"dragleave",function(q){x.style.cursor="";for(var u=mxEvent.getSource(q);null!=u;){if(u==t||u==x){q.stopPropagation();q.preventDefault();break}u=u.parentNode}});var Q=function(q){return function(u,I,G,H,g,p,B,K,M){null!=M&&EditorUi.isVisioFilename(M.name)?b.importVisio(M,
+mxUtils.bind(this,function(N){P(N,I,G,H,g,p,B,"fixed",mxEvent.isAltDown(q)?null:B.substring(0,B.lastIndexOf(".")).replace(/_/g," "))})):null!=M&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(u,M.name)?b.isExternalDataComms()?b.parseFile(M,mxUtils.bind(this,function(N){4==N.readyState&&(b.spinner.stop(),200<=N.status&&299>=N.status&&(P(N.responseText,I,G,H,g,p,B,"fixed",mxEvent.isAltDown(q)?null:B.substring(0,B.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(b.spinner.stop(),
+b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(P(u,I,G,H,g,p,B,"fixed",mxEvent.isAltDown(q)?null:B.substring(0,B.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",J);mxEvent.addListener(t,"drop",L);mxEvent.addListener(x,"dragover",J);mxEvent.addListener(x,"drop",L);n.appendChild(t);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});
+k.setAttribute("id","btnCancel");k.className="geBtn";b.editor.cancelFirst&&d.appendChild(k);"draw.io"!=b.getServiceName()||null==v||v.constructor!=DriveLibrary&&v.constructor!=GitHubLibrary||(l=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(v,function(q){if(null!=q){var u=b.getSearch("create title mode url drive splash state clibs ui".split(" "));u+=(0==u.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(q);q=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
+"/"+u,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(q.container,450,240,!0);q.init()}else v.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(v.getId(),v)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),l.className="geBtn",d.appendChild(l));l=mxUtils.button(mxResources.get("export"),
+function(){var q=b.createLibraryDataFromImages(c),u=m.value;/(\.xml)$/i.test(u)||(u+=".xml");b.isLocalFileSave()?b.saveLocalFile(q,u,"text/xml",null,null,null!=z?z:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(u)+"&format=xml&xml="+encodeURIComponent(q))).simulate(document,"_blank")});l.setAttribute("id","btnDownload");l.className="geBtn";d.appendChild(l);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var O=document.createElement("input");O.setAttribute("multiple",
+"multiple");O.setAttribute("type","file");mxEvent.addListener(O,"change",function(q){U=!1;b.importFiles(O.files,0,0,b.maxImageSize,function(u,I,G,H,g,p,B,K,M){null!=O.files&&(Q(q)(u,I,G,H,g,p,B,K,M),O.type="",O.type="file",O.value="")});t.scrollTop=t.scrollHeight});O.style.display="none";document.body.appendChild(O);b.libDlgFileInputElt=O}l=mxUtils.button(mxResources.get("import"),function(){null!=C&&(C(),C=null);b.libDlgFileInputElt.click()});l.setAttribute("id","btnAddImage");l.className="geBtn";
+d.appendChild(l)}l=mxUtils.button(mxResources.get("addImages"),function(){null!=C&&(C(),C=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(q,u,I){U=!1;if(null!=q){if("data:image/"==q.substring(0,11)){var G=q.indexOf(",");0<G&&(q=q.substring(0,G)+";base64,"+q.substring(G+1))}P(q,null,0,0,u,I);t.scrollTop=t.scrollHeight}})});l.setAttribute("id","btnAddImageUrl");l.className="geBtn";d.appendChild(l);this.saveBtnClickHandler=function(q,u,I,G){b.saveLibrary(q,u,I,G)};l=mxUtils.button(mxResources.get("save"),
+mxUtils.bind(this,function(){null!=C&&(C(),C=null);this.saveBtnClickHandler(m.value,c,v,A)}));l.setAttribute("id","btnSave");l.className="geBtn gePrimaryBtn";d.appendChild(l);b.editor.cancelFirst||d.appendChild(k);n.appendChild(d);this.container=n},EditShapeDialog=function(b,l,n){var d=document.createElement("div");d.style.position="absolute";d.style.left="30px";d.style.right="30px";d.style.top="30px";d.style.bottom="30px";var v=document.createElement("div");v.style.position="absolute";v.style.top=
+"0px";mxUtils.write(v,n);d.appendChild(v);n=document.createElement("div");n.style.position="absolute";n.style.width="100%";n.style.display="flex";n.style.alignItems="stretch";n.style.top="24px";n.style.bottom="50px";var A=document.createElement("textarea");A.style.outline="none";A.style.resize="horizontal";A.style.width="430px";A.style.maxWidth="calc(100% - 100px)";A.style.flexShrink="0";A.style.borderRadius="4px";A.style.marginRight="4px";n.appendChild(A);var z=document.createElement("div");z.style.border=
+"1px solid lightgray";z.style.padding="20px";z.style.flexGrow="1";z.style.borderRadius="4px";mxEvent.disableContextMenu(z);n.appendChild(z);var D=new Graph(z);D.setEnabled(!1);var P=b.editor.graph.cloneCell(l);D.addCells([P]);v=D.view.getState(P);var J="";null!=v.shape&&null!=v.shape.stencil&&(J=mxUtils.getPrettyXml(v.shape.stencil.desc));mxUtils.write(A,J||"");d.appendChild(n);n=document.createElement("div");n.style.position="absolute";n.style.display="flex";n.style.alignItems="center";n.style.justifyContent=
+"end";n.style.bottom="6px";n.style.height="30px";n.style.width="100%";b.isOffline()||n.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-complex-create-edit"));v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});v.className="geBtn";b.editor.cancelFirst&&n.appendChild(v);var L=function(f,k,m){var t=A.value,x=mxUtils.parseXml(t);t=mxUtils.getPrettyXml(x.documentElement);x=x.documentElement.getElementsByTagName("parsererror");if(null!=x&&0<x.length)b.showError(mxResources.get("error"),
+mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(m&&b.hideDialog(),x=!f.model.contains(k),!m||x||t!=J){t=Graph.compress(t);f.getModel().beginUpdate();try{if(x){var y=b.editor.graph.getFreeInsertPoint();k.geometry.x=y.x;k.geometry.y=y.y;f.addCell(k)}f.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+t+")",[k])}catch(F){throw F;}finally{f.getModel().endUpdate()}x&&(f.setSelectionCell(k),f.scrollCellToVisible(k))}},c=mxUtils.button(mxResources.get("preview"),function(){L(D,
+P,!1);D.fit()});c.className="geBtn";n.appendChild(c);c=mxUtils.button(mxResources.get("apply"),function(){L(b.editor.graph,l,!0)});c.className="geBtn gePrimaryBtn";n.appendChild(c);b.editor.cancelFirst||n.appendChild(v);d.appendChild(n);this.init=function(){A.focus();A.scrollTop=0;D.fit();z.style.overflow="auto";D.fit()};this.container=d},CustomDialog=function(b,l,n,d,v,A,z,D,P,J,L,c){var f=document.createElement("div");f.appendChild(l);var k=document.createElement("div");k.style.marginTop=null!=
+c?c:"30px";k.style.textAlign="right";null!=z&&k.appendChild(z);b.isOffline()||null==A||k.appendChild(b.createHelpIcon(A));l=mxUtils.button(P||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});l.className="geBtn";D&&(l.style.display="none");b.editor.cancelFirst&&k.appendChild(l);v=mxUtils.button(v||mxResources.get("ok"),mxUtils.bind(this,function(){J||b.hideDialog(null,null,this.container);if(null!=n){var m=n();if("string"===typeof m){b.showError(mxResources.get("error"),m);return}}J&&
+b.hideDialog(null,null,this.container)}));k.appendChild(v);v.className="geBtn gePrimaryBtn";b.editor.cancelFirst||k.appendChild(l);if(null!=L)for(D=0;D<L.length;D++)(function(m,t,x){m=mxUtils.button(m,function(y){t(y)});null!=x&&m.setAttribute("title",x);m.className="geBtn";k.appendChild(m)})(L[D][0],L[D][1],L[D][2]);f.appendChild(k);this.cancelBtn=l;this.okButton=v;this.container=f},BtnDialog=function(b,l,n,d){var v=document.createElement("div");v.style.textAlign="center";var A=document.createElement("p");
+A.style.fontSize="16pt";A.style.padding="0px";A.style.margin="0px";A.style.color="gray";mxUtils.write(A,mxResources.get("done"));var z="Unknown",D=document.createElement("img");D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.marginRight="10px";l==b.drive?(z=mxResources.get("googleDrive"),D.src=IMAGE_PATH+"/google-drive-logo-white.svg"):l==b.dropbox?(z=mxResources.get("dropbox"),D.src=IMAGE_PATH+"/dropbox-logo-white.svg"):l==b.oneDrive?(z=mxResources.get("oneDrive"),D.src=
+IMAGE_PATH+"/onedrive-logo-white.svg"):l==b.gitHub?(z=mxResources.get("github"),D.src=IMAGE_PATH+"/github-logo-white.svg"):l==b.gitLab?(z=mxResources.get("gitlab"),D.src=IMAGE_PATH+"/gitlab-logo.svg"):l==b.trello&&(z=mxResources.get("trello"),D.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[z],"You are now authorized in {1}"));n=mxUtils.button(n,d);n.insertBefore(D,n.firstChild);n.style.marginTop="6px";n.className="geBigButton";
+n.style.fontSize="18px";n.style.padding="14px";v.appendChild(A);v.appendChild(b);v.appendChild(n);this.container=v},FontDialog=function(b,l,n,d,v){function A(E){this.style.border="";13==E.keyCode&&F.click()}var z=document.createElement("table"),D=document.createElement("tbody");z.style.marginTop="8px";var P=document.createElement("tr");var J=document.createElement("td");J.colSpan=2;J.style.whiteSpace="nowrap";J.style.fontSize="10pt";J.style.fontWeight="bold";var L=document.createElement("input");
+L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value","sysfonts");L.setAttribute("type","radio");L.setAttribute("name","current-fontdialog");L.setAttribute("id","fontdialog-sysfonts");J.appendChild(L);var c=document.createElement("label");c.setAttribute("for","fontdialog-sysfonts");mxUtils.write(c,mxResources.get("sysFonts",null,"System Fonts"));J.appendChild(c);P.appendChild(J);D.appendChild(P);P=document.createElement("tr");J=document.createElement("td");J.style.whiteSpace=
+"nowrap";J.style.fontSize="10pt";J.style.width="120px";J.style.paddingLeft="15px";mxUtils.write(J,mxResources.get("fontname",null,"Font Name")+":");P.appendChild(J);var f=document.createElement("input");"s"==d&&f.setAttribute("value",l);f.style.marginLeft="4px";f.style.width="250px";f.className="dlg_fontName_s";J=document.createElement("td");J.appendChild(f);P.appendChild(J);D.appendChild(P);P=document.createElement("tr");J=document.createElement("td");J.colSpan=2;J.style.whiteSpace="nowrap";J.style.fontSize=
+"10pt";J.style.fontWeight="bold";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","googlefonts");k.setAttribute("type","radio");k.setAttribute("name","current-fontdialog");k.setAttribute("id","fontdialog-googlefonts");J.appendChild(k);c=document.createElement("label");c.setAttribute("for","fontdialog-googlefonts");mxUtils.write(c,mxResources.get("googleFonts",null,"Google Fonts"));J.appendChild(c);if(!b.isOffline()||EditorUi.isElectronApp)c=
+b.createHelpIcon("https://fonts.google.com/"),J.appendChild(c);P.appendChild(J);"0"!=urlParams.isGoogleFontsEnabled&&D.appendChild(P);P=document.createElement("tr");J=document.createElement("td");J.style.whiteSpace="nowrap";J.style.fontSize="10pt";J.style.width="120px";J.style.paddingLeft="15px";mxUtils.write(J,mxResources.get("fontname",null,"Font Name")+":");P.appendChild(J);var m=document.createElement("input");"g"==d&&m.setAttribute("value",l);m.style.marginLeft="4px";m.style.width="250px";m.className=
+"dlg_fontName_g";J=document.createElement("td");J.appendChild(m);P.appendChild(J);"0"!=urlParams.isGoogleFontsEnabled&&D.appendChild(P);P=document.createElement("tr");J=document.createElement("td");J.colSpan=2;J.style.whiteSpace="nowrap";J.style.fontSize="10pt";J.style.fontWeight="bold";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","webfonts");t.setAttribute("type","radio");t.setAttribute("name","current-fontdialog");t.setAttribute("id",
+"fontdialog-webfonts");J.appendChild(t);c=document.createElement("label");c.setAttribute("for","fontdialog-webfonts");mxUtils.write(c,mxResources.get("webfonts",null,"Web Fonts"));J.appendChild(c);P.appendChild(J);Editor.enableWebFonts&&D.appendChild(P);P=document.createElement("tr");J=document.createElement("td");J.style.whiteSpace="nowrap";J.style.fontSize="10pt";J.style.width="120px";J.style.paddingLeft="15px";mxUtils.write(J,mxResources.get("fontname",null,"Font Name")+":");P.appendChild(J);var x=
+document.createElement("input");"w"==d&&(Editor.enableWebFonts?x.setAttribute("value",l):f.setAttribute("value",l));x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontName_w";J=document.createElement("td");J.appendChild(x);P.appendChild(J);Editor.enableWebFonts&&D.appendChild(P);P=document.createElement("tr");J=document.createElement("td");J.style.whiteSpace="nowrap";J.style.fontSize="10pt";J.style.width="120px";J.style.paddingLeft="15px";mxUtils.write(J,mxResources.get("fontUrl",
+null,"Font URL")+":");P.appendChild(J);var y=document.createElement("input");y.setAttribute("value",n||"");y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontUrl";J=document.createElement("td");J.appendChild(y);P.appendChild(J);Editor.enableWebFonts&&D.appendChild(P);this.init=function(){var E=f;"g"==d?E=m:"w"==d&&Editor.enableWebFonts&&(E=x);E.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)};P=document.createElement("tr");
+J=document.createElement("td");J.colSpan=2;J.style.paddingTop="20px";J.style.whiteSpace="nowrap";J.setAttribute("align","right");b.isOffline()||J.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();v()});l.className="geBtn";b.editor.cancelFirst&&J.appendChild(l);var F=mxUtils.button(mxResources.get("apply"),function(){if(L.checked){var E=f.value;var C="s"}else if(k.checked){E=m.value;var S=Editor.GOOGLE_FONTS+
+encodeURIComponent(E).replace(/%20/g,"+");C="g"}else t.checked&&(E=x.value,S=y.value,C="w");var U=E;var Q=S,O=C,q=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,u=z.querySelector(".dlg_fontName_"+O);null==u||null!=U&&0!=U.length?(u=z.querySelector(".dlg_fontUrl"),null==u||"w"!=O||q.test(Q)?U=!0:(u.style.border="1px solid red",U=!1)):(u.style.border="1px solid red",U=!1);U&&(v(E,S,C),b.hideDialog())});F.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keypress",
+A);mxEvent.addListener(m,"keypress",A);mxEvent.addListener(x,"keypress",A);mxEvent.addListener(y,"keypress",A);mxEvent.addListener(f,"focus",function(){L.setAttribute("checked","checked");L.checked=!0});mxEvent.addListener(m,"focus",function(){k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(x,"focus",function(){t.setAttribute("checked","checked");t.checked=!0});mxEvent.addListener(y,"focus",function(){t.setAttribute("checked","checked");t.checked=!0});J.appendChild(F);b.editor.cancelFirst||
+J.appendChild(l);P.appendChild(J);D.appendChild(P);z.appendChild(D);this.container=z};
+function AspectDialog(b,l,n,d,v){this.aspect={pageId:l||(b.pages?b.pages[0].getId():null),layerIds:n||[]};l=document.createElement("div");var A=document.createElement("h5");A.style.margin="0 0 10px";mxUtils.write(A,mxResources.get("pages"));l.appendChild(A);n=document.createElement("div");n.className="geAspectDlgList";l.appendChild(n);A=document.createElement("h5");A.style.margin="0 0 10px";mxUtils.write(A,mxResources.get("layers"));l.appendChild(A);A=document.createElement("div");A.className="geAspectDlgList";
+l.appendChild(A);this.pagesContainer=n;this.layersContainer=A;this.ui=b;n=document.createElement("div");n.style.marginTop="16px";n.style.textAlign="center";A=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=v&&v()});A.className="geBtn";b.editor.cancelFirst&&n.appendChild(A);var z=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));n.appendChild(z);z.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||n.appendChild(A);z.setAttribute("disabled","disabled");this.okBtn=z;l.appendChild(n);this.container=l}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var l=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(l.getId(),l.getName(),l.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
+AspectDialog.prototype.createViewer=function(b,l,n,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var v=new Graph(b);v.setTooltips(!1);v.setEnabled(!1);v.setPanning(!1);v.minFitScale=null;v.maxFitScale=null;v.centerZoom=!0;l="mxGraphModel"==l.nodeName?l:Editor.parseDiagramNode(l);if(null!=l){var A=l.getAttribute("background");if(null==A||""==A||A==mxConstants.NONE)A=null!=d?d:"#ffffff";b.style.backgroundColor=A;d=new mxCodec(l.ownerDocument);b=v.getModel();d.decode(l,b);l=b.getChildCount(b.root);
+d=null==n;for(A=0;A<l;A++){var z=b.getChildAt(b.root,A);b.setVisible(z,d||n==z.id)}v.maxFitScale=1;v.fit(0);v.center()}return v};
+AspectDialog.prototype.createPageItem=function(b,l,n){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(l)+"</div>";this.pagesContainer.appendChild(d);var v=this.createViewer(d.childNodes[0],n);l=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;
+this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var A=v.model;A=A.getChildCells(A.getRoot());for(var z=0;z<A.length;z++)this.createLayerItem(A[z],b,v,n)});mxEvent.addListener(d,"click",l);this.aspect.pageId==b&&l()};
+AspectDialog.prototype.createLayerItem=function(b,l,n,d){l=n.convertValueToString(b)||mxResources.get("background")||"Background";var v=document.createElement("div");v.setAttribute("data-layer-id",b.id);v.className="geAspectDlgListItem";v.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(l)+"</div>";this.layersContainer.appendChild(v);this.createViewer(v.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=v.className.indexOf("geAspectDlgListItemSelected")?
+(v.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(v.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(v,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};
+var FilePropertiesDialog=function(b,l){function n(C){var S=J;J=function(U,Q){try{C(function(){S(U,Q)},Q)}catch(O){Q(O)}}}var d=document.createElement("table"),v=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var A=b.getCurrentFile(),z=null!=A&&null!=A.getTitle()?A.getTitle():b.defaultFilename,D=/(\.png)$/i.test(z),P=/(\.svg)$/i.test(z),J=function(C,S){C()},L=null!=A?A.isLocked():!1;var c=document.createElement("tr");var f=document.createElement("td");
+f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("locked")+":");c.appendChild(f);var k=document.createElement("input");k.setAttribute("type","checkbox");L&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(k);c.appendChild(f);v.appendChild(c);this.init=function(){k.focus()};n(function(C,S){null!=b.fileNode&&L!=k.checked?window.setTimeout(function(){null!=
+A&&A.setLocked(k.checked);C()},0):C()});if(D||P){z=1;D=0;c=b.fileNode;null!=c&&(c.hasAttribute("scale")&&(z=parseFloat(c.getAttribute("scale"))),c.hasAttribute("border")&&(D=parseInt(c.getAttribute("border"))));c=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("zoom")+":");c.appendChild(f);var m=document.createElement("input");m.setAttribute("value",100*z+"%");m.style.marginLeft="4px";m.style.width="100%";
+f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(m);c.appendChild(f);v.appendChild(c);c=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("borderWidth")+":");c.appendChild(f);var t=document.createElement("input");t.setAttribute("value",D);t.style.marginLeft="4px";t.style.width="100%";f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(t);c.appendChild(f);v.appendChild(c);
+this.init=this.init||function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)};n(function(C,S){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(m.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(t.value))),null!=A&&A.fileChanged());C()})}else if(!/(\.html)$/i.test(z)&&!/(\.svg)$/i.test(z)){var x=null!=A?A.isCompressed():Editor.defaultCompressed;c=document.createElement("tr");f=document.createElement("td");
+f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("compressed")+":");c.appendChild(f);var y=document.createElement("input");y.setAttribute("type","checkbox");x&&(y.setAttribute("checked","checked"),y.defaultChecked=!0);f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(y);c.appendChild(f);v.appendChild(c);this.init=this.init||function(){y.focus()};n(function(C,S){null!=b.fileNode&&x!=
+y.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",y.checked?"true":"false");null!=A&&(A.compressionChanged(y.checked),A.fileChanged());C()},0):C()})}if(null!=A&&A.isRealtimeOptional()){c=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("realtimeCollaboration")+":");c.appendChild(f);var F=document.createElement("input");F.setAttribute("type",
+"checkbox");var E=A.isRealtimeEnabled();if(E="disabled"!=b.drive.getCustomProperty(A.desc,"collaboration"))F.setAttribute("checked","checked"),F.defaultChecked=!0;n(function(C,S){F.checked!=E?A.setRealtimeEnabled(F.checked,C,S):C()});this.init=null!=this.init?this.init:function(){F.focus()};f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(F);f.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));c.appendChild(f);v.appendChild(c)}null!=A&&
+"draw.io"==b.getServiceName()&&0<A.getSize()&&"1"!=urlParams.embed&&(c=document.createElement("tr"),f=document.createElement("td"),f.style.whiteSpace="nowrap",f.style.overflow="hidden",f.style.textOverflow="ellipsis",f.style.fontSize="10pt",mxUtils.write(f,mxResources.get("size")+":"),c.appendChild(f),f=b.formatFileSize(A.getSize()),z=document.createElement("input"),z.setAttribute("title",f),z.setAttribute("value",f),z.setAttribute("disabled","disabled"),z.style.marginLeft="4px",z.style.width="100%",
+f=document.createElement("td"),f.style.whiteSpace="nowrap",f.appendChild(z),c.appendChild(f),v.appendChild(c));null!=l&&(c=document.createElement("tr"),f=document.createElement("td"),f.style.whiteSpace="nowrap",f.style.overflow="hidden",f.style.textOverflow="ellipsis",f.style.fontSize="10pt",mxUtils.write(f,mxResources.get("publicDiagramUrl")+":"),c.appendChild(f),z=document.createElement("a"),z.setAttribute("href",l),z.setAttribute("title",l),z.style.whiteSpace="nowrap",z.style.overflow="hidden",
+z.style.textOverflow="ellipsis",z.style.display="block",z.style.margin="2px 0px 2px 8px",z.style.fontSize="10pt",mxUtils.write(z,l),mxEvent.addListener(z,"click",function(C){b.openLink(l);mxEvent.consume(C)}),f=document.createElement("td"),f.appendChild(z),c.appendChild(f),v.appendChild(c));null!=A&&null!=A.fileObject&&null!=A.fileObject.path&&(c=document.createElement("tr"),f=document.createElement("td"),f.style.whiteSpace="nowrap",f.style.overflow="hidden",f.style.textOverflow="ellipsis",f.style.fontSize=
+"10pt",mxUtils.write(f,mxResources.get("pathFilename")+":"),c.appendChild(f),z=document.createElement("input"),z.setAttribute("title",A.fileObject.path),z.setAttribute("value",A.fileObject.path),z.setAttribute("disabled","disabled"),z.style.marginLeft="4px",z.style.width="100%",f=document.createElement("td"),f.appendChild(z),c.appendChild(f),v.appendChild(c));this.init=null!=this.init?this.init:function(){};z=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+J(function(){b.spinner.stop();b.hideDialog()},function(C){b.spinner.stop();b.handleError(C,mxResources.get("error"))})});z.className="geBtn gePrimaryBtn";c=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="20px";f.style.whiteSpace="nowrap";f.setAttribute("align","right");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&f.appendChild(D);f.appendChild(z);b.editor.cancelFirst||f.appendChild(D);c.appendChild(f);
+v.appendChild(c);d.appendChild(v);this.container=d},ConnectionPointsDialog=function(b,l){function n(){null!=v&&v.destroy()}var d=document.createElement("div");d.style.userSelect="none";var v=null;this.init=function(){function A(G,H,g){var p="shape=image;points=[];rotatable=0;resizable=0;connectable=0;editable=0;image="+b.convertDataUri(mxConstraintHandler.prototype.pointImage.src)+";";G=new mxCell("",new mxGeometry(G,H,6,6),p);G.vertex=!0;G.cp=!0;G.constObj=g;return c.addCell(G)}function z(G){G=c.getSelectionCells();
+c.deleteCells(G)}function D(){var G=parseInt(O.value)||0;G=0>G?0:100<G?100:G;O.value=G;var H=parseInt(u.value)||0;H=0>H?0:100<H?100:H;u.value=H;var g=parseInt(q.value)||0,p=parseInt(I.value)||0;g=new mxConnectionConstraint(new mxPoint(G/100,H/100),!1,null,g,p);G=c.getConnectionPoint(m,g);H=c.getSelectionCell();if(null!=H){H.constObj=g;g=H.geometry.clone();p=c.view.scale;var B=c.view.translate;g.x=(G.x-3*p)/p-B.x;g.y=(G.y-3*p)/p-B.y;c.model.setGeometry(H,g)}}function P(G){if(G.constObj)return{x:G.constObj.point.x,
+y:G.constObj.point.y,dx:G.constObj.dx,dy:G.constObj.dy};var H=0,g=0,p=f.geometry,B=mxUtils.format((G.geometry.x+3-p.x)/p.width);G=mxUtils.format((G.geometry.y+3-p.y)/p.height);0>B?(H=B*p.width,B=0):1<B&&(H=(B-1)*p.width,B=1);0>G?(g=G*p.height,G=0):1<G&&(g=(G-1)*p.height,G=1);return{x:B,y:G,dx:parseInt(H),dy:parseInt(g)}}function J(G){if(1==c.getSelectionCount()){var H=c.getSelectionCell();G&&(H.constObj=null);G=P(H);O.value=100*G.x;u.value=100*G.y;q.value=G.dx;I.value=G.dy;Q.style.visibility=""}else Q.style.visibility=
+"hidden"}var L=document.createElement("div");L.style.width="350px";L.style.height="350px";L.style.overflow="hidden";L.style.borderStyle="solid";L.style.borderWidth="1px";L.style.boxSizing="border-box";mxEvent.disableContextMenu(L);d.appendChild(L);var c=new Graph(L);c.transparentBackground=!1;c.autoExtend=!1;c.autoScroll=!1;c.setGridEnabled(!1);c.setEnabled(!0);c.setPanning(!0);c.setConnectable(!1);c.setTooltips(!1);c.minFitScale=null;c.maxFitScale=null;c.centerZoom=!0;c.maxFitScale=2;L=l.geometry;
+var f=new mxCell(l.value,new mxGeometry(0,0,L.width,L.height),l.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;opacity=50;");f.vertex=!0;c.addCell(f);c.dblClick=function(G,H){if(null!=H&&H!=f)c.setSelectionCell(H);else{H=mxUtils.convertPoint(c.container,mxEvent.getClientX(G),mxEvent.getClientY(G));mxEvent.consume(G);G=c.view.scale;var g=c.view.translate;c.setSelectionCell(A((H.x-3*G)/G-g.x,(H.y-3*G)/G-g.y))}};v=new mxKeyHandler(c);v.bindKey(46,z);v.bindKey(8,z);c.getRubberband().isForceRubberbandEvent=
+function(G){return 0==G.evt.button&&(null==G.getCell()||G.getCell()==f)};c.panningHandler.isForcePanningEvent=function(G){return 2==G.evt.button};var k=c.isCellSelectable;c.isCellSelectable=function(G){return G==f?!1:k.apply(this,arguments)};c.getLinkForCell=function(){return null};var m=c.view.getState(f);L=c.getAllConnectionConstraints(m);for(var t=0;null!=L&&t<L.length;t++){var x=c.getConnectionPoint(m,L[t]);A(x.x-3,x.y-3,L[t])}c.fit(8);c.center();t=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
+function(){c.zoomIn()});x=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){c.zoomOut()});var y=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==c.view.scale?(c.maxFitScale=8,c.fit(8)):c.zoomActual();c.center()}),F=function(){b.prompt(mxResources.get("gridSize"),c.gridSize,function(G){!isNaN(G)&&0<G&&(c.setGridSize(G),c.setGridEnabled(!0),c.refresh())})},E=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(G){mxEvent.isShiftDown(G)?
+F():(c.setGridEnabled(!c.isGridEnabled()),c.refresh())});mxEvent.addListener(E,"dblclick",F);var C=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),z);mxUtils.setOpacity(C,10);L=document.createElement("div");L.style.display="flex";L.style.alignItems="center";L.style.paddingTop="6px";L.appendChild(t);L.appendChild(x);L.appendChild(y);L.appendChild(E);L.appendChild(C);d.appendChild(L);var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","1");S.setAttribute("value",
+"1");S.style.width="45px";S.style.position="relative";S.style.margin="0 4px 0 4px";var U=document.createElement("select");U.style.position="relative";x=["left","right","top","bottom"];for(t=0;t<x.length;t++)y=x[t],E=document.createElement("option"),mxUtils.write(E,mxResources.get(y)),E.value=y,U.appendChild(E);t=mxUtils.button(mxResources.get("add"),function(){var G=parseInt(S.value);G=1>G?1:100<G?100:G;S.value=G;for(var H=U.value,g=f.geometry,p=[],B=0;B<G;B++){switch(H){case "left":var K=g.x;var M=
+g.y+(B+1)*g.height/(G+1);break;case "right":K=g.x+g.width;M=g.y+(B+1)*g.height/(G+1);break;case "top":K=g.x+(B+1)*g.width/(G+1);M=g.y;break;case "bottom":K=g.x+(B+1)*g.width/(G+1),M=g.y+g.height}p.push(A(K-3,M-3))}c.setSelectionCells(p)});t.style.marginLeft="auto";L.appendChild(t);L.appendChild(S);L.appendChild(U);var Q=document.createElement("div");Q.style.margin="4px 0px 8px 0px";Q.style.whiteSpace="nowrap";Q.style.height="24px";L=document.createElement("span");mxUtils.write(L,mxResources.get("dx"));
+Q.appendChild(L);var O=document.createElement("input");O.setAttribute("type","number");O.setAttribute("min","0");O.setAttribute("max","100");O.style.width="45px";O.style.margin="0 4px 0 4px";Q.appendChild(O);mxUtils.write(Q,"%");var q=document.createElement("input");q.setAttribute("type","number");q.style.width="45px";q.style.margin="0 4px 0 4px";Q.appendChild(q);mxUtils.write(Q,"pt");L=document.createElement("span");mxUtils.write(L,mxResources.get("dy"));L.style.marginLeft="12px";Q.appendChild(L);
+var u=document.createElement("input");u.setAttribute("type","number");u.setAttribute("min","0");u.setAttribute("max","100");u.style.width="45px";u.style.margin="0 4px 0 4px";Q.appendChild(u);mxUtils.write(Q,"%");var I=document.createElement("input");I.setAttribute("type","number");I.style.width="45px";I.style.margin="0 4px 0 4px";Q.appendChild(I);mxUtils.write(Q,"pt");d.appendChild(Q);J();c.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<c.getSelectionCount()?mxUtils.setOpacity(C,60):
+mxUtils.setOpacity(C,10);J()});c.addListener(mxEvent.CELLS_MOVED,J);mxEvent.addListener(O,"change",D);mxEvent.addListener(u,"change",D);mxEvent.addListener(q,"change",D);mxEvent.addListener(I,"change",D);L=mxUtils.button(mxResources.get("cancel"),function(){n();b.hideDialog()});L.className="geBtn";t=mxUtils.button(mxResources.get("apply"),function(){var G=c.model.cells,H=[],g=[],p;for(p in G){var B=G[p];B.cp&&g.push(P(B))}g.sort(function(K,M){return K.x!=M.x?K.x-M.x:K.y!=M.y?K.y-M.y:K.dx!=M.dx?K.dx-
+M.dx:K.dy-M.dy});for(G=0;G<g.length;G++)0<G&&g[G].x==g[G-1].x&&g[G].y==g[G-1].y&&g[G].dx==g[G-1].dx&&g[G].dy==g[G-1].dy||H.push("["+g[G].x+","+g[G].y+",0,"+g[G].dx+","+g[G].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[l]);n();b.hideDialog()});t.className="geBtn gePrimaryBtn";x=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[l]);n();b.hideDialog()});x.className="geBtn";y=document.createElement("div");y.style.marginTop="10px";y.style.textAlign=
+"right";b.isOffline()||y.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&y.appendChild(L);y.appendChild(x);y.appendChild(t);b.editor.cancelFirst||y.appendChild(L);d.appendChild(y)};this.destroy=n;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);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)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";
Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";
Editor.thinShapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI5Ljc1IDI5Ljc1Wm0tMTMgNS40NXEuNC4wNS43NS4wNUgxOS4wNXY0LjY1cTAgLjI1LjE3NS40MjV0LjQyNS4xNzVIMzkuOXEuMjUgMCAuNDI1LS4xNzV0LjE3NS0uNDI1VjE5LjY1cTAtLjI1LS4xNzUtLjQyNXQtLjQyNS0uMTc1aC00LjY1VjE3LjVxMC0uMzUtLjA1LS43NWg0LjdxMS4xNSAwIDIgLjg3NS44NS44NzUuODUgMi4wMjVWMzkuOXEwIDEuMTUtLjg1IDItLjg1Ljg1LTIgLjg1SDE5LjY1cS0xLjE1IDAtMi4wMjUtLjg1dC0uODc1LTJabTEuNS0zLjk1cS01LjQ1IDAtOS4yMjUtMy44LTMuNzc1LTMuOC0zLjc3NS05LjIgMC01LjQ1IDMuNzc1LTkuMjI1UTEyLjggNS4yNSAxOC4yNSA1LjI1cTUuNCAwIDkuMiAzLjc3NSAzLjggMy43NzUgMy44IDkuMjI1IDAgNS40LTMuOCA5LjItMy44IDMuOC05LjIgMy44Wm0tLjA1LTIuM3E0LjQ1IDAgNy42LTMuMTI1IDMuMTUtMy4xMjUgMy4xNS03LjU3NXQtMy4xMjUtNy42UTIyLjcgNy41IDE4LjI1IDcuNXQtNy42IDMuMTI1UTcuNSAxMy43NSA3LjUgMTguMnQzLjEyNSA3LjZxMy4xMjUgMy4xNSA3LjU3NSAzLjE1Wm0uMDUtMTAuN1oiLz48L3N2Zz4=";
@@ -12714,887 +12713,893 @@ Editor.chevronLeftImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3d
Editor.rightPanelOpenImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDYwLTMyMHYtMzIwTDMwMC00ODBsMTYwIDE2MFpNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoNTYwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2NTYwcTAgMzMtMjMuNSA1Ni41VDc2MC0xMjBIMjAwWm00NDAtODBoMTIwdi01NjBINjQwdjU2MFptLTgwIDB2LTU2MEgyMDB2NTYwaDM2MFptODAgMGgxMjAtMTIwWiIvPjwvc3ZnPg==";
Editor.rightPanelCloseImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzAwLTY0MHYzMjBsMTYwLTE2MC0xNjAtMTYwWk0yMDAtMTIwcS0zMyAwLTU2LjUtMjMuNVQxMjAtMjAwdi01NjBxMC0zMyAyMy41LTU2LjVUMjAwLTg0MGg1NjBxMzMgMCA1Ni41IDIzLjVUODQwLTc2MHY1NjBxMCAzMy0yMy41IDU2LjVUNzYwLTEyMEgyMDBabTQ0MC04MGgxMjB2LTU2MEg2NDB2NTYwWm0tODAgMHYtNTYwSDIwMHY1NjBoMzYwWm04MCAwaDEyMC0xMjBaIi8+PC9zdmc+";
Editor.spinImage="data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==";
+Editor.svgSpinImage="data:image/svg+xml;base64,77u/PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyMDAgMjAwJz4KICAgIDxyYWRpYWxHcmFkaWVudCBpZD0nYTUnIGN4PScuNjYnIGZ4PScuNjYnIGN5PScuMzEyNScgZnk9Jy4zMTI1JyBncmFkaWVudFRyYW5zZm9ybT0nc2NhbGUoMS41KSc+CiAgICAgICAgPHN0b3Agb2Zmc2V0PScwJyBzdG9wLWNvbG9yPScjNjc2NzY3Jz48L3N0b3A+CiAgICAgICAgPHN0b3Agb2Zmc2V0PScuMycgc3RvcC1jb2xvcj0nIzY3Njc2Nycgc3RvcC1vcGFjaXR5PScuOSc+PC9zdG9wPgogICAgICAgIDxzdG9wIG9mZnNldD0nLjYnIHN0b3AtY29sb3I9JyM2NzY3NjcnIHN0b3Atb3BhY2l0eT0nLjYnPjwvc3RvcD4KICAgICAgICA8c3RvcCBvZmZzZXQ9Jy44JyBzdG9wLWNvbG9yPScjNjc2NzY3JyBzdG9wLW9wYWNpdHk9Jy4zJz48L3N0b3A+CiAgICAgICAgPHN0b3Agb2Zmc2V0PScxJyBzdG9wLWNvbG9yPScjNjc2NzY3JyBzdG9wLW9wYWNpdHk9JzAnPjwvc3RvcD4KICAgIDwvcmFkaWFsR3JhZGllbnQ+CiAgICA8Y2lyY2xlIHRyYW5zZm9ybS1vcmlnaW49J2NlbnRlcicgZmlsbD0nbm9uZScgc3Ryb2tlPSd1cmwoI2E1KScgc3Ryb2tlLXdpZHRoPSc1MCcgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJyBzdHJva2UtZGFzaGFycmF5PScyMDAgMTAwMCcgc3Ryb2tlLWRhc2hvZmZzZXQ9JzAnIGN4PScxMDAnIGN5PScxMDAnIHI9JzcwJz4KICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybSB0eXBlPSdyb3RhdGUnIGF0dHJpYnV0ZU5hbWU9J3RyYW5zZm9ybScgY2FsY01vZGU9J3NwbGluZScgZHVyPScyJyB2YWx1ZXM9JzM2MDswJyBrZXlUaW1lcz0nMDsxJyBrZXlTcGxpbmVzPScwIDAgMSAxJyByZXBlYXRDb3VudD0naW5kZWZpbml0ZSc+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+CiAgICA8Y2lyY2xlIHRyYW5zZm9ybS1vcmlnaW49J2NlbnRlcicgZmlsbD0nbm9uZScgb3BhY2l0eT0nLjInIHN0cm9rZT0nIzY3Njc2Nycgc3Ryb2tlLXdpZHRoPSc1MCcgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJyBjeD0nMTAwJyBjeT0nMTAwJyByPSc3MCc+PC9jaXJjbGU+Cjwvc3ZnPg==";
Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=";
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.enableUncompressedLibraries=!1;Editor.enableCustomProperties=!0;
Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||"1"==urlParams.enableSW||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(g){Editor.enableServiceWorker=!1}Editor.enableWebFonts=
-"1"!=urlParams["safe-style-src"]&&!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.pasteAtMousePointer=!0;Editor.defaultTextStyle="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;";
-Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.gptModel=null!=urlParams["gpt-model"]?decodeURIComponent(urlParams["gpt-model"]):"gpt-3.5-turbo";Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):
-"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.createInheritProperty=function(g,p){return{name:p,dispName:g,type:"bool",defVal:!1,isVisible:function(C,I){return 1==C.vertices.length?(I=I.editorUi.editor.graph.model,C=I.getParent(C.vertices[0]),I.isEdge(C)||I.isVertex(C)):!1},getValue:function(C,I){return"inherit"==
-mxUtils.getValue(C.style,p)},valueChanged:function(C,I,M,O){I=O.editorUi.editor.graph;"1"==C?I.setCellStyles(p,"inherit",M.vertices):I.setCellStyles(p,null,M.vertices)}}};Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(g){g.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(g,
-p){return"1"!=mxUtils.getValue(g.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"comic","0")||"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,
-isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",
-dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch",
-"1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(g,
-p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(g,p){return"1"==
-mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",
-type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,
-"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",
-type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},{val:"round",dispName:"Round"}]},{name:"miterlimit",dispName:"Miter Limit",type:"int",min:1,defVal:4,isVisible:function(g,p){g=mxUtils.getValue(g.style,"linejoin","miter");return"miter"==g||"miter-clip"==g}}];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(g){return"orthogonalEdgeStyle"==mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,isVisible:function(g){return"entityRelationEdgeStyle"==mxUtils.getValue(g.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:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",type:"color",defVal:null},{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:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(g){return"1"==mxUtils.getValue(g.style,"flowAnimation",null)}},{name:"flowAnimationTimingFunction",dispName:"Flow Timing",type:"enum",defVal:"linear",enumList:[{val:"linear",dispName:"Linear"},{val:"ease",dispName:"Ease"},{val:"ease-in",dispName:"Ease-in"},
-{val:"ease-out",dispName:"Ease-out"},{val:"ease-in-out",dispName:"Ease-in-out"}],isVisible:function(g){return"1"==mxUtils.getValue(g.style,"flowAnimation",null)}},{name:"flowAnimationDirection",dispName:"Flow Direction",type:"enum",defVal:"normal",enumList:[{val:"normal",dispName:"Normal"},{val:"reverse",dispName:"Reverse"},{val:"alternate",dispName:"Alternate"},{val:"alternate-reverse",dispName:"Alternate-Reverse"}],isVisible:function(g){return"1"==mxUtils.getValue(g.style,"flowAnimation",null)}},
-{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:"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(g,p){p=p.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&p.isTableCell(g.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,
-defVal:1,isVisible:function(g,p){p=p.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&p.isTableCell(g.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(g,p){g=p.editorUi.editor.graph.getCellStyle(1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null);return"1"==mxUtils.getValue(g,"resizeLastRow","0")},isVisible:function(g,p){p=p.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&p.isTable(g.vertices[0])}},
-{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(g,p){g=p.editorUi.editor.graph.getCellStyle(1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null);return"1"==mxUtils.getValue(g,"resizeLast","0")},isVisible:function(g,p){p=p.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&p.isTable(g.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(g,p){return p.editorUi.editor.graph.isCellConnectable(0<
-g.vertices.length&&0==g.edges.length?g.vertices[0]:null)},isVisible:function(g,p){return 0<g.vertices.length&&0==g.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",getDefaultValue:function(g,p){g=0<g.vertices.length&&0==g.edges.length?g.vertices[0]:null;p=p.editorUi.editor.graph;return null!=g&&p.isSwimlane(g)},isVisible:function(g,p){return 0<g.vertices.length&&0==g.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(g,p){g=1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null;p=p.editorUi.editor.graph;return null!=g&&(p.isSwimlane(g)||0<
-p.model.getChildCount(g))},isVisible:function(g,p){return 1==g.vertices.length&&0==g.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(g,p){var C=1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null;p=p.editorUi.editor.graph;return null!=C&&(p.isContainer(C)&&"0"!=g.style.collapsible||!p.isContainer(C)&&"1"==g.style.collapsible)},isVisible:function(g,p){return 1==g.vertices.length&&0==g.edges.length}},{name:"recursiveResize",dispName:"Resize Children",
-type:"bool",defVal:!0,isVisible:function(g,p){return 1==g.vertices.length&&0==g.edges.length&&!p.editorUi.editor.graph.isSwimlane(g.vertices[0])&&null==mxUtils.getValue(g.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(g,p){p=p.editorUi.editor.graph.model;return 0<g.vertices.length?p.isVertex(p.getParent(g.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(g,p){g=0<g.vertices.length?p.editorUi.editor.graph.getCellGeometry(g.vertices[0]):null;return null!=g&&!g.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",
-defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(g,p){return 0<g.vertices.length&&p.editorUi.editor.graph.isAutoSizeCell(g.vertices[0])}},{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(g,p){var C=mxUtils.getValue(g.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||p.editorUi.editor.graph.isSwimlane(g.vertices[0])||
-null==C||C==mxConstants.NONE||0==mxUtils.getValue(g.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(g.style,mxConstants.STYLE_OPACITY,100)||null!=g.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(g,p){return 0<g.vertices.length&&p.editorUi.editor.graph.isContainer(g.vertices[0])}},Editor.createInheritProperty("Inherit Font Family",mxConstants.STYLE_FONTFAMILY),Editor.createInheritProperty("Inherit Font Size",mxConstants.STYLE_FONTSIZE),
-Editor.createInheritProperty("Inherit Font Color",mxConstants.STYLE_FONTCOLOR),Editor.createInheritProperty("Inherit Fill Color",mxConstants.STYLE_FILLCOLOR),Editor.createInheritProperty("Inherit Stroke Color",mxConstants.STYLE_STROKECOLOR)].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## An optional data object can be specified to define the metadata for the connector.\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, width 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,,[email protected],default,#6c8ebf,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.canvasSupported=!1;(function(){try{var g=document.createElement("canvas");Editor.canvasSupported=!(!g.getContext||!g.getContext("2d"))}catch(p){}})();Editor.useCanvasForExport=!1;(function(){try{var g=document.createElement("canvas"),p=new Image;p.onload=function(){try{g.getContext("2d").drawImage(p,0,0);var C=g.toDataURL("image/png");Editor.useCanvasForExport=null!=C&&6<C.length}catch(I){}};p.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(C){}})();
-Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var g=document.createElement("canvas");g.width=g.height=1;var p=g.toDataURL("image/jpeg");Editor.jpgSupported=null!==p.match("image/jpeg");p=g.toDataURL("image/webp");Editor.webpSupported=null!==p.match("image/webp")}catch(C){}})();Editor.loadCompatibleCss=function(g){mxUtils.lightDarkColorSupported||mxUtils.get(g||"styles/grapheditor.css",mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus()){var C=document.createElement("style");
-C.type="text/css";var I=C.appendChild,M=document,O=M.createTextNode;p=p.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(p=p.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(Q){}I.call(C,O.call(M,p));document.head.appendChild(C)}}))};Editor.createRoughCanvas=function(g){var p=
-rough.canvas({getContext:function(){return g}});p.draw=function(C){var I=C.sets||[];C=C.options||this.getDefaultOptions();for(var M=0;M<I.length;M++){var O=I[M];switch(O.type){case "path":null!=C.stroke&&this._drawToContext(g,O,C);break;case "fillPath":this._drawToContext(g,O,C);break;case "fillSketch":this.fillSketch(g,O,C)}}};p.fillSketch=function(C,I,M){var O=g.state.strokeColor,Q=g.state.strokeWidth,U=g.state.strokeAlpha,V=g.state.dashed,X=M.fillWeight;0>X&&(X=M.strokeWidth/2);g.setStrokeAlpha(g.state.fillAlpha);
-g.setStrokeColor(M.fill||"");g.setStrokeWidth(X);g.setDashed(!1);this._drawToContext(C,I,M);g.setDashed(V);g.setStrokeWidth(Q);g.setStrokeColor(O);g.setStrokeAlpha(U)};p._drawToContext=function(C,I,M){C.begin();for(var O=0;O<I.ops.length;O++){var Q=I.ops[O],U=Q.data;switch(Q.op){case "move":C.moveTo(U[0],U[1]);break;case "bcurveTo":C.curveTo(U[0],U[1],U[2],U[3],U[4],U[5]);break;case "lineTo":C.lineTo(U[0],U[1])}}C.end();"fillPath"===I.type&&M.filled?C.fill():C.stroke()};return p};(function(){function g(O,
-Q,U){this.canvas=O;this.rc=Q;this.shape=U;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,g.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,g.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,g.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,g.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;
+!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.pasteAtMousePointer=!0;Editor.defaultTextStyle="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;";
+Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.geminiApiKey=null!=urlParams["gemini-api-key"]?decodeURIComponent(urlParams["gemini-api-key"]):null;Editor.gptModels={"GPT-5.1":"gpt-5.1-2025-11-13","GPT-4.1":"gpt-4.1-2025-04-14",
+"GPT-4o":"chatgpt-4o-latest","GPT-3.5":"gpt-3.5-turbo-0125","Gemini 3 Pro Preview":"gemini-3-pro-preview","Gemini 2.5 Pro":"gemini-2.5-pro","Gemini 2.5 Flash":"gemini-2.5-flash","Gemini 2.0 Flash":"gemini-2.0-flash"};Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=
+null;Editor.createInheritProperty=function(g,p){return{name:p,dispName:g,type:"bool",defVal:!1,isVisible:function(B,K){return 1==B.vertices.length?(K=K.editorUi.editor.graph.model,B=K.getParent(B.vertices[0]),K.isEdge(B)||K.isVertex(B)):!1},getValue:function(B,K){return"inherit"==mxUtils.getValue(B.style,p)},valueChanged:function(B,K,M,N){K=N.editorUi.editor.graph;"1"==B?K.setCellStyles(p,"inherit",M.vertices):K.setCellStyles(p,null,M.vertices)}}};Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",
+type:"bool",defVal:!1,onChange:function(g){g.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(g,p){return"1"!=mxUtils.getValue(g.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"comic","0")||"1"==mxUtils.getValue(g.style,
+"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(g,p){return"1"==
+mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",
+type:"bool",defVal:!1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},
+{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],
+isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*
+mxConstants.SHADOW_OPACITY},isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,
+dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,
+mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},{val:"round",dispName:"Round"}]},{name:"miterlimit",dispName:"Miter Limit",type:"int",min:1,defVal:4,
+isVisible:function(g,p){g=mxUtils.getValue(g.style,"linejoin","miter");return"miter"==g||"miter-clip"==g}}];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(g){return"orthogonalEdgeStyle"==mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,isVisible:function(g){return"entityRelationEdgeStyle"==
+mxUtils.getValue(g.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:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",type:"color",defVal:null},{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:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(g){return"1"==mxUtils.getValue(g.style,"flowAnimation",null)}},{name:"flowAnimationTimingFunction",
+dispName:"Flow Timing",type:"enum",defVal:"linear",enumList:[{val:"linear",dispName:"Linear"},{val:"ease",dispName:"Ease"},{val:"ease-in",dispName:"Ease-in"},{val:"ease-out",dispName:"Ease-out"},{val:"ease-in-out",dispName:"Ease-in-out"}],isVisible:function(g){return"1"==mxUtils.getValue(g.style,"flowAnimation",null)}},{name:"flowAnimationDirection",dispName:"Flow Direction",type:"enum",defVal:"normal",enumList:[{val:"normal",dispName:"Normal"},{val:"reverse",dispName:"Reverse"},{val:"alternate",
+dispName:"Alternate"},{val:"alternate-reverse",dispName:"Alternate-Reverse"}],isVisible:function(g){return"1"==mxUtils.getValue(g.style,"flowAnimation",null)}},{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:"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(g,p){p=p.editorUi.editor.graph;
+return 1==g.vertices.length&&0==g.edges.length&&p.isTableCell(g.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(g,p){p=p.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&p.isTableCell(g.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(g,p){g=p.editorUi.editor.graph.getCellStyle(1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null);return"1"==mxUtils.getValue(g,
+"resizeLastRow","0")},isVisible:function(g,p){p=p.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&p.isTable(g.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(g,p){g=p.editorUi.editor.graph.getCellStyle(1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null);return"1"==mxUtils.getValue(g,"resizeLast","0")},isVisible:function(g,p){p=p.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&p.isTable(g.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(g,p){return p.editorUi.editor.graph.isCellConnectable(0<g.vertices.length&&0==g.edges.length?g.vertices[0]:null)},isVisible:function(g,p){return 0<g.vertices.length&&0==g.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",getDefaultValue:function(g,p){g=0<g.vertices.length&&0==g.edges.length?g.vertices[0]:null;p=p.editorUi.editor.graph;return null!=g&&p.isSwimlane(g)},isVisible:function(g,p){return 0<g.vertices.length&&0==g.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(g,
+p){g=1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null;p=p.editorUi.editor.graph;return null!=g&&(p.isSwimlane(g)||0<p.model.getChildCount(g))},isVisible:function(g,p){return 1==g.vertices.length&&0==g.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(g,p){var B=1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null;p=p.editorUi.editor.graph;return null!=B&&(p.isContainer(B)&&"0"!=g.style.collapsible||!p.isContainer(B)&&"1"==g.style.collapsible)},
+isVisible:function(g,p){return 1==g.vertices.length&&0==g.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(g,p){return 1==g.vertices.length&&0==g.edges.length&&!p.editorUi.editor.graph.isSwimlane(g.vertices[0])&&null==mxUtils.getValue(g.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(g,p){p=p.editorUi.editor.graph.model;return 0<g.vertices.length?
+p.isVertex(p.getParent(g.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(g,p){g=0<g.vertices.length?p.editorUi.editor.graph.getCellGeometry(g.vertices[0]):null;return null!=g&&!g.relative}},
+{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(g,p){return 0<g.vertices.length&&p.editorUi.editor.graph.isAutoSizeCell(g.vertices[0])}},{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(g,
+p){var B=mxUtils.getValue(g.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||p.editorUi.editor.graph.isSwimlane(g.vertices[0])||null==B||B==mxConstants.NONE||0==mxUtils.getValue(g.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(g.style,mxConstants.STYLE_OPACITY,100)||null!=g.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(g,p){return 0<g.vertices.length&&p.editorUi.editor.graph.isContainer(g.vertices[0])}},
+Editor.createInheritProperty("Inherit Font Family",mxConstants.STYLE_FONTFAMILY),Editor.createInheritProperty("Inherit Font Size",mxConstants.STYLE_FONTSIZE),Editor.createInheritProperty("Inherit Font Color",mxConstants.STYLE_FONTCOLOR),Editor.createInheritProperty("Inherit Fill Color",mxConstants.STYLE_FILLCOLOR),Editor.createInheritProperty("Inherit Stroke Color",mxConstants.STYLE_STROKECOLOR)].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## An optional data object can be specified to define the metadata for the connector.\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, width 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,,[email protected],default,#6c8ebf,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.canvasSupported=!1;(function(){try{var g=document.createElement("canvas");Editor.canvasSupported=!(!g.getContext||!g.getContext("2d"))}catch(p){}})();Editor.useCanvasForExport=!1;(function(){try{var g=document.createElement("canvas"),p=new Image;p.onload=function(){try{g.getContext("2d").drawImage(p,0,0);var B=g.toDataURL("image/png");Editor.useCanvasForExport=null!=B&&6<B.length}catch(K){}};p.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(B){}})();
+Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var g=document.createElement("canvas");g.width=g.height=1;var p=g.toDataURL("image/jpeg");Editor.jpgSupported=null!==p.match("image/jpeg");p=g.toDataURL("image/webp");Editor.webpSupported=null!==p.match("image/webp")}catch(B){}})();Editor.loadCompatibleCss=function(g){mxUtils.lightDarkColorSupported||mxUtils.get(g||"styles/grapheditor.css",mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus()){var B=document.createElement("style");
+B.type="text/css";var K=B.appendChild,M=document,N=M.createTextNode;p=p.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(p=p.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(R){}K.call(B,N.call(M,p));document.head.appendChild(B)}}))};Editor.createRoughCanvas=function(g){var p=
+rough.canvas({getContext:function(){return g}});p.draw=function(B){var K=B.sets||[];B=B.options||this.getDefaultOptions();for(var M=0;M<K.length;M++){var N=K[M];switch(N.type){case "path":null!=B.stroke&&this._drawToContext(g,N,B);break;case "fillPath":this._drawToContext(g,N,B);break;case "fillSketch":this.fillSketch(g,N,B)}}};p.fillSketch=function(B,K,M){var N=g.state.strokeColor,R=g.state.strokeWidth,T=g.state.strokeAlpha,V=g.state.dashed,X=M.fillWeight;0>X&&(X=M.strokeWidth/2);g.setStrokeAlpha(g.state.fillAlpha);
+g.setStrokeColor(M.fill||"");g.setStrokeWidth(X);g.setDashed(!1);this._drawToContext(B,K,M);g.setDashed(V);g.setStrokeWidth(R);g.setStrokeColor(N);g.setStrokeAlpha(T)};p._drawToContext=function(B,K,M){B.begin();for(var N=0;N<K.ops.length;N++){var R=K.ops[N],T=R.data;switch(R.op){case "move":B.moveTo(T[0],T[1]);break;case "bcurveTo":B.curveTo(T[0],T[1],T[2],T[3],T[4],T[5]);break;case "lineTo":B.lineTo(T[0],T[1])}}B.end();"fillPath"===K.type&&M.filled?B.fill():B.stroke()};return p};(function(){function g(N,
+R,T){this.canvas=N;this.rc=R;this.shape=T;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,g.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,g.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,g.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,g.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;
this.canvas.ellipse=mxUtils.bind(this,g.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,g.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,g.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,g.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,g.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=
mxUtils.bind(this,g.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,g.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,g.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,g.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,g.prototype.fillAndStroke);this.path=[];this.passThrough=!1}g.prototype.moveOp="M";g.prototype.lineOp=
-"L";g.prototype.quadOp="Q";g.prototype.curveOp="C";g.prototype.closeOp="Z";g.prototype.getStyle=function(O,Q){var U=1;if(null!=this.shape.state){var V=this.shape.state.cell.id;if(null!=V)for(var X=0;X<V.length;X++)U=(U<<5)-U+V.charCodeAt(X)<<0}U={strokeWidth:this.canvas.state.strokeWidth,seed:U,preserveVertices:!0};V=this.rc.getDefaultOptions();U.stroke=O?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;O=null;(U.filled=Q)?(U.fill=this.canvas.state.fillColor===
-mxConstants.NONE?"":this.canvas.state.fillColor,O=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):U.fill="";U.bowing=mxUtils.getValue(this.shape.style,"bowing",V.bowing);U.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",V.hachureAngle);U.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",V.curveFitting);U.roughness=mxUtils.getValue(this.shape.style,"jiggle",V.roughness);U.simplification=mxUtils.getValue(this.shape.style,"simplification",
-V.simplification);U.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",V.disableMultiStroke);U.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",V.disableMultiStrokeFill);Q=mxUtils.getValue(this.shape.style,"hachureGap",-1);U.hachureGap="auto"==Q?-1:Q;U.dashGap=mxUtils.getValue(this.shape.style,"dashGap",Q);U.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",Q);U.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",Q);Q=mxUtils.getValue(this.shape.style,
-"fillWeight",-1);U.fillWeight="auto"==Q?-1:Q;Q=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==Q&&(Q="auto");"auto"==Q&&(Q=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&Q.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&Q.push(mxUtils.hex2rgb(Editor.darkColor)),Q=null!=U.fill&&(null!=O||0<=mxUtils.indexOf(Q,mxUtils.hex2rgb(U.fill)))?"solid":V.fillStyle);U.fillStyle=Q;return U};g.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
-arguments):this.path=[]};g.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};g.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var O=2;O<arguments.length;O+=2)this.lastX=arguments[O-1],this.lastY=arguments[O],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};g.prototype.lineTo=function(O,Q){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
-O,Q),this.lastX=O,this.lastY=Q)};g.prototype.moveTo=function(O,Q){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,O,Q),this.lastX=O,this.lastY=Q,this.firstX=O,this.firstY=Q)};g.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};g.prototype.quadTo=function(O,Q,U,V){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,O,Q,U,V),this.lastX=U,this.lastY=V)};
-g.prototype.curveTo=function(O,Q,U,V,X,W){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,O,Q,U,V,X,W),this.lastX=X,this.lastY=W)};g.prototype.arcTo=function(O,Q,U,V,X,W,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Z=mxUtils.arcToCurves(this.lastX,this.lastY,O,Q,U,V,X,W,Y);if(null!=Z)for(var aa=0;aa<Z.length;aa+=6)this.curveTo(Z[aa],Z[aa+1],Z[aa+2],Z[aa+3],Z[aa+4],Z[aa+5]);this.lastX=W;this.lastY=Y}};g.prototype.rect=function(O,
-Q,U,V){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(O,Q,U,V,this.getStyle(!0,!0)))};g.prototype.ellipse=function(O,Q,U,V){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(O+U/2,Q+V/2,U,V,this.getStyle(!0,!0)))};g.prototype.roundrect=function(O,Q,U,V,X,W){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(O+
-X,Q),this.lineTo(O+U-X,Q),this.quadTo(O+U,Q,O+U,Q+W),this.lineTo(O+U,Q+V-W),this.quadTo(O+U,Q+V,O+U-X,Q+V),this.lineTo(O+X,Q+V),this.quadTo(O,Q+V,O,Q+V-W),this.lineTo(O,Q+W),this.quadTo(O,Q,O+X,Q))};g.prototype.drawPath=function(O){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),O)}catch(U){}this.passThrough=!1}else if(null!=this.nextShape){for(var Q in O)this.nextShape.options[Q]=O[Q];O.stroke!=mxConstants.NONE&&null!=O.stroke||delete this.nextShape.options.stroke;
-O.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};g.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};g.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};g.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
+"L";g.prototype.quadOp="Q";g.prototype.curveOp="C";g.prototype.closeOp="Z";g.prototype.getStyle=function(N,R){var T=1;if(null!=this.shape.state){var V=this.shape.state.cell.id;if(null!=V)for(var X=0;X<V.length;X++)T=(T<<5)-T+V.charCodeAt(X)<<0}T={strokeWidth:this.canvas.state.strokeWidth,seed:T,preserveVertices:!0};V=this.rc.getDefaultOptions();T.stroke=N?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;N=null;(T.filled=R)?(T.fill=this.canvas.state.fillColor===
+mxConstants.NONE?"":this.canvas.state.fillColor,N=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):T.fill="";T.bowing=mxUtils.getValue(this.shape.style,"bowing",V.bowing);T.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",V.hachureAngle);T.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",V.curveFitting);T.roughness=mxUtils.getValue(this.shape.style,"jiggle",V.roughness);T.simplification=mxUtils.getValue(this.shape.style,"simplification",
+V.simplification);T.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",V.disableMultiStroke);T.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",V.disableMultiStrokeFill);R=mxUtils.getValue(this.shape.style,"hachureGap",-1);T.hachureGap="auto"==R?-1:R;T.dashGap=mxUtils.getValue(this.shape.style,"dashGap",R);T.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",R);T.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",R);R=mxUtils.getValue(this.shape.style,
+"fillWeight",-1);T.fillWeight="auto"==R?-1:R;R=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==R&&(R="auto");"auto"==R&&(R=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&R.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&R.push(mxUtils.hex2rgb(Editor.darkColor)),R=null!=T.fill&&(null!=N||0<=mxUtils.indexOf(R,mxUtils.hex2rgb(T.fill)))?"solid":V.fillStyle);T.fillStyle=R;return T};g.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
+arguments):this.path=[]};g.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};g.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var N=2;N<arguments.length;N+=2)this.lastX=arguments[N-1],this.lastY=arguments[N],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};g.prototype.lineTo=function(N,R){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
+N,R),this.lastX=N,this.lastY=R)};g.prototype.moveTo=function(N,R){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,N,R),this.lastX=N,this.lastY=R,this.firstX=N,this.firstY=R)};g.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};g.prototype.quadTo=function(N,R,T,V){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,N,R,T,V),this.lastX=T,this.lastY=V)};
+g.prototype.curveTo=function(N,R,T,V,X,W){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,N,R,T,V,X,W),this.lastX=X,this.lastY=W)};g.prototype.arcTo=function(N,R,T,V,X,W,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Z=mxUtils.arcToCurves(this.lastX,this.lastY,N,R,T,V,X,W,Y);if(null!=Z)for(var aa=0;aa<Z.length;aa+=6)this.curveTo(Z[aa],Z[aa+1],Z[aa+2],Z[aa+3],Z[aa+4],Z[aa+5]);this.lastX=W;this.lastY=Y}};g.prototype.rect=function(N,
+R,T,V){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(N,R,T,V,this.getStyle(!0,!0)))};g.prototype.ellipse=function(N,R,T,V){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(N+T/2,R+V/2,T,V,this.getStyle(!0,!0)))};g.prototype.roundrect=function(N,R,T,V,X,W){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(N+
+X,R),this.lineTo(N+T-X,R),this.quadTo(N+T,R,N+T,R+W),this.lineTo(N+T,R+V-W),this.quadTo(N+T,R+V,N+T-X,R+V),this.lineTo(N+X,R+V),this.quadTo(N,R+V,N,R+V-W),this.lineTo(N,R+W),this.quadTo(N,R,N+X,R))};g.prototype.drawPath=function(N){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),N)}catch(T){}this.passThrough=!1}else if(null!=this.nextShape){for(var R in N)this.nextShape.options[R]=N[R];N.stroke!=mxConstants.NONE&&null!=N.stroke||delete this.nextShape.options.stroke;
+N.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};g.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};g.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};g.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
!0))};g.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(O){return new g(O,Editor.createRoughCanvas(O),this)};var p=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(O){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?p.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(O):
-this.createRoughCanvas(O)};var C=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(O,Q,U,V,X){null!=O.handJiggle&&O.handJiggle.passThrough||C.apply(this,arguments)};var I=mxShape.prototype.paint;mxShape.prototype.paint=function(O){var Q=O.addTolerance,U=!0;null!=this.style&&(U="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=O.handJiggle&&O.handJiggle.constructor==g&&!this.outline){O.save();var V=this.fill,X=this.stroke;this.stroke=
-this.fill=null;var W=this.configurePointerEvents,Y=O.setStrokeColor;O.setStrokeColor=function(){};var Z=O.setFillColor;O.setFillColor=function(){};U||null==V||(this.configurePointerEvents=function(){});O.handJiggle.passThrough=!0;I.apply(this,arguments);O.handJiggle.passThrough=!1;O.setFillColor=Z;O.setStrokeColor=Y;this.configurePointerEvents=W;this.stroke=X;this.fill=V;O.restore();U&&null!=V&&(O.addTolerance=function(){})}I.apply(this,arguments);O.addTolerance=Q};var M=mxShape.prototype.paintGlassEffect;
-mxShape.prototype.paintGlassEffect=function(O,Q,U,V,X,W){null!=O.handJiggle&&O.handJiggle.constructor==g?(O.handJiggle.passThrough=!0,M.apply(this,arguments),O.handJiggle.passThrough=!1):M.apply(this,arguments)}})();Editor.fastCompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:Graph.arrayBufferToString(pako.deflateRaw(g))};Editor.fastDecompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:pako.inflateRaw(Graph.stringToArrayBuffer(atob(g)),{to:"string"})};
-Editor.extractGraphModel=function(g,p,C){if(null!=g&&"undefined"!==typeof pako){var I=g.ownerDocument.getElementsByTagName("div"),M=[];if(null!=I&&0<I.length)for(var O=0;O<I.length;O++)if("mxgraph"==I[O].getAttribute("class")){M.push(I[O]);break}0<M.length&&(I=M[0].getAttribute("data-mxgraph"),null!=I?(M=JSON.parse(I),null!=M&&null!=M.xml&&(g=mxUtils.parseXml(M.xml),g=g.documentElement)):(M=M[0].getElementsByTagName("div"),0<M.length&&(I=mxUtils.getTextContent(M[0]),I=Graph.decompress(I,null,C),0<
-I.length&&(g=mxUtils.parseXml(I),g=g.documentElement))))}if(null!=g&&"svg"==g.nodeName)if(I=g.getAttribute("content"),null!=I&&"<"!=I.charAt(0)&&"%"!=I.charAt(0)&&(I=unescape(window.atob?atob(I):Base64.decode(cont,I))),null!=I&&"%"==I.charAt(0)&&(I=decodeURIComponent(I)),null!=I&&0<I.length)g=mxUtils.parseXml(I).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==g||p||(M=null,"diagram"==g.nodeName?M=g:"mxfile"==g.nodeName&&(I=g.getElementsByTagName("diagram"),0<I.length&&
-(M=I[Math.max(0,Math.min(I.length-1,urlParams.page||0))])),null!=M&&(g=Editor.parseDiagramNode(M,C)));null==g||"mxGraphModel"==g.nodeName||p&&"mxfile"==g.nodeName||(g=null);return g};Editor.parseDiagramNode=function(g,p,C){Editor.validateDiagramNode(g);var I=mxUtils.trim(mxUtils.getTextContent(g)),M=null;0<I.length?(p=Graph.decompress(I,null,p),null!=p&&0<p.length&&(M=mxUtils.parseXml(p).documentElement)):(g=mxUtils.getChildNodes(g),0<g.length&&(M=g[0],C&&(M=Editor.parseDiagramNode(M,p,!1)),p=mxUtils.createXmlDocument(),
-p.appendChild(p.importNode(M,!0)),M=p.documentElement));return M};Editor.getDiagramNodeXml=function(g){Editor.validateDiagramNode(g);var p=mxUtils.getNodeValue(g),C=null;0<p.length?C=Graph.decompress(p):(g=g.getElementsByTagName("mxGraphModel"),null!=g&&0<g.length&&(C=mxUtils.getXml(g[0])));return C};Editor.validateDiagramNode=function(g){if(0==mxUtils.trim(mxUtils.getTextContent(g)).length&&0==mxUtils.getChildNodes(g).length){var p=new mxCodec,C=new mxGraphModel;g.appendChild(p.encode(C))}return g};
-Editor.extractGraphModelFromPdf=function(g){var p=null;g=g.substring(g.indexOf(",")+1);g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0);if("%PDF-1.7"==g.substring(0,8)){var C=g.indexOf("EmbeddedFile");if(-1<C){var I=g.indexOf("stream",C)+9;if(0<g.substring(C,I).indexOf("application#2Fvnd.jgraph.mxfile")){var M=g.indexOf("endstream",I-1);return pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(I,M)),{to:"string"})}}for(C=g.indexOf("/ObjStm");0<C;){I=g.indexOf("stream",C)+9;M=g.indexOf("endstream",
-I-1);I=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(I,M)),{to:"string"});M=I.indexOf("/Subject <");if(0<M){C=I.substring(M+14,I.indexOf(">",M));if(null!=C){p=C;C=[];for(I=0;I<p.length;I+=2)M=p.substr(I,2),"00"!=M&&C.push(String.fromCharCode(parseInt(M,16)));p=C.join("")}break}C=g.indexOf("/ObjStm",C+1)}}if(null==p&&"%PDF-1.4"==g.substring(0,8)){C="";M=I=0;for(var O=[],Q=null;M<g.length;){var U=g.charCodeAt(M);M+=1;10!=U&&(C+=String.fromCharCode(U));U=="/Subject (%3Cmxfile".charCodeAt(I)?
-I++:I=0;if(19==I){var V=g.indexOf("%3C%2Fmxfile%3E",M)+15;M-=9;if(V>M){p=g.substring(M,V);break}}10==U&&("endobj"==C?Q=null:"obj"==C.substring(C.length-3,C.length)||"xref"==C||"trailer"==C?(Q=[],O[C.split(" ")[0]]=Q):null!=Q&&Q.push(C),C="")}}null==p&&null!=O&&(p=Editor.extractGraphModelFromXref(O));null!=p&&(p=decodeURIComponent(p.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return p};Editor.extractGraphModelFromXref=function(g){var p=g.trailer,C=null;null!=p&&(p=/.* \/Info (\d+) (\d+) R/g.exec(p.join("\n")),
-null!=p&&0<p.length&&(p=g[p[1]],null!=p&&(p=/.* \/Subject (\d+) (\d+) R/g.exec(p.join("\n")),null!=p&&0<p.length&&(g=g[p[1]],null!=g&&(g=g.join("\n"),C=g.substring(1,g.length-1))))));return C};Editor.extractParserError=function(g,p){var C=null;g=null!=g?g.getElementsByTagName("parsererror"):null;null!=g&&0<g.length&&(C=p||mxResources.get("invalidChars"),p=g[0].getElementsByTagName("div"),0<p.length&&(C=mxUtils.getTextContent(p[0])));return null!=C?mxUtils.trim(C):C};Editor.addRetryToError=function(g,
-p){null!=g&&(g=null!=g.error?g.error:g,null==g.retry&&(g.retry=p))};Editor.mermaidToDrawio=function(g,p,C){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(g,p,C)};Editor.configure=function(g){if(null!=g){Editor.config=g;Editor.configVersion=g.version;g.debug&&(urlParams.test="1");if(null!=g.customCss){var p=document.createElement("style");p.type="text/css";p.appendChild(document.createTextNode(g.customCss));document.head.appendChild(p)}null!=g.defaultFonts&&(Menus.prototype.defaultFonts=
+this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(N){return new g(N,Editor.createRoughCanvas(N),this)};var p=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(N){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?p.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(N):
+this.createRoughCanvas(N)};var B=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(N,R,T,V,X){null!=N.handJiggle&&N.handJiggle.passThrough||B.apply(this,arguments)};var K=mxShape.prototype.paint;mxShape.prototype.paint=function(N){var R=N.addTolerance,T=!0;null!=this.style&&(T="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=N.handJiggle&&N.handJiggle.constructor==g&&!this.outline){N.save();var V=this.fill,X=this.stroke;this.stroke=
+this.fill=null;var W=this.configurePointerEvents,Y=N.setStrokeColor;N.setStrokeColor=function(){};var Z=N.setFillColor;N.setFillColor=function(){};T||null==V||(this.configurePointerEvents=function(){});N.handJiggle.passThrough=!0;K.apply(this,arguments);N.handJiggle.passThrough=!1;N.setFillColor=Z;N.setStrokeColor=Y;this.configurePointerEvents=W;this.stroke=X;this.fill=V;N.restore();T&&null!=V&&(N.addTolerance=function(){})}K.apply(this,arguments);N.addTolerance=R};var M=mxShape.prototype.paintGlassEffect;
+mxShape.prototype.paintGlassEffect=function(N,R,T,V,X,W){null!=N.handJiggle&&N.handJiggle.constructor==g?(N.handJiggle.passThrough=!0,M.apply(this,arguments),N.handJiggle.passThrough=!1):M.apply(this,arguments)}})();Editor.fastCompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:Graph.arrayBufferToString(pako.deflateRaw(g))};Editor.fastDecompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:pako.inflateRaw(Graph.stringToArrayBuffer(atob(g)),{to:"string"})};
+Editor.extractGraphModel=function(g,p,B){if(null!=g&&"undefined"!==typeof pako){var K=g.ownerDocument.getElementsByTagName("div"),M=[];if(null!=K&&0<K.length)for(var N=0;N<K.length;N++)if("mxgraph"==K[N].getAttribute("class")){M.push(K[N]);break}0<M.length&&(K=M[0].getAttribute("data-mxgraph"),null!=K?(M=JSON.parse(K),null!=M&&null!=M.xml&&(g=mxUtils.parseXml(M.xml),g=g.documentElement)):(M=M[0].getElementsByTagName("div"),0<M.length&&(K=mxUtils.getTextContent(M[0]),K=Graph.decompress(K,null,B),0<
+K.length&&(g=mxUtils.parseXml(K),g=g.documentElement))))}if(null!=g&&"svg"==g.nodeName)if(K=g.getAttribute("content"),null!=K&&"<"!=K.charAt(0)&&"%"!=K.charAt(0)&&(K=unescape(window.atob?atob(K):Base64.decode(cont,K))),null!=K&&"%"==K.charAt(0)&&(K=decodeURIComponent(K)),null!=K&&0<K.length)g=mxUtils.parseXml(K).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==g||p||(M=null,"diagram"==g.nodeName?M=g:"mxfile"==g.nodeName&&(K=g.getElementsByTagName("diagram"),0<K.length&&
+(M=K[Math.max(0,Math.min(K.length-1,urlParams.page||0))])),null!=M&&(g=Editor.parseDiagramNode(M,B)));null==g||"mxGraphModel"==g.nodeName||p&&"mxfile"==g.nodeName||(g=null);return g};Editor.parseDiagramNode=function(g,p,B){Editor.validateDiagramNode(g);var K=mxUtils.trim(mxUtils.getTextContent(g)),M=null;0<K.length?(p=Graph.decompress(K,null,p),null!=p&&0<p.length&&(M=mxUtils.parseXml(p).documentElement)):(g=mxUtils.getChildNodes(g),0<g.length&&(M=g[0],B&&(M=Editor.parseDiagramNode(M,p,!1)),p=mxUtils.createXmlDocument(),
+p.appendChild(p.importNode(M,!0)),M=p.documentElement));return M};Editor.getDiagramNodeXml=function(g){Editor.validateDiagramNode(g);var p=mxUtils.getNodeValue(g),B=null;0<p.length?B=Graph.decompress(p):(g=g.getElementsByTagName("mxGraphModel"),null!=g&&0<g.length&&(B=mxUtils.getXml(g[0])));return B};Editor.validateDiagramNode=function(g){if(0==mxUtils.trim(mxUtils.getTextContent(g)).length&&0==mxUtils.getChildNodes(g).length){var p=new mxCodec,B=new mxGraphModel;g.appendChild(p.encode(B))}return g};
+Editor.extractGraphModelFromPdf=function(g){var p=null;g=g.substring(g.indexOf(",")+1);g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0);if("%PDF-1.7"==g.substring(0,8)){var B=g.indexOf("EmbeddedFile");if(-1<B){var K=g.indexOf("stream",B)+9;if(0<g.substring(B,K).indexOf("application#2Fvnd.jgraph.mxfile")){var M=g.indexOf("endstream",K-1);return pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(K,M)),{to:"string"})}}for(B=g.indexOf("/ObjStm");0<B;){K=g.indexOf("stream",B)+9;M=g.indexOf("endstream",
+K-1);K=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(K,M)),{to:"string"});M=K.indexOf("/Subject <");if(0<M){B=K.substring(M+14,K.indexOf(">",M));if(null!=B){p=B;B=[];for(K=0;K<p.length;K+=2)M=p.substr(K,2),"00"!=M&&B.push(String.fromCharCode(parseInt(M,16)));p=B.join("")}break}B=g.indexOf("/ObjStm",B+1)}}if(null==p&&"%PDF-1.4"==g.substring(0,8)){B="";M=K=0;for(var N=[],R=null;M<g.length;){var T=g.charCodeAt(M);M+=1;10!=T&&(B+=String.fromCharCode(T));T=="/Subject (%3Cmxfile".charCodeAt(K)?
+K++:K=0;if(19==K){var V=g.indexOf("%3C%2Fmxfile%3E",M)+15;M-=9;if(V>M){p=g.substring(M,V);break}}10==T&&("endobj"==B?R=null:"obj"==B.substring(B.length-3,B.length)||"xref"==B||"trailer"==B?(R=[],N[B.split(" ")[0]]=R):null!=R&&R.push(B),B="")}}null==p&&null!=N&&(p=Editor.extractGraphModelFromXref(N));null!=p&&(p=decodeURIComponent(p.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return p};Editor.extractGraphModelFromXref=function(g){var p=g.trailer,B=null;null!=p&&(p=/.* \/Info (\d+) (\d+) R/g.exec(p.join("\n")),
+null!=p&&0<p.length&&(p=g[p[1]],null!=p&&(p=/.* \/Subject (\d+) (\d+) R/g.exec(p.join("\n")),null!=p&&0<p.length&&(g=g[p[1]],null!=g&&(g=g.join("\n"),B=g.substring(1,g.length-1))))));return B};Editor.extractParserError=function(g,p){var B=null;g=null!=g?g.getElementsByTagName("parsererror"):null;null!=g&&0<g.length&&(B=p||mxResources.get("invalidChars"),p=g[0].getElementsByTagName("div"),0<p.length&&(B=mxUtils.getTextContent(p[0])));return null!=B?mxUtils.trim(B):B};Editor.addRetryToError=function(g,
+p){null!=g&&(g=null!=g.error?g.error:g,null==g.retry&&(g.retry=p))};Editor.mermaidToDrawio=function(g,p,B){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(g,p,B)};Editor.configure=function(g){if(null!=g){Editor.config=g;Editor.configVersion=g.version;g.debug&&(urlParams.test="1");if(null!=g.customCss){var p=document.createElement("style");p.type="text/css";p.appendChild(document.createTextNode(g.customCss));document.head.appendChild(p)}null!=g.defaultFonts&&(Menus.prototype.defaultFonts=
g.defaultFonts);null!=g.presetColors&&(ColorDialog.prototype.presetColors=g.presetColors);null!=g.defaultColors&&(ColorDialog.prototype.defaultColors=g.defaultColors);null!=g.colorNames&&(ColorDialog.prototype.colorNames=g.colorNames);null!=g.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=g.defaultColorSchemes);null!=g.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=g.defaultEdgeLength);null!=g.selectParentLayer&&(Graph.selectParentLayer=g.selectParentLayer);null!=g.autosaveDelay&&
(DrawioFile.prototype.autosaveDelay=g.autosaveDelay);null!=g.templateFile&&(EditorUi.templateFile=g.templateFile);null!=g.styles&&(Array.isArray(g.styles)?Editor.styles=g.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=g.globalVars&&(Editor.globalVars=g.globalVars);null!=g.compressXml&&(Editor.defaultCompressed=g.compressXml,Editor.compressXml=g.compressXml);null!=g.includeDiagram&&(Editor.defaultIncludeDiagram=g.includeDiagram);null!=g.simpleLabels&&(Editor.simpleLabels=
g.simpleLabels);null!=g.pasteAtMousePointer&&(Editor.pasteAtMousePointer=g.pasteAtMousePointer);null!=g.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=g.oneDriveInlinePicker);null!=g.defaultAdaptiveColors?Graph.defaultAdaptiveColors=g.defaultAdaptiveColors:0==g.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=g.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=g.enableLightDarkColors);null!=g.darkColor&&(Editor.darkColor=g.darkColor);null!=g.darkColorVar&&(Editor.darkColorVar=
g.darkColorVar);Graph.prototype.defaultPageBackgroundColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=g.settingsName&&(Editor.configurationKey="."+g.settingsName+"-configuration",Editor.settingsKey="."+g.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=g.customFonts&&(Menus.prototype.defaultFonts=g.customFonts.concat(Menus.prototype.defaultFonts));null!=g.customPresetColors&&
-(ColorDialog.prototype.presetColors=g.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=g.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=g.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=g.css){p=document.createElement("style");p.setAttribute("type","text/css");p.appendChild(document.createTextNode(g.css));var C=document.getElementsByTagName("script")[0];C.parentNode.insertBefore(p,C)}null!=g.expandLibraries&&(Sidebar.prototype.expandLibraries=
+(ColorDialog.prototype.presetColors=g.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=g.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=g.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=g.css){p=document.createElement("style");p.setAttribute("type","text/css");p.appendChild(document.createTextNode(g.css));var B=document.getElementsByTagName("script")[0];B.parentNode.insertBefore(p,B)}null!=g.expandLibraries&&(Sidebar.prototype.expandLibraries=
g.expandLibraries);null!=g.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=g.appendCustomLibraries);null!=g.libraries&&(Sidebar.prototype.customEntries=g.libraries);null!=g.enabledLibraries&&(Array.isArray(g.enabledLibraries)?Sidebar.prototype.enabledLibraries=g.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=g.defaultLibraries&&(Sidebar.prototype.defaultEntries=g.defaultLibraries);null!=g.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
g.defaultCustomLibraries);null!=g.enableCustomLibraries&&(Editor.enableCustomLibraries=g.enableCustomLibraries);null!=g.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=g.defaultVertexStyle);null!=g.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=g.defaultEdgeStyle);null!=g.defaultPageVisible&&(Graph.prototype.defaultPageVisible=g.defaultPageVisible);null!=g.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=g.defaultGridEnabled);null!=g.zoomWheel&&(Graph.zoomWheel=g.zoomWheel);null!=
g.zoomFactor&&(p=parseFloat(g.zoomFactor),!isNaN(p)&&1<p?Graph.prototype.zoomFactor=p:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=g.defaultGridSize&&(p=parseInt(g.defaultGridSize),!isNaN(p)&&0<p?mxGraph.prototype.gridSize=p:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=g.gridSteps&&(p=parseInt(g.gridSteps),!isNaN(p)&&0<p?mxGraphView.prototype.gridSteps=p:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=g.pageFormat&&(p=parseInt(g.pageFormat.width),C=parseInt(g.pageFormat.height),!isNaN(p)&&0<p&&!isNaN(C)&&0<C?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,p,C),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=g.thumbWidth&&(Sidebar.prototype.thumbWidth=g.thumbWidth);null!=g.thumbHeight&&(Sidebar.prototype.thumbHeight=g.thumbHeight);null!=g.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+null!=g.pageFormat&&(p=parseInt(g.pageFormat.width),B=parseInt(g.pageFormat.height),!isNaN(p)&&0<p&&!isNaN(B)&&0<B?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,p,B),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=g.thumbWidth&&(Sidebar.prototype.thumbWidth=g.thumbWidth);null!=g.thumbHeight&&(Sidebar.prototype.thumbHeight=g.thumbHeight);null!=g.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
g.emptyLibraryXml);null!=g.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=g.emptyDiagramXml);null!=g.sidebarWidth&&(EditorUi.prototype.hsplitPosition=g.sidebarWidth);null!=g.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=g.updateDefaultStyle);null!=g.sidebarTitles&&(Sidebar.prototype.sidebarTitles=g.sidebarTitles);null!=g.sidebarTitleSize&&(p=parseInt(g.sidebarTitleSize),!isNaN(p)&&0<p?Sidebar.prototype.sidebarTitleSize=p:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));
null!=g.fontCss&&("string"===typeof g.fontCss?Editor.configureFontCss(g.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=g.autosaveDelay&&(p=parseInt(g.autosaveDelay),!isNaN(p)&&0<p?DrawioFile.prototype.autosaveDelay=p:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=g.maxImageBytes&&(EditorUi.prototype.maxImageBytes=g.maxImageBytes);null!=g.maxImageSize&&(EditorUi.prototype.maxImageSize=g.maxImageSize);null!=g.shareCursorPosition&&
(EditorUi.prototype.shareCursorPosition=g.shareCursorPosition);null!=g.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=g.showRemoteCursors);null!=g.restrictExport&&(DrawioFile.RESTRICT_EXPORT=g.restrictExport);null!=g.replaceSvgDataUris&&(Editor.replaceSvgDataUris=g.replaceSvgDataUris);null!=g.foreignObjectImages&&(Editor.foreignObjectImages=g.foreignObjectImages);null!=g.shadowColor&&(mxConstants.SHADOW_COLOR=g.shadowColor);null!=g.shadowOpacity&&(mxConstants.SHADOW_OPACITY=g.shadowOpacity);
-null!=g.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=g.shadowOffsetX);null!=g.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=g.shadowOffsetY);null!=g.shadowBlur&&(mxConstants.SHADOW_BLUR=g.shadowBlur);null!=g.enableAnimations&&(Editor.enableAnimations=g.enableAnimations);null!=g.enableChatGpt&&(Editor.enableChatGpt=g.enableChatGpt);null!=g.gptApiKey&&(Editor.gptApiKey=g.gptApiKey);null!=g.gptModel&&(Editor.gptModel=g.gptModel);null!=g.gptUrl&&(Editor.gptUrl=g.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==
-typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(g){if(null!=g){Editor.prototype.fontCss=g;var p=document.getElementsByTagName("script")[0];if(null!=p&&null!=p.parentNode){var C=document.createElement("style");C.setAttribute("type","text/css");C.appendChild(document.createTextNode(g));p.parentNode.insertBefore(C,p);g=g.split("url(");for(C=1;C<g.length;C++){var I=g[C].indexOf(")");I=Editor.trimCssUrl(g[C].substring(0,I));var M=document.createElement("link");
-M.setAttribute("rel","preload");M.setAttribute("href",I);M.setAttribute("as","font");M.setAttribute("crossorigin","");p.parentNode.insertBefore(M,p)}}}};Editor.trimCssUrl=function(g){return g.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=
-20;Editor.guid=function(g){g=null!=g?g:Editor.GUID_LENGTH;for(var p=[],C=0;C<g;C++)p.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return p.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},
-{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];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(g){g=null!=g&&"mxlibrary"!=g.nodeName?this.extractGraphModel(g):null;if(null!=g){var p=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(p)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[g],"cause",[p]),Error(mxResources.get("notADiagramFile")+" ("+p+")");if("mxGraphModel"==g.nodeName){p=g.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=p&&""!=p)p!=this.graph.currentStyle&&(C=null!=this.graph.themes?
-this.graph.themes[p]:mxUtils.load(STYLE_PATH+"/"+p+".xml").getDocumentElement(),null!=C&&(I=new mxCodec(C.ownerDocument),I.decode(C,this.graph.getStylesheet())));else{var C=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=C){var I=new mxCodec(C.ownerDocument);I.decode(C,this.graph.getStylesheet())}}this.graph.currentStyle=p;this.graph.mathEnabled="1"==urlParams.math||"1"==g.getAttribute("math");this.graph.setAdaptiveColors(g.getAttribute("adaptiveColors"));
-p=g.getAttribute("backgroundImage");null!=p?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(p)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==g.getAttribute("shadow"),!1);if(p=g.getAttribute("extFonts"))try{for(p=p.split("|").map(function(M){M=M.split("^");return{name:M[0],url:M[1]}}),C=0;C<p.length;C++)this.graph.addExtFont(p[C].name,
-p[C].url)}catch(M){console.log("ExtFonts format error: "+M.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 k=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(g,p){g=null!=g?g:!0;var C=k.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&C.setAttribute("style",
-this.graph.currentStyle);var I=this.graph.getBackgroundImageObject(this.graph.backgroundImage,p);null!=I&&C.setAttribute("backgroundImage",JSON.stringify(I));C.setAttribute("math",this.graph.mathEnabled?"1":"0");C.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?C.setAttribute("adaptiveColors",this.graph.adaptiveColors):C.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(I=this.graph.extFonts.map(function(M){return M.name+
-"^"+M.url}),C.setAttribute("extFonts",I.join("|")));return C};Editor.prototype.isDataSvg=function(g){try{var p=mxUtils.parseXml(g).documentElement.getAttribute("content");if(null!=p&&(null!=p&&"<"!=p.charAt(0)&&"%"!=p.charAt(0)&&(p=unescape(window.atob?atob(p):Base64.decode(cont,p))),null!=p&&"%"==p.charAt(0)&&(p=decodeURIComponent(p)),null!=p&&0<p.length)){var C=mxUtils.parseXml(p).documentElement;return"mxfile"==C.nodeName||"mxGraphModel"==C.nodeName}}catch(I){}return!1};Editor.prototype.extractGraphModel=
-function(g,p,C){return Editor.extractGraphModel.apply(this,arguments)};var n=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();n.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
-function(){d.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(g,p){if("undefined"===typeof window.MathJax){var C=function(){I=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};g=null!=g?g:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var I=null;Editor.doMathJaxRender=function(Q){try{null==
-I?(MathJax.typesetClear([Q]),MathJax.typeset([Q]),C()):I!=Q&&Editor.mathJaxQueue.push(Q)}catch(U){MathJax.typesetClear([Q]),null!=U.retry?(I=Q,U.retry.then(function(){MathJax.typesetPromise([Q]).then(C)["catch"](function(V){console.log("Error in MathJax.typesetPromise: "+V.toString());C()})})["catch"](function(V){console.log("Error in MathJax.retry: "+V.toString());C()})):null!=window.console&&console.log("Error in MathJax.typeset: "+U.toString())}};window.MathJax=null!=p?p:{options:{skipHtmlTags:{"[+]":["text"]},
-ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"],paths:{fonts:DRAW_MATH_URL+"/fonts","mathjax-tex":DRAW_MATH_URL+"/fonts/mathjax-tex-font","mathjax-mhchem-extension":DRAW_MATH_URL+"/fonts/mathjax-mhchem-font-extension","mathjax-bbm-extension":DRAW_MATH_URL+"/fonts/mathjax-bbm-font-extension","mathjax-bboldx-extension":DRAW_MATH_URL+"/fonts/mathjax-bboldx-font-extension","mathjax-dsfont-extension":DRAW_MATH_URL+
-"/fonts/mathjax-dsfont-font-extension"}},output:{font:"mathjax-tex"},startup:{pageReady:function(){for(var Q=0;Q<Editor.mathJaxQueue.length;Q++)Editor.doMathJaxRender(Editor.mathJaxQueue[Q])}}};Editor.MathJaxRender=function(Q){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(Q):Editor.mathJaxQueue.push(Q)};Editor.onMathJaxDone=function(){};var M=Editor.prototype.init;Editor.prototype.init=function(){M.apply(this,arguments);var Q=mxUtils.bind(this,function(U,
-V){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,Q);this.graph.addListener(mxEvent.REFRESH,Q)};p=document.getElementsByTagName("script");if(null!=p&&0<p.length){var O=document.createElement("script");O.setAttribute("type","text/javascript");O.setAttribute("src",g);p[0].parentNode.appendChild(O)}}};Editor.prototype.csvToArray=function(g){if(0<g.length){var p="",C=[""],I=0,M=!0,O;g=$jscomp.makeIterator(g);
-for(O=g.next();!O.done;O=g.next())O=O.value,'"'===O?(M&&O===p&&(C[I]+=O),M=!M):","===O&&M?O=C[++I]="":C[I]+=O,p=O;return C}return[]};Editor.prototype.getProxiedUrl=function(g){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(g)){var p=EditorUi.isVisioFilename(g);p=/\.png$/i.test(g)||/\.pdf$/i.test(g)||p;var C="t="+(new Date).getTime();g=PROXY_URL+"?url="+encodeURIComponent(g)+"&"+C+(p?"&base64=1":"")}return g};Editor.prototype.isCorsEnabledForUrl=
-function(g){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||g.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(g)||"https://raw.githubusercontent.com/"===g.substring(0,34)||"https://fonts.googleapis.com/"===g.substring(0,29)||"https://fonts.gstatic.com/"===g.substring(0,26)};Editor.prototype.createImageUrlConverter=
-function(){var g=new mxUrlConverter;g.updateBaseUrl();var p=g.convert,C=this;g.convert=function(I){null!=I&&navigator.onLine&&("http://"!=I.substring(0,7)&&"https://"!=I.substring(0,8)||I.substring(0,g.baseUrl.length)==g.baseUrl||C.crossOriginImages&&C.isCorsEnabledForUrl(I)?"chrome-extension://"!=I.substring(0,19)&&(I=p.apply(this,arguments)):I=PROXY_URL+"?url="+encodeURIComponent(I));return I};return g};Editor.createSvgDataUri=function(g){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(g)))};
-Editor.prototype.convertImageToDataUri=function(g,p,C,I,M){try{var O=!0,Q=window.setTimeout(mxUtils.bind(this,function(){O=!1;p(g)}),this.timeout),U=mxUtils.bind(this,function(){null!=I?this.convertImageToDataUri(g,p,C,I,!0):p(g)});if(/(\.svg)$/i.test(g)&&!M)mxUtils.get(g,mxUtils.bind(this,function(X){window.clearTimeout(Q);O&&(200>X.getStatus()||299<X.getStatus()?U():p(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(Q);O&&U()}));else{var V=new Image;this.crossOriginImages&&
-(V.crossOrigin="anonymous");V.onload=function(){window.clearTimeout(Q);if(O)try{I=null!=I&&M?I:1;var X=document.createElement("canvas"),W=X.getContext("2d");W.scale(I,I);X.height=V.height*I;X.width=V.width*I;W.drawImage(V,0,0);p(X.toDataURL())}catch(Y){p(g)}};V.onerror=function(){window.clearTimeout(Q);O&&(null!=C?C():p(g))};V.src=g}}catch(X){null!=C?C():p(g)}};Editor.prototype.convertImages=function(g,p,C,I){function M(){0<O.length?O.shift()():p(g)}null==I&&(I=this.createImageUrlConverter());var O=
-[],Q=C||{};C=mxUtils.bind(this,function(U,V){U=g.getElementsByTagName(U);for(var X=0;X<U.length;X++)mxUtils.bind(this,function(W){O.push(mxUtils.bind(this,function(){try{if(null!=W){var Y=I.convert(W.getAttribute(V));if(null!=Y&&"data:"!=Y.substring(0,5)){var Z=Q[Y];null==Z?this.convertImageToDataUri(Y,function(aa){null!=aa&&(Q[Y]=aa,W.setAttribute(V,aa));M()},null,Editor.svgRasterScale):(W.setAttribute(V,Z),M())}else null!=Y&&W.setAttribute(V,Y),M()}}catch(aa){M()}}))})(U[X])});C("image","xlink:href");
-C("img","src");M()};Editor.base64Encode=function(g){for(var p="",C=0,I=g.length,M,O,Q;C<I;){M=g.charCodeAt(C++)&255;if(C==I){p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4);p+="==";break}O=g.charCodeAt(C++);if(C==I){p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&
-3)<<4|(O&240)>>4);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2);p+="=";break}Q=g.charCodeAt(C++);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4|(O&240)>>4);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2|(Q&192)>>6);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q&63)}return p};
-Editor.prototype.loadUrl=function(g,p,C,I,M,O,Q,U){try{var V=!Q&&(I||/(\.png)($|\?)/i.test(g)||/(\.jpe?g)($|\?)/i.test(g)||/(\.gif)($|\?)/i.test(g)||/(\.pdf)($|\?)/i.test(g));M=null!=M?M:!0;var X=mxUtils.bind(this,function(){mxUtils.get(g,mxUtils.bind(this,function(W){200<=W.getStatus()&&299>=W.getStatus()?null!=p&&(W=W.getText(),V&&(O=null!=O?O:"data:image/png;base64,",W=O+Editor.base64Encode(W)),p(W)):null!=C&&(0==W.getStatus()?C({message:mxResources.get("accessDenied")},W):404==W.getStatus()?C({message:mxResources.get("fileNotFound"),
-code:W.getStatus()},W):C({message:this.getErrorMessage(W)},W))}),function(W){null!=C&&C({message:mxResources.get("error")+" "+W.getStatus()})},V,this.timeout,function(){M&&null!=C&&C({code:App.ERROR_TIMEOUT,retry:X})},U)});X()}catch(W){null!=C&&C(W)}};Editor.prototype.getErrorMessage=function(g){var p=mxResources.get("error")+" "+g.getStatus();try{var C=g.getText(),I=JSON.parse(C);null!=I&&null!=I.error&&null!=I.error.message&&(p=I.error.message+" ("+p+")")}catch(M){}return p};Editor.prototype.absoluteCssFonts=
-function(g){var p=null;if(null!=g){var C=g.split("url(");if(0<C.length){p=[C[0]];g=window.location.pathname;var I=null!=g?g.lastIndexOf("/"):-1;0<=I&&(g=g.substring(0,I+1));I=document.getElementsByTagName("base");var M=null;null!=I&&0<I.length&&(M=I[0].getAttribute("href"));for(var O=1;O<C.length;O++)if(I=C[O].indexOf(")"),0<I){var Q=Editor.trimCssUrl(C[O].substring(0,I));this.graph.isRelativeUrl(Q)&&(Q=null!=M?M+Q:window.location.protocol+"//"+window.location.hostname+("/"==Q.charAt(0)?"":g)+Q);
-p.push('url("'+Q+'"'+C[O].substring(I))}else p.push(C[O])}else p=[g]}return null!=p?p.join(""):null};Editor.prototype.mapFontUrl=function(g,p,C){/^https?:\/\//.test(p)&&!this.isCorsEnabledForUrl(p)&&(p=PROXY_URL+"?url="+encodeURIComponent(p));C(g,p)};Editor.prototype.embedCssFonts=function(g,p){var C=g.split("url("),I=0;null==this.cachedFonts&&(this.cachedFonts={});var M=mxUtils.bind(this,function(){if(0==I){for(var V=[C[0]],X=1;X<C.length;X++){var W=C[X].indexOf(")");V.push('url("');V.push(this.cachedFonts[Editor.trimCssUrl(C[X].substring(0,
-W))]);V.push('"'+C[X].substring(W))}p(V.join(""))}});if(0<C.length){for(g=1;g<C.length;g++){var O=C[g].indexOf(")"),Q=null,U=C[g].indexOf("format(",O);0<U&&(Q=Editor.trimCssUrl(C[g].substring(U+7,C[g].indexOf(")",U))));mxUtils.bind(this,function(V){if(null==this.cachedFonts[V]){this.cachedFonts[V]=V;I++;var X="application/x-font-ttf";if("svg"==Q||/(\.svg)($|\?)/i.test(V))X="image/svg+xml";else if("otf"==Q||"embedded-opentype"==Q||/(\.otf)($|\?)/i.test(V))X="application/x-font-opentype";else if("woff"==
-Q||/(\.woff)($|\?)/i.test(V))X="application/font-woff";else if("woff2"==Q||/(\.woff2)($|\?)/i.test(V))X="application/font-woff2";else if("eot"==Q||/(\.eot)($|\?)/i.test(V))X="application/vnd.ms-fontobject";else if("sfnt"==Q||/(\.sfnt)($|\?)/i.test(V))X="application/font-sfnt";this.mapFontUrl(X,V,mxUtils.bind(this,function(W,Y){this.loadUrl(Y,mxUtils.bind(this,function(Z){this.cachedFonts[V]=Z;I--;M()}),mxUtils.bind(this,function(Z){I--;M()}),!0,null,"data:"+W+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(C[g].substring(0,
-O)),Q)}M()}else p(g)};Editor.prototype.loadFonts=function(g){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(p){this.resolvedFontCss=p;null!=g&&g()})):null!=g&&g()};Editor.prototype.createGoogleFontCache=function(){var g={},p;for(p in Graph.fontMapping)Graph.isCssFontUrl(p)&&(g[p]=Graph.fontMapping[p]);return g};Editor.prototype.embedExtFonts=function(g){var p=this.graph.getCustomFonts();if(0<p.length){var C=[],I=0;null==this.cachedGoogleFonts&&
-(this.cachedGoogleFonts=this.createGoogleFontCache());for(var M=mxUtils.bind(this,function(){0==I&&this.embedCssFonts(C.join(""),g)}),O=0;O<p.length;O++)mxUtils.bind(this,function(Q,U){Graph.isCssFontUrl(U)?null==this.cachedGoogleFonts[U]?(I++,this.loadUrl(Graph.rewriteGoogleFontUrl(U),mxUtils.bind(this,function(V){this.cachedGoogleFonts[U]=V;C.push(V+"\n");I--;M()}),mxUtils.bind(this,function(V){I--;C.push("@import url("+U+");\n");M()}))):C.push(this.cachedGoogleFonts[U]+"\n"):C.push('@font-face {font-family: "'+
-Q+'";src: url("'+U+'")}\n')})(p[O].name,p[O].url);M()}else g()};Editor.prototype.addMathCss=function(g){g=g.getElementsByTagName("defs");if(null!=g&&0<g.length)for(var p=document.getElementsByTagName("style"),C=0;C<p.length;C++){var I=mxUtils.getTextContent(p[C]);0>I.indexOf("mxPageSelector")&&0<I.indexOf("MathJax")&&g[0].appendChild(p[C].cloneNode(!0))}};Editor.prototype.addFontCss=function(g,p){p=null!=p?p:this.absoluteCssFonts(this.fontCss);if(null!=p){var C=mxUtils.getSvgDefs(g),I=p.split("\n");
-p=[];for(var M=[],O=0;O<I.length;O++)"@import"==I[O].substring(0,7)?p.push(I[O]):M.push(I[O]);g=g.ownerDocument;g=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"style"):g.createElement("style");g.setAttribute("type","text/css");0<p.length&&(mxUtils.setTextContent(g,p.join("\n")),C.appendChild(g));0<M.length&&(g=g.cloneNode(!1),mxUtils.setTextContent(g,M.join("\n")),C.appendChild(g))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};
-Editor.prototype.getMaxCanvasScale=function(g,p,C){var I=mxClient.IS_FF?8192:16384;return Math.min(C,Math.min(I/g,I/p))};Editor.prototype.exportToCanvas=function(g,p,C,I,M,O,Q,U,V,X,W,Y,Z,aa,ha,ea,da,ia){try{O=null!=O?O:!0;Q=null!=Q?Q:!0;Y=null!=Y?Y:this.graph;Z=null!=Z?Z:0;var la=V?null:Y.background;la==mxConstants.NONE&&(la=null);null==la&&(la=I);null==la&&0==V&&(la="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(Y.getSvg(null,null,Z,aa,null,Q,null,null,null,X,null,ea,da,ia),mxUtils.bind(this,
-function(ba){try{ba.style.setProperty("-webkit-font-smoothing","antialiased");ba.style.setProperty("-moz-osx-font-smoothing","grayscale");var fa=new Image;fa.onload=mxUtils.bind(this,function(){try{var ca=function(){mxClient.IS_SF?window.setTimeout(function(){wa.drawImage(fa,0,0);g(sa,ba)},0):(wa.drawImage(fa,0,0),g(sa,ba))},sa=document.createElement("canvas"),pa=parseInt(ba.getAttribute("width")),ua=parseInt(ba.getAttribute("height"));U=null!=U?U:1;null!=p&&(U=O?Math.min(1,Math.min(3*p/(4*ua),p/
-pa)):p/pa);U=this.getMaxCanvasScale(pa,ua,U);pa=Math.ceil(U*pa);ua=Math.ceil(U*ua);sa.setAttribute("width",pa);sa.setAttribute("height",ua);var wa=sa.getContext("2d");if(null!=la){var ka=mxUtils.getLightDarkColor(la);wa.beginPath();wa.rect(0,0,pa,ua);wa.fillStyle="dark"==ea&&"none"!=Y.getAdaptiveColors()?ka.dark:ka.light;wa.fill()}1!=U&&wa.scale(U,U);if(ha){var na=Y.view,za=na.scale;na.scale=1;var ra=btoa(unescape(encodeURIComponent(na.createSvgGrid(na.gridColor))));na.scale=za;ra="data:image/svg+xml;base64,"+
-ra;var ya=Y.gridSize*na.gridSteps*U,Ca=Y.getGraphBounds(),Ha=na.translate.x*za,Ba=na.translate.y*za,Fa=Ha+(Ca.x-Ha)/za-Z,Pa=Ba+(Ca.y-Ba)/za-Z,Aa=new Image;Aa.onload=function(){try{for(var Da=-Math.round(ya-mxUtils.mod((Ha-Fa)*U,ya)),Ia=-Math.round(ya-mxUtils.mod((Ba-Pa)*U,ya));Da<pa;Da+=ya)for(var Oa=Ia;Oa<ua;Oa+=ya)wa.drawImage(Aa,Da/U,Oa/U);ca()}catch(Ga){null!=M&&M(Ga)}};Aa.onerror=function(Da){null!=M&&M(Da)};Aa.src=ra}else ca()}catch(Da){null!=M&&M(Da)}});fa.onerror=function(ca){null!=M&&M(ca)};
-X&&this.graph.addSvgShadow(ba);this.graph.mathEnabled&&this.addMathCss(ba);var ja=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ba,this.resolvedFontCss),fa.src=Editor.createSvgDataUri(mxUtils.getXml(ba))}catch(ca){null!=M&&M(ca)}});this.embedExtFonts(mxUtils.bind(this,function(ca){try{null!=ca&&this.addFontCss(ba,ca),this.loadFonts(ja)}catch(sa){null!=M&&M(sa)}}))}catch(ca){null!=M&&M(ca)}}),C,W)}catch(ba){null!=M&&M(ba)}};Editor.crcTable=[];for(var x=0;256>x;x++)for(var z=
-x,y=0;8>y;y++)z=1==(z&1)?3988292384^z>>>1:z>>>1,Editor.crcTable[x]=z;Editor.updateCRC=function(g,p,C,I){for(var M=0;M<I;M++)g=Editor.crcTable[(g^p.charCodeAt(C+M))&255]^g>>>8;return g};Editor.crc32=function(g){for(var p=-1,C=0;C<g.length;C++)p=p>>>8^Editor.crcTable[(p^g.charCodeAt(C))&255];return(p^-1)>>>0};Editor.writeGraphModelToPng=function(g,p,C,I,M){function O(W,Y){var Z=V;V+=Y;return W.substring(Z,V)}function Q(W){W=O(W,4);return W.charCodeAt(3)+(W.charCodeAt(2)<<8)+(W.charCodeAt(1)<<16)+(W.charCodeAt(0)<<
-24)}function U(W){return String.fromCharCode(W>>24&255,W>>16&255,W>>8&255,W&255)}g=g.substring(g.indexOf(",")+1);g=window.atob?atob(g):Base64.decode(g,!0);var V=0;if(O(g,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=M&&M();else if(O(g,4),"IHDR"!=O(g,4))null!=M&&M();else{O(g,17);M=g.substring(0,V);do{var X=Q(g);if("IDAT"==O(g,4)){M=g.substring(0,V-8);"pHYs"==p&&"dpi"==C?(C=Math.round(I/.0254),C=U(C)+U(C)+String.fromCharCode(1)):C=C+String.fromCharCode(0)+("zTXt"==p?String.fromCharCode(0):
-"")+I;I=4294967295;I=Editor.updateCRC(I,p,0,4);I=Editor.updateCRC(I,C,0,C.length);M+=U(C.length)+p+C+U(I^4294967295);M+=g.substring(V-8,g.length);break}M+=g.substring(V-8,V-4+X);O(g,X);O(g,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(M):Base64.encode(M,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var F=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(g,p){F.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
-mxSettings.save()};var N=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){N.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(g,p){var C=null;null!=g.editor.graph.getModel().getParent(p)?C=p.getId():null!=g.currentPage&&(C=g.currentPage.getId());return C});if(null!=window.StyleFormatPanel){var K=Format.prototype.init;Format.prototype.init=function(){K.apply(this,
-arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var L=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?L.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(g){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=
-function(g){g=c.apply(this,arguments);var p=this.editorUi,C=p.editor.graph;if(C.isEnabled()){var I=p.getCurrentFile();null!=I&&I.isAutosaveOptional()&&g.appendChild(this.createOption(mxResources.get("autosave"),function(){return p.editor.autosave},function(O){p.editor.setAutosave(O);p.editor.autosave&&I.isModified()&&I.fileChanged()},{install:function(O){this.listener=function(){O(p.editor.autosave)};p.editor.addListener("autosaveChanged",this.listener)},destroy:function(){p.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&
-C.isEnabled()&&"undefined"!==typeof MathJax){var M=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return C.mathEnabled},function(O){p.actions.get("mathematicalTypesetting").funct()},{install:function(O){this.listener=function(){O(C.mathEnabled)};p.addListener("mathEnabledChanged",this.listener)},destroy:function(){p.removeListener(this.listener)}});g.appendChild(M);(!p.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&M.appendChild(p.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return g};
-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,isVisible:function(g){return"0"==mxUtils.getValue(g.style,
-"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(g){return"1"==mxUtils.getValue(g.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.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:.25,isVisible:function(g){return"0"==mxUtils.getValue(g.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",
-min:0,defVal:25,isVisible:function(g){return"1"==mxUtils.getValue(g.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",
-min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
-[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.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.tape.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=
-[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},
-{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},
-{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",
-type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=
-[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];
-mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",
-type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",
-type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",
-dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
-min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",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;var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var g=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=g.style.shape&&!g.containsLabel&&0<g.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));
-f.apply(this,arguments);null!=g.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),g.customProperties,g))};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(g){var p=this.editorUi.getSelectionState();1==p.cells.length?this.addActions(g,["copyStyle","pasteStyle"]):1<=p.cells.length&&this.addActions(g,["pasteStyle","pasteData"]);l.apply(this,arguments);return g};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=
-function(g,p,C,I){function M(wa,ka,na,za,ra){if(null!=na.valueChanged)na.valueChanged(ka,ra,C,Y);else{Z.getModel().beginUpdate();try{ra=[];var ya=[];if(null!=na.index){for(var Ca=[],Ha=na.parentRow.nextSibling;Ha&&Ha.getAttribute("data-pName")==wa;)Ca.push(Ha.getAttribute("data-pValue")),Ha=Ha.nextSibling;na.index<Ca.length?null!=za?Ca.splice(za,1):Ca[na.index]=ka:Ca.push(ka);null!=na.size&&Ca.length>na.size&&(Ca=Ca.slice(0,na.size));ka=Ca.join(",");null!=na.countProperty&&(Z.setCellStyles(na.countProperty,
-Ca.length,Z.getSelectionCells()),ra.push(na.countProperty),ya.push(Ca.length))}Z.setCellStyles(wa,ka,Z.getSelectionCells());ra.push(wa);ya.push(ka);if(null!=na.dependentProps)for(wa=0;wa<na.dependentProps.length;wa++){var Ba=na.dependentPropsDefVal[wa],Fa=na.dependentPropsVals[wa];if(Fa.length>ka)Fa=Fa.slice(0,ka);else for(var Pa=Fa.length;Pa<ka;Pa++)Fa.push(Ba);Fa=Fa.join(",");Z.setCellStyles(na.dependentProps[wa],Fa,Z.getSelectionCells());ra.push(na.dependentProps[wa]);ya.push(Fa)}if("function"==
-typeof na.onChange)na.onChange(Z,ka);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ra,"values",ya,"cells",Z.getSelectionCells()))}finally{Z.getModel().endUpdate()}}}function O(wa,ka){ka.style.left="0px";ka.style.top="0px";ka.style.position="relative";ka.style.right="0px";ka.style.bottom="0px";ka.style.width="100%";ka.style.maxWidth="100%";ka.style.maxHeight="100%";ka.style.textAlign="left"}function Q(wa,ka,na){function za(ya){if(null==ya||ya==mxConstants.NONE)ra.style.background="url('"+
-Dialog.prototype.noColorImage+"')";else if("default"==ya)ra.style.background="";else{var Ca=mxUtils.getLightDarkColor(ya);mxUtils.isLightDarkColor(ya)&&Ca.light!=Ca.dark?ra.style.background="linear-gradient(to right bottom, "+Ca.cssText+" 50%, "+mxUtils.invertLightDarkColor(Ca).cssText+" 50.3%)":ra.style.background=ya}}var ra=document.createElement("div");ra.style.width="32px";ra.style.height="8px";ra.style.margin="2px";ra.style.borderStyle="solid";ra.style.borderWidth="1px";za(ka);btn=mxUtils.button("",
-mxUtils.bind(Y,function(ya){this.editorUi.pickColor(ka,function(Ca){M(wa,Ca,na);za(Ca)});mxEvent.consume(ya)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(ra);return btn}function U(wa,ka,na,za,ra,ya,Ca){null!=ka&&(ka=ka.split(","),aa.push({name:wa,values:ka,type:na,defVal:za,countProperty:ra,parentRow:ya,isDeletable:!0,flipBkg:Ca}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ha){for(var Ba=ya,Fa=
-0;null!=Ba.nextSibling;)if(Ba.nextSibling.getAttribute("data-pName")==wa)Ba=Ba.nextSibling,Fa++;else break;var Pa={type:na,parentRow:ya,index:Fa,isDeletable:!0,defVal:za,countProperty:ra};Fa=W(wa,"",Pa,0==Fa%2,Ca);M(wa,za,Pa);Ba.parentNode.insertBefore(Fa,Ba.nextSibling);mxEvent.consume(Ha)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function V(wa,ka,na,za,ra,ya,Ca){if(0<ra){var Ha=Array(ra);ka=null!=ka?ka.split(","):[];for(var Ba=0;Ba<ra;Ba++)Ha[Ba]=null!=
-ka[Ba]?ka[Ba]:null!=za?za:"";aa.push({name:wa,values:Ha,type:na,defVal:za,parentRow:ya,flipBkg:Ca,size:ra})}return document.createElement("div")}function X(wa,ka,na){var za=document.createElement("input");za.type="checkbox";za.checked="1"==ka;mxEvent.addListener(za,"change",function(){M(wa,za.checked?"1":"0",na,null,za)});return za}function W(wa,ka,na,za,ra){var ya=na.dispName,Ca=na.type,Ha=document.createElement("tr");Ha.className="gePropRow"+(ra?"Dark":"")+(za?"Alt":"")+" gePropNonHeaderRow";Ha.setAttribute("data-pName",
-wa);Ha.setAttribute("data-pValue",ka);za=!1;null!=na.index&&(Ha.setAttribute("data-index",na.index),ya=(null!=ya?ya:"")+"["+na.index+"]",za=!0);var Ba=document.createElement("td");Ba.className="gePropRowCell";ya=mxResources.get(ya,null,ya);mxUtils.write(Ba,ya);Ba.setAttribute("title",ya);za&&(Ba.style.textAlign="right");Ha.appendChild(Ba);Ba=document.createElement("td");Ba.className="gePropRowCell";Ba.setAttribute("title",null!=ka?decodeURIComponent(ka):mxResources.get("none"));mxEvent.addListener(Ba,
-"click",mxUtils.bind(Y,function(Da){!mxUtils.isAncestorNode(Ha,document.activeElement)&&mxUtils.isAncestorNode(Ha.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(Da))}));if("color"==Ca)Ba.appendChild(Q(wa,ka,na));else if("bool"==Ca||"boolean"==Ca)Ba.appendChild(X(wa,ka,na));else if("enum"==Ca){var Fa=na.enumList;Ba.innerHTML="";var Pa=document.createElement("div");Pa.className="gePropValue";Ba.appendChild(Pa);
-for(ra=0;ra<Fa.length;ra++)if(ya=Fa[ra],ya.val==ka){mxUtils.write(Pa,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(Ba,"click",mxUtils.bind(Y,function(Da){var Ia=mxEvent.getSource(Da);if(!(Ia!=Ba&&Ia!=Pa||mxEvent.isConsumed(Da))){Pa.innerHTML="";var Oa=document.createElement("select"),Ga=null;O(Ba,Oa);for(Da=0;Da<Fa.length;Da++){Ia=Fa[Da];var Ka=document.createElement("option");Ka.value=mxUtils.htmlEntities(Ia.val);mxUtils.write(Ka,mxResources.get(Ia.dispName,null,Ia.dispName));
-Oa.appendChild(Ka);null==Ia.val&&(Ka.value="null",Ga=Ka)}Oa.value=null==ka&&null!=Ga?"null":ka;Pa.appendChild(Oa);mxEvent.addListener(Oa,"change",function(){var Xa=mxUtils.htmlEntities(Oa.value);if(Oa[Oa.selectedIndex]==Ga||"null"==Xa.value)Xa=null;M(wa,Xa,na)});Oa.focus();mxEvent.addListener(Oa,"blur",function(){Pa.innerHTML="";for(var Xa=0;Xa<Fa.length;Xa++){var qb=Fa[Xa];if(qb.val==Oa.value){mxUtils.write(Pa,mxResources.get(qb.dispName,null,qb.dispName));break}}})}}))}else if("dynamicArr"==Ca)Ba.appendChild(U(wa,
-ka,na.subType,na.subDefVal,na.countProperty,Ha,ra));else if("staticArr"==Ca)Ba.appendChild(V(wa,ka,na.subType,na.subDefVal,na.size,Ha,ra));else if("readOnly"==Ca)ra=document.createElement("input"),ra.setAttribute("readonly",""),ra.value=ka,ra.style.borderWidth="0px","id"==wa||"shape"==wa?(Ha.firstChild.innerHTML="",Ha.firstChild.setAttribute("colspan","2"),ra.style.flexGrow="1",ra.style.marginLeft="4px",ra.style.textAlign="id"==wa?"center":"left",ra.setAttribute("title",ka),ya=document.createElement("div"),
-mxUtils.write(ya,mxResources.get(wa)+":"),ya.style.display="inline-flex",ya.style.alignItems="center",ya.style.width="100%",ya.appendChild(ra),Ha.firstChild.appendChild(ya)):(ra.style.width="96px",Ba.appendChild(ra));else{Ba.innerHTML="";var Aa=document.createElement("div");Aa.className="gePropValue";Ba.appendChild(Aa);Aa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ka));mxEvent.addListener(Ba,"click",mxUtils.bind(Y,function(Da){function Ia(){var Ka=Ga.value;Ka=0==Ka.length&&"string"!=Ca&&"numbers"!=
-Ca?0:Ka;na.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",Ca="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=na.min&&Ka<na.min?Ka=na.min:null!=na.max&&Ka>na.max&&(Ka=na.max);var Xa=null;try{Xa="numbers"==Ca?Ka.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==Ca?parseInt(Ka):Ka)+"")}catch(qb){}M(wa,Xa,na,null,Ga)}var Oa=mxEvent.getSource(Da);if(!(Oa!=Ba&&Oa!=Aa||mxEvent.isConsumed(Da))){Aa.innerHTML="";var Ga=document.createElement("input");O(Aa,Ga);Ga.value=
-decodeURIComponent(ka);Ga.className="gePropEditor";"int"!=Ca&&"float"!=Ca||na.allowAuto||(Ga.type="number",Ga.step="int"==Ca?"1":"any",null!=na.min&&(Ga.min=parseFloat(na.min)),null!=na.max&&(Ga.max=parseFloat(na.max)));Aa.appendChild(Ga);mxEvent.addListener(Ga,"keypress",function(Ka){13==Ka.keyCode&&Ia()});Ga.focus();mxEvent.addListener(Ga,"blur",function(){Ia()})}}))}na.isDeletable&&(ra=mxUtils.button("-",mxUtils.bind(Y,function(Da){M(wa,"",na,na.index);mxEvent.consume(Da)})),ra.style.height="16px",
-ra.style.width="25px",ra.style.float="right",ra.className="geColorBtn",Ba.appendChild(ra));Ha.appendChild(Ba);return Ha}var Y=this,Z=this.editorUi.editor.graph,aa=[],ha=document.createElement("table");ha.className="geProperties geFullWidthElement";var ea=document.createElement("tr");ea.className="gePropHeader";var da=document.createElement("th");da.className="gePropHeaderCell";da.style.paddingLeft="16px";da.style.backgroundRepeat="no-repeat";da.style.backgroundPosition="-2px 50%";da.style.backgroundSize=
-"20px";mxUtils.write(da,mxResources.get("property"));ea.style.cursor="pointer";var ia=function(){var wa=ha.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){da.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var ka="none";for(var na=g.childNodes.length-1;0<=na;na--)try{var za=g.childNodes[na],ra=za.nodeName.toUpperCase();"INPUT"!=ra&&"SELECT"!=ra||g.removeChild(za)}catch(ya){}}else da.style.backgroundImage="url('"+Editor.arrowDownImage+"')",ka="";for(na=0;na<wa.length;na++)wa[na].style.display=
-ka};mxEvent.addListener(ea,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;ia()});ea.appendChild(da);var la=document.createElement("th");la.className="gePropHeaderCell";la.style.paddingLeft="4px";mxUtils.write(la,mxResources.get("value"));ea.appendChild(la);ha.appendChild(ea);var ba=la=!1;ea=null;1==C.vertices.length&&0==C.edges.length?ea=C.vertices[0].id:0==C.vertices.length&&1==C.edges.length&&(ea=C.edges[0].id);null==ea||I||(ha.appendChild(W("id",mxUtils.htmlEntities(ea),
-{dispName:"id",type:"readOnly"},!0,!1)),null!=C.style&&null!=C.style.shape&&ha.appendChild(W("shape",mxUtils.htmlEntities(C.style.shape),{dispName:"shape",type:"readOnly"},!0,!1)));for(var fa in p)if(I=p[fa],("function"!=typeof I.isVisible||I.isVisible(C,this))&&!I.primary){var ja=null!=I.getValue?I.getValue(C,this):null!=C.style[fa]?mxUtils.htmlEntities(C.style[fa]+""):null!=I.getDefaultValue?I.getDefaultValue(C,this):I.defVal;if("separator"==I.type)ba=!ba;else{if("staticArr"==I.type)I.size=parseInt(C.style[I.sizeProperty]||
-p[I.sizeProperty].defVal)||0;else if(null!=I.dependentProps){var ca=I.dependentProps,sa=[],pa=[];for(ea=0;ea<ca.length;ea++)if(null!=p[ca[ea]]){var ua=C.style[ca[ea]];pa.push(p[ca[ea]].subDefVal);sa.push(null!=ua?ua.split(","):[])}I.dependentPropsDefVal=pa;I.dependentPropsVals=sa}ha.appendChild(W(fa,ja,I,la,ba));la=!la}}for(ea=0;ea<aa.length;ea++)for(I=aa[ea],p=I.parentRow,fa=0;fa<I.values.length;fa++)la=W(I.name,I.values[fa],{type:I.type,parentRow:I.parentRow,isDeletable:I.isDeletable,index:fa,defVal:I.defVal,
-countProperty:I.countProperty,size:I.size},0==fa%2,I.flipBkg),p.parentNode.insertBefore(la,p.nextSibling),p=la;g.appendChild(ha);ia();return g};StyleFormatPanel.prototype.addStyles=function(g){if(null!=this.defaultColorSchemes){var p=this.editorUi,C=p.editor.graph,I=document.createElement("div");I.style.padding="6px 20px 0 24px";g.appendChild(I);var M=document.createElement("div");M.className="geSwitcher";M.style.padding="4px 18px 6px 0px";for(var O=[],Q=0;Q<this.defaultColorSchemes.length;Q++){var U=
-document.createElement("div");U.className="geSwitcherDot";mxUtils.bind(this,function(Z){mxEvent.addListener(U,"click",mxUtils.bind(this,function(){V(Z)}))})(Q);O.push(U);M.appendChild(U)}var V=mxUtils.bind(this,function(Z){null!=O[Z]&&(null!=this.format.currentScheme&&null!=O[this.format.currentScheme]&&(O[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Z,X(this.defaultColorSchemes[this.format.currentScheme]),O[this.format.currentScheme].style.background="#84d7ff")}),
-X=mxUtils.bind(this,function(Z){var aa=mxUtils.clone(C.defaultVertexStyle);aa[mxConstants.STYLE_STROKECOLOR]=null!=aa[mxConstants.STYLE_STROKECOLOR]?aa[mxConstants.STYLE_STROKECOLOR]:"default";aa[mxConstants.STYLE_FILLCOLOR]=null!=aa[mxConstants.STYLE_FILLCOLOR]?aa[mxConstants.STYLE_FILLCOLOR]:"default";aa[mxConstants.STYLE_FONTCOLOR]=null!=aa[mxConstants.STYLE_FONTCOLOR]?aa[mxConstants.STYLE_FONTCOLOR]:"default";C.replaceDefaultColors(new mxCell,aa);var ha=mxUtils.bind(this,function(da){var ia=mxUtils.button("",
-mxUtils.bind(this,function(fa){C.getModel().beginUpdate();try{for(var ja=p.getSelectionState().cells,ca=0;ca<ja.length;ca++){var sa=C.getModel().getStyle(ja[ca]);null!=da?(mxEvent.isShiftDown(fa)||(sa=""==da.fill||null==da.fill?mxUtils.setStyle(sa,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(sa,mxConstants.STYLE_FILLCOLOR,da.fill),sa=""==da.gradient||null==da.gradient?mxUtils.setStyle(sa,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(sa,mxConstants.STYLE_GRADIENTCOLOR,da.gradient),mxEvent.isControlDown(fa)||
-mxClient.IS_MAC&&mxEvent.isMetaDown(fa)||!C.getModel().isVertex(ja[ca])||(sa=""==da.font||null==da.font?mxUtils.setStyle(sa,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(sa,mxConstants.STYLE_FONTCOLOR,da.font))),mxEvent.isAltDown(fa)||(sa=""==da.stroke||null==da.fill?mxUtils.setStyle(sa,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(sa,mxConstants.STYLE_STROKECOLOR,da.stroke))):(sa=mxUtils.setStyle(sa,mxConstants.STYLE_FILLCOLOR,null),sa=mxUtils.setStyle(sa,mxConstants.STYLE_STROKECOLOR,
-null),sa=mxUtils.setStyle(sa,mxConstants.STYLE_GRADIENTCOLOR,null),C.getModel().isVertex(ja[ca])&&(sa=mxUtils.setStyle(sa,mxConstants.STYLE_FONTCOLOR,null)));C.getModel().setStyle(ja[ca],sa)}}finally{C.getModel().endUpdate()}}));ia.className="geStyleButton";ia.style.width="36px";ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ia.style.margin="0px 6px 6px 0px";if(null!=da){var la="1px solid";null!=da.border&&(la=da.border);if(null!=da.gradient)ia.style.backgroundImage="linear-gradient("+
-mxUtils.getLightDarkColor(da.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(da.gradient).cssText+" 100%)";else if(da.fill==mxConstants.NONE)ia.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==da.fill||""==da.fill)ia.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var ba=mxUtils.getLightDarkColor(da.fill);ia.style.backgroundImage="linear-gradient(to right bottom, "+ba.cssText+" 50%, "+ba.light+" 50.3%)"}null==
-da.stroke||da.stroke==mxConstants.NONE?ia.style.border=la+" transparent":""==da.stroke?ia.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(ba=mxUtils.getLightDarkColor(da.stroke),ia.style.border=la+" "+ba.cssText,ia.style.borderRightColor=ba.light,ia.style.borderBottomColor=ia.style.borderRightColor);null!=da.title&&ia.setAttribute("title",da.title)}else la=mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),ba=mxUtils.getValue(aa,
-mxConstants.STYLE_STROKECOLOR,"#000000"),ia.style.backgroundColor=la,ia.style.border="1px solid "+ba;ia.style.borderRadius="0";I.appendChild(ia);null!=da&&null!=da.gradient&&(la=ia.cloneNode(!1),la.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(da.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(da.gradient).light+") 100%)",la.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",la.style.backgroundColor="transparent",I.appendChild(la),
-la.style.marginLeft="-42px",mxEvent.addListener(la,"click",function(){ia.click()}))});I.innerText="";if(null!=Z)for(var ea=0;ea<Z.length;ea++)0<ea&&0==mxUtils.mod(ea,4)&&mxUtils.br(I),ha(Z[ea])});null==this.format.currentScheme?V(Math.min(O.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):V(this.format.currentScheme);Q=10>=this.defaultColorSchemes.length?43:23;var W=document.createElement("div");W.className="geButton";W.style.cssText="position:absolute;left:0px;bottom:"+Q+"px;width:20px;background-image:url("+
-Editor.chevronLeftImage+");";mxEvent.addListener(W,"click",mxUtils.bind(this,function(){V(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Y=document.createElement("div");Y.className="geButton";Y.style.cssText="position:absolute;left:186px;bottom:"+Q+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(g.appendChild(W),g.appendChild(Y));mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){V(mxUtils.mod(this.format.currentScheme+
-1,this.defaultColorSchemes.length))}));X(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&g.appendChild(M)}return g}}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.isGoogleFontUrl=function(g){return g.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||
-g.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(g){return Graph.isGoogleFontUrl(g)};Graph.rewriteGoogleFontUrl=function(g){null!=g&&g.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(g=Editor.GOOGLE_FONTS_CSS2+g.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return g};Graph.createFontElement=function(g,p){var C=Graph.fontMapping[p];null==C&&Graph.isCssFontUrl(p)?(g=document.createElement("link"),g.setAttribute("rel","stylesheet"),
-g.setAttribute("type","text/css"),g.setAttribute("charset","UTF-8"),g.setAttribute("href",Graph.rewriteGoogleFontUrl(p))):(null==C&&(C='@font-face {\nfont-family: "'+g+'";\nsrc: url("'+p+'");\n}'),g=document.createElement("style"),mxUtils.write(g,C));return g};Graph.addRecentCustomFont=function(g,p){};Graph.addFont=function(g,p,C,I){if(null!=g&&0<g.length&&null!=p&&0<p.length){I=null!=I?I:Graph.customFontElements;var M=g.toLowerCase();if("helvetica"!=M&&"arial"!=g&&"sans-serif"!=M){var O=I[M];null!=
-O&&O.url!=p&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=p,"http:"==p.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(p)),O={name:g,url:p,elt:Graph.createFontElement(g,O)},I[M]=O,p=I==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=C&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=C,O.elt.onerror=C):C()),null!=p&&p.appendChild(O.elt)):null!=C&&C()}else null!=C&&C()}else null!=C&&C();return g};Graph.getFontUrl=function(g,p){g=Graph.customFontElements[g.toLowerCase()];
-null!=g&&(p=g.url);return p};Graph.processFontAttributes=function(g){g=g.getElementsByTagName("*");for(var p=0;p<g.length;p++){var C=g[p].getAttribute("data-font-src");if(null!=C){var I="FONT"==g[p].nodeName?g[p].getAttribute("face"):g[p].style.fontFamily;null!=I&&Graph.addFont(I,C)}}};Graph.processFontStyle=function(g){if(null!=g){var p=mxUtils.getValue(g,"fontSource",null);if(null!=p){var C=mxUtils.getValue(g,mxConstants.STYLE_FONTFAMILY,null);if(null!=C)try{Graph.addFont(C,decodeURIComponent(p))}catch(I){}}}return g};
-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.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var m=Graph.prototype.init;Graph.prototype.init=function(){function g(M){p=
-M}m.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var p=null;mxEvent.addListener(this.container,"mouseenter",g);mxEvent.addListener(this.container,"mousemove",g);mxEvent.addListener(this.container,"mouseleave",function(M){p=null});this.isMouseInsertPoint=function(){return null!=p};var C=this.getInsertPoint;this.getInsertPoint=function(M){return null==p||M?C.apply(this,arguments):this.getPointForEvent(p)};var I=this.layoutManager.getLayout;this.layoutManager.getLayout=
-function(M){var O=this.graph.getCellStyle(M);if(null!=O&&"rack"==O.childLayout){var Q=new mxStackLayout(this.graph,!1);Q.gridSize=null!=O.rackUnitSize?parseFloat(O.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Q.marginLeft=O.marginLeft||0;Q.marginRight=O.marginRight||0;Q.marginTop=O.marginTop||0;Q.marginBottom=O.marginBottom||0;Q.allowGaps=O.allowGaps||0;Q.horizontal="1"==mxUtils.getValue(O,"horizontalRack","0");Q.resizeParent=!1;Q.fill=!0;return Q}return I.apply(this,
-arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(g,p){return Graph.processFontStyle(t.apply(this,arguments))};var v=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(g,p,C,I,M,O,Q,U,V,X,W,Y){v.apply(this,arguments);Graph.processFontAttributes(Y)};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(g,p,C,I){function M(){for(var ea=U.getSelectionCells(),da=[],ia=0;ia<ea.length;ia++)U.isCellVisible(ea[ia])&&da.push(ea[ia]);U.setSelectionCells(da)}function O(ea){U.setHiddenTags(ea?[]:V.slice());M();U.refresh()}function Q(ea,da){W.innerText="";if(0<ea.length){var ia=document.createElement("table");ia.setAttribute("cellpadding","2");ia.style.boxSizing="border-box";ia.style.tableLayout="fixed";ia.style.width="100%";
-var la=document.createElement("tbody");if(null!=ea&&0<ea.length)for(var ba=0;ba<ea.length;ba++)(function(fa){function ja(){var ka=U.getCellsForTags([fa],null,null,!0);U.isEnabled()?U.setSelectionCells(ka):U.highlightCells(ka,null,null,70)}var ca=0>mxUtils.indexOf(U.hiddenTags,fa),sa=document.createElement("tr"),pa=document.createElement("td");pa.style.align="center";pa.style.width="16px";var ua=document.createElement("img");ua.setAttribute("src",ca?Editor.visibleImage:Editor.hiddenImage);ua.setAttribute("title",
-mxResources.get(ca?"hideIt":"show",[fa]));mxUtils.setOpacity(ua,ca?75:25);ua.className="geAdaptiveAsset";ua.style.verticalAlign="middle";ua.style.cursor="pointer";ua.style.width="16px";if(p||Editor.isDarkMode())ua.style.filter="invert(100%)";pa.appendChild(ua);mxEvent.addListener(ua,"click",function(ka){mxEvent.isShiftDown(ka)?O(0<=mxUtils.indexOf(U.hiddenTags,fa)):(U.toggleHiddenTag(fa),M(),U.refresh());mxEvent.consume(ka)});sa.appendChild(pa);pa=document.createElement("td");pa.style.align="center";
-pa.style.width="16px";ua=document.createElement("img");ua.setAttribute("src",Editor.selectImage);ua.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ua,ca?75:25);ua.className="geAdaptiveAsset";ua.style.verticalAlign="middle";ua.style.cursor="pointer";ua.style.width="16px";if(p||Editor.isDarkMode())ua.style.filter="invert(100%)";mxEvent.addListener(ua,"click",function(ka){O(!0);ja();mxEvent.consume(ka)});pa.appendChild(ua);sa.appendChild(pa);pa=document.createElement("td");pa.style.overflow=
-"hidden";pa.style.whiteSpace="nowrap";pa.style.textOverflow="ellipsis";pa.style.verticalAlign="middle";pa.style.cursor="pointer";pa.setAttribute("title",fa);a=document.createElement("a");mxUtils.write(a,fa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ca?100:40);pa.appendChild(a);mxEvent.addListener(pa,"click",function(ka){if(mxEvent.isShiftDown(ka))O(!0),ja();else if(ca&&0<U.hiddenTags.length)O(!0);else{var na=V.slice(),za=mxUtils.indexOf(na,fa);na.splice(za,1);
-U.setHiddenTags(na);M();U.refresh()}mxEvent.consume(ka)});sa.appendChild(pa);if(U.isEnabled()){pa=document.createElement("td");pa.style.verticalAlign="middle";pa.style.textAlign="center";pa.style.width="18px";if(null==da){pa.style.align="center";pa.style.width="16px";ua=document.createElement("img");ua.setAttribute("src",Editor.trashImage);ua.setAttribute("title",mxResources.get("removeIt",[fa]));mxUtils.setOpacity(ua,ca?75:25);ua.className="geAdaptiveAsset";ua.style.verticalAlign="middle";ua.style.cursor=
-"pointer";ua.style.width="16px";if(p||Editor.isDarkMode())ua.style.filter="invert(100%)";mxEvent.addListener(ua,"click",function(ka){var na=mxUtils.indexOf(V,fa);0<=na&&V.splice(na,1);U.removeTagsForCells(U.model.getDescendants(U.model.getRoot()),[fa]);U.refresh();mxEvent.consume(ka)});pa.appendChild(ua)}else{var wa=document.createElement("input");wa.setAttribute("type","checkbox");wa.style.margin="0px";wa.defaultChecked=null!=da&&0<=mxUtils.indexOf(da,fa);wa.checked=wa.defaultChecked;wa.style.background=
-"transparent";wa.setAttribute("title",mxResources.get(wa.defaultChecked?"removeIt":"add",[fa]));mxEvent.addListener(wa,"change",function(ka){wa.checked?U.addTagsForCells(U.getSelectionCells(),[fa]):U.removeTagsForCells(U.getSelectionCells(),[fa]);mxEvent.consume(ka)});pa.appendChild(wa)}sa.appendChild(pa)}la.appendChild(sa)})(ea[ba]);ia.appendChild(la);W.appendChild(ia)}}var U=this,V=U.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding=
-"10px";X.style.height="100%";var W=document.createElement("div");W.style.position="absolute";W.style.boxSizing="border-box";W.style.userSelect="none";W.style.overflow="auto";W.style.padding="3px";W.style.left="0px";W.style.right="0px";W.style.top="0px";W.style.bottom="0px";X.appendChild(W);U.addListener(mxEvent.ROOT,function(){V=U.hiddenTags.slice()});var Y=mxUtils.bind(this,function(ea,da){if(g()){ea=U.getAllTags();for(da=0;da<ea.length;da++)0>mxUtils.indexOf(V,ea[da])&&V.push(ea[da]);V.sort();U.isSelectionEmpty()?
-Q(V):Q(V,U.getCommonTagsForCells(U.getSelectionCells()))}});U.selectionModel.addListener(mxEvent.CHANGE,Y);U.model.addListener(mxEvent.CHANGE,Y);U.addListener(mxEvent.REFRESH,Y);var Z=document.createElement("div");Z.className="geToolbarContainer geDialogToolbar";Z.style.position="absolute";Z.style.display="flex";Z.style.bottom="0px";Z.style.left="0px";Z.style.right="0px";Z.style.height="32px";Z.style.overflow="hidden";Z.style.padding="3px 4px 4px 4px";Z.style.borderWidth="1px 0px 0px 0px";Z.style.borderStyle=
-"solid";Z.style.whiteSpace="nowrap";if(U.isEnabled()){W.style.bottom="32px";var aa=document.createElement("a");aa.className="geButton";var ha=aa.cloneNode(!1);ha.style.backgroundImage="url("+Editor.visibleImage+")";ha.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ha,"click",function(ea){U.setHiddenTags([]);mxEvent.isShiftDown(ea)||(V=U.hiddenTags.slice());M();U.refresh();mxEvent.consume(ea)});Z.appendChild(ha);null!=C&&(aa=aa.cloneNode(!1),aa.style.backgroundImage="url("+Editor.plusImage+
-")",aa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(aa,"click",function(ea){C(V,function(da){V=da;Y()});mxEvent.consume(ea)}),Z.appendChild(aa));X.appendChild(Z)}null!=I&&Z.appendChild(I);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var g=this.extFonts;g=null!=g?g.slice():[];for(var p in Graph.customFontElements){var C=Graph.customFontElements[p];g.push({name:C.name,url:C.url})}return g};Graph.prototype.setFont=function(g,p){Graph.addFont(g,p);var C=Editor.guid();
-document.execCommand("fontname",!1,C);for(var I=this.cellEditor.textarea.getElementsByTagName("font"),M=!1,O=0;O<I.length;O++)I[O].getAttribute("face")==C&&(M=!0,I[O].setAttribute("face",g),null!=p?I[O].setAttribute("data-font-src",p):I[O].removeAttribute("data-font-src"));M||document.execCommand("fontname",!1,g)};var E=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return E.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 g=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=g)for(var p in g)this.globalVars[p]=g[p]}catch(C){null!=window.console&&console.log("Error in vars URL parameter: "+C)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var D=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=
-function(g){var p=D.apply(this,arguments);null==p&&null!=this.globalVars&&(p=this.globalVars[g]);return p};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var g=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(g.ownerDocument)).decode(g)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var A=Graph.prototype.getSvg;Graph.prototype.getSvg=function(g,p,C,I,M,O,Q,U,V,X,W,Y,Z,aa,ha,ea){var da=A.apply(this,arguments);
-if(null!=Y){var ia=da.getAttribute("style");null==ia&&(ia="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;da.setAttribute("style",ia+(" color-scheme: "+Y+";"))}var la=this.getCustomFonts();if(W&&0<la.length){var ba=da.ownerDocument;ia=null!=ba.createElementNS?ba.createElementNS(mxConstants.NS_SVG,"style"):ba.createElement("style");null!=ba.setAttributeNS?ia.setAttributeNS("type","text/css"):ia.setAttribute("type","text/css");for(var fa="",
-ja="",ca=0;ca<la.length;ca++){var sa=la[ca].name,pa=la[ca].url;Graph.isCssFontUrl(pa)?fa+="@import url("+Graph.rewriteGoogleFontUrl(pa)+");\n":ja+='@font-face {\nfont-family: "'+sa+'";\nsrc: url("'+pa+'");\n}\n'}ia.appendChild(ba.createTextNode(fa+ja));da.getElementsByTagName("defs")[0].appendChild(ia)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(da);this.mathEnabled&&(document.body.appendChild(da),Editor.MathJaxRender(da),
-da.parentNode.removeChild(da),ia=da.ownerDocument.getElementById("MJX-SVG-styles"),null!=ia&&da.getElementsByTagName("defs")[0].appendChild(ia.cloneNode(!0)));return da};var S=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(g){S.apply(this,arguments);null!=g.secondLabel&&(g.secondLabel.destroy(),g.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(g){return[g.shape,g.text,g.secondLabel,g.control]};var R=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=
-function(){R.apply(this,arguments);this.enumerationState=0};var T=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(g){null!=g.shape&&this.redrawEnumerationState(g);return T.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(g){g=decodeURIComponent(mxUtils.getValue(g.style,"enumerateValue",""));""==g&&(g=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(g)+
-"</div>"};mxGraphView.prototype.redrawEnumerationState=function(g){var p="1"==mxUtils.getValue(g.style,"enumerate",0);p&&null==g.secondLabel?(g.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),g.secondLabel.size=12,g.secondLabel.state=g,g.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(g,g.secondLabel)):p||null==g.secondLabel||(g.secondLabel.destroy(),g.secondLabel=null);p=g.secondLabel;if(null!=p){var C=g.view.scale,
-I=this.createEnumerationValue(g);g=this.graph.model.isVertex(g.cell)?new mxRectangle(g.x+g.width-4*C,g.y+4*C,0,0):mxRectangle.fromPoint(g.view.getPoint(g));p.bounds.equals(g)&&p.value==I&&p.scale==C||(p.bounds=g,p.value=I,p.scale=C,p.redraw())}};var P=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();P.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),
-this.view.validateBackgroundImage())};var q=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){q.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(g,p){"data:action/json,"==g.substring(0,17)&&(g=JSON.parse(g.substring(17)),null!=g.actions&&this.executeCustomActions(g.actions,null,p))};Graph.prototype.executeCustomActions=function(g,p,C){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 I=!1,M=0,O=0,Q=mxUtils.bind(this,function(){I||(I=!0,this.model.beginUpdate())}),U=mxUtils.bind(this,function(){I&&(I=!1,this.model.endUpdate())}),V=mxUtils.bind(this,function(){0<M&&M--;0==M&&X()}),X=mxUtils.bind(this,function(){if(O<g.length){var W=this.stoppingCustomActions,Y=g[O++],
-Z=[];if(null!=Y.open)if(U(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,C))return}else this.openLink(Y.open);null==Y.wait||W||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;V()}),M++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),U());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),
-Y.opacity.value);null!=Y.fadeIn&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,V,W?0:Y.fadeIn.delay));null!=Y.fadeOut&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,V,W?0:Y.fadeOut.delay));null!=Y.wipeIn&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(Q(),this.toggleCells(this.getCellsForAction(Y.toggle,
-!0)));if(null!=Y.show){Q();var aa=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(aa),1);this.setCellsVisible(aa,!0)}null!=Y.hide&&(Q(),aa=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(aa),0),this.setCellsVisible(aa,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&(Q(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&
-null!=Y.style.key&&(Q(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));aa=[];null!=Y.select&&this.isEnabled()&&(aa=this.getCellsForAction(Y.select),this.setSelectionCells(aa));null!=Y.highlight&&(aa=this.getCellsForAction(Y.highlight),this.highlightCells(aa,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));null!=Y.scroll&&(aa=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<aa.length&&this.scrollCellToVisible(aa[0]);
-null!=C&&null!=Y.explore&&Graph.exploreFromCell(this,C,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ha=Y.tags.toggle;0==ha.length&&(ha=this.getAllTags());for(aa=0;aa<ha.length;aa++)this.toggleHiddenTag(ha[aa])}ha=null;null!=Y.tags.hidden&&(null==ha&&(ha=[]),ha=ha.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ha&&(ha=[]);var ea=this.getAllTags();for(aa=0;aa<ea.length;aa++)0>mxUtils.indexOf(Y.tags.visible,ea[aa])&&0>mxUtils.indexOf(ha,ea[aa])&&ha.push(ea[aa])}null!=ha&&this.setHiddenTags(ha);
-this.refresh()}0<Z.length&&(M++,this.executeAnimations(Z,V,W?1:Y.steps,W?0:Y.delay));0==M?X():U()}else this.stoppingCustomActions=this.executingCustomActions=!1,U(),null!=p&&p()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(g,p){var C=this.getLinkForCell(p);null!=C&&"data:action/json,"==C.substring(0,17)&&this.setLinkForCell(p,this.updateCustomLink(g,C));if(this.isHtmlLabel(p)){var I=document.createElement("div");I.innerHTML=Graph.sanitizeHtml(this.getLabel(p));for(var M=I.getElementsByTagName("a"),
-O=!1,Q=0;Q<M.length;Q++)C=M[Q].getAttribute("href"),null!=C&&"data:action/json,"==C.substring(0,17)&&(M[Q].setAttribute("href",this.updateCustomLink(g,C)),O=!0);O&&this.labelChanged(p,I.innerHTML)}};Graph.prototype.updateCustomLink=function(g,p){if("data:action/json,"==p.substring(0,17))try{var C=JSON.parse(p.substring(17));null!=C.actions&&(this.updateCustomLinkActions(g,C.actions),p="data:action/json,"+JSON.stringify(C))}catch(I){}return p};Graph.prototype.updateCustomLinkActions=function(g,p){for(var C=
-0;C<p.length;C++){var I=p[C],M;for(M in I)this.updateCustomLinkAction(g,I[M],"cells"),this.updateCustomLinkAction(g,I[M],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(g,p,C){if(null!=p&&null!=p[C]){for(var I=[],M=0;M<p[C].length;M++)if("*"==p[C][M])I.push(p[C][M]);else{var O=g[p[C][M]];null!=O?""!=O&&I.push(O):I.push(p[C][M])}p[C]=I}};Graph.prototype.getCellsForAction=function(g,p){p=this.getCellsById(g.cells).concat(this.getCellsForTags(g.tags,null,p));if(null!=g.excludeCells){for(var C=
-[],I=0;I<p.length;I++)0>g.excludeCells.indexOf(p[I].id)&&C.push(p[I]);p=C}return p};Graph.prototype.getCellsById=function(g){var p=[];if(null!=g)for(var C=0;C<g.length;C++)if("*"==g[C]){var I=this.model.getRoot();p=p.concat(this.model.filterDescendants(function(O){return O!=I},I))}else{var M=this.model.getCell(g[C]);null!=M&&p.push(M)}return p};var u=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(g){return u.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(g))};
-Graph.prototype.setHiddenTags=function(g){this.hiddenTags=g;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(g){var p=mxUtils.indexOf(this.hiddenTags,g);0>p?this.hiddenTags.push(g):0<=p&&this.hiddenTags.splice(p,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(g){if(null==g||0==g.length||0==this.hiddenTags.length)return!1;g=g.split(" ");if(g.length>this.hiddenTags.length)return!1;for(var p=0;p<g.length;p++)if(0>
-mxUtils.indexOf(this.hiddenTags,g[p]))return!1;return!0};Graph.prototype.getCellsForTags=function(g,p,C,I){var M=[];if(null!=g){p=null!=p?p:this.model.getDescendants(this.model.getRoot());for(var O=0,Q={},U=0;U<g.length;U++)0<g[U].length&&(Q[g[U]]=!0,O++);for(U=0;U<p.length;U++)if(C&&this.model.getParent(p[U])==this.model.root||this.model.isVertex(p[U])||this.model.isEdge(p[U])){var V=this.getTagsForCell(p[U]),X=!1;if(0<V.length&&(V=V.split(" "),V.length>=g.length)){for(var W=X=0;W<V.length&&X<O;W++)null!=
-Q[V[W]]&&X++;X=X==O}X&&(1!=I||this.isCellVisible(p[U]))&&M.push(p[U])}}return M};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(g){for(var p=null,C=[],I=0;I<g.length;I++){var M=this.getTagsForCell(g[I]);C=[];if(0<M.length){M=M.split(" ");for(var O={},Q=0;Q<M.length;Q++)if(null==p||null!=p[M[Q]])O[M[Q]]=!0,C.push(M[Q]);p=O}else return[]}return C};Graph.prototype.getTagsForCells=function(g){for(var p=
-[],C={},I=0;I<g.length;I++){var M=this.getTagsForCell(g[I]);if(0<M.length){M=M.split(" ");for(var O=0;O<M.length;O++)null==C[M[O]]&&(C[M[O]]=!0,p.push(M[O]))}}return p};Graph.prototype.getTagsForCell=function(g){return this.getAttributeForCell(g,"tags","")};Graph.prototype.addTagsForCells=function(g,p){if(0<g.length&&0<p.length){this.model.beginUpdate();try{for(var C=0;C<g.length;C++){for(var I=this.getTagsForCell(g[C]),M=I.split(" "),O=!1,Q=0;Q<p.length;Q++){var U=mxUtils.trim(p[Q]);""!=U&&0>mxUtils.indexOf(M,
-U)&&(I=0<I.length?I+" "+U:U,O=!0)}O&&this.setAttributeForCell(g[C],"tags",I)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(g,p){if(0<g.length&&0<p.length){this.model.beginUpdate();try{for(var C=0;C<g.length;C++){var I=this.getTagsForCell(g[C]);if(0<I.length){for(var M=I.split(" "),O=!1,Q=0;Q<p.length;Q++){var U=mxUtils.indexOf(M,p[Q]);0<=U&&(M.splice(U,1),O=!0)}O&&this.setAttributeForCell(g[C],"tags",M.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=
-function(g){this.model.beginUpdate();try{for(var p=0;p<g.length;p++)this.model.setVisible(g[p],!this.model.isVisible(g[p]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(g,p){this.model.beginUpdate();try{for(var C=0;C<g.length;C++)this.model.setVisible(g[C],p)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(g,p,C,I){for(var M=0;M<g.length;M++)this.highlightCell(g[M],p,C,I)};Graph.prototype.highlightCell=function(g,p,C,I,M){p=null!=p?p:mxConstants.DEFAULT_VALID_COLOR;
-C=null!=C?C:1E3;g=this.view.getState(g);var O=null;null!=g&&(M=null!=M?M:4,M=Math.max(M+1,mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)+M),O=new mxCellHighlight(this,p,M,!1),null!=I&&(O.opacity=I),O.highlight(g),window.setTimeout(function(){null!=O.shape&&(mxUtils.setPrefixedStyle(O.shape.node.style,"transition","all 1200ms ease-in-out"),O.shape.node.style.opacity=0);window.setTimeout(function(){O.destroy()},1200)},C));return O};Graph.prototype.addSvgShadow=function(g,p,C,I){I=null!=I?
-I:!0;var M=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=C&&C||(p=null!=p?p:g.getElementsByTagName("g")[0],null!=p&&(this.updateShadowFilter(p,!0),!isNaN(parseInt(g.getAttribute("width")))&&I&&(g.setAttribute("width",parseInt(g.getAttribute("width"))+M),g.setAttribute("height",parseInt(g.getAttribute("height"))+M),p=g.getAttribute("viewBox"),null!=p&&0<p.length&&(p=p.split(" "),3<p.length&&(w=parseFloat(p[2])+M,h=parseFloat(p[3])+M,g.setAttribute("viewBox",p[0]+" "+p[1]+" "+w+" "+h))))));
-return M};Graph.prototype.updateShadowFilter=function(g,p){mxClient.IS_SF||(p?(p=mxUtils.getLightDarkColor(this.svgShadowColor,this.svgShadowOpacity),g.style.filter="drop-shadow("+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowBlur)/100+"px "+p.cssText+")"):g.style.filter="")};Graph.prototype.setShadowVisible=function(g,p){p=null!=p?p:!0;this.shadowVisible=g;this.updateShadowFilter(this.view.getDrawPane(),this.shadowVisible);
-p&&this.fireEvent(new mxEventObject("shadowVisibleChanged"))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var g=this.model.getChildCount(this.model.root),p=0;do var C=this.model.getChildAt(this.model.root,p);while(p++<g&&"1"==mxUtils.getValue(this.getCellStyle(C),"locked","0"));null!=C&&this.setDefaultParent(C)}};
-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",STENCIL_PATH+"/kubernetes2.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];
-mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",
-STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];
-mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=
-[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",
-STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=
-[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/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.ibmcloud=[STENCIL_PATH+"/ibm_cloud.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.networks2=[SHAPES_PATH+"/mxNetworks2.js",STENCIL_PATH+"/networks2.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"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=
-function(g){var p=null;null!=g&&0<g.length&&("ER"==g.substring(0,2)?p="mxgraph.er":"sysML"==g.substring(0,5)&&(p="mxgraph.sysml"));return p};var J=mxMarker.createMarker;mxMarker.createMarker=function(g,p,C,I,M,O,Q,U,V,X){if(null!=C&&null==mxMarker.markers[C]){var W=this.getPackageForType(C);null!=W&&mxStencilRegistry.getStencil(W)}return J.apply(this,arguments)};var G=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(g,p,C,I,M,O){"1"==mxUtils.getValue(p.style,"lineShape",null)&&
-g.setFillColor(mxUtils.getValue(p.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return G.apply(this,arguments)};PrintDialog.prototype.create=function(g,p,C,I){function M(){ha.value=Math.max(1,Math.min(W,Math.max(parseInt(ha.value),parseInt(aa.value))));aa.value=Math.max(1,Math.min(W,Math.min(parseInt(ha.value),parseInt(aa.value))))}function O(Da){g.lastPrintPagesRadioChecked=Z.checked;g.lastPrintSelectionOnlyChecked=da.checked;g.lastPrintCropRadioChecked=la.checked;g.lastPrintFitRadioChecked=
-ba.checked;Z.checked&&aa.value<ha.value?(g.lastPrintPagesFromInput=aa.value,g.lastPrintPagesToInput=ha.value):(g.lastPrintPagesFromInput=null,g.lastPrintPagesToInput=null);ya.value=Math.max(1,Math.min(1600,parseInt(ya.value)))+"%";g.lastPrintZoom=ya.value;g.lastPrintBorder=ra.value;g.lastPrintGrid=Ca.checked;g.lastPrintTransparent=Ba.checked;g.lastPrintInclude=Fa.checked;g.lastPrintSheetsAcross=na.value;g.lastPrintSheetsDown=za.value;var Ia={};Ia.border=parseInt(ra.value);Ia.scale=parseInt(ya.value)/
-100;Ia.grid=Ca.checked;Ia.shadows=Ha.checked;Ia.transparent=Ba.checked;Ia.includeCopy=Fa.checked;Ia.sheetsAcross=parseInt(na.value);Ia.sheetsDown=parseInt(za.value);Ia.pagesFrom=parseInt(aa.value);Ia.pagesTo=parseInt(ha.value);Ia.allPages=Y.checked;Ia.selection=da.checked;Ia.pageView=ia.checked;Ia.crop=la.checked;Ia.fit=ba.checked;return null!=C?C(!Da,Ia):g.print(!Da,Ia)}var Q=g.editor.graph,U=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign="center";
-V.style.marginTop="0px";mxUtils.write(V,p||mxResources.get("print"));U.appendChild(V);var X=1,W=1;V=document.createElement("div");V.style.whiteSpace="nowrap";var Y=document.createElement("input");Y.style.marginRight="8px";Y.style.marginBottom="8px";Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");V.appendChild(Y);p=document.createElement("span");mxUtils.write(p,mxResources.get("allPages"));mxEvent.addListener(p,"click",function(){Y.checked=!0});V.appendChild(p);mxUtils.br(V);
-var Z=Y.cloneNode(!0);V.appendChild(Z);p=document.createElement("span");mxUtils.write(p,mxResources.get("pages")+":");V.appendChild(p);mxEvent.addListener(p,"click",function(){Z.checked=!0});var aa=document.createElement("input");aa.style.margin="0 4px";aa.setAttribute("value","1");aa.setAttribute("type","number");aa.setAttribute("min","1");aa.style.width="40px";V.appendChild(aa);p=document.createElement("span");mxUtils.write(p,mxResources.get("to"));V.appendChild(p);var ha=aa.cloneNode(!0);V.appendChild(ha);
-mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(ha,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"change",M);mxEvent.addListener(ha,"change",M);if(null!=g.pages&&(W=g.pages.length,null!=g.currentPage))for(var ea=0;ea<W;ea++)if(g.currentPage==g.pages[ea]){X=ea+1;break}null!=g.lastPrintPagesFromInput&&null!=g.lastPrintPagesToInput?(aa.value=Math.min(W,Math.max(1,g.lastPrintPagesFromInput)),ha.value=Math.min(W,Math.max(1,g.lastPrintPagesToInput))):(aa.value=X,
-ha.value=X);aa.setAttribute("max",W);ha.setAttribute("max",W);ea=mxUtils.button(mxResources.get("currentPage"),function(Da){aa.value=X;ha.value=X;Z.checked=!0});ea.setAttribute("title",mxResources.get("currentPage"));ea.style.marginLeft="4px";ea.style.maxWidth="100px";ea.style.overflow="hidden";ea.style.textOverflow="ellipsis";ea.style.whiteSpace="nowrap";V.appendChild(ea);1<W&&U.appendChild(V);V=document.createElement("div");V.style.borderBottom="1px solid lightGray";V.style.paddingBottom="12px";
-V.style.marginBottom="12px";V.style.whiteSpace="nowrap";var da=document.createElement("input");da.setAttribute("name","pages-printdialog");da.setAttribute("type",1==W?"checkbox":"radio");da.style.marginRight="8px";Q.isSelectionEmpty()&&da.setAttribute("disabled","disabled");Q.isEnabled()&&(V.appendChild(da),p=document.createElement("span"),mxUtils.write(p,mxResources.get("selectionOnly")),V.appendChild(p));(Q.isEnabled()||1<W)&&U.appendChild(V);!g.isPagesEnabled()||g.lastPrintPagesRadioChecked?Z.checked=
-!0:!Q.isSelectionEmpty()&&g.lastPrintSelectionOnlyChecked?da.checked=!0:Y.checked=!0;Q.isSelectionEmpty()||mxEvent.addListener(p,"click",function(){da.checked=!da.checked});Q=document.createElement("div");Q.style.whiteSpace="nowrap";var ia=document.createElement("input");ia.style.marginBottom="8px";ia.style.marginRight="8px";ia.setAttribute("type","radio");ia.setAttribute("name","printSize");Q.appendChild(ia);p=document.createElement("span");mxUtils.write(p,mxResources.get("pageView"));Q.appendChild(p);
-mxEvent.addListener(Q,"click",function(){ia.checked=!0});U.appendChild(Q);Q=document.createElement("div");Q.style.whiteSpace="nowrap";var la=document.createElement("input");la.style.marginBottom="8px";la.style.marginRight="8px";la.setAttribute("type","radio");la.setAttribute("name","printSize");Q.appendChild(la);p=document.createElement("span");mxUtils.write(p,mxResources.get("crop"));Q.appendChild(p);mxEvent.addListener(Q,"click",function(){la.checked=!0});U.appendChild(Q);Q=document.createElement("div");
-Q.style.whiteSpace="nowrap";var ba=document.createElement("input");ba.style.marginBottom="8px";ba.style.marginRight="8px";ba.setAttribute("type","radio");ba.setAttribute("name","printSize");p=document.createElement("div");p.style.display="inline-block";p.style.verticalAlign="top";p.style.paddingTop="2px";p.appendChild(ba);Q.appendChild(p);V=document.createElement("table");V.style.display="inline-block";V.style.borderSpacing="0";ea=document.createElement("tbody");var fa=document.createElement("tr"),
-ja=fa.cloneNode(!0),ca=document.createElement("td"),sa=ca.cloneNode(!0),pa=ca.cloneNode(!0),ua=ca.cloneNode(!0),wa=ca.cloneNode(!0),ka=ca.cloneNode(!0);ca.style.textAlign="right";ua.style.textAlign="right";mxUtils.write(ca,mxResources.get("fitTo"));mxEvent.addListener(Q,"click",function(Da){mxEvent.getSource(Da)!=ba&&(ba.checked=!ba.checked)});var na=document.createElement("input");na.style.margin="0 2px";na.style.boxSizing="border-box";na.setAttribute("value",g.lastPrintSheetsAcross||"1");na.setAttribute("min",
-"1");na.setAttribute("type","number");na.style.width="40px";sa.appendChild(na);p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsAcross"));pa.appendChild(p);mxUtils.write(ua,mxResources.get("fitToBy"));var za=na.cloneNode(!0);za.setAttribute("value",g.lastPrintSheetsDown||"1");wa.appendChild(za);mxEvent.addListener(na,"click",function(Da){ba.checked=!0;mxEvent.consume(Da)});mxEvent.addListener(za,"click",function(Da){ba.checked=!0;mxEvent.consume(Da)});g.lastPrintCropRadioChecked?
-la.checked=!0:g.lastPrintFitRadioChecked?ba.checked=!0:ia.checked=!0;p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsDown"));ka.appendChild(p);fa.appendChild(ca);fa.appendChild(sa);fa.appendChild(pa);ja.appendChild(ua);ja.appendChild(wa);ja.appendChild(ka);ea.appendChild(fa);ea.appendChild(ja);V.appendChild(ea);Q.appendChild(V);U.appendChild(Q);Q=document.createElement("div");Q.style.borderTop="1px solid lightGray";Q.style.whiteSpace="nowrap";Q.style.paddingTop="12px";
-Q.style.marginTop="12px";Q.style.paddingLeft="8px";mxUtils.write(Q,mxResources.get("borderWidth")+":");var ra=document.createElement("input");ra.setAttribute("type","number");ra.setAttribute("min","0");ra.style.width="40px";ra.style.marginLeft="4px";ra.value=null!=g.lastPrintBorder?g.lastPrintBorder:mxPrintPreview.prototype.pageMargin;Q.appendChild(ra);p=document.createElement("span");p.style.marginLeft="8px";mxUtils.write(p,mxResources.get("zoom")+":");Q.appendChild(p);var ya=document.createElement("input");
-ya.style.width="60px";ya.style.marginLeft="4px";ya.value=null!=g.lastPrintZoom?g.lastPrintZoom:"100%";Q.appendChild(ya);mxUtils.br(Q);var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");Ca.style.marginTop="12px";Ca.checked=null!=g.lastPrintGrid?g.lastPrintGrid:!1;Q.appendChild(Ca);p=document.createElement("span");p.style.marginLeft="4px";p.style.marginRight="8px";mxUtils.write(p,mxResources.get("grid"));Q.appendChild(p);mxEvent.addListener(p,"click",function(Da){Ca.checked=!0;
-mxEvent.consume(Da)});var Ha=document.createElement("input");Ha.setAttribute("type","checkbox");Ha.style.marginTop="12px";Ha.checked=null!=g.lastPrintShadow?g.lastPrintShadow:!1;Q.appendChild(Ha);p=document.createElement("span");p.style.marginLeft="4px";p.style.marginRight="8px";mxUtils.write(p,mxResources.get("shadows"));Q.appendChild(p);g.isOffline()&&!mxClient.IS_CHROMEAPP||p.appendChild(g.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));mxEvent.addListener(p,"click",function(Da){"IMG"!=
-mxEvent.getSource(Da).nodeName&&(Ha.checked=!0,mxEvent.consume(Da))});Editor.enableShadowOption?null!=C&&mxUtils.br(Q):(Ha.style.display="none",p.style.display="none");var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");Ba.style.marginTop="10px";Ba.checked=null!=g.lastPrintTransparent?g.lastPrintTransparent:!1;null!=C&&(Q.appendChild(Ba),p=document.createElement("span"),p.style.marginLeft="4px",mxUtils.write(p,mxResources.get("transparentBackground")),Q.appendChild(p),mxEvent.addListener(p,
-"click",function(Da){Ba.checked=!0;mxEvent.consume(Da)}));var Fa=document.createElement("input");Fa.setAttribute("type","checkbox");Fa.style.marginTop="10px";Fa.checked=null!=g.lastPrintInclude?g.lastPrintInclude:Editor.defaultIncludeDiagram;null==C||mxClient.IS_CHROMEAPP||"draw.io"!=g.getServiceName()||(mxUtils.br(Q),Q.appendChild(Fa),p=document.createElement("span"),p.style.marginLeft="4px",mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram")),Q.appendChild(p),mxEvent.addListener(p,"click",
-function(Da){Fa.checked=!0;mxEvent.consume(Da)}));U.appendChild(Q);p=document.createElement("div");p.style.marginTop="30px";p.style.textAlign="right";p.style.whiteSpace="nowrap";g.isOffline()&&!mxClient.IS_CHROMEAPP||null!=C||p.appendChild(g.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));Q=mxUtils.button(mxResources.get("cancel"),function(){g.hideDialog()});Q.className="geBtn";g.editor.cancelFirst&&p.appendChild(Q);PrintDialog.previewEnabled&&null==C&&(V=mxUtils.button(mxResources.get("preview"),
-function(){try{g.hideDialog(),O(!1)}catch(Da){g.handleError(Da)}}),V.className="geBtn",p.appendChild(V));I=null!=I?I:null!=C?"export":PrintDialog.previewEnabled?"print":"ok";I=mxUtils.button(mxResources.get(I),function(){try{g.hideDialog(),O(!0)}catch(Da){g.handleError(Da)}});I.className="geBtn gePrimaryBtn";p.appendChild(I);g.editor.cancelFirst||p.appendChild(Q);U.appendChild(p);if(g.editor.isChromelessView()){var Pa=function(){Editor.isDarkMode()?(U.classList.add("geDarkMode"),U.style.colorScheme=
-"dark"):(U.classList.remove("geDarkMode"),U.style.colorScheme="light")};g.addListener("darkModeChanged",Pa);Pa();var Aa=function(Da,Ia){Da=Ia.getProperty("dialog");U.parentNode==Da.container&&(g.editor.removeListener(Aa),g.removeListener(Pa))};g.editor.addListener("hideDialog",Aa)}this.container=U};var H=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||
+null!=g.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=g.shadowOffsetX);null!=g.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=g.shadowOffsetY);null!=g.shadowBlur&&(mxConstants.SHADOW_BLUR=g.shadowBlur);null!=g.enableAnimations&&(Editor.enableAnimations=g.enableAnimations);null!=g.enableChatGpt&&(Editor.enableChatGpt=g.enableChatGpt);null!=g.gptApiKey&&(Editor.gptApiKey=g.gptApiKey);null!=g.geminiApiKey&&(Editor.geminiApiKey=g.geminiApiKey);null!=g.gptModels&&(Editor.gptModels=g.gptModels);null!=g.gptUrl&&
+(Editor.gptUrl=g.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(g){if(null!=g){Editor.prototype.fontCss=g;var p=document.getElementsByTagName("script")[0];if(null!=p&&null!=p.parentNode){var B=document.createElement("style");B.setAttribute("type","text/css");B.appendChild(document.createTextNode(g));p.parentNode.insertBefore(B,p);g=g.split("url(");for(B=1;B<g.length;B++){var K=g[B].indexOf(")");
+K=Editor.trimCssUrl(g[B].substring(0,K));var M=document.createElement("link");M.setAttribute("rel","preload");M.setAttribute("href",K);M.setAttribute("as","font");M.setAttribute("crossorigin","");p.parentNode.insertBefore(M,p)}}}};Editor.trimCssUrl=function(g){return g.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
+Editor.GUID_LENGTH=20;Editor.guid=function(g){g=null!=g?g:Editor.GUID_LENGTH;for(var p=[],B=0;B<g;B++)p.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return p.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},
+{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.generateTimeout=6E4;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(g){g=null!=g&&"mxlibrary"!=g.nodeName?this.extractGraphModel(g):null;if(null!=g){var p=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(p)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[g],"cause",[p]),Error(mxResources.get("notADiagramFile")+" ("+p+")");if("mxGraphModel"==g.nodeName){p=g.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=p&&""!=
+p)p!=this.graph.currentStyle&&(B=null!=this.graph.themes?this.graph.themes[p]:mxUtils.load(STYLE_PATH+"/"+p+".xml").getDocumentElement(),null!=B&&(K=new mxCodec(B.ownerDocument),K.decode(B,this.graph.getStylesheet())));else{var B=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=B){var K=new mxCodec(B.ownerDocument);K.decode(B,this.graph.getStylesheet())}}this.graph.currentStyle=p;this.graph.mathEnabled="1"==urlParams.math||
+"1"==g.getAttribute("math");this.graph.setAdaptiveColors(g.getAttribute("adaptiveColors"));p=g.getAttribute("backgroundImage");null!=p?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(p)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==g.getAttribute("shadow"),!1);if(p=g.getAttribute("extFonts"))try{for(p=p.split("|").map(function(M){M=
+M.split("^");return{name:M[0],url:M[1]}}),B=0;B<p.length;B++)this.graph.addExtFont(p[B].name,p[B].url)}catch(M){console.log("ExtFonts format error: "+M.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 l=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(g,p){g=null!=g?g:!0;var B=l.apply(this,arguments);
+null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&B.setAttribute("style",this.graph.currentStyle);var K=this.graph.getBackgroundImageObject(this.graph.backgroundImage,p);null!=K&&B.setAttribute("backgroundImage",JSON.stringify(K));B.setAttribute("math",this.graph.mathEnabled?"1":"0");B.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?B.setAttribute("adaptiveColors",this.graph.adaptiveColors):B.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&
+0<this.graph.extFonts.length&&(K=this.graph.extFonts.map(function(M){return M.name+"^"+M.url}),B.setAttribute("extFonts",K.join("|")));return B};Editor.prototype.isDataSvg=function(g){try{var p=mxUtils.parseXml(g).documentElement.getAttribute("content");if(null!=p&&(null!=p&&"<"!=p.charAt(0)&&"%"!=p.charAt(0)&&(p=unescape(window.atob?atob(p):Base64.decode(cont,p))),null!=p&&"%"==p.charAt(0)&&(p=decodeURIComponent(p)),null!=p&&0<p.length)){var B=mxUtils.parseXml(p).documentElement;return"mxfile"==
+B.nodeName||"mxGraphModel"==B.nodeName}}catch(K){}return!1};Editor.prototype.extractGraphModel=function(g,p,B){return Editor.extractGraphModel.apply(this,arguments)};var n=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
+n.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(g,p){if("undefined"===typeof window.MathJax){var B=function(){K=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};g=null!=g?
+g:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var K=null;Editor.doMathJaxRender=function(R){try{null==K?(MathJax.typesetClear([R]),MathJax.typeset([R]),B()):K!=R&&Editor.mathJaxQueue.push(R)}catch(T){MathJax.typesetClear([R]),null!=T.retry?(K=R,T.retry.then(function(){MathJax.typesetPromise([R]).then(B)["catch"](function(V){console.log("Error in MathJax.typesetPromise: "+V.toString());B()})})["catch"](function(V){console.log("Error in MathJax.retry: "+V.toString());B()})):null!=window.console&&
+console.log("Error in MathJax.typeset: "+T.toString())}};window.MathJax=null!=p?p:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"],paths:{fonts:DRAW_MATH_URL+"/fonts","mathjax-tex":DRAW_MATH_URL+"/fonts/mathjax-tex-font","mathjax-mhchem-extension":DRAW_MATH_URL+"/fonts/mathjax-mhchem-font-extension","mathjax-bbm-extension":DRAW_MATH_URL+"/fonts/mathjax-bbm-font-extension",
+"mathjax-bboldx-extension":DRAW_MATH_URL+"/fonts/mathjax-bboldx-font-extension","mathjax-dsfont-extension":DRAW_MATH_URL+"/fonts/mathjax-dsfont-font-extension"}},output:{font:"mathjax-tex"},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.onMathJaxDone=function(){};
+var M=Editor.prototype.init;Editor.prototype.init=function(){M.apply(this,arguments);var R=mxUtils.bind(this,function(T,V){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};p=document.getElementsByTagName("script");if(null!=p&&0<p.length){var N=document.createElement("script");N.setAttribute("type","text/javascript");N.setAttribute("src",g);p[0].parentNode.appendChild(N)}}};
+Editor.prototype.csvToArray=function(g){if(0<g.length){var p="",B=[""],K=0,M=!0,N;g=$jscomp.makeIterator(g);for(N=g.next();!N.done;N=g.next())N=N.value,'"'===N?(M&&N===p&&(B[K]+=N),M=!M):","===N&&M?N=B[++K]="":B[K]+=N,p=N;return B}return[]};Editor.prototype.getProxiedUrl=function(g){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(g)){var p=EditorUi.isVisioFilename(g);p=/\.png$/i.test(g)||/\.pdf$/i.test(g)||p;var B=
+"t="+(new Date).getTime();g=PROXY_URL+"?url="+encodeURIComponent(g)+"&"+B+(p?"&base64=1":"")}return g};Editor.prototype.isCorsEnabledForUrl=function(g){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||g.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(g)||"https://raw.githubusercontent.com/"===g.substring(0,34)||
+"https://fonts.googleapis.com/"===g.substring(0,29)||"https://fonts.gstatic.com/"===g.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var g=new mxUrlConverter;g.updateBaseUrl();var p=g.convert,B=this;g.convert=function(K){null!=K&&navigator.onLine&&("http://"!=K.substring(0,7)&&"https://"!=K.substring(0,8)||K.substring(0,g.baseUrl.length)==g.baseUrl||B.crossOriginImages&&B.isCorsEnabledForUrl(K)?"chrome-extension://"!=K.substring(0,19)&&(K=p.apply(this,arguments)):K=PROXY_URL+
+"?url="+encodeURIComponent(K));return K};return g};Editor.createSvgDataUri=function(g){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(g)))};Editor.prototype.convertImageToDataUri=function(g,p,B,K,M){try{var N=!0,R=window.setTimeout(mxUtils.bind(this,function(){N=!1;p(g)}),this.timeout),T=mxUtils.bind(this,function(){null!=K?this.convertImageToDataUri(g,p,B,K,!0):p(g)});if(/(\.svg)$/i.test(g)&&!M)mxUtils.get(g,mxUtils.bind(this,function(X){window.clearTimeout(R);N&&(200>X.getStatus()||
+299<X.getStatus()?T():p(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(R);N&&T()}));else{var V=new Image;this.crossOriginImages&&(V.crossOrigin="anonymous");V.onload=function(){window.clearTimeout(R);if(N)try{K=null!=K&&M?K:1;var X=document.createElement("canvas"),W=X.getContext("2d");W.scale(K,K);X.height=V.height*K;X.width=V.width*K;W.drawImage(V,0,0);p(X.toDataURL())}catch(Y){p(g)}};V.onerror=function(){window.clearTimeout(R);N&&(null!=B?B():p(g))};V.src=
+g}}catch(X){null!=B?B():p(g)}};Editor.prototype.convertImages=function(g,p,B,K){function M(){0<N.length?N.shift()():p(g)}null==K&&(K=this.createImageUrlConverter());var N=[],R=B||{};B=mxUtils.bind(this,function(T,V){T=g.getElementsByTagName(T);for(var X=0;X<T.length;X++)mxUtils.bind(this,function(W){N.push(mxUtils.bind(this,function(){try{if(null!=W){var Y=K.convert(W.getAttribute(V));if(null!=Y&&"data:"!=Y.substring(0,5)){var Z=R[Y];null==Z?this.convertImageToDataUri(Y,function(aa){null!=aa&&(R[Y]=
+aa,W.setAttribute(V,aa));M()},null,Editor.svgRasterScale):(W.setAttribute(V,Z),M())}else null!=Y&&W.setAttribute(V,Y),M()}}catch(aa){M()}}))})(T[X])});B("image","xlink:href");B("img","src");M()};Editor.base64Encode=function(g){for(var p="",B=0,K=g.length,M,N,R;B<K;){M=g.charCodeAt(B++)&255;if(B==K){p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4);p+="==";break}N=g.charCodeAt(B++);
+if(B==K){p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4|(N&240)>>4);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&15)<<2);p+="=";break}R=g.charCodeAt(B++);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4|(N&240)>>4);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&
+15)<<2|(R&192)>>6);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R&63)}return p};Editor.prototype.loadUrl=function(g,p,B,K,M,N,R,T){try{var V=!R&&(K||/(\.png)($|\?)/i.test(g)||/(\.jpe?g)($|\?)/i.test(g)||/(\.gif)($|\?)/i.test(g)||/(\.pdf)($|\?)/i.test(g));M=null!=M?M:!0;var X=mxUtils.bind(this,function(){mxUtils.get(g,mxUtils.bind(this,function(W){200<=W.getStatus()&&299>=W.getStatus()?null!=p&&(W=W.getText(),V&&(N=null!=N?N:"data:image/png;base64,",W=N+Editor.base64Encode(W)),
+p(W)):null!=B&&(0==W.getStatus()?B({message:mxResources.get("accessDenied")},W):404==W.getStatus()?B({message:mxResources.get("fileNotFound"),code:W.getStatus()},W):B({message:this.getErrorMessage(W)},W))}),function(W){null!=B&&B({message:mxResources.get("error")+" "+W.getStatus()})},V,this.timeout,function(){M&&null!=B&&B({code:App.ERROR_TIMEOUT,retry:X})},T)});X()}catch(W){null!=B&&B(W)}};Editor.prototype.getErrorMessage=function(g){var p=mxResources.get("error")+" "+g.getStatus();try{var B=g.getText(),
+K=JSON.parse(B);null!=K&&null!=K.error&&null!=K.error.message&&(p=K.error.message+" ("+p+")")}catch(M){}return p};Editor.prototype.absoluteCssFonts=function(g){var p=null;if(null!=g){var B=g.split("url(");if(0<B.length){p=[B[0]];g=window.location.pathname;var K=null!=g?g.lastIndexOf("/"):-1;0<=K&&(g=g.substring(0,K+1));K=document.getElementsByTagName("base");var M=null;null!=K&&0<K.length&&(M=K[0].getAttribute("href"));for(var N=1;N<B.length;N++)if(K=B[N].indexOf(")"),0<K){var R=Editor.trimCssUrl(B[N].substring(0,
+K));this.graph.isRelativeUrl(R)&&(R=null!=M?M+R:window.location.protocol+"//"+window.location.hostname+("/"==R.charAt(0)?"":g)+R);p.push('url("'+R+'"'+B[N].substring(K))}else p.push(B[N])}else p=[g]}return null!=p?p.join(""):null};Editor.prototype.mapFontUrl=function(g,p,B){/^https?:\/\//.test(p)&&!this.isCorsEnabledForUrl(p)&&(p=PROXY_URL+"?url="+encodeURIComponent(p));B(g,p)};Editor.prototype.embedCssFonts=function(g,p){var B=g.split("url("),K=0;null==this.cachedFonts&&(this.cachedFonts={});var M=
+mxUtils.bind(this,function(){if(0==K){for(var V=[B[0]],X=1;X<B.length;X++){var W=B[X].indexOf(")");V.push('url("');V.push(this.cachedFonts[Editor.trimCssUrl(B[X].substring(0,W))]);V.push('"'+B[X].substring(W))}p(V.join(""))}});if(0<B.length){for(g=1;g<B.length;g++){var N=B[g].indexOf(")"),R=null,T=B[g].indexOf("format(",N);0<T&&(R=Editor.trimCssUrl(B[g].substring(T+7,B[g].indexOf(")",T))));mxUtils.bind(this,function(V){if(null==this.cachedFonts[V]){this.cachedFonts[V]=V;K++;var X="application/x-font-ttf";
+if("svg"==R||/(\.svg)($|\?)/i.test(V))X="image/svg+xml";else if("otf"==R||"embedded-opentype"==R||/(\.otf)($|\?)/i.test(V))X="application/x-font-opentype";else if("woff"==R||/(\.woff)($|\?)/i.test(V))X="application/font-woff";else if("woff2"==R||/(\.woff2)($|\?)/i.test(V))X="application/font-woff2";else if("eot"==R||/(\.eot)($|\?)/i.test(V))X="application/vnd.ms-fontobject";else if("sfnt"==R||/(\.sfnt)($|\?)/i.test(V))X="application/font-sfnt";this.mapFontUrl(X,V,mxUtils.bind(this,function(W,Y){this.loadUrl(Y,
+mxUtils.bind(this,function(Z){this.cachedFonts[V]=Z;K--;M()}),mxUtils.bind(this,function(Z){K--;M()}),!0,null,"data:"+W+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(B[g].substring(0,N)),R)}M()}else p(g)};Editor.prototype.loadFonts=function(g){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(p){this.resolvedFontCss=p;null!=g&&g()})):null!=g&&g()};Editor.prototype.createGoogleFontCache=function(){var g={},p;for(p in Graph.fontMapping)Graph.isCssFontUrl(p)&&
+(g[p]=Graph.fontMapping[p]);return g};Editor.prototype.embedExtFonts=function(g){var p=this.graph.getCustomFonts();if(0<p.length){var B=[],K=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var M=mxUtils.bind(this,function(){0==K&&this.embedCssFonts(B.join(""),g)}),N=0;N<p.length;N++)mxUtils.bind(this,function(R,T){Graph.isCssFontUrl(T)?null==this.cachedGoogleFonts[T]?(K++,this.loadUrl(Graph.rewriteGoogleFontUrl(T),mxUtils.bind(this,function(V){this.cachedGoogleFonts[T]=
+V;B.push(V+"\n");K--;M()}),mxUtils.bind(this,function(V){K--;B.push("@import url("+T+");\n");M()}))):B.push(this.cachedGoogleFonts[T]+"\n"):B.push('@font-face {font-family: "'+R+'";src: url("'+T+'")}\n')})(p[N].name,p[N].url);M()}else g()};Editor.prototype.addMathCss=function(g){g=g.getElementsByTagName("defs");if(null!=g&&0<g.length)for(var p=document.getElementsByTagName("style"),B=0;B<p.length;B++){var K=mxUtils.getTextContent(p[B]);0>K.indexOf("mxPageSelector")&&0<K.indexOf("MathJax")&&g[0].appendChild(p[B].cloneNode(!0))}};
+Editor.prototype.addFontCss=function(g,p){p=null!=p?p:this.absoluteCssFonts(this.fontCss);if(null!=p){var B=mxUtils.getSvgDefs(g),K=p.split("\n");p=[];for(var M=[],N=0;N<K.length;N++)"@import"==K[N].substring(0,7)?p.push(K[N]):M.push(K[N]);g=g.ownerDocument;g=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"style"):g.createElement("style");g.setAttribute("type","text/css");0<p.length&&(mxUtils.setTextContent(g,p.join("\n")),B.appendChild(g));0<M.length&&(g=g.cloneNode(!1),mxUtils.setTextContent(g,
+M.join("\n")),B.appendChild(g))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(g,p,B){var K=mxClient.IS_FF?8192:16384;return Math.min(B,Math.min(K/g,K/p))};Editor.prototype.exportToCanvas=function(g,p,B,K,M,N,R,T,V,X,W,Y,Z,aa,la,fa,ca,ja){try{N=null!=N?N:!0;R=null!=R?R:!0;Y=null!=Y?Y:this.graph;Z=null!=Z?Z:0;var ka=V?null:Y.background;ka==mxConstants.NONE&&(ka=null);null==ka&&(ka=K);null==ka&&0==V&&
+(ka="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(Y.getSvg(null,null,Z,aa,null,R,null,null,null,X,null,fa,ca,ja),mxUtils.bind(this,function(ba){try{ba.style.setProperty("-webkit-font-smoothing","antialiased");ba.style.setProperty("-moz-osx-font-smoothing","grayscale");var ha=new Image;ha.onload=mxUtils.bind(this,function(){try{var da=function(){mxClient.IS_SF?window.setTimeout(function(){ta.drawImage(ha,0,0);g(pa,ba)},0):(ta.drawImage(ha,0,0),g(pa,ba))},pa=document.createElement("canvas"),
+oa=parseInt(ba.getAttribute("width")),qa=parseInt(ba.getAttribute("height"));T=null!=T?T:1;null!=p&&(T=N?Math.min(1,Math.min(3*p/(4*qa),p/oa)):p/oa);T=this.getMaxCanvasScale(oa,qa,T);oa=Math.ceil(T*oa);qa=Math.ceil(T*qa);pa.setAttribute("width",oa);pa.setAttribute("height",qa);var ta=pa.getContext("2d");if(null!=ka){var ia=mxUtils.getLightDarkColor(ka);ta.beginPath();ta.rect(0,0,oa,qa);ta.fillStyle="dark"==fa&&"none"!=Y.getAdaptiveColors()?ia.dark:ia.light;ta.fill()}1!=T&&ta.scale(T,T);if(la){var ma=
+Y.view,ua=ma.scale;ma.scale=1;var ra=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=ua;ra="data:image/svg+xml;base64,"+ra;var za=Y.gridSize*ma.gridSteps*T,Ba=Y.getGraphBounds(),Ga=ma.translate.x*ua,wa=ma.translate.y*ua,Fa=Ga+(Ba.x-Ga)/ua-Z,xa=wa+(Ba.y-wa)/ua-Z,Oa=new Image;Oa.onload=function(){try{for(var Ca=-Math.round(za-mxUtils.mod((Ga-Fa)*T,za)),Ea=-Math.round(za-mxUtils.mod((wa-xa)*T,za));Ca<oa;Ca+=za)for(var Ha=Ea;Ha<qa;Ha+=za)ta.drawImage(Oa,Ca/T,Ha/T);da()}catch(Ja){null!=
+M&&M(Ja)}};Oa.onerror=function(Ca){null!=M&&M(Ca)};Oa.src=ra}else da()}catch(Ca){null!=M&&M(Ca)}});ha.onerror=function(da){null!=M&&M(da)};X&&this.graph.addSvgShadow(ba);this.graph.mathEnabled&&this.addMathCss(ba);var ea=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ba,this.resolvedFontCss),ha.src=Editor.createSvgDataUri(mxUtils.getXml(ba))}catch(da){null!=M&&M(da)}});this.embedExtFonts(mxUtils.bind(this,function(da){try{null!=da&&this.addFontCss(ba,da),this.loadFonts(ea)}catch(pa){null!=
+M&&M(pa)}}))}catch(da){null!=M&&M(da)}}),B,W)}catch(ba){null!=M&&M(ba)}};Editor.crcTable=[];for(var v=0;256>v;v++)for(var A=v,z=0;8>z;z++)A=1==(A&1)?3988292384^A>>>1:A>>>1,Editor.crcTable[v]=A;Editor.updateCRC=function(g,p,B,K){for(var M=0;M<K;M++)g=Editor.crcTable[(g^p.charCodeAt(B+M))&255]^g>>>8;return g};Editor.crc32=function(g){for(var p=-1,B=0;B<g.length;B++)p=p>>>8^Editor.crcTable[(p^g.charCodeAt(B))&255];return(p^-1)>>>0};Editor.writeGraphModelToPng=function(g,p,B,K,M){function N(W,Y){var Z=
+V;V+=Y;return W.substring(Z,V)}function R(W){W=N(W,4);return W.charCodeAt(3)+(W.charCodeAt(2)<<8)+(W.charCodeAt(1)<<16)+(W.charCodeAt(0)<<24)}function T(W){return String.fromCharCode(W>>24&255,W>>16&255,W>>8&255,W&255)}g=g.substring(g.indexOf(",")+1);g=window.atob?atob(g):Base64.decode(g,!0);var V=0;if(N(g,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=M&&M();else if(N(g,4),"IHDR"!=N(g,4))null!=M&&M();else{N(g,17);M=g.substring(0,V);do{var X=R(g);if("IDAT"==N(g,4)){M=g.substring(0,
+V-8);"pHYs"==p&&"dpi"==B?(B=Math.round(K/.0254),B=T(B)+T(B)+String.fromCharCode(1)):B=B+String.fromCharCode(0)+("zTXt"==p?String.fromCharCode(0):"")+K;K=4294967295;K=Editor.updateCRC(K,p,0,4);K=Editor.updateCRC(K,B,0,B.length);M+=T(B.length)+p+B+T(K^4294967295);M+=g.substring(V-8,g.length);break}M+=g.substring(V-8,V-4+X);N(g,X);N(g,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(M):Base64.encode(M,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";
+var D=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(g,p){D.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var P=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){P.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(g,p){var B=null;null!=g.editor.graph.getModel().getParent(p)?B=p.getId():
+null!=g.currentPage&&(B=g.currentPage.getId());return B});if(null!=window.StyleFormatPanel){var J=Format.prototype.init;Format.prototype.init=function(){J.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var L=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?L.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(g){return"simple"==
+Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(g){g=c.apply(this,arguments);var p=this.editorUi,B=p.editor.graph;if(B.isEnabled()){var K=p.getCurrentFile();null!=K&&K.isAutosaveOptional()&&g.appendChild(this.createOption(mxResources.get("autosave"),function(){return p.editor.autosave},function(N){p.editor.setAutosave(N);p.editor.autosave&&K.isModified()&&K.fileChanged()},
+{install:function(N){this.listener=function(){N(p.editor.autosave)};p.editor.addListener("autosaveChanged",this.listener)},destroy:function(){p.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&B.isEnabled()&&"undefined"!==typeof MathJax){var M=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return B.mathEnabled},function(N){p.actions.get("mathematicalTypesetting").funct()},{install:function(N){this.listener=function(){N(B.mathEnabled)};p.addListener("mathEnabledChanged",
+this.listener)},destroy:function(){p.removeListener(this.listener)}});g.appendChild(M);(!p.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&M.appendChild(p.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return g};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,isVisible:function(g){return"0"==mxUtils.getValue(g.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(g){return"1"==mxUtils.getValue(g.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.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:.25,isVisible:function(g){return"0"==mxUtils.getValue(g.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(g){return"1"==mxUtils.getValue(g.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
+type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.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.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",
+min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
+type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",
+dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=
+mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",
+min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",
+dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",
+dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
+max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
+[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
+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;var f=StyleFormatPanel.prototype.init;
+StyleFormatPanel.prototype.init=function(){var g=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=g.style.shape&&!g.containsLabel&&0<g.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);null!=g.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),g.customProperties,g))};var k=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(g){var p=
+this.editorUi.getSelectionState();1==p.cells.length?this.addActions(g,["copyStyle","pasteStyle"]):1<=p.cells.length&&this.addActions(g,["pasteStyle","pasteData"]);k.apply(this,arguments);return g};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(g,p,B,K){function M(ta,ia,ma,ua,ra){if(null!=ma.valueChanged)ma.valueChanged(ia,ra,B,Y);else{Z.getModel().beginUpdate();try{ra=[];var za=[];if(null!=ma.index){for(var Ba=[],Ga=ma.parentRow.nextSibling;Ga&&Ga.getAttribute("data-pName")==
+ta;)Ba.push(Ga.getAttribute("data-pValue")),Ga=Ga.nextSibling;ma.index<Ba.length?null!=ua?Ba.splice(ua,1):Ba[ma.index]=ia:Ba.push(ia);null!=ma.size&&Ba.length>ma.size&&(Ba=Ba.slice(0,ma.size));ia=Ba.join(",");null!=ma.countProperty&&(Z.setCellStyles(ma.countProperty,Ba.length,Z.getSelectionCells()),ra.push(ma.countProperty),za.push(Ba.length))}Z.setCellStyles(ta,ia,Z.getSelectionCells());ra.push(ta);za.push(ia);if(null!=ma.dependentProps)for(ta=0;ta<ma.dependentProps.length;ta++){var wa=ma.dependentPropsDefVal[ta],
+Fa=ma.dependentPropsVals[ta];if(Fa.length>ia)Fa=Fa.slice(0,ia);else for(var xa=Fa.length;xa<ia;xa++)Fa.push(wa);Fa=Fa.join(",");Z.setCellStyles(ma.dependentProps[ta],Fa,Z.getSelectionCells());ra.push(ma.dependentProps[ta]);za.push(Fa)}if("function"==typeof ma.onChange)ma.onChange(Z,ia);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ra,"values",za,"cells",Z.getSelectionCells()))}finally{Z.getModel().endUpdate()}}}function N(ta,ia){ia.style.left="0px";ia.style.top="0px";ia.style.position=
+"relative";ia.style.right="0px";ia.style.bottom="0px";ia.style.width="100%";ia.style.maxWidth="100%";ia.style.maxHeight="100%";ia.style.textAlign="left"}function R(ta,ia,ma){function ua(za){if(null==za||za==mxConstants.NONE)ra.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==za)ra.style.background="";else{var Ba=mxUtils.getLightDarkColor(za);mxUtils.isLightDarkColor(za)&&Ba.light!=Ba.dark?ra.style.background="linear-gradient(to right bottom, "+Ba.cssText+" 50%, "+mxUtils.invertLightDarkColor(Ba).cssText+
+" 50.3%)":ra.style.background=za}}var ra=document.createElement("div");ra.style.width="32px";ra.style.height="8px";ra.style.margin="2px";ra.style.borderStyle="solid";ra.style.borderWidth="1px";ua(ia);btn=mxUtils.button("",mxUtils.bind(Y,function(za){this.editorUi.pickColor(ia,function(Ba){M(ta,Ba,ma);ua(Ba)});mxEvent.consume(za)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(ra);return btn}function T(ta,
+ia,ma,ua,ra,za,Ba){null!=ia&&(ia=ia.split(","),aa.push({name:ta,values:ia,type:ma,defVal:ua,countProperty:ra,parentRow:za,isDeletable:!0,flipBkg:Ba}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ga){for(var wa=za,Fa=0;null!=wa.nextSibling;)if(wa.nextSibling.getAttribute("data-pName")==ta)wa=wa.nextSibling,Fa++;else break;var xa={type:ma,parentRow:za,index:Fa,isDeletable:!0,defVal:ua,countProperty:ra};Fa=W(ta,"",xa,0==Fa%2,Ba);M(ta,ua,xa);wa.parentNode.insertBefore(Fa,wa.nextSibling);mxEvent.consume(Ga)}));
+btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function V(ta,ia,ma,ua,ra,za,Ba){if(0<ra){var Ga=Array(ra);ia=null!=ia?ia.split(","):[];for(var wa=0;wa<ra;wa++)Ga[wa]=null!=ia[wa]?ia[wa]:null!=ua?ua:"";aa.push({name:ta,values:Ga,type:ma,defVal:ua,parentRow:za,flipBkg:Ba,size:ra})}return document.createElement("div")}function X(ta,ia,ma){var ua=document.createElement("input");ua.type="checkbox";ua.checked="1"==ia;mxEvent.addListener(ua,"change",function(){M(ta,
+ua.checked?"1":"0",ma,null,ua)});return ua}function W(ta,ia,ma,ua,ra){var za=ma.dispName,Ba=ma.type,Ga=document.createElement("tr");Ga.className="gePropRow"+(ra?"Dark":"")+(ua?"Alt":"")+" gePropNonHeaderRow";Ga.setAttribute("data-pName",ta);Ga.setAttribute("data-pValue",ia);ua=!1;null!=ma.index&&(Ga.setAttribute("data-index",ma.index),za=(null!=za?za:"")+"["+ma.index+"]",ua=!0);var wa=document.createElement("td");wa.className="gePropRowCell";za=mxResources.get(za,null,za);mxUtils.write(wa,za);wa.setAttribute("title",
+za);ua&&(wa.style.textAlign="right");Ga.appendChild(wa);wa=document.createElement("td");wa.className="gePropRowCell";wa.setAttribute("title",null!=ia?decodeURIComponent(ia):mxResources.get("none"));mxEvent.addListener(wa,"click",mxUtils.bind(Y,function(Ca){!mxUtils.isAncestorNode(Ga,document.activeElement)&&mxUtils.isAncestorNode(Ga.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(Ca))}));if("color"==
+Ba)wa.appendChild(R(ta,ia,ma));else if("bool"==Ba||"boolean"==Ba)wa.appendChild(X(ta,ia,ma));else if("enum"==Ba){var Fa=ma.enumList;wa.innerHTML="";var xa=document.createElement("div");xa.className="gePropValue";wa.appendChild(xa);for(ra=0;ra<Fa.length;ra++)if(za=Fa[ra],za.val==ia){mxUtils.write(xa,mxResources.get(za.dispName,null,za.dispName));break}mxEvent.addListener(wa,"click",mxUtils.bind(Y,function(Ca){var Ea=mxEvent.getSource(Ca);if(!(Ea!=wa&&Ea!=xa||mxEvent.isConsumed(Ca))){xa.innerHTML="";
+var Ha=document.createElement("select"),Ja=null;N(wa,Ha);for(Ca=0;Ca<Fa.length;Ca++){Ea=Fa[Ca];var La=document.createElement("option");La.value=mxUtils.htmlEntities(Ea.val);mxUtils.write(La,mxResources.get(Ea.dispName,null,Ea.dispName));Ha.appendChild(La);null==Ea.val&&(La.value="null",Ja=La)}Ha.value=null==ia&&null!=Ja?"null":ia;xa.appendChild(Ha);mxEvent.addListener(Ha,"change",function(){var Za=mxUtils.htmlEntities(Ha.value);if(Ha[Ha.selectedIndex]==Ja||"null"==Za.value)Za=null;M(ta,Za,ma)});Ha.focus();
+mxEvent.addListener(Ha,"blur",function(){xa.innerHTML="";for(var Za=0;Za<Fa.length;Za++){var $a=Fa[Za];if($a.val==Ha.value){mxUtils.write(xa,mxResources.get($a.dispName,null,$a.dispName));break}}})}}))}else if("dynamicArr"==Ba)wa.appendChild(T(ta,ia,ma.subType,ma.subDefVal,ma.countProperty,Ga,ra));else if("staticArr"==Ba)wa.appendChild(V(ta,ia,ma.subType,ma.subDefVal,ma.size,Ga,ra));else if("readOnly"==Ba)ra=document.createElement("input"),ra.setAttribute("readonly",""),ra.value=ia,ra.style.borderWidth=
+"0px","id"==ta||"shape"==ta?(Ga.firstChild.innerHTML="",Ga.firstChild.setAttribute("colspan","2"),ra.style.flexGrow="1",ra.style.marginLeft="4px",ra.style.textAlign="id"==ta?"center":"left",ra.setAttribute("title",ia),za=document.createElement("div"),mxUtils.write(za,mxResources.get(ta)+":"),za.style.display="inline-flex",za.style.alignItems="center",za.style.width="100%",za.appendChild(ra),Ga.firstChild.appendChild(za)):(ra.style.width="96px",wa.appendChild(ra));else{wa.innerHTML="";var Oa=document.createElement("div");
+Oa.className="gePropValue";wa.appendChild(Oa);Oa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ia));mxEvent.addListener(wa,"click",mxUtils.bind(Y,function(Ca){function Ea(){var La=Ja.value;La=0==La.length&&"string"!=Ba&&"numbers"!=Ba?0:La;ma.allowAuto&&(null!=La.trim&&"auto"==La.trim().toLowerCase()?(La="auto",Ba="string"):(La=parseFloat(La),La=isNaN(La)?0:La));null!=ma.min&&La<ma.min?La=ma.min:null!=ma.max&&La>ma.max&&(La=ma.max);var Za=null;try{Za="numbers"==Ba?La.match(/\d+/g).map(Number).join(" "):
+encodeURIComponent(("int"==Ba?parseInt(La):La)+"")}catch($a){}M(ta,Za,ma,null,Ja)}var Ha=mxEvent.getSource(Ca);if(!(Ha!=wa&&Ha!=Oa||mxEvent.isConsumed(Ca))){Oa.innerHTML="";var Ja=document.createElement("input");N(Oa,Ja);Ja.value=decodeURIComponent(ia);Ja.className="gePropEditor";"int"!=Ba&&"float"!=Ba||ma.allowAuto||(Ja.type="number",Ja.step="int"==Ba?"1":"any",null!=ma.min&&(Ja.min=parseFloat(ma.min)),null!=ma.max&&(Ja.max=parseFloat(ma.max)));Oa.appendChild(Ja);mxEvent.addListener(Ja,"keypress",
+function(La){13==La.keyCode&&Ea()});Ja.focus();mxEvent.addListener(Ja,"blur",function(){Ea()})}}))}ma.isDeletable&&(ra=mxUtils.button("-",mxUtils.bind(Y,function(Ca){M(ta,"",ma,ma.index);mxEvent.consume(Ca)})),ra.style.height="16px",ra.style.width="25px",ra.style.float="right",ra.className="geColorBtn",wa.appendChild(ra));Ga.appendChild(wa);return Ga}var Y=this,Z=this.editorUi.editor.graph,aa=[],la=document.createElement("table");la.className="geProperties geFullWidthElement";var fa=document.createElement("tr");
+fa.className="gePropHeader";var ca=document.createElement("th");ca.className="gePropHeaderCell";ca.style.paddingLeft="16px";ca.style.backgroundRepeat="no-repeat";ca.style.backgroundPosition="-2px 50%";ca.style.backgroundSize="20px";mxUtils.write(ca,mxResources.get("property"));fa.style.cursor="pointer";var ja=function(){var ta=la.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){ca.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var ia="none";for(var ma=g.childNodes.length-
+1;0<=ma;ma--)try{var ua=g.childNodes[ma],ra=ua.nodeName.toUpperCase();"INPUT"!=ra&&"SELECT"!=ra||g.removeChild(ua)}catch(za){}}else ca.style.backgroundImage="url('"+Editor.arrowDownImage+"')",ia="";for(ma=0;ma<ta.length;ma++)ta[ma].style.display=ia};mxEvent.addListener(fa,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;ja()});fa.appendChild(ca);var ka=document.createElement("th");ka.className="gePropHeaderCell";ka.style.paddingLeft="4px";mxUtils.write(ka,mxResources.get("value"));
+fa.appendChild(ka);la.appendChild(fa);var ba=ka=!1;fa=null;1==B.vertices.length&&0==B.edges.length?fa=B.vertices[0].id:0==B.vertices.length&&1==B.edges.length&&(fa=B.edges[0].id);null==fa||K||(la.appendChild(W("id",mxUtils.htmlEntities(fa),{dispName:"id",type:"readOnly"},!0,!1)),null!=B.style&&null!=B.style.shape&&la.appendChild(W("shape",mxUtils.htmlEntities(B.style.shape),{dispName:"shape",type:"readOnly"},!0,!1)));for(var ha in p)if(K=p[ha],("function"!=typeof K.isVisible||K.isVisible(B,this))&&
+!K.primary){var ea=null!=K.getValue?K.getValue(B,this):null!=B.style[ha]?mxUtils.htmlEntities(B.style[ha]+""):null!=K.getDefaultValue?K.getDefaultValue(B,this):K.defVal;if("separator"==K.type)ba=!ba;else{if("staticArr"==K.type)K.size=parseInt(B.style[K.sizeProperty]||p[K.sizeProperty].defVal)||0;else if(null!=K.dependentProps){var da=K.dependentProps,pa=[],oa=[];for(fa=0;fa<da.length;fa++)if(null!=p[da[fa]]){var qa=B.style[da[fa]];oa.push(p[da[fa]].subDefVal);pa.push(null!=qa?qa.split(","):[])}K.dependentPropsDefVal=
+oa;K.dependentPropsVals=pa}la.appendChild(W(ha,ea,K,ka,ba));ka=!ka}}for(fa=0;fa<aa.length;fa++)for(K=aa[fa],p=K.parentRow,ha=0;ha<K.values.length;ha++)ka=W(K.name,K.values[ha],{type:K.type,parentRow:K.parentRow,isDeletable:K.isDeletable,index:ha,defVal:K.defVal,countProperty:K.countProperty,size:K.size},0==ha%2,K.flipBkg),p.parentNode.insertBefore(ka,p.nextSibling),p=ka;g.appendChild(la);ja();return g};StyleFormatPanel.prototype.addStyles=function(g){if(null!=this.defaultColorSchemes){var p=this.editorUi,
+B=p.editor.graph,K=document.createElement("div");K.style.padding="6px 20px 0 24px";g.appendChild(K);var M=document.createElement("div");M.className="geSwitcher";M.style.padding="4px 18px 6px 0px";for(var N=[],R=0;R<this.defaultColorSchemes.length;R++){var T=document.createElement("div");T.className="geSwitcherDot";mxUtils.bind(this,function(Z){mxEvent.addListener(T,"click",mxUtils.bind(this,function(){V(Z)}))})(R);N.push(T);M.appendChild(T)}var V=mxUtils.bind(this,function(Z){null!=N[Z]&&(null!=this.format.currentScheme&&
+null!=N[this.format.currentScheme]&&(N[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Z,X(this.defaultColorSchemes[this.format.currentScheme]),N[this.format.currentScheme].style.background="#84d7ff")}),X=mxUtils.bind(this,function(Z){var aa=mxUtils.clone(B.defaultVertexStyle);aa[mxConstants.STYLE_STROKECOLOR]=null!=aa[mxConstants.STYLE_STROKECOLOR]?aa[mxConstants.STYLE_STROKECOLOR]:"default";aa[mxConstants.STYLE_FILLCOLOR]=null!=aa[mxConstants.STYLE_FILLCOLOR]?
+aa[mxConstants.STYLE_FILLCOLOR]:"default";aa[mxConstants.STYLE_FONTCOLOR]=null!=aa[mxConstants.STYLE_FONTCOLOR]?aa[mxConstants.STYLE_FONTCOLOR]:"default";B.replaceDefaultColors(new mxCell,aa);var la=mxUtils.bind(this,function(ca){var ja=mxUtils.button("",mxUtils.bind(this,function(ha){B.getModel().beginUpdate();try{for(var ea=p.getSelectionState().cells,da=0;da<ea.length;da++){var pa=B.getModel().getStyle(ea[da]);null!=ca?(mxEvent.isShiftDown(ha)||(pa=""==ca.fill||null==ca.fill?mxUtils.setStyle(pa,
+mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(pa,mxConstants.STYLE_FILLCOLOR,ca.fill),pa=""==ca.gradient||null==ca.gradient?mxUtils.setStyle(pa,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(pa,mxConstants.STYLE_GRADIENTCOLOR,ca.gradient),mxEvent.isControlDown(ha)||mxClient.IS_MAC&&mxEvent.isMetaDown(ha)||!B.getModel().isVertex(ea[da])||(pa=""==ca.font||null==ca.font?mxUtils.setStyle(pa,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(pa,mxConstants.STYLE_FONTCOLOR,ca.font))),mxEvent.isAltDown(ha)||
+(pa=""==ca.stroke||null==ca.fill?mxUtils.setStyle(pa,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(pa,mxConstants.STYLE_STROKECOLOR,ca.stroke))):(pa=mxUtils.setStyle(pa,mxConstants.STYLE_FILLCOLOR,null),pa=mxUtils.setStyle(pa,mxConstants.STYLE_STROKECOLOR,null),pa=mxUtils.setStyle(pa,mxConstants.STYLE_GRADIENTCOLOR,null),B.getModel().isVertex(ea[da])&&(pa=mxUtils.setStyle(pa,mxConstants.STYLE_FONTCOLOR,null)));B.getModel().setStyle(ea[da],pa)}}finally{B.getModel().endUpdate()}}));ja.className=
+"geStyleButton";ja.style.width="36px";ja.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ja.style.margin="0px 6px 6px 0px";if(null!=ca){var ka="1px solid";null!=ca.border&&(ka=ca.border);if(null!=ca.gradient)ja.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(ca.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ca.gradient).cssText+" 100%)";else if(ca.fill==mxConstants.NONE)ja.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ca.fill||""==ca.fill)ja.style.backgroundColor=
+mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var ba=mxUtils.getLightDarkColor(ca.fill);ja.style.backgroundImage="linear-gradient(to right bottom, "+ba.cssText+" 50%, "+ba.light+" 50.3%)"}null==ca.stroke||ca.stroke==mxConstants.NONE?ja.style.border=ka+" transparent":""==ca.stroke?ja.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(ba=mxUtils.getLightDarkColor(ca.stroke),ja.style.border=
+ka+" "+ba.cssText,ja.style.borderRightColor=ba.light,ja.style.borderBottomColor=ja.style.borderRightColor);null!=ca.title&&ja.setAttribute("title",ca.title)}else ka=mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),ba=mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,"#000000"),ja.style.backgroundColor=ka,ja.style.border="1px solid "+ba;ja.style.borderRadius="0";K.appendChild(ja);null!=ca&&null!=ca.gradient&&(ka=ja.cloneNode(!1),ka.style.backgroundImage="linear-gradient(light-dark(transparent, "+
+mxUtils.getLightDarkColor(ca.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ca.gradient).light+") 100%)",ka.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",ka.style.backgroundColor="transparent",K.appendChild(ka),ka.style.marginLeft="-42px",mxEvent.addListener(ka,"click",function(){ja.click()}))});K.innerText="";if(null!=Z)for(var fa=0;fa<Z.length;fa++)0<fa&&0==mxUtils.mod(fa,4)&&mxUtils.br(K),la(Z[fa])});null==this.format.currentScheme?V(Math.min(N.length-1,Editor.isDarkMode()?
+1:"1"==urlParams.sketch?5:0)):V(this.format.currentScheme);R=10>=this.defaultColorSchemes.length?43:23;var W=document.createElement("div");W.className="geButton";W.style.cssText="position:absolute;left:0px;bottom:"+R+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(W,"click",mxUtils.bind(this,function(){V(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Y=document.createElement("div");Y.className="geButton";Y.style.cssText="position:absolute;left:186px;bottom:"+
+R+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(g.appendChild(W),g.appendChild(Y));mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){V(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));X(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&g.appendChild(M)}return g}}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.isGoogleFontUrl=function(g){return g.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||g.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(g){return Graph.isGoogleFontUrl(g)};Graph.rewriteGoogleFontUrl=function(g){null!=g&&g.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(g=Editor.GOOGLE_FONTS_CSS2+g.substring(Editor.GOOGLE_FONTS.length)+
+":wght@400;500");return g};Graph.createFontElement=function(g,p){var B=Graph.fontMapping[p];null==B&&Graph.isCssFontUrl(p)?(g=document.createElement("link"),g.setAttribute("rel","stylesheet"),g.setAttribute("type","text/css"),g.setAttribute("charset","UTF-8"),g.setAttribute("href",Graph.rewriteGoogleFontUrl(p))):(null==B&&(B='@font-face {\nfont-family: "'+g+'";\nsrc: url("'+p+'");\n}'),g=document.createElement("style"),mxUtils.write(g,B));return g};Graph.addRecentCustomFont=function(g,p){};Graph.addFont=
+function(g,p,B,K){if(null!=g&&0<g.length&&null!=p&&0<p.length){K=null!=K?K:Graph.customFontElements;var M=g.toLowerCase();if("helvetica"!=M&&"arial"!=g&&"sans-serif"!=M){var N=K[M];null!=N&&N.url!=p&&(N.elt.parentNode.removeChild(N.elt),N=null);null==N?(N=p,"http:"==p.substring(0,5)&&(N=PROXY_URL+"?url="+encodeURIComponent(p)),N={name:g,url:p,elt:Graph.createFontElement(g,N)},K[M]=N,p=K==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=B&&("link"==N.elt.nodeName.toLowerCase()?
+(N.elt.onload=B,N.elt.onerror=B):B()),null!=p&&p.appendChild(N.elt)):null!=B&&B()}else null!=B&&B()}else null!=B&&B();return g};Graph.getFontUrl=function(g,p){g=Graph.customFontElements[g.toLowerCase()];null!=g&&(p=g.url);return p};Graph.processFontAttributes=function(g){g=g.getElementsByTagName("*");for(var p=0;p<g.length;p++){var B=g[p].getAttribute("data-font-src");if(null!=B){var K="FONT"==g[p].nodeName?g[p].getAttribute("face"):g[p].style.fontFamily;null!=K&&Graph.addFont(K,B)}}};Graph.processFontStyle=
+function(g){if(null!=g){var p=mxUtils.getValue(g,"fontSource",null);if(null!=p){var B=mxUtils.getValue(g,mxConstants.STYLE_FONTFAMILY,null);if(null!=B)try{Graph.addFont(B,decodeURIComponent(p))}catch(K){}}}return g};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.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
+"0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var m=Graph.prototype.init;Graph.prototype.init=function(){function g(M){p=M}m.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var p=null;mxEvent.addListener(this.container,"mouseenter",g);mxEvent.addListener(this.container,"mousemove",g);mxEvent.addListener(this.container,"mouseleave",function(M){p=null});
+this.isMouseInsertPoint=function(){return null!=p};var B=this.getInsertPoint;this.getInsertPoint=function(M){return null==p||M?B.apply(this,arguments):this.getPointForEvent(p)};var K=this.layoutManager.getLayout;this.layoutManager.getLayout=function(M){var N=this.graph.getCellStyle(M);if(null!=N&&"rack"==N.childLayout){var R=new mxStackLayout(this.graph,!1);R.gridSize=null!=N.rackUnitSize?parseFloat(N.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;R.marginLeft=N.marginLeft||
+0;R.marginRight=N.marginRight||0;R.marginTop=N.marginTop||0;R.marginBottom=N.marginBottom||0;R.allowGaps=N.allowGaps||0;R.horizontal="1"==mxUtils.getValue(N,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return K.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(g,p){return Graph.processFontStyle(t.apply(this,arguments))};var x=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=
+function(g,p,B,K,M,N,R,T,V,X,W,Y){x.apply(this,arguments);Graph.processFontAttributes(Y)};var y=mxText.prototype.redraw;mxText.prototype.redraw=function(){y.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(g,p,B,K){function M(){for(var fa=T.getSelectionCells(),ca=[],ja=0;ja<fa.length;ja++)T.isCellVisible(fa[ja])&&ca.push(fa[ja]);T.setSelectionCells(ca)}function N(fa){T.setHiddenTags(fa?[]:V.slice());
+M();T.refresh()}function R(fa,ca){W.innerText="";if(0<fa.length){var ja=document.createElement("table");ja.setAttribute("cellpadding","2");ja.style.boxSizing="border-box";ja.style.tableLayout="fixed";ja.style.width="100%";var ka=document.createElement("tbody");if(null!=fa&&0<fa.length)for(var ba=0;ba<fa.length;ba++)(function(ha){function ea(){var ia=T.getCellsForTags([ha],null,null,!0);T.isEnabled()?T.setSelectionCells(ia):T.highlightCells(ia,null,null,70)}var da=0>mxUtils.indexOf(T.hiddenTags,ha),
+pa=document.createElement("tr"),oa=document.createElement("td");oa.style.align="center";oa.style.width="16px";var qa=document.createElement("img");qa.setAttribute("src",da?Editor.visibleImage:Editor.hiddenImage);qa.setAttribute("title",mxResources.get(da?"hideIt":"show",[ha]));mxUtils.setOpacity(qa,da?75:25);qa.className="geAdaptiveAsset";qa.style.verticalAlign="middle";qa.style.cursor="pointer";qa.style.width="16px";if(p||Editor.isDarkMode())qa.style.filter="invert(100%)";oa.appendChild(qa);mxEvent.addListener(qa,
+"click",function(ia){mxEvent.isShiftDown(ia)?N(0<=mxUtils.indexOf(T.hiddenTags,ha)):(T.toggleHiddenTag(ha),M(),T.refresh());mxEvent.consume(ia)});pa.appendChild(oa);oa=document.createElement("td");oa.style.align="center";oa.style.width="16px";qa=document.createElement("img");qa.setAttribute("src",Editor.selectImage);qa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(qa,da?75:25);qa.className="geAdaptiveAsset";qa.style.verticalAlign="middle";qa.style.cursor="pointer";qa.style.width=
+"16px";if(p||Editor.isDarkMode())qa.style.filter="invert(100%)";mxEvent.addListener(qa,"click",function(ia){N(!0);ea();mxEvent.consume(ia)});oa.appendChild(qa);pa.appendChild(oa);oa=document.createElement("td");oa.style.overflow="hidden";oa.style.whiteSpace="nowrap";oa.style.textOverflow="ellipsis";oa.style.verticalAlign="middle";oa.style.cursor="pointer";oa.setAttribute("title",ha);a=document.createElement("a");mxUtils.write(a,ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,
+da?100:40);oa.appendChild(a);mxEvent.addListener(oa,"click",function(ia){if(mxEvent.isShiftDown(ia))N(!0),ea();else if(da&&0<T.hiddenTags.length)N(!0);else{var ma=V.slice(),ua=mxUtils.indexOf(ma,ha);ma.splice(ua,1);T.setHiddenTags(ma);M();T.refresh()}mxEvent.consume(ia)});pa.appendChild(oa);if(T.isEnabled()){oa=document.createElement("td");oa.style.verticalAlign="middle";oa.style.textAlign="center";oa.style.width="18px";if(null==ca){oa.style.align="center";oa.style.width="16px";qa=document.createElement("img");
+qa.setAttribute("src",Editor.trashImage);qa.setAttribute("title",mxResources.get("removeIt",[ha]));mxUtils.setOpacity(qa,da?75:25);qa.className="geAdaptiveAsset";qa.style.verticalAlign="middle";qa.style.cursor="pointer";qa.style.width="16px";if(p||Editor.isDarkMode())qa.style.filter="invert(100%)";mxEvent.addListener(qa,"click",function(ia){var ma=mxUtils.indexOf(V,ha);0<=ma&&V.splice(ma,1);T.removeTagsForCells(T.model.getDescendants(T.model.getRoot()),[ha]);T.refresh();mxEvent.consume(ia)});oa.appendChild(qa)}else{var ta=
+document.createElement("input");ta.setAttribute("type","checkbox");ta.style.margin="0px";ta.defaultChecked=null!=ca&&0<=mxUtils.indexOf(ca,ha);ta.checked=ta.defaultChecked;ta.style.background="transparent";ta.setAttribute("title",mxResources.get(ta.defaultChecked?"removeIt":"add",[ha]));mxEvent.addListener(ta,"change",function(ia){ta.checked?T.addTagsForCells(T.getSelectionCells(),[ha]):T.removeTagsForCells(T.getSelectionCells(),[ha]);mxEvent.consume(ia)});oa.appendChild(ta)}pa.appendChild(oa)}ka.appendChild(pa)})(fa[ba]);
+ja.appendChild(ka);W.appendChild(ja)}}var T=this,V=T.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var W=document.createElement("div");W.style.position="absolute";W.style.boxSizing="border-box";W.style.userSelect="none";W.style.overflow="auto";W.style.padding="3px";W.style.left="0px";W.style.right="0px";W.style.top="0px";W.style.bottom="0px";X.appendChild(W);T.addListener(mxEvent.ROOT,function(){V=
+T.hiddenTags.slice()});var Y=mxUtils.bind(this,function(fa,ca){if(g()){fa=T.getAllTags();for(ca=0;ca<fa.length;ca++)0>mxUtils.indexOf(V,fa[ca])&&V.push(fa[ca]);V.sort();T.isSelectionEmpty()?R(V):R(V,T.getCommonTagsForCells(T.getSelectionCells()))}});T.selectionModel.addListener(mxEvent.CHANGE,Y);T.model.addListener(mxEvent.CHANGE,Y);T.addListener(mxEvent.REFRESH,Y);var Z=document.createElement("div");Z.className="geToolbarContainer geDialogToolbar";Z.style.position="absolute";Z.style.display="flex";
+Z.style.bottom="0px";Z.style.left="0px";Z.style.right="0px";Z.style.height="32px";Z.style.overflow="hidden";Z.style.padding="3px 4px 4px 4px";Z.style.borderWidth="1px 0px 0px 0px";Z.style.borderStyle="solid";Z.style.whiteSpace="nowrap";if(T.isEnabled()){W.style.bottom="32px";var aa=document.createElement("a");aa.className="geButton";var la=aa.cloneNode(!1);la.style.backgroundImage="url("+Editor.visibleImage+")";la.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(la,"click",function(fa){T.setHiddenTags([]);
+mxEvent.isShiftDown(fa)||(V=T.hiddenTags.slice());M();T.refresh();mxEvent.consume(fa)});Z.appendChild(la);null!=B&&(aa=aa.cloneNode(!1),aa.style.backgroundImage="url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(aa,"click",function(fa){B(V,function(ca){V=ca;Y()});mxEvent.consume(fa)}),Z.appendChild(aa));X.appendChild(Z)}null!=K&&Z.appendChild(K);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var g=this.extFonts;g=null!=g?g.slice():[];
+for(var p in Graph.customFontElements){var B=Graph.customFontElements[p];g.push({name:B.name,url:B.url})}return g};Graph.prototype.setFont=function(g,p){Graph.addFont(g,p);var B=Editor.guid();document.execCommand("fontname",!1,B);for(var K=this.cellEditor.textarea.getElementsByTagName("font"),M=!1,N=0;N<K.length;N++)K[N].getAttribute("face")==B&&(M=!0,K[N].setAttribute("face",g),null!=p?K[N].setAttribute("data-font-src",p):K[N].removeAttribute("data-font-src"));M||document.execCommand("fontname",
+!1,g)};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.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 g=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=g)for(var p in g)this.globalVars[p]=g[p]}catch(B){null!=window.console&&console.log("Error in vars URL parameter: "+
+B)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var E=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(g){var p=E.apply(this,arguments);null==p&&null!=this.globalVars&&(p=this.globalVars[g]);return p};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var g=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(g.ownerDocument)).decode(g)}return this.defaultStylesheet};
+Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(g,p,B,K,M,N,R,T,V,X,W,Y,Z,aa,la,fa){var ca=C.apply(this,arguments);if(null!=Y){var ja=ca.getAttribute("style");null==ja&&(ja="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;ca.setAttribute("style",ja+(" color-scheme: "+Y+";"))}var ka=this.getCustomFonts();if(W&&0<ka.length){var ba=ca.ownerDocument;ja=null!=ba.createElementNS?
+ba.createElementNS(mxConstants.NS_SVG,"style"):ba.createElement("style");null!=ba.setAttributeNS?ja.setAttributeNS("type","text/css"):ja.setAttribute("type","text/css");for(var ha="",ea="",da=0;da<ka.length;da++){var pa=ka[da].name,oa=ka[da].url;Graph.isCssFontUrl(oa)?ha+="@import url("+Graph.rewriteGoogleFontUrl(oa)+");\n":ea+='@font-face {\nfont-family: "'+pa+'";\nsrc: url("'+oa+'");\n}\n'}ja.appendChild(ba.createTextNode(ha+ea));ca.getElementsByTagName("defs")[0].appendChild(ja)}Editor.replaceSvgDataUris&&
+null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ca);this.mathEnabled&&(document.body.appendChild(ca),Editor.MathJaxRender(ca),ca.parentNode.removeChild(ca),ja=ca.ownerDocument.getElementById("MJX-SVG-styles"),null!=ja&&ca.getElementsByTagName("defs")[0].appendChild(ja.cloneNode(!0)));return ca};var S=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(g){S.apply(this,arguments);null!=g.secondLabel&&(g.secondLabel.destroy(),g.secondLabel=
+null)};mxCellRenderer.prototype.getShapesForState=function(g){return[g.shape,g.text,g.secondLabel,g.control]};var U=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){U.apply(this,arguments);this.enumerationState=0};var Q=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(g){null!=g.shape&&this.redrawEnumerationState(g);return Q.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(g){g=decodeURIComponent(mxUtils.getValue(g.style,
+"enumerateValue",""));""==g&&(g=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(g)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(g){var p="1"==mxUtils.getValue(g.style,"enumerate",0);p&&null==g.secondLabel?(g.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),g.secondLabel.size=12,g.secondLabel.state=g,g.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,
+this.graph.cellRenderer.initializeLabel(g,g.secondLabel)):p||null==g.secondLabel||(g.secondLabel.destroy(),g.secondLabel=null);p=g.secondLabel;if(null!=p){var B=g.view.scale,K=this.createEnumerationValue(g);g=this.graph.model.isVertex(g.cell)?new mxRectangle(g.x+g.width-4*B,g.y+4*B,0,0):mxRectangle.fromPoint(g.view.getPoint(g));p.bounds.equals(g)&&p.value==K&&p.scale==B||(p.bounds=g,p.value=K,p.scale=B,p.redraw())}};var O=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();
+O.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var q=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){q.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(g,p){"data:action/json,"==g.substring(0,17)&&(g=JSON.parse(g.substring(17)),null!=g.actions&&
+this.executeCustomActions(g.actions,null,p))};Graph.prototype.executeCustomActions=function(g,p,B){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 K=!1,M=0,N=0,R=mxUtils.bind(this,function(){K||(K=!0,this.model.beginUpdate())}),T=mxUtils.bind(this,
+function(){K&&(K=!1,this.model.endUpdate())}),V=mxUtils.bind(this,function(){0<M&&M--;0==M&&X()}),X=mxUtils.bind(this,function(){if(N<g.length){var W=this.stoppingCustomActions,Y=g[N++],Z=[];if(null!=Y.open)if(T(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,B))return}else this.openLink(Y.open);null==Y.wait||W||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;V()}),M++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=Y.wait?parseInt(Y.wait):1E3),T());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,V,W?0:Y.fadeIn.delay));null!=Y.fadeOut&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,V,W?0:Y.fadeOut.delay));null!=Y.wipeIn&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,
+!0),!0)));null!=Y.wipeOut&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(R(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){R();var aa=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(aa),1);this.setCellsVisible(aa,!0)}null!=Y.hide&&(R(),aa=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(aa),0),this.setCellsVisible(aa,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&
+(R(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(R(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));aa=[];null!=Y.select&&this.isEnabled()&&(aa=this.getCellsForAction(Y.select),this.setSelectionCells(aa));null!=Y.highlight&&(aa=this.getCellsForAction(Y.highlight),this.highlightCells(aa,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));
+null!=Y.scroll&&(aa=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<aa.length&&this.scrollCellToVisible(aa[0]);null!=B&&null!=Y.explore&&Graph.exploreFromCell(this,B,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var la=Y.tags.toggle;0==la.length&&(la=this.getAllTags());for(aa=0;aa<la.length;aa++)this.toggleHiddenTag(la[aa])}la=null;null!=Y.tags.hidden&&(null==la&&(la=[]),la=la.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==la&&(la=[]);var fa=
+this.getAllTags();for(aa=0;aa<fa.length;aa++)0>mxUtils.indexOf(Y.tags.visible,fa[aa])&&0>mxUtils.indexOf(la,fa[aa])&&la.push(fa[aa])}null!=la&&this.setHiddenTags(la);this.refresh()}0<Z.length&&(M++,this.executeAnimations(Z,V,W?1:Y.steps,W?0:Y.delay));0==M?X():T()}else this.stoppingCustomActions=this.executingCustomActions=!1,T(),null!=p&&p()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(g,p){var B=this.getLinkForCell(p);null!=B&&"data:action/json,"==B.substring(0,17)&&this.setLinkForCell(p,
+this.updateCustomLink(g,B));if(this.isHtmlLabel(p)){var K=document.createElement("div");K.innerHTML=Graph.sanitizeHtml(this.getLabel(p));for(var M=K.getElementsByTagName("a"),N=!1,R=0;R<M.length;R++)B=M[R].getAttribute("href"),null!=B&&"data:action/json,"==B.substring(0,17)&&(M[R].setAttribute("href",this.updateCustomLink(g,B)),N=!0);N&&this.labelChanged(p,K.innerHTML)}};Graph.prototype.updateCustomLink=function(g,p){if("data:action/json,"==p.substring(0,17))try{var B=JSON.parse(p.substring(17));
+null!=B.actions&&(this.updateCustomLinkActions(g,B.actions),p="data:action/json,"+JSON.stringify(B))}catch(K){}return p};Graph.prototype.updateCustomLinkActions=function(g,p){for(var B=0;B<p.length;B++){var K=p[B],M;for(M in K)this.updateCustomLinkAction(g,K[M],"cells"),this.updateCustomLinkAction(g,K[M],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(g,p,B){if(null!=p&&null!=p[B]){for(var K=[],M=0;M<p[B].length;M++)if("*"==p[B][M])K.push(p[B][M]);else{var N=g[p[B][M]];null!=N?""!=
+N&&K.push(N):K.push(p[B][M])}p[B]=K}};Graph.prototype.getCellsForAction=function(g,p){p=this.getCellsById(g.cells).concat(this.getCellsForTags(g.tags,null,p));if(null!=g.excludeCells){for(var B=[],K=0;K<p.length;K++)0>g.excludeCells.indexOf(p[K].id)&&B.push(p[K]);p=B}return p};Graph.prototype.getCellsById=function(g){var p=[];if(null!=g)for(var B=0;B<g.length;B++)if("*"==g[B]){var K=this.model.getRoot();p=p.concat(this.model.filterDescendants(function(N){return N!=K},K))}else{var M=this.model.getCell(g[B]);
+null!=M&&p.push(M)}return p};var u=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(g){return u.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(g))};Graph.prototype.setHiddenTags=function(g){this.hiddenTags=g;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(g){var p=mxUtils.indexOf(this.hiddenTags,g);0>p?this.hiddenTags.push(g):0<=p&&this.hiddenTags.splice(p,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+Graph.prototype.isAllTagsHidden=function(g){if(null==g||0==g.length||0==this.hiddenTags.length)return!1;g=g.split(" ");if(g.length>this.hiddenTags.length)return!1;for(var p=0;p<g.length;p++)if(0>mxUtils.indexOf(this.hiddenTags,g[p]))return!1;return!0};Graph.prototype.getCellsForTags=function(g,p,B,K){var M=[];if(null!=g){p=null!=p?p:this.model.getDescendants(this.model.getRoot());for(var N=0,R={},T=0;T<g.length;T++)0<g[T].length&&(R[g[T]]=!0,N++);for(T=0;T<p.length;T++)if(B&&this.model.getParent(p[T])==
+this.model.root||this.model.isVertex(p[T])||this.model.isEdge(p[T])){var V=this.getTagsForCell(p[T]),X=!1;if(0<V.length&&(V=V.split(" "),V.length>=g.length)){for(var W=X=0;W<V.length&&X<N;W++)null!=R[V[W]]&&X++;X=X==N}X&&(1!=K||this.isCellVisible(p[T]))&&M.push(p[T])}}return M};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(g){for(var p=null,B=[],K=0;K<g.length;K++){var M=this.getTagsForCell(g[K]);
+B=[];if(0<M.length){M=M.split(" ");for(var N={},R=0;R<M.length;R++)if(null==p||null!=p[M[R]])N[M[R]]=!0,B.push(M[R]);p=N}else return[]}return B};Graph.prototype.getTagsForCells=function(g){for(var p=[],B={},K=0;K<g.length;K++){var M=this.getTagsForCell(g[K]);if(0<M.length){M=M.split(" ");for(var N=0;N<M.length;N++)null==B[M[N]]&&(B[M[N]]=!0,p.push(M[N]))}}return p};Graph.prototype.getTagsForCell=function(g){return this.getAttributeForCell(g,"tags","")};Graph.prototype.addTagsForCells=function(g,p){if(0<
+g.length&&0<p.length){this.model.beginUpdate();try{for(var B=0;B<g.length;B++){for(var K=this.getTagsForCell(g[B]),M=K.split(" "),N=!1,R=0;R<p.length;R++){var T=mxUtils.trim(p[R]);""!=T&&0>mxUtils.indexOf(M,T)&&(K=0<K.length?K+" "+T:T,N=!0)}N&&this.setAttributeForCell(g[B],"tags",K)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(g,p){if(0<g.length&&0<p.length){this.model.beginUpdate();try{for(var B=0;B<g.length;B++){var K=this.getTagsForCell(g[B]);if(0<K.length){for(var M=
+K.split(" "),N=!1,R=0;R<p.length;R++){var T=mxUtils.indexOf(M,p[R]);0<=T&&(M.splice(T,1),N=!0)}N&&this.setAttributeForCell(g[B],"tags",M.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(g){this.model.beginUpdate();try{for(var p=0;p<g.length;p++)this.model.setVisible(g[p],!this.model.isVisible(g[p]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(g,p){this.model.beginUpdate();try{for(var B=0;B<g.length;B++)this.model.setVisible(g[B],p)}finally{this.model.endUpdate()}};
+Graph.prototype.highlightCells=function(g,p,B,K){for(var M=0;M<g.length;M++)this.highlightCell(g[M],p,B,K)};Graph.prototype.highlightCell=function(g,p,B,K,M){p=null!=p?p:mxConstants.DEFAULT_VALID_COLOR;B=null!=B?B:1E3;g=this.view.getState(g);var N=null;null!=g&&(M=null!=M?M:4,M=Math.max(M+1,mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)+M),N=new mxCellHighlight(this,p,M,!1),null!=K&&(N.opacity=K),N.highlight(g),window.setTimeout(function(){null!=N.shape&&(mxUtils.setPrefixedStyle(N.shape.node.style,
+"transition","all 1200ms ease-in-out"),N.shape.node.style.opacity=0);window.setTimeout(function(){N.destroy()},1200)},B));return N};Graph.prototype.addSvgShadow=function(g,p,B,K){K=null!=K?K:!0;var M=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=B&&B||(p=null!=p?p:g.getElementsByTagName("g")[0],null!=p&&(this.updateShadowFilter(p,!0),!isNaN(parseInt(g.getAttribute("width")))&&K&&(g.setAttribute("width",parseInt(g.getAttribute("width"))+M),g.setAttribute("height",parseInt(g.getAttribute("height"))+
+M),p=g.getAttribute("viewBox"),null!=p&&0<p.length&&(p=p.split(" "),3<p.length&&(w=parseFloat(p[2])+M,h=parseFloat(p[3])+M,g.setAttribute("viewBox",p[0]+" "+p[1]+" "+w+" "+h))))));return M};Graph.prototype.updateShadowFilter=function(g,p){mxClient.IS_SF||(p?(p=mxUtils.getLightDarkColor(this.svgShadowColor,this.svgShadowOpacity),g.style.filter="drop-shadow("+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowBlur)/100+"px "+p.cssText+
+")"):g.style.filter="")};Graph.prototype.setShadowVisible=function(g,p){p=null!=p?p:!0;this.shadowVisible=g;this.updateShadowFilter(this.view.getDrawPane(),this.shadowVisible);p&&this.fireEvent(new mxEventObject("shadowVisibleChanged"))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var g=this.model.getChildCount(this.model.root),
+p=0;do var B=this.model.getChildAt(this.model.root,p);while(p++<g&&"1"==mxUtils.getValue(this.getCellStyle(B),"locked","0"));null!=B&&this.setDefaultParent(B)}};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",STENCIL_PATH+"/kubernetes2.xml"];
+mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",
+STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",
+STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=
+[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",
+STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",
+STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/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.ibmcloud=[STENCIL_PATH+"/ibm_cloud.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.networks2=[SHAPES_PATH+"/mxNetworks2.js",
+STENCIL_PATH+"/networks2.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"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];
+mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(g){var p=null;null!=g&&0<g.length&&("ER"==g.substring(0,2)?p="mxgraph.er":"sysML"==g.substring(0,5)&&(p="mxgraph.sysml"));return p};var I=mxMarker.createMarker;mxMarker.createMarker=function(g,p,B,K,M,N,R,T,V,X){if(null!=B&&null==mxMarker.markers[B]){var W=this.getPackageForType(B);null!=W&&mxStencilRegistry.getStencil(W)}return I.apply(this,
+arguments)};var G=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(g,p,B,K,M,N){"1"==mxUtils.getValue(p.style,"lineShape",null)&&g.setFillColor(mxUtils.getValue(p.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return G.apply(this,arguments)};PrintDialog.prototype.create=function(g,p,B,K){function M(){la.value=Math.max(1,Math.min(W,Math.max(parseInt(la.value),parseInt(aa.value))));aa.value=Math.max(1,Math.min(W,Math.min(parseInt(la.value),parseInt(aa.value))))}function N(Ca){g.lastPrintPagesRadioChecked=
+Z.checked;g.lastPrintSelectionOnlyChecked=ca.checked;g.lastPrintCropRadioChecked=ka.checked;g.lastPrintFitRadioChecked=ba.checked;Z.checked&&aa.value<la.value?(g.lastPrintPagesFromInput=aa.value,g.lastPrintPagesToInput=la.value):(g.lastPrintPagesFromInput=null,g.lastPrintPagesToInput=null);za.value=Math.max(1,Math.min(1600,parseInt(za.value)))+"%";g.lastPrintZoom=za.value;g.lastPrintBorder=ra.value;g.lastPrintGrid=Ba.checked;g.lastPrintTransparent=wa.checked;g.lastPrintInclude=Fa.checked;g.lastPrintSheetsAcross=
+ma.value;g.lastPrintSheetsDown=ua.value;var Ea={};Ea.border=parseInt(ra.value);Ea.scale=parseInt(za.value)/100;Ea.grid=Ba.checked;Ea.shadows=Ga.checked;Ea.transparent=wa.checked;Ea.includeCopy=Fa.checked;Ea.sheetsAcross=parseInt(ma.value);Ea.sheetsDown=parseInt(ua.value);Ea.pagesFrom=parseInt(aa.value);Ea.pagesTo=parseInt(la.value);Ea.allPages=Y.checked;Ea.selection=ca.checked;Ea.pageView=ja.checked;Ea.crop=ka.checked;Ea.fit=ba.checked;return null!=B?B(!Ca,Ea):g.print(!Ca,Ea)}var R=g.editor.graph,
+T=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign="center";V.style.marginTop="0px";mxUtils.write(V,p||mxResources.get("print"));T.appendChild(V);var X=1,W=1;V=document.createElement("div");V.style.whiteSpace="nowrap";var Y=document.createElement("input");Y.style.marginRight="8px";Y.style.marginBottom="8px";Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");V.appendChild(Y);p=document.createElement("span");mxUtils.write(p,mxResources.get("allPages"));
+mxEvent.addListener(p,"click",function(){Y.checked=!0});V.appendChild(p);mxUtils.br(V);var Z=Y.cloneNode(!0);V.appendChild(Z);p=document.createElement("span");mxUtils.write(p,mxResources.get("pages")+":");V.appendChild(p);mxEvent.addListener(p,"click",function(){Z.checked=!0});var aa=document.createElement("input");aa.style.margin="0 4px";aa.setAttribute("value","1");aa.setAttribute("type","number");aa.setAttribute("min","1");aa.style.width="40px";V.appendChild(aa);p=document.createElement("span");
+mxUtils.write(p,mxResources.get("to"));V.appendChild(p);var la=aa.cloneNode(!0);V.appendChild(la);mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(la,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"change",M);mxEvent.addListener(la,"change",M);if(null!=g.pages&&(W=g.pages.length,null!=g.currentPage))for(var fa=0;fa<W;fa++)if(g.currentPage==g.pages[fa]){X=fa+1;break}null!=g.lastPrintPagesFromInput&&null!=g.lastPrintPagesToInput?(aa.value=Math.min(W,Math.max(1,
+g.lastPrintPagesFromInput)),la.value=Math.min(W,Math.max(1,g.lastPrintPagesToInput))):(aa.value=X,la.value=X);aa.setAttribute("max",W);la.setAttribute("max",W);fa=mxUtils.button(mxResources.get("currentPage"),function(Ca){aa.value=X;la.value=X;Z.checked=!0});fa.setAttribute("title",mxResources.get("currentPage"));fa.style.marginLeft="4px";fa.style.maxWidth="100px";fa.style.overflow="hidden";fa.style.textOverflow="ellipsis";fa.style.whiteSpace="nowrap";V.appendChild(fa);1<W&&T.appendChild(V);V=document.createElement("div");
+V.style.borderBottom="1px solid lightGray";V.style.paddingBottom="12px";V.style.marginBottom="12px";V.style.whiteSpace="nowrap";var ca=document.createElement("input");ca.setAttribute("name","pages-printdialog");ca.setAttribute("type",1==W?"checkbox":"radio");ca.style.marginRight="8px";R.isSelectionEmpty()&&ca.setAttribute("disabled","disabled");R.isEnabled()&&(V.appendChild(ca),p=document.createElement("span"),mxUtils.write(p,mxResources.get("selectionOnly")),V.appendChild(p));(R.isEnabled()||1<W)&&
+T.appendChild(V);!g.isPagesEnabled()||g.lastPrintPagesRadioChecked?Z.checked=!0:!R.isSelectionEmpty()&&g.lastPrintSelectionOnlyChecked?ca.checked=!0:Y.checked=!0;R.isSelectionEmpty()||mxEvent.addListener(p,"click",function(){ca.checked=!ca.checked});R=document.createElement("div");R.style.whiteSpace="nowrap";var ja=document.createElement("input");ja.style.marginBottom="8px";ja.style.marginRight="8px";ja.setAttribute("type","radio");ja.setAttribute("name","printSize");R.appendChild(ja);p=document.createElement("span");
+mxUtils.write(p,mxResources.get("pageView"));R.appendChild(p);mxEvent.addListener(R,"click",function(){ja.checked=!0});T.appendChild(R);R=document.createElement("div");R.style.whiteSpace="nowrap";var ka=document.createElement("input");ka.style.marginBottom="8px";ka.style.marginRight="8px";ka.setAttribute("type","radio");ka.setAttribute("name","printSize");R.appendChild(ka);p=document.createElement("span");mxUtils.write(p,mxResources.get("crop"));R.appendChild(p);mxEvent.addListener(R,"click",function(){ka.checked=
+!0});T.appendChild(R);R=document.createElement("div");R.style.whiteSpace="nowrap";var ba=document.createElement("input");ba.style.marginBottom="8px";ba.style.marginRight="8px";ba.setAttribute("type","radio");ba.setAttribute("name","printSize");p=document.createElement("div");p.style.display="inline-block";p.style.verticalAlign="top";p.style.paddingTop="2px";p.appendChild(ba);R.appendChild(p);V=document.createElement("table");V.style.display="inline-block";V.style.borderSpacing="0";fa=document.createElement("tbody");
+var ha=document.createElement("tr"),ea=ha.cloneNode(!0),da=document.createElement("td"),pa=da.cloneNode(!0),oa=da.cloneNode(!0),qa=da.cloneNode(!0),ta=da.cloneNode(!0),ia=da.cloneNode(!0);da.style.textAlign="right";qa.style.textAlign="right";mxUtils.write(da,mxResources.get("fitTo"));mxEvent.addListener(R,"click",function(Ca){mxEvent.getSource(Ca)!=ba&&(ba.checked=!ba.checked)});var ma=document.createElement("input");ma.style.margin="0 2px";ma.style.boxSizing="border-box";ma.setAttribute("value",
+g.lastPrintSheetsAcross||"1");ma.setAttribute("min","1");ma.setAttribute("type","number");ma.style.width="40px";pa.appendChild(ma);p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsAcross"));oa.appendChild(p);mxUtils.write(qa,mxResources.get("fitToBy"));var ua=ma.cloneNode(!0);ua.setAttribute("value",g.lastPrintSheetsDown||"1");ta.appendChild(ua);mxEvent.addListener(ma,"click",function(Ca){ba.checked=!0;mxEvent.consume(Ca)});mxEvent.addListener(ua,"click",function(Ca){ba.checked=
+!0;mxEvent.consume(Ca)});g.lastPrintCropRadioChecked?ka.checked=!0:g.lastPrintFitRadioChecked?ba.checked=!0:ja.checked=!0;p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsDown"));ia.appendChild(p);ha.appendChild(da);ha.appendChild(pa);ha.appendChild(oa);ea.appendChild(qa);ea.appendChild(ta);ea.appendChild(ia);fa.appendChild(ha);fa.appendChild(ea);V.appendChild(fa);R.appendChild(V);T.appendChild(R);R=document.createElement("div");R.style.borderTop="1px solid lightGray";
+R.style.whiteSpace="nowrap";R.style.paddingTop="12px";R.style.marginTop="12px";R.style.paddingLeft="8px";mxUtils.write(R,mxResources.get("borderWidth")+":");var ra=document.createElement("input");ra.setAttribute("type","number");ra.setAttribute("min","0");ra.style.width="40px";ra.style.marginLeft="4px";ra.value=null!=g.lastPrintBorder?g.lastPrintBorder:mxPrintPreview.prototype.pageMargin;R.appendChild(ra);p=document.createElement("span");p.style.marginLeft="8px";mxUtils.write(p,mxResources.get("zoom")+
+":");R.appendChild(p);var za=document.createElement("input");za.style.width="60px";za.style.marginLeft="4px";za.value=null!=g.lastPrintZoom?g.lastPrintZoom:"100%";R.appendChild(za);mxUtils.br(R);var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");Ba.style.marginTop="12px";Ba.checked=null!=g.lastPrintGrid?g.lastPrintGrid:!1;R.appendChild(Ba);p=document.createElement("span");p.style.marginLeft="4px";p.style.marginRight="8px";mxUtils.write(p,mxResources.get("grid"));R.appendChild(p);
+mxEvent.addListener(p,"click",function(Ca){Ba.checked=!0;mxEvent.consume(Ca)});var Ga=document.createElement("input");Ga.setAttribute("type","checkbox");Ga.style.marginTop="12px";Ga.checked=null!=g.lastPrintShadow?g.lastPrintShadow:!1;R.appendChild(Ga);p=document.createElement("span");p.style.marginLeft="4px";p.style.marginRight="8px";mxUtils.write(p,mxResources.get("shadows"));R.appendChild(p);g.isOffline()&&!mxClient.IS_CHROMEAPP||p.appendChild(g.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));
+mxEvent.addListener(p,"click",function(Ca){"IMG"!=mxEvent.getSource(Ca).nodeName&&(Ga.checked=!0,mxEvent.consume(Ca))});Editor.enableShadowOption?null!=B&&mxUtils.br(R):(Ga.style.display="none",p.style.display="none");var wa=document.createElement("input");wa.setAttribute("type","checkbox");wa.style.marginTop="10px";wa.checked=null!=g.lastPrintTransparent?g.lastPrintTransparent:!1;null!=B&&(R.appendChild(wa),p=document.createElement("span"),p.style.marginLeft="4px",mxUtils.write(p,mxResources.get("transparentBackground")),
+R.appendChild(p),mxEvent.addListener(p,"click",function(Ca){wa.checked=!0;mxEvent.consume(Ca)}));var Fa=document.createElement("input");Fa.setAttribute("type","checkbox");Fa.style.marginTop="10px";Fa.checked=null!=g.lastPrintInclude?g.lastPrintInclude:Editor.defaultIncludeDiagram;null==B||mxClient.IS_CHROMEAPP||"draw.io"!=g.getServiceName()||(mxUtils.br(R),R.appendChild(Fa),p=document.createElement("span"),p.style.marginLeft="4px",mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram")),R.appendChild(p),
+mxEvent.addListener(p,"click",function(Ca){Fa.checked=!0;mxEvent.consume(Ca)}));T.appendChild(R);p=document.createElement("div");p.style.marginTop="30px";p.style.textAlign="right";p.style.whiteSpace="nowrap";g.isOffline()&&!mxClient.IS_CHROMEAPP||null!=B||p.appendChild(g.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));R=mxUtils.button(mxResources.get("cancel"),function(){g.hideDialog()});R.className="geBtn";g.editor.cancelFirst&&p.appendChild(R);PrintDialog.previewEnabled&&null==B&&
+(V=mxUtils.button(mxResources.get("preview"),function(){try{g.hideDialog(),N(!1)}catch(Ca){g.handleError(Ca)}}),V.className="geBtn",p.appendChild(V));K=null!=K?K:null!=B?"export":PrintDialog.previewEnabled?"print":"ok";K=mxUtils.button(mxResources.get(K),function(){try{g.hideDialog(),N(!0)}catch(Ca){g.handleError(Ca)}});K.className="geBtn gePrimaryBtn";p.appendChild(K);g.editor.cancelFirst||p.appendChild(R);T.appendChild(p);if(g.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(T.classList.add("geDarkMode"),
+T.style.colorScheme="dark"):(T.classList.remove("geDarkMode"),T.style.colorScheme="light")};g.addListener("darkModeChanged",xa);xa();var Oa=function(Ca,Ea){Ca=Ea.getProperty("dialog");T.parentNode==Ca.container&&(g.editor.removeListener(Oa),g.removeListener(xa))};g.editor.addListener("hideDialog",Oa)}this.container=T};var H=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 g=this.image;null!=g&&null!=g.src&&Graph.isPageLink(g.src)&&(g={originalSrc:g.src});this.page.viewState.backgroundImage=g}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else H.apply(this,
arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(g=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=g?g:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),
-this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="29.0.3";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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)||/.*\.cdn\.prod\.atlassian-dev\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&
+this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="29.2.2";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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)||/.*\.cdn\.prod\.atlassian-dev\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&
"support.draw.io"!=window.location.hostname&&"test.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||
"1"==urlParams.dev;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.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes=
"flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!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:{useWidth:1E3,useMaxWidth:!0,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,f,l,m,t,v,B){if(null!=c){t=null!=t?t:Error(c);t.stack=null!=t.stack?t.stack:"";v=null!=v?v:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&
-0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>t.stack.indexOf("extension:")&&0>t.stack.indexOf("<anonymous>:")&&0>t.stack.indexOf("/math4/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+v+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=m?":colno:"+encodeURIComponent(m):
-"")+(""!=t.stack?"&stack="+encodeURIComponent(t.stack):""))}catch(E){}try{B||null==window.console||console.error(v,c,f,l,m,t)}catch(E){}}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(l){}};EditorUi.sendReport=function(c,f){if("1"==
-urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,c.length>f&&(c=c.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],f=0;f<arguments.length;f++)c.push(arguments[f]);mxClient.IS_IOS?(mxLog.show(),
-mxLog.debug(c.join(" "))):console.log.apply(console,c)}}catch(l){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");for(var f=[],l=0;l<c.length;l++)f.push(c[l]);for(l=0;l<f.length;l++)EditorUi.replaceSvgImage(f[l])};EditorUi.replaceSvgImage=function(c){try{var f=null;f=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var l=EditorUi.getSvgSubtree(f);
-if(null!=l&&"svg"==l.nodeName){var m=l.getAttribute("width"),t=l.getAttribute("height");l.setAttribute("x",c.getAttribute("x"));l.setAttribute("y",c.getAttribute("y"));l.setAttribute("width",c.getAttribute("width"));l.setAttribute("height",c.getAttribute("height"));l.style.fontFamily="initial";0<m&&0<t&&null==l.getAttribute("viewBox")&&l.setAttribute("viewBox","0 0 "+m+" "+t);var v=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");v.appendChild(l);c.hasAttribute("transform")&&v.setAttribute("transform",
-c.getAttribute("transform"));c.parentNode.replaceChild(v,c)}}catch(B){}};EditorUi.getSvgSubtree=function(c){var f=Graph.getSvgFromDataUri(c);c=null;if(null!=f){c=Graph.sanitizeNode(mxUtils.parseXml(f).documentElement);f=c.getElementsByTagName("style");if(0<f.length){var l="svg-image-"+Editor.guid();c.setAttribute("id",l);for(var m=document.implementation.createHTMLDocument(""),t=document.createElement("style"),v=0;v<f.length;v++){t.textContent=f[v].textContent;m.body.appendChild(t);for(var B="",E=
-0;E<t.sheet.cssRules.length;E++){var D=t.sheet.cssRules[E];if(null!=D.selectorText){for(var A=D.selectorText.split(","),S=0;S<A.length;S++)A[S]="#"+l+" "+A[S];D.selectorText=A.join(",")}B+=D.cssText+"\n"}f[v].textContent=B}}null!=c.style&&"light dark"==c.style.getPropertyValue("color-scheme")&&c.style.removeProperty("color-scheme");f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,f,k,m,t,x,y){if(null!=c){t=null!=t?t:Error(c);t.stack=null!=t.stack?t.stack:"";x=null!=x?x:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&
+0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>t.stack.indexOf("extension:")&&0>t.stack.indexOf("<anonymous>:")&&0>t.stack.indexOf("/math4/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+x+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=m?":colno:"+encodeURIComponent(m):
+"")+(""!=t.stack?"&stack="+encodeURIComponent(t.stack):""))}catch(F){}try{y||null==window.console||console.error(x,c,f,k,m,t)}catch(F){}}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(k){}};EditorUi.sendReport=function(c,f){if("1"==
+urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,c.length>f&&(c=c.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],f=0;f<arguments.length;f++)c.push(arguments[f]);mxClient.IS_IOS?(mxLog.show(),
+mxLog.debug(c.join(" "))):console.log.apply(console,c)}}catch(k){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");for(var f=[],k=0;k<c.length;k++)f.push(c[k]);for(k=0;k<f.length;k++)EditorUi.replaceSvgImage(f[k])};EditorUi.replaceSvgImage=function(c){try{var f=null;f=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var k=EditorUi.getSvgSubtree(f);
+if(null!=k&&"svg"==k.nodeName){var m=k.getAttribute("width"),t=k.getAttribute("height");k.setAttribute("x",c.getAttribute("x"));k.setAttribute("y",c.getAttribute("y"));k.setAttribute("width",c.getAttribute("width"));k.setAttribute("height",c.getAttribute("height"));k.style.fontFamily="initial";0<m&&0<t&&null==k.getAttribute("viewBox")&&k.setAttribute("viewBox","0 0 "+m+" "+t);var x=mxUtils.createElementNs(k.ownerDocument,mxConstants.NS_SVG,"g");x.appendChild(k);c.hasAttribute("transform")&&x.setAttribute("transform",
+c.getAttribute("transform"));c.parentNode.replaceChild(x,c)}}catch(y){}};EditorUi.getSvgSubtree=function(c){var f=Graph.getSvgFromDataUri(c);c=null;if(null!=f){c=Graph.sanitizeNode(mxUtils.parseXml(f).documentElement);f=c.getElementsByTagName("style");if(0<f.length){var k="svg-image-"+Editor.guid();c.setAttribute("id",k);for(var m=document.implementation.createHTMLDocument(""),t=document.createElement("style"),x=0;x<f.length;x++){t.textContent=f[x].textContent;m.body.appendChild(t);for(var y="",F=
+0;F<t.sheet.cssRules.length;F++){var E=t.sheet.cssRules[F];if(null!=E.selectorText){for(var C=E.selectorText.split(","),S=0;S<C.length;S++)C[S]="#"+k+" "+C[S];E.selectorText=C.join(",")}y+=E.cssText+"\n"}f[x].textContent=y}}null!=c.style&&"light dark"==c.style.getPropertyValue("color-scheme")&&c.style.removeProperty("color-scheme");f=c.getElementsByTagName("*");for(k=0;k<f.length;k++)f[k].removeAttribute("data-cell-id")}return c};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.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=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;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.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";return c};EditorUi.prototype.openLink=function(c,f,l){return this.editor.graph.openLink(c,f,l)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=
-function(c,f){f(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,f,l){localStorage.setItem(c,f);null!=l&&l()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,f){localStorage.removeItem(c);f()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";return c};EditorUi.prototype.openLink=function(c,f,k){return this.editor.graph.openLink(c,f,k)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=
+function(c,f){f(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,f,k){localStorage.setItem(c,f);null!=k&&k()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,f){localStorage.removeItem(c);f()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};
EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var f=this.editor.graph;f.mathEnabled=c;null!=f.view.backgroundImage&&(f.view.backgroundImage.destroy(),f.view.backgroundImage=null);this.editor.updateGraphComponents();f.refresh();f.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};
EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||
-!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,l){var m=null==c||null==f;l=null!=l?l:24;var t=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),v=this.timeout,B=t.spin,E=null,D=null,
-A=mxUtils.bind(this,function(T){null!=T&&T()}),S=this;t.spin=function(T,P,q,u){u=null!=u?u:v;var J=!1;if(!this.active){var G=Date.now();null!=q&&(E=window.setTimeout(function(){t.stop();E=null;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})},u));m&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);T==document.body&&"1"==urlParams.embedInline&&(T=S.diagramContainer,c=T.scrollLeft+T.clientWidth/2,f=T.scrollTop+
-T.clientHeight/2);B.call(this,T);"1"==urlParams.embedInline&&null!=t.el&&(t.el.style.marginTop=T.scrollTop+"px",t.el.style.marginLeft=T.scrollLeft+"px");this.active=!0;null!=P&&(J=document.createElement("div"),J.className="geSpinnerStatus",J.setAttribute("title",P),T==document.body?(J.style.left=Math.max(0,c)+"px",J.style.top=Math.max(0,f+66)+"px"):(J.style.left="50%",J.style.top="50%",J.style.marginTop="70px"),"..."!=P.substring(P.length-3,P.length)&&"!"!=P.charAt(P.length-1)&&(P+="..."),J.innerText=
-P,T.appendChild(J),t.status=J);this.pause=mxUtils.bind(this,function(){var H=A;this.active&&(u=Math.max(0,u-(Date.now()-G)),H=mxUtils.bind(this,function(g){this.spin(T,P,q,u);if(null!=g)try{g(),D=mxUtils.bind(this,function(){this.spin(T,P,q,u);try{g()}catch(p){null!=q&&q(p)}})}catch(p){null!=q&&q(p)}}));this.stop();return H});J=!0}return J};var R=t.stop;t.stop=function(){R.call(this);this.active&&(this.active=!1,null!=E&&(window.clearTimeout(E),E=null),null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status),
-t.status=null)};t.pause=function(){return A};return t};EditorUi.prototype.isCompatibleString=function(c){try{if(c=mxUtils.trim(c),"<"==c.charAt(0)){var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}}catch(m){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&
+!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,k){var m=null==c||null==f;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:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),x=this.timeout,y=t.spin,F=null,E=null,
+C=mxUtils.bind(this,function(Q){null!=Q&&Q()}),S=this;t.spin=function(Q,O,q,u){u=null!=u?u:x;var I=!1;if(!this.active){var G=Date.now();null!=q&&(F=window.setTimeout(function(){t.stop();F=null;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:E})},u));m&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);Q==document.body&&"1"==urlParams.embedInline&&(Q=S.diagramContainer,c=Q.scrollLeft+Q.clientWidth/2,f=Q.scrollTop+
+Q.clientHeight/2);y.call(this,Q);"1"==urlParams.embedInline&&null!=t.el&&(t.el.style.marginTop=Q.scrollTop+"px",t.el.style.marginLeft=Q.scrollLeft+"px");this.active=!0;null!=O&&(I=document.createElement("div"),I.className="geSpinnerStatus",I.setAttribute("title",O),Q==document.body?(I.style.left=Math.max(0,c)+"px",I.style.top=Math.max(0,f+66)+"px"):(I.style.left="50%",I.style.top="50%",I.style.marginTop="70px"),"..."!=O.substring(O.length-3,O.length)&&"!"!=O.charAt(O.length-1)&&(O+="..."),I.innerText=
+O,Q.appendChild(I),t.status=I);this.pause=mxUtils.bind(this,function(){var H=C;this.active&&(u=Math.max(0,u-(Date.now()-G)),H=mxUtils.bind(this,function(g){this.spin(Q,O,q,u);if(null!=g)try{g(),E=mxUtils.bind(this,function(){this.spin(Q,O,q,u);try{g()}catch(p){null!=q&&q(p)}})}catch(p){null!=q&&q(p)}}));this.stop();return H});I=!0}return I};var U=t.stop;t.stop=function(){U.call(this);this.active&&(this.active=!1,null!=F&&(window.clearTimeout(F),F=null),null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status),
+t.status=null)};t.pause=function(){return C};return t};EditorUi.prototype.isCompatibleString=function(c){try{if(c=mxUtils.trim(c),"<"==c.charAt(0)){var f=mxUtils.parseXml(c),k=this.editor.extractGraphModel(f.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}}catch(m){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&
207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&
-26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=f.getFunction,m=this.editor.graph,t=this;f.getFunction=function(v){if(m.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var B=t.getSelectedPageIndex();if(mxEvent.isShiftDown(v)){if(37==
-v.keyCode)return function(){0<B&&t.movePage(B,B-1)};if(38==v.keyCode)return function(){0<B&&t.movePage(B,0)};if(39==v.keyCode)return function(){B<t.pages.length-1&&t.movePage(B,B+1)};if(40==v.keyCode)return function(){B<t.pages.length-1&&t.movePage(B,t.pages.length-1)}}else if(mxEvent.isControlDown(v)||mxClient.IS_MAC&&mxEvent.isMetaDown(v)){if(37==v.keyCode)return function(){0<B&&t.selectNextPage(!1)};if(38==v.keyCode)return function(){0<B&&t.selectPage(t.pages[0])};if(39==v.keyCode)return function(){B<
-t.pages.length-1&&t.selectNextPage(!0)};if(40==v.keyCode)return function(){B<t.pages.length-1&&t.selectPage(t.pages[t.pages.length-1])}}}return!(65<=v.keyCode&&90>=v.keyCode)||m.isSelectionEmpty()||mxEvent.isAltDown(v)||mxEvent.isShiftDown(v)||mxEvent.isControlDown(v)||mxClient.IS_MAC&&mxEvent.isMetaDown(v)?l.apply(this,arguments):null}}return f};var k=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var f=k.apply(this,arguments);if(null==f)try{var l=
-c.indexOf("&lt;mxfile ");if(0<=l){var m=c.lastIndexOf("&lt;/mxfile&gt;");m>l&&(f=c.substring(l,m+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var t=mxUtils.parseXml(c),v=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=v?mxUtils.getXml(v):""}}catch(B){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');
-0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var l=null!=c?this.editor.extractGraphModel(c,!0):null;null!=l&&(c=l);if(null!=c){l=this.editor.graph;l.model.beginUpdate();try{var m=null!=this.pages?this.pages.slice():null,t=c.getElementsByTagName("diagram");
-if(1<t.length||1==t.length&&t[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var v=t.length-1;0<=v;v--){var B=this.updatePageRoot(new DiagramPage(t[v]));null==B.getName()&&B.setName(mxResources.get("pageWithNumber",[v+1]));l.model.execute(new ChangePage(this,B,0==v?B:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=m)for(v=0;v<m.length;v++)l.model.execute(new ChangePage(this,m[v],null));var E=this.getCurrentFile();null!=E&&E.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,m,t,v,B,E,D,A,S,R,T){f=null!=
-f?f:this.editor.graph;t=null!=t?t:!1;D=null!=D?D:!0;S=null!=S?S:!Editor.defaultCompressed;var P=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var q="_blank";else P=q=m;if(null==c)return"";var u=c;if("mxfile"!=u.nodeName.toLowerCase()){if(S){var J=c.ownerDocument.createElement("diagram");J.setAttribute("name",mxResources.get("pageWithNumber",[1]));J.setAttribute("id",Editor.guid());J.appendChild(c)}else{J=Graph.zapGremlins(mxUtils.getXml(c));u=Graph.compress(J);if(Graph.decompress(u)!=
-J)return J;J=c.ownerDocument.createElement("diagram");J.setAttribute("name",mxResources.get("pageWithNumber",[1]));J.setAttribute("id",Editor.guid());mxUtils.setTextContent(J,u)}u=c.ownerDocument.createElement("mxfile");u.appendChild(J)}A?(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"),
+26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=f.getFunction,m=this.editor.graph,t=this;f.getFunction=function(x){if(m.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var y=t.getSelectedPageIndex();if(mxEvent.isShiftDown(x)){if(37==
+x.keyCode)return function(){0<y&&t.movePage(y,y-1)};if(38==x.keyCode)return function(){0<y&&t.movePage(y,0)};if(39==x.keyCode)return function(){y<t.pages.length-1&&t.movePage(y,y+1)};if(40==x.keyCode)return function(){y<t.pages.length-1&&t.movePage(y,t.pages.length-1)}}else if(mxEvent.isControlDown(x)||mxClient.IS_MAC&&mxEvent.isMetaDown(x)){if(37==x.keyCode)return function(){0<y&&t.selectNextPage(!1)};if(38==x.keyCode)return function(){0<y&&t.selectPage(t.pages[0])};if(39==x.keyCode)return function(){y<
+t.pages.length-1&&t.selectNextPage(!0)};if(40==x.keyCode)return function(){y<t.pages.length-1&&t.selectPage(t.pages[t.pages.length-1])}}}return!(65<=x.keyCode&&90>=x.keyCode)||m.isSelectionEmpty()||mxEvent.isAltDown(x)||mxEvent.isShiftDown(x)||mxEvent.isControlDown(x)||mxClient.IS_MAC&&mxEvent.isMetaDown(x)?k.apply(this,arguments):null}}return f};var l=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var f=l.apply(this,arguments);if(null==f)try{var k=
+c.indexOf("&lt;mxfile ");if(0<=k){var m=c.lastIndexOf("&lt;/mxfile&gt;");m>k&&(f=c.substring(k,m+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var t=mxUtils.parseXml(c),x=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=x?mxUtils.getXml(x):""}}catch(y){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');
+0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var k=null!=c?this.editor.extractGraphModel(c,!0):null;null!=k&&(c=k);if(null!=c){k=this.editor.graph;k.model.beginUpdate();try{var m=null!=this.pages?this.pages.slice():null,t=c.getElementsByTagName("diagram");
+if(1<t.length||1==t.length&&t[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var x=t.length-1;0<=x;x--){var y=this.updatePageRoot(new DiagramPage(t[x]));null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[x+1]));k.model.execute(new ChangePage(this,y,0==x?y:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
+[1])),k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=m)for(x=0;x<m.length;x++)k.model.execute(new ChangePage(this,m[x],null));var F=this.getCurrentFile();null!=F&&F.fileReplaced(f)}finally{k.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,k,m,t,x,y,F,E,C,S,U,Q){f=null!=
+f?f:this.editor.graph;t=null!=t?t:!1;E=null!=E?E:!0;S=null!=S?S:!Editor.defaultCompressed;var O=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var q="_blank";else O=q=m;if(null==c)return"";var u=c;if("mxfile"!=u.nodeName.toLowerCase()){if(S){var I=c.ownerDocument.createElement("diagram");I.setAttribute("name",mxResources.get("pageWithNumber",[1]));I.setAttribute("id",Editor.guid());I.appendChild(c)}else{I=Graph.zapGremlins(mxUtils.getXml(c));u=Graph.compress(I);if(Graph.decompress(u)!=
+I)return I;I=c.ownerDocument.createElement("diagram");I.setAttribute("name",mxResources.get("pageWithNumber",[1]));I.setAttribute("id",Editor.guid());mxUtils.setTextContent(I,u)}u=c.ownerDocument.createElement("mxfile");u.appendChild(I)}C?(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("modified"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("pages"),u.removeAttribute("type"),u.removeAttribute("etag"),mxClient.IS_CHROMEAPP?u.setAttribute("host","Chrome"):EditorUi.isElectronApp?u.setAttribute("host","Electron"):u.setAttribute("host",window.location.hostname),u.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),1<u.getElementsByTagName("diagram").length&&
-null!=this.pages&&u.setAttribute("pages",this.pages.length));null!=R&&(u=u.cloneNode(!0),u.setAttribute("scale",R));null!=T&&(u=u.cloneNode(!0),u.setAttribute("border",T));c=S?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!v&&!t&&(B||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(u),f,null!=l?l.getTitle():null,q,P);else if(v||!t&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(m=null),l=this.getSvgFileProperties(u),
-c=this.getEmbeddedSvg(c,f,m,null,E,D,P,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,f,l,m){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var t=this.editor.getGraphXml(c,m);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(D){var A=D.getElementsByTagName("mxGraphModel"),S=0<A.length?A[0]:null;A=D;null==S&&l?(S=mxUtils.getNodeValue(D),0<S.length&&(S=Graph.decompress(S),null!=S&&0<S.length&&(A=D.cloneNode(!1),
-A.appendChild(mxUtils.parseXml(S).documentElement)))):null==S||l?A=D.cloneNode(!0):(A=D.cloneNode(!1),mxUtils.setTextContent(A,Graph.compressNode(S)));t.appendChild(A)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(t),t=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var v=this.pages[f],B=v.node;if(v!=this.currentPage)if(v.needsUpdate){var E=new mxCodec(mxUtils.createXmlDocument());E=E.encode(new mxGraphModel(v.root));
-this.editor.graph.saveViewState(v.viewState,E,null,m);EditorUi.removeChildNodes(B);B.appendChild(E);delete v.needsUpdate}else m&&(this.updatePageRoot(v),null!=v.viewState.backgroundImage&&null!=v.viewState.backgroundImage.originalSrc&&(E=new mxCodec(mxUtils.createXmlDocument()),E=E.encode(new mxGraphModel(v.root)),this.editor.graph.saveViewState(v.viewState,E,null,m,v),B=B.cloneNode(!1),B.appendChild(E)));c(B)}return t};EditorUi.prototype.anonymizeString=function(c,f){for(var l=[],m=0;m<c.length;m++){var t=
-c.charAt(m);0<=EditorUi.ignoredAnonymizedChars.indexOf(t)?l.push(t):isNaN(parseInt(t))?t.toLowerCase()!=t?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):t.toUpperCase()!=t?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(t)?l.push(" "):l.push("?"):l.push(f?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++)try{var l=
-mxUtils.parseXml(c[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));c[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(l)}catch(v){c[EditorUi.DIFF_INSERT][f].data=v.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var m in c[EditorUi.DIFF_UPDATE]){var t=c[EditorUi.DIFF_UPDATE][m];null!=t.name&&(t.name=this.anonymizeString(t.name));null!=t.cells&&(f=mxUtils.bind(this,function(v){var B=t.cells[v];
-if(null!=B){for(var E in B)null!=B[E].value&&(B[E].value="["+B[E].value.length+"]"),null!=B[E].xmlValue&&(B[E].xmlValue="["+B[E].xmlValue.length+"]"),null!=B[E].style&&(B[E].style="["+B[E].style.length+"]"),mxUtils.isEmptyObject(B[E])&&delete B[E];mxUtils.isEmptyObject(B)&&delete t.cells[v]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete c[EditorUi.DIFF_UPDATE][m]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};
-EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var l=0;l<c.attributes.length;l++)"as"!=c.attributes[l].name&&c.setAttribute(c.attributes[l].name,this.anonymizeString(c.attributes[l].value,f));if(null!=c.childNodes)for(l=0;l<c.childNodes.length;l++)this.anonymizeAttributes(c.childNodes[l],f)};EditorUi.prototype.anonymizeNode=function(c,f){f=c.getElementsByTagName("mxCell");for(var l=0;l<f.length;l++)null!=f[l].getAttribute("value")&&f[l].setAttribute("value","["+f[l].getAttribute("value").length+
-"]"),null!=f[l].getAttribute("xmlValue")&&f[l].setAttribute("xmlValue","["+f[l].getAttribute("xmlValue").length+"]"),null!=f[l].getAttribute("style")&&f[l].setAttribute("style","["+f[l].getAttribute("style").length+"]"),null!=f[l].parentNode&&"root"!=f[l].parentNode.nodeName&&null!=f[l].parentNode.parentNode&&(f[l].setAttribute("id",f[l].parentNode.getAttribute("id")),f[l].parentNode.parentNode.replaceChild(f[l],f[l].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=
-this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.clearStatus(),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==
-DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,m,t,v,B,E,D,A,S,R,T){t=null!=t?t:!0;v=null!=v?v:!1;A=null!=A?A:!Editor.defaultCompressed;var P=this.editor.graph;if((f||!c&&null!=D&&/(\.svg)$/i.test(D.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var q=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());P.setBackgroundImage=this.editor.graph.setBackgroundImage;P.background=this.editor.graph.background;
-var u=null!=this.pages?this.pages[0]:null;null==u||this.currentPage==u?P.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&P.setBackgroundImage(u.viewState.backgroundImage);P.getGlobalVariable=function(J){return"page"==J&&null!=u?u.getName():"pagenumber"==J?1:q.apply(this,arguments)};document.body.appendChild(P.container);null!=u&&P.model.setRoot(u.root)}B=null!=B?B:this.getXmlFileData(t,v,A,S);D=null!=D?D:this.getCurrentFile();c=this.createFileData(B,P,D,
-window.location.href,c,f,l,m,t,E,A,R,T);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return c};EditorUi.prototype.getHtml=function(c,f,l,m,t,v){v=null!=v?v:!0;var B=null,E=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){B=v?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var D=f.view.scale;v=Math.floor(B.x/D-f.view.translate.x);D=Math.floor(B.y/D-f.view.translate.y);B=f.background;null==t&&(f=this.getBasenames().join(";"),0<f.length&&(E=EditorUi.drawHost+
-"/embed.js?s="+f));c.setAttribute("x0",v);c.setAttribute("y0",D)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=m&&c.setAttribute("edit",m));null!=t&&(t=t.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";m=Graph.compress(c);Graph.decompress(m)!=c&&(m=encodeURIComponent(c));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!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=B&&B!=mxConstants.NONE?' style="background-color:'+B+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+m+"</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(c,f,l,m,t){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
-xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.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!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+
+null!=this.pages&&u.setAttribute("pages",this.pages.length));null!=U&&(u=u.cloneNode(!0),u.setAttribute("scale",U));null!=Q&&(u=u.cloneNode(!0),u.setAttribute("border",Q));c=S?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!x&&!t&&(y||null!=k&&/(\.html)$/i.test(k.getTitle())))c=this.getHtml2(mxUtils.getXml(u),f,null!=k?k.getTitle():null,q,O);else if(x||!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(m=null),k=this.getSvgFileProperties(u),
+c=this.getEmbeddedSvg(c,f,m,null,F,E,O,null,null,k.scale,k.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,f,k,m){c=null!=c?c:!0;f=null!=f?f:!1;k=null!=k?k:!Editor.defaultCompressed;var t=this.editor.getGraphXml(c,m);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(E){var C=E.getElementsByTagName("mxGraphModel"),S=0<C.length?C[0]:null;C=E;null==S&&k?(S=mxUtils.getNodeValue(E),0<S.length&&(S=Graph.decompress(S),null!=S&&0<S.length&&(C=E.cloneNode(!1),
+C.appendChild(mxUtils.parseXml(S).documentElement)))):null==S||k?C=E.cloneNode(!0):(C=E.cloneNode(!1),mxUtils.setTextContent(C,Graph.compressNode(S)));t.appendChild(C)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(t),t=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var x=this.pages[f],y=x.node;if(x!=this.currentPage)if(x.needsUpdate){var F=new mxCodec(mxUtils.createXmlDocument());F=F.encode(new mxGraphModel(x.root));
+this.editor.graph.saveViewState(x.viewState,F,null,m);EditorUi.removeChildNodes(y);y.appendChild(F);delete x.needsUpdate}else m&&(this.updatePageRoot(x),null!=x.viewState.backgroundImage&&null!=x.viewState.backgroundImage.originalSrc&&(F=new mxCodec(mxUtils.createXmlDocument()),F=F.encode(new mxGraphModel(x.root)),this.editor.graph.saveViewState(x.viewState,F,null,m,x),y=y.cloneNode(!1),y.appendChild(F)));c(y)}return t};EditorUi.prototype.anonymizeString=function(c,f){for(var k=[],m=0;m<c.length;m++){var t=
+c.charAt(m);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(f?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++)try{var k=
+mxUtils.parseXml(c[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));c[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(k)}catch(x){c[EditorUi.DIFF_INSERT][f].data=x.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var m in c[EditorUi.DIFF_UPDATE]){var t=c[EditorUi.DIFF_UPDATE][m];null!=t.name&&(t.name=this.anonymizeString(t.name));null!=t.cells&&(f=mxUtils.bind(this,function(x){var y=t.cells[x];
+if(null!=y){for(var F in y)null!=y[F].value&&(y[F].value="["+y[F].value.length+"]"),null!=y[F].xmlValue&&(y[F].xmlValue="["+y[F].xmlValue.length+"]"),null!=y[F].style&&(y[F].style="["+y[F].style.length+"]"),mxUtils.isEmptyObject(y[F])&&delete y[F];mxUtils.isEmptyObject(y)&&delete t.cells[x]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete c[EditorUi.DIFF_UPDATE][m]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};
+EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var k=0;k<c.attributes.length;k++)"as"!=c.attributes[k].name&&c.setAttribute(c.attributes[k].name,this.anonymizeString(c.attributes[k].value,f));if(null!=c.childNodes)for(k=0;k<c.childNodes.length;k++)this.anonymizeAttributes(c.childNodes[k],f)};EditorUi.prototype.anonymizeNode=function(c,f){f=c.getElementsByTagName("mxCell");for(var k=0;k<f.length;k++)null!=f[k].getAttribute("value")&&f[k].setAttribute("value","["+f[k].getAttribute("value").length+
+"]"),null!=f[k].getAttribute("xmlValue")&&f[k].setAttribute("xmlValue","["+f[k].getAttribute("xmlValue").length+"]"),null!=f[k].getAttribute("style")&&f[k].setAttribute("style","["+f[k].getAttribute("style").length+"]"),null!=f[k].parentNode&&"root"!=f[k].parentNode.nodeName&&null!=f[k].parentNode.parentNode&&(f[k].setAttribute("id",f[k].parentNode.getAttribute("id")),f[k].parentNode.parentNode.replaceChild(f[k],f[k].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=
+this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.clearStatus(),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){this.spinner.stop();f.handleFileError(k,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==
+DrawioFile.SYNC)}),mxUtils.bind(this,function(k){f.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(c,f,k,m,t,x,y,F,E,C,S,U,Q){t=null!=t?t:!0;x=null!=x?x:!1;C=null!=C?C:!Editor.defaultCompressed;var O=this.editor.graph;if((f||!c&&null!=E&&/(\.svg)$/i.test(E.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var q=O.getGlobalVariable;O=this.createTemporaryGraph(O.getStylesheet());O.setBackgroundImage=this.editor.graph.setBackgroundImage;O.background=this.editor.graph.background;
+var u=null!=this.pages?this.pages[0]:null;null==u||this.currentPage==u?O.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&O.setBackgroundImage(u.viewState.backgroundImage);O.getGlobalVariable=function(I){return"page"==I&&null!=u?u.getName():"pagenumber"==I?1:q.apply(this,arguments)};document.body.appendChild(O.container);null!=u&&O.model.setRoot(u.root)}y=null!=y?y:this.getXmlFileData(t,x,C,S);E=null!=E?E:this.getCurrentFile();c=this.createFileData(y,O,E,
+window.location.href,c,f,k,m,t,F,C,U,Q);O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);return c};EditorUi.prototype.getHtml=function(c,f,k,m,t,x){x=null!=x?x:!0;var y=null,F=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){y=x?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var E=f.view.scale;x=Math.floor(y.x/E-f.view.translate.x);E=Math.floor(y.y/E-f.view.translate.y);y=f.background;null==t&&(f=this.getBasenames().join(";"),0<f.length&&(F=EditorUi.drawHost+
+"/embed.js?s="+f));c.setAttribute("x0",x);c.setAttribute("y0",E)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=m&&c.setAttribute("edit",m));null!=t&&(t=t.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";m=Graph.compress(c);Graph.decompress(m)!=c&&(m=encodeURIComponent(c));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>draw.io</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=y&&y!=mxConstants.NONE?' style="background-color:'+y+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+m+"</div>\n</div>\n"+
+(null==t?'<script type="text/javascript" src="'+F+'">\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(c,f,k,m,t){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
+xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.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>draw.io</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(c))+'"></div>\n'+(null==t?'<script type="text/javascript" src="'+f+'">\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(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var f=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,l=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[f],"cause",[l]),Error(mxResources.get("notADiagramFile")+" ("+l+")");c=null!=f?this.editor.extractGraphModel(f,!0):null;null!=c&&(f=c);if(null!=f&&"mxfile"==f.nodeName&&(c=f.getElementsByTagName("diagram"),
-l={},0<c.length)){var m=this.getHashObject(),t=null;this.fileNode=f;this.pages=[];for(var v=0;v<c.length;v++){null==c[v].getAttribute("id")&&c[v].setAttribute("id",v);f=new DiagramPage(c[v]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[v+1]));this.pages.push(f);if(null==m.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||null!=m.pageId&&f.getId()==m.pageId)t=f;if(null==l[f.getId()])l[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=
+function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var f=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,k=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[f],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");c=null!=f?this.editor.extractGraphModel(f,!0):null;null!=c&&(f=c);if(null!=f&&"mxfile"==f.nodeName&&(c=f.getElementsByTagName("diagram"),
+k={},0<c.length)){var m=this.getHashObject(),t=null;this.fileNode=f;this.pages=[];for(var x=0;x<c.length;x++){null==c[x].getAttribute("id")&&c[x].setAttribute("id",x);f=new DiagramPage(c[x]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[x+1]));this.pages.push(f);if(null==m.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||null!=m.pageId&&f.getId()==m.pageId)t=f;if(null==k[f.getId()])k[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=
null!=t?t:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),
-this.scrollToPage());if(null!=urlParams["layer-ids"])try{var B=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(v=0;v<B.length;v++)f[B[v]]=!0;var E=this.editor.graph.getModel(),D=E.getChildren(E.root);for(v=0;v<D.length;v++){var A=D[v];E.setVisible(A,f[A.id]||!1)}}catch(S){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=
-f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(c,f,l,m,t,v,B,E,D,A,S,R,T,P,q,u,J){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var G=this.getBaseFilename(!t),H=G+("xml"==c||"pdf"==c&&S?".drawio":"")+"."+
-c;if("xml"==c){var g=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,t,null,null,null,f);this.saveData(H,c,g,"text/xml")}else if("html"==c)g=this.getHtml2(this.getFileData(!0),this.editor.graph,G),this.saveData(H,c,g,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?H=G+".png":"jpeg"==c&&(H=G+".jpg"),this.saveRequest(H,c,mxUtils.bind(this,function(O,Q){try{return this.createDownloadRequest(O,c,m,Q,B,t,E,D,A,S,R,void 0,
-void 0,!v,T,P,q,u,J)}catch(U){this.handleError(U)}}));else{var p=null,C=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==c){var I=this.editor.graph.background;if(B||I==mxConstants.NONE)I=null;var M=this.editor.graph.getSvg(I,null,null,null,null,m);l&&this.editor.graph.addSvgShadow(M);this.editor.convertImages(M,
-mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();C(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else H=G+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();C(O)}),m)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,m,t,v,B,E,D,A,S,R,T,P,q,u,J,G,H){c=this.downloadRequestBuilder(c,f,l,m,t,v,B,E,D,A,S,R,T,P,q,u,J,G,H);f="";for(var g in c)l=c[g],null!=l&&(f+=g+"="+encodeURIComponent(l)+
-"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,m,t,v,B,E,D,A,S,R,T,P,q,u,J,G,H){var g=this.editor.graph,p=g.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==v?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var C=null,I=null,M=null;if(!EditorUi.isElectronApp&&(p.width*p.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==f&&(null!=S?(C=S.from,I=S.to):0==v&&
-(M="1"));"xmlpng"==f&&(A="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(v=0;v<this.pages.length;v++)if(this.pages[v]==this.currentPage){C=v;break}v=g.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!t?t||null!=v&&v!=mxConstants.NONE||(v="#ffffff"):v=mxConstants.NONE;t={globalVars:g.getExportVariables()};null!=S&&null!=S.from&&(t.globalVars.pagenumber=S.from+1);D&&(t.grid={size:g.gridSize,steps:g.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:
-g.view.gridColor});Graph.translateDiagram&&(t.diagramLanguage=Graph.diagramLanguage);return{format:f,from:C,to:I,allPages:M,bg:null!=v?v:mxConstants.NONE,base64:m,embedXml:A,xml:l,filename:null!=c?c:"",extras:JSON.stringify(t),scale:B,border:E,pageMargin:q,w:R&&isFinite(R)?R:null,h:T&&isFinite(T)?T:null,crop:null!=P&&P?"1":"0",fit:null!=u&&u?"1":"0",shadows:null!=H&&H?"1":"0",sheetsAcross:J,sheetsDown:G}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=
-window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+1));try{f=JSON.parse(c)}catch(m){}}}return f};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();
-c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var l=f.lastIndexOf("#");0<l&&(f=f.substring(0,l));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(m){}0<l&&0<f.lastIndexOf("#")?window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var m=window.location.hash,
-t=mxUtils.bind(this,function(B){var E=null!=c.data?c.data:"";null!=B&&0<B.length&&(0<E.length&&(E+="\n"),E+=B);B=new LocalFile(this,"csv"!=c.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);B.getHash=function(){return m};this.fileLoaded(B);"csv"==c.format&&this.importCsv(E,mxUtils.bind(this,function(T){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var D=null!=c.interval?
-parseInt(c.interval):6E4,A=null,S=mxUtils.bind(this,function(){var T=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(P){T===this.currentPage&&(200<=P.getStatus()&&300>=P.getStatus()?(this.updateDiagram(P.getText()),R()):this.handleError({message:mxResources.get("error")+" "+P.getStatus()}))}),mxUtils.bind(this,function(P){this.handleError(P)}))}),R=mxUtils.bind(this,function(){window.clearTimeout(A);A=window.setTimeout(S,
-D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){R();S()}));R();S()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var v=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(v,mxUtils.bind(this,function(B){t(B)}),mxUtils.bind(this,function(B){null!=l&&l(B)}))}else t("")};EditorUi.prototype.updateDiagram=function(c){function f(g){var p=new mxCellOverlay(g.image||t.warningImage,g.tooltip,g.align,g.valign,g.offset);p.addListener(mxEvent.CLICK,function(C,I){m.alert(g.tooltip)});
-return p}var l=null,m=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var t=this.editor.graph,v=t.getModel();v.beginUpdate();var B=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var E=v.getCell(c.getAttribute("id"));if(null!=E){try{var D=c.getAttribute("value");if(null!=D){var A=mxUtils.parseXml(D).documentElement;if(null!=A)if("1"==A.getAttribute("replace-value"))v.setValue(E,A);else for(var S=A.attributes,R=0;R<
-S.length;R++)t.setAttributeForCell(E,S[R].nodeName,0<S[R].nodeValue.length?S[R].nodeValue:null)}}catch(g){null!=window.console&&console.log("Error in value for "+E.id+": "+g)}try{var T=c.getAttribute("style");null!=T&&t.model.setStyle(E,T)}catch(g){null!=window.console&&console.log("Error in style for "+E.id+": "+g)}try{var P=c.getAttribute("icon");if(null!=P){var q=0<P.length?JSON.parse(P):null;null!=q&&q.append||t.removeCellOverlays(E);null!=q&&t.addCellOverlay(E,f(q))}}catch(g){null!=window.console&&
-console.log("Error in icon for "+E.id+": "+g)}try{var u=c.getAttribute("geometry");if(null!=u){u=JSON.parse(u);var J=t.getCellGeometry(E);if(null!=J){J=J.clone();for(key in u){var G=parseFloat(u[key]);"dx"==key?J.x+=G:"dy"==key?J.y+=G:"dw"==key?J.width+=G:"dh"==key?J.height+=G:J[key]=parseFloat(u[key])}t.model.setGeometry(E,J)}}}catch(g){null!=window.console&&console.log("Error in icon for "+E.id+": "+g)}}}else if("model"==c.nodeName){for(var H=c.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=
-H.nextSibling;null!=H&&(new mxCodec(c.firstChild)).decode(H,v)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(t.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))t.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(B=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{v.endUpdate()}null!=B&&this.chromelessResize&&this.chromelessResize(!0,
-B)}return l};EditorUi.prototype.getCopyFilename=function(c,f){var l=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var m=l.lastIndexOf(".");0<=m&&(c=l.substring(m),l=l.substring(0,m));if(f){f=l;var t=new Date;l=t.getFullYear();m=t.getMonth()+1;var v=t.getDate(),B=t.getHours(),E=t.getMinutes();t=t.getSeconds();l=f+(" "+(l+"-"+m+"-"+v+"-"+B+"-"+E+"-"+t))}return l=mxResources.get("copyOf",[l])+c};EditorUi.prototype.logIfModified=function(c,f){try{null!=c&&f&&EditorUi.debug("File.closed",
-[c])}catch(l){}};EditorUi.prototype.fileLoaded=function(c,f,l){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[c],"noDialogs",[f]);var m=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var t=!1;this.hideDialog();null!=m&&(m.removeListener(this.descriptorChangedListener),this.logIfModified(m,!0),m.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var v=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
+this.scrollToPage());if(null!=urlParams["layer-ids"])try{var y=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(x=0;x<y.length;x++)f[y[x]]=!0;var F=this.editor.graph.getModel(),E=F.getChildren(F.root);for(x=0;x<E.length;x++){var C=E[x];F.setVisible(C,f[C.id]||!1)}}catch(S){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=
+f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(c,f,k,m,t,x,y,F,E,C,S,U,Q,O,q,u,I){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var G=this.getBaseFilename(!t),H=G+("xml"==c||"pdf"==c&&S?".drawio":"")+"."+
+c;if("xml"==c){var g=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,t,null,null,null,f);this.saveData(H,c,g,"text/xml")}else if("html"==c)g=this.getHtml2(this.getFileData(!0),this.editor.graph,G),this.saveData(H,c,g,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?H=G+".png":"jpeg"==c&&(H=G+".jpg"),this.saveRequest(H,c,mxUtils.bind(this,function(N,R){try{return this.createDownloadRequest(N,c,m,R,y,t,F,E,C,S,U,void 0,
+void 0,!x,Q,O,q,u,I)}catch(T){this.handleError(T)}}));else{var p=null,B=mxUtils.bind(this,function(N){N.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",N,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==c){var K=this.editor.graph.background;if(y||K==mxConstants.NONE)K=null;var M=this.editor.graph.getSvg(K,null,null,null,null,m);k&&this.editor.graph.addSvgShadow(M);this.editor.convertImages(M,
+mxUtils.bind(this,mxUtils.bind(this,function(N){this.spinner.stop();B(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(N))})))}else H=G+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(N){this.spinner.stop();B(N)}),m)}}catch(N){this.handleError(N)}};EditorUi.prototype.createDownloadRequest=function(c,f,k,m,t,x,y,F,E,C,S,U,Q,O,q,u,I,G,H){c=this.downloadRequestBuilder(c,f,k,m,t,x,y,F,E,C,S,U,Q,O,q,u,I,G,H);f="";for(var g in c)k=c[g],null!=k&&(f+=g+"="+encodeURIComponent(k)+
+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,k,m,t,x,y,F,E,C,S,U,Q,O,q,u,I,G,H){var g=this.editor.graph,p=g.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==x?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var B=null,K=null,M=null;if(!EditorUi.isElectronApp&&(p.width*p.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};C=C?"1":"0";"pdf"==f&&(null!=S?(B=S.from,K=S.to):0==x&&
+(M="1"));"xmlpng"==f&&(C="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(x=0;x<this.pages.length;x++)if(this.pages[x]==this.currentPage){B=x;break}x=g.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!t?t||null!=x&&x!=mxConstants.NONE||(x="#ffffff"):x=mxConstants.NONE;t={globalVars:g.getExportVariables()};null!=S&&null!=S.from&&(t.globalVars.pagenumber=S.from+1);E&&(t.grid={size:g.gridSize,steps:g.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:
+g.view.gridColor});Graph.translateDiagram&&(t.diagramLanguage=Graph.diagramLanguage);return{format:f,from:B,to:K,allPages:M,bg:null!=x?x:mxConstants.NONE,base64:m,embedXml:C,xml:k,filename:null!=c?c:"",extras:JSON.stringify(t),scale:y,border:F,pageMargin:q,w:U&&isFinite(U)?U:null,h:Q&&isFinite(Q)?Q:null,crop:null!=O&&O?"1":"0",fit:null!=u&&u?"1":"0",shadows:null!=H&&H?"1":"0",sheetsAcross:I,sheetsDown:G}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=
+window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var k=c.lastIndexOf("#");if(0<k){c=decodeURIComponent(c.substring(k+1));try{f=JSON.parse(c)}catch(m){}}}return f};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();
+c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var k=f.lastIndexOf("#");0<k&&(f=f.substring(0,k));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(m){}0<k&&0<f.lastIndexOf("#")?window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,k){var m=window.location.hash,
+t=mxUtils.bind(this,function(y){var F=null!=c.data?c.data:"";null!=y&&0<y.length&&(0<F.length&&(F+="\n"),F+=y);y=new LocalFile(this,"csv"!=c.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return m};this.fileLoaded(y);"csv"==c.format&&this.importCsv(F,mxUtils.bind(this,function(Q){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var E=null!=c.interval?
+parseInt(c.interval):6E4,C=null,S=mxUtils.bind(this,function(){var Q=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(O){Q===this.currentPage&&(200<=O.getStatus()&&300>=O.getStatus()?(this.updateDiagram(O.getText()),U()):this.handleError({message:mxResources.get("error")+" "+O.getStatus()}))}),mxUtils.bind(this,function(O){this.handleError(O)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(C);C=window.setTimeout(S,
+E)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();S()}));U();S()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var x=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(x,mxUtils.bind(this,function(y){t(y)}),mxUtils.bind(this,function(y){null!=k&&k(y)}))}else t("")};EditorUi.prototype.updateDiagram=function(c){function f(g){var p=new mxCellOverlay(g.image||t.warningImage,g.tooltip,g.align,g.valign,g.offset);p.addListener(mxEvent.CLICK,function(B,K){m.alert(g.tooltip)});
+return p}var k=null,m=this;if(null!=c&&0<c.length&&(k=mxUtils.parseXml(c),c=null!=k?k.documentElement:null,null!=c&&"updates"==c.nodeName)){var t=this.editor.graph,x=t.getModel();x.beginUpdate();var y=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var F=x.getCell(c.getAttribute("id"));if(null!=F){try{var E=c.getAttribute("value");if(null!=E){var C=mxUtils.parseXml(E).documentElement;if(null!=C)if("1"==C.getAttribute("replace-value"))x.setValue(F,C);else for(var S=C.attributes,U=0;U<
+S.length;U++)t.setAttributeForCell(F,S[U].nodeName,0<S[U].nodeValue.length?S[U].nodeValue:null)}}catch(g){null!=window.console&&console.log("Error in value for "+F.id+": "+g)}try{var Q=c.getAttribute("style");null!=Q&&t.model.setStyle(F,Q)}catch(g){null!=window.console&&console.log("Error in style for "+F.id+": "+g)}try{var O=c.getAttribute("icon");if(null!=O){var q=0<O.length?JSON.parse(O):null;null!=q&&q.append||t.removeCellOverlays(F);null!=q&&t.addCellOverlay(F,f(q))}}catch(g){null!=window.console&&
+console.log("Error in icon for "+F.id+": "+g)}try{var u=c.getAttribute("geometry");if(null!=u){u=JSON.parse(u);var I=t.getCellGeometry(F);if(null!=I){I=I.clone();for(key in u){var G=parseFloat(u[key]);"dx"==key?I.x+=G:"dy"==key?I.y+=G:"dw"==key?I.width+=G:"dh"==key?I.height+=G:I[key]=parseFloat(u[key])}t.model.setGeometry(F,I)}}}catch(g){null!=window.console&&console.log("Error in icon for "+F.id+": "+g)}}}else if("model"==c.nodeName){for(var H=c.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=
+H.nextSibling;null!=H&&(new mxCodec(c.firstChild)).decode(H,x)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(t.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))t.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(y=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{x.endUpdate()}null!=y&&this.chromelessResize&&this.chromelessResize(!0,
+y)}return k};EditorUi.prototype.getCopyFilename=function(c,f){var k=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var m=k.lastIndexOf(".");0<=m&&(c=k.substring(m),k=k.substring(0,m));if(f){f=k;var t=new Date;k=t.getFullYear();m=t.getMonth()+1;var x=t.getDate(),y=t.getHours(),F=t.getMinutes();t=t.getSeconds();k=f+(" "+(k+"-"+m+"-"+x+"-"+y+"-"+F+"-"+t))}return k=mxResources.get("copyOf",[k])+c};EditorUi.prototype.logIfModified=function(c,f){try{null!=c&&f&&EditorUi.debug("File.closed",
+[c])}catch(k){}};EditorUi.prototype.fileLoaded=function(c,f,k){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[c],"noDialogs",[f]);var m=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var t=!1;this.hideDialog();null!=m&&(m.removeListener(this.descriptorChangedListener),this.logIfModified(m,!0),m.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var x=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
null!=m&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");this.clearStatus();this.updateUi();f||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=c)try{this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",
this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.clearStatus():this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+
-'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")}));!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();null!=l&&l();this.editor.fireEvent(new mxEventObject("fileLoaded"));t=!0;if(!this.isOffline()&&null!=c.getMode()){var B="1"==urlParams.sketch?"sketch":
-uiTheme;if(null==B)B="default";else if("sketch"==B||"min"==B)B+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+B})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),
-title:c.getTitle(),mode:c.getMode()})}catch(E){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(E){}}catch(E){this.fileLoadedError=E;if(null!=c)try{c.close()}catch(D){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=m?this.fileLoaded(m)||v():v()});f?c():(null!=E.fallbackFileData&&(E.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,
-function(){this.hideDialog();var D=new LocalFile(this,E.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(D)})}),this.handleError(E,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else v();return t};EditorUi.prototype.getHashValueForPages=function(c,f){var l=0,m=new mxGraphModel,t=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var v=0;v<c.length;v++){this.updatePageRoot(c[v]);var B=c[v].node.cloneNode(!1);B.removeAttribute("name");m.root=c[v].root;
-var E=t.encode(m);this.editor.graph.saveViewState(c[v].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");B.appendChild(E);null!=f&&(f.eltCount+=B.getElementsByTagName("*").length,f.nodeCount+=B.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(B,function(D,A,S,R){return!R||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=A&&"y"!=A&&"width"!=A&&"height"!=A?R&&"mxCell"==D.nodeName&&"previous"==A?null:S:Math.round(S)},f)<<0}return l};EditorUi.prototype.hashValue=
-function(c,f,l){var m=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(m^=this.hashValue(c.nodeName,f,l));if(null!=c.attributes){null!=l&&(l.attrCount+=c.attributes.length);for(var t=0;t<c.attributes.length;t++){var v=c.attributes[t].name,B=null!=f?f(c,v,c.attributes[t].value,!0):c.attributes[t].value;null!=B&&(m^=this.hashValue(v,f,l)+this.hashValue(B,f,l))}}if(null!=c.childNodes)for(t=0;t<c.childNodes.length;t++)m=
-(m<<5)-m+this.hashValue(c.childNodes[t],f,l)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=l&&(l.byteCount+=c.length);for(t=0;t<c.length;t++)f=(f<<5)-f+c.charCodeAt(t)<<0;m^=f}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,l,m,t,v,B){};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(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));f=mxUtils.createXmlDocument();var l=f.createElement("mxlibrary");
-mxUtils.setTextContent(l,JSON.stringify(c,null,2));f.appendChild(l);return mxUtils.getXml(f,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var f=this.sidebar.palettes[c];if(null!=f){for(var l=0;l<f.length;l++)f[l].parentNode.removeChild(f[l]);delete this.sidebar.palettes[c]}};
-EditorUi.prototype.repositionLibrary=function(c,f){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!f){null==c&&(f=this.sidebar.palettes["L.scratchpad"],null==f&&(f=this.sidebar.palettes.search),null!=f&&(c=f[f.length-1].nextSibling));c=null!=c?c:l.firstChild.nextSibling.nextSibling;f=l.lastChild;var m=f.previousSibling;l.insertBefore(f,c);l.insertBefore(m,f)}};EditorUi.prototype.loadLibrary=function(c,f){var l=mxUtils.parseXml(c.getData());if("mxlibrary"==
-l.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(c,m,l.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.showSearchWindow=function(c,f){var l=c?"findReplace":"find",m=l+"Window";
-if(null==this[m]){var t="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,v=c?t?330:300:240;this[m]=new FindWindow(this,document.body.offsetWidth-(v+20),100,v,c?t?304:288:180,c);this[m].window.addListener("show",function(){this.fireEvent(new mxEventObject(l))});this[m].window.addListener("hide",function(){this.fireEvent(new mxEventObject(l))});this[m].window.setVisible(!0)}else null==f&&this[m].window.setVisible(!this[m].window.isVisible());null!=f&&(this[m].doSearch(f),
-this[m].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,f,l,m){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var t=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var v=0;v<this.openLibraries.length;v++)if(this.openLibraries[v].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[v],this.openLibraries);break}t={file:c,images:f,title:l,expand:m};this.openLibraries.push(t)}else this.scratchpad=
-c;v=this.sidebar.palettes[c.getHash()];v=null!=v?v[v.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var B=null,E=mxUtils.bind(this,function(G,H){0==G.length&&c.isEditable()?(null==B&&(B=document.createElement("div"),B.className="geDropTarget",mxUtils.write(B,mxResources.get("dragElementsHere"))),H.appendChild(B)):this.addLibraryEntries(G,H)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));
-var D=this.sidebar.addPalette(c.getHash(),l,null!=m?m:!0,mxUtils.bind(this,function(G){E(f,G)}));null!=t&&(t.div=D);this.repositionLibrary(v,"L.scratchpad"!=c.getHash());m=D.parentNode.previousSibling;l=m.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&m.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var A=document.createElement("div");A.style.backgroundColor="inherit";m.style.position="relative";var S=document.createElement("img");S.className="geLibraryButton";S.setAttribute("src",
-Editor.crossImage);S.setAttribute("title",mxResources.get("close"));var R=null;if(".scratchpad"!=c.title||this.closableScratchpad)A.appendChild(S),mxEvent.addListener(S,"click",mxUtils.bind(this,function(G){if(!mxEvent.isConsumed(G)){var H=mxUtils.bind(this,function(){null!=t&&mxUtils.remove(t,this.openLibraries);this.closeLibrary(c)});null!=R?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(G)}}));if(c.isEditable()){var T=
-this.editor.graph,P=null;l=mxUtils.bind(this,function(G){this.showLibraryDialog(c.getTitle(),D,f,c,c.getMode());mxEvent.consume(G)});var q=mxUtils.bind(this,function(G){c.setModified(!0);c.isAutosave()?(null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P),P=S.cloneNode(!1),P.setAttribute("src",Editor.spinImage),P.setAttribute("title",mxResources.get("saving")),P.style.cursor="default",P.style.marginRight="2px",P.style.marginTop="-2px",A.insertBefore(P,A.firstChild),this.saveLibrary(c.getTitle(),
-f,c,c.getMode(),!0,!0,function(){null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P)})):null==R&&(R=S.cloneNode(!1),R.setAttribute("src",Editor.saveImage),R.setAttribute("title",mxResources.get("save")),A.insertBefore(R,A.firstChild),mxEvent.addListener(R,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==R||c.isModified()||(R.parentNode.removeChild(R),R=null)});mxEvent.consume(H)})))}),u=mxUtils.bind(this,function(G,
-H,g,p){G=T.cloneCells(mxUtils.sortCells(T.model.getTopmostCells(G)));for(var C=0;C<G.length;C++){var I=T.getCellGeometry(G[C]);null!=I&&I.translate(-H.x,-H.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(G,H.width,H.height,p||"",!0,null,!1));G=mxUtils.getXml(this.editor.graph.encodeCells(G));Editor.defaultCompressed&&(G=Graph.compress(G));H={xml:G,w:H.width,h:H.height};null!=p&&(H.title=p);f.push(H);q(g);null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null)}),J=
-mxUtils.bind(this,function(G){if(T.isSelectionEmpty())T.getRubberband().isActive()?(T.getRubberband().execute(G),T.getRubberband().reset()):null!=G&&mxEvent.getSource(G).classList.contains("geLibraryButton")&&this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var H=T.getSelectionCells(),g=T.view.getBounds(H);if(null!=g&&0<g.width&&0<g.height){var p=T.view.scale;g.x/=p;g.y/=p;g.width/=p;g.height/=p;g.x-=T.view.translate.x;g.y-=T.view.translate.y;
-u(H,g)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(G)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(G){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler.first&&(T.graphHandler.suspend(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="light-dark(#fefefe, #000000)",D.style.cursor="copy",T.panningManager.stop(),T.autoScroll=!1,mxEvent.consume(G))}),
-mxUtils.bind(this,function(G){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,T.panningManager.stop(),T.graphHandler.reset(),T.isMouseDown=!1,T.autoScroll=!0,J(G),mxEvent.consume(G))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(G){T.isMouseDown&&null!=T.graphHandler.first&&(T.graphHandler.resume(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor=
-"",D.style.cursor="",T.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(G){D.style.backgroundColor="light-dark(#fefefe, #000000)";G.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();G.stopPropagation();G.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(G){D.style.cursor="";D.style.backgroundColor="";0<G.dataTransfer.files.length&&this.importFiles(G.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,
-function(H,g,p,C,I,M,O,Q,U){if(null!=H&&"image/"==g.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,I,M),H)],H[0].vertex=!0,u(H,new mxRectangle(0,0,I,M),G,mxEvent.isAltDown(G)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null);else{var V=!1,X=mxUtils.bind(this,function(W,Y){null!=W&&"application/pdf"==
-Y&&(Y=Editor.extractGraphModelFromPdf(W),null!=Y&&0<Y.length&&(W=Y));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var Z=JSON.parse(mxUtils.getTextContent(W.documentElement));E(Z,D);f=f.concat(Z);q(G);this.spinner.stop();V=!0}catch(da){}else if("mxfile"==W.documentElement.nodeName)try{var aa=W.documentElement.getElementsByTagName("diagram");for(Z=0;Z<aa.length;Z++){var ha=this.stringToCells(Editor.getDiagramNodeXml(aa[Z])),ea=this.editor.graph.getBoundingBoxFromGeometry(ha);
-null!=ea&&u(ha,new mxRectangle(0,0,ea.width,ea.height),G)}V=!0}catch(da){null!=window.console&&console.log("error in drop handler:",da)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null)});null!=U&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(U,function(W){X(W,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,O)&&null!=U?this.isExternalDataComms()?
-this.parseFile(U,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?X(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):X(H,g)}}));G.stopPropagation();G.preventDefault()})),mxEvent.addListener(D,"dragleave",function(G){D.style.cursor="";D.style.backgroundColor=
-"";G.stopPropagation();G.preventDefault()}));S=S.cloneNode(!1);S.setAttribute("src",Editor.editImage);S.setAttribute("title",mxResources.get("edit"));A.insertBefore(S,A.firstChild);mxEvent.addListener(S,"click",l);l=S.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));A.insertBefore(l,A.firstChild);mxEvent.addListener(l,"click",J);".scratchpad"==c.title&&(this.addSelectionToScratchpad=J);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||
-(l=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),l.className="geLibraryButton",A.insertBefore(l,A.firstChild))}m.appendChild(A);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var m=c[l],t=m.data;if(null!=t){t="data:"==t.substring(0,5)?this.convertDataUri(t):t;var v="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(v+="aspect=fixed;");v=v+"image="+t+";";
-null!=m.style&&(v+=m.style);f.appendChild(this.sidebar.createVertexTemplate(v,m.w,m.h,"",m.title||"",!1,null,!0))}else if(null!=m.xml){var B=this.stringToCells("<"==m.xml.charAt(0)?m.xml:Graph.decompress(m.xml)),E=0==B.length?mxResources.get("drawingEmpty"):null!=m.title?m.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(B,m.w,m.h,E,!0,null,!0))}}catch(D){E=null!=D.message?mxResources.get("error")+": "+D.message:String(D),v=this.sidebar.createVertexTemplateFromCells(null,m.w,m.h,
-E,!0,null,!0),f.appendChild(v)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,l,m,t,v,B){c=new ImageDialog(this,c,f,l,m,
-t,v,B);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,l,m,t,v){var B=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=B?JSON.stringify(JSON.parse(B),null,2):"",mxUtils.bind(this,function(E){if(null!=E)try{if(null!=v&&v(E),E==B)this.hideDialog();else{if(0<E.length){var D=JSON.parse(E);localStorage.setItem(f,JSON.stringify(D))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(A){this.handleError(A)}}),
-null,mxResources.get("close"),null,null,null,!0,null,null,t,l,m);this.showDialog(c.container,660,480,!0,!1,null,null,null,new mxRectangle(0,0,null!=l&&2<l.length?500:440,280));c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,l,m){c=null!=c?c:mxUtils.bind(this,function(t,v,B,E){v||(t=new ChangePageSetup(this,m?B:null,t),t.ignoreColor=!m,null!=E&&m&&(t.shadowVisible=E),this.editor.graph.model.execute(t))});c=new BackgroundImageDialog(this,c,f,l,m);this.showDialog(c.container,400,
-m?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,f,l,m,t){c=new LibraryDialog(this,c,f,l,m,t);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(v){v&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var n=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=n.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&
-f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,l,m,t,v,B){var E=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{B||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!B||null==window.console||console.error("EditorUi.handleError:",c)}catch(T){}if(null!=
-D||null!=f){B=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var A=mxResources.get("ok"),S=null;f=null!=f?f:mxResources.get("error");if(null!=D){null!=D.retry&&(A=mxResources.get("cancel"),S=function(){E();D.retry()});if(404==D.code||404==D.status||403==D.code){B=403==D.code?null!=D.message?mxUtils.htmlEntities(D.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?
-" ("+this.drive.user.email+")":""),!1);var R=null!=t?null:null!=v?v:window.location.hash;if(null!=R&&("#G"==R.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==R.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==D.code||404==D.status)){R="#U"==R.substring(0,2)?R.substring(45,R.lastIndexOf("%26ex")):R.substring(2);this.showError(f,
-B,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+R);null!=m&&m()}),S,mxResources.get("changeUser"),mxUtils.bind(this,function(){function T(){J.innerText="";for(var G=0;G<P.length;G++){var H=document.createElement("option");mxUtils.write(H,P[G].displayName);H.value=G;J.appendChild(H);H=document.createElement("option");H.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(H,"<"+P[G].email+">");H.setAttribute("disabled","disabled");
-J.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=P.length;J.appendChild(H)}var P=this.drive.getUsersList(),q=document.createElement("div"),u=document.createElement("div");u.style.marginBottom="6px";mxUtils.write(u,mxResources.get("changeUser")+": ");q.appendChild(u);var J=document.createElement("select");J.style.width="100%";T();mxEvent.addListener(J,"change",mxUtils.bind(this,function(){var G=J.value,H=P.length!=G;H&&this.drive.setUser(P[G]);
-this.drive.authorize(H,mxUtils.bind(this,function(){H||(P=this.drive.getUsersList(),T())}),mxUtils.bind(this,function(g){this.handleError(g)}),!0)}));q.appendChild(J);q=new CustomDialog(this,q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=D.message?B=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name,!1):
-mxUtils.htmlEntities(D.message,!1):null!=D.response&&null!=D.response.error?B=mxUtils.htmlEntities(D.response.error,!1):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?B=mxUtils.htmlEntities(mxResources.get("timeout"),!1):D.code==App.ERROR_BUSY?B=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof D&&0<D.length&&(B=mxUtils.htmlEntities(D,!1)))}t=c=null;null!=D&&null!=D.helpLink?(c=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):
-null!=D&&null!=D.ownerEmail?(c=mxResources.get("contactOwner"),B+=mxUtils.htmlEntities(" ("+c+": "+D.ownerEmail+")",!1),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))})):null!=D&&null!=D.alternateAction&&(c=D.alternateAction.label,t=D.alternateAction.funct);this.showError(f,B,A,l,S,null,null,c,t,null,null,null,m?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,
-l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,m,t,v){c=null!=c?c:"";var B=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){B();null!=f&&f()},function(){B();null!=l&&l()},m,t,null,null,null,null,E);this.showDialog(c.container,340,46+E,!0,v);c.init()};EditorUi.prototype.showBanner=function(c,f,l,m,t,v,B,E,D){v=!1;if(!(this.bannerShowing||this["hideBanner"+
-c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){B=null!=B?B:"translate(-50%,120%)";E=null!=E?E:"translate(-50%,0%)";var A=document.createElement("div");A.className="geBtn gePrimaryBtn geBanner"+(t?" geSmallBanner":"");A.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(A.style,"transform",B);mxUtils.setPrefixedStyle(A.style,"transition","all 1000ms ease");null!=D&&mxUtils.setPrefixedStyle(A.style,"transform-origin",D);D=D=document.createElement("img");
-D.setAttribute("src",Editor.crossImage);D.setAttribute("title",mxResources.get(m?"doNotShowAgain":"close"));D.setAttribute("border","0");t||(v=document.createElement("img"),v.setAttribute("src",IMAGE_PATH+"/logo.png"),v.setAttribute("border","0"),v.setAttribute("align","absmiddle"),v.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",A.appendChild(v),D.style.cssText=(t?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",
-A.appendChild(D));mxUtils.write(A,f);document.body.appendChild(A);this.bannerShowing=!0;t&&(D.className="geLibraryButton",A.appendChild(D));f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var S=document.createElement("input");S.setAttribute("type","checkbox");S.setAttribute("id","geDoNotShowAgainCheckbox");S.style.marginRight="6px";if(!m){f.appendChild(S);var R=document.createElement("label");
-R.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(R,mxResources.get("doNotShowAgain"));f.appendChild(R);A.style.paddingBottom=t?"16px":"30px";A.appendChild(f)}var T=mxUtils.bind(this,function(){null!=A.parentNode&&(A.parentNode.removeChild(A),this.bannerShowing=!1,S.checked||m)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=D&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(q){mxEvent.consume(q);
-T()}));var P=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(A.style,"transform",B);window.setTimeout(mxUtils.bind(this,function(){T()}),1E3)});mxEvent.addListener(A,"click",mxUtils.bind(this,function(q){var u=mxEvent.getSource(q);u!=S&&u!=R?(null!=l&&l(),T(),mxEvent.consume(q)):P()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(A.style,"transform",E)}),500);window.setTimeout(P,t?5E3:3E4);v=!0}return v};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=
-new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=function(c,f,l,m){c=c.toDataURL("image/"+l);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<m&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",m));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,l,m,t){var v="jpeg"==l?"jpg":l;m=this.getBaseFilename(m)+
-(null!=f?".drawio":"")+"."+v;c=this.createImageDataUri(c,f,l,t);this.saveData(m,v,c.substring(c.lastIndexOf(",")+1),"image/"+l,!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(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));
-this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,l,m,t,v){"text/xml"!=l||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=v?v:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=m?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==
-l?mxUtils.popup(c,!0):(l.document.write(c),l.document.close(),l.document.execCommand("SaveAs",!0,f),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,l,m);else{var B=document.createElement("a");v=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof B.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var E=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
-v=65==(E?parseInt(E[2],10):!1)?!1:v}if(v||this.isOffline()){B.href=URL.createObjectURL(m?this.base64ToBlob(c,l):new Blob([c],{type:l}));v?B.download=f:B.setAttribute("target","_blank");document.body.appendChild(B);try{window.setTimeout(function(){URL.revokeObjectURL(B.href)},2E4),B.click(),B.parentNode.removeChild(B)}catch(D){}}else this.createEchoRequest(c,f,l,m,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,l,m,t,v){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,
-c+(null!=l?"&mime="+l:"")+(null!=t?"&format="+t:"")+(null!=v?"&base64="+v:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,m,t,v,B,E,D){v=null!=v?v:!1;B=null!=B?B:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var A=mxUtils.bind(this,function(R,T,P,q){try{if("_blank"==T)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,m);else if(null!=l&&"text/html"==l.substring(0,9)){var u=new EmbedDialog(this,c);this.showDialog(u.container,
-450,240,!0,!0);u.init()}else{var J=window.open("about:blank");null==J?mxUtils.popup(c,!0):(J.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),J.document.close())}else if(T==App.MODE_DEVICE||"download"==T)this.doSaveLocalFile(c,R,l,m,null,E);else if(null!=R&&0<R.length){var G=mxUtils.bind(this,function(H){try{this.exportFile(c,R,l,m,T,H)}catch(g){this.handleError(g)}});null!=q?G(q):this.pickFolder(T,G)}}catch(H){this.handleError(H)}});t=[];v||t.push(App.MODE_BROWSER);B||t.push("_blank");
-var S=new SaveDialog(this,f,mxUtils.bind(this,function(R,T,P){A(R.value,T,R,P);this.hideDialog(null,null,S.container)}),t,c,l,m,D);this.showDialog(S.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));S.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var m=window.open("about:blank");if(null==m||null==m.document)mxUtils.popup(c,!0);else{var t="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var v=mxUtils.parseXml(c).documentElement.style.backgroundColor;
-""!=v&&(t="background: "+v+";")}t='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+t+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||l?(v=l?c:btoa(unescape(encodeURIComponent(c))),m.document.write(t+'<img style="max-width:100%;" src="data:'+f+";base64,"+v+'"/></body></html>')):m.document.write(t+c+"</body></html>"):m.document.write(t+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");m.document.close()}};var d=EditorUi.prototype.addChromelessToolbarItems;
+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")}));!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();null!=k&&k();this.editor.fireEvent(new mxEventObject("fileLoaded"));t=!0;if(!this.isOffline()&&null!=c.getMode()){var y="1"==urlParams.sketch?"sketch":
+uiTheme;if(null==y)y="default";else if("sketch"==y||"min"==y)y+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+y})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),
+title:c.getTitle(),mode:c.getMode()})}catch(F){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(F){}}catch(F){this.fileLoadedError=F;if(null!=c)try{c.close()}catch(E){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=m?this.fileLoaded(m)||x():x()});f?c():(null!=F.fallbackFileData&&(F.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,
+function(){this.hideDialog();var E=new LocalFile(this,F.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(E)})}),this.handleError(F,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else x();return t};EditorUi.prototype.getHashValueForPages=function(c,f){var k=0,m=new mxGraphModel,t=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var x=0;x<c.length;x++){this.updatePageRoot(c[x]);var y=c[x].node.cloneNode(!1);y.removeAttribute("name");m.root=c[x].root;
+var F=t.encode(m);this.editor.graph.saveViewState(c[x].viewState,F,!0);F.removeAttribute("pageWidth");F.removeAttribute("pageHeight");y.appendChild(F);null!=f&&(f.eltCount+=y.getElementsByTagName("*").length,f.nodeCount+=y.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(y,function(E,C,S,U){return!U||"mxGeometry"!=E.nodeName&&"mxPoint"!=E.nodeName||"x"!=C&&"y"!=C&&"width"!=C&&"height"!=C?U&&"mxCell"==E.nodeName&&"previous"==C?null:S:Math.round(S)},f)<<0}return k};EditorUi.prototype.hashValue=
+function(c,f,k){var m=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(m^=this.hashValue(c.nodeName,f,k));if(null!=c.attributes){null!=k&&(k.attrCount+=c.attributes.length);for(var t=0;t<c.attributes.length;t++){var x=c.attributes[t].name,y=null!=f?f(c,x,c.attributes[t].value,!0):c.attributes[t].value;null!=y&&(m^=this.hashValue(x,f,k)+this.hashValue(y,f,k))}}if(null!=c.childNodes)for(t=0;t<c.childNodes.length;t++)m=
+(m<<5)-m+this.hashValue(c.childNodes[t],f,k)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=k&&(k.byteCount+=c.length);for(t=0;t<c.length;t++)f=(f<<5)-f+c.charCodeAt(t)<<0;m^=f}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,k,m,t,x,y){};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(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));f=mxUtils.createXmlDocument();var k=f.createElement("mxlibrary");
+mxUtils.setTextContent(k,JSON.stringify(c,null,2));f.appendChild(k);return mxUtils.getXml(f,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var f=this.sidebar.palettes[c];if(null!=f){for(var k=0;k<f.length;k++)f[k].parentNode.removeChild(f[k]);delete this.sidebar.palettes[c]}};
+EditorUi.prototype.repositionLibrary=function(c,f){var k=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!f){null==c&&(f=this.sidebar.palettes["L.scratchpad"],null==f&&(f=this.sidebar.palettes.search),null!=f&&(c=f[f.length-1].nextSibling));c=null!=c?c:k.firstChild.nextSibling.nextSibling;f=k.lastChild;var m=f.previousSibling;k.insertBefore(f,c);k.insertBefore(m,f)}};EditorUi.prototype.loadLibrary=function(c,f){var k=mxUtils.parseXml(c.getData());if("mxlibrary"==
+k.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(c,m,k.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.showSearchWindow=function(c,f){var k=c?"findReplace":"find",m=k+"Window";
+if(null==this[m]){var t="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,x=c?t?330:300:240;this[m]=new FindWindow(this,document.body.offsetWidth-(x+20),100,x,c?t?304:288:180,c);this[m].window.addListener("show",function(){this.fireEvent(new mxEventObject(k))});this[m].window.addListener("hide",function(){this.fireEvent(new mxEventObject(k))});this[m].window.setVisible(!0)}else null==f&&this[m].window.setVisible(!this[m].window.isVisible());null!=f&&(this[m].doSearch(f),
+this[m].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,f,k,m){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var t=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var x=0;x<this.openLibraries.length;x++)if(this.openLibraries[x].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[x],this.openLibraries);break}t={file:c,images:f,title:k,expand:m};this.openLibraries.push(t)}else this.scratchpad=
+c;x=this.sidebar.palettes[c.getHash()];x=null!=x?x[x.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var y=null,F=mxUtils.bind(this,function(G,H){0==G.length&&c.isEditable()?(null==y&&(y=document.createElement("div"),y.className="geDropTarget",mxUtils.write(y,mxResources.get("dragElementsHere"))),H.appendChild(y)):this.addLibraryEntries(G,H)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==k&&(k=c.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));
+var E=this.sidebar.addPalette(c.getHash(),k,null!=m?m:!0,mxUtils.bind(this,function(G){F(f,G)}));null!=t&&(t.div=E);this.repositionLibrary(x,"L.scratchpad"!=c.getHash());m=E.parentNode.previousSibling;k=m.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=c.title&&m.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+k);var C=document.createElement("div");C.style.backgroundColor="inherit";m.style.position="relative";var S=document.createElement("img");S.className="geLibraryButton";S.setAttribute("src",
+Editor.crossImage);S.setAttribute("title",mxResources.get("close"));var U=null;if(".scratchpad"!=c.title||this.closableScratchpad)C.appendChild(S),mxEvent.addListener(S,"click",mxUtils.bind(this,function(G){if(!mxEvent.isConsumed(G)){var H=mxUtils.bind(this,function(){null!=t&&mxUtils.remove(t,this.openLibraries);this.closeLibrary(c)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(G)}}));if(c.isEditable()){var Q=
+this.editor.graph,O=null;k=mxUtils.bind(this,function(G){this.showLibraryDialog(c.getTitle(),E,f,c,c.getMode());mxEvent.consume(G)});var q=mxUtils.bind(this,function(G){c.setModified(!0);c.isAutosave()?(null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O),O=S.cloneNode(!1),O.setAttribute("src",Editor.spinImage),O.setAttribute("title",mxResources.get("saving")),O.style.cursor="default",O.style.marginRight="2px",O.style.marginTop="-2px",C.insertBefore(O,C.firstChild),this.saveLibrary(c.getTitle(),
+f,c,c.getMode(),!0,!0,function(){null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O)})):null==U&&(U=S.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),C.insertBefore(U,C.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==U||c.isModified()||(U.parentNode.removeChild(U),U=null)});mxEvent.consume(H)})))}),u=mxUtils.bind(this,function(G,
+H,g,p){G=Q.cloneCells(mxUtils.sortCells(Q.model.getTopmostCells(G)));for(var B=0;B<G.length;B++){var K=Q.getCellGeometry(G[B]);null!=K&&K.translate(-H.x,-H.y)}E.appendChild(this.sidebar.createVertexTemplateFromCells(G,H.width,H.height,p||"",!0,null,!1));G=mxUtils.getXml(this.editor.graph.encodeCells(G));Editor.defaultCompressed&&(G=Graph.compress(G));H={xml:G,w:H.width,h:H.height};null!=p&&(H.title=p);f.push(H);q(g);null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)}),I=
+mxUtils.bind(this,function(G){if(Q.isSelectionEmpty())Q.getRubberband().isActive()?(Q.getRubberband().execute(G),Q.getRubberband().reset()):null!=G&&mxEvent.getSource(G).classList.contains("geLibraryButton")&&this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var H=Q.getSelectionCells(),g=Q.view.getBounds(H);if(null!=g&&0<g.width&&0<g.height){var p=Q.view.scale;g.x/=p;g.y/=p;g.width/=p;g.height/=p;g.x-=Q.view.translate.x;g.y-=Q.view.translate.y;
+u(H,g)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(G)});mxEvent.addGestureListeners(E,function(){},mxUtils.bind(this,function(G){Q.isMouseDown&&null!=Q.panningManager&&null!=Q.graphHandler.first&&(Q.graphHandler.suspend(),null!=Q.graphHandler.hint&&(Q.graphHandler.hint.style.visibility="hidden"),E.style.backgroundColor="light-dark(#fefefe, #000000)",E.style.cursor="copy",Q.panningManager.stop(),Q.autoScroll=!1,mxEvent.consume(G))}),
+mxUtils.bind(this,function(G){Q.isMouseDown&&null!=Q.panningManager&&null!=Q.graphHandler&&(E.style.backgroundColor="",E.style.cursor="default",this.sidebar.showTooltips=!0,Q.panningManager.stop(),Q.graphHandler.reset(),Q.isMouseDown=!1,Q.autoScroll=!0,I(G),mxEvent.consume(G))}));mxEvent.addListener(E,"mouseleave",mxUtils.bind(this,function(G){Q.isMouseDown&&null!=Q.graphHandler.first&&(Q.graphHandler.resume(),null!=Q.graphHandler.hint&&(Q.graphHandler.hint.style.visibility="visible"),E.style.backgroundColor=
+"",E.style.cursor="",Q.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(E,"dragover",mxUtils.bind(this,function(G){E.style.backgroundColor="light-dark(#fefefe, #000000)";G.dataTransfer.dropEffect="copy";E.style.cursor="copy";this.sidebar.hideTooltip();G.stopPropagation();G.preventDefault()})),mxEvent.addListener(E,"drop",mxUtils.bind(this,function(G){E.style.cursor="";E.style.backgroundColor="";0<G.dataTransfer.files.length&&this.importFiles(G.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,
+function(H,g,p,B,K,M,N,R,T){if(null!=H&&"image/"==g.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,K,M),H)],H[0].vertex=!0,u(H,new mxRectangle(0,0,K,M),G,mxEvent.isAltDown(G)?null:N.substring(0,N.lastIndexOf(".")).replace(/_/g," ")),null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null);else{var V=!1,X=mxUtils.bind(this,function(W,Y){null!=W&&"application/pdf"==
+Y&&(Y=Editor.extractGraphModelFromPdf(W),null!=Y&&0<Y.length&&(W=Y));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var Z=JSON.parse(mxUtils.getTextContent(W.documentElement));F(Z,E);f=f.concat(Z);q(G);this.spinner.stop();V=!0}catch(ca){}else if("mxfile"==W.documentElement.nodeName)try{var aa=W.documentElement.getElementsByTagName("diagram");for(Z=0;Z<aa.length;Z++){var la=this.stringToCells(Editor.getDiagramNodeXml(aa[Z])),fa=this.editor.graph.getBoundingBoxFromGeometry(la);
+null!=fa&&u(la,new mxRectangle(0,0,fa.width,fa.height),G)}V=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)});null!=T&&null!=N&&EditorUi.isVisioFilename(N)?this.importVisio(T,function(W){X(W,"text/xml")},null,N):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,N)&&null!=T?this.isExternalDataComms()?
+this.parseFile(T,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?X(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):X(H,g)}}));G.stopPropagation();G.preventDefault()})),mxEvent.addListener(E,"dragleave",function(G){E.style.cursor="";E.style.backgroundColor=
+"";G.stopPropagation();G.preventDefault()}));S=S.cloneNode(!1);S.setAttribute("src",Editor.editImage);S.setAttribute("title",mxResources.get("edit"));C.insertBefore(S,C.firstChild);mxEvent.addListener(S,"click",k);k=S.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",mxResources.get("add"));C.insertBefore(k,C.firstChild);mxEvent.addListener(k,"click",I);".scratchpad"==c.title&&(this.addSelectionToScratchpad=I);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||
+(k=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),k.className="geLibraryButton",C.insertBefore(k,C.firstChild))}m.appendChild(C);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var k=0;k<c.length;k++)try{var m=c[k],t=m.data;if(null!=t){t="data:"==t.substring(0,5)?this.convertDataUri(t):t;var x="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(x+="aspect=fixed;");x=x+"image="+t+";";
+null!=m.style&&(x+=m.style);f.appendChild(this.sidebar.createVertexTemplate(x,m.w,m.h,"",m.title||"",!1,null,!0))}else if(null!=m.xml){var y=this.stringToCells("<"==m.xml.charAt(0)?m.xml:Graph.decompress(m.xml)),F=0==y.length?mxResources.get("drawingEmpty"):null!=m.title?m.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(y,m.w,m.h,F,!0,null,!0))}}catch(E){F=null!=E.message?mxResources.get("error")+": "+E.message:String(E),x=this.sidebar.createVertexTemplateFromCells(null,m.w,m.h,
+F,!0,null,!0),f.appendChild(x)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,k,m,t,x,y){c=new ImageDialog(this,c,f,k,m,
+t,x,y);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,k,m,t,x){var y=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=y?JSON.stringify(JSON.parse(y),null,2):"",mxUtils.bind(this,function(F){if(null!=F)try{if(null!=x&&x(F),F==y)this.hideDialog();else{if(0<F.length){var E=JSON.parse(F);localStorage.setItem(f,JSON.stringify(E))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(C){this.handleError(C)}}),
+null,mxResources.get("close"),null,null,null,!0,null,null,t,k,m);this.showDialog(c.container,660,480,!0,!1,null,null,null,new mxRectangle(0,0,null!=k&&2<k.length?500:440,280));c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,k,m){c=null!=c?c:mxUtils.bind(this,function(t,x,y,F){x||(t=new ChangePageSetup(this,m?y:null,t),t.ignoreColor=!m,null!=F&&m&&(t.shadowVisible=F),this.editor.graph.model.execute(t))});c=new BackgroundImageDialog(this,c,f,k,m);this.showDialog(c.container,400,
+m?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,f,k,m,t){c=new LibraryDialog(this,c,f,k,m,t);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(x){x&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var n=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=n.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&
+f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,k,m,t,x,y){var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{y||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!y||null==window.console||console.error("EditorUi.handleError:",c)}catch(Q){}if(null!=
+E||null!=f){y=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var C=mxResources.get("ok"),S=null;f=null!=f?f:mxResources.get("error");if(null!=E){null!=E.retry&&(C=mxResources.get("cancel"),S=function(){F();E.retry()});if(404==E.code||404==E.status||403==E.code){y=403==E.code?null!=E.message?mxUtils.htmlEntities(E.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?
+" ("+this.drive.user.email+")":""),!1);var U=null!=t?null:null!=x?x:window.location.hash;if(null!=U&&("#G"==U.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==U.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==E.code||404==E.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(f,
+y,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);null!=m&&m()}),S,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Q(){I.innerText="";for(var G=0;G<O.length;G++){var H=document.createElement("option");mxUtils.write(H,O[G].displayName);H.value=G;I.appendChild(H);H=document.createElement("option");H.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(H,"<"+O[G].email+">");H.setAttribute("disabled","disabled");
+I.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=O.length;I.appendChild(H)}var O=this.drive.getUsersList(),q=document.createElement("div"),u=document.createElement("div");u.style.marginBottom="6px";mxUtils.write(u,mxResources.get("changeUser")+": ");q.appendChild(u);var I=document.createElement("select");I.style.width="100%";Q();mxEvent.addListener(I,"change",mxUtils.bind(this,function(){var G=I.value,H=O.length!=G;H&&this.drive.setUser(O[G]);
+this.drive.authorize(H,mxUtils.bind(this,function(){H||(O=this.drive.getUsersList(),Q())}),mxUtils.bind(this,function(g){this.handleError(g)}),!0)}));q.appendChild(I);q=new CustomDialog(this,q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),520,150);return}}null!=E.message?y=""==E.message&&null!=E.name?mxUtils.htmlEntities(E.name,!1):
+mxUtils.htmlEntities(E.message,!1):null!=E.response&&null!=E.response.error?y=mxUtils.htmlEntities(E.response.error,!1):"undefined"!==typeof window.App&&(E.code==App.ERROR_TIMEOUT?y=mxUtils.htmlEntities(mxResources.get("timeout"),!1):E.code==App.ERROR_BUSY?y=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof E&&0<E.length&&(y=mxUtils.htmlEntities(E,!1)))}t=c=null;null!=E&&null!=E.helpLink?(c=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(E.helpLink)})):
+null!=E&&null!=E.ownerEmail?(c=mxResources.get("contactOwner"),y+=mxUtils.htmlEntities(" ("+c+": "+E.ownerEmail+")",!1),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(E.ownerEmail))})):null!=E&&null!=E.alternateAction&&(c=E.alternateAction.label,t=E.alternateAction.funct);this.showError(f,y,C,k,S,null,null,c,t,null,null,null,m?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(c,f,k){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,
+k||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,k,m,t,x){c=null!=c?c:"";var y=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},F=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){y();null!=f&&f()},function(){y();null!=k&&k()},m,t,null,null,null,null,F);this.showDialog(c.container,340,46+F,!0,x);c.init()};EditorUi.prototype.showBanner=function(c,f,k,m,t,x,y,F,E){x=!1;if(!(this.bannerShowing||this["hideBanner"+
+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){y=null!=y?y:"translate(-50%,120%)";F=null!=F?F:"translate(-50%,0%)";var C=document.createElement("div");C.className="geBtn gePrimaryBtn geBanner"+(t?" geSmallBanner":"");C.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(C.style,"transform",y);mxUtils.setPrefixedStyle(C.style,"transition","all 1000ms ease");null!=E&&mxUtils.setPrefixedStyle(C.style,"transform-origin",E);E=E=document.createElement("img");
+E.setAttribute("src",Editor.crossImage);E.setAttribute("title",mxResources.get(m?"doNotShowAgain":"close"));E.setAttribute("border","0");t||(x=document.createElement("img"),x.setAttribute("src",IMAGE_PATH+"/logo.png"),x.setAttribute("border","0"),x.setAttribute("align","absmiddle"),x.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",C.appendChild(x),E.style.cssText=(t?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",
+C.appendChild(E));mxUtils.write(C,f);document.body.appendChild(C);this.bannerShowing=!0;t&&(E.className="geLibraryButton",C.appendChild(E));f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var S=document.createElement("input");S.setAttribute("type","checkbox");S.setAttribute("id","geDoNotShowAgainCheckbox");S.style.marginRight="6px";if(!m){f.appendChild(S);var U=document.createElement("label");
+U.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(U,mxResources.get("doNotShowAgain"));f.appendChild(U);C.style.paddingBottom=t?"16px":"30px";C.appendChild(f)}var Q=mxUtils.bind(this,function(){null!=C.parentNode&&(C.parentNode.removeChild(C),this.bannerShowing=!1,S.checked||m)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=E&&mxEvent.addListener(E,"click",mxUtils.bind(this,function(q){mxEvent.consume(q);
+Q()}));var O=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform",y);window.setTimeout(mxUtils.bind(this,function(){Q()}),1E3)});mxEvent.addListener(C,"click",mxUtils.bind(this,function(q){var u=mxEvent.getSource(q);u!=S&&u!=U?(null!=k&&k(),Q(),mxEvent.consume(q)):O()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform",F)}),500);window.setTimeout(O,t?5E3:3E4);x=!0}return x};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=
+new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=function(c,f,k,m){c=c.toDataURL("image/"+k);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<m&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",m));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,k,m,t){var x="jpeg"==k?"jpg":k;m=this.getBaseFilename(m)+
+(null!=f?".drawio":"")+"."+x;c=this.createImageDataUri(c,f,k,t);this.saveData(m,x,c.substring(c.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(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));
+this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,k,m,t,x){"text/xml"!=k||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=x?x:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=m?this.base64ToBlob(c,k):new Blob([c],{type:k}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==
+k?mxUtils.popup(c,!0):(k.document.write(c),k.document.close(),k.document.execCommand("SaveAs",!0,f),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,k,m);else{var y=document.createElement("a");x=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof y.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var F=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
+x=65==(F?parseInt(F[2],10):!1)?!1:x}if(x||this.isOffline()){y.href=URL.createObjectURL(m?this.base64ToBlob(c,k):new Blob([c],{type:k}));x?y.download=f:y.setAttribute("target","_blank");document.body.appendChild(y);try{window.setTimeout(function(){URL.revokeObjectURL(y.href)},2E4),y.click(),y.parentNode.removeChild(y)}catch(E){}}else this.createEchoRequest(c,f,k,m,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,k,m,t,x){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,
+c+(null!=k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=x?"&base64="+x:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,k,m,t,x,y,F,E){x=null!=x?x:!1;y=null!=y?y:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var C=mxUtils.bind(this,function(U,Q,O,q){try{if("_blank"==Q)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(c,k,m);else if(null!=k&&"text/html"==k.substring(0,9)){var u=new EmbedDialog(this,c);this.showDialog(u.container,
+450,240,!0,!0);u.init()}else{var I=window.open("about:blank");null==I?mxUtils.popup(c,!0):(I.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),I.document.close())}else if(Q==App.MODE_DEVICE||"download"==Q)this.doSaveLocalFile(c,U,k,m,null,F);else if(null!=U&&0<U.length){var G=mxUtils.bind(this,function(H){try{this.exportFile(c,U,k,m,Q,H)}catch(g){this.handleError(g)}});null!=q?G(q):this.pickFolder(Q,G)}}catch(H){this.handleError(H)}});t=[];x||t.push(App.MODE_BROWSER);y||t.push("_blank");
+var S=new SaveDialog(this,f,mxUtils.bind(this,function(U,Q,O){C(U.value,Q,U,O);this.hideDialog(null,null,S.container)}),t,c,k,m,E);this.showDialog(S.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));S.init()};EditorUi.prototype.openInNewWindow=function(c,f,k){var m=window.open("about:blank");if(null==m||null==m.document)mxUtils.popup(c,!0);else{var t="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var x=mxUtils.parseXml(c).documentElement.style.backgroundColor;
+""!=x&&(t="background: "+x+";")}t='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+t+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||k?(x=k?c:btoa(unescape(encodeURIComponent(c))),m.document.write(t+'<img style="max-width:100%;" src="data:'+f+";base64,"+x+'"/></body></html>')):m.document.write(t+c+"</body></html>"):m.document.write(t+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");m.document.close()}};var d=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(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(m){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.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,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 t=f.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(m)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var m=this.editor.graph.getAllTags();
f.style.display=0<m.length?"":"none"}))}d.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.editor.isExportToCanvas()&&
-this.isChromelessImageExportEnabled()){this.exportDialog=null;var l=c(mxUtils.bind(this,function(m){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 v=l.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,80);this.exportDialog.style.left=v.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";v=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=v.zIndex;var B=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});B.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",t);this.editor.exportToCanvas(mxUtils.bind(this,function(E){B.stop();this.exportDialog.style.width=
-"auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=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",D);this.exportDialog.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.openInNewWindow(D.substring(D.indexOf(",")+
-1),"image/png",!0);t.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){B.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(E)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(m)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,l,m,t,v){this.isLocalFileSave()?this.saveLocalFile(l,
-c,m,t,f,v):this.saveRequest(c,f,mxUtils.bind(this,function(B,E){return this.createEchoRequest(l,B,m,t,f,E)}),l,t,m)};EditorUi.prototype.saveRequest=function(c,f,l,m,t,v,B){B=null!=B?B:!mxClient.IS_IOS||!navigator.standalone;var E=mxUtils.bind(this,function(A,S,R,T){if("_blank"==S||null!=A&&0<A.length){var P=l("_blank"==S?null:A,S==App.MODE_DEVICE||"download"==S||null==S||"_blank"==S?"0":"1");null!=P&&(S==App.MODE_DEVICE||"download"==S||"_blank"==S?P.simulate(document,"_blank"):(R=mxUtils.bind(this,
-function(q){v=null!=v?v:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,A,v,!0,S,q)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&P.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=P.getStatus()&&299>=P.getStatus())try{this.exportFile(P.getText(),A,v,!0,S,q)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}))}),
-null!=T?R(T):this.pickFolder(S,R)))}});t=[App.MODE_BROWSER];B||t.push("_blank");var D=new SaveDialog(this,c,mxUtils.bind(this,function(A,S,R){E(A.value,S,A,R);this.hideDialog(null,null,D.container)}),t,null,"application/pdf");this.showDialog(D.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));D.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,
-l,m,t,v){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,l){f(null)};EditorUi.prototype.exportSvg=function(c,f,l,m,t,v,B,E,D,A,S,R,T,P){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(W){Editor.addRetryToError(W,mxUtils.bind(this,function(){this.exportSvg(c,f,l,m,t,v,B,E,D,A,S,R,T,P)}));this.handleError(W)})))try{var q=this.editor.graph.isSelectionEmpty();
-l=null!=l?l:q;var u=f?null:this.editor.graph.background;u==mxConstants.NONE&&(u=null);null==u&&0==f&&(u=this.editor.graph.shapeBackgroundColor);var J=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var G=mxUtils.lightDarkColorSupported,H=mxUtils.preferDarkColor;if("light"==S||"dark"==S)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==S;var g=Graph.addFont,p={};Graph.addFont=function(W,Y,Z,aa){g.call(this,
-W,Y,Z,p)};var C=this.editor.graph.createSvgImageExport(t),I=C.drawCellState;C.drawCellState=function(W,Y){null!=W&&Graph.processFontStyle(W.style);I.apply(this,arguments)};var M=this.editor.graph.getSvg(u,c,B,E,null,l,null,C,"blank"==A?"_blank":"self"==A?"_top":null,null,!T,S,R);mxUtils.lightDarkColorSupported=G;mxUtils.preferDarkColor=H;this.editor.graph.addForeignObjectWarning=J;m&&this.editor.graph.addSvgShadow(M);var O=this.getBaseFilename()+(t?".drawio":"")+".svg";P=null!=P?P:mxUtils.bind(this,
-function(W){this.isLocalFileSave()||W.length<=MAX_REQUEST_SIZE?this.saveData(O,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});var Q=mxUtils.bind(this,function(W){this.spinner.stop();t&&W.setAttribute("content",this.getFileData(!0,null,null,null,l,D,null,null,null,null,null,c,B));P(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(W))});this.editor.graph.mathEnabled&&
-this.editor.addMathCss(M);var U=mxUtils.bind(this,function(W){Editor.replaceSvgDataUris&&v&&EditorUi.embedSvgImages(W);Editor.foreignObjectImages&&T?this.replaceAlternateContent(W,S,Q):Q(W)}),V=Graph.customFontElements;Graph.customFontElements=p;var X=mxUtils.bind(this,function(W){Graph.customFontElements=V;Graph.addFont=g;v&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(W,U,this.thumbImageCache)):U(W)});T?this.embedFonts(M,
-X):(this.editor.addFontCss(M),X(M))}catch(W){this.handleError(W)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function m(R,T,P,q,u){var J=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");J.setAttribute("x",T);J.setAttribute("y",P+.5);J.setAttribute("width",q.width);J.setAttribute("height",q.height);null==J.setAttributeNS?J.setAttribute("xlink:href",u):J.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",u);R.replaceChild(J,R.lastChild);E()}function t(){if(B<S.length)S[B++](t)}
-var v="";f=c.getElementsByTagName("style");for(var B=0;B<f.length;B++)v+=f[B].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var E=mxUtils.bind(this,function(){counter--;0==counter&&l(c)}),D={},A={},S=[];for(B=0;B<f.length;B++)mxUtils.bind(this,function(R){var T=R.getElementsByTagName("div");if(0<T.length)try{var P=T[0].cloneNode(!0),q=parseInt(P.style.marginLeft),u=parseInt(P.style.paddingTop),J=P.getElementsByTagName("div")[1],G=T=!1,H=P.style.alignItems,g=P.style.justifyContent;
-if(null!=P.style.writingMode){var p=P.style.writingMode;G="vertical-"==p.substring(0,9);T="-rl"==p.substring(p.length-3)}var C=!G&&"1px"==P.style.width||G&&"1px"==P.style.height;if(!G&&"1px"==P.style.height||G&&"1px"==P.style.width)P.style.alignItems=G&&T?"unsafe flex-end":"unsafe flex-start";C&&(P.style.justifyContent="unsafe flex-start");P.style.paddingTop="";P.style.marginLeft="";var I=P.outerHTML,M=D[I];null==M&&(P.style.position="absolute",P.style.visibility="hidden",document.body.appendChild(P),
-p=1,p="1px"==P.style.width?J.offsetWidth:parseInt(P.style.width),C=1,C="1px"==P.style.height?J.offsetHeight:parseInt(P.style.height),document.body.removeChild(P),M=new mxRectangle(q,u,p,C),D[I]=M);"1px"==P.style.height&&("unsafe center"==H?u-=M.height/2:"unsafe flex-end"==H&&(u-=M.height));if("1px"==P.style.width)if(!G&&"unsafe center"==g||G&&"unsafe center"==H)q-=M.width/2;else if(!G&&"unsafe flex-end"==g||G&&(!T&&"unsafe flex-end"==H||T&&"unsafe flex-start"==H))q-=M.width;M=new mxRectangle(q,u,
-M.width,M.height+parseInt(J.style.fontSize)/4);S.push(mxUtils.bind(this,function(O){var Q=A[I];null==Q?Graph.htmlToPng(I,M.width,M.height,mxUtils.bind(this,function(U){m(R,q,u,M,U);A[I]=U;O()}),v):(m(R,q,u,M,Q),O())}))}catch(O){E()}else E()})(f[B]);0==counter&&l(c);B=0;t()};EditorUi.prototype.addRadiobox=function(c,f,l,m,t,v,B){return this.addCheckbox(c,l,m,t,v,B,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,m,t,v,B,E){v=null!=v?v:!0;var D=document.createElement("input");D.style.marginRight=
-"8px";D.style.marginTop="16px";D.setAttribute("type",B?"radio":"checkbox");B="geCheckbox-"+Editor.guid();D.id=B;null!=E&&D.setAttribute("name",E);l&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);m&&D.setAttribute("disabled","disabled");v&&(c.appendChild(D),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",B),c.appendChild(l),t||mxUtils.br(c));return D};EditorUi.prototype.addEditButton=function(c,f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);
-l.style.marginLeft="24px";var m=this.getCurrentFile(),t="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var v=document.createElement("select");v.style.maxWidth="200px";v.style.width="auto";v.style.marginLeft="8px";v.style.marginRight="10px";v.className="geBtn";m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));v.appendChild(m);var B=document.createElement("option");B.setAttribute("value",
-"custom");mxUtils.write(B,mxResources.get("custom")+"...");v.appendChild(B);c.appendChild(v);mxEvent.addListener(v,"change",mxUtils.bind(this,function(){if("custom"==v.value){var E=new FilenameDialog(this,t,mxResources.get("ok"),function(D){null!=D?(t=D,B.setAttribute("title",D)):(v.value="blank",B.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){v.value="blank"});this.showDialog(E.container,300,80,!0,!1);E.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,
-function(){l.checked&&(null==f||f.checked)?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?"blank"===v.value?"_blank":t:null},getEditInput:function(){return l},getEditSelect:function(){return v}}};EditorUi.prototype.addLinkSection=function(c,f){function l(){var E=document.createElement("div");E.style.width="100%";E.style.height="100%";E.style.boxSizing="border-box";null!=v&&v!=mxConstants.NONE?(E.style.border="1px solid black",
-E.style.backgroundColor=v):(E.style.backgroundPosition="center center",E.style.backgroundRepeat="no-repeat",E.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");B.innerText="";B.appendChild(E)}mxUtils.write(c,mxResources.get("links")+":");var m=document.createElement("select");m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));
+this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=c(mxUtils.bind(this,function(m){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 x=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,80);this.exportDialog.style.left=x.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=x.zIndex;var y=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});y.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",t);this.editor.exportToCanvas(mxUtils.bind(this,function(F){y.stop();this.exportDialog.style.width=
+"auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var E=this.createImageDataUri(F,null,"png");F=document.createElement("img");F.style.maxWidth="140px";F.style.maxHeight="140px";F.style.cursor="pointer";F.style.backgroundColor="white";F.setAttribute("title",mxResources.get("openInNewWindow"));F.setAttribute("border","0");F.setAttribute("src",E);this.exportDialog.appendChild(F);mxEvent.addListener(F,"click",mxUtils.bind(this,function(){this.openInNewWindow(E.substring(E.indexOf(",")+
+1),"image/png",!0);t.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(F){y.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(F)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(m)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,k,m,t,x){this.isLocalFileSave()?this.saveLocalFile(k,
+c,m,t,f,x):this.saveRequest(c,f,mxUtils.bind(this,function(y,F){return this.createEchoRequest(k,y,m,t,f,F)}),k,t,m)};EditorUi.prototype.saveRequest=function(c,f,k,m,t,x,y){y=null!=y?y:!mxClient.IS_IOS||!navigator.standalone;var F=mxUtils.bind(this,function(C,S,U,Q){if("_blank"==S||null!=C&&0<C.length){var O=k("_blank"==S?null:C,S==App.MODE_DEVICE||"download"==S||null==S||"_blank"==S?"0":"1");null!=O&&(S==App.MODE_DEVICE||"download"==S||"_blank"==S?O.simulate(document,"_blank"):(U=mxUtils.bind(this,
+function(q){x=null!=x?x:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,C,x,!0,S,q)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&O.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=O.getStatus()&&299>=O.getStatus())try{this.exportFile(O.getText(),C,x,!0,S,q)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}))}),
+null!=Q?U(Q):this.pickFolder(S,U)))}});t=[App.MODE_BROWSER];y||t.push("_blank");var E=new SaveDialog(this,c,mxUtils.bind(this,function(C,S,U){F(C.value,S,C,U);this.hideDialog(null,null,E.container)}),t,null,"application/pdf");this.showDialog(E.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));E.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,
+k,m,t,x){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,k){f(null)};EditorUi.prototype.exportSvg=function(c,f,k,m,t,x,y,F,E,C,S,U,Q,O){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(W){Editor.addRetryToError(W,mxUtils.bind(this,function(){this.exportSvg(c,f,k,m,t,x,y,F,E,C,S,U,Q,O)}));this.handleError(W)})))try{var q=this.editor.graph.isSelectionEmpty();
+k=null!=k?k:q;var u=f?null:this.editor.graph.background;u==mxConstants.NONE&&(u=null);null==u&&0==f&&(u=this.editor.graph.shapeBackgroundColor);var I=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var G=mxUtils.lightDarkColorSupported,H=mxUtils.preferDarkColor;if("light"==S||"dark"==S)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==S;var g=Graph.addFont,p={};Graph.addFont=function(W,Y,Z,aa){g.call(this,
+W,Y,Z,p)};var B=this.editor.graph.createSvgImageExport(t),K=B.drawCellState;B.drawCellState=function(W,Y){null!=W&&Graph.processFontStyle(W.style);K.apply(this,arguments)};var M=this.editor.graph.getSvg(u,c,y,F,null,k,null,B,"blank"==C?"_blank":"self"==C?"_top":null,null,!Q,S,U);mxUtils.lightDarkColorSupported=G;mxUtils.preferDarkColor=H;this.editor.graph.addForeignObjectWarning=I;m&&this.editor.graph.addSvgShadow(M);var N=this.getBaseFilename()+(t?".drawio":"")+".svg";O=null!=O?O:mxUtils.bind(this,
+function(W){this.isLocalFileSave()||W.length<=MAX_REQUEST_SIZE?this.saveData(N,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});var R=mxUtils.bind(this,function(W){this.spinner.stop();t&&W.setAttribute("content",this.getFileData(!0,null,null,null,k,E,null,null,null,null,null,c,y));O(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(W))});this.editor.graph.mathEnabled&&
+this.editor.addMathCss(M);var T=mxUtils.bind(this,function(W){Editor.replaceSvgDataUris&&x&&EditorUi.embedSvgImages(W);Editor.foreignObjectImages&&Q?this.replaceAlternateContent(W,S,R):R(W)}),V=Graph.customFontElements;Graph.customFontElements=p;var X=mxUtils.bind(this,function(W){Graph.customFontElements=V;Graph.addFont=g;x&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(W,T,this.thumbImageCache)):T(W)});Q?this.embedFonts(M,
+X):(this.editor.addFontCss(M),X(M))}catch(W){this.handleError(W)}};EditorUi.prototype.replaceAlternateContent=function(c,f,k){function m(U,Q,O,q,u){var I=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");I.setAttribute("x",Q);I.setAttribute("y",O+.5);I.setAttribute("width",q.width);I.setAttribute("height",q.height);null==I.setAttributeNS?I.setAttribute("xlink:href",u):I.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",u);U.replaceChild(I,U.lastChild);F()}function t(){if(y<S.length)S[y++](t)}
+var x="";f=c.getElementsByTagName("style");for(var y=0;y<f.length;y++)x+=f[y].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var F=mxUtils.bind(this,function(){counter--;0==counter&&k(c)}),E={},C={},S=[];for(y=0;y<f.length;y++)mxUtils.bind(this,function(U){var Q=U.getElementsByTagName("div");if(0<Q.length)try{var O=Q[0].cloneNode(!0),q=parseInt(O.style.marginLeft),u=parseInt(O.style.paddingTop),I=O.getElementsByTagName("div")[1],G=Q=!1,H=O.style.alignItems,g=O.style.justifyContent;
+if(null!=O.style.writingMode){var p=O.style.writingMode;G="vertical-"==p.substring(0,9);Q="-rl"==p.substring(p.length-3)}var B=!G&&"1px"==O.style.width||G&&"1px"==O.style.height;if(!G&&"1px"==O.style.height||G&&"1px"==O.style.width)O.style.alignItems=G&&Q?"unsafe flex-end":"unsafe flex-start";B&&(O.style.justifyContent="unsafe flex-start");O.style.paddingTop="";O.style.marginLeft="";var K=O.outerHTML,M=E[K];null==M&&(O.style.position="absolute",O.style.visibility="hidden",document.body.appendChild(O),
+p=1,p="1px"==O.style.width?I.offsetWidth:parseInt(O.style.width),B=1,B="1px"==O.style.height?I.offsetHeight:parseInt(O.style.height),document.body.removeChild(O),M=new mxRectangle(q,u,p,B),E[K]=M);"1px"==O.style.height&&("unsafe center"==H?u-=M.height/2:"unsafe flex-end"==H&&(u-=M.height));if("1px"==O.style.width)if(!G&&"unsafe center"==g||G&&"unsafe center"==H)q-=M.width/2;else if(!G&&"unsafe flex-end"==g||G&&(!Q&&"unsafe flex-end"==H||Q&&"unsafe flex-start"==H))q-=M.width;M=new mxRectangle(q,u,
+M.width,M.height+parseInt(I.style.fontSize)/4);S.push(mxUtils.bind(this,function(N){var R=C[K];null==R?Graph.htmlToPng(K,M.width,M.height,mxUtils.bind(this,function(T){m(U,q,u,M,T);C[K]=T;N()}),x):(m(U,q,u,M,R),N())}))}catch(N){F()}else F()})(f[y]);0==counter&&k(c);y=0;t()};EditorUi.prototype.addRadiobox=function(c,f,k,m,t,x,y){return this.addCheckbox(c,k,m,t,x,y,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,k,m,t,x,y,F){x=null!=x?x:!0;var E=document.createElement("input");E.style.marginRight=
+"8px";E.style.marginTop="16px";E.setAttribute("type",y?"radio":"checkbox");y="geCheckbox-"+Editor.guid();E.id=y;null!=F&&E.setAttribute("name",F);k&&(E.setAttribute("checked","checked"),E.defaultChecked=!0);m&&E.setAttribute("disabled","disabled");x&&(c.appendChild(E),k=document.createElement("label"),mxUtils.write(k,f),k.setAttribute("for",y),c.appendChild(k),t||mxUtils.br(c));return E};EditorUi.prototype.addEditButton=function(c,f){var k=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);
+k.style.marginLeft="24px";var m=this.getCurrentFile(),t="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var x=document.createElement("select");x.style.maxWidth="200px";x.style.width="auto";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));x.appendChild(m);var y=document.createElement("option");y.setAttribute("value",
+"custom");mxUtils.write(y,mxResources.get("custom")+"...");x.appendChild(y);c.appendChild(x);mxEvent.addListener(x,"change",mxUtils.bind(this,function(){if("custom"==x.value){var F=new FilenameDialog(this,t,mxResources.get("ok"),function(E){null!=E?(t=E,y.setAttribute("title",E)):(x.value="blank",y.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){x.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,
+function(){k.checked&&(null==f||f.checked)?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return k.checked?"blank"===x.value?"_blank":t:null},getEditInput:function(){return k},getEditSelect:function(){return x}}};EditorUi.prototype.addLinkSection=function(c,f){function k(){var F=document.createElement("div");F.style.width="100%";F.style.height="100%";F.style.boxSizing="border-box";null!=x&&x!=mxConstants.NONE?(F.style.border="1px solid black",
+F.style.backgroundColor=x):(F.style.backgroundPosition="center center",F.style.backgroundRepeat="no-repeat",F.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");y.innerText="";y.appendChild(F)}mxUtils.write(c,mxResources.get("links")+":");var m=document.createElement("select");m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));
m.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));m.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow"));m.appendChild(t);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),m.appendChild(f));c.appendChild(m);mxUtils.write(c,mxResources.get("borderColor")+
-":");var v="#0000ff",B=null;B=mxUtils.button("",mxUtils.bind(this,function(E){this.pickColor(v||"none",function(D){v=D;l()});mxEvent.consume(E)}));l();B.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";B.style.marginLeft="4px";B.style.height="22px";B.style.width="22px";B.style.position="relative";B.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";B.className="geColorBtn";c.appendChild(B);mxUtils.br(c);return{getColor:function(){return v},getTarget:function(){return m.value},
-focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,m,t,v){v=null!=v?v:[];l&&(v.push("lightbox=1"),"auto"!=c&&v.push("target="+c),null!=f&&f!=mxConstants.NONE&&v.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=m&&0<m.length&&v.push("edit="+encodeURIComponent(m)),t&&v.push("layers=1"),this.editor.graph.foldingEnabled&&v.push("nav=1"));return v};EditorUi.prototype.createLink=function(c,f,l,m,t,v,B,E,D,A,S,R,T){var P=this.getCurrentFile();D=this.createUrlParameters(c,
-f,m,t,v,D);c=!0;null!=B?l="#U"+encodeURIComponent(B):E||null==P||""==P.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+P.getHash(),c=!1);c&&null!=P&&null!=P.getTitle()&&P.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(P.getTitle()));A&&1<l.length&&(D.push("open="+l.substring(1)),l="");S&&null!=this.currentPage&&D.push("page-id="+this.currentPage.getId());R&&D.push("transparent=1");
-null!=T&&D.push("dark="+T);return(m&&(null!=B||null!=P&&P.getMode()!=App.MODE_GITHUB&&P.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,m,t,v,B,E,D,A,S,R,T){this.getBasenames();var P={};""!=t&&t!=mxConstants.NONE&&(P.highlight=t);"auto"!==m&&(P.target=m);A||(P.lightbox=
-!1);P.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(P.zoom=l/100);l=[];B&&(l.push("pages"),P.resize=!0,null!=this.pages&&null!=this.currentPage&&(P.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),P.resize=!0);E&&l.push("layers");D&&l.push("tags");null!=T&&(P["dark-mode"]=T);0<l.length&&(A&&l.push("lightbox"),P.toolbar=l.join(" "));null!=S&&0<S.length&&(P.edit=S);null!=c?P.url=c:P.xml=this.getFileData(!0,null,null,null,null,!B);f='<div class="mxgraph" style="'+
-(v?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(P))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";R(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"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(c,f,l,m){var t=document.createElement("div");t.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxResources.get("html"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";t.appendChild(v);var B=document.createElement("div");B.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");v=E.cloneNode(!0);v.setAttribute("value","copy");B.appendChild(v);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));B.appendChild(D);mxUtils.br(B);B.appendChild(E);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));B.appendChild(D);var A=this.getCurrentFile();null==l&&null!=A&&A.constructor==window.DriveFile&&(D=
-document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),B.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(A.getId(),A)})));v.setAttribute("checked","checked");null==l&&E.setAttribute("disabled","disabled");t.appendChild(B);B=380;var S=this.addLinkSection(t),R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";
-R.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));R.appendChild(D);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));R.appendChild(D);D=document.createElement("option");D.setAttribute("value","auto");mxUtils.write(D,mxResources.get("automatic"));D.setAttribute("selected","selected");R.appendChild(D);D.setAttribute("selected","selected");mxUtils.write(t,mxResources.get("appearance")+
-":");t.appendChild(R);mxUtils.br(t);B+=26;var T=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value="100%";t.appendChild(P);var q=this.addCheckbox(t,mxResources.get("fit"),!0);D=null!=this.pages&&1<this.pages.length;var u=u=this.addCheckbox(t,mxResources.get("allPages"),D,!D),J=this.addCheckbox(t,mxResources.get("layers"),
-!0),G=this.addCheckbox(t,mxResources.get("tags"),!0),H=this.addCheckbox(t,mxResources.get("lightbox"),!0),g=null;if(EditorUi.enableHtmlEditOption){g=this.addEditButton(t,H);var p=g.getEditInput();p.style.marginBottom="16px";B+=50;mxEvent.addListener(H,"change",function(){H.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");p.checked&&H.checked?g.getEditSelect().removeAttribute("disabled"):g.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,t,mxUtils.bind(this,
-function(){m(E.checked?l:null,T.checked,P.value,S.getTarget(),S.getColor(),q.checked,u.checked,J.checked,G.checked,H.checked,null!=g?g.getLink():null,null!=R?R.value:null)}),null,c,f);this.showDialog(c.container,340,B,!0,!0);v.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,m,t,v,B,E,D,A,S,R){var T=document.createElement("div");T.style.whiteSpace="nowrap";var P=document.createElement("h3");mxUtils.write(P,c||mxResources.get("publish"));P.style.width="100%";P.style.textAlign="center";
-P.style.marginTop="2px";P.style.marginBottom="20px";T.appendChild(P);var q=document.createElement("select");c=30;q.className="geBtn";q.style.marginBottom="8px";q.style.marginLeft="0px";q.style.width="100%";q.style.boxSizing="border-box";if(null==E||""==E.getHash())t=null!=t?t:"https://www.drawio.com/doc/faq/publish-diagram-as-link",P=document.createElement("option"),mxUtils.write(P,mxResources.get("makeCopy")),P.setAttribute("value","copy"),q.appendChild(P);P=document.createElement("option");mxUtils.write(P,
-mxResources.get("authorizationRequired"));P.setAttribute("value","auth");q.appendChild(P);null!=E&&""!=E.getHash()||P.setAttribute("disabled","disabled");E=document.createElement("option");E.setAttribute("value","public");q.appendChild(E);null!=B?(mxUtils.write(E,mxResources.get("publicDiagramUrl")),E.setAttribute("title",B),q.value="public"):(mxUtils.write(E,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),E.setAttribute("disabled","disabled"));T.appendChild(q);
-mxUtils.br(T);q.focus();var u=null,J=null;if(null!=f||null!=l)c+=30,mxUtils.write(T,mxResources.get("width")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.marginRight="16px",u.style.width="50px",u.style.marginLeft="6px",u.style.marginRight="16px",u.style.marginBottom="10px",u.value="100%",T.appendChild(u),mxUtils.write(T,mxResources.get("height")+":"),J=document.createElement("input"),J.setAttribute("type","text"),J.style.width="50px",J.style.marginLeft="6px",J.style.marginBottom=
-"10px",J.value=l+"px",T.appendChild(J),mxUtils.br(T);var G=this.addLinkSection(T,m),H=A?this.addCheckbox(T,mxResources.get("transparentBackground"),!1):null;null!=H&&(c+=20);var g=document.createElement("select");g.className="geBtn";g.style.marginTop="8px";f=document.createElement("option");mxUtils.write(f,mxResources.get("allPages"));f.setAttribute("value","allPages");g.appendChild(f);f=document.createElement("option");mxUtils.write(f,mxResources.get("currentPage"));f.setAttribute("value","currentPage");
-g.appendChild(f);var p=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),R&&(mxUtils.write(T,mxResources.get("pages")+":"),T.appendChild(g),mxUtils.br(T),c+=30),p=this.addCheckbox(T,mxResources.get("selectedPage")+": "+f));var C=document.createElement("select");C.style.maxWidth="260px";C.style.marginLeft="8px";C.style.marginTop="16px";R=document.createElement("option");
-R.setAttribute("value","0");mxUtils.write(R,mxResources.get("light"));C.appendChild(R);R=document.createElement("option");R.setAttribute("value","1");mxUtils.write(R,mxResources.get("dark"));C.appendChild(R);R=document.createElement("option");R.setAttribute("value","auto");mxUtils.write(R,mxResources.get("automatic"));R.setAttribute("selected","selected");C.appendChild(R);S&&(mxUtils.write(T,mxResources.get("appearance")+":"),T.appendChild(C),mxUtils.br(T),c+=30);var I=this.addCheckbox(T,mxResources.get("lightbox"),
-!0,null,null,!m),M=this.addEditButton(T,I),O=M.getEditInput();m&&(O.style.marginLeft=I.style.marginLeft,I.style.display="none",c-=20);var Q=this.addCheckbox(T,mxResources.get("layers"),!0);Q.style.marginLeft=O.style.marginLeft;Q.style.marginTop="8px";var U=this.addCheckbox(T,mxResources.get("tags"),!0);U.style.marginLeft=O.style.marginLeft;U.style.marginBottom="16px";U.style.marginTop="16px";mxEvent.addListener(I,"change",function(){I.checked?(Q.removeAttribute("disabled"),O.removeAttribute("disabled"),
-U.removeAttribute("disabled")):(Q.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));O.checked&&I.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});m=new CustomDialog(this,T,mxUtils.bind(this,function(){D(G.getTarget(),G.getColor(),null==p?!1:p.checked,I.checked,M.getLink(),Q.checked,null!=u?u.value:null,null!=J?J.value:null,U.checked,q.value,null!=H?H.checked:!1,C.value,"allPages"==
-g.value)}),null,mxResources.get("create"),t,v);this.showDialog(m.container,340,296+c,!0,!0);null!=u?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)):null==q.parentNode;G.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,l,m,t){var v=document.createElement("div");v.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("image"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
-(t?"10":"4")+"px";v.appendChild(B);if(t){mxUtils.write(v,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%";v.appendChild(E);mxUtils.write(v,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=
-this.lastExportBorder||"0";v.appendChild(D);mxUtils.br(v)}var A=this.addCheckbox(v,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),S=m?null:this.addCheckbox(v,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);B=this.editor.graph;var R=m?null:this.addCheckbox(v,mxResources.get("transparentBackground"),B.background==mxConstants.NONE||null==B.background);null!=R&&(R.style.marginBottom="16px");c=new CustomDialog(this,v,mxUtils.bind(this,function(){var T=
-parseInt(E.value)/100||1,P=parseInt(D.value)||0;l(!A.checked,null!=S?S.checked:!1,null!=R?R.checked:!1,T,P)}),null,c,f);this.showDialog(c.container,300,(t?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,m,t,v,B,E,D){B=null!=B?B:Editor.defaultIncludeDiagram;var A=document.createElement("div");A.style.whiteSpace="nowrap";var S=this.editor.graph,R="jpeg"==E||"webp"==E?220:320,T=document.createElement("h3");mxUtils.write(T,c);T.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-A.appendChild(T);mxUtils.write(A,mxResources.get("zoom")+":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value=this.lastExportZoom||"100%";A.appendChild(P);mxUtils.write(A,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||
-"0";A.appendChild(q);mxUtils.br(A);var u=this.addCheckbox(A,mxResources.get("selectionOnly"),!1,S.isSelectionEmpty()),J=document.createElement("input");J.style.marginTop="16px";J.style.marginRight="8px";J.style.marginLeft="24px";J.setAttribute("disabled","disabled");J.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(T=0;T<c.length;T++)if(!S.isSelectionEmpty()||"selectionOnly"!=c[T]){var H=
-document.createElement("option");mxUtils.write(H,mxResources.get(c[T]));H.setAttribute("value",c[T]);G.appendChild(H)}D?(mxUtils.write(A,mxResources.get("size")+":"),A.appendChild(G),mxUtils.br(A),R+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(u.checked=!0)})):v&&(A.appendChild(J),mxUtils.write(A,mxResources.get("crop")),mxUtils.br(A),R+=30,mxEvent.addListener(u,"change",function(){u.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}));S.isSelectionEmpty()?
-D&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",R-=30):(G.value="diagram",J.setAttribute("checked","checked"),J.defaultChecked=!0,mxEvent.addListener(u,"change",function(){G.value=u.checked?"selectionOnly":"diagram"}));var g=this.addCheckbox(A,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=E&&"webp"!=E),p=document.createElement("select");p.style.maxWidth="260px";p.style.marginLeft="8px";p.style.marginTop="16px";v=document.createElement("option");
-v.setAttribute("value","light");mxUtils.write(v,mxResources.get("light"));p.appendChild(v);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));p.appendChild(D);"svg"==E&&mxUtils.lightDarkColorSupported?(v=document.createElement("option"),v.setAttribute("value","auto"),mxUtils.write(v,mxResources.get("automatic")),v.setAttribute("selected","selected"),p.appendChild(v)):Editor.isDarkMode()?D.setAttribute("selected","selected"):v.setAttribute("selected",
-"selected");mxUtils.write(A,mxResources.get("appearance")+":");A.appendChild(p);mxUtils.br(A);R+=26;var C=this.addCheckbox(A,mxResources.get("shadow"),S.shadowVisible),I=null;if("png"==E||"jpeg"==E||"webp"==E)I=this.addCheckbox(A,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),R+=30;S=null!=this.pages?this.pages.length:1;var M=this.addCheckbox(A,mxResources.get("includeCopyOfMyDiagram")+(1<S?":":""),B,null,null,"jpeg"!=E&&"webp"!=E),O=document.createElement("select");O.style.maxWidth=
-"260px";O.style.marginLeft="28px";"png"==E||"svg"==E?(B=function(){M.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},v=document.createElement("option"),v.setAttribute("value","allPages"),mxUtils.write(v,mxResources.get("allPages")),O.appendChild(v),v=document.createElement("option"),v.setAttribute("value","currentPage"),mxUtils.write(v,mxResources.get("currentPage")),O.appendChild(v),1<S?(M.style.marginBottom="12px",O.style.marginBottom="16px",A.appendChild(O),mxUtils.br(A),
-R+=20):M.style.marginBottom="16px",null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(M,"change",B),B()):M.style.marginBottom="16px";var Q=document.createElement("input");Q.style.marginBottom="16px";Q.style.marginRight="8px";Q.setAttribute("type","checkbox");Q.id="geCheckbox-"+Editor.guid();var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");U.id="geCheckbox-"+Editor.guid();f&&(Q.checked=null!=
-this.lastEmbedImages?this.lastEmbedImages:!0,A.appendChild(Q),B=document.createElement("label"),mxUtils.write(B,mxResources.get("embedImages")),B.setAttribute("for",Q.id),A.appendChild(B),mxUtils.br(A),U.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,A.appendChild(U),B=document.createElement("label"),mxUtils.write(B,mxResources.get("embedFonts")),B.setAttribute("for",U.id),A.appendChild(B),mxUtils.br(A),R+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft=
-"8px";v=document.createElement("option");v.setAttribute("value","auto");mxUtils.write(v,mxResources.get("automatic"));V.appendChild(v);B=document.createElement("option");B.setAttribute("value","blank");mxUtils.write(B,mxResources.get("openInNewWindow"));V.appendChild(B);B=document.createElement("option");B.setAttribute("value","self");mxUtils.write(B,mxResources.get("openInThisWindow"));V.appendChild(B);B=document.createElement("div");mxUtils.write(B,mxResources.get("LinksLost"));B.style.margin="7px";
-B.style.display="none";"svg"==E&&(mxUtils.write(A,mxResources.get("links")+":"),A.appendChild(V),A.appendChild(B),mxUtils.br(A),mxUtils.br(A),R+=50);l=new CustomDialog(this,A,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=P.value;this.lastEmbedImages=Q.checked;this.lastEmbedFonts=U.checked;this.lastEmbedInclude=O.value;t(P.value,g.checked,!u.checked,C.checked,M.checked,Q.checked&&f,q.value,J.checked,("png"==E||"svg"==E)&&"currentPage"==O.value,V.value,null!=I?I.checked:
-null,null!=p?p.value:null,G.value,U.checked)}),null,l,m);this.showDialog(l.container,340,R,!0,!0,null,null,null,null,!0);P.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?P.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,m,t){var v=document.createElement("div");v.style.whiteSpace="nowrap";var B=this.editor.graph;if(null!=f){var E=document.createElement("h3");mxUtils.write(E,f);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-v.appendChild(E)}var D=this.addCheckbox(v,mxResources.get("fit"),!0),A=this.addCheckbox(v,mxResources.get("shadow"),B.shadowVisible&&m,!m),S=this.addCheckbox(v,l),R=this.addCheckbox(v,mxResources.get("lightbox"),!0),T=this.addEditButton(v,R),P=T.getEditInput(),q=1<B.model.getChildCount(B.model.getRoot()),u=this.addCheckbox(v,mxResources.get("layers"),q,!q);u.style.marginLeft=P.style.marginLeft;u.style.marginBottom="12px";u.style.marginTop="8px";mxEvent.addListener(R,"change",function(){R.checked?
-(q&&u.removeAttribute("disabled"),P.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&R.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,v,mxUtils.bind(this,function(){c(D.checked,A.checked,S.checked,R.checked,T.getLink(),u.checked)}),null,mxResources.get("embed"),t);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
-function(c,f,l,m,t,v,B,E){function D(P){var q=" ",u="";m&&(q=" 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!=S?"&page="+S:"")+(t?"&edit=_blank":"")+(v?"&layers=1":"")+"');}})(this);\"",u+=
-"cursor:pointer;");c&&(u+="max-width:100%;");var J="";l&&(J=' width="'+Math.round(A.width)+'" height="'+Math.round(A.height)+'"');B('<img src="'+P+'"'+J+(""!=u?' style="'+u+'"':"")+q+"/>")}var A=this.editor.graph.getGraphBounds(),S=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(P){var q=m?this.getFileData(!0):null;P=this.createImageDataUri(P,q,"png");D(P)}),null,null,null,mxUtils.bind(this,function(P){E({message:mxResources.get("unknownError")})}),
-null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),A.width*A.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var R="";l&&(R="&w="+Math.round(2*A.width)+"&h="+Math.round(2*A.height));var T=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+R+"&xml="+encodeURIComponent(f));T.send(mxUtils.bind(this,function(){200<=T.getStatus()&&299>=T.getStatus()?D("data:image/png;base64,"+T.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(c,f,l,m,t,v,B){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),D=E.getElementsByTagName("a");if(null!=D)for(var A=0;A<D.length;A++){var S=D[A].getAttribute("href");null!=S&&"#"==S.charAt(0)&&"_blank"==D[A].getAttribute("target")&&D[A].removeAttribute("target")}m&&E.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(E);if(l){var R=" ",T="";m&&(R="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":"")+(v?"&layers=1":"")+"');}})(this);\"",T+="cursor:pointer;");c&&(T+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(P){B('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(P))+'"'+(""!=T?' style="'+T+'"':"")+R+"/>")}))}else T="",m&&(f=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!=f?"&page="+f:"")+(t?"&edit=_blank":"")+(v?"&layers=1":"")+"');}}})(this);"),T+="cursor:pointer;"),c&&(c=parseInt(E.getAttribute("width")),t=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+c+" "+t),T+="max-width:100%;max-height:"+t+"px;",E.removeAttribute("height")),""!=T&&E.setAttribute("style",T),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),B(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(c){c=
-Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var l=null;if("diagram"==c.nodeName)l=
-c;else if("mxfile"==c.nodeName){var m=c.getElementsByTagName("diagram");if(0<m.length){l=m[0];var t=f.getGlobalVariable;f.getGlobalVariable=function(v){return"page"==v?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==v?1:t.apply(this,arguments)}}}null!=l&&(c=Editor.parseDiagramNode(l))}m=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(v){}finally{this.editor.graph=m}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};
-EditorUi.prototype.getPngFileProperties=function(c){var f=1,l=0;if(null!=c){if(c.hasAttribute("scale")){var m=parseFloat(c.getAttribute("scale"));!isNaN(m)&&0<m&&(f=m)}c.hasAttribute("border")&&(m=parseInt(c.getAttribute("border")),!isNaN(m)&&0<m&&(l=m))}return{scale:f,border:l}};EditorUi.prototype.getEmbeddedPng=function(c,f,l,m,t){try{var v=this.editor.graph,B=null;if(null!=l&&0<l.length)v=this.createTemporaryGraph(v.getStylesheet()),document.body.appendChild(v.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,
-!0),v),B=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){v=this.createTemporaryGraph(v.getStylesheet());var E=v.getGlobalVariable;v.setBackgroundImage=this.editor.graph.setBackgroundImage;var D=this.pages[0];this.currentPage==D?v.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&v.setBackgroundImage(D.viewState.backgroundImage);v.getGlobalVariable=function(A){return"page"==A?D.getName():"pagenumber"==A?1:E.apply(this,arguments)};document.body.appendChild(v.container);
-v.model.setRoot(D.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(A){try{null==B&&(B=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var S=A.toDataURL("image/png");S=Editor.writeGraphModelToPng(S,"tEXt","mxfile",encodeURIComponent(B));c(S.substring(S.lastIndexOf(",")+1));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container)}catch(R){null!=f&&f(R)}}),null,null,null,mxUtils.bind(this,function(A){null!=f&&f(A)}),null,null,m,null,v.shadowVisible,null,v,t,null,
-null,null,"diagram",null)}catch(A){null!=f&&f(A)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,m,t,v,B,E,D,A,S,R,T){E=null!=E?E:!0;S=null!=S?S:0;B=null!=D?D:f.background;B==mxConstants.NONE&&(B=null);null==B&&"none"==f.getAdaptiveColors()&&(B="#ffffff");D=this.editor.graph.createSvgImageExport(null!=c);v=f.getSvg(B,A,S,null,null,v,null,D,null,f.shadowVisible||R,null,T,"diagram");(f.shadowVisible||R)&&f.addSvgShadow(v,null,null,0==S);null!=c&&v.setAttribute("content",c);null!=l&&v.setAttribute("resource",
-l);var P=mxUtils.bind(this,function(q){q=(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(q);null!=t&&t(q);return q});f.mathEnabled&&this.editor.addMathCss(v);if(null!=t)this.embedFonts(v,mxUtils.bind(this,function(q){E?this.editor.convertImages(q,mxUtils.bind(this,function(u){P(u)})):P(q)}));else return P(v)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,
-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(m){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,m,t,v,B,E,D,A,S,R,T){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(q){Editor.addRetryToError(q,mxUtils.bind(this,function(){this.exportImage(c,f,l,m,t,v,B,E,D,A,S,R,T)}));this.handleError(q)}))){var P=this.editor.graph.isSelectionEmpty();
-l=null!=l?l:P;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(q){this.spinner.stop();try{this.saveCanvas(q,t?this.getFileData(!0,null,null,null,l,E,null,null,null,null,null,c,v):null,D,null==this.pages||0==this.pages.length,S)}catch(u){this.handleError(u)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,l,c||1,f,m,null,null,v,B,A,R,T)}catch(q){this.spinner.stop(),this.handleError(q)}}};
-EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,m,t,v,B){f=null!=f?f:0;l=null!=l?l:0;var E=[];try{var D=this.editor.graph;if(null!=c&&0<c.length){D.model.beginUpdate();try{var A=mxUtils.parseXml(c);c={};var S=this.editor.extractGraphModel(A.documentElement,
-null!=this.pages);if(null!=S&&"mxfile"==S.nodeName&&null!=this.pages){var R=S.getElementsByTagName("diagram");if(1==R.length&&!v){if(S=Editor.parseDiagramNode(R[0]),null!=this.currentPage&&(c[R[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var T=R[0].getAttribute("name");null!=T&&""!=T&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,T))}}else if(0<R.length){v=[];var P=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[R[0].getAttribute("id")]=
-this.pages[0].getId(),T=R[0].getAttribute("name"),null!=T&&""!=T&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],T)),S=Editor.parseDiagramNode(R[0]),m=!1,P=1);for(;P<R.length;P++){var q=R[P].getAttribute("id");R[P].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(R[P]));c[q]=R[P].getAttribute("id");var J=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[J+1]));D.model.execute(new ChangePage(this,u,u,J,!0));v.push(u)}this.updatePageLinks(c,
-v)}}if(null!=S&&"mxGraphModel"===S.nodeName){E=D.importGraphModel(S,f,l,m);if(null!=E)for(this.addLocalPagesToMapping(c),P=0;P<E.length;P++)this.updatePageLinksForCell(c,E[P]);var G=D.parseBackgroundImage(S.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(c,G);var H=new ChangePageSetup(this,null,G);H.ignoreColor=!0;D.model.execute(H)}}B&&D.pasteCellStyles(D.includeDescendants(E),D.defaultVertexStyle,D.defaultEdgeStyle)}finally{D.model.endUpdate()}}}catch(g){if(t)throw g;
-this.handleError(g)}return E};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=l&&(f.originalSrc="data:page/id,"+l)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=
-function(c,f){var l=document.createElement("div"),m=this.editor.graph,t=m.getLinkForCell(f);null!=t&&m.setLinkForCell(f,this.updatePageLink(c,t));if(m.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(m.getLabel(f));for(var v=l.getElementsByTagName("a"),B=!1,E=0;E<v.length;E++)t=v[E].getAttribute("href"),null!=t&&(v[E].setAttribute("href",this.updatePageLink(c,t)),B=!0);B&&m.labelChanged(f,l.innerHTML)}for(E=0;E<m.model.getChildCount(f);E++)this.updatePageLinksForCell(c,m.model.getChildAt(f,E))};EditorUi.prototype.updatePageLink=
-function(c,f){if(Graph.isPageLink(f)){var l=c[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var m=JSON.parse(f.substring(17));if(null!=m.actions){for(var t=0;t<m.actions.length;t++){var v=m.actions[t];if(null!=v.open&&Graph.isPageLink(v.open)){var B=v.open.substring(v.open.indexOf(",")+1);l=c[B];null!=l?v.open="data:page/id,"+l:null==this.getPageById(B)&&delete v.open}}f="data:action/json,"+JSON.stringify(m)}}catch(E){}return f};
-EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,l,m,t){var v=mxUtils.bind(this,function(B){this.loadingExtensions=!1;null!=l?l(B):this.handleError(B)});this.createTimeout(null,mxUtils.bind(this,function(B){m=null!=m?m:c.name;var E=mxUtils.bind(this,function(A){B.clear()&&v(A)}),D=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var A=this.isRemoteVisioFormat(m);
-try{var S=m.lastIndexOf(".");if(0<=S&&S<m.length)m.substring(S+1).toUpperCase();else{var R=m.lastIndexOf("/");0<=R&&R<m.length&&(m=m.substring(R+1))}}catch(P){}if(A)if(null==VSS_CONVERT_URL||this.isOffline())E({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{A=new FormData;A.append("file1",c,m);var T=new XMLHttpRequest;T.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));T.responseType="blob";this.addRemoteServiceSecurityCheck(T);
-null!=t&&T.setRequestHeader("x-convert-custom",t);T.onreadystatechange=mxUtils.bind(this,function(){if(4==T.readyState&&B.clear())if(200<=T.status&&299>=T.status)try{var P=T.response;if("text/xml"==P.type){var q=new FileReader;q.onload=mxUtils.bind(this,function(u){try{f(u.target.result)}catch(J){E({message:mxResources.get("errorLoadingFile")})}});q.readAsText(P)}else this.doImportVisio(P,f,E,m)}catch(u){E(u)}else try{""==T.responseType||"text"==T.responseType?E({message:T.responseText}):(q=new FileReader,
-q.onload=function(){try{E({message:JSON.parse(q.result).Message})}catch(u){null!=q.result&&0<q.result.length?E({message:q.result}):E(u)}},q.readAsText(T.response))}catch(u){E({})}});T.send(A)}else if(B.clear())try{this.doImportVisio(c,f,E,m)}catch(P){E(P)}}else E({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?D():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",D,null,null,null,E))}),v)};
-EditorUi.prototype.importGraphML=function(c,f,l){var m=mxUtils.bind(this,function(t){this.loadingExtensions=!1;null!=l?l(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var v=mxUtils.bind(this,function(E){t.clear()&&m(E)}),B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,m)}catch(E){v(E)}else v({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||
-this.isOffline(!0)?B():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,v))}),m)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(l){var m=mxUtils.bind(this,function(v){l.clear()&&f(v)}),t=mxUtils.bind(this,function(){this.loadingExtensions=
-!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||m({message:mxResources.get("unknownError")})}catch(v){m(v)}else m({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(t,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,m))}),f):f({message:mxResources.get("serviceUnavailableOrBlocked")})}};
-EditorUi.prototype.convertLucidChart=function(c,f,l){var m=mxUtils.bind(this,function(t){this.loadingExtensions=!1;null!=l?l(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var v=mxUtils.bind(this,function(E){t.clear()&&m(E)}),B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if("undefined"!==typeof window.LucidImporter)try{var E=JSON.parse(c);f(LucidImporter.importState(E));try{if(null!=window.console&&"1"==urlParams.test){var D=[(new Date).toISOString(),
-"convertLucidChart",E];null!=E.state&&D.push(JSON.parse(E.state));if(null!=E.svgThumbs)for(var A=0;A<E.svgThumbs.length;A++)D.push(Editor.createSvgDataUri(E.svgThumbs[A]));null!=E.thumb&&D.push(E.thumb);console.log.apply(console,D)}}catch(S){}}catch(S){null!=window.console&&console.error(S),v(S)}else v({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(B,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",B,null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,v))}),m)};EditorUi.prototype.createMermaidXml=function(c,f,l,
-m,t,v){var B=new Graph(document.createElement("div"));l=B.insertVertex(null,null,null,0,0,m,t,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");B.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=v&&B.setAttributeForCell(l,"templatePrompt",v);c=(new mxCodec).encode(B.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,l){var m=0,t=function(){for(var B=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),
-E=0;E<B.length;E++)null!=B[E].parentNode&&B[E].parentNode.removeChild(B[E])},v=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(B){var E=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),D=mxUtils.bind(this,function(A){B.clear()&&(t(),l(A))});E.send(mxUtils.bind(this,function(A){if(B.isAlive())if(200<=A.getStatus()&&299>=A.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var R=mxUtils.trim(A.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,
-function(T,P,q){this.tryAndHandle(mxUtils.bind(this,function(){B.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[R]),t(),f(R,T,P,q))}),D)}),D,mxUtils.bind(this,function(T){3>m++?B.clear()&&v():D(T)}))}),D);else{var S={message:mxResources.get("error")+" "+A.getStatus()};try{S=JSON.parse(A.getText()),S=S.error}catch(R){}D(S)}}),D)}),l)});v()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));
-var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?f[1]:null;if(null!=l){var m=l.indexOf("-");0<m&&(l=l.substring(0,m))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");l=f[0].split(" ")[0].replace(/:$/,"");m=l.indexOf("-");0<
-m&&(l=l.substring(0,m));try{"mindmap"==l&&2<f.length&&(c=extractMermaidMindmap(f))}catch(t){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,f,l,m,t){var v=mxUtils.bind(this,function(E){this.loadingMermaid=!1;null!=m?m(E):this.handleError(E)}),B=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;f.maxTextSize=9E5;"undefined"!==
-typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var E=mxUtils.bind(this,function(D){try{if(mxClient.IS_IE||mxClient.IS_IE11)D=D.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');D=D.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var A=mxUtils.parseXml(D).getElementsByTagName("svg");if(0<A.length&&
-"error"!=A[0].getAttribute("aria-roledescription")){var S=parseFloat(A[0].getAttribute("width")),R=parseFloat(A[0].getAttribute("height"));if(isNaN(S)||isNaN(R))try{var T=A[0].getAttribute("viewBox").split(/\s+/);S=parseFloat(T[2]);R=parseFloat(T[3])}catch(P){S=S||100,R=R||100}l(this.convertDataUri(Editor.createSvgDataUri(D)),S,R)}else null!=t?t():m({message:mxResources.get("invalidInput")})}catch(P){m(P)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),
-c).then(function(D){E(D.svg)}).catch(function(D){null!=t?t(D):m(D)})}catch(D){m(D)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(B,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(E){this.importXml(E,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",B,null,null,null,v)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,v))};
-EditorUi.prototype.generatePlantUmlImage=function(c,f,l,m){function t(E,D,A){c1=E>>2;c2=(E&3)<<4|D>>4;c3=(D&15)<<2|A>>6;c4=A&63;r="";r+=v(c1&63);r+=v(c2&63);r+=v(c3&63);return r+=v(c4&63)}function v(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 B=new XMLHttpRequest;B.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?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(c))),!0);"txt"!=f&&(B.responseType="blob");B.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==f)l(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(A){var S=new Image;S.onload=function(){try{var R=S.width,T=S.height;
-if(0==R&&0==T){var P=D.result,q=P.indexOf(","),u=decodeURIComponent(escape(atob(P.substring(q+1)))),J=mxUtils.parseXml(u).getElementsByTagName("svg");0<J.length&&(R=parseFloat(J[0].getAttribute("width")),T=parseFloat(J[0].getAttribute("height")))}l(D.result,R,T)}catch(G){m(G)}};S.src=D.result};D.onerror=function(A){m(A)}}else m(E)};B.onerror=function(E){m(E)};B.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var m=this.editor.graph,t=null;m.getModel().beginUpdate();try{t=m.insertVertex(null,
-null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(t,!0)}finally{m.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(c,f,l,m,t,v,B,E){v=null!=v?v:!0;B=null!=B?B:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(T){4==T.readyState&&200<=
-T.status&&299>=T.status&&this.editor.graph.setSelectionCells(this.insertTextAt(T.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var D=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var A=Editor.extractGraphModelFromPdf(c);if(null!=A&&0<A.length)return this.importXml(A,f,l,v,!0,E)}if(Editor.isPngDataUrl(c)&&(A=Editor.extractGraphModelFromPng(c),null!=A&&0<A.length))return this.importXml(A,f,l,v,
-!0,E);if("data:image/svg+xml;"==c.substring(0,19))try{A=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(A=c.substring(c.indexOf(",")+1),A=window.atob&&!mxClient.IS_SF?atob(A):Base64.decode(A,!0)):A=decodeURIComponent(c.substring(c.indexOf(",")+1));var S=this.importXml(A,f,l,v,!0,E);if(0<S.length)return S}catch(T){}this.loadImage(c,mxUtils.bind(this,function(T){if("data:"==c.substring(0,5))this.resizeImage(T,c,mxUtils.bind(this,function(u,J,G){D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),
-D.snap(l),J,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(u)+";"))}),B,this.maxImageSize);else{var P=Math.min(1,Math.min(this.maxImageSize/T.width,this.maxImageSize/T.height)),q=Math.round(T.width*P);T=Math.round(T.height*P);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),D.snap(l),q,T,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-c+";"))}}),mxUtils.bind(this,function(){var T=null;D.getModel().beginUpdate();try{T=D.insertVertex(D.getDefaultParent(),null,c,D.snap(f),D.snap(l),1,1,"text;"+(m?"html=1;":"")),D.updateCellSize(T),D.fireEvent(new mxEventObject("textInserted","cells",[T]))}finally{D.getModel().endUpdate()}D.setSelectionCell(T)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,v,null,E);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
-function(T){this.editor.graph.setSelectionCells(this.importXml(T,f,l,v,null,E))}),mxUtils.bind(this,function(T){this.handleError(T)}));else{D=this.editor.graph;t=null;D.getModel().beginUpdate();try{t=D.insertVertex(D.getDefaultParent(),null,"",D.snap(f),D.snap(l),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[t]));m&&(c=D.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");t.value=c;D.updateCellSize(t);if(0<this.maxTextWidth&&
-t.geometry.width>this.maxTextWidth){var R=D.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=R.width;t.geometry.height=R.height}Graph.isLink(t.value)&&D.setLinkForCell(t,t.value);t.geometry.width+=D.gridSize;t.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=
-function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=
-document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(B,E){StorageFile.listFiles(this,"F",B,E)});window.openBrowserFile=
-mxUtils.bind(this,function(B,E,D){StorageFile.getFileContent(this,B,E,D)});window.deleteBrowserFile=mxUtils.bind(this,function(B,E,D){StorageFile.deleteFile(this,B,E,D)});if(!f){var m=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(B){this.hideDialog(B)}));window.openFile.setConsumer(mxUtils.bind(this,function(B,E){null!=E&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(E)?(B=new Blob([B],{type:"application/octet-stream"}),this.importVisio(B,
-mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,E)):this.editor.graph.setSelectionCells(this.importXml(B,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var t=this.dialog,v=t.close;this.dialog.close=mxUtils.bind(this,function(B){Editor.useLocalStorage=m;v.apply(t,arguments);B&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
-function(c,f,l){var m=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(v){if(mxUtils.isEmptyObject(v.files))l();else{var B=0,E,D=!1;v.forEach(function(A,S){A=S.name.toLowerCase();"diagram/diagram.xml"==A?(D=!0,S.async("string").then(function(R){0==R.indexOf("<mxfile ")?f(R):l()})):0==A.indexOf("versions/")&&(A=parseInt(A.substr(9)),A>B&&(B=A,E=S))});0<B?E.async("string").then(function(A){(new XMLHttpRequest).upload&&m.isRemoteFileFormat(A,
-c.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):m.parseFileData(A,mxUtils.bind(this,function(S){4==S.readyState&&(200<=S.status&&299>=S.status?f(S.responseText):l())}),c.name):l()}):D||l()}},function(v){l(v)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,m,t,v,B,
-E,D,A,S,R){A=null!=A?A:!0;var T=!1,P=null,q=mxUtils.bind(this,function(u){var J=null;null!=u&&"<mxlibrary"==u.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,u,B)),this.showSidebar()):J=this.importXml(u,l,m,A,null,null!=R?mxEvent.isControlDown(R):null);null!=E&&E(J)});"image"==f.substring(0,5)?(D=!1,"image/png"==f.substring(0,9)&&(S=S?null:this.extractGraphModelFromPng(c),null!=S&&0<S.length&&(P=this.importXml(S,l,m,A,null,null!=R?mxEvent.isControlDown(R):null),D=!0)),D||(D=this.editor.graph,
-S=c.indexOf(";"),0<S&&(c=c.substring(0,S)+c.substring(c.indexOf(",",S+1))),A&&D.isGridEnabled()&&(l=D.snap(l),m=D.snap(m)),S="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(S+="editableCssRules=.*;"),P=[D.insertVertex(null,null,"",l,m,t,v,S+"image="+c+";")])):/(\.*<graphml )/.test(c)?(T=!0,this.importGraphML(c,q)):null!=D&&null!=B&&EditorUi.isVisioFilename(B)?(T=!0,this.importVisio(D,q)):(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(c,B)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(T=!0,f=mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?q(u.responseText):null!=E&&(E(null),this.showError(mxResources.get("error"),413==u.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,B):this.parseFile(D,f,B)):0==c.indexOf("PK")&&null!=D?(T=!0,this.importZipFile(D,q,mxUtils.bind(this,function(){P=
-this.insertTextAt(this.validateFileData(c),l,m,!0,null,A);E(P)}))):/(\.v(sd|dx))($|\?)/i.test(B)||/(\.vs(s|x))($|\?)/i.test(B)||(P=this.insertTextAt(this.validateFileData(c),l,m,!0,null,A,null,null!=R?mxEvent.isControlDown(R):null));T||null==E||E(P);return P};EditorUi.prototype.importFiles=function(c,f,l,m,t,v,B,E,D,A,S,R,T){m=null!=m?m:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var P=null!=f&&null!=l,q=!0;f=null!=f?f:0;l=null!=l?l:0;var u=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var J=S||
-this.resampleThreshold,G=0;G<c.length;G++)if("image/svg"!==c[G].type.substring(0,9)&&"image/"===c[G].type.substring(0,6)&&c[G].size>J){u=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[f],"y",[l],"maxSize",[m],"maxBytes",[A],"resampleThreshold",[this.resampleThreshold],"largeImages",[u],"crop",[P],"resizeImages",[q],"ignoreEmbeddedXml",[R],"evt",[T]);var H=mxUtils.bind(this,function(){var g=this.editor.graph,p=g.gridSize;t=null!=t?t:mxUtils.bind(this,function(U,V,X,W,Y,Z,aa,
-ha,ea){try{if(null!=U&&"<mxlibrary"==U.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,aa)),this.showSidebar(),null;this.isCompatibleString(U)&&1==c.length&&null!=T&&"drop"==T.type&&this.isBlankFile()&&!this.canUndo()&&(P=!1,W=X=0);return this.importFile(U,V,X,W,Y,Z,aa,ha,ea,P,R,T)}catch(da){return this.handleError(da),null}});v=null!=v?v:mxUtils.bind(this,function(U){g.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var C=
-c.length,I=C,M=[],O=mxUtils.bind(this,function(U,V){M[U]=V;if(0==--I){this.spinner.stop();if(null!=E)E(M);else{var X=[];g.getModel().beginUpdate();try{for(U=0;U<M.length;U++){var W=M[U]();null!=W&&(X=X.concat(W))}}finally{g.getModel().endUpdate()}}v(X)}}),Q=0;Q<C;Q++)mxUtils.bind(this,function(U){var V=c[U];if(null!=V){var X=new FileReader;X.onload=mxUtils.bind(this,function(W){if(null==B||B(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Y=Graph.clipSvgDataUri(W.target.result),
-Z=Y.indexOf(","),aa=decodeURIComponent(escape(atob(Y.substring(Z+1)))),ha=mxUtils.parseXml(aa),ea=ha.getElementsByTagName("svg");if(0<ea.length){var da=ea[0],ia=R?null:da.getAttribute("content");null!=ia&&"<"!=ia.charAt(0)&&"%"!=ia.charAt(0)&&(ia=unescape(window.atob?atob(ia):Base64.decode(ia,!0)));null!=ia&&"%"==ia.charAt(0)&&(ia=decodeURIComponent(ia));null==ia||"<mxfile "!==ia.substring(0,8)&&"<mxGraphModel>"!==ia.substring(0,14)&&"<mxGraphModel "!==ia.substring(0,14)?O(U,mxUtils.bind(this,function(){try{if(null!=
-ha){var fa=ha.getElementsByTagName("svg");if(0<fa.length){var ja=fa[0],ca=ja.getAttribute("width"),sa=ja.getAttribute("height");ca=null!=ca&&"%"!=ca.charAt(ca.length-1)?parseFloat(ca):NaN;sa=null!=sa&&"%"!=sa.charAt(sa.length-1)?parseFloat(sa):NaN;var pa=ja.getAttribute("viewBox");if(null==pa||0==pa.length)ja.setAttribute("viewBox","0 0 "+ca+" "+sa);else if(isNaN(ca)||isNaN(sa)){var ua=pa.split(" ");3<ua.length&&(ca=parseFloat(ua[2]),sa=parseFloat(ua[3]))}Y=Editor.createSvgDataUri(mxUtils.getXml(ja));
-var wa=Math.min(1,Math.min(m/Math.max(1,ca)),m/Math.max(1,sa)),ka=t(Y,V.type,f+U*p,l+U*p,Math.max(1,Math.round(ca*wa)),Math.max(1,Math.round(sa*wa)),V.name);if(null!=ka&&(isNaN(ca)||isNaN(sa))){var na=new Image;na.onload=mxUtils.bind(this,function(){ca=Math.max(1,na.width);sa=Math.max(1,na.height);ka[0].geometry.width=ca;ka[0].geometry.height=sa;ja.setAttribute("viewBox","0 0 "+ca+" "+sa);Y=Editor.createSvgDataUri(mxUtils.getXml(ja));var za=Y.indexOf(";");0<za&&(Y=Y.substring(0,za)+Y.substring(Y.indexOf(",",
-za+1)));g.setCellStyles("image",Y,[ka[0]])});na.src=Editor.createSvgDataUri(mxUtils.getXml(ja))}return ka}}}catch(za){}return null})):O(U,mxUtils.bind(this,function(){return t(ia,"text/xml",f+U*p,l+U*p,0,0,V.name)}))}else O(U,mxUtils.bind(this,function(){return null}))}else{Z=!1;if("image/png"==V.type){var la=R?null:this.extractGraphModelFromPng(W.target.result);if(null!=la&&0<la.length){var ba=new Image;ba.src=W.target.result;O(U,mxUtils.bind(this,function(){return t(la,"text/xml",f+U*p,l+U*p,ba.width,
-ba.height,V.name)}));Z=!0}}Z||(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(W.target.result,mxUtils.bind(this,function(fa){this.resizeImage(fa,W.target.result,mxUtils.bind(this,function(ja,ca,sa){O(U,mxUtils.bind(this,function(){if(null!=ja&&ja.length<
-A){var pa=q&&this.isResampleImageSize(V.size,S)?Math.min(1,Math.min(m/ca,m/sa)):1;return t(ja,V.type,f+U*p,l+U*p,Math.round(ca*pa),Math.round(sa*pa),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),q,m,S,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Y=W.target.result,t(Y,V.type,f+U*p,l+U*p,240,160,V.name,function(fa){O(U,function(){return fa})},V)}catch(fa){O(U,mxUtils.bind(this,function(){return null})),
-null!=window.console&&console.error(fa,V)}else O(U,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(V.name)?t(null,V.type,f+U*p,l+U*p,240,160,V.name,function(W){O(U,function(){return W})},V):"image"==V.type.substring(0,5)||"application/pdf"==V.type?X.readAsDataURL(V):X.readAsText(V)}})(Q)});if(u){u=[];for(G=0;G<c.length;G++)u.push(c[G]);c=u;this.confirmImageResize(function(g){q=g;H()},D)}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(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,t=function(v,B){if(v||f)mxSettings.setResizeImages(v?B:null),mxSettings.save();l();c(B)};null==m||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(v){t(v,
-!0)},function(v){t(v,!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?226:200,!0,!0):t(!1,m)};EditorUi.prototype.parseFile=function(c,f,l){l=null!=l?l:c.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,f,l)});m.readAsText(c)};EditorUi.prototype.parseFileData=
-function(c,f,l){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.onreadystatechange=function(){f(m)};m.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,m,t,v,
-B){t=null!=t?t:this.maxImageSize;var E=Math.max(1,c.width),D=Math.max(1,c.height),A=f;if(m&&this.isResampleImageSize(null!=B?B:f.length,v))try{var S=Math.max(E/t,D/t);if(1<S){var R=Math.round(E/S),T=Math.round(D/S),P=document.createElement("canvas");P.width=R;P.height=T;P.getContext("2d").drawImage(c,0,0,R,T);var q=P.toDataURL();if(q.length<f.length){var u=document.createElement("canvas");u.width=R;u.height=T;var J=u.toDataURL();q!==J&&(f=q,E=R,D=T)}}}catch(G){}m&&A!=f&&t>this.maxImageSize/2&&f.length>
-this.maxImageBytes?this.resizeImage(c,f,l,m,t/1.5,v,B):l(f,E,D)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,l){try{var m=new Image;m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=l&&(m.onerror=l);m.src=c}catch(t){if(null!=l)l(t);else throw t;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?
-urlParams.rough:c)};var x=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());x.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var z=
-EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,l=f.isEnabled;f.isEnabled=function(){return l.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(p){var C=p.getEvent();return null==p.getState()&&!mxEvent.isMouseEvent(C)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(C)&&(null==p.getState()||mxEvent.isControlDown(C)||mxEvent.isShiftDown(C))});
-f.cellEditor.editPlantUmlData=function(p,C,I){var M=JSON.parse(I);C=new SimpleTextareaDialog(c,M.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(O,M.format,function(Q,U,V){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==M.format)f.labelChanged(p,"<pre>"+Q+"</pre>"),f.updateCellSize(p,!0);else{f.setCellStyles("image",c.convertDataUri(Q),[p]);var X=f.model.getGeometry(p);null!=X&&(X=X.clone(),X.width=U,X.height=V,f.cellsResized([p],
-[X],!1))}f.setAttributeForCell(p,"plantUmlData",JSON.stringify({data:O,format:M.format}))}finally{f.getModel().endUpdate()}},function(Q){c.handleError(Q)})});c.showDialog(C.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));C.init()};f.cellEditor.editMermaidData=function(p,C,I){var M=JSON.parse(I);C=new SimpleTextareaDialog(c,M.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(O,M.config,function(Q,U,V){c.spinner.stop();
-f.getModel().beginUpdate();try{f.setCellStyles("image",Q,[p]);var X=f.model.getGeometry(p);null!=X&&(X=X.clone(),X.width=Math.max(X.width,U),X.height=Math.max(X.height,V),f.cellsResized([p],[X],!1));f.setAttributeForCell(p,"mermaidData",JSON.stringify({data:O,config:M.config},null,2))}finally{f.getModel().endUpdate()}},function(Q){c.handleError(Q)})});c.showDialog(C.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));C.init()};var m=f.cellEditor.startEditing;f.cellEditor.startEditing=
-function(p,C){try{var I=this.graph.getAttributeForCell(p,"plantUmlData");if(null!=I)this.editPlantUmlData(p,C,I);else if(I=this.graph.getAttributeForCell(p,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(p,C,I);else{var M=f.getCellStyle(p);"1"==mxUtils.getValue(M,"metaEdit","0")?c.showDataDialog(p):m.apply(this,arguments)}}catch(O){c.handleError(O)}};f.getLinkTitle=function(p){return c.getLinkTitle(p)};f.customLinkClicked=function(p,C){var I=!1;try{var M=this.getGraphBounds();
-c.handleCustomLink(p,C);I=!0;c.chromelessResize&&!M.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(C))}catch(O){c.handleError(O)}return I};var t=f.parseBackgroundImage;f.parseBackgroundImage=function(p){var C=t.apply(this,arguments);null!=C&&null!=C.src&&Graph.isPageLink(C.src)&&(C={originalSrc:C.src});return C};var v=f.setBackgroundImage;f.setBackgroundImage=function(p){null!=p&&null!=p.originalSrc&&(p=c.createImageForPageLink(p.originalSrc,c.currentPage,this));v.apply(this,
-arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(p,C){p=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=p){var I=p.indexOf(",");if(0<I)for(p=p.substring(I+1),C=C.getProperty("patches"),I=0;I<C.length;I++)if(null!=C[I][EditorUi.DIFF_UPDATE]&&null!=C[I][EditorUi.DIFF_UPDATE][p]||
-null!=C[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(C[I][EditorUi.DIFF_REMOVE],p)){f.refreshBackgroundImage();break}}}));var B=f.getBackgroundImageObject;f.getBackgroundImageObject=function(p,C,I){var M=B.apply(this,arguments);null!=M&&null!=M.originalSrc&&(M=C?c.createImageForPageLink(M.originalSrc,I,null,!0):{src:M.originalSrc});return M};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/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=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(p){p=null!=p?p:"";"1"==urlParams.dev&&(p+=(0<p.length?"&":"?")+"dev=1");return E.apply(this,arguments)};var D=f.addClickHandler;f.addClickHandler=function(p,C,I){var M=C;C=function(O,Q,U){if(null==Q){var V=mxEvent.getSource(O);"a"==V.nodeName.toLowerCase()&&(Q=V.getAttribute("href"))}null!=Q&&f.isCustomLink(Q)&&(mxEvent.isTouchEvent(O)||
-!mxEvent.isPopupTrigger(O))&&f.customLinkClicked(Q,U)&&mxEvent.consume(O);null!=M&&M(O,Q,U)};D.call(this,p,C,I)};z.apply(this,arguments);this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var A=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(p,C,I){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(p,["zoomIn","zoomOut","-"],null,I);A.apply(this,arguments);f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(p,
-["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(p,["-","exitGroup","home"],null,I)};var S=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(p,C,I){if(c.editor.graph.isSelectionEmpty())S.apply(this,arguments),c.menus.addMenuItems(p,["copyAsImage","copyAsSvg"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(p,C,I):this.addPopupMenuArrangeItems(p,C,I),this.addMenuItems(p,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),
-null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(p,C,I),this.addMenuItems(p,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(C)&&f.isCellEditable(C)&&(this.addSubmenu("editCell",p,null,mxResources.get("edit")),p.addSeparator(),f.getModel().isEdge(C))){this.addSubmenu("line",p);var M=f.getModel().getGeometry(C);null!=M&&null!=M.points&&0<M.points.length&&this.addMenuItems(p,["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(p,
-["enterGroup"],null,I);M=c.getSelectionState();null!=M.mergeCell?this.addMenuItem(p,"mergeCells"):(1<M.style.colspan||1<M.style.rowspan)&&this.addMenuItem(p,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,
-function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var R=f.getExportVariables;f.getExportVariables=function(){var p=R.apply(this,arguments),C=c.getCurrentFile();null!=C&&(p.filename=C.getTitle());p.pagecount=null!=c.pages?c.pages.length:1;p.page=null!=c.currentPage?c.currentPage.getName():"";p.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return p};var T=f.getGlobalVariable;f.getGlobalVariable=
-function(p){var C=c.getCurrentFile();return"filename"==p&&null!=C?C.getTitle():"page"==p&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==p?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==p?null!=c.pages?c.pages.length:1:T.apply(this,arguments)};var P=null,q=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var p=this.getCurrentFile(),C=null!=p&&null!=p.getTitle()?p.getTitle():this.defaultFilename;P!=C&&p==q&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),
-f.view.validate());P=C;q=p}));var u=f.labelLinkClicked;f.labelLinkClicked=function(p,C,I){var M=C.getAttribute("href");if(null==M||!f.isCustomLink(M)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))u.apply(this,arguments);else{if(!f.isEnabled()||null!=p&&f.isCellLocked(p.cell))f.customLinkClicked(M),f.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var p=c.defaultFilename,C=c.getCurrentFile();null!=C&&(p=null!=C.getTitle()?C.getTitle():p);return p};var J=
-this.actions.get("print");J.setEnabled(!mxClient.IS_IOS||!navigator.standalone);J.visible=J.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!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(76,
-!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),f.addListener(mxEvent.ESCAPE,function(p,C){null!=
-C&&f.isEnabled()&&!f.isEditing()&&null!=C.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(p){var C=f.cellEditor.text2,I=null;null!=C&&(mxEvent.addListener(C,"dragleave",function(M){null!=I&&(I.parentNode.removeChild(I),I=null);M.stopPropagation();M.preventDefault()}),
-mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(M){null==I&&(I=this.highlightElement(C));M.stopPropagation();M.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(M){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<M.dataTransfer.files.length)this.importFiles(M.dataTransfer.files,0,0,this.maxImageSize,function(Q,U,V,X,W,Y){f.insertImage(Q,W,Y)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var U=0;U<Q.length;U++)Q[U]()},mxEvent.isControlDown(M));
-else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var O=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(Q){var U=Math.max(1,Q.width);Q=Math.max(1,Q.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,U)),V/Math.max(1,Q));f.insertImage(decodeURIComponent(O),U*V,Q*V)})):document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(M.dataTransfer.types,
-"text/html")?document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(M.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"));M.stopPropagation();M.preventDefault()})))}));if(Editor.isSettingsEnabled()){J=this.editor.graph.view;var G=mxSettings.getUnit();J.setUnit(G);Editor.pageSizeUnit=G==mxConstants.METERS?mxConstants.MILLIMETERS:G;J.addListener("unitChanged",function(p,C){p=C.getProperty("unit");mxSettings.setUnit(p);
-mxSettings.save();Editor.pageSizeUnit=p==mxConstants.METERS?mxConstants.MILLIMETERS:p});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,J.unit);this.refresh()}if("1"==urlParams.styledev){J=document.getElementById("geFooter");null!=J&&(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)})),J.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(p,C){0<this.editor.graph.getSelectionCount()?
-(p=this.editor.graph.getSelectionCell(),p=this.editor.graph.getModel().getStyle(p),this.styleInput.value=p||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var H=this.isSelectionAllowed;this.isSelectionAllowed=function(p){return mxEvent.getSource(p)==this.styleInput?!0:H.apply(this,arguments)}}J=document.getElementById("geInfo");null!=J&&J.parentNode.removeChild(J);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var g=null;mxEvent.addListener(f.container,
-"dragleave",function(p){f.isEnabled()&&(null!=g&&(g.parentNode.removeChild(g),g=null),p.stopPropagation(),p.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(p){null==g&&(g=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();p.stopPropagation();p.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(p){null!=g&&(g.parentNode.removeChild(g),g=null);if(f.isEnabled()){var C=mxUtils.convertPoint(f.container,
-mxEvent.getClientX(p),mxEvent.getClientY(p)),I=p.dataTransfer.files,M=f.view.translate,O=f.view.scale,Q=C.x/O-M.x,U=C.y/O-M.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(p)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(p)&&(U=Q=null),this.importFiles(I,Q,U,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(p),null,null,mxEvent.isShiftDown(p),p));else{mxEvent.isAltDown(p)&&(U=Q=0);var V=0<=mxUtils.indexOf(p.dataTransfer.types,
-"text/uri-list")?p.dataTransfer.getData("text/uri-list"):null;C=this.extractGraphModelFromEvent(p,null!=this.pages);if(null!=C)f.setSelectionCells(this.importXml(C,Q,U,!0));else if(0<=mxUtils.indexOf(p.dataTransfer.types,"text/html")){var X=p.dataTransfer.getData("text/html");C=document.createElement("div");C.innerHTML=Graph.sanitizeHtml(X);var W=null;I=C.getElementsByTagName("img");null!=I&&1==I.length?(X=I[0].getAttribute("src"),null==X&&(X=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||
-(W=!0)):(I=C.getElementsByTagName("a"),null!=I&&1==I.length?X=I[0].getAttribute("href"):(C=C.getElementsByTagName("pre"),null!=C&&1==C.length&&(X=mxUtils.getTextContent(C[0]))));var Y=!0,Z=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(X,Q,U,!0,W,null,Y,mxEvent.isControlDown(p)))});W&&null!=X&&X.length>this.resampleThreshold?this.confirmImageResize(function(aa){Y=aa;Z()},mxEvent.isControlDown(p)):Z()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),
-mxUtils.bind(this,function(aa){var ha=Math.max(1,aa.width);aa=Math.max(1,aa.height);var ea=this.maxImageSize;ea=Math.min(1,Math.min(ea/Math.max(1,ha)),ea/Math.max(1,aa));f.setSelectionCell(f.insertVertex(null,null,"",Q,U,ha*ea,aa*ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(aa){f.setSelectionCells(this.insertTextAt(V,Q,U,!0))})):0<=mxUtils.indexOf(p.dataTransfer.types,"text/plain")&&
-f.setSelectionCells(this.insertTextAt(p.dataTransfer.getData("text/plain"),Q,U,!0))}}p.stopPropagation();p.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",
-function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var p=parseInt(this.div.offsetLeft),C=parseInt(this.div.offsetWidth),I=c.embedViewport.x+c.embedViewport.width,M=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),Q=c.embedViewport.y+c.embedViewport.height;
-this.div.style.left=Math.max(c.embedViewport.x,Math.min(p,I-C))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(M,Q-O))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(J=Editor.currentTheme,"simple"==J||"sketch"==J)this.doSetCurrentTheme(J,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():
-(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));J=!1;if(null!=urlParams.dark)J=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)J="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||J&&"auto"!=mxSettings.settings.darkMode||(J=mxSettings.settings.darkMode);"auto"==J&&this.isAutoDarkModeSupported()&&(J=window.matchMedia("(prefers-color-scheme: dark)").matches);
-this.setDarkMode("string"===typeof J?"1"==J:J);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(p){this.isAutoDarkMode()&&this.setDarkMode(p.matches)}))}catch(p){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);
-Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(p,C){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=
-0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var y=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<
-f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}y.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,m=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(A){mxEvent.getSource(A)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(A),mxEvent.getClientY(A)),
-this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var t=document.createElement("div");t.style.position="absolute";t.style.width="10px";t.style.height="10px";t.style.borderRadius="5px";t.style.border="1px solid gray";t.style.background="#ffffff";t.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(t);this.bottomResizer=t;var v=null,B=null,E=null,D=null;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(A){D=parseInt(this.diagramContainer.style.height);B=mxEvent.getClientY(A);
-m.popupMenuHandler.hideMenu();mxEvent.consume(A)}));t=t.cloneNode(!1);t.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(t);this.rightResizer=t;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(A){E=parseInt(this.diagramContainer.style.width);v=mxEvent.getClientX(A);m.popupMenuHandler.hideMenu();mxEvent.consume(A)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(A){var S=!1;null!=v&&(this.diagramContainer.style.width=Math.max(20,E+mxEvent.getClientX(A)-
-v)+"px",S=!0);null!=B&&(this.diagramContainer.style.height=Math.max(20,D+mxEvent.getClientY(A)-B)+"px",S=!0);S&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(A){null==v&&null==B||mxEvent.consume(A);B=v=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility=
-"hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(A){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(A){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility=
-"hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect",
-"off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=
-!0;l.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(v){var B=mxEvent.getSource(v);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==B.nodeName||"TEXTAREA"==B.nodeName||"true"==B.contentEditable||224!=v.keyCode&&(mxClient.IS_MAC||17!=v.keyCode)&&(!mxClient.IS_MAC||91!=v.keyCode&&93!=v.keyCode)||
-m||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",v=f.container.scrollLeft,B=f.container.scrollTop,f.container.appendChild(l),m=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=v,f.container.scrollTop=B)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(v){var B=v.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=B&&17!=B&&91!=B&&93!=B||(m=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),
-l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(v){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l),c()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(v){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l,!0),c()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(v){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML=
-"&nbsp;",l.focus(),null!=v.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(v,l,!0,!0)),!mxEvent.isConsumed(v)){var B=f.container.scrollLeft,E=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=B,f.container.scrollTop=E,Graph.removePasteFormatting(l.firstChild),this.pasteCells(v,l,!1,!0)}catch(D){this.handleError(D)}}),0)}}catch(D){this.handleError(D)}}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(v){return mxEvent.getSource(v)==
-l?!0:t.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,f){if(null==c||""==c)c=App.isSimpleThemePreferred()?"simple":"kennedy";var l="simple"==Editor.currentTheme&&this.isDefaultTheme(c)||this.isDefaultTheme(Editor.currentTheme)&&
-"simple"==c||c==Editor.currentTheme;if(l||f)f=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=c,this.switchTheme(c),this.fireEvent(new mxEventObject("currentThemeChanged")),this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(f);return l};EditorUi.prototype.saveScrollState=function(c){var f=this.editor.graph.view.translate,l=this.diagramContainer.scrollLeft,m=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?
-(l-=this.embedViewport.x,m-=this.embedViewport.y):(l+=this.embedViewport.x,m+=this.embedViewport.y));f={x:l,y:m,tx:f.x,ty:f.y};c&&(f.boundingRect=this.diagramContainer.getBoundingClientRect());return f};EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,l=this.editor.graph.view.translate;if(null!=c.boundingRect){var m=this.diagramContainer.getBoundingClientRect();c.x-=c.boundingRect.x-m.x;c.y-=c.boundingRect.y-m.y}this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*f;
-this.diagramContainer.scrollTop=c.y+(l.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==
-Editor.currentTheme){var m=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=m&&null!=m.getAttribute("class");if(!f&&null!=m){m=m.getAttribute("title");var t=this.getCurrentFile();t=null!=t?t.savingStatusKey:DrawioFile.prototype.savingStatusKey;m==mxResources.get(t)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(t))+'..."src="'+Editor.tailSpin+'"></div>',
-f=!0)}this.statusContainer.style.display="none";m=32>=c.clientWidth;c.style.visibility=m&&""==this.editor.getStatus()?"hidden":"";if(m||f)this.statusContainer.style.display="",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.destroyWindows(!0);this.updateDefaultStyles();
-this.switchThemeConstants(c);this.switchCssForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);"sketch"==c&&(this.createFormatWindow(),this.createShapesWindow())};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,
-this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(c){null==this.sidebarWindow||c||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||c||(this.formatWindow.destroy(),
-this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=
-null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=
-Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)f.defaultEdgeLength=120;null==urlParams.grid&&(f.defaultGridEnabled=!1);null==urlParams.pv&&(f.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||
-Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&
-f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&
-(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,
-f,l,m){l=null!=l?l:"geButton";var t=this.menus.get(c);m=this.menubar.addMenu(mxResources.get(c),t.funct,null,m);m.className=l;m.setAttribute("title",mxResources.get(c));this.menus.menuCreated(t,m,l);null!=f&&(m.style.backgroundImage="url("+f+")",m.innerText="");return m};EditorUi.prototype.addButton=function(c,f,l,m){c=this.createToolbarButton(c,f,l);m=null!=m?m:this.container;m.appendChild(c);return c};EditorUi.prototype.createToolbarButton=function(c,f,l){var m=document.createElement("a");m.className=
-"geButton";null!=c&&"data:"==c.substring(0,5)&&(m.style.backgroundImage="url("+c+")");null!=f&&m.setAttribute("title",f);null!=l&&mxEvent.addListener(m,"click",function(t){"disabled"!=m.getAttribute("disabled")&&l(t);mxEvent.consume(t)});mxEvent.preventDefault(m);return m};EditorUi.prototype.createMenuItem=function(c,f,l){var m=this.actions.get(c),t=null!=m?m.funct:null,v=this.createToolbarButton(f,mxResources.get(c)+(null!=m&&null!=m.shortcut?" ("+m.shortcut+")":""),t);null==m||l||(c=function(){m.isEnabled()?
-v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",c),m.addListener("stateChanged",c),c());return v};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=this,f=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),l="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),
-f,60,240,l,mxUtils.bind(this,function(v){v.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var m=this.formatWindow.window.toggleMinimized,t=240;this.formatWindow.window.toggleMinimized=function(){m.apply(this,arguments);this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=
-t+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");c.format.refresh();this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(v){mxEvent.getSource(v)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var v=
-window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,B=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>v||690>B)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var F=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):
-F.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));var l=this.hsplitPosition,m=mxUtils.bind(this,function(){this.hsplitPosition=t;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),t=c?f:0,v=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==t?"translateX(0)":"translateX(-100%)");
-0!=t&&m();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==t?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform "+v+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,
-"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==t&&m()}),1E3*v)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var N=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():N.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,function(B,E){var D=this.menus.get(B);B=this.createMenuElement(E,
-mxUtils.bind(this,function(){D.funct.apply(this,arguments)}));B.setAttribute("title",E);B.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";B.className="geButton";c.parentNode.appendChild(B);return B});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),f.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",
-f.className="geButton",f.style.left="0px",f.style.right="50%",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.right="0px",mxUtils.write(f,mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var l=f("newLibrary","");l.style.left="0px";l.style.right="50%";var m=document.createElement("span");l.appendChild(m);
-var t=f("openLibraryFrom","");t.style.borderLeftWidth="1px";t.style.left="50%";t.style.right="0px";var v=document.createElement("span");t.appendChild(v);this.dependsOnLanguage(mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,mxResources.get("newLibrary"));l.setAttribute("title",mxResources.get("newLibrary"));v.innerHTML="";mxUtils.write(v,mxResources.get("openLibraryFrom"));t.setAttribute("title",mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);c.style.overflow=
-"hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-
-f)/2):56,c-6,f-6,mxUtils.bind(this,function(m){this.createShapesPanel(m)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};EditorUi.prototype.setAndPersistDarkMode=
-function(c){var f=c;"auto"==c&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(f);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(c){this.spinner.spin(document.body,mxResources.get("working"))&&(mxSettings.setLanguage(c),mxSettings.save(),mxClient.language=c,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,
-null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(c,f){this.dependsOnLanguage(mxUtils.bind(this,function(){c.setAttribute("title",mxResources.get(f))}))};EditorUi.prototype.dependsOnLanguage=function(c){c();this.addListener("languageChanged",c)};EditorUi.prototype.setAndPersistHighContrast=function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};
-EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var f=document.getElementById("high-contrast-stylesheet");if(null!=f&&window.matchMedia){var l=window.matchMedia("(forced-colors: active)").matches,m=f.getAttribute("media");(m="all"==m||"not all"!=m&&l)&&!c?
-f.setAttribute("media",l?"not all":"(forced-colors: active)"):!m&&c&&f.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.fireEvent(new mxEventObject("rulerVisibleChanged"));
-c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-f.x;this.diagramContainer.scrollTop+=c.x-f.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(c){mxUtils.lightDarkColorSupported&&(Editor.darkMode=c,c=mxUtils.isAncestorNode(document.body,this.container)||
-null==this.editor?this.container:this.editor.graph.container,mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff",null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),c.style.colorScheme="dark"):(c.classList.remove("geDarkMode"),c.style.colorScheme="light")),null!=this.ruler&&this.ruler.updateStyle(),this.fireEvent(new mxEventObject("darkModeChanged")))};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=
-c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,f){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState(!0))),
-(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left="10px",l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",
-this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var m=this.diagramContainer.getAttribute("data-bounds");if(null!=m){this.diagramContainer.removeAttribute("data-bounds");
-var t=m.split(" ");m=mxUtils.getDocumentSize();this.diagramContainer.style.top=t[0];this.diagramContainer.style.left=t[1];var v=parseInt(t[2]);t=parseInt(t[3]);v=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,v):v,m.width-80);t=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,t):t,m.height-80);this.diagramContainer.style.width=v+"px";this.diagramContainer.style.height=t+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||
-window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=f.style.top;c.style.right=
-"";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-
-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;f.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=
-mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize-4):(c.vertexFontSize=Graph.prototype.vertexFontSize,c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||
-null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize=
-"14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=
-Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==
-Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(f=this.getPageById(c.substring(l+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,
-5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var l=JSON.parse(c.substring(17));null!=l&&null!=l.title&&(f=l.title)}catch(m){}return f};EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=c.indexOf(","),c=this.getPageById(c.substring(f+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,
-f)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(f){f.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,l){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,l){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));
-c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,l){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,l){mxSettings.setGridColor(c.view.defaultGridColor,
-!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",
-mxUtils.bind(this,function(f,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));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.writeImageToClipboard=function(c,f,l,m,t,v){m=null!=m?m:"image/png";var B=null==f||null==l?'<img src="'+c+'">':'<img src="'+c+'" width="'+f+'" height="'+l+'">',E={"text/html":new Blob([B],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(m)&&(E[m]=this.base64ToBlob(c.substring(c.indexOf(",")+1),m));var D=new ClipboardItem(E);
-navigator.clipboard.write([D]).then(t)["catch"](v);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[c],"w",f,"h",l,"type",m,"html",[B],"data",[E],"item",[D])};EditorUi.prototype.writeHtmlToClipboard=function(c,f){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(c)],{type:"text/plain"}),"text/html":new Blob([c],{type:"text/html"})})])["catch"](f)};EditorUi.prototype.writeTextToClipboard=function(c,f){navigator.clipboard.writeText(c)["catch"](f)};
-EditorUi.prototype.copySvg=function(c,f,l){try{if(null!=navigator.clipboard&&"function"===typeof window.ClipboardItem){var m=this.editor.graph.getSvg(null,l,null,null,null,null,null,null,null,null,null,null,null,0<c.length?c:null);m.setAttribute("content",f);var t=Editor.createSvgDataUri(mxUtils.getXml(m)),v=parseInt(m.getAttribute("width")),B=parseInt(m.getAttribute("height"));this.writeImageToClipboard(t,v,B,"image/svg+xml",null,mxUtils.bind(this,function(E){this.handleError(E)}))}}catch(E){this.handleError(E)}};
-EditorUi.prototype.copyImage=function(c,f,l){try{l=null!=l?l:4,null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(m,t){try{this.spinner.stop();var v=this.createImageDataUri(m,f,"png"),B=Math.round(parseInt(t.getAttribute("width"))/l),E=Math.round(parseInt(t.getAttribute("height"))/l);EditorUi.debug("EditorUi.copyImage",[this],"cells",[c],"xml",[f],"scale",[l]);this.writeImageToClipboard(v,
-B,E,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var D=this.getBaseFilename(!1)+(null!=f?".drawio":"")+".png";this.saveLocalFile(v.substring(v.lastIndexOf(",")+1),D,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,l,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,
-null,!1,null,0<c.length?c:null)}catch(m){this.handleError(m)}};EditorUi.prototype.copyCells=function(c,f){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText="";else{var m=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),t=mxUtils.getXml(l.encodeCells(m));mxUtils.setTextContent(c,encodeURIComponent(t));f?(l.removeCells(m,!1),l.lastPasteXml=null):(l.lastPasteXml=t,l.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=
-null;if(Editor.enableNativeClipboard){var f=this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,l,m,t,v){EditorUi.debug("EditorUi.pasteXml",[this],"xml",[c],"pasteAsLabel",[f],"compat",[l],"evt",[m],"html",[t],"pt",[v]);t=null!=t?t:!0;var B=this.editor.graph,E=null!=v?v:Editor.pasteAtMousePointer&&B.isMouseInsertPoint()?
-B.getInsertPoint():null;v=null;B.lastPasteXml==c?null==E&&B.pasteCounter++:(B.lastPasteXml=c,B.pasteCounter=0);var D=B.pasteCounter*B.gridSize;if(l||this.isCompatibleString(c)){B.model.beginUpdate();try{if(v=this.importXml(c,D,D),null!=E){var A=B.getBoundingBoxFromGeometry(v,!0);if(null!=A){var S=Math.round(B.snap(E.x)),R=Math.round(B.snap(E.y));B.cellsMoved(v,S-A.x,R-A.y)}}}finally{B.model.endUpdate()}B.setSelectionCells(v)}else if(f&&1==B.getSelectionCount()){f=B.getStartEditingCell(B.getSelectionCell(),
-m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==B.getCurrentCellStyle(f)[mxConstants.STYLE_SHAPE])B.setCellStyles(mxConstants.STYLE_IMAGE,c,[f]);else{B.model.beginUpdate();try{B.labelChanged(f,c),Graph.isLink(c)&&B.setLinkForCell(f,c)}finally{B.model.endUpdate()}}B.setSelectionCell(f)}else E=null!=E?E:B.getInsertPoint(),B.isMouseInsertPoint()&&(D=0,B.lastPasteXml==c&&0<B.pasteCounter&&B.pasteCounter--),v=this.insertTextAt(c,E.x+D,E.y+D,t),B.setSelectionCells(v);B.isSelectionEmpty()||(B.scrollCellToVisible(B.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(B.view.getState(B.getSelectionCell())));return v};EditorUi.prototype.pasteCells=function(c,f,l,m){if(!mxEvent.isConsumed(c)){var t=c.clipboardData,v=this.editor.graph,B=!1,E=f;if(l&&null!=t&&t.getData){var D=t.getData("text/plain"),A=!1;if(null!=D&&0<D.length&&"%3CmxGraphModel%3E"==D.substring(0,18))try{var S=decodeURIComponent(D);this.isCompatibleString(S)&&(A=!0,D=S)}catch(G){}A=A?null:t.getData("text/html");null!=A&&0<A.length?(E=this.parseHtmlData(A),
-B="text/plain"!=E.getAttribute("data-type")):null!=D&&0<D.length&&(E=document.createElement("div"),mxUtils.setTextContent(E,A))}D=E.getElementsByTagName("span");if(null!=D&&0<D.length&&"application/vnd.lucid.chart.objects"===D[0].getAttribute("data-lucid-type"))l=D[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(G){var H=this.editor.graph;H.lastPasteXml==G?H.pasteCounter++:(H.lastPasteXml=G,H.pasteCounter=0);var g=H.pasteCounter*H.gridSize;
-H.setSelectionCells(this.importXml(G,g,g));H.scrollCellToVisible(H.getSelectionCell())}),mxUtils.bind(this,function(G){this.handleError(G)})),mxEvent.consume(c));else{var R=!1,T="";T=B?null!=E.textContent&&"<mxfile"==E.textContent.substring(0,7)&&"</mxfile>"==E.textContent.substring(E.textContent.length-9)||"<mxGraphModel"==E.textContent.substring(0,13)&&"</mxGraphModel>"==E.textContent.substring(E.textContent.length-15)?E.textContent.replace(/\u00a0/g," "):E.innerHTML:mxUtils.trim(null==E.innerText?
-mxUtils.getTextContent(E):E.innerText);try{var P=T.lastIndexOf("%3E");0<=P&&P<T.length-3&&(T=T.substring(0,P+3))}catch(G){}try{D=E.getElementsByTagName("span"),(S=null!=D&&0<D.length?mxUtils.trim(decodeURIComponent(D[0].textContent)):decodeURIComponent(T))&&(this.isCompatibleString(S)||0==S.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(R=!0,T=S)}catch(G){}S=null;try{if(!R&&""==E.textContent)for(P=0;P<t.items.length;P++){var q=t.items[P];if("file"===q.kind){S=q.getAsFile();break}}}catch(G){}EditorUi.debug("EditorUi.pasteCells",
-[this],"evt",[c],"realElt",[f.outerHTML],"elt",[E.outerHTML],"useEvent",l,"pasteAsLabel",m,"xml",[T],"compat",R,"asHtml",B,"data",t,"items",[t.items.length],"files",[t.files.length],"types",[JSON.stringify(t.types)],"blob",[S]);try{if(R||null==S)if(null!=T&&0<T.length){if(0==T.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var J=mxUtils.bind(this,function(){try{T=(new MiroImporter).importMiroJson(JSON.parse(T)),this.pasteXml(T,m,R,c)}catch(G){console.log("Miro import error:",G)}});
-"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",J):J()}else this.pasteXml(T,m,R,c,B);mxEvent.consume(c)}else l||(v.lastPasteXml=null,v.pasteCounter=0);else{var u=v.getInsertPoint();this.importFiles([S],u.x,u.y,this.maxImageSize);mxEvent.consume(c)}}catch(G){this.handleError(G)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.pasteFromClipboard=function(c){var f=this.editor.graph;if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,
-function(l,m,t,v,B){if(null!=l){f.getModel().beginUpdate();try{this.pasteXml(l,!0,null,null,null,c)}finally{f.getModel().endUpdate()}}else l=null!=m?m:null!=t?t:v,null!=l?(c=null!=c?c:f.getInsertPoint(),this.importFiles([l],c.x,c.y,this.maxImageSize)):this.pasteFromLocalClipboard(c)})):this.pasteFromLocalClipboard(c)}catch(l){}};EditorUi.prototype.pasteFromLocalClipboard=function(c){var f=this.editor.graph;f.getModel().beginUpdate();try{f.moveCellsTo(mxClipboard.paste(f),c)}finally{f.getModel().endUpdate()}};
-EditorUi.prototype.installImagePasteHandler=function(){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){for(var l=null!=f.clipboardData?f.clipboardData:f.originalEvent.clipboardData,m=!1,t=null,v=0;v<l.types.length;v++)if("text/"===l.types[v].substring(0,5)){m=!0;break}for(v=0;v<l.items.length;v++){var B=l.items[v];if("file"===B.kind){t=B.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[f],"data",[l],"items",[l.items.length],"files",
-[l.files.length],"types",[JSON.stringify(l.types)],"containsText",m,"file",[t],"editing",c.isEditing());var E=mxUtils.bind(this,function(){try{if(!m&&null!=t){if(c.isEditing())this.importFiles([t],0,0,this.maxImageSize,function(A,S,R,T,P,q){c.insertImage(A,P,q)},function(){},function(A){return"image/"==A.type.substring(0,6)},function(A){for(var S=0;S<A.length;S++)A[S]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([t],D.x,D.y,this.maxImageSize)}mxEvent.consume(f)}}catch(A){}});
-if(!mxEvent.isConsumed(f)&&!m)if(Editor.enableNativeClipboard)navigator.clipboard.read().then(mxUtils.bind(this,function(D){this.readTypeFromClipboardData(D,"image/svg+xml",mxUtils.bind(this,function(A){if(null!=A){A=new Blob([A],{type:"image/svg+xml"});var S=this.editor.graph.getInsertPoint();this.importFiles([A],S.x,S.y,this.maxImageSize)}else E()}),"image")}))["catch"](E);else E()}),!1)};EditorUi.prototype.readGraphModelFromClipboard=function(c){navigator.clipboard.read().then(mxUtils.bind(this,
-function(f){try{EditorUi.debug("EditorUi.readGraphModelFromClipboard",[this],"data",f,"types",null!=f&&0<f.length?[JSON.stringify(f[0].types)]:[]),this.readGraphModelFromHtmlClipboardData(f,mxUtils.bind(this,function(l,m){null!=l?c(l):this.readGraphModelFromImageClipboardData(f,mxUtils.bind(this,function(t,v,B){null!=t?c(t):this.readTypeFromClipboardData(f,"text/plain",mxUtils.bind(this,function(E){c(E,v,B,m,f)}))}))}))}catch(l){c(null)}}))["catch"](function(){c(null)})};EditorUi.prototype.readGraphModelFromHtmlClipboardData=
-function(c,f){this.readTypeFromClipboardData(c,"text/html",mxUtils.bind(this,function(l){var m=null,t=null;try{var v=this.parseHtmlData(l);if(null!=v){m="text/plain"!=v.getAttribute("data-type")?v.innerHTML:mxUtils.trim(null==v.innerText?mxUtils.getTextContent(v):v.innerText);try{var B=m.lastIndexOf("%3E");0<=B&&B<m.length-3&&(m=m.substring(0,B+3))}catch(A){}try{null==m&&(l=null,""==v.textContent&&1==v.children.length&&"IMG"==v.firstChild.nodeName&&(l=v.firstChild.getAttribute("src")),null!=l&&0<
-l.length&&("data:image/png;base64,"==l.substring(0,22)?t=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/png"):"data:image/svg+xml;base64,"==l.substring(0,26)&&(t=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/svg+xml"))))}catch(A){}try{var E=v.getElementsByTagName("span"),D=null!=E&&0<E.length?mxUtils.trim(decodeURIComponent(E[0].textContent)):decodeURIComponent(m);this.isCompatibleString(D)&&(m=D)}catch(A){}}}catch(A){}f(this.isCompatibleString(m)?m:null,t)}))};EditorUi.prototype.readGraphModelFromImageClipboardData=
-function(c,f){this.readTypeFromClipboardData(c,"image/svg+xml",mxUtils.bind(this,function(l,m){var t=null;try{null!=l&&(t=mxUtils.parseXml(l).documentElement.getAttribute("content"))}catch(v){}this.isCompatibleString(t)?f(t):this.readTypeFromClipboardData(c,"image/png",mxUtils.bind(this,function(v,B){t=Editor.extractGraphModelFromPng("data:image/png;base64,"+v);this.isCompatibleString(t)?f(t):f(null,m,B)}))}))};EditorUi.prototype.readTypeFromClipboardData=function(c,f,l){var m=!1;if(null!=c&&0<c.length)for(var t=
-0;t<c.length&&!m;t++)(function(v){0<=mxUtils.indexOf(v.types,f)&&(m=!0,v.getType(f).then(mxUtils.bind(this,function(B){if("image/png"==f)B.arrayBuffer().then(function(E){l(btoa(Graph.arrayBufferToString(E)),B)})["catch"](function(){l(null)});else B.text().then(mxUtils.bind(this,function(E){EditorUi.debug("EditorUi.readTypeFromClipboardData",[this],"data",[c],"type",[f],"result",[E]);l(E,B)}))["catch"](function(){l(null)})}))["catch"](function(){l(null)}))})(c[t]);m||l()};EditorUi.prototype.parseHtmlData=
-function(c){var f=null;if(null!=c&&0<c.length){var l="<meta "==c.substring(0,6);f=document.createElement("div");f.innerHTML=(l?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(c);asHtml=!0;l=f.getElementsByTagName("style");if(null!=l)for(;0<l.length;)l[0].parentNode.removeChild(l[0]);if(null!=f.firstChild&&f.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=f.firstChild.nextSibling&&f.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==f.firstChild.nodeName&&"A"==f.firstChild.nextSibling.nodeName&&
-null==f.firstChild.nextSibling.nextSibling){var m=null==f.firstChild.nextSibling.innerText?mxUtils.getTextContent(f.firstChild.nextSibling):f.firstChild.nextSibling.innerText;m==f.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(f,m),asHtml=!1)}if(""==f.textContent&&(l=f.getElementsByTagName("img"),1==l.length&&(m=l[0].getAttribute("src"),l=null,null!=m))){if(Editor.isPngDataUrl(m)){var t=Editor.extractGraphModelFromPng(m);null!=t&&0<t.length&&(l=t)}else if("data:image/svg+xml;base64,"==
-m.substring(0,26)){img=this.base64ToBlob(m.substring(m.indexOf(",")+1),"image/svg+xml");m=Graph.getSvgFromDataUri(m);try{t=mxUtils.parseXml(m).documentElement.getAttribute("content"),this.isCompatibleString(t)&&(l=t)}catch(v){}}null!=l&&(mxUtils.setTextContent(f,l),asHtml=!1)}asHtml?Graph.removePasteFormatting(f):f.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[c],"elt",[f],"asHtml",asHtml);return f};EditorUi.prototype.showPrintDialog=function(c,f,l){var m=
-330;this.editor.graph.isEnabled()&&(m+=40);null!=this.pages&&1<this.pages.length&&(m+=40,this.editor.graph.isEnabled()||(m+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(m+=20);this.showDialog((new PrintDialog(this,c,f,l)).container,320,m,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,m=l.graph,t=this.getPageIndex(this.currentPage),v=null!=t?t+1:1,B=mxUtils.bind(this,function(G,H,g,p){var C=G.useCssTransforms,I=G.currentTranslate,M=G.currentScale,O=G.view.translate,
-Q=G.view.scale;G.useCssTransforms&&(G.useCssTransforms=!1,G.currentTranslate=new mxPoint(0,0),G.currentScale=1,G.view.translate=new mxPoint(0,0),G.view.scale=1);var U=G.getGraphBounds(),V=0,X=0,W=mxRectangle.fromRectangle(G.pageFormat),Y=f.fit||f.crop||!G.pageVisible,Z=f.scale;W.width=Math.ceil(W.width*G.pageScale);W.height=Math.ceil(W.height*G.pageScale);var aa=1;if(f.fit){aa=f.sheetsAcross;var ha=f.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));aa=Math.min(W.height*
-ha/(U.height/G.view.scale),W.width*aa/(U.width/G.view.scale))}else aa=isNaN(Z)?1:Z;aa*=1;!Y&&G.pageVisible?(Z=G.getPageLayout(),V-=Z.x*W.width,X-=Z.y*W.height):Y=!0;f.crop&&(f.selection&&(U=m.getBoundingBox(m.getSelectionCells())),W.width=(U.width+1)*aa/G.view.scale,W.height=(U.height+1)*aa/G.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);p=null!=p?"page/id,"+p:null;if(null==H){H=PrintDialog.createPrintPreview(G,aa,null,0,V,X,Y);H.title=this.getBaseFilename(!0);H.pageSelector=
-!1;H.mathEnabled=!1;V=f.border;isNaN(V)||(H.pageMargin=V);f.selection&&(H.isCellVisible=function(la){return G.isCellSelected(la)});var ea=H.writeHead;H.writeHead=function(la,ba){ba=null!=ba?ba:"";f.shadows||(ba+='g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');mxClient.IS_GC&&(ba+="@media print {\n .MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=l.fontCss&&(ba+=l.fontCss);ea.apply(this,arguments);for(var fa=G.getCustomFonts(),ja=0;ja<fa.length;ja++){var ca=fa[ja].name,
-sa=fa[ja].url;Graph.isCssFontUrl(sa)?la.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(sa))+'" charset="UTF-8" type="text/css">'):(la.writeln('<style type="text/css">'),la.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(ca)+'";\nsrc: url("'+mxUtils.htmlEntities(sa)+'");\n}'),la.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var da=H.drawBackgroundImage;H.drawBackgroundImage=function(la){da.apply(this,arguments);null!=la.node&&(EditorUi.embedSvgImages(la.node),
-m.disableSvgLinks(la.node,function(ba){ba.setAttribute("href","javascript:void(0)")}))}}var ia=H.addGraphFragment;H.addGraphFragment=function(la,ba,fa,ja,ca,sa){ia.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:ca.classList.add("geDisableMathJax");if(this.graph.shadowVisible)for(var pa=ca.getElementsByTagName("svg"),ua=0;ua<pa.length;ua++)G.addSvgShadow(pa[ua])};f.grid&&(H.gridSize=G.gridSize,H.gridSteps=G.view.gridSteps,H.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:
-G.view.gridColor);H.open(null,null,g,!0,p,W,f.selection?G.getSelectionCells():null)}else{U=G.background;if(null==U||""==U||U==mxConstants.NONE)U="#ffffff";H.backgroundColor=U;H.autoOrigin=Y;f.grid&&(H.gridSize=G.gridSize,H.gridSteps=G.view.gridSteps,H.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:G.view.gridColor);H.appendGraph(G,aa,V,X,g,!0,p,W,f.selection?G.getSelectionCells():null);g=G.getCustomFonts();if(null!=H.wnd)for(W=0;W<g.length;W++)V=g[W].name,X=g[W].url,Graph.isCssFontUrl(X)?
-H.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(X)+'" charset="UTF-8" type="text/css">'):(H.wnd.document.writeln('<style type="text/css">'),H.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(V)+'";\nsrc: url("'+mxUtils.htmlEntities(X)+'");\n}'),H.wnd.document.writeln("</style>"))}C&&(G.useCssTransforms=C,G.currentTranslate=I,G.currentScale=M,G.view.translate=O,G.view.scale=Q);return H}),E=f.pagesFrom,D=f.pagesTo,A=!f.allPages;t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,
-f);else{A&&(A=f.selection||E==v&&D==v);if(!A&&null!=this.pages&&this.pages.length){A=0;v=this.pages.length-1;f.allPages||(A=parseInt(E)-1,v=parseInt(D)-1);for(var S=A;S<=v;S++){var R=this.pages[S];E=R==this.currentPage?m:null;if(null==E){E=this.createTemporaryGraph(m.stylesheet);E.shapeForegroundColor=m.shapeForegroundColor;E.shapeBackgroundColor=m.shapeBackgroundColor;D=!0;var T=A=!1,P=null,q=null;null==R.viewState&&null==R.root&&this.updatePageRoot(R);null!=R.viewState&&(D=R.viewState.pageVisible,
-A=R.viewState.mathEnabled,T=R.viewState.shadowVisible,P=R.viewState.background,q=R.viewState.backgroundImage,E.pageFormat=R.viewState.pageFormat,E.gridSize=R.viewState.gridSize);null!=q&&null!=q.originalSrc&&(q=this.createImageForPageLink(q.originalSrc,R));E.background=P;E.backgroundImage=null!=q?new mxImage(q.src,q.width,q.height,q.x,q.y):null;E.pageVisible=D;E.mathEnabled=A;E.shadowVisible=T;var u=E.getGraphBounds;E.getGraphBounds=function(){var G=u.apply(this,arguments),H=this.backgroundImage;
-if(null!=H&&null!=H.width&&null!=H.height){var g=this.view.translate,p=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((g.x+H.x)*p,(g.y+H.y)*p,H.width*p,H.height*p))}return G};var J=E.getGlobalVariable;E.getGlobalVariable=function(G){return"page"==G?R.getName():"pagenumber"==G?S+1:"pagecount"==G?null!=this.pages?this.pages.length:1:J.apply(this,arguments)};document.body.appendChild(E.container);this.updatePageRoot(R);E.model.setRoot(R.root)}t=B(E,t,S!=v,R.getId());E!=m&&E.container.parentNode.removeChild(E.container)}}else t=
-B(m);null==t||null==t.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(B=t.wnd.document,c||(t.wnd.IMMEDIATE_PRINT=!0),B.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),t.closeDocument(),Graph.rewritePageLinks(t.wnd.document,!0),t.mathEnabled||c||PrintDialog.printPreview(t));return t}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(m){null!=
-f&&(f.parentNode.removeChild(f),f=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(f=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(m){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?
-this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,!0);else{var t=this.extractGraphModelFromEvent(m);if(null==t){var v=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=v&&(10==document.documentMode||11==document.documentMode?t=v.getData("Text"):(t=null,t=0<=mxUtils.indexOf(v.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(v.types,"text/html")?
-v.getData("text/html"):null,null!=t&&0<t.length?(v=document.createElement("div"),v.innerHTML=Graph.sanitizeHtml(t),v=v.getElementsByTagName("img"),0<v.length&&(t=v[0].getAttribute("src"))):0<=mxUtils.indexOf(v.types,"text/plain")&&(t=v.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(B){200<=B.getStatus()&&299>=B.getStatus()?this.openLocalFile(B.getText(),null,!0):this.showError(mxResources.get("error"),413==B.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(t)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(t):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+
-"#U"+encodeURIComponent(t)))))}else this.openLocalFile(t,null,!0)}m.stopPropagation();m.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,l=0;if(null==c){var m=document.body;var t=document.documentElement;var v=(m.clientWidth||t.clientWidth)-3;m=Math.max(m.clientHeight||0,t.clientHeight)-3}else m=c.getBoundingClientRect(),f=m.top,l=m.left,v=m.width,m=m.height;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=f+"px";t.style.left=l+"px";t.style.width=Math.max(0,v-3)+"px";t.style.height=Math.max(0,m-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(t):document.body.appendChild(t);return t};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var l=new mxCodec(f.ownerDocument),m=new mxGraphModel;l.decode(f,
-m);f=m.getChildAt(m.getRoot(),0);for(l=0;l<m.getChildCount(f);l++)c.push(m.getChildAt(f,l))}return c};EditorUi.prototype.openFileHandle=function(c,f,l,m,t,v){if(null!=f&&0<f.length){if(!Editor.useCanvasForExport&&/(\.png)$/i.test(f)||/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var B=mxUtils.bind(this,function(D){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==D.substring(0,10)){null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,D,f)),this.showSidebar()}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,f,m)});if(EditorUi.isVisioFilename(f))this.importVisio(l,mxUtils.bind(this,function(D){this.spinner.stop();B(D)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(D){this.spinner.stop();B(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),200<=D.status&&299>=D.status?B(D.responseText):this.handleError({message:mxResources.get(413==D.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),
-this.convertLucidChart(c,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,f,m)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,c,l.name)),this.showSidebar()}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==
-c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(D){this.spinner.stop();B(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,m)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==l.type){var E=Editor.extractGraphModelFromPdf(c);null!=E&&(t=null,m=!0,c=E)}this.spinner.stop();this.openLocalFile(c,f,m,t,null!=t?l:null,v)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=
-0;l<c.length;l++)mxUtils.bind(this,function(m){var t=new FileReader;t.onload=mxUtils.bind(this,function(v){try{this.openFileHandle(v.target.result,m.name,m,f)}catch(B){this.handleError(B)}});t.onerror=mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v);window.openFile=null});"image"!==m.type.substring(0,5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?t.readAsText(m):t.readAsDataURL(m)})(c[l])};EditorUi.prototype.openLocalFile=function(c,f,l,m,t,v){var B=this.getCurrentFile(),
-E=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(c);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,f||this.defaultFilename,l,m,t,v))});if(null!=c&&0<c.length)null==B||!B.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?E():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):E()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=
-0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var l in c)f.push(l);return f};EditorUi.prototype.addBasenamesForCell=function(c,f){function l(B){if(null!=B){var E=B.lastIndexOf(".");0<E&&(B=B.substring(E+1,B.length));null==f[B]&&(f[B]=!0)}}var m=this.editor.graph,t=m.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(t[mxConstants.STYLE_SHAPE]));m.model.isEdge(c)&&
-(l(mxMarker.getPackageForType(t[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(t[mxConstants.STYLE_ENDARROW])));t=m.model.getChildCount(c);for(var v=0;v<t;v++)this.addBasenamesForCell(m.model.getChildAt(c,v),f)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;
-this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);c||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};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 c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,l,m,t){c||(c=!0,this.spinner.stop(),
-this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(t)try{var v=this.editor.graph;v.setGridEnabled(!1);v.pageVisible=!1;var B=v.model.cells,E;for(E in B){var D=B[E];null!=D&&null!=D.style&&(D.style+=";sketch=1;"+(-1==D.style.indexOf("fontFamily=")||-1<D.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(A){console.log(A)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=m?m:!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(c,f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,
-page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var m=f.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(t){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,
-exit:null!=c?!c:!0,data:Editor.createSvgDataUri(t)}),"*")}),null,null,!0,m,1,this.embedExportBorder,null,this.embedExportTheme)}else c||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(t){c||this.handleError(t)}};
-EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,m=!1,t=null,v=mxUtils.bind(this,function(D,A){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,v);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source==(window.opener||window.parent)){var A=
-D.data,S=null,R=mxUtils.bind(this,function(ba){if(null!=ba&&"function"===typeof ba.charAt&&"<"!=ba.charAt(0))try{Editor.isPngDataUrl(ba)?ba=Editor.extractGraphModelFromPng(ba):"data:image/svg+xml;base64,"==ba.substring(0,26)?ba=atob(ba.substring(26)):"data:image/svg+xml;utf8,"==ba.substring(0,24)&&(ba=ba.substring(24)),null!=ba&&(""==ba.trim()?ba=null:"%"==ba.charAt(0)?ba=decodeURIComponent(ba):"<"!=ba.charAt(0)&&(ba=Graph.decompress(ba)))}catch(fa){}return ba});if("json"==urlParams.proto){var T=
-!1;try{A=JSON.parse(A),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[A])}catch(ba){A=null}try{if(null==A)return;if("dialog"==A.action){this.showError(null!=A.titleKey?mxResources.get(A.titleKey):A.title,null!=A.messageKey?mxResources.get(A.messageKey):mxUtils.htmlEntities(A.message),null!=A.buttonKey?mxResources.get(A.buttonKey):A.button);null!=A.modified&&(this.editor.modified=A.modified);return}if("layout"==A.action){this.executeLayouts(this.editor.graph.createLayouts(A.layouts));
-return}if("prompt"==A.action){this.spinner.stop();var P=new FilenameDialog(this,A.defaultValue||"",null!=A.okKey?mxResources.get(A.okKey):A.ok,function(ba){null!=ba?B.postMessage(JSON.stringify({event:"prompt",value:ba,message:A}),"*"):B.postMessage(JSON.stringify({event:"prompt-cancel",message:A}),"*")},null!=A.titleKey?mxResources.get(A.titleKey):A.title,null,null,null,null,function(){B.postMessage(JSON.stringify({event:"prompt-cancel",message:A}),"*")});this.showDialog(P.container,300,80,!0,!1);
-P.init();return}if("draft"==A.action){var q=R(A.xml);this.spinner.stop();P=new DraftDialog(this,mxResources.get("draftFound",[A.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"edit",message:A}),"*")}),mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"discard",message:A}),"*")}),A.editKey?mxResources.get(A.editKey):null,A.discardKey?mxResources.get(A.discardKey):null,A.ignore?
-mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"ignore",message:A}),"*")}):null);this.showDialog(P.container,640,480,!0,!1,mxUtils.bind(this,function(ba){ba&&this.actions.get("exit").funct()}));try{P.init()}catch(ba){B.postMessage(JSON.stringify({event:"draft",error:ba.toString(),message:A}),"*")}return}if("template"==A.action){this.spinner.stop();var u=1==A.enableRecent,J=1==A.enableSearch,G=1==A.enableCustomTemp;P=new NewDialog(this,!1,A.templatesOnly?
-!1:null!=A.callback,mxUtils.bind(this,function(ba,fa,ja,ca){ba=ba||this.emptyDiagramXml;null!=A.callback?B.postMessage(JSON.stringify({event:"template",xml:ba,blank:ba==this.emptyDiagramXml,name:fa,tempUrl:ja,libs:ca,builtIn:!0,message:A}),"*"):(c(ba,D,ba!=this.emptyDiagramXml,A.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,u?mxUtils.bind(this,function(ba){this.remoteInvoke("getRecentDiagrams",[null],null,ba,function(){ba(null,"Network Error!")})}):null,
-J?mxUtils.bind(this,function(ba,fa){this.remoteInvoke("searchDiagrams",[ba,null],null,fa,function(){fa(null,"Network Error!")})}):null,mxUtils.bind(this,function(ba,fa,ja){B.postMessage(JSON.stringify({event:"template",docUrl:ba,info:fa,name:ja}),"*")}),null,null,G?mxUtils.bind(this,function(ba){this.remoteInvoke("getCustomTemplates",null,null,ba,function(){ba({},0)})}):null,1==A.withoutType,null,A.templatesOnly);this.showDialog(P.container,620,460,!0,!1,mxUtils.bind(this,function(ba){null!=this.sidebar&&
-this.sidebar.hideTooltip();ba&&this.actions.get("exit").funct()}));P.init();return}if("textContent"==A.action){var H=this.getDiagramTextContent();B.postMessage(JSON.stringify({event:"textContent",data:H,message:A}),"*");return}if("status"==A.action){this.updateStatus(mxUtils.bind(this,function(){null!=A.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(A.messageKey))):null!=A.message&&this.editor.setStatus(mxUtils.htmlEntities(A.message))}));null!=A.modified&&(this.editor.modified=
-A.modified);return}if("spinner"==A.action){var g=null!=A.messageKey?mxResources.get(A.messageKey):A.message;null==A.show||A.show?this.spinner.spin(document.body,g):this.spinner.stop();return}if("exit"==A.action){this.actions.get("exit").funct();return}if("viewport"==A.action){if(null!=A.viewport){var p=this.editor.graph,C=p.view.translate.x,I=p.view.translate.y;this.embedViewport=A.viewport;p.refresh();this.diagramContainer.scrollTop-=(I-p.view.translate.y)*p.view.scale;this.diagramContainer.scrollLeft-=
-(C-p.view.translate.x)*p.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==A.action){P=null;try{var M=this.diagramContainer.getAttribute("data-scrollState");null!=M&&(this.diagramContainer.removeAttribute("data-scrollState"),P=JSON.parse(M))}catch(ba){}Editor.inlineFullscreen=A.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=P&&this.restoreScrollState(P);return}if("snapshot"==A.action){this.sendEmbeddedSvgExport(!0);return}if("export"==
-A.action){if("png"==A.format||"xmlpng"==A.format){if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin)){var O=null!=A.xml?A.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);p=this.editor.graph;var Q=mxUtils.bind(this,function(ba,fa){if(A.withSvg)A.withSvg=!1,this.getEmbeddedSvg(O,this.editor.graph,null,!0,function(ca){Q(ba,ca)},null,null,A.embedImages,this.editor.graph.background,A.scale,A.border,A.shadow,"auto");else{this.editor.graph.setEnabled(!0);
-this.spinner.stop();var ja=this.createLoadMessage("export");ja.format=A.format;ja.message=A;ja.data=ba;ja.svg=fa;ja.xml=O;B.postMessage(JSON.stringify(ja),"*")}}),U=mxUtils.bind(this,function(ba){null==ba&&(ba=Editor.blankImage);"xmlpng"==A.format&&(ba=Editor.writeGraphModelToPng(ba,"tEXt","mxfile",encodeURIComponent(O)));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container);Q(ba)}),V=A.pageId||(null!=this.pages?A.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var X=
-mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=V){var ba=p.getGlobalVariable;p=this.createTemporaryGraph(p.getStylesheet());for(var fa,ja=0;ja<this.pages.length;ja++)if(this.pages[ja].getId()==V){fa=this.updatePageRoot(this.pages[ja]);break}null==fa&&(fa=this.currentPage);p.getGlobalVariable=function(ua){return"page"==ua?fa.getName():"pagenumber"==ua?1:ba.apply(this,arguments)};document.body.appendChild(p.container);p.model.setRoot(fa.root)}if(null!=A.layerIds){var ca=
-p.model,sa=ca.getChildCells(ca.getRoot()),pa={};for(ja=0;ja<A.layerIds.length;ja++)pa[A.layerIds[ja]]=!0;for(ja=0;ja<sa.length;ja++)ca.setVisible(sa[ja],pa[sa[ja].id]||!1)}ja=null;A.keepTheme&&(ja=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(ua){U(ua.toDataURL("image/png"))}),A.width,null,A.background,mxUtils.bind(this,function(){U(null)}),null,null,A.scale,A.transparent,A.shadow,null,p,A.border,null,A.grid,ja)});null!=A.xml&&0<A.xml.length&&(l=!0,this.setFileData(O),
-l=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==A.format?"1":"0")+(null!=V?"&pageId="+V:"")+(null!=A.layerIds&&0<A.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:A.layerIds})):"")+(null!=A.scale?"&scale="+A.scale:"")+"&base64=1&xml="+encodeURIComponent(O))).send(mxUtils.bind(this,function(ba){200<=ba.getStatus()&&299>=ba.getStatus()?Q("data:image/png;base64,"+ba.getText()):U(null)}),mxUtils.bind(this,function(){U(null)}))}}else if(X=mxUtils.bind(this,
-function(){var ba=this.createLoadMessage("export");ba.message=A;if("html2"==A.format||"html"==A.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var fa=this.getXmlFileData();ba.xml=mxUtils.getXml(fa);ba.data=this.getFileData(null,null,!0,null,null,null,fa);ba.format=A.format}else if("html"==A.format)fa=this.editor.getGraphXml(),ba.data=this.getHtml(fa,this.editor.graph),ba.xml=mxUtils.getXml(fa),ba.format=A.format;else{mxSvgCanvas2D.prototype.foAltText=null;fa=null!=A.background?
-A.background:this.editor.graph.background;fa==mxConstants.NONE&&(fa=null);ba.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ba.format="svg";var ja=mxUtils.bind(this,function(sa){this.editor.graph.setEnabled(!0);this.spinner.stop();ba.data=A.asText?sa:Editor.createSvgDataUri(sa);B.postMessage(JSON.stringify(ba),"*")}),ca="auto";A.keepTheme&&(ca=Editor.isDarkMode()?"dark":"light");null!=A.theme&&(ca=A.theme);if("xmlsvg"==A.format){if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,
-null!=A.spinKey?mxResources.get(A.spinKey):A.spin)){ca=null;if(this.isAutoDarkMode()||Editor.isDarkMode())ca="auto";null!=A.theme&&(ca=A.theme);this.getEmbeddedSvg(ba.xml,this.editor.graph,null,!0,ja,null,null,A.embedImages,fa,A.scale,A.border,A.shadow,ca)}}else if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin))this.editor.graph.setEnabled(!1),fa=this.editor.graph.getSvg(fa,A.scale,A.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||
-A.shadow,null,ca),(this.editor.graph.shadowVisible||A.shadow)&&this.editor.graph.addSvgShadow(fa),this.embedFonts(fa,mxUtils.bind(this,function(sa){A.embedImages||null==A.embedImages?this.editor.convertImages(sa,mxUtils.bind(this,function(pa){ja(mxUtils.getXml(pa))})):ja(mxUtils.getXml(sa))}));return}B.postMessage(JSON.stringify(ba),"*")}),null!=A.xml&&0<A.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);X()}}l=!0;this.setFileData(A.xml);
-l=!1;this.editor.graph.mathEnabled||X()}else X();return}if("load"==A.action){T=A.toSketch;m=1==A.autosave;this.hideDialog();null!=A.modified&&null==urlParams.modified&&(urlParams.modified=A.modified);null!=A.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=A.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&
-(this.actions.get("save").shortcut=Editor.ctrlKey+"+"+Editor.shiftKey+"+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=A.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=A.noSaveBtn);if(null!=A.rough){var Y=Editor.sketchMode;this.doSetSketchMode(A.rough);Y!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=A.dark&&this.setDarkMode(A.dark);null!=A.border&&(this.embedExportBorder=A.border);null!=A.theme&&(this.embedExportTheme=A.theme);null!=A.background&&
-(this.embedExportBackground=A.background);null!=A.viewport&&(this.embedViewport=A.viewport);this.embedExitPoint=null;if(null!=A.rect){var Z=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,A.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,A.rect.top)+"px";this.minInlineWidth=A.minWidth;this.minInlineHeight=A.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var aa=A.maxFitScale,
-ha=A.rect.width+2*Z,ea=A.rect.height+2*Z;S=mxUtils.bind(this,function(){var ba=mxUtils.getDocumentSize();ha=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,ha):ha,ba.width-80);ba=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ea):ea,ba.height-80);this.diagramContainer.style.width=ha+"px";this.diagramContainer.style.height=ba+"px";var fa=this.editor.graph;ba=fa.maxFitScale;fa.maxFitScale=aa;fa.fit(2*Z,null,null,null,null,null,ea);this.setPageVisible(!1);if(null!=
-this.minInlineWidth&&fa.getGraphBounds().width<this.minInlineWidth){var ja=fa.container.scrollTop;this.resetScrollbars();fa.container.scrollTop=ja}fa.maxFitScale=ba;fa.container.scrollTop-=Z;fa.container.scrollLeft-=Z;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[A]));fa.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=fa.container.style.top);
-var ca=fa.getGraphBounds();fa.container.clientWidth>ca.width+2*Z&&(fa.container.scrollLeft=ca.x+(ca.width+Z-fa.container.clientWidth)/2)}),10)})}null!=A.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=A.noExitBtn);null!=A.title&&null!=this.buttonContainer&&this.setEmbedTitle(A.title);try{A.libs&&this.sidebar.showEntries(A.libs)}catch(ba){}A=null!=A.xmlpng?this.extractGraphModelFromPng(A.xmlpng):null!=A.descriptor?A.descriptor:A.xml}else{if("merge"==A.action){var da=this.getCurrentFile();
-null!=da&&(q=R(A.xml),null!=q&&""!=q&&da.mergeFile(new LocalFile(this,q),function(){B.postMessage(JSON.stringify({event:"merge",message:A}),"*")},function(ba){B.postMessage(JSON.stringify({event:"merge",message:A,error:ba}),"*")}))}else"remoteInvokeReady"==A.action?this.handleRemoteInvokeReady(B):"remoteInvoke"==A.action?this.handleRemoteInvoke(A,D.origin):"remoteInvokeResponse"==A.action?this.handleRemoteInvokeResponse(A):B.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(A)}),
-"*");return}}catch(ba){this.handleError(ba)}}var ia=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),la=mxUtils.bind(this,function(ba,fa){l=!0;try{c(ba,fa,null,T)}catch(ja){this.handleError(ja)}l=!1;null!=urlParams.modified&&this.clearStatus();t=ia();m&&null==f&&(f=mxUtils.bind(this,function(ja,ca){ja=ia();ja==t||l||(ca=this.createLoadMessage("autosave"),ca.xml=ja,(window.opener||window.parent).postMessage(JSON.stringify(ca),
-"*"));t=ja}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",
-f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)fa=this.createLoadMessage("load"),fa.xml=ba,B.postMessage(JSON.stringify(fa),"*");null!=S&&S()});null!=A&&"function"===typeof A.substring&&"data:application/vnd.visio;base64,"==A.substring(0,34)?(R="0M8R4KGxGuE"==A.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(A.substring(A.indexOf(",")+1)),function(ba){la(ba,D)},mxUtils.bind(this,function(ba){this.handleError(ba)}),R)):null!=
-A&&"function"===typeof A.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(A,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(A,mxUtils.bind(this,function(ba){4==ba.readyState&&(200<=ba.status&&299>=ba.status&&"<mxGraphModel"==ba.responseText.substring(0,13)?la(ba.responseText,D):this.handleError({message:413==ba.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=A&&"function"===typeof A.substring&&
-this.isLucidChartData(A)?this.convertLucidChart(A,mxUtils.bind(this,function(ba){la(ba)}),mxUtils.bind(this,function(ba){this.handleError(ba)})):null==A||"object"!==typeof A||null==A.format||null==A.data&&null==A.url?(A=R(A),la(A,D)):this.loadDescriptor(A,mxUtils.bind(this,function(ba){la(ia(),D)}),mxUtils.bind(this,function(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}))}}));var B=window.opener||window.parent;v="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||
-"ready";B.postMessage(v,"*");if("json"==urlParams.proto){var E=this.editor.graph.openLink;this.editor.graph.openLink=function(D,A,S){E.apply(this,arguments);B.postMessage(JSON.stringify({event:"openLink",href:D,target:A,allowOpener:S}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,f,l,m){var t=document.createElement("button");t.className="geEmbedBtn geBtn";t.setAttribute("title",c+(null!=l?" ("+l+")":""));mxUtils.write(t,c);m&&t.classList.add("gePrimaryBtn");mxEvent.addListener(t,"click",
-f);return t};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==
-this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),
-mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+"+Editor.shiftKey+"+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct))}))};
-EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new SimpleTextareaDialog(this,Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),mxResources.get("import"),"https://www.drawio.com/blog/insert-from-csv"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,new mxRectangle(0,0,320,280));this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,
-function(){var f=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var m=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(m));this.customLayoutConfig=m;this.hideDialog()}catch(t){this.handleError(t)}}),null,null,null,null,mxUtils.bind(this,function(l,m){var t=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var v=m.value;m.value=JSON.stringify(JSON.parse(v));m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));m.value=v}catch(B){this.handleError(B)}}));t.setAttribute("title","copy");t.className="geBtn";l.appendChild(t)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=
-!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),m=mxUtils.bind(this,function(t){this.loadingOrgChart=!1;f.clear()&&this.handleError(t)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():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",l,null,null,null,m)},null,null,null,m)},null,null,null,m)},null,null,null,m):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,m))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),m=[],t=[],v=[],B={};if(0<l.length){var E={},D=this.editor.graph,A=null,S=null,R=null,T=null,
-P=null,q=null,u=null,J="whiteSpace=wrap;html=1;",G=null,H=null,g="",p="auto",C="auto",I=!1,M=null,O=null,Q=40,U=40,V=100,X=0,W=mxUtils.bind(this,function(){null!=f?f(Aa):(D.setSelectionCells(Aa),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Y=D.getFreeInsertPoint(),Z=Y.x,aa=Y.y;Y=aa;var ha=null,ea="auto";H=null;for(var da=[],ia=null,la=null,ba=0;ba<l.length&&"#"==l[ba].charAt(0);){c=l[ba].replace(/\r$/,
-"");for(ba++;ba<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[ba].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[ba].substring(1)),ba++;if("#"!=c.charAt(1)){var fa=c.indexOf(":");if(0<fa){var ja=mxUtils.trim(c.substring(1,fa)),ca=mxUtils.trim(c.substring(fa+1));"label"==ja?ha=Graph.sanitizeHtml(ca):"labelname"==ja&&0<ca.length&&"-"!=ca?P=ca:"labels"==ja&&0<ca.length&&"-"!=ca?u=JSON.parse(ca):"style"==ja?S=ca:"parentstyle"==ja?J=ca:"unknownStyle"==ja&&"-"!=ca?q=ca:"stylename"==ja&&0<ca.length&&
-"-"!=ca?T=ca:"styles"==ja&&0<ca.length&&"-"!=ca?R=JSON.parse(ca):"vars"==ja&&0<ca.length&&"-"!=ca?A=JSON.parse(ca):"identity"==ja&&0<ca.length&&"-"!=ca?G=ca:"parent"==ja&&0<ca.length&&"-"!=ca?H=ca:"namespace"==ja&&0<ca.length&&"-"!=ca?g=ca:"width"==ja?p=ca:"height"==ja?C=ca:"collapsed"==ja&&"-"!=ca?I="true"==ca:"left"==ja&&0<ca.length?M=ca:"top"==ja&&0<ca.length?O=ca:"ignore"==ja?la=ca.split(","):"connect"==ja?da.push(JSON.parse(ca)):"link"==ja?ia=ca:"padding"==ja?X=parseFloat(ca):"edgespacing"==
-ja?Q=parseFloat(ca):"nodespacing"==ja?U=parseFloat(ca):"levelspacing"==ja?V=parseFloat(ca):"layout"==ja&&(ea=ca)}}}if(null==l[ba])throw Error(mxResources.get("invalidOrMissingFile"));var sa=this.editor.csvToArray(l[ba].replace(/\r$/,""));fa=c=null;ja=[];for(ca=0;ca<sa.length;ca++)G==sa[ca]&&(c=ca),H==sa[ca]&&(fa=ca),ja.push(mxUtils.trim(sa[ca]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ha&&(ha="%"+ja[0]+"%");if(null!=da)for(var pa=0;pa<da.length;pa++)null==E[da[pa].to]&&
-(E[da[pa].to]={});G=[];for(ca=ba+1;ca<l.length;ca++){var ua=this.editor.csvToArray(l[ca].replace(/\r$/,""));if(null==ua){var wa=40<l[ca].length?l[ca].substring(0,40)+"...":l[ca];throw Error(wa+" ("+ca+"):\n"+mxResources.get("containsValidationErrors"));}0<ua.length&&G.push(ua)}D.model.beginUpdate();try{for(ca=0;ca<G.length;ca++){ua=G[ca];var ka=null,na=null!=c?g+ua[c]:null;l=!1;null!=na&&(ka=D.model.getCell(na),l=null==ka||0<=mxUtils.indexOf(m,ka));var za=new mxCell(ha,new mxGeometry(Z,Y,0,0),S||
-"whiteSpace=wrap;html=1;");za.collapsed=I;za.vertex=!0;za.id=na;null==ka||l||D.model.setCollapsed(ka,I);for(var ra=0;ra<ua.length;ra++)D.setAttributeForCell(za,ja[ra],ua[ra]),null==ka||l||D.setAttributeForCell(ka,ja[ra],ua[ra]);if(null!=P&&null!=u){var ya=u[za.getAttribute(P)];null!=ya&&(D.labelChanged(za,ya),null==ka||l||D.cellLabelChanged(ka,ya))}if(null!=T&&null!=R){var Ca=R[za.getAttribute(T)];null!=Ca&&(za.style=Ca)}D.setAttributeForCell(za,"placeholders","1");za.style=D.replacePlaceholders(za,
-za.style,A);null==ka||l?D.fireEvent(new mxEventObject("cellsInserted","cells",[za])):(D.model.setStyle(ka,za.style),0>mxUtils.indexOf(v,ka)&&v.push(ka),D.fireEvent(new mxEventObject("cellsInserted","cells",[ka])));l=null!=ka;ka=za;if(!l)for(pa=0;pa<da.length;pa++)E[da[pa].to][ka.getAttribute(da[pa].to)]=ka;null!=ia&&"link"!=ia&&(D.setLinkForCell(ka,ka.getAttribute(ia)),D.setAttributeForCell(ka,ia,null));var Ha=this.editor.graph.getPreferredSizeForCell(ka);H=null!=fa?D.model.getCell(g+ua[fa]):null;
-if(ka.vertex){wa=null!=H?0:Z;ba=null!=H?0:aa;null!=M&&null!=ka.getAttribute(M)&&(ka.geometry.x=wa+parseFloat(ka.getAttribute(M)));null!=O&&null!=ka.getAttribute(O)&&(ka.geometry.y=ba+parseFloat(ka.getAttribute(O)));var Ba="@"==p.charAt(0)?ka.getAttribute(p.substring(1)):null;ka.geometry.width=null!=Ba&&"auto"!=Ba?parseFloat(ka.getAttribute(p.substring(1))):"auto"==p||"auto"==Ba?Ha.width+X:parseFloat(p);var Fa="@"==C.charAt(0)?ka.getAttribute(C.substring(1)):null;ka.geometry.height=null!=Fa&&"auto"!=
-Fa&&"width"!=C?parseFloat(Fa):"auto"==C||"auto"==Fa?Ha.height+X:"width"==C?ka.geometry.width:parseFloat(C);Y+=ka.geometry.height+U}l?(null==B[na]&&(B[na]=[]),B[na].push(ka)):(m.push(ka),null!=H?(H.style=D.replacePlaceholders(H,J,A),D.addCell(ka,H),t.push(H)):v.push(D.addCell(ka)))}for(ca=0;ca<t.length;ca++)Ba="@"==p.charAt(0)?t[ca].getAttribute(p.substring(1)):null,Fa="@"==C.charAt(0)?t[ca].getAttribute(C.substring(1)):null,"auto"!=p&&"auto"!=Ba||"auto"!=C&&"auto"!=Fa||D.updateGroupBounds([t[ca]],
-X,!0);var Pa=v.slice(),Aa=v.slice();for(pa=0;pa<da.length;pa++){var Da=da[pa];for(ca=0;ca<m.length;ca++){ka=m[ca];var Ia=mxUtils.bind(this,function(Sa,db,La){var hb=db.getAttribute(La.from);if(null!=hb&&""!=hb){hb=hb.split(",");for(var ob=0;ob<hb.length;ob++){var Ja=E[La.to][hb[ob]];if(null==Ja&&null!=q){Ja=new mxCell(hb[ob],new mxGeometry(Z,aa,0,0),q);Ja.style=D.replacePlaceholders(db,Ja.style,A);var Wa=this.editor.graph.getPreferredSizeForCell(Ja);Ja.geometry.width=Wa.width+X;Ja.geometry.height=
-Wa.height+X;E[La.to][hb[ob]]=Ja;Ja.vertex=!0;Ja.id=hb[ob];v.push(D.addCell(Ja))}if(null!=Ja){Wa=La.label;null!=La.fromlabel&&(Wa=(db.getAttribute(La.fromlabel)||"")+(Wa||""));null!=La.sourcelabel&&(Wa=D.replacePlaceholders(db,La.sourcelabel,A)+(Wa||""));null!=La.tolabel&&(Wa=(Wa||"")+(Ja.getAttribute(La.tolabel)||""));null!=La.targetlabel&&(Wa=(Wa||"")+D.replacePlaceholders(Ja,La.targetlabel,A));var gb="target"==La.placeholders==!La.invert?Ja:Sa;gb=null!=La.style?D.replacePlaceholders(gb,La.style,
-A):D.createCurrentEdgeStyle();Wa=D.insertEdge(null,null,Wa||"",La.invert?Ja:Sa,La.invert?Sa:Ja,gb);if(null!=La.labels)for(gb=0;gb<La.labels.length;gb++){var ab=La.labels[gb],pb=new mxCell(ab.label||gb,new mxGeometry(null!=ab.x?ab.x:0,null!=ab.y?ab.y:0,0,0),"resizable=0;html=1;");pb.vertex=!0;pb.connectable=!1;pb.geometry.relative=!0;null!=ab.placeholders&&(pb.value=D.replacePlaceholders("target"==ab.placeholders==!La.invert?Ja:Sa,pb.value,A));if(null!=ab.dx||null!=ab.dy)pb.geometry.offset=new mxPoint(null!=
-ab.dx?ab.dx:0,null!=ab.dy?ab.dy:0);Wa.insert(pb)}if(null!=La.data)for(var cb in La.data)D.setAttributeForCell(Wa,cb,La.data[cb]);Aa.push(Wa);mxUtils.remove(La.invert?Sa:Ja,Pa)}}}});Ia(ka,ka,Da);if(null!=B[ka.id])for(ra=0;ra<B[ka.id].length;ra++)Ia(ka,B[ka.id][ra],Da)}}if(null!=la)for(ca=0;ca<m.length;ca++)for(ka=m[ca],ra=0;ra<la.length;ra++)D.setAttributeForCell(ka,mxUtils.trim(la[ra]),null);if(0<v.length){var Oa=new mxParallelEdgeLayout(D);Oa.spacing=Q;Oa.checkOverlap=!0;var Ga=function(){0<Oa.spacing&&
-Oa.execute(D.getDefaultParent());for(var Sa=0;Sa<v.length;Sa++){var db=D.getCellGeometry(v[Sa]);db.x=Math.round(D.snap(db.x));db.y=Math.round(D.snap(db.y));"auto"==p&&(db.width=Math.round(D.snap(db.width)));"auto"==C&&(db.height=Math.round(D.snap(db.height)))}};if("["==ea.charAt(0)){var Ka=W;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(ea)),function(){Ga();Ka()});W=null}else if("circle"==ea){var Xa=new mxCircleLayout(D);Xa.disableEdgeStyle=!1;Xa.resetEdges=!1;var qb=Xa.isVertexIgnored;
-Xa.isVertexIgnored=function(Sa){return qb.apply(this,arguments)||0>mxUtils.indexOf(v,Sa)};this.executeLayout(function(){Xa.execute(D.getDefaultParent());Ga()},!0,W);W=null}else if("horizontaltree"==ea||"verticaltree"==ea||"auto"==ea&&Aa.length==2*v.length-1&&1==Pa.length){D.view.validate();var bb=new mxCompactTreeLayout(D,"horizontaltree"==ea);bb.levelDistance=U;bb.edgeRouting=!1;bb.resetEdges=!1;bb.sortEdges=!0;this.executeLayout(function(){bb.execute(D.getDefaultParent(),0<Pa.length?Pa[0]:null)},
-!0,W);W=null}else if("horizontalflow"==ea||"verticalflow"==ea||"auto"==ea&&1==Pa.length){D.view.validate();var rb=new mxHierarchicalLayout(D,"horizontalflow"==ea?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);rb.intraCellSpacing=U;rb.parallelEdgeSpacing=Q;rb.interRankCellSpacing=V;rb.disableEdgeStyle=!1;this.executeLayout(function(){rb.execute(D.getDefaultParent(),Aa);D.moveCells(Aa,Z,aa)},!0,W);W=null}else if("orgchart"==ea){D.view.validate();var Va=new mxOrgChartLayout(D,2,V,U),fb=Va.isVertexIgnored;
-Va.isVertexIgnored=function(Sa){return fb.apply(this,arguments)||0>mxUtils.indexOf(v,Sa)};this.executeLayout(function(){Va.execute(D.getDefaultParent());Ga()},!0,W);W=null}else if("organic"==ea||"auto"==ea&&Aa.length>v.length){D.view.validate();var $a=new mxFastOrganicLayout(D);$a.forceConstant=3*U;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var jb=$a.isVertexIgnored;$a.isVertexIgnored=function(Sa){return jb.apply(this,arguments)||0>mxUtils.indexOf(v,Sa)};this.executeLayout(function(){$a.execute(D.getDefaultParent());
-Ga()},!0,W);W=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=W&&W()}}catch(Sa){this.handleError(Sa)}};EditorUi.prototype.getSearch=function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",m;for(m in urlParams)0>mxUtils.indexOf(c,m)&&null!=urlParams[m]&&(f+=l+m+"="+urlParams[m],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;
-if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),m;for(m in urlParams)0>mxUtils.indexOf(l,m)&&(c=0==f?c+"?":c+"&",null!=urlParams[m]&&(c+=m+"="+urlParams[m],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,l,m,t){c=new LinkDialog(this,c,f,l,!0,m,t);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&
-"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);
-this.menus.get("viewZoom").setEnabled(f);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!l);this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));
-c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("smartFit").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);this.menus.get("edgeShape").setEnabled(c);this.menus.get("edgeStyle").setEnabled(c);
-this.menus.get("appearance").setEnabled(mxUtils.lightDarkColorSupported)};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var f=
-0;f<c.length;f++)this.libraryLoaded(c[f].file,c[f].images,c[f].title,null!=c[f].div?"none"!=c[f].div.style.display:c[f].expand)};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var c=this.editor.graph,f=this.getCurrentFile(),l=this.getSelectionState(),m=this.isDiagramActive(),t="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&t);this.actions.get("redo").setEnabled(this.canRedo()&&
-t);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("explore").setEnabled(m&&(1==l.edges.length||1==l.vertices.length));this.actions.get("editConnectionPoints").setEnabled(m&&0==l.edges.length&&1==l.vertices.length);this.actions.get("editImage").setEnabled(m&&l.image&&0<l.cells.length);this.actions.get("crop").setEnabled(m&&l.image&&0<l.cells.length);
-this.actions.get("pageSetup").setEnabled(m);this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&m&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);this.actions.get("addToScratchpad").setEnabled(0<l.cells.length);this.actions.get("createShape").setEnabled(m);
-this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=
-this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("none"!=this.diagramContainer.style.display);f.label=mxResources.get("find")+(c.isEnabled()?
-"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var L=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);L.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,m,
-t,v,B,E){var D=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(D.getSvg(m,t,v)),"image/svg+xml");else{var A=c.getFileData(!0,null,null,null,null,!0),S=D.getGraphBounds(),R=Math.floor(S.width*t/D.view.scale),T=Math.floor(S.height*t/D.view.scale);if(A.length<=MAX_REQUEST_SIZE&&R*T<MAX_AREA)if(c.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.editor.isExportToCanvas()){var P=
-{globalVars:D.getExportVariables()};E&&(P.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});c.saveRequest(f,l,function(q,u){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(u||"0")+(null!=q?"&filename="+encodeURIComponent(q):"")+"&extras="+encodeURIComponent(JSON.stringify(P))+(0<B?"&dpi="+B:"")+"&bg="+(null!=m?m:"none")+"&w="+R+"&h="+T+"&border="+v+"&xml="+encodeURIComponent(A))})}else"png"==l?c.exportImage(t,null==m||"none"==m,!0,!1,!1,v,!0,!1,null,E,B):c.exportImage(t,
-!1,!0,!1,!1,v,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var m=c;this.currentPage!=this.pages[l]&&(m=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[l]),m.model.setRoot(this.pages[l].root));f+=this.pages[l].getName()+" "+m.getIndexableText()+" "}else f=c.getIndexableText();
-this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},l=document.createElement("div");l.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(c));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(m);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 v={};try{var B=mxSettings.getCustomLibraries();for(c=0;c<B.length;c++){var E=B[c];if("R"==E.substring(0,1)){var D=JSON.parse(decodeURIComponent(E.substring(1)));v[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(A){}this.remoteInvoke("getCustomLibraries",null,null,function(A){t.innerText="";if(0==A.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var S=0;S<
-A.length;S++){var R=A[S];v[R.id]&&(f[R.id]=R);var T=this.addCheckbox(t,R.title,v[R.id]);(function(P,q){mxEvent.addListener(q,"change",function(){this.checked?f[P.id]=P:delete f[P.id]})})(R,T)}},mxUtils.bind(this,function(A){t.innerText="";var S=document.createElement("div");S.style.padding="8px";S.style.textAlign="center";mxUtils.write(S,mxResources.get("error")+": ");mxUtils.write(S,null!=A&&null!=A.message?A.message:mxResources.get("unknownError"));t.appendChild(S)}));l.appendChild(t);l=new CustomDialog(this,
-l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var A=0,S;for(S in f)null==v[S]&&(A++,mxUtils.bind(this,function(R){this.remoteInvoke("getFileContent",[R.downloadUrl],null,mxUtils.bind(this,function(T){A--;0==A&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,T,R)),this.showSidebar()}catch(P){this.handleError(P,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){A--;0==A&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[S]));
-for(S in v)f[S]||this.closeLibrary(new RemoteLibrary(this,null,v[S]));0==A&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.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(c){this.remoteWin=c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?l.error&&l.error(c.error.errResp):
-l.callback&&l.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,l,m,t){var v=!0,B=window.setTimeout(mxUtils.bind(this,function(){v=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),E=mxUtils.bind(this,function(){window.clearTimeout(B);v&&m.apply(this,arguments)}),D=mxUtils.bind(this,function(){window.clearTimeout(B);v&&t.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;
-this.remoteInvokeCallbacks.push({callback:E,error:D});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var l=mxUtils.bind(this,function(A,S){var R={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=S?R.error={errResp:S}:null!=A&&(R.resp=A);this.remoteWin.postMessage(JSON.stringify(R),"*")});try{var m=c.funtionName,t=
-this.remoteInvokableFns[m];if(null!=t&&"function"===typeof this[m]){if(t.allowedDomains){for(var v=!1,B=0;B<t.allowedDomains.length;B++)if(f=="https://"+t.allowedDomains[B]){v=!0;break}if(!v){l(null,"Invalid Call: "+m+" is not allowed.");return}}var E=c.functionArgs;Array.isArray(E)||(E=[]);if(t.isAsync)E.push(function(){l(Array.prototype.slice.apply(arguments))}),E.push(function(A){l(null,A||"Unkown Error")}),this[m].apply(this,E);else{var D=this[m].apply(this,E);l([D])}}else l(null,"Invalid Call: "+
-m+" is not found.")}catch(A){l(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var m=l.open("database",2);m.onupgradeneeded=function(t){try{var v=m.result;1>t.oldVersion&&v.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&(v.createObjectStore("files",{keyPath:"title"}),v.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
-isLocalStorage)}catch(B){null!=f&&f(B)}};m.onsuccess=mxUtils.bind(this,function(t){try{var v=m.result;this.database=v;EditorUi.migrateStorageFiles&&(StorageFile.migrate(v),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(B){if((!B||"1"==urlParams.forceMigration)&&"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 D=!0,A=!1,S,R=0,T=mxUtils.bind(this,function(){A=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),P=mxUtils.bind(this,function(){R++;q()}),q=mxUtils.bind(this,function(){try{if(R>=S.length)T();else{var J=S[R];StorageFile.getFileContent(this,J,mxUtils.bind(this,
-function(G){null==G||".scratchpad"==J&&G==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[J]}),"*"):P()}),P)}}catch(G){console.log(G)}}),u=mxUtils.bind(this,function(J){try{this.setDatabaseItem(null,[{title:J.title,size:J.data.length,lastModified:Date.now(),type:J.isLib?"L":"F"},{title:J.title,data:J.data}],P,P,["filesInfo","files"])}catch(G){console.log(G)}});B=mxUtils.bind(this,function(J){try{if(J.source==E.contentWindow){var G=
-{};try{G=JSON.parse(J.data)}catch(H){}"init"==G.event?(E.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||A||(D?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(S=G.resp[0],D=!1,q()):T():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?u(G.resp[0]):P())}}catch(H){console.log(H)}});window.addEventListener("message",B)}})));c(v);v.onversionchange=
-function(){v.close()}}catch(B){null!=f?f(B):null!=window.console&&console.warn(B)}});m.onerror=f;m.onblocked=function(){}}catch(t){null!=f?f(t):null!=window.console&&console.error(t)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,l,m,t){this.openDatabase(mxUtils.bind(this,function(v){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c],f=[f]);var B=v.transaction(t,"readwrite");B.oncomplete=l;B.onerror=m;for(v=0;v<t.length;v++)B.objectStore(t[v]).put(null!=
-c&&null!=c[v]?{key:c[v],data:f[v]}:f[v])}catch(E){null!=m&&m(E)}}),m)};EditorUi.prototype.removeDatabaseItem=function(c,f,l,m){this.openDatabase(mxUtils.bind(this,function(t){try{m=m||"objects";Array.isArray(m)||(m=[m],c=[c]);var v=t.transaction(m,"readwrite");v.oncomplete=f;v.onerror=l;for(t=0;t<m.length;t++)v.objectStore(m[t]).delete(c[t])}catch(B){null!=l&&l(B)}}),l)};EditorUi.prototype.getDatabaseItem=function(c,f,l,m){this.openDatabase(mxUtils.bind(this,function(t){try{m=m||"objects";var v=t.transaction([m],
-"readonly").objectStore(m).get(c);v.onsuccess=function(){f(v.result)};v.onerror=l}catch(B){null!=l&&l(B)}}),l)};EditorUi.prototype.getDatabaseItems=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(m){try{l=l||"objects";var t=m.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),v=[];t.onsuccess=function(B){null==B.target.result?c(v):(v.push(B.target.result.value),B.target.result.continue())};t.onerror=f}catch(B){null!=f&&f(B)}}),f)};EditorUi.prototype.getDatabaseItemKeys=
-function(c,f,l){this.openDatabase(mxUtils.bind(this,function(m){try{l=l||"objects";var t=m.transaction([l],"readonly").objectStore(l).getAllKeys();t.onsuccess=function(){c(t.result)};t.onerror=f}catch(v){null!=f&&f(v)}}),f)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=
-function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,f){var l=this.getCurrentFile();null!=l?l.getComments(c,f):c([])};EditorUi.prototype.addComment=function(c,f,l){var m=this.getCurrentFile();null!=m?m.addComment(c,f,l):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=
-c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var l=this.getCurrentFile();return null!=l?l.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var l=this.getCurrentFile();null!=l&&l.getRevisions?l.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=
-function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,l,m,t,v,B,E){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(c,f,l,m,t,v,B,E)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,m,t,v,B,E,D,A,S,R,T,P,q,u){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,m,t,v,B,E,D,A,S,R,T,P,q,u)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
-return this.editor.convertImages(c,f,l,m)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,l,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,l,m)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,l,m,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,l,m,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var l=localStorage.key(f),m=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<m.length){var t=
-"<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(t||m)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,k,n,d,x,z){function y(){for(var u=E.getElementsByTagName("div"),J=0,G=0;G<u.length;G++)"none"!=u[G].style.display&&u[G].parentNode==E&&J++;D.style.display=0==J?"block":"none"}function F(u,J,G,H){function g(){J.removeChild(I);J.removeChild(M);C.style.display="block";p.style.display="block"}t={div:J,comment:u,saveCallback:G,deleteOnCancel:H};var p=J.querySelector(".geCommentTxt"),C=J.querySelector(".geCommentActionsList"),I=document.createElement("textarea");I.className=
-"geCommentEditTxtArea";I.style.minHeight=p.offsetHeight+"px";I.value=u.content;J.insertBefore(I,p);var M=document.createElement("div");M.className="geCommentEditBtns";var O=mxUtils.button(mxResources.get("cancel"),function(){H?(J.parentNode.removeChild(J),y()):g();t=null});O.className="geCommentEditBtn";M.appendChild(O);var Q=mxUtils.button(mxResources.get("save"),function(){p.innerText="";u.content=I.value;mxUtils.write(p,u.content);g();G(u);t=null});mxEvent.addListener(I,"keydown",mxUtils.bind(this,
-function(U){mxEvent.isConsumed(U)||((mxEvent.isControlDown(U)||mxClient.IS_MAC&&mxEvent.isMetaDown(U))&&13==U.keyCode?(Q.click(),mxEvent.consume(U)):27==U.keyCode&&(O.click(),mxEvent.consume(U)))}));Q.focus();Q.className="geCommentEditBtn gePrimaryBtn";M.appendChild(Q);J.insertBefore(M,p);C.style.display="none";p.style.display="none";I.focus()}function N(u,J){J.innerText="";u=new Date(u.modifiedDate);var G=b.timeSince(u);null==G&&(G=mxResources.get("lessThanAMinute"));mxUtils.write(J,mxResources.get("timeAgo",
-[G],"{1} ago"));J.setAttribute("title",u.toLocaleDateString()+" "+u.toLocaleTimeString())}function K(u){var J=document.createElement("img");J.className="geCommentBusyImg";J.src=IMAGE_PATH+"/spin.gif";u.appendChild(J);u.busyImg=J}function L(u){u.style.border="1px solid red";u.busyImg.parentNode==u&&u.removeChild(u.busyImg)}function c(u){u.style.border="";u.busyImg.parentNode==u&&u.removeChild(u.busyImg)}function f(u,J,G,H,g){function p(X,W,Y){var Z=document.createElement("li");Z.className="geCommentAction";
-var aa=document.createElement("a");aa.className="geCommentActionLnk";mxUtils.write(aa,X);Z.appendChild(aa);mxEvent.addListener(aa,"click",function(ha){W(ha,u);ha.preventDefault();mxEvent.consume(ha)});V.appendChild(Z);Y&&(Z.style.display="none")}function C(){function X(Z){W.push(Y);if(null!=Z.replies)for(var aa=0;aa<Z.replies.length;aa++)Y=Y.nextSibling,X(Z.replies[aa])}var W=[],Y=M;X(u);return{pdiv:Y,replies:W}}function I(X,W,Y,Z,aa){function ha(){K(la);u.addReply(ia,function(ba){ia.id=ba;u.replies.push(ia);
-c(la);Y&&Y()},function(ba){ea();L(la);b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,aa)}function ea(){F(ia,la,function(ba){ha()},!0)}var da=C().pdiv,ia=b.newComment(X,b.getCurrentUser());ia.pCommentId=u.id;null==u.replies&&(u.replies=[]);var la=f(ia,u.replies,da,H+1);W?ea():ha()}if(g||!u.isResolved){D.style.display="none";var M=document.createElement("div");M.className="geCommentContainer";M.setAttribute("data-commentId",u.id);M.style.marginLeft=20*H+
-5+"px";u.isResolved&&(v.style.opacity="0.7");var O=document.createElement("div");O.className="geCommentHeader";var Q=document.createElement("img");Q.className="geCommentUserImg";Q.src=null!=u.user&&null!=u.user.pictureUrl?u.user.pictureUrl:Editor.userImage;O.appendChild(Q);Q=document.createElement("div");Q.className="geCommentHeaderTxt";O.appendChild(Q);var U=document.createElement("div");U.className="geCommentUsername";mxUtils.write(U,null!=u.user?u.user.displayName:mxResources.get("unknownUser"));
-Q.appendChild(U);U=document.createElement("div");U.className="geCommentDate";U.setAttribute("data-commentId",u.id);N(u,U);Q.appendChild(U);M.appendChild(O);O=document.createElement("div");O.className="geCommentTxt";mxUtils.write(O,u.content||"");M.appendChild(O);u.isLocked&&(M.style.opacity="0.5");O=document.createElement("div");O.className="geCommentActions";var V=document.createElement("ul");V.className="geCommentActionsList";O.appendChild(V);l||u.isLocked||0!=H&&!m||p(mxResources.get("reply"),
-function(){I("",!0)},u.isResolved);Q=b.getCurrentUser();null==Q||null==u.user||Q.id!=u.user.id||l||u.isLocked||(p(mxResources.get("edit"),function(){function X(){F(u,M,function(){K(M);u.editComment(u.content,function(){c(M)},function(W){L(M);X();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}X()},u.isResolved),p(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){K(M);u.deleteComment(function(X){if(!0===X){X=M.querySelector(".geCommentTxt");
-X.innerText="";mxUtils.write(X,mxResources.get("msgDeleted"));var W=M.querySelectorAll(".geCommentAction");for(X=0;X<W.length;X++)W[X].parentNode.removeChild(W[X]);c(M);M.style.opacity="0.5"}else{W=C(u).replies;for(X=0;X<W.length;X++)E.removeChild(W[X]);for(X=0;X<J.length;X++)if(J[X]==u){J.splice(X,1);break}D.style.display=0==E.getElementsByTagName("div").length?"block":"none"}},function(X){L(M);b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},u.isResolved));
-l||u.isLocked||0!=H||p(u.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(X){function W(){var Y=X.target;Y.innerText="";u.isResolved=!u.isResolved;mxUtils.write(Y,u.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=u.isResolved?"none":"",aa=C(u).replies,ha="light-dark("+(u.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<aa.length;ea++){aa[ea].style.backgroundColor=ha;for(var da=aa[ea].querySelectorAll(".geCommentAction"),ia=0;ia<da.length;ia++)da[ia]!=
-Y.parentNode&&(da[ia].style.display=Z);T||(aa[ea].style.display="none")}y()}u.isResolved?I(mxResources.get("reOpened")+": ",!0,W,!1,!0):I(mxResources.get("markedAsResolved"),!1,W,!0)});M.appendChild(O);null!=G?E.insertBefore(M,G.nextSibling):E.appendChild(M);for(G=0;null!=u.replies&&G<u.replies.length;G++)O=u.replies[G],O.isResolved=u.isResolved,f(O,u.replies,null,H+1,g);null!=t&&(t.comment.id==u.id?(g=u.content,u.content=t.comment.content,F(u,M,t.saveCallback,t.deleteOnCancel),u.content=g):null==
-t.comment.id&&t.comment.pCommentId==u.id&&(E.appendChild(t.div),F(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return M}}var l=!b.canComment(),m=b.canReplyToReplies(),t=null,v=document.createElement("div");v.className="geCommentsWin";var B=EditorUi.compactUi?"26px":"30px",E=document.createElement("div");E.className="geCommentsList";E.style.bottom=parseInt(B)+7+"px";v.appendChild(E);var D=document.createElement("span");D.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(D,
-mxResources.get("noCommentsFound"));var A=document.createElement("div");A.className="geToolbarContainer geCommentsToolbar";A.style.height=B;A.style.padding="3px 4px 4px 4px";B=document.createElement("a");B.className="geButton";if(!l){var S=B.cloneNode();S.style.backgroundImage="url("+Editor.plusImage+")";S.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(S,"click",function(u){function J(){F(G,H,function(g){K(H);b.addComment(g,function(p){g.id=p;P.push(g);c(H)},function(p){L(H);
-J();b.handleError(p,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var G=b.newComment("",b.getCurrentUser()),H=f(G,P,null,0);J();u.preventDefault();mxEvent.consume(u)});A.appendChild(S)}var R=B.cloneNode();R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var T=!1;mxEvent.addListener(R,"click",function(u){(T=!T)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");q();u.preventDefault();mxEvent.consume(u)});
-A.appendChild(R);b.commentsRefreshNeeded()&&(S=B.cloneNode(),S.style.backgroundImage="url("+Editor.refreshImage+")",S.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(S,"click",function(u){q();u.preventDefault();mxEvent.consume(u)}),A.appendChild(S));b.commentsSaveNeeded()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),B.className="geButton geAdaptiveAsset",mxEvent.addListener(B,
-"click",function(u){z();u.preventDefault();mxEvent.consume(u)}),A.appendChild(B));v.appendChild(A);var P=[],q=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var u=t.div.querySelector(".geCommentEditTxtArea"),J=t.div.querySelector(".geCommentEditBtns");t.comment.content=u.value;u.parentNode.removeChild(u);J.parentNode.removeChild(J)}catch(G){b.handleError(G)}E.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+
-mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";m=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(G){function H(g){if(null!=g){g.sort(function(C,I){return new Date(C.modifiedDate)-new Date(I.modifiedDate)});for(var p=0;p<g.length;p++)H(g[p].replies)}}G.sort(function(g,p){return new Date(g.modifiedDate)-new Date(p.modifiedDate)});E.innerText="";E.appendChild(D);D.style.display="block";P=G;for(G=0;G<P.length;G++)H(P[G].replies),f(P[G],P,null,0,T);null!=t&&null==t.comment.id&&
-null==t.comment.pCommentId&&(E.appendChild(t.div),F(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(G){E.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(G&&G.message?": "+G.message:""));this.hasError=!0})):E.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});q();this.refreshComments=q;A=mxUtils.bind(this,function(){function u(p){var C=G[p.id];if(null!=C)for(N(p,C),C=0;null!=p.replies&&C<p.replies.length;C++)u(p.replies[C])}if(this.window.isVisible()){for(var J=
-E.querySelectorAll(".geCommentDate"),G={},H=0;H<J.length;H++){var g=J[H];G[g.getAttribute("data-commentId")]=g}for(H=0;H<P.length;H++)u(P[H])}});setInterval(A,6E4);this.refreshCommentsTime=A;this.window=new mxWindow(mxResources.get("comments"),v,k,n,d,x,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,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,k,n,d,x,z,y,F,N,K,L){var c=document.createElement("div");c.style.textAlign="center";L=null!=L?L:44;var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight=L+"px";f.style.lineHeight="1.2em";mxUtils.write(f,k);c.appendChild(f);null!=K&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",k=document.createElement("img"),k.setAttribute("src",K),f.appendChild(k),
-c.appendChild(f));K=document.createElement("div");K.style.textAlign="center";K.style.whiteSpace="nowrap";var l=document.createElement("input");l.setAttribute("type","checkbox");z=mxUtils.button(z||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(l.checked)});z.className="geBtn";null!=F&&(z.innerHTML=F+"<br>"+z.innerHTML,z.style.display="inline-block",z.style.paddingBottom="8px",z.style.paddingTop="8px",z.style.height="auto",z.style.width="40%");b.editor.cancelFirst&&K.appendChild(z);
-var m=mxUtils.button(x||mxResources.get("ok"),function(){b.hideDialog();null!=n&&n(l.checked)});K.appendChild(m);null!=y?(m.innerHTML=y+"<br>"+m.innerHTML+"<br>",m.style.display="inline-block",m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.className="geBtn",m.style.width="40%"):m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||K.appendChild(z);c.appendChild(K);N?(K.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.style.marginBottom=
-"0px",f.appendChild(l),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),f.appendChild(x),c.appendChild(f),mxEvent.addListener(x,"click",function(t){l.checked=!l.checked;mxEvent.consume(t)})):K.style.marginTop="12px";this.init=function(){m.focus()};this.container=c},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};
+":");var x="#0000ff",y=null;y=mxUtils.button("",mxUtils.bind(this,function(F){this.pickColor(x||"none",function(E){x=E;k()});mxEvent.consume(F)}));k();y.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";y.style.marginLeft="4px";y.style.height="22px";y.style.width="22px";y.style.position="relative";y.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";y.className="geColorBtn";c.appendChild(y);mxUtils.br(c);return{getColor:function(){return x},getTarget:function(){return m.value},
+focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,k,m,t,x){x=null!=x?x:[];k&&(x.push("lightbox=1"),"auto"!=c&&x.push("target="+c),null!=f&&f!=mxConstants.NONE&&x.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=m&&0<m.length&&x.push("edit="+encodeURIComponent(m)),t&&x.push("layers=1"),this.editor.graph.foldingEnabled&&x.push("nav=1"));return x};EditorUi.prototype.createLink=function(c,f,k,m,t,x,y,F,E,C,S,U,Q){var O=this.getCurrentFile();E=this.createUrlParameters(c,
+f,m,t,x,E);c=!0;null!=y?k="#U"+encodeURIComponent(y):F||null==O||""==O.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+O.getHash(),c=!1);c&&null!=O&&null!=O.getTitle()&&O.getTitle()!=this.defaultFilename&&E.push("title="+encodeURIComponent(O.getTitle()));C&&1<k.length&&(E.push("open="+k.substring(1)),k="");S&&null!=this.currentPage&&E.push("page-id="+this.currentPage.getId());U&&E.push("transparent=1");
+null!=Q&&E.push("dark="+Q);return(m&&(null!=y||null!=O&&O.getMode()!=App.MODE_GITHUB&&O.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<E.length?"?"+E.join("&"):"")+k};EditorUi.prototype.createHtml=function(c,f,k,m,t,x,y,F,E,C,S,U,Q){this.getBasenames();var O={};""!=t&&t!=mxConstants.NONE&&(O.highlight=t);"auto"!==m&&(O.target=m);C||(O.lightbox=
+!1);O.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(O.zoom=k/100);k=[];y&&(k.push("pages"),O.resize=!0,null!=this.pages&&null!=this.currentPage&&(O.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(k.push("zoom"),O.resize=!0);F&&k.push("layers");E&&k.push("tags");null!=Q&&(O["dark-mode"]=Q);0<k.length&&(C&&k.push("lightbox"),O.toolbar=k.join(" "));null!=S&&0<S.length&&(O.edit=S);null!=c?O.url=c:O.xml=this.getFileData(!0,null,null,null,null,!y);f='<div class="mxgraph" style="'+
+(x?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(O))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";U(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"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(c,f,k,m){var t=document.createElement("div");t.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("html"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";t.appendChild(x);var y=document.createElement("div");y.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var F=document.createElement("input");F.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
+F.setAttribute("value","url");F.setAttribute("type","radio");F.setAttribute("name","type-embedhtmldialog");x=F.cloneNode(!0);x.setAttribute("value","copy");y.appendChild(x);var E=document.createElement("span");mxUtils.write(E,mxResources.get("includeCopyOfMyDiagram"));y.appendChild(E);mxUtils.br(y);y.appendChild(F);E=document.createElement("span");mxUtils.write(E,mxResources.get("publicDiagramUrl"));y.appendChild(E);var C=this.getCurrentFile();null==k&&null!=C&&C.constructor==window.DriveFile&&(E=
+document.createElement("a"),E.style.paddingLeft="12px",E.style.color="gray",E.style.cursor="pointer",mxUtils.write(E,mxResources.get("share")),y.appendChild(E),mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(C.getId(),C)})));x.setAttribute("checked","checked");null==k&&F.setAttribute("disabled","disabled");t.appendChild(y);y=380;var S=this.addLinkSection(t),U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";
+U.style.marginTop="16px";E=document.createElement("option");E.setAttribute("value","light");mxUtils.write(E,mxResources.get("light"));U.appendChild(E);E=document.createElement("option");E.setAttribute("value","dark");mxUtils.write(E,mxResources.get("dark"));U.appendChild(E);E=document.createElement("option");E.setAttribute("value","auto");mxUtils.write(E,mxResources.get("automatic"));E.setAttribute("selected","selected");U.appendChild(E);E.setAttribute("selected","selected");mxUtils.write(t,mxResources.get("appearance")+
+":");t.appendChild(U);mxUtils.br(t);y+=26;var Q=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value="100%";t.appendChild(O);var q=this.addCheckbox(t,mxResources.get("fit"),!0);E=null!=this.pages&&1<this.pages.length;var u=u=this.addCheckbox(t,mxResources.get("allPages"),E,!E),I=this.addCheckbox(t,mxResources.get("layers"),
+!0),G=this.addCheckbox(t,mxResources.get("tags"),!0),H=this.addCheckbox(t,mxResources.get("lightbox"),!0),g=null;if(EditorUi.enableHtmlEditOption){g=this.addEditButton(t,H);var p=g.getEditInput();p.style.marginBottom="16px";y+=50;mxEvent.addListener(H,"change",function(){H.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");p.checked&&H.checked?g.getEditSelect().removeAttribute("disabled"):g.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,t,mxUtils.bind(this,
+function(){m(F.checked?k:null,Q.checked,O.value,S.getTarget(),S.getColor(),q.checked,u.checked,I.checked,G.checked,H.checked,null!=g?g.getLink():null,null!=U?U.value:null)}),null,c,f);this.showDialog(c.container,340,y,!0,!0);x.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,k,m,t,x,y,F,E,C,S,U){var Q=document.createElement("div");Q.style.whiteSpace="nowrap";var O=document.createElement("h3");mxUtils.write(O,c||mxResources.get("publish"));O.style.width="100%";O.style.textAlign="center";
+O.style.marginTop="2px";O.style.marginBottom="20px";Q.appendChild(O);var q=document.createElement("select");c=30;q.className="geBtn";q.style.marginBottom="8px";q.style.marginLeft="0px";q.style.width="100%";q.style.boxSizing="border-box";if(null==F||""==F.getHash())t=null!=t?t:"https://www.drawio.com/doc/faq/publish-diagram-as-link",O=document.createElement("option"),mxUtils.write(O,mxResources.get("makeCopy")),O.setAttribute("value","copy"),q.appendChild(O);O=document.createElement("option");mxUtils.write(O,
+mxResources.get("authorizationRequired"));O.setAttribute("value","auth");q.appendChild(O);null!=F&&""!=F.getHash()||O.setAttribute("disabled","disabled");F=document.createElement("option");F.setAttribute("value","public");q.appendChild(F);null!=y?(mxUtils.write(F,mxResources.get("publicDiagramUrl")),F.setAttribute("title",y),q.value="public"):(mxUtils.write(F,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),F.setAttribute("disabled","disabled"));Q.appendChild(q);
+mxUtils.br(Q);q.focus();var u=null,I=null;if(null!=f||null!=k)c+=30,mxUtils.write(Q,mxResources.get("width")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.marginRight="16px",u.style.width="50px",u.style.marginLeft="6px",u.style.marginRight="16px",u.style.marginBottom="10px",u.value="100%",Q.appendChild(u),mxUtils.write(Q,mxResources.get("height")+":"),I=document.createElement("input"),I.setAttribute("type","text"),I.style.width="50px",I.style.marginLeft="6px",I.style.marginBottom=
+"10px",I.value=k+"px",Q.appendChild(I),mxUtils.br(Q);var G=this.addLinkSection(Q,m),H=C?this.addCheckbox(Q,mxResources.get("transparentBackground"),!1):null;null!=H&&(c+=20);var g=document.createElement("select");g.className="geBtn";g.style.marginTop="8px";f=document.createElement("option");mxUtils.write(f,mxResources.get("allPages"));f.setAttribute("value","allPages");g.appendChild(f);f=document.createElement("option");mxUtils.write(f,mxResources.get("currentPage"));f.setAttribute("value","currentPage");
+g.appendChild(f);var p=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),U&&(mxUtils.write(Q,mxResources.get("pages")+":"),Q.appendChild(g),mxUtils.br(Q),c+=30),p=this.addCheckbox(Q,mxResources.get("selectedPage")+": "+f));var B=document.createElement("select");B.style.maxWidth="260px";B.style.marginLeft="8px";B.style.marginTop="16px";U=document.createElement("option");
+U.setAttribute("value","0");mxUtils.write(U,mxResources.get("light"));B.appendChild(U);U=document.createElement("option");U.setAttribute("value","1");mxUtils.write(U,mxResources.get("dark"));B.appendChild(U);U=document.createElement("option");U.setAttribute("value","auto");mxUtils.write(U,mxResources.get("automatic"));U.setAttribute("selected","selected");B.appendChild(U);S&&(mxUtils.write(Q,mxResources.get("appearance")+":"),Q.appendChild(B),mxUtils.br(Q),c+=30);var K=this.addCheckbox(Q,mxResources.get("lightbox"),
+!0,null,null,!m),M=this.addEditButton(Q,K),N=M.getEditInput();m&&(N.style.marginLeft=K.style.marginLeft,K.style.display="none",c-=20);var R=this.addCheckbox(Q,mxResources.get("layers"),!0);R.style.marginLeft=N.style.marginLeft;R.style.marginTop="8px";var T=this.addCheckbox(Q,mxResources.get("tags"),!0);T.style.marginLeft=N.style.marginLeft;T.style.marginBottom="16px";T.style.marginTop="16px";mxEvent.addListener(K,"change",function(){K.checked?(R.removeAttribute("disabled"),N.removeAttribute("disabled"),
+T.removeAttribute("disabled")):(R.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));N.checked&&K.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});m=new CustomDialog(this,Q,mxUtils.bind(this,function(){E(G.getTarget(),G.getColor(),null==p?!1:p.checked,K.checked,M.getLink(),R.checked,null!=u?u.value:null,null!=I?I.value:null,T.checked,q.value,null!=H?H.checked:!1,B.value,"allPages"==
+g.value)}),null,mxResources.get("create"),t,x);this.showDialog(m.container,340,296+c,!0,!0);null!=u?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)):null==q.parentNode;G.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,k,m,t){var x=document.createElement("div");x.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,mxResources.get("image"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
+(t?"10":"4")+"px";x.appendChild(y);if(t){mxUtils.write(x,mxResources.get("zoom")+":");var F=document.createElement("input");F.setAttribute("type","text");F.style.marginRight="16px";F.style.width="60px";F.style.marginLeft="4px";F.style.marginRight="12px";F.value=this.lastExportZoom||"100%";x.appendChild(F);mxUtils.write(x,mxResources.get("borderWidth")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.value=
+this.lastExportBorder||"0";x.appendChild(E);mxUtils.br(x)}var C=this.addCheckbox(x,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),S=m?null:this.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);y=this.editor.graph;var U=m?null:this.addCheckbox(x,mxResources.get("transparentBackground"),y.background==mxConstants.NONE||null==y.background);null!=U&&(U.style.marginBottom="16px");c=new CustomDialog(this,x,mxUtils.bind(this,function(){var Q=
+parseInt(F.value)/100||1,O=parseInt(E.value)||0;k(!C.checked,null!=S?S.checked:!1,null!=U?U.checked:!1,Q,O)}),null,c,f);this.showDialog(c.container,300,(t?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,k,m,t,x,y,F,E){y=null!=y?y:Editor.defaultIncludeDiagram;var C=document.createElement("div");C.style.whiteSpace="nowrap";var S=this.editor.graph,U="jpeg"==F||"webp"==F?220:320,Q=document.createElement("h3");mxUtils.write(Q,c);Q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+C.appendChild(Q);mxUtils.write(C,mxResources.get("zoom")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value=this.lastExportZoom||"100%";C.appendChild(O);mxUtils.write(C,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||
+"0";C.appendChild(q);mxUtils.br(C);var u=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,S.isSelectionEmpty()),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.style.marginLeft="24px";I.setAttribute("disabled","disabled");I.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(Q=0;Q<c.length;Q++)if(!S.isSelectionEmpty()||"selectionOnly"!=c[Q]){var H=
+document.createElement("option");mxUtils.write(H,mxResources.get(c[Q]));H.setAttribute("value",c[Q]);G.appendChild(H)}E?(mxUtils.write(C,mxResources.get("size")+":"),C.appendChild(G),mxUtils.br(C),U+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(u.checked=!0)})):x&&(C.appendChild(I),mxUtils.write(C,mxResources.get("crop")),mxUtils.br(C),U+=30,mxEvent.addListener(u,"change",function(){u.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));S.isSelectionEmpty()?
+E&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",U-=30):(G.value="diagram",I.setAttribute("checked","checked"),I.defaultChecked=!0,mxEvent.addListener(u,"change",function(){G.value=u.checked?"selectionOnly":"diagram"}));var g=this.addCheckbox(C,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=F&&"webp"!=F),p=document.createElement("select");p.style.maxWidth="260px";p.style.marginLeft="8px";p.style.marginTop="16px";x=document.createElement("option");
+x.setAttribute("value","light");mxUtils.write(x,mxResources.get("light"));p.appendChild(x);E=document.createElement("option");E.setAttribute("value","dark");mxUtils.write(E,mxResources.get("dark"));p.appendChild(E);"svg"==F&&mxUtils.lightDarkColorSupported?(x=document.createElement("option"),x.setAttribute("value","auto"),mxUtils.write(x,mxResources.get("automatic")),x.setAttribute("selected","selected"),p.appendChild(x)):Editor.isDarkMode()?E.setAttribute("selected","selected"):x.setAttribute("selected",
+"selected");mxUtils.write(C,mxResources.get("appearance")+":");C.appendChild(p);mxUtils.br(C);U+=26;var B=this.addCheckbox(C,mxResources.get("shadow"),S.shadowVisible),K=null;if("png"==F||"jpeg"==F||"webp"==F)K=this.addCheckbox(C,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),U+=30;S=null!=this.pages?this.pages.length:1;var M=this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram")+(1<S?":":""),y,null,null,"jpeg"!=F&&"webp"!=F),N=document.createElement("select");N.style.maxWidth=
+"260px";N.style.marginLeft="28px";"png"==F||"svg"==F?(y=function(){M.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")},x=document.createElement("option"),x.setAttribute("value","allPages"),mxUtils.write(x,mxResources.get("allPages")),N.appendChild(x),x=document.createElement("option"),x.setAttribute("value","currentPage"),mxUtils.write(x,mxResources.get("currentPage")),N.appendChild(x),1<S?(M.style.marginBottom="12px",N.style.marginBottom="16px",C.appendChild(N),mxUtils.br(C),
+U+=20):M.style.marginBottom="16px",null!=this.lastEmbedInclude&&(N.value=this.lastEmbedInclude),mxEvent.addListener(M,"change",y),y()):M.style.marginBottom="16px";var R=document.createElement("input");R.style.marginBottom="16px";R.style.marginRight="8px";R.setAttribute("type","checkbox");R.id="geCheckbox-"+Editor.guid();var T=document.createElement("input");T.style.marginBottom="16px";T.style.marginRight="8px";T.setAttribute("type","checkbox");T.id="geCheckbox-"+Editor.guid();f&&(R.checked=null!=
+this.lastEmbedImages?this.lastEmbedImages:!0,C.appendChild(R),y=document.createElement("label"),mxUtils.write(y,mxResources.get("embedImages")),y.setAttribute("for",R.id),C.appendChild(y),mxUtils.br(C),T.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,C.appendChild(T),y=document.createElement("label"),mxUtils.write(y,mxResources.get("embedFonts")),y.setAttribute("for",T.id),C.appendChild(y),mxUtils.br(C),U+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft=
+"8px";x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));V.appendChild(x);y=document.createElement("option");y.setAttribute("value","blank");mxUtils.write(y,mxResources.get("openInNewWindow"));V.appendChild(y);y=document.createElement("option");y.setAttribute("value","self");mxUtils.write(y,mxResources.get("openInThisWindow"));V.appendChild(y);y=document.createElement("div");mxUtils.write(y,mxResources.get("LinksLost"));y.style.margin="7px";
+y.style.display="none";"svg"==F&&(mxUtils.write(C,mxResources.get("links")+":"),C.appendChild(V),C.appendChild(y),mxUtils.br(C),mxUtils.br(C),U+=50);k=new CustomDialog(this,C,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=O.value;this.lastEmbedImages=R.checked;this.lastEmbedFonts=T.checked;this.lastEmbedInclude=N.value;t(O.value,g.checked,!u.checked,B.checked,M.checked,R.checked&&f,q.value,I.checked,("png"==F||"svg"==F)&&"currentPage"==N.value,V.value,null!=K?K.checked:
+null,null!=p?p.value:null,G.value,T.checked)}),null,k,m);this.showDialog(k.container,340,U,!0,!0,null,null,null,null,!0);O.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,k,m,t){var x=document.createElement("div");x.style.whiteSpace="nowrap";var y=this.editor.graph;if(null!=f){var F=document.createElement("h3");mxUtils.write(F,f);F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+x.appendChild(F)}var E=this.addCheckbox(x,mxResources.get("fit"),!0),C=this.addCheckbox(x,mxResources.get("shadow"),y.shadowVisible&&m,!m),S=this.addCheckbox(x,k),U=this.addCheckbox(x,mxResources.get("lightbox"),!0),Q=this.addEditButton(x,U),O=Q.getEditInput(),q=1<y.model.getChildCount(y.model.getRoot()),u=this.addCheckbox(x,mxResources.get("layers"),q,!q);u.style.marginLeft=O.style.marginLeft;u.style.marginBottom="12px";u.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?
+(q&&u.removeAttribute("disabled"),O.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));O.checked&&U.checked?Q.getEditSelect().removeAttribute("disabled"):Q.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,x,mxUtils.bind(this,function(){c(E.checked,C.checked,S.checked,U.checked,Q.getLink(),u.checked)}),null,mxResources.get("embed"),t);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(c,f,k,m,t,x,y,F){function E(O){var q=" ",u="";m&&(q=" 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!=S?"&page="+S:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}})(this);\"",u+=
+"cursor:pointer;");c&&(u+="max-width:100%;");var I="";k&&(I=' width="'+Math.round(C.width)+'" height="'+Math.round(C.height)+'"');y('<img src="'+O+'"'+I+(""!=u?' style="'+u+'"':"")+q+"/>")}var C=this.editor.graph.getGraphBounds(),S=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(O){var q=m?this.getFileData(!0):null;O=this.createImageDataUri(O,q,"png");E(O)}),null,null,null,mxUtils.bind(this,function(O){F({message:mxResources.get("unknownError")})}),
+null,!0,k?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),C.width*C.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var U="";k&&(U="&w="+Math.round(2*C.width)+"&h="+Math.round(2*C.height));var Q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+U+"&xml="+encodeURIComponent(f));Q.send(mxUtils.bind(this,function(){200<=Q.getStatus()&&299>=Q.getStatus()?E("data:image/png;base64,"+Q.getText()):F({message:mxResources.get("unknownError")})}))}else F({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(c,f,k,m,t,x,y){var F=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),E=F.getElementsByTagName("a");if(null!=E)for(var C=0;C<E.length;C++){var S=E[C].getAttribute("href");null!=S&&"#"==S.charAt(0)&&"_blank"==E[C].getAttribute("target")&&E[C].removeAttribute("target")}m&&F.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(F);if(k){var U=" ",Q="";m&&(U="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":"")+(x?"&layers=1":"")+"');}})(this);\"",Q+="cursor:pointer;");c&&(Q+="max-width:100%;");this.editor.convertImages(F,mxUtils.bind(this,function(O){y('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(O))+'"'+(""!=Q?' style="'+Q+'"':"")+U+"/>")}))}else Q="",m&&(f=this.getSelectedPageIndex(),F.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!=f?"&page="+f:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}}})(this);"),Q+="cursor:pointer;"),c&&(c=parseInt(F.getAttribute("width")),t=parseInt(F.getAttribute("height")),F.setAttribute("viewBox","-0.5 -0.5 "+c+" "+t),Q+="max-width:100%;max-height:"+t+"px;",F.removeAttribute("height")),""!=Q&&F.setAttribute("style",Q),this.editor.addFontCss(F),this.editor.graph.mathEnabled&&this.editor.addMathCss(F),y(mxUtils.getXml(F))};EditorUi.prototype.timeSince=function(c){c=
+Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var k=null;if("diagram"==c.nodeName)k=
+c;else if("mxfile"==c.nodeName){var m=c.getElementsByTagName("diagram");if(0<m.length){k=m[0];var t=f.getGlobalVariable;f.getGlobalVariable=function(x){return"page"==x?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==x?1:t.apply(this,arguments)}}}null!=k&&(c=Editor.parseDiagramNode(k))}m=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(x){}finally{this.editor.graph=m}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};
+EditorUi.prototype.getPngFileProperties=function(c){var f=1,k=0;if(null!=c){if(c.hasAttribute("scale")){var m=parseFloat(c.getAttribute("scale"));!isNaN(m)&&0<m&&(f=m)}c.hasAttribute("border")&&(m=parseInt(c.getAttribute("border")),!isNaN(m)&&0<m&&(k=m))}return{scale:f,border:k}};EditorUi.prototype.getEmbeddedPng=function(c,f,k,m,t){try{var x=this.editor.graph,y=null;if(null!=k&&0<k.length)x=this.createTemporaryGraph(x.getStylesheet()),document.body.appendChild(x.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
+!0),x),y=k;else if(null!=this.pages&&this.currentPage!=this.pages[0]){x=this.createTemporaryGraph(x.getStylesheet());var F=x.getGlobalVariable;x.setBackgroundImage=this.editor.graph.setBackgroundImage;var E=this.pages[0];this.currentPage==E?x.setBackgroundImage(this.editor.graph.backgroundImage):null!=E.viewState&&null!=E.viewState&&x.setBackgroundImage(E.viewState.backgroundImage);x.getGlobalVariable=function(C){return"page"==C?E.getName():"pagenumber"==C?1:F.apply(this,arguments)};document.body.appendChild(x.container);
+x.model.setRoot(E.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(C){try{null==y&&(y=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var S=C.toDataURL("image/png");S=Editor.writeGraphModelToPng(S,"tEXt","mxfile",encodeURIComponent(y));c(S.substring(S.lastIndexOf(",")+1));x!=this.editor.graph&&x.container.parentNode.removeChild(x.container)}catch(U){null!=f&&f(U)}}),null,null,null,mxUtils.bind(this,function(C){null!=f&&f(C)}),null,null,m,null,x.shadowVisible,null,x,t,null,
+null,null,"diagram",null)}catch(C){null!=f&&f(C)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,k,m,t,x,y,F,E,C,S,U,Q){F=null!=F?F:!0;S=null!=S?S:0;y=null!=E?E:f.background;y==mxConstants.NONE&&(y=null);null==y&&"none"==f.getAdaptiveColors()&&(y="#ffffff");E=this.editor.graph.createSvgImageExport(null!=c);x=f.getSvg(y,C,S,null,null,x,null,E,null,f.shadowVisible||U,null,Q,"diagram");(f.shadowVisible||U)&&f.addSvgShadow(x,null,null,0==S);null!=c&&x.setAttribute("content",c);null!=k&&x.setAttribute("resource",
+k);var O=mxUtils.bind(this,function(q){q=(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(q);null!=t&&t(q);return q});f.mathEnabled&&this.editor.addMathCss(x);if(null!=t)this.embedFonts(x,mxUtils.bind(this,function(q){F?this.editor.convertImages(q,mxUtils.bind(this,function(u){O(u)})):O(q)}));else return O(x)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(c,k),f(c)}catch(m){f(c)}}))}catch(k){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,k,m,t,x,y,F,E,C,S,U,Q){E=null!=E?E:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(q){Editor.addRetryToError(q,mxUtils.bind(this,function(){this.exportImage(c,f,k,m,t,x,y,F,E,C,S,U,Q)}));this.handleError(q)}))){var O=this.editor.graph.isSelectionEmpty();
+k=null!=k?k:O;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(q){this.spinner.stop();try{this.saveCanvas(q,t?this.getFileData(!0,null,null,null,k,F,null,null,null,null,null,c,x):null,E,null==this.pages||0==this.pages.length,S)}catch(u){this.handleError(u)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,k,c||1,f,m,null,null,x,y,C,U,Q)}catch(q){this.spinner.stop(),this.handleError(q)}}};
+EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,k,m,t,x,y){f=null!=f?f:0;k=null!=k?k:0;var F=[];try{var E=this.editor.graph;if(null!=c&&0<c.length){E.model.beginUpdate();try{var C=mxUtils.parseXml(c);c={};var S=this.editor.extractGraphModel(C.documentElement,
+null!=this.pages);if(null!=S&&"mxfile"==S.nodeName&&null!=this.pages){var U=S.getElementsByTagName("diagram");if(1==U.length&&!x){if(S=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(c[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Q=U[0].getAttribute("name");null!=Q&&""!=Q&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,Q))}}else if(0<U.length){x=[];var O=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[U[0].getAttribute("id")]=
+this.pages[0].getId(),Q=U[0].getAttribute("name"),null!=Q&&""!=Q&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],Q)),S=Editor.parseDiagramNode(U[0]),m=!1,O=1);for(;O<U.length;O++){var q=U[O].getAttribute("id");U[O].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(U[O]));c[q]=U[O].getAttribute("id");var I=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[I+1]));E.model.execute(new ChangePage(this,u,u,I,!0));x.push(u)}this.updatePageLinks(c,
+x)}}if(null!=S&&"mxGraphModel"===S.nodeName){F=E.importGraphModel(S,f,k,m);if(null!=F)for(this.addLocalPagesToMapping(c),O=0;O<F.length;O++)this.updatePageLinksForCell(c,F[O]);var G=E.parseBackgroundImage(S.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(c,G);var H=new ChangePageSetup(this,null,G);H.ignoreColor=!0;E.model.execute(H)}}y&&E.pasteCellStyles(E.includeDescendants(F),E.defaultVertexStyle,E.defaultEdgeStyle)}finally{E.model.endUpdate()}}}catch(g){if(t)throw g;
+this.handleError(g)}return F};EditorUi.prototype.updatePageLinks=function(c,f){for(var k=0;k<f.length;k++)this.updatePageLinksForCell(c,f[k].root),null!=f[k].viewState&&this.updateBackgroundPageLink(c,f[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var k=c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=k&&(f.originalSrc="data:page/id,"+k)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=
+function(c,f){var k=document.createElement("div"),m=this.editor.graph,t=m.getLinkForCell(f);null!=t&&m.setLinkForCell(f,this.updatePageLink(c,t));if(m.isHtmlLabel(f)){k.innerHTML=Graph.sanitizeHtml(m.getLabel(f));for(var x=k.getElementsByTagName("a"),y=!1,F=0;F<x.length;F++)t=x[F].getAttribute("href"),null!=t&&(x[F].setAttribute("href",this.updatePageLink(c,t)),y=!0);y&&m.labelChanged(f,k.innerHTML)}for(F=0;F<m.model.getChildCount(f);F++)this.updatePageLinksForCell(c,m.model.getChildAt(f,F))};EditorUi.prototype.updatePageLink=
+function(c,f){if(Graph.isPageLink(f)){var k=c[f.substring(f.indexOf(",")+1)];f=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==f.substring(0,17))try{var m=JSON.parse(f.substring(17));if(null!=m.actions){for(var t=0;t<m.actions.length;t++){var x=m.actions[t];if(null!=x.open&&Graph.isPageLink(x.open)){var y=x.open.substring(x.open.indexOf(",")+1);k=c[y];null!=k?x.open="data:page/id,"+k:null==this.getPageById(y)&&delete x.open}}f="data:action/json,"+JSON.stringify(m)}}catch(F){}return f};
+EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,k,m,t){var x=mxUtils.bind(this,function(y){this.loadingExtensions=!1;null!=k?k(y):this.handleError(y)});this.createTimeout(null,mxUtils.bind(this,function(y){m=null!=m?m:c.name;var F=mxUtils.bind(this,function(C){y.clear()&&x(C)}),E=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var C=this.isRemoteVisioFormat(m);
+try{var S=m.lastIndexOf(".");if(0<=S&&S<m.length)m.substring(S+1).toUpperCase();else{var U=m.lastIndexOf("/");0<=U&&U<m.length&&(m=m.substring(U+1))}}catch(O){}if(C)if(null==VSS_CONVERT_URL||this.isOffline())F({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{C=new FormData;C.append("file1",c,m);var Q=new XMLHttpRequest;Q.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));Q.responseType="blob";this.addRemoteServiceSecurityCheck(Q);
+null!=t&&Q.setRequestHeader("x-convert-custom",t);Q.onreadystatechange=mxUtils.bind(this,function(){if(4==Q.readyState&&y.clear())if(200<=Q.status&&299>=Q.status)try{var O=Q.response;if("text/xml"==O.type){var q=new FileReader;q.onload=mxUtils.bind(this,function(u){try{f(u.target.result)}catch(I){F({message:mxResources.get("errorLoadingFile")})}});q.readAsText(O)}else this.doImportVisio(O,f,F,m)}catch(u){F(u)}else try{""==Q.responseType||"text"==Q.responseType?F({message:Q.responseText}):(q=new FileReader,
+q.onload=function(){try{F({message:JSON.parse(q.result).Message})}catch(u){null!=q.result&&0<q.result.length?F({message:q.result}):F(u)}},q.readAsText(Q.response))}catch(u){F({})}});Q.send(C)}else if(y.clear())try{this.doImportVisio(c,f,F,m)}catch(O){F(O)}}else F({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?E():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",E,null,null,null,F))}),x)};
+EditorUi.prototype.importGraphML=function(c,f,k){var m=mxUtils.bind(this,function(t){this.loadingExtensions=!1;null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var x=mxUtils.bind(this,function(F){t.clear()&&m(F)}),y=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,m)}catch(F){x(F)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||
+this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",y,null,null,null,x))}),m)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(k){this.loadingExtensions=!1;this.handleError(k)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(k){var m=mxUtils.bind(this,function(x){k.clear()&&f(x)}),t=mxUtils.bind(this,function(){this.loadingExtensions=
+!1;if(k.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||m({message:mxResources.get("unknownError")})}catch(x){m(x)}else m({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(t,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,m))}),f):f({message:mxResources.get("serviceUnavailableOrBlocked")})}};
+EditorUi.prototype.convertLucidChart=function(c,f,k){var m=mxUtils.bind(this,function(t){this.loadingExtensions=!1;null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var x=mxUtils.bind(this,function(F){t.clear()&&m(F)}),y=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if("undefined"!==typeof window.LucidImporter)try{var F=JSON.parse(c);f(LucidImporter.importState(F));try{if(null!=window.console&&"1"==urlParams.test){var E=[(new Date).toISOString(),
+"convertLucidChart",F];null!=F.state&&E.push(JSON.parse(F.state));if(null!=F.svgThumbs)for(var C=0;C<F.svgThumbs.length;C++)E.push(Editor.createSvgDataUri(F.svgThumbs[C]));null!=F.thumb&&E.push(F.thumb);console.log.apply(console,E)}}catch(S){}}catch(S){null!=window.console&&console.error(S),x(S)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(y,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",y,null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",y,null,null,null,x))}),m)};EditorUi.prototype.createMermaidXml=function(c,f,k,
+m,t,x){var y=new Graph(document.createElement("div"));k=y.insertVertex(null,null,null,0,0,m,t,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+k+";");y.setAttributeForCell(k,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=x&&y.setAttributeForCell(k,"templatePrompt",x);c=(new mxCodec).encode(y.getModel());return mxUtils.getXml(c)};EditorUi.prototype.getSvgForXml=function(c){var f=null,k=this.createTemporaryGraph(this.editor.graph.getStylesheet());try{document.body.appendChild(k.container),
+(new mxCodec(mxUtils.parseXml(c))).decode(mxUtils.parseXml(c).documentElement,k.getModel()),f=k.getSvg(null,null,null,null,null,null,null,null,null,null,null,null,null,null,!0,!0)}finally{document.body.removeChild(k.container)}return f};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,k,m,t){var x=0,y=mxUtils.bind(this,function(){this.createTimeout(this.editor.generateTimeout,mxUtils.bind(this,function(F){var E="";if(null!=this.drive&&null!=this.drive.getUser()){var C=this.drive.getUser();
+null!=C.email&&0<C.email.indexOf("@")&&(E=C.email.substring(C.email.indexOf("@")+1))}var S={prompt:c,driveDomain:E,options:null!=t?t:{}};EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"enableParser",m,"data",[S],"url",["https://www.draw.io/generate/v3"]);var U=Date.now();E=new mxXmlRequest("https://www.draw.io/generate/v3",JSON.stringify(S),"POST");var Q=mxUtils.bind(this,function(q){F.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"data",[S],"error",[q],"time",
+Date.now()-U+" ms"),k(q))}),O=mxUtils.bind(this,function(q){3>x++?F.clear()&&y():Q(q)});E.send(mxUtils.bind(this,function(q){if(F.isAlive())if(200<=q.getStatus()&&299>=q.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var I=q.getText();try{I=JSON.parse(I),result=I.result}catch(G){result=I}EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"data",[S],"response",[I],"time",Date.now()-U+" ms");m?"<"==result.charAt(0)?F.clear()&&(I=Editor.extractGraphModelFromText(result),f(null!=
+I&&3==I.length?I[1]:result)):this.parseMermaidDiagram(result,null,mxUtils.bind(this,function(G){this.tryAndHandle(mxUtils.bind(this,function(){F.clear()&&f(G)}),Q)}),Q,O,!0):this.generateMermaidImage(result,null,mxUtils.bind(this,function(G,H,g){this.tryAndHandle(mxUtils.bind(this,function(){F.clear()&&f(result,G,H,g)}),Q)}),Q,O)}),Q,!0);else{var u={message:mxResources.get("error")+" "+q.getStatus()};try{u=JSON.parse(q.getText()),null!=u.error&&(u.message=u.error)}catch(I){}Q(u)}}),Q)}),k)});y()};
+EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var k=1<f.length?f[1]:null;if(null!=k){var m=k.indexOf("-");0<m&&(k=k.substring(0,m))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=k&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,
+k))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");k=f[0].split(" ")[0].replace(/:$/,"");m=k.indexOf("-");0<m&&(k=k.substring(0,m));0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k)&&(c=null);return c};EditorUi.prototype.isSupportedMermaidDiagramType=function(c){return"graph"==c||"flowchart"==c||"sequencediagram"==c||"classdiagram"==c||"statediagram-v2"==c||"statediagram"==c||"erdiagram"==c||"requirementdiagram"==c||"gitgraph"==c||"mindmap"==c||"journey"==c};EditorUi.prototype.getMermaidDiagramType=
+function(c){c=c.split("\n");for(var f=0;f<c.length&&(0==c[f].trim().length||"%%"==c[f].substring(0,2));)f++;if("---"==c[f].trim()){do f++;while(f<c.length&&"---"!=c[f].trim());f++}c=c[f].trim().toLowerCase();f=c.indexOf(" ");return c.substring(0,0<f?f:c.length)};EditorUi.prototype.parseMermaidDiagram=function(c,f,k,m,t,x){var y=!1;x&&"undefined"!==typeof mxMermaidToDrawio&&this.isSupportedMermaidDiagramType(this.getMermaidDiagramType(c))&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(F){y||
+F==this.emptyDiagramXml||(y=!0,k(F))}));this.generateMermaidImage(c,f,mxUtils.bind(this,function(F,E,C){y||(y=!0,k(this.createMermaidXml(c,f,F,E,C)))}),m,t)};EditorUi.prototype.loadMermaid=function(c,f){var k=mxUtils.bind(this,function(t){this.loadingMermaid=!1;f(t)}),m=mxUtils.bind(this,function(){try{this.loadingMermaid=!1,c()}catch(t){k(t)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(m,0):(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+m,null,null,null,k):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",m,null,null,null,k))};EditorUi.prototype.mermaidSvgToDataUri=function(c,f,k,m){try{c=c.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var t=mxUtils.parseXml(c).getElementsByTagName("svg");if(0<t.length&&"error"!=t[0].getAttribute("aria-roledescription")){var x=parseFloat(t[0].getAttribute("width")),y=parseFloat(t[0].getAttribute("height"));if(isNaN(x)||isNaN(y))try{var F=t[0].getAttribute("viewBox").split(/\s+/);
+x=parseFloat(F[2]);y=parseFloat(F[3])}catch(E){x=x||100,y=y||100}f(this.convertDataUri(Editor.createSvgDataUri(c)),x,y)}else null!=m?m():k({message:mxResources.get("invalidInput")})}catch(E){k(E)}};EditorUi.prototype.getMermaidConfig=function(c,f){f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;f.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&
+(f.theme="dark");return f};EditorUi.prototype.generateMermaidImage=function(c,f,k,m,t){var x=mxUtils.bind(this,function(y){null!=m?m(y):this.handleError(y)});this.loadMermaid(mxUtils.bind(this,function(){try{mermaid.mermaidAPI.initialize(this.getMermaidConfig(c,f)),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(mxUtils.bind(this,function(y){this.mermaidSvgToDataUri(y.svg,k,m,t)})).catch(mxUtils.bind(this,function(y){this.removeMermaidErrors();"undefined"!==typeof mxMermaidToDrawio&&
+mxMermaidToDrawio.resetListeners();null!=t?t(y):x(y)}))}catch(y){x(y)}}),x)};EditorUi.prototype.removeMermaidErrors=function(){for(var c=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),f=0;f<c.length;f++)null!=c[f].parentNode&&c[f].parentNode.removeChild(c[f])};EditorUi.prototype.generatePlantUmlImage=function(c,f,k,m){function t(F,E,C){c1=F>>2;c2=(F&3)<<4|E>>4;c3=(E&15)<<2|C>>6;c4=C&63;r="";r+=x(c1&63);r+=x(c2&63);r+=x(c3&63);return r+=x(c4&63)}function x(F){if(10>F)return String.fromCharCode(48+
+F);F-=10;if(26>F)return String.fromCharCode(65+F);F-=26;if(26>F)return String.fromCharCode(97+F);F-=26;return 0==F?"-":1==F?"_":"?"}var y=new XMLHttpRequest;y.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(F){r="";for(i=0;i<F.length;i+=3)r=i+2==F.length?r+t(F.charCodeAt(i),F.charCodeAt(i+1),0):i+1==F.length?r+t(F.charCodeAt(i),0,0):r+t(F.charCodeAt(i),F.charCodeAt(i+1),F.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=
+f&&(y.responseType="blob");y.onload=function(F){if(200<=this.status&&300>this.status)if("txt"==f)k(this.response);else{var E=new FileReader;E.readAsDataURL(this.response);E.onloadend=function(C){var S=new Image;S.onload=function(){try{var U=S.width,Q=S.height;if(0==U&&0==Q){var O=E.result,q=O.indexOf(","),u=decodeURIComponent(escape(atob(O.substring(q+1)))),I=mxUtils.parseXml(u).getElementsByTagName("svg");0<I.length&&(U=parseFloat(I[0].getAttribute("width")),Q=parseFloat(I[0].getAttribute("height")))}k(E.result,
+U,Q)}catch(G){m(G)}};S.src=E.result};E.onerror=function(C){m(C)}}else m(F)};y.onerror=function(F){m(F)};y.send()};EditorUi.prototype.insertAsPreText=function(c,f,k){var m=this.editor.graph,t=null;m.getModel().beginUpdate();try{t=m.insertVertex(null,null,"<pre>"+c+"</pre>",f,k,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(t,!0)}finally{m.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(c,f,k,m,t,x,y,F){x=null!=x?x:!0;y=null!=y?y:!0;if(null!=c)if(Graph.fileSupport&&
+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(Q){4==Q.readyState&&200<=Q.status&&299>=Q.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Q.responseText,f,k,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var E=this.editor.graph;if("data:application/pdf;base64,"==
+c.substring(0,28)){var C=Editor.extractGraphModelFromPdf(c);if(null!=C&&0<C.length)return this.importXml(C,f,k,x,!0,F)}if(Editor.isPngDataUrl(c)&&(C=Editor.extractGraphModelFromPng(c),null!=C&&0<C.length))return this.importXml(C,f,k,x,!0,F);if("data:image/svg+xml;"==c.substring(0,19))try{C=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(C=c.substring(c.indexOf(",")+1),C=window.atob&&!mxClient.IS_SF?atob(C):Base64.decode(C,!0)):C=decodeURIComponent(c.substring(c.indexOf(",")+1));var S=this.importXml(C,
+f,k,x,!0,F);if(0<S.length)return S}catch(Q){}this.loadImage(c,mxUtils.bind(this,function(Q){if("data:"==c.substring(0,5))this.resizeImage(Q,c,mxUtils.bind(this,function(u,I,G){E.setSelectionCell(E.insertVertex(null,null,"",E.snap(f),E.snap(k),I,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(u)+";"))}),y,this.maxImageSize);else{var O=Math.min(1,Math.min(this.maxImageSize/Q.width,this.maxImageSize/Q.height)),
+q=Math.round(Q.width*O);Q=Math.round(Q.height*O);E.setSelectionCell(E.insertVertex(null,null,"",E.snap(f),E.snap(k),q,Q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var Q=null;E.getModel().beginUpdate();try{Q=E.insertVertex(E.getDefaultParent(),null,c,E.snap(f),E.snap(k),1,1,"text;"+(m?"html=1;":"")),E.updateCellSize(Q),E.fireEvent(new mxEventObject("textInserted","cells",[Q]))}finally{E.getModel().endUpdate()}E.setSelectionCell(Q)}))}else{c=
+Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,k,x,null,F);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(Q){this.editor.graph.setSelectionCells(this.importXml(Q,f,k,x,null,F))}),mxUtils.bind(this,function(Q){this.handleError(Q)}));else{E=this.editor.graph;t=null;E.getModel().beginUpdate();try{t=E.insertVertex(E.getDefaultParent(),null,"",E.snap(f),E.snap(k),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));E.fireEvent(new mxEventObject("textInserted",
+"cells",[t]));m&&(c=E.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");t.value=c;E.updateCellSize(t);if(0<this.maxTextWidth&&t.geometry.width>this.maxTextWidth){var U=E.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=U.width;t.geometry.height=U.height}Graph.isLink(t.value)&&E.setLinkForCell(t,t.value);t.geometry.width+=E.gridSize;t.geometry.height+=E.gridSize}finally{E.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=
+function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==
+c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&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(y,F){StorageFile.listFiles(this,"F",y,F)});window.openBrowserFile=mxUtils.bind(this,function(y,F,E){StorageFile.getFileContent(this,y,F,E)});window.deleteBrowserFile=mxUtils.bind(this,function(y,F,E){StorageFile.deleteFile(this,y,F,E)});if(!f){var m=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(y){this.hideDialog(y)}));window.openFile.setConsumer(mxUtils.bind(this,
+function(y,F){null!=F&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(F)?(y=new Blob([y],{type:"application/octet-stream"}),this.importVisio(y,mxUtils.bind(this,function(E){this.importXml(E,0,0,!0)}),null,F)):this.editor.graph.setSelectionCells(this.importXml(y,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var t=this.dialog,x=t.close;this.dialog.close=mxUtils.bind(this,function(y){Editor.useLocalStorage=
+m;x.apply(t,arguments);y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,k){var m=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(x){if(mxUtils.isEmptyObject(x.files))k();else{var y=0,F,E=!1;x.forEach(function(C,S){C=S.name.toLowerCase();"diagram/diagram.xml"==C?(E=!0,S.async("string").then(function(U){0==U.indexOf("<mxfile ")?f(U):k()})):0==C.indexOf("versions/")&&
+(C=parseInt(C.substr(9)),C>y&&(y=C,F=S))});0<y?F.async("string").then(function(C){(new XMLHttpRequest).upload&&m.isRemoteFileFormat(C,c.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):m.parseFileData(C,mxUtils.bind(this,function(S){4==S.readyState&&(200<=S.status&&299>=S.status?f(S.responseText):k())}),c.name):k()}):E||k()}},function(x){k(x)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,
+mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,k))};EditorUi.prototype.importFile=function(c,f,k,m,t,x,y,F,E,C,S,U){C=null!=C?C:!0;var Q=!1,O=null,q=mxUtils.bind(this,function(u){var I=null;null!=u&&"<mxlibrary"==u.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,u,y)),this.showSidebar()):I=this.importXml(u,k,m,C,null,null!=U?mxEvent.isControlDown(U):null);null!=F&&F(I)});"image"==f.substring(0,5)?(E=!1,"image/png"==f.substring(0,9)&&(S=S?null:this.extractGraphModelFromPng(c),
+null!=S&&0<S.length&&(O=this.importXml(S,k,m,C,null,null!=U?mxEvent.isControlDown(U):null),E=!0)),E||(E=this.editor.graph,S=c.indexOf(";"),0<S&&(c=c.substring(0,S)+c.substring(c.indexOf(",",S+1))),C&&E.isGridEnabled()&&(k=E.snap(k),m=E.snap(m)),S="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(S+="editableCssRules=.*;"),O=[E.insertVertex(null,null,"",k,m,t,x,S+"image="+c+";")])):/(\.*<graphml )/.test(c)?
+(Q=!0,this.importGraphML(c,q)):null!=E&&null!=y&&EditorUi.isVisioFilename(y)?(Q=!0,this.importVisio(E,q)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Q=!0,f=mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?q(u.responseText):null!=F&&(F(null),this.showError(mxResources.get("error"),413==u.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),
+null!=c?this.parseFileData(c,f,y):this.parseFile(E,f,y)):0==c.indexOf("PK")&&null!=E?(Q=!0,this.importZipFile(E,q,mxUtils.bind(this,function(){O=this.insertTextAt(this.validateFileData(c),k,m,!0,null,C);F(O)}))):/(\.v(sd|dx))($|\?)/i.test(y)||/(\.vs(s|x))($|\?)/i.test(y)||(O=this.insertTextAt(this.validateFileData(c),k,m,!0,null,C,null,null!=U?mxEvent.isControlDown(U):null));Q||null==F||F(O);return O};EditorUi.prototype.importFiles=function(c,f,k,m,t,x,y,F,E,C,S,U,Q){m=null!=m?m:this.maxImageSize;
+C=null!=C?C:this.maxImageBytes;var O=null!=f&&null!=k,q=!0;f=null!=f?f:0;k=null!=k?k:0;var u=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var I=S||this.resampleThreshold,G=0;G<c.length;G++)if("image/svg"!==c[G].type.substring(0,9)&&"image/"===c[G].type.substring(0,6)&&c[G].size>I){u=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[f],"y",[k],"maxSize",[m],"maxBytes",[C],"resampleThreshold",[this.resampleThreshold],"largeImages",[u],"crop",[O],"resizeImages",[q],"ignoreEmbeddedXml",
+[U],"evt",[Q]);var H=mxUtils.bind(this,function(){var g=this.editor.graph,p=g.gridSize;t=null!=t?t:mxUtils.bind(this,function(T,V,X,W,Y,Z,aa,la,fa){try{if(null!=T&&"<mxlibrary"==T.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,T,aa)),this.showSidebar(),null;this.isCompatibleString(T)&&1==c.length&&null!=Q&&"drop"==Q.type&&this.isBlankFile()&&!this.canUndo()&&(O=!1,W=X=0);return this.importFile(T,V,X,W,Y,Z,aa,la,fa,O,U,Q)}catch(ca){return this.handleError(ca),null}});
+x=null!=x?x:mxUtils.bind(this,function(T){g.setSelectionCells(T)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var B=c.length,K=B,M=[],N=mxUtils.bind(this,function(T,V){M[T]=V;if(0==--K){this.spinner.stop();if(null!=F)F(M);else{var X=[];g.getModel().beginUpdate();try{for(T=0;T<M.length;T++){var W=M[T]();null!=W&&(X=X.concat(W))}}finally{g.getModel().endUpdate()}}x(X)}}),R=0;R<B;R++)mxUtils.bind(this,function(T){var V=c[T];if(null!=V){var X=new FileReader;X.onload=mxUtils.bind(this,
+function(W){if(null==y||y(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Y=Graph.clipSvgDataUri(W.target.result),Z=Y.indexOf(","),aa=decodeURIComponent(escape(atob(Y.substring(Z+1)))),la=mxUtils.parseXml(aa),fa=la.getElementsByTagName("svg");if(0<fa.length){var ca=fa[0],ja=U?null:ca.getAttribute("content");null!=ja&&"<"!=ja.charAt(0)&&"%"!=ja.charAt(0)&&(ja=unescape(window.atob?atob(ja):Base64.decode(ja,!0)));null!=ja&&"%"==ja.charAt(0)&&(ja=decodeURIComponent(ja));
+null==ja||"<mxfile "!==ja.substring(0,8)&&"<mxGraphModel>"!==ja.substring(0,14)&&"<mxGraphModel "!==ja.substring(0,14)?N(T,mxUtils.bind(this,function(){try{if(null!=la){var ha=la.getElementsByTagName("svg");if(0<ha.length){var ea=ha[0],da=ea.getAttribute("width"),pa=ea.getAttribute("height");da=null!=da&&"%"!=da.charAt(da.length-1)?parseFloat(da):NaN;pa=null!=pa&&"%"!=pa.charAt(pa.length-1)?parseFloat(pa):NaN;var oa=ea.getAttribute("viewBox");if(null==oa||0==oa.length)ea.setAttribute("viewBox","0 0 "+
+da+" "+pa);else if(isNaN(da)||isNaN(pa)){var qa=oa.split(" ");3<qa.length&&(da=parseFloat(qa[2]),pa=parseFloat(qa[3]))}Y=Editor.createSvgDataUri(mxUtils.getXml(ea));var ta=Math.min(1,Math.min(m/Math.max(1,da)),m/Math.max(1,pa)),ia=t(Y,V.type,f+T*p,k+T*p,Math.max(1,Math.round(da*ta)),Math.max(1,Math.round(pa*ta)),V.name);if(null!=ia&&(isNaN(da)||isNaN(pa))){var ma=new Image;ma.onload=mxUtils.bind(this,function(){da=Math.max(1,ma.width);pa=Math.max(1,ma.height);ia[0].geometry.width=da;ia[0].geometry.height=
+pa;ea.setAttribute("viewBox","0 0 "+da+" "+pa);Y=Editor.createSvgDataUri(mxUtils.getXml(ea));var ua=Y.indexOf(";");0<ua&&(Y=Y.substring(0,ua)+Y.substring(Y.indexOf(",",ua+1)));g.setCellStyles("image",Y,[ia[0]])});ma.src=Editor.createSvgDataUri(mxUtils.getXml(ea))}return ia}}}catch(ua){}return null})):N(T,mxUtils.bind(this,function(){return t(ja,"text/xml",f+T*p,k+T*p,0,0,V.name)}))}else N(T,mxUtils.bind(this,function(){return null}))}else{Z=!1;if("image/png"==V.type){var ka=U?null:this.extractGraphModelFromPng(W.target.result);
+if(null!=ka&&0<ka.length){var ba=new Image;ba.src=W.target.result;N(T,mxUtils.bind(this,function(){return t(ka,"text/xml",f+T*p,k+T*p,ba.width,ba.height,V.name)}));Z=!0}}Z||(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(W.target.result,mxUtils.bind(this,
+function(ha){this.resizeImage(ha,W.target.result,mxUtils.bind(this,function(ea,da,pa){N(T,mxUtils.bind(this,function(){if(null!=ea&&ea.length<C){var oa=q&&this.isResampleImageSize(V.size,S)?Math.min(1,Math.min(m/da,m/pa)):1;return t(ea,V.type,f+T*p,k+T*p,Math.round(da*oa),Math.round(pa*oa),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),q,m,S,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Y=W.target.result,
+t(Y,V.type,f+T*p,k+T*p,240,160,V.name,function(ha){N(T,function(){return ha})},V)}catch(ha){N(T,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(ha,V)}else N(T,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(V.name)?t(null,V.type,f+T*p,k+T*p,240,160,V.name,function(W){N(T,function(){return W})},V):"image"==V.type.substring(0,5)||"application/pdf"==V.type?X.readAsDataURL(V):X.readAsText(V)}})(R)});if(u){u=[];for(G=0;G<c.length;G++)u.push(c[G]);
+c=u;this.confirmImageResize(function(g){q=g;H()},E)}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(c,f){f=null!=f?f:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,t=function(x,y){if(x||f)mxSettings.setResizeImages(x?
+y:null),mxSettings.save();k();c(y)};null==m||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(x){t(x,!0)},function(x){t(x,!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?226:200,!0,!0):t(!1,m)};EditorUi.prototype.parseFile=function(c,f,
+k){k=null!=k?k:c.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,f,k)});m.readAsText(c)};EditorUi.prototype.parseFileData=function(c,f,k){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.onreadystatechange=function(){f(m)};m.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(t){}};
+EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,k,m,t,x,y){t=null!=t?t:this.maxImageSize;var F=Math.max(1,c.width),E=Math.max(1,c.height),C=f;if(m&&this.isResampleImageSize(null!=y?y:f.length,x))try{var S=Math.max(F/t,E/t);if(1<S){var U=Math.round(F/S),Q=Math.round(E/S),O=document.createElement("canvas");O.width=U;O.height=Q;O.getContext("2d").drawImage(c,0,0,U,Q);var q=O.toDataURL();if(q.length<f.length){var u=
+document.createElement("canvas");u.width=U;u.height=Q;var I=u.toDataURL();q!==I&&(f=q,F=U,E=Q)}}}catch(G){}m&&C!=f&&t>this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,k,m,t/1.5,x,y):k(f,F,E)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,k){try{var m=new Image;m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=k&&(m.onerror=k);m.src=c}catch(t){if(null!=
+k)k(t);else throw t;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var v=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());v.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&
+null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var A=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,k=f.isEnabled;f.isEnabled=function(){return k.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(p){var B=p.getEvent();return null==p.getState()&&!mxEvent.isMouseEvent(B)&&
+!f.freehand.isDrawing()||mxEvent.isPopupTrigger(B)&&(null==p.getState()||mxEvent.isControlDown(B)||mxEvent.isShiftDown(B))});f.cellEditor.editPlantUmlData=function(p,B,K){var M=JSON.parse(K);B=new SimpleTextareaDialog(c,M.data,function(N){null!=N&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(N,M.format,function(R,T,V){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==M.format)f.labelChanged(p,"<pre>"+R+"</pre>"),f.updateCellSize(p,!0);else{f.setCellStyles("image",
+c.convertDataUri(R),[p]);var X=f.model.getGeometry(p);null!=X&&(X=X.clone(),X.width=T,X.height=V,f.cellsResized([p],[X],!1))}f.setAttributeForCell(p,"plantUmlData",JSON.stringify({data:N,format:M.format}))}finally{f.getModel().endUpdate()}},function(R){c.handleError(R)})});c.showDialog(B.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));B.init()};f.cellEditor.editMermaidData=function(p,B,K){var M=JSON.parse(K);B=new SimpleTextareaDialog(c,M.data,function(N){null!=N&&c.spinner.spin(document.body,
+mxResources.get("inserting"))&&c.generateMermaidImage(N,M.config,function(R,T,V){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",R,[p]);var X=f.model.getGeometry(p);null!=X&&(X=X.clone(),X.width=Math.max(X.width,T),X.height=Math.max(X.height,V),f.cellsResized([p],[X],!1));f.setAttributeForCell(p,"mermaidData",JSON.stringify({data:N,config:M.config},null,2))}finally{f.getModel().endUpdate()}},function(R){c.handleError(R)})});c.showDialog(B.container,640,420,!0,!0,null,null,
+null,new mxRectangle(0,0,320,280));B.init()};var m=f.cellEditor.startEditing;f.cellEditor.startEditing=function(p,B){try{var K=this.graph.getAttributeForCell(p,"plantUmlData");if(null!=K)this.editPlantUmlData(p,B,K);else if(K=this.graph.getAttributeForCell(p,"mermaidData"),null!=K&&window.isMermaidEnabled)this.editMermaidData(p,B,K);else{var M=f.getCellStyle(p);"1"==mxUtils.getValue(M,"metaEdit","0")?c.showDataDialog(p):m.apply(this,arguments)}}catch(N){c.handleError(N)}};f.getLinkTitle=function(p){return c.getLinkTitle(p)};
+f.customLinkClicked=function(p,B){var K=!1;try{var M=this.getGraphBounds();c.handleCustomLink(p,B);K=!0;c.chromelessResize&&!M.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(B))}catch(N){c.handleError(N)}return K};var t=f.parseBackgroundImage;f.parseBackgroundImage=function(p){var B=t.apply(this,arguments);null!=B&&null!=B.src&&Graph.isPageLink(B.src)&&(B={originalSrc:B.src});return B};var x=f.setBackgroundImage;f.setBackgroundImage=function(p){null!=p&&null!=p.originalSrc&&
+(p=c.createImageForPageLink(p.originalSrc,c.currentPage,this));x.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(p,B){p=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=p){var K=p.indexOf(",");if(0<K)for(p=p.substring(K+1),B=B.getProperty("patches"),
+K=0;K<B.length;K++)if(null!=B[K][EditorUi.DIFF_UPDATE]&&null!=B[K][EditorUi.DIFF_UPDATE][p]||null!=B[K][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(B[K][EditorUi.DIFF_REMOVE],p)){f.refreshBackgroundImage();break}}}));var y=f.getBackgroundImageObject;f.getBackgroundImageObject=function(p,B,K){var M=y.apply(this,arguments);null!=M&&null!=M.originalSrc&&(M=B?c.createImageForPageLink(M.originalSrc,K,null,!0):{src:M.originalSrc});return M};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
+"https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var F=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(p){p=null!=p?p:"";"1"==urlParams.dev&&(p+=(0<p.length?"&":"?")+"dev=1");return F.apply(this,arguments)};var E=f.addClickHandler;f.addClickHandler=function(p,B,K){var M=B;B=function(N,R,T){if(null==R){var V=mxEvent.getSource(N);
+"a"==V.nodeName.toLowerCase()&&(R=V.getAttribute("href"))}null!=R&&f.isCustomLink(R)&&(mxEvent.isTouchEvent(N)||!mxEvent.isPopupTrigger(N))&&f.customLinkClicked(R,T)&&mxEvent.consume(N);null!=M&&M(N,R,T)};E.call(this,p,B,K)};A.apply(this,arguments);this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var C=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(p,B,K){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(p,["zoomIn",
+"zoomOut","-"],null,K);C.apply(this,arguments);f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(p,["-","addToScratchpad"],null,K);f.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(p,["-","exitGroup","home"],null,K)};var S=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(p,B,K){if(c.editor.graph.isSelectionEmpty())S.apply(this,arguments),c.menus.addMenuItems(p,["copyAsImage","copyAsSvg"],null,K);else if(this.isShowCellEditItems()?
+this.addPopupDeleteItem(p,B,K):this.addPopupMenuArrangeItems(p,B,K),this.addMenuItems(p,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,K),this.isShowCellEditItems()||this.addPopupDeleteItem(p,B,K),this.addMenuItems(p,["lockUnlock","-"],null,K),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(B)&&f.isCellEditable(B)&&(this.addSubmenu("editCell",p,null,mxResources.get("edit")),p.addSeparator(),f.getModel().isEdge(B))){this.addSubmenu("line",p);var M=f.getModel().getGeometry(B);
+null!=M&&null!=M.points&&0<M.points.length&&this.addMenuItems(p,["clearWaypoints"],null,K)}1==f.getSelectionCount()&&this.addMenuItems(p,["enterGroup"],null,K);M=c.getSelectionState();null!=M.mergeCell?this.addMenuItem(p,"mergeCells"):(1<M.style.colspan||1<M.style.rowspan)&&this.addMenuItem(p,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=
+Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var U=f.getExportVariables;f.getExportVariables=function(){var p=U.apply(this,arguments),B=c.getCurrentFile();null!=B&&(p.filename=B.getTitle());p.pagecount=null!=c.pages?c.pages.length:1;p.page=
+null!=c.currentPage?c.currentPage.getName():"";p.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return p};var Q=f.getGlobalVariable;f.getGlobalVariable=function(p){var B=c.getCurrentFile();return"filename"==p&&null!=B?B.getTitle():"page"==p&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==p?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==p?null!=c.pages?c.pages.length:1:Q.apply(this,arguments)};var O=null,
+q=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var p=this.getCurrentFile(),B=null!=p&&null!=p.getTitle()?p.getTitle():this.defaultFilename;O!=B&&p==q&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),f.view.validate());O=B;q=p}));var u=f.labelLinkClicked;f.labelLinkClicked=function(p,B,K){var M=B.getAttribute("href");if(null==M||!f.isCustomLink(M)||!mxEvent.isTouchEvent(K)&&mxEvent.isPopupTrigger(K))u.apply(this,arguments);else{if(!f.isEnabled()||null!=p&&
+f.isCellLocked(p.cell))f.customLinkClicked(M),f.getRubberband().reset();mxEvent.consume(K)}};this.editor.getOrCreateFilename=function(){var p=c.defaultFilename,B=c.getCurrentFile();null!=B&&(p=null!=B.getTitle()?B.getTitle():p);return p};var I=this.actions.get("print");I.setEnabled(!mxClient.IS_IOS||!navigator.standalone);I.visible=I.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!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(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",
+!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),f.addListener(mxEvent.ESCAPE,function(p,B){null!=B&&f.isEnabled()&&!f.isEditing()&&null!=B.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&
+f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(p){var B=f.cellEditor.text2,K=null;null!=B&&(mxEvent.addListener(B,"dragleave",function(M){null!=K&&(K.parentNode.removeChild(K),K=null);M.stopPropagation();M.preventDefault()}),mxEvent.addListener(B,"dragover",mxUtils.bind(this,function(M){null==K&&(K=this.highlightElement(B));M.stopPropagation();M.preventDefault()})),mxEvent.addListener(B,"drop",mxUtils.bind(this,function(M){null!=K&&(K.parentNode.removeChild(K),K=null);if(0<M.dataTransfer.files.length)this.importFiles(M.dataTransfer.files,
+0,0,this.maxImageSize,function(R,T,V,X,W,Y){f.insertImage(R,W,Y)},function(){},function(R){return"image/"==R.type.substring(0,6)},function(R){for(var T=0;T<R.length;T++)R[T]()},mxEvent.isControlDown(M));else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var N=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,function(R){var T=Math.max(1,R.width);R=Math.max(1,R.height);var V=this.maxImageSize;V=Math.min(1,
+Math.min(V/Math.max(1,T)),V/Math.max(1,R));f.insertImage(decodeURIComponent(N),T*V,R*V)})):document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(M.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(M.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"));M.stopPropagation();M.preventDefault()})))}));if(Editor.isSettingsEnabled()){I=
+this.editor.graph.view;var G=mxSettings.getUnit();I.setUnit(G);Editor.pageSizeUnit=G==mxConstants.METERS?mxConstants.MILLIMETERS:G;I.addListener("unitChanged",function(p,B){p=B.getProperty("unit");mxSettings.setUnit(p);mxSettings.save();Editor.pageSizeUnit=p==mxConstants.METERS?mxConstants.MILLIMETERS:p});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,I.unit);
+this.refresh()}if("1"==urlParams.styledev){I=document.getElementById("geFooter");null!=I&&(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)})),I.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(p,B){0<this.editor.graph.getSelectionCount()?(p=this.editor.graph.getSelectionCell(),p=this.editor.graph.getModel().getStyle(p),this.styleInput.value=p||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var H=this.isSelectionAllowed;this.isSelectionAllowed=function(p){return mxEvent.getSource(p)==this.styleInput?
+!0:H.apply(this,arguments)}}I=document.getElementById("geInfo");null!=I&&I.parentNode.removeChild(I);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var g=null;mxEvent.addListener(f.container,"dragleave",function(p){f.isEnabled()&&(null!=g&&(g.parentNode.removeChild(g),g=null),p.stopPropagation(),p.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(p){null==g&&(g=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();
+p.stopPropagation();p.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(p){null!=g&&(g.parentNode.removeChild(g),g=null);if(f.isEnabled()){var B=mxUtils.convertPoint(f.container,mxEvent.getClientX(p),mxEvent.getClientY(p)),K=p.dataTransfer.files,M=f.view.translate,N=f.view.scale,R=B.x/N-M.x,T=B.y/N-M.y;if(0<K.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(p)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(K,
+!0)):(mxEvent.isAltDown(p)&&(T=R=null),this.importFiles(K,R,T,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(p),null,null,mxEvent.isShiftDown(p),p));else{mxEvent.isAltDown(p)&&(T=R=0);var V=0<=mxUtils.indexOf(p.dataTransfer.types,"text/uri-list")?p.dataTransfer.getData("text/uri-list"):null;B=this.extractGraphModelFromEvent(p,null!=this.pages);if(null!=B)f.setSelectionCells(this.importXml(B,R,T,!0));else if(0<=mxUtils.indexOf(p.dataTransfer.types,"text/html")){var X=p.dataTransfer.getData("text/html");
+B=document.createElement("div");B.innerHTML=Graph.sanitizeHtml(X);var W=null;K=B.getElementsByTagName("img");null!=K&&1==K.length?(X=K[0].getAttribute("src"),null==X&&(X=K[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||(W=!0)):(K=B.getElementsByTagName("a"),null!=K&&1==K.length?X=K[0].getAttribute("href"):(B=B.getElementsByTagName("pre"),null!=B&&1==B.length&&(X=mxUtils.getTextContent(B[0]))));var Y=!0,Z=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(X,R,
+T,!0,W,null,Y,mxEvent.isControlDown(p)))});W&&null!=X&&X.length>this.resampleThreshold?this.confirmImageResize(function(aa){Y=aa;Z()},mxEvent.isControlDown(p)):Z()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(aa){var la=Math.max(1,aa.width);aa=Math.max(1,aa.height);var fa=this.maxImageSize;fa=Math.min(1,Math.min(fa/Math.max(1,la)),fa/Math.max(1,aa));f.setSelectionCell(f.insertVertex(null,null,"",R,T,la*fa,aa*fa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+V+";"))}),mxUtils.bind(this,function(aa){f.setSelectionCells(this.insertTextAt(V,R,T,!0))})):0<=mxUtils.indexOf(p.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(p.dataTransfer.getData("text/plain"),R,T,!0))}}p.stopPropagation();p.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();
+this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var p=parseInt(this.div.offsetLeft),B=parseInt(this.div.offsetWidth),
+K=c.embedViewport.x+c.embedViewport.width,M=parseInt(this.div.offsetTop),N=parseInt(this.div.offsetHeight),R=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(p,K-B))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(M,R-N))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(I=
+Editor.currentTheme,"simple"==I||"sketch"==I)this.doSetCurrentTheme(I,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));I=!1;if(null!=urlParams.dark)I=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)I="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||
+I&&"auto"!=mxSettings.settings.darkMode||(I=mxSettings.settings.darkMode);"auto"==I&&this.isAutoDarkModeSupported()&&(I=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof I?"1"==I:I);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(p){this.isAutoDarkMode()&&this.setDarkMode(p.matches)}))}catch(p){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?
+this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",
+mxUtils.bind(this,function(p,B){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var z=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,
+f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}z.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,m=this.editor.graph;k.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,
+mxUtils.bind(this,function(C){mxEvent.getSource(C)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(C),mxEvent.getClientY(C)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var t=document.createElement("div");t.style.position="absolute";t.style.width="10px";t.style.height="10px";t.style.borderRadius="5px";t.style.border="1px solid gray";t.style.background="#ffffff";t.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(t);
+this.bottomResizer=t;var x=null,y=null,F=null,E=null;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(C){E=parseInt(this.diagramContainer.style.height);y=mxEvent.getClientY(C);m.popupMenuHandler.hideMenu();mxEvent.consume(C)}));t=t.cloneNode(!1);t.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(t);this.rightResizer=t;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(C){F=parseInt(this.diagramContainer.style.width);x=mxEvent.getClientX(C);m.popupMenuHandler.hideMenu();
+mxEvent.consume(C)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(C){var S=!1;null!=x&&(this.diagramContainer.style.width=Math.max(20,F+mxEvent.getClientX(C)-x)+"px",S=!0);null!=y&&(this.diagramContainer.style.height=Math.max(20,E+mxEvent.getClientY(C)-y)+"px",S=!0);S&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),
+function(C){null==x&&null==y||mxEvent.consume(C);y=x=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";k.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(C){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",
+mxUtils.bind(this,function(C){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";k.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){k.innerHTML=
+"&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var f=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 m=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(x){var y=mxEvent.getSource(x);null==f.container||!f.isEnabled()||f.isMouseDown||
+f.isEditing()||null!=this.dialog||"INPUT"==y.nodeName||"TEXTAREA"==y.nodeName||"true"==y.contentEditable||224!=x.keyCode&&(mxClient.IS_MAC||17!=x.keyCode)&&(!mxClient.IS_MAC||91!=x.keyCode&&93!=x.keyCode)||m||(k.style.left=f.container.scrollLeft+10+"px",k.style.top=f.container.scrollTop+10+"px",x=f.container.scrollLeft,y=f.container.scrollTop,f.container.appendChild(k),m=!0,k.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=x,f.container.scrollTop=y)}));mxEvent.addListener(document,
+"keyup",mxUtils.bind(this,function(x){var y=x.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=y&&17!=y&&91!=y&&93!=y||(m=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(x){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(k),c()}catch(y){this.handleError(y)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(x){if(f.isEnabled())try{mxClipboard.copy(f),
+this.copyCells(k,!0),c()}catch(y){this.handleError(y)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(x){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(k.innerHTML="&nbsp;",k.focus(),null!=x.clipboardData&&(Graph.removePasteFormatting(k.firstChild),this.pasteCells(x,k,!0,!0)),!mxEvent.isConsumed(x)){var y=f.container.scrollLeft,F=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=y,f.container.scrollTop=F,Graph.removePasteFormatting(k.firstChild),
+this.pasteCells(x,k,!1,!0)}catch(E){this.handleError(E)}}),0)}}catch(E){this.handleError(E)}}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(x){return mxEvent.getSource(x)==k?!0:t.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=
+function(c,f){if(null==c||""==c)c=App.isSimpleThemePreferred()?"simple":"kennedy";var k="simple"==Editor.currentTheme&&this.isDefaultTheme(c)||this.isDefaultTheme(Editor.currentTheme)&&"simple"==c||c==Editor.currentTheme;if(k||f)f=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=c,this.switchTheme(c),this.fireEvent(new mxEventObject("currentThemeChanged")),this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(f);return k};EditorUi.prototype.saveScrollState=
+function(c){var f=this.editor.graph.view.translate,k=this.diagramContainer.scrollLeft,m=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(k-=this.embedViewport.x,m-=this.embedViewport.y):(k+=this.embedViewport.x,m+=this.embedViewport.y));f={x:k,y:m,tx:f.x,ty:f.y};c&&(f.boundingRect=this.diagramContainer.getBoundingClientRect());return f};EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,k=this.editor.graph.view.translate;if(null!=
+c.boundingRect){var m=this.diagramContainer.getBoundingClientRect();c.x-=c.boundingRect.x-m.x;c.y-=c.boundingRect.y-m.y}this.diagramContainer.scrollLeft=c.x+(k.x-c.tx)*f;this.diagramContainer.scrollTop=c.y+(k.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="")}));mxEvent.addListener(c,
+"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var k=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var m=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=m&&null!=m.getAttribute("class");if(!f&&null!=m){m=m.getAttribute("title");var t=this.getCurrentFile();t=null!=t?t.savingStatusKey:DrawioFile.prototype.savingStatusKey;
+m==mxResources.get(t)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(t))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";m=32>=c.clientWidth;c.style.visibility=m&&""==this.editor.getStatus()?"hidden":"";if(m||f)this.statusContainer.style.display="",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=
+""});this.editor.addListener("statusChanged",k);k()};EditorUi.prototype.switchTheme=function(c){this.destroyWindows(!0);this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);"sketch"==c&&(this.createFormatWindow(),this.createShapesWindow())};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];
+null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=
+function(c){null==this.sidebarWindow||c||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||c||(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.chatWindow&&(this.chatWindow.destroy(),this.chatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),
+this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),
+this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)f.defaultEdgeLength=
+120;null==urlParams.grid&&(f.defaultGridEnabled=!1);null==urlParams.pv&&(f.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=function(c){};EditorUi.prototype.getNetworkStatus=
+function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+": "+(null!=c&&null!=c.message?c.message:
+mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);
+null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,f,k,m){k=null!=k?k:"geButton";var t=this.menus.get(c);m=this.menubar.addMenu(mxResources.get(c),t.funct,null,m);m.className=k;m.setAttribute("title",mxResources.get(c));this.menus.menuCreated(t,m,k);null!=f&&(m.style.backgroundImage="url("+f+")",m.innerText="");return m};EditorUi.prototype.addButton=function(c,f,
+k,m){c=this.createToolbarButton(c,f,k);m=null!=m?m:this.container;m.appendChild(c);return c};EditorUi.prototype.createToolbarButton=function(c,f,k){var m=document.createElement("a");m.className="geButton";null!=c&&"data:"==c.substring(0,5)&&(m.style.backgroundImage="url("+c+")");null!=f&&m.setAttribute("title",f);null!=k&&mxEvent.addListener(m,"click",function(t){"disabled"!=m.getAttribute("disabled")&&k(t);mxEvent.consume(t)});mxEvent.preventDefault(m);return m};EditorUi.prototype.createMenuItem=
+function(c,f,k){var m=this.actions.get(c),t=null!=m?m.funct:null,x=this.createToolbarButton(f,mxResources.get(c)+(null!=m&&null!=m.shortcut?" ("+m.shortcut+")":""),t);null==m||k||(c=function(){m.isEnabled()?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",c),m.addListener("stateChanged",c),c());return x};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=this,f=Math.max(10,this.diagramContainer.parentNode.clientWidth-
+256),k="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),f,60,240,k,mxUtils.bind(this,function(x){x.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var m=this.formatWindow.window.toggleMinimized,t=240;this.formatWindow.window.toggleMinimized=function(){m.apply(this,arguments);
+this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=t+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");c.format.refresh();this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(x){mxEvent.getSource(x)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));
+this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var x=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,y=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>x||690>y)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var D=EditorUi.prototype.toggleFormatPanel;
+EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):D.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));var k=this.hsplitPosition,m=mxUtils.bind(this,function(){this.hsplitPosition=t;this.refresh();this.diagramContainer.scrollLeft-=k-this.hsplitPosition}),
+t=c?f:0,x=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==t?"translateX(0)":"translateX(-100%)");0!=t&&m();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==t?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform "+x+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==t&&m()}),1E3*x)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var P=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():P.apply(this,
+arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,function(y,F){var E=this.menus.get(y);y=this.createMenuElement(F,mxUtils.bind(this,function(){E.funct.apply(this,arguments)}));y.setAttribute("title",F);y.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";y.className="geButton";c.parentNode.appendChild(y);return y});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=
+this.actions.get("newLibrary"))f=document.createElement("div"),f.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",f.className="geButton",f.style.left="0px",f.style.right="50%",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.right="0px",mxUtils.write(f,mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,
+"click",this.actions.get("openLibrary").funct);else{var k=f("newLibrary","");k.style.left="0px";k.style.right="50%";var m=document.createElement("span");k.appendChild(m);var t=f("openLibraryFrom","");t.style.borderLeftWidth="1px";t.style.left="50%";t.style.right="0px";var x=document.createElement("span");t.appendChild(x);this.dependsOnLanguage(mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,mxResources.get("newLibrary"));k.setAttribute("title",mxResources.get("newLibrary"));x.innerHTML=
+"";mxUtils.write(x,mxResources.get("openLibraryFrom"));t.setAttribute("title",mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),k="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=
+new WrapperWindow(this,mxResources.get("shapes"),k&&"1"!=urlParams.embedInline?66:10,k&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,c-6,f-6,mxUtils.bind(this,function(m){this.createShapesPanel(m)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=
+function(c){this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};EditorUi.prototype.setAndPersistDarkMode=function(c){var f=c;"auto"==c&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(f);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=
+function(c){this.spinner.spin(document.body,mxResources.get("working"))&&(mxSettings.setLanguage(c),mxSettings.save(),mxClient.language=c,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(c,f){this.dependsOnLanguage(mxUtils.bind(this,function(){c.setAttribute("title",mxResources.get(f))}))};EditorUi.prototype.dependsOnLanguage=function(c){c();
+this.addListener("languageChanged",c)};EditorUi.prototype.setAndPersistHighContrast=function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var f=
+document.getElementById("high-contrast-stylesheet");if(null!=f&&window.matchMedia){var k=window.matchMedia("(forced-colors: active)").matches,m=f.getAttribute("media");(m="all"==m||"not all"!=m&&k)&&!c?f.setAttribute("media",k?"not all":"(forced-colors: active)"):!m&&c&&f.setAttribute("media",k?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);
+mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.fireEvent(new mxEventObject("rulerVisibleChanged"));c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-f.x;this.diagramContainer.scrollTop+=c.x-f.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(c){return!c&&"auto"==urlParams.dark||
+Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(c){mxUtils.lightDarkColorSupported&&(Editor.darkMode=c,c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container,mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff",null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),c.style.colorScheme="dark"):(c.classList.remove("geDarkMode"),c.style.colorScheme="light")),
+null!=this.ruler&&this.ruler.updateStyle(),this.fireEvent(new mxEventObject("darkModeChanged")))};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,f){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),
+this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState(!0))),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,k=this.sketchPickerMenuElt;
+if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",k.style.left="10px",k.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom=
+"0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var m=this.diagramContainer.getAttribute("data-bounds");if(null!=m){this.diagramContainer.removeAttribute("data-bounds");var t=m.split(" ");m=mxUtils.getDocumentSize();this.diagramContainer.style.top=t[0];this.diagramContainer.style.left=t[1];var x=parseInt(t[2]);t=parseInt(t[3]);x=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,x):x,m.width-80);t=Math.min(null!=
+this.minInlineHeight?Math.max(this.minInlineHeight,t):t,m.height-80);this.diagramContainer.style.width=x+"px";this.diagramContainer.style.height=t+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";k.style.display="";k.style.left=
+this.diagramContainer.offsetLeft-k.offsetWidth-4+"px";k.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=f.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/
+2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;f.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=
+function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-
+4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize-4):(c.vertexFontSize=Graph.prototype.vertexFontSize,c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize=
+"8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&
+null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,
+c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=
+function(c){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var k=c.indexOf(",");0<k&&(f=this.getPageById(c.substring(k+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var k=JSON.parse(c.substring(17));null!=k&&null!=k.title&&(f=k.title)}catch(m){}return f};
+EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=c.indexOf(","),c=this.getPageById(c.substring(f+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,f)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",
+mxUtils.bind(this,function(f){f.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,k){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
+this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,k){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,k){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=
+mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,k){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,k){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),
+this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(f,k){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));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.writeImageToClipboard=function(c,f,k,m,t,x){m=null!=m?m:"image/png";var y=null==f||null==k?'<img src="'+
+c+'">':'<img src="'+c+'" width="'+f+'" height="'+k+'">',F={"text/html":new Blob([y],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(m)&&(F[m]=this.base64ToBlob(c.substring(c.indexOf(",")+1),m));var E=new ClipboardItem(F);navigator.clipboard.write([E]).then(t)["catch"](x);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[c],"w",f,"h",k,"type",m,"html",[y],"data",[F],"item",[E])};EditorUi.prototype.writeHtmlToClipboard=function(c,f){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(c)],
+{type:"text/plain"}),"text/html":new Blob([c],{type:"text/html"})})])["catch"](f)};EditorUi.prototype.writeTextToClipboard=function(c,f){navigator.clipboard.writeText(c)["catch"](f)};EditorUi.prototype.copySvg=function(c,f,k){try{if(null!=navigator.clipboard&&"function"===typeof window.ClipboardItem){var m=this.editor.graph.getSvg(null,k,null,null,null,null,null,null,null,null,null,null,null,0<c.length?c:null);m.setAttribute("content",f);var t=Editor.createSvgDataUri(mxUtils.getXml(m)),x=parseInt(m.getAttribute("width")),
+y=parseInt(m.getAttribute("height"));this.writeImageToClipboard(t,x,y,"image/svg+xml",null,mxUtils.bind(this,function(F){this.handleError(F)}))}}catch(F){this.handleError(F)}};EditorUi.prototype.copyImage=function(c,f,k){try{k=null!=k?k:4,null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(m,t){try{this.spinner.stop();var x=this.createImageDataUri(m,f,"png"),y=Math.round(parseInt(t.getAttribute("width"))/
+k),F=Math.round(parseInt(t.getAttribute("height"))/k);EditorUi.debug("EditorUi.copyImage",[this],"cells",[c],"xml",[f],"scale",[k]);this.writeImageToClipboard(x,y,F,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var E=this.getBaseFilename(!1)+(null!=f?".drawio":"")+".png";this.saveLocalFile(x.substring(x.lastIndexOf(",")+1),E,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(E){this.handleError(E)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();
+this.handleError(m)}),null,null,k,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(m){this.handleError(m)}};EditorUi.prototype.copyCells=function(c,f){var k=this.editor.graph;if(k.isSelectionEmpty())c.innerText="";else{var m=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),t=mxUtils.getXml(k.encodeCells(m));mxUtils.setTextContent(c,encodeURIComponent(t));f?(k.removeCells(m,!1),k.lastPasteXml=
+null):(k.lastPasteXml=t,k.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeClipboard){var f=this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,k,m,t,x){EditorUi.debug("EditorUi.pasteXml",[this],"xml",[c],"pasteAsLabel",
+[f],"compat",[k],"evt",[m],"html",[t],"pt",[x]);t=null!=t?t:!0;var y=this.editor.graph,F=null!=x?x:Editor.pasteAtMousePointer&&y.isMouseInsertPoint()?y.getInsertPoint():null;x=null;y.lastPasteXml==c?null==F&&y.pasteCounter++:(y.lastPasteXml=c,y.pasteCounter=0);var E=y.pasteCounter*y.gridSize;if(k||this.isCompatibleString(c)){y.model.beginUpdate();try{if(x=this.importXml(c,E,E),null!=F){var C=y.getBoundingBoxFromGeometry(x,!0);if(null!=C){var S=Math.round(y.snap(F.x)),U=Math.round(y.snap(F.y));y.cellsMoved(x,
+S-C.x,U-C.y)}}}finally{y.model.endUpdate()}y.setSelectionCells(x)}else if(f&&1==y.getSelectionCount()){f=y.getStartEditingCell(y.getSelectionCell(),m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==y.getCurrentCellStyle(f)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,c,[f]);else{y.model.beginUpdate();try{y.labelChanged(f,c),Graph.isLink(c)&&y.setLinkForCell(f,c)}finally{y.model.endUpdate()}}y.setSelectionCell(f)}else F=null!=F?F:y.getInsertPoint(),y.isMouseInsertPoint()&&
+(E=0,y.lastPasteXml==c&&0<y.pasteCounter&&y.pasteCounter--),x=this.insertTextAt(c,F.x+E,F.y+E,t),y.setSelectionCells(x);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return x};EditorUi.prototype.pasteCells=function(c,f,k,m){if(!mxEvent.isConsumed(c)){var t=c.clipboardData,x=this.editor.graph,y=!1,F=f;if(k&&null!=t&&t.getData){var E=t.getData("text/plain"),C=!1;if(null!=E&&0<E.length&&"%3CmxGraphModel%3E"==
+E.substring(0,18))try{var S=decodeURIComponent(E);this.isCompatibleString(S)&&(C=!0,E=S)}catch(G){}C=C?null:t.getData("text/html");null!=C&&0<C.length?(F=this.parseHtmlData(C),y="text/plain"!=F.getAttribute("data-type")):null!=E&&0<E.length&&(F=document.createElement("div"),mxUtils.setTextContent(F,C))}E=F.getElementsByTagName("span");if(null!=E&&0<E.length&&"application/vnd.lucid.chart.objects"===E[0].getAttribute("data-lucid-type"))k=E[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&
+(this.convertLucidChart(k,mxUtils.bind(this,function(G){var H=this.editor.graph;H.lastPasteXml==G?H.pasteCounter++:(H.lastPasteXml=G,H.pasteCounter=0);var g=H.pasteCounter*H.gridSize;H.setSelectionCells(this.importXml(G,g,g));H.scrollCellToVisible(H.getSelectionCell())}),mxUtils.bind(this,function(G){this.handleError(G)})),mxEvent.consume(c));else{var U=!1,Q="";Q=y?null!=F.textContent&&"<mxfile"==F.textContent.substring(0,7)&&"</mxfile>"==F.textContent.substring(F.textContent.length-9)||"<mxGraphModel"==
+F.textContent.substring(0,13)&&"</mxGraphModel>"==F.textContent.substring(F.textContent.length-15)?F.textContent.replace(/\u00a0/g," "):F.innerHTML:mxUtils.trim(null==F.innerText?mxUtils.getTextContent(F):F.innerText);try{var O=Q.lastIndexOf("%3E");0<=O&&O<Q.length-3&&(Q=Q.substring(0,O+3))}catch(G){}try{E=F.getElementsByTagName("span"),(S=null!=E&&0<E.length?mxUtils.trim(decodeURIComponent(E[0].textContent)):decodeURIComponent(Q))&&(this.isCompatibleString(S)||0==S.substring(0,20).replace(/\s/g,
+"").indexOf('{"isProtected":'))&&(U=!0,Q=S)}catch(G){}S=null;try{if(!U&&""==F.textContent)for(O=0;O<t.items.length;O++){var q=t.items[O];if("file"===q.kind){S=q.getAsFile();break}}}catch(G){}EditorUi.debug("EditorUi.pasteCells",[this],"evt",[c],"realElt",[f.outerHTML],"elt",[F.outerHTML],"useEvent",k,"pasteAsLabel",m,"xml",[Q],"compat",U,"asHtml",y,"data",t,"items",[t.items.length],"files",[t.files.length],"types",[JSON.stringify(t.types)],"blob",[S]);try{if(U||null==S)if(null!=Q&&0<Q.length){if(0==
+Q.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var I=mxUtils.bind(this,function(){try{Q=(new MiroImporter).importMiroJson(JSON.parse(Q)),this.pasteXml(Q,m,U,c)}catch(G){console.log("Miro import error:",G)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",I):I()}else this.pasteXml(Q,m,U,c,y);mxEvent.consume(c)}else k||(x.lastPasteXml=null,x.pasteCounter=0);else{var u=x.getInsertPoint();this.importFiles([S],u.x,u.y,this.maxImageSize);mxEvent.consume(c)}}catch(G){this.handleError(G)}}}f.innerHTML=
+"&nbsp;"};EditorUi.prototype.pasteFromClipboard=function(c){var f=this.editor.graph;if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,function(k,m,t,x,y){if(null!=k){f.getModel().beginUpdate();try{this.pasteXml(k,!0,null,null,null,c)}finally{f.getModel().endUpdate()}}else k=null!=m?m:null!=t?t:x,null!=k?(c=null!=c?c:f.getInsertPoint(),this.importFiles([k],c.x,c.y,this.maxImageSize)):this.pasteFromLocalClipboard(c)})):
+this.pasteFromLocalClipboard(c)}catch(k){}};EditorUi.prototype.pasteFromLocalClipboard=function(c){var f=this.editor.graph;f.getModel().beginUpdate();try{f.moveCellsTo(mxClipboard.paste(f),c)}finally{f.getModel().endUpdate()}};EditorUi.prototype.installImagePasteHandler=function(){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){for(var k=null!=f.clipboardData?f.clipboardData:f.originalEvent.clipboardData,m=!1,t=null,x=0;x<k.types.length;x++)if("text/"===
+k.types[x].substring(0,5)){m=!0;break}for(x=0;x<k.items.length;x++){var y=k.items[x];if("file"===y.kind){t=y.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[f],"data",[k],"items",[k.items.length],"files",[k.files.length],"types",[JSON.stringify(k.types)],"containsText",m,"file",[t],"editing",c.isEditing());var F=mxUtils.bind(this,function(){try{if(!m&&null!=t){if(c.isEditing())this.importFiles([t],0,0,this.maxImageSize,function(C,S,U,Q,O,q){c.insertImage(C,O,q)},function(){},
+function(C){return"image/"==C.type.substring(0,6)},function(C){for(var S=0;S<C.length;S++)C[S]()});else{var E=this.editor.graph.getInsertPoint();this.importFiles([t],E.x,E.y,this.maxImageSize)}mxEvent.consume(f)}}catch(C){}});if(!mxEvent.isConsumed(f)&&!m)if(Editor.enableNativeClipboard)navigator.clipboard.read().then(mxUtils.bind(this,function(E){this.readTypeFromClipboardData(E,"image/svg+xml",mxUtils.bind(this,function(C){if(null!=C){C=new Blob([C],{type:"image/svg+xml"});var S=this.editor.graph.getInsertPoint();
+this.importFiles([C],S.x,S.y,this.maxImageSize)}else F()}),"image")}))["catch"](F);else F()}),!1)};EditorUi.prototype.readGraphModelFromClipboard=function(c){navigator.clipboard.read().then(mxUtils.bind(this,function(f){try{EditorUi.debug("EditorUi.readGraphModelFromClipboard",[this],"data",f,"types",null!=f&&0<f.length?[JSON.stringify(f[0].types)]:[]),this.readGraphModelFromHtmlClipboardData(f,mxUtils.bind(this,function(k,m){null!=k?c(k):this.readGraphModelFromImageClipboardData(f,mxUtils.bind(this,
+function(t,x,y){null!=t?c(t):this.readTypeFromClipboardData(f,"text/plain",mxUtils.bind(this,function(F){c(F,x,y,m,f)}))}))}))}catch(k){c(null)}}))["catch"](function(){c(null)})};EditorUi.prototype.readGraphModelFromHtmlClipboardData=function(c,f){this.readTypeFromClipboardData(c,"text/html",mxUtils.bind(this,function(k){var m=null,t=null;try{var x=this.parseHtmlData(k);if(null!=x){m="text/plain"!=x.getAttribute("data-type")?x.innerHTML:mxUtils.trim(null==x.innerText?mxUtils.getTextContent(x):x.innerText);
+try{var y=m.lastIndexOf("%3E");0<=y&&y<m.length-3&&(m=m.substring(0,y+3))}catch(C){}try{null==m&&(k=null,""==x.textContent&&1==x.children.length&&"IMG"==x.firstChild.nodeName&&(k=x.firstChild.getAttribute("src")),null!=k&&0<k.length&&("data:image/png;base64,"==k.substring(0,22)?t=this.base64ToBlob(k.substring(k.indexOf(",")+1),"image/png"):"data:image/svg+xml;base64,"==k.substring(0,26)&&(t=this.base64ToBlob(k.substring(k.indexOf(",")+1),"image/svg+xml"))))}catch(C){}try{var F=x.getElementsByTagName("span"),
+E=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(m);this.isCompatibleString(E)&&(m=E)}catch(C){}}}catch(C){}f(this.isCompatibleString(m)?m:null,t)}))};EditorUi.prototype.readGraphModelFromImageClipboardData=function(c,f){this.readTypeFromClipboardData(c,"image/svg+xml",mxUtils.bind(this,function(k,m){var t=null;try{null!=k&&(t=mxUtils.parseXml(k).documentElement.getAttribute("content"))}catch(x){}this.isCompatibleString(t)?f(t):this.readTypeFromClipboardData(c,
+"image/png",mxUtils.bind(this,function(x,y){t=Editor.extractGraphModelFromPng("data:image/png;base64,"+x);this.isCompatibleString(t)?f(t):f(null,m,y)}))}))};EditorUi.prototype.readTypeFromClipboardData=function(c,f,k){var m=!1;if(null!=c&&0<c.length)for(var t=0;t<c.length&&!m;t++)(function(x){0<=mxUtils.indexOf(x.types,f)&&(m=!0,x.getType(f).then(mxUtils.bind(this,function(y){if("image/png"==f)y.arrayBuffer().then(function(F){k(btoa(Graph.arrayBufferToString(F)),y)})["catch"](function(){k(null)});
+else y.text().then(mxUtils.bind(this,function(F){EditorUi.debug("EditorUi.readTypeFromClipboardData",[this],"data",[c],"type",[f],"result",[F]);k(F,y)}))["catch"](function(){k(null)})}))["catch"](function(){k(null)}))})(c[t]);m||k()};EditorUi.prototype.parseHtmlData=function(c){var f=null;if(null!=c&&0<c.length){var k="<meta "==c.substring(0,6);f=document.createElement("div");f.innerHTML=(k?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(c);asHtml=!0;k=f.getElementsByTagName("style");if(null!=k)for(;0<
+k.length;)k[0].parentNode.removeChild(k[0]);if(null!=f.firstChild&&f.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=f.firstChild.nextSibling&&f.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==f.firstChild.nodeName&&"A"==f.firstChild.nextSibling.nodeName&&null==f.firstChild.nextSibling.nextSibling){var m=null==f.firstChild.nextSibling.innerText?mxUtils.getTextContent(f.firstChild.nextSibling):f.firstChild.nextSibling.innerText;m==f.firstChild.nextSibling.getAttribute("href")&&
+(mxUtils.setTextContent(f,m),asHtml=!1)}if(""==f.textContent&&(k=f.getElementsByTagName("img"),1==k.length&&(m=k[0].getAttribute("src"),k=null,null!=m))){if(Editor.isPngDataUrl(m)){var t=Editor.extractGraphModelFromPng(m);null!=t&&0<t.length&&(k=t)}else if("data:image/svg+xml;base64,"==m.substring(0,26)){img=this.base64ToBlob(m.substring(m.indexOf(",")+1),"image/svg+xml");m=Graph.getSvgFromDataUri(m);try{t=mxUtils.parseXml(m).documentElement.getAttribute("content"),this.isCompatibleString(t)&&(k=
+t)}catch(x){}}null!=k&&(mxUtils.setTextContent(f,k),asHtml=!1)}asHtml?Graph.removePasteFormatting(f):f.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[c],"elt",[f],"asHtml",asHtml);return f};EditorUi.prototype.showPrintDialog=function(c,f,k){var m=330;this.editor.graph.isEnabled()&&(m+=40);null!=this.pages&&1<this.pages.length&&(m+=40,this.editor.graph.isEnabled()||(m+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(m+=20);this.showDialog((new PrintDialog(this,
+c,f,k)).container,320,m,!0,!0)};EditorUi.prototype.print=function(c,f){var k=this.editor,m=k.graph,t=this.getPageIndex(this.currentPage),x=null!=t?t+1:1,y=mxUtils.bind(this,function(G,H,g,p){var B=G.useCssTransforms,K=G.currentTranslate,M=G.currentScale,N=G.view.translate,R=G.view.scale;G.useCssTransforms&&(G.useCssTransforms=!1,G.currentTranslate=new mxPoint(0,0),G.currentScale=1,G.view.translate=new mxPoint(0,0),G.view.scale=1);var T=G.getGraphBounds(),V=0,X=0,W=mxRectangle.fromRectangle(G.pageFormat),
+Y=f.fit||f.crop||!G.pageVisible,Z=f.scale;W.width=Math.ceil(W.width*G.pageScale);W.height=Math.ceil(W.height*G.pageScale);var aa=1;if(f.fit){aa=f.sheetsAcross;var la=f.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));aa=Math.min(W.height*la/(T.height/G.view.scale),W.width*aa/(T.width/G.view.scale))}else aa=isNaN(Z)?1:Z;aa*=1;!Y&&G.pageVisible?(Z=G.getPageLayout(),V-=Z.x*W.width,X-=Z.y*W.height):Y=!0;f.crop&&(f.selection&&(T=m.getBoundingBox(m.getSelectionCells())),
+W.width=(T.width+1)*aa/G.view.scale,W.height=(T.height+1)*aa/G.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);p=null!=p?"page/id,"+p:null;if(null==H){H=PrintDialog.createPrintPreview(G,aa,null,0,V,X,Y);H.title=this.getBaseFilename(!0);H.pageSelector=!1;H.mathEnabled=!1;V=f.border;isNaN(V)||(H.pageMargin=V);f.selection&&(H.isCellVisible=function(ka){return G.isCellSelected(ka)});var fa=H.writeHead;H.writeHead=function(ka,ba){ba=null!=ba?ba:"";f.shadows||(ba+='g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');
+mxClient.IS_GC&&(ba+="@media print {\n .MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=k.fontCss&&(ba+=k.fontCss);fa.apply(this,arguments);for(var ha=G.getCustomFonts(),ea=0;ea<ha.length;ea++){var da=ha[ea].name,pa=ha[ea].url;Graph.isCssFontUrl(pa)?ka.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(pa))+'" charset="UTF-8" type="text/css">'):(ka.writeln('<style type="text/css">'),ka.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(da)+
+'";\nsrc: url("'+mxUtils.htmlEntities(pa)+'");\n}'),ka.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=H.drawBackgroundImage;H.drawBackgroundImage=function(ka){ca.apply(this,arguments);null!=ka.node&&(EditorUi.embedSvgImages(ka.node),m.disableSvgLinks(ka.node,function(ba){ba.setAttribute("href","javascript:void(0)")}))}}var ja=H.addGraphFragment;H.addGraphFragment=function(ka,ba,ha,ea,da,pa){ja.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:da.classList.add("geDisableMathJax");
+if(this.graph.shadowVisible)for(var oa=da.getElementsByTagName("svg"),qa=0;qa<oa.length;qa++)G.addSvgShadow(oa[qa])};f.grid&&(H.gridSize=G.gridSize,H.gridSteps=G.view.gridSteps,H.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:G.view.gridColor);H.open(null,null,g,!0,p,W,f.selection?G.getSelectionCells():null)}else{T=G.background;if(null==T||""==T||T==mxConstants.NONE)T="#ffffff";H.backgroundColor=T;H.autoOrigin=Y;f.grid&&(H.gridSize=G.gridSize,H.gridSteps=G.view.gridSteps,H.gridColor=
+Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:G.view.gridColor);H.appendGraph(G,aa,V,X,g,!0,p,W,f.selection?G.getSelectionCells():null);g=G.getCustomFonts();if(null!=H.wnd)for(W=0;W<g.length;W++)V=g[W].name,X=g[W].url,Graph.isCssFontUrl(X)?H.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(X)+'" charset="UTF-8" type="text/css">'):(H.wnd.document.writeln('<style type="text/css">'),H.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(V)+'";\nsrc: url("'+
+mxUtils.htmlEntities(X)+'");\n}'),H.wnd.document.writeln("</style>"))}B&&(G.useCssTransforms=B,G.currentTranslate=K,G.currentScale=M,G.view.translate=N,G.view.scale=R);return H}),F=f.pagesFrom,E=f.pagesTo,C=!f.allPages;t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{C&&(C=f.selection||F==x&&E==x);if(!C&&null!=this.pages&&this.pages.length){C=0;x=this.pages.length-1;f.allPages||(C=parseInt(F)-1,x=parseInt(E)-1);for(var S=C;S<=x;S++){var U=this.pages[S];F=U==this.currentPage?
+m:null;if(null==F){F=this.createTemporaryGraph(m.stylesheet);F.shapeForegroundColor=m.shapeForegroundColor;F.shapeBackgroundColor=m.shapeBackgroundColor;E=!0;var Q=C=!1,O=null,q=null;null==U.viewState&&null==U.root&&this.updatePageRoot(U);null!=U.viewState&&(E=U.viewState.pageVisible,C=U.viewState.mathEnabled,Q=U.viewState.shadowVisible,O=U.viewState.background,q=U.viewState.backgroundImage,F.pageFormat=U.viewState.pageFormat,F.gridSize=U.viewState.gridSize);null!=q&&null!=q.originalSrc&&(q=this.createImageForPageLink(q.originalSrc,
+U));F.background=O;F.backgroundImage=null!=q?new mxImage(q.src,q.width,q.height,q.x,q.y):null;F.pageVisible=E;F.mathEnabled=C;F.shadowVisible=Q;var u=F.getGraphBounds;F.getGraphBounds=function(){var G=u.apply(this,arguments),H=this.backgroundImage;if(null!=H&&null!=H.width&&null!=H.height){var g=this.view.translate,p=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((g.x+H.x)*p,(g.y+H.y)*p,H.width*p,H.height*p))}return G};var I=F.getGlobalVariable;F.getGlobalVariable=function(G){return"page"==
+G?U.getName():"pagenumber"==G?S+1:"pagecount"==G?null!=this.pages?this.pages.length:1:I.apply(this,arguments)};document.body.appendChild(F.container);this.updatePageRoot(U);F.model.setRoot(U.root)}t=y(F,t,S!=x,U.getId());F!=m&&F.container.parentNode.removeChild(F.container)}}else t=y(m);null==t||null==t.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(y=t.wnd.document,c||(t.wnd.IMMEDIATE_PRINT=!0),y.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),
+t.closeDocument(),Graph.rewritePageLinks(t.wnd.document,!0),t.mathEnabled||c||PrintDialog.printPreview(t));return t}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,k=0;k<c.length;k++)mxEvent.addListener(c[k],"dragleave",function(m){null!=f&&(f.parentNode.removeChild(f),f=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(c[k],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(f=this.highlightElement());
+m.stopPropagation();m.preventDefault()})),mxEvent.addListener(c[k],"drop",mxUtils.bind(this,function(m){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,!0);else{var t=this.extractGraphModelFromEvent(m);if(null==
+t){var x=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=x&&(10==document.documentMode||11==document.documentMode?t=x.getData("Text"):(t=null,t=0<=mxUtils.indexOf(x.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(x.types,"text/html")?x.getData("text/html"):null,null!=t&&0<t.length?(x=document.createElement("div"),x.innerHTML=Graph.sanitizeHtml(t),x=x.getElementsByTagName("img"),0<x.length&&(t=x[0].getAttribute("src"))):0<=mxUtils.indexOf(x.types,"text/plain")&&
+(t=x.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(y){200<=y.getStatus()&&299>=y.getStatus()?this.openLocalFile(y.getText(),null,!0):this.showError(mxResources.get("error"),413==y.getStatus()?
+mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(t)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(t):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(t)))))}else this.openLocalFile(t,null,!0)}m.stopPropagation();m.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,k=0;if(null==c){var m=document.body;var t=document.documentElement;
+var x=(m.clientWidth||t.clientWidth)-3;m=Math.max(m.clientHeight||0,t.clientHeight)-3}else m=c.getBoundingClientRect(),f=m.top,k=m.left,x=m.width,m=m.height;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=f+"px";t.style.left=k+"px";t.style.width=Math.max(0,x-3)+"px";t.style.height=Math.max(0,m-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(t):
+document.body.appendChild(t);return t};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var k=new mxCodec(f.ownerDocument),m=new mxGraphModel;k.decode(f,m);f=m.getChildAt(m.getRoot(),0);for(k=0;k<m.getChildCount(f);k++)c.push(m.getChildAt(f,k))}return c};EditorUi.prototype.openFileHandle=function(c,f,k,m,t,x){if(null!=f&&0<f.length){if(!Editor.useCanvasForExport&&/(\.png)$/i.test(f)||/(\.pdf)$/i.test(f))f=f.substring(0,
+f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var y=mxUtils.bind(this,function(E){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==E.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,E,f)),this.showSidebar()}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(E,f,m)});if(EditorUi.isVisioFilename(f))this.importVisio(k,
+mxUtils.bind(this,function(E){this.spinner.stop();y(E)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(E){this.spinner.stop();y(E)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))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?y(E.responseText):this.handleError({message:mxResources.get(413==
+E.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(E){this.spinner.stop();this.openLocalFile(E,f,m)}),mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,c,k.name)),this.showSidebar()}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(E){this.spinner.stop();y(E)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,m)}));else{if("image/png"==k.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==k.type){var F=Editor.extractGraphModelFromPdf(c);null!=
+F&&(t=null,m=!0,c=F)}this.spinner.stop();this.openLocalFile(c,f,m,t,null!=t?k:null,x)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<c.length;k++)mxUtils.bind(this,function(m){var t=new FileReader;t.onload=mxUtils.bind(this,function(x){try{this.openFileHandle(x.target.result,m.name,m,f)}catch(y){this.handleError(y)}});t.onerror=mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x);window.openFile=null});"image"!==
+m.type.substring(0,5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?t.readAsText(m):t.readAsDataURL(m)})(c[k])};EditorUi.prototype.openLocalFile=function(c,f,k,m,t,x){var y=this.getCurrentFile(),F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var E=mxUtils.parseXml(c);null!=E&&(this.editor.setGraphXml(E.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,f||this.defaultFilename,
+k,m,t,x))});if(null!=c&&0<c.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=y&&y.isModified()?
+this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var k in c)f.push(k);return f};EditorUi.prototype.addBasenamesForCell=
+function(c,f){function k(y){if(null!=y){var F=y.lastIndexOf(".");0<F&&(y=y.substring(F+1,y.length));null==f[y]&&(f[y]=!0)}}var m=this.editor.graph,t=m.getCellStyle(c);k(mxStencilRegistry.getBasenameForStencil(t[mxConstants.STYLE_SHAPE]));m.model.isEdge(c)&&(k(mxMarker.getPackageForType(t[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(t[mxConstants.STYLE_ENDARROW])));t=m.model.getChildCount(c);for(var x=0;x<t;x++)this.addBasenamesForCell(m.model.getChildAt(c,x),f)};EditorUi.prototype.setGraphEnabled=
+function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);c||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};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 c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,k,m,t){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(t)try{var x=this.editor.graph;x.setGridEnabled(!1);
+x.pageVisible=!1;var y=x.model.cells,F;for(F in y){var E=y[F];null!=E&&null!=E.style&&(E.style+=";sketch=1;"+(-1==E.style.indexOf("fontFamily=")||-1<E.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(C){console.log(C)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();
+this.editor.modified=null!=m?m:!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(c,f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&
+c.getPublicUrl(mxUtils.bind(this,function(k){this.spinner.stop();f(k)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var k=window.opener||
+window.parent;if(this.editor.modified){var m=f.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(t){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(t)}),"*")}),null,null,!0,m,1,this.embedExportBorder,null,this.embedExportTheme)}else c||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),
+"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(t){c||this.handleError(t)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,k=!1,m=!1,t=null,x=mxUtils.bind(this,function(E,C){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,
+function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,x);mxEvent.addListener(window,"message",mxUtils.bind(this,function(E){if(E.source==(window.opener||window.parent)){var C=E.data,S=null,U=mxUtils.bind(this,function(ba){if(null!=ba&&"function"===typeof ba.charAt&&"<"!=ba.charAt(0))try{Editor.isPngDataUrl(ba)?ba=Editor.extractGraphModelFromPng(ba):"data:image/svg+xml;base64,"==ba.substring(0,
+26)?ba=atob(ba.substring(26)):"data:image/svg+xml;utf8,"==ba.substring(0,24)&&(ba=ba.substring(24)),null!=ba&&(""==ba.trim()?ba=null:"%"==ba.charAt(0)?ba=decodeURIComponent(ba):"<"!=ba.charAt(0)&&(ba=Graph.decompress(ba)))}catch(ha){}return ba});if("json"==urlParams.proto){var Q=!1;try{C=JSON.parse(C),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[E],"data",[C])}catch(ba){C=null}try{if(null==C)return;if("dialog"==C.action){this.showError(null!=C.titleKey?mxResources.get(C.titleKey):
+C.title,null!=C.messageKey?mxResources.get(C.messageKey):mxUtils.htmlEntities(C.message),null!=C.buttonKey?mxResources.get(C.buttonKey):C.button);null!=C.modified&&(this.editor.modified=C.modified);return}if("layout"==C.action){this.executeLayouts(this.editor.graph.createLayouts(C.layouts));return}if("prompt"==C.action){this.spinner.stop();var O=new FilenameDialog(this,C.defaultValue||"",null!=C.okKey?mxResources.get(C.okKey):C.ok,function(ba){null!=ba?y.postMessage(JSON.stringify({event:"prompt",
+value:ba,message:C}),"*"):y.postMessage(JSON.stringify({event:"prompt-cancel",message:C}),"*")},null!=C.titleKey?mxResources.get(C.titleKey):C.title,null,null,null,null,function(){y.postMessage(JSON.stringify({event:"prompt-cancel",message:C}),"*")});this.showDialog(O.container,300,80,!0,!1);O.init();return}if("draft"==C.action){var q=U(C.xml);this.spinner.stop();O=new DraftDialog(this,mxResources.get("draftFound",[C.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();y.postMessage(JSON.stringify({event:"draft",
+result:"edit",message:C}),"*")}),mxUtils.bind(this,function(){this.hideDialog();y.postMessage(JSON.stringify({event:"draft",result:"discard",message:C}),"*")}),C.editKey?mxResources.get(C.editKey):null,C.discardKey?mxResources.get(C.discardKey):null,C.ignore?mxUtils.bind(this,function(){this.hideDialog();y.postMessage(JSON.stringify({event:"draft",result:"ignore",message:C}),"*")}):null);this.showDialog(O.container,640,480,!0,!1,mxUtils.bind(this,function(ba){ba&&this.actions.get("exit").funct()}));
+try{O.init()}catch(ba){y.postMessage(JSON.stringify({event:"draft",error:ba.toString(),message:C}),"*")}return}if("template"==C.action){this.spinner.stop();var u=1==C.enableRecent,I=1==C.enableSearch,G=1==C.enableCustomTemp;O=new NewDialog(this,!1,C.templatesOnly?!1:null!=C.callback,mxUtils.bind(this,function(ba,ha,ea,da){ba=ba||this.emptyDiagramXml;null!=C.callback?y.postMessage(JSON.stringify({event:"template",xml:ba,blank:ba==this.emptyDiagramXml,name:ha,tempUrl:ea,libs:da,builtIn:!0,message:C}),
+"*"):(c(ba,E,ba!=this.emptyDiagramXml,C.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,u?mxUtils.bind(this,function(ba){this.remoteInvoke("getRecentDiagrams",[null],null,ba,function(){ba(null,"Network Error!")})}):null,I?mxUtils.bind(this,function(ba,ha){this.remoteInvoke("searchDiagrams",[ba,null],null,ha,function(){ha(null,"Network Error!")})}):null,mxUtils.bind(this,function(ba,ha,ea){y.postMessage(JSON.stringify({event:"template",docUrl:ba,info:ha,name:ea}),
+"*")}),null,null,G?mxUtils.bind(this,function(ba){this.remoteInvoke("getCustomTemplates",null,null,ba,function(){ba({},0)})}):null,1==C.withoutType,null,C.templatesOnly);this.showDialog(O.container,620,460,!0,!1,mxUtils.bind(this,function(ba){null!=this.sidebar&&this.sidebar.hideTooltip();ba&&this.actions.get("exit").funct()}));O.init();return}if("textContent"==C.action){var H=this.getDiagramTextContent();y.postMessage(JSON.stringify({event:"textContent",data:H,message:C}),"*");return}if("status"==
+C.action){this.updateStatus(mxUtils.bind(this,function(){null!=C.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(C.messageKey))):null!=C.message&&this.editor.setStatus(mxUtils.htmlEntities(C.message))}));null!=C.modified&&(this.editor.modified=C.modified);return}if("spinner"==C.action){var g=null!=C.messageKey?mxResources.get(C.messageKey):C.message;null==C.show||C.show?this.spinner.spin(document.body,g):this.spinner.stop();return}if("exit"==C.action){this.actions.get("exit").funct();
+return}if("viewport"==C.action){if(null!=C.viewport){var p=this.editor.graph,B=p.view.translate.x,K=p.view.translate.y;this.embedViewport=C.viewport;p.refresh();this.diagramContainer.scrollTop-=(K-p.view.translate.y)*p.view.scale;this.diagramContainer.scrollLeft-=(B-p.view.translate.x)*p.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==C.action){O=null;try{var M=this.diagramContainer.getAttribute("data-scrollState");null!=M&&(this.diagramContainer.removeAttribute("data-scrollState"),
+O=JSON.parse(M))}catch(ba){}Editor.inlineFullscreen=C.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=O&&this.restoreScrollState(O);return}if("snapshot"==C.action){this.sendEmbeddedSvgExport(!0);return}if("export"==C.action){if("png"==C.format||"xmlpng"==C.format){if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,null!=C.spinKey?mxResources.get(C.spinKey):C.spin)){var N=null!=C.xml?C.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);p=this.editor.graph;
+var R=mxUtils.bind(this,function(ba,ha){if(C.withSvg)C.withSvg=!1,this.getEmbeddedSvg(N,this.editor.graph,null,!0,function(da){R(ba,da)},null,null,C.embedImages,this.editor.graph.background,C.scale,C.border,C.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ea=this.createLoadMessage("export");ea.format=C.format;ea.message=C;ea.data=ba;ea.svg=ha;ea.xml=N;y.postMessage(JSON.stringify(ea),"*")}}),T=mxUtils.bind(this,function(ba){null==ba&&(ba=Editor.blankImage);"xmlpng"==
+C.format&&(ba=Editor.writeGraphModelToPng(ba,"tEXt","mxfile",encodeURIComponent(N)));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container);R(ba)}),V=C.pageId||(null!=this.pages?C.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=V){var ba=p.getGlobalVariable;p=this.createTemporaryGraph(p.getStylesheet());for(var ha,ea=0;ea<this.pages.length;ea++)if(this.pages[ea].getId()==
+V){ha=this.updatePageRoot(this.pages[ea]);break}null==ha&&(ha=this.currentPage);p.getGlobalVariable=function(qa){return"page"==qa?ha.getName():"pagenumber"==qa?1:ba.apply(this,arguments)};document.body.appendChild(p.container);p.model.setRoot(ha.root)}if(null!=C.layerIds){var da=p.model,pa=da.getChildCells(da.getRoot()),oa={};for(ea=0;ea<C.layerIds.length;ea++)oa[C.layerIds[ea]]=!0;for(ea=0;ea<pa.length;ea++)da.setVisible(pa[ea],oa[pa[ea].id]||!1)}ea=null;C.keepTheme&&(ea=Editor.isDarkMode()?"dark":
+"light");this.editor.exportToCanvas(mxUtils.bind(this,function(qa){T(qa.toDataURL("image/png"))}),C.width,null,C.background,mxUtils.bind(this,function(){T(null)}),null,null,C.scale,C.transparent,C.shadow,null,p,C.border,null,C.grid,ea)});null!=C.xml&&0<C.xml.length&&(k=!0,this.setFileData(N),k=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==C.format?"1":"0")+(null!=V?"&pageId="+V:"")+(null!=C.layerIds&&0<C.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:C.layerIds})):
+"")+(null!=C.scale?"&scale="+C.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,function(ba){200<=ba.getStatus()&&299>=ba.getStatus()?R("data:image/png;base64,"+ba.getText()):T(null)}),mxUtils.bind(this,function(){T(null)}))}}else if(X=mxUtils.bind(this,function(){var ba=this.createLoadMessage("export");ba.message=C;if("html2"==C.format||"html"==C.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ha=this.getXmlFileData();ba.xml=mxUtils.getXml(ha);
+ba.data=this.getFileData(null,null,!0,null,null,null,ha);ba.format=C.format}else if("html"==C.format)ha=this.editor.getGraphXml(),ba.data=this.getHtml(ha,this.editor.graph),ba.xml=mxUtils.getXml(ha),ba.format=C.format;else{mxSvgCanvas2D.prototype.foAltText=null;ha=null!=C.background?C.background:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);ba.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ba.format="svg";var ea=mxUtils.bind(this,function(pa){this.editor.graph.setEnabled(!0);
+this.spinner.stop();ba.data=C.asText?pa:Editor.createSvgDataUri(pa);y.postMessage(JSON.stringify(ba),"*")}),da="auto";C.keepTheme&&(da=Editor.isDarkMode()?"dark":"light");null!=C.theme&&(da=C.theme);if("xmlsvg"==C.format){if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,null!=C.spinKey?mxResources.get(C.spinKey):C.spin)){da=null;if(this.isAutoDarkMode()||Editor.isDarkMode())da="auto";null!=C.theme&&(da=C.theme);this.getEmbeddedSvg(ba.xml,this.editor.graph,null,!0,ea,null,null,C.embedImages,
+ha,C.scale,C.border,C.shadow,da)}}else if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,null!=C.spinKey?mxResources.get(C.spinKey):C.spin))this.editor.graph.setEnabled(!1),ha=this.editor.graph.getSvg(ha,C.scale,C.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||C.shadow,null,da),(this.editor.graph.shadowVisible||C.shadow)&&this.editor.graph.addSvgShadow(ha),this.embedFonts(ha,mxUtils.bind(this,function(pa){C.embedImages||null==C.embedImages?this.editor.convertImages(pa,
+mxUtils.bind(this,function(oa){ea(mxUtils.getXml(oa))})):ea(mxUtils.getXml(pa))}));return}y.postMessage(JSON.stringify(ba),"*")}),null!=C.xml&&0<C.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);X()}}k=!0;this.setFileData(C.xml);k=!1;this.editor.graph.mathEnabled||X()}else X();return}if("load"==C.action){Q=C.toSketch;m=1==C.autosave;this.hideDialog();null!=C.modified&&null==urlParams.modified&&(urlParams.modified=C.modified);
+null!=C.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=C.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+"+Editor.shiftKey+"+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=C.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=C.noSaveBtn);
+if(null!=C.rough){var Y=Editor.sketchMode;this.doSetSketchMode(C.rough);Y!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=C.dark&&this.setDarkMode(C.dark);null!=C.border&&(this.embedExportBorder=C.border);null!=C.theme&&(this.embedExportTheme=C.theme);null!=C.background&&(this.embedExportBackground=C.background);null!=C.viewport&&(this.embedViewport=C.viewport);this.embedExitPoint=null;if(null!=C.rect){var Z=this.embedExportBorder;this.diagramContainer.style.left=
+Math.max(60,C.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,C.rect.top)+"px";this.minInlineWidth=C.minWidth;this.minInlineHeight=C.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var aa=C.maxFitScale,la=C.rect.width+2*Z,fa=C.rect.height+2*Z;S=mxUtils.bind(this,function(){var ba=mxUtils.getDocumentSize();la=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,la):la,ba.width-80);ba=
+Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,fa):fa,ba.height-80);this.diagramContainer.style.width=la+"px";this.diagramContainer.style.height=ba+"px";var ha=this.editor.graph;ba=ha.maxFitScale;ha.maxFitScale=aa;ha.fit(2*Z,null,null,null,null,null,fa);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ha.getGraphBounds().width<this.minInlineWidth){var ea=ha.container.scrollTop;this.resetScrollbars();ha.container.scrollTop=ea}ha.maxFitScale=ba;ha.container.scrollTop-=Z;ha.container.scrollLeft-=
+Z;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[C]));ha.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=ha.container.style.top);var da=ha.getGraphBounds();ha.container.clientWidth>da.width+2*Z&&(ha.container.scrollLeft=da.x+(da.width+Z-ha.container.clientWidth)/2)}),10)})}null!=C.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=
+C.noExitBtn);null!=C.title&&null!=this.buttonContainer&&this.setEmbedTitle(C.title);try{C.libs&&this.sidebar.showEntries(C.libs)}catch(ba){}C=null!=C.xmlpng?this.extractGraphModelFromPng(C.xmlpng):null!=C.descriptor?C.descriptor:C.xml}else{if("merge"==C.action){var ca=this.getCurrentFile();null!=ca&&(q=U(C.xml),null!=q&&""!=q&&ca.mergeFile(new LocalFile(this,q),function(){y.postMessage(JSON.stringify({event:"merge",message:C}),"*")},function(ba){y.postMessage(JSON.stringify({event:"merge",message:C,
+error:ba}),"*")}))}else"remoteInvokeReady"==C.action?this.handleRemoteInvokeReady(y):"remoteInvoke"==C.action?this.handleRemoteInvoke(C,E.origin):"remoteInvokeResponse"==C.action?this.handleRemoteInvokeResponse(C):y.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(C)}),"*");return}}catch(ba){this.handleError(ba)}}var ja=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),
+ka=mxUtils.bind(this,function(ba,ha){k=!0;try{c(ba,ha,null,Q)}catch(ea){this.handleError(ea)}k=!1;null!=urlParams.modified&&this.clearStatus();t=ja();m&&null==f&&(f=mxUtils.bind(this,function(ea,da){ea=ja();ea==t||k||(da=this.createLoadMessage("autosave"),da.xml=ea,(window.opener||window.parent).postMessage(JSON.stringify(da),"*"));t=ea}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),
+this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ha=this.createLoadMessage("load"),ha.xml=ba,y.postMessage(JSON.stringify(ha),
+"*");null!=S&&S()});null!=C&&"function"===typeof C.substring&&"data:application/vnd.visio;base64,"==C.substring(0,34)?(U="0M8R4KGxGuE"==C.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(C.substring(C.indexOf(",")+1)),function(ba){ka(ba,E)},mxUtils.bind(this,function(ba){this.handleError(ba)}),U)):null!=C&&"function"===typeof C.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(C,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):
+this.parseFileData(C,mxUtils.bind(this,function(ba){4==ba.readyState&&(200<=ba.status&&299>=ba.status&&"<mxGraphModel"==ba.responseText.substring(0,13)?ka(ba.responseText,E):this.handleError({message:413==ba.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=C&&"function"===typeof C.substring&&this.isLucidChartData(C)?this.convertLucidChart(C,mxUtils.bind(this,function(ba){ka(ba)}),mxUtils.bind(this,function(ba){this.handleError(ba)})):null==C||"object"!==typeof C||
+null==C.format||null==C.data&&null==C.url?(C=U(C),ka(C,E)):this.loadDescriptor(C,mxUtils.bind(this,function(ba){ka(ja(),E)}),mxUtils.bind(this,function(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}))}}));var y=window.opener||window.parent;x="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";y.postMessage(x,"*");if("json"==urlParams.proto){var F=this.editor.graph.openLink;this.editor.graph.openLink=function(E,C,S){F.apply(this,arguments);y.postMessage(JSON.stringify({event:"openLink",
+href:E,target:C,allowOpener:S}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,f,k,m){var t=document.createElement("button");t.className="geEmbedBtn geBtn";t.setAttribute("title",c+(null!=k?" ("+k+")":""));mxUtils.write(t,c);m&&t.classList.add("gePrimaryBtn");mxEvent.addListener(t,"click",f);return t};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||
+"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);
+"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+"+Editor.shiftKey+"+S":Editor.ctrlKey+"+S",!0)),"1"==
+urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct))}))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new SimpleTextareaDialog(this,Editor.defaultCsvValue,
+mxUtils.bind(this,function(c){this.importCsv(c)}),mxResources.get("import"),"https://www.drawio.com/blog/insert-from-csv"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,new mxRectangle(0,0,320,280));this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var f=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(k){if(0<k.length)try{var m=JSON.parse(k);this.executeLayouts(this.editor.graph.createLayouts(m));
+this.customLayoutConfig=m;this.hideDialog()}catch(t){this.handleError(t)}}),null,null,null,null,mxUtils.bind(this,function(k,m){var t=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var x=m.value;m.value=JSON.stringify(JSON.parse(x));m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));m.value=x}catch(y){this.handleError(y)}}));t.setAttribute("title",
+"copy");t.className="geBtn";k.appendChild(t)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var k=mxUtils.bind(this,function(){this.loadingOrgChart=!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),m=mxUtils.bind(this,function(t){this.loadingOrgChart=!1;f.clear()&&this.handleError(t)});"undefined"!==
+typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?k():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",k,null,null,null,m)},null,null,null,m)},null,null,null,m)},null,null,null,m):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",
+k,null,null,null,m))}),onerror)};EditorUi.prototype.importCsv=function(c,f,k){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f,k)}))};EditorUi.prototype.doImportCsv=function(c,f,k){try{var m=c.split("\n"),t=[],x=[],y=[],F={};if(0<m.length){var E={};k=null!=k?k:this.editor.graph;var C=null,S=null,U=null,Q=null,O=null,q=null,u=null,I="whiteSpace=wrap;html=1;",G=null,H=null,g="",p="auto",B="auto",K=!1,M=null,N=null,R=40,T=40,V=100,X=0,W=mxUtils.bind(this,function(){null!=f?
+f(Oa):(k.setSelectionCells(Oa),k.scrollCellToVisible(k.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Y=k.getFreeInsertPoint(),Z=Y.x,aa=Y.y;Y=aa;var la=null,fa="auto";H=null;for(var ca=[],ja=null,ka=null,ba=0;ba<m.length&&"#"==m[ba].charAt(0);){c=m[ba].replace(/\r$/,"");for(ba++;ba<m.length&&"\\"==c.charAt(c.length-1)&&"#"==m[ba].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(m[ba].substring(1)),ba++;if("#"!=c.charAt(1)){var ha=
+c.indexOf(":");if(0<ha){var ea=mxUtils.trim(c.substring(1,ha)),da=mxUtils.trim(c.substring(ha+1));"label"==ea?la=Graph.sanitizeHtml(da):"labelname"==ea&&0<da.length&&"-"!=da?O=da:"labels"==ea&&0<da.length&&"-"!=da?u=JSON.parse(da):"style"==ea?S=da:"parentstyle"==ea?I=da:"unknownStyle"==ea&&"-"!=da?q=da:"stylename"==ea&&0<da.length&&"-"!=da?Q=da:"styles"==ea&&0<da.length&&"-"!=da?U=JSON.parse(da):"vars"==ea&&0<da.length&&"-"!=da?C=JSON.parse(da):"identity"==ea&&0<da.length&&"-"!=da?G=da:"parent"==
+ea&&0<da.length&&"-"!=da?H=da:"namespace"==ea&&0<da.length&&"-"!=da?g=da:"width"==ea?p=da:"height"==ea?B=da:"collapsed"==ea&&"-"!=da?K="true"==da:"left"==ea&&0<da.length?M=da:"top"==ea&&0<da.length?N=da:"ignore"==ea?ka=da.split(","):"connect"==ea?ca.push(JSON.parse(da)):"link"==ea?ja=da:"padding"==ea?X=parseFloat(da):"edgespacing"==ea?R=parseFloat(da):"nodespacing"==ea?T=parseFloat(da):"levelspacing"==ea?V=parseFloat(da):"layout"==ea&&(fa=da)}}}if(null==m[ba])throw Error(mxResources.get("invalidOrMissingFile"));
+var pa=this.editor.csvToArray(m[ba].replace(/\r$/,""));ha=c=null;ea=[];for(da=0;da<pa.length;da++)G==pa[da]&&(c=da),H==pa[da]&&(ha=da),ea.push(mxUtils.trim(pa[da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==la&&(la="%"+ea[0]+"%");if(null!=ca)for(var oa=0;oa<ca.length;oa++)null==E[ca[oa].to]&&(E[ca[oa].to]={});G=[];for(da=ba+1;da<m.length;da++){var qa=this.editor.csvToArray(m[da].replace(/\r$/,""));if(null==qa){var ta=40<m[da].length?m[da].substring(0,40)+"...":m[da];throw Error(ta+
+" ("+da+"):\n"+mxResources.get("containsValidationErrors"));}0<qa.length&&G.push(qa)}k.model.beginUpdate();try{for(da=0;da<G.length;da++){qa=G[da];var ia=null,ma=null!=c?g+qa[c]:null;m=!1;null!=ma&&(ia=k.model.getCell(ma),m=null==ia||0<=mxUtils.indexOf(t,ia));var ua=new mxCell(la,new mxGeometry(Z,Y,0,0),S||"whiteSpace=wrap;html=1;");ua.collapsed=K;ua.vertex=!0;ua.id=ma;null==ia||m||k.model.setCollapsed(ia,K);for(var ra=0;ra<qa.length;ra++)k.setAttributeForCell(ua,ea[ra],qa[ra]),null==ia||m||k.setAttributeForCell(ia,
+ea[ra],qa[ra]);if(null!=O&&null!=u){var za=u[ua.getAttribute(O)];null!=za&&(k.labelChanged(ua,za),null==ia||m||k.cellLabelChanged(ia,za))}if(null!=Q&&null!=U){var Ba=U[ua.getAttribute(Q)];null!=Ba&&(ua.style=Ba)}k.setAttributeForCell(ua,"placeholders","1");ua.style=k.replacePlaceholders(ua,ua.style,C);null==ia||m?k.fireEvent(new mxEventObject("cellsInserted","cells",[ua])):(k.model.setStyle(ia,ua.style),0>mxUtils.indexOf(y,ia)&&y.push(ia),k.fireEvent(new mxEventObject("cellsInserted","cells",[ia])));
+m=null!=ia;ia=ua;if(!m)for(oa=0;oa<ca.length;oa++)E[ca[oa].to][ia.getAttribute(ca[oa].to)]=ia;null!=ja&&"link"!=ja&&(k.setLinkForCell(ia,ia.getAttribute(ja)),k.setAttributeForCell(ia,ja,null));var Ga=k.getPreferredSizeForCell(ia);H=null!=ha?k.model.getCell(g+qa[ha]):null;if(ia.vertex){ta=null!=H?0:Z;ba=null!=H?0:aa;null!=M&&null!=ia.getAttribute(M)&&(ia.geometry.x=ta+parseFloat(ia.getAttribute(M)));null!=N&&null!=ia.getAttribute(N)&&(ia.geometry.y=ba+parseFloat(ia.getAttribute(N)));var wa="@"==p.charAt(0)?
+ia.getAttribute(p.substring(1)):null;ia.geometry.width=null!=wa&&"auto"!=wa?parseFloat(ia.getAttribute(p.substring(1))):"auto"==p||"auto"==wa?Ga.width+X:parseFloat(p);var Fa="@"==B.charAt(0)?ia.getAttribute(B.substring(1)):null;ia.geometry.height=null!=Fa&&"auto"!=Fa&&"width"!=B?parseFloat(Fa):"auto"==B||"auto"==Fa?Ga.height+X:"width"==B?ia.geometry.width:parseFloat(B);Y+=ia.geometry.height+T}m?(null==F[ma]&&(F[ma]=[]),F[ma].push(ia)):(t.push(ia),null!=H?(H.style=k.replacePlaceholders(H,I,C),k.addCell(ia,
+H),x.push(H)):y.push(k.addCell(ia)))}for(da=0;da<x.length;da++)wa="@"==p.charAt(0)?x[da].getAttribute(p.substring(1)):null,Fa="@"==B.charAt(0)?x[da].getAttribute(B.substring(1)):null,"auto"!=p&&"auto"!=wa||"auto"!=B&&"auto"!=Fa||k.updateGroupBounds([x[da]],X,!0);var xa=y.slice(),Oa=y.slice();for(oa=0;oa<ca.length;oa++){var Ca=ca[oa];for(da=0;da<t.length;da++){ia=t[da];var Ea=mxUtils.bind(this,function(Ya,Ra,Ma){var fb=Ra.getAttribute(Ma.from);if(null!=fb&&""!=fb){fb=fb.split(",");for(var Qa=0;Qa<
+fb.length;Qa++){var Ta=E[Ma.to][fb[Qa]];if(null==Ta&&null!=q){Ta=new mxCell(fb[Qa],new mxGeometry(Z,aa,0,0),q);Ta.style=k.replacePlaceholders(Ra,Ta.style,C);var Va=k.getPreferredSizeForCell(Ta);Ta.geometry.width=Va.width+X;Ta.geometry.height=Va.height+X;E[Ma.to][fb[Qa]]=Ta;Ta.vertex=!0;Ta.id=fb[Qa];y.push(k.addCell(Ta))}if(null!=Ta){Va=Ma.label;null!=Ma.fromlabel&&(Va=(Ra.getAttribute(Ma.fromlabel)||"")+(Va||""));null!=Ma.sourcelabel&&(Va=k.replacePlaceholders(Ra,Ma.sourcelabel,C)+(Va||""));null!=
+Ma.tolabel&&(Va=(Va||"")+(Ta.getAttribute(Ma.tolabel)||""));null!=Ma.targetlabel&&(Va=(Va||"")+k.replacePlaceholders(Ta,Ma.targetlabel,C));var hb="target"==Ma.placeholders==!Ma.invert?Ta:Ya;hb=null!=Ma.style?k.replacePlaceholders(hb,Ma.style,C):k.createCurrentEdgeStyle();Va=k.insertEdge(null,null,Va||"",Ma.invert?Ta:Ya,Ma.invert?Ya:Ta,hb);if(null!=Ma.labels)for(hb=0;hb<Ma.labels.length;hb++){var db=Ma.labels[hb],Xa=new mxCell(db.label||hb,new mxGeometry(null!=db.x?db.x:0,null!=db.y?db.y:0,0,0),"resizable=0;html=1;");
+Xa.vertex=!0;Xa.connectable=!1;Xa.geometry.relative=!0;null!=db.placeholders&&(Xa.value=k.replacePlaceholders("target"==db.placeholders==!Ma.invert?Ta:Ya,Xa.value,C));if(null!=db.dx||null!=db.dy)Xa.geometry.offset=new mxPoint(null!=db.dx?db.dx:0,null!=db.dy?db.dy:0);Va.insert(Xa)}if(null!=Ma.data)for(var mb in Ma.data)k.setAttributeForCell(Va,mb,Ma.data[mb]);Oa.push(Va);mxUtils.remove(Ma.invert?Ya:Ta,xa)}}}});Ea(ia,ia,Ca);if(null!=F[ia.id])for(ra=0;ra<F[ia.id].length;ra++)Ea(ia,F[ia.id][ra],Ca)}}if(null!=
+ka)for(da=0;da<t.length;da++)for(ia=t[da],ra=0;ra<ka.length;ra++)k.setAttributeForCell(ia,mxUtils.trim(ka[ra]),null);if(0<y.length){var Ha=new mxParallelEdgeLayout(k);Ha.spacing=R;Ha.checkOverlap=!0;var Ja=function(){0<Ha.spacing&&Ha.execute(k.getDefaultParent());for(var Ya=0;Ya<y.length;Ya++){var Ra=k.getCellGeometry(y[Ya]);Ra.x=Math.round(k.snap(Ra.x));Ra.y=Math.round(k.snap(Ra.y));"auto"==p&&(Ra.width=Math.round(k.snap(Ra.width)));"auto"==B&&(Ra.height=Math.round(k.snap(Ra.height)))}};if("["==
+fa.charAt(0)){var La=W;k.view.validate();this.executeLayouts(k.createLayouts(JSON.parse(fa)),function(){Ja();La()});W=null}else if("circle"==fa){var Za=new mxCircleLayout(k);Za.disableEdgeStyle=!1;Za.resetEdges=!1;var $a=Za.isVertexIgnored;Za.isVertexIgnored=function(Ya){return $a.apply(this,arguments)||0>mxUtils.indexOf(y,Ya)};this.executeLayout(function(){Za.execute(k.getDefaultParent());Ja()},!0,W);W=null}else if("horizontaltree"==fa||"verticaltree"==fa||"auto"==fa&&Oa.length==2*y.length-1&&1==
+xa.length){k.view.validate();var pb=new mxCompactTreeLayout(k,"horizontaltree"==fa);pb.levelDistance=T;pb.edgeRouting=!1;pb.resetEdges=!1;pb.sortEdges=!0;this.executeLayout(function(){pb.execute(k.getDefaultParent(),0<xa.length?xa[0]:null)},!0,W);W=null}else if("horizontalflow"==fa||"verticalflow"==fa||"auto"==fa&&1==xa.length){k.view.validate();var Ua=new mxHierarchicalLayout(k,"horizontalflow"==fa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=T;Ua.parallelEdgeSpacing=
+R;Ua.interRankCellSpacing=V;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(k.getDefaultParent(),Oa);k.moveCells(Oa,Z,aa)},!0,W);W=null}else if("orgchart"==fa){k.view.validate();var cb=new mxOrgChartLayout(k,2,V,T),eb=cb.isVertexIgnored;cb.isVertexIgnored=function(Ya){return eb.apply(this,arguments)||0>mxUtils.indexOf(y,Ya)};this.executeLayout(function(){cb.execute(k.getDefaultParent());Ja()},!0,W);W=null}else if("organic"==fa||"auto"==fa&&Oa.length>y.length){k.view.validate();var bb=
+new mxFastOrganicLayout(k);bb.forceConstant=3*T;bb.disableEdgeStyle=!1;bb.resetEdges=!1;var ib=bb.isVertexIgnored;bb.isVertexIgnored=function(Ya){return ib.apply(this,arguments)||0>mxUtils.indexOf(y,Ya)};this.executeLayout(function(){bb.execute(k.getDefaultParent());Ja()},!0,W);W=null}}this.hideDialog()}finally{k.model.endUpdate()}null!=W&&W()}}catch(Ya){this.handleError(Ya)}};EditorUi.prototype.getSearch=function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var k=
+"?",m;for(m in urlParams)0>mxUtils.indexOf(c,m)&&null!=urlParams[m]&&(f+=k+m+"="+urlParams[m],k="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),m;for(m in urlParams)0>mxUtils.indexOf(k,m)&&(c=0==f?c+"?":c+"&",null!=urlParams[m]&&(c+=m+"="+
+urlParams[m],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,k,m,t){c=new LinkDialog(this,c,f,k,!0,m,t);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&
+f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var k=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.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));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("smartFit").setEnabled(f);this.actions.get("resetView").setEnabled(f);
+this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);this.menus.get("edgeShape").setEnabled(c);this.menus.get("edgeStyle").setEnabled(c);this.menus.get("appearance").setEnabled(mxUtils.lightDarkColorSupported)};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=
+function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var f=0;f<c.length;f++)this.libraryLoaded(c[f].file,c[f].images,c[f].title,null!=c[f].div?"none"!=c[f].div.style.display:c[f].expand)};var J=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){J.apply(this,arguments);var c=this.editor.graph,
+f=this.getCurrentFile(),k=this.getSelectionState(),m=this.isDiagramActive(),t="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&t);this.actions.get("redo").setEnabled(this.canRedo()&&t);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("explore").setEnabled(m&&(1==k.edges.length||
+1==k.vertices.length));this.actions.get("editConnectionPoints").setEnabled(m&&0==k.edges.length&&1==k.vertices.length);this.actions.get("editImage").setEnabled(m&&k.image&&0<k.cells.length);this.actions.get("crop").setEnabled(m&&k.image&&0<k.cells.length);this.actions.get("pageSetup").setEnabled(m);this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!c.isSelectionEmpty());
+this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&m&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("addToScratchpad").setEnabled(0<k.cells.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));
+this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);
+this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("none"!=this.diagramContainer.style.display);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var L=EditorUi.prototype.destroy;
+EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);L.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,k,m,t,x,y,F){var E=c.editor.graph;if("xml"==k)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==k)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(E.getSvg(m,
+t,x)),"image/svg+xml");else{var C=c.getFileData(!0,null,null,null,null,!0),S=E.getGraphBounds(),U=Math.floor(S.width*t/E.view.scale),Q=Math.floor(S.height*t/E.view.scale);if(C.length<=MAX_REQUEST_SIZE&&U*Q<MAX_AREA)if(c.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!c.editor.isExportToCanvas()){var O={globalVars:E.getExportVariables()};F&&(O.grid={size:E.gridSize,steps:E.view.gridSteps,color:E.view.gridColor});c.saveRequest(f,k,function(q,u){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+
+(u||"0")+(null!=q?"&filename="+encodeURIComponent(q):"")+"&extras="+encodeURIComponent(JSON.stringify(O))+(0<y?"&dpi="+y:"")+"&bg="+(null!=m?m:"none")+"&w="+U+"&h="+Q+"&border="+x+"&xml="+encodeURIComponent(C))})}else"png"==k?c.exportImage(t,null==m||"none"==m,!0,!1,!1,x,!0,!1,null,F,y):c.exportImage(t,!1,!0,!1,!1,x,!0,!1,"jpeg",F);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,
+f="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var m=c;this.currentPage!=this.pages[k]&&(m=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[k]),m.model.setRoot(this.pages[k].root));f+=this.pages[k].getName()+" "+m.getIndexableText()+" "}else f=c.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},k=document.createElement("div");k.style.whiteSpace="nowrap";var m=document.createElement("h3");
+mxUtils.write(m,mxUtils.htmlEntities(c));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(m);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 x={};try{var y=mxSettings.getCustomLibraries();for(c=0;c<y.length;c++){var F=y[c];if("R"==F.substring(0,1)){var E=JSON.parse(decodeURIComponent(F.substring(1)));
+x[E[0]]={id:E[0],title:E[1],downloadUrl:E[2]}}}}catch(C){}this.remoteInvoke("getCustomLibraries",null,null,function(C){t.innerText="";if(0==C.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var S=0;S<C.length;S++){var U=C[S];x[U.id]&&(f[U.id]=U);var Q=this.addCheckbox(t,U.title,x[U.id]);(function(O,q){mxEvent.addListener(q,"change",function(){this.checked?f[O.id]=O:delete f[O.id]})})(U,Q)}},mxUtils.bind(this,
+function(C){t.innerText="";var S=document.createElement("div");S.style.padding="8px";S.style.textAlign="center";mxUtils.write(S,mxResources.get("error")+": ");mxUtils.write(S,null!=C&&null!=C.message?C.message:mxResources.get("unknownError"));t.appendChild(S)}));k.appendChild(t);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var C=0,S;for(S in f)null==x[S]&&(C++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],
+null,mxUtils.bind(this,function(Q){C--;0==C&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Q,U)),this.showSidebar()}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){C--;0==C&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[S]));for(S in x)f[S]||this.closeLibrary(new RemoteLibrary(this,null,x[S]));0==C&&this.spinner.stop()}),null,null,"https://www.drawio.com/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(c){this.remoteWin=
+c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,k=this.remoteInvokeCallbacks[f.callbackId];if(null==k)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?k.error&&k.error(c.error.errResp):k.callback&&k.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,k,m,t){var x=
+!0,y=window.setTimeout(mxUtils.bind(this,function(){x=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),F=mxUtils.bind(this,function(){window.clearTimeout(y);x&&m.apply(this,arguments)}),E=mxUtils.bind(this,function(){window.clearTimeout(y);x&&t.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:F,error:E});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:k});null!=this.remoteWin?
+this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var k=mxUtils.bind(this,function(C,S){var U={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=S?U.error={errResp:S}:null!=C&&(U.resp=C);this.remoteWin.postMessage(JSON.stringify(U),"*")});try{var m=c.funtionName,t=this.remoteInvokableFns[m];if(null!=t&&"function"===typeof this[m]){if(t.allowedDomains){for(var x=!1,y=0;y<t.allowedDomains.length;y++)if(f=="https://"+t.allowedDomains[y]){x=
+!0;break}if(!x){k(null,"Invalid Call: "+m+" is not allowed.");return}}var F=c.functionArgs;Array.isArray(F)||(F=[]);if(t.isAsync)F.push(function(){k(Array.prototype.slice.apply(arguments))}),F.push(function(C){k(null,C||"Unkown Error")}),this[m].apply(this,F);else{var E=this[m].apply(this,F);k([E])}}else k(null,"Invalid Call: "+m+" is not found.")}catch(C){k(null,"Invalid Call: An error occurred, "+C.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var k=window.indexedDB||
+window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var m=k.open("database",2);m.onupgradeneeded=function(t){try{var x=m.result;1>t.oldVersion&&x.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&(x.createObjectStore("files",{keyPath:"title"}),x.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(y){null!=f&&f(y)}};m.onsuccess=mxUtils.bind(this,function(t){try{var x=m.result;this.database=x;EditorUi.migrateStorageFiles&&(StorageFile.migrate(x),
+EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(y){if((!y||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var F=document.createElement("iframe");F.style.display="none";F.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(F);var E=!0,C=!1,S,U=0,Q=mxUtils.bind(this,
+function(){C=!0;this.setDatabaseItem(".drawioMigrated3",!0);F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),O=mxUtils.bind(this,function(){U++;q()}),q=mxUtils.bind(this,function(){try{if(U>=S.length)Q();else{var I=S[U];StorageFile.getFileContent(this,I,mxUtils.bind(this,function(G){null==G||".scratchpad"==I&&G==this.emptyLibraryXml?F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[I]}),
+"*"):O()}),O)}}catch(G){console.log(G)}}),u=mxUtils.bind(this,function(I){try{this.setDatabaseItem(null,[{title:I.title,size:I.data.length,lastModified:Date.now(),type:I.isLib?"L":"F"},{title:I.title,data:I.data}],O,O,["filesInfo","files"])}catch(G){console.log(G)}});y=mxUtils.bind(this,function(I){try{if(I.source==F.contentWindow){var G={};try{G=JSON.parse(I.data)}catch(H){}"init"==G.event?(F.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||C||(E?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(S=G.resp[0],E=!1,q()):Q():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?u(G.resp[0]):O())}}catch(H){console.log(H)}});window.addEventListener("message",y)}})));c(x);x.onversionchange=function(){x.close()}}catch(y){null!=f?f(y):null!=window.console&&console.warn(y)}});m.onerror=f;m.onblocked=function(){}}catch(t){null!=f?f(t):null!=window.console&&console.error(t)}else null!=
+f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,k,m,t){this.openDatabase(mxUtils.bind(this,function(x){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c],f=[f]);var y=x.transaction(t,"readwrite");y.oncomplete=k;y.onerror=m;for(x=0;x<t.length;x++)y.objectStore(t[x]).put(null!=c&&null!=c[x]?{key:c[x],data:f[x]}:f[x])}catch(F){null!=m&&m(F)}}),m)};EditorUi.prototype.removeDatabaseItem=function(c,f,k,m){this.openDatabase(mxUtils.bind(this,function(t){try{m=
+m||"objects";Array.isArray(m)||(m=[m],c=[c]);var x=t.transaction(m,"readwrite");x.oncomplete=f;x.onerror=k;for(t=0;t<m.length;t++)x.objectStore(m[t]).delete(c[t])}catch(y){null!=k&&k(y)}}),k)};EditorUi.prototype.getDatabaseItem=function(c,f,k,m){this.openDatabase(mxUtils.bind(this,function(t){try{m=m||"objects";var x=t.transaction([m],"readonly").objectStore(m).get(c);x.onsuccess=function(){f(x.result)};x.onerror=k}catch(y){null!=k&&k(y)}}),k)};EditorUi.prototype.getDatabaseItems=function(c,f,k){this.openDatabase(mxUtils.bind(this,
+function(m){try{k=k||"objects";var t=m.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),x=[];t.onsuccess=function(y){null==y.target.result?c(x):(x.push(y.target.result.value),y.target.result.continue())};t.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(c,f,k){this.openDatabase(mxUtils.bind(this,function(m){try{k=k||"objects";var t=m.transaction([k],"readonly").objectStore(k).getAllKeys();t.onsuccess=function(){c(t.result)};t.onerror=
+f}catch(x){null!=f&&f(x)}}),f)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,f){var k=this.getCurrentFile();null!=k?k.getComments(c,f):c([])};EditorUi.prototype.addComment=
+function(c,f,k){var m=this.getCurrentFile();null!=m?m.addComment(c,f,k):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var k=this.getCurrentFile();return null!=k?k.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=
+function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=
+function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,k,m,t,x,y,F){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,f,k,m,t,x,y,F)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");
+return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,k,m,t,x,y,F,E,C,S,U,Q,O,q,u){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,k,m,t,x,y,F,
+E,C,S,U,Q,O,q,u)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,k,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,f,k,m)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};
+EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,k,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,k,m)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,k,m,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,
+f,k,m,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var k=localStorage.key(f),m=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<m.length){var t="<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(t||m)&&c.push(k)}}return c};EditorUi.prototype.getLocalStorageFile=
+function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,l,n,d,v,A){function z(){for(var u=F.getElementsByTagName("div"),I=0,G=0;G<u.length;G++)"none"!=u[G].style.display&&u[G].parentNode==F&&I++;E.style.display=0==I?"block":"none"}function D(u,I,G,H){function g(){I.removeChild(K);I.removeChild(M);B.style.display="block";p.style.display="block"}t={div:I,comment:u,saveCallback:G,deleteOnCancel:H};var p=I.querySelector(".geCommentTxt"),B=I.querySelector(".geCommentActionsList"),K=document.createElement("textarea");K.className=
+"geCommentEditTxtArea";K.style.minHeight=p.offsetHeight+"px";K.value=u.content;I.insertBefore(K,p);var M=document.createElement("div");M.className="geCommentEditBtns";var N=mxUtils.button(mxResources.get("cancel"),function(){H?(I.parentNode.removeChild(I),z()):g();t=null});N.className="geCommentEditBtn";M.appendChild(N);var R=mxUtils.button(mxResources.get("save"),function(){p.innerText="";u.content=K.value;mxUtils.write(p,u.content);g();G(u);t=null});mxEvent.addListener(K,"keydown",mxUtils.bind(this,
+function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(R.click(),mxEvent.consume(T)):27==T.keyCode&&(N.click(),mxEvent.consume(T)))}));R.focus();R.className="geCommentEditBtn gePrimaryBtn";M.appendChild(R);I.insertBefore(M,p);B.style.display="none";p.style.display="none";K.focus()}function P(u,I){I.innerText="";u=new Date(u.modifiedDate);var G=b.timeSince(u);null==G&&(G=mxResources.get("lessThanAMinute"));mxUtils.write(I,mxResources.get("timeAgo",
+[G],"{1} ago"));I.setAttribute("title",u.toLocaleDateString()+" "+u.toLocaleTimeString())}function J(u){var I=document.createElement("img");I.className="geCommentBusyImg";I.src=IMAGE_PATH+"/spin.gif";u.appendChild(I);u.busyImg=I}function L(u){u.style.border="1px solid red";u.busyImg.parentNode==u&&u.removeChild(u.busyImg)}function c(u){u.style.border="";u.busyImg.parentNode==u&&u.removeChild(u.busyImg)}function f(u,I,G,H,g){function p(X,W,Y){var Z=document.createElement("li");Z.className="geCommentAction";
+var aa=document.createElement("a");aa.className="geCommentActionLnk";mxUtils.write(aa,X);Z.appendChild(aa);mxEvent.addListener(aa,"click",function(la){W(la,u);la.preventDefault();mxEvent.consume(la)});V.appendChild(Z);Y&&(Z.style.display="none")}function B(){function X(Z){W.push(Y);if(null!=Z.replies)for(var aa=0;aa<Z.replies.length;aa++)Y=Y.nextSibling,X(Z.replies[aa])}var W=[],Y=M;X(u);return{pdiv:Y,replies:W}}function K(X,W,Y,Z,aa){function la(){J(ka);u.addReply(ja,function(ba){ja.id=ba;u.replies.push(ja);
+c(ka);Y&&Y()},function(ba){fa();L(ka);b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,aa)}function fa(){D(ja,ka,function(ba){la()},!0)}var ca=B().pdiv,ja=b.newComment(X,b.getCurrentUser());ja.pCommentId=u.id;null==u.replies&&(u.replies=[]);var ka=f(ja,u.replies,ca,H+1);W?fa():la()}if(g||!u.isResolved){E.style.display="none";var M=document.createElement("div");M.className="geCommentContainer";M.setAttribute("data-commentId",u.id);M.style.marginLeft=20*H+
+5+"px";u.isResolved&&(x.style.opacity="0.7");var N=document.createElement("div");N.className="geCommentHeader";var R=document.createElement("img");R.className="geCommentUserImg";R.src=null!=u.user&&null!=u.user.pictureUrl?u.user.pictureUrl:Editor.userImage;N.appendChild(R);R=document.createElement("div");R.className="geCommentHeaderTxt";N.appendChild(R);var T=document.createElement("div");T.className="geCommentUsername";mxUtils.write(T,null!=u.user?u.user.displayName:mxResources.get("unknownUser"));
+R.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",u.id);P(u,T);R.appendChild(T);M.appendChild(N);N=document.createElement("div");N.className="geCommentTxt";mxUtils.write(N,u.content||"");M.appendChild(N);u.isLocked&&(M.style.opacity="0.5");N=document.createElement("div");N.className="geCommentActions";var V=document.createElement("ul");V.className="geCommentActionsList";N.appendChild(V);k||u.isLocked||0!=H&&!m||p(mxResources.get("reply"),
+function(){K("",!0)},u.isResolved);R=b.getCurrentUser();null==R||null==u.user||R.id!=u.user.id||k||u.isLocked||(p(mxResources.get("edit"),function(){function X(){D(u,M,function(){J(M);u.editComment(u.content,function(){c(M)},function(W){L(M);X();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}X()},u.isResolved),p(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){J(M);u.deleteComment(function(X){if(!0===X){X=M.querySelector(".geCommentTxt");
+X.innerText="";mxUtils.write(X,mxResources.get("msgDeleted"));var W=M.querySelectorAll(".geCommentAction");for(X=0;X<W.length;X++)W[X].parentNode.removeChild(W[X]);c(M);M.style.opacity="0.5"}else{W=B(u).replies;for(X=0;X<W.length;X++)F.removeChild(W[X]);for(X=0;X<I.length;X++)if(I[X]==u){I.splice(X,1);break}E.style.display=0==F.getElementsByTagName("div").length?"block":"none"}},function(X){L(M);b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},u.isResolved));
+k||u.isLocked||0!=H||p(u.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(X){function W(){var Y=X.target;Y.innerText="";u.isResolved=!u.isResolved;mxUtils.write(Y,u.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=u.isResolved?"none":"",aa=B(u).replies,la="light-dark("+(u.isResolved?"ghostWhite":"white")+", transparent)",fa=0;fa<aa.length;fa++){aa[fa].style.backgroundColor=la;for(var ca=aa[fa].querySelectorAll(".geCommentAction"),ja=0;ja<ca.length;ja++)ca[ja]!=
+Y.parentNode&&(ca[ja].style.display=Z);Q||(aa[fa].style.display="none")}z()}u.isResolved?K(mxResources.get("reOpened")+": ",!0,W,!1,!0):K(mxResources.get("markedAsResolved"),!1,W,!0)});M.appendChild(N);null!=G?F.insertBefore(M,G.nextSibling):F.appendChild(M);for(G=0;null!=u.replies&&G<u.replies.length;G++)N=u.replies[G],N.isResolved=u.isResolved,f(N,u.replies,null,H+1,g);null!=t&&(t.comment.id==u.id?(g=u.content,u.content=t.comment.content,D(u,M,t.saveCallback,t.deleteOnCancel),u.content=g):null==
+t.comment.id&&t.comment.pCommentId==u.id&&(F.appendChild(t.div),D(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return M}}var k=!b.canComment(),m=b.canReplyToReplies(),t=null,x=document.createElement("div");x.className="geCommentsWin";var y=EditorUi.compactUi?"26px":"30px",F=document.createElement("div");F.className="geCommentsList";F.style.bottom=parseInt(y)+7+"px";x.appendChild(F);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(E,
+mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=y;C.style.padding="3px 4px 4px 4px";y=document.createElement("a");y.className="geButton";if(!k){var S=y.cloneNode();S.style.backgroundImage="url("+Editor.plusImage+")";S.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(S,"click",function(u){function I(){D(G,H,function(g){J(H);b.addComment(g,function(p){g.id=p;O.push(g);c(H)},function(p){L(H);
+I();b.handleError(p,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var G=b.newComment("",b.getCurrentUser()),H=f(G,O,null,0);I();u.preventDefault();mxEvent.consume(u)});C.appendChild(S)}var U=y.cloneNode();U.style.backgroundImage="url("+Editor.checkImage+")";U.setAttribute("title",mxResources.get("showResolved"));var Q=!1;mxEvent.addListener(U,"click",function(u){(Q=!Q)?U.classList.add("geActiveItem"):U.classList.remove("geActiveItem");q();u.preventDefault();mxEvent.consume(u)});
+C.appendChild(U);b.commentsRefreshNeeded()&&(S=y.cloneNode(),S.style.backgroundImage="url("+Editor.refreshImage+")",S.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(S,"click",function(u){q();u.preventDefault();mxEvent.consume(u)}),C.appendChild(S));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="geButton geAdaptiveAsset",mxEvent.addListener(y,
+"click",function(u){A();u.preventDefault();mxEvent.consume(u)}),C.appendChild(y));x.appendChild(C);var O=[],q=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var u=t.div.querySelector(".geCommentEditTxtArea"),I=t.div.querySelector(".geCommentEditBtns");t.comment.content=u.value;u.parentNode.removeChild(u);I.parentNode.removeChild(I)}catch(G){b.handleError(G)}F.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+
+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";m=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(G){function H(g){if(null!=g){g.sort(function(B,K){return new Date(B.modifiedDate)-new Date(K.modifiedDate)});for(var p=0;p<g.length;p++)H(g[p].replies)}}G.sort(function(g,p){return new Date(g.modifiedDate)-new Date(p.modifiedDate)});F.innerText="";F.appendChild(E);E.style.display="block";O=G;for(G=0;G<O.length;G++)H(O[G].replies),f(O[G],O,null,0,Q);null!=t&&null==t.comment.id&&
+null==t.comment.pCommentId&&(F.appendChild(t.div),D(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(G){F.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(G&&G.message?": "+G.message:""));this.hasError=!0})):F.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});q();this.refreshComments=q;C=mxUtils.bind(this,function(){function u(p){var B=G[p.id];if(null!=B)for(P(p,B),B=0;null!=p.replies&&B<p.replies.length;B++)u(p.replies[B])}if(this.window.isVisible()){for(var I=
+F.querySelectorAll(".geCommentDate"),G={},H=0;H<I.length;H++){var g=I[H];G[g.getAttribute("data-commentId")]=g}for(H=0;H<O.length;H++)u(O[H])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=new mxWindow(mxResources.get("comments"),x,l,n,d,v,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,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,l,n,d,v,A,z,D,P,J,L){var c=document.createElement("div");c.style.textAlign="center";L=null!=L?L:44;var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight=L+"px";f.style.lineHeight="1.2em";mxUtils.write(f,l);c.appendChild(f);null!=J&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",l=document.createElement("img"),l.setAttribute("src",J),f.appendChild(l),
+c.appendChild(f));J=document.createElement("div");J.style.textAlign="center";J.style.whiteSpace="nowrap";var k=document.createElement("input");k.setAttribute("type","checkbox");A=mxUtils.button(A||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(k.checked)});A.className="geBtn";null!=D&&(A.innerHTML=D+"<br>"+A.innerHTML,A.style.display="inline-block",A.style.paddingBottom="8px",A.style.paddingTop="8px",A.style.height="auto",A.style.width="40%");b.editor.cancelFirst&&J.appendChild(A);
+var m=mxUtils.button(v||mxResources.get("ok"),function(){b.hideDialog();null!=n&&n(k.checked)});J.appendChild(m);null!=z?(m.innerHTML=z+"<br>"+m.innerHTML+"<br>",m.style.display="inline-block",m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.className="geBtn",m.style.width="40%"):m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||J.appendChild(A);c.appendChild(J);P?(J.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.style.marginBottom=
+"0px",f.appendChild(k),v=document.createElement("span"),mxUtils.write(v," "+mxResources.get("rememberThisSetting")),f.appendChild(v),c.appendChild(f),mxEvent.addListener(v,"click",function(t){k.checked=!k.checked;mxEvent.consume(t)})):J.style.marginTop="12px";this.init=function(){m.focus()};this.container=c},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};
HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};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,k,n,d,x){if(null!=k)for(var z=0;z<k.length;z++)null!=k[z]&&(b=this.patchPages(b,k[z],n,d,x));return b};
-EditorUi.prototype.patchPages=function(b,k,n,d,x){var z={},y=[],F={},N={},K={},L={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var c in d[EditorUi.DIFF_UPDATE])z[c]=d[EditorUi.DIFF_UPDATE][c];if(null!=k[EditorUi.DIFF_REMOVE])for(d=0;d<k[EditorUi.DIFF_REMOVE].length;d++)N[k[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=k[EditorUi.DIFF_INSERT])for(d=0;d<k[EditorUi.DIFF_INSERT].length;d++)F[k[EditorUi.DIFF_INSERT][d].previous]=k[EditorUi.DIFF_INSERT][d];if(null!=k[EditorUi.DIFF_UPDATE])for(c in k[EditorUi.DIFF_UPDATE])d=
-k[EditorUi.DIFF_UPDATE][c],null!=d.previous&&(L[d.previous]=c);if(null!=b){var f="";for(d=0;d<b.length;d++){var l=b[d].getId();K[l]=b[d];null!=L[f]||N[l]||null!=k[EditorUi.DIFF_UPDATE]&&null!=k[EditorUi.DIFF_UPDATE][l]&&null!=k[EditorUi.DIFF_UPDATE][l].previous||(L[f]=l);f=l}}var m={},t=mxUtils.bind(this,function(B){var E=null!=B?B.getId():"";if(null!=B&&!m[E]){m[E]=!0;y.push(B);var D=null!=k[EditorUi.DIFF_UPDATE]?k[EditorUi.DIFF_UPDATE][E]:null;null!=D&&(this.updatePageRoot(B),null!=D.name&&B.setName(D.name),
-null!=D.view&&this.patchViewState(B,D.view),null!=D.cells&&this.patchPage(B,D.cells,z[B.getId()],x),!n||null==D.cells&&null==D.view||(B.needsUpdate=!0))}B=L[E];null!=B&&(delete L[E],t(K[B]));B=F[E];null!=B&&(delete F[E],v(B))}),v=mxUtils.bind(this,function(B){B=mxUtils.parseXml(B.data).documentElement;B=new DiagramPage(B);this.updatePageRoot(B);var E=K[B.getId()];null==E?t(B):(this.patchPage(E,this.diffPages([E],[B]),z[E.getId()],x),n&&(E.needsUpdate=!0))});t();for(c in L)t(K[L[c]]),delete L[c];for(c in F)v(F[c]),
-delete F[c];return y};EditorUi.prototype.patchViewState=function(b,k){if(null!=b.viewState&&null!=k){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var n in k)try{this.patchViewStateProperty(b,k,n)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,k,n){b.viewState[n]=JSON.parse(k[n])};
-EditorUi.prototype.createParentLookup=function(b,k){function n(K){var L=d[K];null==L&&(L={inserted:[],moved:{}},d[K]=L);return L}var d={};if(null!=k[EditorUi.DIFF_INSERT])for(var x=0;x<k[EditorUi.DIFF_INSERT].length;x++){var z=k[EditorUi.DIFF_INSERT][x],y=null!=z.parent?z.parent:"",F=null!=z.previous?z.previous:"";n(y).inserted[F]=z}if(null!=k[EditorUi.DIFF_UPDATE])for(var N in k[EditorUi.DIFF_UPDATE])z=k[EditorUi.DIFF_UPDATE][N],null!=z.previous&&(y=z.parent,null==y&&(x=b.getCell(N),null!=x&&(x=
-b.getParent(x),null!=x&&(y=x.getId()))),null!=y&&(n(y).moved[z.previous]=N));return d};
-EditorUi.prototype.patchPage=function(b,k,n,d){var x=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),z=this.createParentLookup(x,k);x.beginUpdate();try{var y=x.updateEdgeParent,F=new mxDictionary,N=[];x.updateEdgeParent=function(v,B){!F.get(v)&&d&&(F.put(v,!0),N.push(v))};var K=z[""],L=null!=K&&null!=K.inserted?K.inserted[""]:null,c=null;null!=L&&(c=this.getCellForJson(L));if(null==c){var f=null!=K&&null!=K.moved?K.moved[""]:null;null!=f&&(c=x.getCell(f))}null!=c&&(x.setRoot(c),
-b.root=c,EditorUi.debug("EditorUi.patchPage: Root changed",c.id));this.patchCellRecursive(b,x,x.root,z,k);if(null!=k[EditorUi.DIFF_REMOVE])for(var l=0;l<k[EditorUi.DIFF_REMOVE].length;l++){f=k[EditorUi.DIFF_REMOVE][l];var m=x.getCell(f);null!=m&&x.remove(m)}if(null!=k[EditorUi.DIFF_UPDATE]){var t=null!=n&&null!=n.cells?n.cells[EditorUi.DIFF_UPDATE]:null;for(f in k[EditorUi.DIFF_UPDATE])m=x.getCell(f),null!=m?this.patchCell(x,m,k[EditorUi.DIFF_UPDATE][f],null!=t?t[f]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",
-f,"diff",[k[EditorUi.DIFF_UPDATE][f]])}if(null!=k[EditorUi.DIFF_INSERT])for(l=0;l<k[EditorUi.DIFF_INSERT].length;l++)L=k[EditorUi.DIFF_INSERT][l],m=x.getCell(L.id),null!=m&&(x.setTerminal(m,x.getCell(L.source),!0),x.setTerminal(m,x.getCell(L.target),!1));x.updateEdgeParent=y;if(d&&0<N.length)for(l=0;l<N.length;l++)x.contains(N[l])&&x.updateEdgeParent(N[l])}finally{x.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,k,n,d,x){if(null!=n){var z=d[n.getId()],y=null!=z&&null!=z.inserted?z.inserted:{};z=null!=z&&null!=z.moved?z.moved:{};for(var F=0,N=k.getChildCount(n),K="",L=0;L<N;L++){var c=k.getChildAt(n,L).getId();null==z[K]&&(null==x[EditorUi.DIFF_UPDATE]||null==x[EditorUi.DIFF_UPDATE][c]||null==x[EditorUi.DIFF_UPDATE][c].previous&&null==x[EditorUi.DIFF_UPDATE][c].parent)&&(z[K]=c);K=c}N=mxUtils.bind(this,function(f,l){var m=null!=f?f.getId():"";null==m&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
-"cell",f);null!=f&&l&&(l=k.getCell(m),null!=l&&l!=f&&(f=null));null!=f&&(k.getChildAt(n,F)!=f&&k.add(n,f,F),this.patchCellRecursive(b,k,f,d,x),F++);return m});for(K=[null];0<K.length;)if(L=K.shift(),L=N(null!=L?L.child:null,null!=L?L.insert:!1),c=z[L],null!=c&&(delete z[L],K.push({child:k.getCell(c)})),c=y[L],null!=c&&(delete y[L],K.push({child:this.getCellForJson(c),insert:!0})),0==K.length){for(L in z)K.push({child:k.getCell(z[L])}),delete z[L];for(L in y)K.push({child:this.getCellForJson(y[L]),
-insert:!0}),delete y[L]}}};
-EditorUi.prototype.patchCell=function(b,k,n,d){if(null!=k&&null!=n){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in n?b.setValue(k,n.value):null!=n.xmlValue&&b.setValue(k,mxUtils.parseXml(n.xmlValue).documentElement);null!=d&&null!=d.style||null==n.style||b.setStyle(k,n.style);null!=n.visible&&b.setVisible(k,1==n.visible);null!=n.collapsed&&b.setCollapsed(k,1==n.collapsed);null!=n.vertex&&(k.vertex=1==n.vertex);null!=n.edge&&(k.edge=1==n.edge);null!=n.connectable&&(k.connectable=
-1==n.connectable);null!=n.geometry&&b.setGeometry(k,this.codec.decode(mxUtils.parseXml(n.geometry).documentElement));null!=n.source&&b.setTerminal(k,b.getCell(n.source),!0);null!=n.target&&b.setTerminal(k,b.getCell(n.target),!1);for(var x in n)this.cellProperties[x]||(k[x]=n[x])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var k=null;null!=b&&(k=mxUtils.getXml(b));return k};
-EditorUi.prototype.getNodeForPages=function(b){var k=null;if(null!=this.fileNode&&null!=b){k=this.fileNode.cloneNode(!1);for(var n=0;n<b.length;n++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[n].root));this.editor.graph.saveViewState(b[n].viewState,d);var x=b[n].node.cloneNode(!1);x.appendChild(d);k.appendChild(x)}}return k};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
-EditorUi.prototype.getPagesForNode=function(b,k){var n=this.editor.extractGraphModel(b,!0,!0);null!=n&&(b=n);k=b.getElementsByTagName(k||"diagram");n=[];if(0<k.length)for(b=0;b<k.length;b++){var d=new DiagramPage(k[b]);this.updatePageRoot(d,!0);n.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),d.node.appendChild(b.cloneNode(!0)),n.push(d));return n};
-EditorUi.prototype.diffPages=function(b,k){var n=[],d=[],x={},z={},y={},F=null;if(null!=b&&null!=k){for(var N=0;N<k.length;N++)z[k[N].getId()]={page:k[N],prev:F},F=k[N];F=null;for(N=0;N<b.length;N++){var K=b[N].getId();k=z[K];if(null==k)d.push(K);else{this.updatePageRoot(b[N]);this.updatePageRoot(k.page);var L=this.diffCells(b[N].root,k.page.root),c={};mxUtils.isEmptyObject(L)||(c.cells=L);L=this.diffViewState(b[N],k.page);mxUtils.isEmptyObject(L)||(c.view=L);if((null!=k.prev?null==F:null!=F)||null!=
-F&&null!=k.prev&&F.getId()!=k.prev.getId())c.previous=null!=k.prev?k.prev.getId():"";null!=k.page.getName()&&b[N].getName()!=k.page.getName()&&(c.name=k.page.getName());mxUtils.isEmptyObject(c)||(y[K]=c)}delete z[b[N].getId()];F=b[N]}for(K in z)k=z[K],n.push({id:k.page.getId(),data:mxUtils.getXml(k.page.node),previous:null!=k.prev?k.prev.getId():""});mxUtils.isEmptyObject(y)||(x[EditorUi.DIFF_UPDATE]=y);0<d.length&&(x[EditorUi.DIFF_REMOVE]=d);0<n.length&&(x[EditorUi.DIFF_INSERT]=n)}return x};
-EditorUi.prototype.createCellLookup=function(b,k,n){n=null!=n?n:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):n[b.getId()]={cell:b,prev:k};var d=b.getChildCount();k=null;for(var x=0;x<d;x++){var z=b.getChildAt(x);this.createCellLookup(z,k,n);k=z}return n};
-EditorUi.prototype.diffCellRecursive=function(b,k,n,d,x){d=null!=d?d:{};var z=n[b.getId()];delete n[b.getId()];if(null==z)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):x.push(b.getId());else{var y=this.diffCell(b,z.cell);if(null!=y.parent||(null!=z.prev?null==k:null!=k)||null!=k&&null!=z.prev&&k.getId()!=z.prev.getId())y.previous=null!=z.prev?z.prev.getId():"";mxUtils.isEmptyObject(y)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",
-b,"diff",y):d[b.getId()]=y)}z=b.getChildCount();k=null;for(y=0;y<z;y++){var F=b.getChildAt(y);this.diffCellRecursive(F,k,n,d,x);k=F}return d};
-EditorUi.prototype.diffCells=function(b,k){var n={},d=[],x=this.createCellLookup(k);k.id==b.id?(k=[],b=this.diffCellRecursive(b,null,x,null,k),mxUtils.isEmptyObject(b)||(n[EditorUi.DIFF_UPDATE]=b),0<k.length&&(n[EditorUi.DIFF_REMOVE]=k)):EditorUi.debug("EditorUi.diffCells: Root changed",k.id);for(var z in x)b=x[z],d.push(this.getJsonForCell(b.cell,b.prev));0<d.length&&(n[EditorUi.DIFF_INSERT]=d);return n};
-EditorUi.prototype.diffViewState=function(b,k){var n=b.viewState,d=k.viewState,x={};b==this.currentPage&&(n=this.editor.graph.getViewState());k==this.currentPage&&(d=this.editor.graph.getViewState());if(null!=n&&null!=d)for(var z in this.viewStateProperties)this.diffViewStateProperty(n,d,z,x);return x};EditorUi.prototype.diffViewStateProperty=function(b,k,n,d){b=JSON.stringify(this.getViewStateProperty(b,n));k=JSON.stringify(this.getViewStateProperty(k,n));b!=k&&(d[n]=k)};
-EditorUi.prototype.getViewStateProperty=function(b,k){b=b[k];"backgroundImage"==k&&null!=b&&null!=b.originalSrc?b={originalSrc:b.originalSrc}:"extFonts"==k&&null==b&&(b=[]);return b};
-EditorUi.prototype.getCellForJson=function(b){var k=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,n=b.value;null!=b.xmlValue&&(n=mxUtils.parseXml(b.xmlValue).documentElement);k=new mxCell(n,k,b.style);k.connectable=0!=b.connectable;k.collapsed=1==b.collapsed;k.visible=0!=b.visible;k.vertex=1==b.vertex;k.edge=1==b.edge;k.id=b.id;for(var d in b)this.cellProperties[d]||(k[d]=b[d]);return k};
-EditorUi.prototype.getJsonForCell=function(b,k){var n={id:b.getId()};b.vertex&&(n.vertex=1);b.edge&&(n.edge=1);b.connectable||(n.connectable=0);null!=b.parent&&(n.parent=b.parent.getId());null!=k&&(n.previous=k.getId());null!=b.source&&(n.source=b.source.getId());null!=b.target&&(n.target=b.target.getId());null!=b.style&&(n.style=b.style);null!=b.geometry&&(n.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(n.collapsed=1);b.visible||(n.visible=0);null!=b.value&&("object"===typeof b.value&&
+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,l,n,d,v){if(null!=l)for(var A=0;A<l.length;A++)null!=l[A]&&(b=this.patchPages(b,l[A],n,d,v));return b};
+EditorUi.prototype.patchPages=function(b,l,n,d,v){var A={},z=[],D={},P={},J={},L={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var c in d[EditorUi.DIFF_UPDATE])A[c]=d[EditorUi.DIFF_UPDATE][c];if(null!=l[EditorUi.DIFF_REMOVE])for(d=0;d<l[EditorUi.DIFF_REMOVE].length;d++)P[l[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=l[EditorUi.DIFF_INSERT])for(d=0;d<l[EditorUi.DIFF_INSERT].length;d++)D[l[EditorUi.DIFF_INSERT][d].previous]=l[EditorUi.DIFF_INSERT][d];if(null!=l[EditorUi.DIFF_UPDATE])for(c in l[EditorUi.DIFF_UPDATE])d=
+l[EditorUi.DIFF_UPDATE][c],null!=d.previous&&(L[d.previous]=c);if(null!=b){var f="";for(d=0;d<b.length;d++){var k=b[d].getId();J[k]=b[d];null!=L[f]||P[k]||null!=l[EditorUi.DIFF_UPDATE]&&null!=l[EditorUi.DIFF_UPDATE][k]&&null!=l[EditorUi.DIFF_UPDATE][k].previous||(L[f]=k);f=k}}var m={},t=mxUtils.bind(this,function(y){var F=null!=y?y.getId():"";if(null!=y&&!m[F]){m[F]=!0;z.push(y);var E=null!=l[EditorUi.DIFF_UPDATE]?l[EditorUi.DIFF_UPDATE][F]:null;null!=E&&(this.updatePageRoot(y),null!=E.name&&y.setName(E.name),
+null!=E.view&&this.patchViewState(y,E.view),null!=E.cells&&this.patchPage(y,E.cells,A[y.getId()],v),!n||null==E.cells&&null==E.view||(y.needsUpdate=!0))}y=L[F];null!=y&&(delete L[F],t(J[y]));y=D[F];null!=y&&(delete D[F],x(y))}),x=mxUtils.bind(this,function(y){y=mxUtils.parseXml(y.data).documentElement;y=new DiagramPage(y);this.updatePageRoot(y);var F=J[y.getId()];null==F?t(y):(this.patchPage(F,this.diffPages([F],[y]),A[F.getId()],v),n&&(F.needsUpdate=!0))});t();for(c in L)t(J[L[c]]),delete L[c];for(c in D)x(D[c]),
+delete D[c];return z};EditorUi.prototype.patchViewState=function(b,l){if(null!=b.viewState&&null!=l){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var n in l)try{this.patchViewStateProperty(b,l,n)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,l,n){b.viewState[n]=JSON.parse(l[n])};
+EditorUi.prototype.createParentLookup=function(b,l){function n(J){var L=d[J];null==L&&(L={inserted:[],moved:{}},d[J]=L);return L}var d={};if(null!=l[EditorUi.DIFF_INSERT])for(var v=0;v<l[EditorUi.DIFF_INSERT].length;v++){var A=l[EditorUi.DIFF_INSERT][v],z=null!=A.parent?A.parent:"",D=null!=A.previous?A.previous:"";n(z).inserted[D]=A}if(null!=l[EditorUi.DIFF_UPDATE])for(var P in l[EditorUi.DIFF_UPDATE])A=l[EditorUi.DIFF_UPDATE][P],null!=A.previous&&(z=A.parent,null==z&&(v=b.getCell(P),null!=v&&(v=
+b.getParent(v),null!=v&&(z=v.getId()))),null!=z&&(n(z).moved[A.previous]=P));return d};
+EditorUi.prototype.patchPage=function(b,l,n,d){var v=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),A=this.createParentLookup(v,l);v.beginUpdate();try{var z=v.updateEdgeParent,D=new mxDictionary,P=[];v.updateEdgeParent=function(x,y){!D.get(x)&&d&&(D.put(x,!0),P.push(x))};var J=A[""],L=null!=J&&null!=J.inserted?J.inserted[""]:null,c=null;null!=L&&(c=this.getCellForJson(L));if(null==c){var f=null!=J&&null!=J.moved?J.moved[""]:null;null!=f&&(c=v.getCell(f))}null!=c&&(v.setRoot(c),
+b.root=c,EditorUi.debug("EditorUi.patchPage: Root changed",c.id));this.patchCellRecursive(b,v,v.root,A,l);if(null!=l[EditorUi.DIFF_REMOVE])for(var k=0;k<l[EditorUi.DIFF_REMOVE].length;k++){f=l[EditorUi.DIFF_REMOVE][k];var m=v.getCell(f);null!=m&&v.remove(m)}if(null!=l[EditorUi.DIFF_UPDATE]){var t=null!=n&&null!=n.cells?n.cells[EditorUi.DIFF_UPDATE]:null;for(f in l[EditorUi.DIFF_UPDATE])m=v.getCell(f),null!=m?this.patchCell(v,m,l[EditorUi.DIFF_UPDATE][f],null!=t?t[f]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",
+f,"diff",[l[EditorUi.DIFF_UPDATE][f]])}if(null!=l[EditorUi.DIFF_INSERT])for(k=0;k<l[EditorUi.DIFF_INSERT].length;k++)L=l[EditorUi.DIFF_INSERT][k],m=v.getCell(L.id),null!=m&&(v.setTerminal(m,v.getCell(L.source),!0),v.setTerminal(m,v.getCell(L.target),!1));v.updateEdgeParent=z;if(d&&0<P.length)for(k=0;k<P.length;k++)v.contains(P[k])&&v.updateEdgeParent(P[k])}finally{v.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,l,n,d,v){if(null!=n){var A=d[n.getId()],z=null!=A&&null!=A.inserted?A.inserted:{};A=null!=A&&null!=A.moved?A.moved:{};for(var D=0,P=l.getChildCount(n),J="",L=0;L<P;L++){var c=l.getChildAt(n,L).getId();null==A[J]&&(null==v[EditorUi.DIFF_UPDATE]||null==v[EditorUi.DIFF_UPDATE][c]||null==v[EditorUi.DIFF_UPDATE][c].previous&&null==v[EditorUi.DIFF_UPDATE][c].parent)&&(A[J]=c);J=c}P=mxUtils.bind(this,function(f,k){var m=null!=f?f.getId():"";null==m&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
+"cell",f);null!=f&&k&&(k=l.getCell(m),null!=k&&k!=f&&(f=null));null!=f&&(l.getChildAt(n,D)!=f&&l.add(n,f,D),this.patchCellRecursive(b,l,f,d,v),D++);return m});for(J=[null];0<J.length;)if(L=J.shift(),L=P(null!=L?L.child:null,null!=L?L.insert:!1),c=A[L],null!=c&&(delete A[L],J.push({child:l.getCell(c)})),c=z[L],null!=c&&(delete z[L],J.push({child:this.getCellForJson(c),insert:!0})),0==J.length){for(L in A)J.push({child:l.getCell(A[L])}),delete A[L];for(L in z)J.push({child:this.getCellForJson(z[L]),
+insert:!0}),delete z[L]}}};
+EditorUi.prototype.patchCell=function(b,l,n,d){if(null!=l&&null!=n){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in n?b.setValue(l,n.value):null!=n.xmlValue&&b.setValue(l,mxUtils.parseXml(n.xmlValue).documentElement);null!=d&&null!=d.style||null==n.style||b.setStyle(l,n.style);null!=n.visible&&b.setVisible(l,1==n.visible);null!=n.collapsed&&b.setCollapsed(l,1==n.collapsed);null!=n.vertex&&(l.vertex=1==n.vertex);null!=n.edge&&(l.edge=1==n.edge);null!=n.connectable&&(l.connectable=
+1==n.connectable);null!=n.geometry&&b.setGeometry(l,this.codec.decode(mxUtils.parseXml(n.geometry).documentElement));null!=n.source&&b.setTerminal(l,b.getCell(n.source),!0);null!=n.target&&b.setTerminal(l,b.getCell(n.target),!1);for(var v in n)this.cellProperties[v]||(l[v]=n[v])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var l=null;null!=b&&(l=mxUtils.getXml(b));return l};
+EditorUi.prototype.getNodeForPages=function(b){var l=null;if(null!=this.fileNode&&null!=b){l=this.fileNode.cloneNode(!1);for(var n=0;n<b.length;n++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[n].root));this.editor.graph.saveViewState(b[n].viewState,d);var v=b[n].node.cloneNode(!1);v.appendChild(d);l.appendChild(v)}}return l};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
+EditorUi.prototype.getPagesForNode=function(b,l){var n=this.editor.extractGraphModel(b,!0,!0);null!=n&&(b=n);l=b.getElementsByTagName(l||"diagram");n=[];if(0<l.length)for(b=0;b<l.length;b++){var d=new DiagramPage(l[b]);this.updatePageRoot(d,!0);n.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),d.node.appendChild(b.cloneNode(!0)),n.push(d));return n};
+EditorUi.prototype.diffPages=function(b,l){var n=[],d=[],v={},A={},z={},D=null;if(null!=b&&null!=l){for(var P=0;P<l.length;P++)A[l[P].getId()]={page:l[P],prev:D},D=l[P];D=null;for(P=0;P<b.length;P++){var J=b[P].getId();l=A[J];if(null==l)d.push(J);else{this.updatePageRoot(b[P]);this.updatePageRoot(l.page);var L=this.diffCells(b[P].root,l.page.root),c={};mxUtils.isEmptyObject(L)||(c.cells=L);L=this.diffViewState(b[P],l.page);mxUtils.isEmptyObject(L)||(c.view=L);if((null!=l.prev?null==D:null!=D)||null!=
+D&&null!=l.prev&&D.getId()!=l.prev.getId())c.previous=null!=l.prev?l.prev.getId():"";null!=l.page.getName()&&b[P].getName()!=l.page.getName()&&(c.name=l.page.getName());mxUtils.isEmptyObject(c)||(z[J]=c)}delete A[b[P].getId()];D=b[P]}for(J in A)l=A[J],n.push({id:l.page.getId(),data:mxUtils.getXml(l.page.node),previous:null!=l.prev?l.prev.getId():""});mxUtils.isEmptyObject(z)||(v[EditorUi.DIFF_UPDATE]=z);0<d.length&&(v[EditorUi.DIFF_REMOVE]=d);0<n.length&&(v[EditorUi.DIFF_INSERT]=n)}return v};
+EditorUi.prototype.createCellLookup=function(b,l,n){n=null!=n?n:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):n[b.getId()]={cell:b,prev:l};var d=b.getChildCount();l=null;for(var v=0;v<d;v++){var A=b.getChildAt(v);this.createCellLookup(A,l,n);l=A}return n};
+EditorUi.prototype.diffCellRecursive=function(b,l,n,d,v){d=null!=d?d:{};var A=n[b.getId()];delete n[b.getId()];if(null==A)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):v.push(b.getId());else{var z=this.diffCell(b,A.cell);if(null!=z.parent||(null!=A.prev?null==l:null!=l)||null!=l&&null!=A.prev&&l.getId()!=A.prev.getId())z.previous=null!=A.prev?A.prev.getId():"";mxUtils.isEmptyObject(z)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",
+b,"diff",z):d[b.getId()]=z)}A=b.getChildCount();l=null;for(z=0;z<A;z++){var D=b.getChildAt(z);this.diffCellRecursive(D,l,n,d,v);l=D}return d};
+EditorUi.prototype.diffCells=function(b,l){var n={},d=[],v=this.createCellLookup(l);l.id==b.id?(l=[],b=this.diffCellRecursive(b,null,v,null,l),mxUtils.isEmptyObject(b)||(n[EditorUi.DIFF_UPDATE]=b),0<l.length&&(n[EditorUi.DIFF_REMOVE]=l)):EditorUi.debug("EditorUi.diffCells: Root changed",l.id);for(var A in v)b=v[A],d.push(this.getJsonForCell(b.cell,b.prev));0<d.length&&(n[EditorUi.DIFF_INSERT]=d);return n};
+EditorUi.prototype.diffViewState=function(b,l){var n=b.viewState,d=l.viewState,v={};b==this.currentPage&&(n=this.editor.graph.getViewState());l==this.currentPage&&(d=this.editor.graph.getViewState());if(null!=n&&null!=d)for(var A in this.viewStateProperties)this.diffViewStateProperty(n,d,A,v);return v};EditorUi.prototype.diffViewStateProperty=function(b,l,n,d){b=JSON.stringify(this.getViewStateProperty(b,n));l=JSON.stringify(this.getViewStateProperty(l,n));b!=l&&(d[n]=l)};
+EditorUi.prototype.getViewStateProperty=function(b,l){b=b[l];"backgroundImage"==l&&null!=b&&null!=b.originalSrc?b={originalSrc:b.originalSrc}:"extFonts"==l&&null==b&&(b=[]);return b};
+EditorUi.prototype.getCellForJson=function(b){var l=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,n=b.value;null!=b.xmlValue&&(n=mxUtils.parseXml(b.xmlValue).documentElement);l=new mxCell(n,l,b.style);l.connectable=0!=b.connectable;l.collapsed=1==b.collapsed;l.visible=0!=b.visible;l.vertex=1==b.vertex;l.edge=1==b.edge;l.id=b.id;for(var d in b)this.cellProperties[d]||(l[d]=b[d]);return l};
+EditorUi.prototype.getJsonForCell=function(b,l){var n={id:b.getId()};b.vertex&&(n.vertex=1);b.edge&&(n.edge=1);b.connectable||(n.connectable=0);null!=b.parent&&(n.parent=b.parent.getId());null!=l&&(n.previous=l.getId());null!=b.source&&(n.source=b.source.getId());null!=b.target&&(n.target=b.target.getId());null!=b.style&&(n.style=b.style);null!=b.geometry&&(n.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(n.collapsed=1);b.visible||(n.visible=0);null!=b.value&&("object"===typeof b.value&&
"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?n.xmlValue=mxUtils.getXml(b.value):n.value=b.value);for(var d in b)this.cellProperties[d]||"function"===typeof b[d]||(n[d]=b[d]);return n};
-EditorUi.prototype.diffCell=function(b,k){function n(y){return null!=y&&"object"===typeof y&&"number"===typeof y.nodeType&&"string"===typeof y.nodeName&&"function"===typeof y.getAttribute}var d={};b.vertex!=k.vertex&&(d.vertex=k.vertex?1:0);b.edge!=k.edge&&(d.edge=k.edge?1:0);b.connectable!=k.connectable&&(d.connectable=k.connectable?1:0);if((null!=b.parent?null==k.parent:null!=k.parent)||null!=b.parent&&null!=k.parent&&b.parent.getId()!=k.parent.getId())d.parent=null!=k.parent?k.parent.getId():"";
-if((null!=b.source?null==k.source:null!=k.source)||null!=b.source&&null!=k.source&&b.source.getId()!=k.source.getId())d.source=null!=k.source?k.source.getId():"";if((null!=b.target?null==k.target:null!=k.target)||null!=b.target&&null!=k.target&&b.target.getId()!=k.target.getId())d.target=null!=k.target?k.target.getId():"";n(b.value)&&n(k.value)?b.value.isEqualNode(k.value)||(d.xmlValue=mxUtils.getXml(k.value)):b.value!=k.value&&(n(k.value)?d.xmlValue=mxUtils.getXml(k.value):d.value=null!=k.value?
-k.value:null);b.style!=k.style&&(d.style=k.style);b.visible!=k.visible&&(d.visible=k.visible?1:0);b.collapsed!=k.collapsed&&(d.collapsed=k.collapsed?1:0);if(!this.isObjectEqual(b.geometry,k.geometry,new mxGeometry)){var x=this.codec.encode(k.geometry);null!=x&&(d.geometry=mxUtils.getXml(x))}for(var z in b)this.cellProperties[z]||"function"===typeof b[z]||"function"===typeof k[z]||b[z]==k[z]||(d[z]=void 0===k[z]?null:k[z]);for(z in k)z in b||this.cellProperties[z]||"function"===typeof b[z]||"function"===
-typeof k[z]||b[z]==k[z]||(d[z]=void 0===k[z]?null:k[z]);return d};EditorUi.prototype.resolveCrossReferences=function(b,k){var n={};mxUtils.isEmptyObject(k)||(this.adoptTheirPages(b,k,n),this.adoptTheirCells(b,k,n));EditorUi.debug("EditorUi.resolveCrossReferences",[this],"ownDiff",b,"theirDiff",k,"resolve",n);return n};
-EditorUi.prototype.adoptTheirPages=function(b,k,n){var d={};if(null!=k[EditorUi.DIFF_INSERT])for(var x=0;x<k[EditorUi.DIFF_INSERT].length;x++)d[k[EditorUi.DIFF_INSERT][x].id]=k[EditorUi.DIFF_INSERT][x];for(var z in b[EditorUi.DIFF_UPDATE])null!=d[z]&&(null==n[EditorUi.DIFF_INSERT]&&(n[EditorUi.DIFF_INSERT]=[]),null==n[EditorUi.DIFF_UPDATE]&&(n[EditorUi.DIFF_UPDATE]={}),n[EditorUi.DIFF_INSERT].push(d[z]),n[EditorUi.DIFF_UPDATE][z]=b[EditorUi.DIFF_UPDATE][z],delete b[EditorUi.DIFF_UPDATE][z])};
-EditorUi.prototype.adoptTheirCells=function(b,k,n){for(var d in b[EditorUi.DIFF_UPDATE]){var x=b[EditorUi.DIFF_UPDATE][d];null!=x.cells&&this.adoptTheirCellsFromPage(x,k,d,n)}};
-EditorUi.prototype.adoptTheirCellsFromPage=function(b,k,n,d){var x=null!=k[EditorUi.DIFF_UPDATE]?k[EditorUi.DIFF_UPDATE][n]:null;if(null!=x&&null!=x.cells&&null!=x.cells[EditorUi.DIFF_INSERT]){k=x.cells[EditorUi.DIFF_UPDATE];for(var z={},y=0;y<x.cells[EditorUi.DIFF_INSERT].length;y++){var F=x.cells[EditorUi.DIFF_INSERT][y];z[F.id]=F}x={cells:{}};x.cells[EditorUi.DIFF_INSERT]=[];x.cells[EditorUi.DIFF_UPDATE]={};x.inserted={};this.resolveOwnInsertedCells(b.cells[EditorUi.DIFF_INSERT],z,x);this.resolveOwnUpdatedCells(b.cells[EditorUi.DIFF_UPDATE],
-z,k,x);null==d[EditorUi.DIFF_UPDATE]&&(d[EditorUi.DIFF_UPDATE]={});delete x.inserted;d[EditorUi.DIFF_UPDATE][n]=x}};EditorUi.prototype.resolveOwnInsertedCells=function(b,k,n){if(null!=b)for(var d=0;d<b.length;d++){var x=b[d];null!=x&&(this.adoptParentCell(x.id,null,k,n),this.adoptTerminalCell(x.id,x,k,!0,n),this.adoptTerminalCell(x.id,x,k,!1,n))}};
-EditorUi.prototype.resolveOwnUpdatedCells=function(b,k,n,d){if(null!=b)for(var x in b){var z=k[x];null!=z?(d.inserted[x]||(d.cells[EditorUi.DIFF_INSERT].push(z),d.inserted[x]=!0),d.cells[EditorUi.DIFF_UPDATE][x]=b[x]):null!=n&&(z=n[x],null!=z&&(this.adoptParentCell(x,z,k,d),this.adoptTerminalCell(x,z,k,!0,d,x),this.adoptTerminalCell(x,z,k,!1,d,x)))}};
-EditorUi.prototype.adoptParentCell=function(b,k,n,d){var x=n[b],z=null!=k?k.parent:null!=x?x.parent:null;null!=z&&this.adoptParentCell(z,null,n,d);null!=x?d.inserted[b]||(d.cells[EditorUi.DIFF_INSERT].push(x),d.inserted[b]=!0):null!=k&&(null==d.cells[EditorUi.DIFF_UPDATE][b]&&(d.cells[EditorUi.DIFF_UPDATE][b]={}),d.cells[EditorUi.DIFF_UPDATE][b]=k)};
-EditorUi.prototype.adoptTerminalCell=function(b,k,n,d,x){k=d?k.source:k.target;n=n[k];null!=n&&(x.inserted[k]||(x.cells[EditorUi.DIFF_INSERT].push(n),x.inserted[k]=!0),null==x.cells[EditorUi.DIFF_UPDATE][b]&&(x.cells[EditorUi.DIFF_UPDATE][b]={}),x.cells[EditorUi.DIFF_UPDATE][b][d?"source":"target"]=k)};
-EditorUi.prototype.isObjectEqual=function(b,k,n){if(null==b&&null==k)return!0;if(null!=b?null==k:null!=k)return!1;var d=function(x,z){return null==n||n[x]!=z?!0===z?1:z:void 0};return JSON.stringify(b,d)==JSON.stringify(k,d)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
-mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings())mxSettings.settings.ui=b,mxSettings.save();else{var k=mxSettings.getMainSettings();k.ui=b;localStorage.setItem(".drawio-config",JSON.stringify(k))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){var k=b?mxSettings.settings.darkGridColor:mxSettings.settings.gridColor;mxUtils.isLightDarkColor(k)&&
-(k=mxUtils.getLightDarkColor(k),k=b?k.dark:k.light);return k},setGridColor:function(b,k){k?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=
-b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],k=0;k<b.length;k++)"string"===typeof b[k]&&(b[k]={name:b[k],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,
+EditorUi.prototype.diffCell=function(b,l){function n(z){return null!=z&&"object"===typeof z&&"number"===typeof z.nodeType&&"string"===typeof z.nodeName&&"function"===typeof z.getAttribute}var d={};b.vertex!=l.vertex&&(d.vertex=l.vertex?1:0);b.edge!=l.edge&&(d.edge=l.edge?1:0);b.connectable!=l.connectable&&(d.connectable=l.connectable?1:0);if((null!=b.parent?null==l.parent:null!=l.parent)||null!=b.parent&&null!=l.parent&&b.parent.getId()!=l.parent.getId())d.parent=null!=l.parent?l.parent.getId():"";
+if((null!=b.source?null==l.source:null!=l.source)||null!=b.source&&null!=l.source&&b.source.getId()!=l.source.getId())d.source=null!=l.source?l.source.getId():"";if((null!=b.target?null==l.target:null!=l.target)||null!=b.target&&null!=l.target&&b.target.getId()!=l.target.getId())d.target=null!=l.target?l.target.getId():"";n(b.value)&&n(l.value)?b.value.isEqualNode(l.value)||(d.xmlValue=mxUtils.getXml(l.value)):b.value!=l.value&&(n(l.value)?d.xmlValue=mxUtils.getXml(l.value):d.value=null!=l.value?
+l.value:null);b.style!=l.style&&(d.style=l.style);b.visible!=l.visible&&(d.visible=l.visible?1:0);b.collapsed!=l.collapsed&&(d.collapsed=l.collapsed?1:0);if(!this.isObjectEqual(b.geometry,l.geometry,new mxGeometry)){var v=this.codec.encode(l.geometry);null!=v&&(d.geometry=mxUtils.getXml(v))}for(var A in b)this.cellProperties[A]||"function"===typeof b[A]||"function"===typeof l[A]||b[A]==l[A]||(d[A]=void 0===l[A]?null:l[A]);for(A in l)A in b||this.cellProperties[A]||"function"===typeof b[A]||"function"===
+typeof l[A]||b[A]==l[A]||(d[A]=void 0===l[A]?null:l[A]);return d};EditorUi.prototype.resolveCrossReferences=function(b,l){var n={};mxUtils.isEmptyObject(l)||(this.adoptTheirPages(b,l,n),this.adoptTheirCells(b,l,n));EditorUi.debug("EditorUi.resolveCrossReferences",[this],"ownDiff",b,"theirDiff",l,"resolve",n);return n};
+EditorUi.prototype.adoptTheirPages=function(b,l,n){var d={};if(null!=l[EditorUi.DIFF_INSERT])for(var v=0;v<l[EditorUi.DIFF_INSERT].length;v++)d[l[EditorUi.DIFF_INSERT][v].id]=l[EditorUi.DIFF_INSERT][v];for(var A in b[EditorUi.DIFF_UPDATE])null!=d[A]&&(null==n[EditorUi.DIFF_INSERT]&&(n[EditorUi.DIFF_INSERT]=[]),null==n[EditorUi.DIFF_UPDATE]&&(n[EditorUi.DIFF_UPDATE]={}),n[EditorUi.DIFF_INSERT].push(d[A]),n[EditorUi.DIFF_UPDATE][A]=b[EditorUi.DIFF_UPDATE][A],delete b[EditorUi.DIFF_UPDATE][A])};
+EditorUi.prototype.adoptTheirCells=function(b,l,n){for(var d in b[EditorUi.DIFF_UPDATE]){var v=b[EditorUi.DIFF_UPDATE][d];null!=v.cells&&this.adoptTheirCellsFromPage(v,l,d,n)}};
+EditorUi.prototype.adoptTheirCellsFromPage=function(b,l,n,d){var v=null!=l[EditorUi.DIFF_UPDATE]?l[EditorUi.DIFF_UPDATE][n]:null;if(null!=v&&null!=v.cells&&null!=v.cells[EditorUi.DIFF_INSERT]){l=v.cells[EditorUi.DIFF_UPDATE];for(var A={},z=0;z<v.cells[EditorUi.DIFF_INSERT].length;z++){var D=v.cells[EditorUi.DIFF_INSERT][z];A[D.id]=D}v={cells:{}};v.cells[EditorUi.DIFF_INSERT]=[];v.cells[EditorUi.DIFF_UPDATE]={};v.inserted={};this.resolveOwnInsertedCells(b.cells[EditorUi.DIFF_INSERT],A,v);this.resolveOwnUpdatedCells(b.cells[EditorUi.DIFF_UPDATE],
+A,l,v);null==d[EditorUi.DIFF_UPDATE]&&(d[EditorUi.DIFF_UPDATE]={});delete v.inserted;d[EditorUi.DIFF_UPDATE][n]=v}};EditorUi.prototype.resolveOwnInsertedCells=function(b,l,n){if(null!=b)for(var d=0;d<b.length;d++){var v=b[d];null!=v&&(this.adoptParentCell(v.id,null,l,n),this.adoptTerminalCell(v.id,v,l,!0,n),this.adoptTerminalCell(v.id,v,l,!1,n))}};
+EditorUi.prototype.resolveOwnUpdatedCells=function(b,l,n,d){if(null!=b)for(var v in b){var A=l[v];null!=A?(d.inserted[v]||(d.cells[EditorUi.DIFF_INSERT].push(A),d.inserted[v]=!0),d.cells[EditorUi.DIFF_UPDATE][v]=b[v]):null!=n&&(A=n[v],null!=A&&(this.adoptParentCell(v,A,l,d),this.adoptTerminalCell(v,A,l,!0,d,v),this.adoptTerminalCell(v,A,l,!1,d,v)))}};
+EditorUi.prototype.adoptParentCell=function(b,l,n,d){var v=n[b],A=null!=l?l.parent:null!=v?v.parent:null;null!=A&&this.adoptParentCell(A,null,n,d);null!=v?d.inserted[b]||(d.cells[EditorUi.DIFF_INSERT].push(v),d.inserted[b]=!0):null!=l&&(null==d.cells[EditorUi.DIFF_UPDATE][b]&&(d.cells[EditorUi.DIFF_UPDATE][b]={}),d.cells[EditorUi.DIFF_UPDATE][b]=l)};
+EditorUi.prototype.adoptTerminalCell=function(b,l,n,d,v){l=d?l.source:l.target;n=n[l];null!=n&&(v.inserted[l]||(v.cells[EditorUi.DIFF_INSERT].push(n),v.inserted[l]=!0),null==v.cells[EditorUi.DIFF_UPDATE][b]&&(v.cells[EditorUi.DIFF_UPDATE][b]={}),v.cells[EditorUi.DIFF_UPDATE][b][d?"source":"target"]=l)};
+EditorUi.prototype.isObjectEqual=function(b,l,n){if(null==b&&null==l)return!0;if(null!=b?null==l:null!=l)return!1;var d=function(v,A){return null==n||n[v]!=A?!0===A?1:A:void 0};return JSON.stringify(b,d)==JSON.stringify(l,d)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
+mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings())mxSettings.settings.ui=b,mxSettings.save();else{var l=mxSettings.getMainSettings();l.ui=b;localStorage.setItem(".drawio-config",JSON.stringify(l))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){var l=b?mxSettings.settings.darkGridColor:mxSettings.settings.gridColor;mxUtils.isLightDarkColor(l)&&
+(l=mxUtils.getLightDarkColor(l),l=b?l.dark:l.light);return l},setGridColor:function(b,l){l?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=
+b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],l=0;l<b.length;l++)"string"===typeof b[l]&&(b[l]={name:b[l],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,
b)&&("L.scratchpad"===b?mxSettings.settings.customLibraries.splice(0,0,b):mxSettings.settings.customLibraries.push(b));mxSettings.save()},removeCustomLibrary:function(b){mxSettings.load();mxUtils.remove(b,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(b){mxSettings.settings.plugins=b},getRecentColors:function(){return mxSettings.settings.recentColors},
setRecentColors:function(b){mxSettings.settings.recentColors=b},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(b){mxSettings.settings.formatWidth=b},isCreateTarget:function(){return mxSettings.settings.createTarget},setCreateTarget:function(b){mxSettings.settings.createTarget=b},getPageFormat:function(){return mxSettings.settings.pageFormat},setPageFormat:function(b){mxSettings.settings.pageFormat=b},getUnit:function(){return mxSettings.settings.unit||
mxConstants.POINTS},setUnit:function(b){mxSettings.settings.unit=b},isRulerOn:function(){return mxSettings.settings.isRulerOn},setRulerOn:function(b){mxSettings.settings.isRulerOn=b},getDraftSaveDelay:function(){return mxSettings.settings.draftSaveDelay},setDraftSaveDelay:function(b){mxSettings.settings.draftSaveDelay=b},getDefaults:function(){return{language:"",configVersion:Editor.configVersion,customFonts:[],libraries:Sidebar.prototype.defaultEntries,customLibraries:Editor.defaultCustomLibraries,
@@ -13603,685 +13608,684 @@ save:function(){if(isLocalStorage&&"undefined"!==typeof JSON)try{delete mxSettin
null!=b?JSON.parse(b):null;null==b||b.configVersion!=Editor.configVersion||null!=Editor.config&&Editor.config.override?(mxSettings.settings=null,mxSettings.init()):(mxSettings.settings=b,null==mxSettings.settings.plugins&&(mxSettings.settings.plugins=[]),null==mxSettings.settings.recentColors&&(mxSettings.settings.recentColors=[]),null==mxSettings.settings.customFonts&&(mxSettings.settings.customFonts=[]),null==mxSettings.settings.libraries&&(mxSettings.settings.libraries=Sidebar.prototype.defaultEntries),
null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=mxGraph.prototype.pageFormat),
null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&(mxSettings.settings.showStartScreen=!1),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=mxGraphView.prototype.defaultGridColor),null==mxSettings.settings.darkGridColor&&(mxSettings.settings.darkGridColor=mxGraphView.prototype.defaultDarkGridColor),null==mxSettings.settings.autosave?mxSettings.settings.autosave=!EditorUi.isElectronApp:EditorUi.isElectronApp&&null==localStorage.getItem("._autoSaveTrans_")&&
-(localStorage.setItem("._autoSaveTrans_","1"),mxSettings.settings.autosave=!1,mxSettings.save()),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFilePolling=function(b,k){this.file=b;this.sync=k};DrawioFilePolling.prototype.maxRetries=2;DrawioFilePolling.prototype.minPollDelay=2E3;
-DrawioFilePolling.prototype.start=function(b){if(!this.isConnected()){this.delay=this.maxDelay=b;var k=mxUtils.bind(this,function(){this.poll(0,n)}),n=mxUtils.bind(this,function(){this.thread=setTimeout(k,this.delay);this.delay=Math.min(this.maxDelay,this.delay+2E3)});n();EditorUi.debug("DrawioFilePolling.start",[this],"thread",this.thread,"delay",b,"rev",this.file.getCurrentRevisionId())}};
+(localStorage.setItem("._autoSaveTrans_","1"),mxSettings.settings.autosave=!1,mxSettings.save()),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFilePolling=function(b,l){this.file=b;this.sync=l};DrawioFilePolling.prototype.maxRetries=2;DrawioFilePolling.prototype.minPollDelay=2E3;
+DrawioFilePolling.prototype.start=function(b){if(!this.isConnected()){this.delay=this.maxDelay=b;var l=mxUtils.bind(this,function(){this.poll(0,n)}),n=mxUtils.bind(this,function(){this.thread=setTimeout(l,this.delay);this.delay=Math.min(this.maxDelay,this.delay+2E3)});n();EditorUi.debug("DrawioFilePolling.start",[this],"thread",this.thread,"delay",b,"rev",this.file.getCurrentRevisionId())}};
DrawioFilePolling.prototype.updateStatus=function(){this.hasOtherWriters()&&(this.sync.lastMessage=mxResources.get("otherUsersEditing"));this.sync.lastModified=this.file.getLastModifiedDate();this.sync.updateStatus()};
-DrawioFilePolling.prototype.poll=function(b,k){b=null!=b?b:0;var n=mxUtils.bind(this,function(d){b<this.maxRetries?this.retryPoll(mxUtils.bind(this,function(){this.poll(b+1,k)})):k()});this.file.getLatestVersionId(mxUtils.bind(this,function(d){if(-1!=d){var x=this.file.getCurrentRevisionId();d!=x?this.file.getLatestVersion(mxUtils.bind(this,function(z){this.file.mergeFile(z,mxUtils.bind(this,function(){this.delay=this.minPollDelay;this.lastOtherWriter=Date.now();this.updateStatus();k()}),n)}),n):
-(this.updateStatus(),k())}else k()}),n)};DrawioFilePolling.prototype.retryPoll=function(b){var k=300+300*Math.random();window.setTimeout(b,k);EditorUi.debug("StorageFile.retryPoll",[this],"delay",k)};DrawioFilePolling.prototype.stop=function(){EditorUi.debug("DrawioFilePolling.stop",[this],"thread",this.thread);clearTimeout(this.thread);this.thread=null};DrawioFilePolling.prototype.isConnected=function(){return null!=this.thread};
+DrawioFilePolling.prototype.poll=function(b,l){b=null!=b?b:0;var n=mxUtils.bind(this,function(d){b<this.maxRetries?this.retryPoll(mxUtils.bind(this,function(){this.poll(b+1,l)})):l()});this.file.getLatestVersionId(mxUtils.bind(this,function(d){if(-1!=d){var v=this.file.getCurrentRevisionId();d!=v?this.file.getLatestVersion(mxUtils.bind(this,function(A){this.file.mergeFile(A,mxUtils.bind(this,function(){this.delay=this.minPollDelay;this.lastOtherWriter=Date.now();this.updateStatus();l()}),n)}),n):
+(this.updateStatus(),l())}else l()}),n)};DrawioFilePolling.prototype.retryPoll=function(b){var l=300+300*Math.random();window.setTimeout(b,l);EditorUi.debug("StorageFile.retryPoll",[this],"delay",l)};DrawioFilePolling.prototype.stop=function(){EditorUi.debug("DrawioFilePolling.stop",[this],"thread",this.thread);clearTimeout(this.thread);this.thread=null};DrawioFilePolling.prototype.isConnected=function(){return null!=this.thread};
DrawioFilePolling.prototype.hasOtherWriters=function(){return null!=this.lastOtherWriter&&6E4>Date.now()-this.lastOtherWriter};DrawioFileSync=function(b){mxEventSource.call(this);this.lastActivity=Date.now();this.clientId=Editor.guid();this.ui=b.ui;this.file=b;this.onlineListener=mxUtils.bind(this,function(){this.updateOnlineState();this.isConnected()&&!this.ui.isOffline(!0)?this.fileChangedNotify():this.updateStatus()});mxEvent.addListener(window,"offline",this.onlineListener);mxEvent.addListener(window,"online",this.onlineListener);this.autosaveListener=mxUtils.bind(this,function(){this.updateRealtime()});this.ui.editor.addListener("autosaveChanged",
-this.autosaveListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(k){this.lastActivity=Date.now();this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",this.activityListener);mxEvent.addListener(window,
-"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.file.addListener("realtimeMessage",this.activityListener);this.pusherErrorListener=mxUtils.bind(this,function(k){null!=k.error&&null!=k.error.data&&4004===k.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener=mxUtils.bind(this,function(){this.updateOnlineState();
-this.updateStatus();this.isConnected()&&(this.announced||!Editor.enableRealtimeCache||Editor.p2pSyncNotify?this.announced&&this.fileChangedNotify(null,!0):this.sendJoinMessage())});this.changeListener=mxUtils.bind(this,function(k){this.file.stats.msgReceived++;this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var n=this.stringToObject(k);null!=n&&(EditorUi.debug("DrawioFileSync.message",[this],n,k.length,"bytes"),n.v>DrawioFileSync.PROTOCOL?
+this.autosaveListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(l){this.lastActivity=Date.now();this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",this.activityListener);mxEvent.addListener(window,
+"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.file.addListener("realtimeMessage",this.activityListener);this.pusherErrorListener=mxUtils.bind(this,function(l){null!=l.error&&null!=l.error.data&&4004===l.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener=mxUtils.bind(this,function(){this.updateOnlineState();
+this.updateStatus();this.isConnected()&&(this.announced||!Editor.enableRealtimeCache||Editor.p2pSyncNotify?this.announced&&this.fileChangedNotify(null,!0):this.sendJoinMessage())});this.changeListener=mxUtils.bind(this,function(l){this.file.stats.msgReceived++;this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var n=this.stringToObject(l);null!=n&&(EditorUi.debug("DrawioFileSync.message",[this],n,l.length,"bytes"),n.v>DrawioFileSync.PROTOCOL?
this.file.redirectToNewApp(mxUtils.bind(this,function(){})):n.v===DrawioFileSync.PROTOCOL&&null!=n.d&&this.handleMessageData(n.d))}catch(d){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets;mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.maxSyncMessageSize=9E3;DrawioFileSync.prototype.syncSendMessageDelay=300;
DrawioFileSync.prototype.syncReceiveMessageDelay=50;DrawioFileSync.prototype.cleanupDelay=15E3;DrawioFileSync.prototype.syncChangeCounter=0;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;DrawioFileSync.prototype.catchupRetryCount=0;DrawioFileSync.prototype.maxCatchupRetries=15;DrawioFileSync.prototype.maxCacheReadyRetries=1;DrawioFileSync.prototype.cacheReadyDelay=700;DrawioFileSync.prototype.maxOptimisticRetries=6;
DrawioFileSync.prototype.inactivityTimeoutSeconds=1800;DrawioFileSync.prototype.lastActivity=null;
DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=this.file.getChannelId());null==this.key&&(this.key=this.file.getChannelKey());var b=!1;if(this.file.isPolling())"hidden"!=document.visibilityState&&(null==this.polling&&(this.polling=new DrawioFilePolling(this.file,this)),this.polling.start(this.file.getPollingInterval()),b=!0);else if(null==this.pusher&&null!=this.channelId&&"hidden"!=document.visibilityState){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{null!=
-this.pusher.connection&&this.pusher.connection.bind("error",this.pusherErrorListener)}catch(k){}try{this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("DrawioFileSync.start",[this],"version",DrawioFileSync.PROTOCOL,"rev",this.file.getCurrentRevisionId())}catch(k){}this.installListeners()}b=!0}b&&window.setTimeout(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.lastActivity=Date.now();this.resetUpdateStatusThread();this.updateOnlineState();
+this.pusher.connection&&this.pusher.connection.bind("error",this.pusherErrorListener)}catch(l){}try{this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("DrawioFileSync.start",[this],"version",DrawioFileSync.PROTOCOL,"rev",this.file.getCurrentRevisionId())}catch(l){}this.installListeners()}b=!0}b&&window.setTimeout(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.lastActivity=Date.now();this.resetUpdateStatusThread();this.updateOnlineState();
this.updateStatus()},0));this.updateRealtime()};
DrawioFileSync.prototype.updateRealtime=function(){this.isValidState()&&(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()&&this.isRealtimeActive()?this.file.isRealtime()||this.initRealtime():this.file.isRealtime()&&this.resetRealtime(),DrawioFileSync.ENABLE_SOCKETS&&this.file.isRealtime()&&null==this.p2pCollab&&null!=this.channelId?(this.p2pCollab=new P2PCollab(this.ui,this,this.channelId),this.p2pCollab.joinFile()):this.file.isRealtime()||null==this.p2pCollab||(this.p2pCollab.destroy(),
this.p2pCollab=null))};DrawioFileSync.prototype.initRealtime=function(){this.file.theirPages=this.ui.clonePages(this.ui.pages);this.file.ownPages=this.ui.clonePages(this.ui.pages);this.snapshot=this.file.ownPages};DrawioFileSync.prototype.resetRealtime=function(){var b=this.file.getShadowPages();null!=b&&(b=this.ui.diffPages(b,this.file.ownPages),this.file.patch([b]));this.sendLocalChanges();this.cleanup();this.file.theirPages=null;this.snapshot=this.file.ownPages=null};
DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:null!=this.polling?this.polling.isConnected():!1};DrawioFileSync.prototype.updateOnlineState=function(){"1"!=urlParams.embedRT&&this.file.fireEvent(new mxEventObject("realtimeStateChanged"))};
DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing||(this.enabled&&null!=this.ui.statusContainer?(this.ui.updateStatus(mxUtils.bind(this,function(){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));
-var k=this.lastMessage;this.lastMessage=null;null!=k&&40<k.length&&(k=k.substring(0,40)+"...");var n=this.ui.getNetworkStatus();b=mxResources.get("lastChange",[b]);var d=this.file.isRevisionHistorySupported()?'data-action="revisionHistory" ':"",x=mxUtils.htmlEntities(b)+(this.file.isRevisionHistorySupported()?" - "+mxUtils.htmlEntities(mxResources.get("revisionHistory")):"");this.ui.editor.setStatus("<div "+d+'title="'+x+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?this.file.isLocked()?
-' <img class="geToolbarButton" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+Editor.lockedImage+'"/>':"":'<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(null!=n?'<div class="geStatusBox" title="'+mxUtils.htmlEntities(n)+'">'+mxUtils.htmlEntities(n)+"</div>":"")+(null!=k?' <div class="geStatusBox" data-effect="fade" title="'+mxUtils.htmlEntities(k)+'">'+mxUtils.htmlEntities(k)+
+var l=this.lastMessage;this.lastMessage=null;null!=l&&40<l.length&&(l=l.substring(0,40)+"...");var n=this.ui.getNetworkStatus();b=mxResources.get("lastChange",[b]);var d=this.file.isRevisionHistorySupported()?'data-action="revisionHistory" ':"",v=mxUtils.htmlEntities(b)+(this.file.isRevisionHistorySupported()?" - "+mxUtils.htmlEntities(mxResources.get("revisionHistory")):"");this.ui.editor.setStatus("<div "+d+'title="'+v+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?this.file.isLocked()?
+' <img class="geToolbarButton" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+Editor.lockedImage+'"/>':"":'<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(null!=n?'<div class="geStatusBox" title="'+mxUtils.htmlEntities(n)+'">'+mxUtils.htmlEntities(n)+"</div>":"")+(null!=l?' <div class="geStatusBox" data-effect="fade" title="'+mxUtils.htmlEntities(l)+'">'+mxUtils.htmlEntities(l)+
"</div>":""))})),this.resetUpdateStatusThread()):this.ui.updateStatus(mxUtils.bind(this,function(){this.file.addAllSavedStatus()})))};DrawioFileSync.prototype.resetUpdateStatusThread=function(){null!=this.updateStatusThread&&window.clearInterval(this.updateStatusThread);null!=this.channel&&(this.updateStatusThread=window.setInterval(mxUtils.bind(this,function(){this.updateStatus()}),Editor.updateStatusInterval))};
DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&null!=this.pusher.connection&&this.pusher.connection.bind("state_change",this.connectionListener);null!=this.channel&&this.channel.bind("changed",this.changeListener)};
DrawioFileSync.prototype.notify=function(b){this.file.stats.msgSent++;this.file.isPolling()||(Editor.enableRealtimeCache&&!Editor.p2pSyncNotify?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(b))):null!=this.p2pCollab&&this.p2pCollab.sendNotification(b));EditorUi.debug("DrawioFileSync.notify",[this],"enableRealtimeCache",Editor.enableRealtimeCache,"p2pSyncNotify",Editor.p2pSyncNotify,"msg",b)};
-DrawioFileSync.prototype.sendJoinMessage=function(){if(!this.announced){var b=this.file.getCurrentUser(),k={a:"join"};null!=b&&(k.name=encodeURIComponent(b.displayName),k.uid=b.id);this.notify(this.createMessage(k));this.announced=!0}};
+DrawioFileSync.prototype.sendJoinMessage=function(){if(!this.announced){var b=this.file.getCurrentUser(),l={a:"join"};null!=b&&(l.name=encodeURIComponent(b.displayName),l.uid=b.id);this.notify(this.createMessage(l));this.announced=!0}};
DrawioFileSync.prototype.handleMessageData=function(b){"desc"==b.a?this.file.savingFile||this.reloadDescriptor():"join"==b.a||"leave"==b.a?("join"==b.a&&this.file.stats.joined++,null!=b.name&&(this.lastMessage=mxResources.get("join"==b.a?"userJoined":"userLeft",[decodeURIComponent(b.name)]),this.resetUpdateStatusThread(),this.updateStatus())):"change"==b.a?this.receiveRemoteChanges(b):null!=b.m&&(b=new Date(b.m),null==this.lastMessageModified||this.lastMessageModified<b)&&(this.lastMessageModified=
b,this.fileChangedNotify())};DrawioFileSync.prototype.isValidState=function(){return this.ui.getCurrentFile()==this.file&&this.file.sync==this&&!this.file.invalidChecksum&&!this.file.redirectDialogShowing};
-DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){EditorUi.debug("DrawioFileSync.optimisticSync",[this],"attempt",b,"of",this.maxOptimisticRetries,"remoteFileChanged",this.remoteFileChanged);this.remoteFileChanged=!1;this.file.getLatestVersion(mxUtils.bind(this,function(k){this.reloadThread=null;if(null!=k){var n=this.file.getCurrentRevisionId(),d=k.getCurrentRevisionId();
-n==d?this.optimisticSync(b+1):this.file.mergeFile(k,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),mxUtils.bind(this,function(){this.reloadThread=null}))}),(b+1)*this.file.optimisticSyncDelay)))};
-DrawioFileSync.prototype.fileChangedNotify=function(b,k){if(this.isValidState())if(EditorUi.debug("DrawioFileSync.fileChangedNotify",[this],"data",[b],"immediate",k,"saving",this.file.savingFile),this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var n=this.fileChanged(mxUtils.bind(this,function(d){this.updateStatus()}),mxUtils.bind(this,function(d){this.file.handleFileError(d)}),mxUtils.bind(this,function(){return!this.file.savingFile&&
-this.notifyThread!=n}),!0,k)};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 k=this.clientId+"."+this.syncChangeCounter++,n=this.createMessage({a:"change",c:b,id:k,t:Date.now()});k=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(n):"1"==urlParams.dev?(n=encodeURIComponent(this.objectToString(n)),0==this.maxSyncMessageSize||n.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+n):k=!0):k=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
-"changes",b,k?"(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(x,z){return x.id<z.id?-1:x.id>z.id?1:0});for(var k=null,n=0;n<this.receivedData.length;n++){var d=JSON.stringify(this.receivedData[n].c);d!=k&&this.doReceiveRemoteChanges(this.receivedData[n].c);
-k=d}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};
-DrawioFileSync.prototype.scheduleCleanup=function(b){var k=Math.min(15,Math.floor(this.file.getSize()/5E6));k=0==b?0:this.cleanupDelay+1E3*k;var n=this.cleanupThread;if(1!=b||null!=this.cleanupThread)window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanup(null,mxUtils.bind(this,function(d){this.file.handleFileError(d)}))}),k);EditorUi.debug("DrawioFileSync.scheduleCleanup",[this],"lazy",b,"delay",k,"prev",n,"thread",this.cleanupThread)};
-DrawioFileSync.prototype.cleanup=function(b,k,n){var d=this.cleanupThread;window.clearTimeout(this.cleanupThread);this.cleanupThread=null;if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var x=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.cleanup",[this],"thread",d,"patches",x,"checkFile",n,"checksum",this.ui.getHashValueForPages(this.ui.pages));
-this.file.ignorePatches(x)||this.file.patch(x);n?this.file.getLatestVersion(mxUtils.bind(this,function(z){try{if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()){var y=z.getShadowPages();x=[this.ui.diffPages(this.ui.pages,y),this.ui.diffPages(y,this.file.ownPages)];this.file.ignorePatches(x)||this.file.patch(x);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",z,"patches",x)}null!=b&&b()}catch(F){null!=k&&k(F)}}),k):(document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||
+DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){EditorUi.debug("DrawioFileSync.optimisticSync",[this],"attempt",b,"of",this.maxOptimisticRetries,"remoteFileChanged",this.remoteFileChanged);this.remoteFileChanged=!1;this.file.getLatestVersion(mxUtils.bind(this,function(l){this.reloadThread=null;if(null!=l){var n=this.file.getCurrentRevisionId(),d=l.getCurrentRevisionId();
+n==d?this.optimisticSync(b+1):this.file.mergeFile(l,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),mxUtils.bind(this,function(){this.reloadThread=null}))}),(b+1)*this.file.optimisticSyncDelay)))};
+DrawioFileSync.prototype.fileChangedNotify=function(b,l){if(this.isValidState())if(EditorUi.debug("DrawioFileSync.fileChangedNotify",[this],"data",[b],"immediate",l,"saving",this.file.savingFile),this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var n=this.fileChanged(mxUtils.bind(this,function(d){this.updateStatus()}),mxUtils.bind(this,function(d){this.file.handleFileError(d)}),mxUtils.bind(this,function(){return!this.file.savingFile&&
+this.notifyThread!=n}),!0,l)};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 l=this.clientId+"."+this.syncChangeCounter++,n=this.createMessage({a:"change",c:b,id:l,t:Date.now()});l=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(n):"1"==urlParams.dev?(n=encodeURIComponent(this.objectToString(n)),0==this.maxSyncMessageSize||n.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+n):l=!0):l=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
+"changes",b,l?"(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,A){return v.id<A.id?-1:v.id>A.id?1:0});for(var l=null,n=0;n<this.receivedData.length;n++){var d=JSON.stringify(this.receivedData[n].c);d!=l&&this.doReceiveRemoteChanges(this.receivedData[n].c);
+l=d}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};
+DrawioFileSync.prototype.scheduleCleanup=function(b){var l=Math.min(15,Math.floor(this.file.getSize()/5E6));l=0==b?0:this.cleanupDelay+1E3*l;var n=this.cleanupThread;if(1!=b||null!=this.cleanupThread)window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanup(null,mxUtils.bind(this,function(d){this.file.handleFileError(d)}))}),l);EditorUi.debug("DrawioFileSync.scheduleCleanup",[this],"lazy",b,"delay",l,"prev",n,"thread",this.cleanupThread)};
+DrawioFileSync.prototype.cleanup=function(b,l,n){var d=this.cleanupThread;window.clearTimeout(this.cleanupThread);this.cleanupThread=null;if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var v=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.cleanup",[this],"thread",d,"patches",v,"checkFile",n,"checksum",this.ui.getHashValueForPages(this.ui.pages));
+this.file.ignorePatches(v)||this.file.patch(v);n?this.file.getLatestVersion(mxUtils.bind(this,function(A){try{if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()){var z=A.getShadowPages();v=[this.ui.diffPages(this.ui.pages,z),this.ui.diffPages(z,this.file.ownPages)];this.file.ignorePatches(v)||this.file.patch(v);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",A,"patches",v)}null!=b&&b()}catch(D){null!=l&&l(D)}}),l):(document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||
this.testChecksum(),null!=b&&b())}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",n,"modified",this.file.isModified()))};
-DrawioFileSync.prototype.testChecksum=function(){var b=this.ui.getHashValueForPages(this.ui.pages),k=this.file.getCurrentRevisionId();this.file.getLatestVersion(mxUtils.bind(this,function(n){if(!document.hidden){var d=this.ui.getHashValueForPages(n.getShadowPages()),x=n.getDescriptorChecksum(n.getDescriptor()),z=n.getCurrentRevisionId();EditorUi.debug("DrawioFileSync.testChecksum","local",[this.file],"modified",this.file.isModified(),"inConflictState",this.file.inConflictState,"autosaveThread",this.file.autosaveThread,
-"savingFile",this.file.savingFile,"localFileWasChanged",this.localFileWasChanged,"remoteFileChanged",this.remoteFileChanged,"cleanup",this.cleanupThread,"checksum",b);EditorUi.debug("DrawioFileSync.testChecksum","remote",[n],"rev",z==k,"desc",x==d,"checksum",d);d!=b?(EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums do not match"),this.ui.alert("Checksums do not match")):EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums match")}}),mxUtils.bind(this,function(n){EditorUi.debug("DrawioFileSync.testChecksum",
+DrawioFileSync.prototype.testChecksum=function(){var b=this.ui.getHashValueForPages(this.ui.pages),l=this.file.getCurrentRevisionId();this.file.getLatestVersion(mxUtils.bind(this,function(n){if(!document.hidden){var d=this.ui.getHashValueForPages(n.getShadowPages()),v=n.getDescriptorChecksum(n.getDescriptor()),A=n.getCurrentRevisionId();EditorUi.debug("DrawioFileSync.testChecksum","local",[this.file],"modified",this.file.isModified(),"inConflictState",this.file.inConflictState,"autosaveThread",this.file.autosaveThread,
+"savingFile",this.file.savingFile,"localFileWasChanged",this.localFileWasChanged,"remoteFileChanged",this.remoteFileChanged,"cleanup",this.cleanupThread,"checksum",b);EditorUi.debug("DrawioFileSync.testChecksum","remote",[n],"rev",A==l,"desc",v==d,"checksum",d);d!=b?(EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums do not match"),this.ui.alert("Checksums do not match")):EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums match")}}),mxUtils.bind(this,function(n){EditorUi.debug("DrawioFileSync.testChecksum",
[this],"checksum test error",n)}))};DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};
-DrawioFileSync.prototype.extractRemove=function(b){var k={};null!=b[EditorUi.DIFF_REMOVE]&&(k[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var n in b[EditorUi.DIFF_UPDATE]){var d=b[EditorUi.DIFF_UPDATE][n];if(null!=d.cells&&null!=d.cells[EditorUi.DIFF_REMOVE]){null==k[EditorUi.DIFF_UPDATE]&&(k[EditorUi.DIFF_UPDATE]={});k[EditorUi.DIFF_UPDATE][n]={};var x=k[EditorUi.DIFF_UPDATE][n];x.cells={};x.cells[EditorUi.DIFF_REMOVE]=d.cells[EditorUi.DIFF_REMOVE]}}return k};
-DrawioFileSync.prototype.patchRealtime=function(b,k,n,d){var x=null;if(this.file.isRealtime()){x=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var z=this.extractRemove(this.extractLocal(x)),y=(null==n?b:b.concat(n)).concat([z]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,y,!0,k);mxUtils.isEmptyObject(z)?this.scheduleCleanup(null!=d?!1:null):this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",k,"own",n,
-"all",x,"local",z,"applied",y,"immediate",d)}return x};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
-DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),k=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,k,!0);this.snapshot=b;var n=this.ui.resolveCrossReferences(k,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,n,!0);this.isRealtimeActive()&&this.doSendLocalChanges([n,k])}this.localFileWasChanged=
+DrawioFileSync.prototype.extractRemove=function(b){var l={};null!=b[EditorUi.DIFF_REMOVE]&&(l[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var n in b[EditorUi.DIFF_UPDATE]){var d=b[EditorUi.DIFF_UPDATE][n];if(null!=d.cells&&null!=d.cells[EditorUi.DIFF_REMOVE]){null==l[EditorUi.DIFF_UPDATE]&&(l[EditorUi.DIFF_UPDATE]={});l[EditorUi.DIFF_UPDATE][n]={};var v=l[EditorUi.DIFF_UPDATE][n];v.cells={};v.cells[EditorUi.DIFF_REMOVE]=d.cells[EditorUi.DIFF_REMOVE]}}return l};
+DrawioFileSync.prototype.patchRealtime=function(b,l,n,d){var v=null;if(this.file.isRealtime()){v=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var A=this.extractRemove(this.extractLocal(v)),z=(null==n?b:b.concat(n)).concat([A]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,z,!0,l);mxUtils.isEmptyObject(A)?this.scheduleCleanup(null!=d?!1:null):this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",l,"own",n,
+"all",v,"local",A,"applied",z,"immediate",d)}return v};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
+DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),l=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,l,!0);this.snapshot=b;var n=this.ui.resolveCrossReferences(l,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,n,!0);this.isRealtimeActive()&&this.doSendLocalChanges([n,l])}this.localFileWasChanged=
!1}catch(d){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),b,d)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
-DrawioFileSync.prototype.merge=function(b,k,n,d,x,z,y){try{this.file.stats.merged++;this.lastModified=new Date;var F=this.file.getDescriptorRevisionId(n);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var N=this.ui.clonePages(this.file.getShadowPages()),K=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(N,this.ui.pages):null,L=this.file.isRealtime()?this.ui.diffPages(N,this.file.ownPages):null;N=this.ui.applyPatches(N,b);var c=null==k?null:this.ui.getHashValueForPages(N);
-EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",K,"pending",L,"checksum",k,"current",c,"valid",k==c,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",F,"etag",this.file.getDescriptorEtag(n),"immediate",y);if(null!=k&&k!=c){this.reload(mxUtils.bind(this,function(){null!=d&&d()}),mxUtils.bind(this,function(){null!=x&&x()}),z,null,y);return}this.file.setShadowPages(N);null==this.patchRealtime(b,null,L,y)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?
-K:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),n);null!=d&&d(!0)}catch(m){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=x&&x(m);try{var f=this.file.getCurrentUser(),l=null!=f?f.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),l,m)}catch(t){}}};
-DrawioFileSync.prototype.fileChanged=function(b,k,n,d,x){var z=window.setTimeout(mxUtils.bind(this,function(){null!=n&&n()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"immediate",x,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(y){null!=n&&n()||(this.isValidState()?this.catchup(y,b,k,n,x):null!=k&&k())}),k)):null!=k&&k())}),d?this.cacheReadyDelay:0);return this.notifyThread=
-z};
-DrawioFileSync.prototype.fastForward=function(b){this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.setShadowPages(this.ui.clonePages(this.ui.pages));this.file.theirPages=this.ui.clonePages(this.ui.pages);var k=this.file.ownPages;this.file.ownPages=this.ui.clonePages(this.ui.pages);for(var n=0;n<this.file.ownPages.length;n++)null!=k[n]&&this.ui.getHashValueForPages([this.file.ownPages[n]])!=this.ui.getHashValueForPages([k[n]])&&(this.file.ownPages[n].needsUpdate=!0);k=this.cleanupThread;window.clearTimeout(this.cleanupThread);
-this.cleanupThread=null;"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.fastForward",[this],"desc",[b],"cleanup",k,"checksum",this.ui.getHashValueForPages(this.ui.pages));document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum()};
+DrawioFileSync.prototype.merge=function(b,l,n,d,v,A,z){try{this.file.stats.merged++;this.lastModified=new Date;var D=this.file.getDescriptorRevisionId(n);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var P=this.ui.clonePages(this.file.getShadowPages()),J=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(P,this.ui.pages):null,L=this.file.isRealtime()?this.ui.diffPages(P,this.file.ownPages):null;P=this.ui.applyPatches(P,b);var c=null==l?null:this.ui.getHashValueForPages(P);
+EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",J,"pending",L,"checksum",l,"current",c,"valid",l==c,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",D,"etag",this.file.getDescriptorEtag(n),"immediate",z);if(null!=l&&l!=c){this.reload(mxUtils.bind(this,function(){null!=d&&d()}),mxUtils.bind(this,function(){null!=v&&v()}),A,null,z);return}this.file.setShadowPages(P);null==this.patchRealtime(b,null,L,z)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?
+J:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),n);null!=d&&d(!0)}catch(m){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=v&&v(m);try{var f=this.file.getCurrentUser(),k=null!=f?f.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),k,m)}catch(t){}}};
+DrawioFileSync.prototype.fileChanged=function(b,l,n,d,v){var A=window.setTimeout(mxUtils.bind(this,function(){null!=n&&n()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"immediate",v,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(z){null!=n&&n()||(this.isValidState()?this.catchup(z,b,l,n,v):null!=l&&l())}),l)):null!=l&&l())}),d?this.cacheReadyDelay:0);return this.notifyThread=
+A};
+DrawioFileSync.prototype.fastForward=function(b){this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.setShadowPages(this.ui.clonePages(this.ui.pages));this.file.theirPages=this.ui.clonePages(this.ui.pages);var l=this.file.ownPages;this.file.ownPages=this.ui.clonePages(this.ui.pages);for(var n=0;n<this.file.ownPages.length;n++)null!=l[n]&&this.ui.getHashValueForPages([this.file.ownPages[n]])!=this.ui.getHashValueForPages([l[n]])&&(this.file.ownPages[n].needsUpdate=!0);l=this.cleanupThread;window.clearTimeout(this.cleanupThread);
+this.cleanupThread=null;"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.fastForward",[this],"desc",[b],"cleanup",l,"checksum",this.ui.getHashValueForPages(this.ui.pages));document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum()};
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,k,n,d,x){if(null!=b&&(null==d||!d())){var z=this.file.getCurrentRevisionId(),y=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",z,"to",y,"immediate",x,"valid",this.isValidState());if(z==y)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),
-document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=k&&k(!0);else if(this.isValidState()){var F=this.file.getDescriptorChecksum(b),N=this.file.getDescriptorSecret(b);if(null!=F&&F==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=k&&k(!0);else if(Editor.enableRealtimeCache&&null!=N&&"1"!=urlParams.lockdown){var K=0,L=!1,c=mxUtils.bind(this,function(){if(null==d||!d())if(z!=this.file.getCurrentRevisionId())null!=k&&
-k(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;this.reload(k,n,d,null,x)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(z)+"&to="+encodeURIComponent(y)+(null!=N?"&secret="+encodeURIComponent(N):""),mxUtils.bind(this,function(m){this.file.stats.bytesReceived+=m.getText().length;window.clearTimeout(l);if(f&&(null==d||!d()))if(z!=this.file.getCurrentRevisionId())null!=
-k&&k(!0);else if(this.isValidState()){var t=null,v=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[m],"status",m.getStatus(),"cacheReadyRetryCount",K,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=m.getStatus()&&299>=m.getStatus()&&0<m.getText().length)try{var B=JSON.parse(m.getText());if(null!=B&&0<B.length)for(var E=0;E<B.length;E++){var D=this.stringToObject(B[E]);if(D.v>DrawioFileSync.PROTOCOL){L=!0;v=[];break}else if(D.v===DrawioFileSync.PROTOCOL&&null!=D.d)t=D.d.checksum,
-v.push(D.d.patch);else{L=!0;v=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[B],"status",L?"failed":"ok","temp",v,"checksum",t)}catch(A){v=[],null!=window.console&&"1"==urlParams.test&&console.log(A)}try{0<v.length?(this.file.stats.cacheHits++,this.merge(v,t,b,k,n,d,x)):K<=this.maxCacheReadyRetries-1&&!L&&401!=m.getStatus()&&503!=m.getStatus()&&410!=m.getStatus()?(K++,this.file.stats.cacheMiss++,window.setTimeout(c,(K+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
-this.reload(k,n,d,null,x))}catch(A){null!=n&&n(A)}}else null!=n&&n()}),n)}else null!=n&&n()});window.setTimeout(c,this.cacheReadyDelay)}else this.reload(k,n,d,null,x)}else null!=n&&n()}};DrawioFileSync.prototype.reload=function(b,k,n,d,x){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",x);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(z){null!=k&&k(z)}),n,d,x)};
-DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var k=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),n=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(n)+"&msg="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;
+DrawioFileSync.prototype.catchup=function(b,l,n,d,v){if(null!=b&&(null==d||!d())){var A=this.file.getCurrentRevisionId(),z=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",A,"to",z,"immediate",v,"valid",this.isValidState());if(A==z)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),
+document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=l&&l(!0);else if(this.isValidState()){var D=this.file.getDescriptorChecksum(b),P=this.file.getDescriptorSecret(b);if(null!=D&&D==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=l&&l(!0);else if(Editor.enableRealtimeCache&&null!=P&&"1"!=urlParams.lockdown){var J=0,L=!1,c=mxUtils.bind(this,function(){if(null==d||!d())if(A!=this.file.getCurrentRevisionId())null!=l&&
+l(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var f=!0,k=window.setTimeout(mxUtils.bind(this,function(){f=!1;this.reload(l,n,d,null,v)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(A)+"&to="+encodeURIComponent(z)+(null!=P?"&secret="+encodeURIComponent(P):""),mxUtils.bind(this,function(m){this.file.stats.bytesReceived+=m.getText().length;window.clearTimeout(k);if(f&&(null==d||!d()))if(A!=this.file.getCurrentRevisionId())null!=
+l&&l(!0);else if(this.isValidState()){var t=null,x=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[m],"status",m.getStatus(),"cacheReadyRetryCount",J,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=m.getStatus()&&299>=m.getStatus()&&0<m.getText().length)try{var y=JSON.parse(m.getText());if(null!=y&&0<y.length)for(var F=0;F<y.length;F++){var E=this.stringToObject(y[F]);if(E.v>DrawioFileSync.PROTOCOL){L=!0;x=[];break}else if(E.v===DrawioFileSync.PROTOCOL&&null!=E.d)t=E.d.checksum,
+x.push(E.d.patch);else{L=!0;x=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[y],"status",L?"failed":"ok","temp",x,"checksum",t)}catch(C){x=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<x.length?(this.file.stats.cacheHits++,this.merge(x,t,b,l,n,d,v)):J<=this.maxCacheReadyRetries-1&&!L&&401!=m.getStatus()&&503!=m.getStatus()&&410!=m.getStatus()?(J++,this.file.stats.cacheMiss++,window.setTimeout(c,(J+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
+this.reload(l,n,d,null,v))}catch(C){null!=n&&n(C)}}else null!=n&&n()}),n)}else null!=n&&n()});window.setTimeout(c,this.cacheReadyDelay)}else this.reload(l,n,d,null,v)}else null!=n&&n()}};DrawioFileSync.prototype.reload=function(b,l,n,d,v){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",v);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(A){null!=l&&l(A)}),n,d,v)};
+DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var l=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),n=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(n)+"&msg="+encodeURIComponent(l)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",n)}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))};
-DrawioFileSync.prototype.createToken=function(b,k,n){var d=!0,x=window.setTimeout(mxUtils.bind(this,function(){d=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(z){window.clearTimeout(x);d&&(200<=z.getStatus()&&299>=z.getStatus()?k(z.getText()):n({code:z.getStatus(),message:"Token Error "+z.getStatus()}))}),n)};
+DrawioFileSync.prototype.createToken=function(b,l,n){var d=!0,v=window.setTimeout(mxUtils.bind(this,function(){d=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(A){window.clearTimeout(v);d&&(200<=A.getStatus()&&299>=A.getStatus()?l(A.getText()):n({code:A.getStatus(),message:"Token Error "+A.getStatus()}))}),n)};
DrawioFileSync.prototype.fileSaving=function(){this.file.isOptimisticSync()&&this.notify(this.createMessage({m:Date.now(),type:"optimistic"}));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,k,n,d,x,z){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 y=this.file.getDescriptorSecret(this.file.getDescriptor()),F=this.createMessage({m:this.lastModified.getTime()}),N=this.file.getDescriptorRevisionId(k),K=this.file.getCurrentRevisionId();if(null!=y&&null!=x&&
-"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var L=this.ui.diffPages(this.file.getShadowPages(),b);k=this.file.getDescriptorSecret(k);z=null!=z?z:this.ui.getHashValueForPages(b);var c=this.objectToString(this.createMessage({patch:L,checksum:z}));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+
-"&from="+encodeURIComponent(N)+"&to="+encodeURIComponent(K)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(F)))+(null!=y?"&secret="+encodeURIComponent(y):"")+(null!=k?"&last-secret="+encodeURIComponent(k):"")+(c.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(c):"")+(null!=x?"&token="+encodeURIComponent(x):""),mxUtils.bind(this,function(m){window.clearTimeout(l);f&&(200<=m.getStatus()&&299>=m.getStatus()?(Editor.p2pSyncNotify&&this.notify(F),null!=n&&n()):d({message:mxResources.get("realtimeCollaboration")+
-(0!=m.getStatus()?": "+m.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",N,"to",K,"etag",this.file.getCurrentEtag(),"diff",L,c.length,"bytes","msg",F,"checksum",z)}else this.notify(F),null!=n&&n(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",N,"to",K,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};
+DrawioFileSync.prototype.fileSaved=function(b,l,n,d,v,A){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 z=this.file.getDescriptorSecret(this.file.getDescriptor()),D=this.createMessage({m:this.lastModified.getTime()}),P=this.file.getDescriptorRevisionId(l),J=this.file.getCurrentRevisionId();if(null!=z&&null!=v&&
+"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var L=this.ui.diffPages(this.file.getShadowPages(),b);l=this.file.getDescriptorSecret(l);A=null!=A?A:this.ui.getHashValueForPages(b);var c=this.objectToString(this.createMessage({patch:L,checksum:A}));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;var f=!0,k=window.setTimeout(mxUtils.bind(this,function(){f=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+
+"&from="+encodeURIComponent(P)+"&to="+encodeURIComponent(J)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(D)))+(null!=z?"&secret="+encodeURIComponent(z):"")+(null!=l?"&last-secret="+encodeURIComponent(l):"")+(c.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(c):"")+(null!=v?"&token="+encodeURIComponent(v):""),mxUtils.bind(this,function(m){window.clearTimeout(k);f&&(200<=m.getStatus()&&299>=m.getStatus()?(Editor.p2pSyncNotify&&this.notify(D),null!=n&&n()):d({message:mxResources.get("realtimeCollaboration")+
+(0!=m.getStatus()?": "+m.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",P,"to",J,"etag",this.file.getCurrentEtag(),"diff",L,c.length,"bytes","msg",D,"checksum",A)}else this.notify(D),null!=n&&n(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",P,"to",J,"etag",this.file.getCurrentEtag())}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,k,n){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,k,n):this.fileChanged(k,n)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=n&&n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
+DrawioFileSync.prototype.fileConflict=function(b,l,n){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,l,n):this.fileChanged(l,n)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=n&&n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher?(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),EditorUi.debug("DrawioFileSync.stop",[this])):null!=this.polling&&(this.polling.stop(),
this.polling=null);this.updateOnlineState();this.updateStatus()};
-DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),k={a:"leave"};null!=b&&(k.name=encodeURIComponent(b.displayName),k.uid=b.id);this.notify(this.createMessage(k))}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"offline",this.onlineListener),mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.removeListener(this.autosaveListener),this.autosaveListener=
+DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),l={a:"leave"};null!=b&&(l.name=encodeURIComponent(b.displayName),l.uid=b.id);this.notify(this.createMessage(l))}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"offline",this.onlineListener),mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.removeListener(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.p2pCollab&&this.p2pCollab.destroy()};App=function(b,k,n){EditorUi.call(this,b,k,null!=n?n:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+d.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
-(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(d,x,z){if("1"==urlParams.openInSameWin||navigator.standalone)null!=z&&z();else{var y=null;try{y=window.open(d)}catch(F){}null==y||void 0===y?this.showDialog((new PopupDialog(this,d,x,z)).container,340,140,!0,!0):null!=x&&x()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&
+mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};App=function(b,l,n){EditorUi.call(this,b,l,null!=n?n:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+d.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
+(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(d,v,A){if("1"==urlParams.openInSameWin||navigator.standalone)null!=A&&A();else{var z=null;try{z=window.open(d)}catch(D){}null==z||void 0===z?this.showDialog((new PopupDialog(this,d,v,A)).container,340,140,!0,!0):null!=v&&v()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&
!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(d){null!=window.console&&console.log("Plugin Error:",d,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(d){try{d(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";
App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":"js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="js/jquery/jquery-3.6.0.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL=window.PUSHER_URL||"https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL="js/simplepeer/simplepeer9.10.0.min.js";App.GOOGLE_APIS="drive-share";App.startTime=new Date;
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",nxtcld:"plugins/nextcloud.js",monday:"plugins/monday.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",trees:"plugins/trees/trees.js",
"import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex tips svgdata number sql props text anim update trees replay anon webcola tags".split(" ");
-App.loadScripts=function(b,k,n){for(var d=b.length,x=!1,z=0;z<b.length;z++)mxscript(b[z],function(){0!=--d||x||null==k||k()},null,null,null,function(y,F){x=!0;null!=n&&n(Error(y));console.error("Error loading script",y,F,F.stack)})};
-App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage)try{for(var k=document.cookie.split(";"),n=0;n<k.length;n++){var d=mxUtils.trim(k[n]);if("MODE="==d.substring(0,5)){b=d.substring(5);break}}if(null!=b&&isLocalStorage){var x=new Date;x.setYear(x.getFullYear()-1);document.cookie="MODE=; expires="+x.toUTCString();localStorage.setItem(".mode",b)}}catch(z){}return b};
+App.loadScripts=function(b,l,n){for(var d=b.length,v=!1,A=0;A<b.length;A++)mxscript(b[A],function(){0!=--d||v||null==l||l()},null,null,null,function(z,D){v=!0;null!=n&&n(Error(z));console.error("Error loading script",z,D,D.stack)})};
+App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage)try{for(var l=document.cookie.split(";"),n=0;n<l.length;n++){var d=mxUtils.trim(l[n]);if("MODE="==d.substring(0,5)){b=d.substring(5);break}}if(null!=b&&isLocalStorage){var v=new Date;v.setYear(v.getFullYear()-1);document.cookie="MODE=; expires="+v.toUTCString();localStorage.setItem(".mode",b)}}catch(A){}return b};
(function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode),null==App.mode&&"1"!=urlParams.embed&&(App.mode=App.getStoredMode()),null!=window.mxscript&&"1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=
window.location.hash&&"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=
null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
-App.clearServiceWorker=function(b,k){navigator.serviceWorker.getRegistration().then(function(n){null!=n&&n.unregister().then(function(){null!=b&&(b(),b=null)})})["catch"](function(){null!=k&&k()})};App.isSameDomain=function(b){var k=document.createElement("a");k.href=b;return k.protocol===window.location.protocol||k.host===window.location.host};App.isBuiltInPlugin=function(b){for(var k in App.pluginRegistry)if(App.pluginRegistry[k]==b)return!0;return!1};
+App.clearServiceWorker=function(b,l){navigator.serviceWorker.getRegistration().then(function(n){null!=n&&n.unregister().then(function(){null!=b&&(b(),b=null)})})["catch"](function(){null!=l&&l()})};App.isSameDomain=function(b){var l=document.createElement("a");l.href=b;return l.protocol===window.location.protocol||l.host===window.location.host};App.isBuiltInPlugin=function(b){for(var l in App.pluginRegistry)if(App.pluginRegistry[l]==b)return!0;return!1};
App.isSimpleThemePreferred=function(){var b=navigator.userAgent||navigator.vendor||window.opera;return 1024>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||/android/i.test(b)||/iPad|iPhone|iPod/.test(b)&&!window.MSStream||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints};
-App.main=function(b,k){try{var n=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var L=parseInt(mxSettings.settings.autosaveDelay);!isNaN(L)&&0<L?(DrawioFile.prototype.autosaveDelay=L,EditorUi.debug("Setting autosaveDelay",L)):EditorUi.debug("Invalid autosaveDelay",L)}null!=mxSettings.settings.defaultEdgeLength&&(L=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(L)&&0<L?(Graph.prototype.defaultEdgeLength=L,EditorUi.debug("Using defaultEdgeLength",L)):
+App.main=function(b,l){try{var n=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var L=parseInt(mxSettings.settings.autosaveDelay);!isNaN(L)&&0<L?(DrawioFile.prototype.autosaveDelay=L,EditorUi.debug("Setting autosaveDelay",L)):EditorUi.debug("Invalid autosaveDelay",L)}null!=mxSettings.settings.defaultEdgeLength&&(L=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(L)&&0<L?(Graph.prototype.defaultEdgeLength=L,EditorUi.debug("Using defaultEdgeLength",L)):
EditorUi.debug("Invalid defaultEdgeLength",L))}}catch(f){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(f.stack)):console.error(f)}try{if(null!=Menus.prototype.defaultFonts)for(L=0;L<Menus.prototype.defaultFonts.length;L++){var c=Menus.prototype.defaultFonts[L];"string"!==typeof c&&null!=c.fontFamily&&null!=c.fontUrl&&Graph.addFont(c.fontFamily,c.fontUrl)}mxResources.loadDefaultBundle=!1;d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,
mxLanguage))}catch(f){document.body.innerHTML="",c=document.createElement("pre"),mxUtils.write(c,f.stack),document.body.appendChild(c)}},d=function(L){mxUtils.getAll("1"!=urlParams.dev?[L]:[L,STYLE_PATH+"/default.xml"],function(c){function f(){try{try{null==Editor.currentTheme&&"1"!=urlParams.embed&&(1==urlParams.dev||1==urlParams.test||"test.draw.io"===window.location.hostname||"www.draw.io"===window.location.hostname||"preprod.diagrams.net"===window.location.hostname||"app.diagrams.net"===window.location.hostname||
-"jgraph.github.io"===window.location.hostname||/drawio-dev\.pages\.dev$/.test(window.location.hostname))&&App.isSimpleThemePreferred()&&(Editor.currentTheme="simple")}catch(E){}"kennedy"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");"1"==urlParams.transparent&&(document.body.style.background="transparent");var B=null!=k?k():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));null!=window.mxscript&&
+"jgraph.github.io"===window.location.hostname||/drawio-dev\.pages\.dev$/.test(window.location.hostname))&&App.isSimpleThemePreferred()&&(Editor.currentTheme="simple")}catch(F){}"kennedy"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");"1"==urlParams.transparent&&(document.body.style.background="transparent");var y=null!=l?l():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));null!=window.mxscript&&
("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)}):"undefined"===typeof window.Dropbox&&(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(B);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,B,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(E){EditorUi.isElectronApp?
-(mxLog.show(),mxLog.debug(E.stack)):(EditorUi.logError(E.message,null,null,null,E),window.setTimeout(function(){alert(E.message)},1))}}mxResources.parse(c[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var l=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=l){EditorUi.debug("Setting configuration",JSON.stringify(l));if(null!=l.merge){var m=localStorage.getItem(Editor.configurationKey);if(null!=
-m)try{var t=JSON.parse(m),v;for(v in l.merge)t[v]=l.merge[v];l=t}catch(B){window.location.hash="",alert(B)}else l=l.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(l)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(B){window.location.hash="",alert(B)}1<c.length&&(Graph.prototype.defaultThemes["default-style2"]=c[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=
-c[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?f():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],f,function(B){document.body.innerHTML="";var E=document.createElement("pre");mxUtils.write(E,B.stack);document.body.appendChild(E)}))},function(c){c=document.getElementById("geStatus");null!=c&&(c.innerHTML="Error loading page. <a>Please try refreshing.</a>",c.getElementsByTagName("a")[0].onclick=function(){mxLanguage=
+"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(y);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,y,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(F){EditorUi.isElectronApp?
+(mxLog.show(),mxLog.debug(F.stack)):(EditorUi.logError(F.message,null,null,null,F),window.setTimeout(function(){alert(F.message)},1))}}mxResources.parse(c[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var k=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=k){EditorUi.debug("Setting configuration",JSON.stringify(k));if(null!=k.merge){var m=localStorage.getItem(Editor.configurationKey);if(null!=
+m)try{var t=JSON.parse(m),x;for(x in k.merge)t[x]=k.merge[x];k=t}catch(y){window.location.hash="",alert(y)}else k=k.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(k)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(y){window.location.hash="",alert(y)}1<c.length&&(Graph.prototype.defaultThemes["default-style2"]=c[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=
+c[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?f():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],f,function(y){document.body.innerHTML="";var F=document.createElement("pre");mxUtils.write(F,y.stack);document.body.appendChild(F)}))},function(c){c=document.getElementById("geStatus");null!=c&&(c.innerHTML="Error loading page. <a>Please try refreshing.</a>",c.getElementsByTagName("a")[0].onclick=function(){mxLanguage=
"en";d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';else if(Editor.loadCompatibleCss(),App.isMainCalled=!0,window.onerror=function(L,
-c,f,l,m){EditorUi.logError("Global: "+(null!=L?L:""),c,f,l,m,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",L,"\nURL:",c,"\nLine:",f,"\nColumn:",l,"\nError:",m)):console.error("Message:",L,"\nURL:",c,"\nLine:",f,"\nColumn:",l,"\nError:",m);window.setTimeout(function(){alert("Error: "+(null!=L?L:""))},100)},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 x=document.getElementById("geInfo");null!=x&&x.parentNode.removeChild(x)}"1"==urlParams.embed&&document.body.classList.add("geEmbed");null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"!=urlParams.enableSW&&
+c,f,k,m){EditorUi.logError("Global: "+(null!=L?L:""),c,f,k,m,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",L,"\nURL:",c,"\nLine:",f,"\nColumn:",k,"\nError:",m)):console.error("Message:",L,"\nURL:",c,"\nLine:",f,"\nColumn:",k,"\nError:",m);window.setTimeout(function(){alert("Error: "+(null!=L?L:""))},100)},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 v=document.getElementById("geInfo");null!=v&&v.parentNode.removeChild(v)}"1"==urlParams.embed&&document.body.classList.add("geEmbed");null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"!=urlParams.enableSW&&
"1"==urlParams.dev)?(EditorUi.debug("App.main","Uninstalling service worker"),App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")})):Editor.enableServiceWorker&&navigator.serviceWorker.getRegistration().then(function(L){null!=L?(EditorUi.debug("App.main","Updating service worker"),L.update()):!Editor.isSettingsEnabled()||null!=mxSettings.settings&&!mxSettings.settings.isNew||"1"==urlParams.enableSW?(EditorUi.debug("App.main","Installing service worker"),navigator.serviceWorker.register("service-worker.js")):
-EditorUi.debug("App.main","Skipping service worker (first load)")})}catch(L){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&("1"!=urlParams.embedRT||"1"==urlParams.lockdown)||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var z=
-null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var y=JSON.parse(localStorage.getItem(mxSettings.key));null!=y&&(z=y.plugins)}catch(L){}y=urlParams.p;App.initPluginCallback();null!=y&&App.loadPlugins(y.split(";"));if(null!=z&&0<z.length&&"0"!=urlParams.plugins)for(x=0;x<z.length;x++)try{("/"==z[x].charAt(0)&&(z[x]=PLUGINS_BASE_PATH+z[x]),App.isSameDomain(z[x]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(z[x])?null==
-App.pluginsLoaded[z[x]]&&(App.pluginsLoaded[z[x]]=!0,App.embedModePluginsCount++,mxscript(z[x])):null!=window.console&&console.log("Unknown plugin:",z[x]):null!=window.console&&console.log("Blocked plugin:",z[x])}catch(L){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",
-null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var F=window.opener||window.parent,N=function(L){if(L.source==F)try{var c=JSON.parse(L.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",N),Editor.configure(c.config),mxSettings.load(),null!=c.config.darkColor&&document.body.style.setProperty("--dark-color",c.config.darkColor),c.colorSchemeMeta&&mxmeta("color-scheme",
-"dark light"),n())}catch(f){null!=window.console&&console.log("Error in configure message: "+f,L.data)}};mxEvent.addListener(window,"message",N);F.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(L){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(L.stack)):console.error(L)}if(isLocalStorage&&
-null!=localStorage&&"1"!=urlParams.embed){var K=localStorage.getItem(Editor.configurationKey);if(null!=K)try{K=JSON.parse(K),null!=K&&(EditorUi.debug("Using local configuration",K),Editor.configure(K),mxSettings.load())}catch(L){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(L.stack)):console.error(L)}}}n()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(L){document.body.innerHTML="",z=
-document.createElement("pre"),mxUtils.write(z,L.stack),document.body.appendChild(z)}};mxUtils.extend(App,EditorUi);App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
-App.loadPlugins=function(b,k){EditorUi.debug("Loading plugins",b);for(var n=0;n<b.length;n++)if(null!=b[n]&&0<b[n].length)try{if(null!=App.pluginRegistry[b[n]]){var d=PLUGINS_BASE_PATH+App.pluginRegistry[b[n]];null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?k?mxinclude(d):mxscript(d):k?mxinclude(d):mxscript(drawDevUrl+d))}else null!=window.console&&console.log("Unknown plugin:",b[n])}catch(x){null!=window.console&&console.log("Error loading plugin:",
-b[n],x)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
+EditorUi.debug("App.main","Skipping service worker (first load)")})}catch(L){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&("1"!=urlParams.embedRT||"1"==urlParams.lockdown)||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var A=
+null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var z=JSON.parse(localStorage.getItem(mxSettings.key));null!=z&&(A=z.plugins)}catch(L){}z=urlParams.p;App.initPluginCallback();null!=z&&App.loadPlugins(z.split(";"));if(null!=A&&0<A.length&&"0"!=urlParams.plugins)for(v=0;v<A.length;v++)try{("/"==A[v].charAt(0)&&(A[v]=PLUGINS_BASE_PATH+A[v]),App.isSameDomain(A[v]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(A[v])?null==
+App.pluginsLoaded[A[v]]&&(App.pluginsLoaded[A[v]]=!0,App.embedModePluginsCount++,mxscript(A[v])):null!=window.console&&console.log("Unknown plugin:",A[v]):null!=window.console&&console.log("Blocked plugin:",A[v])}catch(L){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",
+null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var D=window.opener||window.parent,P=function(L){if(L.source==D)try{var c=JSON.parse(L.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",P),Editor.configure(c.config),mxSettings.load(),null!=c.config.darkColor&&document.body.style.setProperty("--dark-color",c.config.darkColor),c.colorSchemeMeta&&mxmeta("color-scheme",
+"dark light"),n())}catch(f){null!=window.console&&console.log("Error in configure message: "+f,L.data)}};mxEvent.addListener(window,"message",P);D.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(L){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(L.stack)):console.error(L)}if(isLocalStorage&&
+null!=localStorage&&"1"!=urlParams.embed){var J=localStorage.getItem(Editor.configurationKey);if(null!=J)try{J=JSON.parse(J),null!=J&&(EditorUi.debug("Using local configuration",J),Editor.configure(J),mxSettings.load())}catch(L){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(L.stack)):console.error(L)}}}n()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(L){document.body.innerHTML="",A=
+document.createElement("pre"),mxUtils.write(A,L.stack),document.body.appendChild(A)}};mxUtils.extend(App,EditorUi);App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
+App.loadPlugins=function(b,l){EditorUi.debug("Loading plugins",b);for(var n=0;n<b.length;n++)if(null!=b[n]&&0<b[n].length)try{if(null!=App.pluginRegistry[b[n]]){var d=PLUGINS_BASE_PATH+App.pluginRegistry[b[n]];null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?l?mxinclude(d):mxscript(d):l?mxinclude(d):mxscript(drawDevUrl+d))}else null!=window.console&&console.log("Unknown plugin:",b[n])}catch(v){null!=window.console&&console.log("Error loading plugin:",
+b[n],v)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};
App.prototype.init=function(){if(!App.blockedAncestorFrames()){this.buttonContainer=this.createButtonContainer();EditorUi.prototype.init.apply(this,arguments);this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(!0)}));try{this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||
-"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this),null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()}))}catch(y){null!=window.console&&console.log("GitHubClient disabled: "+y.message)}try{this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this),null!=this.gitLab&&this.gitLab.addListener("userChanged",
-mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()}))}catch(y){null!=window.console&&console.log("GitLabClient disabled: "+y.message)}if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){if("undefined"!==typeof OneDrive)try{this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",
-this.oneDrive))}catch(y){null!=window.console&&console.log("OneDriveClient disabled: "+y.message)}else null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var k=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded",
-"client",this.trello))}catch(y){null!=window.console&&console.log("TrelloClient disabled: "+y.message)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=k)});k()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var n=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var y=mxUtils.bind(this,function(){try{this.drive=new DriveClient(this),this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries();"1"!=urlParams.dev&&
-this.checkLicense()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))}catch(F){null!=window.console&&console.log("DriveClient disabled: "+F.message)}});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,y),window.DrawGapiClientCallback=null):y()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=n)});n()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){if("function"===typeof Dropbox){window.DrawDropboxClientCallback=
-null;try{this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(y){null!=window.console&&console.log("DropboxClient disabled: "+y.message)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=d)});d()}if("1"!=urlParams.embed&&(this.setGraphEnabled(!1),"1"==urlParams.local?this.setMode(App.MODE_DEVICE):
-this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(y){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),mxUtils.bind(this,function(){y.prompt()}),!0,!0)})),!this.isOwnGDriveDomain()||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var y=this.getCurrentFile();y=null!=y?y.getMode():
-null;mxClient.IS_CHROMEAPP||mxClient.IS_ANDROID||mxClient.IS_IOS||EditorUi.isElectronApp||this.isOffline()||null!=urlParams.open||"1"==urlParams.extAuth||y!=App.MODE_DEVICE&&y!=App.MODE_BROWSER||this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||!Editor.enableRealtimeCache||this.editor.chromeless&&!this.editor.editable))){var x=window.setTimeout(mxUtils.bind(this,function(){Editor.enableRealtimeCache=
-!1}),Editor.cacheTimeout);mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(y){Editor.enableRealtimeCache=200<=y.getStatus()&&299>=y.getStatus();window.clearTimeout(x)}),function(){Editor.enableRealtimeCache=!1;window.clearTimeout(x)})}this.updateHeader();if(null!=this.menubar){if("sketch"!=Editor.currentTheme&&("simple"!=Editor.currentTheme||"1"!=urlParams.embed)){var z=mxUtils.bind(this,function(){"1"!=urlParams.embed?this.menubar.container.appendChild(this.buttonContainer):this.toolbarContainer.appendChild(this.buttonContainer)});
-this.addListener("languageChanged",z);this.addListener("currentThemeChanged",z);z()}("kennedy"==Editor.currentTheme&&"1"==urlParams.embed||"atlas"==Editor.currentTheme&&"1"!=urlParams.embed)&&this.setCompactMode(!0);if("atlas"==Editor.currentTheme||"1"==urlParams.atlas)this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.className="geSmallAppIcon","1"!=urlParams.embed&&(this.icon.style.cursor=
-"pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(y){this.appIconClicked(y)}))),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild)}this.editor.graph.isViewer()&&this.initializeViewerMode()}};
-App.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&b.substring(0,b.length-1);b="";for(var k=0;k<window.location.ancestorOrigins.length;k++)if(b+=" -> "+window.location.ancestorOrigins[k],b.endsWith("dan6v7pm1f1a1.cloudfront.net")||b.endsWith("confluence-cloud-excalidraw-2-ll3likebca-uc.a.run.app"))return!0}}catch(n){}return!1};
+"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this),null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()}))}catch(z){null!=window.console&&console.log("GitHubClient disabled: "+z.message)}try{this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this),null!=this.gitLab&&this.gitLab.addListener("userChanged",
+mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()}))}catch(z){null!=window.console&&console.log("GitLabClient disabled: "+z.message)}if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){if("undefined"!==typeof OneDrive)try{this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",
+this.oneDrive))}catch(z){null!=window.console&&console.log("OneDriveClient disabled: "+z.message)}else null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var l=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded",
+"client",this.trello))}catch(z){null!=window.console&&console.log("TrelloClient disabled: "+z.message)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=l)});l()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var n=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var z=mxUtils.bind(this,function(){try{this.drive=new DriveClient(this),this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries();"1"!=urlParams.dev&&
+this.checkLicense()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))}catch(D){null!=window.console&&console.log("DriveClient disabled: "+D.message)}});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,z),window.DrawGapiClientCallback=null):z()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=n)});n()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){if("function"===typeof Dropbox){window.DrawDropboxClientCallback=
+null;try{this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(z){null!=window.console&&console.log("DropboxClient disabled: "+z.message)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=d)});d()}if("1"!=urlParams.embed&&(this.setGraphEnabled(!1),"1"==urlParams.local?this.setMode(App.MODE_DEVICE):
+this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(z){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),mxUtils.bind(this,function(){z.prompt()}),!0,!0)})),!this.isOwnGDriveDomain()||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var z=this.getCurrentFile();z=null!=z?z.getMode():
+null;mxClient.IS_CHROMEAPP||mxClient.IS_ANDROID||mxClient.IS_IOS||EditorUi.isElectronApp||this.isOffline()||null!=urlParams.open||"1"==urlParams.extAuth||z!=App.MODE_DEVICE&&z!=App.MODE_BROWSER||this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||!Editor.enableRealtimeCache||this.editor.chromeless&&!this.editor.editable))){var v=window.setTimeout(mxUtils.bind(this,function(){Editor.enableRealtimeCache=
+!1}),Editor.cacheTimeout);mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(z){Editor.enableRealtimeCache=200<=z.getStatus()&&299>=z.getStatus();window.clearTimeout(v)}),function(){Editor.enableRealtimeCache=!1;window.clearTimeout(v)})}this.updateHeader();if(null!=this.menubar){if("sketch"!=Editor.currentTheme&&("simple"!=Editor.currentTheme||"1"!=urlParams.embed)){var A=mxUtils.bind(this,function(){"1"!=urlParams.embed?this.menubar.container.appendChild(this.buttonContainer):this.toolbarContainer.appendChild(this.buttonContainer)});
+this.addListener("languageChanged",A);this.addListener("currentThemeChanged",A);A()}("kennedy"==Editor.currentTheme&&"1"==urlParams.embed||"atlas"==Editor.currentTheme&&"1"!=urlParams.embed)&&this.setCompactMode(!0);if("atlas"==Editor.currentTheme||"1"==urlParams.atlas)this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.className="geSmallAppIcon","1"!=urlParams.embed&&(this.icon.style.cursor=
+"pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(z){this.appIconClicked(z)}))),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild)}this.editor.graph.isViewer()&&this.initializeViewerMode()}};
+App.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&b.substring(0,b.length-1);b="";for(var l=0;l<window.location.ancestorOrigins.length;l++)if(b+=" -> "+window.location.ancestorOrigins[l],b.endsWith("dan6v7pm1f1a1.cloudfront.net")||b.endsWith("confluence-cloud-excalidraw-2-ll3likebca-uc.a.run.app"))return!0}}catch(n){}return!1};
App.prototype.scheduleSanityCheck=function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.sanityCheckThread||(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};
-App.prototype.sanityCheck=function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()&&b.isAutosave()&&b.isOverdue()){b.getHash();b.savingFile&&null!=b.savingFileTime&&(Date.now(),b.savingFileTime.getTime());null!=b.ageStart&&(Date.now(),b.ageStart.getTime());b.isAutosave();null!=b.opened&&(Date.now(),b.opened.getTime());null!=b.lastSaved&&(Date.now(),b.lastSaved.getTime());null!=b.lastChanged&&(Date.now(),b.lastChanged.getTime());Date.now();App.startTime.getTime();var k=null!=b.sync?"client_"+
-b.sync.clientId:"nosync";b.constructor==DriveFile&&null!=b.desc&&null!=this.drive&&(k+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType);k=mxResources.get("ensureDataSaved");null!=b.lastSaved&&(k=this.timeSince(b.lastSaved),null==k&&(k=mxResources.get("lessThanAMinute")),k=mxResources.get("lastSaved",[k]));this.spinner.stop();this.showError(mxResources.get("unsavedChanges"),k,mxResources.get("ignore"),
+App.prototype.sanityCheck=function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()&&b.isAutosave()&&b.isOverdue()){b.getHash();b.savingFile&&null!=b.savingFileTime&&(Date.now(),b.savingFileTime.getTime());null!=b.ageStart&&(Date.now(),b.ageStart.getTime());b.isAutosave();null!=b.opened&&(Date.now(),b.opened.getTime());null!=b.lastSaved&&(Date.now(),b.lastSaved.getTime());null!=b.lastChanged&&(Date.now(),b.lastChanged.getTime());Date.now();App.startTime.getTime();var l=null!=b.sync?"client_"+
+b.sync.clientId:"nosync";b.constructor==DriveFile&&null!=b.desc&&null!=this.drive&&(l+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType);l=mxResources.get("ensureDataSaved");null!=b.lastSaved&&(l=this.timeSince(b.lastSaved),null==l&&(l=mxResources.get("lessThanAMinute")),l=mxResources.get("lastSaved",[l]));this.spinner.stop();this.showError(mxResources.get("unsavedChanges"),l,mxResources.get("ignore"),
mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("save"),mxUtils.bind(this,function(){this.stopSanityCheck();this.actions.get(null!=this.mode&&b.isEditable()?"save":"saveAs").funct()}),null,null,360,140,null,mxUtils.bind(this,function(){this.scheduleSanityCheck()}))}};App.prototype.isOwnGDriveDomain=function(){return"test.draw.io"==window.location.hostname||"preprod.diagrams.net"==window.location.hostname||"app.diagrams.net"==window.location.hostname||/drawio-dev\.pages\.dev$/.test(window.location.hostname)};
App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&this.isOwnGDriveDomain()};App.prototype.getPusher=function(){null==this.pusher&&"function"===typeof window.Pusher&&(this.pusher=new Pusher(App.PUSHER_KEY,{cluster:App.PUSHER_CLUSTER,encrypted:!0}));return this.pusher};
-App.prototype.searchHelp=function(b){var k="https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(b);this.openLink(k);0<b.length&&EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:b})};
+App.prototype.searchHelp=function(b){var l="https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(b);this.openLink(l);0<b.length&&EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:b})};
App.prototype.showNameConfBanner=function(){this.showBanner("ConfFooter","Try draw.io for Confluence",mxUtils.bind(this,function(){this.openLink("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence")}),!0)};App.prototype.showDownloadDesktopBanner=function(){this.showBanner("DesktopFooter",mxResources.get("downloadDesktop"),mxUtils.bind(this,function(){this.openLink("https://get.diagrams.net/")}),!0,!0)};
App.prototype.showRatingBanner=function(){if(!(this.bannerShowing||this.hideBannerratingFooter||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeratingFooter)){var b=document.createElement("div");b.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(b.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(b.style,
-"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.setAttribute("border","0");k.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(k);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var n=document.createElement("img");
+"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.setAttribute("border","0");l.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(l);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var n=document.createElement("img");
n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.setAttribute("title","1 star");n.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");n.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(n);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.setAttribute("title","2 star");d.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");d.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(d);var x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.setAttribute("title","3 star");x.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");x.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(x);var z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.setAttribute("title","4 star");z.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");z.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(z);this.bannerShowing=!0;var y=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(k,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);y()}));mxEvent.addListener(n,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);y()}));mxEvent.addListener(d,"click",mxUtils.bind(this,
-function(F){mxEvent.consume(F);y()}));mxEvent.addListener(x,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);y()}));mxEvent.addListener(z,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");y()}));k=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){y()}),1E3)});window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(k,6E4)}};
-App.prototype.checkLicense=function(){var b=this.drive.getUser(),k=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=k&&null!=b.id){var n=k.lastIndexOf("@"),d=0<=n?k.substring(n+1):"";b=Editor.crc32(b.id);"gmail.com"!==d.toLowerCase()&&mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(x){try{if(200<=x.getStatus()&&299>=x.getStatus()){var z=x.getText();if(0<z.length){var y=JSON.parse(z);
-null!=y&&this.handleLicense(y,d)}}}catch(F){}}))}};App.prototype.handleLicense=function(b,k){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
-App.prototype.addRecent=function(b,k,n){if(isLocalStorage&&null!=localStorage){k=null!=k?k:"";var d=this.getRecent(k);if(null==d)d=[];else for(var x=0;x<d.length;x++)d[x].mode==b.mode&&d[x].id==b.id&&d.splice(x,1);null!=d&&(n=null!=n?n:10,d.unshift(b),d=d.slice(0,n),localStorage.setItem(".recent"+k,JSON.stringify(d)))}};App.prototype.getRecent=function(b){if(isLocalStorage&&null!=localStorage){try{var k=localStorage.getItem(".recent"+(null!=b?b:""));if(null!=k)return JSON.parse(k)}catch(n){}return null}};
-App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent"+(null!=b?b:""))}catch(k){}};
+b.appendChild(d);var v=document.createElement("img");v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.setAttribute("title","3 star");v.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");v.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(v);var A=document.createElement("img");A.setAttribute("border","0");A.setAttribute("align","absmiddle");A.setAttribute("title","4 star");A.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");A.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(A);this.bannerShowing=!0;var z=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(l,"click",mxUtils.bind(this,function(D){mxEvent.consume(D);z()}));mxEvent.addListener(n,"click",mxUtils.bind(this,function(D){mxEvent.consume(D);z()}));mxEvent.addListener(d,"click",mxUtils.bind(this,
+function(D){mxEvent.consume(D);z()}));mxEvent.addListener(v,"click",mxUtils.bind(this,function(D){mxEvent.consume(D);z()}));mxEvent.addListener(A,"click",mxUtils.bind(this,function(D){mxEvent.consume(D);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");z()}));l=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){z()}),1E3)});window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(l,6E4)}};
+App.prototype.checkLicense=function(){var b=this.drive.getUser(),l=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=l&&null!=b.id){var n=l.lastIndexOf("@"),d=0<=n?l.substring(n+1):"";b=Editor.crc32(b.id);"gmail.com"!==d.toLowerCase()&&mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(v){try{if(200<=v.getStatus()&&299>=v.getStatus()){var A=v.getText();if(0<A.length){var z=JSON.parse(A);
+null!=z&&this.handleLicense(z,d)}}}catch(D){}}))}};App.prototype.handleLicense=function(b,l){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
+App.prototype.addRecent=function(b,l,n){if(isLocalStorage&&null!=localStorage){l=null!=l?l:"";var d=this.getRecent(l);if(null==d)d=[];else for(var v=0;v<d.length;v++)d[v].mode==b.mode&&d[v].id==b.id&&d.splice(v,1);null!=d&&(n=null!=n?n:10,d.unshift(b),d=d.slice(0,n),localStorage.setItem(".recent"+l,JSON.stringify(d)))}};App.prototype.getRecent=function(b){if(isLocalStorage&&null!=localStorage){try{var l=localStorage.getItem(".recent"+(null!=b?b:""));if(null!=l)return JSON.parse(l)}catch(n){}return null}};
+App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent"+(null!=b?b:""))}catch(l){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");this.unloading=!0;var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return this.logIfModified(b),mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
-App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,k=this.getCurrentFile();null==k||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=k&&(b=(null!=k.getTitle()?k.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};
-App.prototype.getThumbnail=function(b,k,n){n=null!=n?n:0;var d=!1;try{var x=!0,z=window.setTimeout(mxUtils.bind(this,function(){x=!1;k(null)}),this.timeout),y=mxUtils.bind(this,function(P){window.clearTimeout(z);x&&k(P)});null==this.thumbImageCache&&(this.thumbImageCache={});var F=this.editor.graph,N=F.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var K=F.getGlobalVariable;F=this.createTemporaryGraph(F.getStylesheet());F.setBackgroundImage=this.editor.graph.setBackgroundImage;
-var L=this.pages[0];this.currentPage==L?F.setBackgroundImage(N):null!=L.viewState&&null!=L.viewState&&(N=L.viewState.backgroundImage,F.setBackgroundImage(N));F.getGlobalVariable=function(P){return"page"==P?L.getName():"pagenumber"==P?1:K.apply(this,arguments)};F.getGlobalVariable=K;document.body.appendChild(F.container);F.model.setRoot(L.root)}if(mxClient.IS_CHROMEAPP||Editor.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(P){try{F!=this.editor.graph&&null!=F.container.parentNode&&
-F.container.parentNode.removeChild(F.container)}catch(q){P=null}y(P)}),b,this.thumbImageCache,"#ffffff",function(){y()},null,null,null,null,null,null,F,n,null,null,null,"diagram",null),d=!0;else if(Editor.canvasSupported&&null!=this.getCurrentFile()){var c=document.createElement("canvas"),f=F.getGraphBounds(),l=F.view.translate,m=F.view.scale;null!=N&&(f=mxRectangle.fromRectangle(f),f.add(new mxRectangle((l.x+N.x)*m,(l.y+N.y)*m,N.width*m,N.height*m)));var t=b/f.width;t=Math.min(1,Math.min(3*b/(4*
-f.height),t));var v=Math.floor(f.x),B=Math.floor(f.y);c.setAttribute("width",Math.ceil(t*(f.width+4)));c.setAttribute("height",Math.ceil(t*(f.height+4)));var E=c.getContext("2d");E.scale(t,t);E.translate(-v,-B);var D=F.background;if(null==D||""==D||D==mxConstants.NONE)D="#ffffff";E.save();E.fillStyle=D;E.fillRect(v,B,Math.ceil(f.width+4),Math.ceil(f.height+4));E.restore();if(null!=N){var A=new Image;A.src=N.src;E.drawImage(A,N.x*t,N.y*t,N.width*t,N.height*t)}var S=new mxJsCanvas(c),R=new mxAsyncCanvas(this.thumbImageCache);
-S.images=this.thumbImageCache.images;var T=new mxImageExport;T.drawShape=function(P,q){P.shape instanceof mxShape&&P.shape.checkBounds()&&(q.save(),q.translate(.5,.5),P.shape.paint(q),q.translate(-.5,-.5),q.restore())};T.drawText=function(P,q){};T.drawState(F.getView().getState(F.model.root),R);R.finish(mxUtils.bind(this,function(){try{T.drawState(F.getView().getState(F.model.root),S),F!=this.editor.graph&&null!=F.container.parentNode&&F.container.parentNode.removeChild(F.container)}catch(P){c=null}y(c)}));
-d=!0}}catch(P){d=!1,null!=F&&F!=this.editor.graph&&null!=F.container.parentNode&&F.container.parentNode.removeChild(F.container)}d||window.clearTimeout(z);return d};
-(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(k,n){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();k=null!=d?d.getMode():k;null==this.updateTitleListener&&(this.updateTitleListener=mxUtils.bind(this,function(){k==App.MODE_GOOGLE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])):k==App.MODE_DROPBOX?this.appIcon.setAttribute("title",
-mxResources.get("openIt",[mxResources.get("dropbox")])):k==App.MODE_ONEDRIVE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])):this.appIcon.removeAttribute("title")}),this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTitleListener()})));this.updateTitleListener()}if(n)try{if(isLocalStorage)localStorage.setItem(".mode",k);else if("undefined"!=typeof Storage){var x=new Date;x.setYear(x.getFullYear()+1);document.cookie="MODE="+k+"; expires="+
-x.toUTCString()}}catch(z){}}})();
-App.prototype.appIconClicked=function(b){var k=this.getCurrentFile(),n=null!=k?k.getMode():null;k=null!=k?mxEvent.isAltDown(b)?k.getFolderUrl():k.getFileUrl():null;null!=k?this.openLink(k):n==App.MODE_GOOGLE?this.openLink("https://drive.google.com/?authuser=0"):n==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):n==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):n==App.MODE_GITHUB?this.openLink("https://github.com/"):n==App.MODE_GITLAB?this.openLink(DRAWIO_GITLAB_URL):n==App.MODE_TRELLO?
+App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,l=this.getCurrentFile();null==l||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=l&&(b=(null!=l.getTitle()?l.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};
+App.prototype.getThumbnail=function(b,l,n){n=null!=n?n:0;var d=!1;try{var v=!0,A=window.setTimeout(mxUtils.bind(this,function(){v=!1;l(null)}),this.timeout),z=mxUtils.bind(this,function(O){window.clearTimeout(A);v&&l(O)});null==this.thumbImageCache&&(this.thumbImageCache={});var D=this.editor.graph,P=D.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var J=D.getGlobalVariable;D=this.createTemporaryGraph(D.getStylesheet());D.setBackgroundImage=this.editor.graph.setBackgroundImage;
+var L=this.pages[0];this.currentPage==L?D.setBackgroundImage(P):null!=L.viewState&&null!=L.viewState&&(P=L.viewState.backgroundImage,D.setBackgroundImage(P));D.getGlobalVariable=function(O){return"page"==O?L.getName():"pagenumber"==O?1:J.apply(this,arguments)};D.getGlobalVariable=J;document.body.appendChild(D.container);D.model.setRoot(L.root)}if(mxClient.IS_CHROMEAPP||Editor.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(O){try{D!=this.editor.graph&&null!=D.container.parentNode&&
+D.container.parentNode.removeChild(D.container)}catch(q){O=null}z(O)}),b,this.thumbImageCache,"#ffffff",function(){z()},null,null,null,null,null,null,D,n,null,null,null,"diagram",null),d=!0;else if(Editor.canvasSupported&&null!=this.getCurrentFile()){var c=document.createElement("canvas"),f=D.getGraphBounds(),k=D.view.translate,m=D.view.scale;null!=P&&(f=mxRectangle.fromRectangle(f),f.add(new mxRectangle((k.x+P.x)*m,(k.y+P.y)*m,P.width*m,P.height*m)));var t=b/f.width;t=Math.min(1,Math.min(3*b/(4*
+f.height),t));var x=Math.floor(f.x),y=Math.floor(f.y);c.setAttribute("width",Math.ceil(t*(f.width+4)));c.setAttribute("height",Math.ceil(t*(f.height+4)));var F=c.getContext("2d");F.scale(t,t);F.translate(-x,-y);var E=D.background;if(null==E||""==E||E==mxConstants.NONE)E="#ffffff";F.save();F.fillStyle=E;F.fillRect(x,y,Math.ceil(f.width+4),Math.ceil(f.height+4));F.restore();if(null!=P){var C=new Image;C.src=P.src;F.drawImage(C,P.x*t,P.y*t,P.width*t,P.height*t)}var S=new mxJsCanvas(c),U=new mxAsyncCanvas(this.thumbImageCache);
+S.images=this.thumbImageCache.images;var Q=new mxImageExport;Q.drawShape=function(O,q){O.shape instanceof mxShape&&O.shape.checkBounds()&&(q.save(),q.translate(.5,.5),O.shape.paint(q),q.translate(-.5,-.5),q.restore())};Q.drawText=function(O,q){};Q.drawState(D.getView().getState(D.model.root),U);U.finish(mxUtils.bind(this,function(){try{Q.drawState(D.getView().getState(D.model.root),S),D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(O){c=null}z(c)}));
+d=!0}}catch(O){d=!1,null!=D&&D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}d||window.clearTimeout(A);return d};
+(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(l,n){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();l=null!=d?d.getMode():l;null==this.updateTitleListener&&(this.updateTitleListener=mxUtils.bind(this,function(){l==App.MODE_GOOGLE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])):l==App.MODE_DROPBOX?this.appIcon.setAttribute("title",
+mxResources.get("openIt",[mxResources.get("dropbox")])):l==App.MODE_ONEDRIVE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])):this.appIcon.removeAttribute("title")}),this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTitleListener()})));this.updateTitleListener()}if(n)try{if(isLocalStorage)localStorage.setItem(".mode",l);else if("undefined"!=typeof Storage){var v=new Date;v.setYear(v.getFullYear()+1);document.cookie="MODE="+l+"; expires="+
+v.toUTCString()}}catch(A){}}})();
+App.prototype.appIconClicked=function(b){var l=this.getCurrentFile(),n=null!=l?l.getMode():null;l=null!=l?mxEvent.isAltDown(b)?l.getFolderUrl():l.getFileUrl():null;null!=l?this.openLink(l):n==App.MODE_GOOGLE?this.openLink("https://drive.google.com/?authuser=0"):n==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):n==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):n==App.MODE_GITHUB?this.openLink("https://github.com/"):n==App.MODE_GITLAB?this.openLink(DRAWIO_GITLAB_URL):n==App.MODE_TRELLO?
this.openLink("https://trello.com/"):n==App.MODE_DEVICE?this.openLink("https://get.draw.io/"):this.openLink("https://www.drawio.com/");mxEvent.consume(b)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};
-App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var k=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(k.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(n,d,x){this.spinner.stop();null==d&&(d=urlParams.title,x=!0,d=null!=d?decodeURIComponent(d):this.defaultFilename);0<(Editor.useCanvasForExport?
--1:".png"==d.substring(d.length-4))&&(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,n,d):new LocalFile(this,n,d,x))}))}}catch(n){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
+App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var l=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(l.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(n,d,v){this.spinner.stop();null==d&&(d=urlParams.title,v=!0,d=null!=d?decodeURIComponent(d):this.defaultFilename);0<(Editor.useCanvasForExport?
+-1:".png"==d.substring(d.length-4))&&(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,n,d):new LocalFile(this,n,d,v))}))}}catch(n){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
App.prototype.load=function(){try{if("1"!=urlParams.embed)try{if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(b){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash=
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}catch(b){this.handleError(b)}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})}catch(b){EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(b.stack)):(EditorUi.logError(b.message,null,null,null,b),alert(b.message))}};
-App.prototype.showRefreshDialog=function(b,k){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),k||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var n=this.getCurrentFile();null!=n&&n.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&
+App.prototype.showRefreshDialog=function(b,l){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),l||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var n=this.getCurrentFile();null!=n&&n.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&
(b=this.createRealtimeNotice(),b.style.left="0",b.style.right="0",b.style.borderRadius="0",b.style.borderLeftStyle="none",b.style.borderRightStyle="none",b.style.marginBottom="26px",b.style.padding="8px 0 8px 0",this.dialog.container.appendChild(b)))};
-App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var k=document.createElement("div");k.className="geAlert";k.style.zIndex=2E9;k.style.left="50%";k.style.top="-100%";k.style.maxWidth="80%";k.style.width="max-content";k.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(k.style,"transition","all 1s ease");k.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
-b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");k.appendChild(b);mxEvent.addListener(b,"click",function(n){null!=k.parentNode&&(k.parentNode.removeChild(k),mxEvent.consume(n))});document.body.appendChild(k);window.setTimeout(function(){k.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(k.style,"transition","all 2s ease");k.style.opacity="0";window.setTimeout(function(){null!=k.parentNode&&k.parentNode.removeChild(k)},
+App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var l=document.createElement("div");l.className="geAlert";l.style.zIndex=2E9;l.style.left="50%";l.style.top="-100%";l.style.maxWidth="80%";l.style.width="max-content";l.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(l.style,"transition","all 1s ease");l.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
+b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");l.appendChild(b);mxEvent.addListener(b,"click",function(n){null!=l.parentNode&&(l.parentNode.removeChild(l),mxEvent.consume(n))});document.body.appendChild(l);window.setTimeout(function(){l.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(l.style,"transition","all 2s ease");l.style.opacity="0";window.setTimeout(function(){null!=l.parentNode&&l.parentNode.removeChild(l)},
2E3)},15E3)}};
-App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(N,K,L,c,f){"ResizeObserver loop limit exceeded"!=N&&(EditorUi.logError("Uncaught: "+(null!=N?N:""),K,L,c,f,null,!0),b.handleError({message:N},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(N){var K=this.getCurrentFile();EditorUi.debug("storage event",[N],
-[K]);null!=K&&".draft-alive-check"==N.key&&null!=N.newValue&&null!=K.draftId&&(this.draftAliveCheck=N.newValue,K.saveDraft())}))}catch(N){}var k=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(N){try{var K=this.getDiagramId();if(K!=k){k=K;var L=this.getCurrentFile();null!=L&&L.getHash()==K||this.loadFile(K,!0)}else{var c=this.getHashObject();if(null!=c&&null!=c.pageId&&null!=this.currentPage&&c.pageId!=this.currentPage.getId()){var f=this.getPageById(c.pageId);
-null!=f&&this.selectPage(f)}}}catch(l){null!=document.body&&this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();window.location.hash=null!=m?m.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(N){this.handleError(N,mxResources.get("errorLoadingFile"))}))}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}else if((null==
-window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var n=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var N=mxUtils.bind(this,function(c){Editor.isPngDataUrl(c)&&(c=Editor.extractGraphModelFromPng(c));var f=urlParams.title;f=null!=f?decodeURIComponent(f):this.defaultFilename;c=new LocalFile(this,
-c,f,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(c.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(c);this.editor.chromeless||(c.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),K=window.opener||window.parent;if(K!=window){var L=urlParams.create;null!=L?N(K[decodeURIComponent(L)]):(L=urlParams.data,null!=L?N(decodeURIComponent(L)):this.spinner.spin(document.body,mxResources.get("loading"))&&
-this.createTimeout(2E3,mxUtils.bind(this,function(c){this.installMessageHandler(mxUtils.bind(this,function(f,l){l.source==K&&c.clear()&&(this.spinner.stop(),N(f))}))}),mxUtils.bind(this,function(c){this.handleError(c)})))}}else if(null==this.dialog)if("1"==urlParams.demo)L=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=L;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,
-!0),this.actions.get("insertTemplate").funct();else{L=!1;try{L=null!=window.opener&&null!=window.opener.openFile}catch(c){}L?this.spinner.spin(document.body,mxResources.get("loading")):(L=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=L&&0!=L.length||this.editor.isChromelessView()?null!=L&&0<L.length?this.loadFile(L,null,null,mxUtils.bind(this,function(){var c=decodeURIComponent(urlParams.viewbox||"");if(""!=c)try{var f=JSON.parse(c);this.editor.graph.fitWindow(f,
-f.border)}catch(l){console.error(l)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),d=decodeURIComponent(urlParams.create||"");null!=window.location.hash&&"#create="==window.location.hash.substring(0,8)&&(d=decodeURIComponent(window.location.hash.substring(8)));if((null==window.location.hash||1>=window.location.hash.length||"#create="==window.location.hash.substring(0,
-8))&&0<d.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var x=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),z=mxUtils.bind(this,function(N){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,N,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var K=urlParams.title;K=null!=K?decodeURIComponent(K):this.defaultFilename;N=this.getServiceCount(!0);
-isLocalStorage&&N++;var L=4>=N?2:6<N?4:3;K=new CreateDialog(this,K,mxUtils.bind(this,function(c,f){if(null==f){this.hideDialog();var l=Editor.useLocalStorage;this.createFile(0<c.length?c:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=l}else this.pickFolder(f,mxUtils.bind(this,function(m){this.createFile(c,this.getFileData(!0),null,f,null,!0,m)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,L,null,null,null,this.editor.fileExtensions);this.showDialog(K.container,
-420,N>L?390:280,!0,!1,mxUtils.bind(this,function(c){c&&null==this.getCurrentFile()&&this.showSplash()}));K.init()}});if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))if("{"==d.charAt(0)){this.spinner.stop();d=JSON.parse(d);var y=mxUtils.bind(this,function(N){this.createFile(null!=N.filename?N.filename:this.defaultFilename,N,null,null,mxUtils.bind(this,function(){this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct();window.history.replaceState(null,null,window.location.pathname+
-this.getSearch(["create"]));window.location.hash="R"+Graph.compress(N)}),!0,null,!0)}),F=d.data;d.compressed&&(F=Graph.decompress(F));"mermaid"==d.type?window.isMermaidEnabled?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){N!=this.emptyDiagramXml&&y(N)})),this.generateMermaidImage(F,null,function(){},mxUtils.bind(this,function(N){for(var K=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),L=0;L<K.length;L++)K[L].parentNode.removeChild(K[L]);mxMermaidToDrawio.resetListeners();
-this.handleError(N)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):"generate"==d.type&&this.spinner.spin(document.body,mxResources.get("generate")+" '"+F+"'")&&this.generateDiagram(F,mxUtils.bind(this,function(N){this.spinner.stop();y(N)}),mxUtils.bind(this,function(N){this.handleError(N,mxResources.get("errorLoadingFile"))}))}else try{null!=window.opener&&null!=window.opener[d]?z(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(N){this.handleError(N,
-mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(N){z(N)},mxUtils.bind(this,function(N){this.handleError(N,mxResources.get("errorLoadingFile"),x)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state","splash"])),window.location.hash=
-"G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&
-window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),n())}}catch(N){this.handleError(N)}};
-App.prototype.openTemplateDialog=function(b){var k=this.editor.graph;k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&(b=new NewDialog(this,null,!1,mxUtils.bind(this,function(n){this.hideDialog();if(null!=n){var d=this.editor.graph.getFreeInsertPoint(!0);k.setSelectionCells(this.importXml(n,Math.max(d.x,20),Math.max(d.y,20),!0,null,null,!0));k.scrollCellToVisible(k.getSelectionCell())}}),null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"),null,null,b),this.showDialog(b.container,
-620,460,!0,!0,mxUtils.bind(this,function(){this.sidebar.hideTooltip()})),b.init())};
-App.prototype.generateDiagram=function(b,k,n){var d=!1,x=null,z='Write a detailed and complex MermaidJS declaration for "'+(""!=b?b:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(y){y!=this.emptyDiagramXml&&(d=!0,x=y)}));this.generateOpenAiMermaidDiagram(z,function(y,F,N,K){x=d?x:this.createMermaidXml(y,EditorUi.defaultMermaidConfig,F,N,K,b);
-k(x,F)},n)};App.prototype.loadDraft=function(b,k){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var n=this.getCurrentFile();null!=n&&(n.fileChanged(),null!=k&&k())}),0)}),null,null,!0)};
-App.prototype.filterDrafts=function(b,k,n){function d(){n(x)}var x=[];try{this.getDatabaseItems(mxUtils.bind(this,function(z){EditorUi.debug("App.filterDrafts",[this],"items",z);for(var y=0;y<z.length;y++)try{var F=z[y].key;if(null!=F&&".draft_"==F.substring(0,7)){var N=JSON.parse(z[y].data);null!=N&&"draft"==N.type&&N.aliveCheck!=k&&(null==b&&null==N.fileObject||null!=N.fileObject&&N.fileObject.path==b)&&(N.key=F,x.push(N))}}catch(K){}d()}),d)}catch(z){d()}};
-App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(k){if(1==k.length)this.loadDraft(k[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(k[0].key)}));else if(1<k.length){var n=new Date(k[0].modified);n=new DraftDialog(this,1<k.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
-[n.toLocaleDateString()+" "+n.toLocaleTimeString()]),1<k.length?null:k[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d&&null!=k[d]?d:0;this.loadDraft(k[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(k[d].key)}))}),mxUtils.bind(this,function(d,x){this.removeDatabaseItem(k[""!=d?d:0].key);null!=x&&x()}),null,null,null,1<k.length?k:null);this.showDialog(n.container,640,480,!0,!1,mxUtils.bind(this,function(d){d&&("0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
-this.getFileData(),null,null,null,null,null,!0))}));n.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(k){}};
-App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var k=this.getServiceCount(!0),n=mxUtils.bind(this,function(){var x=new SplashDialog(this);this.showDialog(x.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(z,y){!z&&!y||mxClient.IS_CHROMEAPP||(z=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=z)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.mode&&!b)null==urlParams.create&&n();else{b=4==k?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();n()}),b);this.showDialog(d.container,3>b?200:300,3<k?320:210,!0,!1)}}};
-App.prototype.addLanguageMenu=function(b,k,n){var d=null;null!=this.menus.get("language")&&(d=document.createElement("div"),this.setElementTitle(d,"language"),d.className="geAdaptiveAsset",d.style.backgroundImage="url("+Editor.globeImage+")",d.style.backgroundPosition="right center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="19px 19px",d.style.width="19px",d.style.height="19px",mxUtils.setOpacity(d,40),d.style.position="absolute",d.style.cursor="pointer",d.style.bottom="20px",d.style.right=
-null!=n?n:"22px",k&&(d.style.direction="rtl",d.style.textAlign="right",d.style.right=null!=n?n:"24px",k=document.createElement("span"),k.style.display="inline-block",k.style.fontSize="12px",k.style.margin="2px 24px 0 0",k.style.userSelect="none",mxUtils.write(k,mxResources.get("language")),d.appendChild(k),k.className="geAdaptiveAsset"),mxEvent.addListener(d,"click",mxUtils.bind(this,function(x){this.editor.graph.popupMenuHandler.hideMenu();var z=new mxPopupMenu(this.menus.get("language").funct);
-z.smartSeparators=!0;z.showDisabled=!0;z.autoExpand=!0;z.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(z,arguments);z.destroy()});var y=mxUtils.getOffset(d);z.popup(y.x,y.y+d.offsetHeight,null,x);this.setCurrentMenu(z)})),b.appendChild(d));return d};
-App.prototype.loadFileSystemEntry=function(b,k,n){n=null!=n?n:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var x=new FileReader;x.onload=mxUtils.bind(this,function(z){var y=mxUtils.bind(this,function(F){try{if(null!=k){var N=z.target.result;"image/png"==d.type&&(N=this.extractGraphModelFromPng(N));k(new LocalFile(this,N,d.name,null,b,d,F))}else this.openFileHandle(z.target.result,d.name,d,!1,b,F)}catch(K){n(K)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,
-function(F){y("denied"!==F)})):b.createWritable().then(mxUtils.bind(this,function(){y(!0)}),mxUtils.bind(this,function(F){y(!1)}))});x.onerror=n;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||"image/svg"===d.type.substring(0,9)?x.readAsText(d):x.readAsDataURL(d)}),n)}catch(d){n(d)}};
-App.prototype.createFileSystemOptions=function(b){var k=[],n=null;if(null!=b){var d=b.lastIndexOf(".");0<d&&(n=b.substring(d+1))}for(d=0;d<this.editor.diagramFileTypes.length;d++){var x={description:mxResources.get(this.editor.diagramFileTypes[d].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[d].extension+")":""),accept:{}};x.accept[this.editor.diagramFileTypes[d].mimeType]=["."+this.editor.diagramFileTypes[d].extension];this.editor.diagramFileTypes[d].extension==n?k.splice(0,0,
-x):this.editor.diagramFileTypes[d].extension==n?k.splice(0,0,x):k.push(x)}return{types:k,suggestedName:b}};App.prototype.showSaveFilePicker=function(b,k,n){k=null!=k?k:mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)});n=null!=n?n:this.createFileSystemOptions();window.showSaveFilePicker(n).then(mxUtils.bind(this,function(d){null!=d&&d.getFile().then(mxUtils.bind(this,function(x){b(d,x)}),k)}),k)};
-App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var k=this.getServiceForName(b);if(null!=k)k.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(y){null!=y&&0<y.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(y[0])}),
-mxUtils.bind(this,function(y){"AbortError"!=y.name&&this.handleError(y)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var n=document.createElement("input");n.setAttribute("type","file");mxEvent.addListener(n,"change",mxUtils.bind(this,function(){null!=n.files&&(this.openFiles(n.files),n.type="",n.type="file",n.value="")}));n.style.display="none";document.body.appendChild(n);this.openFileInputElt=n}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
-null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(y,F){StorageFile.listFiles(this,"F",y,F)});window.openBrowserFile=mxUtils.bind(this,function(y,F,N){StorageFile.getFileContent(this,y,F,N)});window.deleteBrowserFile=mxUtils.bind(this,function(y,F,N){StorageFile.deleteFile(this,y,F,N)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(y,F){var N=mxUtils.bind(this,function(){Editor.useCanvasForExport||".png"!=F.substring(F.length-4)||(F=F.substring(0,F.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,y,F):new LocalFile(this,y,F))}),K=this.getCurrentFile();null!=K&&K.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N()}));var x=this.dialog,z=x.close;this.dialog.close=mxUtils.bind(this,function(y){Editor.useLocalStorage=
-d;z.apply(x,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(y){this.handleError(y)}};
-App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;var k=mxUtils.bind(this,function(z){try{this.loadLibrary(z);this.showSidebar();try{this.sidebar.palettes[z.getHash()][0].scrollIntoView({behavior:"smooth"})}catch(y){}}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}});if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var n=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?
-this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=n&&n.pickLibrary(mxUtils.bind(this,function(z,y){null!=y?k(y):this.spinner.spin(document.body,mxResources.get("loading"))&&n.getLibrary(z,mxUtils.bind(this,function(F){this.spinner.stop();k(F)}),mxUtils.bind(this,function(F){this.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var d=document.createElement("input");
-d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files){for(var z=0;z<d.files.length;z++)mxUtils.bind(this,function(y){var F=new FileReader;F.onload=mxUtils.bind(this,function(N){k(new LocalLibrary(this,N.target.result,y.name))});F.readAsText(y)})(d.files[z]);d.type="";d.type="file";d.value=""}}));d.style.display="none";document.body.appendChild(d);this.libFileInputElt=d}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
-mxUtils.bind(this,function(z,y){StorageFile.listFiles(this,"L",z,y)});window.openBrowserFile=mxUtils.bind(this,function(z,y,F){StorageFile.getFileContent(this,z,y,F)});window.deleteBrowserFile=mxUtils.bind(this,function(z,y,F){StorageFile.deleteFile(this,z,y,F)});var x=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(z){this.hideDialog(z)}));window.openFile.setConsumer(mxUtils.bind(this,function(z,y){k(b==App.MODE_BROWSER?new StorageLibrary(this,
-z,y):new LocalLibrary(this,z,y))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=x;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,k,n,d,x,z,y){try{d=null!=d?d:this.mode;x=null!=x?x:!1;z=null!=z?z:!1;var F=this.createLibraryDataFromImages(k),N=mxUtils.bind(this,function(c){this.spinner.stop();null!=y&&y();this.handleError(c,null!=c?mxResources.get("errorSavingFile"):null)});null==n&&d==App.MODE_DEVICE&&(n=new LocalLibrary(this,F,b));if(null==n)this.pickFolder(d,mxUtils.bind(this,function(c){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
-this.drive.insertFile(b,F,c,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,k)}),N,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,F,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,k)}),N,c):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
-F,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,k)}),N,c):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,F,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,k)}),N,c):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,F,mxUtils.bind(this,function(f){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(f,k)}),N,c):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,F,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,k)}),N,c):d==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,F,b),mxUtils.bind(this,function(f){this.hideDialog(!0);this.libraryLoaded(f,k)}),N):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));
-else if(x||this.spinner.spin(document.body,mxResources.get("saving"))){n.setData(F);var K=mxUtils.bind(this,function(){n.save(!0,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);z||this.libraryLoaded(n,k);null!=y&&y()}),N)});if(b!=n.getTitle()){var L=n.getHash();n.rename(b,mxUtils.bind(this,function(c){n.constructor!=LocalLibrary&&L!=n.getHash()&&(mxSettings.removeCustomLibrary(L),mxSettings.addCustomLibrary(n.getHash()));this.removeLibrarySidebar(L);K()}),N)}else K()}}catch(c){this.handleError(c)}};
-App.prototype.saveFile=function(b,k){var n=this.getCurrentFile(),d=this.mode;if(null!=n){var x=mxUtils.bind(this,function(){EditorUi.enableDrafts&&n.removeDraft();this.getCurrentFile()==n||n.isModified()||(n.getMode()!=App.MODE_DEVICE?this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))})):this.clearStatus());null!=k&&k()});if(b||null==n.getTitle()||null!=n.invalidFileHandle||null==this.mode)if(null!=n&&n.constructor==LocalFile&&
-null!=n.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,function(F,N){n.invalidFileHandle=null;n.fileHandle=F;n.title=N.name;n.desc=N;n.editable=null;this.save(N.name,x)}),null,this.createFileSystemOptions(n.getTitle()));else{b=null!=n.getTitle()?n.getTitle():this.defaultFilename;var z=mxUtils.bind(this,function(F,N,K,L){if(null!=F&&0<F.length)if(/(\.pdf)$/i.test(F))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),
-mxUtils.bind(this,function(){K.value=F.split(".").slice(0,-1).join(".");K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==d&&N==App.MODE_DEVICE)null!=n&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(f,l){n.fileHandle=f;n.mode=App.MODE_DEVICE;n.title=l.name;n.desc=l;this.setMode(App.MODE_DEVICE);this.save(l.name,x)}),mxUtils.bind(this,
-function(f){"AbortError"!=f.name&&this.handleError(f)}),this.createFileSystemOptions(F)):(this.setMode(App.MODE_DEVICE),this.save(F,x));else if("download"==N)(new LocalFile(this,null,F)).save();else if("_blank"==N)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(d!=N){var c=mxUtils.bind(this,function(f){var l=this.editor.graph,m=l.getSelectionCells(),t=l.getViewState(),
-v=this.currentPage;this.createFile(F,this.getFileData(/(\.xml)$/i.test(F)||0>F.indexOf(".")||/(\.drawio)$/i.test(F),/(\.svg)$/i.test(F),/(\.html)$/i.test(F)),null,N,x,null==this.mode,f,null,null,mxUtils.bind(this,function(){this.restoreViewState(v,t,m)}))});null!=L?c(L):this.pickFolder(N,c)}else null!=N&&this.save(F,x)}),y=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(F,N,K){z(F.value,N,F,K);this.hideDialog()}),y?null:["_blank"]);this.showDialog(b.container,
-420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(n.getTitle(),x)}};
-App.prototype.loadTemplate=function(b,k,n,d,x){var z=!1,y=b,F=null!=d?d:b;d=/\.png$/i.test(F)||/\.pdf$/i.test(F);var N=EditorUi.isVisioFilename(F);this.editor.isCorsEnabledForUrl(y)||(z=d||N,y="t="+(new Date).getTime(),y=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+y+(z?"&base64=1":""));this.editor.loadUrl(y,mxUtils.bind(this,function(K){try{var L=z?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(K):atob(K):K;if(N||this.isVisioData(L))N||(F=x?this.isRemoteVisioData(L)?"raw.vss":"raw.vssx":
-this.isRemoteVisioData(L)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(c){k(c)},n,F);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(L,F))this.isExternalDataComms()?this.parseFileData(L,mxUtils.bind(this,function(c){4==c.readyState&&200<=c.status&&299>=c.status&&"<mxGraphModel"==c.responseText.substring(0,13)&&k(c.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,n);else if(this.isLucidChartData(L))this.convertLucidChart(L,
-mxUtils.bind(this,function(c){k(c)}),mxUtils.bind(this,function(c){n(c)}));else{if(/(\.png)($|\?)/i.test(F)||Editor.isPngData(L))L=Editor.extractGraphModelFromPng(K);k(L)}}catch(c){n(c)}}),n,/(\.png)($|\?)/i.test(F)||N,null,null,z)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};
+App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(J,L,c,f,k){"ResizeObserver loop limit exceeded"!=J&&(EditorUi.logError("Uncaught: "+(null!=J?J:""),L,c,f,k,null,!0),b.handleError({message:J},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(J){var L=this.getCurrentFile();EditorUi.debug("storage event",[J],
+[L]);null!=L&&".draft-alive-check"==J.key&&null!=J.newValue&&null!=L.draftId&&(this.draftAliveCheck=J.newValue,L.saveDraft())}))}catch(J){}var l=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(J){try{var L=this.getDiagramId();if(L!=l){l=L;var c=this.getCurrentFile();null!=c&&c.getHash()==L||this.loadFile(L,!0)}else{var f=this.getHashObject();if(null!=f&&null!=f.pageId&&null!=this.currentPage&&f.pageId!=this.currentPage.getId()){var k=this.getPageById(f.pageId);
+null!=k&&this.selectPage(k)}}}catch(m){null!=document.body&&this.handleError(m,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var t=this.getCurrentFile();window.location.hash=null!=t?t.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(J){this.handleError(J,mxResources.get("errorLoadingFile"))}))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}else if((null==
+window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var n=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var J=mxUtils.bind(this,function(f){Editor.isPngDataUrl(f)&&(f=Editor.extractGraphModelFromPng(f));var k=urlParams.title;k=null!=k?decodeURIComponent(k):this.defaultFilename;f=new LocalFile(this,
+f,k,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(f.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(f);this.editor.chromeless||(f.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),L=window.opener||window.parent;if(L!=window){var c=urlParams.create;null!=c?J(L[decodeURIComponent(c)]):(c=urlParams.data,null!=c?J(decodeURIComponent(c)):this.spinner.spin(document.body,mxResources.get("loading"))&&
+this.createTimeout(2E3,mxUtils.bind(this,function(f){this.installMessageHandler(mxUtils.bind(this,function(k,m){m.source==L&&f.clear()&&(this.spinner.stop(),J(k))}))}),mxUtils.bind(this,function(f){this.handleError(f)})))}}else if(null==this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(f){}c?this.spinner.spin(document.body,
+mxResources.get("loading")):(c=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=c&&0!=c.length||this.editor.isChromelessView()?null!=c&&0<c.length?this.loadFile(c,null,null,mxUtils.bind(this,function(){var f=decodeURIComponent(urlParams.viewbox||"");if(""!=f)try{var k=JSON.parse(f);this.editor.graph.fitWindow(k,k.border)}catch(m){console.error(m)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,
+this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),d=decodeURIComponent(urlParams.create||"");null!=window.location.hash&&"#create="==window.location.hash.substring(0,8)&&(d=decodeURIComponent(window.location.hash.substring(8)));null!=urlParams["smart-template"]&&(null==window.location.hash||1>=window.location.hash.length)&&(d=JSON.stringify({type:"generate",data:decodeURIComponent(urlParams["smart-template"])}));if((null==window.location.hash||1>=window.location.hash.length||
+"#create="==window.location.hash.substring(0,8))&&0<d.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var v=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),A=mxUtils.bind(this,function(J){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,J,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var L=urlParams.title;L=null!=L?decodeURIComponent(L):
+this.defaultFilename;J=this.getServiceCount(!0);isLocalStorage&&J++;var c=4>=J?2:6<J?4:3;L=new CreateDialog(this,L,mxUtils.bind(this,function(f,k){if(null==k){this.hideDialog();var m=Editor.useLocalStorage;this.createFile(0<f.length?f:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=m}else this.pickFolder(k,mxUtils.bind(this,function(t){this.createFile(f,this.getFileData(!0),null,k,null,!0,t)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c,null,
+null,null,this.editor.fileExtensions);this.showDialog(L.container,420,J>c?390:280,!0,!1,mxUtils.bind(this,function(f){f&&null==this.getCurrentFile()&&this.showSplash()}));L.init()}});if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))if("{"==d.charAt(0)){this.spinner.stop();d=JSON.parse(d);var z=mxUtils.bind(this,function(J){this.spinner.stop();this.createFile(null!=d.filename?d.filename:this.defaultFilename,J,null,null,mxUtils.bind(this,function(){this.editor.chromeless&&!this.editor.editable||
+this.actions.get("fitWindow").funct();window.history.replaceState(null,null,window.location.pathname+this.getSearch(["create"]));window.location.hash="R"+Graph.compress(J)}),!0,null,!0)}),D=d.data;d.compressed&&(D=Graph.decompress(D));if("mermaid"==d.type&&this.spinner.spin(document.body,mxResources.get("loading")))window.isMermaidEnabled?this.parseMermaidDiagram(D,null,mxUtils.bind(this,function(J){z(J)}),mxUtils.bind(this,function(J){this.handleError(J)}),null,!0):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
+mxResources.get("errorLoadingFile"));else if("generate"==d.type&&this.spinner.spin(document.body,mxResources.get("generate")+" '"+D+"'"))this.generateOpenAiMermaidDiagram(D,function(J){z(J)},mxUtils.bind(this,function(J){this.handleError(J,mxResources.get("errorLoadingFile"))}),!0,{complexity:"high"});else if("csv"==d.type){var P=this.createTemporaryGraph(this.editor.graph.getStylesheet());this.importCsv(D,mxUtils.bind(this,function(){var J=new mxCodec;z(mxUtils.getXml(J.encode(P.getModel())))}),
+P)}else this.handleError({message:mxResources.get("invalidCallFnNotFound",[d.type])},mxResources.get("errorLoadingFile"))}else try{null!=window.opener&&null!=window.opener[d]?A(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(J){A(J)},mxUtils.bind(this,function(J){this.handleError(J,mxResources.get("errorLoadingFile"),v)}))}else(null==window.location.hash||1>=window.location.hash.length)&&
+null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state","splash"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,
+null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),n())}}catch(J){this.handleError(J)}};
+App.prototype.openGenerateDialog=function(b){null==this.chatWindow?(this.chatWindow=new ChatWindow(this,224,104,280,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("chat"))})),this.chatWindow.window.addListener("hide",function(){this.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),this.fireEvent(new mxEventObject("chat"))):this.chatWindow.window.setVisible(!0);null!=b&&this.chatWindow.generate(b)};
+App.prototype.openTemplateDialog=function(b){var l=this.editor.graph;l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&(b=new NewDialog(this,null,!1,mxUtils.bind(this,function(n){this.hideDialog();if(null!=n){var d=this.editor.graph.getFreeInsertPoint(!0);l.setSelectionCells(this.importXml(n,Math.max(d.x,20),Math.max(d.y,20),!0,null,null,!0));l.scrollCellToVisible(l.getSelectionCell())}}),null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"),null,null,b),this.showDialog(b.container,
+620,460,!0,!0,mxUtils.bind(this,function(){this.sidebar.hideTooltip()})),b.init())};App.prototype.loadDraft=function(b,l){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var n=this.getCurrentFile();null!=n&&(n.fileChanged(),null!=l&&l())}),0)}),null,null,!0)};
+App.prototype.filterDrafts=function(b,l,n){function d(){n(v)}var v=[];try{this.getDatabaseItems(mxUtils.bind(this,function(A){EditorUi.debug("App.filterDrafts",[this],"items",A);for(var z=0;z<A.length;z++)try{var D=A[z].key;if(null!=D&&".draft_"==D.substring(0,7)){var P=JSON.parse(A[z].data);null!=P&&"draft"==P.type&&P.aliveCheck!=l&&(null==b&&null==P.fileObject||null!=P.fileObject&&P.fileObject.path==b)&&(P.key=D,v.push(P))}}catch(J){}d()}),d)}catch(A){d()}};
+App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(l){if(1==l.length)this.loadDraft(l[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(l[0].key)}));else if(1<l.length){var n=new Date(l[0].modified);n=new DraftDialog(this,1<l.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
+[n.toLocaleDateString()+" "+n.toLocaleTimeString()]),1<l.length?null:l[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d&&null!=l[d]?d:0;this.loadDraft(l[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(l[d].key)}))}),mxUtils.bind(this,function(d,v){this.removeDatabaseItem(l[""!=d?d:0].key);null!=v&&v()}),null,null,null,1<l.length?l:null);this.showDialog(n.container,640,480,!0,!1,mxUtils.bind(this,function(d){d&&("0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
+this.getFileData(),null,null,null,null,null,!0))}));n.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(l){}};
+App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var l=this.getServiceCount(!0),n=mxUtils.bind(this,function(){var v=new SplashDialog(this);this.showDialog(v.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(A,z){!A&&!z||mxClient.IS_CHROMEAPP||(A=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=A)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.mode&&!b)null==urlParams.create&&n();else{b=4==l?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();n()}),b);this.showDialog(d.container,3>b?200:300,3<l?320:210,!0,!1)}}};
+App.prototype.addLanguageMenu=function(b,l,n){var d=null;null!=this.menus.get("language")&&(d=document.createElement("div"),this.setElementTitle(d,"language"),d.className="geAdaptiveAsset",d.style.backgroundImage="url("+Editor.globeImage+")",d.style.backgroundPosition="right center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="19px 19px",d.style.width="19px",d.style.height="19px",mxUtils.setOpacity(d,40),d.style.position="absolute",d.style.cursor="pointer",d.style.bottom="20px",d.style.right=
+null!=n?n:"22px",l&&(d.style.direction="rtl",d.style.textAlign="right",d.style.right=null!=n?n:"24px",l=document.createElement("span"),l.style.display="inline-block",l.style.fontSize="12px",l.style.margin="2px 24px 0 0",l.style.userSelect="none",mxUtils.write(l,mxResources.get("language")),d.appendChild(l),l.className="geAdaptiveAsset"),mxEvent.addListener(d,"click",mxUtils.bind(this,function(v){this.editor.graph.popupMenuHandler.hideMenu();var A=new mxPopupMenu(this.menus.get("language").funct);
+A.smartSeparators=!0;A.showDisabled=!0;A.autoExpand=!0;A.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(A,arguments);A.destroy()});var z=mxUtils.getOffset(d);A.popup(z.x,z.y+d.offsetHeight,null,v);this.setCurrentMenu(A)})),b.appendChild(d));return d};
+App.prototype.loadFileSystemEntry=function(b,l,n){n=null!=n?n:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var v=new FileReader;v.onload=mxUtils.bind(this,function(A){var z=mxUtils.bind(this,function(D){try{if(null!=l){var P=A.target.result;"image/png"==d.type&&(P=this.extractGraphModelFromPng(P));l(new LocalFile(this,P,d.name,null,b,d,D))}else this.openFileHandle(A.target.result,d.name,d,!1,b,D)}catch(J){n(J)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,
+function(D){z("denied"!==D)})):b.createWritable().then(mxUtils.bind(this,function(){z(!0)}),mxUtils.bind(this,function(D){z(!1)}))});v.onerror=n;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||"image/svg"===d.type.substring(0,9)?v.readAsText(d):v.readAsDataURL(d)}),n)}catch(d){n(d)}};
+App.prototype.createFileSystemOptions=function(b){var l=[],n=null;if(null!=b){var d=b.lastIndexOf(".");0<d&&(n=b.substring(d+1))}for(d=0;d<this.editor.diagramFileTypes.length;d++){var v={description:mxResources.get(this.editor.diagramFileTypes[d].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[d].extension+")":""),accept:{}};v.accept[this.editor.diagramFileTypes[d].mimeType]=["."+this.editor.diagramFileTypes[d].extension];this.editor.diagramFileTypes[d].extension==n?l.splice(0,0,
+v):this.editor.diagramFileTypes[d].extension==n?l.splice(0,0,v):l.push(v)}return{types:l,suggestedName:b}};App.prototype.showSaveFilePicker=function(b,l,n){l=null!=l?l:mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)});n=null!=n?n:this.createFileSystemOptions();window.showSaveFilePicker(n).then(mxUtils.bind(this,function(d){null!=d&&d.getFile().then(mxUtils.bind(this,function(v){b(d,v)}),l)}),l)};
+App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var l=this.getServiceForName(b);if(null!=l)l.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(z){null!=z&&0<z.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(z[0])}),
+mxUtils.bind(this,function(z){"AbortError"!=z.name&&this.handleError(z)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var n=document.createElement("input");n.setAttribute("type","file");mxEvent.addListener(n,"change",mxUtils.bind(this,function(){null!=n.files&&(this.openFiles(n.files),n.type="",n.type="file",n.value="")}));n.style.display="none";document.body.appendChild(n);this.openFileInputElt=n}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
+null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(z,D){StorageFile.listFiles(this,"F",z,D)});window.openBrowserFile=mxUtils.bind(this,function(z,D,P){StorageFile.getFileContent(this,z,D,P)});window.deleteBrowserFile=mxUtils.bind(this,function(z,D,P){StorageFile.deleteFile(this,z,D,P)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
+function(z,D){var P=mxUtils.bind(this,function(){Editor.useCanvasForExport||".png"!=D.substring(D.length-4)||(D=D.substring(0,D.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,z,D):new LocalFile(this,z,D))}),J=this.getCurrentFile();null!=J&&J.isModified()?this.confirm(mxResources.get("allChangesLost"),null,P,mxResources.get("cancel"),mxResources.get("discardChanges")):P()}));var v=this.dialog,A=v.close;this.dialog.close=mxUtils.bind(this,function(z){Editor.useLocalStorage=
+d;A.apply(v,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(z){this.handleError(z)}};
+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;var l=mxUtils.bind(this,function(A){try{this.loadLibrary(A);this.showSidebar();try{this.sidebar.palettes[A.getHash()][0].scrollIntoView({behavior:"smooth"})}catch(z){}}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}});if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var n=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?
+this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=n&&n.pickLibrary(mxUtils.bind(this,function(A,z){null!=z?l(z):this.spinner.spin(document.body,mxResources.get("loading"))&&n.getLibrary(A,mxUtils.bind(this,function(D){this.spinner.stop();l(D)}),mxUtils.bind(this,function(D){this.handleError(D,null!=D?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var d=document.createElement("input");
+d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files){for(var A=0;A<d.files.length;A++)mxUtils.bind(this,function(z){var D=new FileReader;D.onload=mxUtils.bind(this,function(P){l(new LocalLibrary(this,P.target.result,z.name))});D.readAsText(z)})(d.files[A]);d.type="";d.type="file";d.value=""}}));d.style.display="none";document.body.appendChild(d);this.libFileInputElt=d}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
+mxUtils.bind(this,function(A,z){StorageFile.listFiles(this,"L",A,z)});window.openBrowserFile=mxUtils.bind(this,function(A,z,D){StorageFile.getFileContent(this,A,z,D)});window.deleteBrowserFile=mxUtils.bind(this,function(A,z,D){StorageFile.deleteFile(this,A,z,D)});var v=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(A){this.hideDialog(A)}));window.openFile.setConsumer(mxUtils.bind(this,function(A,z){l(b==App.MODE_BROWSER?new StorageLibrary(this,
+A,z):new LocalLibrary(this,A,z))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=v;window.openFile=null})}};
+App.prototype.saveLibrary=function(b,l,n,d,v,A,z){try{d=null!=d?d:this.mode;v=null!=v?v:!1;A=null!=A?A:!1;var D=this.createLibraryDataFromImages(l),P=mxUtils.bind(this,function(c){this.spinner.stop();null!=z&&z();this.handleError(c,null!=c?mxResources.get("errorSavingFile"):null)});null==n&&d==App.MODE_DEVICE&&(n=new LocalLibrary(this,D,b));if(null==n)this.pickFolder(d,mxUtils.bind(this,function(c){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+this.drive.insertFile(b,D,c,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,l)}),P,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,D,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,l)}),P,c):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
+D,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,l)}),P,c):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,D,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,l)}),P,c):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,D,mxUtils.bind(this,function(f){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(f,l)}),P,c):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,D,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,l)}),P,c):d==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,D,b),mxUtils.bind(this,function(f){this.hideDialog(!0);this.libraryLoaded(f,l)}),P):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));
+else if(v||this.spinner.spin(document.body,mxResources.get("saving"))){n.setData(D);var J=mxUtils.bind(this,function(){n.save(!0,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);A||this.libraryLoaded(n,l);null!=z&&z()}),P)});if(b!=n.getTitle()){var L=n.getHash();n.rename(b,mxUtils.bind(this,function(c){n.constructor!=LocalLibrary&&L!=n.getHash()&&(mxSettings.removeCustomLibrary(L),mxSettings.addCustomLibrary(n.getHash()));this.removeLibrarySidebar(L);J()}),P)}else J()}}catch(c){this.handleError(c)}};
+App.prototype.saveFile=function(b,l){var n=this.getCurrentFile(),d=this.mode;if(null!=n){var v=mxUtils.bind(this,function(){EditorUi.enableDrafts&&n.removeDraft();this.getCurrentFile()==n||n.isModified()||(n.getMode()!=App.MODE_DEVICE?this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))})):this.clearStatus());null!=l&&l()});if(b||null==n.getTitle()||null!=n.invalidFileHandle||null==this.mode)if(null!=n&&n.constructor==LocalFile&&
+null!=n.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,function(D,P){n.invalidFileHandle=null;n.fileHandle=D;n.title=P.name;n.desc=P;n.editable=null;this.save(P.name,v)}),null,this.createFileSystemOptions(n.getTitle()));else{b=null!=n.getTitle()?n.getTitle():this.defaultFilename;var A=mxUtils.bind(this,function(D,P,J,L){if(null!=D&&0<D.length)if(/(\.pdf)$/i.test(D))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),
+mxUtils.bind(this,function(){J.value=D.split(".").slice(0,-1).join(".");J.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?J.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==d&&P==App.MODE_DEVICE)null!=n&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(f,k){n.fileHandle=f;n.mode=App.MODE_DEVICE;n.title=k.name;n.desc=k;this.setMode(App.MODE_DEVICE);this.save(k.name,v)}),mxUtils.bind(this,
+function(f){"AbortError"!=f.name&&this.handleError(f)}),this.createFileSystemOptions(D)):(this.setMode(App.MODE_DEVICE),this.save(D,v));else if("download"==P)(new LocalFile(this,null,D)).save();else if("_blank"==P)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(d!=P){var c=mxUtils.bind(this,function(f){var k=this.editor.graph,m=k.getSelectionCells(),t=k.getViewState(),
+x=this.currentPage;this.createFile(D,this.getFileData(/(\.xml)$/i.test(D)||0>D.indexOf(".")||/(\.drawio)$/i.test(D),/(\.svg)$/i.test(D),/(\.html)$/i.test(D)),null,P,v,null==this.mode,f,null,null,mxUtils.bind(this,function(){this.restoreViewState(x,t,m)}))});null!=L?c(L):this.pickFolder(P,c)}else null!=P&&this.save(D,v)}),z=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(D,P,J){A(D.value,P,D,J);this.hideDialog()}),z?null:["_blank"]);this.showDialog(b.container,
+420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(n.getTitle(),v)}};
+App.prototype.loadTemplate=function(b,l,n,d,v){var A=!1,z=b,D=null!=d?d:b;d=/\.png$/i.test(D)||/\.pdf$/i.test(D);var P=EditorUi.isVisioFilename(D);this.editor.isCorsEnabledForUrl(z)||(A=d||P,z="t="+(new Date).getTime(),z=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+z+(A?"&base64=1":""));this.editor.loadUrl(z,mxUtils.bind(this,function(J){try{var L=A?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(J):atob(J):J;if(P||this.isVisioData(L))P||(D=v?this.isRemoteVisioData(L)?"raw.vss":"raw.vssx":
+this.isRemoteVisioData(L)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(J.substring(J.indexOf(",")+1)),function(c){l(c)},n,D);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(L,D))this.isExternalDataComms()?this.parseFileData(L,mxUtils.bind(this,function(c){4==c.readyState&&200<=c.status&&299>=c.status&&"<mxGraphModel"==c.responseText.substring(0,13)&&l(c.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,n);else if(this.isLucidChartData(L))this.convertLucidChart(L,
+mxUtils.bind(this,function(c){l(c)}),mxUtils.bind(this,function(c){n(c)}));else{if(/(\.png)($|\?)/i.test(D)||Editor.isPngData(L))L=Editor.extractGraphModelFromPng(J);l(L)}}catch(c){n(c)}}),n,/(\.png)($|\?)/i.test(D)||P,null,null,A)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};
App.prototype.isModeEnabled=function(b){return b==App.MODE_GOOGLE?"function"===typeof window.DriveClient&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode):b==App.MODE_GITHUB?null!=this.gitHub:b==App.MODE_GITLAB?null!=this.gitLab:b==App.MODE_DROPBOX?"function"===typeof window.DropboxClient&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&
mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):b==App.MODE_ONEDRIVE?"function"===typeof window.OneDriveClient&&("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode):b==App.MODE_TRELLO?"function"===
typeof window.TrelloClient&&"1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):!1};App.prototype.isModeReady=function(b){return null!=this.getServiceForName(b)&&(b!=App.MODE_DROPBOX||"undefined"!==typeof Dropbox.choose)};
-App.prototype.uncompressPages=function(b){if(null!=b)try{var k=mxUtils.parseXml(b);if("mxfile"==k.documentElement.nodeName){for(var n=k.documentElement.getElementsByTagName("diagram"),d=0;d<n.length;d++){var x=Editor.parseDiagramNode(n[d],!0);null!=x&&(mxUtils.setTextContent(n[d],""),n[d].appendChild(x))}b=mxUtils.getPrettyXml(k.documentElement)}}catch(z){}return b};
-App.prototype.createFile=function(b,k,n,d,x,z,y,F,N,K){EditorUi.debug("App.createFile",[this],"title",[b],"data",[k],"libs",[n],"mode",[d]);d=F?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){k=null!=k?k:this.emptyDiagramXml;null==k||Editor.defaultCompressed||(k=this.uncompressPages(k));var L=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(l){L();null==l&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():
-null!=l&&this.handleError(l)});try{var f=mxUtils.bind(this,function(l){L();this.fileCreated(l,n,z,x,N,K)});d==App.MODE_GOOGLE&&null!=this.drive?(null==y&&null!=this.stateArg&&null!=this.stateArg.folderId&&(y=this.stateArg.folderId),this.drive.insertFile(b,k,y,f,c)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,k,f,c,!1,y):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,k,f,c,!1,y):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,k,f,c,!1,y):d==App.MODE_DROPBOX&&
-null!=this.dropbox?this.dropbox.insertFile(b,k,f,c):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,k,f,c,!1,y):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,k,f,c):!F&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(L(),this.showSaveFilePicker(mxUtils.bind(this,function(l,m){var t=new LocalFile(this,k,m.name,null,l,m);t.saveFile(m.name,!1,mxUtils.bind(this,function(){this.fileCreated(t,n,z,x,N,K)}),c,!0)}),mxUtils.bind(this,function(l){"AbortError"!=l.name&&c(l)}),this.createFileSystemOptions(b))):
-(L(),this.fileCreated(new LocalFile(this,k,b,null==d),n,z,x,N,K))}catch(l){L(),this.handleError(l)}}};
-App.prototype.fileCreated=function(b,k,n,d,x,z){EditorUi.debug("App.fileCreated",[this],"file",[b],"libs",[k],"replace",[n]);var y=window.location.pathname;null!=k&&0<k.length&&(y+="?libs="+k);null!=x&&0<x.length&&(y+="?clibs="+x);y=this.getUrl(y);b.getMode()!=App.MODE_DEVICE&&(y+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var F=b.getData();F=0<F.length?this.editor.extractGraphModel(mxUtils.parseXml(F).documentElement,!0):null;var N=window.location.protocol+
-"//"+window.location.hostname+y,K=F,L=null;null!=F&&/\.svg$/i.test(b.getTitle())&&(L=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(L.container),K=this.decodeNodeIntoGraph(K,L));b.setData(this.createFileData(F,L,b,N));null!=L&&L.container.parentNode.removeChild(L.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){c();var l=this.getCurrentFile();null==n&&null!=l&&(n=!l.isModified()&&(null==l.getMode()||EditorUi.isElectronApp));
-var m=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,z);n&&this.updateStatus(mxUtils.bind(this,function(){b.addAllSavedStatus()}));null!=k&&this.sidebar.showEntries(k);if(null!=x){for(var v=[],B=x.split(";"),E=0;E<B.length;E++)v.push(decodeURIComponent(B[E]));this.loadLibraries(v)}null!=d&&d()}),t=mxUtils.bind(this,function(){n||null==l||!l.isModified()?m():this.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges"))});
-null==n||n?t():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),null==b.getMode())),window.geOpenWindow(y,null,t))});b.constructor==LocalFile?f():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){f()}),mxUtils.bind(this,function(l){c();null!=l&&"AbortError"==l.name||this.handleError(l)}))}};
-App.prototype.loadFile=function(b,k,n,d,x){if("1"==urlParams.openInSameWin||navigator.standalone)k=!0;this.hideDialog();var z=mxUtils.bind(this,function(){if(null==b||0==b.length)this.clearStatus(),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var N=mxUtils.bind(this,function(l){this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();window.location.hash=
-null!=m?m.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(l){null!=l?(this.fileLoaded(new StorageFile(this,l,b)),null!=d&&d()):N({message:mxResources.get("fileNotFound")})}),N)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var l=this.getCurrentFile();window.location.hash=null!=l?l.getHash():""}));else if(null!=n)this.spinner.stop(),this.fileLoaded(n),
-null!=d&&d();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 K=decodeURIComponent(b.substring(1));"<"!=K.charAt(0)&&(K=Graph.decompress(K));K=new LocalFile(this,K,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,
-!0);K.getHash=function(){return b};this.fileLoaded(K);null!=d&&d()}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(l,m){this.spinner.stop();this.fileLoaded(new EmbedFile(this,l,m));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"))}));
-else if("U"==b.charAt(0)){var L=decodeURIComponent(b.substring(1)),c=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=L.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var l=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var m=L.substring(31,L.lastIndexOf("&ex"));this.loadFile("G"+m,k,null,mxUtils.bind(this,function(){var t=this.getCurrentFile();null!=t&&this.editor.chromeless&&!this.editor.editable&&(t.getHash=
-function(){return"G"+m},window.location.hash="#"+t.getHash());null!=d&&d()}));return!0}return!1});!l()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",l);return!0});this.loadTemplate(L,mxUtils.bind(this,function(l){this.spinner.stop();if(null!=l&&0<l.length){var m=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var t=L,v=L.lastIndexOf("."),B=t.lastIndexOf("/");v>B&&0<B&&(t=t.substring(B+1,v),v=L.substring(v),Editor.useCanvasForExport||
-".png"!=v||(v=".drawio"),".svg"===v||".xml"===v||".html"===v||".png"===v||".drawio"===v)&&(m=t+v)}l=new LocalFile(this,l,null!=urlParams.title?decodeURIComponent(urlParams.title):m,!0);l.getHash=function(){return b};this.fileLoaded(l,!0)?null!=d&&d():c()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else c()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){c()||(this.spinner.stop(),
-this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var f=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var l=this.getServiceForName(f);if(null==l)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{var m=b.charAt(0);b=decodeURIComponent(b.substring(1));l.getFile(b,mxUtils.bind(this,function(t){this.spinner.stop();this.fileLoaded(t);var v=this.getCurrentFile();if(null==v)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){v.getHash=function(){return m+b};t="#"+v.getHash();try{var B=this.getHashObject();null==B||mxUtils.isEmptyObject(B)||(t=t+"#"+encodeURIComponent(JSON.stringify(B)))}catch(E){}window.location.replace(t)}else t==
-v&&null==t.getMode()&&this.updateStatus(mxUtils.bind(this,function(){var E=mxResources.get("copyCreated");this.editor.setStatus('<div title="'+E+'" class="geStatusAlert">'+E+"</div>")}));null!=d&&d()}),mxUtils.bind(this,function(t){null!=window.console&&null!=t&&console.log("error in loadFile:",b,t);var v=mxUtils.bind(this,function(){var B=this.getCurrentFile();null==B?(window.location.hash="",this.showSplash()):window.location.hash="#"+B.getHash()});null==t||"AbortError"!=t.name?this.handleError(t,
-null!=t?mxResources.get("errorLoadingFile"):null,v,null,null,"#"+m+b):v()}))}})()}}),y=this.getCurrentFile(),F=mxUtils.bind(this,function(){x||null==y||!y.isModified()?z():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=y&&(window.location.hash=y.getHash())}),z,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length||null==k&&null!=y&&!y.isModified()&&this.isBlankFile()?F():null==y||k?F():this.showDialog((new PopupDialog(this,this.getUrl()+
-"#"+b,null,F)).container,340,140,!0,!0)};
-App.prototype.getLibraryStorageHint=function(b){var k=b.getTitle();b.constructor!=LocalLibrary&&(k+="\n"+b.getHash());b.constructor==DriveLibrary?k+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?k+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?k+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?k+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?k+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?k+=" ("+
-mxResources.get("browser")+")":b.constructor==LocalLibrary&&(k+=" ("+mxResources.get("device")+")");return k};App.prototype.restoreLibraries=function(){function b(n){for(var d=0;d<n.length;d++)""!=n[d]&&0>mxUtils.indexOf(k,n[d])&&k.push(n[d])}var k=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(k)};
-App.prototype.loadLibraries=function(b,k){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var n=mxUtils.bind(this,function(K,L){L||mxSettings.removeCustomLibrary(K);delete this.loadedLibraries[K]}),d=0,x=[],z=0<b.length&&"L.scratchpad"==b[0]?1:0,y=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var K=b.length-1;0<=K;K--)null!=x[K]&&this.loadLibrary(x[K],K<=z);null!=k&&k()}});if(null!=b)for(var F=0;F<b.length;F++){var N=encodeURIComponent(decodeURIComponent(b[F]));
-mxUtils.bind(this,function(K,L){if(null!=K&&0<K.length&&null==this.loadedLibraries[K]&&null==this.sidebar.palettes[K]){this.loadedLibraries[K]=!0;d++;var c=mxUtils.bind(this,function(B){x[L]=B;d--;y()}),f=mxUtils.bind(this,function(B){n(K,B);d--;y()}),l=K.substring(0,1);if("L"==l)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var B=decodeURIComponent(K.substring(1));StorageFile.getFileContent(this,B,mxUtils.bind(this,function(E){".scratchpad"==B&&null==
-E&&(E=this.emptyLibraryXml);null!=E?c(new StorageLibrary(this,E,B)):f()}),f)}catch(E){f()}}),0);else if("U"==l){var m=decodeURIComponent(K.substring(1));this.isOffline()?f(!0):this.loadTemplate(m,mxUtils.bind(this,function(B){null!=B&&0<B.length?c(new UrlLibrary(this,B,m)):f()}),function(){f()},null,!0)}else if("R"==l){l=decodeURIComponent(K.substring(1));try{l=JSON.parse(l);var t={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[t.downloadUrl],null,mxUtils.bind(this,function(B){try{c(new RemoteLibrary(this,
-B,t))}catch(E){f()}}),function(){f()})}catch(B){f()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(K.substring(1)),function(B){c(B)},f)}catch(B){f()}else{var v=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(v=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&(v=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(v=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(v=this.dropbox):"W"==l&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(v=this.oneDrive);null!=v?v.getLibrary(decodeURIComponent(K.substring(1)),mxUtils.bind(this,function(B){try{c(B)}catch(E){f()}}),function(B){f()}):f(!0)}}})(N,F)}y()}};
+App.prototype.uncompressPages=function(b){if(null!=b)try{var l=mxUtils.parseXml(b);if("mxfile"==l.documentElement.nodeName){for(var n=l.documentElement.getElementsByTagName("diagram"),d=0;d<n.length;d++){var v=Editor.parseDiagramNode(n[d],!0);null!=v&&(mxUtils.setTextContent(n[d],""),n[d].appendChild(v))}b=mxUtils.getPrettyXml(l.documentElement)}}catch(A){}return b};
+App.prototype.createFile=function(b,l,n,d,v,A,z,D,P,J){EditorUi.debug("App.createFile",[this],"title",[b],"data",[l],"libs",[n],"mode",[d]);d=D?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){l=null!=l?l:this.emptyDiagramXml;null==l||Editor.defaultCompressed||(l=this.uncompressPages(l));var L=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(k){L();null==k&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():
+null!=k&&this.handleError(k)});try{var f=mxUtils.bind(this,function(k){L();this.fileCreated(k,n,A,v,P,J)});d==App.MODE_GOOGLE&&null!=this.drive?(null==z&&null!=this.stateArg&&null!=this.stateArg.folderId&&(z=this.stateArg.folderId),this.drive.insertFile(b,l,z,f,c)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,l,f,c,!1,z):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,l,f,c,!1,z):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,l,f,c,!1,z):d==App.MODE_DROPBOX&&
+null!=this.dropbox?this.dropbox.insertFile(b,l,f,c):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,l,f,c,!1,z):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,l,f,c):!D&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(L(),this.showSaveFilePicker(mxUtils.bind(this,function(k,m){var t=new LocalFile(this,l,m.name,null,k,m);t.saveFile(m.name,!1,mxUtils.bind(this,function(){this.fileCreated(t,n,A,v,P,J)}),c,!0)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&c(k)}),this.createFileSystemOptions(b))):
+(L(),this.fileCreated(new LocalFile(this,l,b,null==d),n,A,v,P,J))}catch(k){L(),this.handleError(k)}}};
+App.prototype.fileCreated=function(b,l,n,d,v,A){EditorUi.debug("App.fileCreated",[this],"file",[b],"libs",[l],"replace",[n]);var z=window.location.pathname;null!=l&&0<l.length&&(z+="?libs="+l);null!=v&&0<v.length&&(z+="?clibs="+v);z=this.getUrl(z);b.getMode()!=App.MODE_DEVICE&&(z+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var D=b.getData();D=0<D.length?this.editor.extractGraphModel(mxUtils.parseXml(D).documentElement,!0):null;var P=window.location.protocol+
+"//"+window.location.hostname+z,J=D,L=null;null!=D&&/\.svg$/i.test(b.getTitle())&&(L=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(L.container),J=this.decodeNodeIntoGraph(J,L));b.setData(this.createFileData(D,L,b,P));null!=L&&L.container.parentNode.removeChild(L.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){c();var k=this.getCurrentFile();null==n&&null!=k&&(n=!k.isModified()&&(null==k.getMode()||EditorUi.isElectronApp));
+var m=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,A);n&&this.updateStatus(mxUtils.bind(this,function(){b.addAllSavedStatus()}));null!=l&&this.sidebar.showEntries(l);if(null!=v){for(var x=[],y=v.split(";"),F=0;F<y.length;F++)x.push(decodeURIComponent(y[F]));this.loadLibraries(x)}null!=d&&d()}),t=mxUtils.bind(this,function(){n||null==k||!k.isModified()?m():this.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges"))});
+null==n||n?t():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),null==b.getMode())),window.geOpenWindow(z,null,t))});b.constructor==LocalFile?f():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){f()}),mxUtils.bind(this,function(k){c();null!=k&&"AbortError"==k.name||this.handleError(k)}))}};
+App.prototype.loadFile=function(b,l,n,d,v){if("1"==urlParams.openInSameWin||navigator.standalone)l=!0;this.hideDialog();var A=mxUtils.bind(this,function(){if(null==b||0==b.length)this.clearStatus(),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var P=mxUtils.bind(this,function(k){this.handleError(k,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();window.location.hash=
+null!=m?m.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(k){null!=k?(this.fileLoaded(new StorageFile(this,k,b)),null!=d&&d()):P({message:mxResources.get("fileNotFound")})}),P)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var k=this.getCurrentFile();window.location.hash=null!=k?k.getHash():""}));else if(null!=n)this.spinner.stop(),this.fileLoaded(n),
+null!=d&&d();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 J=decodeURIComponent(b.substring(1));"<"!=J.charAt(0)&&(J=Graph.decompress(J));J=new LocalFile(this,J,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,
+!0);J.getHash=function(){return b};this.fileLoaded(J);null!=d&&d()}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(k,m){this.spinner.stop();this.fileLoaded(new EmbedFile(this,k,m));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"))}));
+else if("U"==b.charAt(0)){var L=decodeURIComponent(b.substring(1)),c=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=L.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var k=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var m=L.substring(31,L.lastIndexOf("&ex"));this.loadFile("G"+m,l,null,mxUtils.bind(this,function(){var t=this.getCurrentFile();null!=t&&this.editor.chromeless&&!this.editor.editable&&(t.getHash=
+function(){return"G"+m},window.location.hash="#"+t.getHash());null!=d&&d()}));return!0}return!1});!k()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",k);return!0});this.loadTemplate(L,mxUtils.bind(this,function(k){this.spinner.stop();if(null!=k&&0<k.length){var m=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var t=L,x=L.lastIndexOf("."),y=t.lastIndexOf("/");x>y&&0<y&&(t=t.substring(y+1,x),x=L.substring(x),Editor.useCanvasForExport||
+".png"!=x||(x=".drawio"),".svg"===x||".xml"===x||".html"===x||".png"===x||".drawio"===x)&&(m=t+x)}k=new LocalFile(this,k,null!=urlParams.title?decodeURIComponent(urlParams.title):m,!0);k.getHash=function(){return b};this.fileLoaded(k,!0)?null!=d&&d():c()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else c()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){c()||(this.spinner.stop(),
+this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var f=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var k=this.getServiceForName(f);if(null==k)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{var m=b.charAt(0);b=decodeURIComponent(b.substring(1));k.getFile(b,mxUtils.bind(this,function(t){this.spinner.stop();this.fileLoaded(t);var x=this.getCurrentFile();if(null==x)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){x.getHash=function(){return m+b};t="#"+x.getHash();try{var y=this.getHashObject();null==y||mxUtils.isEmptyObject(y)||(t=t+"#"+encodeURIComponent(JSON.stringify(y)))}catch(F){}window.location.replace(t)}else t==
+x&&null==t.getMode()&&this.updateStatus(mxUtils.bind(this,function(){var F=mxResources.get("copyCreated");this.editor.setStatus('<div title="'+F+'" class="geStatusAlert">'+F+"</div>")}));null!=d&&d()}),mxUtils.bind(this,function(t){null!=window.console&&null!=t&&console.log("error in loadFile:",b,t);var x=mxUtils.bind(this,function(){var y=this.getCurrentFile();null==y?(window.location.hash="",this.showSplash()):window.location.hash="#"+y.getHash()});null==t||"AbortError"!=t.name?this.handleError(t,
+null!=t?mxResources.get("errorLoadingFile"):null,x,null,null,"#"+m+b):x()}))}})()}}),z=this.getCurrentFile(),D=mxUtils.bind(this,function(){v||null==z||!z.isModified()?A():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=z&&(window.location.hash=z.getHash())}),A,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length||null==l&&null!=z&&!z.isModified()&&this.isBlankFile()?D():null==z||l?D():this.showDialog((new PopupDialog(this,this.getUrl()+
+"#"+b,null,D)).container,340,140,!0,!0)};
+App.prototype.getLibraryStorageHint=function(b){var l=b.getTitle();b.constructor!=LocalLibrary&&(l+="\n"+b.getHash());b.constructor==DriveLibrary?l+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?l+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?l+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?l+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?l+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?l+=" ("+
+mxResources.get("browser")+")":b.constructor==LocalLibrary&&(l+=" ("+mxResources.get("device")+")");return l};App.prototype.restoreLibraries=function(){function b(n){for(var d=0;d<n.length;d++)""!=n[d]&&0>mxUtils.indexOf(l,n[d])&&l.push(n[d])}var l=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(l)};
+App.prototype.loadLibraries=function(b,l){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var n=mxUtils.bind(this,function(J,L){L||mxSettings.removeCustomLibrary(J);delete this.loadedLibraries[J]}),d=0,v=[],A=0<b.length&&"L.scratchpad"==b[0]?1:0,z=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var J=b.length-1;0<=J;J--)null!=v[J]&&this.loadLibrary(v[J],J<=A);null!=l&&l()}});if(null!=b)for(var D=0;D<b.length;D++){var P=encodeURIComponent(decodeURIComponent(b[D]));
+mxUtils.bind(this,function(J,L){if(null!=J&&0<J.length&&null==this.loadedLibraries[J]&&null==this.sidebar.palettes[J]){this.loadedLibraries[J]=!0;d++;var c=mxUtils.bind(this,function(y){v[L]=y;d--;z()}),f=mxUtils.bind(this,function(y){n(J,y);d--;z()}),k=J.substring(0,1);if("L"==k)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var y=decodeURIComponent(J.substring(1));StorageFile.getFileContent(this,y,mxUtils.bind(this,function(F){".scratchpad"==y&&null==
+F&&(F=this.emptyLibraryXml);null!=F?c(new StorageLibrary(this,F,y)):f()}),f)}catch(F){f()}}),0);else if("U"==k){var m=decodeURIComponent(J.substring(1));this.isOffline()?f(!0):this.loadTemplate(m,mxUtils.bind(this,function(y){null!=y&&0<y.length?c(new UrlLibrary(this,y,m)):f()}),function(){f()},null,!0)}else if("R"==k){k=decodeURIComponent(J.substring(1));try{k=JSON.parse(k);var t={id:k[0],title:k[1],downloadUrl:k[2]};this.remoteInvoke("getFileContent",[t.downloadUrl],null,mxUtils.bind(this,function(y){try{c(new RemoteLibrary(this,
+y,t))}catch(F){f()}}),function(){f()})}catch(y){f()}}else if("S"==k&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(J.substring(1)),function(y){c(y)},f)}catch(y){f()}else{var x=null;"G"==k?null!=this.drive&&null!=this.drive.user&&(x=this.drive):"H"==k?null!=this.gitHub&&null!=this.gitHub.getUser()&&(x=this.gitHub):"T"==k?null!=this.trello&&this.trello.isAuthorized()&&(x=this.trello):"D"==k?null!=this.dropbox&&null!=this.dropbox.getUser()&&(x=this.dropbox):"W"==k&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(x=this.oneDrive);null!=x?x.getLibrary(decodeURIComponent(J.substring(1)),mxUtils.bind(this,function(y){try{c(y)}catch(F){f()}}),function(y){f()}):f(!0)}}})(P,D)}z()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer)if(EditorUi.isElectronApp||this.isOffline()||(null!=urlParams.notif?this.fetchAndShowNotification(urlParams.notif):"1"!=urlParams.extAuth&&"atlas"!=Editor.currentTheme&&this.fetchAndShowNotification("online",this.mode)),this.isStandaloneApp()||"simple"==Editor.currentTheme&&"1"!=urlParams.embed)this.buttonContainer.style.display="none",null!=this.notificationBtn&&this.notificationBtn.parentNode!=this.sketchMenubarElt&&this.sketchMenubarElt.appendChild(this.notificationBtn);
else{this.buttonContainer.style.display="";var b=this.getCurrentFile();null!=this.notificationBtn&&this.notificationBtn.parentNode!=this.buttonContainer&&this.buttonContainer.appendChild(this.notificationBtn);"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&(null==this.commentButton&&(this.commentButton=document.createElement("a"),this.setElementTitle(this.commentButton,"comments"),this.commentButton.className="geButton geRoundButton",this.commentButton.style.backgroundImage="url("+Editor.commentImage+
-")",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton)),this.commentButton.style.display=this.commentsSupported()?"":"none");if(null==this.shareButton){this.shareButton=document.createElement("button");this.shareButton.className="geBtn gePrimaryBtn";var k=document.createElement("div");k.className="geButton";k.style.backgroundImage="url("+Editor.groupImage+")";this.shareButton.appendChild(k);
-this.dependsOnLanguage(mxUtils.bind(this,function(){k.innerHTML="";mxUtils.write(k,mxResources.get("share"));this.shareButton.setAttribute("title",mxResources.get("share"))}));mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()}));this.buttonContainer.appendChild(this.shareButton)}this.shareButton.style.display=null!=b&&"kennedy"==Editor.currentTheme&&"1"!=urlParams.embed?"":"none";if("simple"!=Editor.currentTheme){if(null==this.userButton){this.userButton=
-document.createElement("a");this.userButton.className="geButton geRoundButton";var n=document.createElement("img");this.userButton.appendChild(n);mxEvent.addListener(this.userButton,"click",mxUtils.bind(this,function(F){this.toggleUserPanel();var N=this.userButton.getBoundingClientRect(),K=window.innerWidth||document.documentElement.clientWidth;this.userPanel.style.top=N.bottom+"px";this.userPanel.style.right=K-N.right+"px";mxEvent.consume(F)}));var d=document.createElement("img");d.style.position=
-"absolute";d.style.width="10px";this.userButton.appendChild(d);this.buttonContainer.appendChild(this.userButton)}if(!this.unloading){n=this.userButton.getElementsByTagName("img")[0];d=this.userButton.getElementsByTagName("img")[1];var x=mxResources.get("changeUser"),z=this.getMainUser();null!=z&&null!=z.displayName&&(x=z.displayName);null!=z&&null!=z.pictureUrl?(n.classList.remove("geAdaptiveAsset"),n.src=z.pictureUrl,d.style.top="3px",d.style.right="0"):(n.classList.add("geAdaptiveAsset"),n.src=
-Editor.userImage,d.style.top="6px",d.style.right="4px");if(null!=b&&b.isRealtimeEnabled()&&b.isRealtimeSupported()){d.style.display="";n=b.getRealtimeError();var y=b.getRealtimeState();x+=" (";1==y?(d.src=Editor.syncImage,x+=mxResources.get("online")):(d.src=Editor.syncProblemImage,x=null!=n&&null!=n.message?x+n.message:x+mxResources.get("disconnected"));x+=")"}else d.style.display="none",d.src=Editor.cloudImage;this.userButton.setAttribute("title",x);this.userButton.style.display="draw.io"!=this.getServiceName()||
-null==z||"1"==urlParams.embed||this.isStandaloneApp()||null==b?"none":""}}}};
-App.prototype.fetchAndShowNotification=function(b,k){if(!this.fetchingNotif&&null!=NOTIFICATIONS_URL){b=b||"online";var n=null,d=mxUtils.bind(this,function(x){x=x.filter(function(N){return!N.targets||-1<N.targets.indexOf(b)||null!=k&&-1<N.targets.indexOf(k)});for(var z=b+"NotifReadTS",y=isLocalStorage?parseInt(localStorage.getItem(z)):!0,F=0;F<x.length;F++)x[F].isNew=!y||x[F].timestamp>y;this.showNotification(x,z)});try{isLocalStorage&&(n=JSON.parse(localStorage.getItem(".notifCache")))}catch(x){}null==
-n||n.ts+864E5<Date.now()?(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(x){if(200<=x.getStatus()&&299>=x.getStatus())try{var z=JSON.parse(x.getText());z.sort(function(y,F){return F.timestamp-y.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:z}));this.fetchingNotif=!1;d(z)}catch(y){}}))):d(n.notifs)}};
-App.prototype.showNotification=function(b,k){function n(K){var L=document.querySelector(".geNotification-count");null!=L&&(L.innerHTML=K,L.style.display=0==K?"none":"",L=document.querySelector(".geNotification-bell"),L.style.animation=0==K?"none":"",L.className="geNotification-bell"+(0==K?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==K?"none":"")}var d=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var x=d=0;x<b.length;x++)b[x].isNew&&
-d++;if(0==d)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var z=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var K=this.notificationWin.querySelectorAll(".circle.active"),L=0;L<K.length;L++)K[L].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(k,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className=
-"geNotification-box";d=document.createElement("span");d.className="geNotification-count";this.notificationBtn.appendChild(d);this.notifCount=d;d=document.createElement("div");d.className="geNotification-bell";x=document.createElement("span");x.className="geBell-top";d.appendChild(x);x=document.createElement("span");x.className="geBell-middle";d.appendChild(x);x=document.createElement("span");x.className="geBell-bottom";d.appendChild(x);x=document.createElement("span");x.className="geBell-rad";d.appendChild(x);
-this.notificationBtn.appendChild(d);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);x=document.createElement("div");x.className="header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");x.appendChild(d);d=document.createElement("span");d.className="closeBtn";d.textContent="x";x.appendChild(d);this.notificationWin.appendChild(x);
-x=document.createElement("div");x.className="notifications clearfix";var y=document.createElement("div");y.setAttribute("id","geNotifList");y.style.position="relative";x.appendChild(y);this.notificationWin.appendChild(x);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var K=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=
-K.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=K.right-this.notificationWin.clientWidth+"px";n(0)}else z()}));mxEvent.addListener(d,"click",z)}else this.notificationBtn.style.display="";var F=0,N=document.getElementById("geNotifList");if(null!=N){N.innerHTML='<div class="line"></div>';for(x=0;x<b.length;x++)(function(K,L){L.isNew&&F++;var c=document.createElement("div");c.className="notification";K=K.timeSince(new Date(L.timestamp));null==K&&(K=mxResources.get("lessThanAMinute"));
-c.innerHTML='<div class="circle'+(L.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[K],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(L.content)+"</p>";L.link&&mxEvent.addListener(c,"click",function(){window.open(L.link,"notifWin")});N.appendChild(c)})(this,b[x]);n(F)}}};
-App.prototype.save=function(b,k){var n=this.getCurrentFile(),d=!0,x=mxUtils.bind(this,function(){d&&(d=!1,n.handleFileSuccess(!0),null!=k&&k())}),z=mxUtils.bind(this,function(y){if(d){d=!1;Editor.addRetryToError(y,mxUtils.bind(this,function(){this.save(b,k)}));if(null!=y&&null!=y.retry){var F=y.retry;y.retry=function(){d=!0;try{n.isModified()?F():x()}catch(N){z(N)}}}n.handleFileError(y,null==y||"AbortError"!=y.name)}});if(null!=n&&this.spinner.spin(document.body,mxResources.get("saving"),z,3*this.timeout))try{this.clearStatus(),
-this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==n.getTitle()?n.save(!0,x,z):n.saveAs(b,x,z)}catch(y){z(y)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};
+")",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton)),this.commentButton.style.display=this.commentsSupported()?"":"none");if(null==this.shareButton){this.shareButton=document.createElement("button");this.shareButton.className="geBtn gePrimaryBtn";var l=document.createElement("div");l.className="geButton";l.style.backgroundImage="url("+Editor.groupImage+")";this.shareButton.appendChild(l);
+this.dependsOnLanguage(mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,mxResources.get("share"));this.shareButton.setAttribute("title",mxResources.get("share"))}));mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()}));this.buttonContainer.appendChild(this.shareButton)}this.shareButton.style.display=null!=b&&"kennedy"==Editor.currentTheme&&"1"!=urlParams.embed?"":"none";if("simple"!=Editor.currentTheme){if(null==this.userButton){this.userButton=
+document.createElement("a");this.userButton.className="geButton geRoundButton";var n=document.createElement("img");this.userButton.appendChild(n);mxEvent.addListener(this.userButton,"click",mxUtils.bind(this,function(D){this.toggleUserPanel();var P=this.userButton.getBoundingClientRect(),J=window.innerWidth||document.documentElement.clientWidth;this.userPanel.style.top=P.bottom+"px";this.userPanel.style.right=J-P.right+"px";mxEvent.consume(D)}));var d=document.createElement("img");d.style.position=
+"absolute";d.style.width="10px";this.userButton.appendChild(d);this.buttonContainer.appendChild(this.userButton)}if(!this.unloading){n=this.userButton.getElementsByTagName("img")[0];d=this.userButton.getElementsByTagName("img")[1];var v=mxResources.get("changeUser"),A=this.getMainUser();null!=A&&null!=A.displayName&&(v=A.displayName);null!=A&&null!=A.pictureUrl?(n.classList.remove("geAdaptiveAsset"),n.src=A.pictureUrl,d.style.top="3px",d.style.right="0"):(n.classList.add("geAdaptiveAsset"),n.src=
+Editor.userImage,d.style.top="6px",d.style.right="4px");if(null!=b&&b.isRealtimeEnabled()&&b.isRealtimeSupported()){d.style.display="";n=b.getRealtimeError();var z=b.getRealtimeState();v+=" (";1==z?(d.src=Editor.syncImage,v+=mxResources.get("online")):(d.src=Editor.syncProblemImage,v=null!=n&&null!=n.message?v+n.message:v+mxResources.get("disconnected"));v+=")"}else d.style.display="none",d.src=Editor.cloudImage;this.userButton.setAttribute("title",v);this.userButton.style.display="draw.io"!=this.getServiceName()||
+null==A||"1"==urlParams.embed||this.isStandaloneApp()||null==b?"none":""}}}};
+App.prototype.fetchAndShowNotification=function(b,l){if(!this.fetchingNotif&&null!=NOTIFICATIONS_URL){b=b||"online";var n=null,d=mxUtils.bind(this,function(v){v=v.filter(function(P){return!P.targets||-1<P.targets.indexOf(b)||null!=l&&-1<P.targets.indexOf(l)});for(var A=b+"NotifReadTS",z=isLocalStorage?parseInt(localStorage.getItem(A)):!0,D=0;D<v.length;D++)v[D].isNew=!z||v[D].timestamp>z;this.showNotification(v,A)});try{isLocalStorage&&(n=JSON.parse(localStorage.getItem(".notifCache")))}catch(v){}null==
+n||n.ts+864E5<Date.now()?(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus())try{var A=JSON.parse(v.getText());A.sort(function(z,D){return D.timestamp-z.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:A}));this.fetchingNotif=!1;d(A)}catch(z){}}))):d(n.notifs)}};
+App.prototype.showNotification=function(b,l){function n(J){var L=document.querySelector(".geNotification-count");null!=L&&(L.innerHTML=J,L.style.display=0==J?"none":"",L=document.querySelector(".geNotification-bell"),L.style.animation=0==J?"none":"",L.className="geNotification-bell"+(0==J?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==J?"none":"")}var d=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var v=d=0;v<b.length;v++)b[v].isNew&&
+d++;if(0==d)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var A=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var J=this.notificationWin.querySelectorAll(".circle.active"),L=0;L<J.length;L++)J[L].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(l,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className=
+"geNotification-box";d=document.createElement("span");d.className="geNotification-count";this.notificationBtn.appendChild(d);this.notifCount=d;d=document.createElement("div");d.className="geNotification-bell";v=document.createElement("span");v.className="geBell-top";d.appendChild(v);v=document.createElement("span");v.className="geBell-middle";d.appendChild(v);v=document.createElement("span");v.className="geBell-bottom";d.appendChild(v);v=document.createElement("span");v.className="geBell-rad";d.appendChild(v);
+this.notificationBtn.appendChild(d);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);v=document.createElement("div");v.className="header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");v.appendChild(d);d=document.createElement("span");d.className="closeBtn";d.textContent="x";v.appendChild(d);this.notificationWin.appendChild(v);
+v=document.createElement("div");v.className="notifications clearfix";var z=document.createElement("div");z.setAttribute("id","geNotifList");z.style.position="relative";v.appendChild(z);this.notificationWin.appendChild(v);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var J=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=
+J.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=J.right-this.notificationWin.clientWidth+"px";n(0)}else A()}));mxEvent.addListener(d,"click",A)}else this.notificationBtn.style.display="";var D=0,P=document.getElementById("geNotifList");if(null!=P){P.innerHTML='<div class="line"></div>';for(v=0;v<b.length;v++)(function(J,L){L.isNew&&D++;var c=document.createElement("div");c.className="notification";J=J.timeSince(new Date(L.timestamp));null==J&&(J=mxResources.get("lessThanAMinute"));
+c.innerHTML='<div class="circle'+(L.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[J],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(L.content)+"</p>";L.link&&mxEvent.addListener(c,"click",function(){window.open(L.link,"notifWin")});P.appendChild(c)})(this,b[v]);n(D)}}};
+App.prototype.save=function(b,l){var n=this.getCurrentFile(),d=!0,v=mxUtils.bind(this,function(){d&&(d=!1,n.handleFileSuccess(!0),null!=l&&l())}),A=mxUtils.bind(this,function(z){if(d){d=!1;Editor.addRetryToError(z,mxUtils.bind(this,function(){this.save(b,l)}));if(null!=z&&null!=z.retry){var D=z.retry;z.retry=function(){d=!0;try{n.isModified()?D():v()}catch(P){A(P)}}}n.handleFileError(z,null==z||"AbortError"!=z.name)}});if(null!=n&&this.spinner.spin(document.body,mxResources.get("saving"),A,3*this.timeout))try{this.clearStatus(),
+this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==n.getTitle()?n.save(!0,v,A):n.saveAs(b,v,A)}catch(z){A(z)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};
App.prototype.getTitleForService=function(b){return b==App.MODE_GOOGLE?mxResources.get("googleDrive"):b==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):EditorUi.prototype.getTitleForService.apply(this,arguments)};
-App.prototype.pickFolder=function(b,k,n,d,x,z){n=null!=n?n:!0;this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);var y=this.spinner.pause();n&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(F){y();if(F.action==google.picker.Action.PICKED){var N=null;null!=F.docs&&0<F.docs.length&&"folder"==F.docs[0].type&&(N=F.docs[0].id);k(z?F:N)}}),x):n&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(F){y();
-if(null!=F&&null!=F.value&&0<F.value.length){var N=OneDriveFile.prototype.getIdOf(F.value[0]);k(z?F:N)}}),d):n&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(F){y();k(F)})):n&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(F){y();k(F)})):n&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(F){y();k(F)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(b,k,n,d,x,z){x==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(k,d?this.base64ToBlob(b,n):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)})):x==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(k,b,z,mxUtils.bind(this,function(y){this.spinner.stop()}),
-mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),n,d):x==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(k,d?this.base64ToBlob(b,n):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),!1,z):x==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(k,b,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),!0,z,d):x==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(k,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),!0,z,d):x==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(k,d?this.base64ToBlob(b,
-n):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),!1,z):x==App.MODE_BROWSER&&(null!=window.StorageFile&&!d&&this.spinner.spin(document.body,mxResources.get("saving"))?(n="<mxlibrary"==b.substring(0,10)?new StorageLibrary(this,b,k):new StorageFile(this,b,k),StorageFile.doInsertFile(n,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}))):(n=mxUtils.bind(this,
-function(){localStorage.setItem(k,b)}),null==localStorage.getItem(k)?n():this.confirm(mxResources.get("replaceIt",[k]),n)))};
-App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fname.innerText="";var k=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,k)}k=this.editor.graph;var n=b.isEditable();k.isEnabled()&&!n&&k.reset();k.setEnabled(n);null==urlParams.rev&&(this.updateDocumentTitle(),k=b.getHash(),0<k.length?(k!=this.getDiagramId()&&(window.location.hash=k),this.updateHashObject()):0<window.location.hash.length&&(window.location.hash=
+App.prototype.pickFolder=function(b,l,n,d,v,A){n=null!=n?n:!0;this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);var z=this.spinner.pause();n&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(D){z();if(D.action==google.picker.Action.PICKED){var P=null;null!=D.docs&&0<D.docs.length&&"folder"==D.docs[0].type&&(P=D.docs[0].id);l(A?D:P)}}),v):n&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(D){z();
+if(null!=D&&null!=D.value&&0<D.value.length){var P=OneDriveFile.prototype.getIdOf(D.value[0]);l(A?D:P)}}),d):n&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(D){z();l(D)})):n&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(D){z();l(D)})):n&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(D){z();l(D)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(b,l,n,d,v,A){v==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(l,d?this.base64ToBlob(b,n):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)})):v==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(l,b,A,mxUtils.bind(this,function(z){this.spinner.stop()}),
+mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}),n,d):v==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(l,d?this.base64ToBlob(b,n):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}),!1,A):v==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(l,b,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}),!0,A,d):v==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(l,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}),!0,A,d):v==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(l,d?this.base64ToBlob(b,
+n):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}),!1,A):v==App.MODE_BROWSER&&(null!=window.StorageFile&&!d&&this.spinner.spin(document.body,mxResources.get("saving"))?(n="<mxlibrary"==b.substring(0,10)?new StorageLibrary(this,b,l):new StorageFile(this,b,l),StorageFile.doInsertFile(n,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}))):(n=mxUtils.bind(this,
+function(){localStorage.setItem(l,b)}),null==localStorage.getItem(l)?n():this.confirm(mxResources.get("replaceIt",[l]),n)))};
+App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fname.innerText="";var l=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,l)}l=this.editor.graph;var n=b.isEditable();l.isEnabled()&&!n&&l.reset();l.setEnabled(n);null==urlParams.rev&&(this.updateDocumentTitle(),l=b.getHash(),0<l.length?(l!=this.getDiagramId()&&(window.location.hash=l),this.updateHashObject()):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,k,n,d){var x=this.spinner.pause();this.showDialog((new AuthDialog(this,b,k,mxUtils.bind(this,function(z){try{null!=n&&n(z,mxUtils.bind(this,function(){this.hideDialog();x()}))}catch(y){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(y.message))}))}}))).container,300,k?180:140,!0,!0,mxUtils.bind(this,function(z){null!=d&&d(z);z&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,k,n,d,x,z,y,F){var N=k;/\.svg$/i.test(N)||(N=N.substring(0,k.lastIndexOf("."))+d);var K=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(K=!0);if(/\.v(dx|sdx?)$/i.test(k)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var L=new XMLHttpRequest;L.open("GET",b,!0);K||(L.responseType="blob");if(F)for(var c in F)L.setRequestHeader(c,F[c]);L.onload=mxUtils.bind(this,function(){if(200<=
-L.status&&299>=L.status){var l=null;K?(l=JSON.parse(L.responseText),l=this.base64ToBlob(l.content,"application/octet-stream")):l=new Blob([L.response],{type:"application/octet-stream"});this.importVisio(l,mxUtils.bind(this,function(m){x(new LocalFile(this,m,N,!0))}),z,k)}else null!=z&&z({message:mxResources.get("errorLoadingFile")})});L.onerror=z;L.send()}else{var f=mxUtils.bind(this,function(l){try{if(/\.pdf$/i.test(k)){var m=Editor.extractGraphModelFromPdf(l);null!=m&&0<m.length&&x(new LocalFile(this,
-m,N,!0))}else/\.png$/i.test(k)?(m=this.extractGraphModelFromPng(l),null!=m?x(new LocalFile(this,m,N,!0)):x(new LocalFile(this,l,k,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,b)?this.parseFileData(l,mxUtils.bind(this,function(t){4==t.readyState&&(200<=t.status&&299>=t.status?x(new LocalFile(this,t.responseText,N,!0)):null!=z&&z({message:mxResources.get("errorLoadingFile")}))}),k):x(new LocalFile(this,l,N,!0))}catch(t){null!=z&&z(t)}});n=/\.png$/i.test(k)||/\.jpe?g$/i.test(k)||
-/\.pdf$/i.test(k)||null!=n&&"image/"==n.substring(0,6);K?mxUtils.get(b,mxUtils.bind(this,function(l){if(200<=l.getStatus()&&299>=l.getStatus()){if(null!=x){l=JSON.parse(l.getText());var m=l.content;"base64"===l.encoding&&(m=/\.png$/i.test(k)?"data:image/png;base64,"+m:/\.pdf$/i.test(k)?"data:application/pdf;base64,"+m:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(m):atob(m));f(m)}}else null!=z&&z({code:App.ERROR_UNKNOWN})}),function(){null!=z&&z({code:App.ERROR_UNKNOWN})},!1,this.timeout,
-function(){null!=z&&z({code:App.ERROR_TIMEOUT,retry:fn})},F):null!=y?y(b,f,z,n):this.editor.loadUrl(b,f,z,n,null,null,null,F)}};
-App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.className="geAppIcon";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(y){this.appIconClicked(y)}));mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var y=this.getCurrentFile();null!=y&&(y=y.getMode(),y==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage=
-"url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):y==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):y==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):y==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize=
-"70%"):y==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="90%"):y==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70%"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=b;this.appIcon.style.backgroundSize=""}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);
-this.fnameWrapper=document.createElement("div");this.fname=document.createElement("a");this.fnameWrapper.className="geFilenameContainer";this.fname.className="geFilename";mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(y){var F=this.getCurrentFile();null!=F&&F.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(y)}));mxEvent.preventDefault(this.fname);this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&
-this.menubarContainer.appendChild(this.fnameWrapper);var k=document.createElement("div");k.className="geToolbar geToolbarEnd";this.toolbarContainer.appendChild(k);var n=document.createElement("a");n.style.backgroundImage="url('"+Editor.fullscreenImage+"')";n.className="geButton";k.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(y){var F=this.fullscreenMode;"atlas"!=Editor.currentTheme&&"1"!=urlParams.embed&&this.setCompactMode(!F,null,Editor.transitionDelay);this.toggleShapesPanel(F);
-this.toggleFormatPanel(F);this.fullscreenMode=!F;n.style.backgroundImage="url('"+(this.fullscreenMode?Editor.fullscreenExitImage:Editor.fullscreenImage)+"')";mxEvent.consume(y)}));mxEvent.preventDefault(n);var d=document.createElement("a");d.className="geButton";k.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(y){this.actions.get("format").funct();mxEvent.consume(y)}));mxEvent.preventDefault(d);var x=mxUtils.bind(this,function(){d.style.backgroundImage=0<this.formatWidth?
-"url('"+Editor.rightPanelCloseImage+"')":"url('"+Editor.rightPanelOpenImage+"')"});this.addListener("formatWidthChanged",x);x();var z=document.createElement("a");z.style.backgroundImage="url('"+(this.compactMode?Editor.chevronDownImage:Editor.chevronUpImage)+"')";z.className="geButton";"1"!=urlParams.embed&&"atlas"!=Editor.currentTheme&&(k.appendChild(z),mxEvent.addListener(z,"click",mxUtils.bind(this,function(y){this.setCompactMode(!this.compactMode,!0,Editor.transitionDelay);mxEvent.consume(y)})),
-mxEvent.preventDefault(z),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof z.click&&window.setTimeout(mxUtils.bind(this,function(){z.click()}),0),this.addListener("compactModeChanged",mxUtils.bind(this,function(){z.style.backgroundImage="url('"+(this.compactMode?Editor.chevronDownImage:Editor.chevronUpImage)+"')"})));this.dependsOnLanguage(mxUtils.bind(this,function(){this.fname.setAttribute("title",mxResources.get("rename"));n.setAttribute("title",mxResources.get("fullscreen"));z.setAttribute("title",
+App.prototype.showAuthDialog=function(b,l,n,d){var v=this.spinner.pause();this.showDialog((new AuthDialog(this,b,l,mxUtils.bind(this,function(A){try{null!=n&&n(A,mxUtils.bind(this,function(){this.hideDialog();v()}))}catch(z){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(z.message))}))}}))).container,300,l?180:140,!0,!0,mxUtils.bind(this,function(A){null!=d&&d(A);A&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(b,l,n,d,v,A,z,D){var P=l;/\.svg$/i.test(P)||(P=P.substring(0,l.lastIndexOf("."))+d);var J=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(J=!0);if(/\.v(dx|sdx?)$/i.test(l)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var L=new XMLHttpRequest;L.open("GET",b,!0);J||(L.responseType="blob");if(D)for(var c in D)L.setRequestHeader(c,D[c]);L.onload=mxUtils.bind(this,function(){if(200<=
+L.status&&299>=L.status){var k=null;J?(k=JSON.parse(L.responseText),k=this.base64ToBlob(k.content,"application/octet-stream")):k=new Blob([L.response],{type:"application/octet-stream"});this.importVisio(k,mxUtils.bind(this,function(m){v(new LocalFile(this,m,P,!0))}),A,l)}else null!=A&&A({message:mxResources.get("errorLoadingFile")})});L.onerror=A;L.send()}else{var f=mxUtils.bind(this,function(k){try{if(/\.pdf$/i.test(l)){var m=Editor.extractGraphModelFromPdf(k);null!=m&&0<m.length&&v(new LocalFile(this,
+m,P,!0))}else/\.png$/i.test(l)?(m=this.extractGraphModelFromPng(k),null!=m?v(new LocalFile(this,m,P,!0)):v(new LocalFile(this,k,l,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,b)?this.parseFileData(k,mxUtils.bind(this,function(t){4==t.readyState&&(200<=t.status&&299>=t.status?v(new LocalFile(this,t.responseText,P,!0)):null!=A&&A({message:mxResources.get("errorLoadingFile")}))}),l):v(new LocalFile(this,k,P,!0))}catch(t){null!=A&&A(t)}});n=/\.png$/i.test(l)||/\.jpe?g$/i.test(l)||
+/\.pdf$/i.test(l)||null!=n&&"image/"==n.substring(0,6);J?mxUtils.get(b,mxUtils.bind(this,function(k){if(200<=k.getStatus()&&299>=k.getStatus()){if(null!=v){k=JSON.parse(k.getText());var m=k.content;"base64"===k.encoding&&(m=/\.png$/i.test(l)?"data:image/png;base64,"+m:/\.pdf$/i.test(l)?"data:application/pdf;base64,"+m:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(m):atob(m));f(m)}}else null!=A&&A({code:App.ERROR_UNKNOWN})}),function(){null!=A&&A({code:App.ERROR_UNKNOWN})},!1,this.timeout,
+function(){null!=A&&A({code:App.ERROR_TIMEOUT,retry:fn})},D):null!=z?z(b,f,A,n):this.editor.loadUrl(b,f,A,n,null,null,null,D)}};
+App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.className="geAppIcon";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(z){this.appIconClicked(z)}));mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var z=this.getCurrentFile();null!=z&&(z=z.getMode(),z==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage=
+"url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):z==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):z==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):z==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize=
+"70%"):z==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="90%"):z==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70%"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=b;this.appIcon.style.backgroundSize=""}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);
+this.fnameWrapper=document.createElement("div");this.fname=document.createElement("a");this.fnameWrapper.className="geFilenameContainer";this.fname.className="geFilename";mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(z){var D=this.getCurrentFile();null!=D&&D.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(z)}));mxEvent.preventDefault(this.fname);this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&
+this.menubarContainer.appendChild(this.fnameWrapper);var l=document.createElement("div");l.className="geToolbar geToolbarEnd";this.toolbarContainer.appendChild(l);var n=document.createElement("a");n.style.backgroundImage="url('"+Editor.fullscreenImage+"')";n.className="geButton";l.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(z){var D=this.fullscreenMode;"atlas"!=Editor.currentTheme&&"1"!=urlParams.embed&&this.setCompactMode(!D,null,Editor.transitionDelay);this.toggleShapesPanel(D);
+this.toggleFormatPanel(D);this.fullscreenMode=!D;n.style.backgroundImage="url('"+(this.fullscreenMode?Editor.fullscreenExitImage:Editor.fullscreenImage)+"')";mxEvent.consume(z)}));mxEvent.preventDefault(n);var d=document.createElement("a");d.className="geButton";l.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(z){this.actions.get("format").funct();mxEvent.consume(z)}));mxEvent.preventDefault(d);var v=mxUtils.bind(this,function(){d.style.backgroundImage=0<this.formatWidth?
+"url('"+Editor.rightPanelCloseImage+"')":"url('"+Editor.rightPanelOpenImage+"')"});this.addListener("formatWidthChanged",v);v();var A=document.createElement("a");A.style.backgroundImage="url('"+(this.compactMode?Editor.chevronDownImage:Editor.chevronUpImage)+"')";A.className="geButton";"1"!=urlParams.embed&&"atlas"!=Editor.currentTheme&&(l.appendChild(A),mxEvent.addListener(A,"click",mxUtils.bind(this,function(z){this.setCompactMode(!this.compactMode,!0,Editor.transitionDelay);mxEvent.consume(z)})),
+mxEvent.preventDefault(A),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof A.click&&window.setTimeout(mxUtils.bind(this,function(){A.click()}),0),this.addListener("compactModeChanged",mxUtils.bind(this,function(){A.style.backgroundImage="url('"+(this.compactMode?Editor.chevronDownImage:Editor.chevronUpImage)+"')"})));this.dependsOnLanguage(mxUtils.bind(this,function(){this.fname.setAttribute("title",mxResources.get("rename"));n.setAttribute("title",mxResources.get("fullscreen"));A.setAttribute("title",
mxResources.get("collapseExpand"));d.setAttribute("title",mxResources.get("format")+" ("+Editor.ctrlKey+"+"+Editor.shiftKey+"+P)")}))}};
-App.prototype.setCompactMode=function(b,k,n){var d=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;n=null!=n?n:0;window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.menubarContainer.style,"transition","all "+n+"s ease-in-out");mxUtils.setPrefixedStyle(this.toolbarContainer.style,"transition","all "+n+"s ease-in-out");b?d.classList.add("geCompactMode"):d.classList.remove("geCompactMode");window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(this.menubarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.toolbarContainer.style,"transition",null);this.compactMode=b;this.refresh(!0);this.fireEvent(new mxEventObject("compactModeChanged"));isLocalStorage&&k&&(mxSettings.settings.compactMode=this.compactMode,mxSettings.save())}),1E3*n)}),0)};
+App.prototype.setCompactMode=function(b,l,n){var d=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;n=null!=n?n:0;window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.menubarContainer.style,"transition","all "+n+"s ease-in-out");mxUtils.setPrefixedStyle(this.toolbarContainer.style,"transition","all "+n+"s ease-in-out");b?d.classList.add("geCompactMode"):d.classList.remove("geCompactMode");window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(this.menubarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.toolbarContainer.style,"transition",null);this.compactMode=b;this.refresh(!0);this.fireEvent(new mxEventObject("compactModeChanged"));isLocalStorage&&l&&(mxSettings.settings.compactMode=this.compactMode,mxSettings.save())}),1E3*n)}),0)};
App.prototype.getMainUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&(b=this.gitLab.getUser());return b};
App.prototype.hideUserPanel=function(){null!=this.userPanel&&null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)};
-App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog geInlineDialog";b.style.minWidth="300px";this.userPanel=b;mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(y){mxEvent.isConsumed(y)||this.hideUserPanel()}))}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var k=!1;this.userPanel.innerText="";b=document.createElement("div");b.className="geButton";b.setAttribute("title",
-mxResources.get("close"));b.style.backgroundImage="url("+Editor.crossImage+")";b.style.position="absolute";b.style.right="0px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var n=this.drive.getUsersList();if(0<n.length){var d=mxUtils.bind(this,function(y,F){var N=this.getCurrentFile();null!=N&&N.constructor==DriveFile?(this.spinner.spin(document.body,F),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,
-function(){this.spinner.stop();y()}),2E3)):y()});b=mxUtils.bind(this,function(y){var F=document.createElement("tr"),N=document.createElement("td");N.setAttribute("valig","middle");N.style.height="59px";N.style.width="66px";var K=document.createElement("img");K.setAttribute("width","50");K.setAttribute("height","50");K.setAttribute("border","0");K.setAttribute("src",null!=y.pictureUrl?y.pictureUrl:Editor.userImage);K.style.borderRadius="50%";K.style.margin="4px 8px 0 8px";N.appendChild(K);F.appendChild(N);
-N=document.createElement("td");N.setAttribute("valign","middle");N.style.whiteSpace="nowrap";N.style.paddingTop="4px";N.style.maxWidth="0";N.style.overflow="hidden";N.style.textOverflow="ellipsis";mxUtils.write(N,y.displayName+(y.isCurrent&&1<n.length?" ("+mxResources.get("default")+")":""));null!=y.email&&(mxUtils.br(N),K=document.createElement("small"),K.style.color="gray",mxUtils.write(K,y.email),N.appendChild(K));K=document.createElement("div");K.style.marginTop="4px";var L=document.createElement("i");
-mxUtils.write(L,mxResources.get("googleDrive"));K.appendChild(L);N.appendChild(K);F.appendChild(N);y.isCurrent?F.setAttribute("title","User ID: "+y.id):(F.setAttribute("title",mxResources.get("login")+" (User ID: "+y.id+")"),F.style.cursor="pointer",F.style.opacity="0.3",mxEvent.addListener(F,"mouseenter",mxUtils.bind(this,function(){F.style.opacity="1"})),mxEvent.addListener(F,"mouseleave",mxUtils.bind(this,function(){F.style.opacity="0.3"})),mxEvent.addListener(F,"click",mxUtils.bind(this,function(c){this.hideUserPanel();
-d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(y);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(f){this.handleError(f)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(c)})));return F});k=!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<n.length;z++)x.appendChild(b(n[z]));
-this.userPanel.appendChild(x);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";x=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){d(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";b.appendChild(x);x=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var y=this.drive.createAuthWin();y.blur();window.focus();d(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(F){this.handleError(F)}),!0,y)}),mxResources.get("closingFile")+"...")}));x.className="geBtn";x.style.margin="0px";
-b.appendChild(x);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(y,F,N,K){if(null!=y){k&&this.userPanel.appendChild(document.createElement("hr"));k=!0;var L=document.createElement("table");L.style.borderSpacing="0";L.style.fontSize="10pt";L.style.width="100%";L.style.padding="10px";var c=document.createElement("tbody"),f=document.createElement("tr"),l=document.createElement("td");l.setAttribute("valig","top");l.style.width="40px";if(null!=F){var m=document.createElement("img");m.setAttribute("width",
-"40");m.setAttribute("height","40");m.setAttribute("border","0");m.setAttribute("src",F);m.style.marginRight="6px";l.appendChild(m)}f.appendChild(l);l=document.createElement("td");l.setAttribute("valign","middle");l.style.whiteSpace="nowrap";l.style.maxWidth="0";l.style.overflow="hidden";l.style.textOverflow="ellipsis";mxUtils.write(l,y.displayName);null!=y.email&&(mxUtils.br(l),F=document.createElement("small"),F.style.color="gray",mxUtils.write(F,y.email),l.appendChild(F));null!=K&&(y=document.createElement("div"),
-y.style.marginTop="4px",F=document.createElement("i"),mxUtils.write(F,K),y.appendChild(F),l.appendChild(y));f.appendChild(l);c.appendChild(f);L.appendChild(c);this.userPanel.appendChild(L);y=document.createElement("div");y.style.textAlign="center";y.style.padding="10px";y.style.whiteSpace="nowrap";null!=N&&(N=mxUtils.button(mxResources.get("signOut"),N),N.className="geBtn",y.appendChild(N));this.userPanel.appendChild(y)}});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",
-mxUtils.bind(this,function(){var y=this.getCurrentFile();if(null!=y&&y.constructor==DropboxFile){var F=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var y=
-this.getCurrentFile();if(null!=y&&y.constructor==OneDriveFile){var F=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var y=this.getCurrentFile();if(null!=y&&y.constructor==GitHubFile){var F=
-mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var y=this.getCurrentFile();if(null!=y&&y.constructor==GitLabFile){var F=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=
-""});y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var y=this.getCurrentFile();if(null!=y&&y.constructor==TrelloFile){var F=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});y.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(x=this.getCurrentFile(),null!=x&&x.isRealtimeEnabled()&&x.isRealtimeSupported()&&(b=document.createElement("div"),b.style.padding="10px",b.style.whiteSpace="nowrap",b.style.borderTop="1px solid rgb(224, 224, 224)",b.style.marginTop="4px",b.style.textAlign="center",b.style.padding="10px",b.style.fontSize="9pt",z=x.getRealtimeError(),1!=x.getRealtimeState()&&
-(mxUtils.write(b,mxResources.get("realtimeCollaboration")+": "+(null!=z&&null!=z.message?z.message:mxResources.get("disconnected"))),this.userPanel.appendChild(b))));document.body.appendChild(this.userPanel)}};
+App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog geInlineDialog";b.style.minWidth="300px";this.userPanel=b;mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(z){mxEvent.isConsumed(z)||this.hideUserPanel()}))}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var l=!1;this.userPanel.innerText="";b=document.createElement("div");b.className="geButton";b.setAttribute("title",
+mxResources.get("close"));b.style.backgroundImage="url("+Editor.crossImage+")";b.style.position="absolute";b.style.right="0px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var n=this.drive.getUsersList();if(0<n.length){var d=mxUtils.bind(this,function(z,D){var P=this.getCurrentFile();null!=P&&P.constructor==DriveFile?(this.spinner.spin(document.body,D),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,
+function(){this.spinner.stop();z()}),2E3)):z()});b=mxUtils.bind(this,function(z){var D=document.createElement("tr"),P=document.createElement("td");P.setAttribute("valig","middle");P.style.height="59px";P.style.width="66px";var J=document.createElement("img");J.setAttribute("width","50");J.setAttribute("height","50");J.setAttribute("border","0");J.setAttribute("src",null!=z.pictureUrl?z.pictureUrl:Editor.userImage);J.style.borderRadius="50%";J.style.margin="4px 8px 0 8px";P.appendChild(J);D.appendChild(P);
+P=document.createElement("td");P.setAttribute("valign","middle");P.style.whiteSpace="nowrap";P.style.paddingTop="4px";P.style.maxWidth="0";P.style.overflow="hidden";P.style.textOverflow="ellipsis";mxUtils.write(P,z.displayName+(z.isCurrent&&1<n.length?" ("+mxResources.get("default")+")":""));null!=z.email&&(mxUtils.br(P),J=document.createElement("small"),J.style.color="gray",mxUtils.write(J,z.email),P.appendChild(J));J=document.createElement("div");J.style.marginTop="4px";var L=document.createElement("i");
+mxUtils.write(L,mxResources.get("googleDrive"));J.appendChild(L);P.appendChild(J);D.appendChild(P);z.isCurrent?D.setAttribute("title","User ID: "+z.id):(D.setAttribute("title",mxResources.get("login")+" (User ID: "+z.id+")"),D.style.cursor="pointer",D.style.opacity="0.3",mxEvent.addListener(D,"mouseenter",mxUtils.bind(this,function(){D.style.opacity="1"})),mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(){D.style.opacity="0.3"})),mxEvent.addListener(D,"click",mxUtils.bind(this,function(c){this.hideUserPanel();
+d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(z);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(f){this.handleError(f)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(c)})));return D});l=!0;var v=document.createElement("table");v.style.borderSpacing="0";v.style.fontSize="10pt";v.style.width="100%";v.style.padding="10px";for(var A=0;A<n.length;A++)v.appendChild(b(n[A]));
+this.userPanel.appendChild(v);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";v=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));
+v.className="geBtn";v.style.float="right";b.appendChild(v);v=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var z=this.drive.createAuthWin();z.blur();window.focus();d(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(D){this.handleError(D)}),!0,z)}),mxResources.get("closingFile")+"...")}));v.className="geBtn";v.style.margin="0px";
+b.appendChild(v);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(z,D,P,J){if(null!=z){l&&this.userPanel.appendChild(document.createElement("hr"));l=!0;var L=document.createElement("table");L.style.borderSpacing="0";L.style.fontSize="10pt";L.style.width="100%";L.style.padding="10px";var c=document.createElement("tbody"),f=document.createElement("tr"),k=document.createElement("td");k.setAttribute("valig","top");k.style.width="40px";if(null!=D){var m=document.createElement("img");m.setAttribute("width",
+"40");m.setAttribute("height","40");m.setAttribute("border","0");m.setAttribute("src",D);m.style.marginRight="6px";k.appendChild(m)}f.appendChild(k);k=document.createElement("td");k.setAttribute("valign","middle");k.style.whiteSpace="nowrap";k.style.maxWidth="0";k.style.overflow="hidden";k.style.textOverflow="ellipsis";mxUtils.write(k,z.displayName);null!=z.email&&(mxUtils.br(k),D=document.createElement("small"),D.style.color="gray",mxUtils.write(D,z.email),k.appendChild(D));null!=J&&(z=document.createElement("div"),
+z.style.marginTop="4px",D=document.createElement("i"),mxUtils.write(D,J),z.appendChild(D),k.appendChild(z));f.appendChild(k);c.appendChild(f);L.appendChild(c);this.userPanel.appendChild(L);z=document.createElement("div");z.style.textAlign="center";z.style.padding="10px";z.style.whiteSpace="nowrap";null!=P&&(P=mxUtils.button(mxResources.get("signOut"),P),P.className="geBtn",z.appendChild(P));this.userPanel.appendChild(z)}});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",
+mxUtils.bind(this,function(){var z=this.getCurrentFile();if(null!=z&&z.constructor==DropboxFile){var D=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});z.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var z=
+this.getCurrentFile();if(null!=z&&z.constructor==OneDriveFile){var D=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});z.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var z=this.getCurrentFile();if(null!=z&&z.constructor==GitHubFile){var D=
+mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});z.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var z=this.getCurrentFile();if(null!=z&&z.constructor==GitLabFile){var D=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=
+""});z.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var z=this.getCurrentFile();if(null!=z&&z.constructor==TrelloFile){var D=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});z.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(v=this.getCurrentFile(),null!=v&&v.isRealtimeEnabled()&&v.isRealtimeSupported()&&(b=document.createElement("div"),b.style.padding="10px",b.style.whiteSpace="nowrap",b.style.borderTop="1px solid rgb(224, 224, 224)",b.style.marginTop="4px",b.style.textAlign="center",b.style.padding="10px",b.style.fontSize="9pt",A=v.getRealtimeError(),1!=v.getRealtimeState()&&
+(mxUtils.write(b,mxResources.get("realtimeCollaboration")+": "+(null!=A&&null!=A.message?A.message:mxResources.get("disconnected"))),this.userPanel.appendChild(b))));document.body.appendChild(this.userPanel)}};
App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(n){return this.editorUi.createHelpIcon(n)};Menus.prototype.addLinkToItem=function(n,d){null!=n&&n.firstChild.nextSibling.appendChild(this.createHelpLink(d))};
-Menus.prototype.removeCustomFont=function(n,d){for(var x=0;x<this.customFonts.length;x++)if(this.customFonts[x].name==n&&this.customFonts[x].url==d){this.customFonts.splice(x,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(n,d){for(var x=0;x<this.customFonts.length;x++)if(this.customFonts[x].name==n&&this.customFonts[x].url==d)return!0;for(x=0;x<this.defaultFonts.length;x++){var z=this.defaultFonts[x];
-if("string"!==typeof z&&z.fontFamily==n&&z.fontUrl==d||"string"===typeof z&&z==n&&null==d)return!0}return!1};Menus.prototype.addCustomFont=function(n,d){null==n||this.containsFont(n,d)||(this.customFonts.push({name:n,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var k=Menus.prototype.init;Menus.prototype.init=function(){function n(q,u,J){d.editor.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),
-"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(G,H,g,p,C,I,M,O,Q,U,V,X,W){var Y=parseInt(G);!isNaN(Y)&&0<Y&&(d.exportImage(Y/100,H&&"png"==q,g,p,C&&"png"==q,M,!O,Q,q,V,null,X,W),null!=J&&J(G,H,g,p,C,I,M,O,Q,U,V,X,W))}),!0,u,q,!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(G,H,g,p,C){d.downloadFile(H&&"png"==q?"xmlpng":q,null,null,G,null,null,g,p,C)}),!1,!0)}k.apply(this,arguments);
-var d=this.editorUi,x=d.editor.graph,z=mxUtils.bind(x,x.isEnabled);"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(q){return"file"!=q}));d.actions.addAction("new...",function(){var q=d.isOffline(),u=new NewDialog(d,q,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(u.container,q?350:620,q?70:460,!0,!0,function(J){null!=d.sidebar&&d.sidebar.hideTooltip();J&&null==d.getCurrentFile()&&d.showSplash()});u.init()});Editor.enableChatGpt&&
-d.isExternalDataComms()&&"draw.io"==d.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(d.actions.put("generate",new Action("generate...",function(){d.openTemplateDialog("")})).isEnabled=z);d.actions.put("insertTemplate",new Action("template...",function(){d.openTemplateDialog()})).isEnabled=z;var y=d.actions.addAction("shareCursor",function(){d.setShareCursorPosition(!d.isShareCursorPosition())});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.isShareCursorPosition()});
-y=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.isShowRemoteCursors()});y=d.actions.addAction("points",function(){d.editor.graph.view.setUnit(mxConstants.POINTS)});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.POINTS});y=d.actions.addAction("inches",function(){d.editor.graph.view.setUnit(mxConstants.INCHES)});y.setToggleAction(!0);
-y.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.INCHES});y=d.actions.addAction("millimeters",function(){d.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.MILLIMETERS});y=d.actions.addAction("meters",function(){d.editor.graph.view.setUnit(mxConstants.METERS)});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});
-this.put("units",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,["points","inches","millimeters","meters"],u);"min"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme||d.menus.addMenuItems(q,["-","pageScale"],u)})));y=d.actions.addAction("pageTabs",function(){d.setTabContainerVisible(!d.isTabContainerVisible(),!0)});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.isTabContainerVisible()});y=d.actions.addAction("ruler",function(){d.setRulerVisible(!d.isRulerVisible())});
-y.setEnabled(Editor.canvasSupported&&9!=document.documentMode);y.setToggleAction(!0);y.setSelectedCallback(function(){return d.isRulerVisible()});y=d.actions.addAction("fullscreen",function(){if("1"==urlParams.embedInline)d.setInlineFullscreen(!Editor.inlineFullscreen);else{var q=mxUtils.isAncestorNode(document.body,d.container)?d.container:d.editor.graph.container;null!=q&&(null==document.fullscreenElement?(document.body.requestFullscreen(),q.classList.add("geFullscreen")):(document.exitFullscreen(),
-q.classList.remove("geFullscreen")))}});y.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;y.setToggleAction(!0);y.setSelectedCallback(function(){return"1"==urlParams.embedInline?Editor.inlineFullscreen:null!=document.fullscreenElement});y=d.actions.put("lightMode",new Action("light",function(q){d.setAndPersistDarkMode(!1)}));y.setToggleAction(!0);y.setSelectedCallback(function(){return!d.isAutoDarkMode(!0)&&!Editor.isDarkMode()});
-y=d.actions.put("darkMode",new Action("dark",function(q){d.setAndPersistDarkMode(!0)}));y.setToggleAction(!0);y.setSelectedCallback(function(){return!d.isAutoDarkMode(!0)&&Editor.isDarkMode()});y=d.actions.put("autoMode",new Action("automatic",function(q){d.setAndPersistDarkMode("auto")}));y.setToggleAction(!0);y.setSelectedCallback(function(){return d.isAutoDarkMode(!0)});d.actions.addAction("properties...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){q=new FilePropertiesDialog(d,q);
-d.showDialog(q.container,340,200,!0,!0);q.init()})}).isEnabled=z;window.mxFreehand&&(y=d.actions.put("insertFreehand",new Action("freehand...",function(){x.isEnabled()&&(null==d.freehandWindow&&(d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,180,126,!0)),x.freehand.isDrawing()?x.freehand.stopDrawing():x.freehand.startDrawing(),d.freehandWindow.window.setVisible(x.freehand.isDrawing()))},null,null,"X")),y.isEnabled=function(){return z()},y.setToggleAction(!0),y.setSelectedCallback(function(){return null!=
-d.freehandWindow&&d.freehandWindow.window.isVisible()}));d.actions.put("exportXml",new Action("formatXml...",function(){var q=document.createElement("div");q.style.whiteSpace="nowrap";var u=null==d.pages||1>=d.pages.length,J=document.createElement("h3");mxUtils.write(J,mxResources.get("formatXml"));J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(J);var G=d.addCheckbox(q,mxResources.get("selectionOnly"),!1,x.isSelectionEmpty()),H=d.addCheckbox(q,mxResources.get("compressed"),
-Editor.defaultCompressed),g=d.addCheckbox(q,mxResources.get("allPages"),!u,u);g.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});q=new CustomDialog(d,q,mxUtils.bind(this,function(){d.downloadFile("xml",!H.checked,null,!G.checked,u||!g.checked)}),null,mxResources.get("export"));d.showDialog(q.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action("url...",function(){d.showPublishLinkDialog(mxResources.get("url"),
-null,null,null,null,null,null,null,function(q,u,J,G,H,g,p,C,I,M,O,Q,U){p=[];G&&I&&p.push("tags=%7B%7D");q=new EmbedDialog(d,d.createLink(q,u,U,G,H,g,null,!0,p,null,J,null,Q));d.showDialog(q.container,450,270,!0,!0);q.init()},null,!0,!0)}));d.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){d.showHtmlDialog(mxResources.get("export"),null,q,function(u,J,G,H,g,p,C,I,M,O,Q,U){d.createHtml(u,J,G,H,g,p,C,I,M,O,Q,mxUtils.bind(this,function(V,
-X){var W=d.getBaseFilename(C);V='\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(W)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+X+"\n</body>\n</html>";d.saveData(W+(".drawio"==W.substring(W.lenth-7)?"":".drawio")+".html","html",V,"text/html")}),U)})})}));d.actions.put("exportPdf",new Action("formatPdf...",function(){d.showPrintDialog(mxResources.get("formatPdf"),EditorUi.isElectronApp||
-!d.isOffline()&&!d.printPdfExport?mxUtils.bind(this,function(q,u){q=null!=d.pages?d.pages.length:1;var J=null==d.pages||1>=d.pages.length,G=d.getPageIndex(d.currentPage);G=null!=G?G+1:1;d.downloadFile("pdf",null,null,!u.selection,J||!u.allPages&&u.pagesFrom==G&&u.pagesTo==G,!u.crop,u.transparent,u.scale,null,u.grid,u.includeCopy,u.allPages||u.pagesFrom==G&&u.pagesTo==G?null:{from:Math.max(0,Math.min(q-1,u.pagesFrom-1)),to:Math.max(0,Math.min(q-1,u.pagesTo-1))},u.border,u.fit,u.sheetsAcross,u.sheetsDown,
-u.shadows)}):null,mxResources.get("export"))}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function q(){null!=u&&u.removeDraft();d.fileLoaded(new LocalFile(d,d.emptyDiagramXml))}var u=d.getCurrentFile();null!=u&&u.isModified()?d.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){if(1==x.getSelectionCount()){var q=x.getSelectionCell(),
-u=x.view.getState(q);null!=u&&null!=u.shape&&null!=u.shape.stencil&&(q=new EditShapeDialog(d,q,mxResources.get("editShape")+":",630,400),d.showDialog(q.container,640,480,!0,!1),q.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(q,u){d.spinner.stop();q=new RevisionDialog(d,q,u);d.showDialog(q.container,640,480,!0,!0);q.init()}),mxUtils.bind(this,function(q){d.handleError(null!=
-q?q:mxResources.get("notAvailable"))})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");y=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");"none"==DrawioFile.SYNC&&(y.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var q=
-d.getCurrentFile();null!=q&&(window.drawdata=d.getFileData(),q=null!=q.getTitle()?q.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(q),null,!0))},null,null,null,navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown);"undefined"!==typeof MathJax&&(y=d.actions.addAction("mathematicalTypesetting",function(){var q=new ChangePageSetup(d);q.ignoreColor=!0;
-q.ignoreImage=!0;q.mathEnabled=!d.isMathEnabled();x.model.execute(q)}),y.setToggleAction(!0),y.setSelectedCallback(function(){return d.isMathEnabled()}),y.isEnabled=z);y=d.actions.put("defaultAdaptiveColors",new Action("defaultAdaptiveColors",function(){var q=new ChangePageSetup(d);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="default";x.model.execute(q)}));y.getTitle=function(){return mxResources.get("default")+" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())+")"};y.setToggleAction(!0);
-y.setSelectedCallback(function(){return null==x.adaptiveColors});y=d.actions.put("automaticAdaptiveColors",new Action("automatic",function(){var q=new ChangePageSetup(d);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="auto";x.model.execute(q)}));y.setToggleAction(!0);y.setSelectedCallback(function(){return"auto"==x.adaptiveColors});y=d.actions.put("simpleAdaptiveColors",new Action("simple",function(){var q=new ChangePageSetup(d);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="simple";x.model.execute(q)}));
-y.setToggleAction(!0);y.setSelectedCallback(function(){return"simple"==x.adaptiveColors});y=d.actions.put("noAdaptiveColors",new Action("none",function(){var q=new ChangePageSetup(d);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="none";x.model.execute(q)}));y.setToggleAction(!0);y.setSelectedCallback(function(){return"none"==x.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors",
-"noAdaptiveColors"],u)})));isLocalStorage&&(y=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());urlParams.splash=mxSettings.getShowStartScreen()?"1":"0";mxSettings.save()}),y.setToggleAction(!0),y.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var F=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});F.setToggleAction(!0);F.setSelectedCallback(function(){return F.isEnabled()&&
-d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var q=x.getSelectionCells(),u=[],J=0;J<q.length;J++)x.getModel().isVertex(q[J])&&u.push(q[J]);0<u.length&&(q=new EditGeometryDialog(d,u),d.showDialog(q.container,200,270,!0,!0),q.init())},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+M");d.actions.addAction("copyStyle",function(){if(x.isEnabled()&&1==x.getSelectionCount()){var q=x.getSelectionCell(),u=x.getCellStyle(q,!1);d.copiedStyle={};var J=[],G=[],H;for(H in u)J.push(u[H]),
-G.push(H);x.copyCellStyles([q],G,J,d.copiedStyle,d.copiedStyle,null,null,null,!0)}},null,null,Editor.altKey+"+C");d.actions.addAction("pasteStyle",function(){x.isEnabled()&&!x.isSelectionEmpty()&&null!=d.copiedStyle&&x.pasteCellStyles(x.includeDescendants(x.getSelectionCells()),d.copiedStyle,d.copiedStyle,!0)},null,null,Editor.altKey+"+V");d.actions.put("exportSvg",new Action("formatSvg...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",
-mxUtils.bind(this,function(q,u,J,G,H,g,p,C,I,M,O,Q,U,V){q=parseInt(q);d.lastExportSvgEditable=H;!isNaN(q)&&0<q&&d.exportSvg(q/100,u,J,G,H,g,p,!C,I,M,Q,U,V)}),!0,d.lastExportSvgEditable,"svg",!0)}));d.actions.put("exportPng",new Action("formatPng...",function(){n("png",d.lastExportPngEditable,function(q,u,J,G,H){d.lastExportPngEditable=H})}));d.actions.put("exportJpg",new Action("formatJpg...",function(){n("jpeg")}));d.actions.put("exportWebp",new Action("formatWebp...",function(){n("webp")}));y=d.actions.addAction("copyAsImage",
-mxUtils.bind(this,function(){var q=mxUtils.sortCells(x.model.getTopmostCells(x.getSelectionCells())),u=mxUtils.getXml(0==q.length?d.editor.getGraphXml():x.encodeCells(q));d.copyImage(q,u)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+X");y.visible=Editor.enableNativeClipboard&&d.editor.isExportToCanvas();y=d.actions.addAction("copyAsSvg",mxUtils.bind(this,function(){var q=mxUtils.sortCells(x.model.getTopmostCells(x.getSelectionCells())),u=mxUtils.getXml(0==q.length?d.editor.getGraphXml():x.encodeCells(q));
-d.copySvg(q,u)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+"+Editor.shiftKey+"+X");y.visible=Editor.enableNativeClipboard&&d.editor.isExportToCanvas();y=d.actions.put("shadowVisible",new Action("shadow",function(){x.setShadowVisible(!x.shadowVisible)}));y.setToggleAction(!0);y.setSelectedCallback(function(){return x.shadowVisible});d.actions.put("about",new Action("v"+EditorUi.VERSION,function(q,u){d.isOwnGDriveDomain()&&mxEvent.isShiftDown(u)&&("1"==urlParams.test?(EditorUi.debug("Debug output disabled"),
-urlParams.test="0"):(urlParams.test="1",EditorUi.debug("Debug output enabled")))}));d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("downloadDesktop...",function(){d.openLink("https://get.diagrams.net/")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},
-mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||navigator.standalone?d.openLink("https://app.diagrams.net/shortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?d.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});y=d.actions.addAction("tags",mxUtils.bind(this,
-function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");y.setToggleAction(!0);
-y.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModel||null==Editor.gptUrl||d.isOffline()||EditorUi.isElectronApp||(y=d.actions.addAction("chatWindowTitle",mxUtils.bind(this,function(){null==this.chatWindow?(this.chatWindow=new ChatWindow(d,220,document.body.offsetHeight-380,250,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("chat"))})),
-this.chatWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("chat"))):this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),y.setToggleAction(!0),y.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));y=d.actions.addAction("findReplace",mxUtils.bind(this,function(q,u){d.showSearchWindow(x.isEnabled()&&(null==u||!mxEvent.isShiftDown(u)))}),
-null,null,Editor.ctrlKey+"+F");y=new Action("exportVsdx",function(){var q=null==d.pages||1>=d.pages.length;if(q)d.exportVisio();else{var u=document.createElement("div");u.style.whiteSpace="nowrap";var J=document.createElement("h3");mxUtils.write(J,mxResources.get("formatVsdx"));J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(J);var G=d.addCheckbox(u,mxResources.get("allPages"),!q,q);G.style.marginBottom="16px";q=new CustomDialog(d,u,mxUtils.bind(this,
-function(){d.exportVisio(!G.checked)}),null,mxResources.get("export"));d.showDialog(q.container,300,130,!0,!0)}});y.getTitle=function(){return mxResources.get("formatVsdx")+" (beta)..."};d.actions.put("exportVsdx",y);isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",function(){var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginRight="8px";q.checked=mxSettings.getShowStartScreen();q.defaultChecked=q.checked;if(Editor.isSettingsEnabled()&&
-("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var u=document.createElement("span");u.style.display="flex";u.style.alignItems="center";u.style.cssFloat="right";u.style.cursor="pointer";u.style.userSelect="none";u.style.marginTop="-3px";u.appendChild(q);mxUtils.write(u,mxResources.get("showStartScreen"));mxEvent.addListener(u,"click",function(G){mxEvent.getSource(G)!=q&&(q.checked=!q.checked)});header=u}u=[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),
-function(){try{localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(G){d.handleError(G)}})}]];if(!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS){var J=d.actions.get("plugins");null==J||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||u.push([mxResources.get("plugins"),J.funct])}EditorUi.isElectronApp||u.push([mxResources.get("link"),function(G,H){if(0<H.value.length)try{var g=
-JSON.parse(H.value),p=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(g)),C=new EmbedDialog(d,p);d.showDialog(C.container,450,240,!0);C.init()}catch(I){d.handleError(I)}else d.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=d.getServiceName()&&"1"!=urlParams.embed&&u.push([mxResources.get("preferences"),function(){d.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),
-function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(G){d.handleError(G)}})}]])}]);d.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,u,q.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=q.parentNode&&(mxSettings.setShowStartScreen(q.checked),mxSettings.save())})});
-(mxClient.IS_CHROMEAPP||isLocalStorage)&&this.put("language",new Menu(mxUtils.bind(this,function(q,u){var J=mxLanguage;null==urlParams.lang&&isLocalStorage&&(J=mxSettings.settings.language);var G=mxUtils.bind(this,function(g){var p=""==g?mxResources.get("automatic"):mxLanguageMap[g],C=null;""!=p&&(C=q.addItem(p,null,mxUtils.bind(this,function(){d.setAndPersistLanguage(g)}),u),(g==J||""==g&&null==J)&&q.addCheckmark(C,Editor.checkmarkImage));return C});G("");q.addSeparator(u);for(var H in mxLanguageMap)G(H)})));
-d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){d.showCustomLayoutDialog(JSON.stringify(d.customLayoutConfig,null,2))});d.actions.put("adaptiveColors",new Action("adaptiveColors",function(q){null==d.adaptiveColorsWindow&&(d.adaptiveColorsWindow=new AdaptiveColorsWindow(d,document.body.offsetWidth-520,80,200,160));d.adaptiveColorsWindow.window.setVisible(!0)}));
-y=this.get("viewZoom");var N=y.funct;y.funct=mxUtils.bind(this,function(q,u){N.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","outline","fullscreen"],u)});y=this.get("layout");var K=y.funct;y.funct=function(q,u){K.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){var J=null,G=20,H=20,g=function(){"undefined"!==typeof mxOrgChartLayout&&null!=J&&d.tryAndHandle(mxUtils.bind(this,function(){var V=d.editor.graph,X=new mxOrgChartLayout(V,
-J,G,H),W=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&(W=V.getSelectionCell());X.execute(W)}))},p=document.createElement("div"),C=document.createElement("div");C.style.marginTop="6px";C.style.display="inline-block";C.style.width="180px";mxUtils.write(C,mxResources.get("orgChartType")+": ");p.appendChild(C);var I=document.createElement("select");I.style.width="160px";I.style.boxSizing="border-box";C=[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 M=0;M<C.length;M++){var O=document.createElement("option");mxUtils.write(O,C[M]);O.value=M;2==M&&O.setAttribute("selected","selected");I.appendChild(O)}mxEvent.addListener(I,"change",function(){J=I.value});p.appendChild(I);C=document.createElement("div");C.style.marginTop="6px";C.style.display="inline-block";C.style.width="180px";mxUtils.write(C,
-mxResources.get("parentChildSpacing")+": ");p.appendChild(C);var Q=document.createElement("input");Q.type="number";Q.value=G;Q.style.width="160px";Q.style.boxSizing="border-box";p.appendChild(Q);mxEvent.addListener(Q,"change",function(){G=Q.value});C=document.createElement("div");C.style.marginTop="6px";C.style.display="inline-block";C.style.width="180px";mxUtils.write(C,mxResources.get("siblingSpacing")+": ");p.appendChild(C);var U=document.createElement("input");U.type="number";U.value=H;U.style.width=
-"160px";U.style.boxSizing="border-box";p.appendChild(U);mxEvent.addListener(U,"change",function(){H=U.value});C=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(I.value),parentChildSpacing:parseInt(Q.value),siblingSpacing:parseInt(U.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(V,null,2))});C.className="geBtn";p=new CustomDialog(d,p,function(){null==J&&(J=2);d.loadOrgChartLayouts(g)},null,null,null,C);d.showDialog(p.container,
-355,140,!0,!0)},u,null,z());q.addSeparator(u);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){d.tryAndHandle(mxUtils.bind(this,function(){var J=new mxParallelEdgeLayout(x);J.checkOverlap=!0;d.prompt(mxResources.get("spacing"),J.spacing,mxUtils.bind(this,function(G){d.tryAndHandle(mxUtils.bind(this,function(){J.spacing=G;d.executeLayout(function(){J.execute(x.getDefaultParent(),x.isSelectionEmpty()?null:x.getSelectionCells())},!1)}))}))}))}),u);q.addSeparator(u);d.menus.addMenuItem(q,
-"runLayout",u,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,u){if(mxClient.IS_CHROMEAPP||!d.isOffline()&&!navigator.standalone){var J=q.addItem(mxResources.get("search")+":",null,null,u,null,null,!1);J.style.cursor="default";var G=document.createElement("input");G.setAttribute("type","text");G.setAttribute("size","25");G.style.borderWidth="1px";G.style.marginLeft="8px";mxEvent.addListener(G,"keydown",mxUtils.bind(this,function(H){var g=mxUtils.trim(G.value);
-13==H.keyCode&&0<g.length?(this.editorUi.searchHelp(g),G.value="",window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==H.keyCode&&(G.value="")}));J.firstChild.nextSibling.appendChild(G);mxEvent.addGestureListeners(G,function(H){document.activeElement!=G&&G.focus();mxEvent.consume(H)},function(H){mxEvent.consume(H)},function(H){mxEvent.consume(H)});window.setTimeout(function(){G.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.drawio.com")}),
-d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),d.actions.put("desktopZoomIn",new Action("zoomIn",function(){d.desktopZoomIn()})),d.actions.put("desktopZoomOut",new Action("zoomOut",function(){d.desktopZoomOut()})),d.actions.put("desktopResetZoom",new Action("actualSize",function(){d.desktopResetZoom()})),this.addMenuItems(q,"- keyboardShortcuts quickStart website support -".split(" "),u),"1"!=urlParams.disableUpdate&&this.addMenuItems(q,["check4Updates","-"],u),this.addMenuItems(q,
-"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),u)):this.addMenuItems(q,"- keyboardShortcuts quickStart downloadDesktop support - about".split(" "),u)}else this.addMenuItems(q,["keyboardShortcuts","-","about"],u);"1"==urlParams.test&&(q.addSeparator(u),this.addSubmenu("testDevelop",q,u))})));d.actions.addAction("languageCode...",function(){var q=new FilenameDialog(d,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(u){null!=u&&(Graph.diagramLanguage=
-0<u.length?u:null,Graph.translateDiagram=!0,x.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");d.showDialog(q.container,340,80,!0,!0);q.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,["languageCode","-"],u);u=q.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;x.refresh()},u);Graph.translateDiagram||q.addCheckmark(u,Editor.checkmarkImage)})));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("testChecksum=Checksum");mxResources.parse("testCheckPages=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");
-mxResources.parse("testPerformance=Performance");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!x.isSelectionEmpty()){var q=x.cloneCells(x.getSelectionCells()),u=x.getBoundingBoxFromGeometry(q,!0);q=x.moveCells(q,-u.x,-u.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+u.width+", "+u.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(x.encodeCells(q)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function q(p){return null==
-p||null==p.boundingBox||!isNaN(p.boundingBox.x)&&!isNaN(p.boundingBox.y)&&!isNaN(p.boundingBox.width)&&!isNaN(p.boundingBox.height)}var u=x.isSelectionEmpty()?x.getGraphBounds():x.getBoundingBox(x.getSelectionCells()),J=x.view.translate,G=x.view.scale;x.insertVertex(x.getDefaultParent(),null,"",u.x/G-J.x,u.y/G-J.y,u.width/G,u.height/G,"fillColor=none;strokeColor=red;");var H=0,g=0;x.view.states.visit(function(p,C){p=!0;q(C.shape)||(console.log("invalid shape",C.cell.id,C.shape),p=!1);q(C.text)||(console.log("invalid text",
-C.cell.id,C.text),p=!1);p||H++;g++});console.log("states checked",g,"invalid",H)}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";q=new TextareaDialog(d,"Paste Data:",q,function(u){if(0<u.length)try{var J=function(C){function I(aa){if(null==Z[aa]){if(Z[aa]=!0,null!=Q[aa]){for(;0<Q[aa].length;){var ha=Q[aa].pop();I(ha)}delete Q[aa]}}else mxLog.debug(M+": Visited: "+aa)}var M=C.parentNode.id,
-O=C.childNodes;C={};for(var Q={},U=null,V={},X=0;X<O.length;X++){var W=O[X];if(null!=W.id&&0<W.id.length)if(null==C[W.id]){C[W.id]=W.id;var Y=W.getAttribute("parent");null==Y?null!=U?mxLog.debug(M+": Multiple roots: "+W.id):U=W.id:(null==Q[Y]&&(Q[Y]=[]),Q[Y].push(W.id))}else V[W.id]=W.id}O=Object.keys(V);0<O.length?(O=M+": "+O.length+" Duplicates: "+O.join(", "),mxLog.debug(O+" (see console)")):mxLog.debug(M+": Checked");var Z={};null==U?mxLog.debug(M+": No root"):(I(U),Object.keys(Z).length!=Object.keys(C).length&&
-(mxLog.debug(M+": Invalid tree: (see console)"),console.log(M+": Invalid tree",Q)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var G=mxUtils.parseXml(u),H=d.getPagesForNode(G.documentElement,"mxGraphModel");if(null!=H&&0<H.length)try{var g=d.getHashValueForPages(H);mxLog.debug("Checksum: ",g)}catch(C){mxLog.debug("Error: ",C.message)}else mxLog.debug("No pages found for checksum");var p=G.getElementsByTagName("root");for(u=0;u<p.length;u++)J(p[u]);
-mxLog.show()}catch(C){d.handleError(C),null!=window.console&&console.error(C)}});d.showDialog(q.container,620,460,!0,!0);q.init()}));var L=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var q=new TextareaDialog(d,"Diff/Sync:","",function(u){var J=d.getCurrentFile();if(0<u.length&&null!=J)try{var G=JSON.parse(u);J.patch([G],null,!0,!0);d.hideDialog()}catch(H){d.handleError(H)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,J){L=d.getPagesForXml(d.getFileData(!0));
-q.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(L)}],["Diff",function(u,J){try{q.textarea.value=JSON.stringify(d.diffPages(L,d.pages),null,2)}catch(G){d.handleError(G)}}]]);null==L?(L=d.getPagesForXml(d.getFileData(!0)),q.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(L)):q.textarea.value=JSON.stringify(d.diffPages(L,d.pages),null,2);d.showDialog(q.container,620,460,!0,!0);q.init()}else d.alert("No pages")}));
-d.actions.addAction("testChecksum",mxUtils.bind(this,function(){var q=d.getCurrentFile();null!=d.pages&&null!=q?d.spinner.spin(document.body,mxResources.get("loading"))&&q.getLatestVersion(function(u){d.spinner.stop();var J=d.getHashValueForPages(d.pages),G=q.getCurrentRevisionId(),H=d.getHashValueForPages(u.getShadowPages()),g=u.getDescriptorChecksum(u.getDescriptor()),p=u.getCurrentRevisionId();console.log("Local File",[q],"modified",q.isModified(),"checksum",J);console.log("Remote File",[u],"rev",
-p==G,"desc",g==H,"checksum",H);d.alert("Checksums "+(H==J?"match":"no not match"))},function(u){console.log("Error getLatestVersion",u);d.handleError(u)}):console.log("Checksum: no file or pages")}));d.actions.addAction("testCheckPages",mxUtils.bind(this,function(){var q=d.getCurrentFile();console.log("editorUi",d,"file",q);if(null!=q&&q.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(q.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(q.theirPages));console.log("diff ownPages/theirPages",
-d.diffPages(q.ownPages,q.theirPages));var u=q.getShadowPages();null!=u&&(console.log("Checksum shadowPages",d.getHashValueForPages(u)),console.log("diff shadowPages/ownPages",d.diffPages(u,q.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(q.ownPages,u)),console.log("diff theirPages/shadowPages",d.diffPages(q.theirPages,u)));null!=q.sync&&null!=q.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(q.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(q.ownPages,
-q.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(q.theirPages,q.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(q.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(q.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(q.theirPages,d.pages)))}null!=q&&console.log("Shadow pages",[d.getXmlForPages(q.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));
-d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var q=d.getCurrentFile();null!=q&&q.isRealtime()&&null!=q.shadowPages&&(console.log("patching actualPages to shadowPages",q.patch([d.diffPages(q.shadowPages,d.pages)])),q.ownPages=d.clonePages(d.pages),q.theirPages=d.clonePages(d.pages),q.shadowPages=d.clonePages(d.pages),null!=q.sync&&(q.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){x.model.beginUpdate();
-try{var q=x.model.cells,u=0,J=[],G=[],H;for(H in q){var g=q[H],p=x.getCurrentCellStyle(g)[mxConstants.STYLE_IMAGE];null!=p&&"data:"==p.substring(0,5)&&(null==J[p]&&(J[p]=(J[p]||0)+1,u++),G.push(g))}x.setCellStyles(mxConstants.STYLE_IMAGE,null,G);console.log("Removed",u,"image(s) from",G.length,"cell(s): ",[G,J])}finally{x.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,x.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var q=
-new mxImageExport,u=x.getGraphBounds(),J=x.view.scale,G=mxUtils.createXmlDocument(),H=G.createElement("output");G.appendChild(H);G=new mxXmlCanvas2D(H);G.translate(Math.floor((1-u.x)/J),Math.floor((1-u.y)/J));G.scale(1/J);var g=0,p=G.save;G.save=function(){g++;p.apply(this,arguments)};var C=G.restore;G.restore=function(){g--;C.apply(this,arguments)};var I=q.drawShape;q.drawShape=function(M){mxLog.debug("entering shape",M,g);I.apply(this,arguments);mxLog.debug("leaving shape",M,g)};q.drawState(x.getView().getState(x.model.root),
-G);mxLog.show();mxLog.debug(mxUtils.getXml(H));mxLog.debug("stateCounter",g)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var c=null,f=null,l=null,m=null,t=null,v=null,B=null,E=null;d.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=c?(x.view.revalidate=c,c=null):(c=x.view.revalidate,x.view.revalidate=function(){var q=Date.now(),u=c.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",
-[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=f?(d.selectPage=f,f=null):(f=d.selectPage,d.selectPage=function(){var q=Date.now(),u=f.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=l?(d.diffPages=l,l=null):(l=d.diffPages,d.diffPages=function(){var q=Date.now(),u=l.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-q+" ms","args",arguments);
-return u});null!=m?(d.patchPages=m,m=null):(m=d.patchPages,d.patchPages=function(){var q=Date.now(),u=m.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=t?(d.clonePages=t,t=null):(t=d.clonePages,d.clonePages=function(){var q=Date.now(),u=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=B?(d.getHashValueForPages=B,
-B=null):(B=d.getHashValueForPages,d.getHashValueForPages=function(){var q=Date.now(),u=B.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=E?(d.resolveCrossReferences=E,E=null):(E=d.resolveCrossReferences,d.resolveCrossReferences=function(){var q=Date.now(),u=E.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-q+" ms","args",arguments);return u});
-null!=v?(d.getFileData=v,v=null):(v=d.getFileData,d.getFileData=function(){var q=Date.now(),u=v.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",[this],"time",Date.now()-q+" ms","args",arguments);return u});EditorUi.debug("[Performance]",null!=c?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),
-u);var J=q.addItem(mxResources.get("testPerformance"),null,function(){d.actions.get("testPerformance").funct()},u);null!=c&&q.addCheckmark(J,Editor.checkmarkImage);this.addMenuItems(q,["-","testShowConsole"],u)})))}d.actions.put("shapes",new Action("moreShapes...",function(q){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?
-300:280:260,!0,!0)}));d.actions.put("createShape",new Action("shape...",function(q){x.isEnabled()&&(q=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),q.vertex=!0,q=new EditShapeDialog(d,q,mxResources.get("editShape")+":",630,400),d.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=z;d.isOffline()||("1"!=urlParams.embed&&(d.actions.put("embedNotion",new Action("notion...",function(){var q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";
-q.style.textAlign="center";q.style.width="100%";q.style.left="0px";var u=document.createElement("a");u.setAttribute("href","javascript:void(0);");u.setAttribute("target","_blank");u.style.cursor="pointer";mxUtils.write(u,mxResources.get("getNotionChromeExtension"));q.appendChild(u);mxUtils.setPrefixedStyle(u.style,"transition","all 1s ease");mxUtils.setOpacity(u,0);window.setTimeout(function(){mxUtils.setOpacity(u,100)},300);mxEvent.addListener(u,"click",function(J){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
-mxEvent.consume(J)});d.getPublicUrl(d.getCurrentFile(),function(J){d.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",q,J,d.getCurrentFile(),function(G,H,g,p,C,I,M,O,Q,U,V,X){M=["border=0"];Q&&M.push("tags=%7B%7D");G=new EmbedDialog(d,d.createLink(G,H,!0,p,C,I,"public"==U?J:null,null,M,null,g,null,X));d.showDialog(G.container,450,240,!0,!0);G.init()},null,!0)})})),d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")})),
-d.actions.put("embedHtml",new Action("html...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){d.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",q,function(u,J,G,H,g,p,C,I,M,O,Q,U){d.createHtml(u,J,G,H,g,p,C,I,M,O,Q,mxUtils.bind(this,function(V,X){var W=new EmbedDialog(d,"\x3c!-- "+d.editor.appName+" diagram --\x3e\n"+V+"\n"+X+"\n",null,null,function(){try{var Y=window.open();if(null!=Y&&null!=Y.document){var Z=Y.document;"CSS1Compat"===document.compatMode&&
-Z.writeln("<!DOCTYPE html>");Z.writeln("<html>");Z.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Z.writeln("<body>");Z.writeln(V);var aa=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;aa&&Z.writeln(X);Z.writeln("</body>");Z.writeln("</html>");Z.close();if(!aa){var ha=Y.document.createElement("div");ha.marginLeft="26px";ha.marginTop="26px";mxUtils.write(ha,mxResources.get("updatingDocument"));var ea=Y.document.createElement("img");
-ea.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ea.style.marginLeft="6px";ha.appendChild(ea);Y.document.body.insertBefore(ha,Y.document.body.firstChild);window.setTimeout(function(){var da=document.createElement("script");da.type="text/javascript";da.src=/<script.*?src="(.*?)"/.exec(X)[1];Z.body.appendChild(da);ha.parentNode.removeChild(ha)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})}catch(da){d.handleError(da)}});
-d.showDialog(W.container,450,240,!0,!0);W.init()}),U)})})})),d.actions.put("liveImage",new Action("Live image...",function(){var q=d.getCurrentFile();null!=q&&d.getPublicUrl(q,function(u){null!=u?(u=new EmbedDialog(d,'<img src="'+(q.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+q.getId())+'"/>'),d.showDialog(u.container,450,240,!0,!0),u.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})})),d.actions.put("embedImage",new Action("image...",function(){d.showEmbedImageDialog(function(q,
-u,J,G,H,g){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(q,u,J,G,H,g,function(p){d.spinner.stop();p=new EmbedDialog(d,p);d.showDialog(p.container,450,240,!0,!0);p.init()},function(p){d.spinner.stop();d.handleError(p)})},mxResources.get("image"),mxResources.get("retina"),d.editor.isExportToCanvas())})),d.actions.put("embedSvg",new Action("formatSvg...",function(){d.showEmbedImageDialog(function(q,u,J,G,H,g){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(q,
-u,J,G,H,g,function(p){d.spinner.stop();p=new EmbedDialog(d,p);d.showDialog(p.container,450,240,!0,!0);p.init()},function(p){d.spinner.stop();d.handleError(p)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")})),d.actions.put("embedIframe",new Action("iframe...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){var u=x.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,u.height/x.view.scale))+
-2,null,null,null,q,d.getCurrentFile(),function(J,G,H,g,p,C,I,M,O,Q,U,V){var X=[];O&&X.push("tags=%7B%7D");J=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+I+";height:"+M+';" src="'+d.createLink(J,G,!0,g,p,C,"public"==Q?q:null,null,X,null,H,U,V)+'"'+(U?' allowtransparency="true"':"")+"></iframe>");d.showDialog(J.container,450,240,!0,!0);J.init()},!0,!0)})})));d.actions.put("publishLink",new Action("link...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){d.showPublishLinkDialog(null,
-null,null,null,null,null,q,d.getCurrentFile(),function(u,J,G,H,g,p,C,I,M,O,Q,U){C=[];H&&M&&C.push("tags=%7B%7D");u=new EmbedDialog(d,d.createLink(u,J,!0,H,g,p,"public"==O?q:null,null,C,null,G,null,U));d.showDialog(u.container,450,240,!0,!0);u.init()},null,!0)})},null,null,null,!d.isOffline()));if(isLocalStorage||mxClient.IS_CHROMEAPP)y=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),y.setToggleAction(!0),y.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&
-d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&(y=d.actions.addAction("highContrast",function(){d.setAndPersistHighContrast(!d.isHighContrast())}),y.setToggleAction(!0),y.setSelectedCallback(function(){return d.isHighContrast()}));y=d.actions.addAction("search",function(){if(null!=d.sidebar){var q=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",
-!q);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!q,mxSettings.save())}});y.label=mxResources.get("searchShapes");y.setToggleAction(!0);y.setSelectedCallback(function(){return null!=d.sidebar&&d.sidebar.isEntryVisible("search")});d.actions.get("clearDefaultStyle").funct=function(q){x.isEnabled()&&(d.clearDefaultStyle(),Editor.sketchMode&&d.setSketchMode(!1))};"1"==urlParams.embed&&(d.actions.get("saveAs").setEnabled(!1),d.actions.get("save").funct=function(q){x.isEditing()&&x.stopEditing();
-var u="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var J=d.createLoadMessage("save");J.xml=u;!0!==q||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(J.exit=!0);u=JSON.stringify(J)}(window.opener||window.parent).postMessage(u,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.clearStatus());q=d.getCurrentFile();null==q||q.constructor==EmbedFile||q.constructor==LocalFile&&
+Menus.prototype.removeCustomFont=function(n,d){for(var v=0;v<this.customFonts.length;v++)if(this.customFonts[v].name==n&&this.customFonts[v].url==d){this.customFonts.splice(v,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(n,d){for(var v=0;v<this.customFonts.length;v++)if(this.customFonts[v].name==n&&this.customFonts[v].url==d)return!0;for(v=0;v<this.defaultFonts.length;v++){var A=this.defaultFonts[v];
+if("string"!==typeof A&&A.fontFamily==n&&A.fontUrl==d||"string"===typeof A&&A==n&&null==d)return!0}return!1};Menus.prototype.addCustomFont=function(n,d){null==n||this.containsFont(n,d)||(this.customFonts.push({name:n,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var l=Menus.prototype.init;Menus.prototype.init=function(){function n(q,u,I){d.editor.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),
+"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(G,H,g,p,B,K,M,N,R,T,V,X,W){var Y=parseInt(G);!isNaN(Y)&&0<Y&&(d.exportImage(Y/100,H&&"png"==q,g,p,B&&"png"==q,M,!N,R,q,V,null,X,W),null!=I&&I(G,H,g,p,B,K,M,N,R,T,V,X,W))}),!0,u,q,!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(G,H,g,p,B){d.downloadFile(H&&"png"==q?"xmlpng":q,null,null,G,null,null,g,p,B)}),!1,!0)}l.apply(this,arguments);
+var d=this.editorUi,v=d.editor.graph,A=mxUtils.bind(v,v.isEnabled);"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(q){return"file"!=q}));d.actions.addAction("new...",function(){var q=d.isOffline(),u=new NewDialog(d,q,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(u.container,q?350:620,q?70:460,!0,!0,function(I){null!=d.sidebar&&d.sidebar.hideTooltip();I&&null==d.getCurrentFile()&&d.showSplash()});u.init()});if(Editor.enableChatGpt&&
+d.isExternalDataComms()&&"draw.io"==d.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var z=d.actions.put("generate",new Action("generate",function(){null!=d.chatWindow?d.chatWindow.window.setVisible(!d.chatWindow.window.isVisible()):d.openGenerateDialog("")}));z.isEnabled=function(){return A()};z.setToggleAction(!0);z.setSelectedCallback(function(){return null!=d.chatWindow&&d.chatWindow.window.isVisible()})}d.actions.put("insertTemplate",new Action("template...",
+function(){d.openTemplateDialog()})).isEnabled=A;z=d.actions.addAction("shareCursor",function(){d.setShareCursorPosition(!d.isShareCursorPosition())});z.setToggleAction(!0);z.setSelectedCallback(function(){return d.isShareCursorPosition()});z=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});z.setToggleAction(!0);z.setSelectedCallback(function(){return d.isShowRemoteCursors()});z=d.actions.addAction("points",function(){d.editor.graph.view.setUnit(mxConstants.POINTS)});
+z.setToggleAction(!0);z.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.POINTS});z=d.actions.addAction("inches",function(){d.editor.graph.view.setUnit(mxConstants.INCHES)});z.setToggleAction(!0);z.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.INCHES});z=d.actions.addAction("millimeters",function(){d.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});z.setToggleAction(!0);z.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.MILLIMETERS});
+z=d.actions.addAction("meters",function(){d.editor.graph.view.setUnit(mxConstants.METERS)});z.setToggleAction(!0);z.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,["points","inches","millimeters","meters"],u);"min"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme||d.menus.addMenuItems(q,["-","pageScale"],u)})));z=d.actions.addAction("pageTabs",function(){d.setTabContainerVisible(!d.isTabContainerVisible(),
+!0)});z.setToggleAction(!0);z.setSelectedCallback(function(){return d.isTabContainerVisible()});z=d.actions.addAction("ruler",function(){d.setRulerVisible(!d.isRulerVisible())});z.setEnabled(Editor.canvasSupported&&9!=document.documentMode);z.setToggleAction(!0);z.setSelectedCallback(function(){return d.isRulerVisible()});z=d.actions.addAction("fullscreen",function(){if("1"==urlParams.embedInline)d.setInlineFullscreen(!Editor.inlineFullscreen);else{var q=mxUtils.isAncestorNode(document.body,d.container)?
+d.container:d.editor.graph.container;null!=q&&(null==document.fullscreenElement?(document.body.requestFullscreen(),q.classList.add("geFullscreen")):(document.exitFullscreen(),q.classList.remove("geFullscreen")))}});z.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;z.setToggleAction(!0);z.setSelectedCallback(function(){return"1"==urlParams.embedInline?Editor.inlineFullscreen:null!=document.fullscreenElement});z=d.actions.put("lightMode",
+new Action("light",function(q){d.setAndPersistDarkMode(!1)}));z.setToggleAction(!0);z.setSelectedCallback(function(){return!d.isAutoDarkMode(!0)&&!Editor.isDarkMode()});z=d.actions.put("darkMode",new Action("dark",function(q){d.setAndPersistDarkMode(!0)}));z.setToggleAction(!0);z.setSelectedCallback(function(){return!d.isAutoDarkMode(!0)&&Editor.isDarkMode()});z=d.actions.put("autoMode",new Action("automatic",function(q){d.setAndPersistDarkMode("auto")}));z.setToggleAction(!0);z.setSelectedCallback(function(){return d.isAutoDarkMode(!0)});
+d.actions.addAction("properties...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){q=new FilePropertiesDialog(d,q);d.showDialog(q.container,340,200,!0,!0);q.init()})}).isEnabled=A;window.mxFreehand&&(z=d.actions.put("insertFreehand",new Action("freehand...",function(){v.isEnabled()&&(null==d.freehandWindow&&(d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,180,126,!0)),v.freehand.isDrawing()?v.freehand.stopDrawing():v.freehand.startDrawing(),d.freehandWindow.window.setVisible(v.freehand.isDrawing()))},
+null,null,"X")),z.isEnabled=function(){return A()},z.setToggleAction(!0),z.setSelectedCallback(function(){return null!=d.freehandWindow&&d.freehandWindow.window.isVisible()}));d.actions.put("exportXml",new Action("formatXml...",function(){var q=document.createElement("div");q.style.whiteSpace="nowrap";var u=null==d.pages||1>=d.pages.length,I=document.createElement("h3");mxUtils.write(I,mxResources.get("formatXml"));I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(I);
+var G=d.addCheckbox(q,mxResources.get("selectionOnly"),!1,v.isSelectionEmpty()),H=d.addCheckbox(q,mxResources.get("compressed"),Editor.defaultCompressed),g=d.addCheckbox(q,mxResources.get("allPages"),!u,u);g.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});q=new CustomDialog(d,q,mxUtils.bind(this,function(){d.downloadFile("xml",!H.checked,null,!G.checked,u||!g.checked)}),null,mxResources.get("export"));
+d.showDialog(q.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action("url...",function(){d.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(q,u,I,G,H,g,p,B,K,M,N,R,T){p=[];G&&K&&p.push("tags=%7B%7D");q=new EmbedDialog(d,d.createLink(q,u,T,G,H,g,null,!0,p,null,I,null,R));d.showDialog(q.container,450,270,!0,!0);q.init()},null,!0,!0)}));d.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){d.getPublicUrl(d.getCurrentFile(),
+function(q){d.showHtmlDialog(mxResources.get("export"),null,q,function(u,I,G,H,g,p,B,K,M,N,R,T){d.createHtml(u,I,G,H,g,p,B,K,M,N,R,mxUtils.bind(this,function(V,X){var W=d.getBaseFilename(B);V='\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(W)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+X+"\n</body>\n</html>";d.saveData(W+(".drawio"==W.substring(W.lenth-7)?"":".drawio")+".html","html",
+V,"text/html")}),T)})})}));d.actions.put("exportPdf",new Action("formatPdf...",function(){d.showPrintDialog(mxResources.get("formatPdf"),EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport?mxUtils.bind(this,function(q,u){q=null!=d.pages?d.pages.length:1;var I=null==d.pages||1>=d.pages.length,G=d.getPageIndex(d.currentPage);G=null!=G?G+1:1;d.downloadFile("pdf",null,null,!u.selection,I||!u.allPages&&u.pagesFrom==G&&u.pagesTo==G,!u.crop,u.transparent,u.scale,null,u.grid,u.includeCopy,u.allPages||
+u.pagesFrom==G&&u.pagesTo==G?null:{from:Math.max(0,Math.min(q-1,u.pagesFrom-1)),to:Math.max(0,Math.min(q-1,u.pagesTo-1))},u.border,u.fit,u.sheetsAcross,u.sheetsDown,u.shadows)}):null,mxResources.get("export"))}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function q(){null!=u&&u.removeDraft();d.fileLoaded(new LocalFile(d,d.emptyDiagramXml))}var u=d.getCurrentFile();null!=u&&u.isModified()?d.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),
+mxResources.get("discardChanges")):q()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){if(1==v.getSelectionCount()){var q=v.getSelectionCell(),u=v.view.getState(q);null!=u&&null!=u.shape&&null!=u.shape.stencil&&(q=new EditShapeDialog(d,q,mxResources.get("editShape")),d.showDialog(q.container,640,480,!0,!1,null,null,null,new mxRectangle(0,0,300,200)),q.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&
+d.getRevisions(mxUtils.bind(this,function(q,u){d.spinner.stop();q=new RevisionDialog(d,q,u);d.showDialog(q.container,640,480,!0,!0);q.init()}),mxUtils.bind(this,function(q){d.handleError(null!=q?q:mxResources.get("notAvailable"))})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");z=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==
+DrawioFile.SYNC)},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");"none"==DrawioFile.SYNC&&(z.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var q=d.getCurrentFile();null!=q&&(window.drawdata=d.getFileData(),q=null!=q.getTitle()?q.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(q),null,!0))},null,null,null,navigator.onLine&&"1"!=
+urlParams.stealth&&"1"!=urlParams.lockdown);"undefined"!==typeof MathJax&&(z=d.actions.addAction("mathematicalTypesetting",function(){var q=new ChangePageSetup(d);q.ignoreColor=!0;q.ignoreImage=!0;q.mathEnabled=!d.isMathEnabled();v.model.execute(q)}),z.setToggleAction(!0),z.setSelectedCallback(function(){return d.isMathEnabled()}),z.isEnabled=A);z=d.actions.put("defaultAdaptiveColors",new Action("defaultAdaptiveColors",function(){var q=new ChangePageSetup(d);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors=
+"default";v.model.execute(q)}));z.getTitle=function(){return mxResources.get("default")+" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())+")"};z.setToggleAction(!0);z.setSelectedCallback(function(){return null==v.adaptiveColors});z=d.actions.put("automaticAdaptiveColors",new Action("automatic",function(){var q=new ChangePageSetup(d);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="auto";v.model.execute(q)}));z.setToggleAction(!0);z.setSelectedCallback(function(){return"auto"==v.adaptiveColors});
+z=d.actions.put("simpleAdaptiveColors",new Action("simple",function(){var q=new ChangePageSetup(d);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="simple";v.model.execute(q)}));z.setToggleAction(!0);z.setSelectedCallback(function(){return"simple"==v.adaptiveColors});z=d.actions.put("noAdaptiveColors",new Action("none",function(){var q=new ChangePageSetup(d);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="none";v.model.execute(q)}));z.setToggleAction(!0);z.setSelectedCallback(function(){return"none"==
+v.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],u)})));isLocalStorage&&(z=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());urlParams.splash=mxSettings.getShowStartScreen()?"1":"0";mxSettings.save()}),z.setToggleAction(!0),z.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));
+var D=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});D.setToggleAction(!0);D.setSelectedCallback(function(){return D.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var q=v.getSelectionCells(),u=[],I=0;I<q.length;I++)v.getModel().isVertex(q[I])&&u.push(q[I]);0<u.length&&(q=new EditGeometryDialog(d,u),d.showDialog(q.container,200,270,!0,!0),q.init())},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+M");d.actions.addAction("copyStyle",
+function(){if(v.isEnabled()&&1==v.getSelectionCount()){var q=v.getSelectionCell(),u=v.getCellStyle(q,!1);d.copiedStyle={};var I=[],G=[],H;for(H in u)I.push(u[H]),G.push(H);v.copyCellStyles([q],G,I,d.copiedStyle,d.copiedStyle,null,null,null,!0)}},null,null,Editor.altKey+"+C");d.actions.addAction("pasteStyle",function(){v.isEnabled()&&!v.isSelectionEmpty()&&null!=d.copiedStyle&&v.pasteCellStyles(v.includeDescendants(v.getSelectionCells()),d.copiedStyle,d.copiedStyle,!0)},null,null,Editor.altKey+"+V");
+d.actions.put("exportSvg",new Action("formatSvg...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(q,u,I,G,H,g,p,B,K,M,N,R,T,V){q=parseInt(q);d.lastExportSvgEditable=H;!isNaN(q)&&0<q&&d.exportSvg(q/100,u,I,G,H,g,p,!B,K,M,R,T,V)}),!0,d.lastExportSvgEditable,"svg",!0)}));d.actions.put("exportPng",new Action("formatPng...",function(){n("png",d.lastExportPngEditable,function(q,u,I,G,H){d.lastExportPngEditable=
+H})}));d.actions.put("exportJpg",new Action("formatJpg...",function(){n("jpeg")}));d.actions.put("exportWebp",new Action("formatWebp...",function(){n("webp")}));z=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var q=mxUtils.sortCells(v.model.getTopmostCells(v.getSelectionCells())),u=mxUtils.getXml(0==q.length?d.editor.getGraphXml():v.encodeCells(q));d.copyImage(q,u)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+X");z.visible=Editor.enableNativeClipboard&&d.editor.isExportToCanvas();
+z=d.actions.addAction("copyAsSvg",mxUtils.bind(this,function(){var q=mxUtils.sortCells(v.model.getTopmostCells(v.getSelectionCells())),u=mxUtils.getXml(0==q.length?d.editor.getGraphXml():v.encodeCells(q));d.copySvg(q,u)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+"+Editor.shiftKey+"+X");z.visible=Editor.enableNativeClipboard&&d.editor.isExportToCanvas();z=d.actions.put("shadowVisible",new Action("shadow",function(){v.setShadowVisible(!v.shadowVisible)}));z.setToggleAction(!0);z.setSelectedCallback(function(){return v.shadowVisible});
+d.actions.put("about",new Action("v"+EditorUi.VERSION,function(q,u){d.isOwnGDriveDomain()&&mxEvent.isShiftDown(u)&&("1"==urlParams.test?(EditorUi.debug("Debug output disabled"),urlParams.test="0"):(urlParams.test="1",EditorUi.debug("Debug output enabled")))}));d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("downloadDesktop...",
+function(){d.openLink("https://get.diagrams.net/")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||navigator.standalone?d.openLink("https://app.diagrams.net/shortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?
+d.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});z=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),
+d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");z.setToggleAction(!0);z.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModels||null==Editor.gptUrl||d.isOffline()||EditorUi.isElectronApp||(z=d.actions.addAction("generate",mxUtils.bind(this,function(){null==d.chatWindow?d.openGenerateDialog():d.chatWindow.window.setVisible(!d.chatWindow.window.isVisible())})),
+z.setToggleAction(!0),z.setSelectedCallback(mxUtils.bind(this,function(){return null!=d.chatWindow&&d.chatWindow.window.isVisible()})));z=d.actions.addAction("findReplace",mxUtils.bind(this,function(q,u){d.showSearchWindow(v.isEnabled()&&(null==u||!mxEvent.isShiftDown(u)))}),null,null,Editor.ctrlKey+"+F");z=new Action("exportVsdx",function(){var q=null==d.pages||1>=d.pages.length;if(q)d.exportVisio();else{var u=document.createElement("div");u.style.whiteSpace="nowrap";var I=document.createElement("h3");
+mxUtils.write(I,mxResources.get("formatVsdx"));I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(I);var G=d.addCheckbox(u,mxResources.get("allPages"),!q,q);G.style.marginBottom="16px";q=new CustomDialog(d,u,mxUtils.bind(this,function(){d.exportVisio(!G.checked)}),null,mxResources.get("export"));d.showDialog(q.container,300,130,!0,!0)}});z.getTitle=function(){return mxResources.get("formatVsdx")+" (beta)..."};d.actions.put("exportVsdx",z);isLocalStorage&&
+null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",function(){var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginRight="8px";q.checked=mxSettings.getShowStartScreen();q.defaultChecked=q.checked;if(Editor.isSettingsEnabled()&&("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var u=document.createElement("span");u.style.display="flex";u.style.alignItems="center";u.style.cssFloat="right";u.style.cursor=
+"pointer";u.style.userSelect="none";u.style.marginTop="-3px";u.appendChild(q);mxUtils.write(u,mxResources.get("showStartScreen"));mxEvent.addListener(u,"click",function(G){mxEvent.getSource(G)!=q&&(q.checked=!q.checked)});header=u}u=[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(G){d.handleError(G)}})}]];if(!d.isOfflineApp()&&isLocalStorage&&
+d.mode!=App.MODE_ATLAS){var I=d.actions.get("plugins");null==I||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||u.push([mxResources.get("plugins"),I.funct])}EditorUi.isElectronApp||u.push([mxResources.get("link"),function(G,H){if(0<H.value.length)try{var g=JSON.parse(H.value),p=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(g)),B=new EmbedDialog(d,p);d.showDialog(B.container,450,240,!0);B.init()}catch(K){d.handleError(K)}else d.handleError({message:mxResources.get("invalidInput")})}]);
+"atlassian"!=d.getServiceName()&&"1"!=urlParams.embed&&u.push([mxResources.get("preferences"),function(){d.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(G){d.handleError(G)}})}]])}]);d.showLocalStorageDialog(mxResources.get("configuration")+
+":",Editor.configurationKey,u,q.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=q.parentNode&&(mxSettings.setShowStartScreen(q.checked),mxSettings.save())})});(mxClient.IS_CHROMEAPP||isLocalStorage)&&this.put("language",new Menu(mxUtils.bind(this,function(q,u){var I=mxLanguage;null==urlParams.lang&&isLocalStorage&&(I=mxSettings.settings.language);var G=mxUtils.bind(this,function(g){var p=""==g?mxResources.get("automatic"):mxLanguageMap[g],B=null;""!=p&&(B=q.addItem(p,
+null,mxUtils.bind(this,function(){d.setAndPersistLanguage(g)}),u),(g==I||""==g&&null==I)&&q.addCheckmark(B,Editor.checkmarkImage));return B});G("");q.addSeparator(u);for(var H in mxLanguageMap)G(H)})));d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){d.showCustomLayoutDialog(JSON.stringify(d.customLayoutConfig,null,2))});d.actions.put("adaptiveColors",
+new Action("adaptiveColors",function(q){null==d.adaptiveColorsWindow&&(d.adaptiveColorsWindow=new AdaptiveColorsWindow(d,document.body.offsetWidth-520,80,200,160));d.adaptiveColorsWindow.window.setVisible(!0)}));z=this.get("viewZoom");var P=z.funct;z.funct=mxUtils.bind(this,function(q,u){P.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","outline","fullscreen"],u)});z=this.get("layout");var J=z.funct;z.funct=function(q,u){J.apply(this,arguments);
+q.addItem(mxResources.get("orgChart"),null,function(){var I=null,G=20,H=20,g=function(){"undefined"!==typeof mxOrgChartLayout&&null!=I&&d.tryAndHandle(mxUtils.bind(this,function(){var V=d.editor.graph,X=new mxOrgChartLayout(V,I,G,H),W=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&(W=V.getSelectionCell());X.execute(W)}))},p=document.createElement("div"),B=document.createElement("div");B.style.marginTop="6px";B.style.display="inline-block";B.style.width="180px";mxUtils.write(B,
+mxResources.get("orgChartType")+": ");p.appendChild(B);var K=document.createElement("select");K.style.width="160px";K.style.boxSizing="border-box";B=[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 M=0;M<B.length;M++){var N=document.createElement("option");mxUtils.write(N,B[M]);N.value=M;2==M&&N.setAttribute("selected",
+"selected");K.appendChild(N)}mxEvent.addListener(K,"change",function(){I=K.value});p.appendChild(K);B=document.createElement("div");B.style.marginTop="6px";B.style.display="inline-block";B.style.width="180px";mxUtils.write(B,mxResources.get("parentChildSpacing")+": ");p.appendChild(B);var R=document.createElement("input");R.type="number";R.value=G;R.style.width="160px";R.style.boxSizing="border-box";p.appendChild(R);mxEvent.addListener(R,"change",function(){G=R.value});B=document.createElement("div");
+B.style.marginTop="6px";B.style.display="inline-block";B.style.width="180px";mxUtils.write(B,mxResources.get("siblingSpacing")+": ");p.appendChild(B);var T=document.createElement("input");T.type="number";T.value=H;T.style.width="160px";T.style.boxSizing="border-box";p.appendChild(T);mxEvent.addListener(T,"change",function(){H=T.value});B=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(K.value),parentChildSpacing:parseInt(R.value),
+siblingSpacing:parseInt(T.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(V,null,2))});B.className="geBtn";p=new CustomDialog(d,p,function(){null==I&&(I=2);d.loadOrgChartLayouts(g)},null,null,null,B);d.showDialog(p.container,355,140,!0,!0)},u,null,A());q.addSeparator(u);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){d.tryAndHandle(mxUtils.bind(this,function(){var I=new mxParallelEdgeLayout(v);I.checkOverlap=!0;d.prompt(mxResources.get("spacing"),I.spacing,
+mxUtils.bind(this,function(G){d.tryAndHandle(mxUtils.bind(this,function(){I.spacing=G;d.executeLayout(function(){I.execute(v.getDefaultParent(),v.isSelectionEmpty()?null:v.getSelectionCells())},!1)}))}))}))}),u);q.addSeparator(u);d.menus.addMenuItem(q,"runLayout",u,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,u){if(mxClient.IS_CHROMEAPP||!d.isOffline()&&!navigator.standalone){var I=q.addItem(mxResources.get("search")+":",null,null,u,null,null,!1);
+I.style.cursor="default";var G=document.createElement("input");G.setAttribute("type","text");G.setAttribute("size","25");G.style.borderWidth="1px";G.style.marginLeft="8px";mxEvent.addListener(G,"keydown",mxUtils.bind(this,function(H){var g=mxUtils.trim(G.value);13==H.keyCode&&0<g.length?(this.editorUi.searchHelp(g),G.value="",window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==H.keyCode&&(G.value="")}));I.firstChild.nextSibling.appendChild(G);mxEvent.addGestureListeners(G,
+function(H){document.activeElement!=G&&G.focus();mxEvent.consume(H)},function(H){mxEvent.consume(H)},function(H){mxEvent.consume(H)});window.setTimeout(function(){G.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.drawio.com")}),d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),d.actions.put("desktopZoomIn",new Action("zoomIn",function(){d.desktopZoomIn()})),d.actions.put("desktopZoomOut",new Action("zoomOut",function(){d.desktopZoomOut()})),
+d.actions.put("desktopResetZoom",new Action("actualSize",function(){d.desktopResetZoom()})),this.addMenuItems(q,"- keyboardShortcuts quickStart website support -".split(" "),u),"1"!=urlParams.disableUpdate&&this.addMenuItems(q,["check4Updates","-"],u),this.addMenuItems(q,"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),u)):this.addMenuItems(q,"- keyboardShortcuts quickStart downloadDesktop support - about".split(" "),u)}else this.addMenuItems(q,["keyboardShortcuts",
+"-","about"],u);"1"==urlParams.test&&(q.addSeparator(u),this.addSubmenu("testDevelop",q,u))})));d.actions.addAction("languageCode...",function(){var q=new FilenameDialog(d,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(u){null!=u&&(Graph.diagramLanguage=0<u.length?u:null,Graph.translateDiagram=!0,v.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");d.showDialog(q.container,340,80,!0,!0);q.init()});this.put("diagramLanguage",
+new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,["languageCode","-"],u);u=q.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;v.refresh()},u);Graph.translateDiagram||q.addCheckmark(u,Editor.checkmarkImage)})));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("testChecksum=Checksum");mxResources.parse("testCheckPages=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");mxResources.parse("testPerformance=Performance");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!v.isSelectionEmpty()){var q=v.cloneCells(v.getSelectionCells()),
+u=v.getBoundingBoxFromGeometry(q,!0);q=v.moveCells(q,-u.x,-u.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+u.width+", "+u.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(v.encodeCells(q)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function q(p){return null==p||null==p.boundingBox||!isNaN(p.boundingBox.x)&&!isNaN(p.boundingBox.y)&&!isNaN(p.boundingBox.width)&&!isNaN(p.boundingBox.height)}var u=v.isSelectionEmpty()?v.getGraphBounds():
+v.getBoundingBox(v.getSelectionCells()),I=v.view.translate,G=v.view.scale;v.insertVertex(v.getDefaultParent(),null,"",u.x/G-I.x,u.y/G-I.y,u.width/G,u.height/G,"fillColor=none;strokeColor=red;");var H=0,g=0;v.view.states.visit(function(p,B){p=!0;q(B.shape)||(console.log("invalid shape",B.cell.id,B.shape),p=!1);q(B.text)||(console.log("invalid text",B.cell.id,B.text),p=!1);p||H++;g++});console.log("states checked",g,"invalid",H)}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=
+null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";q=new TextareaDialog(d,"Paste Data:",q,function(u){if(0<u.length)try{var I=function(B){function K(aa){if(null==Z[aa]){if(Z[aa]=!0,null!=R[aa]){for(;0<R[aa].length;){var la=R[aa].pop();K(la)}delete R[aa]}}else mxLog.debug(M+": Visited: "+aa)}var M=B.parentNode.id,N=B.childNodes;B={};for(var R={},T=null,V={},X=0;X<N.length;X++){var W=N[X];if(null!=W.id&&0<W.id.length)if(null==B[W.id]){B[W.id]=W.id;var Y=
+W.getAttribute("parent");null==Y?null!=T?mxLog.debug(M+": Multiple roots: "+W.id):T=W.id:(null==R[Y]&&(R[Y]=[]),R[Y].push(W.id))}else V[W.id]=W.id}N=Object.keys(V);0<N.length?(N=M+": "+N.length+" Duplicates: "+N.join(", "),mxLog.debug(N+" (see console)")):mxLog.debug(M+": Checked");var Z={};null==T?mxLog.debug(M+": No root"):(K(T),Object.keys(Z).length!=Object.keys(B).length&&(mxLog.debug(M+": Invalid tree: (see console)"),console.log(M+": Invalid tree",R)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),
+mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var G=mxUtils.parseXml(u),H=d.getPagesForNode(G.documentElement,"mxGraphModel");if(null!=H&&0<H.length)try{var g=d.getHashValueForPages(H);mxLog.debug("Checksum: ",g)}catch(B){mxLog.debug("Error: ",B.message)}else mxLog.debug("No pages found for checksum");var p=G.getElementsByTagName("root");for(u=0;u<p.length;u++)I(p[u]);mxLog.show()}catch(B){d.handleError(B),null!=window.console&&console.error(B)}});d.showDialog(q.container,
+620,460,!0,!0);q.init()}));var L=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var q=new TextareaDialog(d,"Diff/Sync:","",function(u){var I=d.getCurrentFile();if(0<u.length&&null!=I)try{var G=JSON.parse(u);I.patch([G],null,!0,!0);d.hideDialog()}catch(H){d.handleError(H)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,I){L=d.getPagesForXml(d.getFileData(!0));q.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+
+d.getHashValueForPages(L)}],["Diff",function(u,I){try{q.textarea.value=JSON.stringify(d.diffPages(L,d.pages),null,2)}catch(G){d.handleError(G)}}]]);null==L?(L=d.getPagesForXml(d.getFileData(!0)),q.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(L)):q.textarea.value=JSON.stringify(d.diffPages(L,d.pages),null,2);d.showDialog(q.container,620,460,!0,!0);q.init()}else d.alert("No pages")}));d.actions.addAction("testChecksum",mxUtils.bind(this,function(){var q=
+d.getCurrentFile();null!=d.pages&&null!=q?d.spinner.spin(document.body,mxResources.get("loading"))&&q.getLatestVersion(function(u){d.spinner.stop();var I=d.getHashValueForPages(d.pages),G=q.getCurrentRevisionId(),H=d.getHashValueForPages(u.getShadowPages()),g=u.getDescriptorChecksum(u.getDescriptor()),p=u.getCurrentRevisionId();console.log("Local File",[q],"modified",q.isModified(),"checksum",I);console.log("Remote File",[u],"rev",p==G,"desc",g==H,"checksum",H);d.alert("Checksums "+(H==I?"match":
+"no not match"))},function(u){console.log("Error getLatestVersion",u);d.handleError(u)}):console.log("Checksum: no file or pages")}));d.actions.addAction("testCheckPages",mxUtils.bind(this,function(){var q=d.getCurrentFile();console.log("editorUi",d,"file",q);if(null!=q&&q.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(q.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(q.theirPages));console.log("diff ownPages/theirPages",d.diffPages(q.ownPages,q.theirPages));
+var u=q.getShadowPages();null!=u&&(console.log("Checksum shadowPages",d.getHashValueForPages(u)),console.log("diff shadowPages/ownPages",d.diffPages(u,q.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(q.ownPages,u)),console.log("diff theirPages/shadowPages",d.diffPages(q.theirPages,u)));null!=q.sync&&null!=q.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(q.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(q.ownPages,q.sync.snapshot)),console.log("diff theirPages/snapshot",
+d.diffPages(q.theirPages,q.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(q.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(q.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(q.theirPages,d.pages)))}null!=q&&console.log("Shadow pages",[d.getXmlForPages(q.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",
+mxUtils.bind(this,function(){console.log("editorUi",d);var q=d.getCurrentFile();null!=q&&q.isRealtime()&&null!=q.shadowPages&&(console.log("patching actualPages to shadowPages",q.patch([d.diffPages(q.shadowPages,d.pages)])),q.ownPages=d.clonePages(d.pages),q.theirPages=d.clonePages(d.pages),q.shadowPages=d.clonePages(d.pages),null!=q.sync&&(q.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){v.model.beginUpdate();try{var q=v.model.cells,u=0,I=
+[],G=[],H;for(H in q){var g=q[H],p=v.getCurrentCellStyle(g)[mxConstants.STYLE_IMAGE];null!=p&&"data:"==p.substring(0,5)&&(null==I[p]&&(I[p]=(I[p]||0)+1,u++),G.push(g))}v.setCellStyles(mxConstants.STYLE_IMAGE,null,G);console.log("Removed",u,"image(s) from",G.length,"cell(s): ",[G,I])}finally{v.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,v.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var q=new mxImageExport,
+u=v.getGraphBounds(),I=v.view.scale,G=mxUtils.createXmlDocument(),H=G.createElement("output");G.appendChild(H);G=new mxXmlCanvas2D(H);G.translate(Math.floor((1-u.x)/I),Math.floor((1-u.y)/I));G.scale(1/I);var g=0,p=G.save;G.save=function(){g++;p.apply(this,arguments)};var B=G.restore;G.restore=function(){g--;B.apply(this,arguments)};var K=q.drawShape;q.drawShape=function(M){mxLog.debug("entering shape",M,g);K.apply(this,arguments);mxLog.debug("leaving shape",M,g)};q.drawState(v.getView().getState(v.model.root),
+G);mxLog.show();mxLog.debug(mxUtils.getXml(H));mxLog.debug("stateCounter",g)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var c=null,f=null,k=null,m=null,t=null,x=null,y=null,F=null;d.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=c?(v.view.revalidate=c,c=null):(c=v.view.revalidate,v.view.revalidate=function(){var q=Date.now(),u=c.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",
+[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=f?(d.selectPage=f,f=null):(f=d.selectPage,d.selectPage=function(){var q=Date.now(),u=f.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=k?(d.diffPages=k,k=null):(k=d.diffPages,d.diffPages=function(){var q=Date.now(),u=k.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-q+" ms","args",arguments);
+return u});null!=m?(d.patchPages=m,m=null):(m=d.patchPages,d.patchPages=function(){var q=Date.now(),u=m.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=t?(d.clonePages=t,t=null):(t=d.clonePages,d.clonePages=function(){var q=Date.now(),u=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=y?(d.getHashValueForPages=y,
+y=null):(y=d.getHashValueForPages,d.getHashValueForPages=function(){var q=Date.now(),u=y.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=F?(d.resolveCrossReferences=F,F=null):(F=d.resolveCrossReferences,d.resolveCrossReferences=function(){var q=Date.now(),u=F.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-q+" ms","args",arguments);return u});
+null!=x?(d.getFileData=x,x=null):(x=d.getFileData,d.getFileData=function(){var q=Date.now(),u=x.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",[this],"time",Date.now()-q+" ms","args",arguments);return u});EditorUi.debug("[Performance]",null!=c?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),
+u);var I=q.addItem(mxResources.get("testPerformance"),null,function(){d.actions.get("testPerformance").funct()},u);null!=c&&q.addCheckmark(I,Editor.checkmarkImage);this.addMenuItems(q,["-","testShowConsole"],u)})))}d.actions.put("shapes",new Action("moreShapes...",function(q){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?
+300:280:260,!0,!0)}));d.actions.put("createShape",new Action("shape...",function(q){v.isEnabled()&&(q=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),q.vertex=!0,q=new EditShapeDialog(d,q,mxResources.get("editShape")),d.showDialog(q.container,640,480,!0,!1,null,null,null,new mxRectangle(0,0,300,200)),q.init())})).isEnabled=A;d.isOffline()||("1"!=urlParams.embed&&(d.actions.put("embedNotion",new Action("notion...",function(){var q=document.createElement("div");q.style.position=
+"absolute";q.style.bottom="30px";q.style.textAlign="center";q.style.width="100%";q.style.left="0px";var u=document.createElement("a");u.setAttribute("href","javascript:void(0);");u.setAttribute("target","_blank");u.style.cursor="pointer";mxUtils.write(u,mxResources.get("getNotionChromeExtension"));q.appendChild(u);mxUtils.setPrefixedStyle(u.style,"transition","all 1s ease");mxUtils.setOpacity(u,0);window.setTimeout(function(){mxUtils.setOpacity(u,100)},300);mxEvent.addListener(u,"click",function(I){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
+mxEvent.consume(I)});d.getPublicUrl(d.getCurrentFile(),function(I){d.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",q,I,d.getCurrentFile(),function(G,H,g,p,B,K,M,N,R,T,V,X){M=["border=0"];R&&M.push("tags=%7B%7D");G=new EmbedDialog(d,d.createLink(G,H,!0,p,B,K,"public"==T?I:null,null,M,null,g,null,X));d.showDialog(G.container,450,240,!0,!0);G.init()},null,!0)})})),d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")})),
+d.actions.put("embedHtml",new Action("html...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){d.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",q,function(u,I,G,H,g,p,B,K,M,N,R,T){d.createHtml(u,I,G,H,g,p,B,K,M,N,R,mxUtils.bind(this,function(V,X){var W=new EmbedDialog(d,"\x3c!-- "+d.editor.appName+" diagram --\x3e\n"+V+"\n"+X+"\n",null,null,function(){try{var Y=window.open();if(null!=Y&&null!=Y.document){var Z=Y.document;"CSS1Compat"===document.compatMode&&
+Z.writeln("<!DOCTYPE html>");Z.writeln("<html>");Z.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Z.writeln("<body>");Z.writeln(V);var aa=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;aa&&Z.writeln(X);Z.writeln("</body>");Z.writeln("</html>");Z.close();if(!aa){var la=Y.document.createElement("div");la.marginLeft="26px";la.marginTop="26px";mxUtils.write(la,mxResources.get("updatingDocument"));var fa=Y.document.createElement("img");
+fa.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");fa.style.marginLeft="6px";la.appendChild(fa);Y.document.body.insertBefore(la,Y.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(X)[1];Z.body.appendChild(ca);la.parentNode.removeChild(la)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})}catch(ca){d.handleError(ca)}});
+d.showDialog(W.container,450,240,!0,!0);W.init()}),T)})})})),d.actions.put("liveImage",new Action("Live image...",function(){var q=d.getCurrentFile();null!=q&&d.getPublicUrl(q,function(u){null!=u?(u=new EmbedDialog(d,'<img src="'+(q.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+q.getId())+'"/>'),d.showDialog(u.container,450,240,!0,!0),u.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})})),d.actions.put("embedImage",new Action("image...",function(){d.showEmbedImageDialog(function(q,
+u,I,G,H,g){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(q,u,I,G,H,g,function(p){d.spinner.stop();p=new EmbedDialog(d,p);d.showDialog(p.container,450,240,!0,!0);p.init()},function(p){d.spinner.stop();d.handleError(p)})},mxResources.get("image"),mxResources.get("retina"),d.editor.isExportToCanvas())})),d.actions.put("embedSvg",new Action("formatSvg...",function(){d.showEmbedImageDialog(function(q,u,I,G,H,g){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(q,
+u,I,G,H,g,function(p){d.spinner.stop();p=new EmbedDialog(d,p);d.showDialog(p.container,450,240,!0,!0);p.init()},function(p){d.spinner.stop();d.handleError(p)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")})),d.actions.put("embedIframe",new Action("iframe...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){var u=v.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,u.height/v.view.scale))+
+2,null,null,null,q,d.getCurrentFile(),function(I,G,H,g,p,B,K,M,N,R,T,V){var X=[];N&&X.push("tags=%7B%7D");I=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+K+";height:"+M+';" src="'+d.createLink(I,G,!0,g,p,B,"public"==R?q:null,null,X,null,H,T,V)+'"'+(T?' allowtransparency="true"':"")+"></iframe>");d.showDialog(I.container,450,240,!0,!0);I.init()},!0,!0)})})));d.actions.put("publishLink",new Action("link...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){d.showPublishLinkDialog(null,
+null,null,null,null,null,q,d.getCurrentFile(),function(u,I,G,H,g,p,B,K,M,N,R,T){B=[];H&&M&&B.push("tags=%7B%7D");u=new EmbedDialog(d,d.createLink(u,I,!0,H,g,p,"public"==N?q:null,null,B,null,G,null,T));d.showDialog(u.container,450,240,!0,!0);u.init()},null,!0)})},null,null,null,!d.isOffline()));if(isLocalStorage||mxClient.IS_CHROMEAPP)z=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),z.setToggleAction(!0),z.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&
+d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&(z=d.actions.addAction("highContrast",function(){d.setAndPersistHighContrast(!d.isHighContrast())}),z.setToggleAction(!0),z.setSelectedCallback(function(){return d.isHighContrast()}));z=d.actions.addAction("search",function(){if(null!=d.sidebar){var q=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",
+!q);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!q,mxSettings.save())}});z.label=mxResources.get("searchShapes");z.setToggleAction(!0);z.setSelectedCallback(function(){return null!=d.sidebar&&d.sidebar.isEntryVisible("search")});d.actions.get("clearDefaultStyle").funct=function(q){v.isEnabled()&&(d.clearDefaultStyle(),Editor.sketchMode&&d.setSketchMode(!1))};"1"==urlParams.embed&&(d.actions.get("saveAs").setEnabled(!1),d.actions.get("save").funct=function(q){v.isEditing()&&v.stopEditing();
+var u="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var I=d.createLoadMessage("save");I.xml=u;!0!==q||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(I.exit=!0);u=JSON.stringify(I)}(window.opener||window.parent).postMessage(u,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.clearStatus());q=d.getCurrentFile();null==q||q.constructor==EmbedFile||q.constructor==LocalFile&&
null==q.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var q=function(){d.editor.modified=!1;var u="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):
"";(window.opener||window.parent).postMessage(u,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(q,u){d.editor.isExportToCanvas()?(this.addMenuItems(q,["exportPng"],u),Editor.jpgSupported&&this.addMenuItems(q,["exportJpg"],u),Editor.webpSupported&&this.addMenuItems(q,["exportWebp"],u)):d.isOffline()||
mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPng","exportJpg"],u);this.addMenuItems(q,["exportSvg","-"],u);d.isOffline()||d.printPdfExport?this.addMenuItems(q,["exportPdf"],u):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPdf"],u);!d.vsdxExportEnabled()||mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(q,["exportVsdx"],u);this.addMenuItems(q,["-","exportHtml","exportXml","exportUrl"],u);d.isOffline()||(q.addSeparator(u),
-this.addMenuItem(q,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||d.isOffline()||this.addMenuItems(q,["publishLink"],u);d.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||d.isOffline()||(q.addSeparator(u),d.menus.addSubmenu("embed",q,u))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,u){function J(g){g.pickFile(function(p){d.spinner.spin(document.body,
-mxResources.get("loading"))&&g.getFile(p,function(C){var I="data:image/"==C.getData().substring(0,11)?H(C.getTitle()):"text/xml";/\.svg$/i.test(C.getTitle())&&!d.editor.isDataSvg(C.getData())&&(C.setData(Editor.createSvgDataUri(C.getData())),I="image/svg+xml");G(C.getData(),I,C.getTitle())},function(C){d.handleError(C,null!=C?mxResources.get("errorLoadingFile"):null)},g==d.drive)},!0)}var G=mxUtils.bind(this,function(g,p,C){var I=x.view,M=x.getGraphBounds(),O=x.snap(Math.ceil(Math.max(0,M.x/I.scale-
-I.translate.x)+4*x.gridSize)),Q=x.snap(Math.ceil(Math.max(0,(M.y+M.height)/I.scale-I.translate.y)+4*x.gridSize));"data:image/"==g.substring(0,11)?d.loadImage(g,mxUtils.bind(this,function(U){var V=!0,X=mxUtils.bind(this,function(){d.resizeImage(U,g,mxUtils.bind(this,function(W,Y,Z){W=V?Math.min(1,Math.min(d.maxImageSize/Y,d.maxImageSize/Z)):1;d.importFile(g,p,O,Q,Math.round(Y*W),Math.round(Z*W),C,function(aa){d.spinner.stop();x.setSelectionCells(aa);x.scrollCellToVisible(x.getSelectionCell())})}),
-V)});g.length>d.resampleThreshold?d.confirmImageResize(function(W){V=W;X()}):X()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(g,p,O,Q,0,0,C,function(U){d.spinner.stop();x.setSelectionCells(U);x.scrollCellToVisible(x.getSelectionCell())})}),H=mxUtils.bind(this,function(g){var p="text/xml";/\.png$/i.test(g)?p="image/png":/\.jpe?g$/i.test(g)?p="image/jpg":/\.gif$/i.test(g)?p="image/gif":/\.pdf$/i.test(g)&&(p="application/pdf");return p});"undefined"!=
-typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){J(d.drive)},u):d.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){J(d.oneDrive)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){J(d.dropbox)},u):d.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);q.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){J(d.gitHub)},u);d.isModeReady(App.MODE_GITLAB)&&q.addItem(mxResources.get("gitlab")+"...",null,function(){J(d.gitLab)},
-u);d.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){J(d.trello)},u):d.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);q.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},u);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},u);d.isOffline()||
-(q.addSeparator(u),q.addItem(mxResources.get("url")+"...",null,function(){var g=new FilenameDialog(d,"",mxResources.get("import"),function(p){if(null!=p&&0<p.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var C=/(\.png)($|\?)/i.test(p)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(p),function(I){G(I,C,p)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==C)}},mxResources.get("url"));d.showDialog(g.container,
-300,80,!0,!0);g.init()},u))}))).isEnabled=z;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(q,u){var J=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&(750>J&&this.addSubmenu("viewZoom",q,u,mxResources.get("zoom")),460>J&&d.isPageMenuVisible()&&this.addSubmenu("pages",q,u),320>J&&this.addSubmenu("insert",q,u),360>J&&"1"!=urlParams.embed&&"draw.io"==d.getServiceName()&&this.addSubmenu("share",q,u))})));this.put("appearance",
-new Menu(mxUtils.bind(this,function(q,u){if(d.isAutoDarkModeSupported()){var J=d.menus.addMenuItem(q,"autoMode",u);null!=J&&J.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}this.addMenuItems(q,["lightMode","darkMode","-"],u);J=d.menus.addMenuItem(q,"highContrast",u);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(J,"https://github.com/jgraph/drawio/issues/4296")})));d.actions.addAction("addToScratchpad",
-function(q){x.isSelectionEmpty()||null==d.addSelectionToScratchpad||d.addSelectionToScratchpad(q)});d.actions.addAction("accounts...",function(){d.toggleUserPanel();d.userPanel.style.right="10px";d.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(q,u){var J="1"==urlParams.sketch?"sketch":mxSettings.getUi(),G=q.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},u),H=q.addItem(mxResources.get("classic"),null,function(){d.setCurrentTheme("kennedy")},
-u),g=!1;if("kennedy"==J||"dark"==J)q.addCheckmark(H,Editor.checkmarkImage),g=!0;for(var p=0;p<Editor.themes.length;p++)mxUtils.bind(this,function(C){H=q.addItem(mxResources.get("min"==C?"minimal":C),null,function(){d.setCurrentTheme(C)},u);J==C&&(q.addCheckmark(H,Editor.checkmarkImage),g=!0);"simple"==C&&q.addSeparator(u)})(Editor.themes[p]);g||q.addCheckmark(G,Editor.checkmarkImage)})));y=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var q=this.editorUi.getCurrentFile();
-if(null!=q)if(q.constructor==LocalFile&&null!=q.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(J,G){q.invalidFileHandle=null;q.fileHandle=J;q.title=G.name;q.desc=G;d.save(G.name)}),null,d.createFileSystemOptions(q.getTitle()));else{var u=null!=q.getTitle()?q.getTitle():this.editorUi.defaultFilename;u=new FilenameDialog(this.editorUi,u,mxResources.get("rename"),mxUtils.bind(this,function(J){null!=J&&0<J.length&&null!=q&&J!=q.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&
-q.rename(J,mxUtils.bind(this,function(G){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(G){this.editorUi.handleError(G,null!=G?mxResources.get("errorRenamingFile"):null)}))}),q.constructor==DriveFile||q.constructor==StorageFile?mxResources.get("diagramName"):null,function(J){if(null!=J&&0<J.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,FilenameDialog.filenameHelpLink,null,null,d.editor.fileExtensions);this.editorUi.showDialog(u.container,
-340,100,!0,!0);u.init()}}));y.isEnabled=function(){return this.enabled&&z.apply(this,arguments)};y.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(null!=q){var u=d.getCopyFilename(q);q.constructor==DriveFile?(u=new SaveDialog(d,u,mxUtils.bind(this,function(J,G,H){d.hideDialog();q.copyFile(mxUtils.bind(this,function(g){q.move(H,mxUtils.bind(this,function(p){d.spinner.stop()}),mxUtils.bind(this,function(p){d.handleError(p)}))}),
-mxUtils.bind(this,function(g){d.handleError(g)}),J.value)}),null,null,null,null,null,null,[App.MODE_GOOGLE],mxResources.get("ok")),d.showDialog(u.container,420,150,!0,!1,mxUtils.bind(this,function(){d.hideDialog()})),u.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),u)}}));y=new Action("openFolder",function(q,u){q=d.getCurrentFile();null!=q&&d.openLink(q.getFolderUrl())});y.getTitle=function(){return mxResources.get("openIt",[mxResources.get("folder")])+"..."};d.actions.put("openFolder",
-y);d.actions.addAction("openFile...",mxUtils.bind(this,function(){var q=d.getCurrentFile();null!=q&&d.openLink(q.getFileUrl())}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(q.getMode()==App.MODE_GOOGLE||q.getMode()==App.MODE_ONEDRIVE){var u=new SaveDialog(d,"",mxUtils.bind(this,function(J,G,H){d.hideDialog();d.spinner.spin(document.body,mxResources.get("moving"))&&q.move(H,mxUtils.bind(this,function(g){d.spinner.stop()}),mxUtils.bind(this,function(g){d.handleError(g)}))}),
+this.addMenuItem(q,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||d.isOffline()||this.addMenuItems(q,["publishLink"],u);d.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||d.isOffline()||(q.addSeparator(u),d.menus.addSubmenu("embed",q,u))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,u){function I(g){g.pickFile(function(p){d.spinner.spin(document.body,
+mxResources.get("loading"))&&g.getFile(p,function(B){var K="data:image/"==B.getData().substring(0,11)?H(B.getTitle()):"text/xml";/\.svg$/i.test(B.getTitle())&&!d.editor.isDataSvg(B.getData())&&(B.setData(Editor.createSvgDataUri(B.getData())),K="image/svg+xml");G(B.getData(),K,B.getTitle())},function(B){d.handleError(B,null!=B?mxResources.get("errorLoadingFile"):null)},g==d.drive)},!0)}var G=mxUtils.bind(this,function(g,p,B){var K=v.view,M=v.getGraphBounds(),N=v.snap(Math.ceil(Math.max(0,M.x/K.scale-
+K.translate.x)+4*v.gridSize)),R=v.snap(Math.ceil(Math.max(0,(M.y+M.height)/K.scale-K.translate.y)+4*v.gridSize));"data:image/"==g.substring(0,11)?d.loadImage(g,mxUtils.bind(this,function(T){var V=!0,X=mxUtils.bind(this,function(){d.resizeImage(T,g,mxUtils.bind(this,function(W,Y,Z){W=V?Math.min(1,Math.min(d.maxImageSize/Y,d.maxImageSize/Z)):1;d.importFile(g,p,N,R,Math.round(Y*W),Math.round(Z*W),B,function(aa){d.spinner.stop();v.setSelectionCells(aa);v.scrollCellToVisible(v.getSelectionCell())})}),
+V)});g.length>d.resampleThreshold?d.confirmImageResize(function(W){V=W;X()}):X()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(g,p,N,R,0,0,B,function(T){d.spinner.stop();v.setSelectionCells(T);v.scrollCellToVisible(v.getSelectionCell())})}),H=mxUtils.bind(this,function(g){var p="text/xml";/\.png$/i.test(g)?p="image/png":/\.jpe?g$/i.test(g)?p="image/jpg":/\.gif$/i.test(g)?p="image/gif":/\.pdf$/i.test(g)&&(p="application/pdf");return p});"undefined"!=
+typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){I(d.drive)},u):d.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){I(d.oneDrive)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){I(d.dropbox)},u):d.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);q.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){I(d.gitHub)},u);d.isModeReady(App.MODE_GITLAB)&&q.addItem(mxResources.get("gitlab")+"...",null,function(){I(d.gitLab)},
+u);d.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){I(d.trello)},u):d.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);q.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},u);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},u);d.isOffline()||
+(q.addSeparator(u),q.addItem(mxResources.get("url")+"...",null,function(){var g=new FilenameDialog(d,"",mxResources.get("import"),function(p){if(null!=p&&0<p.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var B=/(\.png)($|\?)/i.test(p)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(p),function(K){G(K,B,p)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==B)}},mxResources.get("url"));d.showDialog(g.container,
+300,80,!0,!0);g.init()},u))}))).isEnabled=A;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(q,u){var I=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&(750>I&&this.addSubmenu("viewZoom",q,u,mxResources.get("zoom")),460>I&&d.isPageMenuVisible()&&this.addSubmenu("pages",q,u),320>I&&this.addSubmenu("insert",q,u),360>I&&"1"!=urlParams.embed&&"draw.io"==d.getServiceName()&&this.addSubmenu("share",q,u))})));this.put("appearance",
+new Menu(mxUtils.bind(this,function(q,u){if(d.isAutoDarkModeSupported()){var I=d.menus.addMenuItem(q,"autoMode",u);null!=I&&I.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}this.addMenuItems(q,["lightMode","darkMode","-"],u);I=d.menus.addMenuItem(q,"highContrast",u);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(I,"https://github.com/jgraph/drawio/issues/4296")})));d.actions.addAction("addToScratchpad",
+function(q){v.isSelectionEmpty()||null==d.addSelectionToScratchpad||d.addSelectionToScratchpad(q)});d.actions.addAction("accounts...",function(){d.toggleUserPanel();d.userPanel.style.right="10px";d.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(q,u){var I="1"==urlParams.sketch?"sketch":mxSettings.getUi(),G=q.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},u),H=q.addItem(mxResources.get("classic"),null,function(){d.setCurrentTheme("kennedy")},
+u),g=!1;if("kennedy"==I||"dark"==I)q.addCheckmark(H,Editor.checkmarkImage),g=!0;for(var p=0;p<Editor.themes.length;p++)mxUtils.bind(this,function(B){H=q.addItem(mxResources.get("min"==B?"minimal":B),null,function(){d.setCurrentTheme(B)},u);I==B&&(q.addCheckmark(H,Editor.checkmarkImage),g=!0);"simple"==B&&q.addSeparator(u)})(Editor.themes[p]);g||q.addCheckmark(G,Editor.checkmarkImage)})));z=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var q=this.editorUi.getCurrentFile();
+if(null!=q)if(q.constructor==LocalFile&&null!=q.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(I,G){q.invalidFileHandle=null;q.fileHandle=I;q.title=G.name;q.desc=G;d.save(G.name)}),null,d.createFileSystemOptions(q.getTitle()));else{var u=null!=q.getTitle()?q.getTitle():this.editorUi.defaultFilename;u=new FilenameDialog(this.editorUi,u,mxResources.get("rename"),mxUtils.bind(this,function(I){null!=I&&0<I.length&&null!=q&&I!=q.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&
+q.rename(I,mxUtils.bind(this,function(G){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(G){this.editorUi.handleError(G,null!=G?mxResources.get("errorRenamingFile"):null)}))}),q.constructor==DriveFile||q.constructor==StorageFile?mxResources.get("diagramName"):null,function(I){if(null!=I&&0<I.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,FilenameDialog.filenameHelpLink,null,null,d.editor.fileExtensions);this.editorUi.showDialog(u.container,
+340,100,!0,!0);u.init()}}));z.isEnabled=function(){return this.enabled&&A.apply(this,arguments)};z.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(null!=q){var u=d.getCopyFilename(q);q.constructor==DriveFile?(u=new SaveDialog(d,u,mxUtils.bind(this,function(I,G,H){d.hideDialog();q.copyFile(mxUtils.bind(this,function(g){q.move(H,mxUtils.bind(this,function(p){d.spinner.stop()}),mxUtils.bind(this,function(p){d.handleError(p)}))}),
+mxUtils.bind(this,function(g){d.handleError(g)}),I.value)}),null,null,null,null,null,null,[App.MODE_GOOGLE],mxResources.get("ok")),d.showDialog(u.container,420,150,!0,!1,mxUtils.bind(this,function(){d.hideDialog()})),u.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),u)}}));z=new Action("openFolder",function(q,u){q=d.getCurrentFile();null!=q&&d.openLink(q.getFolderUrl())});z.getTitle=function(){return mxResources.get("openIt",[mxResources.get("folder")])+"..."};d.actions.put("openFolder",
+z);d.actions.addAction("openFile...",mxUtils.bind(this,function(){var q=d.getCurrentFile();null!=q&&d.openLink(q.getFileUrl())}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(q.getMode()==App.MODE_GOOGLE||q.getMode()==App.MODE_ONEDRIVE){var u=new SaveDialog(d,"",mxUtils.bind(this,function(I,G,H){d.hideDialog();d.spinner.spin(document.body,mxResources.get("moving"))&&q.move(H,mxUtils.bind(this,function(g){d.spinner.stop()}),mxUtils.bind(this,function(g){d.handleError(g)}))}),
null,null,null,null,null,q.getMode());d.showDialog(u.container,420,70,!0,!1,mxUtils.bind(this,function(){d.hideDialog()}));u.init()}}));this.put("publish",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,["publishLink","presentationMode"],u)})));EditorUi.isElectronApp||!d.isOwnGDriveDomain()||"draw.io"!=d.getServiceName()||navigator.standalone||d.actions.put("presentationMode",new Action("presentationMode...",function(){var q=null!=d.getCurrentFile()?d.getCurrentFile().getTitle():null;
-d.editor.editAsNew(d.getFileData(!0),q,!0,null!=d.currentPage?d.currentPage.getId():null)}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var q=d.getCurrentFile();null!=q&&q.share()}catch(u){d.handleError(u)}})).isEnabled=z;this.put("embed",new Menu(mxUtils.bind(this,function(q,u){var J=d.getCurrentFile();null==J||J.getMode()!=App.MODE_GOOGLE&&J.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(J.getTitle())||this.addMenuItems(q,["liveImage","-"],u);this.addMenuItems(q,
-["embedImage","embedSvg","-","embedHtml"],u);navigator.standalone||d.isOffline()||this.addMenuItems(q,["embedIframe"],u);this.addMenuItems(q,["-","microsoftOffice","-","embedNotion"],u)})));y=function(q){var u=mxResources.get(q)+"...";d.actions.put(q,new Action(u,function(J){if("fromText"==q||"formatSql"==q||"plantUml"==q||"mermaid"==q){var G=new ParseDialog(d,u,q);d.showDialog(G.container,640,420,!0,!1,null,null,null,new mxRectangle(0,0,440,280))}else G=new CreateGraphDialog(d,u,q),d.showDialog(G.container,
-620,420,!0,!1,function(H,g){if(g)return d.confirm(mxResources.get("areYouSure"),function(){d.hideDialog()}),!1;null!=G.graph&&(null!=G.graph.container.parentNode&&G.graph.container.parentNode.removeChild(G.graph.container),G.graph.destroy(),G.graph=null)});G.init()})).isEnabled=z};y("mermaid");y("horizontalFlow");y("verticalFlow");y("horizontalTree");y("verticalTree");y("radialTree");y("organic");y("circle");y("fromText");y("formatSql");("https://plant-aws.diagrams.net"!=window.PLANT_URL||EditorUi.enablePlantUml&&
-!d.isOffline())&&y("plantUml");var D=function(q){x.getModel().beginUpdate();try{q=x.addCell(q),x.fireEvent(new mxEventObject("cellsInserted","cells",[q])),x.model.isVertex(q)&&x.isAutoSizeCell(q)&&x.updateCellSize(q)}finally{x.getModel().endUpdate()}x.scrollCellToVisible(q);x.setSelectionCell(q);x.container.focus();x.editAfterInsert&&x.startEditing(q);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(x.view.getState(q))},0);return q},A=function(q,u,J,G,H){q=new mxCell(q,new mxGeometry(0,
-0,u,J),G);q.vertex=!0;null==H&&(H=x.getCenterInsertPoint(x.getBoundingBoxFromGeometry([q],!0)));q.geometry.x=H.x;q.geometry.y=H.y;return D(q)};d.actions.put("insertText",new Action("text",function(q){x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())&&x.startEditingAtCell(A("Text",60,30,x.appendFontSize(Editor.defaultTextStyle,x.vertexFontSize),null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint()))},null,null,"A")).isEnabled=z;d.actions.put("insertRectangle",
-new Action("rectangle",function(q){x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint())},null,null,"D")).isEnabled=z;d.actions.put("insertNote",new Action("note",function(q){x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())&&A("",140,160,"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;",
-null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint())},null,null,"S")).isEnabled=z;d.actions.put("insertEllipse",new Action("ellipse",function(q){x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint())},null,null,"F")).isEnabled=z;d.actions.put("insertRhombus",new Action("rhombus",function(q){x.isEnabled()&&
-!x.isCellLocked(x.getDefaultParent())&&A("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint())},null,null,"R")).isEnabled=z;d.actions.put("insertEdge",new Action("line",function(q){if(x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())){var u=x.defaultEdgeLength;q=null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint();null==q&&(q=x.getCenterInsertPoint(x.getBoundingBoxFromGeometry([J],
-!0)));var J=new mxCell("",new mxGeometry(0,0,u,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");J.geometry.setTerminalPoint(q,!0);J.geometry.setTerminalPoint(new mxPoint(q.x+J.geometry.width,q.y),!1);J.geometry.points=[];J.geometry.relative=!0;J.edge=!0;D(J)}},null,null,"C")).isEnabled=z;y=d.actions.put("toggleShapes",new Action("shapes",function(){null!=d.sidebarWindow?d.sidebarWindow.window.setVisible(!d.sidebarWindow.window.isVisible()):d.toggleShapesPanel(!d.isShapesPanelVisible())},
-null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+K"));y.setToggleAction(!0);y.setSelectedCallback(mxUtils.bind(this,function(){return null!=d.sidebarWindow&&d.sidebarWindow.window.isVisible()||null==d.sidebarWindow&&0<d.hsplitPosition}));this.put("insert",new Menu(mxUtils.bind(this,function(q,u){"sketch"==Editor.currentTheme?(d.menus.addMenuItems(q,["toggleShapes"],u),d.menus.addSubmenu("table",q,u),q.addSeparator(u),d.menus.addMenuItems(q,["insertImage","insertLink","-"],u),d.insertTemplateEnabled&&
+d.editor.editAsNew(d.getFileData(!0),q,!0,null!=d.currentPage?d.currentPage.getId():null)}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var q=d.getCurrentFile();null!=q&&q.share()}catch(u){d.handleError(u)}})).isEnabled=A;this.put("embed",new Menu(mxUtils.bind(this,function(q,u){var I=d.getCurrentFile();null==I||I.getMode()!=App.MODE_GOOGLE&&I.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(I.getTitle())||this.addMenuItems(q,["liveImage","-"],u);this.addMenuItems(q,
+["embedImage","embedSvg","-","embedHtml"],u);navigator.standalone||d.isOffline()||this.addMenuItems(q,["embedIframe"],u);this.addMenuItems(q,["-","microsoftOffice","-","embedNotion"],u)})));z=function(q){var u=mxResources.get(q)+"...";d.actions.put(q,new Action(u,function(I){if("fromText"==q||"formatSql"==q||"plantUml"==q||"mermaid"==q){var G=new ParseDialog(d,u,q);d.showDialog(G.container,640,420,!0,!1,null,null,null,new mxRectangle(0,0,440,280))}else G=new CreateGraphDialog(d,u,q),d.showDialog(G.container,
+620,420,!0,!1,function(H,g){if(g)return d.confirm(mxResources.get("areYouSure"),function(){d.hideDialog()}),!1;null!=G.graph&&(null!=G.graph.container.parentNode&&G.graph.container.parentNode.removeChild(G.graph.container),G.graph.destroy(),G.graph=null)});G.init()})).isEnabled=A};z("mermaid");z("horizontalFlow");z("verticalFlow");z("horizontalTree");z("verticalTree");z("radialTree");z("organic");z("circle");z("fromText");z("formatSql");("https://plant-aws.diagrams.net"!=window.PLANT_URL||EditorUi.enablePlantUml&&
+!d.isOffline())&&z("plantUml");var E=function(q){v.getModel().beginUpdate();try{q=v.addCell(q),v.fireEvent(new mxEventObject("cellsInserted","cells",[q])),v.model.isVertex(q)&&v.isAutoSizeCell(q)&&v.updateCellSize(q)}finally{v.getModel().endUpdate()}v.scrollCellToVisible(q);v.setSelectionCell(q);v.container.focus();v.editAfterInsert&&v.startEditing(q);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(v.view.getState(q))},0);return q},C=function(q,u,I,G,H){q=new mxCell(q,new mxGeometry(0,
+0,u,I),G);q.vertex=!0;null==H&&(H=v.getCenterInsertPoint(v.getBoundingBoxFromGeometry([q],!0)));q.geometry.x=H.x;q.geometry.y=H.y;return E(q)};d.actions.put("insertText",new Action("text",function(q){v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())&&v.startEditingAtCell(C("Text",60,30,v.appendFontSize(Editor.defaultTextStyle,v.vertexFontSize),null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!v.isMouseInsertPoint()?null:v.getInsertPoint()))},null,null,"A")).isEnabled=A;d.actions.put("insertRectangle",
+new Action("rectangle",function(q){v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())&&C("",120,60,"whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!v.isMouseInsertPoint()?null:v.getInsertPoint())},null,null,"D")).isEnabled=A;d.actions.put("insertNote",new Action("note",function(q){v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())&&C("",140,160,"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;",
+null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!v.isMouseInsertPoint()?null:v.getInsertPoint())},null,null,"S")).isEnabled=A;d.actions.put("insertEllipse",new Action("ellipse",function(q){v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())&&C("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!v.isMouseInsertPoint()?null:v.getInsertPoint())},null,null,"F")).isEnabled=A;d.actions.put("insertRhombus",new Action("rhombus",function(q){v.isEnabled()&&
+!v.isCellLocked(v.getDefaultParent())&&C("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!v.isMouseInsertPoint()?null:v.getInsertPoint())},null,null,"R")).isEnabled=A;d.actions.put("insertEdge",new Action("line",function(q){if(v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())){var u=v.defaultEdgeLength;q=null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!v.isMouseInsertPoint()?null:v.getInsertPoint();null==q&&(q=v.getCenterInsertPoint(v.getBoundingBoxFromGeometry([I],
+!0)));var I=new mxCell("",new mxGeometry(0,0,u,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");I.geometry.setTerminalPoint(q,!0);I.geometry.setTerminalPoint(new mxPoint(q.x+I.geometry.width,q.y),!1);I.geometry.points=[];I.geometry.relative=!0;I.edge=!0;E(I)}},null,null,"C")).isEnabled=A;z=d.actions.put("toggleShapes",new Action("shapes",function(){null!=d.sidebarWindow?d.sidebarWindow.window.setVisible(!d.sidebarWindow.window.isVisible()):d.toggleShapesPanel(!d.isShapesPanelVisible())},
+null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+K"));z.setToggleAction(!0);z.setSelectedCallback(mxUtils.bind(this,function(){return null!=d.sidebarWindow&&d.sidebarWindow.window.isVisible()||null==d.sidebarWindow&&0<d.hsplitPosition}));this.put("insert",new Menu(mxUtils.bind(this,function(q,u){"sketch"==Editor.currentTheme?(d.menus.addMenuItems(q,["toggleShapes"],u),d.menus.addSubmenu("table",q,u),q.addSeparator(u),d.menus.addMenuItems(q,["insertImage","insertLink","-"],u),d.insertTemplateEnabled&&
!d.isOffline()&&d.menus.addMenuItems(q,["insertTemplate"],u),d.menus.addMenuItems(q,["generate"],u),window.isMermaidEnabled&&d.menus.addMenuItems(q,["mermaid"],u),q.addSeparator(u),d.menus.addSubmenu("insertAdvanced",q,u,mxResources.get("advanced")),d.menus.addSubmenu("layout",q,u)):(this.addMenuItems(q,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),u),window.isMermaidEnabled&&this.addMenuItems(q,
["mermaid"],u),d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(q,["-","insertTemplate"],u),d.menus.addMenuItems(q,["generate","-"],u),"min"==uiTheme||"simple"==Editor.currentTheme?(this.addSubmenu("layout",q,u),this.addSubmenu("insertLayout",q,u,mxResources.get("insert")),q.addSeparator(u),this.addSubmenu("table",q,u)):this.addSubmenu("insertLayout",q,u,mxResources.get("layout")),this.addSubmenu("insertAdvanced",q,u,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,
-function(q,u){d.menus.addInsertTableCellItem(q,u)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),u)})));d.actions.put("csv",new Action(mxResources.get("csv")+"...",function(){x.popupMenuHandler.hideMenu();d.showImportCsvDialog()})).isEnabled=z;this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(q,u){var J=["fromText","plantUml","formatSql","csv"];EditorUi.enablePlantUml||
-J.splice(1,1);this.addMenuItems(q,J,u);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","createShape","editDiagram"],u)})));this.put("openRecent",new Menu(function(q,u){var J=d.getRecent();if(null!=J){for(var G=0;G<J.length;G++)(function(H){var g=H.mode;g==App.MODE_GOOGLE?g="googleDrive":g==App.MODE_ONEDRIVE&&(g="oneDrive");q.addItem(H.title+" ("+mxResources.get(g)+")",null,function(){d.loadFile(H.id)},u)})(J[G]);q.addSeparator(u)}q.addItem(mxResources.get("reset"),
+function(q,u){d.menus.addInsertTableCellItem(q,u)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),u)})));d.actions.put("csv",new Action(mxResources.get("csv")+"...",function(){v.popupMenuHandler.hideMenu();d.showImportCsvDialog()})).isEnabled=A;this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(q,u){var I=["fromText","plantUml","formatSql","csv"];EditorUi.enablePlantUml||
+I.splice(1,1);this.addMenuItems(q,I,u);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","createShape","editDiagram"],u)})));this.put("openRecent",new Menu(function(q,u){var I=d.getRecent();if(null!=I){for(var G=0;G<I.length;G++)(function(H){var g=H.mode;g==App.MODE_GOOGLE?g="googleDrive":g==App.MODE_ONEDRIVE&&(g="oneDrive");q.addItem(H.title+" ("+mxResources.get(g)+")",null,function(){d.loadFile(H.id)},u)})(I[G]);q.addSeparator(u)}q.addItem(mxResources.get("reset"),
null,function(){d.resetRecent()},u)}));this.put("openFrom",new Menu(function(q,u){null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},u):d.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+
" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},u):d.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);q.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},u);d.isModeReady(App.MODE_GITLAB)&&
q.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},u);d.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},u):d.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);q.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},u);"1"!=
-urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},u);d.isOffline()||(q.addSeparator(u),q.addItem(mxResources.get("url")+"...",null,function(){var J=new FilenameDialog(d,"",mxResources.get("open"),function(G){null!=G&&0<G.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(G):window.geOpenWindow((mxClient.IS_CHROMEAPP?"https://app.diagrams.net/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(G)))},
-mxResources.get("url"));d.showDialog(J.container,300,80,!0,!0);J.init()},u))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(q,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},u):d.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));
+urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},u);d.isOffline()||(q.addSeparator(u),q.addItem(mxResources.get("url")+"...",null,function(){var I=new FilenameDialog(d,"",mxResources.get("open"),function(G){null!=G&&0<G.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(G):window.geOpenWindow((mxClient.IS_CHROMEAPP?"https://app.diagrams.net/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(G)))},
+mxResources.get("url"));d.showDialog(I.container,300,80,!0,!0);I.init()},u))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(q,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},u):d.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));
d.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},u):d.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+
" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);q.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},u);d.isModeReady(App.MODE_GITLAB)&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},u);d.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,
null,null,null,App.MODE_TRELLO)},u):d.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);q.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},u);"1"==
urlParams.confLib&&q.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showLibraryDialog(null,null,null,null,"CONF_LIB")},u)})),this.put("openLibraryFrom",new Menu(function(q,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},u):d.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
u,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},u):d.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
"...)",null,function(){},u,null,!1);q.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},u);d.isModeReady(App.MODE_GITLAB)&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},u);d.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},u):d.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+
-mxResources.get("loading")+"...)",null,function(){},u,null,!1);q.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},u);d.isOffline()||(q.addSeparator(u),q.addItem(mxResources.get("url")+"...",null,function(){var J=new FilenameDialog(d,"",mxResources.get("open"),function(G){if(null!=G&&
+mxResources.get("loading")+"...)",null,function(){},u,null,!1);q.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},u);d.isOffline()||(q.addSeparator(u),q.addItem(mxResources.get("url")+"...",null,function(){var I=new FilenameDialog(d,"",mxResources.get("open"),function(G){if(null!=G&&
0<G.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var H=G;d.editor.isCorsEnabledForUrl(G)||(H=PROXY_URL+"?url="+encodeURIComponent(G));mxUtils.get(H,function(g){if(200<=g.getStatus()&&299>=g.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(d,g.getText(),G)),d.showSidebar()}catch(p){d.handleError(p,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},
-mxResources.get("url"));d.showDialog(J.container,300,80,!0,!0);J.init()},u));"1"==urlParams.confLib&&(q.addSeparator(u),q.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},u))})));this.put("edit",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,"undo redo - cut copy copyAsImage copyAsSvg paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-y=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var q=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(q);this.commentsWindow.refreshCommentsTime();q&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));y.setToggleAction(!0);y.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(q,u){var J=
-d.getCurrentFile();d.menus.addMenuItems(q,"toggleShapes format ruler - findReplace layers tags chatWindowTitle outline -".split(" "),u);d.commentsSupported()&&d.menus.addMenuItems(q,["-","comments"],u);null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&d.menus.addMenuItems(q,["-","showRemoteCursors","shareCursor"],u);d.menus.addMenuItems(q,["-","fullscreen"],u)};this.put("view",new Menu(mxUtils.bind(this,function(q,u){if("simple"==Editor.currentTheme){var J=d.getCurrentFile();d.menus.addMenuItems(q,
-["toggleShapes","format"],u);d.isPageMenuVisible()&&d.menus.addMenuItems(q,["pageTabs"],u);d.menus.addMenuItems(q,["ruler","-","search"],u);if(isLocalStorage||mxClient.IS_CHROMEAPP){var G=d.menus.addMenuItem(q,"scratchpad",u);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(G,"https://www.drawio.com/doc/faq/scratchpad")}d.menus.addMenuItems(q,"- findReplace layers tags chatWindowTitle outline -".split(" "),u);d.commentsSupported()&&d.menus.addMenuItems(q,["comments"],
-u);null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors"],u);this.addMenuItems(q,["-","fullscreen"],u)}else{this.addMenuItems(q,["format","outline","layers","tags","chatWindowTitle"].concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(q,["-","search"],u);if(isLocalStorage||mxClient.IS_CHROMEAPP)G=this.addMenuItem(q,"scratchpad",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.drawio.com/doc/faq/scratchpad");
+mxResources.get("url"));d.showDialog(I.container,300,80,!0,!0);I.init()},u));"1"==urlParams.confLib&&(q.addSeparator(u),q.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},u))})));this.put("edit",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,"undo redo - cut copy copyAsImage copyAsSvg paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry editConnectionPoints - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+z=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var q=!this.commentsWindow.window.isVisible();
+this.commentsWindow.window.setVisible(q);this.commentsWindow.refreshCommentsTime();q&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));z.setToggleAction(!0);z.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(q,u){var I=
+d.getCurrentFile();d.menus.addMenuItems(q,"toggleShapes format ruler - findReplace layers tags outline generate -".split(" "),u);d.commentsSupported()&&d.menus.addMenuItems(q,["-","comments"],u);null!=I&&I.isRealtimeEnabled()&&I.isRealtimeSupported()&&d.menus.addMenuItems(q,["-","showRemoteCursors","shareCursor"],u);d.menus.addMenuItems(q,["-","fullscreen"],u)};this.put("view",new Menu(mxUtils.bind(this,function(q,u){if("simple"==Editor.currentTheme){var I=d.getCurrentFile();d.menus.addMenuItems(q,
+["toggleShapes","format"],u);d.isPageMenuVisible()&&d.menus.addMenuItems(q,["pageTabs"],u);d.menus.addMenuItems(q,["ruler","-","search"],u);if(isLocalStorage||mxClient.IS_CHROMEAPP){var G=d.menus.addMenuItem(q,"scratchpad",u);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(G,"https://www.drawio.com/doc/faq/scratchpad")}d.menus.addMenuItems(q,"- findReplace layers tags outline generate -".split(" "),u);d.commentsSupported()&&d.menus.addMenuItems(q,["comments"],
+u);null!=I&&I.isRealtimeEnabled()&&I.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors"],u);this.addMenuItems(q,["-","fullscreen"],u)}else{this.addMenuItems(q,["format","outline","layers","tags","generate"].concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(q,["-","search"],u);if(isLocalStorage||mxClient.IS_CHROMEAPP)G=this.addMenuItem(q,"scratchpad",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.drawio.com/doc/faq/scratchpad");
this.addMenuItems(q,["toggleShapes","-","pageView","pageScale"]);this.addSubmenu("units",q,u);q.addSeparator(u);d.isPageMenuVisible()&&d.menus.addMenuItems(q,["pageTabs"],u);this.addMenuItems(q,"ruler - tooltips animations - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),u);"1"!=urlParams.sketch&&this.addMenuItems(q,["-","fullscreen"],u)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),
-u)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(q,u){var J=d.currentPage;null!=J&&(q.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){d.renamePage(J,J.getName())}),u),q.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){d.removePage(J)}),u),1<d.pages.length&&(d.menus.addSubmenu("movePage",q,u,mxResources.get("move")),q.addSeparator(u)),q.addSeparator(u),q.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){d.duplicatePage(J,
-mxResources.get("copyOf",[J.getName()]))}),u),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||q.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){d.editor.editAsNew(d.getFileData(!0,null,null,null,!0,!0))}),u)))})));this.put("pages",new Menu(mxUtils.bind(this,function(q,u){var J=d.currentPage;d.editor.graph.isLightboxView()||(q.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{d.insertPage()}catch(H){d.handleError(H)}}),
-u,null,d.editor.graph.isEnabled()),q.addSeparator(u));if(null!=d.pages)for(var G=0;G<d.pages.length;G++)mxUtils.bind(this,function(H){var g=null;g=d.pages[H]==J&&!d.editor.graph.isLightboxView()&&d.editor.graph.isEnabled()?d.menus.addSubmenu("currentPage",q,u,d.getShortPageName(J)):q.addItem(d.getShortPageName(d.pages[H]),null,mxUtils.bind(this,function(){d.selectPage(d.pages[H])}),u);var p=d.pages[H].getId();g.setAttribute("title",d.pages[H].getName()+" ("+(H+1)+"/"+d.pages.length+")"+(null!=p?" ["+
-p+"]":""));d.pages[H]==J&&q.addCheckmark(g,Editor.checkmarkImage)})(G)})));if(EditorUi.isElectronApp){var S="1"==urlParams.enableSpellCheck;y=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();S=!S;d.alert(mxResources.get("restartForChangeRequired"))});y.setToggleAction(!0);y.setSelectedCallback(function(){return S});var R="1"==urlParams.enableStoreBkp;y=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();R=!R});y.setToggleAction(!0);y.setSelectedCallback(function(){return R});
-var T="1"==urlParams.isGoogleFontsEnabled;y=d.actions.addAction("googleFonts",function(){d.toggleGoogleFonts();T=!T;d.alert(mxResources.get("restartForChangeRequired"))});y.setToggleAction(!0);y.setSelectedCallback(function(){return T});d.actions.addAction("openDevTools",function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var q=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=
-1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),mxSettings.save())}),mxResources.get("draftSaveInt"));d.showDialog(q.container,320,80,!0,!0);q.init()})}var P=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(q,u){if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){null==P||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",q,u);"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||
-"1"==urlParams.embedInline||d.menus.addSubmenu("appearance",q,u);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",q,u);q.addSeparator(u);d.menus.addSubmenu("units",q,u);d.menus.addMenuItems(q,"- copyConnect collapseExpand - tooltips animations -".split(" "),u);var J=d.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors"],u),d.menus.addMenuItems(q,["ruler","-"],
+u)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(q,u){var I=d.currentPage;null!=I&&(q.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){d.renamePage(I,I.getName())}),u),q.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){d.removePage(I)}),u),1<d.pages.length&&(d.menus.addSubmenu("movePage",q,u,mxResources.get("move")),q.addSeparator(u)),q.addSeparator(u),q.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){d.duplicatePage(I,
+mxResources.get("copyOf",[I.getName()]))}),u),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||q.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){d.editor.editAsNew(d.getFileData(!0,null,null,null,!0,!0))}),u)))})));this.put("pages",new Menu(mxUtils.bind(this,function(q,u){var I=d.currentPage;d.editor.graph.isLightboxView()||(q.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{d.insertPage()}catch(H){d.handleError(H)}}),
+u,null,d.editor.graph.isEnabled()),q.addSeparator(u));if(null!=d.pages)for(var G=0;G<d.pages.length;G++)mxUtils.bind(this,function(H){var g=null;g=d.pages[H]==I&&!d.editor.graph.isLightboxView()&&d.editor.graph.isEnabled()?d.menus.addSubmenu("currentPage",q,u,d.getShortPageName(I)):q.addItem(d.getShortPageName(d.pages[H]),null,mxUtils.bind(this,function(){d.selectPage(d.pages[H])}),u);var p=d.pages[H].getId();g.setAttribute("title",d.pages[H].getName()+" ("+(H+1)+"/"+d.pages.length+")"+(null!=p?" ["+
+p+"]":""));d.pages[H]==I&&q.addCheckmark(g,Editor.checkmarkImage)})(G)})));if(EditorUi.isElectronApp){var S="1"==urlParams.enableSpellCheck;z=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();S=!S;d.alert(mxResources.get("restartForChangeRequired"))});z.setToggleAction(!0);z.setSelectedCallback(function(){return S});var U="1"==urlParams.enableStoreBkp;z=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();U=!U});z.setToggleAction(!0);z.setSelectedCallback(function(){return U});
+var Q="1"==urlParams.isGoogleFontsEnabled;z=d.actions.addAction("googleFonts",function(){d.toggleGoogleFonts();Q=!Q;d.alert(mxResources.get("restartForChangeRequired"))});z.setToggleAction(!0);z.setSelectedCallback(function(){return Q});d.actions.addAction("openDevTools",function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var q=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=
+1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),mxSettings.save())}),mxResources.get("draftSaveInt"));d.showDialog(q.container,320,80,!0,!0);q.init()})}var O=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(q,u){if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){null==O||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",q,u);"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||
+"1"==urlParams.embedInline||d.menus.addSubmenu("appearance",q,u);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",q,u);q.addSeparator(u);d.menus.addSubmenu("units",q,u);d.menus.addMenuItems(q,"- copyConnect collapseExpand - tooltips animations -".split(" "),u);var I=d.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=I&&I.isRealtimeEnabled()&&I.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors"],u),d.menus.addMenuItems(q,["ruler","-"],
u));EditorUi.isElectronApp&&d.menus.addMenuItems(q,"- googleFonts spellCheck autoBkp drafts -".split(" "),u);this.addSubmenu("diagramLanguage",q,u);q.addSeparator(u);d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(q,"configuration",u);q.addSeparator(u)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",q,u),"1"==urlParams.embed&&"1"!=urlParams.atlas||d.menus.addSubmenu("appearance",q,u),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",
-q,u),EditorUi.isElectronApp&&this.addMenuItems(q,"- googleFonts spellCheck autoBkp drafts -".split(" "),u),q.addSeparator(u),J=this.addSubmenu("adaptiveColors",q,u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(J,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(J=this.addMenuItem(q,"mathematicalTypesetting",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/math-typesetting")),
-"1"!=urlParams.embed&&(J=d.getCurrentFile(),null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(q,["-","showRemoteCursors","shareCursor"],u),q.addSeparator(u),(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(q,["showStartScreen"],u),this.addMenuItems(q,["autosave"],u)),this.addMenuItems(q,["-","copyConnect","collapseExpand","-"],u),this.addSubmenu("diagramLanguage",q,u),this.addMenuItems(q,["editDiagram","-"],u),!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(q,
-"plugins",u),this.addMenuItems(q,["configuration"],u)})));this.put("movePage",new Menu(mxUtils.bind(this,function(q,u){var J=d.currentPage,G=d.getPageIndex(J);if(null!=d.pages)for(var H=0;H<d.pages.length;H++)H!=G&&function(g){q.addItem(d.getShortPageName(d.pages[g]),null,function(){d.movePage(G,g);d.scrollToPage(J,!0)},u)}(H)})));this.put("share",new Menu(mxUtils.bind(this,function(q,u){if(!d.isStandaloneApp()){var J=d.isOffline(!0)?mxResources.get("offline"):d.getNetworkStatus();null!=J&&(q.addItem(J,
-null,null,u,null,!1),q.addSeparator(u));d.menus.addMenuItems(q,["share"],u)}this.addMenuItem(q,"publishLink",u,null,null,mxResources.get("publish")+"...");EditorUi.isElectronApp||!d.isOwnGDriveDomain()||"draw.io"!=d.getServiceName()||navigator.standalone||this.addMenuItem(q,"presentationMode",u);null!=d.getMainUser()&&this.addMenuItems(q,["accounts"],u)})));this.put("diagram",new Menu(mxUtils.bind(this,function(q,u){var J=d.getCurrentFile();"simple"!=Editor.currentTheme&&(d.menus.addSubmenu("extras",
+q,u),EditorUi.isElectronApp&&this.addMenuItems(q,"- googleFonts spellCheck autoBkp drafts -".split(" "),u),q.addSeparator(u),I=this.addSubmenu("adaptiveColors",q,u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(I,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(I=this.addMenuItem(q,"mathematicalTypesetting",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(I,"https://www.drawio.com/doc/faq/math-typesetting")),
+"1"!=urlParams.embed&&(I=d.getCurrentFile(),null!=I&&I.isRealtimeEnabled()&&I.isRealtimeSupported()&&this.addMenuItems(q,["-","showRemoteCursors","shareCursor"],u),q.addSeparator(u),(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(q,["showStartScreen"],u),this.addMenuItems(q,["autosave"],u)),this.addMenuItems(q,["-","copyConnect","collapseExpand","-"],u),this.addSubmenu("diagramLanguage",q,u),this.addMenuItems(q,["editDiagram","-"],u),!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(q,
+"plugins",u),this.addMenuItems(q,["configuration"],u)})));this.put("movePage",new Menu(mxUtils.bind(this,function(q,u){var I=d.currentPage,G=d.getPageIndex(I);if(null!=d.pages)for(var H=0;H<d.pages.length;H++)H!=G&&function(g){q.addItem(d.getShortPageName(d.pages[g]),null,function(){d.movePage(G,g);d.scrollToPage(I,!0)},u)}(H)})));this.put("share",new Menu(mxUtils.bind(this,function(q,u){if(!d.isStandaloneApp()){var I=d.isOffline(!0)?mxResources.get("offline"):d.getNetworkStatus();null!=I&&(q.addItem(I,
+null,null,u,null,!1),q.addSeparator(u));d.menus.addMenuItems(q,["share"],u)}this.addMenuItem(q,"publishLink",u,null,null,mxResources.get("publish")+"...");EditorUi.isElectronApp||!d.isOwnGDriveDomain()||"draw.io"!=d.getServiceName()||navigator.standalone||this.addMenuItem(q,"presentationMode",u);null!=d.getMainUser()&&this.addMenuItems(q,["accounts"],u)})));this.put("diagram",new Menu(mxUtils.bind(this,function(q,u){var I=d.getCurrentFile();"simple"!=Editor.currentTheme&&(d.menus.addSubmenu("extras",
q,u,mxResources.get("settings")),q.addSeparator(u));var G="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)d.menus.addMenuItems(q,["new","open"],u),d.menus.addSubmenu("openRecent",q,u),d.menus.addMenuItems(q,"- synchronize properties - save saveAs -".split(" "),u);else if(d.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(q,["-","save"],u);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&
-"0"!=urlParams.saveAndExit||d.mode==App.MODE_ATLAS)d.menus.addMenuItems(q,["saveAndExit"],u),null!=J&&J.isRevisionHistorySupported()&&d.menus.addMenuItems(q,["revisionHistory"],u);q.addSeparator(u)}else d.mode==App.MODE_ATLAS?d.menus.addMenuItems(q,["save","synchronize","-"],u):"1"!=urlParams.noFileMenu&&(d.menus.addSubmenu("file",q,u),q.addSeparator(u),"min"==Editor.currentTheme&&(d.menus.addMenuItems(q,"toggleShapes format layers tags chatWindowTitle - findReplace".split(" "),u),d.commentsSupported()&&
-d.menus.addMenuItems(q,["comments"],u),q.addSeparator(u)));d.menus.addSubmenu("exportAs",q,u);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"atlassian"==d.getServiceName()?d.menus.addMenuItems(q,["import"],u):"1"!=urlParams.noFileMenu&&d.menus.addSubmenu("importFrom",q,u);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme?(d.menus.addMenuItems(q,["-","findReplace"],u),d.commentsSupported()&&d.menus.addMenuItems(q,["comments","-"],u),d.menus.addMenuItems(q,"toggleShapes format layers tags chatWindowTitle -".split(" "),
-u),d.menus.addMenuItems(q,["pageSetup"],u)):"min"!=Editor.currentTheme&&(this.addMenuItems(q,["-"],u),this.addSubmenu("newLibrary",q,u),this.addSubmenu("openLibraryFrom",q,u));q.addSeparator(u);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(q,["print"],u);G||"min"==Editor.currentTheme||null==J||null==d.fileNode||"1"==urlParams.embedInline||(G=null!=J.getTitle()?J.getTitle():d.defaultFilename,/(\.html)$/i.test(G)||this.addMenuItems(q,["-","properties"]));q.addSeparator(u);
-"simple"==Editor.currentTheme&&(d.menus.addSubmenu("extras",q,u,mxResources.get("settings")),q.addSeparator(u));d.menus.addSubmenu("help",q,u);q.addSeparator(u);"1"==urlParams.embed&&("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(q,["save"],u),"1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(d.menus.addMenuItems(q,["saveAndExit"],u),null!=J&&J.isRevisionHistorySupported()&&d.menus.addMenuItems(q,["revisionHistory"],u));"1"!=urlParams.embed&&
-d.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&d.mode!=App.MODE_ATLAS||d.menus.addMenuItems(q,["exit"],u);"1"!=urlParams.embed&&null!=J&&"undefined"==typeof AtlasFile&&d.menus.addMenuItems(q,["-","close"],u)})));this.put("save",new Menu(mxUtils.bind(this,function(q,u){var J=d.getCurrentFile();null==J||J.constructor!=DriveFile&&J.constructor!=OneDriveFile?(d.menus.addMenuItems(q,["save","saveAs","-","rename"],u),this.addMenuItems(q,[d.isOfflineApp()?"upload":"makeCopy"],u)):d.menus.addMenuItems(q,
-["save","makeCopy","-","rename","moveToFolder"],u);d.menus.addMenuItems(q,["-","autosave"],u);null!=J&&J.isRevisionHistorySupported()&&d.menus.addMenuItems(q,["-","revisionHistory"],u)})));this.put("file",new Menu(mxUtils.bind(this,function(q,u){var J="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",q,u),this.addSubmenu("exportAs",q,u),this.addSubmenu("embed",q,u),"1"==urlParams.libraries&&(this.addMenuItems(q,
+"0"!=urlParams.saveAndExit||d.mode==App.MODE_ATLAS)d.menus.addMenuItems(q,["saveAndExit"],u),null!=I&&I.isRevisionHistorySupported()&&d.menus.addMenuItems(q,["revisionHistory"],u);q.addSeparator(u)}else d.mode==App.MODE_ATLAS?d.menus.addMenuItems(q,["save","synchronize","-"],u):"1"!=urlParams.noFileMenu&&(d.menus.addSubmenu("file",q,u),q.addSeparator(u),"min"==Editor.currentTheme&&(d.menus.addMenuItems(q,"toggleShapes format layers tags generate - findReplace".split(" "),u),d.commentsSupported()&&
+d.menus.addMenuItems(q,["comments"],u),q.addSeparator(u)));d.menus.addSubmenu("exportAs",q,u);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"atlassian"==d.getServiceName()?d.menus.addMenuItems(q,["import"],u):"1"!=urlParams.noFileMenu&&d.menus.addSubmenu("importFrom",q,u);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme?(d.menus.addMenuItems(q,["-","findReplace"],u),d.commentsSupported()&&d.menus.addMenuItems(q,["comments","-"],u),d.menus.addMenuItems(q,"toggleShapes format layers tags generate -".split(" "),
+u),d.menus.addMenuItems(q,["pageSetup"],u)):"min"!=Editor.currentTheme&&(this.addMenuItems(q,["-"],u),this.addSubmenu("newLibrary",q,u),this.addSubmenu("openLibraryFrom",q,u));q.addSeparator(u);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(q,["print"],u);G||"min"==Editor.currentTheme||null==I||null==d.fileNode||"1"==urlParams.embedInline||(G=null!=I.getTitle()?I.getTitle():d.defaultFilename,/(\.html)$/i.test(G)||this.addMenuItems(q,["-","properties"]));q.addSeparator(u);
+"simple"==Editor.currentTheme&&(d.menus.addSubmenu("extras",q,u,mxResources.get("settings")),q.addSeparator(u));d.menus.addSubmenu("help",q,u);q.addSeparator(u);"1"==urlParams.embed&&("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(q,["save"],u),"1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(d.menus.addMenuItems(q,["saveAndExit"],u),null!=I&&I.isRevisionHistorySupported()&&d.menus.addMenuItems(q,["revisionHistory"],u));"1"!=urlParams.embed&&
+d.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&d.mode!=App.MODE_ATLAS||d.menus.addMenuItems(q,["exit"],u);"1"!=urlParams.embed&&null!=I&&"undefined"==typeof AtlasFile&&d.menus.addMenuItems(q,["-","close"],u)})));this.put("save",new Menu(mxUtils.bind(this,function(q,u){var I=d.getCurrentFile();null==I||I.constructor!=DriveFile&&I.constructor!=OneDriveFile?(d.menus.addMenuItems(q,["save","saveAs","-","rename"],u),this.addMenuItems(q,[d.isOfflineApp()?"upload":"makeCopy"],u)):d.menus.addMenuItems(q,
+["save","makeCopy","-","rename","moveToFolder"],u);d.menus.addMenuItems(q,["-","autosave"],u);null!=I&&I.isRevisionHistorySupported()&&d.menus.addMenuItems(q,["-","revisionHistory"],u)})));this.put("file",new Menu(mxUtils.bind(this,function(q,u){var I="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",q,u),this.addSubmenu("exportAs",q,u),this.addSubmenu("embed",q,u),"1"==urlParams.libraries&&(this.addMenuItems(q,
["-"],u),this.addSubmenu("newLibrary",q,u),this.addSubmenu("openLibraryFrom",q,u)),d.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],u),this.addMenuItems(q,["-","pageSetup","print","-","rename"],u),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(q,["saveAndExit"],u):(this.addMenuItems(q,["save"],u),"1"==urlParams.saveAndExit&&this.addMenuItems(q,["saveAndExit"],u))),"1"!=urlParams.noExitBtn&&this.addMenuItems(q,["exit"],
-u);else if(J){J=d.getCurrentFile();d.menus.addMenuItems(q,["new"],u);d.menus.addSubmenu("openFrom",q,u);isLocalStorage&&this.addSubmenu("openRecent",q,u);q.addSeparator(u);d.menus.addMenuItems(q,["-","save"],u);null!=J&&J.constructor==DriveFile||d.menus.addMenuItems(q,["saveAs"],u);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==J||J.constructor==LocalFile&&null==J.fileHandle||d.menus.addMenuItems(q,["synchronize"],u);q.addSeparator(u);null!=J&&("simple"==Editor.currentTheme||J.constructor!=
-DriveFile&&J.constructor!=GitHubFile&&J.constructor!=OneDriveFile||d.menus.addMenuItems(q,["share"],u),"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.addMenuItem(q,"publishLink",u,null,null,mxResources.get("publish")+"..."),"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||EditorUi.isElectronApp||!d.isOwnGDriveDomain()||"draw.io"!=d.getServiceName()||navigator.standalone||this.addMenuItem(q,"presentationMode",u));q.addSeparator(u);
-null!=J&&J.isRenamable()&&this.addMenuItems(q,["rename"],u);d.isOfflineApp()?this.addMenuItems(q,["upload"],u):(d.menus.addMenuItems(q,["makeCopy"],u),null!=J&&(J.constructor!=OneDriveFile&&J.constructor!=DriveFile||d.menus.addMenuItems(q,["moveToFolder"],u),q.addSeparator(u),null!=J.getFolderUrl()&&d.menus.addMenuItems(q,["openFolder"],u),null!=J.getFileUrl()&&d.menus.addMenuItems(q,["openFile"],u)));q.addSeparator(u);null!=J&&J.isRevisionHistorySupported()&&d.menus.addMenuItems(q,["revisionHistory"],
-u);if(null!=J&&null!=d.fileNode&&"1"!=urlParams.embedInline){var G=null!=J.getTitle()?J.getTitle():d.defaultFilename;(J.constructor==DriveFile&&null!=J.sync&&J.sync.isConnected()||!/(\.html)$/i.test(G))&&this.addMenuItems(q,["properties"],u)}"simple"==Editor.currentTheme&&d.menus.addMenuItems(q,["-","autosave"],u)}else J=this.editorUi.getCurrentFile(),null!=J&&J.constructor==DriveFile?(J.isRestricted()&&this.addMenuItems(q,["exportOptionsDisabled"],u),this.addMenuItems(q,["save","-","share"],u),G=
-this.addMenuItem(q,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.drawio.com/doc/faq/synchronize"),q.addSeparator(u)):this.addMenuItems(q,["new"],u),this.addSubmenu("openFrom",q,u),isLocalStorage&&this.addSubmenu("openRecent",q,u),null!=J&&J.constructor==DriveFile?this.addMenuItems(q,"new - rename makeCopy openFolder moveToFolder".split(" "),u):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==J||J.constructor==LocalFile&&null==
-J.fileHandle||(q.addSeparator(u),G=this.addMenuItem(q,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(q,["-","save","saveAs","-"],u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==J||this.addMenuItems(q,["share","-"],u),null!=J&&J.isRenamable()&&this.addMenuItems(q,["rename"],u),d.isOfflineApp()?this.addMenuItems(q,["upload"],
-u):(this.addMenuItems(q,["makeCopy"],u),null!=J&&(J.constructor==OneDriveFile&&this.addMenuItems(q,["moveToFolder"],u),null!=J.getFolderUrl()&&d.menus.addMenuItems(q,["openFolder"],u)))),q.addSeparator(u),this.addSubmenu("importFrom",q,u),this.addSubmenu("exportAs",q,u),d.isOffline()||(q.addSeparator(u),this.addSubmenu("embed",q,u),this.addSubmenu("publish",q,u)),q.addSeparator(u),this.addSubmenu("newLibrary",q,u),this.addSubmenu("openLibraryFrom",q,u),d.isRevisionHistorySupported()&&this.addMenuItems(q,
-["-","revisionHistory"],u),null!=J&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(G=null!=J.getTitle()?J.getTitle():d.defaultFilename,(J.constructor==DriveFile&&null!=J.sync&&J.sync.isConnected()||!/(\.html)$/i.test(G))&&this.addMenuItems(q,["-","properties"])),this.addMenuItems(q,["-","pageSetup"],u),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["print"],u),this.addMenuItems(q,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,u){function J(O){var Q=encodeURIComponent(O.name)+
-(null==O.url?"":"@"+encodeURIComponent(O.url));if(!H[Q]){for(var U=O.name,V=0;null!=I[U.toLowerCase()];)U=O.name+" ("+ ++V+")";null==C[Q]&&(M.push({name:O.name,url:O.url,label:U,title:O.url}),I[U.toLowerCase()]=O,C[Q]=O)}}for(var G=mxUtils.bind(this,function(O,Q,U,V,X){var W=d.editor.graph,Y=this.styleChange(q,null!=V?V:O,[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],[O,null!=Q?encodeURIComponent(Q):null,null],null,u,function(){W.setFont(O,Q);d.fireEvent(new mxEventObject("styleChanged","keys",
-[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[O,null!=Q?encodeURIComponent(Q):null,null],"cells",[W.cellEditor.getEditingCell()]))},function(){W.updateLabelElements(W.getSelectionCells(),function(Z){Z.removeAttribute("face");Z.style.fontFamily=null;"PRE"==Z.nodeName&&W.replaceElement(Z,"div")})});U&&(U=document.createElement("img"),U.className="geAdaptiveAsset",U.setAttribute("src",Editor.crossImage),U.setAttribute("title",mxResources.get("delete")),U.setAttribute("valign","absmiddle"),
-U.setAttribute("border","0"),U.style.position="relative",U.style.top="2px",U.style.width="14px",U.style.cursor="default",U.style.margin="0 3px",Y.firstChild.nextSibling.nextSibling.appendChild(U),mxEvent.addListener(U,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Z){this.removeCustomFont(O,Q);this.editorUi.hideCurrentMenu();mxEvent.consume(Z)})));Graph.addFont(O,Q);Y.firstChild.nextSibling.style.fontFamily=O;X=null!=V?V:O;null!=Q&&(X+=" ("+Q+")");Y.setAttribute("title",X)}),
-H={},g=0;g<this.defaultFonts.length;g++){var p=this.defaultFonts[g];"string"===typeof p?G(p):null!=p.fontFamily&&null!=p.fontUrl&&(H[encodeURIComponent(p.fontFamily)+"@"+encodeURIComponent(p.fontUrl)]=!0,G(p.fontFamily,p.fontUrl))}q.addSeparator(u);var C={},I={},M=[];for(g=0;g<this.customFonts.length;g++)J(this.customFonts[g]);M.sort(function(O,Q){return O.label<Q.label?-1:O.label>Q.label?1:0});if(0<M.length){for(g=0;g<M.length;g++)G(M[g].name,M[g].url,!0,M[g].label);q.addSeparator(u)}q.addItem(mxResources.get("reset"),
-null,mxUtils.bind(this,function(){this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),u);q.addSeparator(u);q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,Q=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],U="s",V=null;if(O.isEditing()){var X=O.getSelectedEditingElement();if(null!=X){var W=mxUtils.getCurrentStyle(X);if(null!=W){Q=mxUtils.getCssFontFamily(W.fontFamily);W=O.getView().getState(O.cellEditor.getEditingCell());
-V=null!=W?W.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=X&&X!=O.cellEditor.textarea;){if(X.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=X.getAttribute("data-font-src")){V=X.getAttribute("data-font-src");break}else if(X.getAttribute("face")==Q){V=null;break}X=X.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?(V=null,U="g"):U="w")}}}else W=O.getView().getState(O.getSelectionCell()),null!=W&&(Q=W.style[mxConstants.STYLE_FONTFAMILY]||Q,X=W.style.fontSource,null!=X&&(X=decodeURIComponent(X),
-Graph.isGoogleFontUrl(X)?U="g":(U="w",V=X)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Y=null;document.activeElement==O.cellEditor.textarea&&(Y=O.cellEditor.saveSelection());Q=new FontDialog(this.editorUi,Q,V,U,mxUtils.bind(this,function(Z,aa,ha){null!=Y&&(O.cellEditor.restoreSelection(Y),Y=null);if(null!=Z&&0<Z.length)if(this.addCustomFont(Z,aa),O.isEditing())O.setFont(Z,aa);else{O.getModel().beginUpdate();try{O.stopEditing(!1),
-O.setCellStyles(mxConstants.STYLE_FONTFAMILY,Z),O.setCellStyles("fontSource",null!=aa?encodeURIComponent(aa):null),O.setCellStyles("FType",null)}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(Q.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);Q.init()}),u,null,!0)})))}})();function DiagramPage(b,k){this.node=b;null!=k?this.node.setAttribute("id",k):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;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)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,k,n){this.ui=b;this.page=k;this.previous=this.name=n}
-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,k,n){this.ui=b;this.oldIndex=k;this.newIndex=n}
-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,k,n){this.ui=b;this.previousPage=this.page=k;null!=k&&(this.ui.updatePageRoot(k),null!=n&&(k.viewState=n))}
-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var k=this.ui.editor,n=k.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(k.getGraphXml(!0)));b.viewState=n.getViewState();b.root=n.model.root;null!=b.model&&b.model.rootChanged(b.root);n.view.clear(b.root,!0);n.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;
-n.model.prefix=Editor.guid()+"-";n.model.rootChanged(b.root);n.setViewState(b.viewState);n.gridEnabled=n.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);k.graph.fireEvent(new mxEventObject(mxEvent.ROOT));k.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,k,n,d,x){SelectPage.call(this,b,n);this.relatedPage=k;this.index=d;this.previousIndex=null;this.noSelect=x}mxUtils.extend(ChangePage,SelectPage);
-ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};function ReplaceDiagram(b,k){this.ui=b;this.data=k}
-ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,k=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var n=new mxCodec(this.data.ownerDocument),d=new mxGraphModel;n.decode(this.data,d);this.data=k;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=d.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,
-!0);b.model.rootChanged(d.root);b.fireEvent(new mxEventObject(mxEvent.ROOT))};EditorUi.prototype.tabContainerVisible=!0;EditorUi.prototype.setTabContainerVisible=function(b,k){Editor.isSettingsEnabled()&&k&&(mxSettings.settings.pages=b,mxSettings.save());this.tabContainerVisible=b;this.updateTabContainer()};EditorUi.prototype.isTabContainerVisible=function(){return this.tabContainerVisible};EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
-EditorUi.prototype.getPageIndex=function(b){var k=null;if(null!=this.pages&&null!=b)for(var n=0;n<this.pages.length;n++)if(this.pages[n]==b){k=n;break}return k};EditorUi.prototype.getPageById=function(b,k){k=null!=k?k:this.pages;if(null!=k)for(var n=0;n<k.length;n++)if(k[n].getId()==b)return k[n];return null};
-EditorUi.prototype.createImageForPageLink=function(b,k,n,d){var x=b.indexOf(","),z=null;0<x&&(x=this.getPageById(b.substring(x+1)),null!=x&&x!=k&&(z=this.getImageForPage(x,k,n,d),z.originalSrc=b));null==z&&(z={originalSrc:b});return z};
-EditorUi.prototype.pageSelected=function(){var b=this.editor.graph,k=this.currentPage;null!=k&&(b.tooltipHandler.hide(),null==k.viewState||null==k.viewState.scrollTop||null==k.viewState.scrollLeft?(b.selectUnlockedLayer(),this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollleft=0,b.container.scrollTop=0,this.chromelessResize())):b.setScrollbarPositions(k.viewState,b.view.translate.x,b.view.translate.y),this.updateTabContainer(),this.scrollToPage())};
-EditorUi.prototype.getImageForPage=function(b,k,n,d){n=null!=n?n:this.editor.graph;var x=n.getGlobalVariable;n=this.createTemporaryGraph(n.getStylesheet());var z=this.getPageIndex(null!=k?k:this.currentPage);n.getGlobalVariable=function(F){return"pagenumber"==F?z+1:"page"==F&&null!=k?k.getName():x.apply(this,arguments)};document.body.appendChild(n.container);this.updatePageRoot(b);n.setAdaptiveColors(b.viewState.adaptiveColors);n.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=
-"";d=n.getSvg(null,null,null,null,null,null,null,null,null,null,d,null,null,null,!0,!0);var y=n.getGraphBounds();document.body.removeChild(n.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(d)),y.width,y.height,y.x,y.y)};
-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,k=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){k.apply(b.view,
-arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(y,F){y=F.getProperty("edit").changes;for(F=0;F<y.length;F++)if(y[F]instanceof RenamePage||y[F]instanceof ChangePage||y[F]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==y.length&&y[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var n=b.sizeDidChange,d=null,x=this;b.sizeDidChange=
-function(){var y=n.apply(this,arguments);null!=x.currentPage&&d!=x.currentPage&&(d=x.currentPage,x.pageSelected());return y};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var z=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",z);this.editor.addListener("pagesPatched",z);this.editor.addListener("pageRenamed",z);this.editor.addListener("pageMoved",z);this.editor.addListener("fileLoaded",z);
-this.editor.addListener("pageSelected",mxUtils.bind(this,function(y,F){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(y,F){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
-EditorUi.prototype.scrollToPage=function(b,k){var n=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),d=null!=b?b:this.currentPage;null!=n&&null!=this.tabScroller&&this.tabScroller.children.length>n&&null!=this.tabScroller.children[n]&&(d!=this.lastScrollPage||k)&&(this.tabScroller.children[n].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[n].className="geTab gePageTab geActivePage",this.lastScrollPage=d)};
-EditorUi.prototype.restoreViewState=function(b,k,n){b=null!=b?this.getPageById(b.getId()):null;var d=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,k):(d.setViewState(k),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+k.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+k.scrollTop,d.restoreSelection(n))};
-Graph.prototype.createViewState=function(b){var k=b.getAttribute("page"),n=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),x=parseFloat(b.getAttribute("pageHeight")),z=b.getAttribute("background"),y=this.parseBackgroundImage(b.getAttribute("backgroundImage")),F=b.getAttribute("extFonts");if(F)try{F=F.split("|").map(function(N){N=N.split("^");return{name:N[0],url:N[1]}})}catch(N){console.log("ExtFonts format error: "+N.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=k?"0"!=k:this.defaultPageVisible,background:null!=z&&0<z.length?z:null,backgroundImage:y,pageScale:isNaN(n)?mxGraph.prototype.pageScale:n,pageFormat:isNaN(d)||isNaN(x)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,d,x),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:F||[]}};
-Graph.prototype.saveViewState=function(b,k,n,d,x){n||(k.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),k.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),k.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),k.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),k.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),k.setAttribute("connect",null==b||b.connect?"1":"0"),k.setAttribute("arrows",null==b||b.arrows?"1":"0"),
-k.setAttribute("fold",null==b||b.foldingEnabled?"1":"0"));k.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);n=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=n&&(k.setAttribute("pageWidth",n.width),k.setAttribute("pageHeight",n.height));null!=b&&(null!=b.background&&k.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,
-d,x),null!=d&&k.setAttribute("backgroundImage",JSON.stringify(d)));k.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");k.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?k.removeAttribute("adaptiveColors"):k.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&k.setAttribute("extFonts",b.extFonts.map(function(z){return z.name+"^"+z.url}).join("|"))};
+u);else if(I){I=d.getCurrentFile();d.menus.addMenuItems(q,["new"],u);d.menus.addSubmenu("openFrom",q,u);isLocalStorage&&this.addSubmenu("openRecent",q,u);q.addSeparator(u);d.menus.addMenuItems(q,["-","save"],u);null!=I&&I.constructor==DriveFile||d.menus.addMenuItems(q,["saveAs"],u);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==I||I.constructor==LocalFile&&null==I.fileHandle||d.menus.addMenuItems(q,["synchronize"],u);q.addSeparator(u);null!=I&&("simple"==Editor.currentTheme||I.constructor!=
+DriveFile&&I.constructor!=GitHubFile&&I.constructor!=OneDriveFile||d.menus.addMenuItems(q,["share"],u),"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.addMenuItem(q,"publishLink",u,null,null,mxResources.get("publish")+"..."),"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||EditorUi.isElectronApp||!d.isOwnGDriveDomain()||"draw.io"!=d.getServiceName()||navigator.standalone||this.addMenuItem(q,"presentationMode",u));q.addSeparator(u);
+null!=I&&I.isRenamable()&&this.addMenuItems(q,["rename"],u);d.isOfflineApp()?this.addMenuItems(q,["upload"],u):(d.menus.addMenuItems(q,["makeCopy"],u),null!=I&&(I.constructor!=OneDriveFile&&I.constructor!=DriveFile||d.menus.addMenuItems(q,["moveToFolder"],u),q.addSeparator(u),null!=I.getFolderUrl()&&d.menus.addMenuItems(q,["openFolder"],u),null!=I.getFileUrl()&&d.menus.addMenuItems(q,["openFile"],u)));q.addSeparator(u);null!=I&&I.isRevisionHistorySupported()&&d.menus.addMenuItems(q,["revisionHistory"],
+u);if(null!=I&&null!=d.fileNode&&"1"!=urlParams.embedInline){var G=null!=I.getTitle()?I.getTitle():d.defaultFilename;(I.constructor==DriveFile&&null!=I.sync&&I.sync.isConnected()||!/(\.html)$/i.test(G))&&this.addMenuItems(q,["properties"],u)}"simple"==Editor.currentTheme&&d.menus.addMenuItems(q,["-","autosave"],u)}else I=this.editorUi.getCurrentFile(),null!=I&&I.constructor==DriveFile?(I.isRestricted()&&this.addMenuItems(q,["exportOptionsDisabled"],u),this.addMenuItems(q,["save","-","share"],u),G=
+this.addMenuItem(q,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.drawio.com/doc/faq/synchronize"),q.addSeparator(u)):this.addMenuItems(q,["new"],u),this.addSubmenu("openFrom",q,u),isLocalStorage&&this.addSubmenu("openRecent",q,u),null!=I&&I.constructor==DriveFile?this.addMenuItems(q,"new - rename makeCopy openFolder moveToFolder".split(" "),u):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==I||I.constructor==LocalFile&&null==
+I.fileHandle||(q.addSeparator(u),G=this.addMenuItem(q,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(q,["-","save","saveAs","-"],u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==I||this.addMenuItems(q,["share","-"],u),null!=I&&I.isRenamable()&&this.addMenuItems(q,["rename"],u),d.isOfflineApp()?this.addMenuItems(q,["upload"],
+u):(this.addMenuItems(q,["makeCopy"],u),null!=I&&(I.constructor==OneDriveFile&&this.addMenuItems(q,["moveToFolder"],u),null!=I.getFolderUrl()&&d.menus.addMenuItems(q,["openFolder"],u)))),q.addSeparator(u),this.addSubmenu("importFrom",q,u),this.addSubmenu("exportAs",q,u),d.isOffline()||(q.addSeparator(u),this.addSubmenu("embed",q,u),this.addSubmenu("publish",q,u)),q.addSeparator(u),this.addSubmenu("newLibrary",q,u),this.addSubmenu("openLibraryFrom",q,u),d.isRevisionHistorySupported()&&this.addMenuItems(q,
+["-","revisionHistory"],u),null!=I&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(G=null!=I.getTitle()?I.getTitle():d.defaultFilename,(I.constructor==DriveFile&&null!=I.sync&&I.sync.isConnected()||!/(\.html)$/i.test(G))&&this.addMenuItems(q,["-","properties"])),this.addMenuItems(q,["-","pageSetup"],u),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["print"],u),this.addMenuItems(q,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,u){function I(N){var R=encodeURIComponent(N.name)+
+(null==N.url?"":"@"+encodeURIComponent(N.url));if(!H[R]){for(var T=N.name,V=0;null!=K[T.toLowerCase()];)T=N.name+" ("+ ++V+")";null==B[R]&&(M.push({name:N.name,url:N.url,label:T,title:N.url}),K[T.toLowerCase()]=N,B[R]=N)}}for(var G=mxUtils.bind(this,function(N,R,T,V,X){var W=d.editor.graph,Y=this.styleChange(q,null!=V?V:N,[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],[N,null!=R?encodeURIComponent(R):null,null],null,u,function(){W.setFont(N,R);d.fireEvent(new mxEventObject("styleChanged","keys",
+[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[N,null!=R?encodeURIComponent(R):null,null],"cells",[W.cellEditor.getEditingCell()]))},function(){W.updateLabelElements(W.getSelectionCells(),function(Z){Z.removeAttribute("face");Z.style.fontFamily=null;"PRE"==Z.nodeName&&W.replaceElement(Z,"div")})});T&&(T=document.createElement("img"),T.className="geAdaptiveAsset",T.setAttribute("src",Editor.crossImage),T.setAttribute("title",mxResources.get("delete")),T.setAttribute("valign","absmiddle"),
+T.setAttribute("border","0"),T.style.position="relative",T.style.top="2px",T.style.width="14px",T.style.cursor="default",T.style.margin="0 3px",Y.firstChild.nextSibling.nextSibling.appendChild(T),mxEvent.addListener(T,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Z){this.removeCustomFont(N,R);this.editorUi.hideCurrentMenu();mxEvent.consume(Z)})));Graph.addFont(N,R);Y.firstChild.nextSibling.style.fontFamily=N;X=null!=V?V:N;null!=R&&(X+=" ("+R+")");Y.setAttribute("title",X)}),
+H={},g=0;g<this.defaultFonts.length;g++){var p=this.defaultFonts[g];"string"===typeof p?G(p):null!=p.fontFamily&&null!=p.fontUrl&&(H[encodeURIComponent(p.fontFamily)+"@"+encodeURIComponent(p.fontUrl)]=!0,G(p.fontFamily,p.fontUrl))}q.addSeparator(u);var B={},K={},M=[];for(g=0;g<this.customFonts.length;g++)I(this.customFonts[g]);M.sort(function(N,R){return N.label<R.label?-1:N.label>R.label?1:0});if(0<M.length){for(g=0;g<M.length;g++)G(M[g].name,M[g].url,!0,M[g].label);q.addSeparator(u)}q.addItem(mxResources.get("reset"),
+null,mxUtils.bind(this,function(){this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),u);q.addSeparator(u);q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var N=this.editorUi.editor.graph,R=N.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],T="s",V=null;if(N.isEditing()){var X=N.getSelectedEditingElement();if(null!=X){var W=mxUtils.getCurrentStyle(X);if(null!=W){R=mxUtils.getCssFontFamily(W.fontFamily);W=N.getView().getState(N.cellEditor.getEditingCell());
+V=null!=W?W.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=X&&X!=N.cellEditor.textarea;){if(X.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=X.getAttribute("data-font-src")){V=X.getAttribute("data-font-src");break}else if(X.getAttribute("face")==R){V=null;break}X=X.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?(V=null,T="g"):T="w")}}}else W=N.getView().getState(N.getSelectionCell()),null!=W&&(R=W.style[mxConstants.STYLE_FONTFAMILY]||R,X=W.style.fontSource,null!=X&&(X=decodeURIComponent(X),
+Graph.isGoogleFontUrl(X)?T="g":(T="w",V=X)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Y=null;document.activeElement==N.cellEditor.textarea&&(Y=N.cellEditor.saveSelection());R=new FontDialog(this.editorUi,R,V,T,mxUtils.bind(this,function(Z,aa,la){null!=Y&&(N.cellEditor.restoreSelection(Y),Y=null);if(null!=Z&&0<Z.length)if(this.addCustomFont(Z,aa),N.isEditing())N.setFont(Z,aa);else{N.getModel().beginUpdate();try{N.stopEditing(!1),
+N.setCellStyles(mxConstants.STYLE_FONTFAMILY,Z),N.setCellStyles("fontSource",null!=aa?encodeURIComponent(aa):null),N.setCellStyles("FType",null)}finally{N.getModel().endUpdate()}}}));this.editorUi.showDialog(R.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);R.init()}),u,null,!0)})))}})();function DiagramPage(b,l){this.node=b;null!=l?this.node.setAttribute("id",l):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;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)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,l,n){this.ui=b;this.page=l;this.previous=this.name=n}
+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,l,n){this.ui=b;this.oldIndex=l;this.newIndex=n}
+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,l,n){this.ui=b;this.previousPage=this.page=l;null!=l&&(this.ui.updatePageRoot(l),null!=n&&(l.viewState=n))}
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var l=this.ui.editor,n=l.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(l.getGraphXml(!0)));b.viewState=n.getViewState();b.root=n.model.root;null!=b.model&&b.model.rootChanged(b.root);n.view.clear(b.root,!0);n.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;
+n.model.prefix=Editor.guid()+"-";n.model.rootChanged(b.root);n.setViewState(b.viewState);n.gridEnabled=n.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);l.graph.fireEvent(new mxEventObject(mxEvent.ROOT));l.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,l,n,d,v){SelectPage.call(this,b,n);this.relatedPage=l;this.index=d;this.previousIndex=null;this.noSelect=v}mxUtils.extend(ChangePage,SelectPage);
+ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};function ReplaceDiagram(b,l){this.ui=b;this.data=l}
+ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,l=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var n=new mxCodec(this.data.ownerDocument),d=new mxGraphModel;n.decode(this.data,d);this.data=l;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=d.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,
+!0);b.model.rootChanged(d.root);b.fireEvent(new mxEventObject(mxEvent.ROOT))};EditorUi.prototype.tabContainerVisible=!0;EditorUi.prototype.setTabContainerVisible=function(b,l){Editor.isSettingsEnabled()&&l&&(mxSettings.settings.pages=b,mxSettings.save());this.tabContainerVisible=b;this.updateTabContainer()};EditorUi.prototype.isTabContainerVisible=function(){return this.tabContainerVisible};EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
+EditorUi.prototype.getPageIndex=function(b){var l=null;if(null!=this.pages&&null!=b)for(var n=0;n<this.pages.length;n++)if(this.pages[n]==b){l=n;break}return l};EditorUi.prototype.getPageById=function(b,l){l=null!=l?l:this.pages;if(null!=l)for(var n=0;n<l.length;n++)if(l[n].getId()==b)return l[n];return null};
+EditorUi.prototype.createImageForPageLink=function(b,l,n,d){var v=b.indexOf(","),A=null;0<v&&(v=this.getPageById(b.substring(v+1)),null!=v&&v!=l&&(A=this.getImageForPage(v,l,n,d),A.originalSrc=b));null==A&&(A={originalSrc:b});return A};
+EditorUi.prototype.pageSelected=function(){var b=this.editor.graph,l=this.currentPage;null!=l&&(b.tooltipHandler.hide(),null==l.viewState||null==l.viewState.scrollTop||null==l.viewState.scrollLeft?(b.selectUnlockedLayer(),this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollleft=0,b.container.scrollTop=0,this.chromelessResize())):b.setScrollbarPositions(l.viewState,b.view.translate.x,b.view.translate.y),this.updateTabContainer(),this.scrollToPage())};
+EditorUi.prototype.getImageForPage=function(b,l,n,d){n=null!=n?n:this.editor.graph;var v=n.getGlobalVariable;n=this.createTemporaryGraph(n.getStylesheet());var A=this.getPageIndex(null!=l?l:this.currentPage);n.getGlobalVariable=function(D){return"pagenumber"==D?A+1:"page"==D&&null!=l?l.getName():v.apply(this,arguments)};document.body.appendChild(n.container);this.updatePageRoot(b);n.setAdaptiveColors(b.viewState.adaptiveColors);n.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=
+"";d=n.getSvg(null,null,null,null,null,null,null,null,null,null,d,null,null,null,!0,!0);var z=n.getGraphBounds();document.body.removeChild(n.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(d)),z.width,z.height,z.x,z.y)};
+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,l=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){l.apply(b.view,
+arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(z,D){z=D.getProperty("edit").changes;for(D=0;D<z.length;D++)if(z[D]instanceof RenamePage||z[D]instanceof ChangePage||z[D]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==z.length&&z[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var n=b.sizeDidChange,d=null,v=this;b.sizeDidChange=
+function(){var z=n.apply(this,arguments);null!=v.currentPage&&d!=v.currentPage&&(d=v.currentPage,v.pageSelected());return z};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var A=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",A);this.editor.addListener("pagesPatched",A);this.editor.addListener("pageRenamed",A);this.editor.addListener("pageMoved",A);this.editor.addListener("fileLoaded",A);
+this.editor.addListener("pageSelected",mxUtils.bind(this,function(z,D){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(z,D){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
+EditorUi.prototype.scrollToPage=function(b,l){var n=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),d=null!=b?b:this.currentPage;null!=n&&null!=this.tabScroller&&this.tabScroller.children.length>n&&null!=this.tabScroller.children[n]&&(d!=this.lastScrollPage||l)&&(this.tabScroller.children[n].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[n].className="geTab gePageTab geActivePage",this.lastScrollPage=d)};
+EditorUi.prototype.restoreViewState=function(b,l,n){b=null!=b?this.getPageById(b.getId()):null;var d=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,l):(d.setViewState(l),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+l.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+l.scrollTop,d.restoreSelection(n))};
+Graph.prototype.createViewState=function(b){var l=b.getAttribute("page"),n=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),v=parseFloat(b.getAttribute("pageHeight")),A=b.getAttribute("background"),z=this.parseBackgroundImage(b.getAttribute("backgroundImage")),D=b.getAttribute("extFonts");if(D)try{D=D.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}})}catch(P){console.log("ExtFonts format error: "+P.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=l?"0"!=l:this.defaultPageVisible,background:null!=A&&0<A.length?A:null,backgroundImage:z,pageScale:isNaN(n)?mxGraph.prototype.pageScale:n,pageFormat:isNaN(d)||isNaN(v)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,d,v),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:D||[]}};
+Graph.prototype.saveViewState=function(b,l,n,d,v){n||(l.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),l.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),l.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),l.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),l.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),l.setAttribute("connect",null==b||b.connect?"1":"0"),l.setAttribute("arrows",null==b||b.arrows?"1":"0"),
+l.setAttribute("fold",null==b||b.foldingEnabled?"1":"0"));l.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);n=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=n&&(l.setAttribute("pageWidth",n.width),l.setAttribute("pageHeight",n.height));null!=b&&(null!=b.background&&l.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,
+d,v),null!=d&&l.setAttribute("backgroundImage",JSON.stringify(d)));l.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");l.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?l.removeAttribute("adaptiveColors"):l.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&l.setAttribute("extFonts",b.extFonts.map(function(A){return A.name+"^"+A.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,adaptiveColors:this.adaptiveColors,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
-Graph.prototype.setViewState=function(b,k){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.adaptiveColors=b.adaptiveColors;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;
-this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var n=this.extFonts;this.extFonts=b.extFonts||[];if(k&&null!=n)for(k=0;k<n.length;k++){var d=document.getElementById("extFont_"+n[k].name);null!=d&&d.parentNode.removeChild(d)}for(k=0;k<this.extFonts.length;k++)this.addExtFont(this.extFonts[k].name,
-this.extFonts[k].url,!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,
+Graph.prototype.setViewState=function(b,l){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.adaptiveColors=b.adaptiveColors;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;
+this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var n=this.extFonts;this.extFonts=b.extFonts||[];if(l&&null!=n)for(l=0;l<n.length;l++){var d=document.getElementById("extFont_"+n[l].name);null!=d&&d.parentNode.removeChild(d)}for(l=0;l<this.extFonts.length;l++)this.addExtFont(this.extFonts[l].name,
+this.extFonts[l].url,!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,
this.pageFormat="undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.adaptiveColors=
-null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,k,n){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=k*this.view.scale+b.scrollLeft,this.container.scrollTop=n*this.view.scale+b.scrollTop)};
-Graph.prototype.addExtFont=function(b,k,n){if(b&&k){var d="extFont_"+b;if(null==document.getElementById(d))if(0==k.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",k,null,d);else{document.getElementsByTagName("head");var x=document.createElement("style");x.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+k+'");\n}'));x.setAttribute("id",d);document.getElementsByTagName("head")[0].appendChild(x)}if(!n){null==this.extFonts&&(this.extFonts=[]);n=this.extFonts;
-d=!0;for(x=0;x<n.length;x++)if(n[x].name==b){d=!1;break}d&&this.extFonts.push({name:b,url:k})}}};
-EditorUi.prototype.updatePageRoot=function(b,k){if(null==b.root){k=this.editor.extractGraphModel(b.node,null,k);var n=Editor.extractParserError(k);if(n)throw Error(n);null!=k?(b.graphModelNode=k,b.viewState=this.editor.graph.createViewState(k),n=new mxCodec(k.ownerDocument),b.root=n.decode(k).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){k=this.editor.extractGraphModel(b.node);
-if(n=Editor.extractParserError(k))throw Error(n);null!=k&&(b.graphModelNode=k)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)k=new mxCell,k.setId("1"),b.root.insert(k),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};
-EditorUi.prototype.updateDiagramData=function(b,k){if(null==this.getPageIndex(b.page))this.insertPage(null,null,k);else{var n=new mxCodec(b.node.ownerDocument),d=new mxGraphModel;n.decode(b.node,d);n=new mxCodec(k.ownerDocument);var x=new mxGraphModel;n.decode(k,x);this.selectPage(b.page);k=this.diffCells(d.root,x.root);this.patchPage(b.page,k,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};
-EditorUi.prototype.selectPage=function(b,k,n){try{if(b!=this.currentPage){var d=this.editor.graph;d.isEditing()&&d.stopEditing(!1);k=null!=k?k:!1;d.isMouseDown=!1;d.reset();var x=d.model.createUndoableEdit();x.ignoreEdit=!0;var z=new SelectPage(this,b,n);z.execute();x.add(z);x.notify();k||d.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",x))}}catch(y){this.handleError(y)}};
-EditorUi.prototype.selectNextPage=function(b){var k=this.currentPage;null!=k&&null!=this.pages&&(k=mxUtils.indexOf(this.pages,k),b?this.selectPage(this.pages[mxUtils.mod(k+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(k-1,this.pages.length)]))};
-EditorUi.prototype.insertPage=function(b,k,n){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),n),k=null!=k?k:this.pages.length,k=new ChangePage(this,b,b,k),this.editor.graph.model.execute(k));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
-EditorUi.prototype.createPage=function(b,k,n){k=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),k);k.setName(null!=b?b:this.createPageName());this.initDiagramNode(k,n);return k};EditorUi.prototype.createPageName=function(){for(var b={},k=0;k<this.pages.length;k++){var n=this.pages[k].getName();null!=n&&0<n.length&&(b[n]=n)}k=this.pages.length;do n=mxResources.get("pageWithNumber",[++k]);while(null!=b[n]);return n};
-EditorUi.prototype.removePage=function(b){try{var k=this.editor.graph,n=mxUtils.indexOf(this.pages,b);if(k.isEnabled()&&0<=n){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);k.model.beginUpdate();try{var d=this.currentPage;d==b&&1<this.pages.length?(n==this.pages.length-1?n--:n++,d=this.pages[n]):1>=this.pages.length&&(d=this.insertPage(),k.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));k.model.execute(new ChangePage(this,b,d))}finally{k.model.endUpdate()}}}catch(x){this.handleError(x)}return b};
-EditorUi.prototype.duplicatePage=function(b,k){var n=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var x=b.node.cloneNode(!1);x.removeAttribute("id");var z={},y=d.createCellLookup([d.model.root]);n=new DiagramPage(x);n.root=d.cloneCell(d.model.root,null,z);var F=new mxGraphModel;F.prefix=Editor.guid()+"-";F.setRoot(n.root);d.updateCustomLinks(d.createCellMapping(z,y),[n.root]);n.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(n);
-n.viewState.scale=1;delete n.viewState.scrollLeft;delete n.viewState.scrollTop;delete n.viewState.currentRoot;delete n.viewState.defaultParent;n.setName(k);n=this.insertPage(n,mxUtils.indexOf(this.pages,b)+1)}}catch(N){this.handleError(N)}return n};EditorUi.prototype.initDiagramNode=function(b,k){null==k&&(k=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,k);EditorUi.removeChildNodes(b.node);b.node.appendChild(k)};
-EditorUi.prototype.clonePages=function(b){for(var k=[],n=[],d=0;d<b.length;d++)try{n.push(this.clonePage(b[d]))}catch(x){k.push(mxResources.get("pageWithNumber",[d+1])+": "+x.toString())}if(0<k.length){b=Error(k.join("\n"));try{0<n.length&&(b.fallbackFileData=this.getXmlForPages(n))}catch(x){}throw b;}return n};
-EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var k=new DiagramPage(b.node.cloneNode(!0)),n=b==this.currentPage?this.editor.graph.getViewState():b.viewState;k.viewState=mxUtils.clone(n,EditorUi.transientViewStateProperties);k.root=this.editor.graph.model.cloneCell(b.root,null,!0);k.diagramModified=b.diagramModified;return k};
-EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var k=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(n){null!=n&&0<n.length&&this.editor.graph.model.execute(new RenamePage(this,b,n))}),mxResources.get("rename"));this.showDialog(k.container,300,80,!0,!0);k.init()}return b};EditorUi.prototype.movePage=function(b,k){this.editor.graph.model.execute(new MovePage(this,b,k))};
+null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,l,n){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=l*this.view.scale+b.scrollLeft,this.container.scrollTop=n*this.view.scale+b.scrollTop)};
+Graph.prototype.addExtFont=function(b,l,n){if(b&&l){var d="extFont_"+b;if(null==document.getElementById(d))if(0==l.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",l,null,d);else{document.getElementsByTagName("head");var v=document.createElement("style");v.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+l+'");\n}'));v.setAttribute("id",d);document.getElementsByTagName("head")[0].appendChild(v)}if(!n){null==this.extFonts&&(this.extFonts=[]);n=this.extFonts;
+d=!0;for(v=0;v<n.length;v++)if(n[v].name==b){d=!1;break}d&&this.extFonts.push({name:b,url:l})}}};
+EditorUi.prototype.updatePageRoot=function(b,l){if(null==b.root){l=this.editor.extractGraphModel(b.node,null,l);var n=Editor.extractParserError(l);if(n)throw Error(n);null!=l?(b.graphModelNode=l,b.viewState=this.editor.graph.createViewState(l),n=new mxCodec(l.ownerDocument),b.root=n.decode(l).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){l=this.editor.extractGraphModel(b.node);
+if(n=Editor.extractParserError(l))throw Error(n);null!=l&&(b.graphModelNode=l)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)l=new mxCell,l.setId("1"),b.root.insert(l),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};
+EditorUi.prototype.updateDiagramData=function(b,l){if(null==this.getPageIndex(b.page))this.insertPage(null,null,l);else{var n=new mxCodec(b.node.ownerDocument),d=new mxGraphModel;n.decode(b.node,d);n=new mxCodec(l.ownerDocument);var v=new mxGraphModel;n.decode(l,v);this.selectPage(b.page);l=this.diffCells(d.root,v.root);this.patchPage(b.page,l,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};
+EditorUi.prototype.selectPage=function(b,l,n){try{if(b!=this.currentPage){var d=this.editor.graph;d.isEditing()&&d.stopEditing(!1);l=null!=l?l:!1;d.isMouseDown=!1;d.reset();var v=d.model.createUndoableEdit();v.ignoreEdit=!0;var A=new SelectPage(this,b,n);A.execute();v.add(A);v.notify();l||d.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",v))}}catch(z){this.handleError(z)}};
+EditorUi.prototype.selectNextPage=function(b){var l=this.currentPage;null!=l&&null!=this.pages&&(l=mxUtils.indexOf(this.pages,l),b?this.selectPage(this.pages[mxUtils.mod(l+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(l-1,this.pages.length)]))};
+EditorUi.prototype.insertPage=function(b,l,n){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),n),l=null!=l?l:this.pages.length,l=new ChangePage(this,b,b,l),this.editor.graph.model.execute(l));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
+EditorUi.prototype.createPage=function(b,l,n){l=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),l);l.setName(null!=b?b:this.createPageName());this.initDiagramNode(l,n);return l};EditorUi.prototype.createPageName=function(){for(var b={},l=0;l<this.pages.length;l++){var n=this.pages[l].getName();null!=n&&0<n.length&&(b[n]=n)}l=this.pages.length;do n=mxResources.get("pageWithNumber",[++l]);while(null!=b[n]);return n};
+EditorUi.prototype.removePage=function(b){try{var l=this.editor.graph,n=mxUtils.indexOf(this.pages,b);if(l.isEnabled()&&0<=n){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);l.model.beginUpdate();try{var d=this.currentPage;d==b&&1<this.pages.length?(n==this.pages.length-1?n--:n++,d=this.pages[n]):1>=this.pages.length&&(d=this.insertPage(),l.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));l.model.execute(new ChangePage(this,b,d))}finally{l.model.endUpdate()}}}catch(v){this.handleError(v)}return b};
+EditorUi.prototype.duplicatePage=function(b,l){var n=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var v=b.node.cloneNode(!1);v.removeAttribute("id");var A={},z=d.createCellLookup([d.model.root]);n=new DiagramPage(v);n.root=d.cloneCell(d.model.root,null,A);var D=new mxGraphModel;D.prefix=Editor.guid()+"-";D.setRoot(n.root);d.updateCustomLinks(d.createCellMapping(A,z),[n.root]);n.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(n);
+n.viewState.scale=1;delete n.viewState.scrollLeft;delete n.viewState.scrollTop;delete n.viewState.currentRoot;delete n.viewState.defaultParent;n.setName(l);n=this.insertPage(n,mxUtils.indexOf(this.pages,b)+1)}}catch(P){this.handleError(P)}return n};EditorUi.prototype.initDiagramNode=function(b,l){null==l&&(l=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,l);EditorUi.removeChildNodes(b.node);b.node.appendChild(l)};
+EditorUi.prototype.clonePages=function(b){for(var l=[],n=[],d=0;d<b.length;d++)try{n.push(this.clonePage(b[d]))}catch(v){l.push(mxResources.get("pageWithNumber",[d+1])+": "+v.toString())}if(0<l.length){b=Error(l.join("\n"));try{0<n.length&&(b.fallbackFileData=this.getXmlForPages(n))}catch(v){}throw b;}return n};
+EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var l=new DiagramPage(b.node.cloneNode(!0)),n=b==this.currentPage?this.editor.graph.getViewState():b.viewState;l.viewState=mxUtils.clone(n,EditorUi.transientViewStateProperties);l.root=this.editor.graph.model.cloneCell(b.root,null,!0);l.diagramModified=b.diagramModified;return l};
+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var l=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(n){null!=n&&0<n.length&&this.editor.graph.model.execute(new RenamePage(this,b,n))}),mxResources.get("rename"));this.showDialog(l.container,300,80,!0,!0);l.init()}return b};EditorUi.prototype.movePage=function(b,l){this.editor.graph.model.execute(new MovePage(this,b,l))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer geTabItem";return b};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&!this.isTabContainerVisible())this.tabContainer.style.display="none";else if(null!=this.tabContainer&&null!=this.pages){this.tabContainer.style.display="";var b=this.editor.graph,k=document.createElement("div");k.className="geTabScroller";for(var n=null,d=0;d<this.pages.length;d++)mxUtils.bind(this,function(x,z){z.className="geTab gePageTab";this.pages[x]==this.currentPage&&z.classList.add("geActivePage");z.setAttribute("draggable",
-"true");mxEvent.addListener(z,"dragstart",mxUtils.bind(this,function(y){b.isEnabled()?(mxClient.IS_FF&&y.dataTransfer.setData("Text","<diagram/>"),n=x):mxEvent.consume(y)}));mxEvent.addListener(z,"dragend",mxUtils.bind(this,function(y){n=null;y.stopPropagation();y.preventDefault()}));mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(y){null!=n&&(y.dataTransfer.dropEffect="move");y.stopPropagation();y.preventDefault()}));mxEvent.addListener(z,"drop",mxUtils.bind(this,function(y){null!=n&&
-x!=n&&this.movePage(n,x);y.stopPropagation();y.preventDefault()}));k.appendChild(z)})(d,this.createTabForPage(this.pages[d],d+1));d=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(k);this.leftScrollTab=this.createLeftScrollTab();
-this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);this.tabScroller=k;this.tabScroller.scrollLeft=d;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(x){this.checkTabScrollerOverflow()}))}};
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&!this.isTabContainerVisible())this.tabContainer.style.display="none";else if(null!=this.tabContainer&&null!=this.pages){this.tabContainer.style.display="";var b=this.editor.graph,l=document.createElement("div");l.className="geTabScroller";for(var n=null,d=0;d<this.pages.length;d++)mxUtils.bind(this,function(v,A){A.className="geTab gePageTab";this.pages[v]==this.currentPage&&A.classList.add("geActivePage");A.setAttribute("draggable",
+"true");mxEvent.addListener(A,"dragstart",mxUtils.bind(this,function(z){b.isEnabled()?(mxClient.IS_FF&&z.dataTransfer.setData("Text","<diagram/>"),n=v):mxEvent.consume(z)}));mxEvent.addListener(A,"dragend",mxUtils.bind(this,function(z){n=null;z.stopPropagation();z.preventDefault()}));mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(z){null!=n&&(z.dataTransfer.dropEffect="move");z.stopPropagation();z.preventDefault()}));mxEvent.addListener(A,"drop",mxUtils.bind(this,function(z){null!=n&&
+v!=n&&this.movePage(n,v);z.stopPropagation();z.preventDefault()}));l.appendChild(A)})(d,this.createTabForPage(this.pages[d],d+1));d=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(l);this.leftScrollTab=this.createLeftScrollTab();
+this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);this.tabScroller=l;this.tabScroller.scrollLeft=d;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(v){this.checkTabScrollerOverflow()}))}};
EditorUi.prototype.checkTabScrollerOverflow=function(){null!=this.tabScroller&&null!=this.tabContainer&&2<this.tabContainer.children.length&&(this.tabScroller.scrollWidth>this.tabScroller.offsetWidth?(this.leftScrollTab.style.display="",this.rightScrollTab.style.display="",0==this.tabScroller.scrollLeft?this.leftScrollTab.classList.add("mxDisabled"):this.leftScrollTab.classList.remove("mxDisabled"),Math.ceil(this.tabScroller.scrollLeft)+this.tabScroller.offsetWidth>=this.tabScroller.scrollWidth?this.rightScrollTab.classList.add("mxDisabled"):
this.rightScrollTab.classList.remove("mxDisabled")):(this.leftScrollTab.style.display="none",this.rightScrollTab.style.display="none"))};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};EditorUi.prototype.createTab=function(){var b=document.createElement("div");b.className="geTab";return b};
-EditorUi.prototype.getShortPageName=function(b){var k=null;null!=b&&(k=b.getName(),null!=k&&36<k.length&&(k=k.substring(0,34)+"..."));return k};EditorUi.prototype.createControlTab=function(b,k,n){var d=this.createTab();d.className="geTab geControlTab";null!=b&&d.setAttribute("title",b);b=document.createElement("div");b.className="geButton";b.style.backgroundImage="url("+k+")";d.appendChild(b);mxEvent.addListener(d,"click",n);return d};
-EditorUi.prototype.createPageInsertTab=function(){return this.createControlTab(mxResources.get("insertPage"),Editor.plusImage,mxUtils.bind(this,function(b){try{this.insertPage()}catch(k){this.handleError(k)}mxEvent.consume(b)}))};
-EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(null,Editor.chevronLeftImage,mxUtils.bind(this,function(b){var k=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:-k,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft-=k;mxEvent.consume(b)}))};
-EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,mxUtils.bind(this,function(b){var k=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:k,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=k;mxEvent.consume(b)}))};
-EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var k=new mxPopupMenu(mxUtils.bind(this,function(x,z){this.menus.get("pages").funct(x,z)}));k.smartSeparators=!0;k.showDisabled=!0;k.autoExpand=!0;k.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(k,arguments);k.destroy()});var n=mxEvent.getClientX(b),d=mxEvent.getClientY(b);k.popup(n,
-d,null,b);this.setCurrentMenu(k);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,k){var n=this.createTab(),d=b.getName()||mxResources.get("untitled"),x=b.getId();n.setAttribute("title",d+(null!=x?" ("+x+")":"")+" ["+k+"]");k=document.createElement("span");k.style.maxWidth="160px";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxUtils.write(k,d);n.appendChild(k);this.addTabListeners(b,n);return n};
-EditorUi.prototype.addTabListeners=function(b,k){mxEvent.disableContextMenu(k);var n=this.editor.graph;mxEvent.addListener(k,"dblclick",mxUtils.bind(this,function(N){this.renamePage(b);mxEvent.consume(N)}));var d=document.createElement("div");d.style.backgroundImage="url("+Editor.thinExpandImage+")";d.className="geButton";k.appendChild(d);var x=!1,z=!1,y=mxUtils.bind(this,function(N){x=null!=this.currentMenu;z=b==this.currentPage;this.scrollToPage(b);n.isMouseDown||z||this.selectPage(b)}),F=mxUtils.bind(this,
-function(N){if(!n.isMouseDown&&(z&&(mxEvent.isTouchEvent(N)||mxEvent.getSource(N)==d)||mxEvent.isPopupTrigger(N))&&(n.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(N)||!x)){var K=new mxPopupMenu(this.createPageMenu(b));K.smartSeparators=!0;K.showDisabled=!0;K.autoExpand=!0;K.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(K,arguments);this.resetCurrentMenu();K.destroy()});var L=mxEvent.getClientX(N),c=mxEvent.getClientY(N);K.popup(L,c,null,N);
-this.setCurrentMenu(K,k)}mxEvent.consume(N)});mxEvent.addGestureListeners(d,y,null,F);mxEvent.addGestureListeners(k,y,null,F)};
-EditorUi.prototype.createPageMenu=function(b,k){return mxUtils.bind(this,function(n,d){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||n.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),d));this.editor.graph.isEnabled()&&(n.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",
-[b.getName()]))}),d),n.addSeparator(d),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",n,d,mxResources.get("move")),n.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d),n.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,k)}),d))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,x,z,y,F){x=null!=x?x:!1;null==z&&(z=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var N=z.slice(),K=0;K<z.length;K++)"1"==mxUtils.getValue(this.getCurrentCellStyle(z[K]),"treeFolding","0")&&this.foldTreeCell(d,z[K]);z=N;z=b.apply(this,arguments)}finally{this.model.endUpdate()}return z};Graph.prototype.foldTreeCell=function(d,x){this.model.beginUpdate();try{var z=
-[];this.traverse(x,!0,mxUtils.bind(this,function(F,N){var K=null!=N&&this.isTreeEdge(N);K&&z.push(N);F==x||null!=N&&!K||z.push(F);return(null==N||K)&&(F==x||!this.model.isCollapsed(F))}));this.model.setCollapsed(x,d);for(var y=0;y<z.length;y++)this.model.setVisible(z[y],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,x,z,y,F,N){return this.model.filterCells(this.getEdges(d,x,z,y,F,N),mxUtils.bind(this,
-function(K){return this.isTreeEdge(K)}))};Graph.prototype.getIncomingTreeEdges=function(d,x){return this.getTreeEdges(d,x,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,x){return this.getTreeEdges(d,x,!1,!0,!1)};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){k.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(H){return t.isVertex(H)&&z(H)}function x(H){var g=!1;null!=H&&(g="1"==
-m.getCurrentCellStyle(H).treeMoving);return g}function z(H){var g=!1;null!=H&&(H=t.getParent(H),g=m.view.getState(H),g="tree"==(null!=g?g.style:m.getCellStyle(H)).containerType);return g}function y(H){var g=!1;null!=H&&(H=t.getParent(H),g=m.view.getState(H),m.view.getState(H),g=null!=(null!=g?g.style:m.getCellStyle(H)).childLayout);return g}function F(H){H=m.view.getState(H);if(null!=H){var g=m.getIncomingTreeEdges(H.cell);if(0<g.length&&(g=m.view.getState(g[0]),null!=g&&(g=g.absolutePoints,null!=
-g&&0<g.length&&(g=g[g.length-1],null!=g)))){if(g.y==H.y&&Math.abs(g.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(g.y==H.y+H.height&&Math.abs(g.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(g.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function N(H,g){g=null!=g?g:!0;m.model.beginUpdate();try{var p=m.model.getParent(H),C=m.getIncomingTreeEdges(H),I=m.cloneCells([C[0],H]);m.model.setTerminal(I[0],m.model.getTerminal(C[0],
-!0),!0);var M=F(H),O=p.geometry;M==mxConstants.DIRECTION_SOUTH||M==mxConstants.DIRECTION_NORTH?I[1].geometry.x+=g?H.geometry.width+10:-I[1].geometry.width-10:I[1].geometry.y+=g?H.geometry.height+10:-I[1].geometry.height-10;m.view.currentRoot!=p&&(I[1].geometry.x-=O.x,I[1].geometry.y-=O.y);var Q=m.view.getState(H),U=m.view.scale;if(null!=Q){var V=mxRectangle.fromRectangle(Q);M==mxConstants.DIRECTION_SOUTH||M==mxConstants.DIRECTION_NORTH?V.x+=(g?H.geometry.width+10:-I[1].geometry.width-10)*U:V.y+=(g?
-H.geometry.height+10:-I[1].geometry.height-10)*U;var X=m.getOutgoingTreeEdges(m.model.getTerminal(C[0],!0));if(null!=X){for(var W=M==mxConstants.DIRECTION_SOUTH||M==mxConstants.DIRECTION_NORTH,Y=O=C=0;Y<X.length;Y++){var Z=m.model.getTerminal(X[Y],!1);if(M==F(Z)){var aa=m.view.getState(Z);Z!=H&&null!=aa&&(W&&g!=aa.getCenterX()<Q.getCenterX()||!W&&g!=aa.getCenterY()<Q.getCenterY())&&mxUtils.intersects(V,aa)&&(C=10+Math.max(C,(Math.min(V.x+V.width,aa.x+aa.width)-Math.max(V.x,aa.x))/U),O=10+Math.max(O,
-(Math.min(V.y+V.height,aa.y+aa.height)-Math.max(V.y,aa.y))/U))}}W?O=0:C=0;for(Y=0;Y<X.length;Y++)if(Z=m.model.getTerminal(X[Y],!1),M==F(Z)&&(aa=m.view.getState(Z),Z!=H&&null!=aa&&(W&&g!=aa.getCenterX()<Q.getCenterX()||!W&&g!=aa.getCenterY()<Q.getCenterY()))){var ha=[];m.traverse(aa.cell,!0,function(ea,da){var ia=null!=da&&m.isTreeEdge(da);ia&&ha.push(da);(null==da||ia)&&ha.push(ea);return null==da||ia});m.moveCells(ha,(g?1:-1)*C,(g?1:-1)*O)}}}return m.addCells(I,p)}finally{m.model.endUpdate()}}function K(H){m.model.beginUpdate();
-try{var g=F(H),p=m.getIncomingTreeEdges(H),C=m.cloneCells([p[0],H]);m.model.setTerminal(p[0],C[1],!1);m.model.setTerminal(C[0],C[1],!0);m.model.setTerminal(C[0],H,!1);var I=m.model.getParent(H),M=I.geometry,O=[];m.view.currentRoot!=I&&(C[1].geometry.x-=M.x,C[1].geometry.y-=M.y);m.traverse(H,!0,function(V,X){var W=null!=X&&m.isTreeEdge(X);W&&O.push(X);(null==X||W)&&O.push(V);return null==X||W});var Q=H.geometry.width+40,U=H.geometry.height+40;g==mxConstants.DIRECTION_SOUTH?Q=0:g==mxConstants.DIRECTION_NORTH?
-(Q=0,U=-U):g==mxConstants.DIRECTION_WEST?(Q=-Q,U=0):g==mxConstants.DIRECTION_EAST&&(U=0);m.moveCells(O,Q,U);return m.addCells(C,I)}finally{m.model.endUpdate()}}function L(H,g){m.model.beginUpdate();try{var p=m.model.getParent(H),C=m.getIncomingTreeEdges(H),I=F(H);0==C.length&&(C=[m.createEdge(p,null,"",null,null,m.createCurrentEdgeStyle())],I=g);var M=m.cloneCells([C[0],H]);m.model.setTerminal(M[0],H,!0);null==m.model.getTerminal(M[0],!1)&&(m.model.setTerminal(M[0],M[1],!1),m.applyNewEdgeStyle(M[1],
-[M[0]],I));C=m.getOutgoingTreeEdges(H);var O=p.geometry;g=[];m.view.currentRoot==p&&(O=new mxRectangle);for(var Q=0;Q<C.length;Q++){var U=m.model.getTerminal(C[Q],!1);null!=U&&g.push(U)}var V=m.view.getBounds(g),X=m.view.translate,W=m.view.scale;I==mxConstants.DIRECTION_SOUTH?(M[1].geometry.x=null==V?H.geometry.x+(H.geometry.width-M[1].geometry.width)/2:(V.x+V.width)/W-X.x-O.x+10,M[1].geometry.y+=M[1].geometry.height-O.y+40):I==mxConstants.DIRECTION_NORTH?(M[1].geometry.x=null==V?H.geometry.x+(H.geometry.width-
-M[1].geometry.width)/2:(V.x+V.width)/W-X.x+-O.x+10,M[1].geometry.y-=M[1].geometry.height+O.y+40):(M[1].geometry.x=I==mxConstants.DIRECTION_WEST?M[1].geometry.x-(M[1].geometry.width+O.x+40):M[1].geometry.x+(M[1].geometry.width-O.x+40),M[1].geometry.y=null==V?H.geometry.y+(H.geometry.height-M[1].geometry.height)/2:(V.y+V.height)/W-X.y+-O.y+10);return m.addCells(M,p)}finally{m.model.endUpdate()}}function c(H,g,p){H=m.getOutgoingTreeEdges(H);p=m.view.getState(p);var C=[];if(null!=p&&null!=H){for(var I=
-0;I<H.length;I++){var M=m.view.getState(m.model.getTerminal(H[I],!1));null!=M&&(!g&&Math.min(M.x+M.width,p.x+p.width)>=Math.max(M.x,p.x)||g&&Math.min(M.y+M.height,p.y+p.height)>=Math.max(M.y,p.y))&&C.push(M)}C.sort(function(O,Q){return g?O.x+O.width-Q.x-Q.width:O.y+O.height-Q.y-Q.height})}return C}function f(H,g){var p=F(H),C=g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST;(p==mxConstants.DIRECTION_EAST||p==mxConstants.DIRECTION_WEST)==C&&p!=g?l.actions.get("selectParent").funct():p==
-g?(g=m.getOutgoingTreeEdges(H),null!=g&&0<g.length&&m.setSelectionCell(m.model.getTerminal(g[0],!1))):(p=m.getIncomingTreeEdges(H),null!=p&&0<p.length&&(C=c(m.model.getTerminal(p[0],!0),C,H),H=m.view.getState(H),null!=H&&(H=mxUtils.indexOf(C,H),0<=H&&(H+=g==mxConstants.DIRECTION_NORTH||g==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=C.length-1&&m.setSelectionCell(C[H].cell)))))}var l=this,m=l.editor.graph,t=m.getModel(),v=l.menus.createPopupMenu;l.menus.createPopupMenu=function(H,g,p){v.apply(this,arguments);
-if(1==m.getSelectionCount()){g=m.getSelectionCell();var C=m.getOutgoingTreeEdges(g);H.addSeparator();0<C.length&&(d(m.getSelectionCell())&&this.addMenuItems(H,["selectChildren"],null,p),this.addMenuItems(H,["selectDescendants"],null,p));d(m.getSelectionCell())?(H.addSeparator(),0<m.getIncomingTreeEdges(g).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,p)):0<m.model.getEdgeCount(g)&&this.addMenuItems(H,["selectConnections"],null,p)}};l.actions.addAction("selectChildren",function(H){if(m.isEnabled()&&
-1==m.getSelectionCount()){var g=m.getSelectionCell();H=mxEvent.isControlDown(H)?null:m.getOutgoingTreeEdges(g);if(null!=H&&0<H.length){g=[];for(var p=0;p<H.length;p++)g.push(m.model.getTerminal(H[p],!1));m.setSelectionCells(g)}else m.setSelectionCells(m.model.getChildren(g))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");l.actions.addAction("selectDescendants",function(H){var g=m.getSelectionCell();if(m.isEnabled()&&null!=g){var p=[];mxEvent.isControlDown(H)||m.traverse(g,!0,function(C,I){var M=
-null!=I&&m.isTreeEdge(I);M&&mxEvent.isControlDown(H)&&p.push(I);(null==I||M)&&p.push(C);return null==I||M});if(0==p.length||1==p.length&&p[0]==g)p=m.model.getDescendants(g);m.setSelectionCells(p)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");l.actions.addAction("selectParent",function(H){var g=m.getSelectionCell();m.isEnabled()&&null!=g&&(H=mxEvent.isControlDown(H)?null:m.getIncomingTreeEdges(g),null!=H&&0<H.length?m.setSelectionCell(m.model.getTerminal(H[0],!0)):m.selectParentCell())},null,
-null,Editor.altKey+"+"+Editor.shiftKey+"+P");l.actions.addAction("selectSiblings",function(H){if(m.isEnabled()&&1==m.getSelectionCount()){var g=m.getSelectionCell(),p=mxEvent.isControlDown(H)?null:m.getIncomingTreeEdges(g);H=[];if(null!=p&&0<p.length&&(p=m.getOutgoingTreeEdges(m.model.getTerminal(p[0],!0)),null!=p))for(var C=0;C<p.length;C++)H.push(m.model.getTerminal(p[C],!1));0==H.length&&(H=m.model.getChildren(m.model.getParent(g)));m.setSelectionCells(H)}},null,null,Editor.altKey+"+"+Editor.shiftKey+
-"+S");var B=m.removeCells;m.removeCells=function(H,g){g=null!=g?g:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));g&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var p=[],C=0;C<H.length;C++){var I=H[C];t.isEdge(I)&&z(I)&&(p.push(I),I=t.getTerminal(I,!1));if(d(I)){var M=[];m.traverse(I,!0,function(O,Q){var U=null!=Q&&m.isTreeEdge(Q);U&&M.push(Q);(null==Q||U)&&M.push(O);return null==Q||U});0<M.length&&(p=p.concat(M),I=m.getIncomingTreeEdges(H[C]),H=H.concat(I))}else null!=I&&
-p.push(H[C])}H=p;return B.apply(this,arguments)};l.hoverIcons.getStateAt=function(H,g,p){return d(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(g,p))};var E=m.duplicateCells;m.duplicateCells=function(H,g){H=null!=H?H:this.getSelectionCells();for(var p=H.slice(0),C=0;C<p.length;C++){var I=m.view.getState(p[C]);if(null!=I&&d(I.cell)){var M=m.getIncomingTreeEdges(I.cell);for(I=0;I<M.length;I++)mxUtils.remove(M[I],H)}}this.model.beginUpdate();try{var O=E.call(this,H,g);if(O.length==H.length)for(C=
-0;C<H.length;C++)if(d(H[C])){var Q=m.getIncomingTreeEdges(O[C]);M=m.getIncomingTreeEdges(H[C]);if(0==Q.length&&0<M.length){var U=this.cloneCell(M[0]);this.addEdge(U,m.getDefaultParent(),this.model.getTerminal(M[0],!0),O[C])}}}finally{this.model.endUpdate()}return O};var D=m.moveCells;m.moveCells=function(H,g,p,C,I,M,O){for(var Q=null,U=[],V=0;V<H.length;V++)(x(H[V])||d(H[V]))&&!y(H[V])&&this.isCellCollapsed(H[V])?U=U.concat(this.getSubtree(H[V])):U.push(H[V]);H=mxUtils.removeDuplicates(U);this.model.beginUpdate();
-try{U=I;var X=this.getCurrentCellStyle(I);if(null!=H&&d(I)&&"1"==mxUtils.getValue(X,"treeFolding","0")){for(V=0;V<H.length;V++)if(d(H[V])||m.model.isEdge(H[V])&&null==m.model.getTerminal(H[V],!0)){I=m.model.getParent(H[V]);break}if(null!=U&&I!=U&&null!=this.view.getState(H[0])){var W=m.getIncomingTreeEdges(H[0]);if(0<W.length){var Y=m.view.getState(m.model.getTerminal(W[0],!0));if(null!=Y){var Z=m.view.getState(U);null!=Z&&(g=(Z.getCenterX()-Y.getCenterX())/m.view.scale,p=(Z.getCenterY()-Y.getCenterY())/
-m.view.scale)}}}}Q=D.apply(this,arguments);if(null!=Q&&null!=H&&Q.length==H.length)for(V=0;V<Q.length;V++)if(this.model.isEdge(Q[V]))d(U)&&0>mxUtils.indexOf(Q,this.model.getTerminal(Q[V],!0))&&this.model.setTerminal(Q[V],U,!0);else if(d(H[V])&&(W=m.getIncomingTreeEdges(H[V]),0<W.length))if(!C)d(U)&&0>mxUtils.indexOf(H,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],U,!0);else if(0==m.getIncomingTreeEdges(Q[V]).length){X=U;if(null==X||X==m.model.getParent(H[V]))X=m.model.getTerminal(W[0],
-!0);C=this.cloneCell(W[0]);this.addEdge(C,m.getDefaultParent(),X,Q[V])}}finally{this.model.endUpdate()}return Q};if(null!=l.sidebar){var A=l.sidebar.dropAndConnect;l.sidebar.dropAndConnect=function(H,g,p,C){var I=m.model,M=null;I.beginUpdate();try{if(M=A.apply(this,arguments),d(H))for(var O=0;O<M.length;O++)if(I.isEdge(M[O])&&null==I.getTerminal(M[O],!0)){I.setTerminal(M[O],H,!0);var Q=m.getCellGeometry(M[O]);Q.points=null;null!=Q.getTerminalPoint(!0)&&Q.setTerminalPoint(null,!0)}}finally{I.endUpdate()}return M}}var S=
-{67:l.actions.get("selectChildren"),88:l.actions.get("selectDescendants"),80:l.actions.get("selectParent"),83:l.actions.get("selectSiblings")},R={67:l.actions.get("copyStyle"),86:l.actions.get("pasteStyle")},T=l.onKeyDown;l.onKeyDown=function(H){try{var g=m.getSelectionCell();if(m.isEnabled()&&!m.isEditing()&&null!=g){var p=mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)?S[H.keyCode]:mxEvent.isAltDown(H)?R[H.keyCode]:null;null!=p?(p.funct(H),mxEvent.consume(H)):d(g)&&(p=null,0<m.getIncomingTreeEdges(g).length&&
-(9==H.which?p=mxEvent.isShiftDown(H)?K(g):L(g):13==H.which&&(p=N(g,!mxEvent.isShiftDown(H)))),null!=p&&0<p.length?(1==p.length&&m.model.isEdge(p[0])?m.setSelectionCell(m.model.getTerminal(p[0],!1)):m.setSelectionCell(p[p.length-1]),null!=l.hoverIcons&&l.hoverIcons.update(m.view.getState(g)),m.startEditingAtCell(g),mxEvent.consume(H)):37==H.keyCode?(f(g,mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(f(g,mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(f(g,mxConstants.DIRECTION_EAST),
-mxEvent.consume(H)):40==H.keyCode&&(f(g,mxConstants.DIRECTION_SOUTH),mxEvent.consume(H)))}}catch(C){l.handleError(C)}mxEvent.isConsumed(H)||T.apply(this,arguments)};var P=m.connectVertex;m.connectVertex=function(H,g,p,C,I,M,O){var Q=m.getIncomingTreeEdges(H);if(d(H)){var U=F(H),V=U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST,X=g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST;return U==g||0==Q.length?L(H,g):V==X?K(H):N(H,g!=mxConstants.DIRECTION_NORTH&&g!=mxConstants.DIRECTION_WEST)}return P.apply(this,
-arguments)};m.getSubtree=function(H){var g=[H];!x(H)&&!d(H)||y(H)||m.traverse(H,!0,function(p,C){var I=null!=C&&m.isTreeEdge(C);I&&0>mxUtils.indexOf(g,C)&&g.push(C);(null==C||I)&&0>mxUtils.indexOf(g,p)&&g.push(p);return null==C||I});return g};var q=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){q.apply(this,arguments);(x(this.state.cell)||d(this.state.cell))&&!y(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?
+EditorUi.prototype.getShortPageName=function(b){var l=null;null!=b&&(l=b.getName(),null!=l&&36<l.length&&(l=l.substring(0,34)+"..."));return l};EditorUi.prototype.createControlTab=function(b,l,n){var d=this.createTab();d.className="geTab geControlTab";null!=b&&d.setAttribute("title",b);b=document.createElement("div");b.className="geButton";b.style.backgroundImage="url("+l+")";d.appendChild(b);mxEvent.addListener(d,"click",n);return d};
+EditorUi.prototype.createPageInsertTab=function(){return this.createControlTab(mxResources.get("insertPage"),Editor.plusImage,mxUtils.bind(this,function(b){try{this.insertPage()}catch(l){this.handleError(l)}mxEvent.consume(b)}))};
+EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(null,Editor.chevronLeftImage,mxUtils.bind(this,function(b){var l=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:-l,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft-=l;mxEvent.consume(b)}))};
+EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,mxUtils.bind(this,function(b){var l=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:l,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=l;mxEvent.consume(b)}))};
+EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var l=new mxPopupMenu(mxUtils.bind(this,function(v,A){this.menus.get("pages").funct(v,A)}));l.smartSeparators=!0;l.showDisabled=!0;l.autoExpand=!0;l.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(l,arguments);l.destroy()});var n=mxEvent.getClientX(b),d=mxEvent.getClientY(b);l.popup(n,
+d,null,b);this.setCurrentMenu(l);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,l){var n=this.createTab(),d=b.getName()||mxResources.get("untitled"),v=b.getId();n.setAttribute("title",d+(null!=v?" ("+v+")":"")+" ["+l+"]");l=document.createElement("span");l.style.maxWidth="160px";l.style.textOverflow="ellipsis";l.style.overflow="hidden";mxUtils.write(l,d);n.appendChild(l);this.addTabListeners(b,n);return n};
+EditorUi.prototype.addTabListeners=function(b,l){mxEvent.disableContextMenu(l);var n=this.editor.graph;mxEvent.addListener(l,"dblclick",mxUtils.bind(this,function(P){this.renamePage(b);mxEvent.consume(P)}));var d=document.createElement("div");d.style.backgroundImage="url("+Editor.thinExpandImage+")";d.className="geButton";l.appendChild(d);var v=!1,A=!1,z=mxUtils.bind(this,function(P){v=null!=this.currentMenu;A=b==this.currentPage;this.scrollToPage(b);n.isMouseDown||A||this.selectPage(b)}),D=mxUtils.bind(this,
+function(P){if(!n.isMouseDown&&(A&&(mxEvent.isTouchEvent(P)||mxEvent.getSource(P)==d)||mxEvent.isPopupTrigger(P))&&(n.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(P)||!v)){var J=new mxPopupMenu(this.createPageMenu(b));J.smartSeparators=!0;J.showDisabled=!0;J.autoExpand=!0;J.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(J,arguments);this.resetCurrentMenu();J.destroy()});var L=mxEvent.getClientX(P),c=mxEvent.getClientY(P);J.popup(L,c,null,P);
+this.setCurrentMenu(J,l)}mxEvent.consume(P)});mxEvent.addGestureListeners(d,z,null,D);mxEvent.addGestureListeners(l,z,null,D)};
+EditorUi.prototype.createPageMenu=function(b,l){return mxUtils.bind(this,function(n,d){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||n.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),d));this.editor.graph.isEnabled()&&(n.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",
+[b.getName()]))}),d),n.addSeparator(d),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",n,d,mxResources.get("move")),n.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d),n.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,l)}),d))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,v,A,z,D){v=null!=v?v:!1;null==A&&(A=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var P=A.slice(),J=0;J<A.length;J++)"1"==mxUtils.getValue(this.getCurrentCellStyle(A[J]),"treeFolding","0")&&this.foldTreeCell(d,A[J]);A=P;A=b.apply(this,arguments)}finally{this.model.endUpdate()}return A};Graph.prototype.foldTreeCell=function(d,v){this.model.beginUpdate();try{var A=
+[];this.traverse(v,!0,mxUtils.bind(this,function(D,P){var J=null!=P&&this.isTreeEdge(P);J&&A.push(P);D==v||null!=P&&!J||A.push(D);return(null==P||J)&&(D==v||!this.model.isCollapsed(D))}));this.model.setCollapsed(v,d);for(var z=0;z<A.length;z++)this.model.setVisible(A[z],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,v,A,z,D,P){return this.model.filterCells(this.getEdges(d,v,A,z,D,P),mxUtils.bind(this,
+function(J){return this.isTreeEdge(J)}))};Graph.prototype.getIncomingTreeEdges=function(d,v){return this.getTreeEdges(d,v,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,v){return this.getTreeEdges(d,v,!1,!0,!1)};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){l.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(H){return t.isVertex(H)&&A(H)}function v(H){var g=!1;null!=H&&(g="1"==
+m.getCurrentCellStyle(H).treeMoving);return g}function A(H){var g=!1;null!=H&&(H=t.getParent(H),g=m.view.getState(H),g="tree"==(null!=g?g.style:m.getCellStyle(H)).containerType);return g}function z(H){var g=!1;null!=H&&(H=t.getParent(H),g=m.view.getState(H),m.view.getState(H),g=null!=(null!=g?g.style:m.getCellStyle(H)).childLayout);return g}function D(H){H=m.view.getState(H);if(null!=H){var g=m.getIncomingTreeEdges(H.cell);if(0<g.length&&(g=m.view.getState(g[0]),null!=g&&(g=g.absolutePoints,null!=
+g&&0<g.length&&(g=g[g.length-1],null!=g)))){if(g.y==H.y&&Math.abs(g.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(g.y==H.y+H.height&&Math.abs(g.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(g.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function P(H,g){g=null!=g?g:!0;m.model.beginUpdate();try{var p=m.model.getParent(H),B=m.getIncomingTreeEdges(H),K=m.cloneCells([B[0],H]);m.model.setTerminal(K[0],m.model.getTerminal(B[0],
+!0),!0);var M=D(H),N=p.geometry;M==mxConstants.DIRECTION_SOUTH||M==mxConstants.DIRECTION_NORTH?K[1].geometry.x+=g?H.geometry.width+10:-K[1].geometry.width-10:K[1].geometry.y+=g?H.geometry.height+10:-K[1].geometry.height-10;m.view.currentRoot!=p&&(K[1].geometry.x-=N.x,K[1].geometry.y-=N.y);var R=m.view.getState(H),T=m.view.scale;if(null!=R){var V=mxRectangle.fromRectangle(R);M==mxConstants.DIRECTION_SOUTH||M==mxConstants.DIRECTION_NORTH?V.x+=(g?H.geometry.width+10:-K[1].geometry.width-10)*T:V.y+=(g?
+H.geometry.height+10:-K[1].geometry.height-10)*T;var X=m.getOutgoingTreeEdges(m.model.getTerminal(B[0],!0));if(null!=X){for(var W=M==mxConstants.DIRECTION_SOUTH||M==mxConstants.DIRECTION_NORTH,Y=N=B=0;Y<X.length;Y++){var Z=m.model.getTerminal(X[Y],!1);if(M==D(Z)){var aa=m.view.getState(Z);Z!=H&&null!=aa&&(W&&g!=aa.getCenterX()<R.getCenterX()||!W&&g!=aa.getCenterY()<R.getCenterY())&&mxUtils.intersects(V,aa)&&(B=10+Math.max(B,(Math.min(V.x+V.width,aa.x+aa.width)-Math.max(V.x,aa.x))/T),N=10+Math.max(N,
+(Math.min(V.y+V.height,aa.y+aa.height)-Math.max(V.y,aa.y))/T))}}W?N=0:B=0;for(Y=0;Y<X.length;Y++)if(Z=m.model.getTerminal(X[Y],!1),M==D(Z)&&(aa=m.view.getState(Z),Z!=H&&null!=aa&&(W&&g!=aa.getCenterX()<R.getCenterX()||!W&&g!=aa.getCenterY()<R.getCenterY()))){var la=[];m.traverse(aa.cell,!0,function(fa,ca){var ja=null!=ca&&m.isTreeEdge(ca);ja&&la.push(ca);(null==ca||ja)&&la.push(fa);return null==ca||ja});m.moveCells(la,(g?1:-1)*B,(g?1:-1)*N)}}}return m.addCells(K,p)}finally{m.model.endUpdate()}}function J(H){m.model.beginUpdate();
+try{var g=D(H),p=m.getIncomingTreeEdges(H),B=m.cloneCells([p[0],H]);m.model.setTerminal(p[0],B[1],!1);m.model.setTerminal(B[0],B[1],!0);m.model.setTerminal(B[0],H,!1);var K=m.model.getParent(H),M=K.geometry,N=[];m.view.currentRoot!=K&&(B[1].geometry.x-=M.x,B[1].geometry.y-=M.y);m.traverse(H,!0,function(V,X){var W=null!=X&&m.isTreeEdge(X);W&&N.push(X);(null==X||W)&&N.push(V);return null==X||W});var R=H.geometry.width+40,T=H.geometry.height+40;g==mxConstants.DIRECTION_SOUTH?R=0:g==mxConstants.DIRECTION_NORTH?
+(R=0,T=-T):g==mxConstants.DIRECTION_WEST?(R=-R,T=0):g==mxConstants.DIRECTION_EAST&&(T=0);m.moveCells(N,R,T);return m.addCells(B,K)}finally{m.model.endUpdate()}}function L(H,g){m.model.beginUpdate();try{var p=m.model.getParent(H),B=m.getIncomingTreeEdges(H),K=D(H);0==B.length&&(B=[m.createEdge(p,null,"",null,null,m.createCurrentEdgeStyle())],K=g);var M=m.cloneCells([B[0],H]);m.model.setTerminal(M[0],H,!0);null==m.model.getTerminal(M[0],!1)&&(m.model.setTerminal(M[0],M[1],!1),m.applyNewEdgeStyle(M[1],
+[M[0]],K));B=m.getOutgoingTreeEdges(H);var N=p.geometry;g=[];m.view.currentRoot==p&&(N=new mxRectangle);for(var R=0;R<B.length;R++){var T=m.model.getTerminal(B[R],!1);null!=T&&g.push(T)}var V=m.view.getBounds(g),X=m.view.translate,W=m.view.scale;K==mxConstants.DIRECTION_SOUTH?(M[1].geometry.x=null==V?H.geometry.x+(H.geometry.width-M[1].geometry.width)/2:(V.x+V.width)/W-X.x-N.x+10,M[1].geometry.y+=M[1].geometry.height-N.y+40):K==mxConstants.DIRECTION_NORTH?(M[1].geometry.x=null==V?H.geometry.x+(H.geometry.width-
+M[1].geometry.width)/2:(V.x+V.width)/W-X.x+-N.x+10,M[1].geometry.y-=M[1].geometry.height+N.y+40):(M[1].geometry.x=K==mxConstants.DIRECTION_WEST?M[1].geometry.x-(M[1].geometry.width+N.x+40):M[1].geometry.x+(M[1].geometry.width-N.x+40),M[1].geometry.y=null==V?H.geometry.y+(H.geometry.height-M[1].geometry.height)/2:(V.y+V.height)/W-X.y+-N.y+10);return m.addCells(M,p)}finally{m.model.endUpdate()}}function c(H,g,p){H=m.getOutgoingTreeEdges(H);p=m.view.getState(p);var B=[];if(null!=p&&null!=H){for(var K=
+0;K<H.length;K++){var M=m.view.getState(m.model.getTerminal(H[K],!1));null!=M&&(!g&&Math.min(M.x+M.width,p.x+p.width)>=Math.max(M.x,p.x)||g&&Math.min(M.y+M.height,p.y+p.height)>=Math.max(M.y,p.y))&&B.push(M)}B.sort(function(N,R){return g?N.x+N.width-R.x-R.width:N.y+N.height-R.y-R.height})}return B}function f(H,g){var p=D(H),B=g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST;(p==mxConstants.DIRECTION_EAST||p==mxConstants.DIRECTION_WEST)==B&&p!=g?k.actions.get("selectParent").funct():p==
+g?(g=m.getOutgoingTreeEdges(H),null!=g&&0<g.length&&m.setSelectionCell(m.model.getTerminal(g[0],!1))):(p=m.getIncomingTreeEdges(H),null!=p&&0<p.length&&(B=c(m.model.getTerminal(p[0],!0),B,H),H=m.view.getState(H),null!=H&&(H=mxUtils.indexOf(B,H),0<=H&&(H+=g==mxConstants.DIRECTION_NORTH||g==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=B.length-1&&m.setSelectionCell(B[H].cell)))))}var k=this,m=k.editor.graph,t=m.getModel(),x=k.menus.createPopupMenu;k.menus.createPopupMenu=function(H,g,p){x.apply(this,arguments);
+if(1==m.getSelectionCount()){g=m.getSelectionCell();var B=m.getOutgoingTreeEdges(g);H.addSeparator();0<B.length&&(d(m.getSelectionCell())&&this.addMenuItems(H,["selectChildren"],null,p),this.addMenuItems(H,["selectDescendants"],null,p));d(m.getSelectionCell())?(H.addSeparator(),0<m.getIncomingTreeEdges(g).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,p)):0<m.model.getEdgeCount(g)&&this.addMenuItems(H,["selectConnections"],null,p)}};k.actions.addAction("selectChildren",function(H){if(m.isEnabled()&&
+1==m.getSelectionCount()){var g=m.getSelectionCell();H=mxEvent.isControlDown(H)?null:m.getOutgoingTreeEdges(g);if(null!=H&&0<H.length){g=[];for(var p=0;p<H.length;p++)g.push(m.model.getTerminal(H[p],!1));m.setSelectionCells(g)}else m.setSelectionCells(m.model.getChildren(g))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");k.actions.addAction("selectDescendants",function(H){var g=m.getSelectionCell();if(m.isEnabled()&&null!=g){var p=[];mxEvent.isControlDown(H)||m.traverse(g,!0,function(B,K){var M=
+null!=K&&m.isTreeEdge(K);M&&mxEvent.isControlDown(H)&&p.push(K);(null==K||M)&&p.push(B);return null==K||M});if(0==p.length||1==p.length&&p[0]==g)p=m.model.getDescendants(g);m.setSelectionCells(p)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");k.actions.addAction("selectParent",function(H){var g=m.getSelectionCell();m.isEnabled()&&null!=g&&(H=mxEvent.isControlDown(H)?null:m.getIncomingTreeEdges(g),null!=H&&0<H.length?m.setSelectionCell(m.model.getTerminal(H[0],!0)):m.selectParentCell())},null,
+null,Editor.altKey+"+"+Editor.shiftKey+"+P");k.actions.addAction("selectSiblings",function(H){if(m.isEnabled()&&1==m.getSelectionCount()){var g=m.getSelectionCell(),p=mxEvent.isControlDown(H)?null:m.getIncomingTreeEdges(g);H=[];if(null!=p&&0<p.length&&(p=m.getOutgoingTreeEdges(m.model.getTerminal(p[0],!0)),null!=p))for(var B=0;B<p.length;B++)H.push(m.model.getTerminal(p[B],!1));0==H.length&&(H=m.model.getChildren(m.model.getParent(g)));m.setSelectionCells(H)}},null,null,Editor.altKey+"+"+Editor.shiftKey+
+"+S");var y=m.removeCells;m.removeCells=function(H,g){g=null!=g?g:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));g&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var p=[],B=0;B<H.length;B++){var K=H[B];t.isEdge(K)&&A(K)&&(p.push(K),K=t.getTerminal(K,!1));if(d(K)){var M=[];m.traverse(K,!0,function(N,R){var T=null!=R&&m.isTreeEdge(R);T&&M.push(R);(null==R||T)&&M.push(N);return null==R||T});0<M.length&&(p=p.concat(M),K=m.getIncomingTreeEdges(H[B]),H=H.concat(K))}else null!=K&&
+p.push(H[B])}H=p;return y.apply(this,arguments)};k.hoverIcons.getStateAt=function(H,g,p){return d(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(g,p))};var F=m.duplicateCells;m.duplicateCells=function(H,g){H=null!=H?H:this.getSelectionCells();for(var p=H.slice(0),B=0;B<p.length;B++){var K=m.view.getState(p[B]);if(null!=K&&d(K.cell)){var M=m.getIncomingTreeEdges(K.cell);for(K=0;K<M.length;K++)mxUtils.remove(M[K],H)}}this.model.beginUpdate();try{var N=F.call(this,H,g);if(N.length==H.length)for(B=
+0;B<H.length;B++)if(d(H[B])){var R=m.getIncomingTreeEdges(N[B]);M=m.getIncomingTreeEdges(H[B]);if(0==R.length&&0<M.length){var T=this.cloneCell(M[0]);this.addEdge(T,m.getDefaultParent(),this.model.getTerminal(M[0],!0),N[B])}}}finally{this.model.endUpdate()}return N};var E=m.moveCells;m.moveCells=function(H,g,p,B,K,M,N){for(var R=null,T=[],V=0;V<H.length;V++)(v(H[V])||d(H[V]))&&!z(H[V])&&this.isCellCollapsed(H[V])?T=T.concat(this.getSubtree(H[V])):T.push(H[V]);H=mxUtils.removeDuplicates(T);this.model.beginUpdate();
+try{T=K;var X=this.getCurrentCellStyle(K);if(null!=H&&d(K)&&"1"==mxUtils.getValue(X,"treeFolding","0")){for(V=0;V<H.length;V++)if(d(H[V])||m.model.isEdge(H[V])&&null==m.model.getTerminal(H[V],!0)){K=m.model.getParent(H[V]);break}if(null!=T&&K!=T&&null!=this.view.getState(H[0])){var W=m.getIncomingTreeEdges(H[0]);if(0<W.length){var Y=m.view.getState(m.model.getTerminal(W[0],!0));if(null!=Y){var Z=m.view.getState(T);null!=Z&&(g=(Z.getCenterX()-Y.getCenterX())/m.view.scale,p=(Z.getCenterY()-Y.getCenterY())/
+m.view.scale)}}}}R=E.apply(this,arguments);if(null!=R&&null!=H&&R.length==H.length)for(V=0;V<R.length;V++)if(this.model.isEdge(R[V]))d(T)&&0>mxUtils.indexOf(R,this.model.getTerminal(R[V],!0))&&this.model.setTerminal(R[V],T,!0);else if(d(H[V])&&(W=m.getIncomingTreeEdges(H[V]),0<W.length))if(!B)d(T)&&0>mxUtils.indexOf(H,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],T,!0);else if(0==m.getIncomingTreeEdges(R[V]).length){X=T;if(null==X||X==m.model.getParent(H[V]))X=m.model.getTerminal(W[0],
+!0);B=this.cloneCell(W[0]);this.addEdge(B,m.getDefaultParent(),X,R[V])}}finally{this.model.endUpdate()}return R};if(null!=k.sidebar){var C=k.sidebar.dropAndConnect;k.sidebar.dropAndConnect=function(H,g,p,B){var K=m.model,M=null;K.beginUpdate();try{if(M=C.apply(this,arguments),d(H))for(var N=0;N<M.length;N++)if(K.isEdge(M[N])&&null==K.getTerminal(M[N],!0)){K.setTerminal(M[N],H,!0);var R=m.getCellGeometry(M[N]);R.points=null;null!=R.getTerminalPoint(!0)&&R.setTerminalPoint(null,!0)}}finally{K.endUpdate()}return M}}var S=
+{67:k.actions.get("selectChildren"),88:k.actions.get("selectDescendants"),80:k.actions.get("selectParent"),83:k.actions.get("selectSiblings")},U={67:k.actions.get("copyStyle"),86:k.actions.get("pasteStyle")},Q=k.onKeyDown;k.onKeyDown=function(H){try{var g=m.getSelectionCell();if(m.isEnabled()&&!m.isEditing()&&null!=g){var p=mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)?S[H.keyCode]:mxEvent.isAltDown(H)?U[H.keyCode]:null;null!=p?(p.funct(H),mxEvent.consume(H)):d(g)&&(p=null,0<m.getIncomingTreeEdges(g).length&&
+(9==H.which?p=mxEvent.isShiftDown(H)?J(g):L(g):13==H.which&&(p=P(g,!mxEvent.isShiftDown(H)))),null!=p&&0<p.length?(1==p.length&&m.model.isEdge(p[0])?m.setSelectionCell(m.model.getTerminal(p[0],!1)):m.setSelectionCell(p[p.length-1]),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(g)),m.startEditingAtCell(g),mxEvent.consume(H)):37==H.keyCode?(f(g,mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(f(g,mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(f(g,mxConstants.DIRECTION_EAST),
+mxEvent.consume(H)):40==H.keyCode&&(f(g,mxConstants.DIRECTION_SOUTH),mxEvent.consume(H)))}}catch(B){k.handleError(B)}mxEvent.isConsumed(H)||Q.apply(this,arguments)};var O=m.connectVertex;m.connectVertex=function(H,g,p,B,K,M,N){var R=m.getIncomingTreeEdges(H);if(d(H)){var T=D(H),V=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,X=g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST;return T==g||0==R.length?L(H,g):V==X?J(H):P(H,g!=mxConstants.DIRECTION_NORTH&&g!=mxConstants.DIRECTION_WEST)}return O.apply(this,
+arguments)};m.getSubtree=function(H){var g=[H];!v(H)&&!d(H)||z(H)||m.traverse(H,!0,function(p,B){var K=null!=B&&m.isTreeEdge(B);K&&0>mxUtils.indexOf(g,B)&&g.push(B);(null==B||K)&&0>mxUtils.indexOf(g,p)&&g.push(p);return null==B||K});return g};var q=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){q.apply(this,arguments);(v(this.state.cell)||d(this.state.cell))&&!z(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?
null==this.moveHandle&&(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),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(H){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),
-this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H);this.graph.isMouseDown=!0;l.hoverIcons.reset();mxEvent.consume(H)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var u=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){u.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 J=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var G=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,g){G.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var n=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=n.apply(this,arguments),x=this.graph,z=this;return d.concat([this.addEntry("tree container",function(){var y=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");y.vertex=!0;var F=new mxCell("Parent",
-new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var N=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');N.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-K.geometry.relative=!0;K.edge=!0;F.insertEdge(K,!0);N.insertEdge(K,!1);y.insert(K);y.insert(F);y.insert(N);return z.createVertexTemplateFromCells([y],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var y=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");y.vertex=!0;var F=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-F.vertex=!0;var N=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');N.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
-K.geometry.relative=!0;K.edge=!0;F.insertEdge(K,!0);N.insertEdge(K,!1);var L=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-L.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),K.style);c.geometry.relative=!0;c.edge=!0;F.insertEdge(c,!0);L.insertEdge(c,!1);var f=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-f.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),K.style);l.geometry.relative=!0;l.edge=!0;F.insertEdge(l,!0);f.insertEdge(l,!1);var m=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-m.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),K.style);t.geometry.relative=!0;t.edge=!0;F.insertEdge(t,!0);m.insertEdge(t,!1);y.insert(K);y.insert(c);y.insert(l);y.insert(t);y.insert(F);y.insert(N);y.insert(L);y.insert(f);y.insert(m);return z.createVertexTemplateFromCells([y],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var y=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
-y.vertex=!0;return z.createVertexTemplateFromCells([y],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var y=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-y.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;y.insertEdge(F,!1);return z.createVertexTemplateFromCells([y,F],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var y=new mxCell("Sub Topic",new mxGeometry(0,0,80,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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');y.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
-F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;y.insertEdge(F,!1);return z.createVertexTemplateFromCells([y,F],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree orgchart organization division",function(){var y=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.vertex=!0;var F=new mxCell("Organization",new mxGeometry(80,
-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var N=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');N.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-K.geometry.relative=!0;K.edge=!0;F.insertEdge(K,!0);N.insertEdge(K,!1);var L=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
-!0;c.edge=!0;F.insertEdge(c,!0);L.insertEdge(c,!1);y.insert(K);y.insert(c);y.insert(F);y.insert(N);y.insert(L);return z.createVertexTemplateFromCells([y],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree root",function(){var y=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.setAttributeForCell(y,"treeRoot","1");y.vertex=!0;return z.createVertexTemplateFromCells([y],
-y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree division",function(){var y=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-F.geometry.setTerminalPoint(new mxPoint(0,0),!0);F.geometry.relative=!0;F.edge=!0;y.insertEdge(F,!1);return z.createVertexTemplateFromCells([y,F],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree sub sections",function(){var y=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");y.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
-F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;y.insertEdge(F,!1);var N=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");N.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),F.style);K.geometry.setTerminalPoint(new mxPoint(110,-40),!0);K.geometry.relative=!0;K.edge=!0;N.insertEdge(K,!1);return z.createVertexTemplateFromCells([F,K,y,N],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(K,L){if(EditorUi.windowed){var c=K.editor.graph;c.popupMenuHandler.hideMenu();null==K.formatWindow?(K.formatWindow=new WrapperWindow(K,"",Math.max(10,K.diagramContainer.clientWidth-248),60,240,Math.min(566,c.container.clientHeight-10),function(f){f.className="geSidebarContainer geFormatContainer";K.createFormat(f).init()}),K.dependsOnLanguage(mxUtils.bind(this,function(){K.formatWindow.window.setTitle(mxResources.get("format"))})),K.formatWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){K.formatWindow.window.fit()})),K.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):K.formatWindow.window.setVisible(null!=L?L:!K.formatWindow.window.isVisible())}else null==K.formatElt&&(K.formatElt=K.createSidebarContainer(),K.createFormat(K.formatElt).init(),K.formatElt.style.border="none",K.formatElt.style.width="240px",K.formatElt.style.borderLeftWidth="1px",K.formatElt.style.borderLeftStyle="solid",K.formatElt.style.right="0px"),L=K.diagramContainer.parentNode,
-null!=K.formatElt.parentNode?(K.formatElt.parentNode.removeChild(K.formatElt),L.style.right="0px"):(L.parentNode.appendChild(K.formatElt),L.style.right=K.formatElt.style.width)}function k(K,L){if(EditorUi.windowed){var c=K.editor.graph;c.popupMenuHandler.hideMenu();null==K.sidebarWindow?(K.sidebarWindow=new WrapperWindow(K,"",10,56,Math.min(c.container.clientWidth-10,218)-6,Math.min(c.container.clientHeight-40,650)-6,function(f){K.createShapesPanel(f)}),K.dependsOnLanguage(mxUtils.bind(this,function(){K.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
-K.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){K.sidebarWindow.window.fit()})),K.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),K.sidebarWindow.window.setVisible(!0),isLocalStorage&&K.getLocalData("sidebar",function(f){K.sidebar.showEntries(f,null,!0)}),K.restoreLibraries()):K.sidebarWindow.window.setVisible(null!=L?L:!K.sidebarWindow.window.isVisible())}else null==K.sidebarElt&&(K.sidebarElt=K.createSidebarContainer(),K.createShapesPanel(K.sidebarElt),K.sidebarElt.style.border=
-"none",K.sidebarElt.style.width="210px",K.sidebarElt.style.borderRight="1px solid gray"),L=K.diagramContainer.parentNode,null!=K.sidebarElt.parentNode?(K.sidebarElt.parentNode.removeChild(K.sidebarElt),L.style.left="0px"):(L.parentNode.appendChild(K.sidebarElt),L.style.left=K.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||
-document.body.clientWidth}catch(K){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
+this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H);this.graph.isMouseDown=!0;k.hoverIcons.reset();mxEvent.consume(H)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var u=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){u.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=
+this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var I=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var G=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,g){G.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var n=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=n.apply(this,arguments),v=this.graph,A=this;return d.concat([this.addEntry("tree container",function(){var z=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");z.vertex=!0;var D=new mxCell("Parent",
+new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.vertex=!0;var P=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+J.geometry.relative=!0;J.edge=!0;D.insertEdge(J,!0);P.insertEdge(J,!1);z.insert(J);z.insert(D);z.insert(P);return A.createVertexTemplateFromCells([z],z.geometry.width,z.geometry.height,z.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var z=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");z.vertex=!0;var D=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+D.vertex=!0;var P=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');P.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
+J.geometry.relative=!0;J.edge=!0;D.insertEdge(J,!0);P.insertEdge(J,!1);var L=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+L.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),J.style);c.geometry.relative=!0;c.edge=!0;D.insertEdge(c,!0);L.insertEdge(c,!1);var f=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+f.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),J.style);k.geometry.relative=!0;k.edge=!0;D.insertEdge(k,!0);f.insertEdge(k,!1);var m=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+m.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),J.style);t.geometry.relative=!0;t.edge=!0;D.insertEdge(t,!0);m.insertEdge(t,!1);z.insert(J);z.insert(c);z.insert(k);z.insert(t);z.insert(D);z.insert(P);z.insert(L);z.insert(f);z.insert(m);return A.createVertexTemplateFromCells([z],z.geometry.width,z.geometry.height,z.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var z=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
+z.vertex=!0;return A.createVertexTemplateFromCells([z],z.geometry.width,z.geometry.height,z.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var z=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+z.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");D.geometry.setTerminalPoint(new mxPoint(-40,40),!0);D.geometry.relative=!0;D.edge=!0;z.insertEdge(D,!1);return A.createVertexTemplateFromCells([z,D],z.geometry.width,z.geometry.height,z.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var z=new mxCell("Sub Topic",new mxGeometry(0,0,80,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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');z.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
+D.geometry.setTerminalPoint(new mxPoint(-40,40),!0);D.geometry.relative=!0;D.edge=!0;z.insertEdge(D,!1);return A.createVertexTemplateFromCells([z,D],z.geometry.width,z.geometry.height,z.value)}),this.addEntry("tree orgchart organization division",function(){var z=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');z.vertex=!0;var D=new mxCell("Organization",new mxGeometry(80,
+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.setAttributeForCell(D,"treeRoot","1");D.vertex=!0;var P=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+J.geometry.relative=!0;J.edge=!0;D.insertEdge(J,!0);P.insertEdge(J,!1);var L=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
+!0;c.edge=!0;D.insertEdge(c,!0);L.insertEdge(c,!1);z.insert(J);z.insert(c);z.insert(D);z.insert(P);z.insert(L);return A.createVertexTemplateFromCells([z],z.geometry.width,z.geometry.height,z.value)}),this.addEntry("tree root",function(){var z=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.setAttributeForCell(z,"treeRoot","1");z.vertex=!0;return A.createVertexTemplateFromCells([z],
+z.geometry.width,z.geometry.height,z.value)}),this.addEntry("tree division",function(){var z=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');z.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+D.geometry.setTerminalPoint(new mxPoint(0,0),!0);D.geometry.relative=!0;D.edge=!0;z.insertEdge(D,!1);return A.createVertexTemplateFromCells([z,D],z.geometry.width,z.geometry.height,z.value)}),this.addEntry("tree sub sections",function(){var z=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");z.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
+D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative=!0;D.edge=!0;z.insertEdge(D,!1);var P=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");P.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),D.style);J.geometry.setTerminalPoint(new mxPoint(110,-40),!0);J.geometry.relative=!0;J.edge=!0;P.insertEdge(J,!1);return A.createVertexTemplateFromCells([D,J,z,P],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.initMinimalTheme=function(){function b(J,L){if(EditorUi.windowed){var c=J.editor.graph;c.popupMenuHandler.hideMenu();null==J.formatWindow?(J.formatWindow=new WrapperWindow(J,"",Math.max(10,J.diagramContainer.clientWidth-248),60,240,Math.min(566,c.container.clientHeight-10),function(f){f.className="geSidebarContainer geFormatContainer";J.createFormat(f).init()}),J.dependsOnLanguage(mxUtils.bind(this,function(){J.formatWindow.window.setTitle(mxResources.get("format"))})),J.formatWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){J.formatWindow.window.fit()})),J.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):J.formatWindow.window.setVisible(null!=L?L:!J.formatWindow.window.isVisible())}else null==J.formatElt&&(J.formatElt=J.createSidebarContainer(),J.createFormat(J.formatElt).init(),J.formatElt.style.border="none",J.formatElt.style.width="240px",J.formatElt.style.borderLeftWidth="1px",J.formatElt.style.borderLeftStyle="solid",J.formatElt.style.right="0px"),L=J.diagramContainer.parentNode,
+null!=J.formatElt.parentNode?(J.formatElt.parentNode.removeChild(J.formatElt),L.style.right="0px"):(L.parentNode.appendChild(J.formatElt),L.style.right=J.formatElt.style.width)}function l(J,L){if(EditorUi.windowed){var c=J.editor.graph;c.popupMenuHandler.hideMenu();null==J.sidebarWindow?(J.sidebarWindow=new WrapperWindow(J,"",10,56,Math.min(c.container.clientWidth-10,218)-6,Math.min(c.container.clientHeight-40,650)-6,function(f){J.createShapesPanel(f)}),J.dependsOnLanguage(mxUtils.bind(this,function(){J.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
+J.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){J.sidebarWindow.window.fit()})),J.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),J.sidebarWindow.window.setVisible(!0),isLocalStorage&&J.getLocalData("sidebar",function(f){J.sidebar.showEntries(f,null,!0)}),J.restoreLibraries()):J.sidebarWindow.window.setVisible(null!=L?L:!J.sidebarWindow.window.isVisible())}else null==J.sidebarElt&&(J.sidebarElt=J.createSidebarContainer(),J.createShapesPanel(J.sidebarElt),J.sidebarElt.style.border=
+"none",J.sidebarElt.style.width="210px",J.sidebarElt.style.borderRight="1px solid gray"),L=J.diagramContainer.parentNode,null!=J.sidebarElt.parentNode?(J.sidebarElt.parentNode.removeChild(J.sidebarElt),L.style.left="0px"):(L.parentNode.appendChild(J.sidebarElt),L.style.left=J.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth}catch(J){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
"#C0C0C0";mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;EditorUi.prototype.closableScratchpad=!1;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=
-function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var d=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){d.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var x=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(K,L){null!=L.shortcut&&900>n&&!mxClient.IS_IOS?K.firstChild.nextSibling.setAttribute("title",L.shortcut):x.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
-function(K){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=K?K:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var z=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();z.apply(this,arguments)};var y=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(K){y.apply(this,
-arguments);if(K){var L=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=L&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=L&&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(){};EditorUi.prototype.installFormatToolbar=function(K){var L=
-this.editor.graph,c=document.createElement("div");c.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%;";L.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(f,l){0<L.getSelectionCount()?(K.appendChild(c),c.innerHTML="Selected: "+L.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var F=!1;EditorUi.prototype.initFormatWindow=
-function(){if(!F&&null!=this.formatWindow){F=!0;var K=this.formatWindow.window.toggleMinimized,L=240;this.formatWindow.window.toggleMinimized=function(){K.apply(this,arguments);this.minimized?(L=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+L-140+"px"):(this.div.style.width=L+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-L+140)+"px");this.fit()};
-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var N=EditorUi.prototype.init;EditorUi.prototype.init=function(){function K(C,I,M){var O=m.menus.get(C);I=B.addMenu(mxResources.get(C),mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));I.className="geButton";I.setAttribute("title",mxResources.get(C));m.menus.menuCreated(O,I,"geButton");null!=M&&
-(I.style.backgroundImage="url("+M+")",I.innerText="");return I}function L(C,I,M,O,Q,U){var V=document.createElement("a");V.className="geButton";v.appendChild(V);null!=U?V.style.backgroundImage="url("+U+")":mxUtils.write(V,C);mxEvent.addListener(V,"click",function(X){"disabled"!=V.getAttribute("disabled")&&I(X);mxEvent.consume(X)});mxEvent.preventDefault(V);null!=O&&V.setAttribute("title",O);null!=Q&&(C=function(){Q.isEnabled()?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},Q.addListener("stateChanged",
-C),t.addListener("enabledChanged",C),C());return V}function c(C,I,M){I=document.createElement("div");I.className="geButtonGroup";for(M=0;M<C.length;M++)null!=C[M]&&I.appendChild(C[M]);v.appendChild(I);return I}function f(){n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;v.innerHTML="";var C=1E3>n,I=K("diagram",null,C?Editor.menuImage:null);c([I,L(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),m.actions.get("image"),
-C?Editor.shapesImage:null),L(mxResources.get("format"),m.actions.get("format").funct,null,mxResources.get("format")+" ("+m.actions.get("format").shortcut+")",m.actions.get("image"),C?Editor.formatImage:null)]);I=K("insert",!0,C?R:null);c([I,L(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),C?Editor.trashImage:null)]);t.isEnabled()||I.setAttribute("disabled","disabled");H.setAttribute("title",mxResources.get("undo")+" ("+J.shortcut+")");
-g.setAttribute("title",mxResources.get("redo")+" ("+G.shortcut+")");p.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=n&&(c([H,g]),520<=n&&c([p,640<=n?L("",q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",q,Editor.zoomInImage):null,640<=n?L("",u.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",u,Editor.zoomOutImage):null]));v.appendChild(m.statusContainer);v.appendChild(m.buttonContainer)}N.apply(this,arguments);var l=mxUtils.isAncestorNode(document.body,
-this.container)?this.container:this.editor.graph.container;null!=l&&(l.classList.add("geSimple"),l.classList.add("geMinimal"),l.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&
-1E3<=n&&(b(this,!0),this.formatWindow.window.setVisible(!0));var m=this,t=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));var v=document.createElement("div");v.className="geMenubarContainer";var B=new Menubar(m,v),E=m.hideCurrentMenu;m.hideCurrentMenu=function(){E.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var D=m.descriptorChanged;m.descriptorChanged=function(){D.apply(this,arguments);var C=m.getCurrentFile();if(null!=C&&null!=C.getTitle()){var I=C.getMode();
-"google"==I?I="googleDrive":"github"==I?I="gitHub":"gitlab"==I?I="gitLab":"onedrive"==I&&(I="oneDrive");I=mxResources.get(I);v.setAttribute("title",C.getTitle()+(null!=I?" ("+I+")":""))}else v.removeAttribute("title")};m.setStatusText(m.editor.getStatus());v.appendChild(m.statusContainer);m.buttonContainer=this.createButtonContainer();v.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=this.createTabContainer();var A=this.createZoomInput(!0),S=m.updateTabContainer;
-m.updateTabContainer=function(){S.apply(this,arguments);m.tabContainer.appendChild(A)};var R=Editor.addBoxImage;if(null!=m.hoverIcons){var T=m.hoverIcons.update;m.hoverIcons.update=function(){t.freehand.isDrawing()||T.apply(this,arguments)}}if(null!=t.freehand){var P=t.freehand.createStyle;t.freehand.createStyle=function(C){return P.apply(this,arguments)+"sketch=0;"}}m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus())}));m.setStatusText(m.editor.getStatus());
-var q=m.actions.get("zoomIn"),u=m.actions.get("zoomOut");l=m.actions.get("resetView");var J=m.actions.get("undo"),G=m.actions.get("redo"),H=L("",J.funct,null,"",J,Editor.undoImage),g=L("",G.funct,null,"",G,Editor.redoImage),p=L("",function(C){mxEvent.isAltDown(C)?(m.hideCurrentMenu(),m.actions.get("customZoom").funct()):(m.hideCurrentMenu(),m.actions.get("smartFit").funct());mxEvent.consume(C)},!0,"",l,Editor.zoomFitImage);m.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){k(m,null)});
-m.container.appendChild(m.tabContainer);m.container.appendChild(v);m.updateTabContainer();!EditorUi.windowed&&1E3<=n&&b(this,!0);f();m.addListener("lockedChanged",f);m.addListener("languageChanged",f);m.editor.graph.addListener("enabledChanged",f);mxEvent.addListener(window,"resize",function(){f();null!=m.sidebarWindow&&m.sidebarWindow.window.fit();null!=m.formatWindow&&m.formatWindow.window.fit();null!=m.actions.outlineWindow&&m.actions.outlineWindow.window.fit();null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();
-null!=m.menus.chatWindow&&m.menus.chatWindow.window.fit();null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var k=EditorUi.initTheme;EditorUi.initTheme=function(){k.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,x,z,y){var F=x.y,N=x.x,K=!1,L=!1;if(null!=this.states&&null!=d&&null!=x){var c=this,f=new mxCellState,l=this.graph.getView().scale,m=Math.max(2,this.getGuideTolerance()/2);f.x=d.x+N;f.y=d.y+F;f.width=d.width;f.height=d.height;for(var t=[],v=[],B=0;B<this.states.length;B++){var E=this.states[B];E instanceof mxCellState&&(y||!this.graph.isCellSelected(E.cell))&&((f.x>=E.x&&f.x<=E.x+E.width||E.x>=f.x&&E.x<=f.x+f.width)&&(f.y>
-E.y+E.height+4||f.y+f.height+4<E.y)?t.push(E):(f.y>=E.y&&f.y<=E.y+E.height||E.y>=f.y&&E.y<=f.y+f.height)&&(f.x>E.x+E.width+4||f.x+f.width+4<E.x)&&v.push(E))}var D=0,A=0,S=E=0,R=0,T=0,P=0,q=0,u=5*l;if(1<t.length){t.push(f);t.sort(function(g,p){return g.y-p.y});var J=!1;B=f==t[0];l=f==t[t.length-1];if(!B&&!l)for(B=1;B<t.length-1;B++)if(f==t[B]){l=t[B-1];B=t[B+1];E=A=S=(B.y-l.y-l.height-f.height)/2;break}for(B=0;B<t.length-1;B++){l=t[B];var G=t[B+1],H=f==l||f==G;G=G.y-l.y-l.height;J|=f==l;if(0==A&&0==
-D)A=G,D=1;else if(Math.abs(A-G)<=(H||1==B&&J?m:0))D+=1;else if(1<D&&J){t=t.slice(0,B+1);break}else if(3<=t.length-B&&!J)D=0,E=A=0!=S?S:0,t.splice(0,0==B?1:B),B=-1;else break;0!=E||H||(A=E=G)}3==t.length&&t[1]==f&&(E=0)}if(1<v.length){v.push(f);v.sort(function(g,p){return g.x-p.x});J=!1;B=f==v[0];l=f==v[v.length-1];if(!B&&!l)for(B=1;B<v.length-1;B++)if(f==v[B]){l=v[B-1];B=v[B+1];P=T=q=(B.x-l.x-l.width-f.width)/2;break}for(B=0;B<v.length-1;B++){l=v[B];G=v[B+1];H=f==l||f==G;G=G.x-l.x-l.width;J|=f==l;
-if(0==T&&0==R)T=G,R=1;else if(Math.abs(T-G)<=(H||1==B&&J?m:0))R+=1;else if(1<R&&J){v=v.slice(0,B+1);break}else if(3<=v.length-B&&!J)R=0,P=T=0!=q?q:0,v.splice(0,0==B?1:B),B=-1;else break;0!=P||H||(T=P=G)}3==v.length&&v[1]==f&&(P=0)}m=function(g,p,C,I){var M=[];if(I){I=u;var O=0}else I=0,O=u;M.push(new mxPoint(g.x-I,g.y-O));M.push(new mxPoint(g.x+I,g.y+O));M.push(g);M.push(p);M.push(new mxPoint(p.x-I,p.y-O));M.push(new mxPoint(p.x+I,p.y+O));if(null!=C)return C.points=M,C;g=new mxPolyline(M,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);g.dialect=mxConstants.DIALECT_SVG;g.pointerEvents=!1;g.init(c.graph.getView().getOverlayPane());return g};T=function(g,p){if(g&&null!=c.guidesArrHor)for(g=0;g<c.guidesArrHor.length;g++)c.guidesArrHor[g].node.style.visibility="hidden";if(p&&null!=c.guidesArrVer)for(g=0;g<c.guidesArrVer.length;g++)c.guidesArrVer[g].node.style.visibility="hidden"};if(1<R&&R==v.length-1){R=[];q=c.guidesArrHor;K=[];N=0;B=v[0]==f?1:0;J=v[B].y+v[B].height;if(0<P)for(B=0;B<v.length-1;B++)l=
-v[B],G=v[B+1],f==l?(N=G.x-l.width-P,K.push(new mxPoint(N+l.width+u,J)),K.push(new mxPoint(G.x-u,J))):f==G?(K.push(new mxPoint(l.x+l.width+u,J)),N=l.x+l.width+P,K.push(new mxPoint(N-u,J))):(K.push(new mxPoint(l.x+l.width+u,J)),K.push(new mxPoint(G.x-u,J)));else l=v[0],B=v[2],N=l.x+l.width+(B.x-l.x-l.width-f.width)/2,K.push(new mxPoint(l.x+l.width+u,J)),K.push(new mxPoint(N-u,J)),K.push(new mxPoint(N+f.width+u,J)),K.push(new mxPoint(B.x-u,J));for(B=0;B<K.length;B+=2)v=K[B],P=K[B+1],v=m(v,P,null!=q?
-q[B/2]:null),v.node.style.visibility="visible",v.redraw(),R.push(v);for(B=K.length/2;null!=q&&B<q.length;B++)q[B].destroy();c.guidesArrHor=R;N-=d.x;K=!0}else T(!0);if(1<D&&D==t.length-1){R=[];q=c.guidesArrVer;L=[];F=0;B=t[0]==f?1:0;D=t[B].x+t[B].width;if(0<E)for(B=0;B<t.length-1;B++)l=t[B],G=t[B+1],f==l?(F=G.y-l.height-E,L.push(new mxPoint(D,F+l.height+u)),L.push(new mxPoint(D,G.y-u))):f==G?(L.push(new mxPoint(D,l.y+l.height+u)),F=l.y+l.height+E,L.push(new mxPoint(D,F-u))):(L.push(new mxPoint(D,l.y+
-l.height+u)),L.push(new mxPoint(D,G.y-u)));else l=t[0],B=t[2],F=l.y+l.height+(B.y-l.y-l.height-f.height)/2,L.push(new mxPoint(D,l.y+l.height+u)),L.push(new mxPoint(D,F-u)),L.push(new mxPoint(D,F+f.height+u)),L.push(new mxPoint(D,B.y-u));for(B=0;B<L.length;B+=2)v=L[B],P=L[B+1],v=m(v,P,null!=q?q[B/2]:null,!0),v.node.style.visibility="visible",v.redraw(),R.push(v);for(B=L.length/2;null!=q&&B<q.length;B++)q[B].destroy();c.guidesArrVer=R;F-=d.y;L=!0}else T(!1,!0)}if(K||L)return f=new mxPoint(N,F),t=b.call(this,
-d,f,z,y),K&&!L?f.y=t.y:L&&!K&&(f.x=t.x),t.y!=f.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),t.x!=f.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),f;T(!0,!0);return b.apply(this,arguments)};var k=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){k.call(this,d);var x=this.guidesArrVer,z=this.guidesArrHor;if(null!=x)for(var y=0;y<x.length;y++)x[y].node.style.visibility=d?"visible":"hidden";if(null!=
-z)for(y=0;y<z.length;y++)z[y].node.style.visibility=d?"visible":"hidden"};var n=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){n.call(this);var d=this.guidesArrVer,x=this.guidesArrHor;if(null!=d){for(var z=0;z<d.length;z++)d[z].destroy();this.guidesArrVer=null}if(null!=x){for(z=0;z<x.length;z++)x[z].destroy();this.guidesArrHor=null}}})();function mxRuler(b,k,n,d){function x(){var D=b.getDiagramContainerOffset(),A=b.diagramContainer;c.style.top=A.offsetTop-D.y+"px";c.style.left=A.offsetLeft-D.x+"px";c.style.width=(n?0:A.offsetWidth)+N+"px";c.style.height=(n?A.offsetHeight:0)+N+"px"}function z(D,A,S){if(null!=y)return D;var R;return function(){var T=this,P=arguments,q=S&&!R;clearTimeout(R);R=setTimeout(function(){R=null;S||D.apply(T,P)},A);q&&D.apply(T,P)}}var y=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||
-window.msRequestAnimationFrame,F=window.cancelAnimationFrame||window.mozCancelAnimationFrame,N=this.RULER_THICKNESS,K=this;this.unit=k;var L=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},c=document.createElement("div");c.className="geRuler";c.style.position="fixed";this.updateStyle=mxUtils.bind(this,
-function(){L=Editor.isDarkMode()?{outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};c.style[n?"borderRight":"borderBottom"]="0.5px solid "+L.strokeClr;c.style.borderLeft="0.5px solid "+L.strokeClr});this.updateStyle();b.diagramContainer.appendChild(c);mxEvent.disableContextMenu(c);this.editorUiRefresh=b.refresh;b.refresh=function(D){K.editorUiRefresh.apply(b,
-arguments);x()};x();var f=document.createElement("canvas");f.width=c.offsetWidth;f.height=c.offsetHeight;c.style.overflow="hidden";f.style.position="relative";c.appendChild(f);var l=f.getContext("2d");this.ui=b;var m=b.editor.graph;this.graph=m;this.container=c;this.canvas=f;var t=function(D,A,S,R,T){D=Math.round(D);A=Math.round(A);S=Math.round(S);R=Math.round(R);l.beginPath();l.moveTo(D+.5,A+.5);l.lineTo(S+.5,R+.5);l.stroke();T&&(n?(l.save(),l.translate(D,A),l.rotate(-Math.PI/2),l.fillText(T,0,0),
-l.restore()):l.fillText(T,D,A))},v=function(){l.clearRect(0,0,f.width,f.height);l.beginPath();l.lineWidth=.7;l.strokeStyle=L.strokeClr;l.setLineDash([]);l.font="9px Arial";l.textAlign="center";var D=m.view.scale,A=m.view.getBackgroundPageBounds(),S=m.view.translate,R=m.pageVisible;S=R?N+(n?A.y-m.container.scrollTop:A.x-m.container.scrollLeft):N+(n?S.y*D-m.container.scrollTop:S.x*D-m.container.scrollLeft);var T=0;R&&(T=m.getPageLayout(),T=n?T.y*m.pageFormat.height:T.x*m.pageFormat.width);var P;switch(K.unit){case mxConstants.POINTS:var q=
-P=10;var u=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:P=10;q=mxConstants.PIXELS_PER_MM;u=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:P=20;q=mxConstants.PIXELS_PER_MM;u=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:P=.5>=D||4<=D?8:16,q=mxConstants.PIXELS_PER_INCH/P,u=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var J=q;2<=D?J=q/(2*Math.floor(D/2)):.5>=D&&(J=q*Math.floor(1/D/2)*(K.unit==mxConstants.MILLIMETERS?2:1));q=null;A=R?Math.min(S+(n?A.height:A.width),n?
-f.height:f.width):n?f.height:f.width;if(R)if(l.fillStyle=L.outBkgClr,n){var G=S-N;0<G&&l.fillRect(0,N,N,G);A<f.height&&l.fillRect(0,A,N,f.height)}else G=S-N,0<G&&l.fillRect(N,0,G,N),A<f.width&&l.fillRect(A,0,f.width,N);l.fillStyle=L.fontClr;for(R=R?S:S%(J*D);R<=A;R+=J*D)if(G=Math.round((R-S)/D/J),!(R<N||G==q)){q=G;var H=null;0==G%P&&(H=K.formatText(T+G*J)+"");n?t(N-u[Math.abs(G)%P],R,N,R,H):t(R,N-u[Math.abs(G)%P],R,N,H)}l.lineWidth=1;t(n?0:N,n?N:0,N,N);l.fillStyle=L.cornerClr;l.fillRect(0,0,N,N)},
-B=-1,E=function(){null!=y?(null!=F&&F(B),B=y(v)):v()};this.drawRuler=E;this.sizeListener=k=z(function(){var D=m.container;n?(D=D.offsetHeight+N,f.height!=D&&(f.height=D,c.style.height=D+"px",E())):(D=D.offsetWidth+N,f.width!=D&&(f.width=D,c.style.width=D+"px",E()))},10);this.pageListener=function(){E()};this.scrollListener=d=z(function(){var D=n?m.container.scrollTop:m.container.scrollLeft;K.lastScroll!=D&&(K.lastScroll=D,E())},10);this.unitListener=function(D,A){K.setUnit(A.getProperty("unit"))};
-m.addListener(mxEvent.SIZE,k);m.container.addEventListener("scroll",d);m.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(D){L=D;c.style.background=L.bkgClr;v()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(D,A,S,R){if(n&&4<D.height||!n&&4<D.width){if(null!=K.guidePart)try{l.putImageData(K.guidePart.imgData1,
-K.guidePart.x1,K.guidePart.y1),l.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),l.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3)}catch(I){}var T=K.origGuideMove.apply(this,arguments);try{l.lineWidth=.5;l.strokeStyle=L.guideClr;l.setLineDash([2]);if(n){var P=D.y+T.y+N-this.graph.container.scrollTop;var q=0;var u=P+D.height/2;var J=N/2;var G=P+D.height;var H=0;var g=l.getImageData(q,P-1,N,3);t(q,P,N,P);P--;var p=l.getImageData(J,u-1,N,3);t(J,u,N,u);u--;var C=l.getImageData(H,
-G-1,N,3);t(H,G,N,G);G--}else P=0,q=D.x+T.x+N-this.graph.container.scrollLeft,u=N/2,J=q+D.width/2,G=0,H=q+D.width,g=l.getImageData(q-1,P,3,N),t(q,P,q,N),q--,p=l.getImageData(J-1,u,3,N),t(J,u,J,N),J--,C=l.getImageData(H-1,G,3,N),t(H,G,H,N),H--;if(null==K.guidePart||K.guidePart.x1!=q||K.guidePart.y1!=P)K.guidePart={imgData1:g,x1:q,y1:P,imgData2:p,x2:J,y2:u,imgData3:C,x3:H,y3:G}}catch(I){}}else T=K.origGuideMove.apply(this,arguments);return T};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
-function(){var D=K.origGuideDestroy.apply(this,arguments);if(null!=K.guidePart)try{l.putImageData(K.guidePart.imgData1,K.guidePart.x1,K.guidePart.y1),l.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),l.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3),K.guidePart=null}catch(A){}return D}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
+function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var d=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){d.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var v=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(J,L){null!=L.shortcut&&900>n&&!mxClient.IS_IOS?J.firstChild.nextSibling.setAttribute("title",L.shortcut):v.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
+function(J){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=J?J:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var A=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();A.apply(this,arguments)};var z=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(J){z.apply(this,
+arguments);if(J){var L=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=L&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=L&&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(){};EditorUi.prototype.installFormatToolbar=function(J){var L=
+this.editor.graph,c=document.createElement("div");c.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%;";L.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(f,k){0<L.getSelectionCount()?(J.appendChild(c),c.innerHTML="Selected: "+L.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var D=!1;EditorUi.prototype.initFormatWindow=
+function(){if(!D&&null!=this.formatWindow){D=!0;var J=this.formatWindow.window.toggleMinimized,L=240;this.formatWindow.window.toggleMinimized=function(){J.apply(this,arguments);this.minimized?(L=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+L-140+"px"):(this.div.style.width=L+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-L+140)+"px");this.fit()};
+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var P=EditorUi.prototype.init;EditorUi.prototype.init=function(){function J(B,K,M){var N=m.menus.get(B);K=y.addMenu(mxResources.get(B),mxUtils.bind(this,function(){N.funct.apply(this,arguments)}));K.className="geButton";K.setAttribute("title",mxResources.get(B));m.menus.menuCreated(N,K,"geButton");null!=M&&
+(K.style.backgroundImage="url("+M+")",K.innerText="");return K}function L(B,K,M,N,R,T){var V=document.createElement("a");V.className="geButton";x.appendChild(V);null!=T?V.style.backgroundImage="url("+T+")":mxUtils.write(V,B);mxEvent.addListener(V,"click",function(X){"disabled"!=V.getAttribute("disabled")&&K(X);mxEvent.consume(X)});mxEvent.preventDefault(V);null!=N&&V.setAttribute("title",N);null!=R&&(B=function(){R.isEnabled()?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},R.addListener("stateChanged",
+B),t.addListener("enabledChanged",B),B());return V}function c(B,K,M){K=document.createElement("div");K.className="geButtonGroup";for(M=0;M<B.length;M++)null!=B[M]&&K.appendChild(B[M]);x.appendChild(K);return K}function f(){n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;x.innerHTML="";var B=1E3>n,K=J("diagram",null,B?Editor.menuImage:null);c([K,L(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),m.actions.get("image"),
+B?Editor.shapesImage:null),L(mxResources.get("format"),m.actions.get("format").funct,null,mxResources.get("format")+" ("+m.actions.get("format").shortcut+")",m.actions.get("image"),B?Editor.formatImage:null)]);K=J("insert",!0,B?U:null);c([K,L(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),B?Editor.trashImage:null)]);t.isEnabled()||K.setAttribute("disabled","disabled");H.setAttribute("title",mxResources.get("undo")+" ("+I.shortcut+")");
+g.setAttribute("title",mxResources.get("redo")+" ("+G.shortcut+")");p.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=n&&(c([H,g]),520<=n&&c([p,640<=n?L("",q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",q,Editor.zoomInImage):null,640<=n?L("",u.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",u,Editor.zoomOutImage):null]));x.appendChild(m.statusContainer);x.appendChild(m.buttonContainer)}P.apply(this,arguments);var k=mxUtils.isAncestorNode(document.body,
+this.container)?this.container:this.editor.graph.container;null!=k&&(k.classList.add("geSimple"),k.classList.add("geMinimal"),k.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])l(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&
+1E3<=n&&(b(this,!0),this.formatWindow.window.setVisible(!0));var m=this,t=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));var x=document.createElement("div");x.className="geMenubarContainer";var y=new Menubar(m,x),F=m.hideCurrentMenu;m.hideCurrentMenu=function(){F.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var E=m.descriptorChanged;m.descriptorChanged=function(){E.apply(this,arguments);var B=m.getCurrentFile();if(null!=B&&null!=B.getTitle()){var K=B.getMode();
+"google"==K?K="googleDrive":"github"==K?K="gitHub":"gitlab"==K?K="gitLab":"onedrive"==K&&(K="oneDrive");K=mxResources.get(K);x.setAttribute("title",B.getTitle()+(null!=K?" ("+K+")":""))}else x.removeAttribute("title")};m.setStatusText(m.editor.getStatus());x.appendChild(m.statusContainer);m.buttonContainer=this.createButtonContainer();x.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=this.createTabContainer();var C=this.createZoomInput(!0),S=m.updateTabContainer;
+m.updateTabContainer=function(){S.apply(this,arguments);m.tabContainer.appendChild(C)};var U=Editor.addBoxImage;if(null!=m.hoverIcons){var Q=m.hoverIcons.update;m.hoverIcons.update=function(){t.freehand.isDrawing()||Q.apply(this,arguments)}}if(null!=t.freehand){var O=t.freehand.createStyle;t.freehand.createStyle=function(B){return O.apply(this,arguments)+"sketch=0;"}}m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus())}));m.setStatusText(m.editor.getStatus());
+var q=m.actions.get("zoomIn"),u=m.actions.get("zoomOut");k=m.actions.get("resetView");var I=m.actions.get("undo"),G=m.actions.get("redo"),H=L("",I.funct,null,"",I,Editor.undoImage),g=L("",G.funct,null,"",G,Editor.redoImage),p=L("",function(B){mxEvent.isAltDown(B)?(m.hideCurrentMenu(),m.actions.get("customZoom").funct()):(m.hideCurrentMenu(),m.actions.get("smartFit").funct());mxEvent.consume(B)},!0,"",k,Editor.zoomFitImage);m.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){l(m,null)});
+m.container.appendChild(m.tabContainer);m.container.appendChild(x);m.updateTabContainer();!EditorUi.windowed&&1E3<=n&&b(this,!0);f();m.addListener("lockedChanged",f);m.addListener("languageChanged",f);m.editor.graph.addListener("enabledChanged",f);mxEvent.addListener(window,"resize",function(){f();null!=m.sidebarWindow&&m.sidebarWindow.window.fit();null!=m.formatWindow&&m.formatWindow.window.fit();null!=m.actions.outlineWindow&&m.actions.outlineWindow.window.fit();null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();
+null!=m.menus.chatWindow&&m.menus.chatWindow.window.fit();null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var l=EditorUi.initTheme;EditorUi.initTheme=function(){l.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,v,A,z){var D=v.y,P=v.x,J=!1,L=!1;if(null!=this.states&&null!=d&&null!=v){var c=this,f=new mxCellState,k=this.graph.getView().scale,m=Math.max(2,this.getGuideTolerance()/2);f.x=d.x+P;f.y=d.y+D;f.width=d.width;f.height=d.height;for(var t=[],x=[],y=0;y<this.states.length;y++){var F=this.states[y];F instanceof mxCellState&&(z||!this.graph.isCellSelected(F.cell))&&((f.x>=F.x&&f.x<=F.x+F.width||F.x>=f.x&&F.x<=f.x+f.width)&&(f.y>
+F.y+F.height+4||f.y+f.height+4<F.y)?t.push(F):(f.y>=F.y&&f.y<=F.y+F.height||F.y>=f.y&&F.y<=f.y+f.height)&&(f.x>F.x+F.width+4||f.x+f.width+4<F.x)&&x.push(F))}var E=0,C=0,S=F=0,U=0,Q=0,O=0,q=0,u=5*k;if(1<t.length){t.push(f);t.sort(function(g,p){return g.y-p.y});var I=!1;y=f==t[0];k=f==t[t.length-1];if(!y&&!k)for(y=1;y<t.length-1;y++)if(f==t[y]){k=t[y-1];y=t[y+1];F=C=S=(y.y-k.y-k.height-f.height)/2;break}for(y=0;y<t.length-1;y++){k=t[y];var G=t[y+1],H=f==k||f==G;G=G.y-k.y-k.height;I|=f==k;if(0==C&&0==
+E)C=G,E=1;else if(Math.abs(C-G)<=(H||1==y&&I?m:0))E+=1;else if(1<E&&I){t=t.slice(0,y+1);break}else if(3<=t.length-y&&!I)E=0,F=C=0!=S?S:0,t.splice(0,0==y?1:y),y=-1;else break;0!=F||H||(C=F=G)}3==t.length&&t[1]==f&&(F=0)}if(1<x.length){x.push(f);x.sort(function(g,p){return g.x-p.x});I=!1;y=f==x[0];k=f==x[x.length-1];if(!y&&!k)for(y=1;y<x.length-1;y++)if(f==x[y]){k=x[y-1];y=x[y+1];O=Q=q=(y.x-k.x-k.width-f.width)/2;break}for(y=0;y<x.length-1;y++){k=x[y];G=x[y+1];H=f==k||f==G;G=G.x-k.x-k.width;I|=f==k;
+if(0==Q&&0==U)Q=G,U=1;else if(Math.abs(Q-G)<=(H||1==y&&I?m:0))U+=1;else if(1<U&&I){x=x.slice(0,y+1);break}else if(3<=x.length-y&&!I)U=0,O=Q=0!=q?q:0,x.splice(0,0==y?1:y),y=-1;else break;0!=O||H||(Q=O=G)}3==x.length&&x[1]==f&&(O=0)}m=function(g,p,B,K){var M=[];if(K){K=u;var N=0}else K=0,N=u;M.push(new mxPoint(g.x-K,g.y-N));M.push(new mxPoint(g.x+K,g.y+N));M.push(g);M.push(p);M.push(new mxPoint(p.x-K,p.y-N));M.push(new mxPoint(p.x+K,p.y+N));if(null!=B)return B.points=M,B;g=new mxPolyline(M,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);g.dialect=mxConstants.DIALECT_SVG;g.pointerEvents=!1;g.init(c.graph.getView().getOverlayPane());return g};Q=function(g,p){if(g&&null!=c.guidesArrHor)for(g=0;g<c.guidesArrHor.length;g++)c.guidesArrHor[g].node.style.visibility="hidden";if(p&&null!=c.guidesArrVer)for(g=0;g<c.guidesArrVer.length;g++)c.guidesArrVer[g].node.style.visibility="hidden"};if(1<U&&U==x.length-1){U=[];q=c.guidesArrHor;J=[];P=0;y=x[0]==f?1:0;I=x[y].y+x[y].height;if(0<O)for(y=0;y<x.length-1;y++)k=
+x[y],G=x[y+1],f==k?(P=G.x-k.width-O,J.push(new mxPoint(P+k.width+u,I)),J.push(new mxPoint(G.x-u,I))):f==G?(J.push(new mxPoint(k.x+k.width+u,I)),P=k.x+k.width+O,J.push(new mxPoint(P-u,I))):(J.push(new mxPoint(k.x+k.width+u,I)),J.push(new mxPoint(G.x-u,I)));else k=x[0],y=x[2],P=k.x+k.width+(y.x-k.x-k.width-f.width)/2,J.push(new mxPoint(k.x+k.width+u,I)),J.push(new mxPoint(P-u,I)),J.push(new mxPoint(P+f.width+u,I)),J.push(new mxPoint(y.x-u,I));for(y=0;y<J.length;y+=2)x=J[y],O=J[y+1],x=m(x,O,null!=q?
+q[y/2]:null),x.node.style.visibility="visible",x.redraw(),U.push(x);for(y=J.length/2;null!=q&&y<q.length;y++)q[y].destroy();c.guidesArrHor=U;P-=d.x;J=!0}else Q(!0);if(1<E&&E==t.length-1){U=[];q=c.guidesArrVer;L=[];D=0;y=t[0]==f?1:0;E=t[y].x+t[y].width;if(0<F)for(y=0;y<t.length-1;y++)k=t[y],G=t[y+1],f==k?(D=G.y-k.height-F,L.push(new mxPoint(E,D+k.height+u)),L.push(new mxPoint(E,G.y-u))):f==G?(L.push(new mxPoint(E,k.y+k.height+u)),D=k.y+k.height+F,L.push(new mxPoint(E,D-u))):(L.push(new mxPoint(E,k.y+
+k.height+u)),L.push(new mxPoint(E,G.y-u)));else k=t[0],y=t[2],D=k.y+k.height+(y.y-k.y-k.height-f.height)/2,L.push(new mxPoint(E,k.y+k.height+u)),L.push(new mxPoint(E,D-u)),L.push(new mxPoint(E,D+f.height+u)),L.push(new mxPoint(E,y.y-u));for(y=0;y<L.length;y+=2)x=L[y],O=L[y+1],x=m(x,O,null!=q?q[y/2]:null,!0),x.node.style.visibility="visible",x.redraw(),U.push(x);for(y=L.length/2;null!=q&&y<q.length;y++)q[y].destroy();c.guidesArrVer=U;D-=d.y;L=!0}else Q(!1,!0)}if(J||L)return f=new mxPoint(P,D),t=b.call(this,
+d,f,A,z),J&&!L?f.y=t.y:L&&!J&&(f.x=t.x),t.y!=f.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),t.x!=f.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),f;Q(!0,!0);return b.apply(this,arguments)};var l=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){l.call(this,d);var v=this.guidesArrVer,A=this.guidesArrHor;if(null!=v)for(var z=0;z<v.length;z++)v[z].node.style.visibility=d?"visible":"hidden";if(null!=
+A)for(z=0;z<A.length;z++)A[z].node.style.visibility=d?"visible":"hidden"};var n=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){n.call(this);var d=this.guidesArrVer,v=this.guidesArrHor;if(null!=d){for(var A=0;A<d.length;A++)d[A].destroy();this.guidesArrVer=null}if(null!=v){for(A=0;A<v.length;A++)v[A].destroy();this.guidesArrHor=null}}})();function mxRuler(b,l,n,d){function v(){var E=b.getDiagramContainerOffset(),C=b.diagramContainer;c.style.top=C.offsetTop-E.y+"px";c.style.left=C.offsetLeft-E.x+"px";c.style.width=(n?0:C.offsetWidth)+P+"px";c.style.height=(n?C.offsetHeight:0)+P+"px"}function A(E,C,S){if(null!=z)return E;var U;return function(){var Q=this,O=arguments,q=S&&!U;clearTimeout(U);U=setTimeout(function(){U=null;S||E.apply(Q,O)},C);q&&E.apply(Q,O)}}var z=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||
+window.msRequestAnimationFrame,D=window.cancelAnimationFrame||window.mozCancelAnimationFrame,P=this.RULER_THICKNESS,J=this;this.unit=l;var L=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},c=document.createElement("div");c.className="geRuler";c.style.position="fixed";this.updateStyle=mxUtils.bind(this,
+function(){L=Editor.isDarkMode()?{outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};c.style[n?"borderRight":"borderBottom"]="0.5px solid "+L.strokeClr;c.style.borderLeft="0.5px solid "+L.strokeClr});this.updateStyle();b.diagramContainer.appendChild(c);mxEvent.disableContextMenu(c);this.editorUiRefresh=b.refresh;b.refresh=function(E){J.editorUiRefresh.apply(b,
+arguments);v()};v();var f=document.createElement("canvas");f.width=c.offsetWidth;f.height=c.offsetHeight;c.style.overflow="hidden";f.style.position="relative";c.appendChild(f);var k=f.getContext("2d");this.ui=b;var m=b.editor.graph;this.graph=m;this.container=c;this.canvas=f;var t=function(E,C,S,U,Q){E=Math.round(E);C=Math.round(C);S=Math.round(S);U=Math.round(U);k.beginPath();k.moveTo(E+.5,C+.5);k.lineTo(S+.5,U+.5);k.stroke();Q&&(n?(k.save(),k.translate(E,C),k.rotate(-Math.PI/2),k.fillText(Q,0,0),
+k.restore()):k.fillText(Q,E,C))},x=function(){k.clearRect(0,0,f.width,f.height);k.beginPath();k.lineWidth=.7;k.strokeStyle=L.strokeClr;k.setLineDash([]);k.font="9px Arial";k.textAlign="center";var E=m.view.scale,C=m.view.getBackgroundPageBounds(),S=m.view.translate,U=m.pageVisible;S=U?P+(n?C.y-m.container.scrollTop:C.x-m.container.scrollLeft):P+(n?S.y*E-m.container.scrollTop:S.x*E-m.container.scrollLeft);var Q=0;U&&(Q=m.getPageLayout(),Q=n?Q.y*m.pageFormat.height:Q.x*m.pageFormat.width);var O;switch(J.unit){case mxConstants.POINTS:var q=
+O=10;var u=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:O=10;q=mxConstants.PIXELS_PER_MM;u=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:O=20;q=mxConstants.PIXELS_PER_MM;u=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:O=.5>=E||4<=E?8:16,q=mxConstants.PIXELS_PER_INCH/O,u=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var I=q;2<=E?I=q/(2*Math.floor(E/2)):.5>=E&&(I=q*Math.floor(1/E/2)*(J.unit==mxConstants.MILLIMETERS?2:1));q=null;C=U?Math.min(S+(n?C.height:C.width),n?
+f.height:f.width):n?f.height:f.width;if(U)if(k.fillStyle=L.outBkgClr,n){var G=S-P;0<G&&k.fillRect(0,P,P,G);C<f.height&&k.fillRect(0,C,P,f.height)}else G=S-P,0<G&&k.fillRect(P,0,G,P),C<f.width&&k.fillRect(C,0,f.width,P);k.fillStyle=L.fontClr;for(U=U?S:S%(I*E);U<=C;U+=I*E)if(G=Math.round((U-S)/E/I),!(U<P||G==q)){q=G;var H=null;0==G%O&&(H=J.formatText(Q+G*I)+"");n?t(P-u[Math.abs(G)%O],U,P,U,H):t(U,P-u[Math.abs(G)%O],U,P,H)}k.lineWidth=1;t(n?0:P,n?P:0,P,P);k.fillStyle=L.cornerClr;k.fillRect(0,0,P,P)},
+y=-1,F=function(){null!=z?(null!=D&&D(y),y=z(x)):x()};this.drawRuler=F;this.sizeListener=l=A(function(){var E=m.container;n?(E=E.offsetHeight+P,f.height!=E&&(f.height=E,c.style.height=E+"px",F())):(E=E.offsetWidth+P,f.width!=E&&(f.width=E,c.style.width=E+"px",F()))},10);this.pageListener=function(){F()};this.scrollListener=d=A(function(){var E=n?m.container.scrollTop:m.container.scrollLeft;J.lastScroll!=E&&(J.lastScroll=E,F())},10);this.unitListener=function(E,C){J.setUnit(C.getProperty("unit"))};
+m.addListener(mxEvent.SIZE,l);m.container.addEventListener("scroll",d);m.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(E){L=E;c.style.background=L.bkgClr;x()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(E,C,S,U){if(n&&4<E.height||!n&&4<E.width){if(null!=J.guidePart)try{k.putImageData(J.guidePart.imgData1,
+J.guidePart.x1,J.guidePart.y1),k.putImageData(J.guidePart.imgData2,J.guidePart.x2,J.guidePart.y2),k.putImageData(J.guidePart.imgData3,J.guidePart.x3,J.guidePart.y3)}catch(K){}var Q=J.origGuideMove.apply(this,arguments);try{k.lineWidth=.5;k.strokeStyle=L.guideClr;k.setLineDash([2]);if(n){var O=E.y+Q.y+P-this.graph.container.scrollTop;var q=0;var u=O+E.height/2;var I=P/2;var G=O+E.height;var H=0;var g=k.getImageData(q,O-1,P,3);t(q,O,P,O);O--;var p=k.getImageData(I,u-1,P,3);t(I,u,P,u);u--;var B=k.getImageData(H,
+G-1,P,3);t(H,G,P,G);G--}else O=0,q=E.x+Q.x+P-this.graph.container.scrollLeft,u=P/2,I=q+E.width/2,G=0,H=q+E.width,g=k.getImageData(q-1,O,3,P),t(q,O,q,P),q--,p=k.getImageData(I-1,u,3,P),t(I,u,I,P),I--,B=k.getImageData(H-1,G,3,P),t(H,G,H,P),H--;if(null==J.guidePart||J.guidePart.x1!=q||J.guidePart.y1!=O)J.guidePart={imgData1:g,x1:q,y1:O,imgData2:p,x2:I,y2:u,imgData3:B,x3:H,y3:G}}catch(K){}}else Q=J.origGuideMove.apply(this,arguments);return Q};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
+function(){var E=J.origGuideDestroy.apply(this,arguments);if(null!=J.guidePart)try{k.putImageData(J.guidePart.imgData1,J.guidePart.x1,J.guidePart.y1),k.putImageData(J.guidePart.imgData2,J.guidePart.x2,J.guidePart.y2),k.putImageData(J.guidePart.imgData3,J.guidePart.x3,J.guidePart.y3),J.guidePart=null}catch(C){}return E}}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(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
-function mxDualRuler(b,k){var n=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return n};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,k,!0);this.hRuler=new mxRuler(b,k,!1,!0);k=mxUtils.bind(this,function(d){var x=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,
-function(z){x=null!=b.currentMenu;mxEvent.consume(z)}),null,mxUtils.bind(this,function(z){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(z)||mxEvent.isPopupTrigger(z))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(z)||!x){var y=new mxPopupMenu(mxUtils.bind(this,function(K,L){b.menus.addMenuItems(K,["points","inches","millimeters","meters"],L)}));y.smartSeparators=!0;y.showDisabled=!0;y.autoExpand=!0;y.hideMenu=mxUtils.bind(this,
-function(){mxPopupMenu.prototype.hideMenu.apply(y,arguments);b.resetCurrentMenu();y.destroy()});var F=mxEvent.getClientX(z),N=mxEvent.getClientY(z);y.popup(F,N,null,z);b.setCurrentMenu(y,d)}mxEvent.consume(z)}}))});k(this.hRuler.container);k(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 k=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=k){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var n=mxFreehand.prototype.MILD_SMOOTHING,d=null,x=[],z,y=[],F,N=!1,K=!0,L=!0,c=!0,f=!0,l=[],m=!1,t=!1,v=!1,B="default",E={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},D=!0;this.setClosedPath=function(u){N=u};this.setAutoClose=function(u){K=u};this.setAutoInsert=
-function(u){L=u};this.setAutoScroll=function(u){c=u};this.setOpenFill=function(u){f=u};this.setStopClickEnabled=function(u){t=u};this.setSelectInserted=function(u){v=u};this.setSmoothing=function(u){n=u};this.getSmoothing=function(){return n};this.setPerfectFreehandMode=function(u){D=u};this.isPerfectFreehandMode=function(){return D};this.setBrushSize=function(u){E.size=u};this.getBrushSize=function(){return E.size};var A=function(u){m=u;b.getRubberband().setEnabled(!u);b.graphHandler.setSelectEnabled(!u);
-b.graphHandler.setMoveEnabled(!u);u?b.container.classList.add("geFreehandMode"):b.container.classList.remove("geFreehandMode");b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){A(!0)};this.isDrawing=function(){return m};var S=mxUtils.bind(this,function(u){if(d){var J=F.length,G=t&&0<y.length&&null!=F&&2>F.length;G||y.push.apply(y,F);F=[];y.push(null);x.push(d);d=null;(G||L)&&this.stopDrawing();L&&(!G||2<=J)&&this.startDrawing();mxEvent.consume(u)}}),R=new mxCell;
-R.edge=!0;this.getStrokeColor=function(u){var J=null!=B?B:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=J||u||(J=b.shapeForegroundColor);return J};this.setStrokeColor=function(u){B=u};this.createStyle=function(u){var J=";fillColor=none;";D&&(J=";lineShape=1;");J+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+u+J};this.stopDrawing=function(){if(0<x.length){if(D){for(var u=
-[],J=0;J<y.length;J++)null!=y[J]&&u.push([y[J].x,y[J].y]);u=PerfectFreehand.getStroke(u,E);y=[];for(J=0;J<u.length;J++)y.push({x:u[J][0],y:u[J][1]});y.push(null)}u=y[0].x;var G=y[0].x,H=y[0].y,g=y[0].y;for(J=1;J<y.length;J++)null!=y[J]&&(u=Math.max(u,y[J].x),G=Math.min(G,y[J].x),H=Math.max(H,y[J].y),g=Math.min(g,y[J].y));u-=G;H-=g;if(0<u&&0<H){var p=100/u,C=100/H;y.map(function(U){if(null==U)return U;U.x=(U.x-G)*p;U.y=(U.y-g)*C;return U});var I='<shape strokewidth="inherit"><foreground>',M=0;for(J=
-0;J<y.length;J++){var O=y[J];if(null==O){O=!1;M=y[M];var Q=y[J-1];!N&&K&&(O=M.x-Q.x,Q=M.y-Q.y,O=Math.sqrt(O*O+Q*Q)<=b.tolerance);if(N||O)I+='<line x="'+M.x.toFixed(2)+'" y="'+M.y.toFixed(2)+'"/>';I+="</path>"+(f||N||O?"<fillstroke/>":"<stroke/>");M=J+1}else I=J==M?I+('<path><move x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>'):I+('<line x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>')}I+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){J=this.createStyle("stencil("+
-Graph.compress(I)+")");I=b.view.scale;M=b.view.translate;J=new mxCell("",new mxGeometry(G/I-M.x,g/I-M.y,u/I,H/I),J);J.vertex=1;b.model.beginUpdate();try{J=b.addCell(J),b.fireEvent(new mxEventObject("cellsInserted","cells",[J])),b.fireEvent(new mxEventObject("freehandInserted","cell",J))}finally{b.model.endUpdate()}v&&b.setSelectionCells([J])}}for(J=0;J<x.length;J++)x[J].parentNode.removeChild(x[J]);d=null;x=[];y=[]}A(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(u,J){m&&J.getProperty("event").consume()}));
-b.addMouseListener({mouseDown:mxUtils.bind(this,function(u,J){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(u=J.getEvent(),m&&!mxEvent.isPopupTrigger(u)&&!mxEvent.isMiddleMouseButton(u)&&!mxEvent.isMultiTouchEvent(u))){var G=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);G=Math.max(1,G*b.view.scale);var H=this.getStrokeColor();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",D?H:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",
-H);d.setAttribute("stroke-width",G);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(H=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",H=H.split(" ").map(function(g){return parseFloat(g)*G}).join(" "),d.setAttribute("stroke-dasharray",H));l=[];u=T(u);P(u);z="M"+u.x+" "+u.y;y.push(u);F=[];d.setAttribute("d",D?PerfectFreehand.getSvgPathFromStroke([[u.x,u.y]],E):z);k.appendChild(d);J.consume()}}),mouseMove:mxUtils.bind(this,function(u,J){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){u=
-J.getEvent();u=T(u);P(u);var G=q(0);if(G)if(y.push(G),D){var H=[];for(G=0;G<y.length;G++)H.push([y[G].x,y[G].y]);F=[];for(var g=2;g<l.length;g+=2)G=q(g),H.push([G.x,G.y]),F.push(G);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(H,E))}else{z+=" L"+G.x+" "+G.y;H="";F=[];for(g=2;g<l.length;g+=2)G=q(g),H+=" L"+G.x+" "+G.y,F.push(G);d.setAttribute("d",z+H)}c&&(G=b.view.translate,b.scrollRectToVisible((new mxRectangle(u.x-G.x,u.y-G.y)).grow(20)));J.consume()}}),mouseUp:mxUtils.bind(this,function(u,
-J){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(S(J.getEvent()),J.consume())})});var T=function(u){return mxUtils.convertPoint(b.container,mxEvent.getClientX(u),mxEvent.getClientY(u))},P=function(u){for(l.push(u);l.length>n;)l.shift()},q=function(u){var J=l.length;if(1===J%2||J>=n){var G=0,H=0,g,p=0;for(g=u;g<J;g++)p++,u=l[g],G+=u.x,H+=u.y;return{x:G/p,y:H/p}}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;DrawioUser=function(b,k,n,d,x){this.id=b;this.email=k;this.displayName=n;this.pictureUrl=d;this.locale=x};DrawioComment=function(b,k,n,d,x,z,y){this.file=b;this.id=k;this.content=n;this.modifiedDate=d;this.createdDate=x;this.isResolved=z;this.user=y;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,k,n,d,x){k()};DrawioComment.prototype.editComment=function(b,k,n){k()};DrawioComment.prototype.deleteComment=function(b,k){b()};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;
+function mxDualRuler(b,l){var n=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return n};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,l,!0);this.hRuler=new mxRuler(b,l,!1,!0);l=mxUtils.bind(this,function(d){var v=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,
+function(A){v=null!=b.currentMenu;mxEvent.consume(A)}),null,mxUtils.bind(this,function(A){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(A)||mxEvent.isPopupTrigger(A))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(A)||!v){var z=new mxPopupMenu(mxUtils.bind(this,function(J,L){b.menus.addMenuItems(J,["points","inches","millimeters","meters"],L)}));z.smartSeparators=!0;z.showDisabled=!0;z.autoExpand=!0;z.hideMenu=mxUtils.bind(this,
+function(){mxPopupMenu.prototype.hideMenu.apply(z,arguments);b.resetCurrentMenu();z.destroy()});var D=mxEvent.getClientX(A),P=mxEvent.getClientY(A);z.popup(D,P,null,A);b.setCurrentMenu(z,d)}mxEvent.consume(A)}}))});l(this.hRuler.container);l(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 l=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=l){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var n=mxFreehand.prototype.MILD_SMOOTHING,d=null,v=[],A,z=[],D,P=!1,J=!0,L=!0,c=!0,f=!0,k=[],m=!1,t=!1,x=!1,y="default",F={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},E=!0;this.setClosedPath=function(u){P=u};this.setAutoClose=function(u){J=u};this.setAutoInsert=
+function(u){L=u};this.setAutoScroll=function(u){c=u};this.setOpenFill=function(u){f=u};this.setStopClickEnabled=function(u){t=u};this.setSelectInserted=function(u){x=u};this.setSmoothing=function(u){n=u};this.getSmoothing=function(){return n};this.setPerfectFreehandMode=function(u){E=u};this.isPerfectFreehandMode=function(){return E};this.setBrushSize=function(u){F.size=u};this.getBrushSize=function(){return F.size};var C=function(u){m=u;b.getRubberband().setEnabled(!u);b.graphHandler.setSelectEnabled(!u);
+b.graphHandler.setMoveEnabled(!u);u?b.container.classList.add("geFreehandMode"):b.container.classList.remove("geFreehandMode");b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){C(!0)};this.isDrawing=function(){return m};var S=mxUtils.bind(this,function(u){if(d){var I=D.length,G=t&&0<z.length&&null!=D&&2>D.length;G||z.push.apply(z,D);D=[];z.push(null);v.push(d);d=null;(G||L)&&this.stopDrawing();L&&(!G||2<=I)&&this.startDrawing();mxEvent.consume(u)}}),U=new mxCell;
+U.edge=!0;this.getStrokeColor=function(u){var I=null!=y?y:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(U),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=I||u||(I=b.shapeForegroundColor);return I};this.setStrokeColor=function(u){y=u};this.createStyle=function(u){var I=";fillColor=none;";E&&(I=";lineShape=1;");I+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+u+I};this.stopDrawing=function(){if(0<v.length){if(E){for(var u=
+[],I=0;I<z.length;I++)null!=z[I]&&u.push([z[I].x,z[I].y]);u=PerfectFreehand.getStroke(u,F);z=[];for(I=0;I<u.length;I++)z.push({x:u[I][0],y:u[I][1]});z.push(null)}u=z[0].x;var G=z[0].x,H=z[0].y,g=z[0].y;for(I=1;I<z.length;I++)null!=z[I]&&(u=Math.max(u,z[I].x),G=Math.min(G,z[I].x),H=Math.max(H,z[I].y),g=Math.min(g,z[I].y));u-=G;H-=g;if(0<u&&0<H){var p=100/u,B=100/H;z.map(function(T){if(null==T)return T;T.x=(T.x-G)*p;T.y=(T.y-g)*B;return T});var K='<shape strokewidth="inherit"><foreground>',M=0;for(I=
+0;I<z.length;I++){var N=z[I];if(null==N){N=!1;M=z[M];var R=z[I-1];!P&&J&&(N=M.x-R.x,R=M.y-R.y,N=Math.sqrt(N*N+R*R)<=b.tolerance);if(P||N)K+='<line x="'+M.x.toFixed(2)+'" y="'+M.y.toFixed(2)+'"/>';K+="</path>"+(f||P||N?"<fillstroke/>":"<stroke/>");M=I+1}else K=I==M?K+('<path><move x="'+N.x.toFixed(2)+'" y="'+N.y.toFixed(2)+'"/>'):K+('<line x="'+N.x.toFixed(2)+'" y="'+N.y.toFixed(2)+'"/>')}K+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){I=this.createStyle("stencil("+
+Graph.compress(K)+")");K=b.view.scale;M=b.view.translate;I=new mxCell("",new mxGeometry(G/K-M.x,g/K-M.y,u/K,H/K),I);I.vertex=1;b.model.beginUpdate();try{I=b.addCell(I),b.fireEvent(new mxEventObject("cellsInserted","cells",[I])),b.fireEvent(new mxEventObject("freehandInserted","cell",I))}finally{b.model.endUpdate()}x&&b.setSelectionCells([I])}}for(I=0;I<v.length;I++)v[I].parentNode.removeChild(v[I]);d=null;v=[];z=[]}C(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(u,I){m&&I.getProperty("event").consume()}));
+b.addMouseListener({mouseDown:mxUtils.bind(this,function(u,I){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(u=I.getEvent(),m&&!mxEvent.isPopupTrigger(u)&&!mxEvent.isMiddleMouseButton(u)&&!mxEvent.isMultiTouchEvent(u))){var G=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);G=Math.max(1,G*b.view.scale);var H=this.getStrokeColor();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",E?H:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",
+H);d.setAttribute("stroke-width",G);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(H=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",H=H.split(" ").map(function(g){return parseFloat(g)*G}).join(" "),d.setAttribute("stroke-dasharray",H));k=[];u=Q(u);O(u);A="M"+u.x+" "+u.y;z.push(u);D=[];d.setAttribute("d",E?PerfectFreehand.getSvgPathFromStroke([[u.x,u.y]],F):A);l.appendChild(d);I.consume()}}),mouseMove:mxUtils.bind(this,function(u,I){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){u=
+I.getEvent();u=Q(u);O(u);var G=q(0);if(G)if(z.push(G),E){var H=[];for(G=0;G<z.length;G++)H.push([z[G].x,z[G].y]);D=[];for(var g=2;g<k.length;g+=2)G=q(g),H.push([G.x,G.y]),D.push(G);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(H,F))}else{A+=" L"+G.x+" "+G.y;H="";D=[];for(g=2;g<k.length;g+=2)G=q(g),H+=" L"+G.x+" "+G.y,D.push(G);d.setAttribute("d",A+H)}c&&(G=b.view.translate,b.scrollRectToVisible((new mxRectangle(u.x-G.x,u.y-G.y)).grow(20)));I.consume()}}),mouseUp:mxUtils.bind(this,function(u,
+I){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(S(I.getEvent()),I.consume())})});var Q=function(u){return mxUtils.convertPoint(b.container,mxEvent.getClientX(u),mxEvent.getClientY(u))},O=function(u){for(k.push(u);k.length>n;)k.shift()},q=function(u){var I=k.length;if(1===I%2||I>=n){var G=0,H=0,g,p=0;for(g=u;g<I;g++)p++,u=k[g],G+=u.x,H+=u.y;return{x:G/p,y:H/p}}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;DrawioUser=function(b,l,n,d,v){this.id=b;this.email=l;this.displayName=n;this.pictureUrl=d;this.locale=v};DrawioComment=function(b,l,n,d,v,A,z){this.file=b;this.id=l;this.content=n;this.modifiedDate=d;this.createdDate=v;this.isResolved=A;this.user=z;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,l,n,d,v){l()};DrawioComment.prototype.editComment=function(b,l,n){l()};DrawioComment.prototype.deleteComment=function(b,l){b()};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;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];
LucidImporter={};
(function(){function u(f){if(f&&null!=LucidImporter.imgSrcRepl){var p=LucidImporter.imgSrcRepl.attMap;if(p[f])f=p[f];else{p=LucidImporter.imgSrcRepl.imgRepl;for(var n=0;n<p.length;n++){var e=p[n];f=f.replace(e.searchVal,e.replVal)}LucidImporter.hasExtImgs=!0}}return f}function A(f){gb="";try{if(f){var p=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(p=LucidImporter.advImpConfig.fontMapping[f]);if(p){for(var n in p)gb+=n+"="+p[n]+";";return p.fontFamily?"font-family: "+p.fontFamily:
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 48770dbd6..f5ccf9cf7 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -30,7 +30,7 @@ b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlPa
"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);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"29.0.3",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.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"29.2.2",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:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -1859,7 +1859,8 @@ mxCodec.prototype.decodeCell=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&
mxCodec.prototype.insertIntoGraph=function(a){var b=a.parent,c=a.getTerminal(!0),d=a.getTerminal(!1);a.setTerminal(null,!1);a.setTerminal(null,!0);a.parent=null;if(null!=b){if(b==a)throw Error(b.id+": Self Reference");b.insert(a)}null!=c&&c.insertEdge(a,!0);null!=d&&d.insertEdge(a,!1)};mxCodec.prototype.setAttribute=function(a,b,c){null!=b&&null!=c&&a.setAttribute(b,c)};
function mxObjectCodec(a,b,c,d){this.template=a;this.exclude=null!=b?b:[];this.idrefs=null!=c?c:[];this.mapping=null!=d?d:[];this.reverse={};for(var e in this.mapping)this.reverse[this.mapping[e]]=e}mxObjectCodec.allowEval=!1;mxObjectCodec.prototype.template=null;mxObjectCodec.prototype.exclude=null;mxObjectCodec.prototype.idrefs=null;mxObjectCodec.prototype.mapping=null;mxObjectCodec.prototype.reverse=null;mxObjectCodec.prototype.getName=function(){return mxUtils.getFunctionName(this.template.constructor)};
mxObjectCodec.prototype.cloneTemplate=function(){return new this.template.constructor};mxObjectCodec.prototype.getFieldName=function(a){if(null!=a){var b=this.reverse[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.getAttributeName=function(a){if(null!=a){var b=this.mapping[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.isExcluded=function(a,b,c,d){return b==mxObjectIdentity.FIELD_NAME||0<=mxUtils.indexOf(this.exclude,b)};
-mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));for(var d in b){var e=d,f=b[e];null==f||this.isExcluded(b,e,f,!0)||(mxUtils.isInteger(e)&&(e=null),this.encodeValue(a,b,e,f,c))}};
+mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};
+mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));var d=[],e;for(e in b){var f=e,g=b[f];null==g||this.isExcluded(b,f,g,!0)||(mxUtils.isInteger(f)?this.encodeValue(a,b,null,g,c):d.push({name:f,value:g}))}d.sort(function(k,l){return k.name<l.name?-1:k.name>l.name?1:0});for(e=0;e<d.length;e++)this.encodeValue(a,b,d[e].name,d[e].value,c)};
mxObjectCodec.prototype.encodeValue=function(a,b,c,d,e){if(null!=d){if(this.isReference(b,c,d,!0)){var f=a.getId(d);if(null==f){mxLog.warn("mxObjectCodec.encode: No ID for "+this.getName()+"."+c+"="+d);return}d=f}f=this.template[c];if(null==c||a.encodeDefaults||f!=d)c=this.getAttributeName(c),this.writeAttribute(a,b,c,d,e)}};mxObjectCodec.prototype.writeAttribute=function(a,b,c,d,e){"object"!=typeof d?this.writePrimitiveAttribute(a,b,c,d,e):this.writeComplexAttribute(a,b,c,d,e)};
mxObjectCodec.prototype.writePrimitiveAttribute=function(a,b,c,d,e){d=this.convertAttributeToXml(a,b,c,d,e);null==c?(b=a.document.createElement("add"),"function"==typeof d?b.appendChild(a.document.createTextNode(d)):a.setAttribute(b,"value",d),e.appendChild(b)):"function"!=typeof d&&a.setAttribute(e,c,d)};
mxObjectCodec.prototype.writeComplexAttribute=function(a,b,c,d,e){a=a.encode(d);null!=a?(null!=c&&a.setAttribute("as",c),e.appendChild(a)):mxLog.warn("mxObjectCodec.encode: No node for "+this.getName()+"."+c+": "+d)};mxObjectCodec.prototype.convertAttributeToXml=function(a,b,c,d){this.isBooleanAttribute(a,b,c,d)&&(d=1==d?"1":"0");return d};mxObjectCodec.prototype.isBooleanAttribute=function(a,b,c,d){return"undefined"==typeof d.length&&(1==d||0==d)};
@@ -1890,8 +1891,8 @@ var mxStylesheetCodec=mxCodecRegistry.register(function(){var a=new mxObjectCode
function(b,c){b=typeof c;"function"==b?c=mxStyleRegistry.getName(c):"object"==b&&(c=null);return c};a.decode=function(b,c,d){d=d||new this.template.constructor;var e=c.getAttribute("id");null!=e&&(b.objects[e]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(b,c,d)&&"add"==c.nodeName&&(e=c.getAttribute("as"),null!=e)){var f=c.getAttribute("extend"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+f+" not found to extend"),g={});
for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var k=f.getAttribute("as");if("add"==f.nodeName){var l=mxUtils.getTextContent(f);null!=l&&0<l.length&&mxStylesheetCodec.allowEval?l=mxUtils.eval(l):(l=f.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[k]=l)}else"remove"==f.nodeName&&delete g[k]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());mxStylesheetCodec.allowEval=!1;
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,f){b.raw=f;return b};$jscomp.arrayIteratorImpl=function(b){var f=0;return function(){return f<b.length?{done:!1,value:b[f++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return f?f.call(b):$jscomp.arrayIterator(b)};
-Editor=function(b,f,l,u,y){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=u||this.createGraph(f,l);this.editable=null!=y?y:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(q,C){this.status=q;this.statusFunction=C;this.fireEvent(new mxEventObject("statusChanged"))};
-this.getStatus=function(){return this.status};this.graphChangeListener=function(q,C){q=null!=C?C.getProperty("edit"):null;null!=q&&q.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;
+Editor=function(b,f,m,t,y){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=t||this.createGraph(f,m);this.editable=null!=y?y:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(q,B){this.status=q;this.statusFunction=B;this.fireEvent(new mxEventObject("statusChanged"))};
+this.getStatus=function(){return this.status};this.graphChangeListener=function(q,B){q=null!=B?B.getProperty("edit"):null;null!=q&&q.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;
Editor.pageCounter=0;(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(f){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.smallScreenWidth=1024;Editor.helpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDc4LTI0MHEyMSAwIDM1LjUtMTQuNVQ1MjgtMjkwcTAtMjEtMTQuNS0zNS41VDQ3OC0zNDBxLTIxIDAtMzUuNSAxNC41VDQyOC0yOTBxMCAyMSAxNC41IDM1LjVUNDc4LTI0MFptLTM2LTE1NGg3NHEwLTMzIDcuNS01MnQ0Mi41LTUycTI2LTI2IDQxLTQ5LjV0MTUtNTYuNXEwLTU2LTQxLTg2dC05Ny0zMHEtNTcgMC05Mi41IDMwVDM0Mi02MThsNjYgMjZxNS0xOCAyMi41LTM5dDUzLjUtMjFxMzIgMCA0OCAxNy41dDE2IDM4LjVxMCAyMC0xMiAzNy41VDUwNi01MjZxLTQ0IDM5LTU0IDU5dC0xMCA3M1ptMzggMzE0cS04MyAwLTE1Ni0zMS41VDE5Ny0xOTdxLTU0LTU0LTg1LjUtMTI3VDgwLTQ4MHEwLTgzIDMxLjUtMTU2VDE5Ny03NjNxNTQtNTQgMTI3LTg1LjVUNDgwLTg4MHE4MyAwIDE1NiAzMS41VDc2My03NjNxNTQgNTQgODUuNSAxMjdUODgwLTQ4MHEwIDgzLTMxLjUgMTU2VDc2My0xOTdxLTU0IDU0LTEyNyA4NS41VDQ4MC04MFptMC04MHExMzQgMCAyMjctOTN0OTMtMjI3cTAtMTM0LTkzLTIyN3QtMjI3LTkzcS0xMzQgMC0yMjcgOTN0LTkzIDIyN3EwIDEzNCA5MyAyMjd0MjI3IDkzWm0wLTMyMFoiLz48L3N2Zz4=";
Editor.menuImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTIwLTI0MHYtODBoNzIwdjgwSDEyMFptMC0yMDB2LTgwaDcyMHY4MEgxMjBabTAtMjAwdi04MGg3MjB2ODBIMTIwWiIvPjwvc3ZnPg==";Editor.moveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=";
@@ -1921,7 +1922,8 @@ Editor.expandMoreImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy
Editor.extensionImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTguOCAyMUg1cS0uODI1IDAtMS40MTMtLjU4N1EzIDE5LjgyNSAzIDE5di0zLjhxMS4yIDAgMi4xLS43NjIuOS0uNzYzLjktMS45MzggMC0xLjE3NS0uOS0xLjkzOFE0LjIgOS44IDMgOS44VjZxMC0uODI1LjU4Ny0xLjQxMlE0LjE3NSA0IDUgNGg0cTAtMS4wNS43MjUtMS43NzVRMTAuNDUgMS41IDExLjUgMS41cTEuMDUgMCAxLjc3NS43MjVRMTQgMi45NSAxNCA0aDRxLjgyNSAwIDEuNDEzLjU4OFEyMCA1LjE3NSAyMCA2djRxMS4wNSAwIDEuNzc1LjcyNS43MjUuNzI1LjcyNSAxLjc3NSAwIDEuMDUtLjcyNSAxLjc3NVEyMS4wNSAxNSAyMCAxNXY0cTAgLjgyNS0uNTg3IDEuNDEzUTE4LjgyNSAyMSAxOCAyMWgtMy44cTAtMS4yNS0uNzg3LTIuMTI1UTEyLjYyNSAxOCAxMS41IDE4dC0xLjkxMi44NzVROC44IDE5Ljc1IDguOCAyMVpNNSAxOWgyLjEyNXEuNi0xLjY1IDEuOTI1LTIuMzI1UTEwLjM3NSAxNiAxMS41IDE2cTEuMTI1IDAgMi40NS42NzUgMS4zMjUuNjc1IDEuOTI1IDIuMzI1SDE4di02aDJxLjIgMCAuMzUtLjE1LjE1LS4xNS4xNS0uMzUgMC0uMi0uMTUtLjM1UTIwLjIgMTIgMjAgMTJoLTJWNmgtNlY0cTAtLjItLjE1LS4zNS0uMTUtLjE1LS4zNS0uMTUtLjIgMC0uMzUuMTVRMTEgMy44IDExIDR2Mkg1djIuMnExLjM1LjUgMi4xNzUgMS42NzVROCAxMS4wNSA4IDEyLjVxMCAxLjQyNS0uODI1IDIuNlQ1IDE2LjhabTcuNzUtNy43NVoiLz48L3N2Zz4=";
Editor.colorDropperImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTYgNDJ2LTguNGwxOC44NS0xOC44NS0zLjYtMy42TDIzLjMgOS4xbDQuNiA0LjZMMzUgNi42cS41NS0uNTUgMS4xNzUtLjU1dDEuMTc1LjU1bDQuMDUgNC4wNXEuNTUuNTUuNTUgMS4xNzVUNDEuNCAxM2wtNy4xIDcuMSA0LjYgNC42LTIuMDUgMi4wNS0zLjYtMy42TDE0LjQgNDJabTMtM2g0LjM1TDMxLjEgMjEuMjVsLTQuMzUtNC4zNUw5IDM0LjY1Wm0yMy4xNS0yMSA2LjItNi4yLTIuMTUtMi4xNS02LjIgNi4yWm0wIDBMMzAgMTUuODUgMzIuMTUgMThaIi8+PC9zdmc+";
Editor.magnifyImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik03ODQtMTIwIDUzMi0zNzJxLTMwIDI0LTY5IDM4dC04MyAxNHEtMTA5IDAtMTg0LjUtNzUuNVQxMjAtNTgwcTAtMTA5IDc1LjUtMTg0LjVUMzgwLTg0MHExMDkgMCAxODQuNSA3NS41VDY0MC01ODBxMCA0NC0xNCA4M3QtMzggNjlsMjUyIDI1Mi01NiA1NlpNMzgwLTQwMHE3NSAwIDEyNy41LTUyLjVUNTYwLTU4MHEwLTc1LTUyLjUtMTI3LjVUMzgwLTc2MHEtNzUgMC0xMjcuNSA1Mi41VDIwMC01ODBxMCA3NSA1Mi41IDEyNy41VDM4MC00MDBaIi8+PC9zdmc+";
-Editor.sendImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik0xMjAtMTYwdi02NDBsNzYwIDMyMC03NjAgMzIwWm04MC0xMjAgNDc0LTIwMC00NzQtMjAwdjE0MGwyNDAgNjAtMjQwIDYwdjE0MFptMCAwdi00MDAgNDAwWiIvPjwvc3ZnPg==";Editor.sparklesImage="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KDTwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIFRyYW5zZm9ybWVkIGJ5OiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4KPHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBpZD0iaWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgZmlsbD0iI2ZjZmY0NyIgZGF0YS1kYXJrcmVhZGVyLWlubGluZS1maWxsPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6ICNkNmQ4NTA7IC0tZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlOiAjZDZkODUwOyIgc3Ryb2tlPSIjZmNmZjQ3IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIj4KDTxnIGlkPSJTVkdSZXBvX2JnQ2FycmllciIgc3Ryb2tlLXdpZHRoPSIwIi8+Cg08ZyBpZD0iU1ZHUmVwb190cmFjZXJDYXJyaWVyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KDTxnIGlkPSJTVkdSZXBvX2ljb25DYXJyaWVyIj4KDTxwYXRoIGQ9Ik0yNTkuOTIsMjYyLjkxLDIxNi40LDE0OS43N2E5LDksMCwwLDAtMTYuOCwwTDE1Ni4wOCwyNjIuOTFhOSw5LDAsMCwxLTUuMTcsNS4xN0wzNy43NywzMTEuNmE5LDksMCwwLDAsMCwxNi44bDExMy4xNCw0My41MmE5LDksMCwwLDEsNS4xNyw1LjE3TDE5OS42LDQ5MC4yM2E5LDksMCwwLDAsMTYuOCwwbDQzLjUyLTExMy4xNGE5LDksMCwwLDEsNS4xNy01LjE3TDM3OC4yMywzMjguNGE5LDksMCwwLDAsMC0xNi44TDI2NS4wOSwyNjguMDhBOSw5LDAsMCwxLDI1OS45MiwyNjIuOTFaIiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KDTxwb2x5Z29uIHBvaW50cz0iMTA4IDY4IDg4IDE2IDY4IDY4IDE2IDg4IDY4IDEwOCA4OCAxNjAgMTA4IDEwOCAxNjAgODggMTA4IDY4IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KDTxwb2x5Z29uIHBvaW50cz0iNDI2LjY3IDExNy4zMyA0MDAgNDggMzczLjMzIDExNy4zMyAzMDQgMTQ0IDM3My4zMyAxNzAuNjcgNDAwIDI0MCA0MjYuNjcgMTcwLjY3IDQ5NiAxNDQgNDI2LjY3IDExNy4zMyIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMTkuOTY4IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6ICMxODFhMWI7Ii8+Cg08L2c+Cg08L3N2Zz4=";
+Editor.sendImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik0xMjAtMTYwdi02NDBsNzYwIDMyMC03NjAgMzIwWm04MC0xMjAgNDc0LTIwMC00NzQtMjAwdjE0MGwyNDAgNjAtMjQwIDYwdjE0MFptMCAwdi00MDAgNDAwWiIvPjwvc3ZnPg==";Editor.sparklesImage="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjU5LjkyLDI2Mi45MSwyMTYuNCwxNDkuNzdhOSw5LDAsMCwwLTE2LjgsMEwxNTYuMDgsMjYyLjkxYTksOSwwLDAsMS01LjE3LDUuMTdMMzcuNzcsMzExLjZhOSw5LDAsMCwwLDAsMTYuOGwxMTMuMTQsNDMuNTJhOSw5LDAsMCwxLDUuMTcsNS4xN0wxOTkuNiw0OTAuMjNhOSw5LDAsMCwwLDE2LjgsMGw0My41Mi0xMTMuMTRhOSw5LDAsMCwxLDUuMTctNS4xN0wzNzguMjMsMzI4LjRhOSw5LDAsMCwwLDAtMTYuOEwyNjUuMDksMjY4LjA4QTksOSwwLDAsMSwyNTkuOTIsMjYyLjkxWiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iNDAiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KPHBvbHlnb24gcG9pbnRzPSIxMDggNjggODggMTYgNjggNjggMTYgODggNjggMTA4IDg4IDE2MCAxMDggMTA4IDE2MCA4OCAxMDggNjgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzAwMDAwMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjMwIi8+Cjxwb2x5Z29uIHBvaW50cz0iNDI2LjY3IDExNy4zMyA0MDAgNDggMzczLjMzIDExNy4zMyAzMDQgMTQ0IDM3My4zMyAxNzAuNjcgNDAwIDI0MCA0MjYuNjcgMTcwLjY3IDQ5NiAxNDQgNDI2LjY3IDExNy4zMyIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMzAiLz4KPC9zdmc+";
+Editor.thinSparklesImage="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjU5LjkyLDI2Mi45MSwyMTYuNCwxNDkuNzdhOSw5LDAsMCwwLTE2LjgsMEwxNTYuMDgsMjYyLjkxYTksOSwwLDAsMS01LjE3LDUuMTdMMzcuNzcsMzExLjZhOSw5LDAsMCwwLDAsMTYuOGwxMTMuMTQsNDMuNTJhOSw5LDAsMCwxLDUuMTcsNS4xN0wxOTkuNiw0OTAuMjNhOSw5LDAsMCwwLDE2LjgsMGw0My41Mi0xMTMuMTRhOSw5LDAsMCwxLDUuMTctNS4xN0wzNzguMjMsMzI4LjRhOSw5LDAsMCwwLDAtMTYuOEwyNjUuMDksMjY4LjA4QTksOSwwLDAsMSwyNTkuOTIsMjYyLjkxWiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMTkuOTY4IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6ICMxODFhMWI7Ii8+Cjxwb2x5Z29uIHBvaW50cz0iMTA4IDY4IDg4IDE2IDY4IDY4IDE2IDg4IDY4IDEwOCA4OCAxNjAgMTA4IDEwOCAxNjAgODggMTA4IDY4IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiLz4KPHBvbHlnb24gcG9pbnRzPSI0MjYuNjcgMTE3LjMzIDQwMCA0OCAzNzMuMzMgMTE3LjMzIDMwNCAxNDQgMzczLjMzIDE3MC42NyA0MDAgMjQwIDQyNi42NyAxNzAuNjcgNDk2IDE0NCA0MjYuNjcgMTE3LjMzIiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiLz4KPC9zdmc+";
Editor.arrowRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDAwLTI4MHYtNDAwbDIwMCAyMDAtMjAwIDIwMFoiLz48L3N2Zz4=";Editor.arrowDownImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTM2MCAyODAtNTYwaDQwMEw0ODAtMzYwWiIvPjwvc3ZnPg==";
Editor.arrowUpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJtMjgwLTQwMCAyMDAtMjAwIDIwMCAyMDBIMjgwWiIvPjwvc3ZnPg==";Editor.refreshImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTE2MHEtMTM0IDAtMjI3LTkzdC05My0yMjdxMC0xMzQgOTMtMjI3dDIyNy05M3E2OSAwIDEzMiAyOC41VDcyMC02OTB2LTExMGg4MHYyODBINTIwdi04MGgxNjhxLTMyLTU2LTg3LjUtODhUNDgwLTcyMHEtMTAwIDAtMTcwIDcwdC03MCAxNzBxMCAxMDAgNzAgMTcwdDE3MCA3MHE3NyAwIDEzOS00NHQ4Ny0xMTZoODRxLTI4IDEwNi0xMTQgMTczdC0xOTYgNjdaIi8+PC9zdmc+";
Editor.checkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzgyLTI0MCAxNTQtNDY4bDU3LTU3IDE3MSAxNzEgMzY3LTM2NyA1NyA1Ny00MjQgNDI0WiIvPjwvc3ZnPg==";Editor.dockRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoNTYwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2NTYwcTAgMzMtMjMuNSA1Ni41VDc2MC0xMjBIMjAwWm0xMjAtODB2LTU2MEgyMDB2NTYwaDEyMFptODAgMGgzNjB2LTU2MEg0MDB2NTYwWm0tODAgMEgyMDBoMTIwWiIvPjwvc3ZnPg==";
@@ -1957,361 +1959,362 @@ Editor.removeRowImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy5
Editor.checkmarkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjJweCIgaGVpZ2h0PSIxOHB4IiB2ZXJzaW9uPSIxLjEiPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDQgMCkiIGQ9Ik03LjE4MSwxNS4wMDdhMSwxLDAsMCwxLS43OTMtMC4zOTFMMy4yMjIsMTAuNUExLDEsMCwxLDEsNC44MDgsOS4yNzRMNy4xMzIsMTIuM2w2LjA0NC04Ljg2QTEsMSwwLDEsMSwxNC44Myw0LjU2OWwtNi44MjMsMTBhMSwxLDAsMCwxLS44LjQzN0g3LjE4MVoiIGZpbGw9IiMwMDAwMDAiLz48L3N2Zz4=";
Editor.swapImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzIwLTQ0MHYtMjg3TDIxNy02MjRsLTU3LTU2IDIwMC0yMDAgMjAwIDIwMC01NyA1Ni0xMDMtMTAzdjI4N2gtODBaTTYwMC04MCA0MDAtMjgwbDU3LTU2IDEwMyAxMDN2LTI4N2g4MHYyODdsMTAzLTEwMyA1NyA1Nkw2MDAtODBaIi8+PC9zdmc+";Editor.copyImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNzYwLTIwMEgzMjBxLTMzIDAtNTYuNS0yMy41VDI0MC0yODB2LTU2MHEwLTMzIDIzLjUtNTYuNVQzMjAtOTIwaDI4MGwyNDAgMjQwdjQwMHEwIDMzLTIzLjUgNTYuNVQ3NjAtMjAwWk01NjAtNjQwdi0yMDBIMzIwdjU2MGg0NDB2LTM2MEg1NjBaTTE2MC00MHEtMzMgMC01Ni41LTIzLjVUODAtMTIwdi01NjBoODB2NTYwaDQ0MHY4MEgxNjBabTE2MC04MDB2MjAwLTIwMCA1NjAtNTYwWiIvPjwvc3ZnPg==";
Editor.doubleArrowUpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJtMjk2LTIyNC01Ni01NiAyNDAtMjQwIDI0MCAyNDAtNTYgNTYtMTg0LTE4My0xODQgMTgzWm0wLTI0MC01Ni01NiAyNDAtMjQwIDI0MCAyNDAtNTYgNTYtMTg0LTE4My0xODQgMTgzWiIvPjwvc3ZnPg==";Editor.doubleArrowDownImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTIwMCAyNDAtNDQwbDU2LTU2IDE4NCAxODMgMTg0LTE4MyA1NiA1Ni0yNDAgMjQwWm0wLTI0MEwyNDAtNjgwbDU2LTU2IDE4NCAxODMgMTg0LTE4MyA1NiA1Ni0yNDAgMjQwWiIvPjwvc3ZnPg==";
-Editor.opacityImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMWYxZjFmIj48cGF0aCBkPSJNNDgwLTEyMHEtMTMzIDAtMjI2LjUtOTJUMTYwLTQzNnEwLTY1IDI1LTEyMS41VDI1NC02NThsMjI2LTIyMiAyMjYgMjIycTQ0IDQ0IDY5IDEwMC41VDgwMC00MzZxMCAxMzItOTMuNSAyMjRUNDgwLTEyMFpNMjQyLTQwMGg0NzRxMTItNzItMTMuNS0xMjNUNjUwLTYwMEw0ODAtNzY4IDMxMC02MDBxLTI3IDI2LTUzIDc3dC0xNSAxMjNaIi8+PC9zdmc+";
+Editor.opacityImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMWYxZjFmIj48cGF0aCBkPSJNNDgwLTEyMHEtMTMzIDAtMjI2LjUtOTJUMTYwLTQzNnEwLTY1IDI1LTEyMS41VDI1NC02NThsMjI2LTIyMiAyMjYgMjIycTQ0IDQ0IDY5IDEwMC41VDgwMC00MzZxMCAxMzItOTMuNSAyMjRUNDgwLTEyMFpNMjQyLTQwMGg0NzRxMTItNzItMTMuNS0xMjNUNjUwLTYwMEw0ODAtNzY4IDMxMC02MDBxLTI3IDI2LTUzIDc3dC0xNSAxMjNaIi8+PC9zdmc+";Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMWYxZjFmIj48cGF0aCBkPSJNMjQwLTgwcS0zMyAwLTU2LjUtMjMuNVQxNjAtMTYwdi00MDBxMC0zMyAyMy41LTU2LjVUMjQwLTY0MGgxMjB2ODBIMjQwdjQwMGg0ODB2LTQwMEg2MDB2LTgwaDEyMHEzMyAwIDU2LjUgMjMuNVQ4MDAtNTYwdjQwMHEwIDMzLTIzLjUgNTYuNVQ3MjAtODBIMjQwWm0yMDAtMjQwdi00NDdsLTY0IDY0LTU2LTU3IDE2MC0xNjAgMTYwIDE2MC01NiA1Ny02NC02NHY0NDdoLTgwWiIvPjwvc3ZnPg==";
Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];
Editor.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=[];Editor.ctrlKey=mxClient.IS_MAC?"⌘":"Ctrl";Editor.altKey=mxClient.IS_MAC?"⌥":"Alt";Editor.shiftKey=mxClient.IS_MAC?"⇧":"Shift";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;
Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;Editor.enableNativeClipboard=window==window.top&&null!=navigator.clipboard&&null!=navigator.clipboard.read;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#121212";Editor.darkColorVar="--ge-dark-color";Editor.fontSizeUnit="px";Editor.transitionDelay=.1;Editor.pageSizeUnit=mxConstants.INCHES;Editor.isDarkMode=function(){return Editor.darkMode};
Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};Editor.convertHtmlToText=function(b){if(null!=b){var f=document.createElement("div");f.innerHTML=Graph.sanitizeHtml(b);return mxUtils.extractTextWithWhitespace(f.childNodes)}return null};
-Editor.extractGraphModelFromPng=function(b){var f=null;try{var l=b.substring(b.indexOf(",")+1),u=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0);EditorUi.parsePng(u,mxUtils.bind(this,function(y,q,C){y=u.substring(y+8,y+8+C);"zTXt"==q?(C=y.indexOf(String.fromCharCode(0)),"mxGraphModel"==y.substring(0,C)&&(y=pako.inflateRaw(Graph.stringToArrayBuffer(y.substring(C+2)),{to:"string"}).replace(/\+/g," "),null!=y&&0<y.length&&(f=y))):"tEXt"==q&&(y=y.split(String.fromCharCode(0)),1<y.length&&("mxGraphModel"==
-y[0]||"mxfile"==y[0])&&(f=y[1]));if(null!=f||"IDAT"==q)return!0}))}catch(y){}null!=f&&"%"==f.charAt(0)&&(f=decodeURIComponent(f));null!=f&&"%"==f.charAt(0)&&(f=decodeURIComponent(f));return f};Editor.getLabelForStylename=function(b){var f=b.match(/^([A-Za-z]*)(\d*)$/);null!=f&&1<f.length&&(b=mxUtils.trim(f[1].replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,function(l){return l.toUpperCase()}).replace(/Color[s]?/g,"")),b=mxUtils.trim(b+(0<f[2].length?" ("+f[2]+")":"")));return b};
-Editor.soundex=function(b){if(null==b||0==b.length)return"";var f=[],l=1;f[0]=b[0].toUpperCase();for(var u=1,y=b.length;u<y;u++){var q=b[u].toUpperCase().charCodeAt(0)-65;if(0<=q&&25>=q&&"0"!="01230120022455012603010202"[q]&&("01230120022455012603010202"[q]!=f[l-1]&&(f[l]="01230120022455012603010202"[q],l++),3<l))break}if(3>=l)for(;3>=l;)f[l]="0",l++;return f.join("")};
-Editor.selectFilename=function(b){var f=b.value.lastIndexOf(".");if(0<f){var l=b.value.substring(f+1);"drawio"!=l&&0<=mxUtils.indexOf(["png","svg","html","xml","pdf"],l)&&(l=b.value.lastIndexOf(".drawio.",f),0<l&&(f=l))}f=0<f?f:b.value.length;Editor.selectSubstring(b,0,f)};
-Editor.selectSubstring=function(b,f,l){b.focus();"undefined"!=typeof b.selectionStart?(b.selectionStart=f,b.selectionEnd=l):document.selection&&document.selection.createRange&&(b.select(),b=document.selection.createRange(),b.collapse(!0),b.moveEnd("character",l),b.moveStart("character",f),b.select())};
+Editor.extractGraphModelFromText=function(b){function f(q){var B=q.indexOf("```");0<=B&&(q=q.substring(q,0,B+6));return q}function m(q){var B=q.lastIndexOf("```");0<=B&&(q=q.substring(B+3));return q}var t=b.indexOf("<mxGraphModel "),y=b.indexOf("</mxGraphModel>");0>t&&(t=b.indexOf("<mxGraphModel>"));return 0<=t&&y>t?[mxUtils.trim(f(b.substring(0,t))),b.substring(t,y+15),mxUtils.trim(m(b.substring(y+15)))]:[b,"",""]};
+Editor.extractGraphModelFromPng=function(b){var f=null;try{var m=b.substring(b.indexOf(",")+1),t=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0);EditorUi.parsePng(t,mxUtils.bind(this,function(y,q,B){y=t.substring(y+8,y+8+B);"zTXt"==q?(B=y.indexOf(String.fromCharCode(0)),"mxGraphModel"==y.substring(0,B)&&(y=pako.inflateRaw(Graph.stringToArrayBuffer(y.substring(B+2)),{to:"string"}).replace(/\+/g," "),null!=y&&0<y.length&&(f=y))):"tEXt"==q&&(y=y.split(String.fromCharCode(0)),1<y.length&&("mxGraphModel"==
+y[0]||"mxfile"==y[0])&&(f=y[1]));if(null!=f||"IDAT"==q)return!0}))}catch(y){}null!=f&&"%"==f.charAt(0)&&(f=decodeURIComponent(f));null!=f&&"%"==f.charAt(0)&&(f=decodeURIComponent(f));return f};Editor.getLabelForStylename=function(b){var f=b.match(/^([A-Za-z]*)(\d*)$/);null!=f&&1<f.length&&(b=mxUtils.trim(f[1].replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,function(m){return m.toUpperCase()}).replace(/Color[s]?/g,"")),b=mxUtils.trim(b+(0<f[2].length?" ("+f[2]+")":"")));return b};
+Editor.soundex=function(b){if(null==b||0==b.length)return"";var f=[],m=1;f[0]=b[0].toUpperCase();for(var t=1,y=b.length;t<y;t++){var q=b[t].toUpperCase().charCodeAt(0)-65;if(0<=q&&25>=q&&"0"!="01230120022455012603010202"[q]&&("01230120022455012603010202"[q]!=f[m-1]&&(f[m]="01230120022455012603010202"[q],m++),3<m))break}if(3>=m)for(;3>=m;)f[m]="0",m++;return f.join("")};
+Editor.selectFilename=function(b){var f=b.value.lastIndexOf(".");if(0<f){var m=b.value.substring(f+1);"drawio"!=m&&0<=mxUtils.indexOf(["png","svg","html","xml","pdf"],m)&&(m=b.value.lastIndexOf(".drawio.",f),0<m&&(f=m))}f=0<f?f:b.value.length;Editor.selectSubstring(b,0,f)};
+Editor.selectSubstring=function(b,f,m){b.focus();"undefined"!=typeof b.selectionStart?(b.selectionStart=f,b.selectionEnd=m):document.selection&&document.selection.createRange&&(b.select(),b=document.selection.createRange(),b.collapse(!0),b.moveEnd("character",m),b.moveStart("character",f),b.select())};
Editor.toUnit=function(b,f){return f==mxConstants.INCHES?Math.round(100*b/mxConstants.PIXELS_PER_INCH)/100:f==mxConstants.MILLIMETERS?Math.round(100*b/mxConstants.PIXELS_PER_MM)/100:f==mxConstants.METERS?Math.round(1E3*b/(1E3*mxConstants.PIXELS_PER_MM))/1E3:Math.round(b)};
Editor.fromUnit=function(b,f){return f==mxConstants.INCHES?Math.round(b*mxConstants.PIXELS_PER_INCH):f==mxConstants.MILLIMETERS?Math.round(b*mxConstants.PIXELS_PER_MM):f==mxConstants.METERS?Math.round(b*mxConstants.PIXELS_PER_MM*1E3):Math.round(b)};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.appName=document.title;
Editor.prototype.editBlankUrl=window.location.origin+window.location.pathname;Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
-Editor.prototype.editAsNew=function(b,f,l,u){f=null!=f?"?title="+encodeURIComponent(f):"";l?f+=(0<f.length?"&":"?")+"lightbox=1":null!=urlParams.ui&&(f+=(0<f.length?"&":"?")+"ui="+urlParams.ui);null!=u&&(f+=(0<f.length?"&":"?")+"page-id="+u);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var y=null,q=mxUtils.bind(this,function(C){"ready"==C.data&&C.source==y&&(mxEvent.removeListener(window,"message",q),y.postMessage(b,"*"))});
+Editor.prototype.editAsNew=function(b,f,m,t){f=null!=f?"?title="+encodeURIComponent(f):"";m?f+=(0<f.length?"&":"?")+"lightbox=1":null!=urlParams.ui&&(f+=(0<f.length?"&":"?")+"ui="+urlParams.ui);null!=t&&(f+=(0<f.length?"&":"?")+"page-id="+t);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var y=null,q=mxUtils.bind(this,function(B){"ready"==B.data&&B.source==y&&(mxEvent.removeListener(window,"message",q),y.postMessage(b,"*"))});
mxEvent.addListener(window,"message",q);y=this.graph.openLink(this.getEditBlankUrl(f+(0<f.length?"&":"?")+"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(f)+"#R"+encodeURIComponent(b))};
-Editor.prototype.createGraph=function(b,f){b=new Graph(null,f,null,null,b);b.transparentBackground=!1;var l=b.isCssTransformsSupported,u=this;b.isCssTransformsSupported=function(){return l.apply(this,arguments)&&(!u.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(y){return!this.isExternalProtocol(y)});return b};
+Editor.prototype.createGraph=function(b,f){b=new Graph(null,f,null,null,b);b.transparentBackground=!1;var m=b.isCssTransformsSupported,t=this;b.isCssTransformsSupported=function(){return m.apply(this,arguments)&&(!t.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(y){return!this.isExternalProtocol(y)});return b};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
Editor.prototype.readGraphState=function(b){var f=b.getAttribute("grid");if(null==f||""==f)f=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=f&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=
"0"!=b.getAttribute("arrows");this.graph.foldingEnabled="0"!=b.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);f=parseFloat(b.getAttribute("pageScale"));!isNaN(f)&&0<f?this.graph.pageScale=f:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(f=b.getAttribute("page"),this.graph.pageVisible=
-null!=f?"0"!=f:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;f=parseFloat(b.getAttribute("pageWidth"));var l=parseFloat(b.getAttribute("pageHeight"));isNaN(f)||isNaN(l)||(this.graph.pageFormat=new mxRectangle(0,0,f,l));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
-Editor.prototype.setGraphXml=function(b){if(null!=b){var f=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),f.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}}else if("root"==b.nodeName){this.resetGraph();var l=f.document.createElement("mxGraphModel");l.appendChild(b);f.decode(l,this.graph.getModel());this.updateGraphComponents()}else throw{message:mxResources.get("cannotOpenFile"),
+null!=f?"0"!=f:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;f=parseFloat(b.getAttribute("pageWidth"));var m=parseFloat(b.getAttribute("pageHeight"));isNaN(f)||isNaN(m)||(this.graph.pageFormat=new mxRectangle(0,0,f,m));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
+Editor.prototype.setGraphXml=function(b){if(null!=b){var f=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),f.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}}else if("root"==b.nodeName){this.resetGraph();var m=f.document.createElement("mxGraphModel");m.appendChild(b);f.decode(m,this.graph.getModel());this.updateGraphComponents()}else throw{message:mxResources.get("cannotOpenFile"),
node:b,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear();this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(b){if(null!=b?b:1){var f=new mxCodec(mxUtils.createXmlDocument());b=f.encode(this.graph.getModel());f.document.appendChild(b)}else b=this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)b.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),b.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);b.setAttribute("grid",
this.graph.isGridEnabled()?"1":"0");b.setAttribute("gridSize",this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",
this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width);b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};
Editor.prototype.setModified=function(b){this.modified=b};Editor.prototype.setFilename=function(b){this.filename=b};
-Editor.prototype.createUndoManager=function(){var b=this.graph,f=new mxUndoManager;this.undoListener=function(u,y){f.undoableEditHappened(y.getProperty("edit"))};var l=mxUtils.bind(this,function(u,y){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,l);b.getView().addListener(mxEvent.UNDO,l);l=function(u,y){u=y.getProperty("edit").changes;u=b.getSelectionCellsForChanges(u);y=!1;if(0<u.length){for(var q=[],C=0;C<u.length;C++)null!=b.view.getState(u[C])&&(q.push(u[C]),
-y||(b.scrollCellToVisible(u[C]),y=!0));b.setSelectionCells(q)}};f.addListener(mxEvent.UNDO,l);f.addListener(mxEvent.REDO,l);return f};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+Editor.prototype.createUndoManager=function(){var b=this.graph,f=new mxUndoManager;this.undoListener=function(t,y){f.undoableEditHappened(y.getProperty("edit"))};var m=mxUtils.bind(this,function(t,y){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,m);b.getView().addListener(mxEvent.UNDO,m);m=function(t,y){t=y.getProperty("edit").changes;t=b.getSelectionCellsForChanges(t);y=!1;if(0<t.length){for(var q=[],B=0;B<t.length;B++)null!=b.view.getState(t[B])&&(q.push(t[B]),
+y||(b.scrollCellToVisible(t[B]),y=!0));b.setSelectionCells(q)}};f.addListener(mxEvent.UNDO,m);f.addListener(mxEvent.REDO,m);return f};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,f,l,u,y,q,C,J,S,D,P){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));y&&document.body.appendChild(this.bg);y=b.createDiv(S?"geTransDialog":"geDialog");y.style.width=l+60+"px";y.style.height=u+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(y.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",y.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");y.appendChild(f);document.body.appendChild(y);if(q&&(f=document.createElement("div"),
-f.className="geButton",f.setAttribute("title",mxResources.get("close")),f.style.backgroundImage="url("+Editor.crossImage+")",f.style.position="absolute",f.style.top="0px",f.style.right="0px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),y.appendChild(f),!P)){var c=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(g){c=!0}),null,mxUtils.bind(this,function(g){c&&(b.hideDialog(!0),c=!1)}))}this.onDialogClose=C;this.container=y;null!=D&&this.addResizeHandler(D);
+function Dialog(b,f,m,t,y,q,B,I,S,D,P){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));y&&document.body.appendChild(this.bg);y=b.createDiv(S?"geTransDialog":"geDialog");y.style.width=m+60+"px";y.style.height=t+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(y.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",y.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");y.appendChild(f);document.body.appendChild(y);if(q&&(f=document.createElement("div"),
+f.className="geButton",f.setAttribute("title",mxResources.get("close")),f.style.backgroundImage="url("+Editor.crossImage+")",f.style.position="absolute",f.style.top="0px",f.style.right="0px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),y.appendChild(f),!P)){var c=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(g){c=!0}),null,mxUtils.bind(this,function(g){c&&(b.hideDialog(!0),c=!1)}))}this.onDialogClose=B;this.container=y;null!=D&&this.addResizeHandler(D);
b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.noColorImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC";
Dialog.prototype.closeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==";Dialog.prototype.clearImage="data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==";
Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(b,f){return new mxPoint(b,f)};
-Dialog.prototype.addResizeHandler=function(b){var f=document.createElement("img");f.setAttribute("src",mxWindow.prototype.resizeImage);f.style.cursor="nwse-resize";f.style.position="absolute";f.style.bottom="0px";f.style.right="0px";f.style.zIndex="2";var l=null,u=null,y=null,q=null,C=mxUtils.bind(this,function(D){l=mxEvent.getClientX(D);u=mxEvent.getClientY(D);y=parseInt(this.container.style.width);q=parseInt(this.container.style.height);mxEvent.addGestureListeners(document,null,J,S);mxEvent.consume(D)}),
-J=mxUtils.bind(this,function(D){if(null!=l&&null!=u){var P=mxEvent.getClientX(D)-l,c=mxEvent.getClientY(D)-u;this.container.style.width=Math.max(b.width,y+2*P)+"px";this.container.style.height=Math.max(b.height,q+2*c)+"px";mxEvent.consume(D)}}),S=mxUtils.bind(this,function(D){null!=l&&null!=u&&(u=l=null,mxEvent.removeGestureListeners(document,null,J,S),mxEvent.consume(D))});mxEvent.addGestureListeners(f,C,J,S);this.container.appendChild(f)};
+Dialog.prototype.addResizeHandler=function(b){var f=document.createElement("img");f.setAttribute("src",mxWindow.prototype.resizeImage);f.style.cursor="nwse-resize";f.style.position="absolute";f.style.bottom="0px";f.style.right="0px";f.style.zIndex="2";var m=null,t=null,y=null,q=null,B=mxUtils.bind(this,function(D){m=mxEvent.getClientX(D);t=mxEvent.getClientY(D);y=parseInt(this.container.style.width);q=parseInt(this.container.style.height);mxEvent.addGestureListeners(document,null,I,S);mxEvent.consume(D)}),
+I=mxUtils.bind(this,function(D){if(null!=m&&null!=t){var P=mxEvent.getClientX(D)-m,c=mxEvent.getClientY(D)-t;this.container.style.width=Math.max(b.width,y+2*P)+"px";this.container.style.height=Math.max(b.height,q+2*c)+"px";mxEvent.consume(D)}}),S=mxUtils.bind(this,function(D){null!=m&&null!=t&&(t=m=null,mxEvent.removeGestureListeners(document,null,I,S),mxEvent.consume(D))});mxEvent.addGestureListeners(f,B,I,S);this.container.appendChild(f)};
Dialog.prototype.close=function(b,f){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,f))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&
this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,f,l,u,y,q,C,J,S,D,P){S=null!=S?S:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=f){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,f);g.setAttribute("title",f);c.appendChild(g)}f=
-document.createElement("div");f.style.lineHeight="1.2em";f.style.padding="6px";"string"===typeof l&&(l=l.replace(/\n/g,"<br/>"));f.innerHTML=Graph.sanitizeHtml(l);c.appendChild(f);l=document.createElement("div");l.style.marginTop="12px";l.style.textAlign="center";null!=q&&(f=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();q()}),f.className="geBtn",l.appendChild(f),l.style.textAlign="center");null!=D&&(D=mxUtils.button(D,function(){null!=P&&P()}),D.className="geBtn",l.appendChild(D));
-var m=mxUtils.button(u,function(){S&&b.hideDialog();null!=y&&y()});m.className="geBtn";l.appendChild(m);null!=C&&(u=mxUtils.button(C,function(){S&&b.hideDialog();null!=J&&J()}),u.className="geBtn gePrimaryBtn",l.appendChild(u));this.init=function(){m.focus()};c.appendChild(l);this.container=c},PrintDialog=function(b,f,l,u){this.create(b,f,l,u)};
-PrintDialog.prototype.create=function(b){function f(m){var n=C.checked||D.checked,x=parseInt(c.value)/100;isNaN(x)&&(x=1,c.value="100%");mxClient.IS_SF&&(x*=.75);var F=l.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/l.pageScale;if(n){var M=C.checked?1:parseInt(P.value);isNaN(M)||(H=mxUtils.getScaleForPageCount(M,l,F))}var L=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*x);F.height=Math.ceil(F.height*x);H*=x;!n&&l.pageVisible?(x=l.getPageLayout(),M-=x.x*F.width,L-=x.y*F.height):
-n=!0;n=PrintDialog.createPrintPreview(l,H,F,0,M,L,n);n.open();m&&PrintDialog.printPreview(n)}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");var q=document.createElement("tr");var C=document.createElement("input");C.setAttribute("type","checkbox");var J=document.createElement("td");J.setAttribute("colspan","2");J.style.fontSize="10pt";J.appendChild(C);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));
-J.appendChild(S);mxEvent.addListener(S,"click",function(m){C.checked=!C.checked;D.checked=!C.checked;mxEvent.consume(m)});mxEvent.addListener(C,"change",function(){D.checked=!C.checked});q.appendChild(J);y.appendChild(q);q=q.cloneNode(!1);var D=document.createElement("input");D.setAttribute("type","checkbox");J=document.createElement("td");J.style.fontSize="10pt";J.appendChild(D);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");J.appendChild(S);mxEvent.addListener(S,
-"click",function(m){D.checked=!D.checked;C.checked=!D.checked;mxEvent.consume(m)});q.appendChild(J);var P=document.createElement("input");P.setAttribute("value","1");P.setAttribute("type","number");P.setAttribute("min","1");P.setAttribute("size","4");P.setAttribute("disabled","disabled");P.style.width="50px";J=document.createElement("td");J.style.fontSize="10pt";J.appendChild(P);mxUtils.write(J," "+mxResources.get("pages")+" (max)");q.appendChild(J);y.appendChild(q);mxEvent.addListener(D,"change",
-function(){D.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");C.checked=!D.checked});q=q.cloneNode(!1);J=document.createElement("td");mxUtils.write(J,mxResources.get("pageScale")+":");q.appendChild(J);J=document.createElement("td");var c=document.createElement("input");c.setAttribute("value","100 %");c.setAttribute("size","5");c.style.width="50px";J.appendChild(c);q.appendChild(J);y.appendChild(q);q=document.createElement("tr");J=document.createElement("td");J.colSpan=2;
-J.style.paddingTop="20px";J.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&J.appendChild(S);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)});g.className="geBtn";J.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});g.className="geBtn gePrimaryBtn";J.appendChild(g);b.editor.cancelFirst||
-J.appendChild(S);q.appendChild(J);y.appendChild(q);u.appendChild(y);this.container=u};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(f){}};
-PrintDialog.createPrintPreview=function(b,f,l,u,y,q,C){f=new mxPrintPreview(b,f,l,u,y,q);f.title=mxResources.get("preview");f.addPageCss=!mxClient.IS_SF;f.printBackgroundImage=!0;f.autoOrigin=C;C=b.background;if(null==C||""==C||C==mxConstants.NONE)C="#ffffff";f.backgroundColor=C;var J=f.isTextLabel;f.isTextLabel=function(D){return"geHint"==!D.className&&J.apply(this,arguments)};var S=f.getLinkForCellState;f.getLinkForCellState=function(D){return b.getAbsoluteUrl(S.apply(this,arguments))};return f};
+var ErrorDialog=function(b,f,m,t,y,q,B,I,S,D,P){S=null!=S?S:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=f){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,f);g.setAttribute("title",f);c.appendChild(g)}f=
+document.createElement("div");f.style.lineHeight="1.2em";f.style.padding="6px";"string"===typeof m&&(m=m.replace(/\n/g,"<br/>"));f.innerHTML=Graph.sanitizeHtml(m);c.appendChild(f);m=document.createElement("div");m.style.marginTop="12px";m.style.textAlign="center";null!=q&&(f=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();q()}),f.className="geBtn",m.appendChild(f),m.style.textAlign="center");null!=D&&(D=mxUtils.button(D,function(){null!=P&&P()}),D.className="geBtn",m.appendChild(D));
+var l=mxUtils.button(t,function(){S&&b.hideDialog();null!=y&&y()});l.className="geBtn";m.appendChild(l);null!=B&&(t=mxUtils.button(B,function(){S&&b.hideDialog();null!=I&&I()}),t.className="geBtn gePrimaryBtn",m.appendChild(t));this.init=function(){l.focus()};c.appendChild(m);this.container=c},PrintDialog=function(b,f,m,t){this.create(b,f,m,t)};
+PrintDialog.prototype.create=function(b){function f(l){var n=B.checked||D.checked,x=parseInt(c.value)/100;isNaN(x)&&(x=1,c.value="100%");mxClient.IS_SF&&(x*=.75);var F=m.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,G=1/m.pageScale;if(n){var L=B.checked?1:parseInt(P.value);isNaN(L)||(G=mxUtils.getScaleForPageCount(L,m,F))}var M=L=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*x);F.height=Math.ceil(F.height*x);G*=x;!n&&m.pageVisible?(x=m.getPageLayout(),L-=x.x*F.width,M-=x.y*F.height):
+n=!0;n=PrintDialog.createPrintPreview(m,G,F,0,L,M,n);n.open();l&&PrintDialog.printPreview(n)}var m=b.editor.graph,t=document.createElement("table");t.style.width="100%";t.style.height="100%";var y=document.createElement("tbody");var q=document.createElement("tr");var B=document.createElement("input");B.setAttribute("type","checkbox");var I=document.createElement("td");I.setAttribute("colspan","2");I.style.fontSize="10pt";I.appendChild(B);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));
+I.appendChild(S);mxEvent.addListener(S,"click",function(l){B.checked=!B.checked;D.checked=!B.checked;mxEvent.consume(l)});mxEvent.addListener(B,"change",function(){D.checked=!B.checked});q.appendChild(I);y.appendChild(q);q=q.cloneNode(!1);var D=document.createElement("input");D.setAttribute("type","checkbox");I=document.createElement("td");I.style.fontSize="10pt";I.appendChild(D);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");I.appendChild(S);mxEvent.addListener(S,
+"click",function(l){D.checked=!D.checked;B.checked=!D.checked;mxEvent.consume(l)});q.appendChild(I);var P=document.createElement("input");P.setAttribute("value","1");P.setAttribute("type","number");P.setAttribute("min","1");P.setAttribute("size","4");P.setAttribute("disabled","disabled");P.style.width="50px";I=document.createElement("td");I.style.fontSize="10pt";I.appendChild(P);mxUtils.write(I," "+mxResources.get("pages")+" (max)");q.appendChild(I);y.appendChild(q);mxEvent.addListener(D,"change",
+function(){D.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");B.checked=!D.checked});q=q.cloneNode(!1);I=document.createElement("td");mxUtils.write(I,mxResources.get("pageScale")+":");q.appendChild(I);I=document.createElement("td");var c=document.createElement("input");c.setAttribute("value","100 %");c.setAttribute("size","5");c.style.width="50px";I.appendChild(c);q.appendChild(I);y.appendChild(q);q=document.createElement("tr");I=document.createElement("td");I.colSpan=2;
+I.style.paddingTop="20px";I.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&I.appendChild(S);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)});g.className="geBtn";I.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});g.className="geBtn gePrimaryBtn";I.appendChild(g);b.editor.cancelFirst||
+I.appendChild(S);q.appendChild(I);y.appendChild(q);t.appendChild(y);this.container=t};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(f){}};
+PrintDialog.createPrintPreview=function(b,f,m,t,y,q,B){f=new mxPrintPreview(b,f,m,t,y,q);f.title=mxResources.get("preview");f.addPageCss=!mxClient.IS_SF;f.printBackgroundImage=!0;f.autoOrigin=B;B=b.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";f.backgroundColor=B;var I=f.isTextLabel;f.isTextLabel=function(D){return"geHint"==!D.className&&I.apply(this,arguments)};var S=f.getLinkForCellState;f.getLinkForCellState=function(D){return b.getAbsoluteUrl(S.apply(this,arguments))};return f};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function f(){var x=c;null!=x&&null!=x.originalSrc&&(x=b.createImageForPageLink(x.originalSrc,null));null!=x&&null!=x.src?(P.style.backgroundImage="url("+x.src+")",P.style.display="inline-block"):(P.style.backgroundImage="",P.style.display="none");P.style.backgroundColor="";null!=g&&g!=mxConstants.NONE&&(P.style.backgroundColor=g,P.style.display="inline-block")}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");
-var q=document.createElement("tr");var C=document.createElement("td");C.style.verticalAlign="top";C.style.fontSize="10pt";mxUtils.write(C,mxResources.get("paperSize")+":");q.appendChild(C);C=document.createElement("td");C.style.verticalAlign="top";C.style.fontSize="10pt";var J=PageSetupDialog.addPageFormatPanel(C,"pagesetupdialog",l.pageFormat);q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");mxUtils.write(C,mxResources.get("gridSize")+":");q.appendChild(C);
-C=document.createElement("td");C.style.whiteSpace="nowrap";var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","0");S.style.width="40px";S.style.marginLeft="6px";S.value=l.getGridSize();C.appendChild(S);mxEvent.addListener(S,"change",function(){var x=parseInt(S.value);S.value=Math.max(1,isNaN(x)?l.getGridSize():x)});q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");mxUtils.write(C,mxResources.get("background")+":");
-q.appendChild(C);C=document.createElement("td");var D=document.createElement("button");D.className="geBtn";D.style.margin="0px";mxUtils.write(D,mxResources.get("change")+"...");var P=document.createElement("div");P.style.display="inline-block";P.style.verticalAlign="middle";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.backgroundSize="contain";P.style.border="1px solid lightGray";P.style.borderRadius="4px";P.style.marginRight="14px";P.style.height="32px";
-P.style.width="64px";P.style.cursor="pointer";P.style.padding="4px";var c=l.backgroundImage,g=l.background,m=l.shadowVisible,n=function(x){b.showBackgroundImageDialog(function(F,H,M,L){H||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),c=F,m=L);g=M;f()},c,g,!0);mxEvent.consume(x)};mxEvent.addListener(D,"click",n);mxEvent.addListener(P,"click",n);f();C.appendChild(P);C.appendChild(D);q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");
-C.colSpan=2;C.style.paddingTop="16px";C.setAttribute("align","right");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&C.appendChild(D);n=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var x=parseInt(S.value);isNaN(x)||l.gridSize===x||l.setGridSize(x);x=new ChangePageSetup(b,g,c,J.get());x.ignoreColor=l.background==g;x.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=c?c.src:null);null!=m&&
-(x.shadowVisible=m);l.pageFormat.width==x.previousFormat.width&&l.pageFormat.height==x.previousFormat.height&&x.ignoreColor&&x.ignoreImage&&x.shadowVisible==l.shadowVisible||l.model.execute(x)});n.className="geBtn gePrimaryBtn";C.appendChild(n);b.editor.cancelFirst||C.appendChild(D);q.appendChild(C);y.appendChild(q);u.appendChild(y);this.container=u};
-PageSetupDialog.addPageFormatPanel=function(b,f,l,u){f="format-"+f;var y=document.createElement("input");y.setAttribute("name",f);y.setAttribute("type","radio");y.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",f);q.setAttribute("type","radio");q.setAttribute("value","landscape");var C=document.createElement("select");C.style.position="relative";C.style.marginBottom="4px";C.style.borderRadius="4px";C.style.borderWidth="1px";C.style.borderStyle="solid";
-C.style.boxSizing="border-box";C.style.padding="2px";C.style.width="210px";var J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.marginLeft="4px";J.style.width="210px";J.style.height="24px";y.style.marginRight="6px";J.appendChild(y);f=document.createElement("span");f.style.maxWidth="100px";mxUtils.write(f,mxResources.get("portrait"));J.appendChild(f);q.style.marginLeft="10px";q.style.marginRight="6px";J.appendChild(q);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,
-mxResources.get("landscape"));J.appendChild(S);var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.marginLeft="4px";D.style.fontSize="12px";D.style.width="210px";D.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";D.appendChild(P);mxUtils.write(D," x ");var c=document.createElement("input");c.setAttribute("size","7");c.setAttribute("title",mxResources.get("height"));c.style.textAlign=
-"right";D.appendChild(c);var g=document.createElement("select");g.style.marginLeft="4px";g.style.maxWidth="78px";g.style.width="78px";for(var m=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],n=0;n<m.length;n++){var x=document.createElement("option");x.setAttribute("value",m[n].unit);mxUtils.write(x,m[n].label);g.appendChild(x)}g.value=Editor.pageSizeUnit;D.appendChild(g);
-J.style.display="none";D.style.display="none";var F={},H=PageSetupDialog.getFormats();for(n=0;n<H.length;n++)m=H[n],F[m.key]=m,x=document.createElement("option"),x.setAttribute("value",m.key),mxUtils.write(x,m.title),C.appendChild(x);var M=function(){C.value="custom";for(var K=0;K<H.length;K++){var Z=H[K];null!=Z.format&&("a4"==Z.key?826==l.width?(l=mxRectangle.fromRectangle(l),l.width=827):826==l.height&&(l=mxRectangle.fromRectangle(l),l.height=827):"a5"==Z.key&&(584==l.width?(l=mxRectangle.fromRectangle(l),
-l.width=583):584==l.height&&(l=mxRectangle.fromRectangle(l),l.height=583)),l.width==Z.format.width&&l.height==Z.format.height?(C.value=Z.key,y.setAttribute("checked","checked"),y.defaultChecked=!0,y.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,detected=!0):l.width==Z.format.height&&l.height==Z.format.width&&(C.value=Z.key,y.removeAttribute("checked"),y.defaultChecked=!1,y.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,detected=q.checked=!0))}"custom"==
-C.value?(P.value=Editor.toUnit(l.width,g.value),c.value=Editor.toUnit(l.height,g.value),y.setAttribute("checked","checked"),C.value="custom",J.style.display="none",D.style.display=""):(J.style.display="",D.style.display="none")};M();b.appendChild(C);mxUtils.br(b);b.appendChild(J);b.appendChild(D);var L=function(K,Z){K=F[C.value];null!=K.format?(P.value=Editor.toUnit(q.checked?K.format.height:K.format.width,g.value),c.value=Editor.toUnit(q.checked?K.format.width:K.format.height,g.value),D.style.display=
-"none",J.style.display=""):(J.style.display="none",D.style.display="");K=parseFloat(P.value);if(isNaN(K)||0>=K)P.value=Editor.toUnit(l.width,g.value);K=parseFloat(c.value);if(isNaN(K)||0>=K)c.value=Editor.toUnit(l.height,g.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(P.value),g.value)),Math.floor(Editor.fromUnit(parseFloat(c.value),g.value)));Z||K.width==l.width&&K.height==l.height||(l=K,null!=u&&u(l))};mxEvent.addListener(f,"click",function(K){y.checked=!0;L(K);mxEvent.consume(K)});
-mxEvent.addListener(S,"click",function(K){q.checked=!0;L(K);mxEvent.consume(K)});mxEvent.addListener(P,"blur",L);mxEvent.addListener(P,"click",L);mxEvent.addListener(c,"blur",L);mxEvent.addListener(c,"click",L);mxEvent.addListener(q,"change",L);mxEvent.addListener(y,"change",L);mxEvent.addListener(C,"change",function(K){L(K,"custom"==C.value);mxEvent.consume(K)});mxEvent.addListener(g,"change",function(K){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),g.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,
-Editor.pageSizeUnit),g.value);Editor.pageSizeUnit=g.value;L(K,!0);mxEvent.consume(K)});L(null,!0);return{set:function(K){l=K;M(null,null,!0)},get:function(){return l},widthInput:P,heightInput:c}};
+var PageSetupDialog=function(b){function f(){var x=c;null!=x&&null!=x.originalSrc&&(x=b.createImageForPageLink(x.originalSrc,null));null!=x&&null!=x.src?(P.style.backgroundImage="url("+x.src+")",P.style.display="inline-block"):(P.style.backgroundImage="",P.style.display="none");P.style.backgroundColor="";null!=g&&g!=mxConstants.NONE&&(P.style.backgroundColor=g,P.style.display="inline-block")}var m=b.editor.graph,t=document.createElement("table");t.style.width="100%";t.style.height="100%";var y=document.createElement("tbody");
+var q=document.createElement("tr");var B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";mxUtils.write(B,mxResources.get("paperSize")+":");q.appendChild(B);B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";var I=PageSetupDialog.addPageFormatPanel(B,"pagesetupdialog",m.pageFormat);q.appendChild(B);y.appendChild(q);q=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("gridSize")+":");q.appendChild(B);
+B=document.createElement("td");B.style.whiteSpace="nowrap";var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","0");S.style.width="40px";S.style.marginLeft="6px";S.value=m.getGridSize();B.appendChild(S);mxEvent.addListener(S,"change",function(){var x=parseInt(S.value);S.value=Math.max(1,isNaN(x)?m.getGridSize():x)});q.appendChild(B);y.appendChild(q);q=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("background")+":");
+q.appendChild(B);B=document.createElement("td");var D=document.createElement("button");D.className="geBtn";D.style.margin="0px";mxUtils.write(D,mxResources.get("change")+"...");var P=document.createElement("div");P.style.display="inline-block";P.style.verticalAlign="middle";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.backgroundSize="contain";P.style.border="1px solid lightGray";P.style.borderRadius="4px";P.style.marginRight="14px";P.style.height="32px";
+P.style.width="64px";P.style.cursor="pointer";P.style.padding="4px";var c=m.backgroundImage,g=m.background,l=m.shadowVisible,n=function(x){b.showBackgroundImageDialog(function(F,G,L,M){G||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),c=F,l=M);g=L;f()},c,g,!0);mxEvent.consume(x)};mxEvent.addListener(D,"click",n);mxEvent.addListener(P,"click",n);f();B.appendChild(P);B.appendChild(D);q.appendChild(B);y.appendChild(q);q=document.createElement("tr");B=document.createElement("td");
+B.colSpan=2;B.style.paddingTop="16px";B.setAttribute("align","right");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&B.appendChild(D);n=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var x=parseInt(S.value);isNaN(x)||m.gridSize===x||m.setGridSize(x);x=new ChangePageSetup(b,g,c,I.get());x.ignoreColor=m.background==g;x.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=c?c.src:null);null!=l&&
+(x.shadowVisible=l);m.pageFormat.width==x.previousFormat.width&&m.pageFormat.height==x.previousFormat.height&&x.ignoreColor&&x.ignoreImage&&x.shadowVisible==m.shadowVisible||m.model.execute(x)});n.className="geBtn gePrimaryBtn";B.appendChild(n);b.editor.cancelFirst||B.appendChild(D);q.appendChild(B);y.appendChild(q);t.appendChild(y);this.container=t};
+PageSetupDialog.addPageFormatPanel=function(b,f,m,t){f="format-"+f;var y=document.createElement("input");y.setAttribute("name",f);y.setAttribute("type","radio");y.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",f);q.setAttribute("type","radio");q.setAttribute("value","landscape");var B=document.createElement("select");B.style.position="relative";B.style.marginBottom="4px";B.style.borderRadius="4px";B.style.borderWidth="1px";B.style.borderStyle="solid";
+B.style.boxSizing="border-box";B.style.padding="2px";B.style.width="210px";var I=document.createElement("div");I.style.whiteSpace="nowrap";I.style.marginLeft="4px";I.style.width="210px";I.style.height="24px";y.style.marginRight="6px";I.appendChild(y);f=document.createElement("span");f.style.maxWidth="100px";mxUtils.write(f,mxResources.get("portrait"));I.appendChild(f);q.style.marginLeft="10px";q.style.marginRight="6px";I.appendChild(q);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,
+mxResources.get("landscape"));I.appendChild(S);var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.marginLeft="4px";D.style.fontSize="12px";D.style.width="210px";D.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";D.appendChild(P);mxUtils.write(D," x ");var c=document.createElement("input");c.setAttribute("size","7");c.setAttribute("title",mxResources.get("height"));c.style.textAlign=
+"right";D.appendChild(c);var g=document.createElement("select");g.style.marginLeft="4px";g.style.maxWidth="78px";g.style.width="78px";for(var l=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],n=0;n<l.length;n++){var x=document.createElement("option");x.setAttribute("value",l[n].unit);mxUtils.write(x,l[n].label);g.appendChild(x)}g.value=Editor.pageSizeUnit;D.appendChild(g);
+I.style.display="none";D.style.display="none";var F={},G=PageSetupDialog.getFormats();for(n=0;n<G.length;n++)l=G[n],F[l.key]=l,x=document.createElement("option"),x.setAttribute("value",l.key),mxUtils.write(x,l.title),B.appendChild(x);var L=function(){B.value="custom";for(var K=0;K<G.length;K++){var Z=G[K];null!=Z.format&&("a4"==Z.key?826==m.width?(m=mxRectangle.fromRectangle(m),m.width=827):826==m.height&&(m=mxRectangle.fromRectangle(m),m.height=827):"a5"==Z.key&&(584==m.width?(m=mxRectangle.fromRectangle(m),
+m.width=583):584==m.height&&(m=mxRectangle.fromRectangle(m),m.height=583)),m.width==Z.format.width&&m.height==Z.format.height?(B.value=Z.key,y.setAttribute("checked","checked"),y.defaultChecked=!0,y.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,detected=!0):m.width==Z.format.height&&m.height==Z.format.width&&(B.value=Z.key,y.removeAttribute("checked"),y.defaultChecked=!1,y.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,detected=q.checked=!0))}"custom"==
+B.value?(P.value=Editor.toUnit(m.width,g.value),c.value=Editor.toUnit(m.height,g.value),y.setAttribute("checked","checked"),B.value="custom",I.style.display="none",D.style.display=""):(I.style.display="",D.style.display="none")};L();b.appendChild(B);mxUtils.br(b);b.appendChild(I);b.appendChild(D);var M=function(K,Z){K=F[B.value];null!=K.format?(P.value=Editor.toUnit(q.checked?K.format.height:K.format.width,g.value),c.value=Editor.toUnit(q.checked?K.format.width:K.format.height,g.value),D.style.display=
+"none",I.style.display=""):(I.style.display="none",D.style.display="");K=parseFloat(P.value);if(isNaN(K)||0>=K)P.value=Editor.toUnit(m.width,g.value);K=parseFloat(c.value);if(isNaN(K)||0>=K)c.value=Editor.toUnit(m.height,g.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(P.value),g.value)),Math.floor(Editor.fromUnit(parseFloat(c.value),g.value)));Z||K.width==m.width&&K.height==m.height||(m=K,null!=t&&t(m))};mxEvent.addListener(f,"click",function(K){y.checked=!0;M(K);mxEvent.consume(K)});
+mxEvent.addListener(S,"click",function(K){q.checked=!0;M(K);mxEvent.consume(K)});mxEvent.addListener(P,"blur",M);mxEvent.addListener(P,"click",M);mxEvent.addListener(c,"blur",M);mxEvent.addListener(c,"click",M);mxEvent.addListener(q,"change",M);mxEvent.addListener(y,"change",M);mxEvent.addListener(B,"change",function(K){M(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(g,"change",function(K){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),g.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,
+Editor.pageSizeUnit),g.value);Editor.pageSizeUnit=g.value;M(K,!0);mxEvent.consume(K)});M(null,!0);return{set:function(K){m=K;L(null,null,!0)},get:function(){return m},widthInput:P,heightInput:c}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,f,l,u,y,q,C,J,S,D,P){S=null!=S?S:!0;var c=document.createElement("div"),g=document.createElement("div");g.style.width="100%";g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoColumns="auto 1fr";g.style.boxSizing="border-box";g.style.padding="3px";var m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.justifyContent="flex-end";m.style.minWidth="0";var n=document.createElement("div");n.style.display="inline-block";
-n.style.textOverflow="ellipsis";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.fontSize="10pt";n.style.padding="2px 0";n.setAttribute("title",y||mxResources.get("filename"));mxUtils.write(n,(y||mxResources.get("filename"))+":");m.appendChild(n);g.appendChild(m);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.flexGrow="1";var F=mxUtils.button(l,function(){if(null==q||q(x.value))S&&b.hideDialog(),u(x.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
-y||null==C)if(null!=P?Editor.selectFilename(x):(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=g.parentNode;if(null!=H){var M=null;mxEvent.addListener(H,"dragleave",function(L){null!=M&&(M.style.backgroundColor="",M=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(L){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=x,M.style.backgroundColor=
-"#ebf2f9");L.stopPropagation();L.preventDefault()}));mxEvent.addListener(H,"drop",mxUtils.bind(this,function(L){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(L.dataTransfer.getData("text/uri-list")),F.click());L.stopPropagation();L.preventDefault()}))}}};m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.gap="4px";m.style.whiteSpace="nowrap";m.appendChild(x);g.appendChild(m);
-null==y&&null!=C||null==P||null==b.editor.diagramFileTypes||(m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.textOverflow="ellipsis",m.style.justifyContent="flex-end",m.style.fontSize="10pt",mxUtils.write(m,mxResources.get("type")+":"),g.appendChild(m),m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.whiteSpace="nowrap",g.appendChild(m),f=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),
-f.style.width="100%",m.appendChild(f));null!=C&&g.appendChild(C);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=P?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=D&&D()});m.className="geBtn";null==J||b.isOffline()||row.appendChild(b.createHelpIcon(J));
-b.editor.cancelFirst&&row.appendChild(m);mxEvent.addListener(x,"keypress",function(H){13==H.keyCode&&F.click()});row.appendChild(F);b.editor.cancelFirst||row.appendChild(m);g.appendChild(row);c.appendChild(g);this.container=c};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createFileTypes=function(b,f,l){var u=document.createElement("select");for(b=0;b<l.length;b++){var y=document.createElement("option");y.setAttribute("value",b);mxUtils.write(y,mxResources.get(l[b].description)+" (."+l[b].extension+")");u.appendChild(y)}mxEvent.addListener(u,"change",function(q){q=l[u.value].extension;var C=f.value.lastIndexOf(".drawio.");C=0<C?C:f.value.lastIndexOf(".");"drawio"!=q&&(q="drawio."+q);f.value=0<C?f.value.substring(0,C+1)+q:f.value+"."+q;"createEvent"in
-document?(q=document.createEvent("HTMLEvents"),q.initEvent("change",!1,!0),f.dispatchEvent(q)):f.fireEvent("onchange")});b=function(q){q=f.value.toLowerCase();for(var C=0,J=0;J<l.length;J++){var S=l[J].extension,D=null;"drawio"!=S&&(D=S,S=".drawio."+S);if(q.substring(q.length-S.length-1)=="."+S||null!=D&&q.substring(q.length-D.length-1)=="."+D){C=J;break}}u.value=C};mxEvent.addListener(f,"change",b);mxEvent.addListener(f,"keyup",b);b();return u};
-var WrapperWindow=function(b,f,l,u,y,q,C,J){J=null!=J?J:document.createElement("div");this.window=new mxWindow(f,J,l,u,y,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);C(J)};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var C=this.graph;if(null!=C.container&&!C.transparentBackground){if(C.pageVisible){var J=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=C.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(J),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
-this.backgroundPageShape.init(C.container),S.style.position="absolute",C.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(D){C.dblClick(D)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(D){C.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(D))}),mxUtils.bind(this,function(D){null!=
-C.tooltipHandler&&C.tooltipHandler.isHideOnHover()&&C.tooltipHandler.hide();C.isMouseDown&&!mxEvent.isConsumed(D)&&C.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(D))}),mxUtils.bind(this,function(D){C.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(D))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=J,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(C,J,S){var D=this.graph;C=null!=C?C:1;var P=mxUtils.getLightDarkColor(null==D.background||D.background==mxConstants.NONE?D.defaultPageBackgroundColor:D.background).cssText,c=mxUtils.getLightDarkColor(D.defaultPageBorderColor).cssText,g=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",m="none",n="";"simple"==D.getAdaptiveColors()&&D.background!=mxConstants.NONE&&null!=D.background&&(P=D.background);if(D.isGridEnabled()||D.gridVisible){n=
-10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(g,C))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",n=D.gridSize*this.scale*this.gridSteps*C):m="url("+this.gridImage+")";var x=g=0;J=null!=J?J-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var F=D.gridSize*this.scale*this.gridSteps,H=J%F;F=S%F;null!=D.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),g=1+x.x,x=1+x.y);n=-Math.round(n-mxUtils.mod(this.translate.x*
-this.scale-g+J,n)+H*C)+"px "+-Math.round(n-mxUtils.mod(this.translate.y*this.scale-x+S,n)+F*C)+"px"}C=D.view.canvas;null!=C.ownerSVGElement&&(C=C.ownerSVGElement);g=!Editor.isDarkMode()&&D.enableDiagramBackground;null!=D.view.backgroundPageShape?(D.view.backgroundPageShape.node.style.backgroundPosition=n,D.view.backgroundPageShape.node.style.backgroundImage=m,D.view.backgroundPageShape.node.style.backgroundColor=P,D.view.backgroundPageShape.node.style.borderColor=c,D.view.backgroundPageShape.node.style.colorScheme=
-"none"==D.getAdaptiveColors()?"light":"",C.style.backgroundImage="none",C.style.backgroundColor="",D.container.style.backgroundColor=g?D.diagramBackgroundColor:""):(C.style.backgroundPosition=n,C.style.backgroundImage=m,"1"==urlParams.transparent?D.container.style.background="transparent":!g||null!=D.background&&D.background!=mxConstants.NONE?C.style.backgroundColor=P:(C.style.backgroundColor=D.diagramBackgroundColor,D.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(C,
-J){for(var S=this.graph.gridSize*this.scale*(null!=J?J:1);S<this.minGridSize;)S*=2;J=this.gridSteps*S;for(var D=[],P=1;P<this.gridSteps;P++){var c=P*S;D.push("M 0 "+c+" L "+J+" "+c+" M "+c+" 0 L "+c+" "+J)}C=mxUtils.getLightDarkColor(C);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+J+'" height="'+J+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
-J+'" height="'+J+'" patternUnits="userSpaceOnUse"><path d="'+D.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(C.cssText)+';" stroke="'+C.light+'" opacity="0.2" stroke-width="1"/><path d="M '+J+" 0 L 0 0 0 "+J+'" fill="none" style="stroke:'+mxUtils.htmlEntities(C.cssText)+';" stroke="'+C.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(C,J){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var D=this.gridSize*this.view.scale*this.view.gridSteps;D=-Math.round(D-mxUtils.mod(this.view.translate.x*this.view.scale+C,D))+"px "+-Math.round(D-mxUtils.mod(this.view.translate.y*this.view.scale+J,D))+"px";S.style.backgroundPosition=D}};mxGraph.prototype.updatePageBreaks=function(C,J,S){var D=this.view.scale,P=this.view.translate,c=this.pageFormat,g=D*this.pageScale,m=this.view.getBackgroundPageBounds();
-J=m.width;S=m.height;var n=new mxRectangle(D*P.x,D*P.y,c.width*g,c.height*g),x=(C=C&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(S/n.height)-1:0,F=C?Math.ceil(J/n.width)-1:0,H=m.x+J,M=m.y+S;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);C=mxUtils.bind(this,function(L){if(null!=L){for(var K=L==this.horizontalPageBreaks?x:F,Z=0;Z<=K;Z++){var ha=L==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),
-Math.round(m.y+(Z+1)*n.height)),new mxPoint(Math.round(H),Math.round(m.y+(Z+1)*n.height))]:[new mxPoint(Math.round(m.x+(Z+1)*n.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(Z+1)*n.width),Math.round(M))];null!=L[Z]?(L[Z].points=ha,L[Z].redraw()):(ha=new mxPolyline(ha,this.pageBreakColor),ha.dialect=this.dialect,ha.isDashed=this.pageBreakDashed,ha.pointerEvents=!1,ha.init(this.view.backgroundPane),ha.redraw(),L[Z]=ha)}for(Z=K;Z<L.length;Z++)null!=L[Z]&&L[Z].destroy();L.splice(K,L.length-K)}});
-C(this.horizontalPageBreaks);C(this.verticalPageBreaks)};var f=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(C,J,S){for(var D=0;D<J.length;D++){if(this.graph.isTableCell(J[D])||this.graph.isTableRow(J[D]))return!1;if(this.graph.getModel().isVertex(J[D])){var P=this.graph.getCellGeometry(J[D]);if(null!=P&&P.relative)return!1}}return f.apply(this,arguments)};var l=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
-function(){var C=l.apply(this,arguments);C.intersects=mxUtils.bind(this,function(J,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(C,arguments)});return C};mxGraphView.prototype.createBackgroundPageShape=function(C){return new mxRectangleShape(C,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var C=this.getGraphBounds(),J=0<C.width?C.x/this.scale-this.translate.x:0,S=0<C.height?C.y/this.scale-this.translate.y:0,D=this.graph.pageFormat,
-P=this.graph.pageScale,c=D.width*P;D=D.height*P;P=Math.floor(Math.min(0,J)/c);var g=Math.floor(Math.min(0,S)/D);return new mxRectangle(this.scale*(this.translate.x+P*c),this.scale*(this.translate.y+g*D),this.scale*(Math.ceil(Math.max(1,J+C.width/this.scale)/c)-P)*c,this.scale*(Math.ceil(Math.max(1,S+C.height/this.scale)/D)-g)*D)};var u=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(C,J){u.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=C+"px",this.view.backgroundPageShape.node.style.marginTop=J+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(C,J,S,D,P,c){var g=y.apply(this,arguments);null==c||c||mxEvent.addListener(g,"mousedown",function(m){mxEvent.consume(m)});return g};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(C,J,S){var D=this.graph.model.getParent(C);if(J){var P=this.graph.model.isEdge(C)?null:this.graph.getCellGeometry(C);P=!this.graph.model.isEdge(D)&&!this.graph.isSiblingSelected(C)&&(null!=P&&P.relative||!this.graph.isContainer(D)||this.graph.isPart(C))}else if(P=q.apply(this,arguments),this.graph.isTableCell(C)||this.graph.isTableRow(C))P=D,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(S.getEvent())||
-this.graph.isCellSelected(C)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(C)&&this.graph.isCellSelected(D);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(C){C=C.getCell();for(var J=this.graph.getModel(),S=J.getParent(C),D=this.graph.view.getState(S),P=this.graph.isCellSelected(C);null!=D&&(J.isVertex(S)||J.isEdge(S));){var c=this.graph.isCellSelected(S);P=P||c;if(c||!P&&(this.graph.isTableCell(C)||this.graph.isTableRow(C)))C=S;S=J.getParent(S)}return C}})();EditorUi=function(b,f,l){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var u=this,y=this.editor.graph;y.lightbox=l;var q=y.getGraphBounds;y.getGraphBounds=function(){var ba=q.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var k=this.view.translate,v=this.view.scale;ba=mxRectangle.fromRectangle(ba);ba.add(new mxRectangle((k.x+V.x)*v,(k.y+V.y)*v,V.width*v,V.height*v))}return ba};y.useCssTransforms&&
-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(ba,V){this.clearSelectionState()});y.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);y.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);y.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){y.isEnabled=
-function(){return!1};y.panningHandler.isForcePanningEvent=function(ba){for(var V=ba.getSource();null!=V&&V!=y.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(ba.getEvent())};var C=y.panningHandler.start;y.panningHandler.start=function(){C.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var J=!1,S=!1;this.setDefaultStyle=function(ba){try{y.getModel().isEdge(ba)?
-S=y.pasteEdgeStyle=!1:J=!1;var V=y.getCellStyle(ba,!1),k=[],v=[],I;for(I in V)k.push(V[I]),v.push(I);y.getModel().isEdge(ba)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",v,"values",k,"cells",[ba],"force",!0));y.getModel().isEdge(ba)?S=y.pasteEdgeStyle=!0:J=!0}catch(N){this.handleError(N)}};this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);J=S=y.pasteEdgeStyle=
-!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};y.addListener("cellsInserted",function(ba,V){y.pasteCellStyles(y.includeDescendants(V.getProperty("cells")))});y.addListener("textInserted",function(ba,V){y.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var D=mxUtils.bind(this,function(ba){null==ba&&(ba=window.event);return y.isEditing()||null!=ba&&this.isSelectionAllowed(ba)});this.container!=document.body||this.editor.chromeless&&
-!this.editor.editable||(this.menubarContainer.onselectstart=D,this.menubarContainer.onmousedown=D,this.toolbarContainer.onselectstart=D,this.toolbarContainer.onmousedown=D,this.diagramContainer.onselectstart=D,this.diagramContainer.onmousedown=D,this.sidebarContainer.onselectstart=D,this.sidebarContainer.onmousedown=D,this.formatContainer.onselectstart=D,this.formatContainer.onmousedown=D,null!=this.tabContainer&&(this.tabContainer.onselectstart=D),mxClient.IS_IOS&&(f=function(){var ba=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=
-navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{ba=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(k){}}return ba}(),null!=f&&16<=f[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,
-"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(f=function(ba){if(null!=ba){var V=mxEvent.getSource(ba);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return D(ba)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",f):this.diagramContainer.oncontextmenu=f):y.panningHandler.usePopupTrigger=!1;y.init(this.diagramContainer);mxClient.IS_SVG&&null!=y.view.getDrawPane()&&
-(f=y.view.getDrawPane().ownerSVGElement,null!=f&&(f.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=y.graphHandler){var P=y.graphHandler.start;y.graphHandler.start=function(){null!=u.hoverIcons&&u.hoverIcons.reset();P.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(ba){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(ba)-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(ba)-V.y-this.diagramContainer.clientHeight?
-this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(ba,V){return u.isSpaceDown()||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(ba){16==ba.which?this.shiftDown=!0:32!=ba.which||y.isEditing()?mxEvent.isConsumed(ba)||27!=ba.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),y.container.style.cursor="move",
-y.isEditing()||mxEvent.getSource(ba)!=y.container||mxEvent.consume(ba))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(ba){y.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var g=y.panningHandler.isForcePanningEvent;y.panningHandler.isForcePanningEvent=function(ba){return g.apply(this,arguments)||u.isSpaceDown()||mxEvent.isMouseEvent(ba.getEvent())&&(this.usePopupTrigger||
-!mxEvent.isPopupTrigger(ba.getEvent()))&&(!mxEvent.isControlDown(ba.getEvent())&&mxEvent.isRightMouseButton(ba.getEvent())||mxEvent.isMiddleMouseButton(ba.getEvent()))};var m=y.cellEditor.isStopEditingEvent;y.cellEditor.isStopEditingEvent=function(ba){return m.apply(this,arguments)||13==ba.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(ba)||mxClient.IS_MAC&&mxEvent.isMetaDown(ba)||mxClient.IS_SF&&mxEvent.isShiftDown(ba))};var n=y.isZoomWheelEvent;y.isZoomWheelEvent=function(){return u.isSpaceDown()||
-n.apply(this,arguments)};var x=mxUtils.bind(this,function(){if(null!=this.toolbar)for(var ba=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,V=this.toolbar.container.firstChild;null!=V;){var k=V.getAttribute("data-min-width");null!=k&&parseInt(k)>ba?V.style.display="none":V.style.display="";V=V.nextSibling}}),F=!1,H=null,M=null,L=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&F!=y.cellEditor.isContentEditing()){for(var ba=this.toolbar.container.firstChild,
-V=[];null!=ba;){var k=ba.nextSibling;ba.parentNode.removeChild(ba);V.push(ba);ba=k}ba=this.toolbar.fontMenu;k=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var v=0;v<L.length;v++)this.toolbar.container.appendChild(L[v]);this.toolbar.fontMenu=H;this.toolbar.sizeMenu=M}F=y.cellEditor.isContentEditing();H=ba;M=k;L=V;x()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",
-x);mxEvent.addListener(window,"resize",x);x();y.isTouchPopupMenuEnabled=function(){return null==u.dialog};var Z=y.cellEditor.startEditing;y.cellEditor.startEditing=function(){Z.apply(this,arguments);K();if(y.cellEditor.isContentEditing()){var ba=!1,V=function(){ba||(ba=!0,window.setTimeout(function(){var k=y.getSelectedEditingElement();null!=k&&(k=mxUtils.getCurrentStyle(k),null!=k&&null!=u.toolbar&&(u.toolbar.setFontName(mxUtils.getCssFontFamily(k.fontFamily)),u.toolbar.setFontSize(parseInt(k.fontSize))));
-ba=!1},0))};mxEvent.addListener(y.cellEditor.textarea,"input",V);mxEvent.addListener(y.cellEditor.textarea,"touchend",V);mxEvent.addListener(y.cellEditor.textarea,"mouseup",V);mxEvent.addListener(y.cellEditor.textarea,"keyup",V);V()}};var ha=y.cellEditor.stopEditing;y.cellEditor.stopEditing=function(ba,V){try{ha.apply(this,arguments),K()}catch(k){u.handleError(k)}};y.container.setAttribute("tabindex","0");y.container.style.cursor="default";if(window.self===window.top&&null!=y.container.parentNode)try{y.container.focus()}catch(ba){}var ca=
-y.fireMouseEvent;y.fireMouseEvent=function(ba,V,k){try{ba==mxEvent.MOUSE_DOWN&&this.container.focus(),ca.apply(this,arguments)}catch(v){u.handleError(v)}};var aa=y.foldCells;y.foldCells=function(ba,V,k,v,I){try{aa.apply(this,arguments)}catch(N){u.handleError(N)}};y.popupMenuHandler.autoExpand=!0;null!=this.menus&&(y.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(ba,V,k){this.menus.createPopupMenu(ba,V,k)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(ba){y.popupMenuHandler.hideMenu()}));
-this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};y.connectionHandler.addListener(mxEvent.CONNECT,function(ba,V){var k=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(k.push(V.getProperty("terminal")),window.setTimeout(function(){null!=u.hoverIcons&&u.hoverIcons.update(y.view.getState(k[k.length-1]))},0));y.pasteCellStyles(k)});var oa=null,da=null;b=mxUtils.bind(this,function(){if(null!=this.toolbar){var ba=this.getSelectionState();y.isEnabled()&&
-0<ba.edges.length?(null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+this.getImageForEdgeStyle(ba.style)+")"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+this.getImageForEdgeShape(ba.style)+")")):(null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+oa+")"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+da+")"))}});y.selectionModel.addListener(mxEvent.CHANGE,
-b);y.getModel().addListener(mxEvent.CHANGE,b);this.addListener("styleChanged",mxUtils.bind(this,function(ba,V){ba=V.getProperty("force");(this.updateDefaultStyle||ba)&&y.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),y.currentVertexStyle,y.currentEdgeStyle,J,S);null!=this.toolbar&&(this.toolbar.setFontName(y.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(y.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),V=this.getSelectionState(),
-null!=this.toolbar.edgeStyleMenu&&(oa=this.getImageForEdgeStyle(y.currentEdgeStyle),0==V.edges.length&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+oa+")")),null!=this.toolbar.edgeShapeMenu&&(da=this.getImageForEdgeShape(y.currentEdgeStyle),0==V.edges.length&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+da+")")))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var ba=y.currentVertexStyle.fontFamily||"Helvetica",V=String(y.currentVertexStyle.fontSize||"12"),k=y.getView().getState(y.getSelectionCell());
-null!=k&&(ba=k.style[mxConstants.STYLE_FONTFAMILY]||ba,V=k.style[mxConstants.STYLE_FONTSIZE]||V,10<ba.length&&(ba=ba.substring(0,8)+"..."));this.toolbar.setFontName(ba);this.toolbar.setFontSize(V)}),y.getSelectionModel().addListener(mxEvent.CHANGE,b),y.getModel().addListener(mxEvent.CHANGE,b));y.addListener(mxEvent.CELLS_ADDED,function(ba,V){ba=V.getProperty("cells");V=V.getProperty("parent");null!=V&&y.getModel().isLayer(V)&&!y.isCellVisible(V)&&null!=ba&&0<ba.length&&y.getModel().setVisible(V,!0)});
-Graph.selectParentLayer&&y.selectionModel.addListener(mxEvent.CHANGE,function(){if(y.isEnabled()&&!y.isSelectionEmpty()){var ba=y.getLayerForCells(y.getSelectionCells());null!=ba&&y.setDefaultParent(ba)}});this.gestureHandler=mxUtils.bind(this,function(ba){this.isHideCurrentMenuEvent(ba)&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ka=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ka&&window.clearTimeout(ka);ka=window.setTimeout(mxUtils.bind(this,
+var FilenameDialog=function(b,f,m,t,y,q,B,I,S,D,P){S=null!=S?S:!0;var c=document.createElement("div"),g=document.createElement("div");g.style.width="100%";g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoColumns="auto 1fr";g.style.boxSizing="border-box";g.style.padding="3px";var l=document.createElement("div");l.style.display="inline-flex";l.style.alignItems="center";l.style.justifyContent="flex-end";l.style.minWidth="0";var n=document.createElement("div");n.style.display="inline-block";
+n.style.textOverflow="ellipsis";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.fontSize="10pt";n.style.padding="2px 0";n.setAttribute("title",y||mxResources.get("filename"));mxUtils.write(n,(y||mxResources.get("filename"))+":");l.appendChild(n);g.appendChild(l);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.flexGrow="1";var F=mxUtils.button(m,function(){if(null==q||q(x.value))S&&b.hideDialog(),t(x.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
+y||null==B)if(null!=P?Editor.selectFilename(x):(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var G=g.parentNode;if(null!=G){var L=null;mxEvent.addListener(G,"dragleave",function(M){null!=L&&(L.style.backgroundColor="",L=null);M.stopPropagation();M.preventDefault()});mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(M){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=x,L.style.backgroundColor=
+"#ebf2f9");M.stopPropagation();M.preventDefault()}));mxEvent.addListener(G,"drop",mxUtils.bind(this,function(M){null!=L&&(L.style.backgroundColor="",L=null);0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(M.dataTransfer.getData("text/uri-list")),F.click());M.stopPropagation();M.preventDefault()}))}}};l=document.createElement("div");l.style.display="inline-flex";l.style.alignItems="center";l.style.gap="4px";l.style.whiteSpace="nowrap";l.appendChild(x);g.appendChild(l);
+null==y&&null!=B||null==P||null==b.editor.diagramFileTypes||(l=document.createElement("div"),l.style.display="inline-flex",l.style.alignItems="center",l.style.textOverflow="ellipsis",l.style.justifyContent="flex-end",l.style.fontSize="10pt",mxUtils.write(l,mxResources.get("type")+":"),g.appendChild(l),l=document.createElement("div"),l.style.display="inline-flex",l.style.alignItems="center",l.style.whiteSpace="nowrap",g.appendChild(l),f=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),
+f.style.width="100%",l.appendChild(f));null!=B&&g.appendChild(B);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=P?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=D&&D()});l.className="geBtn";null==I||b.isOffline()||row.appendChild(b.createHelpIcon(I));
+b.editor.cancelFirst&&row.appendChild(l);mxEvent.addListener(x,"keypress",function(G){13==G.keyCode&&F.click()});row.appendChild(F);b.editor.cancelFirst||row.appendChild(l);g.appendChild(row);c.appendChild(g);this.container=c};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createFileTypes=function(b,f,m){var t=document.createElement("select");for(b=0;b<m.length;b++){var y=document.createElement("option");y.setAttribute("value",b);mxUtils.write(y,mxResources.get(m[b].description)+" (."+m[b].extension+")");t.appendChild(y)}mxEvent.addListener(t,"change",function(q){q=m[t.value].extension;var B=f.value.lastIndexOf(".drawio.");B=0<B?B:f.value.lastIndexOf(".");"drawio"!=q&&(q="drawio."+q);f.value=0<B?f.value.substring(0,B+1)+q:f.value+"."+q;"createEvent"in
+document?(q=document.createEvent("HTMLEvents"),q.initEvent("change",!1,!0),f.dispatchEvent(q)):f.fireEvent("onchange")});b=function(q){q=f.value.toLowerCase();for(var B=0,I=0;I<m.length;I++){var S=m[I].extension,D=null;"drawio"!=S&&(D=S,S=".drawio."+S);if(q.substring(q.length-S.length-1)=="."+S||null!=D&&q.substring(q.length-D.length-1)=="."+D){B=I;break}}t.value=B};mxEvent.addListener(f,"change",b);mxEvent.addListener(f,"keyup",b);b();return t};
+var WrapperWindow=function(b,f,m,t,y,q,B,I){I=null!=I?I:document.createElement("div");this.window=new mxWindow(f,I,m,t,y,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);B(I)};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph;if(null!=B.container&&!B.transparentBackground){if(B.pageVisible){var I=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=B.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(I),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+this.backgroundPageShape.init(B.container),S.style.position="absolute",B.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(D){B.dblClick(D)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(D){B.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(D))}),mxUtils.bind(this,function(D){null!=
+B.tooltipHandler&&B.tooltipHandler.isHideOnHover()&&B.tooltipHandler.hide();B.isMouseDown&&!mxEvent.isConsumed(D)&&B.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(D))}),mxUtils.bind(this,function(D){B.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(D))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=I,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
+mxGraphView.prototype.validateBackgroundStyles=function(B,I,S){var D=this.graph;B=null!=B?B:1;var P=mxUtils.getLightDarkColor(null==D.background||D.background==mxConstants.NONE?D.defaultPageBackgroundColor:D.background).cssText,c=mxUtils.getLightDarkColor(D.defaultPageBorderColor).cssText,g=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",l="none",n="";"simple"==D.getAdaptiveColors()&&D.background!=mxConstants.NONE&&null!=D.background&&(P=D.background);if(D.isGridEnabled()||D.gridVisible){n=
+10;mxClient.IS_SVG?(l=unescape(encodeURIComponent(this.createSvgGrid(g,B))),l=window.btoa?btoa(l):Base64.encode(l,!0),l="url(data:image/svg+xml;base64,"+l+")",n=D.gridSize*this.scale*this.gridSteps*B):l="url("+this.gridImage+")";var x=g=0;I=null!=I?I-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var F=D.gridSize*this.scale*this.gridSteps,G=I%F;F=S%F;null!=D.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),g=1+x.x,x=1+x.y);n=-Math.round(n-mxUtils.mod(this.translate.x*
+this.scale-g+I,n)+G*B)+"px "+-Math.round(n-mxUtils.mod(this.translate.y*this.scale-x+S,n)+F*B)+"px"}B=D.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);g=!Editor.isDarkMode()&&D.enableDiagramBackground;null!=D.view.backgroundPageShape?(D.view.backgroundPageShape.node.style.backgroundPosition=n,D.view.backgroundPageShape.node.style.backgroundImage=l,D.view.backgroundPageShape.node.style.backgroundColor=P,D.view.backgroundPageShape.node.style.borderColor=c,D.view.backgroundPageShape.node.style.colorScheme=
+"none"==D.getAdaptiveColors()?"light":"",B.style.backgroundImage="none",B.style.backgroundColor="",D.container.style.backgroundColor=g?D.diagramBackgroundColor:""):(B.style.backgroundPosition=n,B.style.backgroundImage=l,"1"==urlParams.transparent?D.container.style.background="transparent":!g||null!=D.background&&D.background!=mxConstants.NONE?B.style.backgroundColor=P:(B.style.backgroundColor=D.diagramBackgroundColor,D.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(B,
+I){for(var S=this.graph.gridSize*this.scale*(null!=I?I:1);S<this.minGridSize;)S*=2;I=this.gridSteps*S;for(var D=[],P=1;P<this.gridSteps;P++){var c=P*S;D.push("M 0 "+c+" L "+I+" "+c+" M "+c+" 0 L "+c+" "+I)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+I+'" height="'+I+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
+I+'" height="'+I+'" patternUnits="userSpaceOnUse"><path d="'+D.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" opacity="0.2" stroke-width="1"/><path d="M '+I+" 0 L 0 0 0 "+I+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,I){b.apply(this,arguments);
+if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var D=this.gridSize*this.view.scale*this.view.gridSteps;D=-Math.round(D-mxUtils.mod(this.view.translate.x*this.view.scale+B,D))+"px "+-Math.round(D-mxUtils.mod(this.view.translate.y*this.view.scale+I,D))+"px";S.style.backgroundPosition=D}};mxGraph.prototype.updatePageBreaks=function(B,I,S){var D=this.view.scale,P=this.view.translate,c=this.pageFormat,g=D*this.pageScale,l=this.view.getBackgroundPageBounds();
+I=l.width;S=l.height;var n=new mxRectangle(D*P.x,D*P.y,c.width*g,c.height*g),x=(B=B&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(S/n.height)-1:0,F=B?Math.ceil(I/n.width)-1:0,G=l.x+I,L=l.y+S;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(M){if(null!=M){for(var K=M==this.horizontalPageBreaks?x:F,Z=0;Z<=K;Z++){var ja=M==this.horizontalPageBreaks?[new mxPoint(Math.round(l.x),
+Math.round(l.y+(Z+1)*n.height)),new mxPoint(Math.round(G),Math.round(l.y+(Z+1)*n.height))]:[new mxPoint(Math.round(l.x+(Z+1)*n.width),Math.round(l.y)),new mxPoint(Math.round(l.x+(Z+1)*n.width),Math.round(L))];null!=M[Z]?(M[Z].points=ja,M[Z].redraw()):(ja=new mxPolyline(ja,this.pageBreakColor),ja.dialect=this.dialect,ja.isDashed=this.pageBreakDashed,ja.pointerEvents=!1,ja.init(this.view.backgroundPane),ja.redraw(),M[Z]=ja)}for(Z=K;Z<M.length;Z++)null!=M[Z]&&M[Z].destroy();M.splice(K,M.length-K)}});
+B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var f=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,I,S){for(var D=0;D<I.length;D++){if(this.graph.isTableCell(I[D])||this.graph.isTableRow(I[D]))return!1;if(this.graph.getModel().isVertex(I[D])){var P=this.graph.getCellGeometry(I[D]);if(null!=P&&P.relative)return!1}}return f.apply(this,arguments)};var m=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
+function(){var B=m.apply(this,arguments);B.intersects=mxUtils.bind(this,function(I,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(B,arguments)});return B};mxGraphView.prototype.createBackgroundPageShape=function(B){return new mxRectangleShape(B,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var B=this.getGraphBounds(),I=0<B.width?B.x/this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,D=this.graph.pageFormat,
+P=this.graph.pageScale,c=D.width*P;D=D.height*P;P=Math.floor(Math.min(0,I)/c);var g=Math.floor(Math.min(0,S)/D);return new mxRectangle(this.scale*(this.translate.x+P*c),this.scale*(this.translate.y+g*D),this.scale*(Math.ceil(Math.max(1,I+B.width/this.scale)/c)-P)*c,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/D)-g)*D)};var t=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,I){t.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=I+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,I,S,D,P,c){var g=y.apply(this,arguments);null==c||c||mxEvent.addListener(g,"mousedown",function(l){mxEvent.consume(l)});return g};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(B,I,S){var D=this.graph.model.getParent(B);if(I){var P=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);P=!this.graph.model.isEdge(D)&&!this.graph.isSiblingSelected(B)&&(null!=P&&P.relative||!this.graph.isContainer(D)||this.graph.isPart(B))}else if(P=q.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))P=D,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(S.getEvent())||
+this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(D);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var I=this.graph.getModel(),S=I.getParent(B),D=this.graph.view.getState(S),P=this.graph.isCellSelected(B);null!=D&&(I.isVertex(S)||I.isEdge(S));){var c=this.graph.isCellSelected(S);P=P||c;if(c||!P&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=I.getParent(S)}return B}})();EditorUi=function(b,f,m){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var t=this,y=this.editor.graph;y.lightbox=m;var q=y.getGraphBounds;y.getGraphBounds=function(){var aa=q.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var k=this.view.translate,v=this.view.scale;aa=mxRectangle.fromRectangle(aa);aa.add(new mxRectangle((k.x+V.x)*v,(k.y+V.y)*v,V.width*v,V.height*v))}return aa};y.useCssTransforms&&
+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(aa,V){this.clearSelectionState()});y.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);y.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);y.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){y.isEnabled=
+function(){return!1};y.panningHandler.isForcePanningEvent=function(aa){for(var V=aa.getSource();null!=V&&V!=y.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(aa.getEvent())};var B=y.panningHandler.start;y.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var I=!1,S=!1;this.setDefaultStyle=function(aa){try{y.getModel().isEdge(aa)?
+S=y.pasteEdgeStyle=!1:I=!1;var V=y.getCellStyle(aa,!1),k=[],v=[],J;for(J in V)k.push(V[J]),v.push(J);y.getModel().isEdge(aa)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",v,"values",k,"cells",[aa],"force",!0));y.getModel().isEdge(aa)?S=y.pasteEdgeStyle=!0:I=!0}catch(N){this.handleError(N)}};this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);I=S=y.pasteEdgeStyle=
+!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};y.addListener("cellsInserted",function(aa,V){y.pasteCellStyles(y.includeDescendants(V.getProperty("cells")))});y.addListener("textInserted",function(aa,V){y.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var D=mxUtils.bind(this,function(aa){null==aa&&(aa=window.event);return y.isEditing()||null!=aa&&this.isSelectionAllowed(aa)});this.container!=document.body||this.editor.chromeless&&
+!this.editor.editable||(this.menubarContainer.onselectstart=D,this.menubarContainer.onmousedown=D,this.toolbarContainer.onselectstart=D,this.toolbarContainer.onmousedown=D,this.diagramContainer.onselectstart=D,this.diagramContainer.onmousedown=D,this.sidebarContainer.onselectstart=D,this.sidebarContainer.onmousedown=D,this.formatContainer.onselectstart=D,this.formatContainer.onmousedown=D,null!=this.tabContainer&&(this.tabContainer.onselectstart=D),mxClient.IS_IOS&&(f=function(){var aa=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=
+navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{aa=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(k){}}return aa}(),null!=f&&16<=f[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,
+"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(f=function(aa){if(null!=aa){var V=mxEvent.getSource(aa);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return D(aa)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",f):this.diagramContainer.oncontextmenu=f):y.panningHandler.usePopupTrigger=!1;y.init(this.diagramContainer);mxClient.IS_SVG&&null!=y.view.getDrawPane()&&
+(f=y.view.getDrawPane().ownerSVGElement,null!=f&&(f.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=y.graphHandler){var P=y.graphHandler.start;y.graphHandler.start=function(){null!=t.hoverIcons&&t.hoverIcons.reset();P.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(aa){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(aa)-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(aa)-V.y-this.diagramContainer.clientHeight?
+this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(aa,V){return t.isSpaceDown()||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(aa){16==aa.which?this.shiftDown=!0:32!=aa.which||y.isEditing()?mxEvent.isConsumed(aa)||27!=aa.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),y.container.style.cursor="move",
+y.isEditing()||mxEvent.getSource(aa)!=y.container||mxEvent.consume(aa))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(aa){y.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var g=y.panningHandler.isForcePanningEvent;y.panningHandler.isForcePanningEvent=function(aa){return g.apply(this,arguments)||t.isSpaceDown()||mxEvent.isMouseEvent(aa.getEvent())&&(this.usePopupTrigger||
+!mxEvent.isPopupTrigger(aa.getEvent()))&&(!mxEvent.isControlDown(aa.getEvent())&&mxEvent.isRightMouseButton(aa.getEvent())||mxEvent.isMiddleMouseButton(aa.getEvent()))};var l=y.cellEditor.isStopEditingEvent;y.cellEditor.isStopEditingEvent=function(aa){return l.apply(this,arguments)||13==aa.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(aa)||mxClient.IS_SF&&mxEvent.isShiftDown(aa))};var n=y.isZoomWheelEvent;y.isZoomWheelEvent=function(){return t.isSpaceDown()||
+n.apply(this,arguments)};var x=mxUtils.bind(this,function(){if(null!=this.toolbar)for(var aa=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,V=this.toolbar.container.firstChild;null!=V;){var k=V.getAttribute("data-min-width");null!=k&&parseInt(k)>aa?V.style.display="none":V.style.display="";V=V.nextSibling}}),F=!1,G=null,L=null,M=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&F!=y.cellEditor.isContentEditing()){for(var aa=this.toolbar.container.firstChild,
+V=[];null!=aa;){var k=aa.nextSibling;aa.parentNode.removeChild(aa);V.push(aa);aa=k}aa=this.toolbar.fontMenu;k=this.toolbar.sizeMenu;if(null==M)this.toolbar.createTextToolbar();else{for(var v=0;v<M.length;v++)this.toolbar.container.appendChild(M[v]);this.toolbar.fontMenu=G;this.toolbar.sizeMenu=L}F=y.cellEditor.isContentEditing();G=aa;L=k;M=V;x()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",
+x);mxEvent.addListener(window,"resize",x);x();y.isTouchPopupMenuEnabled=function(){return null==t.dialog};var Z=y.cellEditor.startEditing;y.cellEditor.startEditing=function(){Z.apply(this,arguments);K();if(y.cellEditor.isContentEditing()){var aa=!1,V=function(){aa||(aa=!0,window.setTimeout(function(){var k=y.getSelectedEditingElement();null!=k&&(k=mxUtils.getCurrentStyle(k),null!=k&&null!=t.toolbar&&(t.toolbar.setFontName(mxUtils.getCssFontFamily(k.fontFamily)),t.toolbar.setFontSize(parseInt(k.fontSize))));
+aa=!1},0))};mxEvent.addListener(y.cellEditor.textarea,"input",V);mxEvent.addListener(y.cellEditor.textarea,"touchend",V);mxEvent.addListener(y.cellEditor.textarea,"mouseup",V);mxEvent.addListener(y.cellEditor.textarea,"keyup",V);V()}};var ja=y.cellEditor.stopEditing;y.cellEditor.stopEditing=function(aa,V){try{ja.apply(this,arguments),K()}catch(k){t.handleError(k)}};y.container.setAttribute("tabindex","0");y.container.style.cursor="default";if(window.self===window.top&&null!=y.container.parentNode)try{y.container.focus()}catch(aa){}var da=
+y.fireMouseEvent;y.fireMouseEvent=function(aa,V,k){try{aa==mxEvent.MOUSE_DOWN&&this.container.focus(),da.apply(this,arguments)}catch(v){t.handleError(v)}};var ba=y.foldCells;y.foldCells=function(aa,V,k,v,J){try{ba.apply(this,arguments)}catch(N){t.handleError(N)}};y.popupMenuHandler.autoExpand=!0;null!=this.menus&&(y.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(aa,V,k){this.menus.createPopupMenu(aa,V,k)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(aa){y.popupMenuHandler.hideMenu()}));
+this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};y.connectionHandler.addListener(mxEvent.CONNECT,function(aa,V){var k=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(k.push(V.getProperty("terminal")),window.setTimeout(function(){null!=t.hoverIcons&&t.hoverIcons.update(y.view.getState(k[k.length-1]))},0));y.pasteCellStyles(k)});var na=null,ca=null;b=mxUtils.bind(this,function(){if(null!=this.toolbar){var aa=this.getSelectionState();y.isEnabled()&&
+0<aa.edges.length?(null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+this.getImageForEdgeStyle(aa.style)+")"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+this.getImageForEdgeShape(aa.style)+")")):(null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+na+")"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+ca+")"))}});y.selectionModel.addListener(mxEvent.CHANGE,
+b);y.getModel().addListener(mxEvent.CHANGE,b);this.addListener("styleChanged",mxUtils.bind(this,function(aa,V){aa=V.getProperty("force");(this.updateDefaultStyle||aa)&&y.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),y.currentVertexStyle,y.currentEdgeStyle,I,S);null!=this.toolbar&&(this.toolbar.setFontName(y.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(y.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),V=this.getSelectionState(),
+null!=this.toolbar.edgeStyleMenu&&(na=this.getImageForEdgeStyle(y.currentEdgeStyle),0==V.edges.length&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+na+")")),null!=this.toolbar.edgeShapeMenu&&(ca=this.getImageForEdgeShape(y.currentEdgeStyle),0==V.edges.length&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+ca+")")))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var aa=y.currentVertexStyle.fontFamily||"Helvetica",V=String(y.currentVertexStyle.fontSize||"12"),k=y.getView().getState(y.getSelectionCell());
+null!=k&&(aa=k.style[mxConstants.STYLE_FONTFAMILY]||aa,V=k.style[mxConstants.STYLE_FONTSIZE]||V,10<aa.length&&(aa=aa.substring(0,8)+"..."));this.toolbar.setFontName(aa);this.toolbar.setFontSize(V)}),y.getSelectionModel().addListener(mxEvent.CHANGE,b),y.getModel().addListener(mxEvent.CHANGE,b));y.addListener(mxEvent.CELLS_ADDED,function(aa,V){aa=V.getProperty("cells");V=V.getProperty("parent");null!=V&&y.getModel().isLayer(V)&&!y.isCellVisible(V)&&null!=aa&&0<aa.length&&y.getModel().setVisible(V,!0)});
+Graph.selectParentLayer&&y.selectionModel.addListener(mxEvent.CHANGE,function(){if(y.isEnabled()&&!y.isSelectionEmpty()){var aa=y.getLayerForCells(y.getSelectionCells());null!=aa&&y.setDefaultParent(aa)}});this.gestureHandler=mxUtils.bind(this,function(aa){this.isHideCurrentMenuEvent(aa)&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ka=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ka&&window.clearTimeout(ka);ka=window.setTimeout(mxUtils.bind(this,
function(){ka=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){y.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){y.view.validateBackground()}));y.addListener("gridSizeChanged",mxUtils.bind(this,function(){y.isGridEnabled()&&y.view.validateBackground()}));this.editor.resetGraph()}this.init();y.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,f,l){function u(J,S){var D=q;q+=S;return J.substring(D,q)}function y(J){J=u(J,4);return J.charCodeAt(3)+(J.charCodeAt(2)<<8)+(J.charCodeAt(1)<<16)+(J.charCodeAt(0)<<24)}var q=0;if(u(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(u(b,4),"IHDR"!=u(b,4))null!=l&&l();else{u(b,17);do{l=y(b);var C=u(b,4);if(null!=f&&f(q-8,C,l))break;value=u(b,l);u(b,4);if("IEND"==C)break}while(l)}};mxUtils.extend(EditorUi,mxEventSource);
+EditorUi.parsePng=function(b,f,m){function t(I,S){var D=q;q+=S;return I.substring(D,q)}function y(I){I=t(I,4);return I.charCodeAt(3)+(I.charCodeAt(2)<<8)+(I.charCodeAt(1)<<16)+(I.charCodeAt(0)<<24)}var q=0;if(t(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=m&&m();else if(t(b,4),"IHDR"!=t(b,4))null!=m&&m();else{t(b,17);do{m=y(b);var B=t(b,4);if(null!=f&&f(q-8,B,m))break;value=t(b,m);t(b,4);if("IEND"==B)break}while(m)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?220:230);EditorUi.prototype.hsplitPosition=screen.width<=Editor.smallScreenWidth?0:EditorUi.prototype.defaultSidebarWidth;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;
EditorUi.prototype.hsplitClickEnabled=!1;EditorUi.prototype.updateDefaultStyle=!1;EditorUi.prototype.spaceDown=!1;EditorUi.prototype.shiftDown=!1;
-EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var u=b.getRubberband();null!=u&&u.cancel()}));mxEvent.addListener(b.container,
-"keydown",mxUtils.bind(this,function(u){this.onKeyDown(u)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(u){this.onKeyPress(u)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var f=b.setDefaultParent,l=this;this.editor.graph.setDefaultParent=function(){f.apply(this,
-arguments);l.updateActionStates()};b.showLinkDialog=mxUtils.bind(l,l.showLinkDialog);b.editLink=l.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
-EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,f=b.getSelectionCells(),l=this.initSelectionState(),u=!0,y=0;y<f.length;y++){var q=b.getCurrentCellStyle(f[y]);"0"!=mxUtils.getValue(q,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(l,f[y],f,u),u=!1)}this.updateSelectionStateForTableCells(l);if(Editor.enableCustomProperties){l.customProperties={};b=l.vertices;f=l.edges;for(y=0;y<b.length;y++)this.findCommonProperties(b[y],l.customProperties,0==y,l);
-for(y=0;y<f.length;y++)this.findCommonProperties(f[y],l.customProperties,0==b.length&&0==y,l)}return l};
-EditorUi.prototype.findCommonProperties=function(b,f,l,u){u=mxUtils.bind(this,function(D){if(null!=D)if(l)for(var P=0;P<D.length;P++)f[D[P].name]=D[P];else for(var c in f)if(null!=c){var g=!1;for(P=0;P<D.length;P++)if(D[P].name==c&&D[P].type==f[c].type){g=!0;break}g||delete f[c]}});var y=this.editor.graph,q=y.view.getState(b);if(null!=q&&null!=q.shape){if(!q.shape.commonCustomPropAdded){q.shape.commonCustomPropAdded=!0;q.shape.customProperties=q.shape.customProperties||[];if(null!=q.shape&&null!=
-q.shape.stencil&&null!=q.shape.stencil.desc){var C=q.shape.stencil,J=[],S=mxUtils.bind(this,function(D){D=C.desc.getElementsByTagName(D);for(var P=[],c=0;c<D.length;c++){var g=D[c].getAttribute("color");if(!mxUtils.isValidColor(g)&&!J[g]){J[g]=!0;var m=D[c].getAttribute("name");m=null!=m?m:Editor.getLabelForStylename(g);var n=D[c].getAttribute("default");n=null!=n?n:C.getDefaultColorValue(D[c],y);P.push({name:g,type:"color",primary:"false"!=D[c].getAttribute("primary"),defVal:n,defaultColor:n,undefinedColor:n,
-dispName:m})}}return P});Array.prototype.push.apply(q.shape.customProperties,S("fillcolor"));Array.prototype.push.apply(q.shape.customProperties,S("strokecolor"));Array.prototype.push.apply(q.shape.customProperties,S("fontcolor"))}q.cell.vertex?Array.prototype.push.apply(q.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(q.shape.customProperties,Editor.commonEdgeProperties)}u(q.shape.customProperties)}b=b.getAttribute("customProperties");if(null!=b)try{u(JSON.parse(b))}catch(D){}};
+EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var t=b.getRubberband();null!=t&&t.cancel()}));mxEvent.addListener(b.container,
+"keydown",mxUtils.bind(this,function(t){this.onKeyDown(t)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(t){this.onKeyPress(t)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var f=b.setDefaultParent,m=this;this.editor.graph.setDefaultParent=function(){f.apply(this,
+arguments);m.updateActionStates()};b.showLinkDialog=mxUtils.bind(m,m.showLinkDialog);b.editLink=m.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
+EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,f=b.getSelectionCells(),m=this.initSelectionState(),t=!0,y=0;y<f.length;y++){var q=b.getCurrentCellStyle(f[y]);"0"!=mxUtils.getValue(q,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(m,f[y],f,t),t=!1)}this.updateSelectionStateForTableCells(m);if(Editor.enableCustomProperties){m.customProperties={};b=m.vertices;f=m.edges;for(y=0;y<b.length;y++)this.findCommonProperties(b[y],m.customProperties,0==y,m);
+for(y=0;y<f.length;y++)this.findCommonProperties(f[y],m.customProperties,0==b.length&&0==y,m)}return m};
+EditorUi.prototype.findCommonProperties=function(b,f,m,t){t=mxUtils.bind(this,function(D){if(null!=D)if(m)for(var P=0;P<D.length;P++)f[D[P].name]=D[P];else for(var c in f)if(null!=c){var g=!1;for(P=0;P<D.length;P++)if(D[P].name==c&&D[P].type==f[c].type){g=!0;break}g||delete f[c]}});var y=this.editor.graph,q=y.view.getState(b);if(null!=q&&null!=q.shape){if(!q.shape.commonCustomPropAdded){q.shape.commonCustomPropAdded=!0;q.shape.customProperties=q.shape.customProperties||[];if(null!=q.shape&&null!=
+q.shape.stencil&&null!=q.shape.stencil.desc){var B=q.shape.stencil,I=[],S=mxUtils.bind(this,function(D){D=B.desc.getElementsByTagName(D);for(var P=[],c=0;c<D.length;c++){var g=D[c].getAttribute("color");if(!mxUtils.isValidColor(g)&&!I[g]){I[g]=!0;var l=D[c].getAttribute("name");l=null!=l?l:Editor.getLabelForStylename(g);var n=D[c].getAttribute("default");n=null!=n?n:B.getDefaultColorValue(D[c],y);P.push({name:g,type:"color",primary:"false"!=D[c].getAttribute("primary"),defVal:n,defaultColor:n,undefinedColor:n,
+dispName:l})}}return P});Array.prototype.push.apply(q.shape.customProperties,S("fillcolor"));Array.prototype.push.apply(q.shape.customProperties,S("strokecolor"));Array.prototype.push.apply(q.shape.customProperties,S("fontcolor"))}q.cell.vertex?Array.prototype.push.apply(q.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(q.shape.customProperties,Editor.commonEdgeProperties)}t(q.shape.customProperties)}b=b.getAttribute("customProperties");if(null!=b)try{t(JSON.parse(b))}catch(D){}};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var f=mxUtils.sortCells(b.cells),l=this.editor.graph.model,u=l.getParent(f[0]),y=l.getParent(u);if(null!=u&&null!=y){for(var q=u.getIndex(f[0]),C=y.getIndex(u),J=null,S=1,D=1,P=0,c=C<y.getChildCount()-1?l.getChildAt(l.getChildAt(y,C+1),q):null;P<f.length-1;){var g=f[++P];null==c||c!=g||null!=J&&S!=J||(J=S,S=0,D++,u=l.getParent(c),c=C+D<y.getChildCount()?l.getChildAt(l.getChildAt(y,C+D),q):null);var m=this.editor.graph.view.getState(g);
-if(g==l.getChildAt(u,q+S)&&null!=m&&1==mxUtils.getValue(m.style,"colspan",1)&&1==mxUtils.getValue(m.style,"rowspan",1))S++;else break}P==D*S-1&&(b.mergeCell=f[0],b.colspan=S,b.rowspan=D)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};
-EditorUi.prototype.createTimeout=function(b,f,l){var u=!0,y=null,q=mxUtils.bind(this,function(J){y.clear()&&(u=!1,J=null!=J?J:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,f,l)})},null!=l?l(J):this.handleError(J))}),C=window.setTimeout(q,null!=b?b:this.timeout);y={clear:function(){window.clearTimeout(C);return u},isAlive:function(){return u}};null!=f&&this.tryAndHandle(mxUtils.bind(this,function(){f(y)}),q);return y};
-EditorUi.prototype.tryAndHandle=function(b,f){try{b()}catch(l){null!=f?f(l):this.handleError(l)}};
-EditorUi.prototype.removeUserDefinedDarkColors=function(b,f,l){var u=this.editor.graph;b=null!=b?b:u.getSelectionCells();var y=Graph.colorStyles,q=document.createElement("div");u.model.beginUpdate();try{for(var C=0;C<b.length;C++)if(u.model.isEdge(b[C])||u.model.isVertex(b[C])){var J=u.getCellStyle(b[C],!1);if(null!=J)for(var S=0;S<y.length;S++)try{var D=J[y[S]];if(mxUtils.isLightDarkColor(D)){var P=mxUtils.getLightDarkColor(D);u.setCellStyles(y[S],P.light,[b[C]])}}catch(g){}f&&u.isHtmlLabel(b[C])&&
-"0"!=mxUtils.getValue(J,"html","0")&&(q.innerHTML=Graph.sanitizeHtml(u.getLabel(b[C])),Graph.addLightDarkColors(q,null,null,function(g,m,n){return mxUtils.isLightDarkColor(n)?(n=mxUtils.getLightDarkColor(n),g.style.setProperty(m,n.light),!0):!1})&&u.cellLabelChanged(b[C],q.innerHTML))}if(l&&mxUtils.isLightDarkColor(u.background)){P=mxUtils.getLightDarkColor(u.background);var c=new ChangePageSetup(this,P.light);c.ignoreImage=!0;u.model.execute(c)}}finally{u.model.endUpdate()}return b};
-EditorUi.prototype.updateSelectionStateForCell=function(b,f,l,u){l=this.editor.graph;b.cells.push(f);if(l.getModel().isVertex(f)){b.connections=0<l.model.getEdgeCount(f);b.unlocked=b.unlocked&&!l.isCellLocked(f);b.resizable=b.resizable&&l.isCellResizable(f);b.rotatable=b.rotatable&&l.isCellRotatable(f);b.movable=b.movable&&l.isCellMovable(f)&&!l.isTableRow(f)&&!l.isTableCell(f);b.swimlane=b.swimlane||l.isSwimlane(f);b.table=b.table||l.isTable(f);b.cell=b.cell||l.isTableCell(f);b.row=b.row||l.isTableRow(f);
-b.vertices.push(f);var y=l.getCellGeometry(f);if(null!=y&&(0<y.width?null==b.width?b.width=y.width:b.width!=y.width&&(b.width=""):b.containsLabel=!0,0<y.height?null==b.height?b.height=y.height:b.height!=y.height&&(b.height=""):b.containsLabel=!0,!y.relative||null!=y.offset)){var q=y.relative?y.offset.x:y.x;y=y.relative?y.offset.y:y.y;null==b.x?b.x=q:b.x!=q&&(b.x="");null==b.y?b.y=y:b.y!=y&&(b.y="")}}else l.getModel().isEdge(f)&&(b.edges.push(f),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
-!1);q=l.view.getState(f);null!=q&&(b.html=b.html&&l.isHtmlLabel(f),b.autoSize=b.autoSize||l.isAutoSizeState(q),b.glass=b.glass&&l.isGlassState(q),b.rounded=b.rounded&&l.isRoundedState(q),b.lineJumps=b.lineJumps&&l.isLineJumpState(q),b.image=b.image||l.isImageState(q),b.shadow=b.shadow&&l.isShadowState(q),b.fill=b.fill&&l.isFillState(q),b.gradient=b.fill&&l.isGradientState(q),b.stroke=b.stroke&&l.isStrokeState(q),f=mxUtils.getValue(q.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||
-"image"==f,l.mergeStyle(q.style,b.style,u))};
-EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,f=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,D){"mouseDown"==D.getProperty("eventName")&&f.hideShapePicker()}));var l=mxUtils.bind(this,function(){f.hideShapePicker(!0)});b.addListener("wheel",l);b.addListener(mxEvent.ESCAPE,l);b.view.addListener(mxEvent.SCALE,l);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,l);b.getSelectionModel().addListener(mxEvent.CHANGE,l);var u=b.popupMenuHandler.isMenuShowing;
-b.popupMenuHandler.isMenuShowing=function(){return u.apply(this,arguments)||null!=f.shapePicker||null!=f.currentMenu};var y=b.dblClick;b.dblClick=function(S,D){if(this.isEnabled())if(null!=D||null==f.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))y.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-l);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){f.hideShapePicker();q.apply(this,arguments)};var C=this.hoverIcons.execute;this.hoverIcons.execute=function(S,D,P){var c=P.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?C.apply(this,arguments):this.graph.connectVertex(S.cell,D,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(g,m,n){var x=b.getCompositeParent(S.cell);g=b.getCellGeometry(x);for(P.consume();null!=x&&b.model.isVertex(x)&&null!=g&&g.relative;)cell=
-x,x=b.model.getParent(cell),g=b.getCellGeometry(x);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.getGraphX(),P.getGraphY(),x,mxUtils.bind(this,function(F){n(F);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(F))}),D)}),30)}),mxUtils.bind(this,function(g){this.graph.selectCellsForConnectVertex(g,c,this)}))};var J=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,D){null!=J&&window.clearTimeout(J);J=window.setTimeout(mxUtils.bind(this,function(){var P=
-D.getProperty("arrow"),c=D.getProperty("direction"),g=D.getProperty("event");P=P.getBoundingClientRect();var m=mxUtils.getOffset(b.container),n=b.container.scrollLeft+P.x-m.x;m=b.container.scrollTop+P.y-m.y;var x=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=f.showShapePicker(n,m,x,mxUtils.bind(this,function(H){null!=H&&b.connectVertex(x,c,b.defaultEdgeLength,g,!0,!1,function(M,L,K){K(H);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(H))},
-function(M){b.selectCellsForConnectVertex(M)},g,this.hoverIcons)}),c,!0);null!=F&&(this.centerShapePicker(F,P,n,m,c),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){f.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,D){null!=J&&window.clearTimeout(J)}))}};
-EditorUi.prototype.centerShapePicker=function(b,f,l,u,y){if(y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST)b.style.width="40px";var q=b.getBoundingClientRect();y==mxConstants.DIRECTION_NORTH?(l-=q.width/2-10,u-=q.height+6):y==mxConstants.DIRECTION_SOUTH?(l-=q.width/2-10,u+=f.height+6):y==mxConstants.DIRECTION_WEST?(l-=q.width+6,u-=q.height/2-10):y==mxConstants.DIRECTION_EAST&&(l+=f.width+6,u-=q.height/2-10);b.style.left=l+"px";b.style.top=u+"px"};
-EditorUi.prototype.showShapePicker=function(b,f,l,u,y,q,C,J,S){var D=null;this.editor.graph.freehand.isDrawing()||(J=J||null==l,D=this.createShapePicker(b,f,l,u,y,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(l,q,J),q,C,J,S),null!=D&&(null==this.hoverIcons||q||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=u,this.shapePicker=D));return D};
-EditorUi.prototype.createShapePicker=function(b,f,l,u,y,q,C,J,S,D,P){P=null!=P?P:!0;var c=this.editor.graph,g=null;S=null!=S?S:function(x){x=x[0];var F=0,H=0,M=x.geometry;null!=M&&(c.model.isEdge(x)&&(x=M.getTerminalPoint(!1),M=new mxRectangle(0,0,x.x,x.y)),F=M.width/2,H=M.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-F),c.snap(Math.round(f/c.view.scale)-c.view.translate.y-H))};if(null!=C&&0<C.length){var m=this;c=this.editor.graph;g=document.createElement("div");
-y=c.view.getState(l);var n=null==l||null!=y&&c.isTransparentState(y)?null:c.copyStyle(l);g.className="geShapePicker";g.setAttribute("title",mxResources.get("sidebarTooltip"));g.style.left=Math.round(b)+"px";g.style.top=Math.round(f)+"px";mxClient.IS_POINTER&&(g.style.touchAction="none");J||mxUtils.setPrefixedStyle(g.style,"transform","translate(-22px,-22px)");c.container.appendChild(g);y=mxUtils.bind(this,function(x){var F=document.createElement("a");g.appendChild(F);null!=n&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(n,[x]):this.sidebar.graph.pasteCellStyles([x],c.currentVertexStyle,c.currentEdgeStyle);var H=x.geometry;c.model.isEdge(x)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([x],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=c.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==l&&c.isSelectionEmpty()){var L=c.cloneCell(x);if(null!=u)u(L);else{var K=S([L]);c.model.isEdge(L)?
-L.geometry.translate(K.x,K.y):(L.geometry.x=K.x,L.geometry.y=K.y);c.model.beginUpdate();try{c.addCell(L),c.model.isVertex(L)&&c.isAutoSizeCell(L)&&c.updateCellSize(L)}finally{c.model.endUpdate()}c.setSelectionCell(L);c.scrollCellToVisible(L);P&&c.startEditing(L);null!=m.hoverIcons&&m.hoverIcons.update(c.view.getState(L))}}else L=c.getEditableCells(null!=l?[l]:c.getSelectionCells()),c.updateShapes(x,L);null!=q&&q(M);mxEvent.consume(M)}}),25,25,null,null,l),H.style.display="flex",H.style.alignItems=
-"center",H.style.justifyContent="center",F.appendChild(H))});for(D=0;D<(J?Math.min(C.length,4):C.length);D++)y(C[D]);C=g.offsetTop+g.clientHeight-(c.container.scrollTop+c.container.offsetHeight);0<C&&(g.style.top=Math.max(c.container.scrollTop+22,f-C)+"px");C=g.offsetLeft+g.clientWidth-(c.container.scrollLeft+c.container.offsetWidth);0<C&&(g.style.left=Math.max(c.container.scrollLeft+22,b-C)+"px")}return g};
-EditorUi.prototype.getCellsForShapePicker=function(b,f,l){var u=this.editor.graph,y=mxUtils.bind(this,function(q,C,J,S){return u.createVertex(null,null,S||"",0,0,C||120,J||60,q,!1)});f=mxUtils.bind(this,function(q,C,J){q=new mxCell(J||"",new mxGeometry(0,0,u.defaultEdgeLength+20,0),q);q.geometry.setTerminalPoint(new mxPoint(0,0),!0);q.geometry.setTerminalPoint(new mxPoint(q.geometry.width,null!=C?C:0),!1);q.geometry.points=null!=C?[new mxPoint(q.geometry.width/2,C)]:[];q.geometry.relative=!0;q.edge=
-!0;return q});if(null!=b)try{b=u.cloneCell(b),u.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(q){b=null}null==b&&(b=y(u.appendFontSize(Editor.defaultTextStyle,u.vertexFontSize),60,30,"Text"));b=[b,y("whiteSpace=wrap;html=1;"),y("ellipse;whiteSpace=wrap;html=1;",80,80),y("rhombus;whiteSpace=wrap;html=1;",80,80),y("rounded=1;whiteSpace=wrap;html=1;"),y("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),y("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var f=mxUtils.sortCells(b.cells),m=this.editor.graph.model,t=m.getParent(f[0]),y=m.getParent(t);if(null!=t&&null!=y){for(var q=t.getIndex(f[0]),B=y.getIndex(t),I=null,S=1,D=1,P=0,c=B<y.getChildCount()-1?m.getChildAt(m.getChildAt(y,B+1),q):null;P<f.length-1;){var g=f[++P];null==c||c!=g||null!=I&&S!=I||(I=S,S=0,D++,t=m.getParent(c),c=B+D<y.getChildCount()?m.getChildAt(m.getChildAt(y,B+D),q):null);var l=this.editor.graph.view.getState(g);
+if(g==m.getChildAt(t,q+S)&&null!=l&&1==mxUtils.getValue(l.style,"colspan",1)&&1==mxUtils.getValue(l.style,"rowspan",1))S++;else break}P==D*S-1&&(b.mergeCell=f[0],b.colspan=S,b.rowspan=D)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};
+EditorUi.prototype.createTimeout=function(b,f,m){var t=!0,y=null,q=mxUtils.bind(this,function(I){y.clear()&&(t=!1,I=null!=I?I:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,f,m)})},null!=m?m(I):this.handleError(I))}),B=window.setTimeout(q,null!=b?b:this.timeout);y={clear:function(){window.clearTimeout(B);return t},isAlive:function(){return t}};null!=f&&this.tryAndHandle(mxUtils.bind(this,function(){f(y)}),q);return y};
+EditorUi.prototype.tryAndHandle=function(b,f){try{b()}catch(m){null!=f?f(m):this.handleError(m)}};
+EditorUi.prototype.removeUserDefinedDarkColors=function(b,f,m){var t=this.editor.graph;b=null!=b?b:t.getSelectionCells();var y=Graph.colorStyles,q=document.createElement("div");t.model.beginUpdate();try{for(var B=0;B<b.length;B++)if(t.model.isEdge(b[B])||t.model.isVertex(b[B])){var I=t.getCellStyle(b[B],!1);if(null!=I)for(var S=0;S<y.length;S++)try{var D=I[y[S]];if(mxUtils.isLightDarkColor(D)){var P=mxUtils.getLightDarkColor(D);t.setCellStyles(y[S],P.light,[b[B]])}}catch(g){}f&&t.isHtmlLabel(b[B])&&
+"0"!=mxUtils.getValue(I,"html","0")&&(q.innerHTML=Graph.sanitizeHtml(t.getLabel(b[B])),Graph.addLightDarkColors(q,null,null,function(g,l,n){return mxUtils.isLightDarkColor(n)?(n=mxUtils.getLightDarkColor(n),g.style.setProperty(l,n.light),!0):!1})&&t.cellLabelChanged(b[B],q.innerHTML))}if(m&&mxUtils.isLightDarkColor(t.background)){P=mxUtils.getLightDarkColor(t.background);var c=new ChangePageSetup(this,P.light);c.ignoreImage=!0;t.model.execute(c)}}finally{t.model.endUpdate()}return b};
+EditorUi.prototype.updateSelectionStateForCell=function(b,f,m,t){m=this.editor.graph;b.cells.push(f);if(m.getModel().isVertex(f)){b.connections=0<m.model.getEdgeCount(f);b.unlocked=b.unlocked&&!m.isCellLocked(f);b.resizable=b.resizable&&m.isCellResizable(f);b.rotatable=b.rotatable&&m.isCellRotatable(f);b.movable=b.movable&&m.isCellMovable(f)&&!m.isTableRow(f)&&!m.isTableCell(f);b.swimlane=b.swimlane||m.isSwimlane(f);b.table=b.table||m.isTable(f);b.cell=b.cell||m.isTableCell(f);b.row=b.row||m.isTableRow(f);
+b.vertices.push(f);var y=m.getCellGeometry(f);if(null!=y&&(0<y.width?null==b.width?b.width=y.width:b.width!=y.width&&(b.width=""):b.containsLabel=!0,0<y.height?null==b.height?b.height=y.height:b.height!=y.height&&(b.height=""):b.containsLabel=!0,!y.relative||null!=y.offset)){var q=y.relative?y.offset.x:y.x;y=y.relative?y.offset.y:y.y;null==b.x?b.x=q:b.x!=q&&(b.x="");null==b.y?b.y=y:b.y!=y&&(b.y="")}}else m.getModel().isEdge(f)&&(b.edges.push(f),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
+!1);q=m.view.getState(f);null!=q&&(b.html=b.html&&m.isHtmlLabel(f),b.autoSize=b.autoSize||m.isAutoSizeState(q),b.glass=b.glass&&m.isGlassState(q),b.rounded=b.rounded&&m.isRoundedState(q),b.lineJumps=b.lineJumps&&m.isLineJumpState(q),b.image=b.image||m.isImageState(q),b.shadow=b.shadow&&m.isShadowState(q),b.fill=b.fill&&m.isFillState(q),b.gradient=b.fill&&m.isGradientState(q),b.stroke=b.stroke&&m.isStrokeState(q),f=mxUtils.getValue(q.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||
+"image"==f,m.mergeStyle(q.style,b.style,t))};
+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,f=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,D){"mouseDown"==D.getProperty("eventName")&&f.hideShapePicker()}));var m=mxUtils.bind(this,function(){f.hideShapePicker(!0)});b.addListener("wheel",m);b.addListener(mxEvent.ESCAPE,m);b.view.addListener(mxEvent.SCALE,m);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,m);b.getSelectionModel().addListener(mxEvent.CHANGE,m);var t=b.popupMenuHandler.isMenuShowing;
+b.popupMenuHandler.isMenuShowing=function(){return t.apply(this,arguments)||null!=f.shapePicker||null!=f.currentMenu};var y=b.dblClick;b.dblClick=function(S,D){if(this.isEnabled())if(null!=D||null==f.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))y.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+m);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){f.hideShapePicker();q.apply(this,arguments)};var B=this.hoverIcons.execute;this.hoverIcons.execute=function(S,D,P){var c=P.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?B.apply(this,arguments):this.graph.connectVertex(S.cell,D,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(g,l,n){var x=b.getCompositeParent(S.cell);g=b.getCellGeometry(x);for(P.consume();null!=x&&b.model.isVertex(x)&&null!=g&&g.relative;)cell=
+x,x=b.model.getParent(cell),g=b.getCellGeometry(x);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.getGraphX(),P.getGraphY(),x,mxUtils.bind(this,function(F){n(F);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(F))}),D)}),30)}),mxUtils.bind(this,function(g){this.graph.selectCellsForConnectVertex(g,c,this)}))};var I=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,D){null!=I&&window.clearTimeout(I);I=window.setTimeout(mxUtils.bind(this,function(){var P=
+D.getProperty("arrow"),c=D.getProperty("direction"),g=D.getProperty("event");P=P.getBoundingClientRect();var l=mxUtils.getOffset(b.container),n=b.container.scrollLeft+P.x-l.x;l=b.container.scrollTop+P.y-l.y;var x=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=f.showShapePicker(n,l,x,mxUtils.bind(this,function(G){null!=G&&b.connectVertex(x,c,b.defaultEdgeLength,g,!0,!1,function(L,M,K){K(G);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(G))},
+function(L){b.selectCellsForConnectVertex(L)},g,this.hoverIcons)}),c,!0);null!=F&&(this.centerShapePicker(F,P,n,l,c),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){f.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,D){null!=I&&window.clearTimeout(I)}))}};
+EditorUi.prototype.centerShapePicker=function(b,f,m,t,y){if(y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST)b.style.width="40px";var q=b.getBoundingClientRect();y==mxConstants.DIRECTION_NORTH?(m-=q.width/2-10,t-=q.height+6):y==mxConstants.DIRECTION_SOUTH?(m-=q.width/2-10,t+=f.height+6):y==mxConstants.DIRECTION_WEST?(m-=q.width+6,t-=q.height/2-10):y==mxConstants.DIRECTION_EAST&&(m+=f.width+6,t-=q.height/2-10);b.style.left=m+"px";b.style.top=t+"px"};
+EditorUi.prototype.showShapePicker=function(b,f,m,t,y,q,B,I,S){var D=null;this.editor.graph.freehand.isDrawing()||(I=I||null==m,D=this.createShapePicker(b,f,m,t,y,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(m,q,I),q,B,I,S),null!=D&&(null==this.hoverIcons||q||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=t,this.shapePicker=D));return D};
+EditorUi.prototype.createShapePicker=function(b,f,m,t,y,q,B,I,S,D,P){P=null!=P?P:!0;var c=this.editor.graph,g=null;S=null!=S?S:function(x){x=x[0];var F=0,G=0,L=x.geometry;null!=L&&(c.model.isEdge(x)&&(x=L.getTerminalPoint(!1),L=new mxRectangle(0,0,x.x,x.y)),F=L.width/2,G=L.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-F),c.snap(Math.round(f/c.view.scale)-c.view.translate.y-G))};if(null!=B&&0<B.length){var l=this;c=this.editor.graph;g=document.createElement("div");
+y=c.view.getState(m);var n=null==m||null!=y&&c.isTransparentState(y)?null:c.copyStyle(m);g.className="geShapePicker";g.setAttribute("title",mxResources.get("sidebarTooltip"));g.style.left=Math.round(b)+"px";g.style.top=Math.round(f)+"px";mxClient.IS_POINTER&&(g.style.touchAction="none");I||mxUtils.setPrefixedStyle(g.style,"transform","translate(-22px,-22px)");c.container.appendChild(g);y=mxUtils.bind(this,function(x){var F=document.createElement("a");g.appendChild(F);null!=n&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(n,[x]):this.sidebar.graph.pasteCellStyles([x],c.currentVertexStyle,c.currentEdgeStyle);var G=x.geometry;c.model.isEdge(x)&&(G=G.getTerminalPoint(!1),G=new mxRectangle(0,0,G.x,G.y));null!=G&&(G=this.sidebar.createVertexTemplateFromCells([x],G.width,G.height,"",!0,!1,null,!1,mxUtils.bind(this,function(L){if(!mxEvent.isAltDown(L)||1!=c.getSelectionCount()){if(!mxEvent.isShiftDown(L)||null==m&&c.isSelectionEmpty()){var M=c.cloneCell(x);if(null!=t)t(M);else{var K=S([M]);c.model.isEdge(M)?
+M.geometry.translate(K.x,K.y):(M.geometry.x=K.x,M.geometry.y=K.y);c.model.beginUpdate();try{c.addCell(M),c.model.isVertex(M)&&c.isAutoSizeCell(M)&&c.updateCellSize(M)}finally{c.model.endUpdate()}c.setSelectionCell(M);c.scrollCellToVisible(M);P&&c.startEditing(M);null!=l.hoverIcons&&l.hoverIcons.update(c.view.getState(M))}}else M=c.getEditableCells(null!=m?[m]:c.getSelectionCells()),c.updateShapes(x,M);null!=q&&q(L);mxEvent.consume(L)}}),25,25,null,null,m),G.style.display="flex",G.style.alignItems=
+"center",G.style.justifyContent="center",F.appendChild(G))});for(D=0;D<(I?Math.min(B.length,4):B.length);D++)y(B[D]);B=g.offsetTop+g.clientHeight-(c.container.scrollTop+c.container.offsetHeight);0<B&&(g.style.top=Math.max(c.container.scrollTop+22,f-B)+"px");B=g.offsetLeft+g.clientWidth-(c.container.scrollLeft+c.container.offsetWidth);0<B&&(g.style.left=Math.max(c.container.scrollLeft+22,b-B)+"px")}return g};
+EditorUi.prototype.getCellsForShapePicker=function(b,f,m){var t=this.editor.graph,y=mxUtils.bind(this,function(q,B,I,S){return t.createVertex(null,null,S||"",0,0,B||120,I||60,q,!1)});f=mxUtils.bind(this,function(q,B,I){q=new mxCell(I||"",new mxGeometry(0,0,t.defaultEdgeLength+20,0),q);q.geometry.setTerminalPoint(new mxPoint(0,0),!0);q.geometry.setTerminalPoint(new mxPoint(q.geometry.width,null!=B?B:0),!1);q.geometry.points=null!=B?[new mxPoint(q.geometry.width/2,B)]:[];q.geometry.relative=!0;q.edge=
+!0;return q});if(null!=b)try{b=t.cloneCell(b),t.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(q){b=null}null==b&&(b=y(t.appendFontSize(Editor.defaultTextStyle,t.vertexFontSize),60,30,"Text"));b=[b,y("whiteSpace=wrap;html=1;"),y("ellipse;whiteSpace=wrap;html=1;",80,80),y("rhombus;whiteSpace=wrap;html=1;",80,80),y("rounded=1;whiteSpace=wrap;html=1;"),y("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),y("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",
120,60),y("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),y("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),y("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),y("triangle;whiteSpace=wrap;html=1;",60,80),y("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),y("shape=tape;whiteSpace=wrap;html=1;",120,100),y("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),y("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",
-80,60),y("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];l&&(b=b.concat([f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;"),f("edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;curved=0;rounded=0;endSize=8;startSize=8;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;",
+80,60),y("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];m&&(b=b.concat([f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;"),f("edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;curved=0;rounded=0;endSize=8;startSize=8;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;",
this.editor.graph.defaultEdgeLength/2)]));return b};EditorUi.prototype.isShapePickerVisible=function(b){return null!=this.shapePicker};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};EditorUi.prototype.isSpaceDown=function(){return this.spaceDown};EditorUi.prototype.isShiftDown=function(){return this.shiftDown};
-EditorUi.prototype.onKeyDown=function(b){var f=this.editor.graph;if(9==b.which&&f.isEnabled()&&!mxEvent.isControlDown(b)){if(f.isEditing())if(mxEvent.isAltDown(b))f.stopEditing(!1);else try{var l=f.cellEditor.isContentEditing()&&f.cellEditor.isTextSelected();if(window.getSelection&&f.cellEditor.isContentEditing()&&!l&&!mxClient.IS_IE&&!mxClient.IS_IE11){var u=window.getSelection(),y=0<u.rangeCount?u.getRangeAt(0).commonAncestorContainer:null;l=null!=y&&("LI"==y.nodeName||null!=y.parentNode&&"LI"==
-y.parentNode.nodeName)}l?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?f.stopEditing(!1):f.cellEditor.insertTab(f.cellEditor.isContentEditing()?null:4)}catch(q){}else mxEvent.isAltDown(b)?f.selectParentCell():f.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
+EditorUi.prototype.onKeyDown=function(b){var f=this.editor.graph;if(9==b.which&&f.isEnabled()&&!mxEvent.isControlDown(b)){if(f.isEditing())if(mxEvent.isAltDown(b))f.stopEditing(!1);else try{var m=f.cellEditor.isContentEditing()&&f.cellEditor.isTextSelected();if(window.getSelection&&f.cellEditor.isContentEditing()&&!m&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=window.getSelection(),y=0<t.rangeCount?t.getRangeAt(0).commonAncestorContainer:null;m=null!=y&&("LI"==y.nodeName||null!=y.parentNode&&"LI"==
+y.parentNode.nodeName)}m?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?f.stopEditing(!1):f.cellEditor.insertTab(f.cellEditor.isContentEditing()?null:4)}catch(q){}else mxEvent.isAltDown(b)?f.selectParentCell():f.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
EditorUi.prototype.onKeyPress=function(b){var f=this.editor.graph;!this.isImmediateEditingEvent(b)||f.isEditing()||f.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(f.escape(),f.startEditing(null,String.fromCharCode(b.which)))};EditorUi.prototype.isImmediateEditingEvent=function(b){return!0};
-EditorUi.prototype.updateCssForMarker=function(b,f,l,u,y){l=this.getImageForMarker(u,y,l);b.innerHTML="";null==l?b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")):(u=document.createElement("img"),u.setAttribute("src",l),"end"==f&&mxUtils.setPrefixedStyle(u.style,"transform","scaleX(-1)"),b.appendChild(u))};
-EditorUi.prototype.getImageForMarker=function(b,f,l){return"flexArrow"==l?null!=b&&b!=mxConstants.NONE?Format.blockMarkerImage.src:null:b==mxConstants.ARROW_CLASSIC?"1"!=f?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?"1"!=f?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?
+EditorUi.prototype.updateCssForMarker=function(b,f,m,t,y){m=this.getImageForMarker(t,y,m);b.innerHTML="";null==m?b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")):(t=document.createElement("img"),t.setAttribute("src",m),"end"==f&&mxUtils.setPrefixedStyle(t.style,"transform","scaleX(-1)"),b.appendChild(t))};
+EditorUi.prototype.getImageForMarker=function(b,f,m){return"flexArrow"==m?null!=b&&b!=mxConstants.NONE?Format.blockMarkerImage.src:null:b==mxConstants.ARROW_CLASSIC?"1"!=f?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?"1"!=f?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?
"1"!=f?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK_THIN?"1"!=f?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?"1"!=f?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?"1"!=f?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?"1"!=f?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==
b?"1"!=f?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:"box"==b?Format.boxMarkerImage.src:"halfCircle"==b?Format.halfCircleMarkerImage.src:"openAsync"==b?Format.openAsyncFilledMarkerImage.src:"async"==b?"1"!=f?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?Format.dashMarkerImage.src:"baseDash"==b?Format.baseDashMarkerImage.src:"cross"==b?Format.crossMarkerImage.src:"circle"==b?Format.circleMarkerImage.src:"circlePlus"==b?Format.circlePlusMarkerImage.src:
"ERone"==b?Format.EROneMarkerImage.src:"ERmandOne"==b?Format.ERmandOneMarkerImage.src:"ERmany"==b?Format.ERmanyMarkerImage.src:"ERoneToMany"==b?Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b?Format.ERzeroToManyMarkerImage.src:null};
EditorUi.prototype.getImageForEdgeShape=function(b){var f=Format.connectionImage.src;"link"==b.shape?f=Format.linkEdgeImage.src:"flexArrow"==b.shape?f=Format.arrowImage.src:"arrow"==b.shape?f=Format.simpleArrowImage.src:"filledEdge"==b.shape?f=Format.filledEdgeImage.src:"pipe"==b.shape?f=Format.pipeEdgeImage.src:"wire"==b.shape&&(f=Format.wireEdgeImage.src);return f};
-EditorUi.prototype.getImageForEdgeStyle=function(b){var f=Format.orthogonalImage.src,l=mxUtils.getValue(b,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(b,mxConstants.STYLE_NOEDGESTYLE,null)&&(l=null);"orthogonalEdgeStyle"==l&&"1"==mxUtils.getValue(b,mxConstants.STYLE_CURVED,null)?f=Format.curvedImage.src:"straight"==l||"none"==l||null==l?f=Format.straightImage.src:"entityRelationEdgeStyle"==l?f=Format.entityImage.src:"elbowEdgeStyle"==l?f="vertical"==mxUtils.getValue(b,mxConstants.STYLE_ELBOW,
-null)?Format.verticalElbowImage.src:Format.horizontalElbowImage.src:"isometricEdgeStyle"==l&&(f="vertical"==mxUtils.getValue(b,mxConstants.STYLE_ELBOW,null)?Format.verticalIsometricImage.src:Format.horizontalIsometricImage.src);return f};EditorUi.prototype.createMenus=function(){return null};
-EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,f=this.actions.get("paste"),l=this.actions.get("pasteHere");f.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));l.setEnabled(f.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,f=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):f.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var C=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{C=C||q.getSelectionCells();C=q.getExportableCells(q.model.getTopmostCells(C));for(var J={},S=q.createCellLookup(C),D=q.cloneCells(C,null,J),P=new mxGraphModel,c=P.getChildAt(P.getRoot(),
-0),g=0;g<D.length;g++){P.add(c,D[g]);var m=q.view.getState(C[g]);if(null!=m){var n=q.getCellGeometry(D[g]);null!=n&&n.relative&&!P.isEdge(C[g])&&null==S[mxObjectIdentity.get(P.getParent(C[g]))]&&(n.offset=null,n.relative=!1,n.x=m.x/m.view.scale-m.view.translate.x,n.y=m.y/m.view.scale-m.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(J,S),D);mxClipboard.insertCount=1;mxClipboard.setCells(D)}b.updatePasteActionStates();return C};var l=mxClipboard.paste;mxClipboard.paste=function(q){var C=
-null;q.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):C=l.apply(this,arguments);b.updatePasteActionStates();return C};var u=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){u.apply(this,arguments);b.updatePasteActionStates()};var y=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(q,C){y.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.getImageForEdgeStyle=function(b){var f=Format.orthogonalImage.src,m=mxUtils.getValue(b,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(b,mxConstants.STYLE_NOEDGESTYLE,null)&&(m=null);"orthogonalEdgeStyle"==m&&"1"==mxUtils.getValue(b,mxConstants.STYLE_CURVED,null)?f=Format.curvedImage.src:"straight"==m||"none"==m||null==m?f=Format.straightImage.src:"entityRelationEdgeStyle"==m?f=Format.entityImage.src:"elbowEdgeStyle"==m?f="vertical"==mxUtils.getValue(b,mxConstants.STYLE_ELBOW,
+null)?Format.verticalElbowImage.src:Format.horizontalElbowImage.src:"isometricEdgeStyle"==m&&(f="vertical"==mxUtils.getValue(b,mxConstants.STYLE_ELBOW,null)?Format.verticalIsometricImage.src:Format.horizontalIsometricImage.src);return f};EditorUi.prototype.createMenus=function(){return null};
+EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,f=this.actions.get("paste"),m=this.actions.get("pasteHere");f.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));m.setEnabled(f.isEnabled())};
+EditorUi.prototype.initClipboard=function(){var b=this,f=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):f.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var B=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{B=B||q.getSelectionCells();B=q.getExportableCells(q.model.getTopmostCells(B));for(var I={},S=q.createCellLookup(B),D=q.cloneCells(B,null,I),P=new mxGraphModel,c=P.getChildAt(P.getRoot(),
+0),g=0;g<D.length;g++){P.add(c,D[g]);var l=q.view.getState(B[g]);if(null!=l){var n=q.getCellGeometry(D[g]);null!=n&&n.relative&&!P.isEdge(B[g])&&null==S[mxObjectIdentity.get(P.getParent(B[g]))]&&(n.offset=null,n.relative=!1,n.x=l.x/l.view.scale-l.view.translate.x,n.y=l.y/l.view.scale-l.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(I,S),D);mxClipboard.insertCount=1;mxClipboard.setCells(D)}b.updatePasteActionStates();return B};var m=mxClipboard.paste;mxClipboard.paste=function(q){var B=
+null;q.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):B=m.apply(this,arguments);b.updatePasteActionStates();return B};var t=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){t.apply(this,arguments);b.updatePasteActionStates()};var y=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(q,B){y.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var U=this.graph.getPageLayout(),Y=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+U.x*Y.width),this.scale*(this.translate.y+U.y*Y.height),this.scale*U.width*Y.width,
-this.scale*U.height*Y.height)};b.getPreferredPageSize=function(U,Y,fa){U=this.getPageLayout();Y=this.getPageSize();return new mxRectangle(0,0,U.width*Y.width,U.height*Y.height)};var f=null,l=this;if(this.editor.isChromelessView()){this.chromelessResize=f=mxUtils.bind(this,function(U,Y,fa,na){if(null!=b.container&&!b.isViewer()){fa=null!=fa?fa:0;na=null!=na?na:0;var la=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),qa=mxUtils.hasScrollbars(b.container),ya=b.view.translate,wa=b.view.scale,
+this.scale*U.height*Y.height)};b.getPreferredPageSize=function(U,Y,fa){U=this.getPageLayout();Y=this.getPageSize();return new mxRectangle(0,0,U.width*Y.width,U.height*Y.height)};var f=null,m=this;if(this.editor.isChromelessView()){this.chromelessResize=f=mxUtils.bind(this,function(U,Y,fa,oa){if(null!=b.container&&!b.isViewer()){fa=null!=fa?fa:0;oa=null!=oa?oa:0;var la=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),qa=mxUtils.hasScrollbars(b.container),ya=b.view.translate,wa=b.view.scale,
Ia=mxRectangle.fromRectangle(la);Ia.x=Ia.x/wa-ya.x;Ia.y=Ia.y/wa-ya.y;Ia.width/=wa;Ia.height/=wa;ya=b.container.scrollTop;var Aa=b.container.scrollLeft,Ba=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ba+=3;var Ga=b.container.offsetWidth-Ba;Ba=b.container.offsetHeight-Ba;U=U?Math.max(.3,Math.min(Y||1,Ga/Ia.width)):wa;Y=(Ga-U*Ia.width)/2/U;var Ma=0==this.lightboxVerticalDivider?0:(Ba-U*Ia.height)/this.lightboxVerticalDivider/U;qa&&(Y=Math.max(Y,0),Ma=Math.max(Ma,
-0));if(qa||la.width<Ga||la.height<Ba)b.view.scaleAndTranslate(U,Math.floor(Y-Ia.x),Math.floor(Ma-Ia.y)),b.container.scrollTop=ya*U/wa,b.container.scrollLeft=Aa*U/wa;else if(0!=fa||0!=na)la=b.view.translate,b.view.setTranslate(Math.floor(la.x+fa/wa),Math.floor(la.y+na/wa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var u=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",u);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",u)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(U){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(U){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var y=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
+0));if(qa||la.width<Ga||la.height<Ba)b.view.scaleAndTranslate(U,Math.floor(Y-Ia.x),Math.floor(Ma-Ia.y)),b.container.scrollTop=ya*U/wa,b.container.scrollLeft=Aa*U/wa;else if(0!=fa||0!=oa)la=b.view.translate,b.view.setTranslate(Math.floor(la.x+fa/wa),Math.floor(la.y+oa/wa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var t=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",t);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",t)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(U){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(U){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var y=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var q=mxUtils.bind(this,function(){var U=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=U?parseInt(U["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",q);q();var C=0;q=mxUtils.bind(this,function(U,Y,fa){C++;
-var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",U);null!=fa&&na.setAttribute("title",fa);U=document.createElement("img");U.setAttribute("border","0");U.setAttribute("src",Y);U.style.width="36px";U.style.filter="invert(100%)";na.appendChild(U);this.chromelessToolbar.appendChild(na);return na});if(null!=y.backBtn){var J=Graph.sanitizeLink(y.backBtn.url);null!=J&&q(mxUtils.bind(this,function(U){window.location.href=
-J;mxEvent.consume(U)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=q(mxUtils.bind(this,function(U){this.actions.get("previousPage").funct();mxEvent.consume(U)}),Editor.chevronLeftImage,mxResources.get("previousPage")),D=document.createElement("div");D.style.fontFamily=Editor.defaultHtmlFont;D.style.display="inline-block";D.style.verticalAlign="top";D.style.fontWeight="bold";D.style.marginTop="8px";D.style.fontSize="14px";D.style.cursor="default";D.style.color=
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var q=mxUtils.bind(this,function(){var U=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=U?parseInt(U["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",q);q();var B=0;q=mxUtils.bind(this,function(U,Y,fa){B++;
+var oa=document.createElement("span");oa.style.paddingLeft="8px";oa.style.paddingRight="8px";oa.style.cursor="pointer";mxEvent.addListener(oa,"click",U);null!=fa&&oa.setAttribute("title",fa);U=document.createElement("img");U.setAttribute("border","0");U.setAttribute("src",Y);U.style.width="36px";U.style.filter="invert(100%)";oa.appendChild(U);this.chromelessToolbar.appendChild(oa);return oa});if(null!=y.backBtn){var I=Graph.sanitizeLink(y.backBtn.url);null!=I&&q(mxUtils.bind(this,function(U){window.location.href=
+I;mxEvent.consume(U)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=q(mxUtils.bind(this,function(U){this.actions.get("previousPage").funct();mxEvent.consume(U)}),Editor.chevronLeftImage,mxResources.get("previousPage")),D=document.createElement("div");D.style.fontFamily=Editor.defaultHtmlFont;D.style.display="inline-block";D.style.verticalAlign="top";D.style.fontWeight="bold";D.style.marginTop="8px";D.style.fontSize="14px";D.style.cursor="default";D.style.color=
mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(D);var P=q(mxUtils.bind(this,function(U){this.actions.get("nextPage").funct();mxEvent.consume(U)}),Editor.chevronRightImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){D.innerText="";var U=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(D,U+1+" / "+this.pages.length);D.setAttribute("title",mxResources.get("currentPage")+
": "+this.currentPage.getName());S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(U-1,this.pages.length)].getName());P.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(U+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";P.style.paddingLeft="4px";P.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(P.style.display="",S.style.display=
-"",D.style.display="inline-block"):(P.style.display="none",S.style.display="none",D.style.display="none");c()});if(null!=this.menus){var m=this.menus.get("pages");null!=m&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(U){var Y=new mxPopupMenu(m.funct);Y.smartSeparators=!0;Y.showDisabled=!0;Y.autoExpand=!0;Y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(Y,arguments);Y.destroy()});var fa=mxUtils.getOffset(D);Y.popup(fa.x,fa.y+D.offsetHeight,null,U);mxEvent.addListener(Y.div,
+"",D.style.display="inline-block"):(P.style.display="none",S.style.display="none",D.style.display="none");c()});if(null!=this.menus){var l=this.menus.get("pages");null!=l&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(U){var Y=new mxPopupMenu(l.funct);Y.smartSeparators=!0;Y.showDisabled=!0;Y.autoExpand=!0;Y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(Y,arguments);Y.destroy()});var fa=mxUtils.getOffset(D);Y.popup(fa.x,fa.y+D.offsetHeight,null,U);mxEvent.addListener(Y.div,
"mouseleave",mxUtils.bind(this,function(){Y.hideMenu()}))}))}this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",c)}q(mxUtils.bind(this,function(U){this.actions.get("zoomOut").funct();mxEvent.consume(U)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){this.actions.get("zoomIn").funct();mxEvent.consume(U)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){b.isLightboxView()?
(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(U)}),Editor.zoomFitImage,mxResources.get("fit"));var n=null,x=null,F=mxUtils.bind(this,function(U){null!=n&&(window.clearTimeout(n),n=null);null!=x&&(window.clearTimeout(x),x=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;x=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";x=null}),
-600)}),U||200)}),H=mxUtils.bind(this,function(U){null!=n&&(window.clearTimeout(n),n=null);null!=x&&(window.clearTimeout(x),x=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,U||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=q(mxUtils.bind(this,function(U){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var Y=M.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
+600)}),U||200)}),G=mxUtils.bind(this,function(U){null!=n&&(window.clearTimeout(n),n=null);null!=x&&(window.clearTimeout(x),x=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,U||30)});if("1"==urlParams.layers){this.layersDialog=null;var L=q(mxUtils.bind(this,function(U){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var Y=L.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
Y.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));Y=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
-Y.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(U)}),Editor.layersImage,mxResources.get("layers")),L=b.getModel();L.addListener(mxEvent.CHANGE,function(){M.style.display=1<L.getChildCount(L.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(q);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||q(mxUtils.bind(this,function(U){if(null!=this.editor.editButtonFunc)this.editor.editButtonFunc();
+Y.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(U)}),Editor.layersImage,mxResources.get("layers")),M=b.getModel();M.addListener(mxEvent.CHANGE,function(){L.style.display=1<M.getChildCount(M.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(q);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||q(mxUtils.bind(this,function(U){if(null!=this.editor.editButtonFunc)this.editor.editButtonFunc();
else if("_blank"==this.editor.editButtonLink){var Y=null!=this.currentPage?this.currentPage.getId():null;this.editor.editAsNew(this.getEditBlankXml(),null,null,Y)}else b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(U)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(g=0;g<this.lightboxToolbarActions.length;g++){var K=this.lightboxToolbarActions[g];K.elem=q(K.fn,K.icon,K.tooltip)}if(null!=y.refreshBtn){var Z=null==y.refreshBtn.url?null:Graph.sanitizeLink(y.refreshBtn.url);
q(mxUtils.bind(this,function(U){null!=Z?window.location.href=Z:window.location.reload();mxEvent.consume(U)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=y.fullscreenBtn&&window.self!==window.top&&q(mxUtils.bind(this,function(U){y.fullscreenBtn.url?b.openLink(y.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(U)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!y.noCloseBtn&&(y.closeBtn&&window.self===window.top||b.lightbox&&
("1"==urlParams.close||this.container!=document.body))&&q(mxUtils.bind(this,function(U){"1"==urlParams.close||y.closeBtn?window.close():(this.destroy(),mxEvent.consume(U))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",
-mxUtils.bind(this,function(U){mxEvent.isTouchEvent(U)||(mxEvent.isShiftDown(U)||H(30),F())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(U){mxEvent.consume(U)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(U){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(U)?F():H(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(U){mxEvent.isShiftDown(U)?
-F():H(100);mxEvent.consume(U)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(U){mxEvent.isTouchEvent(U)||H(30)}));var ha=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(U,Y){this.startX=Y.getGraphX();this.startY=Y.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(U,Y){},mouseUp:function(U,Y){mxEvent.isTouchEvent(Y.getEvent())&&Math.abs(this.scrollLeft-
-b.container.scrollLeft)<ha&&Math.abs(this.scrollTop-b.container.scrollTop)<ha&&Math.abs(this.startX-Y.getGraphX())<ha&&Math.abs(this.startY-Y.getGraphY())<ha&&(0<parseFloat(l.chromelessToolbar.style.opacity||0)?F():H(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ca=b.view.validate,aa=new mxPoint,oa=!1,da=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=l.currentPage&&da!=l.currentPage){da=l.currentPage;
-oa=!0;var U=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,!0);null==U&&(U=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));U=b.getPageLayout(U,aa,1);var Y=b.getDefaultTranslate(U);this.x0=U.x;this.y0=U.y;if(Y.x!=this.translate.x||Y.y!=this.translate.y)this.invalidate(),this.translate.x=Y.x,this.translate.y=Y.y}Y=b.getPagePadding();var fa=b.getPageSize();U=Y.x-(this.x0||0)*fa.width;Y=Y.y-(this.y0||0)*fa.height;if(this.translate.x!=U||this.translate.y!=Y)this.invalidate(),
-this.translate.x=U,this.translate.y=Y}ca.apply(this,arguments)};if(!b.isViewer()){var ka=b.sizeDidChange;b.sizeDidChange=function(){var U=oa;oa=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var Y=this.getPageLayout(),fa=this.getDefaultTranslate(Y),na=this.view.translate.x,la=this.view.translate.y;if(fa.x!=na||fa.y!=la){this.view.x0=Y.x;this.view.y0=Y.y;this.autoTranslate=!0;this.view.setTranslate(fa.x,fa.y);this.autoTranslate=!1;
-U||(this.container.scrollLeft+=Math.round((fa.x-na)*this.view.scale),this.container.scrollTop+=Math.round((fa.y-la)*this.view.scale));return}}ka.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ba=b.view.getBackgroundPane(),V=b.view.getDrawPane();b.cumulativeZoomFactor=1;var k=null,v=null,I=null,N=null,T=null,W=function(U){null!=k&&window.clearTimeout(k);0<=U&&window.setTimeout(function(){if(!b.isMouseDown||N)k=window.setTimeout(mxUtils.bind(this,
-function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),V.style.transformOrigin="",ba.style.transformOrigin="",mxClient.IS_SF?(V.style.transform="scale(1)",ba.style.transform="scale(1)",window.setTimeout(function(){V.style.transform="";ba.style.transform=""},0)):(V.style.transform=
-"",ba.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var Y=new mxPoint(b.container.scrollLeft,b.container.scrollTop),fa=mxUtils.getOffset(b.container),na=b.view.scale,la=0,qa=0;null!=v&&(la=b.container.offsetWidth/2-v.x+fa.x,qa=b.container.offsetHeight/2-v.y+fa.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=na&&(null!=I&&(la+=Y.x-I.x,qa+=Y.y-I.y),null!=f&&l.chromelessResize(!1,null,la*(b.cumulativeZoomFactor-
-1),qa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==la&&0==qa||(b.container.scrollLeft-=la*(b.cumulativeZoomFactor-1),b.container.scrollTop-=qa*(b.cumulativeZoomFactor-1)));null!=T&&V.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=N=v=I=k=null}),null!=U?U:b.isFastZoomEnabled()?l.wheelZoomDelay:l.lazyZoomDelay)},0)};b.lazyZoom=function(U,Y,fa,na){na=null!=na?na:this.zoomFactor;(Y=Y||!b.scrollbars)&&(v=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+
-b.container.clientHeight/2));U?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*
-100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==T&&""!=V.getAttribute("filter")&&(T=V.getAttribute("filter"),V.removeAttribute("filter"));I=new mxPoint(b.container.scrollLeft,b.container.scrollTop);U=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);na=Y||null==v?b.container.scrollLeft+b.container.clientWidth/2:v.x+b.container.scrollLeft-
-b.container.offsetLeft;var la=Y||null==v?b.container.scrollTop+b.container.clientHeight/2:v.y+b.container.scrollTop-b.container.offsetTop;V.style.transformOrigin=na+"px "+la+"px";V.style.transform="scale("+U+")";ba.style.transformOrigin=na+"px "+la+"px";ba.style.transform="scale("+U+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(na=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(na.style,"transform-origin",(Y||null==v?b.container.clientWidth/2+b.container.scrollLeft-
-na.offsetLeft+"px":v.x+b.container.scrollLeft-na.offsetLeft-b.container.offsetLeft+"px")+" "+(Y||null==v?b.container.clientHeight/2+b.container.scrollTop-na.offsetTop+"px":v.y+b.container.scrollTop-na.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(na.style,"transform","scale("+U+")")):b.view.validateBackgroundStyles(U,na,la);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=l.hoverIcons&&l.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview",
-"factor",U))}W(b.isFastZoomEnabled()?fa:0)};mxEvent.addGestureListeners(b.container,function(U){null!=k&&window.clearTimeout(k)},null,function(U){1!=b.cumulativeZoomFactor&&W(0)});mxEvent.addListener(b.container,"scroll",function(U){null==k||b.isMouseDown||1==b.cumulativeZoomFactor||W(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(U,Y,fa,na,la){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!fa&&b.isScrollWheelEvent(U))fa=b.view.getTranslate(),
-na=40/b.view.scale,mxEvent.isShiftDown(U)?b.view.setTranslate(fa.x+(Y?-na:na),fa.y):b.view.setTranslate(fa.x,fa.y+(Y?na:-na));else if(fa||b.isZoomWheelEvent(U))for(var qa=mxEvent.getSource(U);null!=qa;){if(qa==b.container)return b.tooltipHandler.hideTooltip(),v=null!=na&&null!=la?new mxPoint(na,la):new mxPoint(mxEvent.getClientX(U),mxEvent.getClientY(U)),N=fa,fa=b.zoomFactor,na=null,U.ctrlKey&&null!=U.deltaY&&40>Math.abs(U.deltaY)&&Math.round(U.deltaY)!=U.deltaY?fa=1+Math.abs(U.deltaY)/20*(fa-1):
-null!=U.movementY&&"pointermove"==U.type&&(fa=1+Math.max(1,Math.abs(U.movementY))/20*(fa-1),na=-1),b.lazyZoom(Y,null,na,fa),mxEvent.consume(U),!1;qa=qa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(U){b.cumulativeZoomFactor=U.scale;b.lazyZoom(0<U.scale,!0);mxEvent.consume(U)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(f){this.actions.get("print").funct();mxEvent.consume(f)}),Editor.printImage,mxResources.get("print"))};
+mxUtils.bind(this,function(U){mxEvent.isTouchEvent(U)||(mxEvent.isShiftDown(U)||G(30),F())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(U){mxEvent.consume(U)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(U){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(U)?F():G(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(U){mxEvent.isShiftDown(U)?
+F():G(100);mxEvent.consume(U)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(U){mxEvent.isTouchEvent(U)||G(30)}));var ja=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(U,Y){this.startX=Y.getGraphX();this.startY=Y.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(U,Y){},mouseUp:function(U,Y){mxEvent.isTouchEvent(Y.getEvent())&&Math.abs(this.scrollLeft-
+b.container.scrollLeft)<ja&&Math.abs(this.scrollTop-b.container.scrollTop)<ja&&Math.abs(this.startX-Y.getGraphX())<ja&&Math.abs(this.startY-Y.getGraphY())<ja&&(0<parseFloat(m.chromelessToolbar.style.opacity||0)?F():G(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var da=b.view.validate,ba=new mxPoint,na=!1,ca=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=m.currentPage&&ca!=m.currentPage){ca=m.currentPage;
+na=!0;var U=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,!0);null==U&&(U=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));U=b.getPageLayout(U,ba,1);var Y=b.getDefaultTranslate(U);this.x0=U.x;this.y0=U.y;if(Y.x!=this.translate.x||Y.y!=this.translate.y)this.invalidate(),this.translate.x=Y.x,this.translate.y=Y.y}Y=b.getPagePadding();var fa=b.getPageSize();U=Y.x-(this.x0||0)*fa.width;Y=Y.y-(this.y0||0)*fa.height;if(this.translate.x!=U||this.translate.y!=Y)this.invalidate(),
+this.translate.x=U,this.translate.y=Y}da.apply(this,arguments)};if(!b.isViewer()){var ka=b.sizeDidChange;b.sizeDidChange=function(){var U=na;na=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var Y=this.getPageLayout(),fa=this.getDefaultTranslate(Y),oa=this.view.translate.x,la=this.view.translate.y;if(fa.x!=oa||fa.y!=la){this.view.x0=Y.x;this.view.y0=Y.y;this.autoTranslate=!0;this.view.setTranslate(fa.x,fa.y);this.autoTranslate=!1;
+U||(this.container.scrollLeft+=Math.round((fa.x-oa)*this.view.scale),this.container.scrollTop+=Math.round((fa.y-la)*this.view.scale));return}}ka.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var aa=b.view.getBackgroundPane(),V=b.view.getDrawPane();b.cumulativeZoomFactor=1;var k=null,v=null,J=null,N=null,T=null,W=function(U){null!=k&&window.clearTimeout(k);0<=U&&window.setTimeout(function(){if(!b.isMouseDown||N)k=window.setTimeout(mxUtils.bind(this,
+function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),V.style.transformOrigin="",aa.style.transformOrigin="",mxClient.IS_SF?(V.style.transform="scale(1)",aa.style.transform="scale(1)",window.setTimeout(function(){V.style.transform="";aa.style.transform=""},0)):(V.style.transform=
+"",aa.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var Y=new mxPoint(b.container.scrollLeft,b.container.scrollTop),fa=mxUtils.getOffset(b.container),oa=b.view.scale,la=0,qa=0;null!=v&&(la=b.container.offsetWidth/2-v.x+fa.x,qa=b.container.offsetHeight/2-v.y+fa.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=oa&&(null!=J&&(la+=Y.x-J.x,qa+=Y.y-J.y),null!=f&&m.chromelessResize(!1,null,la*(b.cumulativeZoomFactor-
+1),qa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==la&&0==qa||(b.container.scrollLeft-=la*(b.cumulativeZoomFactor-1),b.container.scrollTop-=qa*(b.cumulativeZoomFactor-1)));null!=T&&V.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=N=v=J=k=null}),null!=U?U:b.isFastZoomEnabled()?m.wheelZoomDelay:m.lazyZoomDelay)},0)};b.lazyZoom=function(U,Y,fa,oa){oa=null!=oa?oa:this.zoomFactor;(Y=Y||!b.scrollbars)&&(v=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+
+b.container.clientHeight/2));U?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=oa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=oa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*
+100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==T&&""!=V.getAttribute("filter")&&(T=V.getAttribute("filter"),V.removeAttribute("filter"));J=new mxPoint(b.container.scrollLeft,b.container.scrollTop);U=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);oa=Y||null==v?b.container.scrollLeft+b.container.clientWidth/2:v.x+b.container.scrollLeft-
+b.container.offsetLeft;var la=Y||null==v?b.container.scrollTop+b.container.clientHeight/2:v.y+b.container.scrollTop-b.container.offsetTop;V.style.transformOrigin=oa+"px "+la+"px";V.style.transform="scale("+U+")";aa.style.transformOrigin=oa+"px "+la+"px";aa.style.transform="scale("+U+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(oa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(oa.style,"transform-origin",(Y||null==v?b.container.clientWidth/2+b.container.scrollLeft-
+oa.offsetLeft+"px":v.x+b.container.scrollLeft-oa.offsetLeft-b.container.offsetLeft+"px")+" "+(Y||null==v?b.container.clientHeight/2+b.container.scrollTop-oa.offsetTop+"px":v.y+b.container.scrollTop-oa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(oa.style,"transform","scale("+U+")")):b.view.validateBackgroundStyles(U,oa,la);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=m.hoverIcons&&m.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview",
+"factor",U))}W(b.isFastZoomEnabled()?fa:0)};mxEvent.addGestureListeners(b.container,function(U){null!=k&&window.clearTimeout(k)},null,function(U){1!=b.cumulativeZoomFactor&&W(0)});mxEvent.addListener(b.container,"scroll",function(U){null==k||b.isMouseDown||1==b.cumulativeZoomFactor||W(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(U,Y,fa,oa,la){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!fa&&b.isScrollWheelEvent(U))fa=b.view.getTranslate(),
+oa=40/b.view.scale,mxEvent.isShiftDown(U)?b.view.setTranslate(fa.x+(Y?-oa:oa),fa.y):b.view.setTranslate(fa.x,fa.y+(Y?oa:-oa));else if(fa||b.isZoomWheelEvent(U))for(var qa=mxEvent.getSource(U);null!=qa;){if(qa==b.container)return b.tooltipHandler.hideTooltip(),v=null!=oa&&null!=la?new mxPoint(oa,la):new mxPoint(mxEvent.getClientX(U),mxEvent.getClientY(U)),N=fa,fa=b.zoomFactor,oa=null,U.ctrlKey&&null!=U.deltaY&&40>Math.abs(U.deltaY)&&Math.round(U.deltaY)!=U.deltaY?fa=1+Math.abs(U.deltaY)/20*(fa-1):
+null!=U.movementY&&"pointermove"==U.type&&(fa=1+Math.max(1,Math.abs(U.movementY))/20*(fa-1),oa=-1),b.lazyZoom(Y,null,oa,fa),mxEvent.consume(U),!1;qa=qa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(U){b.cumulativeZoomFactor=U.scale;b.lazyZoom(0<U.scale,!0);mxEvent.consume(U)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(f){this.actions.get("print").funct();mxEvent.consume(f)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;if(null!=this.format){var f=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.formatContainer.style,"transition","width "+f+"s ease-in-out");window.setTimeout(mxUtils.bind(this,function(){this.formatWidth=b?240:0;this.hsplitPosition=Math.min(this.container.clientWidth-this.hsplit.clientWidth-this.formatWidth,this.hsplitPosition);this.refresh();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.formatContainer.style,
-"transition",null);this.refresh(!0);this.fireEvent(new mxEventObject("formatWidthChanged"))}),1E3*f)},0))}};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var f=urlParams.border,l=60;null!=f&&(l=parseInt(f));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(l,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};
+"transition",null);this.refresh(!0);this.fireEvent(new mxEventObject("formatWidthChanged"))}),1E3*f)},0))}};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var f=urlParams.border,m=60;null!=f&&(m=parseInt(f));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(m,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};
EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};
EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,f){try{var l=mxUtils.parseXml(b);this.editor.setGraphXml(l.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=f&&(this.editor.setFilename(f),this.updateDocumentTitle())}catch(u){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+u.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPrintDialog=function(b,f){this.showDialog((new PrintDialog(this,b,f)).container,300,180,!0,!0)};EditorUi.prototype.showPopupMenu=function(b,f,l,u){this.editor.graph.popupMenuHandler.hideMenu();var y=new mxPopupMenu(b);y.smartSeparators=!0;y.showDisabled=!0;y.autoExpand=!0;y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(y,arguments);y.destroy()});y.popup(f,l,null,u);this.setCurrentMenu(y)};
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,f){try{var m=mxUtils.parseXml(b);this.editor.setGraphXml(m.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=f&&(this.editor.setFilename(f),this.updateDocumentTitle())}catch(t){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+t.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPrintDialog=function(b,f){this.showDialog((new PrintDialog(this,b,f)).container,300,180,!0,!0)};EditorUi.prototype.showPopupMenu=function(b,f,m,t){this.editor.graph.popupMenuHandler.hideMenu();var y=new mxPopupMenu(b);y.smartSeparators=!0;y.showDisabled=!0;y.autoExpand=!0;y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(y,arguments);y.destroy()});y.popup(f,m,null,t);this.setCurrentMenu(y)};
EditorUi.prototype.isHideCurrentMenuEvent=function(b){b=mxEvent.getSource(b);if(null!=this.currentMenu){if(b==this.currentMenu.div)return!1;for(var f=this.currentMenu.activeRow;null!=f;){if(b==f.div)return!1;f=f.activeRow}return!0}return!1};EditorUi.prototype.setCurrentMenu=function(b,f){this.currentMenuElt=f;this.currentMenu=b;this.hideShapePicker()};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};
EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(b){}};
-EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var f=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);f==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(l){}};EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};
+EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var f=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);f==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(m){}};EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};
EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml()}};EditorUi.prototype.updateDiagramData=function(b,f){this.replaceDiagramData(xUtils.getXml(f))};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.beginUpdate();try{this.editor.setGraphXml(mxUtils.parseXml(b).documentElement)}finally{this.editor.graph.model.endUpdate()}};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};
-EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var f=0<b.indexOf("?")?1:0,l;for(l in urlParams)b=0==f?b+"?":b+"&",b+=l+"="+urlParams[l],f++;return b};EditorUi.prototype.setScrollbars=function(b){var f=this.editor.graph,l=f.container.style.overflow;f.scrollbars=b;this.editor.updateGraphComponents();l!=f.container.style.overflow&&(f.container.scrollTop=0,f.container.scrollLeft=0,f.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};
-EditorUi.prototype.fitDiagramToWindow=function(){var b=this.editor.graph,f=b.isSelectionEmpty()?mxRectangle.fromRectangle(b.getGraphBounds()):b.getBoundingBox(b.getSelectionCells()),l=b.view.translate,u=b.view.scale;f.x=f.x/u-l.x;f.y=f.y/u-l.y;f.width/=u;f.height/=u;null!=b.backgroundImage&&f.add(new mxRectangle(0,0,b.backgroundImage.width,b.backgroundImage.height));0==f.width||0==f.height?(b.zoomTo(1),this.resetScrollbars()):(l=Editor.fitWindowBorders,null!=l&&(f.x-=l.x,f.y-=l.y,f.width+=l.width+
-l.x,f.height+=l.height+l.y),b.fitWindow(f))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
-EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph,f=b.container;if(!this.editor.extendCanvas)f.scrollTop=0,f.scrollLeft=0,mxUtils.hasScrollbars(f)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(f))if(b.pageVisible){var l=b.getPagePadding();f.scrollTop=Math.floor(l.y);f.scrollLeft=Math.floor(Math.min(l.x,(f.scrollWidth-f.clientWidth)/2));l=b.getGraphBounds();0<l.width&&0<l.height&&(l.x>f.scrollLeft+.9*f.clientWidth&&(f.scrollLeft=Math.min(l.x+
-l.width-f.clientWidth,l.x-10)),l.y>f.scrollTop+.9*f.clientHeight&&(f.scrollTop=Math.min(l.y+l.height-f.clientHeight,l.y-10)))}else if(l=b.getGraphBounds(),0==l.width&&0==l.height)f.scrollLeft=(f.scrollWidth-f.clientWidth)/2,f.scrollTop=(f.scrollHeight-f.clientHeight)/2;else{var u=Math.max(l.height,b.scrollTileSize.height*b.view.scale);f.scrollLeft=Math.floor(Math.max(0,l.x-Math.max(0,(f.clientWidth-Math.max(l.width,b.scrollTileSize.width*b.view.scale))/2)));f.scrollTop=Math.floor(Math.max(0,l.y-Math.max(20,
-(f.clientHeight-u)/4)))}else{l=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());u=b.view.translate;var y=b.view.scale;l.x=l.x/y-u.x;l.y=l.y/y-u.y;l.width/=y;l.height/=y;b.view.setTranslate(Math.floor(Math.max(0,(f.clientWidth-l.width)/2)-l.x+2),Math.floor((b.pageVisible?0:Math.max(0,(f.clientHeight-l.height)/4))-l.y+1))}};
-EditorUi.prototype.setPageVisible=function(b){var f=this.editor.graph,l=mxUtils.hasScrollbars(f.container),u=0,y=0;l&&(u=f.view.translate.x*f.view.scale-f.container.scrollLeft,y=f.view.translate.y*f.view.scale-f.container.scrollTop);f.pageVisible=b;f.pageBreaksVisible=b;f.preferPageSize=b;f.view.validateBackground();if(l){var q=f.getSelectionCells();f.clearSelection();f.setSelectionCells(q)}f.sizeDidChange();l&&(f.container.scrollLeft=f.view.translate.x*f.view.scale-u,f.container.scrollTop=f.view.translate.y*
+EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var f=0<b.indexOf("?")?1:0,m;for(m in urlParams)b=0==f?b+"?":b+"&",b+=m+"="+urlParams[m],f++;return b};EditorUi.prototype.setScrollbars=function(b){var f=this.editor.graph,m=f.container.style.overflow;f.scrollbars=b;this.editor.updateGraphComponents();m!=f.container.style.overflow&&(f.container.scrollTop=0,f.container.scrollLeft=0,f.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};
+EditorUi.prototype.fitDiagramToWindow=function(){var b=this.editor.graph,f=b.isSelectionEmpty()?mxRectangle.fromRectangle(b.getGraphBounds()):b.getBoundingBox(b.getSelectionCells()),m=b.view.translate,t=b.view.scale;f.x=f.x/t-m.x;f.y=f.y/t-m.y;f.width/=t;f.height/=t;null!=b.backgroundImage&&f.add(new mxRectangle(0,0,b.backgroundImage.width,b.backgroundImage.height));0==f.width||0==f.height?(b.zoomTo(1),this.resetScrollbars()):(m=Editor.fitWindowBorders,null!=m&&(f.x-=m.x,f.y-=m.y,f.width+=m.width+
+m.x,f.height+=m.height+m.y),b.fitWindow(f))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
+EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph,f=b.container;if(!this.editor.extendCanvas)f.scrollTop=0,f.scrollLeft=0,mxUtils.hasScrollbars(f)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(f))if(b.pageVisible){var m=b.getPagePadding();f.scrollTop=Math.floor(m.y);f.scrollLeft=Math.floor(Math.min(m.x,(f.scrollWidth-f.clientWidth)/2));m=b.getGraphBounds();0<m.width&&0<m.height&&(m.x>f.scrollLeft+.9*f.clientWidth&&(f.scrollLeft=Math.min(m.x+
+m.width-f.clientWidth,m.x-10)),m.y>f.scrollTop+.9*f.clientHeight&&(f.scrollTop=Math.min(m.y+m.height-f.clientHeight,m.y-10)))}else if(m=b.getGraphBounds(),0==m.width&&0==m.height)f.scrollLeft=(f.scrollWidth-f.clientWidth)/2,f.scrollTop=(f.scrollHeight-f.clientHeight)/2;else{var t=Math.max(m.height,b.scrollTileSize.height*b.view.scale);f.scrollLeft=Math.floor(Math.max(0,m.x-Math.max(0,(f.clientWidth-Math.max(m.width,b.scrollTileSize.width*b.view.scale))/2)));f.scrollTop=Math.floor(Math.max(0,m.y-Math.max(20,
+(f.clientHeight-t)/4)))}else{m=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());t=b.view.translate;var y=b.view.scale;m.x=m.x/y-t.x;m.y=m.y/y-t.y;m.width/=y;m.height/=y;b.view.setTranslate(Math.floor(Math.max(0,(f.clientWidth-m.width)/2)-m.x+2),Math.floor((b.pageVisible?0:Math.max(0,(f.clientHeight-m.height)/4))-m.y+1))}};
+EditorUi.prototype.setPageVisible=function(b){var f=this.editor.graph,m=mxUtils.hasScrollbars(f.container),t=0,y=0;m&&(t=f.view.translate.x*f.view.scale-f.container.scrollLeft,y=f.view.translate.y*f.view.scale-f.container.scrollTop);f.pageVisible=b;f.pageBreaksVisible=b;f.preferPageSize=b;f.view.validateBackground();if(m){var q=f.getSelectionCells();f.clearSelection();f.setSelectionCells(q)}f.sizeDidChange();m&&(f.container.scrollLeft=f.view.translate.x*f.view.scale-t,f.container.scrollTop=f.view.translate.y*
f.view.scale-y);f.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
-EditorUi.prototype.installResizeHandler=function(b,f,l){f&&(b.window.setSize=function(y,q){if(!this.minimized){var C=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;y=Math.min(y,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());q=Math.min(q,C-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(y,q){var C=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-J=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),D=parseInt(this.div.style.height);y=Math.max(0,Math.min(y,C-S));q=Math.max(0,Math.min(q,J-D));this.getX()==y&&this.getY()==q||mxWindow.prototype.setLocation.apply(this,arguments);f&&!this.minimized&&this.setSize(S,D)};var u=mxUtils.bind(this,function(){var y=b.window.getX(),q=b.window.getY();b.window.setLocation(y,q)});mxEvent.addListener(window,"resize",u);b.destroy=function(){mxEvent.removeListener(window,
-"resize",u);b.window.destroy();null!=l&&l()}};function ChangeGridColor(b,f){this.ui=b;this.color=f}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};function ChangePageSetup(b,f,l,u,y){this.ui=b;this.previousColor=this.color=f;this.previousImage=this.image=l;this.previousFormat=this.format=u;this.previousPageScale=this.pageScale=y;this.ignoreImage=this.ignoreColor=!1}
-ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var f=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=f}if(!this.ignoreImage){this.image=this.previousImage;f=b.backgroundImage;var l=this.previousImage;null!=l&&Graph.isPageLink(l.src)&&(l=this.ui.createImageForPageLink(l.src,this.ui.currentPage));this.ui.setBackgroundImage(l);this.previousImage=f}null!=this.previousFormat&&(this.format=this.previousFormat,
+EditorUi.prototype.installResizeHandler=function(b,f,m){f&&(b.window.setSize=function(y,q){if(!this.minimized){var B=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;y=Math.min(y,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());q=Math.min(q,B-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(y,q){var B=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
+I=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),D=parseInt(this.div.style.height);y=Math.max(0,Math.min(y,B-S));q=Math.max(0,Math.min(q,I-D));this.getX()==y&&this.getY()==q||mxWindow.prototype.setLocation.apply(this,arguments);f&&!this.minimized&&this.setSize(S,D)};var t=mxUtils.bind(this,function(){var y=b.window.getX(),q=b.window.getY();b.window.setLocation(y,q)});mxEvent.addListener(window,"resize",t);b.destroy=function(){mxEvent.removeListener(window,
+"resize",t);b.window.destroy();null!=m&&m()}};function ChangeGridColor(b,f){this.ui=b;this.color=f}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};function ChangePageSetup(b,f,m,t,y){this.ui=b;this.previousColor=this.color=f;this.previousImage=this.image=m;this.previousFormat=this.format=t;this.previousPageScale=this.pageScale=y;this.ignoreImage=this.ignoreColor=!1}
+ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var f=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=f}if(!this.ignoreImage){this.image=this.previousImage;f=b.backgroundImage;var m=this.previousImage;null!=m&&Graph.isPageLink(m.src)&&(m=this.ui.createImageForPageLink(m.src,this.ui.currentPage));this.ui.setBackgroundImage(m);this.previousImage=f}null!=this.previousFormat&&(this.format=this.previousFormat,
f=b.pageFormat,this.previousFormat.width!=f.width||this.previousFormat.height!=f.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=f);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),this.previousPageScale=b))};
EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(b){this.editor.graph.foldingEnabled=b;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
EditorUi.prototype.setPageFormat=function(b,f){f=null!=f?f:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;f||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};
-EditorUi.prototype.setGridColor=function(b,f){f=null!=f?f:Editor.isDarkMode();var l=this.editor.graph;f?l.view.defaultDarkGridColor=b:l.view.defaultGridColor=b;l.view.gridColor="light-dark("+l.view.defaultGridColor+", "+l.view.defaultDarkGridColor+")";l.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var b=this.editor.undoManager,f=mxUtils.bind(this,function(){this.updateActionStates()});b.addListener(mxEvent.ADD,f);b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);b.addListener(mxEvent.CLEAR,f);var l=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){l.apply(this,arguments);f()};var u=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(y,q){u.apply(this,arguments);
+EditorUi.prototype.setGridColor=function(b,f){f=null!=f?f:Editor.isDarkMode();var m=this.editor.graph;f?m.view.defaultDarkGridColor=b:m.view.defaultGridColor=b;m.view.gridColor="light-dark("+m.view.defaultGridColor+", "+m.view.defaultDarkGridColor+")";m.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
+EditorUi.prototype.addUndoListener=function(){var b=this.editor.undoManager,f=mxUtils.bind(this,function(){this.updateActionStates()});b.addListener(mxEvent.ADD,f);b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);b.addListener(mxEvent.CLEAR,f);var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);f()};var t=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(y,q){t.apply(this,arguments);
f()};f()};
-EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,f=this.getSelectionState(),l=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),u=!this.editor.chromeless||this.editor.editable,y="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),q=0;q<y.length;q++)this.actions.get(y[q]).setEnabled(0<
-f.cells.length);this.actions.get("grid").setEnabled(u);this.actions.get("undo").setEnabled(this.canUndo()&&u);this.actions.get("redo").setEnabled(this.canRedo()&&u);this.actions.get("swap").setEnabled(2==f.cells.length&&2==f.vertices.length);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<f.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<f.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());
+EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,f=this.getSelectionState(),m=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),t=!this.editor.chromeless||this.editor.editable,y="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),q=0;q<y.length;q++)this.actions.get(y[q]).setEnabled(0<
+f.cells.length);this.actions.get("grid").setEnabled(t);this.actions.get("undo").setEnabled(this.canUndo()&&t);this.actions.get("redo").setEnabled(this.canRedo()&&t);this.actions.get("swap").setEnabled(2==f.cells.length&&2==f.vertices.length);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<f.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<f.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());
this.actions.get("bringForward").setEnabled(1==f.cells.length);this.actions.get("sendBackward").setEnabled(1==f.cells.length);this.actions.get("rotation").setEnabled(1==f.vertices.length);this.actions.get("wordWrap").setEnabled(1==f.vertices.length);this.actions.get("autosize").setEnabled(0<f.vertices.length);this.actions.get("copySize").setEnabled(1==f.vertices.length);this.actions.get("clearWaypoints").setEnabled(f.connections);this.actions.get("clearAnchors").setEnabled(f.connections);this.actions.get("curved").setEnabled(0<
f.edges.length);this.actions.get("turn").setEnabled(0<f.cells.length);this.actions.get("group").setEnabled(1<f.cells.length||1==f.vertices.length&&0==b.model.getChildCount(f.cells[0])&&!b.isContainer(f.vertices[0]));this.actions.get("ungroup").setEnabled(!f.row&&!f.cell&&!f.table&&0<f.vertices.length&&(b.isContainer(f.vertices[0])||0<b.getModel().getChildCount(f.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==f.cells.length&&b.getModel().isVertex(b.getModel().getParent(f.cells[0])));
this.actions.get("collapsible").setEnabled(1==f.vertices.length&&(0<b.model.getChildCount(f.vertices[0])||b.isContainer(f.vertices[0])));this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==f.cells.length&&b.isValidRoot(f.cells[0]));this.actions.get("copyData").setEnabled(1==f.cells.length);this.actions.get("copyAsText").setEnabled(1==f.cells.length);this.actions.get("editLink").setEnabled(1==
-f.cells.length);this.actions.get("editStyle").setEnabled(0<f.cells.length);this.actions.get("editTooltip").setEnabled(1==f.cells.length);this.actions.get("openLink").setEnabled(1==f.cells.length&&null!=b.getLinkForCell(f.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(l);this.actions.get("selectEdges").setEnabled(l);this.actions.get("selectAll").setEnabled(l);this.actions.get("selectNone").setEnabled(l);u=1==f.vertices.length&&b.isCellFoldable(f.vertices[0]);
-this.actions.get("expand").setEnabled(u);this.actions.get("collapse").setEnabled(u);this.menus.get("navigation").setEnabled(0<f.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(l);this.menus.get("insert").setEnabled(l);this.menus.get("direction").setEnabled(f.unlocked&&1==f.vertices.length);this.menus.get("distribute").setEnabled(f.unlocked&&1<f.vertices.length);this.menus.get("align").setEnabled(f.unlocked&&0<f.cells.length);this.updatePasteActionStates()};
-EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};EditorUi.prototype.refresh=function(b){var f=this.sidebarContainer.style.width,l=this.formatContainer.style.width;this.sidebarContainer.style.width=this.hsplitPosition+"px";this.formatContainer.style.width=null!=this.format&&0<this.formatWidth?"":"0";(b||f!=this.sidebarContainer.style.width||l!=this.formatContainer.style.width)&&this.editor.graph.sizeDidChange()};
+f.cells.length);this.actions.get("editStyle").setEnabled(0<f.cells.length);this.actions.get("editTooltip").setEnabled(1==f.cells.length);this.actions.get("openLink").setEnabled(1==f.cells.length&&null!=b.getLinkForCell(f.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(m);this.actions.get("selectEdges").setEnabled(m);this.actions.get("selectAll").setEnabled(m);this.actions.get("selectNone").setEnabled(m);t=1==f.vertices.length&&b.isCellFoldable(f.vertices[0]);
+this.actions.get("expand").setEnabled(t);this.actions.get("collapse").setEnabled(t);this.menus.get("navigation").setEnabled(0<f.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(m);this.menus.get("insert").setEnabled(m);this.menus.get("direction").setEnabled(f.unlocked&&1==f.vertices.length);this.menus.get("distribute").setEnabled(f.unlocked&&1<f.vertices.length);this.menus.get("align").setEnabled(f.unlocked&&0<f.cells.length);this.updatePasteActionStates()};
+EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};EditorUi.prototype.refresh=function(b){var f=this.sidebarContainer.style.width,m=this.formatContainer.style.width;this.sidebarContainer.style.width=this.hsplitPosition+"px";this.formatContainer.style.width=null!=this.format&&0<this.formatWidth?"":"0";(b||f!=this.sidebarContainer.style.width||m!=this.formatContainer.style.width)&&this.editor.graph.sizeDidChange()};
EditorUi.prototype.createTabContainer=function(){return null};EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.hsplit=this.createDiv("geHsplit");this.editor.chromeless||(this.tabContainer=this.createTabContainer())};
EditorUi.prototype.createSidebarContainer=function(){var b=document.createElement("div");b.className="geSidebarContainer";return b};
EditorUi.prototype.createUi=function(){this.statusContainer=this.createStatusContainer();this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?
null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,!0,0,mxUtils.bind(this,function(b){this.hsplitPosition=b;this.refresh()})))};
-EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geStatus";mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){var l=mxEvent.getSource(f);if(l!=b)for(;l.parentNode!=b;)l=l.parentNode;if("A"!=l.nodeName){var u=l.getAttribute("data-action");if("statusFunction"==u&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=u)l=this.actions.get(u),null!=l&&l.funct();else{u=l.getAttribute("data-title");var y=l.getAttribute("data-message");
-null!=u&&null!=y?this.showError(u,y):(l=l.getAttribute("data-link"),null!=l&&this.editor.graph.openLink(l))}mxEvent.consume(f)}}));return b};
-EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Graph.sanitizeHtml(b);0==this.statusContainer.getElementsByTagName("div").length&&null!=b&&0<b.length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b));b=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=b)for(var f=0;f<b.length;f++)(function(l){mxUtils.setOpacity(l,0);mxUtils.setPrefixedStyle(l.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(l.style,
-"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(l,100);mxUtils.setPrefixedStyle(l.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(l.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(l.style,"transform","scaleX(0)");mxUtils.setOpacity(l,0);window.setTimeout(mxUtils.bind(this,function(){null!=l.parentNode&&l.parentNode.removeChild(l)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[f])};
+EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geStatus";mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){var m=mxEvent.getSource(f);if(m!=b)for(;m.parentNode!=b;)m=m.parentNode;if("A"!=m.nodeName){var t=m.getAttribute("data-action");if("statusFunction"==t&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=t)m=this.actions.get(t),null!=m&&m.funct();else{t=m.getAttribute("data-title");var y=m.getAttribute("data-message");
+null!=t&&null!=y?this.showError(t,y):(m=m.getAttribute("data-link"),null!=m&&this.editor.graph.openLink(m))}mxEvent.consume(f)}}));return b};
+EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Graph.sanitizeHtml(b);0==this.statusContainer.getElementsByTagName("div").length&&null!=b&&0<b.length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b));b=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=b)for(var f=0;f<b.length;f++)(function(m){mxUtils.setOpacity(m,0);mxUtils.setPrefixedStyle(m.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(m.style,
+"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(m,100);mxUtils.setPrefixedStyle(m.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(m.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(m.style,"transform","scaleX(0)");mxUtils.setOpacity(m,0);window.setTimeout(mxUtils.bind(this,function(){null!=m.parentNode&&m.parentNode.removeChild(m)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[f])};
EditorUi.prototype.clearStatus=function(){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus("")}))};EditorUi.prototype.updateStatus=function(b){null!=b&&b();this.lastStatusUpdate=b};EditorUi.prototype.updateStatusAgain=function(){null!=this.lastStatusUpdate&&this.lastStatusUpdate()};EditorUi.prototype.createStatusDiv=function(b){var f=document.createElement("div");f.className="geStatusDiv";f.setAttribute("title",b);f.innerText=b;return f};
EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createDiv=function(b){var f=document.createElement("div");f.className=b;return f};
-EditorUi.prototype.addSplitHandler=function(b,f,l,u){function y(c){if(null!=C){var g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));u(Math.max(0,J+(f?g.x-C.x:C.y-g.y)-l));mxEvent.consume(c);J!=P()&&(S=!0,D=null)}}function q(c){y(c);C=J=null}var C=null,J=null,S=!0,D=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var c=parseInt(f?b.offsetLeft:b.offsetTop);f||(c+=l);return c});mxEvent.addGestureListeners(b,function(c){C=new mxPoint(mxEvent.getClientX(c),
-mxEvent.getClientY(c));J=P();S=!1;mxEvent.consume(c)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){if(!S&&this.hsplitClickEnabled){var g=null!=D?D-l:0;D=P();u(g);mxEvent.consume(c)}}));mxEvent.addGestureListeners(document,null,y,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,y,q)})};
-EditorUi.prototype.prompt=function(b,f,l){b=new FilenameDialog(this,f,mxResources.get("apply"),function(u){l(parseFloat(u))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
-EditorUi.prototype.handleError=function(b,f,l,u,y){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=f){y=mxUtils.htmlEntities(mxResources.get("unknownError"));var q=mxResources.get("ok");f=null!=f?f:mxResources.get("error");null!=b&&null!=b.message&&(y=mxUtils.htmlEntities(b.message));this.showError(f,y,q,l,null,null,null,null,null,null,null,null,u?l:null)}else null!=l&&l()};
-EditorUi.prototype.showError=function(b,f,l,u,y,q,C,J,S,D,P,c,g){b=new ErrorDialog(this,b,f,l||mxResources.get("ok"),u,y,q,C,c,J,S);f=Math.ceil(null!=f?f.length/50:1);this.showDialog(b.container,D||340,P||100+20*f,!0,!1,g);b.init()};EditorUi.prototype.showDialog=function(b,f,l,u,y,q,C,J,S,D){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,f,l,u,y,q,C,J,S,D);this.dialogs.push(this.dialog)};
-EditorUi.prototype.hideDialog=function(b,f,l){var u=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var y=this.dialogs.length-1;0<=y;y--)if(!this.dialogs[y].closing){u=this.dialogs[y];break}null==u||null!=l&&l!=this.dialog.container.firstChild||(u.closing=!0,0==u.close(b,f)?delete u.closing:(delete u.closing,b=mxUtils.lastIndexOf(this.dialogs,u),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog",
-"dialog",u)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus()))}),0)))};
-EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var f=b.getSelectionCells(),l=new mxDictionary,u=[],y=0;y<f.length;y++){var q=b.isTableCell(f[y])?b.model.getParent(f[y]):f[y];null==q||l.get(q)||(l.put(q,!0),u.push(q))}b.setSelectionCells(b.duplicateCells(u,!1))}catch(C){this.handleError(C)}};
-EditorUi.prototype.pickColor=function(b,f,l,u,y){var q=this.editor.graph,C=q.cellEditor.saveSelection(),J=(y?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){q.cellEditor.restoreSelection(C);f(S)},function(){q.cellEditor.restoreSelection(C)},l,u,y);this.showDialog(b.container,230,J,!0,!1);b.init()};
+EditorUi.prototype.addSplitHandler=function(b,f,m,t){function y(c){if(null!=B){var g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));t(Math.max(0,I+(f?g.x-B.x:B.y-g.y)-m));mxEvent.consume(c);I!=P()&&(S=!0,D=null)}}function q(c){y(c);B=I=null}var B=null,I=null,S=!0,D=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var c=parseInt(f?b.offsetLeft:b.offsetTop);f||(c+=m);return c});mxEvent.addGestureListeners(b,function(c){B=new mxPoint(mxEvent.getClientX(c),
+mxEvent.getClientY(c));I=P();S=!1;mxEvent.consume(c)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){if(!S&&this.hsplitClickEnabled){var g=null!=D?D-m:0;D=P();t(g);mxEvent.consume(c)}}));mxEvent.addGestureListeners(document,null,y,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,y,q)})};
+EditorUi.prototype.prompt=function(b,f,m){b=new FilenameDialog(this,f,mxResources.get("apply"),function(t){m(parseFloat(t))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
+EditorUi.prototype.handleError=function(b,f,m,t,y){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=f){y=mxUtils.htmlEntities(mxResources.get("unknownError"));var q=mxResources.get("ok");f=null!=f?f:mxResources.get("error");null!=b&&null!=b.message&&(y=mxUtils.htmlEntities(b.message));this.showError(f,y,q,m,null,null,null,null,null,null,null,null,t?m:null)}else null!=m&&m()};
+EditorUi.prototype.showError=function(b,f,m,t,y,q,B,I,S,D,P,c,g){b=new ErrorDialog(this,b,f,m||mxResources.get("ok"),t,y,q,B,c,I,S);f=Math.ceil(null!=f?f.length/50:1);this.showDialog(b.container,D||340,P||100+20*f,!0,!1,g);b.init()};EditorUi.prototype.showDialog=function(b,f,m,t,y,q,B,I,S,D){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,f,m,t,y,q,B,I,S,D);this.dialogs.push(this.dialog)};
+EditorUi.prototype.hideDialog=function(b,f,m){var t=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var y=this.dialogs.length-1;0<=y;y--)if(!this.dialogs[y].closing){t=this.dialogs[y];break}null==t||null!=m&&m!=this.dialog.container.firstChild||(t.closing=!0,0==t.close(b,f)?delete t.closing:(delete t.closing,b=mxUtils.lastIndexOf(this.dialogs,t),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog",
+"dialog",t)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus()))}),0)))};
+EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var f=b.getSelectionCells(),m=new mxDictionary,t=[],y=0;y<f.length;y++){var q=b.isTableCell(f[y])?b.model.getParent(f[y]):f[y];null==q||m.get(q)||(m.put(q,!0),t.push(q))}b.setSelectionCells(b.duplicateCells(t,!1))}catch(B){this.handleError(B)}};
+EditorUi.prototype.pickColor=function(b,f,m,t,y){var q=this.editor.graph,B=q.cellEditor.saveSelection(),I=(y?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){q.cellEditor.restoreSelection(B);f(S)},function(){q.cellEditor.restoreSelection(B)},m,t,y);this.showDialog(b.container,230,I,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.base64ToBlob=function(b,f){f=f||"";b=atob(b);for(var l=b.length,u=Math.ceil(l/1024),y=Array(u),q=0;q<u;++q){for(var C=1024*q,J=Math.min(C+1024,l),S=Array(J-C),D=0;C<J;++D,++C)S[D]=b[C].charCodeAt(0);y[q]=new Uint8Array(S)}return new Blob(y,{type:f})};
-EditorUi.prototype.extractGraphModelFromHtml=function(b){var f=null;try{var l=b.indexOf("&lt;mxGraphModel ");if(0<=l){var u=b.lastIndexOf("&lt;/mxGraphModel&gt;");u>l&&(f=b.substring(l,u+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(y){}return f};
-EditorUi.prototype.extractGraphModelFromEvent=function(b){var f=null,l=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(l=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==l||0==l.length)&&(l=b.getData("text/plain")),null!=l&&(l=Graph.zapGremlins(mxUtils.trim(l)),b=this.extractGraphModelFromHtml(l),null!=b&&(l=b))));null!=l&&this.isCompatibleString(l)&&(f=l);return f};
+EditorUi.prototype.base64ToBlob=function(b,f){f=f||"";b=atob(b);for(var m=b.length,t=Math.ceil(m/1024),y=Array(t),q=0;q<t;++q){for(var B=1024*q,I=Math.min(B+1024,m),S=Array(I-B),D=0;B<I;++D,++B)S[D]=b[B].charCodeAt(0);y[q]=new Uint8Array(S)}return new Blob(y,{type:f})};
+EditorUi.prototype.extractGraphModelFromHtml=function(b){var f=null;try{var m=b.indexOf("&lt;mxGraphModel ");if(0<=m){var t=b.lastIndexOf("&lt;/mxGraphModel&gt;");t>m&&(f=b.substring(m,t+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(y){}return f};
+EditorUi.prototype.extractGraphModelFromEvent=function(b){var f=null,m=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(m=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==m||0==m.length)&&(m=b.getData("text/plain")),null!=m&&(m=Graph.zapGremlins(mxUtils.trim(m)),b=this.extractGraphModelFromHtml(m),null!=b&&(m=b))));null!=m&&this.isCompatibleString(m)&&(f=m);return f};
EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(f){this.save(f)}),null,mxUtils.bind(this,function(f){if(null!=f&&0<f.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,340,96,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var f=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,f);this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}))}else if(f.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,
-"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(f))).simulate(document,"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(f);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(l){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}))}}};
-EditorUi.prototype.executeLayouts=function(b,f){this.executeLayout(mxUtils.bind(this,function(){var l=new mxCompositeLayout(this.editor.graph,b),u=this.editor.graph.getSelectionCells();l.execute(this.editor.graph.getDefaultParent(),0==u.length?null:u)}),!0,f)};
-EditorUi.prototype.executeLayout=function(b,f,l){var u=this.editor.graph;u.getModel().beginUpdate();try{b()}catch(y){throw y;}finally{this.allowAnimation&&f&&u.isEnabled()?(b=new mxMorphing(u),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){u.getModel().endUpdate();null!=l&&l()})),b.startAnimation()):(u.getModel().endUpdate(),null!=l&&l())}};
-EditorUi.prototype.showImageDialog=function(b,f,l,u){u=this.editor.graph.cellEditor;var y=u.saveSelection(),q=mxUtils.prompt(b,f);u.restoreSelection(y);if(null!=q&&0<q.length){var C=new Image;C.onload=function(){l(q,C.width,C.height)};C.onerror=function(){l(null);mxUtils.alert(mxResources.get("fileNotFound"))};C.src=q}else l(null)};EditorUi.prototype.showLinkDialog=function(b,f,l){b=new LinkDialog(this,b,f,l);this.showDialog(b.container,420,90,!0,!0);b.init()};
+"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(f))).simulate(document,"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(f);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(m){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}))}}};
+EditorUi.prototype.executeLayouts=function(b,f){this.executeLayout(mxUtils.bind(this,function(){var m=new mxCompositeLayout(this.editor.graph,b),t=this.editor.graph.getSelectionCells();m.execute(this.editor.graph.getDefaultParent(),0==t.length?null:t)}),!0,f)};
+EditorUi.prototype.executeLayout=function(b,f,m){var t=this.editor.graph;t.getModel().beginUpdate();try{b()}catch(y){throw y;}finally{this.allowAnimation&&f&&t.isEnabled()?(b=new mxMorphing(t),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){t.getModel().endUpdate();null!=m&&m()})),b.startAnimation()):(t.getModel().endUpdate(),null!=m&&m())}};
+EditorUi.prototype.showImageDialog=function(b,f,m,t){t=this.editor.graph.cellEditor;var y=t.saveSelection(),q=mxUtils.prompt(b,f);t.restoreSelection(y);if(null!=q&&0<q.length){var B=new Image;B.onload=function(){m(q,B.width,B.height)};B.onerror=function(){m(null);mxUtils.alert(mxResources.get("fileNotFound"))};B.src=q}else m(null)};EditorUi.prototype.showLinkDialog=function(b,f,m){b=new LinkDialog(this,b,f,m);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&"undefined"!==typeof window.EditDataDialog&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1,null,new mxRectangle(0,0,440,220)),b.init())};
-EditorUi.prototype.showBackgroundImageDialog=function(b,f){b=null!=b?b:mxUtils.bind(this,function(u){u=new ChangePageSetup(this,null,u);u.ignoreColor=!0;this.editor.graph.model.execute(u)});var l=mxUtils.prompt(mxResources.get("backgroundImage"),null!=f?f.src:"");null!=l&&0<l.length?(f=new Image,f.onload=function(){b(new mxImage(l,f.width,f.height),!1)},f.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},f.src=l):b(null)};
-EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,f,l){mxUtils.confirm(b)?null!=f&&f():null!=l&&l()};EditorUi.prototype.createOutline=function(b){var f=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){f.update(!1)});return f};
+EditorUi.prototype.showBackgroundImageDialog=function(b,f){b=null!=b?b:mxUtils.bind(this,function(t){t=new ChangePageSetup(this,null,t);t.ignoreColor=!0;this.editor.graph.model.execute(t)});var m=mxUtils.prompt(mxResources.get("backgroundImage"),null!=f?f.src:"");null!=m&&0<m.length?(f=new Image,f.onload=function(){b(new mxImage(m,f.width,f.height),!1)},f.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},f.src=m):b(null)};
+EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,f,m){mxUtils.confirm(b)?null!=f&&f():null!=m&&m()};EditorUi.prototype.createOutline=function(b){var f=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){f.update(!1)});return f};
EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward",88:"copyAsSvg"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};
-EditorUi.prototype.createKeyHandler=function(b){function f(c,g,m){if(!u.isSelectionEmpty()&&u.isEnabled()){g=null!=g?g:1;var n=u.getCompositeParents(u.getSelectionCells()),x=0<n.length?n[0]:null;if(null!=x)if(m){u.getModel().beginUpdate();try{for(x=0;x<n.length;x++)if(u.getModel().isVertex(n[x])&&u.isCellResizable(n[x])){var F=u.getCellGeometry(n[x]);null!=F&&(F=F.clone(),37==c?F.width=Math.max(0,F.width-g):38==c?F.height=Math.max(0,F.height-g):39==c?F.width+=g:40==c&&(F.height+=g),u.getModel().setGeometry(n[x],
-F))}}finally{u.getModel().endUpdate()}}else{F=u.model.getParent(x);var H=u.getView().scale;m=null;1==u.getSelectionCount()&&u.model.isVertex(x)&&null!=u.layoutManager&&!u.isCellLocked(x)&&(m=u.layoutManager.getLayout(F));if(null!=m&&m.constructor==mxStackLayout)g=F.getIndex(x),37==c||38==c?u.model.add(F,x,Math.max(0,g-1)):(39==c||40==c)&&u.model.add(F,x,Math.min(u.model.getChildCount(F),g+1));else{var M=u.graphHandler;null!=M&&(null==M.first&&M.start(x,0,0,u.getMovableCells(n)),null!=M.first&&(x=
-n=0,37==c?n=-g:38==c?x=-g:39==c?n=g:40==c&&(x=g),M.currentDx+=n*H,M.currentDy+=x*H,M.checkPreview(),M.updatePreview()),null!=C&&window.clearTimeout(C),C=window.setTimeout(function(){if(null!=M.first){var L=M.roundLength(M.currentDx/H),K=M.roundLength(M.currentDy/H);M.moveCells(M.cells,L,K);M.reset()}},400))}}}}var l=this,u=this.editor.graph,y=new mxKeyHandler(u),q=y.isEventIgnored;y.isEventIgnored=function(c){return!(mxEvent.isShiftDown(c)&&9==c.keyCode)&&(!this.isControlDown(c)||mxEvent.isShiftDown(c)||
+EditorUi.prototype.createKeyHandler=function(b){function f(c,g,l){if(!t.isSelectionEmpty()&&t.isEnabled()){g=null!=g?g:1;var n=t.getCompositeParents(t.getSelectionCells()),x=0<n.length?n[0]:null;if(null!=x)if(l){t.getModel().beginUpdate();try{for(x=0;x<n.length;x++)if(t.getModel().isVertex(n[x])&&t.isCellResizable(n[x])){var F=t.getCellGeometry(n[x]);null!=F&&(F=F.clone(),37==c?F.width=Math.max(0,F.width-g):38==c?F.height=Math.max(0,F.height-g):39==c?F.width+=g:40==c&&(F.height+=g),t.getModel().setGeometry(n[x],
+F))}}finally{t.getModel().endUpdate()}}else{F=t.model.getParent(x);var G=t.getView().scale;l=null;1==t.getSelectionCount()&&t.model.isVertex(x)&&null!=t.layoutManager&&!t.isCellLocked(x)&&(l=t.layoutManager.getLayout(F));if(null!=l&&l.constructor==mxStackLayout)g=F.getIndex(x),37==c||38==c?t.model.add(F,x,Math.max(0,g-1)):(39==c||40==c)&&t.model.add(F,x,Math.min(t.model.getChildCount(F),g+1));else{var L=t.graphHandler;null!=L&&(null==L.first&&L.start(x,0,0,t.getMovableCells(n)),null!=L.first&&(x=
+n=0,37==c?n=-g:38==c?x=-g:39==c?n=g:40==c&&(x=g),L.currentDx+=n*G,L.currentDy+=x*G,L.checkPreview(),L.updatePreview()),null!=B&&window.clearTimeout(B),B=window.setTimeout(function(){if(null!=L.first){var M=L.roundLength(L.currentDx/G),K=L.roundLength(L.currentDy/G);L.moveCells(L.cells,M,K);L.reset()}},400))}}}}var m=this,t=this.editor.graph,y=new mxKeyHandler(t),q=y.isEventIgnored;y.isEventIgnored=function(c){return!(mxEvent.isShiftDown(c)&&9==c.keyCode)&&(!this.isControlDown(c)||mxEvent.isShiftDown(c)||
90!=c.keyCode&&89!=c.keyCode&&188!=c.keyCode&&190!=c.keyCode&&85!=c.keyCode&&83!=c.keyCode)&&(66!=c.keyCode&&73!=c.keyCode||!this.isControlDown(c)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=c.keyCode&&107!=c.keyCode||!this.isControlDown(c)&&!mxEvent.isShiftDown(c)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&q.apply(this,arguments)};y.isEnabledForEvent=function(c){return!mxEvent.isConsumed(c)&&this.isGraphEvent(c)&&this.isEnabled()&&
-(null==l.dialogs||0==l.dialogs.length)};y.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var C=null,J={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=y.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(u.isEnabled()){var g=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?g=l.actions.get(l.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?
-g=l.actions.get(l.altShiftActions[c.keyCode]):this.isControlDown(c)&&mxEvent.isAltDown(c)&&(g=l.actions.get(l.ctrlAltActions[c.keyCode]));if(null!=g)return g.funct;if("/"==c.key&&!this.isControlDown(c)&&!mxEvent.isAltDown(c))return function(){var m=document.getElementById("geOmniSearch");null!=m&&30<m.clientWidth&&m.focus()};if(null!=J[c.keyCode]&&!u.isSelectionEmpty())if(!this.isControlDown(c)&&mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)){if(u.model.isVertex(u.getSelectionCell()))return function(){var m=
-u.connectVertex(u.getSelectionCell(),J[c.keyCode],u.defaultEdgeLength,c,!0);null!=m&&0<m.length&&(1==m.length&&u.model.isEdge(m[0])?u.setSelectionCell(u.model.getTerminal(m[0],!1)):u.setSelectionCell(m[m.length-1]),u.scrollCellToVisible(u.getSelectionCell()),null!=l.hoverIcons&&l.hoverIcons.update(u.view.getState(u.getSelectionCell())))}}else return this.isControlDown(c)?function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null,!0)}:function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null)}}return S.apply(this,
-arguments)};y.bindAction=mxUtils.bind(this,function(c,g,m,n){var x=this.actions.get(m);null!=x&&(m=function(){x.isEnabled()&&x.funct.apply(this,arguments)},g?n?y.bindControlShiftKey(c,m):y.bindControlKey(c,m):n?y.bindShiftKey(c,m):y.bindKey(c,m))});var D=this,P=y.escape;y.escape=function(c){P.apply(this,arguments)};y.enter=function(){};y.bindControlShiftKey(36,function(){u.exitGroup()});y.bindControlShiftKey(35,function(){u.enterGroup()});y.bindShiftKey(36,function(){u.home()});y.bindKey(35,function(){u.refresh()});
-y.bindAction(80,!0,"print");y.bindAction(107,!0,"zoomIn");y.bindAction(109,!0,"zoomOut");y.bindAction(61,!0,"zoomIn");y.bindAction(187,!0,"zoomIn");y.bindAction(222,!0,"zoomIn");y.bindAction(173,!0,"zoomOut");y.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)y.bindAction(79,!0,"outline",!0),y.bindControlKey(36,function(){u.isEnabled()&&u.foldCells(!0)}),y.bindControlKey(35,function(){u.isEnabled()&&u.foldCells(!1)}),y.bindControlKey(13,function(){D.ctrlEnter()}),y.bindAction(8,
+(null==m.dialogs||0==m.dialogs.length)};y.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var B=null,I={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=y.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(t.isEnabled()){var g=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?g=m.actions.get(m.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?
+g=m.actions.get(m.altShiftActions[c.keyCode]):this.isControlDown(c)&&mxEvent.isAltDown(c)&&(g=m.actions.get(m.ctrlAltActions[c.keyCode]));if(null!=g)return g.funct;if("/"==c.key&&!this.isControlDown(c)&&!mxEvent.isAltDown(c))return function(){var l=document.getElementById("geOmniSearch");null!=l&&30<l.clientWidth&&l.focus()};if(null!=I[c.keyCode]&&!t.isSelectionEmpty())if(!this.isControlDown(c)&&mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)){if(t.model.isVertex(t.getSelectionCell()))return function(){var l=
+t.connectVertex(t.getSelectionCell(),I[c.keyCode],t.defaultEdgeLength,c,!0);null!=l&&0<l.length&&(1==l.length&&t.model.isEdge(l[0])?t.setSelectionCell(t.model.getTerminal(l[0],!1)):t.setSelectionCell(l[l.length-1]),t.scrollCellToVisible(t.getSelectionCell()),null!=m.hoverIcons&&m.hoverIcons.update(t.view.getState(t.getSelectionCell())))}}else return this.isControlDown(c)?function(){f(c.keyCode,mxEvent.isShiftDown(c)?t.gridSize:null,!0)}:function(){f(c.keyCode,mxEvent.isShiftDown(c)?t.gridSize:null)}}return S.apply(this,
+arguments)};y.bindAction=mxUtils.bind(this,function(c,g,l,n){var x=this.actions.get(l);null!=x&&(l=function(){x.isEnabled()&&x.funct.apply(this,arguments)},g?n?y.bindControlShiftKey(c,l):y.bindControlKey(c,l):n?y.bindShiftKey(c,l):y.bindKey(c,l))});var D=this,P=y.escape;y.escape=function(c){P.apply(this,arguments)};y.enter=function(){};y.bindControlShiftKey(36,function(){t.exitGroup()});y.bindControlShiftKey(35,function(){t.enterGroup()});y.bindShiftKey(36,function(){t.home()});y.bindKey(35,function(){t.refresh()});
+y.bindAction(80,!0,"print");y.bindAction(107,!0,"zoomIn");y.bindAction(109,!0,"zoomOut");y.bindAction(61,!0,"zoomIn");y.bindAction(187,!0,"zoomIn");y.bindAction(222,!0,"zoomIn");y.bindAction(173,!0,"zoomOut");y.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)y.bindAction(79,!0,"outline",!0),y.bindControlKey(36,function(){t.isEnabled()&&t.foldCells(!0)}),y.bindControlKey(35,function(){t.isEnabled()&&t.foldCells(!1)}),y.bindControlKey(13,function(){D.ctrlEnter()}),y.bindAction(8,
!1,"delete"),y.bindAction(8,!0,"deleteAll"),y.bindAction(8,!1,"deleteLabels",!0),y.bindAction(46,!1,"delete"),y.bindAction(46,!0,"deleteAll"),y.bindAction(46,!1,"deleteLabels",!0),y.bindAction(36,!1,"resetView"),y.bindAction(72,!0,"fitWindow",!0),y.bindAction(74,!0,"fitPage"),y.bindAction(74,!0,"fitTwoPages",!0),y.bindAction(48,!0,"customZoom"),y.bindAction(82,!0,"turn"),y.bindAction(82,!0,"clearDefaultStyle",!0),y.bindAction(83,!0,"save"),y.bindAction(83,!0,"saveAs",!0),y.bindAction(65,!0,"selectAll"),
y.bindAction(65,!0,"selectNone",!0),y.bindAction(73,!0,"selectVertices",!0),y.bindAction(69,!0,"selectEdges",!0),y.bindAction(69,!0,"editStyle"),y.bindAction(66,!0,"bold"),y.bindAction(66,!0,"toBack",!0),y.bindAction(70,!0,"toFront",!0),y.bindAction(68,!0,"duplicate"),y.bindAction(68,!0,"setAsDefaultStyle",!0),y.bindAction(90,!0,"undo"),y.bindAction(90,!0,"redo",!0),y.bindAction(89,!0,"redo"),y.bindAction(89,!0,"autosize",!0),y.bindAction(88,!0,"cut"),y.bindAction(67,!0,"copy"),y.bindAction(86,!0,
"paste"),y.bindAction(71,!0,"group"),y.bindAction(77,!0,"editData"),y.bindAction(71,!0,"grid",!0),y.bindAction(73,!0,"italic"),y.bindAction(76,!0,"lockUnlock"),y.bindAction(76,!0,"layers",!0),y.bindAction(80,!0,"format",!0),y.bindAction(85,!0,"underline"),y.bindAction(85,!0,"ungroup",!0),y.bindAction(109,!0,"decreaseFontSize",!0),y.bindAction(107,!0,"increaseFontSize",!0),y.bindAction(219,!0,"decreaseFontSize",!0),y.bindAction(221,!0,"increaseFontSize",!0),y.bindAction(190,!0,"superscript"),y.bindAction(188,
-!0,"subscript"),y.bindAction(13,!1,"keyPressEnter"),y.bindKey(113,function(){u.isEnabled()&&u.startEditingAtCell()});return y};EditorUi.prototype.createMenuElement=function(b,f,l){var u=document.createElement("a");this.addMenuHandler(u,f,l);mxUtils.write(u,b);u.className="geItem";return u};
-EditorUi.prototype.addMenuHandler=function(b,f,l,u){if(null!=f){var y=null,q=!0,C=mxUtils.bind(this,function(J){null!=l&&l(J);if(!mxEvent.isConsumed(J)&&q&&(null==b.enabled||b.enabled)){this.editor.graph.popupMenuHandler.hideMenu();var S=new mxPopupMenu(f);S.smartSeparators=!0;S.showDisabled=!0;S.autoExpand=!0;S.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(S,arguments);this.resetCurrentMenu();y=null;S.destroy()});this.menus.autoPopup||null==this.currentMenu||this.hideCurrentMenu();
-var D=mxUtils.getOffset(b);S.popup(D.x,D.y+b.offsetHeight,null,J);this.setCurrentMenu(S,b);y=S}u||mxEvent.consume(J)});mxEvent.addListener(b,"mousemove",mxUtils.bind(this,function(J){if(this.menus.autoPopup&&null!=this.currentMenu&&this.currentMenuElt!=b&&null!=this.currentMenuElt){var S=this.currentMenuElt;this.hideCurrentMenu();S.parentNode==b.parentNode&&"INPUT"!=b.nodeName&&C(J)}}));mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(J){!this.menus.autoPopup&&
-null!=this.currentMenu&&this.currentMenuElt!=b&&mxEvent.isMouseEvent(J)&&this.hideCurrentMenu();q=null==this.currentMenu;"INPUT"!=mxEvent.getSource(J).nodeName?J.preventDefault():J.stopPropagation()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(J){C(J);q=!0}));u&&(mxEvent.addListener(b,"focus",mxUtils.bind(this,function(J){C(J);q=!0})),mxEvent.addListener(b,"blur",mxUtils.bind(this,function(J){this.currentMenu==y&&this.hideCurrentMenu()})),mxEvent.addListener(b,"keyup",mxUtils.bind(this,
-function(J){this.hideCurrentMenu();13!=J.keyCode&&27!=J.keyCode&&(C(J),q=!0)})))}};
-EditorUi.prototype.addShapePicker=function(b,f){var l=this.editor.graph;mxEvent.addListener(b,"click",mxUtils.bind(this,function(u){if(this.isShapePickerVisible())this.hideShapePicker();else{var y=mxUtils.getOffset(b);Editor.inlineFullscreen||null==this.embedViewport?f?(y.x-=this.diagramContainer.offsetLeft+30,y.y=b.offsetHeight-2):(y.x+=16+b.offsetHeight+this.sketchPickerMenuElt.offsetWidth/2,y.y+=20):(y.x=0,y.y=b.offsetTop);this.showShapePicker(Math.max(this.diagramContainer.scrollLeft+Math.max(24,
-y.x)),this.diagramContainer.scrollTop+y.y,null,null,null,null,mxUtils.bind(this,function(q){return l.getCenterInsertPoint(l.getBoundingBoxFromGeometry(q,!0))}),f,!1)}mxEvent.consume(u)}))};
-EditorUi.prototype.createZoomInput=function(b){var f=document.createElement("input");f.className="geButton geZoomInput";f.style.backgroundImage="url("+Editor.thinExpandImage+")";f.setAttribute("type","text");f.setAttribute("value","100%");var l=this.menus.get("viewZoom");this.dependsOnLanguage(mxUtils.bind(this,function(){f.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)")}));(b||mxClient.IS_TOUCH)&&f.setAttribute("readonly","true");var u=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,
-function(y){u=!1;mxClient.IS_TOUCH||mxEvent.getSource(y)!=f||document.activeElement==f||(f.focus(),mxClient.IS_GC||mxClient.IS_FF?f.select():document.execCommand("selectAll",!1,null),u=!0)}),mxUtils.bind(this,function(y){mxEvent.getSource(y)==f&&u&&mxEvent.consume(y)}),mxUtils.bind(this,function(y){u&&(mxEvent.consume(y),u=!1)}));this.addMenuHandler(f,l.funct);mxUtils.bind(this,function(y){mxEvent.addListener(y,"click",mxUtils.bind(this,function(C){mxEvent.isAltDown(C)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),
-mxEvent.consume(C)):mxEvent.isShiftDown(C)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(C))}));var q=mxUtils.bind(this,function(C,J,S){f.value=Math.round(100*this.editor.graph.view.scale*(null!=S?S:1))+"%";document.activeElement==f&&this.editor.graph.container.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(C){if(27==C.keyCode||13==C.keyCode||9==C.keyCode)27==C.keyCode||isNaN(parseInt(f.value))?q():this.editor.graph.zoomTo(parseInt(f.value)/100),
-this.hideCurrentMenu(),mxEvent.consume(C)}));this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,q);this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",q);mxEvent.addListener(f,"blur",q);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(C,J){q(C,J,J.getProperty("factor"))}))})(f);return f};
-EditorUi.prototype.createHelpIcon=function(b,f){f=document.createElement("img");f.setAttribute("src",Editor.helpImage);f.setAttribute("title",mxResources.get("help")+" ("+b+")");f.className="geHelpIcon";mxEvent.addGestureListeners(f,mxUtils.bind(this,function(l){this.hideCurrentMenu();this.openLink(b);mxEvent.consume(l)}));return f};
+!0,"subscript"),y.bindAction(13,!1,"keyPressEnter"),y.bindKey(113,function(){t.isEnabled()&&t.startEditingAtCell()});return y};EditorUi.prototype.createMenuElement=function(b,f,m){var t=document.createElement("a");this.addMenuHandler(t,f,m);mxUtils.write(t,b);t.className="geItem";return t};
+EditorUi.prototype.addMenuHandler=function(b,f,m,t){if(null!=f){var y=null,q=!0,B=mxUtils.bind(this,function(I){null!=m&&m(I);if(!mxEvent.isConsumed(I)&&q&&(null==b.enabled||b.enabled)){this.editor.graph.popupMenuHandler.hideMenu();var S=new mxPopupMenu(f);S.smartSeparators=!0;S.showDisabled=!0;S.autoExpand=!0;S.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(S,arguments);this.resetCurrentMenu();y=null;S.destroy()});this.menus.autoPopup||null==this.currentMenu||this.hideCurrentMenu();
+var D=mxUtils.getOffset(b);S.popup(D.x,D.y+b.offsetHeight,null,I);this.setCurrentMenu(S,b);y=S}t||mxEvent.consume(I)});mxEvent.addListener(b,"mousemove",mxUtils.bind(this,function(I){if(this.menus.autoPopup&&null!=this.currentMenu&&this.currentMenuElt!=b&&null!=this.currentMenuElt){var S=this.currentMenuElt;this.hideCurrentMenu();S.parentNode==b.parentNode&&"INPUT"!=b.nodeName&&B(I)}}));mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(I){!this.menus.autoPopup&&
+null!=this.currentMenu&&this.currentMenuElt!=b&&mxEvent.isMouseEvent(I)&&this.hideCurrentMenu();q=null==this.currentMenu;"INPUT"!=mxEvent.getSource(I).nodeName?I.preventDefault():I.stopPropagation()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(I){B(I);q=!0}));t&&(mxEvent.addListener(b,"focus",mxUtils.bind(this,function(I){B(I);q=!0})),mxEvent.addListener(b,"blur",mxUtils.bind(this,function(I){this.currentMenu==y&&this.hideCurrentMenu()})),mxEvent.addListener(b,"keyup",mxUtils.bind(this,
+function(I){this.hideCurrentMenu();13!=I.keyCode&&27!=I.keyCode&&(B(I),q=!0)})))}};
+EditorUi.prototype.addShapePicker=function(b,f){var m=this.editor.graph;mxEvent.addListener(b,"click",mxUtils.bind(this,function(t){if(this.isShapePickerVisible())this.hideShapePicker();else{var y=mxUtils.getOffset(b);Editor.inlineFullscreen||null==this.embedViewport?f?(y.x-=this.diagramContainer.offsetLeft+30,y.y=b.offsetHeight-2):(y.x+=16+b.offsetHeight+this.sketchPickerMenuElt.offsetWidth/2,y.y+=20):(y.x=0,y.y=b.offsetTop);this.showShapePicker(Math.max(this.diagramContainer.scrollLeft+Math.max(24,
+y.x)),this.diagramContainer.scrollTop+y.y,null,null,null,null,mxUtils.bind(this,function(q){return m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0))}),f,!1)}mxEvent.consume(t)}))};
+EditorUi.prototype.createZoomInput=function(b){var f=document.createElement("input");f.className="geButton geZoomInput";f.style.backgroundImage="url("+Editor.thinExpandImage+")";f.setAttribute("type","text");f.setAttribute("value","100%");var m=this.menus.get("viewZoom");this.dependsOnLanguage(mxUtils.bind(this,function(){f.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)")}));(b||mxClient.IS_TOUCH)&&f.setAttribute("readonly","true");var t=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,
+function(y){t=!1;mxClient.IS_TOUCH||mxEvent.getSource(y)!=f||document.activeElement==f||(f.focus(),mxClient.IS_GC||mxClient.IS_FF?f.select():document.execCommand("selectAll",!1,null),t=!0)}),mxUtils.bind(this,function(y){mxEvent.getSource(y)==f&&t&&mxEvent.consume(y)}),mxUtils.bind(this,function(y){t&&(mxEvent.consume(y),t=!1)}));this.addMenuHandler(f,m.funct);mxUtils.bind(this,function(y){mxEvent.addListener(y,"click",mxUtils.bind(this,function(B){mxEvent.isAltDown(B)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),
+mxEvent.consume(B)):mxEvent.isShiftDown(B)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(B))}));var q=mxUtils.bind(this,function(B,I,S){f.value=Math.round(100*this.editor.graph.view.scale*(null!=S?S:1))+"%";document.activeElement==f&&this.editor.graph.container.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(B){if(27==B.keyCode||13==B.keyCode||9==B.keyCode)27==B.keyCode||isNaN(parseInt(f.value))?q():this.editor.graph.zoomTo(parseInt(f.value)/100),
+this.hideCurrentMenu(),mxEvent.consume(B)}));this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,q);this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",q);mxEvent.addListener(f,"blur",q);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(B,I){q(B,I,I.getProperty("factor"))}))})(f);return f};
+EditorUi.prototype.createHelpIcon=function(b,f){f=document.createElement("img");f.setAttribute("src",Editor.helpImage);f.setAttribute("title",mxResources.get("help")+" ("+b+")");f.className="geHelpIcon";mxEvent.addGestureListeners(f,mxUtils.bind(this,function(m){this.hideCurrentMenu();this.openLink(b);mxEvent.consume(m)}));return f};
EditorUi.prototype.destroy=function(){var b=this.editor.graph;null!=b&&null!=this.selectionStateListener&&(b.getSelectionModel().removeListener(this.selectionStateListener),b.getModel().removeListener(this.selectionStateListener),b.getView().removeListener(this.selectionStateListener),b.removeListener(this.selectionStateListener),this.selectionStateListener=null);null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&
(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=
null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=
-null}var f=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.hsplit,this.chromelessToolbar,this.layersDialog];for(b=0;b<f.length;b++)null!=f[b]&&null!=f[b].parentNode&&f[b].parentNode.removeChild(f[b])};(function(){var b=[["nbsp","160"],["shy","173"]],f=mxUtils.parseXml;mxUtils.parseXml=function(u){for(var y=0;y<b.length;y++)u=u.replace(new RegExp("&"+b[y][0]+";","g"),"&#"+b[y][1]+";");return f(u)};var l=mxUtils.getSizeForString;mxUtils.getSizeForString=function(u,y,q,C){return l(Graph.sanitizeHtml(u),y,q,C)}})();
+null}var f=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.hsplit,this.chromelessToolbar,this.layersDialog];for(b=0;b<f.length;b++)null!=f[b]&&null!=f[b].parentNode&&f[b].parentNode.removeChild(f[b])};(function(){var b=[["nbsp","160"],["shy","173"]],f=mxUtils.parseXml;mxUtils.parseXml=function(t){for(var y=0;y<b.length;y++)t=t.replace(new RegExp("&"+b[y][0]+";","g"),"&#"+b[y][1]+";");return f(t)};var m=mxUtils.getSizeForString;mxUtils.getSizeForString=function(t,y,q,B){return m(Graph.sanitizeHtml(t),y,q,B)}})();
Date.prototype.toISOString||function(){function b(f){f=String(f);1===f.length&&(f="0"+f);return f}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,f=function(u){return"function"===typeof u||"[object Function]"===b.call(u)},l=Math.pow(2,53)-1;return function(u){var y=Object(u);if(null==u)throw new TypeError("Array.from requires an array-like object - not null or undefined");var q=1<arguments.length?arguments[1]:void 0,C;if("undefined"!==typeof q){if(!f(q))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(C=
-arguments[2])}var J=Number(y.length);J=isNaN(J)?0:0!==J&&isFinite(J)?(0<J?1:-1)*Math.floor(Math.abs(J)):J;J=Math.min(Math.max(J,0),l);for(var S=f(this)?Object(new this(J)):Array(J),D=0,P;D<J;)P=y[D],S[D]=q?"undefined"===typeof C?q(P,D):q.call(C,P,D):P,D+=1;S.length=J;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");
+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,f=function(t){return"function"===typeof t||"[object Function]"===b.call(t)},m=Math.pow(2,53)-1;return function(t){var y=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var q=1<arguments.length?arguments[1]:void 0,B;if("undefined"!==typeof q){if(!f(q))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(B=
+arguments[2])}var I=Number(y.length);I=isNaN(I)?0:0!==I&&isFinite(I)?(0<I?1:-1)*Math.floor(Math.abs(I)):I;I=Math.min(Math.max(I,0),m);for(var S=f(this)?Object(new this(I)):Array(I),D=0,P;D<I;)P=y[D],S[D]=q?"undefined"===typeof B?q(P,D):q.call(B,P,D):P,D+=1;S.length=I;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");
mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(f){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage="data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=";
mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#424242";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.graph.refresh(),this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
-mxShape.prototype.getConstraints=function(b,f,l){return null};mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};
-(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(f,l,u,y,q){return"default"==y&&null!=q?"fillcolor"==u.nodeName?q.shapeBackgroundColor:q.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(f,l,u){null==u&&(u=f);return b.apply(this,[f,l,u])}})();
-(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(f,l,u,y,q,C,J,S){var D=b.apply(this,arguments);if(null!=l){var P=D.getElementsByTagName("img");0<P.length&&(P[0].className="geButton")}return D}})();
-Graph=function(b,f,l,u,y,q){mxGraph.call(this,b,f,l,u);this.themes=y||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=q?q:!1;b=this.baseUrl;f=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<f&&(f=b.indexOf("/",f+2),0<f&&(this.domainUrl=b.substring(0,f)),f=b.lastIndexOf("/"),0<f&&(this.domainPathUrl=b.substring(0,f+1)));this.isHtmlLabel=function(k){k=this.getCurrentCellStyle(k);
-return null!=k?"1"==k.html||"wrap"==k[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var C=null,J=null,S=null,D=null,P=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var I=k.getState();v=this.view.scale;if(!mxEvent.isAltDown(k.getEvent())&&null!=I&&(c=this.isCellSelected(I.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(k.getEvent()))){var N=this.selectionCellsHandler.getHandler(I.cell);
-if(null==N||null==N.getHandleForEvent(k)){var T=new mxRectangle(k.getGraphX()-1,k.getGraphY()-1),W=mxEvent.isTouchEvent(k.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;N=W+2;T.grow(W);if(this.isTableCell(I.cell)&&this.isCellMovable(I.cell)&&!this.isCellSelected(I.cell)&&!(mxUtils.contains(I,k.getGraphX()-N,k.getGraphY()-N)&&mxUtils.contains(I,k.getGraphX()-N,k.getGraphY()+N)&&mxUtils.contains(I,k.getGraphX()+N,k.getGraphY()+N)&&mxUtils.contains(I,k.getGraphX()+
-N,k.getGraphY()-N))){var U=this.model.getParent(I.cell);N=this.model.getParent(U);if(!this.isCellSelected(N)){W*=v;var Y=2*W;if(this.model.getChildAt(N,0)!=U&&mxUtils.intersects(T,new mxRectangle(I.x,I.y-W,I.width,Y))||this.model.getChildAt(U,0)!=I.cell&&mxUtils.intersects(T,new mxRectangle(I.x-W,I.y,Y,I.height))||mxUtils.intersects(T,new mxRectangle(I.x,I.y+I.height-W,I.width,Y))||mxUtils.intersects(T,new mxRectangle(I.x+I.width-W,I.y,Y,I.height)))U=this.selectionCellsHandler.isHandled(N),this.selectCellForEvent(N,
-k.getEvent()),N=this.selectionCellsHandler.getHandler(N),null!=N&&(W=N.getHandleForEvent(k),null!=W&&(N.start(k.getGraphX(),k.getGraphY(),W),N.blockDelayedSelection=!U,k.consume()))}}for(;!k.isConsumed()&&null!=I&&(this.isTableCell(I.cell)||this.isTableRow(I.cell)||this.isTable(I.cell));)this.isSwimlane(I.cell)&&this.isCellMovable(I.cell)&&(N=this.getActualStartSize(I.cell),(0<N.x||0<N.width)&&mxUtils.intersects(T,new mxRectangle(I.x+(N.x-N.width-1)*v+(0==N.x?I.width:0),I.y,1,I.height))||(0<N.y||
-0<N.height)&&mxUtils.intersects(T,new mxRectangle(I.x,I.y+(N.y-N.height-1)*v+(0==N.y?I.height:0),I.width,1)))&&(this.selectCellForEvent(I.cell,k.getEvent()),N=this.selectionCellsHandler.getHandler(I.cell),null!=N&&null!=N.customHandles&&(W=mxEvent.CUSTOM_HANDLE-N.customHandles.length+1,N.start(k.getGraphX(),k.getGraphY(),W),k.consume())),I=this.view.getState(this.model.getParent(I.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&
-this.isEnabled()){k=v.getProperty("event");var I=k.getState();mxEvent.isAltDown(k.getEvent())||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v)||c||null==I||!this.model.isEdge(I.cell)||(C=new mxPoint(k.getGraphX(),k.getGraphY()),P=this.isCellSelected(I.cell),S=I,J=k,null!=I.text&&null!=I.text.boundingBox&&mxUtils.contains(I.text.boundingBox,k.getGraphX(),k.getGraphY())?D=mxEvent.LABEL_HANDLE:(v=this.selectionCellsHandler.getHandler(I.cell),null!=v&&null!=v.bends&&0<v.bends.length&&(D=v.getHandleForEvent(k))))}}));
-this.addMouseListener({mouseDown:function(k,v){},mouseMove:mxUtils.bind(this,function(k,v){k=this.selectionCellsHandler.handlers.map;for(var I in k)if(null!=k[I].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(v.getEvent())){var N=this.tolerance;if(null!=C&&null!=S&&null!=J){if(I=S,null!=D||Math.abs(C.x-v.getGraphX())>N||Math.abs(C.y-v.getGraphY())>N){var T=null;mxEvent.isShiftDown(v.getEvent())||(T=this.selectionCellsHandler.getHandler(I.cell));if(null!=T&&null!=
-T.bends&&0<T.bends.length){T.redrawHandles();var W=null!=D?D:T.getHandleForEvent(J),U=this.view.getEdgeStyle(I),Y=U==mxEdgeStyle.EntityRelation;N=I.absolutePoints;P||(W=D);W!=mxEvent.LABEL_HANDLE&&null!=N&&(W=D,null==W&&(k=new mxRectangle(C.x,C.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,N[0].x,N[0].y)?W=0:mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?W=T.bends.length-1:null!=N&&(null==U&&null==W||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&
-(null!=U&&(2==N.length||3==N.length&&(0==Math.round(N[0].x-N[1].x)&&0==Math.round(N[1].x-N[2].x)||0==Math.round(N[0].y-N[1].y)&&0==Math.round(N[1].y-N[2].y)))?W=2:(W=mxUtils.findNearestSegment(I,C.x,C.y),W=null==U?mxEvent.VIRTUAL_HANDLE-W:W+1))),null==W&&(W=mxEvent.VIRTUAL_HANDLE));k=W==mxEvent.LABEL_HANDLE||0==W||W==T.bends.length-1;if(!Y&&(null!=I.visibleSourceState||null!=I.visibleTargetState)||k)T.start(v.getGraphX(),v.getGraphX(),W),v.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?
-this.isCellSelected(I.cell)||(this.selectionCellsHandler.handlers.put(I.cell,T),this.selectCellForEvent(I.cell,v.getEvent())):this.isCellSelected(I.cell)||T.destroy());P=!1;C=J=S=D=null}}else if(I=v.getState(),null!=I&&this.isCellEditable(I.cell)){k=this.model.getParent(I.cell);T=null;if(this.model.isEdge(I.cell)&&!this.isCellSelected(I.cell)&&!mxEvent.isAltDown(v.getEvent())&&!mxEvent.isShiftDown(v.getEvent())&&!this.isAncestorSelected(I.cell)&&(this.isSwimlane(k)||this.model.isLayer(k)||this.getCurrentRoot()==
-k)){if(k=new mxRectangle(v.getGraphX(),v.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),N=I.absolutePoints,null!=N)null!=I.text&&null!=I.text.boundingBox&&mxUtils.contains(I.text.boundingBox,v.getGraphX(),v.getGraphY())?T="move":mxUtils.contains(k,N[0].x,N[0].y)||mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(I),U==mxEdgeStyle.EntityRelation||null==I.visibleSourceState&&null==I.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&
-U!=mxEdgeStyle.OrthConnector))||(v=mxUtils.findNearestSegment(I,v.getGraphX(),v.getGraphY()),v<N.length-1&&0<=v&&(T=0==Math.round(N[v].x-N[v+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(v.getEvent())){N=mxShape.prototype.svgStrokeTolerance/2;k=new mxRectangle(v.getGraphX(),v.getGraphY());k.grow(N);if(this.isTableCell(I.cell)&&this.isCellMovable(I.cell)&&(v=this.model.getParent(I.cell),N=this.model.getParent(v),!this.isCellSelected(N)))if(mxUtils.intersects(k,new mxRectangle(I.x,
-I.y-2,I.width,4))&&this.model.getChildAt(N,0)!=v||mxUtils.intersects(k,new mxRectangle(I.x,I.y+I.height-2,I.width,4)))T="row-resize";else if(mxUtils.intersects(k,new mxRectangle(I.x-2,I.y,4,I.height))&&this.model.getChildAt(v,0)!=I.cell||mxUtils.intersects(k,new mxRectangle(I.x+I.width-2,I.y,4,I.height)))T="col-resize";for(v=I;null==T&&null!=v&&(this.isTableCell(v.cell)||this.isTableRow(v.cell)||this.isTable(v.cell));)this.isSwimlane(v.cell)&&this.isCellMovable(v.cell)&&(N=this.getActualStartSize(v.cell),
-W=this.view.scale,(0<N.x||0<N.width)&&mxUtils.intersects(k,new mxRectangle(v.x+(N.x-N.width-1)*W+(0==N.x?v.width*W:0),v.y,1,v.height))?T="col-resize":(0<N.y||0<N.height)&&mxUtils.intersects(k,new mxRectangle(v.x,v.y+(N.y-N.height-1)*W+(0==N.y?v.height:0),v.width,1))&&(T="row-resize")),v=this.view.getState(this.model.getParent(v.cell))}null!=T&&I.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(k,v){D=C=J=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var g=document.createElement("div");this.cellRenderer.getLabelValue=
+mxShape.prototype.getConstraints=function(b,f,m){return null};mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};
+(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(f,m,t,y,q){return"default"==y&&null!=q?"fillcolor"==t.nodeName?q.shapeBackgroundColor:q.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(f,m,t){null==t&&(t=f);return b.apply(this,[f,m,t])}})();
+(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(f,m,t,y,q,B,I,S){var D=b.apply(this,arguments);if(null!=m){var P=D.getElementsByTagName("img");0<P.length&&(P[0].className="geButton")}return D}})();
+Graph=function(b,f,m,t,y,q){mxGraph.call(this,b,f,m,t);this.themes=y||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=q?q:!1;b=this.baseUrl;f=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<f&&(f=b.indexOf("/",f+2),0<f&&(this.domainUrl=b.substring(0,f)),f=b.lastIndexOf("/"),0<f&&(this.domainPathUrl=b.substring(0,f+1)));this.isHtmlLabel=function(k){k=this.getCurrentCellStyle(k);
+return null!=k?"1"==k.html||"wrap"==k[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,I=null,S=null,D=null,P=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var J=k.getState();v=this.view.scale;if(!mxEvent.isAltDown(k.getEvent())&&null!=J&&(c=this.isCellSelected(J.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(k.getEvent()))){var N=this.selectionCellsHandler.getHandler(J.cell);
+if(null==N||null==N.getHandleForEvent(k)){var T=new mxRectangle(k.getGraphX()-1,k.getGraphY()-1),W=mxEvent.isTouchEvent(k.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;N=W+2;T.grow(W);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&!this.isCellSelected(J.cell)&&!(mxUtils.contains(J,k.getGraphX()-N,k.getGraphY()-N)&&mxUtils.contains(J,k.getGraphX()-N,k.getGraphY()+N)&&mxUtils.contains(J,k.getGraphX()+N,k.getGraphY()+N)&&mxUtils.contains(J,k.getGraphX()+
+N,k.getGraphY()-N))){var U=this.model.getParent(J.cell);N=this.model.getParent(U);if(!this.isCellSelected(N)){W*=v;var Y=2*W;if(this.model.getChildAt(N,0)!=U&&mxUtils.intersects(T,new mxRectangle(J.x,J.y-W,J.width,Y))||this.model.getChildAt(U,0)!=J.cell&&mxUtils.intersects(T,new mxRectangle(J.x-W,J.y,Y,J.height))||mxUtils.intersects(T,new mxRectangle(J.x,J.y+J.height-W,J.width,Y))||mxUtils.intersects(T,new mxRectangle(J.x+J.width-W,J.y,Y,J.height)))U=this.selectionCellsHandler.isHandled(N),this.selectCellForEvent(N,
+k.getEvent()),N=this.selectionCellsHandler.getHandler(N),null!=N&&(W=N.getHandleForEvent(k),null!=W&&(N.start(k.getGraphX(),k.getGraphY(),W),N.blockDelayedSelection=!U,k.consume()))}}for(;!k.isConsumed()&&null!=J&&(this.isTableCell(J.cell)||this.isTableRow(J.cell)||this.isTable(J.cell));)this.isSwimlane(J.cell)&&this.isCellMovable(J.cell)&&(N=this.getActualStartSize(J.cell),(0<N.x||0<N.width)&&mxUtils.intersects(T,new mxRectangle(J.x+(N.x-N.width-1)*v+(0==N.x?J.width:0),J.y,1,J.height))||(0<N.y||
+0<N.height)&&mxUtils.intersects(T,new mxRectangle(J.x,J.y+(N.y-N.height-1)*v+(0==N.y?J.height:0),J.width,1)))&&(this.selectCellForEvent(J.cell,k.getEvent()),N=this.selectionCellsHandler.getHandler(J.cell),null!=N&&null!=N.customHandles&&(W=mxEvent.CUSTOM_HANDLE-N.customHandles.length+1,N.start(k.getGraphX(),k.getGraphY(),W),k.consume())),J=this.view.getState(this.model.getParent(J.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&
+this.isEnabled()){k=v.getProperty("event");var J=k.getState();mxEvent.isAltDown(k.getEvent())||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v)||c||null==J||!this.model.isEdge(J.cell)||(B=new mxPoint(k.getGraphX(),k.getGraphY()),P=this.isCellSelected(J.cell),S=J,I=k,null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,k.getGraphX(),k.getGraphY())?D=mxEvent.LABEL_HANDLE:(v=this.selectionCellsHandler.getHandler(J.cell),null!=v&&null!=v.bends&&0<v.bends.length&&(D=v.getHandleForEvent(k))))}}));
+this.addMouseListener({mouseDown:function(k,v){},mouseMove:mxUtils.bind(this,function(k,v){k=this.selectionCellsHandler.handlers.map;for(var J in k)if(null!=k[J].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(v.getEvent())){var N=this.tolerance;if(null!=B&&null!=S&&null!=I){if(J=S,null!=D||Math.abs(B.x-v.getGraphX())>N||Math.abs(B.y-v.getGraphY())>N){var T=null;mxEvent.isShiftDown(v.getEvent())||(T=this.selectionCellsHandler.getHandler(J.cell));if(null!=T&&null!=
+T.bends&&0<T.bends.length){T.redrawHandles();var W=null!=D?D:T.getHandleForEvent(I),U=this.view.getEdgeStyle(J),Y=U==mxEdgeStyle.EntityRelation;N=J.absolutePoints;P||(W=D);W!=mxEvent.LABEL_HANDLE&&null!=N&&(W=D,null==W&&(k=new mxRectangle(B.x,B.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,N[0].x,N[0].y)?W=0:mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?W=T.bends.length-1:null!=N&&(null==U&&null==W||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&
+(null!=U&&(2==N.length||3==N.length&&(0==Math.round(N[0].x-N[1].x)&&0==Math.round(N[1].x-N[2].x)||0==Math.round(N[0].y-N[1].y)&&0==Math.round(N[1].y-N[2].y)))?W=2:(W=mxUtils.findNearestSegment(J,B.x,B.y),W=null==U?mxEvent.VIRTUAL_HANDLE-W:W+1))),null==W&&(W=mxEvent.VIRTUAL_HANDLE));k=W==mxEvent.LABEL_HANDLE||0==W||W==T.bends.length-1;if(!Y&&(null!=J.visibleSourceState||null!=J.visibleTargetState)||k)T.start(v.getGraphX(),v.getGraphX(),W),v.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?
+this.isCellSelected(J.cell)||(this.selectionCellsHandler.handlers.put(J.cell,T),this.selectCellForEvent(J.cell,v.getEvent())):this.isCellSelected(J.cell)||T.destroy());P=!1;B=I=S=D=null}}else if(J=v.getState(),null!=J&&this.isCellEditable(J.cell)){k=this.model.getParent(J.cell);T=null;if(this.model.isEdge(J.cell)&&!this.isCellSelected(J.cell)&&!mxEvent.isAltDown(v.getEvent())&&!mxEvent.isShiftDown(v.getEvent())&&!this.isAncestorSelected(J.cell)&&(this.isSwimlane(k)||this.model.isLayer(k)||this.getCurrentRoot()==
+k)){if(k=new mxRectangle(v.getGraphX(),v.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),N=J.absolutePoints,null!=N)null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,v.getGraphX(),v.getGraphY())?T="move":mxUtils.contains(k,N[0].x,N[0].y)||mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(J),U==mxEdgeStyle.EntityRelation||null==J.visibleSourceState&&null==J.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&
+U!=mxEdgeStyle.OrthConnector))||(v=mxUtils.findNearestSegment(J,v.getGraphX(),v.getGraphY()),v<N.length-1&&0<=v&&(T=0==Math.round(N[v].x-N[v+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(v.getEvent())){N=mxShape.prototype.svgStrokeTolerance/2;k=new mxRectangle(v.getGraphX(),v.getGraphY());k.grow(N);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&(v=this.model.getParent(J.cell),N=this.model.getParent(v),!this.isCellSelected(N)))if(mxUtils.intersects(k,new mxRectangle(J.x,
+J.y-2,J.width,4))&&this.model.getChildAt(N,0)!=v||mxUtils.intersects(k,new mxRectangle(J.x,J.y+J.height-2,J.width,4)))T="row-resize";else if(mxUtils.intersects(k,new mxRectangle(J.x-2,J.y,4,J.height))&&this.model.getChildAt(v,0)!=J.cell||mxUtils.intersects(k,new mxRectangle(J.x+J.width-2,J.y,4,J.height)))T="col-resize";for(v=J;null==T&&null!=v&&(this.isTableCell(v.cell)||this.isTableRow(v.cell)||this.isTable(v.cell));)this.isSwimlane(v.cell)&&this.isCellMovable(v.cell)&&(N=this.getActualStartSize(v.cell),
+W=this.view.scale,(0<N.x||0<N.width)&&mxUtils.intersects(k,new mxRectangle(v.x+(N.x-N.width-1)*W+(0==N.x?v.width*W:0),v.y,1,v.height))?T="col-resize":(0<N.y||0<N.height)&&mxUtils.intersects(k,new mxRectangle(v.x,v.y+(N.y-N.height-1)*W+(0==N.y?v.height:0),v.width,1))&&(T="row-resize")),v=this.view.getState(this.model.getParent(v.cell))}null!=T&&J.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(k,v){D=B=I=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var g=document.createElement("div");this.cellRenderer.getLabelValue=
function(k){var v=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);k.view.graph.isHtmlLabel(k.cell)&&("0"==mxUtils.getValue(k.style,"html","0")?v=mxUtils.htmlEntities(v,!1):(k.lastLabelValue!=v&&(k.lastLabelValue=v,k.lastSanitizedLabelValue=Graph.sanitizeHtml(v),g.innerHTML=k.lastSanitizedLabelValue,Graph.addLightDarkColors(g,null,"simple"==k.view.graph.getAdaptiveColors())&&(k.lastSanitizedLabelValue=g.innerHTML)),v=k.lastSanitizedLabelValue));return v};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);
-this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(k,v){return!1};this.alternateEdgeStyle="vertical";null==u&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;
-this.graphHandler.getGuideStates=function(){var k=m.apply(this,arguments);if(this.graph.pageVisible){var v=[],I=this.graph.pageFormat,N=this.graph.pageScale,T=I.width*N;I=I.height*N;N=this.graph.view.translate;for(var W=this.graph.view.scale,U=this.graph.getPageLayout(),Y=0;Y<U.width;Y++)v.push(new mxRectangle(((U.x+Y)*T+N.x)*W,(U.y*I+N.y)*W,T*W,I*W));for(Y=1;Y<U.height;Y++)v.push(new mxRectangle((U.x*T+N.x)*W,((U.y+Y)*I+N.y)*W,T*W,I*W));k=v.concat(k)}return k};mxDragSource.prototype.dragElementZIndex=
-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(k,v){return null==k.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(k){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(k){for(var v=n.apply(this,arguments),I=new mxDictionary,N=[],T=0;T<v.length;T++){var W=
-this.graph.isTableCell(k)&&this.graph.isTableCell(v[T])&&this.graph.isCellSelected(v[T])?this.graph.model.getParent(v[T]):this.graph.isTableRow(k)&&this.graph.isTableRow(v[T])&&this.graph.isCellSelected(v[T])?v[T]:this.graph.getCompositeParent(v[T]);null==W||I.get(W)||(I.put(W,!0),N.push(W))}return N};var x=this.graphHandler.start;this.graphHandler.start=function(k,v,I,N){var T=!1;this.graph.isTableCell(k)&&(this.graph.isCellSelected(k)?T=!0:k=this.graph.model.getParent(k));T||this.graph.isTableRow(k)&&
-this.graph.isCellSelected(k)||(k=this.graph.getCompositeParent(k));x.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(k,v){v=this.graph.getCompositeParent(v);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(k,v,I,N,T,W){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=N&&this.graph.applyNewEdgeStyle(N,[U]);return U};var F=new mxRubberband(this);this.getRubberband=function(){return F};
-var H=(new Date).getTime(),M=0,L=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var k=this.currentState;L.apply(this,arguments);k!=this.currentState?(H=(new Date).getTime(),M=0):M=(new Date).getTime()-H};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(k){return mxEvent.isShiftDown(k.getEvent())&&mxEvent.isAltDown(k.getEvent())?!1:null!=this.currentState&&k.getState()==this.currentState&&2E3<M||(null==this.currentState||
-"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var Z=this.isToggleEvent;this.isToggleEvent=function(k){return Z.apply(this,arguments)||mxEvent.isShiftDown(k)};var ha=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ha=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=
-ha)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(k){return mxEvent.isMouseEvent(k.getEvent())};var ca=this.click;this.click=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(this.getLayerForCell(k.sourceState.cell));if(this.isEnabled()&&!v||k.isConsumed())return ca.apply(this,arguments);var I=v?k.sourceState.cell:k.getCell();if(null!=I){var N=this.getClickableLinkForCell(I);null!=N?this.isCustomLink(N)?this.customLinkClicked(N,I):this.openLink(N):
-v&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};var aa=this.tooltipHandler.show;this.tooltipHandler.show=function(){aa.apply(this,arguments);if(null!=this.div)for(var k=this.div.getElementsByTagName("a"),v=0;v<k.length;v++)null!=k[v].getAttribute("href")&&null==k[v].getAttribute("target")&&k[v].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};this.getCursorForMouseEvent=function(k){var v=null==
-k.state&&null!=k.sourceState&&this.isCellLocked(k.sourceState.cell);return this.getCursorForCell(v?k.sourceState.cell:k.getCell())};var oa=this.getCursorForCell;this.getCursorForCell=function(k){if(!this.isEnabled()||this.isCellLocked(k)){if(null!=this.getClickableLinkForCell(k))return"pointer";if(this.isCellLocked(k))return"default"}return oa.apply(this,arguments)};this.selectRegion=function(k,v){var I=mxEvent.isAltDown(v)?k:null;k=this.getCells(k.x,k.y,k.width,k.height,null,null,I,null,!0);if(this.isToggleEvent(v))for(I=
-0;I<k.length;I++)this.selectCellForEvent(k[I],v);else this.selectCellsForEvent(k,v);return k};var da=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(k,v,I){return this.graph.isCellSelected(k)?!1:da.apply(this,arguments)};var ka=this.updateMouseEvent;this.updateMouseEvent=function(k){k=ka.apply(this,arguments);null!=k.state&&this.isCellLocked(this.getLayerForCell(k.getCell()))&&(null==this.getLinkForCell(k.getCell())?k.state=this.view.getState(this.getCellAt(k.getGraphX(),
-k.getGraphY(),null,null,null,mxUtils.bind(this,function(v,I,N){return k.state==v||this.isCellLocked(this.getLayerForCell(v.cell))&&null==this.getLinkForCell(v.cell)}))):k.state=null);return k};var ba=this.isCellSelectable;this.isCellSelectable=function(k){return ba.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(k))};this.isCellLocked=function(k){for(;null!=k;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(k),"locked","0"))return!0;k=this.model.getParent(k)}return!1};var V=null;
-this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){"mouseDown"==v.getProperty("eventName")&&(k=v.getProperty("event").getState(),V=null==k||this.isSelectionEmpty()||this.isCellSelected(k.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(k,v){if(!mxEvent.isMultiTouchEvent(v)){k=v.getProperty("event");var I=v.getProperty("cell");null==I?(k=mxUtils.convertPoint(this.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),F.start(k.x,
-k.y)):null!=V?this.addSelectionCells(V):1<this.getSelectionCount()&&this.isCellSelected(I)&&this.removeSelectionCell(I);V=null;v.consume()}}));this.connectionHandler.selectCells=function(k,v){this.graph.setSelectionCell(v||k)};this.connectionHandler.constraintHandler.isStateIgnored=function(k,v){var I=k.view.graph;return v&&(I.isCellSelected(k.cell)||I.isTableRow(k.cell)&&I.selectionCellsHandler.isHandled(I.model.getParent(k.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
+this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(k,v){return!1};this.alternateEdgeStyle="vertical";null==t&&this.loadStylesheet();var l=this.graphHandler.getGuideStates;
+this.graphHandler.getGuideStates=function(){var k=l.apply(this,arguments);if(this.graph.pageVisible){var v=[],J=this.graph.pageFormat,N=this.graph.pageScale,T=J.width*N;J=J.height*N;N=this.graph.view.translate;for(var W=this.graph.view.scale,U=this.graph.getPageLayout(),Y=0;Y<U.width;Y++)v.push(new mxRectangle(((U.x+Y)*T+N.x)*W,(U.y*J+N.y)*W,T*W,J*W));for(Y=1;Y<U.height;Y++)v.push(new mxRectangle((U.x*T+N.x)*W,((U.y+Y)*J+N.y)*W,T*W,J*W));k=v.concat(k)}return k};mxDragSource.prototype.dragElementZIndex=
+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(k,v){return null==k.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(k){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(k){for(var v=n.apply(this,arguments),J=new mxDictionary,N=[],T=0;T<v.length;T++){var W=
+this.graph.isTableCell(k)&&this.graph.isTableCell(v[T])&&this.graph.isCellSelected(v[T])?this.graph.model.getParent(v[T]):this.graph.isTableRow(k)&&this.graph.isTableRow(v[T])&&this.graph.isCellSelected(v[T])?v[T]:this.graph.getCompositeParent(v[T]);null==W||J.get(W)||(J.put(W,!0),N.push(W))}return N};var x=this.graphHandler.start;this.graphHandler.start=function(k,v,J,N){var T=!1;this.graph.isTableCell(k)&&(this.graph.isCellSelected(k)?T=!0:k=this.graph.model.getParent(k));T||this.graph.isTableRow(k)&&
+this.graph.isCellSelected(k)||(k=this.graph.getCompositeParent(k));x.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(k,v){v=this.graph.getCompositeParent(v);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(k,v,J,N,T,W){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=N&&this.graph.applyNewEdgeStyle(N,[U]);return U};var F=new mxRubberband(this);this.getRubberband=function(){return F};
+var G=(new Date).getTime(),L=0,M=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var k=this.currentState;M.apply(this,arguments);k!=this.currentState?(G=(new Date).getTime(),L=0):L=(new Date).getTime()-G};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(k){return mxEvent.isShiftDown(k.getEvent())&&mxEvent.isAltDown(k.getEvent())?!1:null!=this.currentState&&k.getState()==this.currentState&&2E3<L||(null==this.currentState||
+"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var Z=this.isToggleEvent;this.isToggleEvent=function(k){return Z.apply(this,arguments)||mxEvent.isShiftDown(k)};var ja=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ja=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=
+ja)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(k){return mxEvent.isMouseEvent(k.getEvent())};var da=this.click;this.click=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(this.getLayerForCell(k.sourceState.cell));if(this.isEnabled()&&!v||k.isConsumed())return da.apply(this,arguments);var J=v?k.sourceState.cell:k.getCell();if(null!=J){var N=this.getClickableLinkForCell(J);null!=N?this.isCustomLink(N)?this.customLinkClicked(N,J):this.openLink(N):
+v&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};var ba=this.tooltipHandler.show;this.tooltipHandler.show=function(){ba.apply(this,arguments);if(null!=this.div)for(var k=this.div.getElementsByTagName("a"),v=0;v<k.length;v++)null!=k[v].getAttribute("href")&&null==k[v].getAttribute("target")&&k[v].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};this.getCursorForMouseEvent=function(k){var v=null==
+k.state&&null!=k.sourceState&&this.isCellLocked(k.sourceState.cell);return this.getCursorForCell(v?k.sourceState.cell:k.getCell())};var na=this.getCursorForCell;this.getCursorForCell=function(k){if(!this.isEnabled()||this.isCellLocked(k)){if(null!=this.getClickableLinkForCell(k))return"pointer";if(this.isCellLocked(k))return"default"}return na.apply(this,arguments)};this.selectRegion=function(k,v){var J=mxEvent.isAltDown(v)?k:null;k=this.getCells(k.x,k.y,k.width,k.height,null,null,J,null,!0);if(this.isToggleEvent(v))for(J=
+0;J<k.length;J++)this.selectCellForEvent(k[J],v);else this.selectCellsForEvent(k,v);return k};var ca=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(k,v,J){return this.graph.isCellSelected(k)?!1:ca.apply(this,arguments)};var ka=this.updateMouseEvent;this.updateMouseEvent=function(k){k=ka.apply(this,arguments);null!=k.state&&this.isCellLocked(this.getLayerForCell(k.getCell()))&&(null==this.getLinkForCell(k.getCell())?k.state=this.view.getState(this.getCellAt(k.getGraphX(),
+k.getGraphY(),null,null,null,mxUtils.bind(this,function(v,J,N){return k.state==v||this.isCellLocked(this.getLayerForCell(v.cell))&&null==this.getLinkForCell(v.cell)}))):k.state=null);return k};var aa=this.isCellSelectable;this.isCellSelectable=function(k){return aa.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(k))};this.isCellLocked=function(k){for(;null!=k;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(k),"locked","0"))return!0;k=this.model.getParent(k)}return!1};var V=null;
+this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){"mouseDown"==v.getProperty("eventName")&&(k=v.getProperty("event").getState(),V=null==k||this.isSelectionEmpty()||this.isCellSelected(k.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(k,v){if(!mxEvent.isMultiTouchEvent(v)){k=v.getProperty("event");var J=v.getProperty("cell");null==J?(k=mxUtils.convertPoint(this.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),F.start(k.x,
+k.y)):null!=V?this.addSelectionCells(V):1<this.getSelectionCount()&&this.isCellSelected(J)&&this.removeSelectionCell(J);V=null;v.consume()}}));this.connectionHandler.selectCells=function(k,v){this.graph.setSelectionCell(v||k)};this.connectionHandler.constraintHandler.isStateIgnored=function(k,v){var J=k.view.graph;return v&&(J.isCellSelected(k.cell)||J.isTableRow(k.cell)&&J.selectionCellsHandler.isHandled(J.model.getParent(k.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
function(){var k=this.connectionHandler.constraintHandler;null!=k.currentFocus&&k.isStateIgnored(k.currentFocus,!0)&&(k.currentFocus=null,k.constraints=null,k.destroyIcons());k.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
Graph.foreignObjectWarningLink="https://www.drawio.com/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than draw.io --\x3e";
@@ -2321,158 +2324,159 @@ Graph.cellStyles=mxUtils.addItems(mxUtils.addItems(mxUtils.addItems("rounded sha
Graph.edgeStyles),Graph.cellStyleGroups);Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");Graph.backupStyleAttribute="data-mx-given-colors";Graph.newColorPlaceholder="rgba(0, 0, 0, 0)";Graph.newBackgroundPlaceholder="rgb(0, 0, 0)";Graph.defaultAdaptiveColors=window.mxIsElectron||"0"==urlParams.contrast?"simple":"auto";
Graph.getDefaultAdaptiveColorsKey=function(){return"auto"==Graph.defaultAdaptiveColors?"automatic":Graph.defaultAdaptiveColors};
Graph.createOffscreenGraph=function(b){var f=new Graph(document.createElement("div"));f.stylesheet.styles=mxUtils.clone(b.styles);f.resetViewOnRootChange=!1;f.setConnectable(!1);f.gridEnabled=!1;f.autoScroll=!1;f.setTooltips(!1);f.setEnabled(!1);f.container.style.visibility="hidden";f.container.style.position="absolute";f.container.style.overflow="hidden";f.container.style.height="1px";f.container.style.width="1px";return f};
-Graph.createSvgImage=function(b,f,l,u,y){l=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+f+'px" '+(null!=u&&null!=y?'viewBox="0 0 '+u+" "+y+'" ':"")+'version="1.1" style="color-scheme: light dark;">'+l+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(l):Base64.encode(l,!0)),b,f)};
+Graph.createSvgImage=function(b,f,m,t,y){m=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+f+'px" '+(null!=t&&null!=y?'viewBox="0 0 '+t+" "+y+'" ':"")+'version="1.1" style="color-scheme: light dark;">'+m+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(m):Base64.encode(m,!0)),b,f)};
Graph.getSvgFromDataUri=function(b){return null!=b&&"data:image/svg"==b.substring(0,14)?Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+decodeURIComponent(escape(atob(b.substring(b.indexOf(",")+1)))):null};
-Graph.createSvgNode=function(b,f,l,u,y){var q=mxUtils.createXmlDocument(),C=null!=q.createElementNS?q.createElementNS(mxConstants.NS_SVG,"svg"):q.createElement("svg");null!=y&&C.setAttribute("style","background: "+y.light+"; background-color: "+y.cssText+";");null==q.createElementNS?(C.setAttribute("xmlns",mxConstants.NS_SVG),C.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):C.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);C.setAttribute("version","1.1");C.setAttribute("width",
-l+"px");C.setAttribute("height",u+"px");C.setAttribute("viewBox",b+" "+f+" "+l+" "+u);q.appendChild(C);return C};
-Graph.htmlToPng=function(b,f,l,u,y,q){y=null!=y?y:"";q=null!=q?q:Editor.htmlRasterScale;var C=document.createElement("canvas");C.width=f*q;C.height=l*q;var J=document.createElement("img");J.onload=mxUtils.bind(this,function(){try{var D=C.getContext("2d");D.scale(q,q);D.drawImage(J,0,0);u(C.toDataURL())}catch(P){u(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);J.onerror=
-function(D){u(null)};J.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+f+'" height="'+l+'">'+(""!=y?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+y+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};
-Graph.addLightDarkColors=function(b,f,l,u){function y(g,m,n){return null!=u?u(g,m,n):mxUtils.isValidColor(n)?(null==C&&null!=f&&(C={}),null!=C&&(C[m]=g.style.getPropertyValue(m)),n=mxUtils.getLightDarkColor(n,null,null,l),g.style.setProperty(m,n.cssText),!0):!1}for(var q=b.getElementsByTagName("*"),C=null,J=!1,S=0;S<q.length;S++)if(q[S]!=b&&null!=q[S].style){C=null;for(var D=0;D<q[S].style.length;D++){var P=q[S].style.item(D),c=q[S].style.getPropertyValue(P);J=y(q[S],P,c)||J}"FONT"==q[S].nodeName&&
-""==q[S].style.getPropertyValue("color")&&(c=q[S].getAttribute("color"),J=y(q[S],"color",c)||J);null!=f&&null!=C&&q[S].setAttribute(f,JSON.stringify(C))}return J};Graph.removeLightDarkColors=function(b,f){b=b.getElementsByTagName("*");for(var l=!1,u=0;u<b.length;u++)try{var y=b[u].getAttribute(f);if(null!=y){b[u].removeAttribute(f);var q=JSON.parse(y),C;for(C in q){var J=q[C];""==J?(b[u].style[C]=null,""==b[u].getAttribute("style")&&b[u].removeAttribute("style")):b[u].style[C]=J;l=!0}}}catch(S){}return l};
-Graph.getGivenColor=function(b,f){var l=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var u=b.getAttribute(Graph.backupStyleAttribute);if(null!=u){var y=JSON.parse(u);null!=y&&null!=y[f]&&("color"==f&&"FONT"==b.nodeName&&""==y[f]&&null!=b.getAttribute("color")?l=b.getAttribute("color"):""!=y[f]&&(l=y[f]))}}catch(q){}null==l&&""!=b.style[f]&&(l=b.style[f])}return l};
-Graph.setTextColor=function(b,f,l){for(var u=l?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,y=l?"color":"background-color",q=b.getElementsByTagName("*"),C=[],J=0;J<q.length;J++)C.push({node:q[J],value:q[J].style[y]});document.execCommand(l?"forecolor":"backcolor",!1,u);b=b.getElementsByTagName("*");for(J=0;J<b.length;J++){if(J<C.length&&C[J].node==b[J]&&C[J].value!=b[J].style[y]&&""==b[J].style[y])try{if(q=b[J].getAttribute(Graph.backupStyleAttribute),null!=q){var S=JSON.parse(q);S[y]=
-"";b[J].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(D){}if(l&&b[J].getAttribute("color")==u||b[J].style[y]==u){l&&b[J].getAttribute("color")==u&&b[J].removeAttribute("color");b[J].style[y]=f!=mxConstants.NONE?mxUtils.getLightDarkColor(f).cssText:null;try{q=b[J].getAttribute(Graph.backupStyleAttribute),S=null!=q?JSON.parse(q):{},S[y]=f!=mxConstants.NONE?f:"",b[J].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(D){}if(l&&mxClient.IS_FF){f=b[J];l=f.firstChild;if(null!=
-l&&"A"==l.nodeName&&null==l.nextSibling&&null!=l.firstChild){f.parentNode.insertBefore(l,f);for(u=l.firstChild;null!=u;)y=u.nextSibling,f.appendChild(u),u=y;l.appendChild(f)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var f=Array(b.length),l=0;l<b.length;l++)f[l]=b.charCodeAt(l);return f};Graph.bytesToString=function(b){for(var f=Array(b.length),l=0;l<b.length;l++)f[l]=String.fromCharCode(b[l]);return f.join("")};
-Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(f,l){return String.fromCharCode(parseInt(l,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(f){return"%"+("00"+f.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,f){b=mxUtils.getXml(b);return Graph.compress(f?b:Graph.zapGremlins(b))};
-Graph.arrayBufferToString=function(b){var f="";b=new Uint8Array(b);for(var l=b.byteLength,u=0;u<l;u++)f+=String.fromCharCode(b[u]);return f};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(f){return f.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(b,f,l){var u=f.charCodeAt(0),y=1,q=-1;for(l=l||0;l<b.byteLength;l++)if(b[l]==u){q=l;break}for(l=q+1;-1<q&&l<b.byteLength&&l<q+f.length-1;l++){if(b[l]!=f.charCodeAt(y))return Graph.arrayBufferIndexOfString(b,f,q+1);y++}return y==f.length-1?q:-1};Graph.compress=function(b,f){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=f?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
-Graph.decompress=function(b,f,l){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));f=decodeURIComponent(f?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return l?f:Graph.zapGremlins(f)};
-Graph.fadeNodes=function(b,f,l,u,y){y=null!=y?y:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,f);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+y+"ms ease-in-out");Graph.setOpacityForNodes(b,l);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=u&&u()},y)},0)};
-Graph.exploreFromCell=function(b,f,l){pageSize=null!=l&&null!=l.pageSize?l.pageSize:8;minSize=null!=l&&null!=l.minSize?l.minSize:180;(function(u,y){function q(c){c.view.states.visit(function(g,m){null!=m.shape&&c.model.isEdge(c.model.getParent(m.cell))?m.shape.node.parentNode.appendChild(m.shape.node):null!=m.text&&c.model.isEdge(m.cell)&&m.text.node.parentNode.appendChild(m.text.node)})}function C(c,g){if(c.getModel().isVertex(g)){var m=c.container.offsetWidth/2,n=c.container.offsetHeight/2;c.rootCell=
-g.referenceCell||g;c.getModel().beginUpdate();try{pageSize=null!=l&&null!=l.pageSize?l.pageSize:8+Math.max(0,Math.floor(Math.min(c.container.offsetWidth-800/120,c.container.offsetHeight-600)/30));for(var x=g.referenceCell||g,F=u.model.getCell(x.sourceCellId),H=u.getEdges(F,null,!0,!0,!1,!0),M=[],L=0;L<H.length;L++)null!=H[L].getTerminal(!0)&&null!=H[L].getTerminal(!1)&&u.isCellVisible(H[L])&&!u.isEdgeIgnored(H[L])&&u.isCellVisible(H[L].getTerminal(!0))&&u.isCellVisible(H[L].getTerminal(!1))&&u.isCellVisible(u.getLayerForCell(H[L]))&&
-M.push(H[L]);M=H=M;if(null!=g.startIndex||0<pageSize&&H.length>pageSize){var K=g.startIndex||0;M=H.slice(Math.max(0,K),Math.min(H.length,K+pageSize))}M=u.getOpposites(M,F).concat(M);var Z=c.cloneCells(M);for(L=0;L<M.length;L++)if(Z[L].sourceCellId=M[L].id,c.model.isEdge(Z[L]))for(Z[L].geometry.x=0,Z[L].geometry.y=0,Z[L].geometry.points=null,Z[L].setStyle(Z[L].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),Z[L].setTerminal(x,
-null==Z[L].getTerminal(!0)),F=0;F<Z[L].getChildCount();F++){var ha=Z[L].getChildAt(F);null!=ha.geometry&&ha.geometry.relative&&(ha.setStyle(ha.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),ha.geometry.offset=new mxPoint(0,0),ha.geometry.y=0,ha.geometry.x=.5>ha.geometry.x?-.8:.5<ha.geometry.x?.8:0)}if(0<g.startIndex){var ca=c.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((g.startIndex||0)/pageSize)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
-ca.referenceCell=x;ca.startIndex=Math.max(0,(g.startIndex||0)-pageSize);Z.splice(0,0,ca)}if(H.length>(g.startIndex||0)+pageSize){var aa=c.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((g.startIndex||0)/pageSize)+2)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");aa.referenceCell=x;aa.startIndex=(g.startIndex||0)+pageSize;Z.splice(0,0,aa)}for(var oa in c.getModel().cells){var da=c.getModel().getCell(oa);da!=c.rootCell&&
-!c.getModel().isAncestor(c.rootCell,da)&&c.getModel().isVertex(da)&&c.removeCells([da])}c.addCells(Z);var ka=c.getModel().getGeometry(c.rootCell);null!=ka&&(ka=ka.clone(),ka.x=m-ka.width/2,ka.y=n-ka.height/3,c.getModel().setGeometry(c.rootCell,ka));g=[];for(oa in c.getModel().cells)da=c.getModel().getCell(oa),da!=c.rootCell&&c.getModel().isVertex(da)&&c.getModel().getParent(da)==c.getDefaultParent()&&(g.push(da),ka=c.getModel().getGeometry(da),null!=ka&&(ka.x=m-ka.width/2,ka.y=n-ka.height/2));var ba=
-g.length,V=2*Math.PI/ba,k=Math.max(minSize,Math.min(c.container.offsetWidth/2-40,c.container.offsetHeight/2-80));for(m=0;m<ba;m++)ka=c.getModel().getGeometry(g[m]),null!=ka&&(ka=ka.clone(),ka.x+=k*Math.sin(m*V),ka.y+=k*Math.cos(m*V),c.getModel().setGeometry(g[m],ka))}finally{c.getModel().endUpdate()}}}var J=document.createElement("div");J.style.position="absolute";J.style.display="block";J.style.overflow="auto";J.style.width="100%";J.style.height="100%";J.style.left="0px";J.style.top="0px";J.style.zIndex=
-2;J.style.background=u.background==mxConstants.NONE||null==u.background?"light-dark(#ffffff,"+Editor.darkColor+")":u.background;var S=document.createElement("img");S.setAttribute("src",Editor.closeBlackImage);S.style.position="absolute";S.style.cursor="pointer";S.style.right="10px";S.style.top="10px";J.appendChild(S);var D=document.createElement("div");D.style.position="absolute";D.style.cursor="pointer";D.style.right="38px";D.style.top="14px";D.style.textAlign="right";D.style.verticalAlign="top";
-mxUtils.write(D,mxResources.get("close"));J.appendChild(D);document.body.appendChild(J);var P=function(c){27==c.keyCode&&S.click()};mxEvent.addListener(document,"keydown",P);(function(c){var g=new Graph(c);g.keepEdgesInBackground=!0;g.isCellResizable=function(){return!1};g.isCellRotatable=function(){return!1};g.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};g.getFoldingImage=function(){return null};var m=function(){mxEvent.removeListener(document,"keydown",P);c.parentNode.removeChild(c);
-u.scrollCellToVisible(y)};mxEvent.addListener(S,"click",m);mxEvent.addListener(D,"click",m);g.setEnabled(!1);var n=g.click;g.click=function(M){var L=M.getCell(),K=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&0<g.getEdges(K).length?C(g,L):n.apply(this,arguments)};m=g.container.offsetWidth/2;var x=g.container.offsetHeight/3;g.model.beginUpdate();var F=g.importCells([y])[0];F.sourceCellId=y.id;F.geometry.x=m-F.geometry.width/2;F.geometry.y=x-F.geometry.height/2;g.model.endUpdate();var H=
-!1;g.getModel().addListener(mxEvent.CHANGE,function(M,L){H||(M=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,g.labelsVisible=!1,H=!0,mxEffects.animateChanges(g,M,function(){var K=new mxParallelEdgeLayout(g);K.spacing=60;var Z=K.layout;K.layout=function(ha){K.spacing=Math.min(60,Math.max(30,60-5*ha.length));Z.apply(this,arguments)};K.execute(g.getDefaultParent());mxText.prototype.enableBoundingBox=!0;g.labelsVisible=!0;g.tooltipHandler.hide();g.refresh();q(g);H=!1}))});C(g,F)})(J)})(b,
-f)};Graph.removeKeys=function(b,f){for(var l in b)f(l)&&delete b[l]};Graph.setTransitionForNodes=function(b,f){for(var l=0;l<b.length;l++)mxUtils.setPrefixedStyle(b[l].style,"transition",f)};Graph.setOpacityForNodes=function(b,f){for(var l=0;l<b.length;l++)b[l].style.opacity=f};
-Graph.removePasteFormatting=function(b,f){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var l=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var u=Graph.createTabNode(4);b.parentNode.replaceChild(u,b);b=u}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=l&&"P"==l.nodeName&&"p1"==
-l.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!f&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(u=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,u.outerHTML))}b=l}};Graph.createTabNode=function(b){var f="\t";if(null!=b)for(f="";0<b;)f+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(f));return b};Graph.sanitizeHtml=function(b,f){return Graph.domPurify(b,!1)};
+Graph.createSvgNode=function(b,f,m,t,y){var q=mxUtils.createXmlDocument(),B=null!=q.createElementNS?q.createElementNS(mxConstants.NS_SVG,"svg"):q.createElement("svg");null!=y&&B.setAttribute("style","background: "+y.light+"; background-color: "+y.cssText+";");null==q.createElementNS?(B.setAttribute("xmlns",mxConstants.NS_SVG),B.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):B.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);B.setAttribute("version","1.1");B.setAttribute("width",
+m+"px");B.setAttribute("height",t+"px");B.setAttribute("viewBox",b+" "+f+" "+m+" "+t);q.appendChild(B);return B};
+Graph.htmlToPng=function(b,f,m,t,y,q){y=null!=y?y:"";q=null!=q?q:Editor.htmlRasterScale;var B=document.createElement("canvas");B.width=f*q;B.height=m*q;var I=document.createElement("img");I.onload=mxUtils.bind(this,function(){try{var D=B.getContext("2d");D.scale(q,q);D.drawImage(I,0,0);t(B.toDataURL())}catch(P){t(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);I.onerror=
+function(D){t(null)};I.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+f+'" height="'+m+'">'+(""!=y?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+y+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};
+Graph.addLightDarkColors=function(b,f,m,t){function y(g,l,n){return null!=t?t(g,l,n):mxUtils.isValidColor(n)?(null==B&&null!=f&&(B={}),null!=B&&(B[l]=g.style.getPropertyValue(l)),n=mxUtils.getLightDarkColor(n,null,null,m),g.style.setProperty(l,n.cssText),!0):!1}for(var q=b.getElementsByTagName("*"),B=null,I=!1,S=0;S<q.length;S++)if(q[S]!=b&&null!=q[S].style){B=null;for(var D=0;D<q[S].style.length;D++){var P=q[S].style.item(D),c=q[S].style.getPropertyValue(P);I=y(q[S],P,c)||I}"FONT"==q[S].nodeName&&
+""==q[S].style.getPropertyValue("color")&&(c=q[S].getAttribute("color"),I=y(q[S],"color",c)||I);null!=f&&null!=B&&q[S].setAttribute(f,JSON.stringify(B))}return I};Graph.removeLightDarkColors=function(b,f){b=b.getElementsByTagName("*");for(var m=!1,t=0;t<b.length;t++)try{var y=b[t].getAttribute(f);if(null!=y){b[t].removeAttribute(f);var q=JSON.parse(y),B;for(B in q){var I=q[B];""==I?(b[t].style[B]=null,""==b[t].getAttribute("style")&&b[t].removeAttribute("style")):b[t].style[B]=I;m=!0}}}catch(S){}return m};
+Graph.getGivenColor=function(b,f){var m=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var t=b.getAttribute(Graph.backupStyleAttribute);if(null!=t){var y=JSON.parse(t);null!=y&&null!=y[f]&&("color"==f&&"FONT"==b.nodeName&&""==y[f]&&null!=b.getAttribute("color")?m=b.getAttribute("color"):""!=y[f]&&(m=y[f]))}}catch(q){}null==m&&""!=b.style[f]&&(m=b.style[f])}return m};
+Graph.setTextColor=function(b,f,m){for(var t=m?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,y=m?"color":"background-color",q=b.getElementsByTagName("*"),B=[],I=0;I<q.length;I++)B.push({node:q[I],value:q[I].style[y]});document.execCommand(m?"forecolor":"backcolor",!1,t);b=b.getElementsByTagName("*");for(I=0;I<b.length;I++){if(I<B.length&&B[I].node==b[I]&&B[I].value!=b[I].style[y]&&""==b[I].style[y])try{if(q=b[I].getAttribute(Graph.backupStyleAttribute),null!=q){var S=JSON.parse(q);S[y]=
+"";b[I].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(D){}if(m&&b[I].getAttribute("color")==t||b[I].style[y]==t){m&&b[I].getAttribute("color")==t&&b[I].removeAttribute("color");b[I].style[y]=f!=mxConstants.NONE?mxUtils.getLightDarkColor(f).cssText:null;try{q=b[I].getAttribute(Graph.backupStyleAttribute),S=null!=q?JSON.parse(q):{},S[y]=f!=mxConstants.NONE?f:"",b[I].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(D){}if(m&&mxClient.IS_FF){f=b[I];m=f.firstChild;if(null!=
+m&&"A"==m.nodeName&&null==m.nextSibling&&null!=m.firstChild){f.parentNode.insertBefore(m,f);for(t=m.firstChild;null!=t;)y=t.nextSibling,f.appendChild(t),t=y;m.appendChild(f)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var f=Array(b.length),m=0;m<b.length;m++)f[m]=b.charCodeAt(m);return f};Graph.bytesToString=function(b){for(var f=Array(b.length),m=0;m<b.length;m++)f[m]=String.fromCharCode(b[m]);return f.join("")};
+Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(f,m){return String.fromCharCode(parseInt(m,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(f){return"%"+("00"+f.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,f){b=mxUtils.getXml(b);return Graph.compress(f?b:Graph.zapGremlins(b))};
+Graph.arrayBufferToString=function(b){var f="";b=new Uint8Array(b);for(var m=b.byteLength,t=0;t<m;t++)f+=String.fromCharCode(b[t]);return f};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(f){return f.charCodeAt(0)})};
+Graph.arrayBufferIndexOfString=function(b,f,m){var t=f.charCodeAt(0),y=1,q=-1;for(m=m||0;m<b.byteLength;m++)if(b[m]==t){q=m;break}for(m=q+1;-1<q&&m<b.byteLength&&m<q+f.length-1;m++){if(b[m]!=f.charCodeAt(y))return Graph.arrayBufferIndexOfString(b,f,q+1);y++}return y==f.length-1?q:-1};Graph.compress=function(b,f){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=f?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
+Graph.decompress=function(b,f,m){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));f=decodeURIComponent(f?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return m?f:Graph.zapGremlins(f)};
+Graph.fadeNodes=function(b,f,m,t,y){y=null!=y?y:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,f);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+y+"ms ease-in-out");Graph.setOpacityForNodes(b,m);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=t&&t()},y)},0)};
+Graph.exploreFromCell=function(b,f,m){pageSize=null!=m&&null!=m.pageSize?m.pageSize:8;minSize=null!=m&&null!=m.minSize?m.minSize:180;(function(t,y){function q(c){c.view.states.visit(function(g,l){null!=l.shape&&c.model.isEdge(c.model.getParent(l.cell))?l.shape.node.parentNode.appendChild(l.shape.node):null!=l.text&&c.model.isEdge(l.cell)&&l.text.node.parentNode.appendChild(l.text.node)})}function B(c,g){if(c.getModel().isVertex(g)){var l=c.container.offsetWidth/2,n=c.container.offsetHeight/2;c.rootCell=
+g.referenceCell||g;c.getModel().beginUpdate();try{pageSize=null!=m&&null!=m.pageSize?m.pageSize:8+Math.max(0,Math.floor(Math.min(c.container.offsetWidth-800/120,c.container.offsetHeight-600)/30));for(var x=g.referenceCell||g,F=t.model.getCell(x.sourceCellId),G=t.getEdges(F,null,!0,!0,!1,!0),L=[],M=0;M<G.length;M++)null!=G[M].getTerminal(!0)&&null!=G[M].getTerminal(!1)&&t.isCellVisible(G[M])&&!t.isEdgeIgnored(G[M])&&t.isCellVisible(G[M].getTerminal(!0))&&t.isCellVisible(G[M].getTerminal(!1))&&t.isCellVisible(t.getLayerForCell(G[M]))&&
+L.push(G[M]);L=G=L;if(null!=g.startIndex||0<pageSize&&G.length>pageSize){var K=g.startIndex||0;L=G.slice(Math.max(0,K),Math.min(G.length,K+pageSize))}L=t.getOpposites(L,F).concat(L);var Z=c.cloneCells(L);for(M=0;M<L.length;M++)if(Z[M].sourceCellId=L[M].id,c.model.isEdge(Z[M]))for(Z[M].geometry.x=0,Z[M].geometry.y=0,Z[M].geometry.points=null,Z[M].setStyle(Z[M].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),Z[M].setTerminal(x,
+null==Z[M].getTerminal(!0)),F=0;F<Z[M].getChildCount();F++){var ja=Z[M].getChildAt(F);null!=ja.geometry&&ja.geometry.relative&&(ja.setStyle(ja.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),ja.geometry.offset=new mxPoint(0,0),ja.geometry.y=0,ja.geometry.x=.5>ja.geometry.x?-.8:.5<ja.geometry.x?.8:0)}if(0<g.startIndex){var da=c.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((g.startIndex||0)/pageSize)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
+da.referenceCell=x;da.startIndex=Math.max(0,(g.startIndex||0)-pageSize);Z.splice(0,0,da)}if(G.length>(g.startIndex||0)+pageSize){var ba=c.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((g.startIndex||0)/pageSize)+2)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ba.referenceCell=x;ba.startIndex=(g.startIndex||0)+pageSize;Z.splice(0,0,ba)}for(var na in c.getModel().cells){var ca=c.getModel().getCell(na);ca!=c.rootCell&&
+!c.getModel().isAncestor(c.rootCell,ca)&&c.getModel().isVertex(ca)&&c.removeCells([ca])}c.addCells(Z);var ka=c.getModel().getGeometry(c.rootCell);null!=ka&&(ka=ka.clone(),ka.x=l-ka.width/2,ka.y=n-ka.height/3,c.getModel().setGeometry(c.rootCell,ka));g=[];for(na in c.getModel().cells)ca=c.getModel().getCell(na),ca!=c.rootCell&&c.getModel().isVertex(ca)&&c.getModel().getParent(ca)==c.getDefaultParent()&&(g.push(ca),ka=c.getModel().getGeometry(ca),null!=ka&&(ka.x=l-ka.width/2,ka.y=n-ka.height/2));var aa=
+g.length,V=2*Math.PI/aa,k=Math.max(minSize,Math.min(c.container.offsetWidth/2-40,c.container.offsetHeight/2-80));for(l=0;l<aa;l++)ka=c.getModel().getGeometry(g[l]),null!=ka&&(ka=ka.clone(),ka.x+=k*Math.sin(l*V),ka.y+=k*Math.cos(l*V),c.getModel().setGeometry(g[l],ka))}finally{c.getModel().endUpdate()}}}var I=document.createElement("div");I.style.position="absolute";I.style.display="block";I.style.overflow="auto";I.style.width="100%";I.style.height="100%";I.style.left="0px";I.style.top="0px";I.style.zIndex=
+2;I.style.background=t.background==mxConstants.NONE||null==t.background?"light-dark(#ffffff,"+Editor.darkColor+")":t.background;var S=document.createElement("img");S.setAttribute("src",Editor.closeBlackImage);S.style.position="absolute";S.style.cursor="pointer";S.style.right="10px";S.style.top="10px";I.appendChild(S);var D=document.createElement("div");D.style.position="absolute";D.style.cursor="pointer";D.style.right="38px";D.style.top="14px";D.style.textAlign="right";D.style.verticalAlign="top";
+mxUtils.write(D,mxResources.get("close"));I.appendChild(D);document.body.appendChild(I);var P=function(c){27==c.keyCode&&S.click()};mxEvent.addListener(document,"keydown",P);(function(c){var g=new Graph(c);g.keepEdgesInBackground=!0;g.isCellResizable=function(){return!1};g.isCellRotatable=function(){return!1};g.getCursorForCell=function(L){return this.model.isVertex(L)?"pointer":null};g.getFoldingImage=function(){return null};var l=function(){mxEvent.removeListener(document,"keydown",P);c.parentNode.removeChild(c);
+t.scrollCellToVisible(y)};mxEvent.addListener(S,"click",l);mxEvent.addListener(D,"click",l);g.setEnabled(!1);var n=g.click;g.click=function(L){var M=L.getCell(),K=null!=M?null!=M.referenceCell?M.referenceCell:M:null;null!=M&&0<g.getEdges(K).length?B(g,M):n.apply(this,arguments)};l=g.container.offsetWidth/2;var x=g.container.offsetHeight/3;g.model.beginUpdate();var F=g.importCells([y])[0];F.sourceCellId=y.id;F.geometry.x=l-F.geometry.width/2;F.geometry.y=x-F.geometry.height/2;g.model.endUpdate();var G=
+!1;g.getModel().addListener(mxEvent.CHANGE,function(L,M){G||(L=M.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,g.labelsVisible=!1,G=!0,mxEffects.animateChanges(g,L,function(){var K=new mxParallelEdgeLayout(g);K.spacing=60;var Z=K.layout;K.layout=function(ja){K.spacing=Math.min(60,Math.max(30,60-5*ja.length));Z.apply(this,arguments)};K.execute(g.getDefaultParent());mxText.prototype.enableBoundingBox=!0;g.labelsVisible=!0;g.tooltipHandler.hide();g.refresh();q(g);G=!1}))});B(g,F)})(I)})(b,
+f)};Graph.removeKeys=function(b,f){for(var m in b)f(m)&&delete b[m]};Graph.setTransitionForNodes=function(b,f){for(var m=0;m<b.length;m++)mxUtils.setPrefixedStyle(b[m].style,"transition",f)};Graph.setOpacityForNodes=function(b,f){for(var m=0;m<b.length;m++)b[m].style.opacity=f};
+Graph.removePasteFormatting=function(b,f){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var m=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var t=Graph.createTabNode(4);b.parentNode.replaceChild(t,b);b=t}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=m&&"P"==m.nodeName&&"p1"==
+m.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!f&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(t=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,t.outerHTML))}b=m}};Graph.createTabNode=function(b){var f="\t";if(null!=b)for(f="";0<b;)f+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(f));return b};Graph.sanitizeHtml=function(b,f){return Graph.domPurify(b,!1)};
Graph.sanitizeLink=function(b){if(null==b)return null;var f=document.createElement("a");f.setAttribute("href",b);Graph.sanitizeNode(f);return f.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});
Graph.domPurify=function(b,f){window.DOM_PURIFY_CONFIG.IN_PLACE=f;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
-Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),u=l.indexOf("<svg");if(0<=u){f.innerHTML=Graph.sanitizeHtml(l.substring(u));var y=f.getElementsByTagName("svg");if(0<y.length){document.body.appendChild(f);try{u=l=1;var q=y[0].getAttribute("width"),C=y[0].getAttribute("height");q=null!=q&&"%"!=q.charAt(q.length-
-1)?parseFloat(q):NaN;C=null!=C&&"%"!=C.charAt(C.length-1)?parseFloat(C):NaN;var J=y[0].getAttribute("viewBox");if(null!=J&&!isNaN(q)&&!isNaN(C)){var S=J.split(" ");4<=J.length&&(l=parseFloat(S[2])/q,u=parseFloat(S[3])/C,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var D=y[0].getBBox();if(0<D.width&&0<D.height){q=0;var P=y[0].querySelectorAll("[stroke-width]");for(C=0;C<P.length;C++)q=Math.max(q,parseFloat(P[C].getAttribute("stroke-width")));D=new mxRectangle(D.x,
-D.y,D.width,D.height);D.grow(q/2);f.getElementsByTagName("svg")[0].setAttribute("viewBox",D.x+" "+D.y+" "+D.width+" "+D.height);f.getElementsByTagName("svg")[0].setAttribute("width",D.width/l);f.getElementsByTagName("svg")[0].setAttribute("height",D.height/u)}}catch(c){}finally{document.body.removeChild(f)}b=Editor.createSvgDataUri(mxUtils.getXml(y[0]))}}}catch(c){}return b};
-Graph.createRemoveIcon=function(b,f){var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.clearImage);l.setAttribute("title",b);l.setAttribute("width","13");l.setAttribute("height","10");l.style.marginLeft="4px";l.style.marginBottom="-1px";l.style.cursor="pointer";mxEvent.addListener(l,"click",f);return l};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};
-Graph.rewritePageLinks=function(b,f){function l(y,q){var C=y.getAttribute(q);if(null!=C){Graph.isPageLink(C)&&(C="#"+C.substring(C.indexOf(":")+1));var J=q;f&&"xlink:href"==q&&(y.removeAttribute(q),J="href");y.setAttribute(J,C)}}b=b.getElementsByTagName("a");if(null!=b)for(var u=0;u<b.length;u++)l(b[u],"href"),l(b[u],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};
+Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),t=m.indexOf("<svg");if(0<=t){f.innerHTML=Graph.sanitizeHtml(m.substring(t));var y=f.getElementsByTagName("svg");if(0<y.length){document.body.appendChild(f);try{t=m=1;var q=y[0].getAttribute("width"),B=y[0].getAttribute("height");q=null!=q&&"%"!=q.charAt(q.length-
+1)?parseFloat(q):NaN;B=null!=B&&"%"!=B.charAt(B.length-1)?parseFloat(B):NaN;var I=y[0].getAttribute("viewBox");if(null!=I&&!isNaN(q)&&!isNaN(B)){var S=I.split(" ");4<=I.length&&(m=parseFloat(S[2])/q,t=parseFloat(S[3])/B,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var D=y[0].getBBox();if(0<D.width&&0<D.height){q=0;var P=y[0].querySelectorAll("[stroke-width]");for(B=0;B<P.length;B++)q=Math.max(q,parseFloat(P[B].getAttribute("stroke-width")));D=new mxRectangle(D.x,
+D.y,D.width,D.height);D.grow(q/2);f.getElementsByTagName("svg")[0].setAttribute("viewBox",D.x+" "+D.y+" "+D.width+" "+D.height);f.getElementsByTagName("svg")[0].setAttribute("width",D.width/m);f.getElementsByTagName("svg")[0].setAttribute("height",D.height/t)}}catch(c){}finally{document.body.removeChild(f)}b=Editor.createSvgDataUri(mxUtils.getXml(y[0]))}}}catch(c){}return b};
+Graph.createRemoveIcon=function(b,f){var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.clearImage);m.setAttribute("title",b);m.setAttribute("width","13");m.setAttribute("height","10");m.style.marginLeft="4px";m.style.marginBottom="-1px";m.style.cursor="pointer";mxEvent.addListener(m,"click",f);return m};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};
+Graph.rewritePageLinks=function(b,f){function m(y,q){var B=y.getAttribute(q);if(null!=B){Graph.isPageLink(B)&&(B="#"+B.substring(B.indexOf(":")+1));var I=q;f&&"xlink:href"==q&&(y.removeAttribute(q),I="href");y.setAttribute(I,B)}}b=b.getElementsByTagName("a");if(null!=b)for(var t=0;t<b.length;t++)m(b[t],"href"),m(b[t],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;
Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBackground=!1;Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, #000000)";Graph.prototype.shapeForegroundColor="light-dark(#000000, #ffffff)";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";
-Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
+Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%{}\"'=;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(l,u){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=l.view.graph.tolerance,q=!0,C=null,J=mxUtils.bind(this,function(P){q=!0;C=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),S=mxUtils.bind(this,function(P){q=q&&null!=C&&Math.abs(C.x-mxEvent.getClientX(P))<y&&Math.abs(C.y-mxEvent.getClientY(P))<y}),D=mxUtils.bind(this,function(P){if(q)for(var c=mxEvent.getSource(P);null!=
-c&&c!=u.node;){if("a"==c.nodeName.toLowerCase()){l.view.graph.labelLinkClicked(l,c,P);break}c=c.parentNode}});mxEvent.addGestureListeners(u.node,J,S,D);mxEvent.addListener(u.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var f=this.tooltipHandler.init;this.tooltipHandler.init=function(){f.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(l){var u=mxEvent.getSource(l);"A"==u.nodeName&&(u=u.getAttribute("href"),null!=
-u&&this.graph.isCustomLink(u)&&(mxEvent.isTouchEvent(l)||!mxEvent.isPopupTrigger(l))&&this.graph.customLinkClicked(u)&&mxEvent.consume(l))}))}}this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(C){var J=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return!this.isSpecialColor(C.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(C.style,"lineShape",null)&&(this.model.isVertex(C.cell)||"arrow"==J||"pipe"==J||"wire"==J||"filledEdge"==J||"flexArrow"==J||"mxgraph.arrows2.wedgeArrow"==
-J)};Graph.prototype.isGradientState=function(C){var J=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return this.isFillState(C)&&"wire"!=J&&"pipe"!=J};Graph.prototype.isStrokeState=function(C){return!0};Graph.prototype.getTextColor=function(C,J){for(var S=J?"color":"background-color",D=C==this.cellEditor.textarea&&J?"default":Graph.getGivenColor(C,S);null==D&&null!=C&&C!=this.cellEditor.textarea.parentNode;)D=C==this.cellEditor.textarea&&J?"default":Graph.getGivenColor(C,S),C=C.parentNode;
-if("rgba(0, 0, 0, 0)"==D||"transparent"==D)D=mxConstants.NONE;return D};Graph.prototype.isSpecialColor=function(C){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],C)};Graph.prototype.isGlassState=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return"label"==C||"rectangle"==C||"internalStorage"==C||"ext"==C||"umlLifeline"==C||"swimlane"==C||"process"==C};Graph.prototype.isRoundedState=function(C){return null!=
-C.shape?C.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(C){var J=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(C.style,mxConstants.STYLE_CURVED,!1)&&("connector"==J||"filledEdge"==J||"wire"==J)};Graph.prototype.isAutoSizeState=function(C){return"1"==mxUtils.getValue(C.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(C){return null!=
-mxUtils.getValue(C.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(C){return!0};Graph.prototype.getVerticesAndEdges=function(C,J){C=null!=C?C:!0;J=null!=J?J:!0;var S=this.model;return S.filterDescendants(function(D){return C&&S.isVertex(D)||J&&S.isEdge(D)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(C,J,S){C=this.getCellStyle(C).newEdgeStyle;if(null!=C){this.model.beginUpdate();try{var D=JSON.parse(C),P;for(P in D)this.setCellStyles(P,D[P],J),"edgeStyle"==
-P&&"elbowEdgeStyle"==D[P]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",J)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(C){for(var J={},S=0;S<C.length;S++){var D=this.view.getState(C[S]);null!=D&&this.mergeStyle(D.style,J,0==S)}return J};Graph.prototype.mergeStyle=function(C,J,S){if(null!=C){var D={},P;for(P in C){var c=C[P];null!=c&&(D[P]=!0,null==J[P]&&S?J[P]=c:J[P]!=c&&delete J[P])}for(P in J)D[P]||
-delete J[P]}};Graph.prototype.getStartEditingCell=function(C,J){J=this.getCellStyle(C);J=parseInt(mxUtils.getValue(J,mxConstants.STYLE_STARTSIZE,0));this.isTable(C)&&(!this.isSwimlane(C)||0==J)&&""==this.getLabel(C)&&0<this.model.getChildCount(C)&&(C=this.model.getChildAt(C,0),J=this.getCellStyle(C),J=parseInt(mxUtils.getValue(J,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(C)&&(!this.isSwimlane(C)||0==J)&&""==this.getLabel(C)&&0<this.model.getChildCount(C))for(J=0;J<this.model.getChildCount(C);J++){var S=
-this.model.getChildAt(C,J);if(this.isCellEditable(S)){C=S;break}}return C};Graph.prototype.copyStyle=function(C){return this.getCellStyle(C,!1)};Graph.prototype.pasteStyle=function(C,J,S,D){null!=C&&(D||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(C,function(P){return 0>mxUtils.indexOf(S,P)})),this.updateCellStyles(C,J))};Graph.prototype.copyCellStyles=function(C,J,S,D,P,c,g){var m=!1,n=!1;if(0<C.length)for(var x=0;x<C.length&&(m=this.getModel().isVertex(C[x])||m,!(n=this.getModel().isEdge(C[x])||
-n)||!m);x++);else n=m=!0;m=m&&!c;n=n&&!g;for(x=0;x<J.length;x++)if(C=0<=mxUtils.indexOf(Graph.textStyles,J[x]),"strokeColor"!=J[x]||null!=S[x]&&"none"!=S[x])if(0<=mxUtils.indexOf(Graph.cellStyles,J[x])||"shape"==J[x])if("shape"!=J[x]&&(m||C)&&(null==S[x]?delete D[J[x]]:D[J[x]]=S[x]),n||C)null==S[x]?delete P[J[x]]:P[J[x]]=S[x]};Graph.prototype.includeDescendants=function(C){for(var J=[],S=0;S<C.length;S++)J=J.concat(this.model.getDescendants(C[S]));return J};Graph.prototype.pasteCellStyles=function(C,
-J,S,D,P){J=null!=J?J:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<C.length;c++){var g=C[c],m=this.model.getStyle(g),n=!1;null!=g.style&&(pairs=g.style.split(";"),n=n||0<=mxUtils.indexOf(pairs,"text"));if(n)var x=Graph.textStyles;else if(x=Graph.cellStyles.slice(),!D)for(var F=null!=m?m.split(";"):[],H=0;H<F.length;H++){var M=F[H],L=M.indexOf("=");if(0<=L){var K=M.substring(0,L),Z=mxUtils.indexOf(x,K);0<=Z&&x.splice(Z,
-1);for(n=0;n<Graph.cellStyleGroups.length;n++){var ha=Graph.cellStyleGroups[n];if(0<=mxUtils.indexOf(ha,K))for(var ca=0;ca<ha.length;ca++){var aa=mxUtils.indexOf(x,ha[ca]);0<=aa&&x.splice(aa,1)}}}}var oa=this.model.isEdge(g);n=oa?S:J;for(H=0;H<x.length;H++){K=x[H];var da=n[K];null!=da&&("edgeStyle"!=K||P)&&(oa||!oa&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(m=mxUtils.setStyle(m,K,da),"fontFamily"==K&&null==n.fontSource&&(m=mxUtils.setStyle(m,"fontSource",null)),oa&&"rounded"==K&&"1"==da&&null==n.curved&&
-(m=mxUtils.setStyle(m,"curved",null)))}Editor.simpleLabels&&(m=mxUtils.setStyle(mxUtils.setStyle(m,"html",null),"whiteSpace",null));this.model.setStyle(g,m)}}finally{this.model.endUpdate()}return C};Graph.prototype.updateCellStyles=function(C,J){this.model.beginUpdate();try{for(var S=0;S<J.length;S++)if(this.model.isVertex(J[S])||this.model.isEdge(J[S])){var D=this.getCellStyle(J[S],!1),P=D[mxConstants.STYLE_PERIMETER],c=!1;for(m in C){var g=C[m];if(D[m]!=g){if(m==mxConstants.STYLE_SHAPE&&"umlLifeline"==
-D[m]&&"umlLifeline"!=g){c=!0;var m="participant"}this.setCellStyles(m,g,[J[S]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[J[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};
-Graph.prototype.getCellAt=function(C,J,S,D,P,c){this.useCssTransforms&&(C=C/this.currentScale-this.currentTranslate.x,J=J/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(C,J,S,D,P,c){D=null!=D?D:!0;P=null!=P?P:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var g=this.model.getChildCount(S)-1;0<=g;g--){var m=this.model.getChildAt(S,g),n=this.getScaledCellAt(C,J,m,D,P,
-c);if(null!=n)return n;if(this.isCellVisible(m)&&(P&&this.model.isEdge(m)||D&&this.model.isVertex(m))&&(n=this.view.getState(m),null!=n&&(null==c||!c(n,C,J))&&this.intersects(n,C,J)))return m}return null};Graph.prototype.isRecursiveVertexResize=function(C){return!this.isSwimlane(C.cell)&&0<this.model.getChildCount(C.cell)&&!this.isCellCollapsed(C.cell)&&"1"==mxUtils.getValue(C.style,"recursiveResize","1")&&null==mxUtils.getValue(C.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(C){for(var J=
-this.getCellGeometry(C);null!=J&&J.relative;)C=this.getModel().getParent(C),J=this.getCellGeometry(C);return C};Graph.prototype.isPart=function(C){return"1"==mxUtils.getValue(this.getCurrentCellStyle(C),"part","0")||this.isTableCell(C)||this.isTableRow(C)};Graph.prototype.getCompositeParents=function(C){for(var J=new mxDictionary,S=[],D=0;D<C.length;D++){var P=this.getCompositeParent(C[D]);this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));
-null==P||J.get(P)||(J.put(P,!0),S.push(P))}return S};Graph.prototype.getReferenceTerminal=function(C){if(null!=C){var J=this.getCellGeometry(C);null!=J&&J.relative&&(C=this.model.getParent(C))}null!=C&&this.model.isEdge(C)&&(C=this.model.getParent(C));null!=C&&(C=this.getCompositeParent(C));return C};Graph.prototype.getCompositeParent=function(C){for(;this.isPart(C);){var J=this.model.getParent(C);if(!this.model.isVertex(J))break;C=J}return C};Graph.prototype.filterSelectionCells=function(C){var J=
-this.getSelectionCells();if(null!=C){for(var S=[],D=0;D<J.length;D++)C(J[D])||S.push(J[D]);J=S}return J};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(C){if(this.useCssTransforms){var J=this.currentScale,S=this.currentTranslate;C=new mxRectangle((C.x+2*S.x)*J-S.x,(C.y+2*S.y)*J-S.y,C.width*J,C.height*J)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(C){C=this.strokeWidth;this.graph.useCssTransforms&&(C/=this.graph.currentScale);
-return C};mxGraphView.prototype.getGraphBounds=function(){var C=this.graphBounds;if(this.graph.useCssTransforms){var J=this.graph.currentTranslate,S=this.graph.currentScale;C=new mxRectangle((C.x+J.x)*S,(C.y+J.y)*S,C.width*S,C.height*S)}return C};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var f=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(C){this.graph.useCssTransforms&&(this.graph.currentScale=
-this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);f.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var l=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(C){C=l.apply(this,arguments);for(var J=[],S=
-0;S<C.length;S++)this.isTableRow(C[S])||this.isTableCell(C[S])||J.push(C[S]);return J};var u=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(C){C=u.apply(this,arguments);for(var J=[],S=0;S<C.length;S++)this.isTable(C[S])||this.isTableRow(C[S])||this.isTableCell(C[S])||J.push(C[S]);return J};Graph.prototype.updateCssTransform=function(){var C=this.view.getDrawPane();if(null!=C)if(C=C.parentNode,this.useCssTransforms){var J=C.getAttribute("transform");C.setAttribute("transformOrigin",
-"0 0");var S=Math.round(100*this.currentScale)/100;C.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");J!=C.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",C.getAttribute("transform"))}else C.removeAttribute("transformOrigin"),C.removeAttribute("transform")};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
-function(){var C=this.graph.useCssTransforms,J=this.scale,S=this.translate;C&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);y.apply(this,arguments);C&&(this.scale=J,this.translate=S)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(C,J,S){var D=this.useCssTransforms,P=this.view.scale,c=this.view.translate;D&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);D&&(this.view.scale=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(m,t){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=m.view.graph.tolerance,q=!0,B=null,I=mxUtils.bind(this,function(P){q=!0;B=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),S=mxUtils.bind(this,function(P){q=q&&null!=B&&Math.abs(B.x-mxEvent.getClientX(P))<y&&Math.abs(B.y-mxEvent.getClientY(P))<y}),D=mxUtils.bind(this,function(P){if(q)for(var c=mxEvent.getSource(P);null!=
+c&&c!=t.node;){if("a"==c.nodeName.toLowerCase()){m.view.graph.labelLinkClicked(m,c,P);break}c=c.parentNode}});mxEvent.addGestureListeners(t.node,I,S,D);mxEvent.addListener(t.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var f=this.tooltipHandler.init;this.tooltipHandler.init=function(){f.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(m){var t=mxEvent.getSource(m);"A"==t.nodeName&&(t=t.getAttribute("href"),null!=
+t&&this.graph.isCustomLink(t)&&(mxEvent.isTouchEvent(m)||!mxEvent.isPopupTrigger(m))&&this.graph.customLinkClicked(t)&&mxEvent.consume(m))}))}}this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(B){var I=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return!this.isSpecialColor(B.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(B.style,"lineShape",null)&&(this.model.isVertex(B.cell)||"arrow"==I||"pipe"==I||"wire"==I||"filledEdge"==I||"flexArrow"==I||"mxgraph.arrows2.wedgeArrow"==
+I)};Graph.prototype.isGradientState=function(B){var I=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return this.isFillState(B)&&"wire"!=I&&"pipe"!=I};Graph.prototype.isStrokeState=function(B){return!0};Graph.prototype.getTextColor=function(B,I){for(var S=I?"color":"background-color",D=B==this.cellEditor.textarea&&I?"default":Graph.getGivenColor(B,S);null==D&&null!=B&&B!=this.cellEditor.textarea.parentNode;)D=B==this.cellEditor.textarea&&I?"default":Graph.getGivenColor(B,S),B=B.parentNode;
+if("rgba(0, 0, 0, 0)"==D||"transparent"==D)D=mxConstants.NONE;return D};Graph.prototype.isSpecialColor=function(B){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],B)};Graph.prototype.isGlassState=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return"label"==B||"rectangle"==B||"internalStorage"==B||"ext"==B||"umlLifeline"==B||"swimlane"==B||"process"==B};Graph.prototype.isRoundedState=function(B){return null!=
+B.shape?B.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(B){var I=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(B.style,mxConstants.STYLE_CURVED,!1)&&("connector"==I||"filledEdge"==I||"wire"==I)};Graph.prototype.isAutoSizeState=function(B){return"1"==mxUtils.getValue(B.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(B){return null!=
+mxUtils.getValue(B.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(B){return!0};Graph.prototype.getVerticesAndEdges=function(B,I){B=null!=B?B:!0;I=null!=I?I:!0;var S=this.model;return S.filterDescendants(function(D){return B&&S.isVertex(D)||I&&S.isEdge(D)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(B,I,S){B=this.getCellStyle(B).newEdgeStyle;if(null!=B){this.model.beginUpdate();try{var D=JSON.parse(B),P;for(P in D)this.setCellStyles(P,D[P],I),"edgeStyle"==
+P&&"elbowEdgeStyle"==D[P]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",I)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(B){for(var I={},S=0;S<B.length;S++){var D=this.view.getState(B[S]);null!=D&&this.mergeStyle(D.style,I,0==S)}return I};Graph.prototype.mergeStyle=function(B,I,S){if(null!=B){var D={},P;for(P in B){var c=B[P];null!=c&&(D[P]=!0,null==I[P]&&S?I[P]=c:I[P]!=c&&delete I[P])}for(P in I)D[P]||
+delete I[P]}};Graph.prototype.getStartEditingCell=function(B,I){I=this.getCellStyle(B);I=parseInt(mxUtils.getValue(I,mxConstants.STYLE_STARTSIZE,0));this.isTable(B)&&(!this.isSwimlane(B)||0==I)&&""==this.getLabel(B)&&0<this.model.getChildCount(B)&&(B=this.model.getChildAt(B,0),I=this.getCellStyle(B),I=parseInt(mxUtils.getValue(I,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(B)&&(!this.isSwimlane(B)||0==I)&&""==this.getLabel(B)&&0<this.model.getChildCount(B))for(I=0;I<this.model.getChildCount(B);I++){var S=
+this.model.getChildAt(B,I);if(this.isCellEditable(S)){B=S;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,I,S,D){null!=B&&(D||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(P){return 0>mxUtils.indexOf(S,P)})),this.updateCellStyles(B,I))};Graph.prototype.copyCellStyles=function(B,I,S,D,P,c,g){var l=!1,n=!1;if(0<B.length)for(var x=0;x<B.length&&(l=this.getModel().isVertex(B[x])||l,!(n=this.getModel().isEdge(B[x])||
+n)||!l);x++);else n=l=!0;l=l&&!c;n=n&&!g;for(x=0;x<I.length;x++)if(B=0<=mxUtils.indexOf(Graph.textStyles,I[x]),"strokeColor"!=I[x]||null!=S[x]&&"none"!=S[x])if(0<=mxUtils.indexOf(Graph.cellStyles,I[x])||"shape"==I[x])if("shape"!=I[x]&&(l||B)&&(null==S[x]?delete D[I[x]]:D[I[x]]=S[x]),n||B)null==S[x]?delete P[I[x]]:P[I[x]]=S[x]};Graph.prototype.includeDescendants=function(B){for(var I=[],S=0;S<B.length;S++)I=I.concat(this.model.getDescendants(B[S]));return I};Graph.prototype.pasteCellStyles=function(B,
+I,S,D,P){I=null!=I?I:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<B.length;c++){var g=B[c],l=this.model.getStyle(g),n=!1;null!=g.style&&(pairs=g.style.split(";"),n=n||0<=mxUtils.indexOf(pairs,"text"));if(n)var x=Graph.textStyles;else if(x=Graph.cellStyles.slice(),!D)for(var F=null!=l?l.split(";"):[],G=0;G<F.length;G++){var L=F[G],M=L.indexOf("=");if(0<=M){var K=L.substring(0,M),Z=mxUtils.indexOf(x,K);0<=Z&&x.splice(Z,
+1);for(n=0;n<Graph.cellStyleGroups.length;n++){var ja=Graph.cellStyleGroups[n];if(0<=mxUtils.indexOf(ja,K))for(var da=0;da<ja.length;da++){var ba=mxUtils.indexOf(x,ja[da]);0<=ba&&x.splice(ba,1)}}}}var na=this.model.isEdge(g);n=na?S:I;for(G=0;G<x.length;G++){K=x[G];var ca=n[K];null!=ca&&("edgeStyle"!=K||P)&&(na||!na&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(l=mxUtils.setStyle(l,K,ca),"fontFamily"==K&&null==n.fontSource&&(l=mxUtils.setStyle(l,"fontSource",null)),na&&"rounded"==K&&"1"==ca&&null==n.curved&&
+(l=mxUtils.setStyle(l,"curved",null)))}Editor.simpleLabels&&(l=mxUtils.setStyle(mxUtils.setStyle(l,"html",null),"whiteSpace",null));this.model.setStyle(g,l)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,I){this.model.beginUpdate();try{for(var S=0;S<I.length;S++)if(this.model.isVertex(I[S])||this.model.isEdge(I[S])){var D=this.getCellStyle(I[S],!1),P=D[mxConstants.STYLE_PERIMETER],c=!1;for(l in B){var g=B[l];if(D[l]!=g){if(l==mxConstants.STYLE_SHAPE&&"umlLifeline"==
+D[l]&&"umlLifeline"!=g){c=!0;var l="participant"}this.setCellStyles(l,g,[I[S]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[I[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};
+Graph.prototype.getCellAt=function(B,I,S,D,P,c){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,I=I/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,I,S,D,P,c){D=null!=D?D:!0;P=null!=P?P:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var g=this.model.getChildCount(S)-1;0<=g;g--){var l=this.model.getChildAt(S,g),n=this.getScaledCellAt(B,I,l,D,P,
+c);if(null!=n)return n;if(this.isCellVisible(l)&&(P&&this.model.isEdge(l)||D&&this.model.isVertex(l))&&(n=this.view.getState(l),null!=n&&(null==c||!c(n,B,I))&&this.intersects(n,B,I)))return l}return null};Graph.prototype.isRecursiveVertexResize=function(B){return!this.isSwimlane(B.cell)&&0<this.model.getChildCount(B.cell)&&!this.isCellCollapsed(B.cell)&&"1"==mxUtils.getValue(B.style,"recursiveResize","1")&&null==mxUtils.getValue(B.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(B){for(var I=
+this.getCellGeometry(B);null!=I&&I.relative;)B=this.getModel().getParent(B),I=this.getCellGeometry(B);return B};Graph.prototype.isPart=function(B){return"1"==mxUtils.getValue(this.getCurrentCellStyle(B),"part","0")||this.isTableCell(B)||this.isTableRow(B)};Graph.prototype.getCompositeParents=function(B){for(var I=new mxDictionary,S=[],D=0;D<B.length;D++){var P=this.getCompositeParent(B[D]);this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));
+null==P||I.get(P)||(I.put(P,!0),S.push(P))}return S};Graph.prototype.getReferenceTerminal=function(B){if(null!=B){var I=this.getCellGeometry(B);null!=I&&I.relative&&(B=this.model.getParent(B))}null!=B&&this.model.isEdge(B)&&(B=this.model.getParent(B));null!=B&&(B=this.getCompositeParent(B));return B};Graph.prototype.getCompositeParent=function(B){for(;this.isPart(B);){var I=this.model.getParent(B);if(!this.model.isVertex(I))break;B=I}return B};Graph.prototype.filterSelectionCells=function(B){var I=
+this.getSelectionCells();if(null!=B){for(var S=[],D=0;D<I.length;D++)B(I[D])||S.push(I[D]);I=S}return I};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(B){if(this.useCssTransforms){var I=this.currentScale,S=this.currentTranslate;B=new mxRectangle((B.x+2*S.x)*I-S.x,(B.y+2*S.y)*I-S.y,B.width*I,B.height*I)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(B){B=this.strokeWidth;this.graph.useCssTransforms&&(B/=this.graph.currentScale);
+return B};mxGraphView.prototype.getGraphBounds=function(){var B=this.graphBounds;if(this.graph.useCssTransforms){var I=this.graph.currentTranslate,S=this.graph.currentScale;B=new mxRectangle((B.x+I.x)*S,(B.y+I.y)*S,B.width*S,B.height*S)}return B};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var f=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(B){this.graph.useCssTransforms&&(this.graph.currentScale=
+this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);f.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var m=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(B){B=m.apply(this,arguments);for(var I=[],S=
+0;S<B.length;S++)this.isTableRow(B[S])||this.isTableCell(B[S])||I.push(B[S]);return I};var t=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(B){B=t.apply(this,arguments);for(var I=[],S=0;S<B.length;S++)this.isTable(B[S])||this.isTableRow(B[S])||this.isTableCell(B[S])||I.push(B[S]);return I};Graph.prototype.updateCssTransform=function(){var B=this.view.getDrawPane();if(null!=B)if(B=B.parentNode,this.useCssTransforms){var I=B.getAttribute("transform");B.setAttribute("transformOrigin",
+"0 0");var S=Math.round(100*this.currentScale)/100;B.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");I!=B.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",B.getAttribute("transform"))}else B.removeAttribute("transformOrigin"),B.removeAttribute("transform")};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
+function(){var B=this.graph.useCssTransforms,I=this.scale,S=this.translate;B&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);y.apply(this,arguments);B&&(this.scale=I,this.translate=S)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(B,I,S){var D=this.useCssTransforms,P=this.view.scale,c=this.view.translate;D&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);D&&(this.view.scale=
P,this.view.translate=c,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
-Graph.prototype.labelLinkClicked=function(b,f,l){var u=f.getAttribute("href");u!=Graph.sanitizeLink(u)&&Graph.sanitizeNode(f);if(null!=u&&!this.isCustomLink(u)&&(mxEvent.isLeftMouseButton(l)&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(u)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(u),b);mxEvent.consume(l)}};
-Graph.prototype.openLink=function(b,f,l){var u=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==f&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)!=this.baseUrl||"#"!=b.charAt(this.baseUrl.length)||"_top"!=f||window!=window.top||navigator.standalone)u=window.open(b,null!=f?f:"_blank",l?null:"noopener,noreferrer"),null==u||l||(u.opener=null);else{var y=b.split("#")[1];window.location.hash=="#"+y&&(window.location.hash="");window.location.hash=y}}catch(q){}return u};
+Graph.prototype.labelLinkClicked=function(b,f,m){var t=f.getAttribute("href");t!=Graph.sanitizeLink(t)&&Graph.sanitizeNode(f);if(null!=t&&!this.isCustomLink(t)&&(mxEvent.isLeftMouseButton(m)&&!mxEvent.isPopupTrigger(m)||mxEvent.isTouchEvent(m))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(t)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(t),b);mxEvent.consume(m)}};
+Graph.prototype.openLink=function(b,f,m){var t=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==f&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)!=this.baseUrl||"#"!=b.charAt(this.baseUrl.length)||"_top"!=f||window!=window.top||navigator.standalone)t=window.open(b,null!=f?f:"_blank",m?null:"noopener,noreferrer"),null==t||m||(t.opener=null);else{var y=b.split("#")[1];window.location.hash=="#"+y&&(window.location.hash="");window.location.hash=y}}catch(q){}return t};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b,f){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(b){return null!=b&&!this.absoluteUrlPattern.test(b)&&"data:"!==b.substring(0,5)&&!this.isExternalProtocol(b)};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="#"==b.charAt(0)?this.baseUrl+b:"/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};
-Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,f){var l=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(f!=mxEvent.BEGIN_UPDATE||this.hasLayout(l,f))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return f=new mxStackLayout(this.graph,!0),f.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,f){var m=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(f!=mxEvent.BEGIN_UPDATE||this.hasLayout(m,f))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return f=new mxStackLayout(this.graph,!0),f.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
"1"),f.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),f.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),f.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),f.spacing=b.stackSpacing||f.spacing,f.border=b.stackBorder||f.border,f.marginLeft=b.marginLeft||0,f.marginRight=b.marginRight||0,f.marginTop=b.marginTop||0,f.marginBottom=b.marginBottom||0,f.allowGaps=b.allowGaps||0,f.fill=!0,f.allowGaps&&(f.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),f;if("treeLayout"==
b.childLayout)return f=new mxCompactTreeLayout(this.graph),f.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),f.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),f.sortEdges="1"==mxUtils.getValue(b,"sortEdges","0"),f.groupPadding=mxUtils.getValue(b,"parentPadding",20),f.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),f.maintainParentLocation=!0,f.edgeRouting=!1,f.resetEdges=!1,f;if("flowLayout"==b.childLayout)return f=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,
"flowOrientation",mxConstants.DIRECTION_EAST)),f.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),f.parentBorder=mxUtils.getValue(b,"parentPadding",20),f.maintainParentLocation=!0,f.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),f.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),f.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),
-f.parallelEdgeSpacing=mxUtils.getValue(b,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),f;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==String(b.childLayout).charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(u){null!=
-window.console&&console.error(u)}}return null}};
-Graph.prototype.createLayouts=function(b){for(var f=[],l=0;l<b.length;l++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[l].layout)){var u="mxOrgChartLayout"==b[l].layout&&null!=b[l].config?new window[b[l].layout](this,b[l].config.branchOptimizer):new window[b[l].layout](this);if(null!=b[l].config)for(var y in b[l].config)if("mxOrgChartLayout"!=b[l].layout||"branchOptimizer"!=y)u[y]=b[l].config[y];f.push(u)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[l].layout]));return f};
-Graph.prototype.getDataForCells=function(b,f){for(var l=[],u=0;u<b.length;u++){var y={};y.id=b[u].id;var q=null!=b[u].value?b[u].value.attributes:null;this.isReplacePlaceholders(b[u])&&f&&(y.value=this.getLabel(b[u]));if(null!=q)for(var C=0;C<q.length;C++)y[q[C].nodeName]=q[C].nodeValue;else y.label=this.convertValueToString(b[u]);l.push(y)}return l};
-Graph.prototype.getNodesForCells=function(b){for(var f=[],l=0;l<b.length;l++){var u=this.view.getState(b[l]);if(null!=u){for(var y=this.cellRenderer.getShapesForState(u),q=0;q<y.length;q++)null!=y[q]&&null!=y[q].node&&f.push(y[q].node);null!=u.control&&null!=u.control.node&&f.push(u.control.node)}}return f};
-Graph.prototype.createWipeAnimations=function(b,f){for(var l=[],u=0;u<b.length;u++){var y=this.view.getState(b[u]);null!=y&&null!=y.shape&&(this.model.isEdge(y.cell)&&null!=y.absolutePoints&&1<y.absolutePoints.length?l.push(this.createEdgeWipeAnimation(y,f)):this.model.isVertex(y.cell)&&null!=y.shape.bounds&&l.push(this.createVertexWipeAnimation(y,f)))}return l};
-Graph.prototype.createEdgeWipeAnimation=function(b,f){var l=b.absolutePoints.slice(),u=b.segments,y=b.length,q=l.length;return{execute:mxUtils.bind(this,function(C,J){if(null!=b.shape){var S=[l[0]];J=C/J;f||(J=1-J);for(var D=y*J,P=1;P<q;P++)if(D<=u[P-1]){S.push(new mxPoint(l[P-1].x+(l[P].x-l[P-1].x)*D/u[P-1],l[P-1].y+(l[P].y-l[P-1].y)*D/u[P-1]));break}else D-=u[P-1],S.push(l[P]);b.shape.points=S;b.shape.redraw();0==C&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=J)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=l,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(b,f){var l=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(u,y){null!=b.shape&&(y=u/y,f||(y=1-y),b.shape.bounds=new mxRectangle(l.x,l.y,l.width*y,l.height),b.shape.redraw(),0==u&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=y))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=l,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};Graph.prototype.executeAnimations=function(b,f,l,u){l=null!=l?l:30;u=null!=u?u:30;var y=null,q=0,C=mxUtils.bind(this,function(){if(q==l||this.stoppingCustomActions){window.clearInterval(y);for(var J=0;J<b.length;J++)b[J].stop();null!=f&&f()}else for(J=0;J<b.length;J++)b[J].execute(q,l);q++});y=window.setInterval(C,u);C()};
+f.parallelEdgeSpacing=mxUtils.getValue(b,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),f;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==String(b.childLayout).charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(t){null!=
+window.console&&console.error(t)}}return null}};
+Graph.prototype.createLayouts=function(b){for(var f=[],m=0;m<b.length;m++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[m].layout)){var t="mxOrgChartLayout"==b[m].layout&&null!=b[m].config?new window[b[m].layout](this,b[m].config.branchOptimizer):new window[b[m].layout](this);if(null!=b[m].config)for(var y in b[m].config)if("mxOrgChartLayout"!=b[m].layout||"branchOptimizer"!=y)t[y]=b[m].config[y];f.push(t)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[m].layout]));return f};
+Graph.prototype.getDataForCells=function(b,f){for(var m=[],t=0;t<b.length;t++){var y={};y.id=b[t].id;var q=null!=b[t].value?b[t].value.attributes:null;this.isReplacePlaceholders(b[t])&&f&&(y.value=this.getLabel(b[t]));if(null!=q)for(var B=0;B<q.length;B++)y[q[B].nodeName]=q[B].nodeValue;else y.label=this.convertValueToString(b[t]);m.push(y)}return m};
+Graph.prototype.getNodesForCells=function(b){for(var f=[],m=0;m<b.length;m++){var t=this.view.getState(b[m]);if(null!=t){for(var y=this.cellRenderer.getShapesForState(t),q=0;q<y.length;q++)null!=y[q]&&null!=y[q].node&&f.push(y[q].node);null!=t.control&&null!=t.control.node&&f.push(t.control.node)}}return f};
+Graph.prototype.createWipeAnimations=function(b,f){for(var m=[],t=0;t<b.length;t++){var y=this.view.getState(b[t]);null!=y&&null!=y.shape&&(this.model.isEdge(y.cell)&&null!=y.absolutePoints&&1<y.absolutePoints.length?m.push(this.createEdgeWipeAnimation(y,f)):this.model.isVertex(y.cell)&&null!=y.shape.bounds&&m.push(this.createVertexWipeAnimation(y,f)))}return m};
+Graph.prototype.createEdgeWipeAnimation=function(b,f){var m=b.absolutePoints.slice(),t=b.segments,y=b.length,q=m.length;return{execute:mxUtils.bind(this,function(B,I){if(null!=b.shape){var S=[m[0]];I=B/I;f||(I=1-I);for(var D=y*I,P=1;P<q;P++)if(D<=t[P-1]){S.push(new mxPoint(m[P-1].x+(m[P].x-m[P-1].x)*D/t[P-1],m[P-1].y+(m[P].y-m[P-1].y)*D/t[P-1]));break}else D-=t[P-1],S.push(m[P]);b.shape.points=S;b.shape.redraw();0==B&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=I)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=m,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};
+Graph.prototype.createVertexWipeAnimation=function(b,f){var m=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(t,y){null!=b.shape&&(y=t/y,f||(y=1-y),b.shape.bounds=new mxRectangle(m.x,m.y,m.width*y,m.height),b.shape.redraw(),0==t&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=y))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=m,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};Graph.prototype.executeAnimations=function(b,f,m,t){m=null!=m?m:30;t=null!=t?t:30;var y=null,q=0,B=mxUtils.bind(this,function(){if(q==m||this.stoppingCustomActions){window.clearInterval(y);for(var I=0;I<b.length;I++)b[I].stop();null!=f&&f()}else for(I=0;I<b.length;I++)b[I].execute(q,m);q++});y=window.setInterval(B,t);B()};
Graph.prototype.getPageSize=function(){return this.pageVisible&&null!=this.pageFormat?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(b,f,l){b=null!=b?b:this.getGraphBounds();f=null!=f?f:this.view.translate;l=null!=l?l:this.view.scale;var u=this.getPageSize();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var y=Math.floor(Math.ceil(b.x/l-f.x)/u.width),q=Math.floor(Math.ceil(b.y/l-f.y)/u.height);return new mxRectangle(y,q,Math.ceil((Math.floor((b.x+b.width)/l)-f.x)/u.width)-y,Math.ceil((Math.floor((b.y+b.height)/l)-f.y)/u.height)-q)};
-Graph.prototype.getDefaultTranslate=function(b){var f=this.getPagePadding(),l=this.getPageSize();return new mxPoint(f.x-b.x*l.width,f.y-b.y*l.height)};Graph.prototype.updateMinimumSize=function(){var b=this.getPageLayout(),f=this.getPagePadding(),l=this.getPageSize(),u=Math.ceil(2*f.x+b.width*l.width);b=Math.ceil(2*f.y+b.height*l.height);if(null==this.minimumGraphSize||this.minimumGraphSize.width!=u||this.minimumGraphSize.height!=b)this.minimumGraphSize=new mxRectangle(0,0,u,b)};
-Graph.prototype.sanitizeHtml=function(b,f){return Graph.sanitizeHtml(b,f)};Graph.prototype.updatePlaceholders=function(){var b=!1,f;for(f in this.model.cells){var l=this.model.cells[f];this.isReplacePlaceholders(l)&&(this.view.invalidate(l,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
+Graph.prototype.getPageLayout=function(b,f,m){b=null!=b?b:this.getGraphBounds();f=null!=f?f:this.view.translate;m=null!=m?m:this.view.scale;var t=this.getPageSize();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var y=Math.floor(Math.ceil(b.x/m-f.x)/t.width),q=Math.floor(Math.ceil(b.y/m-f.y)/t.height);return new mxRectangle(y,q,Math.ceil((Math.floor((b.x+b.width)/m)-f.x)/t.width)-y,Math.ceil((Math.floor((b.y+b.height)/m)-f.y)/t.height)-q)};
+Graph.prototype.getDefaultTranslate=function(b){var f=this.getPagePadding(),m=this.getPageSize();return new mxPoint(f.x-b.x*m.width,f.y-b.y*m.height)};Graph.prototype.updateMinimumSize=function(){var b=this.getPageLayout(),f=this.getPagePadding(),m=this.getPageSize(),t=Math.ceil(2*f.x+b.width*m.width);b=Math.ceil(2*f.y+b.height*m.height);if(null==this.minimumGraphSize||this.minimumGraphSize.width!=t||this.minimumGraphSize.height!=b)this.minimumGraphSize=new mxRectangle(0,0,t,b)};
+Graph.prototype.sanitizeHtml=function(b,f){return Graph.sanitizeHtml(b,f)};Graph.prototype.updatePlaceholders=function(){var b=!1,f;for(f in this.model.cells){var m=this.model.cells[f];this.isReplacePlaceholders(m)&&(this.view.invalidate(m,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(b){return Graph.zoomWheel&&!mxEvent.isShiftDown(b)&&!mxEvent.isMetaDown(b)&&!mxEvent.isAltDown(b)&&(!mxEvent.isControlDown(b)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(b)||mxEvent.isControlDown(b))};Graph.prototype.isScrollWheelEvent=function(b){return!this.isZoomWheelEvent(b)};Graph.prototype.isTransparentClickEvent=function(b){return mxEvent.isAltDown(b)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};
Graph.prototype.isIgnoreTerminalEvent=function(b){return mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b)};Graph.prototype.isEdgeIgnored=function(b){var f=!1;null!=b&&(b=this.getCurrentCellStyle(b),f="1"==mxUtils.getValue(b,"ignoreEdge","0"));return f};
-Graph.prototype.isSplitTarget=function(b,f,l){return!this.model.isEdge(f[0])&&!mxEvent.isAltDown(l)&&!mxEvent.isShiftDown(l)&&!this.isCellLocked(this.getLayerForCell(b))&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(b){var f=mxGraph.prototype.getLabel.apply(this,arguments);null!=f&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(f=this.replacePlaceholders(b,f));return f};
+Graph.prototype.isSplitTarget=function(b,f,m){return!this.model.isEdge(f[0])&&!mxEvent.isAltDown(m)&&!mxEvent.isShiftDown(m)&&!this.isCellLocked(this.getLayerForCell(b))&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(b){var f=mxGraph.prototype.getLabel.apply(this,arguments);null!=f&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(f=this.replacePlaceholders(b,f));return f};
Graph.prototype.isLabelMovable=function(b){var f=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(f,"labelMovable","0")))};Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};
Graph.prototype.getClickableLinkForCell=function(b){do{var f=this.getLinkForCell(b);if(null!=f)return f;b=this.model.getParent(b)}while(null!=b);return null};Graph.prototype.getGlobalVariable=function(b){var f=null;"date"==b?f=(new Date).toLocaleDateString():"time"==b?f=(new Date).toLocaleTimeString():"timestamp"==b?f=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),f=this.formatDate(new Date,b));return f};
-Graph.prototype.formatDate=function(b,f,l){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var u=this.dateFormatCache,y=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,q=/[^-+\dA-Z]/g,C=function(H,M){H=String(H);for(M=M||2;H.length<M;)H="0"+H;return H};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(f=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");f=String(u.masks[f]||f||u.masks["default"]);"UTC:"==f.slice(0,4)&&(f=f.slice(4),l=!0);var J=l?"getUTC":"get",S=b[J+"Date"](),D=b[J+"Day"](),P=b[J+"Month"](),c=b[J+"FullYear"](),g=b[J+"Hours"](),m=b[J+"Minutes"](),n=b[J+"Seconds"]();J=b[J+"Milliseconds"]();var x=l?0:b.getTimezoneOffset(),F={d:S,dd:C(S),ddd:u.i18n.dayNames[D],dddd:u.i18n.dayNames[D+7],m:P+1,mm:C(P+1),mmm:u.i18n.monthNames[P],mmmm:u.i18n.monthNames[P+
-12],yy:String(c).slice(2),yyyy:c,h:g%12||12,hh:C(g%12||12),H:g,HH:C(g),M:m,MM:C(m),s:n,ss:C(n),l:C(J,3),L:C(99<J?Math.round(J/10):J),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:l?"UTC":(String(b).match(y)||[""]).pop().replace(q,""),o:(0<x?"-":"+")+C(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return f.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in F?F[H]:H.slice(1,
-H.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var f=null;if(0<b.length){f=this.getLayerForCell(b[0]);for(var l=1;l<b.length;l++)if(!this.model.isAncestor(f,b[l])){f=null;break}}return f};
-Graph.prototype.createLayersDialog=function(b,f){var l=document.createElement("div");l.style.position="absolute";for(var u=this.getModel(),y=u.getChildCount(u.root),q=0;q<y;q++)mxUtils.bind(this,function(C){function J(){u.isVisible(C)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(D,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(D,25))}var S=this.convertValueToString(C)||mxResources.get("background")||"Background",D=document.createElement("div");D.style.overflow=
-"hidden";D.style.textOverflow="ellipsis";D.style.padding="2px";D.style.whiteSpace="nowrap";D.style.cursor="pointer";D.setAttribute("title",mxResources.get(u.isVisible(C)?"hideIt":"show",[S]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";f&&(P.style.filter="invert(100%)",P.style.top="-2px");D.appendChild(P);mxUtils.write(D,S);l.appendChild(D);
-mxEvent.addListener(D,"click",function(){u.setVisible(C,!u.isVisible(C));J();null!=b&&b(C)});J()})(u.getChildAt(u.root,q));return l};
-Graph.prototype.replacePlaceholders=function(b,f,l,u){u=[];if(null!=f){for(var y=0;match=this.placeholderPattern.exec(f);){var q=match[0];if(2<q.length&&"%label%"!=q&&"%tooltip%"!=q){var C=null;if(match.index>y&&"%"==f.charAt(match.index-1))C=q.substring(1);else{var J=q.substring(1,q.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==J)C=b.id;else if("width"===J.substring(0,5)&&this.model.isVertex(b)){var D=this.getCellGeometry(b);
-null!=D&&(C=D.width,5<J.length&&(C=Editor.toUnit(C,S[J.substring(6)])))}else if("height"==J.substring(0,6)&&this.model.isVertex(b))D=this.getCellGeometry(b),null!=D&&(C=D.height,6<J.length&&(C=Editor.toUnit(C,S[J.substring(7)])));else if("length"==J.substring(0,6)){for(D=b;null!=D&&!this.model.isEdge(D);)D=this.model.getParent(D);D=this.view.getState(D);null!=D&&(C=Math.round(D.length/this.view.scale),6<J.length&&(C=Editor.toUnit(C,S[J.substring(7)])))}else if(0>J.indexOf("{"))for(S=b;null==C&&null!=
-S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(C=S.getAttribute(J+"_"+Graph.diagramLanguage)),null==C&&(C=S.hasAttribute(J)?null!=S.getAttribute(J)?S.getAttribute(J):"":null)),S=this.model.getParent(S);null==C&&(C=this.getGlobalVariable(J));null==C&&null!=l&&(C=l[J])}u.push(f.substring(y,match.index)+(null!=C?C:q));y=match.index+q.length}}u.push(f.substring(y))}return u.join("")};
-Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var f=[],l=0;l<b.length;l++){var u=this.model.getCell(b[l].id);null!=u&&f.push(u)}this.setSelectionCells(f)}else this.clearSelection()};Graph.prototype.selectCellForEvent=function(b,f){mxEvent.isShiftDown(f)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,f){var l=!1;if(this.isTableCell(b)&&this.isTableCell(f)){var u=this.model.getParent(b),y=this.model.getParent(u),q=this.model.getParent(f);if(y==this.model.getParent(q)){b=u.getIndex(b);u=y.getIndex(u);var C=q.getIndex(f),J=y.getIndex(q);q=Math.max(u,J);f=Math.min(b,C);b=Math.max(b,C);C=[];for(u=Math.min(u,J);u<=q;u++){J=this.model.getChildAt(y,u);for(var S=f;S<=b;S++)C.push(this.model.getChildAt(J,S))}0<C.length&&(1<C.length||1<this.getSelectionCount()||
-!this.isCellSelected(C[0]))&&(this.setSelectionCells(C),l=!0)}}return l};
-Graph.prototype.snapCellsToGrid=function(b,f){this.getModel().beginUpdate();try{for(var l=0;l<b.length;l++){var u=b[l],y=this.getCellGeometry(u);if(null!=y){y=y.clone();if(this.getModel().isVertex(u))y.x=Math.round(y.x/f)*f,y.y=Math.round(y.y/f)*f,y.width=Math.round(y.width/f)*f,y.height=Math.round(y.height/f)*f;else if(this.getModel().isEdge(u)&&null!=y.points)for(var q=0;q<y.points.length;q++)y.points[q].x=Math.round(y.points[q].x/f)*f,y.points[q].y=Math.round(y.points[q].y/f)*f;this.getModel().setGeometry(u,
+Graph.prototype.formatDate=function(b,f,m){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var t=this.dateFormatCache,y=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,q=/[^-+\dA-Z]/g,B=function(G,L){G=String(G);for(L=L||2;G.length<L;)G="0"+G;return G};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(f=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");f=String(t.masks[f]||f||t.masks["default"]);"UTC:"==f.slice(0,4)&&(f=f.slice(4),m=!0);var I=m?"getUTC":"get",S=b[I+"Date"](),D=b[I+"Day"](),P=b[I+"Month"](),c=b[I+"FullYear"](),g=b[I+"Hours"](),l=b[I+"Minutes"](),n=b[I+"Seconds"]();I=b[I+"Milliseconds"]();var x=m?0:b.getTimezoneOffset(),F={d:S,dd:B(S),ddd:t.i18n.dayNames[D],dddd:t.i18n.dayNames[D+7],m:P+1,mm:B(P+1),mmm:t.i18n.monthNames[P],mmmm:t.i18n.monthNames[P+
+12],yy:String(c).slice(2),yyyy:c,h:g%12||12,hh:B(g%12||12),H:g,HH:B(g),M:l,MM:B(l),s:n,ss:B(n),l:B(I,3),L:B(99<I?Math.round(I/10):I),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:m?"UTC":(String(b).match(y)||[""]).pop().replace(q,""),o:(0<x?"-":"+")+B(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return f.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(G){return G in F?F[G]:G.slice(1,
+G.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var f=null;if(0<b.length){f=this.getLayerForCell(b[0]);for(var m=1;m<b.length;m++)if(!this.model.isAncestor(f,b[m])){f=null;break}}return f};
+Graph.prototype.createLayersDialog=function(b,f){var m=document.createElement("div");m.style.position="absolute";for(var t=this.getModel(),y=t.getChildCount(t.root),q=0;q<y;q++)mxUtils.bind(this,function(B){function I(){t.isVisible(B)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(D,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(D,25))}var S=this.convertValueToString(B)||mxResources.get("background")||"Background",D=document.createElement("div");D.style.overflow=
+"hidden";D.style.textOverflow="ellipsis";D.style.padding="2px";D.style.whiteSpace="nowrap";D.style.cursor="pointer";D.setAttribute("title",mxResources.get(t.isVisible(B)?"hideIt":"show",[S]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";f&&(P.style.filter="invert(100%)",P.style.top="-2px");D.appendChild(P);mxUtils.write(D,S);m.appendChild(D);
+mxEvent.addListener(D,"click",function(){t.setVisible(B,!t.isVisible(B));I();null!=b&&b(B)});I()})(t.getChildAt(t.root,q));return m};
+Graph.prototype.replacePlaceholders=function(b,f,m,t){t=[];if(null!=f){for(var y=0;match=this.placeholderPattern.exec(f);){var q=match[0];if(2<q.length&&"%label%"!=q&&"%tooltip%"!=q){var B=null;if(match.index>y&&"%"==f.charAt(match.index-1))B=q.substring(1);else{var I=q.substring(1,q.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==I)B=b.id;else if("width"===I.substring(0,5)&&this.model.isVertex(b)){var D=this.getCellGeometry(b);
+null!=D&&(B=D.width,5<I.length&&(B=Editor.toUnit(B,S[I.substring(6)])))}else if("height"==I.substring(0,6)&&this.model.isVertex(b))D=this.getCellGeometry(b),null!=D&&(B=D.height,6<I.length&&(B=Editor.toUnit(B,S[I.substring(7)])));else if("length"==I.substring(0,6)){for(D=b;null!=D&&!this.model.isEdge(D);)D=this.model.getParent(D);D=this.view.getState(D);null!=D&&(B=Math.round(D.length/this.view.scale),6<I.length&&(B=Editor.toUnit(B,S[I.substring(7)])))}else if(0>I.indexOf("{"))for(S=b;null==B&&null!=
+S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(B=S.getAttribute(I+"_"+Graph.diagramLanguage)),null==B&&(B=S.hasAttribute(I)?null!=S.getAttribute(I)?S.getAttribute(I):"":null)),S=this.model.getParent(S);null==B&&("pagecount"==I.substring(0,9)&&9<I.length||"pagenumber"==I.substring(0,10)&&10<I.length?(S=I.match(/(pagecount|pagenumber)[\s]*([+-])[\s]*(\d+)/),null!=S&&(B=this.getGlobalVariable(S[1]),3<S.length&&(D=parseInt(S[3]),B+="+"==S[2]?D:-D))):
+B=this.getGlobalVariable(I));null==B&&null!=m&&(B=m[I])}t.push(f.substring(y,match.index)+(null!=B?B:q));y=match.index+q.length}}t.push(f.substring(y))}return t.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var f=[],m=0;m<b.length;m++){var t=this.model.getCell(b[m].id);null!=t&&f.push(t)}this.setSelectionCells(f)}else this.clearSelection()};
+Graph.prototype.selectCellForEvent=function(b,f){mxEvent.isShiftDown(f)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
+Graph.prototype.selectTableRange=function(b,f){var m=!1;if(this.isTableCell(b)&&this.isTableCell(f)){var t=this.model.getParent(b),y=this.model.getParent(t),q=this.model.getParent(f);if(y==this.model.getParent(q)){b=t.getIndex(b);t=y.getIndex(t);var B=q.getIndex(f),I=y.getIndex(q);q=Math.max(t,I);f=Math.min(b,B);b=Math.max(b,B);B=[];for(t=Math.min(t,I);t<=q;t++){I=this.model.getChildAt(y,t);for(var S=f;S<=b;S++)B.push(this.model.getChildAt(I,S))}0<B.length&&(1<B.length||1<this.getSelectionCount()||
+!this.isCellSelected(B[0]))&&(this.setSelectionCells(B),m=!0)}}return m};
+Graph.prototype.snapCellsToGrid=function(b,f){this.getModel().beginUpdate();try{for(var m=0;m<b.length;m++){var t=b[m],y=this.getCellGeometry(t);if(null!=y){y=y.clone();if(this.getModel().isVertex(t))y.x=Math.round(y.x/f)*f,y.y=Math.round(y.y/f)*f,y.width=Math.round(y.width/f)*f,y.height=Math.round(y.height/f)*f;else if(this.getModel().isEdge(t)&&null!=y.points)for(var q=0;q<y.points.length;q++)y.points[q].x=Math.round(y.points[q].x/f)*f,y.points[q].y=Math.round(y.points[q].y/f)*f;this.getModel().setGeometry(t,
y)}}}finally{this.getModel().endUpdate()}};Graph.prototype.removeChildCells=function(b){this.model.beginUpdate();try{for(var f=this.model.getChildCount(b);0<=f;f--)this.model.remove(this.model.getChildAt(b,f))}finally{this.model.endUpdate()}};
-Graph.prototype.updateShapes=function(b,f,l){this.model.beginUpdate();try{var u=this.model.getStyle(b),y=l?this.stylesheet.getCellStyle(u,{},!1):null;null!=y&&null==y[mxConstants.STYLE_SHAPE]&&(this.model.isVertex(b)?y[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultVertexStyle()[mxConstants.STYLE_SHAPE]:this.model.isEdge(b)&&(y[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultEdgeStyle()[mxConstants.STYLE_SHAPE]));for(var q=0;q<f.length;q++){if(this.model.isVertex(b)&&this.model.isVertex(f[q])||
-this.model.isEdge(b)&&this.model.isEdge(f[q]))if(l){var C=this.model.getStyle(f[q]);if(null!=C){var J=C.split(";");0<J.length&&0>J[0].indexOf("=")&&(J=J.slice(1));this.model.setStyle(f[q],J.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[f[q]]);this.setCellStyles("points",null,[f[q]]);this.pasteStyle(y,[f[q]],null,!0)}else y=this.copyStyle(f[q]),this.model.setStyle(f[q],u),this.pasteStyle(y,[f[q]]);"1"==mxUtils.getValue(this.getCellStyle(f[q],!1),"composite","0")&&this.removeChildCells(f[q])}}finally{this.model.endUpdate()}};
-Graph.prototype.selectCellsForConnectVertex=function(b,f,l){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=l&&(mxEvent.isTouchEvent(f)?l.update(l.getState(this.view.getState(b[1]))):l.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=f&&f.constructor==mxStackLayout};
-Graph.prototype.insertEdgeBeforeCell=function(b,f){for(var l=f;null!=l.parent&&null!=l.geometry&&l.geometry.relative&&l.parent!=b.parent;)l=this.model.getParent(l);null!=l&&null!=l.parent&&l.parent==b.parent&&(f=l.parent.getIndex(l),this.model.add(l.parent,b,f))};
-Graph.prototype.connectVertex=function(b,f,l,u,y,q,C,J){q=q?q:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),D=S?b:this.getCompositeParent(b),P=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(D.geometry.x,D.geometry.y);f==mxConstants.DIRECTION_NORTH?(P.x+=D.geometry.width/2,P.y-=l):f==
-mxConstants.DIRECTION_SOUTH?(P.x+=D.geometry.width/2,P.y+=D.geometry.height+l):(P.x=f==mxConstants.DIRECTION_WEST?P.x-l:P.x+(D.geometry.width+l),P.y+=D.geometry.height/2);var c=this.view.getState(this.model.getParent(b));l=this.view.scale;var g=this.view.translate;D=g.x*l;g=g.y*l;null!=c&&this.model.isVertex(c.cell)&&(D=c.x,g=c.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(P.x+=b.parent.geometry.x,P.y+=b.parent.geometry.y);q=q?null:(new mxRectangle(D+P.x*l,g+P.y*l)).grow(40*l);q=null!=q?
-this.getCells(0,0,0,0,null,null,q,null,!0):null;c=this.view.getState(b);var m=null,n=null;if(null!=q){q=q.reverse();for(var x=0;x<q.length;x++)if(!this.isCellLocked(q[x])&&!this.model.isEdge(q[x])&&q[x]!=b)if(!this.model.isAncestor(b,q[x])&&this.isContainer(q[x])&&(null==m||q[x]==this.model.getParent(b)))m=q[x];else if(null==n&&this.isCellConnectable(q[x])&&!this.model.isAncestor(q[x],b)&&!this.isSwimlane(q[x])){var F=this.view.getState(q[x]);null==c||null==F||mxUtils.intersects(c,F)||(n=q[x])}}var H=
-!mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||y;H&&("1"!=urlParams.sketch||y)&&(f==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var M=[],L=n;n=m;y=mxUtils.bind(this,function(K){if(null==C||null!=K||null==n&&S){this.model.beginUpdate();try{if(null==L&&H){var Z=this.getAbsoluteParent(null!=K?K:b);Z=S?b:this.getCompositeParent(Z);L=null!=K?K:this.duplicateCells([Z],
-!1)[0];null!=K&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ha=this.getCellGeometry(L);null!=ha&&(null!=K&&"1"==urlParams.sketch&&(f==mxConstants.DIRECTION_NORTH?P.y-=ha.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=ha.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-ha.width/2:P.x+ha.width/2),ha.x=P.x-ha.width/2,ha.y=P.y-ha.height/2);null!=m?(this.addCells([L],m,null,null,null,!0),n=null):H&&!S&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var ca=mxEvent.isControlDown(u)&&
-mxEvent.isShiftDown(u)&&H||null==n&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=ca&&(M.push(ca),this.applyNewEdgeStyle(b,[ca],f),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ca,b));if(null==n&&null!=L&&null!=b.parent&&S&&f==mxConstants.DIRECTION_WEST){var aa=b.parent.getIndex(b);this.model.add(b.parent,L,aa)}null==n&&null!=L&&M.push(L);null==L&&null!=ca&&ca.geometry.setTerminalPoint(P,!1);null!=ca&&this.fireEvent(new mxEventObject("cellsInserted",
-"cells",[ca]))}finally{this.model.endUpdate()}}if(null!=J)J(M);else return M});if(null==C||null!=L||!H||null==n&&S)return y(L);C(D+P.x*l,g+P.y*l,y)};
-Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var f=document.createElement("div"),l=[],u,y=0;y<b.length;y++)if(u=b[y],this.model.isVertex(u)||this.model.isEdge(u))this.isHtmlLabel(u)?(f.innerHTML=Graph.sanitizeHtml(this.getLabel(u)),u=mxUtils.extractTextWithWhitespace([f])):u=this.getLabel(u),u=mxUtils.trim(u.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<u.length&&l.push(u);return l.join(" ")};
-Graph.prototype.convertValueToString=function(b){var f=this.model.getValue(b);if(null!=f&&"object"==typeof f){var l=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){f=b.getAttribute("placeholder");for(var u=b;null==l&&null!=u;)null!=u.value&&"object"==typeof u.value&&(l=u.hasAttribute(f)?null!=u.getAttribute(f)?u.getAttribute(f):"":null),u=this.model.getParent(u)}else l=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(l=f.getAttribute("label_"+Graph.diagramLanguage)),
-null==l&&(l=f.getAttribute("label")||"");return l||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b,f){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),f||(b=mxUtils.removeJavascriptProtocol(b)),b):null};
+Graph.prototype.updateShapes=function(b,f,m){this.model.beginUpdate();try{var t=this.model.getStyle(b),y=m?this.stylesheet.getCellStyle(t,{},!1):null;null!=y&&null==y[mxConstants.STYLE_SHAPE]&&(this.model.isVertex(b)?y[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultVertexStyle()[mxConstants.STYLE_SHAPE]:this.model.isEdge(b)&&(y[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultEdgeStyle()[mxConstants.STYLE_SHAPE]));for(var q=0;q<f.length;q++){if(this.model.isVertex(b)&&this.model.isVertex(f[q])||
+this.model.isEdge(b)&&this.model.isEdge(f[q]))if(m){var B=this.model.getStyle(f[q]);if(null!=B){var I=B.split(";");0<I.length&&0>I[0].indexOf("=")&&(I=I.slice(1));this.model.setStyle(f[q],I.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[f[q]]);this.setCellStyles("points",null,[f[q]]);this.pasteStyle(y,[f[q]],null,!0)}else y=this.copyStyle(f[q]),this.model.setStyle(f[q],t),this.pasteStyle(y,[f[q]]);"1"==mxUtils.getValue(this.getCellStyle(f[q],!1),"composite","0")&&this.removeChildCells(f[q])}}finally{this.model.endUpdate()}};
+Graph.prototype.selectCellsForConnectVertex=function(b,f,m){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=m&&(mxEvent.isTouchEvent(f)?m.update(m.getState(this.view.getState(b[1]))):m.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=f&&f.constructor==mxStackLayout};
+Graph.prototype.insertEdgeBeforeCell=function(b,f){for(var m=f;null!=m.parent&&null!=m.geometry&&m.geometry.relative&&m.parent!=b.parent;)m=this.model.getParent(m);null!=m&&null!=m.parent&&m.parent==b.parent&&(f=m.parent.getIndex(m),this.model.add(m.parent,b,f))};
+Graph.prototype.connectVertex=function(b,f,m,t,y,q,B,I){q=q?q:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),D=S?b:this.getCompositeParent(b),P=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(D.geometry.x,D.geometry.y);f==mxConstants.DIRECTION_NORTH?(P.x+=D.geometry.width/2,P.y-=m):f==
+mxConstants.DIRECTION_SOUTH?(P.x+=D.geometry.width/2,P.y+=D.geometry.height+m):(P.x=f==mxConstants.DIRECTION_WEST?P.x-m:P.x+(D.geometry.width+m),P.y+=D.geometry.height/2);var c=this.view.getState(this.model.getParent(b));m=this.view.scale;var g=this.view.translate;D=g.x*m;g=g.y*m;null!=c&&this.model.isVertex(c.cell)&&(D=c.x,g=c.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(P.x+=b.parent.geometry.x,P.y+=b.parent.geometry.y);q=q?null:(new mxRectangle(D+P.x*m,g+P.y*m)).grow(40*m);q=null!=q?
+this.getCells(0,0,0,0,null,null,q,null,!0):null;c=this.view.getState(b);var l=null,n=null;if(null!=q){q=q.reverse();for(var x=0;x<q.length;x++)if(!this.isCellLocked(q[x])&&!this.model.isEdge(q[x])&&q[x]!=b)if(!this.model.isAncestor(b,q[x])&&this.isContainer(q[x])&&(null==l||q[x]==this.model.getParent(b)))l=q[x];else if(null==n&&this.isCellConnectable(q[x])&&!this.model.isAncestor(q[x],b)&&!this.isSwimlane(q[x])){var F=this.view.getState(q[x]);null==c||null==F||mxUtils.intersects(c,F)||(n=q[x])}}var G=
+!mxEvent.isShiftDown(t)||mxEvent.isControlDown(t)||y;G&&("1"!=urlParams.sketch||y)&&(f==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var L=[],M=n;n=l;y=mxUtils.bind(this,function(K){if(null==B||null!=K||null==n&&S){this.model.beginUpdate();try{if(null==M&&G){var Z=this.getAbsoluteParent(null!=K?K:b);Z=S?b:this.getCompositeParent(Z);M=null!=K?K:this.duplicateCells([Z],
+!1)[0];null!=K&&this.addCells([M],this.model.getParent(b),null,null,null,!0);var ja=this.getCellGeometry(M);null!=ja&&(null!=K&&"1"==urlParams.sketch&&(f==mxConstants.DIRECTION_NORTH?P.y-=ja.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=ja.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-ja.width/2:P.x+ja.width/2),ja.x=P.x-ja.width/2,ja.y=P.y-ja.height/2);null!=l?(this.addCells([M],l,null,null,null,!0),n=null):G&&!S&&this.addCells([M],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(t)&&
+mxEvent.isShiftDown(t)&&G||null==n&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,M,this.createCurrentEdgeStyle());null!=da&&(L.push(da),this.applyNewEdgeStyle(b,[da],f),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(da,b));if(null==n&&null!=M&&null!=b.parent&&S&&f==mxConstants.DIRECTION_WEST){var ba=b.parent.getIndex(b);this.model.add(b.parent,M,ba)}null==n&&null!=M&&L.push(M);null==M&&null!=da&&da.geometry.setTerminalPoint(P,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted",
+"cells",[da]))}finally{this.model.endUpdate()}}if(null!=I)I(L);else return L});if(null==B||null!=M||!G||null==n&&S)return y(M);B(D+P.x*m,g+P.y*m,y)};
+Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var f=document.createElement("div"),m=[],t,y=0;y<b.length;y++)if(t=b[y],this.model.isVertex(t)||this.model.isEdge(t))this.isHtmlLabel(t)?(f.innerHTML=Graph.sanitizeHtml(this.getLabel(t)),t=mxUtils.extractTextWithWhitespace([f])):t=this.getLabel(t),t=mxUtils.trim(t.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<t.length&&m.push(t);return m.join(" ")};
+Graph.prototype.convertValueToString=function(b){var f=this.model.getValue(b);if(null!=f&&"object"==typeof f){var m=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){f=b.getAttribute("placeholder");for(var t=b;null==m&&null!=t;)null!=t.value&&"object"==typeof t.value&&(m=t.hasAttribute(f)?null!=t.getAttribute(f)?t.getAttribute(f):"":null),t=this.model.getParent(t)}else m=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(m=f.getAttribute("label_"+Graph.diagramLanguage)),
+null==m&&(m=f.getAttribute("label")||"");return m||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b,f){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),f||(b=mxUtils.removeJavascriptProtocol(b)),b):null};
Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,f){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
-Graph.prototype.updateHorizontalStyle=function(b,f){if(null!=b&&null!=f&&null!=this.layoutManager){var l=this.model.getParent(b);this.model.isVertex(l)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(l),null!=b&&b.constructor==mxStackLayout&&(f[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return f};
-Graph.prototype.replaceDefaultColors=function(b,f){if(null!=f&&null!=this.shapeBackgroundColor&&null!=this.shapeForegroundColor){b=this.shapeBackgroundColor;var l=this.shapeForegroundColor;this.replaceDefaultColor(f,mxConstants.STYLE_FONTCOLOR,l);this.replaceDefaultColor(f,mxConstants.STYLE_FILLCOLOR,b);this.replaceDefaultColor(f,mxConstants.STYLE_GRADIENTCOLOR,l);this.replaceDefaultColor(f,mxConstants.STYLE_STROKECOLOR,l);this.replaceDefaultColor(f,mxConstants.STYLE_IMAGE_BORDER,l);this.replaceDefaultColor(f,
-mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(f,mxConstants.STYLE_LABEL_BORDERCOLOR,l);this.replaceDefaultColor(f,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b);this.replaceDefaultColor(f,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b)}return f};Graph.prototype.replaceDefaultColor=function(b,f,l){null!=b&&null!=l&&"none"!=l&&""!=l&&"default"==b[f]&&(b[f]=this.getDefaultColor(b,f,l))};
-Graph.prototype.getDefaultColor=function(b,f,l){f="default"+f.charAt(0).toUpperCase()+f.substring(1);"invert"==b[f]&&(b=mxUtils.getLightDarkColor(l),l="light-dark("+b.dark+", "+b.light+")");return l};
+Graph.prototype.updateHorizontalStyle=function(b,f){if(null!=b&&null!=f&&null!=this.layoutManager){var m=this.model.getParent(b);this.model.isVertex(m)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(m),null!=b&&b.constructor==mxStackLayout&&(f[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return f};
+Graph.prototype.replaceDefaultColors=function(b,f){if(null!=f&&null!=this.shapeBackgroundColor&&null!=this.shapeForegroundColor){b=this.shapeBackgroundColor;var m=this.shapeForegroundColor;this.replaceDefaultColor(f,mxConstants.STYLE_FONTCOLOR,m);this.replaceDefaultColor(f,mxConstants.STYLE_FILLCOLOR,b);this.replaceDefaultColor(f,mxConstants.STYLE_GRADIENTCOLOR,m);this.replaceDefaultColor(f,mxConstants.STYLE_STROKECOLOR,m);this.replaceDefaultColor(f,mxConstants.STYLE_IMAGE_BORDER,m);this.replaceDefaultColor(f,
+mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(f,mxConstants.STYLE_LABEL_BORDERCOLOR,m);this.replaceDefaultColor(f,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b);this.replaceDefaultColor(f,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b)}return f};Graph.prototype.replaceDefaultColor=function(b,f,m){null!=b&&null!=m&&"none"!=m&&""!=m&&"default"==b[f]&&(b[f]=this.getDefaultColor(b,f,m))};
+Graph.prototype.getDefaultColor=function(b,f,m){f="default"+f.charAt(0).toUpperCase()+f.substring(1);"invert"==b[f]&&(b=mxUtils.getLightDarkColor(m),m="light-dark("+b.dark+", "+b.light+")");return m};
Graph.prototype.setAdaptiveColors=function(b){this.adaptiveColors="default"==b?null:b;"1"==urlParams.embedInline?null!=this.container&&(this.container.style.colorScheme="none"==this.getAdaptiveColors()?"light":""):(b=this.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.colorScheme="none"==this.getAdaptiveColors()?"light":""))};Graph.prototype.getAdaptiveColors=function(){return null!=this.adaptiveColors?this.adaptiveColors:Graph.defaultAdaptiveColors};
-Graph.prototype.updateAlternateBounds=function(b,f,l){if(null!=b&&null!=f&&null!=this.layoutManager&&null!=f.alternateBounds){var u=this.layoutManager.getLayout(this.model.getParent(b));null!=u&&u.constructor==mxStackLayout&&(u.horizontal?f.alternateBounds.height=0:f.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};
-Graph.prototype.moveCellsTo=function(b,f){if(null!=b&&null!=f){for(var l=!0,u=0;u<b.length&&l;u++)l=l&&this.model.isEdge(b[u]);u=null;if(1==b.length&&l){var y=this.getCellGeometry(b[0]);null!=y&&(u=y.getTerminalPoint(!0))}u=null!=u?u:this.getBoundingBoxFromGeometry(b,l);null!=u&&(l=Math.round(this.snap(f.x)),f=Math.round(this.snap(f.y)),this.cellsMoved(b,l-u.x,f-u.y))}};Graph.prototype.isMoveCellsEvent=function(b,f){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(f.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,f,l,u,y){f=null!=f?f:!1;null==l&&(l=this.getFoldableCells(this.getSelectionCells(),b));if(null!=l){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<l.length;q++){var C=this.view.getState(l[q]),J=this.getCellGeometry(l[q]);if(null!=C&&null!=J){var S=0,D=0;if(J.alternateBounds)S=J.width-J.alternateBounds.width,D=J.height-J.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;
-S=Math.round(J.width-C.width/P);D=Math.round(J.height-C.height/P)}if(0!=D||0!=S){var c=this.model.getParent(l[q]),g=this.layoutManager.getLayout(c);null==g?null!=y&&this.isMoveCellsEvent(y,C)&&this.moveSiblings(C,c,S,D):null!=y&&mxEvent.isAltDown(y)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(c,g,S,D)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(l)}};
-Graph.prototype.moveSiblings=function(b,f,l,u){this.model.beginUpdate();try{var y=this.getCellsBeyond(b.x,b.y,f,!0,!0);for(f=0;f<y.length;f++)if(y[f]!=b.cell){var q=this.view.getState(y[f]),C=this.getCellGeometry(y[f]);null!=q&&null!=C&&(C=C.clone(),C.translate(Math.round(l*Math.max(0,Math.min(1,(q.x-b.x)/b.width))),Math.round(u*Math.max(0,Math.min(1,(q.y-b.y)/b.height)))),this.model.setGeometry(y[f],C))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(b,f,l,u){if(null!=this.layoutManager&&null!=f&&f.constructor==mxStackLayout&&!f.resizeLast){this.model.beginUpdate();try{for(var y=f.horizontal;null!=b&&null!=f&&f.constructor==mxStackLayout&&f.horizontal==y&&!f.resizeLast;){var q=this.getCellGeometry(b),C=this.view.getState(b);null!=C&&null!=q&&(q=q.clone(),f.horizontal?q.width+=l+Math.min(0,C.width/this.view.scale-q.width):q.height+=u+Math.min(0,C.height/this.view.scale-q.height),this.model.setGeometry(b,
+Graph.prototype.updateAlternateBounds=function(b,f,m){if(null!=b&&null!=f&&null!=this.layoutManager&&null!=f.alternateBounds){var t=this.layoutManager.getLayout(this.model.getParent(b));null!=t&&t.constructor==mxStackLayout&&(t.horizontal?f.alternateBounds.height=0:f.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};
+Graph.prototype.moveCellsTo=function(b,f){if(null!=b&&null!=f){for(var m=!0,t=0;t<b.length&&m;t++)m=m&&this.model.isEdge(b[t]);t=null;if(1==b.length&&m){var y=this.getCellGeometry(b[0]);null!=y&&(t=y.getTerminalPoint(!0))}t=null!=t?t:this.getBoundingBoxFromGeometry(b,m);null!=t&&(m=Math.round(this.snap(f.x)),f=Math.round(this.snap(f.y)),this.cellsMoved(b,m-t.x,f-t.y))}};Graph.prototype.isMoveCellsEvent=function(b,f){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(f.style,"moveCells","0")};
+Graph.prototype.foldCells=function(b,f,m,t,y){f=null!=f?f:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),b));if(null!=m){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<m.length;q++){var B=this.view.getState(m[q]),I=this.getCellGeometry(m[q]);if(null!=B&&null!=I){var S=0,D=0;if(I.alternateBounds)S=I.width-I.alternateBounds.width,D=I.height-I.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;
+S=Math.round(I.width-B.width/P);D=Math.round(I.height-B.height/P)}if(0!=D||0!=S){var c=this.model.getParent(m[q]),g=this.layoutManager.getLayout(c);null==g?null!=y&&this.isMoveCellsEvent(y,B)&&this.moveSiblings(B,c,S,D):null!=y&&mxEvent.isAltDown(y)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(c,g,S,D)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(m)}};
+Graph.prototype.moveSiblings=function(b,f,m,t){this.model.beginUpdate();try{var y=this.getCellsBeyond(b.x,b.y,f,!0,!0);for(f=0;f<y.length;f++)if(y[f]!=b.cell){var q=this.view.getState(y[f]),B=this.getCellGeometry(y[f]);null!=q&&null!=B&&(B=B.clone(),B.translate(Math.round(m*Math.max(0,Math.min(1,(q.x-b.x)/b.width))),Math.round(t*Math.max(0,Math.min(1,(q.y-b.y)/b.height)))),this.model.setGeometry(y[f],B))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(b,f,m,t){if(null!=this.layoutManager&&null!=f&&f.constructor==mxStackLayout&&!f.resizeLast){this.model.beginUpdate();try{for(var y=f.horizontal;null!=b&&null!=f&&f.constructor==mxStackLayout&&f.horizontal==y&&!f.resizeLast;){var q=this.getCellGeometry(b),B=this.view.getState(b);null!=B&&null!=q&&(q=q.clone(),f.horizontal?q.width+=m+Math.min(0,B.width/this.view.scale-q.width):q.height+=t+Math.min(0,B.height/this.view.scale-q.height),this.model.setGeometry(b,
q));b=this.model.getParent(b);f=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var f=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=f.container:"1"==f.container};Graph.prototype.isCellConnectable=function(b){var f=this.getCurrentCellStyle(b);return!this.isCellLocked(this.getLayerForCell(b))&&(null!=f.connectable?"0"!=f.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};
-Graph.prototype.isLabelMovable=function(b){var f=this.getCurrentCellStyle(b);return null!=f.movableLabel?"0"!=f.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,f,l){l=l||this.getDefaultParent();this.isCellLocked(l)||mxGraph.prototype.selectCells.apply(this,arguments)};
-Graph.prototype.getSwimlaneAt=function(b,f,l){var u=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(u)&&(u=null);return u};Graph.prototype.isCellFoldable=function(b){var f=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&("1"==f.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=f.collapsible||!this.isContainer(b)&&"1"==f.collapsible))};
+Graph.prototype.isLabelMovable=function(b){var f=this.getCurrentCellStyle(b);return null!=f.movableLabel?"0"!=f.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,f,m){m=m||this.getDefaultParent();this.isCellLocked(m)||mxGraph.prototype.selectCells.apply(this,arguments)};
+Graph.prototype.getSwimlaneAt=function(b,f,m){var t=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(t)&&(t=null);return t};Graph.prototype.isCellFoldable=function(b){var f=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&("1"==f.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=f.collapsible||!this.isContainer(b)&&"1"==f.collapsible))};
Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,f){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitPages=function(b,f){var l=1;null==b&&(l=this.getPageLayout(),b=l.width,l=l.height);var u=this.pageScale,y=this.pageFormat,q=this.container.clientHeight-10;b=(this.container.clientWidth-10)/(b*y.width)/u;this.zoomTo(Math.floor(20*(f?b:Math.min(b,q/(l*y.height)/u)))/20);mxUtils.hasScrollbars(this.container)&&(b=this.getPagePadding(),this.container.scrollLeft=Math.min(b.x*this.view.scale,(this.container.scrollWidth-this.container.clientWidth)/2),f||(this.container.scrollTop=Math.min(b.y*
+Graph.prototype.fitPages=function(b,f){var m=1;null==b&&(m=this.getPageLayout(),b=m.width,m=m.height);var t=this.pageScale,y=this.pageFormat,q=this.container.clientHeight-10;b=(this.container.clientWidth-10)/(b*y.width)/t;this.zoomTo(Math.floor(20*(f?b:Math.min(b,q/(m*y.height)/t)))/20);mxUtils.hasScrollbars(this.container)&&(b=this.getPagePadding(),this.container.scrollLeft=Math.min(b.x*this.view.scale,(this.container.scrollWidth-this.container.clientWidth)/2),f||(this.container.scrollTop=Math.min(b.y*
this.view.scale,(this.container.scrollHeight-this.container.clientHeight)/2)))};
-Graph.prototype.fitWindow=function(b,f){f=null!=f?f:10;var l=this.container.clientWidth-f,u=this.container.clientHeight-f;this.zoomTo(Math.floor(20*Math.min(l/b.width,u/b.height))/20);mxUtils.hasScrollbars(this.container)&&window.setTimeout(mxUtils.bind(this,function(){var y=this.view.translate;this.container.scrollLeft=(b.x+y.x)*this.view.scale-Math.max((l-b.width*this.view.scale)/2+f/2,0);this.container.scrollTop=(b.y+y.y)*this.view.scale-Math.max((u-b.height*this.view.scale)/2+f/2,0)}),0)};
+Graph.prototype.fitWindow=function(b,f){f=null!=f?f:10;var m=this.container.clientWidth-f,t=this.container.clientHeight-f;this.zoomTo(Math.floor(20*Math.min(m/b.width,t/b.height))/20);mxUtils.hasScrollbars(this.container)&&window.setTimeout(mxUtils.bind(this,function(){var y=this.view.translate;this.container.scrollLeft=(b.x+y.x)*this.view.scale-Math.max((m-b.width*this.view.scale)/2+f/2,0);this.container.scrollTop=(b.y+y.y)*this.view.scale-Math.max((t-b.height*this.view.scale)/2+f/2,0)}),0)};
Graph.prototype.convertValueToTooltip=function(b){var f=null;mxUtils.isNode(b.value)&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.value.getAttribute("tooltip_"+Graph.diagramLanguage)),null==f&&(f=b.value.getAttribute("tooltip")),null!=f&&(null!=f&&this.isReplacePlaceholders(b)&&(f=this.replacePlaceholders(b,f)),f=Graph.sanitizeHtml(f)));return f};
-Graph.prototype.getTooltipForCell=function(b){var f="";if(mxUtils.isNode(b.value)&&(f=this.convertValueToTooltip(b),null==f)){var l=this.builtInProperties;b=b.value.attributes;var u=[];f="";this.isEnabled()&&(l.push("linkTarget"),l.push("link"));for(var y=0;y<b.length;y++)(Graph.translateDiagram&&"label"==b[y].nodeName||0>mxUtils.indexOf(l,b[y].nodeName))&&0<b[y].nodeValue.length&&u.push({name:b[y].nodeName,value:b[y].nodeValue});u.sort(function(q,C){return q.name<C.name?-1:q.name>C.name?1:0});for(y=
-0;y<u.length;y++)"link"==u[y].name&&this.isCustomLink(u[y].value)||(f+=("link"!=u[y].name?"<b>"+mxUtils.htmlEntities(u[y].name)+":</b> ":"")+mxUtils.htmlEntities(u[y].value)+"\n");0<f.length&&(f=f.substring(0,f.length-1),mxClient.IS_SVG&&(f='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+f+"</div>"))}return f};
-Graph.prototype.addFlowAnimationToNode=function(b,f,l,u){if(null!=b&&null!=u){var y=b.getAttribute("stroke-dasharray");if(""==y||null==y){var q=String(mxUtils.getValue(f,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");y=1==mxUtils.getValue(f,mxConstants.STYLE_FIX_DASH,!1)||null==f.dashPattern?1:mxUtils.getNumber(f,mxConstants.STYLE_STROKEWIDTH,1);if(0<q.length)for(var C=0;C<q.length;C++)q[C]=Math.round(Number(q[C])*l*y*100)/100;b.setAttribute("stroke-dasharray",q.join(" "))}else q=y.split(" ");if(0<
-q.length){for(C=y=0;C<q.length;C++){var J=parseFloat(q[C]);isNaN(J)||(y+=parseFloat(q[C]))}0!=q.length%2&&(y*=2);l=Math.round(y/l/16*parseInt(mxUtils.getValue(f,"flowAnimationDuration",500)));q=mxUtils.getValue(f,"flowAnimationTimingFunction","linear");f=mxUtils.getValue(f,"flowAnimationDirection","normal");b.style.animation=u+" "+l+"ms "+mxUtils.htmlEntities(q)+" infinite "+mxUtils.htmlEntities(f);b.style.strokeDashoffset=y}}};
+Graph.prototype.getTooltipForCell=function(b){var f="";if(mxUtils.isNode(b.value)&&(f=this.convertValueToTooltip(b),null==f)){var m=this.builtInProperties;b=b.value.attributes;var t=[];f="";this.isEnabled()&&(m.push("linkTarget"),m.push("link"));for(var y=0;y<b.length;y++)(Graph.translateDiagram&&"label"==b[y].nodeName||0>mxUtils.indexOf(m,b[y].nodeName))&&0<b[y].nodeValue.length&&t.push({name:b[y].nodeName,value:b[y].nodeValue});t.sort(function(q,B){return q.name<B.name?-1:q.name>B.name?1:0});for(y=
+0;y<t.length;y++)"link"==t[y].name&&this.isCustomLink(t[y].value)||(f+=("link"!=t[y].name?"<b>"+mxUtils.htmlEntities(t[y].name)+":</b> ":"")+mxUtils.htmlEntities(t[y].value)+"\n");0<f.length&&(f=f.substring(0,f.length-1),mxClient.IS_SVG&&(f='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+f+"</div>"))}return f};
+Graph.prototype.addFlowAnimationToNode=function(b,f,m,t){if(null!=b&&null!=t){var y=b.getAttribute("stroke-dasharray");if(""==y||null==y){var q=String(mxUtils.getValue(f,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");y=1==mxUtils.getValue(f,mxConstants.STYLE_FIX_DASH,!1)||null==f.dashPattern?1:mxUtils.getNumber(f,mxConstants.STYLE_STROKEWIDTH,1);if(0<q.length)for(var B=0;B<q.length;B++)q[B]=Math.round(Number(q[B])*m*y*100)/100;b.setAttribute("stroke-dasharray",q.join(" "))}else q=y.split(" ");if(0<
+q.length){for(B=y=0;B<q.length;B++){var I=parseFloat(q[B]);isNaN(I)||(y+=parseFloat(q[B]))}0!=q.length%2&&(y*=2);m=Math.round(y/m/16*parseInt(mxUtils.getValue(f,"flowAnimationDuration",500)));q=mxUtils.getValue(f,"flowAnimationTimingFunction","linear");f=mxUtils.getValue(f,"flowAnimationDirection","normal");b.style.animation=t+" "+m+"ms "+mxUtils.htmlEntities(q)+" infinite "+mxUtils.htmlEntities(f);b.style.strokeDashoffset=y}}};
Graph.prototype.addFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationId){this.flowAnimationId="ge-flow-animation-"+Editor.guid();var f=document.createElement("style");f.innerHTML=this.createFlowAnimationCss(this.flowAnimationId);b.appendChild(f)}return this.flowAnimationId};Graph.prototype.createFlowAnimationCss=function(b){return"@keyframes "+b+" {\n to {\n stroke-dashoffset: 0;\n }\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};
Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,f){return Graph.compress(b,f)};Graph.prototype.decompress=function(b,f){return Graph.decompress(b,f)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;
HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');
@@ -2482,233 +2486,233 @@ HoverIcons.prototype.refreshTarget=new mxImage("data:image/svg+xml;base64,PHN2Zy
38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"),mxConstants.DIRECTION_NORTH);this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"),mxConstants.DIRECTION_EAST);this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"),mxConstants.DIRECTION_SOUTH);this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"),mxConstants.DIRECTION_WEST);this.elts=[this.arrowUp,this.arrowRight,
this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);
-this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(l){null!=l.relatedTarget&&
-mxEvent.getSource(l)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(l){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(l){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(l.getEvent())||this.graph.model.isVertex(l.getCell())||this.reset()});var f=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(l,
-u){f=!1;l=u.getEvent();this.isResetEvent(l)?this.reset():this.isActive()||(u=this.getState(u.getState()),null==u&&mxEvent.isTouchEvent(l)||this.update(u));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(l,u){l=u.getEvent();this.isResetEvent(l)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(l)||this.update(this.getState(u.getState()),u.getGraphX(),u.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(f=!0)}),mouseUp:mxUtils.bind(this,
-function(l,u){l=u.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(l),mxEvent.getClientY(l));this.isResetEvent(l)?this.reset():this.isActive()&&!f&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),u):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(u.getGraphX(),u.getGraphY())))):mxEvent.isTouchEvent(l)||null!=
-this.bbox&&mxUtils.contains(this.bbox,u.getGraphX(),u.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(l)||this.reset();f=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,f){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
-HoverIcons.prototype.createArrow=function(b,f,l){var u=null;u=mxUtils.createImage(b.src);u.style.width=b.width+"px";u.style.height=b.height+"px";u.style.padding=this.tolerance+"px";null!=f&&u.setAttribute("title",f);u.style.position="absolute";u.style.cursor=this.cssCursor;mxEvent.addGestureListeners(u,mxUtils.bind(this,function(y){null==this.currentState||this.isResetEvent(y)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(y),mxEvent.getClientY(y)),this.drag(y,
-this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=u,this.setDisplay("none"),mxEvent.consume(y))}));mxEvent.redirectMouseEvents(u,this.graph,this.currentState);mxEvent.addListener(u,"mouseenter",mxUtils.bind(this,function(y){mxEvent.isMouseEvent(y)&&(null!=this.activeArrow&&this.activeArrow!=u&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(u,100),this.activeArrow=u,this.fireEvent(new mxEventObject("focus",
-"arrow",u,"direction",l,"event",y)))}));mxEvent.addListener(u,"mouseleave",mxUtils.bind(this,function(y){mxEvent.isMouseEvent(y)&&this.fireEvent(new mxEventObject("blur","arrow",u,"direction",l,"event",y));this.graph.isMouseDown||this.resetActiveArrow()}));return u};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
+this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(m){null!=m.relatedTarget&&
+mxEvent.getSource(m)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(m){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(m){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(m.getEvent())||this.graph.model.isVertex(m.getCell())||this.reset()});var f=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(m,
+t){f=!1;m=t.getEvent();this.isResetEvent(m)?this.reset():this.isActive()||(t=this.getState(t.getState()),null==t&&mxEvent.isTouchEvent(m)||this.update(t));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(m,t){m=t.getEvent();this.isResetEvent(m)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(m)||this.update(this.getState(t.getState()),t.getGraphX(),t.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(f=!0)}),mouseUp:mxUtils.bind(this,
+function(m,t){m=t.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(m),mxEvent.getClientY(m));this.isResetEvent(m)?this.reset():this.isActive()&&!f&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),t):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(t.getGraphX(),t.getGraphY())))):mxEvent.isTouchEvent(m)||null!=
+this.bbox&&mxUtils.contains(this.bbox,t.getGraphX(),t.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(m)||this.reset();f=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,f){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
+HoverIcons.prototype.createArrow=function(b,f,m){var t=null;t=mxUtils.createImage(b.src);t.style.width=b.width+"px";t.style.height=b.height+"px";t.style.padding=this.tolerance+"px";null!=f&&t.setAttribute("title",f);t.style.position="absolute";t.style.cursor=this.cssCursor;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(y){null==this.currentState||this.isResetEvent(y)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(y),mxEvent.getClientY(y)),this.drag(y,
+this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=t,this.setDisplay("none"),mxEvent.consume(y))}));mxEvent.redirectMouseEvents(t,this.graph,this.currentState);mxEvent.addListener(t,"mouseenter",mxUtils.bind(this,function(y){mxEvent.isMouseEvent(y)&&(null!=this.activeArrow&&this.activeArrow!=t&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(t,100),this.activeArrow=t,this.fireEvent(new mxEventObject("focus",
+"arrow",t,"direction",m,"event",y)))}));mxEvent.addListener(t,"mouseleave",mxUtils.bind(this,function(y){mxEvent.isMouseEvent(y)&&this.fireEvent(new mxEventObject("blur","arrow",t,"direction",m,"event",y));this.graph.isMouseDown||this.resetActiveArrow()}));return t};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var f=0;f<this.elts.length;f++)null!=this.elts[f]&&b(this.elts[f])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};
HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(f){f.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
-HoverIcons.prototype.drag=function(b,f,l){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,f,l),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,f=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=f&&f.setHandlesVisible(!1),f=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=f&&"orthogonalEdgeStyle"===
-mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),f.cell.style=mxUtils.setStyle(f.cell.style,"sourcePortConstraint",b),f.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,f,l){return this.graph.view.getState(this.graph.getCellAt(f,l))};
-HoverIcons.prototype.click=function(b,f,l){var u=l.getEvent(),y=l.getGraphX(),q=l.getGraphY();y=this.getStateAt(b,y,q);null==y||!this.graph.model.isEdge(y.cell)||this.graph.isCloneEvent(u)||y.getVisibleTerminalState(!0)!=b&&y.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,f,l):(this.graph.setSelectionCell(y.cell),this.reset());l.consume()};
-HoverIcons.prototype.execute=function(b,f,l){l=l.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,f,this.graph.defaultEdgeLength,l,this.graph.isCloneEvent(l),this.graph.isCloneEvent(l)),l,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
+HoverIcons.prototype.drag=function(b,f,m){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,f,m),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,f=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=f&&f.setHandlesVisible(!1),f=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=f&&"orthogonalEdgeStyle"===
+mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),f.cell.style=mxUtils.setStyle(f.cell.style,"sourcePortConstraint",b),f.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,f,m){return this.graph.view.getState(this.graph.getCellAt(f,m))};
+HoverIcons.prototype.click=function(b,f,m){var t=m.getEvent(),y=m.getGraphX(),q=m.getGraphY();y=this.getStateAt(b,y,q);null==y||!this.graph.model.isEdge(y.cell)||this.graph.isCloneEvent(t)||y.getVisibleTerminalState(!0)!=b&&y.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,f,m):(this.graph.setSelectionCell(y.cell),this.reset());m.consume()};
+HoverIcons.prototype.execute=function(b,f,m){m=m.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,f,this.graph.defaultEdgeLength,m,this.graph.isCloneEvent(m),this.graph.isCloneEvent(m)),m,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
-var f=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(f=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var l=null;null!=f&&(b.x-=f.horizontalOffset/2,b.y-=f.verticalOffset/2,b.width+=f.horizontalOffset,b.height+=f.verticalOffset,null!=f.rotationShape&&null!=f.rotationShape.node&&"hidden"!=f.rotationShape.node.style.visibility&&"none"!=f.rotationShape.node.style.display&&null!=f.rotationShape.boundingBox&&
-(l=f.rotationShape.boundingBox));f=mxUtils.bind(this,function(J,S,D){if(null!=l){var P=new mxRectangle(S,D,J.clientWidth,J.clientHeight);mxUtils.intersects(P,l)&&(J==this.arrowUp?D-=P.y+P.height-l.y:J==this.arrowRight?S+=l.x+l.width-P.x:J==this.arrowDown?D+=l.y+l.height-P.y:J==this.arrowLeft&&(S-=P.x+P.width-l.x))}J.style.left=S+"px";J.style.top=D+"px";mxUtils.setOpacity(J,this.inactiveOpacity)});f(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+var f=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(f=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var m=null;null!=f&&(b.x-=f.horizontalOffset/2,b.y-=f.verticalOffset/2,b.width+=f.horizontalOffset,b.height+=f.verticalOffset,null!=f.rotationShape&&null!=f.rotationShape.node&&"hidden"!=f.rotationShape.node.style.visibility&&"none"!=f.rotationShape.node.style.display&&null!=f.rotationShape.boundingBox&&
+(m=f.rotationShape.boundingBox));f=mxUtils.bind(this,function(I,S,D){if(null!=m){var P=new mxRectangle(S,D,I.clientWidth,I.clientHeight);mxUtils.intersects(P,m)&&(I==this.arrowUp?D-=P.y+P.height-m.y:I==this.arrowRight?S+=m.x+m.width-P.x:I==this.arrowDown?D+=m.y+m.height-P.y:I==this.arrowLeft&&(S-=P.x+P.width-m.x))}I.style.left=S+"px";I.style.top=D+"px";mxUtils.setOpacity(I,this.inactiveOpacity)});f(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));f(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));f(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));f(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){f=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var u=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),y=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=f&&f==u&&u==y&&y==b&&(b=y=u=f=null);var q=this.graph.getCellGeometry(this.currentState.cell),C=mxUtils.bind(this,function(J,S){var D=this.graph.model.isVertex(J)&&this.graph.getCellGeometry(J);null==J||this.graph.model.isAncestor(J,
-this.currentState.cell)||this.graph.isSwimlane(J)||!(null==D||null==q||D.height<3*q.height&&D.width<3*q.width)?S.style.visibility="visible":S.style.visibility="hidden"});C(f,this.arrowRight);C(u,this.arrowLeft);C(y,this.arrowUp);C(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var t=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),y=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=f&&f==t&&t==y&&y==b&&(b=y=t=f=null);var q=this.graph.getCellGeometry(this.currentState.cell),B=mxUtils.bind(this,function(I,S){var D=this.graph.model.isVertex(I)&&this.graph.getCellGeometry(I);null==I||this.graph.model.isAncestor(I,
+this.currentState.cell)||this.graph.isSwimlane(I)||!(null==D||null==q||D.height<3*q.height&&D.width<3*q.width)?S.style.visibility="visible":S.style.visibility="hidden"});B(f,this.arrowRight);B(t,this.arrowLeft);B(y,this.arrowUp);B(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(f){null!=f.parentNode&&(f=new mxRectangle(f.offsetLeft,f.offsetTop,f.offsetWidth,f.offsetHeight),null==b?b=f:b.add(f))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var f=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(b=f)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
-HoverIcons.prototype.update=function(b,f,l){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var u=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,u=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
-window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,f,l))}),this.updateDelay+10))):null!=this.startTime&&(u=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&u<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,f,l)?this.reset(!1):(null!=this.currentState||u>this.activationDelay)&&this.currentState!=b&&(u>this.updateDelay&&null!=
-b||null==this.bbox||null==f||null==l||!mxUtils.contains(this.bbox,f,l))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
+HoverIcons.prototype.update=function(b,f,m){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var t=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,t=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
+window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,f,m))}),this.updateDelay+10))):null!=this.startTime&&(t=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&t<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,f,m)?this.reset(!1):(null!=this.currentState||t>this.activationDelay)&&this.currentState!=b&&(t>this.updateDelay&&null!=
+b||null==this.bbox||null==f||null==m||!mxUtils.contains(this.bbox,f,m))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};
-Graph.prototype.removeTextStyleForCell=function(b,f){var l=this.getCurrentCellStyle(b),u=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(l,"html","0")){var y=this.convertValueToString(b);"0"!=mxUtils.getValue(l,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));y=Editor.convertHtmlToText(y);this.cellLabelChanged(b,y);u=!0}f&&(this.setCellStyles("fontSource",null,[b]),this.setCellStyles(mxConstants.STYLE_FONTFAMILY,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSIZE,
-null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSTYLE,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BORDERCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null,[b]))}finally{this.getModel().endUpdate()}return u};Graph.prototype.createParent=function(b,f,l,u,y){b=this.cloneCell(b);for(var q=0;q<l;q++){var C=this.cloneCell(f),J=this.getCellGeometry(C);null!=J&&(J.x+=q*u,J.y+=q*y);b.insert(C)}return b};
-Graph.prototype.createTable=function(b,f,l,u,y,q,C,J,S){l=null!=l?l:60;u=null!=u?u:40;q=null!=q?q:30;J=null!=J?J:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=y?y:"",0,0,f*l,b*u+(null!=y?q:0),null!=C?C:"shape=table;startSize="+(null!=y?q:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,f*l,u,J),this.createVertex(null,null,"",0,0,l,u,S),f,l,0),b,0,u)};
-Graph.prototype.setTableValues=function(b,f,l){for(var u=this.model.getChildCells(b,!0),y=0;y<u.length;y++)if(null!=l&&(u[y].value=l[y]),null!=f)for(var q=this.model.getChildCells(u[y],!0),C=0;C<q.length;C++)null!=f[y][C]&&(q[C].value=f[y][C]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,f,l,u,y,q,C,J,S){l=null!=l?l:120;u=null!=u?u:120;C=null!=C?C:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";J=null!=J?J:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";y=this.createVertex(null,null,null!=y?y:"",0,0,f*l,b*u,null!=q?q:"shape=table;childLayout=tableLayout;"+(null==y?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");q=mxUtils.getValue(this.getCellStyle(y),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);y.geometry.width+=q;y.geometry.height+=
-q;C=this.createVertex(null,null,"",0,q,f*l+q,u,C);y.insert(this.createParent(C,this.createVertex(null,null,"",q,0,l,u,J),f,l,0));return 1<b?(C.geometry.y=u+q,this.createParent(y,this.createParent(C,this.createVertex(null,null,"",q,0,l,u,S),f,l,0),b-1,0,u)):y};
-Graph.prototype.visitTableCells=function(b,f){var l=null,u=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<u.length;y++){for(var q=this.getActualStartSize(u[y],!0),C=this.model.getChildCells(u[y],!0),J=this.getCellStyle(u[y],!0),S=null,D=[],P=0;P<C.length;P++){var c=this.getCellGeometry(C[P]),g={cell:C[P],rospan:1,colspan:1,row:y,col:P,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;g.point=new mxPoint(c.width+(null!=S?S.point.x:b.x+q.x),c.height+(null!=l&&null!=
-l[0]?l[0].point.y:b.y+q.y));g.actual=g;null!=l&&null!=l[P]&&1<l[P].rowspan?(g.rowspan=l[P].rowspan-1,g.colspan=l[P].colspan,g.actual=l[P].actual):null!=S&&1<S.colspan?(g.rowspan=S.rowspan,g.colspan=S.colspan-1,g.actual=S.actual):(S=this.getCurrentCellStyle(C[P],!0),null!=S&&(g.rowspan=parseInt(S.rowspan||1),g.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(J,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;f(g,C.length,
-u.length,b.x+(S?q.x:0),b.y+(S?q.y:0));D.push(g);S=g}l=D}};Graph.prototype.getTableLines=function(b,f,l){var u=[],y=[];(f||l)&&this.visitTableCells(b,mxUtils.bind(this,function(q,C,J,S,D){f&&q.row<J-1&&(null==u[q.row]&&(u[q.row]=[new mxPoint(S,q.point.y)]),1<q.rowspan&&u[q.row].push(null),u[q.row].push(q.point));l&&q.col<C-1&&(null==y[q.col]&&(y[q.col]=[new mxPoint(q.point.x,D)]),1<q.colspan&&y[q.col].push(null),y[q.col].push(q.point))}));return u.concat(y)};
+Graph.prototype.removeTextStyleForCell=function(b,f){var m=this.getCurrentCellStyle(b),t=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(m,"html","0")){var y=this.convertValueToString(b);"0"!=mxUtils.getValue(m,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));y=Editor.convertHtmlToText(y);this.cellLabelChanged(b,y);t=!0}f&&(this.setCellStyles("fontSource",null,[b]),this.setCellStyles(mxConstants.STYLE_FONTFAMILY,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSIZE,
+null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSTYLE,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BORDERCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null,[b]))}finally{this.getModel().endUpdate()}return t};Graph.prototype.createParent=function(b,f,m,t,y){b=this.cloneCell(b);for(var q=0;q<m;q++){var B=this.cloneCell(f),I=this.getCellGeometry(B);null!=I&&(I.x+=q*t,I.y+=q*y);b.insert(B)}return b};
+Graph.prototype.createTable=function(b,f,m,t,y,q,B,I,S){m=null!=m?m:60;t=null!=t?t:40;q=null!=q?q:30;I=null!=I?I:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=y?y:"",0,0,f*m,b*t+(null!=y?q:0),null!=B?B:"shape=table;startSize="+(null!=y?q:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,f*m,t,I),this.createVertex(null,null,"",0,0,m,t,S),f,m,0),b,0,t)};
+Graph.prototype.setTableValues=function(b,f,m){for(var t=this.model.getChildCells(b,!0),y=0;y<t.length;y++)if(null!=m&&(t[y].value=m[y]),null!=f)for(var q=this.model.getChildCells(t[y],!0),B=0;B<q.length;B++)null!=f[y][B]&&(q[B].value=f[y][B]);return b};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,f,m,t,y,q,B,I,S){m=null!=m?m:120;t=null!=t?t:120;B=null!=B?B:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";I=null!=I?I:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";y=this.createVertex(null,null,null!=y?y:"",0,0,f*m,b*t,null!=q?q:"shape=table;childLayout=tableLayout;"+(null==y?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");q=mxUtils.getValue(this.getCellStyle(y),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);y.geometry.width+=q;y.geometry.height+=
+q;B=this.createVertex(null,null,"",0,q,f*m+q,t,B);y.insert(this.createParent(B,this.createVertex(null,null,"",q,0,m,t,I),f,m,0));return 1<b?(B.geometry.y=t+q,this.createParent(y,this.createParent(B,this.createVertex(null,null,"",q,0,m,t,S),f,m,0),b-1,0,t)):y};
+Graph.prototype.visitTableCells=function(b,f){var m=null,t=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<t.length;y++){for(var q=this.getActualStartSize(t[y],!0),B=this.model.getChildCells(t[y],!0),I=this.getCellStyle(t[y],!0),S=null,D=[],P=0;P<B.length;P++){var c=this.getCellGeometry(B[P]),g={cell:B[P],rospan:1,colspan:1,row:y,col:P,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;g.point=new mxPoint(c.width+(null!=S?S.point.x:b.x+q.x),c.height+(null!=m&&null!=
+m[0]?m[0].point.y:b.y+q.y));g.actual=g;null!=m&&null!=m[P]&&1<m[P].rowspan?(g.rowspan=m[P].rowspan-1,g.colspan=m[P].colspan,g.actual=m[P].actual):null!=S&&1<S.colspan?(g.rowspan=S.rowspan,g.colspan=S.colspan-1,g.actual=S.actual):(S=this.getCurrentCellStyle(B[P],!0),null!=S&&(g.rowspan=parseInt(S.rowspan||1),g.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(I,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(I,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;f(g,B.length,
+t.length,b.x+(S?q.x:0),b.y+(S?q.y:0));D.push(g);S=g}m=D}};Graph.prototype.getTableLines=function(b,f,m){var t=[],y=[];(f||m)&&this.visitTableCells(b,mxUtils.bind(this,function(q,B,I,S,D){f&&q.row<I-1&&(null==t[q.row]&&(t[q.row]=[new mxPoint(S,q.point.y)]),1<q.rowspan&&t[q.row].push(null),t[q.row].push(q.point));m&&q.col<B-1&&(null==y[q.col]&&(y[q.col]=[new mxPoint(q.point.x,D)]),1<q.colspan&&y[q.col].push(null),y[q.col].push(q.point))}));return t.concat(y)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,f,l){l=null!=l?l:!0;var u=this.getModel();u.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=f;u.setGeometry(b,y);var q=u.getParent(b),C=u.getChildCells(q,!0);if(!l){var J=mxUtils.indexOf(C,b);if(J<C.length-1){var S=C[J+1],D=this.getCellGeometry(S);null!=D&&(D=D.clone(),D.y+=f,D.height-=f,u.setGeometry(S,D))}}var P=this.getCellGeometry(q);null!=P&&(l||(l=b==C[C.length-1]),l&&(P=P.clone(),P.height+=f,u.setGeometry(q,P)))}}finally{u.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,f,l){l=null!=l?l:!1;var u=this.getModel(),y=u.getParent(b),q=u.getParent(y),C=u.getChildCells(y,!0);b=mxUtils.indexOf(C,b);var J=b==C.length-1;u.beginUpdate();try{for(var S=u.getChildCells(q,!0),D=0;D<S.length;D++){y=S[D];C=u.getChildCells(y,!0);var P=C[b],c=this.getCellGeometry(P);null!=c&&(c=c.clone(),c.width+=f,null!=c.alternateBounds&&(c.alternateBounds.width+=f),u.setGeometry(P,c));b<C.length-1&&(P=C[b+1],c=this.getCellGeometry(P),null!=c&&(c=c.clone(),
-c.x+=f,l||(c.width-=f,null!=c.alternateBounds&&(c.alternateBounds.width-=f)),u.setGeometry(P,c)))}if(J||l){var g=this.getCellGeometry(q);null!=g&&(g=g.clone(),g.width+=f,u.setGeometry(q,g))}null!=this.layoutManager&&this.layoutManager.executeLayout(q)}finally{u.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
-TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,f){for(var l=0,u=0;u<b.length;u++)if(!this.isVertexIgnored(b[u])){var y=this.graph.getCellGeometry(b[u]);null!=y&&(l+=f?y.width:y.height)}return l};
-TableLayout.prototype.getRowLayout=function(b,f){var l=this.graph.model.getChildCells(b,!0),u=this.graph.getActualStartSize(b,!0);b=this.getSize(l,!0);f=f-u.x-u.width;var y=[];u=u.x;for(var q=0;q<l.length;q++){var C=this.graph.getCellGeometry(l[q]);null!=C&&(u+=(null!=C.alternateBounds?C.alternateBounds.width:C.width)*f/b,y.push(Math.round(u)))}return y};
-TableLayout.prototype.layoutRow=function(b,f,l,u){var y=this.graph.getModel(),q=y.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var C=b.x,J=0;null!=f&&(f=f.slice(),f.splice(0,0,b.x));for(var S=0;S<q.length;S++){var D=this.graph.getCellGeometry(q[S]);null!=D&&(D=D.clone(),D.y=b.y,D.height=l-b.y-b.height,null!=f?(D.x=f[S],D.width=f[S+1]-D.x,S==q.length-1&&S<f.length-2&&(D.width=u-D.x-b.x-b.width)):(D.x=C,C+=D.width,S==q.length-1?D.width=u-b.x-b.width-J:J+=D.width),D.alternateBounds=new mxRectangle(0,
-0,D.width,D.height),y.setGeometry(q[S],D))}return J};
-TableLayout.prototype.execute=function(b){if(null!=b){var f=this.graph.getActualStartSize(b,!0),l=this.graph.getCellGeometry(b),u=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(u,"resizeLastRow","0"),q="1"==mxUtils.getValue(u,"resizeLast","0");u="1"==mxUtils.getValue(u,"fixedRows","0");var C=this.graph.getModel(),J=0;C.beginUpdate();try{for(var S=l.height-f.y-f.height,D=l.width-f.x-f.width,P=C.getChildCells(b,!0),c=0;c<P.length;c++)C.setVisible(P[c],!0);var g=this.getSize(P,!1);if(0<S&&0<D&&0<
-P.length&&0<g){if(y){var m=this.graph.getCellGeometry(P[P.length-1]);null!=m&&(m=m.clone(),m.height=S-g+m.height,C.setGeometry(P[P.length-1],m))}var n=q?null:this.getRowLayout(P[0],D),x=[],F=f.y;for(c=0;c<P.length;c++)m=this.graph.getCellGeometry(P[c]),null!=m&&(m=m.clone(),m.x=f.x,m.width=D,m.y=Math.round(F),F=y||u?F+m.height:F+m.height/g*S,m.height=Math.round(F)-m.y,C.setGeometry(P[c],m)),J=Math.max(J,this.layoutRow(P[c],n,m.height,D,x));u&&S<g&&(l=l.clone(),l.height=F+f.height,C.setGeometry(b,
-l));q&&D<J+Graph.minTableColumnWidth&&(l=l.clone(),l.width=J+f.width+f.x+Graph.minTableColumnWidth,C.setGeometry(b,l));this.graph.visitTableCells(b,mxUtils.bind(this,function(H){C.setVisible(H.cell,H.actual.cell==H.cell);if(H.actual.cell!=H.cell){if(H.actual.row==H.row){var M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo;H.actual.geo.width+=M.width}H.actual.col==H.col&&(M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo,H.actual.geo.height+=M.height)}}))}else for(c=0;c<P.length;c++)C.setVisible(P[c],
-!1)}finally{C.endUpdate()}}};
-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var f=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(c,g){g=null!=g?g:!0;var m=this.getState(c);null!=m&&g&&this.graph.model.isEdge(m.cell)&&null!=m.style&&1!=m.style[mxConstants.STYLE_CURVED]&&!m.invalid&&this.updateLineJumps(m)&&this.graph.cellRenderer.redraw(m,!1,this.isRendering());m=f.apply(this,
-arguments);null!=m&&g&&this.graph.model.isEdge(m.cell)&&null!=m.style&&1!=m.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(m);return m};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(c){var g=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
-g)for(var m=null,n=0;n<g.length;n++)if("hidden"!=g[n].getAttribute("visibility")){if(!(null!=m&&m!=g[n].getAttribute("d")||null!=c&&0!=--c))return g[n]}else null==m&&(m=g[n].getAttribute("d"));return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var l=mxShape.prototype.paint;mxShape.prototype.paint=function(c){l.apply(this,
-arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var u=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(c){c=u.apply(this,arguments);null!=this.state&&(c.adaptiveColors=this.state.view.graph.getAdaptiveColors());return c};var y=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(c,g){return y.apply(this,arguments)||null!=c.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,c.routedPoints)};
-var q=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(c){q.apply(this,arguments);this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(c)};mxGraphView.prototype.updateLineJumps=function(c){var g=c.absolutePoints;if(Graph.lineJumpsEnabled){var m=null!=c.routedPoints,n=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(c.style,"jumpStyle","none")){var x=function(V,k,v){var I=new mxPoint(k,v);I.type=V;n.push(I);
-I=null!=c.routedPoints?c.routedPoints[n.length-1]:null;return null==I||I.type!=V||I.x!=k||I.y!=v},F=.5*this.scale;m=!1;n=[];for(var H=0;H<g.length-1;H++){for(var M=g[H+1],L=g[H],K=[],Z=g[H+2];H<g.length-2&&mxUtils.ptSegDistSq(L.x,L.y,Z.x,Z.y,M.x,M.y)<1*this.scale*this.scale;)M=Z,H++,Z=g[H+2];m=x(0,L.x,L.y)||m;for(var ha=0;ha<this.validEdges.length;ha++){var ca=this.validEdges[ha],aa=ca.absolutePoints;if(null!=aa&&mxUtils.intersects(c,ca)&&"1"!=ca.style.noJump){var oa=null;for(ca=0;ca<aa.length-1;ca++){var da=
-aa[ca+1],ka=aa[ca];for(Z=aa[ca+2];ca<aa.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Z.x,Z.y,da.x,da.y)<1*this.scale*this.scale;)da=Z,ca++,Z=aa[ca+2];var ba=mxUtils.intersection(L.x,L.y,M.x,M.y,ka.x,ka.y,da.x,da.y);if(null!=ba&&(Math.abs(ba.x-L.x)>F||Math.abs(ba.y-L.y)>F)&&(Math.abs(ba.x-M.x)>F||Math.abs(ba.y-M.y)>F)&&(null==oa||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,oa.x,oa.y)>F||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,ka.x,ka.y)>F)&&(null==Z||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,Z.x,Z.y)>F||mxUtils.ptLineDist(L.x,
-L.y,M.x,M.y,da.x,da.y)>F)){Z=ba.x-L.x;oa=ba.y-L.y;ba={distSq:Z*Z+oa*oa,x:ba.x,y:ba.y};for(Z=0;Z<K.length;Z++)if(K[Z].distSq>ba.distSq){K.splice(Z,0,ba);ba=null;break}null==ba||0!=K.length&&K[K.length-1].x===ba.x&&K[K.length-1].y===ba.y||K.push(ba)}oa=ka}}}for(ca=0;ca<K.length;ca++)m=x(1,K[ca].x,K[ca].y)||m}ba=g[g.length-1];m=x(0,ba.x,ba.y)||m}c.routedPoints=n;return m}return!1};var C=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,g,m){this.routedPoints=null!=this.state?
-this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)C.apply(this,arguments);else{var n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,x=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,M=null,L=null,K=[],Z=null;c.begin();for(var ha=0;ha<this.state.routedPoints.length;ha++){var ca=
-this.state.routedPoints[ha],aa=new mxPoint(ca.x/this.scale,ca.y/this.scale);0==ha?aa=g[0]:ha==this.state.routedPoints.length-1&&(aa=g[g.length-1]);var oa=!1;if(null!=M&&1==ca.type){var da=this.state.routedPoints[ha+1];ca=da.x/this.scale-aa.x;da=da.y/this.scale-aa.y;ca=ca*ca+da*da;null==Z&&(Z=new mxPoint(aa.x-M.x,aa.y-M.y),L=Math.sqrt(Z.x*Z.x+Z.y*Z.y),0<L?(Z.x=Z.x*x/L,Z.y=Z.y*x/L):Z=null);ca>x*x&&0<L&&(ca=M.x-aa.x,da=M.y-aa.y,ca=ca*ca+da*da,ca>x*x&&(oa=new mxPoint(aa.x-Z.x,aa.y-Z.y),ca=new mxPoint(aa.x+
-Z.x,aa.y+Z.y),K.push(oa),this.addPoints(c,K,m,n,!1,null,H),K=0>Math.round(Z.x)||0==Math.round(Z.x)&&0>=Math.round(Z.y)?1:-1,H=!1,"sharp"==F?(c.lineTo(oa.x-Z.y*K,oa.y+Z.x*K),c.lineTo(ca.x-Z.y*K,ca.y+Z.x*K),c.lineTo(ca.x,ca.y)):"line"==F?(c.moveTo(oa.x+Z.y*K,oa.y-Z.x*K),c.lineTo(oa.x-Z.y*K,oa.y+Z.x*K),c.moveTo(ca.x-Z.y*K,ca.y+Z.x*K),c.lineTo(ca.x+Z.y*K,ca.y-Z.x*K),c.moveTo(ca.x,ca.y)):"arc"==F?(K*=1.3,c.curveTo(oa.x-Z.y*K,oa.y+Z.x*K,ca.x-Z.y*K,ca.y+Z.x*K,ca.x,ca.y)):(c.moveTo(ca.x,ca.y),H=!0),K=[ca],
-oa=!0))}else Z=null;oa||(K.push(aa),M=aa)}this.addPoints(c,K,m,n,!1,null,H);c.stroke()}};var J=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(c,g,m,n){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):J.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,g,m,n){if(null==g||null==c||"1"!=g.style.snapToPoint&&
-"1"!=c.style.snapToPoint)S.apply(this,arguments);else{g=this.getTerminalPort(c,g,n);var x=this.getNextPoint(c,m,n),F=this.graph.isOrthogonal(c),H=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=H){var L=Math.cos(-H),K=Math.sin(-H);x=mxUtils.getRotatedPoint(x,L,K,M)}L=parseFloat(c.style[mxConstants.STYLE_PERIMETER_SPACING]||0);L+=parseFloat(c.style[n?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
-0);x=this.getPerimeterPoint(g,x,0==H&&F,L);0!=H&&(L=Math.cos(H),K=Math.sin(H),x=mxUtils.getRotatedPoint(x,L,K,M));c.setAbsoluteTerminalPoint(this.snapToAnchorPoint(c,g,m,n,x),n)}};mxGraphView.prototype.snapToAnchorPoint=function(c,g,m,n,x){if(null!=g&&null!=c){c=this.graph.getAllConnectionConstraints(g);n=m=null;if(null!=c)for(var F=0;F<c.length;F++){var H=this.graph.getConnectionPoint(g,c[F]);if(null!=H){var M=(H.x-x.x)*(H.x-x.x)+(H.y-x.y)*(H.y-x.y);if(null==n||M<n)m=H,n=M}}null!=m&&(x=m)}return x};
-var D=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(c,g,m){var n=D.apply(this,arguments);"1"==c.getAttribute("placeholders")&&null!=m.state&&(n=m.state.view.graph.replacePlaceholders(m.state.cell,n));return n};var P=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(c){if(null!=c.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,
-8))try{var m=g.substring(8,g.length-1),n=mxUtils.parseXml(Graph.decompress(m));return new mxShape(new mxStencil(n.documentElement))}catch(x){null!=window.console&&console.log("Error in shape: "+x)}}return P.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(b){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[b]};
+Graph.prototype.setTableRowHeight=function(b,f,m){m=null!=m?m:!0;var t=this.getModel();t.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=f;t.setGeometry(b,y);var q=t.getParent(b),B=t.getChildCells(q,!0);if(!m){var I=mxUtils.indexOf(B,b);if(I<B.length-1){var S=B[I+1],D=this.getCellGeometry(S);null!=D&&(D=D.clone(),D.y+=f,D.height-=f,t.setGeometry(S,D))}}var P=this.getCellGeometry(q);null!=P&&(m||(m=b==B[B.length-1]),m&&(P=P.clone(),P.height+=f,t.setGeometry(q,P)))}}finally{t.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,f,m){m=null!=m?m:!1;var t=this.getModel(),y=t.getParent(b),q=t.getParent(y),B=t.getChildCells(y,!0);b=mxUtils.indexOf(B,b);var I=b==B.length-1;t.beginUpdate();try{for(var S=t.getChildCells(q,!0),D=0;D<S.length;D++){y=S[D];B=t.getChildCells(y,!0);var P=B[b],c=this.getCellGeometry(P);null!=c&&(c=c.clone(),c.width+=f,null!=c.alternateBounds&&(c.alternateBounds.width+=f),t.setGeometry(P,c));b<B.length-1&&(P=B[b+1],c=this.getCellGeometry(P),null!=c&&(c=c.clone(),
+c.x+=f,m||(c.width-=f,null!=c.alternateBounds&&(c.alternateBounds.width-=f)),t.setGeometry(P,c)))}if(I||m){var g=this.getCellGeometry(q);null!=g&&(g=g.clone(),g.width+=f,t.setGeometry(q,g))}null!=this.layoutManager&&this.layoutManager.executeLayout(q)}finally{t.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,f){for(var m=0,t=0;t<b.length;t++)if(!this.isVertexIgnored(b[t])){var y=this.graph.getCellGeometry(b[t]);null!=y&&(m+=f?y.width:y.height)}return m};
+TableLayout.prototype.getRowLayout=function(b,f){var m=this.graph.model.getChildCells(b,!0),t=this.graph.getActualStartSize(b,!0);b=this.getSize(m,!0);f=f-t.x-t.width;var y=[];t=t.x;for(var q=0;q<m.length;q++){var B=this.graph.getCellGeometry(m[q]);null!=B&&(t+=(null!=B.alternateBounds?B.alternateBounds.width:B.width)*f/b,y.push(Math.round(t)))}return y};
+TableLayout.prototype.layoutRow=function(b,f,m,t){var y=this.graph.getModel(),q=y.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var B=b.x,I=0;null!=f&&(f=f.slice(),f.splice(0,0,b.x));for(var S=0;S<q.length;S++){var D=this.graph.getCellGeometry(q[S]);null!=D&&(D=D.clone(),D.y=b.y,D.height=m-b.y-b.height,null!=f?(D.x=f[S],D.width=f[S+1]-D.x,S==q.length-1&&S<f.length-2&&(D.width=t-D.x-b.x-b.width)):(D.x=B,B+=D.width,S==q.length-1?D.width=t-b.x-b.width-I:I+=D.width),D.alternateBounds=new mxRectangle(0,
+0,D.width,D.height),y.setGeometry(q[S],D))}return I};
+TableLayout.prototype.execute=function(b){if(null!=b){var f=this.graph.getActualStartSize(b,!0),m=this.graph.getCellGeometry(b),t=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(t,"resizeLastRow","0"),q="1"==mxUtils.getValue(t,"resizeLast","0");t="1"==mxUtils.getValue(t,"fixedRows","0");var B=this.graph.getModel(),I=0;B.beginUpdate();try{for(var S=m.height-f.y-f.height,D=m.width-f.x-f.width,P=B.getChildCells(b,!0),c=0;c<P.length;c++)B.setVisible(P[c],!0);var g=this.getSize(P,!1);if(0<S&&0<D&&0<
+P.length&&0<g){if(y){var l=this.graph.getCellGeometry(P[P.length-1]);null!=l&&(l=l.clone(),l.height=S-g+l.height,B.setGeometry(P[P.length-1],l))}var n=q?null:this.getRowLayout(P[0],D),x=[],F=f.y;for(c=0;c<P.length;c++)l=this.graph.getCellGeometry(P[c]),null!=l&&(l=l.clone(),l.x=f.x,l.width=D,l.y=Math.round(F),F=y||t?F+l.height:F+l.height/g*S,l.height=Math.round(F)-l.y,B.setGeometry(P[c],l)),I=Math.max(I,this.layoutRow(P[c],n,l.height,D,x));t&&S<g&&(m=m.clone(),m.height=F+f.height,B.setGeometry(b,
+m));q&&D<I+Graph.minTableColumnWidth&&(m=m.clone(),m.width=I+f.width+f.x+Graph.minTableColumnWidth,B.setGeometry(b,m));this.graph.visitTableCells(b,mxUtils.bind(this,function(G){B.setVisible(G.cell,G.actual.cell==G.cell);if(G.actual.cell!=G.cell){if(G.actual.row==G.row){var L=null!=G.geo.alternateBounds?G.geo.alternateBounds:G.geo;G.actual.geo.width+=L.width}G.actual.col==G.col&&(L=null!=G.geo.alternateBounds?G.geo.alternateBounds:G.geo,G.actual.geo.height+=L.height)}}))}else for(c=0;c<P.length;c++)B.setVisible(P[c],
+!1)}finally{B.endUpdate()}}};
+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var f=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(c,g){g=null!=g?g:!0;var l=this.getState(c);null!=l&&g&&this.graph.model.isEdge(l.cell)&&null!=l.style&&1!=l.style[mxConstants.STYLE_CURVED]&&!l.invalid&&this.updateLineJumps(l)&&this.graph.cellRenderer.redraw(l,!1,this.isRendering());l=f.apply(this,
+arguments);null!=l&&g&&this.graph.model.isEdge(l.cell)&&null!=l.style&&1!=l.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(l);return l};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(c){var g=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
+g)for(var l=null,n=0;n<g.length;n++)if("hidden"!=g[n].getAttribute("visibility")){if(!(null!=l&&l!=g[n].getAttribute("d")||null!=c&&0!=--c))return g[n]}else null==l&&(l=g[n].getAttribute("d"));return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var m=mxShape.prototype.paint;mxShape.prototype.paint=function(c){m.apply(this,
+arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var t=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(c){c=t.apply(this,arguments);null!=this.state&&(c.adaptiveColors=this.state.view.graph.getAdaptiveColors());return c};var y=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(c,g){return y.apply(this,arguments)||null!=c.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,c.routedPoints)};
+var q=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(c){q.apply(this,arguments);this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(c)};mxGraphView.prototype.updateLineJumps=function(c){var g=c.absolutePoints;if(Graph.lineJumpsEnabled){var l=null!=c.routedPoints,n=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(c.style,"jumpStyle","none")){var x=function(V,k,v){var J=new mxPoint(k,v);J.type=V;n.push(J);
+J=null!=c.routedPoints?c.routedPoints[n.length-1]:null;return null==J||J.type!=V||J.x!=k||J.y!=v},F=.5*this.scale;l=!1;n=[];for(var G=0;G<g.length-1;G++){for(var L=g[G+1],M=g[G],K=[],Z=g[G+2];G<g.length-2&&mxUtils.ptSegDistSq(M.x,M.y,Z.x,Z.y,L.x,L.y)<1*this.scale*this.scale;)L=Z,G++,Z=g[G+2];l=x(0,M.x,M.y)||l;for(var ja=0;ja<this.validEdges.length;ja++){var da=this.validEdges[ja],ba=da.absolutePoints;if(null!=ba&&mxUtils.intersects(c,da)&&"1"!=da.style.noJump){var na=null;for(da=0;da<ba.length-1;da++){var ca=
+ba[da+1],ka=ba[da];for(Z=ba[da+2];da<ba.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Z.x,Z.y,ca.x,ca.y)<1*this.scale*this.scale;)ca=Z,da++,Z=ba[da+2];var aa=mxUtils.intersection(M.x,M.y,L.x,L.y,ka.x,ka.y,ca.x,ca.y);if(null!=aa&&(Math.abs(aa.x-M.x)>F||Math.abs(aa.y-M.y)>F)&&(Math.abs(aa.x-L.x)>F||Math.abs(aa.y-L.y)>F)&&(null==na||mxUtils.ptLineDist(M.x,M.y,L.x,L.y,na.x,na.y)>F||mxUtils.ptLineDist(M.x,M.y,L.x,L.y,ka.x,ka.y)>F)&&(null==Z||mxUtils.ptLineDist(M.x,M.y,L.x,L.y,Z.x,Z.y)>F||mxUtils.ptLineDist(M.x,
+M.y,L.x,L.y,ca.x,ca.y)>F)){Z=aa.x-M.x;na=aa.y-M.y;aa={distSq:Z*Z+na*na,x:aa.x,y:aa.y};for(Z=0;Z<K.length;Z++)if(K[Z].distSq>aa.distSq){K.splice(Z,0,aa);aa=null;break}null==aa||0!=K.length&&K[K.length-1].x===aa.x&&K[K.length-1].y===aa.y||K.push(aa)}na=ka}}}for(da=0;da<K.length;da++)l=x(1,K[da].x,K[da].y)||l}aa=g[g.length-1];l=x(0,aa.x,aa.y)||l}c.routedPoints=n;return l}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,g,l){this.routedPoints=null!=this.state?
+this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)B.apply(this,arguments);else{var n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,x=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,L=null,M=null,K=[],Z=null;c.begin();for(var ja=0;ja<this.state.routedPoints.length;ja++){var da=
+this.state.routedPoints[ja],ba=new mxPoint(da.x/this.scale,da.y/this.scale);0==ja?ba=g[0]:ja==this.state.routedPoints.length-1&&(ba=g[g.length-1]);var na=!1;if(null!=L&&1==da.type){var ca=this.state.routedPoints[ja+1];da=ca.x/this.scale-ba.x;ca=ca.y/this.scale-ba.y;da=da*da+ca*ca;null==Z&&(Z=new mxPoint(ba.x-L.x,ba.y-L.y),M=Math.sqrt(Z.x*Z.x+Z.y*Z.y),0<M?(Z.x=Z.x*x/M,Z.y=Z.y*x/M):Z=null);da>x*x&&0<M&&(da=L.x-ba.x,ca=L.y-ba.y,da=da*da+ca*ca,da>x*x&&(na=new mxPoint(ba.x-Z.x,ba.y-Z.y),da=new mxPoint(ba.x+
+Z.x,ba.y+Z.y),K.push(na),this.addPoints(c,K,l,n,!1,null,G),K=0>Math.round(Z.x)||0==Math.round(Z.x)&&0>=Math.round(Z.y)?1:-1,G=!1,"sharp"==F?(c.lineTo(na.x-Z.y*K,na.y+Z.x*K),c.lineTo(da.x-Z.y*K,da.y+Z.x*K),c.lineTo(da.x,da.y)):"line"==F?(c.moveTo(na.x+Z.y*K,na.y-Z.x*K),c.lineTo(na.x-Z.y*K,na.y+Z.x*K),c.moveTo(da.x-Z.y*K,da.y+Z.x*K),c.lineTo(da.x+Z.y*K,da.y-Z.x*K),c.moveTo(da.x,da.y)):"arc"==F?(K*=1.3,c.curveTo(na.x-Z.y*K,na.y+Z.x*K,da.x-Z.y*K,da.y+Z.x*K,da.x,da.y)):(c.moveTo(da.x,da.y),G=!0),K=[da],
+na=!0))}else Z=null;na||(K.push(ba),L=ba)}this.addPoints(c,K,l,n,!1,null,G);c.stroke()}};var I=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(c,g,l,n){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):I.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,g,l,n){if(null==g||null==c||"1"!=g.style.snapToPoint&&
+"1"!=c.style.snapToPoint)S.apply(this,arguments);else{g=this.getTerminalPort(c,g,n);var x=this.getNextPoint(c,l,n),F=this.graph.isOrthogonal(c),G=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),L=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=G){var M=Math.cos(-G),K=Math.sin(-G);x=mxUtils.getRotatedPoint(x,M,K,L)}M=parseFloat(c.style[mxConstants.STYLE_PERIMETER_SPACING]||0);M+=parseFloat(c.style[n?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+0);x=this.getPerimeterPoint(g,x,0==G&&F,M);0!=G&&(M=Math.cos(G),K=Math.sin(G),x=mxUtils.getRotatedPoint(x,M,K,L));c.setAbsoluteTerminalPoint(this.snapToAnchorPoint(c,g,l,n,x),n)}};mxGraphView.prototype.snapToAnchorPoint=function(c,g,l,n,x){if(null!=g&&null!=c){c=this.graph.getAllConnectionConstraints(g);n=l=null;if(null!=c)for(var F=0;F<c.length;F++){var G=this.graph.getConnectionPoint(g,c[F]);if(null!=G){var L=(G.x-x.x)*(G.x-x.x)+(G.y-x.y)*(G.y-x.y);if(null==n||L<n)l=G,n=L}}null!=l&&(x=l)}return x};
+var D=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(c,g,l){var n=D.apply(this,arguments);"1"==c.getAttribute("placeholders")&&null!=l.state&&(n=l.state.view.graph.replacePlaceholders(l.state.cell,n));return n};var P=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(c){if(null!=c.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,
+8))try{var l=g.substring(8,g.length-1),n=mxUtils.parseXml(Graph.decompress(l));return new mxShape(new mxStencil(n.documentElement))}catch(x){null!=window.console&&console.log("Error in shape: "+x)}}return P.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(b){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[b]};
mxStencilRegistry.setFileLoaded=function(b){mxStencilRegistry.filesLoaded[b]=!0};
-mxStencilRegistry.getStencil=function(b){var f=mxStencilRegistry.stencils[b];if(null==f&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var l=mxStencilRegistry.getBasenameForStencil(b);if(null!=l){f=mxStencilRegistry.libraries[l];if(null!=f){if(null==mxStencilRegistry.packages[l]){for(var u=0;u<f.length;u++){var y=f[u];if(!mxStencilRegistry.isFileLoaded(y))if(mxStencilRegistry.setFileLoaded(y),".xml"==y.toLowerCase().substring(y.length-4,y.length))mxStencilRegistry.loadStencilSet(y,
-null);else if(".js"==y.toLowerCase().substring(y.length-3,y.length))try{if(mxStencilRegistry.allowEval){var q=mxUtils.load(y);null!=q&&200<=q.getStatus()&&299>=q.getStatus()&&eval.call(window,q.getText())}}catch(C){null!=window.console&&console.log("error in getStencil:",b,l,f,y,C)}}mxStencilRegistry.packages[l]=1}}else l=l.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+l+".xml",null);f=mxStencilRegistry.stencils[b]}}return f};
-mxStencilRegistry.getBasenameForStencil=function(b){var f=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){f=b[1];for(var l=2;l<b.length-1;l++)f+="/"+b[l]}return f};
-mxStencilRegistry.loadStencilSet=function(b,f,l,u){var y=mxStencilRegistry.packages[b];if(null!=l&&l||null==y){var q=!1;if(null==y)try{if(u){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(C){null!=C&&null!=C.documentElement&&(mxStencilRegistry.packages[b]=C,q=!0,mxStencilRegistry.parseStencilSet(C.documentElement,f,q))}));return}y=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=y;q=!0}catch(C){null!=window.console&&console.log("error in loadStencilSet:",b,C)}null!=y&&null!=
-y.documentElement&&mxStencilRegistry.parseStencilSet(y.documentElement,f,q)}};mxStencilRegistry.loadStencil=function(b,f){if(null!=f)mxUtils.get(b,mxUtils.bind(this,function(l){f(200<=l.getStatus()&&299>=l.getStatus()?l.getXml():null)}),mxUtils.bind(this,function(l){f(null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var f=0;f<b.length;f++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[f]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(b,f,l){if("stencils"==b.nodeName)for(var u=b.firstChild;null!=u;)"shapes"==u.nodeName&&mxStencilRegistry.parseStencilSet(u,f,l),u=u.nextSibling;else{l=null!=l?l:!0;u=b.firstChild;var y="";b=b.getAttribute("name");for(null!=b&&(y=b+".");null!=u;){if(u.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=u.getAttribute("name"),null!=b)){y=y.toLowerCase();var q=b.replace(/ /g,"_");l&&mxStencilRegistry.addStencil(y+q.toLowerCase(),new mxStencil(u));if(null!=f){var C=u.getAttribute("w"),
-J=u.getAttribute("h");C=null==C?80:parseInt(C,10);J=null==J?80:parseInt(J,10);f(y,q,b,C,J)}}u=u.nextSibling}}};
-"undefined"!==typeof mxVertexHandler&&function(){function b(){var B=document.createElement("div");B.className="geHint";B.style.whiteSpace="nowrap";B.style.position="absolute";return B}function f(B,Q){switch(Q){case mxConstants.POINTS:return 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(3)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
+mxStencilRegistry.getStencil=function(b){var f=mxStencilRegistry.stencils[b];if(null==f&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var m=mxStencilRegistry.getBasenameForStencil(b);if(null!=m){f=mxStencilRegistry.libraries[m];if(null!=f){if(null==mxStencilRegistry.packages[m]){for(var t=0;t<f.length;t++){var y=f[t];if(!mxStencilRegistry.isFileLoaded(y))if(mxStencilRegistry.setFileLoaded(y),".xml"==y.toLowerCase().substring(y.length-4,y.length))mxStencilRegistry.loadStencilSet(y,
+null);else if(".js"==y.toLowerCase().substring(y.length-3,y.length))try{if(mxStencilRegistry.allowEval){var q=mxUtils.load(y);null!=q&&200<=q.getStatus()&&299>=q.getStatus()&&eval.call(window,q.getText())}}catch(B){null!=window.console&&console.log("error in getStencil:",b,m,f,y,B)}}mxStencilRegistry.packages[m]=1}}else m=m.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+m+".xml",null);f=mxStencilRegistry.stencils[b]}}return f};
+mxStencilRegistry.getBasenameForStencil=function(b){var f=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){f=b[1];for(var m=2;m<b.length-1;m++)f+="/"+b[m]}return f};
+mxStencilRegistry.loadStencilSet=function(b,f,m,t){var y=mxStencilRegistry.packages[b];if(null!=m&&m||null==y){var q=!1;if(null==y)try{if(t){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(B){null!=B&&null!=B.documentElement&&(mxStencilRegistry.packages[b]=B,q=!0,mxStencilRegistry.parseStencilSet(B.documentElement,f,q))}));return}y=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=y;q=!0}catch(B){null!=window.console&&console.log("error in loadStencilSet:",b,B)}null!=y&&null!=
+y.documentElement&&mxStencilRegistry.parseStencilSet(y.documentElement,f,q)}};mxStencilRegistry.loadStencil=function(b,f){if(null!=f)mxUtils.get(b,mxUtils.bind(this,function(m){f(200<=m.getStatus()&&299>=m.getStatus()?m.getXml():null)}),mxUtils.bind(this,function(m){f(null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var f=0;f<b.length;f++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[f]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(b,f,m){if("stencils"==b.nodeName)for(var t=b.firstChild;null!=t;)"shapes"==t.nodeName&&mxStencilRegistry.parseStencilSet(t,f,m),t=t.nextSibling;else{m=null!=m?m:!0;t=b.firstChild;var y="";b=b.getAttribute("name");for(null!=b&&(y=b+".");null!=t;){if(t.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=t.getAttribute("name"),null!=b)){y=y.toLowerCase();var q=b.replace(/ /g,"_");m&&mxStencilRegistry.addStencil(y+q.toLowerCase(),new mxStencil(t));if(null!=f){var B=t.getAttribute("w"),
+I=t.getAttribute("h");B=null==B?80:parseInt(B,10);I=null==I?80:parseInt(I,10);f(y,q,b,B,I)}}t=t.nextSibling}}};
+"undefined"!==typeof mxVertexHandler&&function(){function b(){var C=document.createElement("div");C.className="geHint";C.style.whiteSpace="nowrap";C.style.position="absolute";return C}function f(C,Q){switch(Q){case mxConstants.POINTS:return C;case mxConstants.MILLIMETERS:return(C/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(C/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(C/mxConstants.PIXELS_PER_INCH).toFixed(3)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=50;mxConstants.HIGHLIGHT_SIZE=
5;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#707070" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.resizeImage=Graph.createSvgImage(10,10,'<path d="Z" stroke="#C0C0C0" stroke-width="1" fill="none"/>').src;
-mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(B){return!mxEvent.isAltDown(B)||mxEvent.isShiftDown(B)};var l=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(B){return l.apply(this,arguments)||this.graph.isTableRow(B)||this.graph.isTableCell(B)};var u=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=
-function(B){return u.apply(this,arguments)||this.graph.isEdgeIgnored(B)};var y=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(B){return this.graph.isCloneEvent(B)!=y.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var B=new mxEllipse(null,this.highlightColor,this.highlightColor,0);B.opacity=mxConstants.HIGHLIGHT_OPACITY;return B};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=
-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(B){B=this.graph.createCurrentEdgeStyle();B=this.graph.createEdge(null,null,null,null,null,B);B=new mxCellState(this.graph.view,B,this.graph.getCellStyle(B));for(var Q in this.graph.currentEdgeStyle)B.style[Q]=this.graph.currentEdgeStyle[Q];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var X=JSON.parse(R);for(Q in X)B.style[Q]=X[Q]}catch(ia){}}B.style=this.graph.postProcessCellStyle(B.cell,B.style);return B};
-var q=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var B=q.apply(this,arguments);B.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return B};mxConnectionHandler.prototype.updatePreview=function(B){};var C=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=C.apply(this,arguments),Q=B.getCell;B.getCell=mxUtils.bind(this,function(R){var X=Q.apply(this,arguments);this.error=null;return X});
-return B};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var B="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",Q="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<Q.length;R++)null!=
-this.currentEdgeStyle[Q[R]]&&(B+=Q[R]+"="+this.currentEdgeStyle[Q[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?B+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(B+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?B+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(B+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
-";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(B+="elbow="+this.currentEdgeStyle.elbow+";");return B=null!=this.currentEdgeStyle.html?B+("html="+this.currentEdgeStyle.html+";"):B+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var B=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=
-B&&(new mxCodec(B.ownerDocument)).decode(B,this.getStylesheet())};Graph.prototype.createCellLookup=function(B,Q){Q=null!=Q?Q:{};for(var R=0;R<B.length;R++){var X=B[R];Q[mxObjectIdentity.get(X)]=X.getId();for(var ia=this.model.getChildCount(X),ja=0;ja<ia;ja++)this.createCellLookup([this.model.getChildAt(X,ja)],Q)}return Q};Graph.prototype.createCellMapping=function(B,Q,R){R=null!=R?R:{};for(var X in B){var ia=Q[X];null==R[ia]&&(R[ia]=B[X].getId()||"")}return R};Graph.prototype.importGraphModel=function(B,
-Q,R,X){Q=null!=Q?Q:0;R=null!=R?R:0;var ia=new mxCodec(B.ownerDocument),ja=new mxGraphModel;ia.decode(B,ja);B=[];ia={};var pa={},xa=ja.getChildren(this.cloneCell(ja.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ra=this.createCellLookup([ja.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ja=0;ja<xa.length;ja++)ua=this.model.getChildren(this.moveCells([xa[ja]],Q,R,!1,this.model.getRoot())[0]),null!=ua&&(B=B.concat(ua));else{var ua=
-ja.getChildren(xa[0]);null!=ua&&(B=this.moveCells(ua,Q,R,!1,this.getDefaultParent()),pa[ja.getChildAt(ja.root,0).getId()]=this.getDefaultParent().getId())}if(null!=B&&(this.createCellMapping(ia,ra,pa),this.updateCustomLinks(pa,B),X)){this.isGridEnabled()&&(Q=this.snap(Q),R=this.snap(R));var Ka=this.getBoundingBoxFromGeometry(B,!0);null!=Ka&&this.moveCells(B,Q-Ka.x,R-Ka.y)}}finally{this.model.endUpdate()}}return B};Graph.prototype.encodeCells=function(B){for(var Q={},R=this.cloneCells(B,null,Q),X=
-new mxDictionary,ia=0;ia<B.length;ia++)X.put(B[ia],!0);var ja=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ia=0;ia<R.length;ia++){pa.add(xa,R[ia]);var ra=this.view.getState(B[ia]);if(null!=ra){var ua=this.getCellGeometry(R[ia]);null!=ua&&ua.relative&&!this.model.isEdge(B[ia])&&null==X.get(this.model.getParent(B[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ra.x/ra.view.scale-ra.view.translate.x,ua.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(Q,
-this.createCellLookup(B)),R);return ja.encode(pa)};Graph.prototype.isSwimlane=function(B,Q){var R=null;null==B||this.model.isEdge(B)||this.model.getParent(B)==this.model.getRoot()||(R=this.getCurrentCellStyle(B,Q)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var J=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(B){return null!=B&&J.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellEditable(this.model.getParent(B)):
-!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(B){return null!=B&&S.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellMovable(this.model.getParent(B)):!0:!1};var D=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(B){var Q=this.model.getParent(B);if(null!=Q){var R=this.getCurrentCellStyle(Q);if(null!=R.expand)return"0"!=R.expand}return D.apply(this,arguments)&&(null==Q||!this.isTable(Q))};var P=Graph.prototype.splitEdge;
-Graph.prototype.splitEdge=function(B,Q,R,X,ia,ja,pa,xa){null==xa&&(xa=this.model.getParent(B),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ja,pa,null,!0,!1));R=null;this.model.beginUpdate();try{var ra=this.getCellGeometry(B);if(null!=ra&&null!=ra.points&&0<ra.points.length&&1==Q.length&&this.model.isVertex(Q[0])){var ua=this.getCellGeometry(Q[0]);if(null!=ua&&!ua.relative){var Ka=new mxRectangle(ua.x+X,ua.y+ia,ua.width,ua.height),Va=ra.points;ua=[];for(var Oa=0;Oa<Va.length;Oa++)Ka.intersectsPoint(Va[Oa].x,
-Va[Oa].y)||ua.push(Va[Oa]);ua.length<Va.length&&(ra=ra.clone(),ra.points=ua,this.model.setGeometry(B,ra))}}R=P.apply(this,[B,Q,R,X,ia,ja,pa,xa]);this.model.setValue(R,"");var Ta=this.getChildCells(R,!0);for(Oa=0;Oa<Ta.length;Oa++)ra=this.getCellGeometry(Ta[Oa]),null!=ra&&ra.relative&&0<ra.x&&this.model.remove(Ta[Oa]);var Za=this.getChildCells(B,!0);for(Oa=0;Oa<Za.length;Oa++)ra=this.getCellGeometry(Za[Oa]),null!=ra&&ra.relative&&0>=ra.x&&this.model.remove(Za[Oa]);var Pa=this.model.getTerminal(R,!1);
-if(null!=Pa){var Ra=this.getCurrentCellStyle(Pa);null!=Ra&&"1"==Ra.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[B]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(B,Q,R){if(Q||R)c.apply(this,arguments);else{var X=this.getSelectionCell(),ia=null,ja=[],pa=
-mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ja.push(xa),xa==X)ia=ja.length-1;else if(B&&null==X&&0<ja.length||null!=ia&&B&&ja.length>ia||!B&&0<ia)return;for(var ra=0;ra<this.model.getChildCount(xa);ra++)pa(this.model.getChildAt(xa,ra))});pa(this.model.root);0<ja.length&&(ia=null!=ia?mxUtils.mod(ia+(B?1:-1),ja.length):0,this.setSelectionCell(ja[ia]))}};Graph.prototype.swapShapes=function(B,Q){if(this.model.isVertex(B)&&this.model.isVertex(Q)&&
-2==this.getMovableCells([B,Q]).length){var R=this.getCellGeometry(B),X=this.getCellGeometry(Q);if(null!=R&&null!=X){var ia=R.clone(),ja=X.clone();this.model.beginUpdate();try{ia.x=X.getCenterX()-R.width/2,ia.y=X.getCenterY()-R.height/2,ja.x=R.getCenterX()-X.width/2,ja.y=R.getCenterY()-X.height/2,this.model.setGeometry(B,ia),this.model.setGeometry(Q,ja)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(B,Q,R,X,ia,ja,pa){pa=null!=pa?pa:{};if(this.isTable(ia)){for(var xa=
-[],ra=0;ra<B.length;ra++)this.isTable(B[ra])?xa=xa.concat(this.model.getChildCells(B[ra],!0).reverse()):xa.push(B[ra]);B=xa}this.model.beginUpdate();try{xa=[];for(ra=0;ra<B.length;ra++)if(null!=ia&&this.isTableRow(B[ra])){var ua=this.model.getParent(B[ra]),Ka=this.getCellGeometry(B[ra]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Ka&&this.isTable(ua)&&this.isTable(ia)&&(X||ua!=ia)){if(!X){var Va=this.getCellGeometry(ua);null!=Va&&(Va=Va.clone(),Va.height-=Ka.height,this.model.setGeometry(ua,
-Va))}Va=this.getCellGeometry(ia);null!=Va&&(Va=Va.clone(),Va.height+=Ka.height,this.model.setGeometry(ia,Va));var Oa=this.model.getChildCells(ia,!0);if(0<Oa.length){B[ra]=X?this.cloneCell(B[ra]):B[ra];var Ta=this.model.getChildCells(B[ra],!0),Za=this.model.getChildCells(Oa[0],!0),Pa=Za.length-Ta.length;if(0<Pa)for(var Ra=0;Ra<Pa;Ra++){var fb=this.cloneCell(Ta[Ta.length-1]);null!=fb&&(fb.value="",this.model.add(B[ra],fb))}else if(0>Pa)for(Ra=0;Ra>Pa;Ra--)this.model.remove(Ta[Ta.length+Ra-1]);Ta=this.model.getChildCells(B[ra],
-!0);for(Ra=0;Ra<Za.length;Ra++){var eb=this.getCellGeometry(Za[Ra]),bb=this.getCellGeometry(Ta[Ra]);null!=eb&&null!=bb&&(bb=bb.clone(),bb.width=eb.width,this.model.setGeometry(Ta[Ra],bb))}}}}var db=g.apply(this,arguments);for(ra=0;ra<xa.length;ra++)!X&&this.model.contains(xa[ra])&&0==this.model.getChildCount(xa[ra])&&this.model.remove(xa[ra]);X&&this.updateCustomLinks(this.createCellMapping(pa,this.createCellLookup(B)),db)}finally{this.model.endUpdate()}return db};var m=Graph.prototype.removeCells;
-Graph.prototype.removeCells=function(B,Q){var R=[];this.model.beginUpdate();try{for(var X=0;X<B.length;X++)if(this.isTableCell(B[X])){var ia=this.model.getParent(B[X]),ja=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ja)?0>mxUtils.indexOf(B,ja)&&0>mxUtils.indexOf(R,ja)&&R.push(ja):this.labelChanged(B[X],"")}else{if(this.isTableRow(B[X])&&(ja=this.model.getParent(B[X]),0>mxUtils.indexOf(B,ja)&&0>mxUtils.indexOf(R,ja))){for(var pa=this.model.getChildCells(ja,
-!0),xa=0,ra=0;ra<pa.length;ra++)0<=mxUtils.indexOf(B,pa[ra])&&xa++;xa==pa.length&&R.push(ja)}R.push(B[X])}R=m.apply(this,[R,Q])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(B,Q,R){R=null!=R?R:new Graph;for(var X=0;X<Q.length;X++)null!=Q[X]&&R.updateCustomLinksForCell(B,Q[X],R)};Graph.prototype.updateCustomLinksForCell=function(B,Q){this.doUpdateCustomLinksForCell(B,Q);for(var R=this.model.getChildCount(Q),X=0;X<R;X++)this.updateCustomLinksForCell(B,this.model.getChildAt(Q,
-X))};Graph.prototype.doUpdateCustomLinksForCell=function(B,Q){};Graph.prototype.getAllConnectionConstraints=function(B,Q){if(null!=B){Q=mxUtils.getValue(B.style,"points",null);if(null!=Q){B=[];try{var R=JSON.parse(Q);for(Q=0;Q<R.length;Q++){var X=R[Q];B.push(new mxConnectionConstraint(new mxPoint(X[0],X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(ja){}return B}if(null!=B.shape&&null!=B.shape.bounds){X=B.shape.direction;Q=B.shape.bounds;var ia=B.shape.scale;R=Q.width/
-ia;Q=Q.height/ia;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=R,R=Q,Q=X;Q=B.shape.getConstraints(B.style,R,Q);if(null!=Q)return Q;if(null!=B.shape.stencil&&null!=B.shape.stencil.constraints)return B.shape.stencil.constraints;if(null!=B.shape.constraints)return B.shape.constraints}}return null};Graph.prototype.flipEdge=function(B){if(null!=B){var Q=this.getCurrentCellStyle(B);Q=mxUtils.getValue(Q,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?
-mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,Q,[B])}};Graph.prototype.isValidRoot=function(B){for(var Q=this.model.getChildCount(B),R=0,X=0;X<Q;X++){var ia=this.model.getChildAt(B,X);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||R++)}return 0<R||this.isContainer(B)};Graph.prototype.isValidDropTarget=function(B,Q,R){for(var X=this.getCurrentCellStyle(B),ia=!0,ja=!0,pa=0;pa<Q.length&&ja;pa++)ia=ia&&this.isTable(Q[pa]),
-ja=ja&&this.isTableRow(Q[pa]);return!this.isCellLocked(B)&&(this.isTargetShape(B,Q,R)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(B))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(B))&&!this.isTableRow(B)&&(!this.isTable(B)||ja||ia))};Graph.prototype.createGroupCell=function(){var B=mxGraph.prototype.createGroupCell.apply(this,arguments);B.setStyle("group");return B};Graph.prototype.isExtendParentsOnAdd=function(B){var Q=
-mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(Q&&null!=B&&null!=this.layoutManager){var R=this.model.getParent(B);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(Q=!1))}return Q};Graph.prototype.getPreferredSizeForCell=function(B,Q,R){R=null!=R?R:this.gridEnabled;var X=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=X&&(X.width+=10,X.height+=4,R&&(X.width=this.snap(X.width),X.height=this.snap(X.height)));return X};Graph.prototype.turnShapes=
-function(B,Q){var R=this.getModel(),X=[];R.beginUpdate();try{for(var ia=0;ia<B.length;ia++){var ja=B[ia];if(R.isEdge(ja)){var pa=R.getTerminal(ja,!0),xa=R.getTerminal(ja,!1);R.setTerminal(ja,xa,!0);R.setTerminal(ja,pa,!1);var ra=R.getGeometry(ja);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var ua=ra.getTerminalPoint(!0),Ka=ra.getTerminalPoint(!1);ra.setTerminalPoint(ua,!1);ra.setTerminalPoint(Ka,!0);R.setGeometry(ja,ra);var Va=this.view.getState(ja),Oa=this.view.getState(pa),Ta=
-this.view.getState(xa);if(null!=Va){var Za=null!=Oa?this.getConnectionConstraint(Va,Oa,!0):null,Pa=null!=Ta?this.getConnectionConstraint(Va,Ta,!1):null;this.setConnectionConstraint(ja,pa,!0,Pa);this.setConnectionConstraint(ja,xa,!1,Za);var Ra=mxUtils.getValue(Va.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Va.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ja]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-Ra,[ja])}X.push(ja)}}else if(R.isVertex(ja)&&(ra=this.getCellGeometry(ja),null!=ra)){if(!(this.isTable(ja)||this.isTableRow(ja)||this.isTableCell(ja)||this.isSwimlane(ja))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var fb=ra.width;ra.width=ra.height;ra.height=fb;R.setGeometry(ja,ra)}var eb=this.view.getState(ja);if(null!=eb){var bb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],db=mxUtils.getValue(eb.style,
-mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,bb[mxUtils.mod(mxUtils.indexOf(bb,db)+(Q?-1:1),bb.length)],[ja])}X.push(ja)}}}finally{R.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(B){if(null!=B&&null!=B.fgNode)for(B=B.fgNode.firstChild;null!=B;){if("text"==B.nodeName&&"1"==B.getAttribute("placeholders"))return!0;B=B.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(B){if(B instanceof
-mxGeometryChange&&(this.isTableCell(B.cell)||this.isTableRow(B.cell))&&(null==B.previous&&null!=B.geometry||null!=B.previous&&!B.previous.equals(B.geometry))){var Q=B.cell;this.isTableCell(Q)&&(Q=this.model.getParent(Q));this.isTableRow(Q)&&(Q=this.model.getParent(Q));var R=this.view.getState(Q);null!=R&&null!=R.shape&&(this.view.invalidate(Q),R.shape.bounds=null)}n.apply(this,arguments);B instanceof mxValueChange&&null!=B.cell&&null!=B.cell.value&&"object"==typeof B.cell.value&&this.invalidateDescendantsWithPlaceholders(B.cell)};
-Graph.prototype.invalidateDescendantsWithPlaceholders=function(B){B=this.model.getDescendants(B);if(0<B.length)for(var Q=0;Q<B.length;Q++){var R=this.view.getState(B[Q]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(B[Q]):this.isReplacePlaceholders(B[Q])&&this.view.invalidate(B[Q],!1,!1)}};Graph.prototype.replaceElement=function(B,Q){Q=B.ownerDocument.createElement(null!=Q?Q:"span");for(var R=Array.prototype.slice.call(B.attributes);attr=
-R.pop();)Q.setAttribute(attr.nodeName,attr.nodeValue);Q.innerHTML=B.innerHTML;B.parentNode.replaceChild(Q,B)};Graph.prototype.processElements=function(B,Q){if(null!=B){B=B.getElementsByTagName("*");for(var R=0;R<B.length;R++)null!=B[R]&&Q(B[R])}};Graph.prototype.updateLabelElements=function(B,Q,R){B=null!=B?B:this.getSelectionCells();for(var X=document.createElement("div"),ia=0;ia<B.length;ia++){var ja=this.getCurrentCellStyle(B[ia]);if(null!=ja&&"1"==ja.html&&(ja=this.convertValueToString(B[ia]),
-null!=ja&&0<ja.length)){X.innerHTML=Graph.sanitizeHtml(ja);for(var pa=X.getElementsByTagName(null!=R?R:"*"),xa=0;xa<pa.length;xa++)Q(pa[xa]);X.innerHTML!=ja&&this.cellLabelChanged(B[ia],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(B,Q,R){Q=Graph.zapGremlins(Q);this.model.beginUpdate();try{if(null!=B.value&&"object"==typeof B.value){if(this.isReplacePlaceholders(B)&&null!=B.getAttribute("placeholder"))for(var X=B.getAttribute("placeholder"),ia=B;null!=ia;){if(ia==this.model.getRoot()||
-null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(X)){this.setAttributeForCell(ia,X,Q);break}ia=this.model.getParent(ia)}var ja=B.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ja.hasAttribute("label_"+Graph.diagramLanguage)?ja.setAttribute("label_"+Graph.diagramLanguage,Q):ja.setAttribute("label",Q);Q=ja}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(B){if(null!=B){for(var Q=new mxDictionary,
-R=0;R<B.length;R++)Q.put(B[R],!0);var X=[];for(R=0;R<B.length;R++){var ia=this.model.getParent(B[R]);null==ia||Q.get(ia)||(Q.put(ia,!0),X.push(ia))}for(R=0;R<X.length;R++)if(ia=this.view.getState(X[R]),null!=ia&&(this.model.isEdge(ia.cell)||this.model.isVertex(ia.cell))&&this.isCellDeletable(ia.cell)&&this.isTransparentState(ia)){for(var ja=!0,pa=0;pa<this.model.getChildCount(ia.cell)&&ja;pa++)Q.get(this.model.getChildAt(ia.cell,pa))||(ja=!1);ja&&B.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(B){for(var Q=[],R=0;R<B.length;R++)this.isCellDeletable(B[R])&&this.isTransparentState(this.view.getState(B[R]))&&Q.push(B[R]);B=Q;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(B,Q){this.setAttributeForCell(B,"link",Q)};Graph.prototype.setTooltipForCell=function(B,Q){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(B.value)&&B.value.hasAttribute("tooltip_"+
-Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(B,R,Q)};Graph.prototype.getAttributeForCell=function(B,Q,R){B=null!=B.value&&"object"===typeof B.value?B.value.getAttribute(Q):null;return null!=B?B:R};Graph.prototype.setAttributeForCell=function(B,Q,R){if(null!=B.value&&"object"==typeof B.value)var X=B.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),X.setAttribute("label",B.value||"");null!=R?X.setAttribute(Q,R):X.removeAttribute(Q);
-this.model.setValue(B,X)};Graph.prototype.isTargetShape=function(B,Q,R){B=mxUtils.getValue(this.getCurrentCellStyle(B),mxConstants.STYLE_SHAPE,"");for(R=0;R<Q.length;R++){var X=mxUtils.getValue(this.getCurrentCellStyle(Q[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(X,B))return!0}return!1};var x=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(B,Q,R,X){if(mxEvent.isAltDown(Q))return null;for(var ia=0;ia<B.length;ia++){var ja=this.model.getParent(B[ia]);if(this.model.isEdge(ja)&&
-0>mxUtils.indexOf(B,ja))return null}ja=x.apply(this,arguments);var pa=!0;for(ia=0;ia<B.length&&pa;ia++)pa=pa&&this.isTableRow(B[ia]);pa&&(this.isTableCell(ja)&&(ja=this.model.getParent(ja)),this.isTableRow(ja)&&(ja=this.model.getParent(ja)),this.isTable(ja)||(ja=null));return ja};Graph.prototype.click=function(B){mxGraph.prototype.click.call(this,B);this.firstClickState=B.getState();this.firstClickSource=B.getSource()};Graph.prototype.dblClick=function(B,Q){this.isEnabled()&&(Q=this.insertTextForEvent(B,
-Q),mxGraph.prototype.dblClick.call(this,B,Q))};Graph.prototype.insertTextForEvent=function(B,Q){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(B),mxEvent.getClientY(B));if(null!=B&&!this.model.isVertex(Q)){var X=this.model.isEdge(Q)?this.view.getState(Q):null,ia=mxEvent.getSource(B);this.firstClickState!=X||this.firstClickSource!=ia||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(B)))||
-(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==X&&(X=this.view.getState(this.getCellAt(R.x,R.y))),Q=this.addText(R.x,R.y,X))}return Q};Graph.prototype.getInsertPoint=function(B){B=this.getGridSize();var Q=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),
-ia=this.getPageSize();Q=Math.max(Q,X.x*ia.width);R=Math.max(R,X.y*ia.height)}return new mxPoint(this.snap(Q+B),this.snap(R+B))};Graph.prototype.getFreeInsertPoint=function(B){var Q=this.view,R=this.getGraphBounds(),X=this.getInsertPoint(B);B=this.snap(Math.round(Math.max(X.x,R.x/Q.scale-Q.translate.x+(0==R.width?2*this.gridSize:0))));Q=this.snap(Math.round(Math.max(X.y,(R.y+R.height)/Q.scale-Q.translate.y+2*this.gridSize)));return new mxPoint(B,Q)};Graph.prototype.getCenterInsertPoint=function(B){B=
-null!=B?B:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-B.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-B.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-B.width/2)),this.snap(Math.round(this.container.clientHeight/
-2/this.view.scale-this.view.translate.y-B.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(B,Q){B=null!=B?B:"";null!=Q&&(0<B.length&&";"!=B.charAt(B.length-1)&&(B+=";"),B+="fontSize="+Q+";");return B};Graph.prototype.addText=function(B,Q,R){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,0,0,0);X.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){X.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
-this.edgeFontSize);X.geometry.relative=!0;X.connectable=!1;var ia=this.view.getRelativePoint(R,B,Q);X.geometry.x=Math.round(1E4*ia.x)/1E4;X.geometry.y=Math.round(ia.y);X.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(R,X.geometry);var ja=this.view.scale;X.geometry.offset=new mxPoint(Math.round((B-ia.x)/ja),Math.round((Q-ia.y)/ja))}else ia=this.view.translate,X.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),X.geometry.width=
-40,X.geometry.height=20,X.geometry.x=Math.round(B/this.view.scale)-ia.x-(null!=R?R.origin.x:0),X.geometry.y=Math.round(Q/this.view.scale)-ia.y-(null!=R?R.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(B,Q,R){var X=mxUtils.bind(this,function(){var ra=this.container.getElementsByTagName("a");
-if(null!=ra)for(var ua=0;ua<ra.length;ua++){var Ka=this.getAbsoluteUrl(ra[ua].getAttribute("href"));null!=Ka&&(ra[ua].setAttribute("rel",this.linkRelation),ra[ua].setAttribute("href",Ka),null!=Q&&mxEvent.addGestureListeners(ra[ua],null,null,Q))}});this.model.addListener(mxEvent.CHANGE,X);X();var ia=this.container.style.cursor,ja=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=B&&""!=B&&B!=mxConstants.NONE?new mxCellHighlight(pa,B,4):null,startX:0,
+mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(C){return!mxEvent.isAltDown(C)||mxEvent.isShiftDown(C)};var m=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(C){return m.apply(this,arguments)||this.graph.isTableRow(C)||this.graph.isTableCell(C)};var t=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=
+function(C){return t.apply(this,arguments)||this.graph.isEdgeIgnored(C)};var y=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(C){return this.graph.isCloneEvent(C)!=y.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var C=new mxEllipse(null,this.highlightColor,this.highlightColor,0);C.opacity=mxConstants.HIGHLIGHT_OPACITY;return C};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=
+"crosshair";mxConnectionHandler.prototype.createEdgeState=function(C){C=this.graph.createCurrentEdgeStyle();C=this.graph.createEdge(null,null,null,null,null,C);C=new mxCellState(this.graph.view,C,this.graph.getCellStyle(C));for(var Q in this.graph.currentEdgeStyle)C.style[Q]=this.graph.currentEdgeStyle[Q];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var X=JSON.parse(R);for(Q in X)C.style[Q]=X[Q]}catch(ha){}}C.style=this.graph.postProcessCellStyle(C.cell,C.style);return C};
+var q=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var C=q.apply(this,arguments);C.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return C};mxConnectionHandler.prototype.updatePreview=function(C){};var B=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var C=B.apply(this,arguments),Q=C.getCell;C.getCell=mxUtils.bind(this,function(R){var X=Q.apply(this,arguments);this.error=null;return X});
+return C};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var C="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",Q="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<Q.length;R++)null!=
+this.currentEdgeStyle[Q[R]]&&(C+=Q[R]+"="+this.currentEdgeStyle[Q[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?C+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(C+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?C+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(C+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(C+="elbow="+this.currentEdgeStyle.elbow+";");return C=null!=this.currentEdgeStyle.html?C+("html="+this.currentEdgeStyle.html+";"):C+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var C=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=
+C&&(new mxCodec(C.ownerDocument)).decode(C,this.getStylesheet())};Graph.prototype.createCellLookup=function(C,Q){Q=null!=Q?Q:{};for(var R=0;R<C.length;R++){var X=C[R];Q[mxObjectIdentity.get(X)]=X.getId();for(var ha=this.model.getChildCount(X),ia=0;ia<ha;ia++)this.createCellLookup([this.model.getChildAt(X,ia)],Q)}return Q};Graph.prototype.createCellMapping=function(C,Q,R){R=null!=R?R:{};for(var X in C){var ha=Q[X];null==R[ha]&&(R[ha]=C[X].getId()||"")}return R};Graph.prototype.importGraphModel=function(C,
+Q,R,X){Q=null!=Q?Q:0;R=null!=R?R:0;var ha=new mxCodec(C.ownerDocument),ia=new mxGraphModel;ha.decode(C,ia);C=[];ha={};var pa={},xa=ia.getChildren(this.cloneCell(ia.root,this.isCloneInvalidEdges(),ha));if(null!=xa){var ra=this.createCellLookup([ia.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ia=0;ia<xa.length;ia++)ua=this.model.getChildren(this.moveCells([xa[ia]],Q,R,!1,this.model.getRoot())[0]),null!=ua&&(C=C.concat(ua));else{var ua=
+ia.getChildren(xa[0]);null!=ua&&(C=this.moveCells(ua,Q,R,!1,this.getDefaultParent()),pa[ia.getChildAt(ia.root,0).getId()]=this.getDefaultParent().getId())}if(null!=C&&(this.createCellMapping(ha,ra,pa),this.updateCustomLinks(pa,C),X)){this.isGridEnabled()&&(Q=this.snap(Q),R=this.snap(R));var Ka=this.getBoundingBoxFromGeometry(C,!0);null!=Ka&&this.moveCells(C,Q-Ka.x,R-Ka.y)}}finally{this.model.endUpdate()}}return C};Graph.prototype.encodeCells=function(C){for(var Q={},R=this.cloneCells(C,null,Q),X=
+new mxDictionary,ha=0;ha<C.length;ha++)X.put(C[ha],!0);var ia=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ha=0;ha<R.length;ha++){pa.add(xa,R[ha]);var ra=this.view.getState(C[ha]);if(null!=ra){var ua=this.getCellGeometry(R[ha]);null!=ua&&ua.relative&&!this.model.isEdge(C[ha])&&null==X.get(this.model.getParent(C[ha]))&&(ua.offset=null,ua.relative=!1,ua.x=ra.x/ra.view.scale-ra.view.translate.x,ua.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(Q,
+this.createCellLookup(C)),R);return ia.encode(pa)};Graph.prototype.isSwimlane=function(C,Q){var R=null;null==C||this.model.isEdge(C)||this.model.getParent(C)==this.model.getRoot()||(R=this.getCurrentCellStyle(C,Q)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var I=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(C){return null!=C&&I.apply(this,arguments)?this.isTableCell(C)||this.isTableRow(C)?this.isCellEditable(this.model.getParent(C)):
+!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(C){return null!=C&&S.apply(this,arguments)?this.isTableCell(C)||this.isTableRow(C)?this.isCellMovable(this.model.getParent(C)):!0:!1};var D=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(C){var Q=this.model.getParent(C);if(null!=Q){var R=this.getCurrentCellStyle(Q);if(null!=R.expand)return"0"!=R.expand}return D.apply(this,arguments)&&(null==Q||!this.isTable(Q))};var P=Graph.prototype.splitEdge;
+Graph.prototype.splitEdge=function(C,Q,R,X,ha,ia,pa,xa){null==xa&&(xa=this.model.getParent(C),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ia,pa,null,!0,!1));R=null;this.model.beginUpdate();try{var ra=this.getCellGeometry(C);if(null!=ra&&null!=ra.points&&0<ra.points.length&&1==Q.length&&this.model.isVertex(Q[0])){var ua=this.getCellGeometry(Q[0]);if(null!=ua&&!ua.relative){var Ka=new mxRectangle(ua.x+X,ua.y+ha,ua.width,ua.height),Va=ra.points;ua=[];for(var Oa=0;Oa<Va.length;Oa++)Ka.intersectsPoint(Va[Oa].x,
+Va[Oa].y)||ua.push(Va[Oa]);ua.length<Va.length&&(ra=ra.clone(),ra.points=ua,this.model.setGeometry(C,ra))}}R=P.apply(this,[C,Q,R,X,ha,ia,pa,xa]);this.model.setValue(R,"");var Ta=this.getChildCells(R,!0);for(Oa=0;Oa<Ta.length;Oa++)ra=this.getCellGeometry(Ta[Oa]),null!=ra&&ra.relative&&0<ra.x&&this.model.remove(Ta[Oa]);var Za=this.getChildCells(C,!0);for(Oa=0;Oa<Za.length;Oa++)ra=this.getCellGeometry(Za[Oa]),null!=ra&&ra.relative&&0>=ra.x&&this.model.remove(Za[Oa]);var Pa=this.model.getTerminal(R,!1);
+if(null!=Pa){var Ra=this.getCurrentCellStyle(Pa);null!=Ra&&"1"==Ra.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[C]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[C]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(C,Q,R){if(Q||R)c.apply(this,arguments);else{var X=this.getSelectionCell(),ha=null,ia=[],pa=
+mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ia.push(xa),xa==X)ha=ia.length-1;else if(C&&null==X&&0<ia.length||null!=ha&&C&&ia.length>ha||!C&&0<ha)return;for(var ra=0;ra<this.model.getChildCount(xa);ra++)pa(this.model.getChildAt(xa,ra))});pa(this.model.root);0<ia.length&&(ha=null!=ha?mxUtils.mod(ha+(C?1:-1),ia.length):0,this.setSelectionCell(ia[ha]))}};Graph.prototype.swapShapes=function(C,Q){if(this.model.isVertex(C)&&this.model.isVertex(Q)&&
+2==this.getMovableCells([C,Q]).length){var R=this.getCellGeometry(C),X=this.getCellGeometry(Q);if(null!=R&&null!=X){var ha=R.clone(),ia=X.clone();this.model.beginUpdate();try{ha.x=X.getCenterX()-R.width/2,ha.y=X.getCenterY()-R.height/2,ia.x=R.getCenterX()-X.width/2,ia.y=R.getCenterY()-X.height/2,this.model.setGeometry(C,ha),this.model.setGeometry(Q,ia)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(C,Q,R,X,ha,ia,pa){pa=null!=pa?pa:{};if(this.isTable(ha)){for(var xa=
+[],ra=0;ra<C.length;ra++)this.isTable(C[ra])?xa=xa.concat(this.model.getChildCells(C[ra],!0).reverse()):xa.push(C[ra]);C=xa}this.model.beginUpdate();try{xa=[];for(ra=0;ra<C.length;ra++)if(null!=ha&&this.isTableRow(C[ra])){var ua=this.model.getParent(C[ra]),Ka=this.getCellGeometry(C[ra]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Ka&&this.isTable(ua)&&this.isTable(ha)&&(X||ua!=ha)){if(!X){var Va=this.getCellGeometry(ua);null!=Va&&(Va=Va.clone(),Va.height-=Ka.height,this.model.setGeometry(ua,
+Va))}Va=this.getCellGeometry(ha);null!=Va&&(Va=Va.clone(),Va.height+=Ka.height,this.model.setGeometry(ha,Va));var Oa=this.model.getChildCells(ha,!0);if(0<Oa.length){C[ra]=X?this.cloneCell(C[ra]):C[ra];var Ta=this.model.getChildCells(C[ra],!0),Za=this.model.getChildCells(Oa[0],!0),Pa=Za.length-Ta.length;if(0<Pa)for(var Ra=0;Ra<Pa;Ra++){var fb=this.cloneCell(Ta[Ta.length-1]);null!=fb&&(fb.value="",this.model.add(C[ra],fb))}else if(0>Pa)for(Ra=0;Ra>Pa;Ra--)this.model.remove(Ta[Ta.length+Ra-1]);Ta=this.model.getChildCells(C[ra],
+!0);for(Ra=0;Ra<Za.length;Ra++){var eb=this.getCellGeometry(Za[Ra]),bb=this.getCellGeometry(Ta[Ra]);null!=eb&&null!=bb&&(bb=bb.clone(),bb.width=eb.width,this.model.setGeometry(Ta[Ra],bb))}}}}var db=g.apply(this,arguments);for(ra=0;ra<xa.length;ra++)!X&&this.model.contains(xa[ra])&&0==this.model.getChildCount(xa[ra])&&this.model.remove(xa[ra]);X&&this.updateCustomLinks(this.createCellMapping(pa,this.createCellLookup(C)),db)}finally{this.model.endUpdate()}return db};var l=Graph.prototype.removeCells;
+Graph.prototype.removeCells=function(C,Q){var R=[];this.model.beginUpdate();try{for(var X=0;X<C.length;X++)if(this.isTableCell(C[X])){var ha=this.model.getParent(C[X]),ia=this.model.getParent(ha);1==this.model.getChildCount(ha)&&1==this.model.getChildCount(ia)?0>mxUtils.indexOf(C,ia)&&0>mxUtils.indexOf(R,ia)&&R.push(ia):this.labelChanged(C[X],"")}else{if(this.isTableRow(C[X])&&(ia=this.model.getParent(C[X]),0>mxUtils.indexOf(C,ia)&&0>mxUtils.indexOf(R,ia))){for(var pa=this.model.getChildCells(ia,
+!0),xa=0,ra=0;ra<pa.length;ra++)0<=mxUtils.indexOf(C,pa[ra])&&xa++;xa==pa.length&&R.push(ia)}R.push(C[X])}R=l.apply(this,[R,Q])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(C,Q,R){R=null!=R?R:new Graph;for(var X=0;X<Q.length;X++)null!=Q[X]&&R.updateCustomLinksForCell(C,Q[X],R)};Graph.prototype.updateCustomLinksForCell=function(C,Q){this.doUpdateCustomLinksForCell(C,Q);for(var R=this.model.getChildCount(Q),X=0;X<R;X++)this.updateCustomLinksForCell(C,this.model.getChildAt(Q,
+X))};Graph.prototype.doUpdateCustomLinksForCell=function(C,Q){};Graph.prototype.getAllConnectionConstraints=function(C,Q){if(null!=C){Q=mxUtils.getValue(C.style,"points",null);if(null!=Q){C=[];try{var R=JSON.parse(Q);for(Q=0;Q<R.length;Q++){var X=R[Q];C.push(new mxConnectionConstraint(new mxPoint(X[0],X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(ia){}return C}if(null!=C.shape&&null!=C.shape.bounds){X=C.shape.direction;Q=C.shape.bounds;var ha=C.shape.scale;R=Q.width/
+ha;Q=Q.height/ha;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=R,R=Q,Q=X;Q=C.shape.getConstraints(C.style,R,Q);if(null!=Q)return Q;if(null!=C.shape.stencil&&null!=C.shape.stencil.constraints)return C.shape.stencil.constraints;if(null!=C.shape.constraints)return C.shape.constraints}}return null};Graph.prototype.flipEdge=function(C){if(null!=C){var Q=this.getCurrentCellStyle(C);Q=mxUtils.getValue(Q,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?
+mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,Q,[C])}};Graph.prototype.isValidRoot=function(C){for(var Q=this.model.getChildCount(C),R=0,X=0;X<Q;X++){var ha=this.model.getChildAt(C,X);this.model.isVertex(ha)&&(ha=this.getCellGeometry(ha),null==ha||ha.relative||R++)}return 0<R||this.isContainer(C)};Graph.prototype.isValidDropTarget=function(C,Q,R){for(var X=this.getCurrentCellStyle(C),ha=!0,ia=!0,pa=0;pa<Q.length&&ia;pa++)ha=ha&&this.isTable(Q[pa]),
+ia=ia&&this.isTableRow(Q[pa]);return!this.isCellLocked(C)&&(this.isTargetShape(C,Q,R)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(C))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(C))&&!this.isTableRow(C)&&(!this.isTable(C)||ia||ha))};Graph.prototype.createGroupCell=function(){var C=mxGraph.prototype.createGroupCell.apply(this,arguments);C.setStyle("group");return C};Graph.prototype.isExtendParentsOnAdd=function(C){var Q=
+mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(Q&&null!=C&&null!=this.layoutManager){var R=this.model.getParent(C);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(Q=!1))}return Q};Graph.prototype.getPreferredSizeForCell=function(C,Q,R){R=null!=R?R:this.gridEnabled;var X=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=X&&(X.width+=10,X.height+=4,R&&(X.width=this.snap(X.width),X.height=this.snap(X.height)));return X};Graph.prototype.turnShapes=
+function(C,Q){var R=this.getModel(),X=[];R.beginUpdate();try{for(var ha=0;ha<C.length;ha++){var ia=C[ha];if(R.isEdge(ia)){var pa=R.getTerminal(ia,!0),xa=R.getTerminal(ia,!1);R.setTerminal(ia,xa,!0);R.setTerminal(ia,pa,!1);var ra=R.getGeometry(ia);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var ua=ra.getTerminalPoint(!0),Ka=ra.getTerminalPoint(!1);ra.setTerminalPoint(ua,!1);ra.setTerminalPoint(Ka,!0);R.setGeometry(ia,ra);var Va=this.view.getState(ia),Oa=this.view.getState(pa),Ta=
+this.view.getState(xa);if(null!=Va){var Za=null!=Oa?this.getConnectionConstraint(Va,Oa,!0):null,Pa=null!=Ta?this.getConnectionConstraint(Va,Ta,!1):null;this.setConnectionConstraint(ia,pa,!0,Pa);this.setConnectionConstraint(ia,xa,!1,Za);var Ra=mxUtils.getValue(Va.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Va.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ia]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+Ra,[ia])}X.push(ia)}}else if(R.isVertex(ia)&&(ra=this.getCellGeometry(ia),null!=ra)){if(!(this.isTable(ia)||this.isTableRow(ia)||this.isTableCell(ia)||this.isSwimlane(ia))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var fb=ra.width;ra.width=ra.height;ra.height=fb;R.setGeometry(ia,ra)}var eb=this.view.getState(ia);if(null!=eb){var bb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],db=mxUtils.getValue(eb.style,
+mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,bb[mxUtils.mod(mxUtils.indexOf(bb,db)+(Q?-1:1),bb.length)],[ia])}X.push(ia)}}}finally{R.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(C){if(null!=C&&null!=C.fgNode)for(C=C.fgNode.firstChild;null!=C;){if("text"==C.nodeName&&"1"==C.getAttribute("placeholders"))return!0;C=C.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(C){if(C instanceof
+mxGeometryChange&&(this.isTableCell(C.cell)||this.isTableRow(C.cell))&&(null==C.previous&&null!=C.geometry||null!=C.previous&&!C.previous.equals(C.geometry))){var Q=C.cell;this.isTableCell(Q)&&(Q=this.model.getParent(Q));this.isTableRow(Q)&&(Q=this.model.getParent(Q));var R=this.view.getState(Q);null!=R&&null!=R.shape&&(this.view.invalidate(Q),R.shape.bounds=null)}n.apply(this,arguments);C instanceof mxValueChange&&null!=C.cell&&null!=C.cell.value&&"object"==typeof C.cell.value&&this.invalidateDescendantsWithPlaceholders(C.cell)};
+Graph.prototype.invalidateDescendantsWithPlaceholders=function(C){C=this.model.getDescendants(C);if(0<C.length)for(var Q=0;Q<C.length;Q++){var R=this.view.getState(C[Q]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(C[Q]):this.isReplacePlaceholders(C[Q])&&this.view.invalidate(C[Q],!1,!1)}};Graph.prototype.replaceElement=function(C,Q){Q=C.ownerDocument.createElement(null!=Q?Q:"span");for(var R=Array.prototype.slice.call(C.attributes);attr=
+R.pop();)Q.setAttribute(attr.nodeName,attr.nodeValue);Q.innerHTML=C.innerHTML;C.parentNode.replaceChild(Q,C)};Graph.prototype.processElements=function(C,Q){if(null!=C){C=C.getElementsByTagName("*");for(var R=0;R<C.length;R++)null!=C[R]&&Q(C[R])}};Graph.prototype.updateLabelElements=function(C,Q,R){C=null!=C?C:this.getSelectionCells();for(var X=document.createElement("div"),ha=0;ha<C.length;ha++){var ia=this.getCurrentCellStyle(C[ha]);if(null!=ia&&"1"==ia.html&&(ia=this.convertValueToString(C[ha]),
+null!=ia&&0<ia.length)){X.innerHTML=Graph.sanitizeHtml(ia);for(var pa=X.getElementsByTagName(null!=R?R:"*"),xa=0;xa<pa.length;xa++)Q(pa[xa]);X.innerHTML!=ia&&this.cellLabelChanged(C[ha],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(C,Q,R){Q=Graph.zapGremlins(Q);this.model.beginUpdate();try{if(null!=C.value&&"object"==typeof C.value){if(this.isReplacePlaceholders(C)&&null!=C.getAttribute("placeholder"))for(var X=C.getAttribute("placeholder"),ha=C;null!=ha;){if(ha==this.model.getRoot()||
+null!=ha.value&&"object"==typeof ha.value&&ha.hasAttribute(X)){this.setAttributeForCell(ha,X,Q);break}ha=this.model.getParent(ha)}var ia=C.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ia.hasAttribute("label_"+Graph.diagramLanguage)?ia.setAttribute("label_"+Graph.diagramLanguage,Q):ia.setAttribute("label",Q);Q=ia}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(C){if(null!=C){for(var Q=new mxDictionary,
+R=0;R<C.length;R++)Q.put(C[R],!0);var X=[];for(R=0;R<C.length;R++){var ha=this.model.getParent(C[R]);null==ha||Q.get(ha)||(Q.put(ha,!0),X.push(ha))}for(R=0;R<X.length;R++)if(ha=this.view.getState(X[R]),null!=ha&&(this.model.isEdge(ha.cell)||this.model.isVertex(ha.cell))&&this.isCellDeletable(ha.cell)&&this.isTransparentState(ha)){for(var ia=!0,pa=0;pa<this.model.getChildCount(ha.cell)&&ia;pa++)Q.get(this.model.getChildAt(ha.cell,pa))||(ia=!1);ia&&C.push(ha.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(C){for(var Q=[],R=0;R<C.length;R++)this.isCellDeletable(C[R])&&this.isTransparentState(this.view.getState(C[R]))&&Q.push(C[R]);C=Q;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(C,Q){this.setAttributeForCell(C,"link",Q)};Graph.prototype.setTooltipForCell=function(C,Q){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(C.value)&&C.value.hasAttribute("tooltip_"+
+Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(C,R,Q)};Graph.prototype.getAttributeForCell=function(C,Q,R){C=null!=C.value&&"object"===typeof C.value?C.value.getAttribute(Q):null;return null!=C?C:R};Graph.prototype.setAttributeForCell=function(C,Q,R){if(null!=C.value&&"object"==typeof C.value)var X=C.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),X.setAttribute("label",C.value||"");null!=R?X.setAttribute(Q,R):X.removeAttribute(Q);
+this.model.setValue(C,X)};Graph.prototype.isTargetShape=function(C,Q,R){C=mxUtils.getValue(this.getCurrentCellStyle(C),mxConstants.STYLE_SHAPE,"");for(R=0;R<Q.length;R++){var X=mxUtils.getValue(this.getCurrentCellStyle(Q[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(X,C))return!0}return!1};var x=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(C,Q,R,X){if(mxEvent.isAltDown(Q))return null;for(var ha=0;ha<C.length;ha++){var ia=this.model.getParent(C[ha]);if(this.model.isEdge(ia)&&
+0>mxUtils.indexOf(C,ia))return null}ia=x.apply(this,arguments);var pa=!0;for(ha=0;ha<C.length&&pa;ha++)pa=pa&&this.isTableRow(C[ha]);pa&&(this.isTableCell(ia)&&(ia=this.model.getParent(ia)),this.isTableRow(ia)&&(ia=this.model.getParent(ia)),this.isTable(ia)||(ia=null));return ia};Graph.prototype.click=function(C){mxGraph.prototype.click.call(this,C);this.firstClickState=C.getState();this.firstClickSource=C.getSource()};Graph.prototype.dblClick=function(C,Q){this.isEnabled()&&(Q=this.insertTextForEvent(C,
+Q),mxGraph.prototype.dblClick.call(this,C,Q))};Graph.prototype.insertTextForEvent=function(C,Q){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(C),mxEvent.getClientY(C));if(null!=C&&!this.model.isVertex(Q)){var X=this.model.isEdge(Q)?this.view.getState(Q):null,ha=mxEvent.getSource(C);this.firstClickState!=X||this.firstClickSource!=ha||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(C)))||
+(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&ha==this.view.getCanvas().ownerSVGElement)||(null==X&&(X=this.view.getState(this.getCellAt(R.x,R.y))),Q=this.addText(R.x,R.y,X))}return Q};Graph.prototype.getInsertPoint=function(C){C=this.getGridSize();var Q=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),
+ha=this.getPageSize();Q=Math.max(Q,X.x*ha.width);R=Math.max(R,X.y*ha.height)}return new mxPoint(this.snap(Q+C),this.snap(R+C))};Graph.prototype.getFreeInsertPoint=function(C){var Q=this.view,R=this.getGraphBounds(),X=this.getInsertPoint(C);C=this.snap(Math.round(Math.max(X.x,R.x/Q.scale-Q.translate.x+(0==R.width?2*this.gridSize:0))));Q=this.snap(Math.round(Math.max(X.y,(R.y+R.height)/Q.scale-Q.translate.y+2*this.gridSize)));return new mxPoint(C,Q)};Graph.prototype.getCenterInsertPoint=function(C){C=
+null!=C?C:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-C.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-C.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-C.width/2)),this.snap(Math.round(this.container.clientHeight/
+2/this.view.scale-this.view.translate.y-C.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(C,Q){C=null!=C?C:"";null!=Q&&(0<C.length&&";"!=C.charAt(C.length-1)&&(C+=";"),C+="fontSize="+Q+";");return C};Graph.prototype.addText=function(C,Q,R){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,0,0,0);X.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){X.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
+this.edgeFontSize);X.geometry.relative=!0;X.connectable=!1;var ha=this.view.getRelativePoint(R,C,Q);X.geometry.x=Math.round(1E4*ha.x)/1E4;X.geometry.y=Math.round(ha.y);X.geometry.offset=new mxPoint(0,0);ha=this.view.getPoint(R,X.geometry);var ia=this.view.scale;X.geometry.offset=new mxPoint(Math.round((C-ha.x)/ia),Math.round((Q-ha.y)/ia))}else ha=this.view.translate,X.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),X.geometry.width=
+40,X.geometry.height=20,X.geometry.x=Math.round(C/this.view.scale)-ha.x-(null!=R?R.origin.x:0),X.geometry.y=Math.round(Q/this.view.scale)-ha.y-(null!=R?R.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(C,Q,R){var X=mxUtils.bind(this,function(){var ra=this.container.getElementsByTagName("a");
+if(null!=ra)for(var ua=0;ua<ra.length;ua++){var Ka=this.getAbsoluteUrl(ra[ua].getAttribute("href"));null!=Ka&&(ra[ua].setAttribute("rel",this.linkRelation),ra[ua].setAttribute("href",Ka),null!=Q&&mxEvent.addGestureListeners(ra[ua],null,null,Q))}});this.model.addListener(mxEvent.CHANGE,X);X();var ha=this.container.style.cursor,ia=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=C&&""!=C&&C!=mxConstants.NONE?new mxCellHighlight(pa,C,4):null,startX:0,
startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ra){var ua=ra.sourceState;if(null==ua||null==pa.getLinkForCell(ua.cell))ra=pa.getCellAt(ra.getGraphX(),ra.getGraphY(),null,null,null,function(Ka,Va,Oa){return null==pa.getLinkForCell(Ka.cell)}),ua=null==ua||pa.model.isAncestor(ra,ua.cell)?pa.view.getState(ra):null;ua!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ua,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ra,ua){this.startX=
-ua.getGraphX();this.startY=ua.getGraphY();this.scrollLeft=pa.container.scrollLeft;this.scrollTop=pa.container.scrollTop;null==this.currentLink&&"auto"==pa.container.style.overflow&&(pa.container.style.cursor="move");this.updateCurrentState(ua)},mouseMove:function(ra,ua){if(pa.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-ua.getGraphX()),ua=Math.abs(this.startY-ua.getGraphY()),(ra>ja||ua>ja)&&this.clear());else{for(ra=ua.getSource();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;
+ua.getGraphX();this.startY=ua.getGraphY();this.scrollLeft=pa.container.scrollLeft;this.scrollTop=pa.container.scrollTop;null==this.currentLink&&"auto"==pa.container.style.overflow&&(pa.container.style.cursor="move");this.updateCurrentState(ua)},mouseMove:function(ra,ua){if(pa.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-ua.getGraphX()),ua=Math.abs(this.startY-ua.getGraphY()),(ra>ia||ua>ia)&&this.clear());else{for(ra=ua.getSource();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;
null!=ra?this.clear():(null!=pa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&pa.tooltipHandler.reset(ua,!0,this.currentState),(null==this.currentState||ua.getState()!=this.currentState&&null!=ua.sourceState||!pa.intersects(this.currentState,ua.getGraphX(),ua.getGraphY()))&&this.updateCurrentState(ua))}},mouseUp:function(ra,ua){var Ka=ua.getSource();for(ra=ua.getEvent();null!=Ka&&"a"!=Ka.nodeName.toLowerCase();)Ka=Ka.parentNode;null==Ka&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<
-ja&&Math.abs(this.scrollTop-pa.container.scrollTop)<ja&&(null==ua.sourceState||!ua.isSource(ua.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Ka=pa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ka||null==Q||Q(ra,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ra)||(ra=null!=this.currentTarget?this.currentTarget:
-mxEvent.isMiddleMouseButton(ra)?"_blank":Ka?pa.linkTarget:"_top",pa.openLink(this.currentLink,ra),ua.consume())):null!=R&&!ua.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ja&&Math.abs(this.scrollTop-pa.container.scrollTop)<ja&&Math.abs(this.startX-ua.getGraphX())<ja&&Math.abs(this.startY-ua.getGraphY())<ja&&R(ua.getEvent()));this.clear()},activate:function(ra){this.currentLink=pa.getAbsoluteUrl(pa.getLinkForCell(ra.cell));null!=this.currentLink&&(this.currentTarget=pa.getLinkTargetForCell(ra.cell),
-pa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=pa.container&&(pa.container.style.cursor=ia);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=pa.tooltipHandler&&pa.tooltipHandler.hide()}};pa.click=function(ra){};pa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ra){xa.clear()})};Graph.prototype.duplicateCells=function(B,Q){B=null!=B?B:this.getSelectionCells();
-Q=null!=Q?Q:!0;for(var R=0;R<B.length;R++)this.isTableCell(B[R])&&(B[R]=this.model.getParent(B[R]));B=this.model.getTopmostCells(B);var X=this.getModel(),ia=this.gridSize,ja=[];X.beginUpdate();try{var pa={},xa=this.createCellLookup(B),ra=this.cloneCells(B,!1,pa,!0);for(R=0;R<B.length;R++){var ua=X.getParent(B[R]);if(null!=ua){var Ka=this.moveCells([ra[R]],ia,ia,!1)[0];ja.push(Ka);if(Q)X.add(ua,ra[R]);else{var Va=ua.getIndex(B[R]);X.add(ua,ra[R],Va+1)}if(this.isTable(ua)){var Oa=this.getCellGeometry(ra[R]),
-Ta=this.getCellGeometry(ua);null!=Oa&&null!=Ta&&(Ta=Ta.clone(),Ta.height+=Oa.height,X.setGeometry(ua,Ta))}}else ja.push(ra[R])}this.updateCustomLinks(this.createCellMapping(pa,xa),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{X.endUpdate()}return ja};Graph.prototype.insertImage=function(B,Q,R){if(null!=B&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),ia=[],ja=0;ja<X.length;ja++)ia.push(X[ja]);document.execCommand("insertimage",
-!1,B);B=this.cellEditor.textarea.getElementsByTagName("img");if(B.length==ia.length+1)for(ja=B.length-1;0<=ja;ja--)if(0==ja||B[ja]!=ia[ja-1]){B[ja].setAttribute("width",Q);B[ja].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(B){if(null!=this.cellEditor.textarea)if(0==B.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var Q=this.cellEditor.textarea.getElementsByTagName("a"),R=[],X=0;X<Q.length;X++)R.push(Q[X]);document.execCommand("createlink",!1,mxUtils.trim(B));
-Q=this.cellEditor.textarea.getElementsByTagName("a");if(Q.length==R.length+1)for(X=Q.length-1;0<=X;X--)if(Q[X]!=R[X-1]){for(Q=Q[X].getElementsByTagName("a");0<Q.length;){for(R=Q[0].parentNode;null!=Q[0].firstChild;)R.insertBefore(Q[0].firstChild,Q[0]);R.removeChild(Q[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(B))};Graph.prototype.isCellResizable=function(B){var Q=mxGraph.prototype.isCellResizable.apply(this,arguments),R=this.getCurrentCellStyle(B);return!this.isTableCell(B)&&
-!this.isTableRow(B)&&(Q||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(B,Q,R){null==Q&&(Q=this.getSelectionCells());if(null!=Q&&1<Q.length){for(var X=[],ia=null,ja=null,pa=0,xa=0;xa<Q.length;xa++)if(this.getModel().isVertex(Q[xa])){var ra=this.view.getState(Q[xa]);if(null!=ra){var ua=B?ra.getCenterX():ra.getCenterY();ia=null!=ia?Math.max(ia,ua):ua;ja=null!=ja?Math.min(ja,ua):ua;R&&(pa+=B?ra.width:ra.height);
-X.push(ra)}}if(2<X.length){X.sort(function(Za,Pa){return B?Za.x-Pa.x:Za.y-Pa.y});R&&(pa-=B?X[0].width/2+X[X.length-1].width/2:X[0].height/2+X[X.length-1].height/2);ra=this.view.translate;ua=this.view.scale;ja=ja/ua-(B?ra.x:ra.y);ia=ia/ua-(B?ra.x:ra.y);this.getModel().beginUpdate();try{var Ka=(ia-ja-pa)/(X.length-1),Va=ja+(R?B?X[0].width/2:X[0].height/2:0);for(xa=1;xa<X.length-1;xa++){var Oa=this.view.getState(this.model.getParent(X[xa].cell)),Ta=this.getCellGeometry(X[xa].cell);Va+=Ka;null!=Ta&&null!=
-Oa&&(Ta=Ta.clone(),B?Ta.x=Math.round(Va-(R?0:Ta.width/2))-Oa.origin.x:Ta.y=Math.round(Va-(R?0:Ta.height/2))-Oa.origin.y,this.getModel().setGeometry(X[xa].cell,Ta));R&&(Va+=B?X[xa].width:X[xa].height)}}finally{this.getModel().endUpdate()}}}return Q};Graph.prototype.isCloneEvent=function(B){return mxClient.IS_MAC&&mxEvent.isMetaDown(B)||mxEvent.isControlDown(B)};Graph.prototype.createSvgImageExport=function(B){B=new mxImageExport;B.addCellData=function(R,X,ia){X.setAttribute("data-cell-id",R.id);if(ia)if(mxUtils.isNode(R.value))for(ia=
-0;ia<R.value.attributes.length;ia++){var ja=R.value.attributes[ia];X.setAttribute("data-cell-"+ja.name,ja.value)}else if("object"===typeof R.value)for(ja in R.value)X.setAttribute("data-cell-"+ja,R.value[ja]);else null!=R.value&&X.setAttribute("data-cell-value",R.value);return X};var Q=B.visitStatesRecursive;B.visitStatesRecursive=function(R,X,ia){if(null!=R){var ja=X.root,pa=X.root.ownerDocument;X.root=this.addCellData(R.cell,null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),
-Editor.addSvgMetadata);ja.appendChild(X.root);Q.apply(this,arguments);X.root=ja}};B.getLinkForCellState=mxUtils.bind(this,function(R,X){return this.getLinkForCell(R.cell)});B.getTitleForCellState=mxUtils.bind(this,function(R,X){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return B};Graph.prototype.parseBackgroundImage=function(B){var Q=null;null!=B&&0<B.length&&(B=JSON.parse(B),Q=new mxImage(B.src,B.width,B.height));return Q};Graph.prototype.getBackgroundImageObject=function(B){return B};
-Graph.prototype.getSvg=function(B,Q,R,X,ia,ja,pa,xa,ra,ua,Ka,Va,Oa,Ta,Za,Pa){var Ra=null;if(null!=Ta)for(Ra=new mxDictionary,ia=0;ia<Ta.length;ia++)Ra.put(Ta[ia],!0);Ta=this.useCssTransforms;var fb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Ta&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{Q=null!=Q?Q:1;R=null!=R?R:0;ja=null!=ja?ja:!0;pa=null!=pa?pa:!0;ua=null!=ua?ua:!1;var eb="page"==Oa?this.view.getBackgroundPageBounds():ja&&null==Ra||X||"diagram"==Oa?this.getGraphBounds():
-this.getBoundingBox(this.getSelectionCells()),bb=this.backgroundImage,db=this.view.translate,mb=this.view.scale;"diagram"==Oa&&null!=bb&&null!=bb.width&&null!=bb.height&&(eb=mxRectangle.fromRectangle(eb),eb.add(new mxRectangle((db.x+bb.x)*mb,(db.y+bb.y)*mb,bb.width*mb,bb.height*mb)));if(null==eb)throw Error(mxResources.get("drawingEmpty"));X=Q/mb;var lb=Math.max(1,Math.ceil(eb.width*X)+2*R)+(ua&&0==R?5:0),pb=Math.max(1,Math.ceil(eb.height*X)+2*R)+(ua&&0==R?5:0),gb=mxUtils.getLightDarkColor(B),qb=
-Graph.createSvgNode(0,0,lb,pb,gb),ub=qb.ownerDocument;if(null!=B){var hb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"rect");hb.setAttribute("fill",gb.light);hb.style.fill=gb.cssText;hb.setAttribute("width","100%");hb.setAttribute("height","100%");hb.setAttribute("x","0");hb.setAttribute("y","0");qb.appendChild(hb)}var nb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"g");qb.appendChild(nb);var ob=this.createSvgCanvas(nb);ob.translate(Math.floor(R/Q-eb.x/mb),Math.floor(R/Q-eb.y/mb));ob.idPrefix=
-"drawio-svg-"+Editor.guid();var rb=document.createElement("div"),vb=ob.getAlternateText;ob.getAlternateText=function(jb,Bb,tb,xb,zb,sb,Db,d,p,A,t,z,E){if(null!=sb&&0<this.state.fontSize)try{mxUtils.isNode(sb)?sb=sb.innerText:(rb.innerHTML=sb,sb=mxUtils.extractTextWithWhitespace(rb.childNodes));for(var G=Math.ceil(2*xb/this.state.fontSize),ea=[],O=0,ta=0;(0==G||O<G)&&ta<sb.length;){var ma=sb.charCodeAt(ta);if(10==ma||13==ma){if(0<O)break}else ea.push(sb.charAt(ta)),255>ma&&O++;ta++}ea.length<sb.length&&
-1<sb.length-ea.length&&(sb=mxUtils.trim(ea.join(""))+"...");return sb}catch(ab){return vb.apply(this,arguments)}else return vb.apply(this,arguments)};if(null!=bb&&null!=bb.width&&null!=bb.height){B=mb/Q;var Ab=new mxRectangle((bb.x+db.x)*B,(bb.y+db.y)*B,bb.width*B,bb.height*B);mxUtils.intersects(eb,Ab)&&ob.image(bb.x+db.x,bb.y+db.y,bb.width,bb.height,bb.src,!0)}ob.scale(X);ob.textEnabled=pa;xa=null!=xa?xa:this.createSvgImageExport();var Cb=xa.getLinkForCellState;xa.getLinkForCellState=function(jb,
+ia&&Math.abs(this.scrollTop-pa.container.scrollTop)<ia&&(null==ua.sourceState||!ua.isSource(ua.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Ka=pa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ka||null==Q||Q(ra,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ra)||(ra=null!=this.currentTarget?this.currentTarget:
+mxEvent.isMiddleMouseButton(ra)?"_blank":Ka?pa.linkTarget:"_top",pa.openLink(this.currentLink,ra),ua.consume())):null!=R&&!ua.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ia&&Math.abs(this.scrollTop-pa.container.scrollTop)<ia&&Math.abs(this.startX-ua.getGraphX())<ia&&Math.abs(this.startY-ua.getGraphY())<ia&&R(ua.getEvent()));this.clear()},activate:function(ra){this.currentLink=pa.getAbsoluteUrl(pa.getLinkForCell(ra.cell));null!=this.currentLink&&(this.currentTarget=pa.getLinkTargetForCell(ra.cell),
+pa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=pa.container&&(pa.container.style.cursor=ha);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=pa.tooltipHandler&&pa.tooltipHandler.hide()}};pa.click=function(ra){};pa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ra){xa.clear()})};Graph.prototype.duplicateCells=function(C,Q){C=null!=C?C:this.getSelectionCells();
+Q=null!=Q?Q:!0;for(var R=0;R<C.length;R++)this.isTableCell(C[R])&&(C[R]=this.model.getParent(C[R]));C=this.model.getTopmostCells(C);var X=this.getModel(),ha=this.gridSize,ia=[];X.beginUpdate();try{var pa={},xa=this.createCellLookup(C),ra=this.cloneCells(C,!1,pa,!0);for(R=0;R<C.length;R++){var ua=X.getParent(C[R]);if(null!=ua){var Ka=this.moveCells([ra[R]],ha,ha,!1)[0];ia.push(Ka);if(Q)X.add(ua,ra[R]);else{var Va=ua.getIndex(C[R]);X.add(ua,ra[R],Va+1)}if(this.isTable(ua)){var Oa=this.getCellGeometry(ra[R]),
+Ta=this.getCellGeometry(ua);null!=Oa&&null!=Ta&&(Ta=Ta.clone(),Ta.height+=Oa.height,X.setGeometry(ua,Ta))}}else ia.push(ra[R])}this.updateCustomLinks(this.createCellMapping(pa,xa),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{X.endUpdate()}return ia};Graph.prototype.insertImage=function(C,Q,R){if(null!=C&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),ha=[],ia=0;ia<X.length;ia++)ha.push(X[ia]);document.execCommand("insertimage",
+!1,C);C=this.cellEditor.textarea.getElementsByTagName("img");if(C.length==ha.length+1)for(ia=C.length-1;0<=ia;ia--)if(0==ia||C[ia]!=ha[ia-1]){C[ia].setAttribute("width",Q);C[ia].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(C){if(null!=this.cellEditor.textarea)if(0==C.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var Q=this.cellEditor.textarea.getElementsByTagName("a"),R=[],X=0;X<Q.length;X++)R.push(Q[X]);document.execCommand("createlink",!1,mxUtils.trim(C));
+Q=this.cellEditor.textarea.getElementsByTagName("a");if(Q.length==R.length+1)for(X=Q.length-1;0<=X;X--)if(Q[X]!=R[X-1]){for(Q=Q[X].getElementsByTagName("a");0<Q.length;){for(R=Q[0].parentNode;null!=Q[0].firstChild;)R.insertBefore(Q[0].firstChild,Q[0]);R.removeChild(Q[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(C))};Graph.prototype.isCellResizable=function(C){var Q=mxGraph.prototype.isCellResizable.apply(this,arguments),R=this.getCurrentCellStyle(C);return!this.isTableCell(C)&&
+!this.isTableRow(C)&&(Q||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(C,Q,R){null==Q&&(Q=this.getSelectionCells());if(null!=Q&&1<Q.length){for(var X=[],ha=null,ia=null,pa=0,xa=0;xa<Q.length;xa++)if(this.getModel().isVertex(Q[xa])){var ra=this.view.getState(Q[xa]);if(null!=ra){var ua=C?ra.getCenterX():ra.getCenterY();ha=null!=ha?Math.max(ha,ua):ua;ia=null!=ia?Math.min(ia,ua):ua;R&&(pa+=C?ra.width:ra.height);
+X.push(ra)}}if(2<X.length){X.sort(function(Za,Pa){return C?Za.x-Pa.x:Za.y-Pa.y});R&&(pa-=C?X[0].width/2+X[X.length-1].width/2:X[0].height/2+X[X.length-1].height/2);ra=this.view.translate;ua=this.view.scale;ia=ia/ua-(C?ra.x:ra.y);ha=ha/ua-(C?ra.x:ra.y);this.getModel().beginUpdate();try{var Ka=(ha-ia-pa)/(X.length-1),Va=ia+(R?C?X[0].width/2:X[0].height/2:0);for(xa=1;xa<X.length-1;xa++){var Oa=this.view.getState(this.model.getParent(X[xa].cell)),Ta=this.getCellGeometry(X[xa].cell);Va+=Ka;null!=Ta&&null!=
+Oa&&(Ta=Ta.clone(),C?Ta.x=Math.round(Va-(R?0:Ta.width/2))-Oa.origin.x:Ta.y=Math.round(Va-(R?0:Ta.height/2))-Oa.origin.y,this.getModel().setGeometry(X[xa].cell,Ta));R&&(Va+=C?X[xa].width:X[xa].height)}}finally{this.getModel().endUpdate()}}}return Q};Graph.prototype.isCloneEvent=function(C){return mxClient.IS_MAC&&mxEvent.isMetaDown(C)||mxEvent.isControlDown(C)};Graph.prototype.createSvgImageExport=function(C){C=new mxImageExport;C.addCellData=function(R,X,ha){X.setAttribute("data-cell-id",R.id);if(ha)if(mxUtils.isNode(R.value))for(ha=
+0;ha<R.value.attributes.length;ha++){var ia=R.value.attributes[ha];X.setAttribute("data-cell-"+ia.name,ia.value)}else if("object"===typeof R.value)for(ia in R.value)X.setAttribute("data-cell-"+ia,R.value[ia]);else null!=R.value&&X.setAttribute("data-cell-value",R.value);return X};var Q=C.visitStatesRecursive;C.visitStatesRecursive=function(R,X,ha){if(null!=R){var ia=X.root,pa=X.root.ownerDocument;X.root=this.addCellData(R.cell,null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),
+Editor.addSvgMetadata);ia.appendChild(X.root);Q.apply(this,arguments);X.root=ia}};C.getLinkForCellState=mxUtils.bind(this,function(R,X){return this.getLinkForCell(R.cell)});C.getTitleForCellState=mxUtils.bind(this,function(R,X){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return C};Graph.prototype.parseBackgroundImage=function(C){var Q=null;null!=C&&0<C.length&&(C=JSON.parse(C),Q=new mxImage(C.src,C.width,C.height));return Q};Graph.prototype.getBackgroundImageObject=function(C){return C};
+Graph.prototype.getSvg=function(C,Q,R,X,ha,ia,pa,xa,ra,ua,Ka,Va,Oa,Ta,Za,Pa){var Ra=null;if(null!=Ta)for(Ra=new mxDictionary,ha=0;ha<Ta.length;ha++)Ra.put(Ta[ha],!0);Ta=this.useCssTransforms;var fb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Ta&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{Q=null!=Q?Q:1;R=null!=R?R:0;ia=null!=ia?ia:!0;pa=null!=pa?pa:!0;ua=null!=ua?ua:!1;var eb="page"==Oa?this.view.getBackgroundPageBounds():ia&&null==Ra||X||"diagram"==Oa?this.getGraphBounds():
+this.getBoundingBox(this.getSelectionCells()),bb=this.backgroundImage,db=this.view.translate,mb=this.view.scale;"diagram"==Oa&&null!=bb&&null!=bb.width&&null!=bb.height&&(eb=mxRectangle.fromRectangle(eb),eb.add(new mxRectangle((db.x+bb.x)*mb,(db.y+bb.y)*mb,bb.width*mb,bb.height*mb)));if(null==eb)throw Error(mxResources.get("drawingEmpty"));X=Q/mb;var lb=Math.max(1,Math.ceil(eb.width*X)+2*R)+(ua&&0==R?5:0),pb=Math.max(1,Math.ceil(eb.height*X)+2*R)+(ua&&0==R?5:0),gb=mxUtils.getLightDarkColor(C),qb=
+Graph.createSvgNode(0,0,lb,pb,gb),ub=qb.ownerDocument;if(null!=C){var hb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"rect");hb.setAttribute("fill",gb.light);hb.style.fill=gb.cssText;hb.setAttribute("width","100%");hb.setAttribute("height","100%");hb.setAttribute("x","0");hb.setAttribute("y","0");qb.appendChild(hb)}var nb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"g");qb.appendChild(nb);var ob=this.createSvgCanvas(nb);ob.translate(Math.floor(R/Q-eb.x/mb),Math.floor(R/Q-eb.y/mb));ob.idPrefix=
+"drawio-svg-"+Editor.guid();var rb=document.createElement("div"),vb=ob.getAlternateText;ob.getAlternateText=function(jb,Bb,tb,xb,zb,sb,Db,d,p,A,u,z,E){if(null!=sb&&0<this.state.fontSize)try{mxUtils.isNode(sb)?sb=sb.innerText:(rb.innerHTML=sb,sb=mxUtils.extractTextWithWhitespace(rb.childNodes));for(var H=Math.ceil(2*xb/this.state.fontSize),ea=[],O=0,ta=0;(0==H||O<H)&&ta<sb.length;){var ma=sb.charCodeAt(ta);if(10==ma||13==ma){if(0<O)break}else ea.push(sb.charAt(ta)),255>ma&&O++;ta++}ea.length<sb.length&&
+1<sb.length-ea.length&&(sb=mxUtils.trim(ea.join(""))+"...");return sb}catch(ab){return vb.apply(this,arguments)}else return vb.apply(this,arguments)};if(null!=bb&&null!=bb.width&&null!=bb.height){C=mb/Q;var Ab=new mxRectangle((bb.x+db.x)*C,(bb.y+db.y)*C,bb.width*C,bb.height*C);mxUtils.intersects(eb,Ab)&&ob.image(bb.x+db.x,bb.y+db.y,bb.width,bb.height,bb.src,!0)}ob.scale(X);ob.textEnabled=pa;xa=null!=xa?xa:this.createSvgImageExport();var Cb=xa.getLinkForCellState;xa.getLinkForCellState=function(jb,
Bb){var tb=jb.view.graph.getAbsoluteUrl(Cb.apply(this,arguments));return null==tb||jb.view.graph.isCustomLink(tb)?null:tb};xa.getLinkTargetForCellState=function(jb,Bb){return jb.view.graph.getLinkTargetForCell(jb.cell)};var Eb=xa.drawCellState,yb=null,wb=mxUtils.bind(this,function(){if(null==yb){yb="ge-flow-animation-"+Editor.guid();var jb=null!=ub.createElementNS?ub.createElementNS(mxConstants.NS_SVG,"style"):ub.createElement("style");jb.innerHTML=this.createFlowAnimationCss(yb);ub.getElementsByTagName("defs")[0].appendChild(jb)}return yb});
-xa.drawCellState=function(jb,Bb){for(var tb=jb.view.graph,xb=null!=Ra?Ra.get(jb.cell):tb.isCellSelected(jb.cell),zb=tb.model.getParent(jb.cell);!(ja&&null==Ra||xb)&&null!=zb;)xb=null!=Ra?Ra.get(zb):tb.isCellSelected(zb),zb=tb.model.getParent(zb);if(null!=jb.shape)try{var sb=jb.shape.isFlowAnimationEnabled,Db=jb.shape.addFlowAnimationToShape;jb.shape.isFlowAnimationEnabled=function(){return fb&&tb.model.isEdge(jb.cell)&&"1"==mxUtils.getValue(jb.style,"flowAnimation","0")};jb.shape.addFlowAnimationToShape=
-function(){tb.addFlowAnimationToNode(this.getFlowAnimationPath(),jb.style,Q,wb())};if(ja&&null==Ra||xb)tb.view.redrawEnumerationState(jb),Eb.apply(this,arguments),this.doDrawShape(jb.secondLabel,Bb)}finally{jb.shape.isFlowAnimationEnabled=sb,jb.shape.addFlowAnimationToShape=Db}};var kb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(kb),ob);this.addForeignObjectWarning(ob,qb);Pa?this.disableSvgLinks(qb):this.updateSvgLinks(qb,ra,!0);return qb}finally{this.enableFlowAnimation=
-fb,Ta&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(B,Q){if("0"!=urlParams["svg-warning"]&&0<Q.getElementsByTagName("foreignObject").length){var R=B.createElement("switch"),X=B.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=B.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||Q.ownerDocument!=document&&null==document.documentMode?
-(ia.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ia.setAttribute("target","_blank")):(ia.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ia.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));B=B.createElement("text");B.setAttribute("text-anchor","middle");B.setAttribute("font-size","10px");B.setAttribute("x","50%");B.setAttribute("y","100%");mxUtils.write(B,Graph.foreignObjectWarningText);R.appendChild(X);ia.appendChild(B);R.appendChild(ia);Q.appendChild(R)}};
-Graph.prototype.disableSvgLinks=function(B,Q){B=B.getElementsByTagName("a");for(var R=0;R<B.length;R++){var X=B[R].getAttribute("href");null==X&&(X=B[R].getAttribute("xlink:href"));null!=X&&(B[R].style.pointerEvents="none",B[R].setAttribute("href",""));Q&&Q(B[R])}};Graph.prototype.updateSvgLinks=function(B,Q,R){B=B.getElementsByTagName("a");for(var X=0;X<B.length;X++)if(null==B[X].getAttribute("target")){var ia=B[X].getAttribute("href");null==ia&&(ia=B[X].getAttribute("xlink:href"));null!=ia&&(null!=
-Q&&/^https?:\/\//.test(ia)?B[X].setAttribute("target",Q):R&&this.isCustomLink(ia)&&B[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(B){B=new mxSvgCanvas2D(B);B.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;B.adaptiveColors=this.getAdaptiveColors();B.pointerEvents=!0;return B};Graph.prototype.getSelectedElement=function(){var B=null;if(window.getSelection){var Q=window.getSelection();Q.getRangeAt&&Q.rangeCount&&(B=Q.getRangeAt(0).commonAncestorContainer)}else document.selection&&
-(B=document.selection.createRange().parentElement());return B};Graph.prototype.getSelectedEditingElement=function(){var B=null;if(null!=this.cellEditor.textarea)for(B=this.getSelectedElement();null!=B&&B.nodeType!=mxConstants.NODETYPE_ELEMENT;)B=B.parentNode;return B};Graph.prototype.getParentByName=function(B,Q,R){for(;null!=B&&B.nodeName!=Q;){if(B==R)return null;B=B.parentNode}return B};Graph.prototype.getParentByNames=function(B,Q,R){for(;null!=B&&!(0<=mxUtils.indexOf(Q,B.nodeName));){if(B==R)return null;
-B=B.parentNode}return B};Graph.prototype.selectNode=function(B){var Q=null;if(window.getSelection){if(Q=window.getSelection(),Q.getRangeAt&&Q.rangeCount){var R=document.createRange();R.selectNode(B);Q.removeAllRanges();Q.addRange(R)}}else(Q=document.selection)&&"Control"!=Q.type&&(B=Q.createRange(),B.collapse(!0),R=Q.createRange(),R.setEndPoint("StartToStart",B),R.select())};Graph.prototype.flipEdgePoints=function(B,Q,R){var X=this.getCellGeometry(B);if(null!=X){X=X.clone();if(null!=X.points)for(var ia=
-0;ia<X.points.length;ia++)Q?X.points[ia].x=R+(R-X.points[ia].x):X.points[ia].y=R+(R-X.points[ia].y);ia=function(ja){null!=ja&&(Q?ja.x=R+(R-ja.x):ja.y=R+(R-ja.y))};ia(X.getTerminalPoint(!0));ia(X.getTerminalPoint(!1));this.model.setGeometry(B,X)}};Graph.prototype.flipChildren=function(B,Q,R){this.model.beginUpdate();try{for(var X=this.model.getChildCount(B),ia=0;ia<X;ia++){var ja=this.model.getChildAt(B,ia);if(this.model.isEdge(ja))this.flipEdgePoints(ja,Q,R);else{var pa=this.getCellGeometry(ja);null!=
-pa&&(pa=pa.clone(),Q?pa.x=R+(R-pa.x-pa.width):pa.y=R+(R-pa.y-pa.height),this.model.setGeometry(ja,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(B,Q){this.model.beginUpdate();try{B=this.model.getTopmostCells(B);for(var R=[],X=0;X<B.length;X++)if(this.model.isEdge(B[X])){var ia=this.view.getState(B[X]);null!=ia&&this.flipEdgePoints(B[X],Q,(Q?ia.getCenterX():ia.getCenterY())/this.view.scale-(Q?ia.origin.x:ia.origin.y)-(Q?this.view.translate.x:this.view.translate.y))}else{var ja=
-this.getCellGeometry(B[X]);null!=ja&&this.flipChildren(B[X],Q,Q?ja.getCenterX()-ja.x:ja.getCenterY()-ja.y);R.push(B[X])}this.toggleCellStyles(Q?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(B,Q){var R=null;if(null!=B&&0<B.length){this.model.beginUpdate();try{for(var X=0;X<B.length;X++){var ia=this.model.getParent(B[X]);if(this.isTable(ia)){var ja=this.getCellGeometry(B[X]),pa=this.getCellGeometry(ia);null!=ja&&null!=pa&&
-(pa=pa.clone(),pa.height-=ja.height,this.model.setGeometry(ia,pa))}}var xa=this.selectParentAfterDelete?this.model.getParents(B):null;this.removeCells(B,Q)}finally{this.model.endUpdate()}if(null!=xa)for(R=[],X=0;X<xa.length;X++)this.model.contains(xa[X])&&(this.model.isVertex(xa[X])||this.model.isEdge(xa[X]))&&R.push(xa[X])}return R};Graph.prototype.insertTableColumn=function(B,Q){var R=this.getModel();R.beginUpdate();try{var X=B,ia=0;if(this.isTableCell(B)){var ja=R.getParent(B);X=R.getParent(ja);
-ia=mxUtils.indexOf(R.getChildCells(ja,!0),B)}else this.isTableRow(B)?X=R.getParent(B):B=R.getChildCells(X,!0)[0],Q||(ia=R.getChildCells(B,!0).length-1);var pa=R.getChildCells(X,!0),xa=Graph.minTableColumnWidth;for(B=0;B<pa.length;B++){var ra=R.getChildCells(pa[B],!0)[ia],ua=R.cloneCell(ra,!1);null==ua&&(ua=this.createVertex());var Ka=this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ka){null!=Ka.alternateBounds&&(Ka.width=
-Ka.alternateBounds.width,Ka.height=Ka.alternateBounds.height,Ka.alternateBounds=null);xa=Ka.width;var Va=this.getCellGeometry(pa[B]);null!=Va&&(Ka.height=Va.height)}R.add(pa[B],ua,ia+(Q?0:1))}var Oa=this.getCellGeometry(X);null!=Oa&&(Oa=Oa.clone(),Oa.width+=xa,R.setGeometry(X,Oa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=function(B){var Q=this.getModel();Q.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(B).childLayout?B:Q.getParent(B);var X=Q.getChildCells(R,!0);0==
-X.length?Q.remove(R):(R==B&&(B=X[X.length-1]),Q.remove(B))}finally{Q.endUpdate()}};Graph.prototype.insertLane=function(B,Q){var R=this.getModel();R.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(B).childLayout){X=B;var ia=R.getChildCells(X,!0);B=ia[Q?0:ia.length-1]}else X=R.getParent(B);var ja=X.getIndex(B);B=R.cloneCell(B,!1);B.value=null;R.add(X,B,ja+(Q?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(B,Q){var R=this.getModel();R.beginUpdate();try{var X=
-B,ia=B;if(this.isTableCell(B))ia=R.getParent(B),X=R.getParent(ia);else if(this.isTableRow(B))X=R.getParent(B);else{var ja=R.getChildCells(X,!0);ia=ja[Q?0:ja.length-1]}var pa=R.getChildCells(ia,!0),xa=X.getIndex(ia);ia=R.cloneCell(ia,!1);ia.value=null;var ra=this.getCellGeometry(ia);if(null!=ra){for(ja=0;ja<pa.length;ja++){B=R.cloneCell(pa[ja],!1);B.value=null;B.style=mxUtils.setStyle(mxUtils.setStyle(B.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(B);null!=ua&&(null!=ua.alternateBounds&&
-(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ra.height);ia.insert(B)}R.add(X,ia,xa+(Q?0:1));var Ka=this.getCellGeometry(X);null!=Ka&&(Ka=Ka.clone(),Ka.height+=ra.height,R.setGeometry(X,Ka))}}finally{R.endUpdate()}};Graph.prototype.deleteTableColumn=function(B){var Q=this.getModel();Q.beginUpdate();try{var R=B,X=B;this.isTableCell(B)&&(X=Q.getParent(B));this.isTableRow(X)&&(R=Q.getParent(X));var ia=Q.getChildCells(R,!0);if(0==ia.length)Q.remove(R);
-else{this.isTableRow(X)||(X=ia[0]);var ja=Q.getChildCells(X,!0);if(1>=ja.length)Q.remove(R);else{var pa=ja.length-1;this.isTableCell(B)&&(pa=mxUtils.indexOf(ja,B));for(X=B=0;X<ia.length;X++){var xa=Q.getChildCells(ia[X],!0)[pa];Q.remove(xa);var ra=this.getCellGeometry(xa);null!=ra&&(B=Math.max(B,ra.width))}var ua=this.getCellGeometry(R);null!=ua&&(ua=ua.clone(),ua.width-=B,Q.setGeometry(R,ua))}}}finally{Q.endUpdate()}};Graph.prototype.deleteTableRow=function(B){var Q=this.getModel();Q.beginUpdate();
-try{var R=B,X=B;this.isTableCell(B)&&(B=X=Q.getParent(B));this.isTableRow(B)&&(R=Q.getParent(X));var ia=Q.getChildCells(R,!0);if(1>=ia.length)Q.remove(R);else{this.isTableRow(X)||(X=ia[ia.length-1]);Q.remove(X);B=0;var ja=this.getCellGeometry(X);null!=ja&&(B=ja.height);var pa=this.getCellGeometry(R);null!=pa&&(pa=pa.clone(),pa.height-=B,Q.setGeometry(R,pa))}}finally{Q.endUpdate()}};Graph.prototype.insertRow=function(B,Q){for(var R=B.tBodies[0],X=R.rows[0].cells,ia=B=0;ia<X.length;ia++){var ja=X[ia].getAttribute("colspan");
-B+=null!=ja?parseInt(ja):1}Q=R.insertRow(Q);for(ia=0;ia<B;ia++)mxUtils.br(Q.insertCell(-1));return Q.cells[0]};Graph.prototype.deleteRow=function(B,Q){B.tBodies[0].deleteRow(Q)};Graph.prototype.insertColumn=function(B,Q){var R=B.tHead;if(null!=R)for(var X=0;X<R.rows.length;X++){var ia=document.createElement("th");R.rows[X].appendChild(ia);mxUtils.br(ia)}B=B.tBodies[0];for(R=0;R<B.rows.length;R++)X=B.rows[R].insertCell(Q),mxUtils.br(X);return B.rows[0].cells[0<=Q?Q:B.rows[0].cells.length-1]};Graph.prototype.deleteColumn=
-function(B,Q){if(0<=Q){B=B.tBodies[0].rows;for(var R=0;R<B.length;R++)B[R].cells.length>Q&&B[R].deleteCell(Q)}};Graph.prototype.pasteHtmlAtCaret=function(B){if(window.getSelection){var Q=window.getSelection();if(Q.getRangeAt&&Q.rangeCount){Q=Q.getRangeAt(0);Q.deleteContents();var R=document.createElement("div");R.innerHTML=B;B=document.createDocumentFragment();for(var X;X=R.firstChild;)lastNode=B.appendChild(X);Q.insertNode(B)}}else(Q=document.selection)&&"Control"!=Q.type&&Q.createRange().pasteHTML(B)};
-Graph.prototype.createLinkForHint=function(B,Q,R){function X(ja,pa){ja.length>pa&&(ja=ja.substring(0,Math.round(pa/2))+"..."+ja.substring(ja.length-Math.round(pa/4)));return ja}B=null!=B?B:"javascript:void(0);";if(null==Q||0==Q.length)Q=this.isCustomLink(B)?this.getLinkTitle(B):B;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(B));ia.setAttribute("title",X(this.isCustomLink(B)?this.getLinkTitle(B):B,80));null!=this.linkTarget&&
-ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,X(Q,40));this.isCustomLink(B)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ja){this.customLinkClicked(B,R);mxEvent.consume(ja)}));return ia};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ja,pa){this.popupMenuHandler.hideMenu()});var B=this.updateMouseEvent;this.updateMouseEvent=function(ja){ja=
-B.apply(this,arguments);if(mxEvent.isTouchEvent(ja.getEvent())&&null==ja.getState()){var pa=this.getCellAt(ja.graphX,ja.graphY);null!=pa&&this.isSwimlane(pa)&&this.hitsSwimlaneContent(pa,ja.graphX,ja.graphY)||(ja.state=this.view.getState(pa),null!=ja.state&&null!=ja.state.shape&&(this.container.style.cursor=ja.state.shape.node.style.cursor))}null==ja.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ja};var Q=!1,R=!1,X=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ja,
-pa,xa){ja==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),Q=this.isCellSelected(pa.getCell()),R=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());ia.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ja,pa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(pa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==pa.getState()||!pa.isSource(pa.getState().control))&&(this.popupMenuHandler.popupTrigger||
-!X&&!xa&&(R&&null==pa.getCell()&&this.isSelectionEmpty()||Q&&this.isCellSelected(pa.getCell())));xa=!Q||xa?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ua=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(pa.getX()+ua.x+1,pa.getY()+ua.y+1,ra,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ja,pa,xa])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};
-mxCellEditor.prototype.isContentEditing=function(){var B=this.graph.view.getState(this.editingCell);return null!=B&&1==B.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var B="";window.getSelection?B=window.getSelection():document.getSelection?B=document.getSelection():document.selection&&(B=document.selection.createRange().text);return""!=
-B};mxCellEditor.prototype.insertTab=function(B){var Q=this.textarea.ownerDocument.defaultView.getSelection(),R=Q.getRangeAt(0);B=Graph.createTabNode(B);R.insertNode(B);R.setStartAfter(B);R.setEndAfter(B);Q.removeAllRanges();Q.addRange(R)};mxCellEditor.prototype.alignText=function(B,Q){var R=this.graph.getView().getState(this.editingCell);if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var X=null!=R&&"vertical-"==R.substring(0,9),ia=null!=
-Q&&mxEvent.isShiftDown(Q);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ja=!0;this.graph.processElements(this.textarea,function(pa){ia||X||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ja=!1});(ja||X)&&this.graph.cellEditor.setAlign(B)}X||document.execCommand("justify"+B.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var B=window.getSelection();if(B.getRangeAt&&B.rangeCount){for(var Q=
-[],R=0,X=B.rangeCount;R<X;++R)Q.push(B.getRangeAt(R));return Q}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(B){try{if(B)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var Q=0,R=B.length;Q<R;++Q)sel.addRange(B[Q])}else document.selection&&B.select&&B.select()}catch(X){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
-function(B){null!=B.text&&(B.text.replaceLinefeeds="0"!=mxUtils.getValue(B.style,"nl2Br","1"));F.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(B,Q){this.isKeepFocusEvent(B)||!mxEvent.isAltDown(B.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(B){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var M=mxCellEditor.prototype.startEditing;
-mxCellEditor.prototype.startEditing=function(B,Q){B=this.graph.getStartEditingCell(B,Q);M.apply(this,arguments);var R=this.graph.view.getState(B);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(B)};mxCellEditor.prototype.toggleViewMode=function(){var B=this.graph.view.getState(this.editingCell);
-if(null!=B){var Q=null!=B&&"0"!=mxUtils.getValue(B.style,"nl2Br","1"),R=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=Graph.sanitizeHtml(Q?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(B.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
-Q=mxUtils.getValue(B.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(B.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ja=(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,pa=[];(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
-pa.push("underline");(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&pa.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration=pa.join(" ");this.textarea.style.fontWeight=ia?"bold":"normal";this.textarea.style.fontStyle=ja?"italic":"";this.textarea.style.fontFamily=
+xa.drawCellState=function(jb,Bb){for(var tb=jb.view.graph,xb=null!=Ra?Ra.get(jb.cell):tb.isCellSelected(jb.cell),zb=tb.model.getParent(jb.cell);!(ia&&null==Ra||xb)&&null!=zb;)xb=null!=Ra?Ra.get(zb):tb.isCellSelected(zb),zb=tb.model.getParent(zb);if(null!=jb.shape)try{var sb=jb.shape.isFlowAnimationEnabled,Db=jb.shape.addFlowAnimationToShape;jb.shape.isFlowAnimationEnabled=function(){return fb&&tb.model.isEdge(jb.cell)&&"1"==mxUtils.getValue(jb.style,"flowAnimation","0")};jb.shape.addFlowAnimationToShape=
+function(){tb.addFlowAnimationToNode(this.getFlowAnimationPath(),jb.style,Q,wb())};if(ia&&null==Ra||xb)tb.view.redrawEnumerationState(jb),Eb.apply(this,arguments),this.doDrawShape(jb.secondLabel,Bb)}finally{jb.shape.isFlowAnimationEnabled=sb,jb.shape.addFlowAnimationToShape=Db}};var kb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(kb),ob);this.addForeignObjectWarning(ob,qb);Pa?this.disableSvgLinks(qb):this.updateSvgLinks(qb,ra,!0);return qb}finally{this.enableFlowAnimation=
+fb,Ta&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(C,Q){if("0"!=urlParams["svg-warning"]&&0<Q.getElementsByTagName("foreignObject").length){var R=C.createElement("switch"),X=C.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ha=C.createElement("a");ha.setAttribute("transform","translate(0,-5)");null==ha.setAttributeNS||Q.ownerDocument!=document&&null==document.documentMode?
+(ha.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ha.setAttribute("target","_blank")):(ha.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ha.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));C=C.createElement("text");C.setAttribute("text-anchor","middle");C.setAttribute("font-size","10px");C.setAttribute("x","50%");C.setAttribute("y","100%");mxUtils.write(C,Graph.foreignObjectWarningText);R.appendChild(X);ha.appendChild(C);R.appendChild(ha);Q.appendChild(R)}};
+Graph.prototype.disableSvgLinks=function(C,Q){C=C.getElementsByTagName("a");for(var R=0;R<C.length;R++){var X=C[R].getAttribute("href");null==X&&(X=C[R].getAttribute("xlink:href"));null!=X&&(C[R].style.pointerEvents="none",C[R].setAttribute("href",""));Q&&Q(C[R])}};Graph.prototype.updateSvgLinks=function(C,Q,R){C=C.getElementsByTagName("a");for(var X=0;X<C.length;X++)if(null==C[X].getAttribute("target")){var ha=C[X].getAttribute("href");null==ha&&(ha=C[X].getAttribute("xlink:href"));null!=ha&&(null!=
+Q&&/^https?:\/\//.test(ha)?C[X].setAttribute("target",Q):R&&this.isCustomLink(ha)&&C[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(C){C=new mxSvgCanvas2D(C);C.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;C.adaptiveColors=this.getAdaptiveColors();C.pointerEvents=!0;return C};Graph.prototype.getSelectedElement=function(){var C=null;if(window.getSelection){var Q=window.getSelection();Q.getRangeAt&&Q.rangeCount&&(C=Q.getRangeAt(0).commonAncestorContainer)}else document.selection&&
+(C=document.selection.createRange().parentElement());return C};Graph.prototype.getSelectedEditingElement=function(){var C=null;if(null!=this.cellEditor.textarea)for(C=this.getSelectedElement();null!=C&&C.nodeType!=mxConstants.NODETYPE_ELEMENT;)C=C.parentNode;return C};Graph.prototype.getParentByName=function(C,Q,R){for(;null!=C&&C.nodeName!=Q;){if(C==R)return null;C=C.parentNode}return C};Graph.prototype.getParentByNames=function(C,Q,R){for(;null!=C&&!(0<=mxUtils.indexOf(Q,C.nodeName));){if(C==R)return null;
+C=C.parentNode}return C};Graph.prototype.selectNode=function(C){var Q=null;if(window.getSelection){if(Q=window.getSelection(),Q.getRangeAt&&Q.rangeCount){var R=document.createRange();R.selectNode(C);Q.removeAllRanges();Q.addRange(R)}}else(Q=document.selection)&&"Control"!=Q.type&&(C=Q.createRange(),C.collapse(!0),R=Q.createRange(),R.setEndPoint("StartToStart",C),R.select())};Graph.prototype.flipEdgePoints=function(C,Q,R){var X=this.getCellGeometry(C);if(null!=X){X=X.clone();if(null!=X.points)for(var ha=
+0;ha<X.points.length;ha++)Q?X.points[ha].x=R+(R-X.points[ha].x):X.points[ha].y=R+(R-X.points[ha].y);ha=function(ia){null!=ia&&(Q?ia.x=R+(R-ia.x):ia.y=R+(R-ia.y))};ha(X.getTerminalPoint(!0));ha(X.getTerminalPoint(!1));this.model.setGeometry(C,X)}};Graph.prototype.flipChildren=function(C,Q,R){this.model.beginUpdate();try{for(var X=this.model.getChildCount(C),ha=0;ha<X;ha++){var ia=this.model.getChildAt(C,ha);if(this.model.isEdge(ia))this.flipEdgePoints(ia,Q,R);else{var pa=this.getCellGeometry(ia);null!=
+pa&&(pa=pa.clone(),Q?pa.x=R+(R-pa.x-pa.width):pa.y=R+(R-pa.y-pa.height),this.model.setGeometry(ia,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(C,Q){this.model.beginUpdate();try{C=this.model.getTopmostCells(C);for(var R=[],X=0;X<C.length;X++)if(this.model.isEdge(C[X])){var ha=this.view.getState(C[X]);null!=ha&&this.flipEdgePoints(C[X],Q,(Q?ha.getCenterX():ha.getCenterY())/this.view.scale-(Q?ha.origin.x:ha.origin.y)-(Q?this.view.translate.x:this.view.translate.y))}else{var ia=
+this.getCellGeometry(C[X]);null!=ia&&this.flipChildren(C[X],Q,Q?ia.getCenterX()-ia.x:ia.getCenterY()-ia.y);R.push(C[X])}this.toggleCellStyles(Q?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(C,Q){var R=null;if(null!=C&&0<C.length){this.model.beginUpdate();try{for(var X=0;X<C.length;X++){var ha=this.model.getParent(C[X]);if(this.isTable(ha)){var ia=this.getCellGeometry(C[X]),pa=this.getCellGeometry(ha);null!=ia&&null!=pa&&
+(pa=pa.clone(),pa.height-=ia.height,this.model.setGeometry(ha,pa))}}var xa=this.selectParentAfterDelete?this.model.getParents(C):null;this.removeCells(C,Q)}finally{this.model.endUpdate()}if(null!=xa)for(R=[],X=0;X<xa.length;X++)this.model.contains(xa[X])&&(this.model.isVertex(xa[X])||this.model.isEdge(xa[X]))&&R.push(xa[X])}return R};Graph.prototype.insertTableColumn=function(C,Q){var R=this.getModel();R.beginUpdate();try{var X=C,ha=0;if(this.isTableCell(C)){var ia=R.getParent(C);X=R.getParent(ia);
+ha=mxUtils.indexOf(R.getChildCells(ia,!0),C)}else this.isTableRow(C)?X=R.getParent(C):C=R.getChildCells(X,!0)[0],Q||(ha=R.getChildCells(C,!0).length-1);var pa=R.getChildCells(X,!0),xa=Graph.minTableColumnWidth;for(C=0;C<pa.length;C++){var ra=R.getChildCells(pa[C],!0)[ha],ua=R.cloneCell(ra,!1);null==ua&&(ua=this.createVertex());var Ka=this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ka){null!=Ka.alternateBounds&&(Ka.width=
+Ka.alternateBounds.width,Ka.height=Ka.alternateBounds.height,Ka.alternateBounds=null);xa=Ka.width;var Va=this.getCellGeometry(pa[C]);null!=Va&&(Ka.height=Va.height)}R.add(pa[C],ua,ha+(Q?0:1))}var Oa=this.getCellGeometry(X);null!=Oa&&(Oa=Oa.clone(),Oa.width+=xa,R.setGeometry(X,Oa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=function(C){var Q=this.getModel();Q.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(C).childLayout?C:Q.getParent(C);var X=Q.getChildCells(R,!0);0==
+X.length?Q.remove(R):(R==C&&(C=X[X.length-1]),Q.remove(C))}finally{Q.endUpdate()}};Graph.prototype.insertLane=function(C,Q){var R=this.getModel();R.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(C).childLayout){X=C;var ha=R.getChildCells(X,!0);C=ha[Q?0:ha.length-1]}else X=R.getParent(C);var ia=X.getIndex(C);C=R.cloneCell(C,!1);C.value=null;R.add(X,C,ia+(Q?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(C,Q){var R=this.getModel();R.beginUpdate();try{var X=
+C,ha=C;if(this.isTableCell(C))ha=R.getParent(C),X=R.getParent(ha);else if(this.isTableRow(C))X=R.getParent(C);else{var ia=R.getChildCells(X,!0);ha=ia[Q?0:ia.length-1]}var pa=R.getChildCells(ha,!0),xa=X.getIndex(ha);ha=R.cloneCell(ha,!1);ha.value=null;var ra=this.getCellGeometry(ha);if(null!=ra){for(ia=0;ia<pa.length;ia++){C=R.cloneCell(pa[ia],!1);C.value=null;C.style=mxUtils.setStyle(mxUtils.setStyle(C.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(C);null!=ua&&(null!=ua.alternateBounds&&
+(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ra.height);ha.insert(C)}R.add(X,ha,xa+(Q?0:1));var Ka=this.getCellGeometry(X);null!=Ka&&(Ka=Ka.clone(),Ka.height+=ra.height,R.setGeometry(X,Ka))}}finally{R.endUpdate()}};Graph.prototype.deleteTableColumn=function(C){var Q=this.getModel();Q.beginUpdate();try{var R=C,X=C;this.isTableCell(C)&&(X=Q.getParent(C));this.isTableRow(X)&&(R=Q.getParent(X));var ha=Q.getChildCells(R,!0);if(0==ha.length)Q.remove(R);
+else{this.isTableRow(X)||(X=ha[0]);var ia=Q.getChildCells(X,!0);if(1>=ia.length)Q.remove(R);else{var pa=ia.length-1;this.isTableCell(C)&&(pa=mxUtils.indexOf(ia,C));for(X=C=0;X<ha.length;X++){var xa=Q.getChildCells(ha[X],!0)[pa];Q.remove(xa);var ra=this.getCellGeometry(xa);null!=ra&&(C=Math.max(C,ra.width))}var ua=this.getCellGeometry(R);null!=ua&&(ua=ua.clone(),ua.width-=C,Q.setGeometry(R,ua))}}}finally{Q.endUpdate()}};Graph.prototype.deleteTableRow=function(C){var Q=this.getModel();Q.beginUpdate();
+try{var R=C,X=C;this.isTableCell(C)&&(C=X=Q.getParent(C));this.isTableRow(C)&&(R=Q.getParent(X));var ha=Q.getChildCells(R,!0);if(1>=ha.length)Q.remove(R);else{this.isTableRow(X)||(X=ha[ha.length-1]);Q.remove(X);C=0;var ia=this.getCellGeometry(X);null!=ia&&(C=ia.height);var pa=this.getCellGeometry(R);null!=pa&&(pa=pa.clone(),pa.height-=C,Q.setGeometry(R,pa))}}finally{Q.endUpdate()}};Graph.prototype.insertRow=function(C,Q){for(var R=C.tBodies[0],X=R.rows[0].cells,ha=C=0;ha<X.length;ha++){var ia=X[ha].getAttribute("colspan");
+C+=null!=ia?parseInt(ia):1}Q=R.insertRow(Q);for(ha=0;ha<C;ha++)mxUtils.br(Q.insertCell(-1));return Q.cells[0]};Graph.prototype.deleteRow=function(C,Q){C.tBodies[0].deleteRow(Q)};Graph.prototype.insertColumn=function(C,Q){var R=C.tHead;if(null!=R)for(var X=0;X<R.rows.length;X++){var ha=document.createElement("th");R.rows[X].appendChild(ha);mxUtils.br(ha)}C=C.tBodies[0];for(R=0;R<C.rows.length;R++)X=C.rows[R].insertCell(Q),mxUtils.br(X);return C.rows[0].cells[0<=Q?Q:C.rows[0].cells.length-1]};Graph.prototype.deleteColumn=
+function(C,Q){if(0<=Q){C=C.tBodies[0].rows;for(var R=0;R<C.length;R++)C[R].cells.length>Q&&C[R].deleteCell(Q)}};Graph.prototype.pasteHtmlAtCaret=function(C){if(window.getSelection){var Q=window.getSelection();if(Q.getRangeAt&&Q.rangeCount){Q=Q.getRangeAt(0);Q.deleteContents();var R=document.createElement("div");R.innerHTML=C;C=document.createDocumentFragment();for(var X;X=R.firstChild;)lastNode=C.appendChild(X);Q.insertNode(C)}}else(Q=document.selection)&&"Control"!=Q.type&&Q.createRange().pasteHTML(C)};
+Graph.prototype.createLinkForHint=function(C,Q,R){function X(ia,pa){ia.length>pa&&(ia=ia.substring(0,Math.round(pa/2))+"..."+ia.substring(ia.length-Math.round(pa/4)));return ia}C=null!=C?C:"javascript:void(0);";if(null==Q||0==Q.length)Q=this.isCustomLink(C)?this.getLinkTitle(C):C;var ha=document.createElement("a");ha.setAttribute("rel",this.linkRelation);ha.setAttribute("href",this.getAbsoluteUrl(C));ha.setAttribute("title",X(this.isCustomLink(C)?this.getLinkTitle(C):C,80));null!=this.linkTarget&&
+ha.setAttribute("target",this.linkTarget);mxUtils.write(ha,X(Q,40));this.isCustomLink(C)&&mxEvent.addListener(ha,"click",mxUtils.bind(this,function(ia){this.customLinkClicked(C,R);mxEvent.consume(ia)}));return ha};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ia,pa){this.popupMenuHandler.hideMenu()});var C=this.updateMouseEvent;this.updateMouseEvent=function(ia){ia=
+C.apply(this,arguments);if(mxEvent.isTouchEvent(ia.getEvent())&&null==ia.getState()){var pa=this.getCellAt(ia.graphX,ia.graphY);null!=pa&&this.isSwimlane(pa)&&this.hitsSwimlaneContent(pa,ia.graphX,ia.graphY)||(ia.state=this.view.getState(pa),null!=ia.state&&null!=ia.state.shape&&(this.container.style.cursor=ia.state.shape.node.style.cursor))}null==ia.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ia};var Q=!1,R=!1,X=!1,ha=this.fireMouseEvent;this.fireMouseEvent=function(ia,
+pa,xa){ia==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),Q=this.isCellSelected(pa.getCell()),R=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());ha.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ia,pa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(pa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==pa.getState()||!pa.isSource(pa.getState().control))&&(this.popupMenuHandler.popupTrigger||
+!X&&!xa&&(R&&null==pa.getCell()&&this.isSelectionEmpty()||Q&&this.isCellSelected(pa.getCell())));xa=!Q||xa?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ua=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(pa.getX()+ua.x+1,pa.getY()+ua.y+1,ra,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ia,pa,xa])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};
+mxCellEditor.prototype.isContentEditing=function(){var C=this.graph.view.getState(this.editingCell);return null!=C&&1==C.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var C="";window.getSelection?C=window.getSelection():document.getSelection?C=document.getSelection():document.selection&&(C=document.selection.createRange().text);return""!=
+C};mxCellEditor.prototype.insertTab=function(C){var Q=this.textarea.ownerDocument.defaultView.getSelection(),R=Q.getRangeAt(0);C=Graph.createTabNode(C);R.insertNode(C);R.setStartAfter(C);R.setEndAfter(C);Q.removeAllRanges();Q.addRange(R)};mxCellEditor.prototype.alignText=function(C,Q){var R=this.graph.getView().getState(this.editingCell);if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var X=null!=R&&"vertical-"==R.substring(0,9),ha=null!=
+Q&&mxEvent.isShiftDown(Q);if(ha||null!=window.getSelection&&null!=window.getSelection().containsNode){var ia=!0;this.graph.processElements(this.textarea,function(pa){ha||X||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ia=!1});(ia||X)&&this.graph.cellEditor.setAlign(C)}X||document.execCommand("justify"+C.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var C=window.getSelection();if(C.getRangeAt&&C.rangeCount){for(var Q=
+[],R=0,X=C.rangeCount;R<X;++R)Q.push(C.getRangeAt(R));return Q}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(C){try{if(C)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var Q=0,R=C.length;Q<R;++Q)sel.addRange(C[Q])}else document.selection&&C.select&&C.select()}catch(X){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
+function(C){null!=C.text&&(C.text.replaceLinefeeds="0"!=mxUtils.getValue(C.style,"nl2Br","1"));F.apply(this,arguments)};var G=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(C,Q){this.isKeepFocusEvent(C)||!mxEvent.isAltDown(C.getEvent())?G.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(C){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var L=mxCellEditor.prototype.startEditing;
+mxCellEditor.prototype.startEditing=function(C,Q){C=this.graph.getStartEditingCell(C,Q);L.apply(this,arguments);var R=this.graph.view.getState(C);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(C)};mxCellEditor.prototype.toggleViewMode=function(){var C=this.graph.view.getState(this.editingCell);
+if(null!=C){var Q=null!=C&&"0"!=mxUtils.getValue(C.style,"nl2Br","1"),R=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=Graph.sanitizeHtml(Q?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(C.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
+Q=mxUtils.getValue(C.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(C.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ha=(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ia=(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,pa=[];(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
+pa.push("underline");(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&pa.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration=pa.join(" ");this.textarea.style.fontWeight=ha?"bold":"normal";this.textarea.style.fontStyle=ia?"italic":"";this.textarea.style.fontFamily=
Q;this.textarea.style.textAlign=X;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText=
"");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=Graph.sanitizeHtml(Q?xa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):xa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ra=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;
this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
-this.switchSelectionState=R;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(B,Q){if(null!=this.textarea)if(B=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=B){var R=B.view.scale;this.bounds=mxRectangle.fromRectangle(B);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*R;this.bounds.height=60*R;var X=null!=B.text?B.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(B.style,mxConstants.STYLE_ALIGN,
-mxConstants.ALIGN_CENTER),mxUtils.getValue(B.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/R)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/R)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/R)+(this.textarea.offsetHeight-
+this.switchSelectionState=R;this.resize()}};var M=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(C,Q){if(null!=this.textarea)if(C=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=C){var R=C.view.scale;this.bounds=mxRectangle.fromRectangle(C);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*R;this.bounds.height=60*R;var X=null!=C.text?C.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(C.style,mxConstants.STYLE_ALIGN,
+mxConstants.ALIGN_CENTER),mxUtils.getValue(C.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/R)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/R)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/R)+(this.textarea.offsetHeight-
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*R);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/R)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*R);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+R+","+
-R+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(B,Q){if("0"==mxUtils.getValue(B.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var R=this.graph.getEditingValue(B.cell,Q);"1"==mxUtils.getValue(B.style,"nl2Br","1")&&(R=R.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(R,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;
-mxCellEditor.prototype.setEditingValue=function(B,Q){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(B.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(B){if("0"==mxUtils.getValue(B.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,
-Graph.backupStyleAttribute);var Q=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(B.style,"nl2Br","1")?(Q=Q.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<Q.length&&("<br/>"==Q.substring(Q.length-5)||"<br>"==Q.substring(Q.length-4))&&(Q=Q.substring(0,Q.lastIndexOf("<br"))+"<div><br/></div>")):Q=Q.replace(/\r\n/g,"").replace(/\n/g,"");return Q};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(B){this.codeViewMode&&this.toggleViewMode();K.apply(this,
-arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(B){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(B,Q){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==Q&&this.graph.isCellDeletable(B.cell)&&0==this.graph.model.getChildCount(B.cell)&&this.graph.isTransparentState(B)&&this.graph.removeCells([B.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
-function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);B==mxConstants.NONE&&(B=null);return B};mxCellEditor.prototype.getBorderColor=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);B==mxConstants.NONE&&(B=null);return B};mxCellEditor.prototype.getMinimumSize=function(B){var Q=this.graph.getView().scale;return new mxRectangle(0,0,null==B.text?30:B.text.size*Q+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;
-mxGraphHandler.prototype.isValidDropTarget=function(B,Q){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(Q.getEvent)};mxGraphView.prototype.formatUnitText=function(B){return B?f(B,this.unit):B};mxGraphHandler.prototype.updateHint=function(B){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var Q=this.graph.view.translate,R=this.graph.view.scale;B=this.roundLength((this.bounds.x+
-this.currentDx)/R-Q.x);Q=this.roundLength((this.bounds.y+this.currentDy)/R-Q.y);R=this.graph.view.unit;this.hint.innerHTML=f(B,R)+", "+f(Q,R);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};
-var ha=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(B,Q){ha.apply(this,arguments);var R=this.graph.getCellStyle(B);if(null==R.childLayout){var X=this.graph.model.getParent(B),ia=null!=X?this.graph.getCellGeometry(X):null;if(null!=ia&&(R=this.graph.getCellStyle(X),"stackLayout"==R.childLayout)){var ja=parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));R="1"==mxUtils.getValue(R,"horizontalStack","1");var pa=this.graph.getActualStartSize(X);
-ia=ia.clone();R?ia.height=Q.height+pa.y+pa.height+2*ja:ia.width=Q.width+pa.x+pa.width+2*ja;this.graph.model.setGeometry(X,ia)}}};var ca=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function B(xa){R.get(xa)||(R.put(xa,!0),ia.push(xa))}for(var Q=ca.apply(this,arguments),R=new mxDictionary,X=this.graph.model,ia=[],ja=0;ja<Q.length;ja++){var pa=Q[ja];this.graph.isTableCell(pa)?B(X.getParent(X.getParent(pa))):this.graph.isTableRow(pa)&&
-B(X.getParent(pa));B(pa)}return ia};var aa=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(B){return aa.apply(this,arguments)&&!mxEvent.isControlDown(B.getEvent())&&!mxEvent.isShiftDown(B.getEvent())};var oa=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return oa.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&
-!this.graph.isSwimlane(this.state.cell)};var da=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(B){var Q=da.apply(this,arguments);Q.stroke="#C0C0C0";Q.strokewidth=1;return Q};var ka=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(B){var Q=ka.apply(this,arguments);Q.stroke="#C0C0C0";Q.strokewidth=1;return Q};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
-function(){var B=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+B.x/2,this.bounds.y+this.rotationHandleVSpacing-B.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(B,Q){return this.graph.isRecursiveVertexResize(B)&&!mxEvent.isAltDown(Q.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(B,Q){return mxEvent.isControlDown(Q.getEvent())||mxEvent.isMetaDown(Q.getEvent())};var ba=mxVertexHandler.prototype.isRotationHandleVisible;
-mxVertexHandler.prototype.isRotationHandleVisible=function(){return ba.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var V=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=
-function(){return V.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var k=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(B){return B.tableHandle||k.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var B=0;this.graph.isTableRow(this.state.cell)?B=1:this.graph.isTableCell(this.state.cell)&&
-(B=2);return B};var v=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return v.apply(this,arguments).grow(-this.getSelectionBorderInset())};var I=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==I&&(I=mxCellRenderer.defaultShapes.tableLine);var B=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var Q=function(Za,
-Pa,Ra){for(var fb=[],eb=0;eb<Za.length;eb++){var bb=Za[eb];fb.push(null==bb?null:new mxPoint((ra+bb.x+Pa)*ja,(ua+bb.y+Ra)*ja))}return fb},R=this,X=this.graph,ia=X.model,ja=X.view.scale,pa=this.state,xa=this.selectionBorder,ra=this.state.origin.x+X.view.translate.x,ua=this.state.origin.y+X.view.translate.y;null==B&&(B=[]);var Ka=X.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Ka.length){var Va=ia.getChildCells(Ka[0].cell,!0),Oa=X.getTableLines(this.state.cell,!1,!0),Ta=X.getTableLines(this.state.cell,
-!0,!1);for(ia=0;ia<Ka.length;ia++)mxUtils.bind(this,function(Za){var Pa=Ka[Za],Ra=null;if(X.isCellMovable(Pa.cell)){Ra=Za<Ka.length-1?Ka[Za+1]:null;Ra=null!=Ra?X.getCellGeometry(Ra.cell):null;var fb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:Ra;Ra=null!=Ta[Za]?new I(Ta[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ra.isDashed=xa.isDashed;Ra.svgStrokeTolerance++;Ra=new mxHandle(Pa,"row-resize",null,Ra);Ra.tableHandle=!0;var eb=0;Ra.shape.node.parentNode.insertBefore(Ra.shape.node,
-Ra.shape.node.parentNode.firstChild);Ra.redraw=function(){if(null!=this.shape){this.shape.stroke=0==eb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==I)this.shape.line=Q(Ta[Za],0,eb),this.shape.updateBoundsFromLine();else{var db=X.getActualStartSize(pa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+eb*ja;this.shape.bounds.x=pa.x+(Za==Ka.length-1?0:db.x*ja);this.shape.bounds.width=pa.width-(Za==Ka.length-1?0:db.width+db.x+ja)}this.shape.redraw()}};var bb=
-!1;Ra.setPosition=function(db,mb,lb){eb=Math.max(Graph.minTableRowHeight-db.height,mb.y-db.y-db.height);bb=mxEvent.isShiftDown(lb.getEvent());null!=fb&&bb&&(eb=Math.min(eb,fb.height-Graph.minTableRowHeight))};Ra.execute=function(db){if(0!=eb)X.setTableRowHeight(this.state.cell,eb,!bb);else if(!R.blockDelayedSelection){var mb=X.getCellAt(db.getGraphX(),db.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(mb,db)}eb=0};Ra.reset=function(){eb=0}}B.push(Ra)})(ia);for(ia=0;ia<Va.length;ia++)mxUtils.bind(this,
-function(Za){var Pa=X.view.getState(Va[Za]),Ra=X.getCellGeometry(Va[Za]),fb=null!=Ra.alternateBounds?Ra.alternateBounds:Ra;null==Pa&&(Pa=new mxCellState(X.view,Va[Za],X.getCellStyle(Va[Za])),Pa.x=pa.x+Ra.x*ja,Pa.y=pa.y+Ra.y*ja,Pa.width=fb.width*ja,Pa.height=fb.height*ja,Pa.updateCachedBounds());Ra=Za<Va.length-1?Va[Za+1]:null;Ra=null!=Ra?X.getCellGeometry(Ra):null;var eb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:Ra;Ra=null!=Oa[Za]?new I(Oa[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,
-mxConstants.NONE,1,!0);Ra.isDashed=xa.isDashed;Ra.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Ra);Pa.tableHandle=!0;var bb=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==bb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==I)this.shape.line=Q(Oa[Za],bb,0),this.shape.updateBoundsFromLine();else{var mb=X.getActualStartSize(pa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
-this.state.x+(fb.width+bb)*ja;this.shape.bounds.y=pa.y+(Za==Va.length-1?0:mb.y*ja);this.shape.bounds.height=pa.height-(Za==Va.length-1?0:(mb.height+mb.y)*ja)}this.shape.redraw()}};var db=!1;Pa.setPosition=function(mb,lb,pb){bb=Math.max(Graph.minTableColumnWidth-fb.width,lb.x-mb.x-fb.width);db=mxEvent.isShiftDown(pb.getEvent());null==eb||db||(bb=Math.min(bb,eb.width-Graph.minTableColumnWidth))};Pa.execute=function(mb){if(0!=bb)X.setTableColumnWidth(this.state.cell,bb,db);else if(!R.blockDelayedSelection){var lb=
-X.getCellAt(mb.getGraphX(),mb.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(lb,mb)}bb=0};Pa.positionChanged=function(){};Pa.reset=function(){bb=0};B.push(Pa)})(ia)}}return null!=B?B.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(B){T.apply(this,arguments);if(null!=this.moveHandles)for(var Q=0;Q<this.moveHandles.length;Q++)null!=this.moveHandles[Q]&&(this.moveHandles[Q].node.style.visibility=B?"":"hidden");if(null!=this.cornerHandles)for(Q=
-0;Q<this.cornerHandles.length;Q++)this.cornerHandles[Q].node.style.visibility=B?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var B=this.isMoveHandlesVisible();B&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():B||null==this.moveHandles||this.destroyMoveHandles();if(B&&null==this.moveHandles){for(B=0;B<this.moveHandles.length;B++)null!=
-this.moveHandles[B]&&this.moveHandles[B].parentNode.removeChild(this.moveHandles[B]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var B=this.graph,Q=B.model,R=[],X=0;X<Q.getChildCount(this.state.cell);X++)mxUtils.bind(this,function(ia){if(null!=ia&&Q.isVertex(ia.cell)&&B.isCellMovable(ia.cell)){var ja=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ja=new mxImageShape(ja,this.rowHandleImage.src);ja.rowState=ia;ja.dialect=this.graph.dialect!=
-mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ja.init(this.graph.getView().getOverlayPane());ja.node.style.cursor="move";mxEvent.addGestureListeners(ja.node,mxUtils.bind(this,function(pa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(pa)&&this.graph.isCellSelected(ia.cell)||this.graph.selectCellForEvent(ia.cell,pa);mxEvent.isPopupTrigger(pa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(pa),mxEvent.getClientY(pa),
-this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(pa),this.graph.isMouseDown=!0);mxEvent.consume(pa)}),null,mxUtils.bind(this,function(pa){mxEvent.isPopupTrigger(pa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(pa),mxEvent.getClientY(pa),ia.cell,pa),mxEvent.consume(pa))}));R.push(ja)}else R.push(null)})(this.graph.view.getState(Q.getChildAt(this.state.cell,X)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=
-this.moveHandles){for(var B=0;B<this.moveHandles.length;B++)null!=this.moveHandles[B]&&this.moveHandles[B].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var B=0;B<this.cornerHandles.length;B++)null!=this.cornerHandles[B]&&null!=this.cornerHandles[B].node&&null!=this.cornerHandles[B].node.parentNode&&this.cornerHandles[B].node.parentNode.removeChild(this.cornerHandles[B].node);this.cornerHandles=null}};var W=mxVertexHandler.prototype.refresh;
-mxVertexHandler.prototype.refresh=function(){W.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var B=0;4>B;B++){var Q=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",
-mxConstants.HANDLE_STROKECOLOR);Q.dialect=mxConstants.DIALECT_SVG;Q.init(this.graph.view.getOverlayPane());this.cornerHandles.push(Q)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();B=this.graph.getLinkForCell(this.state.cell);Q=this.graph.getLinksForState(this.state);this.updateLinkHint(B,Q)};var U=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var B=new mxPoint(0,0),Q=this.tolerance,R=this.state.style.shape;
-null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=this.customHandles[X]&&null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var ia=this.customHandles[X].shape.bounds,ja=ia.getCenterX(),pa=ia.getCenterY();if(Math.abs(this.state.x-ja)<ia.width/2||Math.abs(this.state.y-pa)<ia.height/
-2||Math.abs(this.state.x+this.state.width-ja)<ia.width/2||Math.abs(this.state.y+this.state.height-pa)<ia.height/2){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(Q/=2,this.graph.isTable(this.state.cell)&&(Q+=7),B.x=this.sizers[0].bounds.width+Q,B.y=this.sizers[0].bounds.height+Q):B=U.apply(this,arguments);return B};mxVertexHandler.prototype.updateHint=function(B){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
-if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{B=this.state.view.scale;var Q=this.state.view.unit;this.hint.innerHTML=f(this.roundLength(this.bounds.width/B),Q)+" x "+f(this.roundLength(this.bounds.height/B),Q)}B=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==B&&(B=this.bounds);this.hint.style.left=B.x+Math.round((B.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
-B.y+B.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var Y=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){Y.apply(this,arguments);var B=this.graph.getLinkForCell(this.state.cell),Q=this.graph.getLinksForState(this.state);this.updateLinkHint(B,Q)};var fa=mxEdgeHandler.prototype.mouseMove;
-mxEdgeHandler.prototype.mouseMove=function(B,Q){fa.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var na=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(B,Q){na.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=
-function(B,Q,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var X=this.graph.view.translate,ia=this.graph.view.scale,ja=this.roundLength(Q.x/ia-X.x);X=this.roundLength(Q.y/ia-X.y);var pa=this.graph.view.unit;this.hint.innerHTML=f(ja,pa)+", "+f(X,pa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(pa==mxConstants.POINTS?Math.round(R.length/ia):f(R.length/ia,pa))+")");if(this.isSource||this.isTarget)null!=
-this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(B.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(B.getGraphY(),Q.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display=
+R+")")}else this.textarea.style.height="",this.textarea.style.overflow="",M.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(C,Q){if("0"==mxUtils.getValue(C.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var R=this.graph.getEditingValue(C.cell,Q);"1"==mxUtils.getValue(C.style,"nl2Br","1")&&(R=R.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(R,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;
+mxCellEditor.prototype.setEditingValue=function(C,Q){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(C.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(C){if("0"==mxUtils.getValue(C.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,
+Graph.backupStyleAttribute);var Q=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(C.style,"nl2Br","1")?(Q=Q.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<Q.length&&("<br/>"==Q.substring(Q.length-5)||"<br>"==Q.substring(Q.length-4))&&(Q=Q.substring(0,Q.lastIndexOf("<br"))+"<div><br/></div>")):Q=Q.replace(/\r\n/g,"").replace(/\n/g,"");return Q};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(C){this.codeViewMode&&this.toggleViewMode();K.apply(this,
+arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(C){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(C,Q){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==Q&&this.graph.isCellDeletable(C.cell)&&0==this.graph.model.getChildCount(C.cell)&&this.graph.isTransparentState(C)&&this.graph.removeCells([C.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
+function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);C==mxConstants.NONE&&(C=null);return C};mxCellEditor.prototype.getBorderColor=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);C==mxConstants.NONE&&(C=null);return C};mxCellEditor.prototype.getMinimumSize=function(C){var Q=this.graph.getView().scale;return new mxRectangle(0,0,null==C.text?30:C.text.size*Q+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;
+mxGraphHandler.prototype.isValidDropTarget=function(C,Q){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(Q.getEvent)};mxGraphView.prototype.formatUnitText=function(C){return C?f(C,this.unit):C};mxGraphHandler.prototype.updateHint=function(C){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var Q=this.graph.view.translate,R=this.graph.view.scale;C=this.roundLength((this.bounds.x+
+this.currentDx)/R-Q.x);Q=this.roundLength((this.bounds.y+this.currentDy)/R-Q.y);R=this.graph.view.unit;this.hint.innerHTML=f(C,R)+", "+f(Q,R);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};
+var ja=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(C,Q){ja.apply(this,arguments);var R=this.graph.getCellStyle(C);if(null==R.childLayout){var X=this.graph.model.getParent(C),ha=null!=X?this.graph.getCellGeometry(X):null;if(null!=ha&&(R=this.graph.getCellStyle(X),"stackLayout"==R.childLayout)){var ia=parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));R="1"==mxUtils.getValue(R,"horizontalStack","1");var pa=this.graph.getActualStartSize(X);
+ha=ha.clone();R?ha.height=Q.height+pa.y+pa.height+2*ia:ha.width=Q.width+pa.x+pa.width+2*ia;this.graph.model.setGeometry(X,ha)}}};var da=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function C(xa){R.get(xa)||(R.put(xa,!0),ha.push(xa))}for(var Q=da.apply(this,arguments),R=new mxDictionary,X=this.graph.model,ha=[],ia=0;ia<Q.length;ia++){var pa=Q[ia];this.graph.isTableCell(pa)?C(X.getParent(X.getParent(pa))):this.graph.isTableRow(pa)&&
+C(X.getParent(pa));C(pa)}return ha};var ba=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(C){return ba.apply(this,arguments)&&!mxEvent.isControlDown(C.getEvent())&&!mxEvent.isShiftDown(C.getEvent())};var na=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return na.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&
+!this.graph.isSwimlane(this.state.cell)};var ca=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(C){var Q=ca.apply(this,arguments);Q.stroke="#C0C0C0";Q.strokewidth=1;return Q};var ka=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(C){var Q=ka.apply(this,arguments);Q.stroke="#C0C0C0";Q.strokewidth=1;return Q};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
+function(){var C=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+C.x/2,this.bounds.y+this.rotationHandleVSpacing-C.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(C,Q){return this.graph.isRecursiveVertexResize(C)&&!mxEvent.isAltDown(Q.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(C,Q){return mxEvent.isControlDown(Q.getEvent())||mxEvent.isMetaDown(Q.getEvent())};var aa=mxVertexHandler.prototype.isRotationHandleVisible;
+mxVertexHandler.prototype.isRotationHandleVisible=function(){return aa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var V=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=
+function(){return V.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var k=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(C){return C.tableHandle||k.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var C=0;this.graph.isTableRow(this.state.cell)?C=1:this.graph.isTableCell(this.state.cell)&&
+(C=2);return C};var v=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return v.apply(this,arguments).grow(-this.getSelectionBorderInset())};var J=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==J&&(J=mxCellRenderer.defaultShapes.tableLine);var C=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var Q=function(Za,
+Pa,Ra){for(var fb=[],eb=0;eb<Za.length;eb++){var bb=Za[eb];fb.push(null==bb?null:new mxPoint((ra+bb.x+Pa)*ia,(ua+bb.y+Ra)*ia))}return fb},R=this,X=this.graph,ha=X.model,ia=X.view.scale,pa=this.state,xa=this.selectionBorder,ra=this.state.origin.x+X.view.translate.x,ua=this.state.origin.y+X.view.translate.y;null==C&&(C=[]);var Ka=X.view.getCellStates(ha.getChildCells(this.state.cell,!0));if(0<Ka.length){var Va=ha.getChildCells(Ka[0].cell,!0),Oa=X.getTableLines(this.state.cell,!1,!0),Ta=X.getTableLines(this.state.cell,
+!0,!1);for(ha=0;ha<Ka.length;ha++)mxUtils.bind(this,function(Za){var Pa=Ka[Za],Ra=null;if(X.isCellMovable(Pa.cell)){Ra=Za<Ka.length-1?Ka[Za+1]:null;Ra=null!=Ra?X.getCellGeometry(Ra.cell):null;var fb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:Ra;Ra=null!=Ta[Za]?new J(Ta[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ra.isDashed=xa.isDashed;Ra.svgStrokeTolerance++;Ra=new mxHandle(Pa,"row-resize",null,Ra);Ra.tableHandle=!0;var eb=0;Ra.shape.node.parentNode.insertBefore(Ra.shape.node,
+Ra.shape.node.parentNode.firstChild);Ra.redraw=function(){if(null!=this.shape){this.shape.stroke=0==eb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=Q(Ta[Za],0,eb),this.shape.updateBoundsFromLine();else{var db=X.getActualStartSize(pa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+eb*ia;this.shape.bounds.x=pa.x+(Za==Ka.length-1?0:db.x*ia);this.shape.bounds.width=pa.width-(Za==Ka.length-1?0:db.width+db.x+ia)}this.shape.redraw()}};var bb=
+!1;Ra.setPosition=function(db,mb,lb){eb=Math.max(Graph.minTableRowHeight-db.height,mb.y-db.y-db.height);bb=mxEvent.isShiftDown(lb.getEvent());null!=fb&&bb&&(eb=Math.min(eb,fb.height-Graph.minTableRowHeight))};Ra.execute=function(db){if(0!=eb)X.setTableRowHeight(this.state.cell,eb,!bb);else if(!R.blockDelayedSelection){var mb=X.getCellAt(db.getGraphX(),db.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(mb,db)}eb=0};Ra.reset=function(){eb=0}}C.push(Ra)})(ha);for(ha=0;ha<Va.length;ha++)mxUtils.bind(this,
+function(Za){var Pa=X.view.getState(Va[Za]),Ra=X.getCellGeometry(Va[Za]),fb=null!=Ra.alternateBounds?Ra.alternateBounds:Ra;null==Pa&&(Pa=new mxCellState(X.view,Va[Za],X.getCellStyle(Va[Za])),Pa.x=pa.x+Ra.x*ia,Pa.y=pa.y+Ra.y*ia,Pa.width=fb.width*ia,Pa.height=fb.height*ia,Pa.updateCachedBounds());Ra=Za<Va.length-1?Va[Za+1]:null;Ra=null!=Ra?X.getCellGeometry(Ra):null;var eb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:Ra;Ra=null!=Oa[Za]?new J(Oa[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,
+mxConstants.NONE,1,!0);Ra.isDashed=xa.isDashed;Ra.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Ra);Pa.tableHandle=!0;var bb=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==bb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=Q(Oa[Za],bb,0),this.shape.updateBoundsFromLine();else{var mb=X.getActualStartSize(pa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
+this.state.x+(fb.width+bb)*ia;this.shape.bounds.y=pa.y+(Za==Va.length-1?0:mb.y*ia);this.shape.bounds.height=pa.height-(Za==Va.length-1?0:(mb.height+mb.y)*ia)}this.shape.redraw()}};var db=!1;Pa.setPosition=function(mb,lb,pb){bb=Math.max(Graph.minTableColumnWidth-fb.width,lb.x-mb.x-fb.width);db=mxEvent.isShiftDown(pb.getEvent());null==eb||db||(bb=Math.min(bb,eb.width-Graph.minTableColumnWidth))};Pa.execute=function(mb){if(0!=bb)X.setTableColumnWidth(this.state.cell,bb,db);else if(!R.blockDelayedSelection){var lb=
+X.getCellAt(mb.getGraphX(),mb.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(lb,mb)}bb=0};Pa.positionChanged=function(){};Pa.reset=function(){bb=0};C.push(Pa)})(ha)}}return null!=C?C.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(C){T.apply(this,arguments);if(null!=this.moveHandles)for(var Q=0;Q<this.moveHandles.length;Q++)null!=this.moveHandles[Q]&&(this.moveHandles[Q].node.style.visibility=C?"":"hidden");if(null!=this.cornerHandles)for(Q=
+0;Q<this.cornerHandles.length;Q++)this.cornerHandles[Q].node.style.visibility=C?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var C=this.isMoveHandlesVisible();C&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():C||null==this.moveHandles||this.destroyMoveHandles();if(C&&null==this.moveHandles){for(C=0;C<this.moveHandles.length;C++)null!=
+this.moveHandles[C]&&this.moveHandles[C].parentNode.removeChild(this.moveHandles[C]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var C=this.graph,Q=C.model,R=[],X=0;X<Q.getChildCount(this.state.cell);X++)mxUtils.bind(this,function(ha){if(null!=ha&&Q.isVertex(ha.cell)&&C.isCellMovable(ha.cell)){var ia=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ia=new mxImageShape(ia,this.rowHandleImage.src);ia.rowState=ha;ia.dialect=this.graph.dialect!=
+mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ia.init(this.graph.getView().getOverlayPane());ia.node.style.cursor="move";mxEvent.addGestureListeners(ia.node,mxUtils.bind(this,function(pa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(pa)&&this.graph.isCellSelected(ha.cell)||this.graph.selectCellForEvent(ha.cell,pa);mxEvent.isPopupTrigger(pa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(pa),mxEvent.getClientY(pa),
+this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(pa),this.graph.isMouseDown=!0);mxEvent.consume(pa)}),null,mxUtils.bind(this,function(pa){mxEvent.isPopupTrigger(pa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(pa),mxEvent.getClientY(pa),ha.cell,pa),mxEvent.consume(pa))}));R.push(ia)}else R.push(null)})(this.graph.view.getState(Q.getChildAt(this.state.cell,X)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=
+this.moveHandles){for(var C=0;C<this.moveHandles.length;C++)null!=this.moveHandles[C]&&this.moveHandles[C].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var C=0;C<this.cornerHandles.length;C++)null!=this.cornerHandles[C]&&null!=this.cornerHandles[C].node&&null!=this.cornerHandles[C].node.parentNode&&this.cornerHandles[C].node.parentNode.removeChild(this.cornerHandles[C].node);this.cornerHandles=null}};var W=mxVertexHandler.prototype.refresh;
+mxVertexHandler.prototype.refresh=function(){W.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var C=0;4>C;C++){var Q=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",
+mxConstants.HANDLE_STROKECOLOR);Q.dialect=mxConstants.DIALECT_SVG;Q.init(this.graph.view.getOverlayPane());this.cornerHandles.push(Q)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();C=this.graph.getLinkForCell(this.state.cell);Q=this.graph.getLinksForState(this.state);this.updateLinkHint(C,Q)};var U=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var C=new mxPoint(0,0),Q=this.tolerance,R=this.state.style.shape;
+null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=this.customHandles[X]&&null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var ha=this.customHandles[X].shape.bounds,ia=ha.getCenterX(),pa=ha.getCenterY();if(Math.abs(this.state.x-ia)<ha.width/2||Math.abs(this.state.y-pa)<ha.height/
+2||Math.abs(this.state.x+this.state.width-ia)<ha.width/2||Math.abs(this.state.y+this.state.height-pa)<ha.height/2){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(Q/=2,this.graph.isTable(this.state.cell)&&(Q+=7),C.x=this.sizers[0].bounds.width+Q,C.y=this.sizers[0].bounds.height+Q):C=U.apply(this,arguments);return C};mxVertexHandler.prototype.updateHint=function(C){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
+if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{C=this.state.view.scale;var Q=this.state.view.unit;this.hint.innerHTML=f(this.roundLength(this.bounds.width/C),Q)+" x "+f(this.roundLength(this.bounds.height/C),Q)}C=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==C&&(C=this.bounds);this.hint.style.left=C.x+Math.round((C.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
+C.y+C.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var Y=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){Y.apply(this,arguments);var C=this.graph.getLinkForCell(this.state.cell),Q=this.graph.getLinksForState(this.state);this.updateLinkHint(C,Q)};var fa=mxEdgeHandler.prototype.mouseMove;
+mxEdgeHandler.prototype.mouseMove=function(C,Q){fa.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var oa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(C,Q){oa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=
+function(C,Q,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var X=this.graph.view.translate,ha=this.graph.view.scale,ia=this.roundLength(Q.x/ha-X.x);X=this.roundLength(Q.y/ha-X.y);var pa=this.graph.view.unit;this.hint.innerHTML=f(ia,pa)+", "+f(X,pa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(pa==mxConstants.POINTS?Math.round(R.length/ha):f(R.length/ha,pa))+")");if(this.isSource||this.isTarget)null!=
+this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(C.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(C.getGraphY(),Q.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display=
"none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');
mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');
HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+
@@ -2718,415 +2722,415 @@ HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy=
HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.endFixedHandleImage=HoverIcons.prototype.endFixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=
HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=32;mxGraphHandler.prototype.previewColor="light-dark(#000000, #cccccc)";mxRubberband.prototype.defaultOpacity=
30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=
-function(B){return!mxEvent.isShiftDown(B.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(B){return!mxEvent.isShiftDown(B.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(B){return mxEvent.isMouseEvent(B.getEvent())?
-4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(B){var Q=B.getEvent();return null==B.getState()&&!mxEvent.isMouseEvent(Q)||mxEvent.isPopupTrigger(Q)&&(null==B.getState()||mxEvent.isControlDown(Q)||mxEvent.isShiftDown(Q))}}else mxPanningHandler.prototype.isPanningTrigger=function(B){var Q=B.getEvent();return mxEvent.isLeftMouseButton(Q)&&(this.useLeftButtonForPanning&&null==B.getState()||mxEvent.isControlDown(Q)&&!mxEvent.isShiftDown(Q))||this.usePopupTrigger&&mxEvent.isPopupTrigger(Q)};
-mxRubberband.prototype.isSpaceEvent=function(B){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(B.getEvent())||mxEvent.isMetaDown(B.getEvent()))&&mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(B,Q){if(this.cancelled)this.cancelled=!1,Q.consume();else{var R=
-null!=this.div&&"none"!=this.div.style.display,X=null,ia=null,ja=B=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ia=this.first.y,B=(this.currentX-X)/this.graph.view.scale,ja=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||(B=this.graph.snap(B),ja=this.graph.snap(ja),this.graph.isGridEnabled()||(Math.abs(B)<this.graph.tolerance&&(B=0),Math.abs(ja)<this.graph.tolerance&&(ja=0))));this.reset();if(R){if(this.isSpaceEvent(Q)){this.graph.model.beginUpdate();
-try{var pa=this.graph.getCellsBeyond(X,ia,this.graph.getDefaultParent(),!0,!0);for(R=0;R<pa.length;R++)if(this.graph.isCellMovable(pa[R])){var xa=this.graph.view.getState(pa[R]),ra=this.graph.getCellGeometry(pa[R]);null!=xa&&null!=ra&&(ra=ra.clone(),ra.translate(B,ja),this.graph.model.setGeometry(pa[R],ra))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,Q.getEvent());Q.consume()}}};mxRubberband.prototype.mouseMove=function(B,
-Q){if(!Q.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);B=mxUtils.getOffset(this.graph.container);R.x-=B.x;R.y-=B.y;B=Q.getX()+R.x;R=Q.getY()+R.y;var X=this.first.x-B,ia=this.first.y-R,ja=this.graph.tolerance;if(null!=this.div||Math.abs(X)>ja||Math.abs(ia)>ja)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(B,R),this.isSpaceEvent(Q)?(B=this.x+this.width,R=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||
-(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=B-this.width),this.y<this.first.y&&(this.y=R-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=
+function(C){return!mxEvent.isShiftDown(C.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(C){return!mxEvent.isShiftDown(C.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(C){return mxEvent.isMouseEvent(C.getEvent())?
+4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(C){var Q=C.getEvent();return null==C.getState()&&!mxEvent.isMouseEvent(Q)||mxEvent.isPopupTrigger(Q)&&(null==C.getState()||mxEvent.isControlDown(Q)||mxEvent.isShiftDown(Q))}}else mxPanningHandler.prototype.isPanningTrigger=function(C){var Q=C.getEvent();return mxEvent.isLeftMouseButton(Q)&&(this.useLeftButtonForPanning&&null==C.getState()||mxEvent.isControlDown(Q)&&!mxEvent.isShiftDown(Q))||this.usePopupTrigger&&mxEvent.isPopupTrigger(Q)};
+mxRubberband.prototype.isSpaceEvent=function(C){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(C.getEvent())||mxEvent.isMetaDown(C.getEvent()))&&mxEvent.isShiftDown(C.getEvent())&&mxEvent.isAltDown(C.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(C,Q){if(this.cancelled)this.cancelled=!1,Q.consume();else{var R=
+null!=this.div&&"none"!=this.div.style.display,X=null,ha=null,ia=C=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ha=this.first.y,C=(this.currentX-X)/this.graph.view.scale,ia=(this.currentY-ha)/this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||(C=this.graph.snap(C),ia=this.graph.snap(ia),this.graph.isGridEnabled()||(Math.abs(C)<this.graph.tolerance&&(C=0),Math.abs(ia)<this.graph.tolerance&&(ia=0))));this.reset();if(R){if(this.isSpaceEvent(Q)){this.graph.model.beginUpdate();
+try{var pa=this.graph.getCellsBeyond(X,ha,this.graph.getDefaultParent(),!0,!0);for(R=0;R<pa.length;R++)if(this.graph.isCellMovable(pa[R])){var xa=this.graph.view.getState(pa[R]),ra=this.graph.getCellGeometry(pa[R]);null!=xa&&null!=ra&&(ra=ra.clone(),ra.translate(C,ia),this.graph.model.setGeometry(pa[R],ra))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,Q.getEvent());Q.consume()}}};mxRubberband.prototype.mouseMove=function(C,
+Q){if(!Q.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);C=mxUtils.getOffset(this.graph.container);R.x-=C.x;R.y-=C.y;C=Q.getX()+R.x;R=Q.getY()+R.y;var X=this.first.x-C,ha=this.first.y-R,ia=this.graph.tolerance;if(null!=this.div||Math.abs(X)>ia||Math.abs(ha)>ia)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(C,R),this.isSpaceEvent(Q)?(C=this.x+this.width,R=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||
+(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=C-this.width),this.y<this.first.y&&(this.y=R-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=
this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):
(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),Q.consume()}};var la=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);la.apply(this,arguments)};var qa=(new Date).getTime(),ya=0,wa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=
-function(B,Q,R,X){wa.apply(this,arguments);R!=this.currentTerminalState?(qa=(new Date).getTime(),ya=0):ya=(new Date).getTime()-qa;this.currentTerminalState=R};var Ia=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(B){return mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())?!1:null!=this.currentTerminalState&&B.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
-"outlineConnect","1"))&&Ia.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(B,Q,R){Q=null!=B&&0==B;var X=this.state.getVisibleTerminalState(Q);B=null!=B&&null!=this.state.absolutePoints&&(0==B||B>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==B)?this.graph.getConnectionConstraint(this.state,X,Q):null;R=null!=(null!=B?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(Q),B):null)?R?this.endFixedHandleImage:this.fixedHandleImage:
-null!=B&&null!=X?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(B,Q,R,X){X=Q==mxEvent.ROTATION_HANDLE?
-HoverIcons.prototype.rotationHandle:Q==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:X;return Aa.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(B){if(null!=B&&1==B.length){var Q=this.graph.getModel(),R=Q.getParent(B[0]),X=this.graph.getCellGeometry(B[0]);if(Q.isEdge(R)&&null!=X&&X.relative&&(Q=this.graph.view.getState(B[0]),null!=Q&&2>Q.width&&2>Q.height&&null!=Q.text&&null!=Q.text.boundingBox))return mxRectangle.fromRectangle(Q.text.boundingBox)}return Ba.apply(this,
-arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var B=Ga.apply(this,arguments),Q=[],R=0;R<B.length;R++)"1"!=mxUtils.getValue(B[R].style,"part","0")&&Q.push(B[R]);return Q};var Ma=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(B){var Q=this.graph.getModel(),R=Q.getParent(B.cell),X=this.graph.getCellGeometry(B.cell);return Q.isEdge(R)&&null!=X&&X.relative&&2>B.width&&2>B.height&&null!=
-B.text&&null!=B.text.boundingBox?(Q=B.text.unrotatedBoundingBox||B.text.boundingBox,new mxRectangle(Math.round(Q.x),Math.round(Q.y),Math.round(Q.width),Math.round(Q.height))):Ma.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(B,Q){var R=this.graph.getModel(),X=R.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(Q)==mxEvent.ROTATION_HANDLE||!R.isEdge(X)||null==ia||!ia.relative||null==this.state||
-2<=this.state.width||2<=this.state.height)&&sa.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var B=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),Q=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&B==mxConstants.NONE&&Q==mxConstants.NONE?(B=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,
-B,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(B,Q){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Da=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
-function(B,Q){Da.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(B,Q){try{if(null==B&&(null==Q||0==Q.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
-this.linkHint=null);else if(null!=B||null!=Q&&0<Q.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var X=R.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
-X.style.paddingLeft="4px";X.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=B){var ia=document.createElement("div");
-ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(B,null,this.state.cell));this.linkHint.appendChild(ia);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ja=R.cloneNode(!0);ia.appendChild(ja);mxEvent.addListener(ja,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var pa=X.cloneNode(!0);ia.appendChild(pa);mxEvent.addListener(pa,
-"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=Q)for(ia=0;ia<Q.length;ia++)mxUtils.bind(this,function(xa,ra){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=B||0<ra?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ka=R.cloneNode(!0);ua.appendChild(Ka);var Va=mxUtils.bind(this,function(Oa){var Ta=
+function(C,Q,R,X){wa.apply(this,arguments);R!=this.currentTerminalState?(qa=(new Date).getTime(),ya=0):ya=(new Date).getTime()-qa;this.currentTerminalState=R};var Ia=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(C){return mxEvent.isShiftDown(C.getEvent())&&mxEvent.isAltDown(C.getEvent())?!1:null!=this.currentTerminalState&&C.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
+"outlineConnect","1"))&&Ia.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(C,Q,R){Q=null!=C&&0==C;var X=this.state.getVisibleTerminalState(Q);C=null!=C&&null!=this.state.absolutePoints&&(0==C||C>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==C)?this.graph.getConnectionConstraint(this.state,X,Q):null;R=null!=(null!=C?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(Q),C):null)?R?this.endFixedHandleImage:this.fixedHandleImage:
+null!=C&&null!=X?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(C,Q,R,X){X=Q==mxEvent.ROTATION_HANDLE?
+HoverIcons.prototype.rotationHandle:Q==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:X;return Aa.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(C){if(null!=C&&1==C.length){var Q=this.graph.getModel(),R=Q.getParent(C[0]),X=this.graph.getCellGeometry(C[0]);if(Q.isEdge(R)&&null!=X&&X.relative&&(Q=this.graph.view.getState(C[0]),null!=Q&&2>Q.width&&2>Q.height&&null!=Q.text&&null!=Q.text.boundingBox))return mxRectangle.fromRectangle(Q.text.boundingBox)}return Ba.apply(this,
+arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var C=Ga.apply(this,arguments),Q=[],R=0;R<C.length;R++)"1"!=mxUtils.getValue(C[R].style,"part","0")&&Q.push(C[R]);return Q};var Ma=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(C){var Q=this.graph.getModel(),R=Q.getParent(C.cell),X=this.graph.getCellGeometry(C.cell);return Q.isEdge(R)&&null!=X&&X.relative&&2>C.width&&2>C.height&&null!=
+C.text&&null!=C.text.boundingBox?(Q=C.text.unrotatedBoundingBox||C.text.boundingBox,new mxRectangle(Math.round(Q.x),Math.round(Q.y),Math.round(Q.width),Math.round(Q.height))):Ma.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(C,Q){var R=this.graph.getModel(),X=R.getParent(this.state.cell),ha=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(Q)==mxEvent.ROTATION_HANDLE||!R.isEdge(X)||null==ha||!ha.relative||null==this.state||
+2<=this.state.width||2<=this.state.height)&&sa.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var C=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),Q=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&C==mxConstants.NONE&&Q==mxConstants.NONE?(C=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,
+C,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(C,Q){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Da=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
+function(C,Q){Da.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(C,Q){try{if(null==C&&(null==Q||0==Q.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
+this.linkHint=null);else if(null!=C||null!=Q&&0<Q.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var X=R.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
+X.style.paddingLeft="4px";X.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=C){var ha=document.createElement("div");
+ha.style.display="flex";ha.style.alignItems="center";ha.appendChild(this.graph.createLinkForHint(C,null,this.state.cell));this.linkHint.appendChild(ha);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ia=R.cloneNode(!0);ha.appendChild(ia);mxEvent.addListener(ia,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var pa=X.cloneNode(!0);ha.appendChild(pa);mxEvent.addListener(pa,
+"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=Q)for(ha=0;ha<Q.length;ha++)mxUtils.bind(this,function(xa,ra){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=C||0<ra?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ka=R.cloneNode(!0);ua.appendChild(Ka);var Va=mxUtils.bind(this,function(Oa){var Ta=
document.createElement("div");Ta.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Za=Ta.getElementsByTagName("a")[ra];if(null!=Za){if(null==Oa||""==Oa){for(Oa=Za.cloneNode(!0).firstChild;null!=Oa;)Za.parentNode.insertBefore(Oa.cloneNode(!0),Za),Oa=Oa.nextSibling;Za.parentNode.removeChild(Za)}else Za.setAttribute("href",Oa);this.graph.labelChanged(this.state.cell,Ta.innerHTML)}});mxEvent.addListener(Ka,"click",mxUtils.bind(this,function(Oa){this.graph.showLinkDialog(xa.getAttribute("href")||
-"",mxResources.get("ok"),Va);mxEvent.consume(Oa)}));Ka=X.cloneNode(!0);ua.appendChild(Ka);mxEvent.addListener(Ka,"click",mxUtils.bind(this,function(Oa){Va();mxEvent.consume(Oa)}));this.linkHint.appendChild(ua)})(Q[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var va=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var B=va.apply(this,
-arguments);B.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return B};var Na=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Na.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var B=0;B<this.moveHandles.length;B++)null!=
-this.moveHandles[B]&&(this.moveHandles[B].bounds.x=Math.round(this.moveHandles[B].rowState.x+this.moveHandles[B].rowState.width-this.moveHandles[B].bounds.width/2),this.moveHandles[B].bounds.y=Math.round(this.moveHandles[B].rowState.y+(this.moveHandles[B].rowState.height-this.moveHandles[B].bounds.height)/2),this.moveHandles[B].redraw());if(null!=this.cornerHandles){B=this.getSelectionBorderInset();var Q=this.cornerHandles,R=Q[0].bounds.height/2;Q[0].bounds.x=this.state.x-Q[0].bounds.width/2+B;Q[0].bounds.y=
-this.state.y-R+B;Q[0].redraw();Q[1].bounds.x=Q[0].bounds.x+this.state.width-2*B;Q[1].bounds.y=Q[0].bounds.y;Q[1].redraw();Q[2].bounds.x=Q[0].bounds.x;Q[2].bounds.y=this.state.y+this.state.height-2*B;Q[2].redraw();Q[3].bounds.x=Q[1].bounds.x;Q[3].bounds.y=Q[2].bounds.y;Q[3].redraw();for(B=0;B<this.cornerHandles.length;B++)this.cornerHandles[B].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",
-mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(B=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),Q=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),R=mxUtils.getBoundingBox(Q,this.state.style[mxConstants.STYLE_ROTATION]||"0",B),B=null!=R?mxUtils.getBoundingBox(this.state,
-this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,Q=null!=this.state.text?this.state.text.boundingBox:null,null==R&&(R=this.state),R=R.y+R.height,null!=Q&&(R=Math.max(R,Q.y+Q.height)),this.linkHint.style.left=B.x+B.width/2+"px",this.linkHint.style.top=Math.round(R+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Ua=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ua.apply(this,arguments);
+"",mxResources.get("ok"),Va);mxEvent.consume(Oa)}));Ka=X.cloneNode(!0);ua.appendChild(Ka);mxEvent.addListener(Ka,"click",mxUtils.bind(this,function(Oa){Va();mxEvent.consume(Oa)}));this.linkHint.appendChild(ua)})(Q[ha],ha)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var va=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var C=va.apply(this,
+arguments);C.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return C};var Na=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Na.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var C=0;C<this.moveHandles.length;C++)null!=
+this.moveHandles[C]&&(this.moveHandles[C].bounds.x=Math.round(this.moveHandles[C].rowState.x+this.moveHandles[C].rowState.width-this.moveHandles[C].bounds.width/2),this.moveHandles[C].bounds.y=Math.round(this.moveHandles[C].rowState.y+(this.moveHandles[C].rowState.height-this.moveHandles[C].bounds.height)/2),this.moveHandles[C].redraw());if(null!=this.cornerHandles){C=this.getSelectionBorderInset();var Q=this.cornerHandles,R=Q[0].bounds.height/2;Q[0].bounds.x=this.state.x-Q[0].bounds.width/2+C;Q[0].bounds.y=
+this.state.y-R+C;Q[0].redraw();Q[1].bounds.x=Q[0].bounds.x+this.state.width-2*C;Q[1].bounds.y=Q[0].bounds.y;Q[1].redraw();Q[2].bounds.x=Q[0].bounds.x;Q[2].bounds.y=this.state.y+this.state.height-2*C;Q[2].redraw();Q[3].bounds.x=Q[1].bounds.x;Q[3].bounds.y=Q[2].bounds.y;Q[3].redraw();for(C=0;C<this.cornerHandles.length;C++)this.cornerHandles[C].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",
+mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(C=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),Q=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),R=mxUtils.getBoundingBox(Q,this.state.style[mxConstants.STYLE_ROTATION]||"0",C),C=null!=R?mxUtils.getBoundingBox(this.state,
+this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,Q=null!=this.state.text?this.state.text.boundingBox:null,null==R&&(R=this.state),R=R.y+R.height,null!=Q&&(R=Math.max(R,Q.y+Q.height)),this.linkHint.style.left=C.x+C.width/2+"px",this.linkHint.style.top=Math.round(R+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Ua=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ua.apply(this,arguments);
this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Qa=mxEdgeHandler.prototype.redrawHandles;
-mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Qa.apply(this),null!=this.state&&null!=this.linkHint)){var B=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(B=new mxRectangle(B.x,B.y,B.width,B.height),B.add(this.state.text.bounds));this.linkHint.style.left=B.x+B.width/2+"px";this.linkHint.style.top=Math.round(B.y+B.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
-function(){za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,p,A){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=A?A:1;this.updateBoundsFromLine()}function f(){mxSwimlane.call(this)}function l(){mxSwimlane.call(this)}function u(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function C(){mxActor.call(this)}function J(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function c(){mxShape.call(this)}
-function g(){mxShape.call(this)}function m(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1}function n(){mxActor.call(this)}function x(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function H(){mxActor.call(this)}function M(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxActor.call(this)}function Z(){mxActor.call(this)}function ha(){mxActor.call(this)}function ca(){mxActor.call(this)}function aa(d,p){this.canvas=d;this.canvas.setLineJoin("round");
-this.canvas.setLineCap("round");this.defaultVariation=p;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,aa.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,aa.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,aa.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,aa.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
-mxUtils.bind(this,aa.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,aa.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function da(){mxRectangleShape.call(this)}function ka(){mxActor.call(this)}function ba(){mxActor.call(this)}function V(){mxActor.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function I(){mxCylinder.call(this)}function N(){mxShape.call(this)}function T(){mxShape.call(this)}function W(){mxEllipse.call(this)}
-function U(){mxShape.call(this)}function Y(){mxShape.call(this)}function fa(){mxRectangleShape.call(this)}function na(){mxShape.call(this)}function la(){mxShape.call(this)}function qa(){mxShape.call(this)}function ya(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ia(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function Ma(){mxDoubleEllipse.call(this)}function sa(){mxArrowConnector.call(this);
-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Sa(){mxActor.call(this)}function Ua(){mxActor.call(this)}function Qa(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function B(){mxActor.call(this)}function Q(){mxActor.call(this)}function R(){mxActor.call(this)}function X(){mxActor.call(this)}function ia(){mxEllipse.call(this)}
-function ja(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Ka(){mxEllipse.call(this)}function Va(){mxEllipse.call(this)}function Oa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Pa(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
-!0;this.indent=2;this.rectOutline="single"}function Ra(){mxConnector.call(this)}function fb(){mxConnector.call(this)}function eb(d,p,A,t,z,E,G,ea,O,ta){G+=O;var ma=t.clone();t.x-=z*(2*G+O);t.y-=E*(2*G+O);z*=G+O;E*=G+O;return function(){d.ellipse(ma.x-z-G,ma.y-E-G,2*G,2*G);ta?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var A=this.line[p];null!=A&&(A=new mxRectangle(A.x,A.y,this.strokewidth,
-this.strokewidth),null==d?d=A:d.add(A))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,p,A,t,z){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,p,A,t){if(null!=p){var z=null;d.begin();for(var E=0;E<p.length;E++){var G=p[E];null!=G&&(null==z?d.moveTo(G.x+A,G.y+t):null!=z&&d.lineTo(G.x+A,G.y+t));z=G}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var p=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=
-this.line)for(var A=null,t=0;t<this.line.length&&!p;t++){var z=this.line[t];null!=z&&null!=A&&(p=mxUtils.rectangleIntersectsSegment(d,A,z));A=z}return p};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(f,mxSwimlane);f.prototype.getLabelBounds=function(d){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};f.prototype.paintVertexShape=function(d,p,A,t,z){var E=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
-!1,G=this.isHorizontal(),ea=this.getTitleSize();0==ea||this.outline?Ka.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-p,-A));E||this.outline||!(G&&ea<z||!G&&ea<t)||this.paintForeground(d,p,A,t,z)};f.prototype.paintForeground=function(d,p,A,t,z){if(null!=this.state){var E=this.flipH,G=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ea=E;E=G;G=ea}d.rotate(-this.getShapeRotation(),
-E,G,p+t/2,A+z/2);s=this.scale;p=this.bounds.x/s;A=this.bounds.y/s;t=this.bounds.width/s;z=this.bounds.height/s;this.paintTableForeground(d,p,A,t,z)}};f.prototype.paintTableForeground=function(d,p,A,t,z){t=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(z=0;z<t.length;z++)b.prototype.paintTableLine(d,t[z],p,A)};f.prototype.configurePointerEvents=function(d){0==this.getTitleSize()?
-d.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",f);mxUtils.extend(l,f);l.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",l);mxUtils.extend(u,mxCylinder);u.prototype.size=20;u.prototype.darkOpacity=0;u.prototype.darkOpacity2=0;u.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.max(0,Math.min(t,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),G=Math.max(-1,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ea=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(p,A);d.begin();d.moveTo(0,0);d.lineTo(t-E,0);d.lineTo(t,E);d.lineTo(t,z);d.lineTo(E,z);d.lineTo(0,z-E);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=G&&(d.setFillAlpha(Math.abs(G)),d.setFillColor(0>G?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(t-E,0),d.lineTo(t,E),
-d.lineTo(E,E),d.close(),d.fill()),0!=ea&&(d.setFillAlpha(Math.abs(ea)),d.setFillColor(0>ea?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(E,E),d.lineTo(E,z),d.lineTo(0,z-E),d.close(),d.fill()),d.begin(),d.moveTo(E,z),d.lineTo(E,E),d.lineTo(0,0),d.moveTo(E,E),d.lineTo(t,E),d.end(),d.stroke())};u.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?(d=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(d,d,0,0)):null};mxCellRenderer.registerShape("cube",
-u);var bb=Math.tan(mxUtils.toRadians(30)),db=(.5-bb)/2;mxCellRenderer.registerShape("isoRectangle",C);mxUtils.extend(y,mxConnector);y.prototype.paintEdgeShape=function(d,p){var A=this.createMarker(d,p,!0),t=this.createMarker(d,p,!1);d.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&d.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);d.setShadow(!1);d.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this,
-arguments);d.setStrokeColor(this.stroke);d.setFillColor(this.stroke);d.setDashed(!1);null!=A&&A();null!=t&&t()};mxCellRenderer.registerShape("wire",y);mxUtils.extend(q,mxCylinder);q.prototype.size=6;q.prototype.paintVertexShape=function(d,p,A,t,z){d.setFillColor(this.stroke);var E=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(p+.5*(t-E),A+.5*(z-E),E,E);d.fill();d.setFillColor(mxConstants.NONE);d.rect(p,A,t,z);d.fill()};mxCellRenderer.registerShape("waypoint",
-q);mxUtils.extend(C,mxActor);C.prototype.size=20;C.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/bb);d.translate((t-p)/2,(z-p)/2+p/4);d.moveTo(0,.25*p);d.lineTo(.5*p,p*db);d.lineTo(p,.25*p);d.lineTo(.5*p,(.5-db)*p);d.lineTo(0,.25*p);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",C);mxUtils.extend(J,mxCylinder);J.prototype.size=20;J.prototype.redrawPath=function(d,p,A,t,z,E){p=Math.min(t,z/(.5+bb));E?(d.moveTo(0,.25*p),d.lineTo(.5*p,(.5-db)*p),d.lineTo(p,.25*p),d.moveTo(.5*
-p,(.5-db)*p),d.lineTo(.5*p,(1-db)*p)):(d.translate((t-p)/2,(z-p)/2),d.moveTo(0,.25*p),d.lineTo(.5*p,p*db),d.lineTo(p,.25*p),d.lineTo(p,.75*p),d.lineTo(.5*p,(1-db)*p),d.lineTo(0,.75*p),d.close());d.end()};mxCellRenderer.registerShape("isoCube",J);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,p,A,t,z,E){p=Math.min(z/2,Math.round(z/8)+this.strokewidth-1);if(E&&null!=this.fill||!E&&null==this.fill)d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,
-p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,-p);E||(d.moveTo(0,p),d.curveTo(0,-p/3,t,-p/3,t,p),d.lineTo(t,z-p),d.curveTo(t,z+p/3,0,z+p/3,0,z-p),d.close())};S.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",S);mxUtils.extend(D,mxCylinder);D.prototype.size=30;D.prototype.darkOpacity=
-0;D.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.max(0,Math.min(t,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),G=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(p,A);d.begin();d.moveTo(0,0);d.lineTo(t-E,0);d.lineTo(t,E);d.lineTo(t,z);d.lineTo(0,z);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=G&&(d.setFillAlpha(Math.abs(G)),d.setFillColor(0>G?"#FFFFFF":"#000000"),
-d.begin(),d.moveTo(t-E,0),d.lineTo(t-E,E),d.lineTo(t,E),d.close(),d.fill()),d.begin(),d.moveTo(t-E,0),d.lineTo(t-E,E),d.lineTo(t,E),d.end(),d.stroke())};mxCellRenderer.registerShape("note",D);mxUtils.extend(P,D);mxCellRenderer.registerShape("note2",P);P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,0)}return null};mxUtils.extend(c,mxShape);c.prototype.isoAngle=
-15;c.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;E=Math.min(t*Math.tan(E),.5*z);d.translate(p,A);d.begin();d.moveTo(.5*t,0);d.lineTo(t,E);d.lineTo(t,z-E);d.lineTo(.5*t,z);d.lineTo(0,z-E);d.lineTo(0,E);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,E);d.lineTo(.5*t,2*E);d.lineTo(t,E);d.moveTo(.5*t,2*E);d.lineTo(.5*t,z);d.stroke()};mxCellRenderer.registerShape("isoCube2",
-c);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.max(0,Math.min(.5*z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(p,A);0==E?(d.rect(0,0,t,z),d.fillAndStroke()):(d.begin(),d.moveTo(0,E),d.arcTo(.5*t,E,0,0,1,.5*t,0),d.arcTo(.5*t,E,0,0,1,t,E),d.lineTo(t,z-E),d.arcTo(.5*t,E,0,0,1,.5*t,z),d.arcTo(.5*t,E,0,0,1,0,z-E),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(t,E),d.arcTo(.5*t,E,0,0,1,.5*t,2*E),d.arcTo(.5*
-t,E,0,0,1,0,E),d.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.max(0,Math.min(.5*z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),G=mxUtils.getValue(this.style,"lid",!0);d.translate(p,A);0==E?(d.rect(0,0,t,z),d.fillAndStroke()):(d.begin(),G?(d.moveTo(0,E),d.arcTo(.5*t,E,0,0,1,.5*t,0),d.arcTo(.5*t,E,0,0,1,t,E)):(d.moveTo(0,0),d.arcTo(.5*t,E,0,0,0,.5*t,E),d.arcTo(.5*t,E,
-0,0,0,t,0)),d.lineTo(t,z-E),d.arcTo(.5*t,E,0,0,1,.5*t,z),d.arcTo(.5*t,E,0,0,1,0,z-E),d.close(),d.fillAndStroke(),d.setShadow(!1),G&&(d.begin(),d.moveTo(t,E),d.arcTo(.5*t,E,0,0,1,.5*t,2*E),d.arcTo(.5*t,E,0,0,1,0,E),d.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t/2,.5*z,t,0);d.quadTo(.5*t,z/2,t,z);d.quadTo(t/2,.5*z,0,z);d.quadTo(.5*t,z/2,0,0);d.end()};mxCellRenderer.registerShape("switch",n);mxUtils.extend(x,
-mxCylinder);x.prototype.tabWidth=60;x.prototype.tabHeight=20;x.prototype.tabPosition="right";x.prototype.arcSize=.1;x.prototype.isRoundable=function(){return!0};x.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);p=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var E=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),G=mxUtils.getValue(this.style,
-"rounded",!1),ea=mxUtils.getValue(this.style,"absoluteArcSize",!1),O=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ea||(O*=Math.min(t,z));O=Math.min(O,.5*t,.5*(z-A));p=Math.max(p,O);p=Math.min(t-O,p);G||(O=0);d.begin();"left"==E?(d.moveTo(Math.max(O,0),A),d.lineTo(Math.max(O,0),0),d.lineTo(p,0),d.lineTo(p,A)):(d.moveTo(t-p,A),d.lineTo(t-p,0),d.lineTo(t-Math.max(O,0),0),d.lineTo(t-Math.max(O,0),A));G?(d.moveTo(0,O+A),d.arcTo(O,O,0,0,1,O,A),d.lineTo(t-O,A),d.arcTo(O,O,0,0,1,t,O+A),
-d.lineTo(t,z-O),d.arcTo(O,O,0,0,1,t-O,z),d.lineTo(O,z),d.arcTo(O,O,0,0,1,0,z-O)):(d.moveTo(0,A),d.lineTo(t,A),d.lineTo(t,z),d.lineTo(0,z));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(t-30,A+20),d.lineTo(t-20,A+10),d.lineTo(t-10,A+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",x);x.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var A=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var t=mxUtils.getValue(this.style,"rounded",!1),z=mxUtils.getValue(this.style,"absoluteArcSize",!1),E=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));z||(E*=Math.min(d.width,d.height));E=Math.min(E,.5*d.width,.5*(d.height-p));t||(E=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
-this.tabPosition)?new mxRectangle(E,0,Math.min(d.width,d.width-A),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-A),0,E,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};mxUtils.extend(F,mxCylinder);F.prototype.arcSize=.1;F.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);var E=mxUtils.getValue(this.style,"rounded",!1),G=mxUtils.getValue(this.style,"absoluteArcSize",!1);p=parseFloat(mxUtils.getValue(this.style,"arcSize",
-this.arcSize));A=mxUtils.getValue(this.style,"umlStateConnection",null);G||(p*=Math.min(t,z));p=Math.min(p,.5*t,.5*z);E||(p=0);E=0;null!=A&&(E=10);d.begin();d.moveTo(E,p);d.arcTo(p,p,0,0,1,E+p,0);d.lineTo(t-p,0);d.arcTo(p,p,0,0,1,t,p);d.lineTo(t,z-p);d.arcTo(p,p,0,0,1,t-p,z);d.lineTo(E+p,z);d.arcTo(p,p,0,0,1,E,z-p);d.close();d.fillAndStroke();d.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(d.roundrect(t-40,z-20,10,10,3,3),d.stroke(),d.roundrect(t-20,z-20,10,10,
-3,3),d.stroke(),d.begin(),d.moveTo(t-30,z-15),d.lineTo(t-20,z-15),d.stroke());"connPointRefEntry"==A?(d.ellipse(0,.5*z-10,20,20),d.fillAndStroke()):"connPointRefExit"==A&&(d.ellipse(0,.5*z-10,20,20),d.fillAndStroke(),d.begin(),d.moveTo(5,.5*z-5),d.lineTo(15,.5*z+5),d.moveTo(15,.5*z-5),d.lineTo(5,.5*z+5),d.stroke())};F.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,
-0,0,0):null};mxCellRenderer.registerShape("umlState",F);mxUtils.extend(H,mxActor);H.prototype.size=30;H.prototype.isRoundable=function(){return!0};H.prototype.redrawPath=function(d,p,A,t,z){p=Math.max(0,Math.min(t,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t,0),new mxPoint(t,z),new mxPoint(0,z),new mxPoint(0,p)],this.isRounded,A,!0);d.end()};
-mxCellRenderer.registerShape("card",H);mxUtils.extend(M,mxActor);M.prototype.size=.4;M.prototype.redrawPath=function(d,p,A,t,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,p/2);d.quadTo(t/4,1.4*p,t/2,p/2);d.quadTo(3*t/4,p*(1-1.4),t,p/2);d.lineTo(t,z-p/2);d.quadTo(3*t/4,z-1.4*p,t/2,z-p/2);d.quadTo(t/4,z-p*(1-1.4),0,z-p/2);d.lineTo(0,p/2);d.close();d.end()};M.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=
-mxUtils.getValue(this.style,"size",this.size),A=d.width,t=d.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return p*=t,new mxRectangle(d.x,d.y+p,A,t-2*p);p*=A;return new mxRectangle(d.x+p,d.y,A-2*p,t)}return d};mxCellRenderer.registerShape("tape",M);mxUtils.extend(L,mxActor);L.prototype.size=.3;L.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))*d.height):null};L.prototype.redrawPath=function(d,p,A,t,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,0);d.lineTo(t,0);d.lineTo(t,z-p/2);d.quadTo(3*t/4,z-1.4*p,t/2,z-p/2);d.quadTo(t/4,z-p*(1-1.4),0,z-p/2);d.lineTo(0,p/2);d.close();d.end()};mxCellRenderer.registerShape("document",L);var mb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(d,p,A,t){var z=mxUtils.getValue(this.style,"size");return null!=
-z?t*Math.max(0,Math.min(1,z)):mb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,d.height*p),0,0)}return null};m.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(p/=2);return new mxRectangle(0,Math.min(d.height*
-this.scale,2*p*this.scale),0,Math.max(0,.3*p*this.scale))}return null};x.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var A=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var t=mxUtils.getValue(this.style,"rounded",!1),z=mxUtils.getValue(this.style,"absoluteArcSize",!1),E=parseFloat(mxUtils.getValue(this.style,
-"arcSize",this.arcSize));z||(E*=Math.min(d.width,d.height));E=Math.min(E,.5*d.width,.5*(d.height-p));t||(E=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(E,0,Math.min(d.width,d.width-A),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-A),0,E,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};F.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=
-mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,Math.max(0,p*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,p,A,t,z){p=
-"0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(p,0),new mxPoint(t,0),new mxPoint(t-p,z)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(Z,mxActor);Z.prototype.size=
-.2;Z.prototype.fixedSize=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,
-z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("trapezoid",Z);mxUtils.extend(ha,mxActor);ha.prototype.size=.5;ha.prototype.redrawPath=function(d,p,A,t,z){d.setFillColor(null);p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(t,0),new mxPoint(p,0),new mxPoint(p,z/2),new mxPoint(0,z/2),new mxPoint(p,z/2),new mxPoint(p,z),new mxPoint(t,z)],this.isRounded,
-A,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ha);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(d,p,A,t,z){d.setStrokeWidth(1);d.setFillColor(this.stroke);p=t/5;d.rect(0,0,p,z);d.fillAndStroke();d.rect(2*p,0,p,z);d.fillAndStroke();d.rect(4*p,0,p,z);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ca);aa.prototype.moveTo=function(d,p){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;this.firstX=d;this.firstY=p};aa.prototype.close=
-function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};aa.prototype.quadTo=function(d,p,A,t){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=t};aa.prototype.curveTo=function(d,p,A,t,z,E){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=z;this.lastY=E};aa.prototype.arcTo=function(d,p,A,t,z,E,G){this.originalArcTo.apply(this.canvas,arguments);
-this.lastX=E;this.lastY=G};aa.prototype.lineTo=function(d,p){if(null!=this.lastX&&null!=this.lastY){var A=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},t=Math.abs(d-this.lastX),z=Math.abs(p-this.lastY),E=Math.sqrt(t*t+z*z);if(2>E){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;return}var G=Math.round(E/10),ea=this.defaultVariation;5>G&&(G=5,ea/=3);var O=A(d-this.lastX)*t/G;A=A(p-this.lastY)*z/G;t/=E;z/=E;for(E=0;E<G;E++){var ta=(Math.random()-
-.5)*ea;this.originalLineTo.call(this.canvas,O*E+this.lastX-ta*z,A*E+this.lastY-ta*t)}this.originalLineTo.call(this.canvas,d,p)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p};aa.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};var lb=mxShape.prototype.beforePaint;
-mxShape.prototype.beforePaint=function(d){lb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var pb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(d){pb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new aa(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==
-this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var gb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&gb.apply(this,arguments)};var qb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,p,A,t,z){if(null==d.handJiggle||
-d.handJiggle.constructor!=aa)qb.apply(this,arguments);else{var E=!0;null!=this.style&&(E="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(E||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)E||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?E=Math.min(t/2,Math.min(z/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2)):(E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.min(t*E,z*E)),d.moveTo(p+E,A),d.lineTo(p+t-E,A),d.quadTo(p+t,A,p+t,A+E),d.lineTo(p+t,A+z-E),d.quadTo(p+t,A+z,p+t-E,A+z),d.lineTo(p+E,A+z),d.quadTo(p,A+z,p,A+z-E),d.lineTo(p,A+E),d.quadTo(p,A,p+E,A)):(d.moveTo(p,A),d.lineTo(p+t,A),d.lineTo(p+t,A+z),d.lineTo(p,A+z),d.lineTo(p,A)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(oa,mxRectangleShape);oa.prototype.size=
-.1;oa.prototype.fixedSize=!1;oa.prototype.isHtmlAllowed=function(){return!1};oa.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var p=d.width,A=d.height;d=new mxRectangle(d.x,d.y,p,A);var t=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),z=parseFloat(mxUtils.getValue(this.style,"size",this.size));t?z=Math.max(0,Math.min(p,
-z*this.scale)):(z=p*Math.max(0,Math.min(1,z)),this.isRounded&&(t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,z=Math.max(z,Math.min(p*t,A*t))));d.x+=Math.round(z);d.width-=Math.round(2*z);return d}return d};oa.prototype.paintForeground=function(d,p,A,t,z){var E=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),G=parseFloat(mxUtils.getValue(this.style,"size",this.size));G=E?Math.max(0,Math.min(t,G)):t*Math.max(0,Math.min(1,G));this.isRounded&&
-(E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,G=Math.max(G,Math.min(t*E,z*E)));G=Math.round(G);d.begin();d.moveTo(p+G,A);d.lineTo(p+G,A+z);d.moveTo(p+t-G,A);d.lineTo(p+t-G,A+z);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",oa);mxCellRenderer.registerShape("process2",oa);mxUtils.extend(da,mxRectangleShape);da.prototype.paintBackground=function(d,p,A,t,z){d.setFillColor(mxConstants.NONE);
-d.rect(p,A,t,z);d.fill()};da.prototype.paintForeground=function(d,p,A,t,z){};mxCellRenderer.registerShape("transparent",da);mxUtils.extend(ka,mxHexagon);ka.prototype.size=30;ka.prototype.position=.5;ka.prototype.position2=.5;ka.prototype.base=20;ka.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ka.prototype.isRoundable=function(){return!0};ka.prototype.redrawPath=function(d,p,A,t,z){p=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var E=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),G=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),ea=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,z-A),new mxPoint(Math.min(t,
-E+ea),z-A),new mxPoint(G,z),new mxPoint(Math.max(0,E),z-A),new mxPoint(0,z-A)],this.isRounded,p,!0,[4])};mxCellRenderer.registerShape("callout",ka);mxUtils.extend(ba,mxActor);ba.prototype.size=.2;ba.prototype.fixedSize=20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(0,z),new mxPoint(p,z/2)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("step",ba);mxUtils.extend(V,mxHexagon);V.prototype.size=.25;V.prototype.fixedSize=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,
-"fixedSize","0")?Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,.5*z),new mxPoint(t-p,z),new mxPoint(p,z),new mxPoint(0,.5*z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("hexagon",V);mxUtils.extend(k,mxRectangleShape);
-k.prototype.isHtmlAllowed=function(){return!1};k.prototype.paintForeground=function(d,p,A,t,z){var E=Math.min(t/5,z/5)+1;d.begin();d.moveTo(p+t/2,A+E);d.lineTo(p+t/2,A+z-E);d.moveTo(p+E,A+z/2);d.lineTo(p+t-E,A+z/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",k);var ub=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};mxRhombus.prototype.paintVertexShape=function(d,p,A,t,z){ub.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var E=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=E;A+=E;t-=2*E;z-=2*E;0<t&&0<z&&(d.setShadow(!1),ub.apply(this,[d,p,A,t,z]))}};mxUtils.extend(v,mxRectangleShape);v.prototype.isHtmlAllowed=function(){return!1};v.prototype.getLabelBounds=function(d){if(1==
-this.style["double"]){var p=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};v.prototype.paintForeground=function(d,p,A,t,z){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var E=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=E;A+=E;t-=2*E;z-=2*E;0<t&&0<z&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);
-E=0;do{var G=mxCellRenderer.defaultShapes[this.style["symbol"+E]];if(null!=G){var ea=this.style["symbol"+E+"Align"],O=this.style["symbol"+E+"VerticalAlign"],ta=this.style["symbol"+E+"Width"],ma=this.style["symbol"+E+"Height"],ab=this.style["symbol"+E+"Spacing"]||0,ib=this.style["symbol"+E+"VSpacing"]||ab,cb=this.style["symbol"+E+"ArcSpacing"];null!=cb&&(cb*=this.getArcSize(t+this.strokewidth,z+this.strokewidth),ab+=cb,ib+=cb);cb=p;var Fa=A;cb=ea==mxConstants.ALIGN_CENTER?cb+(t-ta)/2:ea==mxConstants.ALIGN_RIGHT?
-cb+(t-ta-ab):cb+ab;Fa=O==mxConstants.ALIGN_MIDDLE?Fa+(z-ma)/2:O==mxConstants.ALIGN_BOTTOM?Fa+(z-ma-ib):Fa+ib;d.save();ea=new G;ea.style=this.style;G.prototype.paintVertexShape.call(ea,d,cb,Fa,ta,ma);d.restore()}E++}while(null!=G)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",v);mxUtils.extend(I,mxCylinder);I.prototype.redrawPath=function(d,p,A,t,z,E){E?(d.moveTo(0,0),d.lineTo(t/2,z/2),d.lineTo(t,0),d.end()):(d.moveTo(0,0),d.lineTo(t,0),d.lineTo(t,
-z),d.lineTo(0,z),d.close())};mxCellRenderer.registerShape("message",I);mxUtils.extend(N,mxShape);N.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.ellipse(t/4,0,t/2,z/4);d.fillAndStroke();d.begin();d.moveTo(t/2,z/4);d.lineTo(t/2,2*z/3);d.moveTo(t/2,z/3);d.lineTo(0,z/3);d.moveTo(t/2,z/3);d.lineTo(t,z/3);d.moveTo(t/2,2*z/3);d.lineTo(0,z);d.moveTo(t/2,2*z/3);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",N);mxUtils.extend(T,mxShape);T.prototype.getLabelMargins=
-function(d){return new mxRectangle(d.width/6,0,0,0)};T.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(0,z/4);d.lineTo(0,3*z/4);d.end();d.stroke();d.begin();d.moveTo(0,z/2);d.lineTo(t/6,z/2);d.end();d.stroke();d.ellipse(t/6,0,5*t/6,z);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",T);mxUtils.extend(W,mxEllipse);W.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+t/8,A+z);d.lineTo(p+
-7*t/8,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",W);mxUtils.extend(U,mxShape);U.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(t,0);d.lineTo(0,z);d.moveTo(0,0);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",U);mxUtils.extend(Y,mxShape);Y.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};Y.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();
-d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,0);d.end();d.stroke();d.ellipse(0,z/8,t,7*z/8);d.fillAndStroke()};Y.prototype.paintForeground=function(d,p,A,t,z){d.begin();d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,z/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",Y);mxUtils.extend(fa,mxRectangleShape);fa.prototype.size=40;fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.getLabelBounds=function(d){var p=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*
-this.scale));return new mxRectangle(d.x,d.y,d.width,p)};fa.prototype.paintBackground=function(d,p,A,t,z){var E=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),G=mxUtils.getValue(this.style,"participant");null==G||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,p,A,t,E):(G=this.state.view.graph.cellRenderer.getShape(G),null!=G&&G!=fa&&(G=new G,G.apply(this.state),d.save(),G.paintVertexShape(d,p,A,t,E),d.restore()));E<z&&(d.setDashed("1"==mxUtils.getValue(this.style,
-"lifelineDashed","1")),d.begin(),d.moveTo(p+t/2,A+E),d.lineTo(p+t/2,A+z),d.end(),d.stroke())};fa.prototype.paintForeground=function(d,p,A,t,z){var E=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,p,A,t,Math.min(z,E))};mxCellRenderer.registerShape("umlLifeline",fa);mxUtils.extend(na,mxShape);na.prototype.width=60;na.prototype.height=30;na.prototype.corner=10;na.prototype.configurePointerEvents=function(d){var p=
-mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=p&&p!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};na.prototype.getLabelMargins=function(d){return new mxRectangle(0,0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};na.prototype.paintBackground=
-function(d,p,A,t,z){var E=this.corner,G=Math.min(t,Math.max(E,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),ea=Math.min(z,Math.max(1.5*E,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),O=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);O!=mxConstants.NONE&&(d.setFillColor(O),d.rect(p,A,t,z),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,p,A,t,z),d.setGradient(this.fill,
-this.gradient,p,A,t,z,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(p,A);d.lineTo(p+G,A);d.lineTo(p+G,A+Math.max(0,ea-1.5*E));d.lineTo(p+Math.max(0,G-E),A+ea);d.lineTo(p,A+ea);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(p+G,A);d.lineTo(p+t,A);d.lineTo(p+t,A+z);d.lineTo(p,A+z);d.lineTo(p,A+ea);d.stroke()};mxCellRenderer.registerShape("umlFrame",na);mxPerimeter.CenterPerimeter=function(d,p,A,t){return new mxPoint(d.getCenterX(),
-d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,p,A,t){t=fa.prototype.size;null!=p&&(t=mxUtils.getValue(p.style,"size",t)*p.view.scale);p=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;A.x<d.getCenterX()&&(p=-1*(p+1));return new mxPoint(d.getCenterX()+p,Math.min(d.y+d.height,Math.max(d.y+t,A.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
-function(d,p,A,t){t=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,p,A,t){t=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;null!=p.style.backboneSize&&(t+=parseFloat(p.style.backboneSize)*p.view.scale/2-1);if("south"==p.style[mxConstants.STYLE_DIRECTION]||"north"==p.style[mxConstants.STYLE_DIRECTION])return A.x<d.getCenterX()&&(t=-1*(t+1)),
-new mxPoint(d.getCenterX()+t,Math.min(d.y+d.height,Math.max(d.y,A.y)));A.y<d.getCenterY()&&(t=-1*(t+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,A.x)),d.getCenterY()+t)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,p,A,t){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(p.style,"size",ka.prototype.size))*p.view.scale))),
-p.style),p,A,t)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),E=z?K.prototype.fixedSize:K.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var G=d.x,ea=d.y,O=d.width,ta=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==
-mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea)]):(z=z?Math.max(0,Math.min(.5*O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O,ea),new mxPoint(G+O-z,ea+ta),new mxPoint(G,ea+ta),new mxPoint(G+z,ea)]);ta=d.getCenterX();d=d.getCenterY();d=new mxPoint(ta,d);t&&(A.x<G||A.x>G+O?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,
-A)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),E=z?Z.prototype.fixedSize:Z.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var G=d.x,ea=d.y,O=d.width,ta=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,
-Math.min(.5*O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O-z,ea),new mxPoint(G+O,ea+ta),new mxPoint(G,ea+ta),new mxPoint(G+z,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G,ea),new mxPoint(G+O,ea),new mxPoint(G+O-z,ea+ta),new mxPoint(G+z,ea+ta),new mxPoint(G,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G,ea+z),new mxPoint(G+O,ea),new mxPoint(G+
-O,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea+z)]):(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+ta-z),new mxPoint(G,ea+ta),new mxPoint(G,ea)]);ta=d.getCenterX();d=d.getCenterY();d=new mxPoint(ta,d);t&&(A.x<G||A.x>G+O?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,A)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,
-"fixedSize","0"),E=z?ba.prototype.fixedSize:ba.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var G=d.x,ea=d.y,O=d.width,ta=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G,ea),new mxPoint(G+O-z,ea),new mxPoint(G+O,d),new mxPoint(G+O-z,ea+ta),new mxPoint(G,
-ea+ta),new mxPoint(G+z,d),new mxPoint(G,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O,ea),new mxPoint(G+O-z,d),new mxPoint(G+O,ea+ta),new mxPoint(G+z,ea+ta),new mxPoint(G,d),new mxPoint(G+z,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G,ea+z),new mxPoint(ma,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+ta),new mxPoint(ma,ea+ta-z),new mxPoint(G,
-ea+ta),new mxPoint(G,ea+z)]):(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G,ea),new mxPoint(ma,ea+z),new mxPoint(G+O,ea),new mxPoint(G+O,ea+ta-z),new mxPoint(ma,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea)]);ma=new mxPoint(ma,d);t&&(A.x<G||A.x>G+O?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize",
-"0"),E=z?V.prototype.fixedSize:V.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var G=d.x,ea=d.y,O=d.width,ta=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(ma,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+ta-z),
-new mxPoint(ma,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea+z),new mxPoint(ma,ea)]):(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O-z,ea),new mxPoint(G+O,d),new mxPoint(G+O-z,ea+ta),new mxPoint(G+z,ea+ta),new mxPoint(G,d),new mxPoint(G+z,ea)]);ma=new mxPoint(ma,d);t&&(A.x<G||A.x>G+O?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(la,mxShape);
-la.prototype.size=10;la.prototype.paintBackground=function(d,p,A,t,z){var E=parseFloat(mxUtils.getValue(this.style,"size",this.size));d.translate(p,A);d.ellipse((t-E)/2,0,E,E);d.fillAndStroke();d.begin();d.moveTo(t/2,E);d.lineTo(t/2,z);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",la);mxUtils.extend(qa,mxShape);qa.prototype.size=10;qa.prototype.inset=2;qa.prototype.paintBackground=function(d,p,A,t,z){var E=parseFloat(mxUtils.getValue(this.style,"size",this.size)),G=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;d.translate(p,A);d.begin();d.moveTo(t/2,E+G);d.lineTo(t/2,z);d.end();d.stroke();d.begin();d.moveTo((t-E)/2-G,E/2);d.quadTo((t-E)/2-G,E+G,t/2,E+G);d.quadTo((t+E)/2+G,E+G,(t+E)/2+G,E/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",qa);mxUtils.extend(ya,mxShape);ya.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",
-ya);mxUtils.extend(wa,mxShape);wa.prototype.inset=2;wa.prototype.paintBackground=function(d,p,A,t,z){var E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,A);d.ellipse(0,E,t-2*E,z-2*E);d.fillAndStroke();d.begin();d.moveTo(t/2,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t/2,z);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",wa);mxUtils.extend(Ia,mxCylinder);Ia.prototype.jettyWidth=20;Ia.prototype.jettyHeight=10;Ia.prototype.redrawPath=
-function(d,p,A,t,z,E){var G=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=G/2;G=A+G/2;var ea=Math.min(p,z-p),O=Math.min(ea+2*p,z-p);E?(d.moveTo(A,ea),d.lineTo(G,ea),d.lineTo(G,ea+p),d.lineTo(A,ea+p),d.moveTo(A,O),d.lineTo(G,O),d.lineTo(G,O+p),d.lineTo(A,O+p)):(d.moveTo(A,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(A,z),d.lineTo(A,O+p),d.lineTo(0,O+p),d.lineTo(0,O),d.lineTo(A,O),d.lineTo(A,ea+p),d.lineTo(0,
-ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("module",Ia);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(d,p,A,t,z,E){var G=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=G/2;G=A+G/2;var ea=.3*z-p/2,O=.7*z-p/2;E?(d.moveTo(A,ea),d.lineTo(G,ea),d.lineTo(G,ea+p),d.lineTo(A,ea+p),d.moveTo(A,O),
-d.lineTo(G,O),d.lineTo(G,O+p),d.lineTo(A,O+p)):(d.moveTo(A,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(A,z),d.lineTo(A,O+p),d.lineTo(0,O+p),d.lineTo(0,O),d.lineTo(A,O),d.lineTo(A,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(Ba,mxRectangleShape);Ba.prototype.paintForeground=function(d,p,A,t,z){var E=t/2,G=z/2,ea=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,
-[new mxPoint(p+E,A),new mxPoint(p+t,A+G),new mxPoint(p+E,A+z),new mxPoint(p,A+G)],this.isRounded,ea,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ba);mxUtils.extend(Ga,mxDoubleEllipse);Ga.prototype.outerStroke=!0;Ga.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.min(4,Math.min(t/5,z/5));0<t&&0<z&&(d.ellipse(p+E,A+E,t-2*E,z-2*E),d.fillAndStroke());d.setShadow(!1);this.outerStroke&&(d.ellipse(p,A,t,z),d.stroke())};
+mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Qa.apply(this),null!=this.state&&null!=this.linkHint)){var C=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(C=new mxRectangle(C.x,C.y,C.width,C.height),C.add(this.state.text.bounds));this.linkHint.style.left=C.x+C.width/2+"px";this.linkHint.style.top=Math.round(C.y+C.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
+function(){za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,p,A){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=A?A:1;this.updateBoundsFromLine()}function f(){mxSwimlane.call(this)}function m(){mxSwimlane.call(this)}function t(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function B(){mxActor.call(this)}function I(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function c(){mxShape.call(this)}
+function g(){mxShape.call(this)}function l(d,p,A,u){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=u?u:1}function n(){mxActor.call(this)}function x(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function G(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function K(){mxActor.call(this)}function Z(){mxActor.call(this)}function ja(){mxActor.call(this)}function da(){mxActor.call(this)}function ba(d,p){this.canvas=d;this.canvas.setLineJoin("round");
+this.canvas.setLineCap("round");this.defaultVariation=p;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ba.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ba.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ba.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ba.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
+mxUtils.bind(this,ba.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ba.prototype.arcTo)}function na(){mxRectangleShape.call(this)}function ca(){mxRectangleShape.call(this)}function ka(){mxActor.call(this)}function aa(){mxActor.call(this)}function V(){mxActor.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function N(){mxShape.call(this)}function T(){mxShape.call(this)}function W(){mxEllipse.call(this)}
+function U(){mxShape.call(this)}function Y(){mxShape.call(this)}function fa(){mxRectangleShape.call(this)}function oa(){mxShape.call(this)}function la(){mxShape.call(this)}function qa(){mxShape.call(this)}function ya(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ia(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function Ma(){mxDoubleEllipse.call(this)}function sa(){mxArrowConnector.call(this);
+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Sa(){mxActor.call(this)}function Ua(){mxActor.call(this)}function Qa(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function C(){mxActor.call(this)}function Q(){mxActor.call(this)}function R(){mxActor.call(this)}function X(){mxActor.call(this)}function ha(){mxEllipse.call(this)}
+function ia(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Ka(){mxEllipse.call(this)}function Va(){mxEllipse.call(this)}function Oa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Pa(d,p,A,u){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=u?u:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
+!0;this.indent=2;this.rectOutline="single"}function Ra(){mxConnector.call(this)}function fb(){mxConnector.call(this)}function eb(d,p,A,u,z,E,H,ea,O,ta){H+=O;var ma=u.clone();u.x-=z*(2*H+O);u.y-=E*(2*H+O);z*=H+O;E*=H+O;return function(){d.ellipse(ma.x-z-H,ma.y-E-H,2*H,2*H);ta?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var A=this.line[p];null!=A&&(A=new mxRectangle(A.x,A.y,this.strokewidth,
+this.strokewidth),null==d?d=A:d.add(A))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,p,A,u,z){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,p,A,u){if(null!=p){var z=null;d.begin();for(var E=0;E<p.length;E++){var H=p[E];null!=H&&(null==z?d.moveTo(H.x+A,H.y+u):null!=z&&d.lineTo(H.x+A,H.y+u));z=H}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var p=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=
+this.line)for(var A=null,u=0;u<this.line.length&&!p;u++){var z=this.line[u];null!=z&&null!=A&&(p=mxUtils.rectangleIntersectsSegment(d,A,z));A=z}return p};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(f,mxSwimlane);f.prototype.getLabelBounds=function(d){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};f.prototype.paintVertexShape=function(d,p,A,u,z){var E=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
+!1,H=this.isHorizontal(),ea=this.getTitleSize();0==ea||this.outline?Ka.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-p,-A));E||this.outline||!(H&&ea<z||!H&&ea<u)||this.paintForeground(d,p,A,u,z)};f.prototype.paintForeground=function(d,p,A,u,z){if(null!=this.state){var E=this.flipH,H=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ea=E;E=H;H=ea}d.rotate(-this.getShapeRotation(),
+E,H,p+u/2,A+z/2);s=this.scale;p=this.bounds.x/s;A=this.bounds.y/s;u=this.bounds.width/s;z=this.bounds.height/s;this.paintTableForeground(d,p,A,u,z)}};f.prototype.paintTableForeground=function(d,p,A,u,z){u=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(z=0;z<u.length;z++)b.prototype.paintTableLine(d,u[z],p,A)};f.prototype.configurePointerEvents=function(d){0==this.getTitleSize()?
+d.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",f);mxUtils.extend(m,f);m.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",m);mxUtils.extend(t,mxCylinder);t.prototype.size=20;t.prototype.darkOpacity=0;t.prototype.darkOpacity2=0;t.prototype.paintVertexShape=function(d,p,A,u,z){var E=Math.max(0,Math.min(u,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),H=Math.max(-1,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ea=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(p,A);d.begin();d.moveTo(0,0);d.lineTo(u-E,0);d.lineTo(u,E);d.lineTo(u,z);d.lineTo(E,z);d.lineTo(0,z-E);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=H&&(d.setFillAlpha(Math.abs(H)),d.setFillColor(0>H?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(u-E,0),d.lineTo(u,E),
+d.lineTo(E,E),d.close(),d.fill()),0!=ea&&(d.setFillAlpha(Math.abs(ea)),d.setFillColor(0>ea?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(E,E),d.lineTo(E,z),d.lineTo(0,z-E),d.close(),d.fill()),d.begin(),d.moveTo(E,z),d.lineTo(E,E),d.lineTo(0,0),d.moveTo(E,E),d.lineTo(u,E),d.end(),d.stroke())};t.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?(d=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(d,d,0,0)):null};mxCellRenderer.registerShape("cube",
+t);var bb=Math.tan(mxUtils.toRadians(30)),db=(.5-bb)/2;mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(y,mxConnector);y.prototype.paintEdgeShape=function(d,p){var A=this.createMarker(d,p,!0),u=this.createMarker(d,p,!1);d.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&d.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);d.setShadow(!1);d.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this,
+arguments);d.setStrokeColor(this.stroke);d.setFillColor(this.stroke);d.setDashed(!1);null!=A&&A();null!=u&&u()};mxCellRenderer.registerShape("wire",y);mxUtils.extend(q,mxCylinder);q.prototype.size=6;q.prototype.paintVertexShape=function(d,p,A,u,z){d.setFillColor(this.stroke);var E=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(p+.5*(u-E),A+.5*(z-E),E,E);d.fill();d.setFillColor(mxConstants.NONE);d.rect(p,A,u,z);d.fill()};mxCellRenderer.registerShape("waypoint",
+q);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.redrawPath=function(d,p,A,u,z){p=Math.min(u,z/bb);d.translate((u-p)/2,(z-p)/2+p/4);d.moveTo(0,.25*p);d.lineTo(.5*p,p*db);d.lineTo(p,.25*p);d.lineTo(.5*p,(.5-db)*p);d.lineTo(0,.25*p);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(I,mxCylinder);I.prototype.size=20;I.prototype.redrawPath=function(d,p,A,u,z,E){p=Math.min(u,z/(.5+bb));E?(d.moveTo(0,.25*p),d.lineTo(.5*p,(.5-db)*p),d.lineTo(p,.25*p),d.moveTo(.5*
+p,(.5-db)*p),d.lineTo(.5*p,(1-db)*p)):(d.translate((u-p)/2,(z-p)/2),d.moveTo(0,.25*p),d.lineTo(.5*p,p*db),d.lineTo(p,.25*p),d.lineTo(p,.75*p),d.lineTo(.5*p,(1-db)*p),d.lineTo(0,.75*p),d.close());d.end()};mxCellRenderer.registerShape("isoCube",I);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,p,A,u,z,E){p=Math.min(z/2,Math.round(z/8)+this.strokewidth-1);if(E&&null!=this.fill||!E&&null==this.fill)d.moveTo(0,p),d.curveTo(0,2*p,u,2*p,u,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,
+p),d.curveTo(0,2*p,u,2*p,u,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,u,2*p,u,p),E||(d.stroke(),d.begin()),d.translate(0,-p);E||(d.moveTo(0,p),d.curveTo(0,-p/3,u,-p/3,u,p),d.lineTo(u,z-p),d.curveTo(u,z+p/3,0,z+p/3,0,z-p),d.close())};S.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",S);mxUtils.extend(D,mxCylinder);D.prototype.size=30;D.prototype.darkOpacity=
+0;D.prototype.paintVertexShape=function(d,p,A,u,z){var E=Math.max(0,Math.min(u,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),H=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(p,A);d.begin();d.moveTo(0,0);d.lineTo(u-E,0);d.lineTo(u,E);d.lineTo(u,z);d.lineTo(0,z);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=H&&(d.setFillAlpha(Math.abs(H)),d.setFillColor(0>H?"#FFFFFF":"#000000"),
+d.begin(),d.moveTo(u-E,0),d.lineTo(u-E,E),d.lineTo(u,E),d.close(),d.fill()),d.begin(),d.moveTo(u-E,0),d.lineTo(u-E,E),d.lineTo(u,E),d.end(),d.stroke())};mxCellRenderer.registerShape("note",D);mxUtils.extend(P,D);mxCellRenderer.registerShape("note2",P);P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,0)}return null};mxUtils.extend(c,mxShape);c.prototype.isoAngle=
+15;c.prototype.paintVertexShape=function(d,p,A,u,z){var E=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;E=Math.min(u*Math.tan(E),.5*z);d.translate(p,A);d.begin();d.moveTo(.5*u,0);d.lineTo(u,E);d.lineTo(u,z-E);d.lineTo(.5*u,z);d.lineTo(0,z-E);d.lineTo(0,E);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,E);d.lineTo(.5*u,2*E);d.lineTo(u,E);d.moveTo(.5*u,2*E);d.lineTo(.5*u,z);d.stroke()};mxCellRenderer.registerShape("isoCube2",
+c);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(d,p,A,u,z){var E=Math.max(0,Math.min(.5*z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(p,A);0==E?(d.rect(0,0,u,z),d.fillAndStroke()):(d.begin(),d.moveTo(0,E),d.arcTo(.5*u,E,0,0,1,.5*u,0),d.arcTo(.5*u,E,0,0,1,u,E),d.lineTo(u,z-E),d.arcTo(.5*u,E,0,0,1,.5*u,z),d.arcTo(.5*u,E,0,0,1,0,z-E),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(u,E),d.arcTo(.5*u,E,0,0,1,.5*u,2*E),d.arcTo(.5*
+u,E,0,0,1,0,E),d.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(l,mxCylinder);l.prototype.size=15;l.prototype.paintVertexShape=function(d,p,A,u,z){var E=Math.max(0,Math.min(.5*z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),H=mxUtils.getValue(this.style,"lid",!0);d.translate(p,A);0==E?(d.rect(0,0,u,z),d.fillAndStroke()):(d.begin(),H?(d.moveTo(0,E),d.arcTo(.5*u,E,0,0,1,.5*u,0),d.arcTo(.5*u,E,0,0,1,u,E)):(d.moveTo(0,0),d.arcTo(.5*u,E,0,0,0,.5*u,E),d.arcTo(.5*u,E,
+0,0,0,u,0)),d.lineTo(u,z-E),d.arcTo(.5*u,E,0,0,1,.5*u,z),d.arcTo(.5*u,E,0,0,1,0,z-E),d.close(),d.fillAndStroke(),d.setShadow(!1),H&&(d.begin(),d.moveTo(u,E),d.arcTo(.5*u,E,0,0,1,.5*u,2*E),d.arcTo(.5*u,E,0,0,1,0,E),d.stroke()))};mxCellRenderer.registerShape("cylinder3",l);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(d,p,A,u,z){d.moveTo(0,0);d.quadTo(u/2,.5*z,u,0);d.quadTo(.5*u,z/2,u,z);d.quadTo(u/2,.5*z,0,z);d.quadTo(.5*u,z/2,0,0);d.end()};mxCellRenderer.registerShape("switch",n);mxUtils.extend(x,
+mxCylinder);x.prototype.tabWidth=60;x.prototype.tabHeight=20;x.prototype.tabPosition="right";x.prototype.arcSize=.1;x.prototype.isRoundable=function(){return!0};x.prototype.paintVertexShape=function(d,p,A,u,z){d.translate(p,A);p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var E=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),H=mxUtils.getValue(this.style,
+"rounded",!1),ea=mxUtils.getValue(this.style,"absoluteArcSize",!1),O=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ea||(O*=Math.min(u,z));O=Math.min(O,.5*u,.5*(z-A));p=Math.max(p,O);p=Math.min(u-O,p);H||(O=0);d.begin();"left"==E?(d.moveTo(Math.max(O,0),A),d.lineTo(Math.max(O,0),0),d.lineTo(p,0),d.lineTo(p,A)):(d.moveTo(u-p,A),d.lineTo(u-p,0),d.lineTo(u-Math.max(O,0),0),d.lineTo(u-Math.max(O,0),A));H?(d.moveTo(0,O+A),d.arcTo(O,O,0,0,1,O,A),d.lineTo(u-O,A),d.arcTo(O,O,0,0,1,u,O+A),
+d.lineTo(u,z-O),d.arcTo(O,O,0,0,1,u-O,z),d.lineTo(O,z),d.arcTo(O,O,0,0,1,0,z-O)):(d.moveTo(0,A),d.lineTo(u,A),d.lineTo(u,z),d.lineTo(0,z));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(u-30,A+20),d.lineTo(u-20,A+10),d.lineTo(u-10,A+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",x);x.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var A=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var u=mxUtils.getValue(this.style,"rounded",!1),z=mxUtils.getValue(this.style,"absoluteArcSize",!1),E=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));z||(E*=Math.min(d.width,d.height));E=Math.min(E,.5*d.width,.5*(d.height-p));u||(E=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
+this.tabPosition)?new mxRectangle(E,0,Math.min(d.width,d.width-A),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-A),0,E,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};mxUtils.extend(F,mxCylinder);F.prototype.arcSize=.1;F.prototype.paintVertexShape=function(d,p,A,u,z){d.translate(p,A);var E=mxUtils.getValue(this.style,"rounded",!1),H=mxUtils.getValue(this.style,"absoluteArcSize",!1);p=parseFloat(mxUtils.getValue(this.style,"arcSize",
+this.arcSize));A=mxUtils.getValue(this.style,"umlStateConnection",null);H||(p*=Math.min(u,z));p=Math.min(p,.5*u,.5*z);E||(p=0);E=0;null!=A&&(E=10);d.begin();d.moveTo(E,p);d.arcTo(p,p,0,0,1,E+p,0);d.lineTo(u-p,0);d.arcTo(p,p,0,0,1,u,p);d.lineTo(u,z-p);d.arcTo(p,p,0,0,1,u-p,z);d.lineTo(E+p,z);d.arcTo(p,p,0,0,1,E,z-p);d.close();d.fillAndStroke();d.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(d.roundrect(u-40,z-20,10,10,3,3),d.stroke(),d.roundrect(u-20,z-20,10,10,
+3,3),d.stroke(),d.begin(),d.moveTo(u-30,z-15),d.lineTo(u-20,z-15),d.stroke());"connPointRefEntry"==A?(d.ellipse(0,.5*z-10,20,20),d.fillAndStroke()):"connPointRefExit"==A&&(d.ellipse(0,.5*z-10,20,20),d.fillAndStroke(),d.begin(),d.moveTo(5,.5*z-5),d.lineTo(15,.5*z+5),d.moveTo(15,.5*z-5),d.lineTo(5,.5*z+5),d.stroke())};F.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,
+0,0,0):null};mxCellRenderer.registerShape("umlState",F);mxUtils.extend(G,mxActor);G.prototype.size=30;G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(d,p,A,u,z){p=Math.max(0,Math.min(u,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u,0),new mxPoint(u,z),new mxPoint(0,z),new mxPoint(0,p)],this.isRounded,A,!0);d.end()};
+mxCellRenderer.registerShape("card",G);mxUtils.extend(L,mxActor);L.prototype.size=.4;L.prototype.redrawPath=function(d,p,A,u,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,p/2);d.quadTo(u/4,1.4*p,u/2,p/2);d.quadTo(3*u/4,p*(1-1.4),u,p/2);d.lineTo(u,z-p/2);d.quadTo(3*u/4,z-1.4*p,u/2,z-p/2);d.quadTo(u/4,z-p*(1-1.4),0,z-p/2);d.lineTo(0,p/2);d.close();d.end()};L.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=
+mxUtils.getValue(this.style,"size",this.size),A=d.width,u=d.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return p*=u,new mxRectangle(d.x,d.y+p,A,u-2*p);p*=A;return new mxRectangle(d.x+p,d.y,A-2*p,u)}return d};mxCellRenderer.registerShape("tape",L);mxUtils.extend(M,mxActor);M.prototype.size=.3;M.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))*d.height):null};M.prototype.redrawPath=function(d,p,A,u,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,0);d.lineTo(u,0);d.lineTo(u,z-p/2);d.quadTo(3*u/4,z-1.4*p,u/2,z-p/2);d.quadTo(u/4,z-p*(1-1.4),0,z-p/2);d.lineTo(0,p/2);d.close();d.end()};mxCellRenderer.registerShape("document",M);var mb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(d,p,A,u){var z=mxUtils.getValue(this.style,"size");return null!=
+z?u*Math.max(0,Math.min(1,z)):mb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,d.height*p),0,0)}return null};l.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(p/=2);return new mxRectangle(0,Math.min(d.height*
+this.scale,2*p*this.scale),0,Math.max(0,.3*p*this.scale))}return null};x.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var A=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var u=mxUtils.getValue(this.style,"rounded",!1),z=mxUtils.getValue(this.style,"absoluteArcSize",!1),E=parseFloat(mxUtils.getValue(this.style,
+"arcSize",this.arcSize));z||(E*=Math.min(d.width,d.height));E=Math.min(E,.5*d.width,.5*(d.height-p));u||(E=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(E,0,Math.min(d.width,d.width-A),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-A),0,E,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};F.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=
+mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,Math.max(0,p*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,p,A,u,z){p=
+"0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(p,0),new mxPoint(u,0),new mxPoint(u-p,z)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(Z,mxActor);Z.prototype.size=
+.2;Z.prototype.fixedSize=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(d,p,A,u,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,
+z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("trapezoid",Z);mxUtils.extend(ja,mxActor);ja.prototype.size=.5;ja.prototype.redrawPath=function(d,p,A,u,z){d.setFillColor(null);p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(u,0),new mxPoint(p,0),new mxPoint(p,z/2),new mxPoint(0,z/2),new mxPoint(p,z/2),new mxPoint(p,z),new mxPoint(u,z)],this.isRounded,
+A,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ja);mxUtils.extend(da,mxActor);da.prototype.redrawPath=function(d,p,A,u,z){d.setStrokeWidth(1);d.setFillColor(this.stroke);p=u/5;d.rect(0,0,p,z);d.fillAndStroke();d.rect(2*p,0,p,z);d.fillAndStroke();d.rect(4*p,0,p,z);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",da);ba.prototype.moveTo=function(d,p){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;this.firstX=d;this.firstY=p};ba.prototype.close=
+function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};ba.prototype.quadTo=function(d,p,A,u){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=u};ba.prototype.curveTo=function(d,p,A,u,z,E){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=z;this.lastY=E};ba.prototype.arcTo=function(d,p,A,u,z,E,H){this.originalArcTo.apply(this.canvas,arguments);
+this.lastX=E;this.lastY=H};ba.prototype.lineTo=function(d,p){if(null!=this.lastX&&null!=this.lastY){var A=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},u=Math.abs(d-this.lastX),z=Math.abs(p-this.lastY),E=Math.sqrt(u*u+z*z);if(2>E){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;return}var H=Math.round(E/10),ea=this.defaultVariation;5>H&&(H=5,ea/=3);var O=A(d-this.lastX)*u/H;A=A(p-this.lastY)*z/H;u/=E;z/=E;for(E=0;E<H;E++){var ta=(Math.random()-
+.5)*ea;this.originalLineTo.call(this.canvas,O*E+this.lastX-ta*z,A*E+this.lastY-ta*u)}this.originalLineTo.call(this.canvas,d,p)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p};ba.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};var lb=mxShape.prototype.beforePaint;
+mxShape.prototype.beforePaint=function(d){lb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var pb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(d){pb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ba(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==
+this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var gb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&gb.apply(this,arguments)};var qb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,p,A,u,z){if(null==d.handJiggle||
+d.handJiggle.constructor!=ba)qb.apply(this,arguments);else{var E=!0;null!=this.style&&(E="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(E||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)E||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?E=Math.min(u/2,Math.min(z/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2)):(E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.min(u*E,z*E)),d.moveTo(p+E,A),d.lineTo(p+u-E,A),d.quadTo(p+u,A,p+u,A+E),d.lineTo(p+u,A+z-E),d.quadTo(p+u,A+z,p+u-E,A+z),d.lineTo(p+E,A+z),d.quadTo(p,A+z,p,A+z-E),d.lineTo(p,A+E),d.quadTo(p,A,p+E,A)):(d.moveTo(p,A),d.lineTo(p+u,A),d.lineTo(p+u,A+z),d.lineTo(p,A+z),d.lineTo(p,A)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(na,mxRectangleShape);na.prototype.size=
+.1;na.prototype.fixedSize=!1;na.prototype.isHtmlAllowed=function(){return!1};na.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var p=d.width,A=d.height;d=new mxRectangle(d.x,d.y,p,A);var u=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),z=parseFloat(mxUtils.getValue(this.style,"size",this.size));u?z=Math.max(0,Math.min(p,
+z*this.scale)):(z=p*Math.max(0,Math.min(1,z)),this.isRounded&&(u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,z=Math.max(z,Math.min(p*u,A*u))));d.x+=Math.round(z);d.width-=Math.round(2*z);return d}return d};na.prototype.paintForeground=function(d,p,A,u,z){var E=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),H=parseFloat(mxUtils.getValue(this.style,"size",this.size));H=E?Math.max(0,Math.min(u,H)):u*Math.max(0,Math.min(1,H));this.isRounded&&
+(E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,H=Math.max(H,Math.min(u*E,z*E)));H=Math.round(H);d.begin();d.moveTo(p+H,A);d.lineTo(p+H,A+z);d.moveTo(p+u-H,A);d.lineTo(p+u-H,A+z);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",na);mxCellRenderer.registerShape("process2",na);mxUtils.extend(ca,mxRectangleShape);ca.prototype.paintBackground=function(d,p,A,u,z){d.setFillColor(mxConstants.NONE);
+d.rect(p,A,u,z);d.fill()};ca.prototype.paintForeground=function(d,p,A,u,z){};mxCellRenderer.registerShape("transparent",ca);mxUtils.extend(ka,mxHexagon);ka.prototype.size=30;ka.prototype.position=.5;ka.prototype.position2=.5;ka.prototype.base=20;ka.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ka.prototype.isRoundable=function(){return!0};ka.prototype.redrawPath=function(d,p,A,u,z){p=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var E=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),H=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),ea=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,z-A),new mxPoint(Math.min(u,
+E+ea),z-A),new mxPoint(H,z),new mxPoint(Math.max(0,E),z-A),new mxPoint(0,z-A)],this.isRounded,p,!0,[4])};mxCellRenderer.registerShape("callout",ka);mxUtils.extend(aa,mxActor);aa.prototype.size=.2;aa.prototype.fixedSize=20;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(d,p,A,u,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u-p,0),new mxPoint(u,z/2),new mxPoint(u-p,z),new mxPoint(0,z),new mxPoint(p,z/2)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("step",aa);mxUtils.extend(V,mxHexagon);V.prototype.size=.25;V.prototype.fixedSize=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(d,p,A,u,z){p="0"!=mxUtils.getValue(this.style,
+"fixedSize","0")?Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,.5*z),new mxPoint(u-p,z),new mxPoint(p,z),new mxPoint(0,.5*z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("hexagon",V);mxUtils.extend(k,mxRectangleShape);
+k.prototype.isHtmlAllowed=function(){return!1};k.prototype.paintForeground=function(d,p,A,u,z){var E=Math.min(u/5,z/5)+1;d.begin();d.moveTo(p+u/2,A+E);d.lineTo(p+u/2,A+z-E);d.moveTo(p+E,A+z/2);d.lineTo(p+u-E,A+z/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",k);var ub=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};mxRhombus.prototype.paintVertexShape=function(d,p,A,u,z){ub.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var E=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=E;A+=E;u-=2*E;z-=2*E;0<u&&0<z&&(d.setShadow(!1),ub.apply(this,[d,p,A,u,z]))}};mxUtils.extend(v,mxRectangleShape);v.prototype.isHtmlAllowed=function(){return!1};v.prototype.getLabelBounds=function(d){if(1==
+this.style["double"]){var p=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};v.prototype.paintForeground=function(d,p,A,u,z){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var E=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=E;A+=E;u-=2*E;z-=2*E;0<u&&0<z&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);
+E=0;do{var H=mxCellRenderer.defaultShapes[this.style["symbol"+E]];if(null!=H){var ea=this.style["symbol"+E+"Align"],O=this.style["symbol"+E+"VerticalAlign"],ta=this.style["symbol"+E+"Width"],ma=this.style["symbol"+E+"Height"],ab=this.style["symbol"+E+"Spacing"]||0,ib=this.style["symbol"+E+"VSpacing"]||ab,cb=this.style["symbol"+E+"ArcSpacing"];null!=cb&&(cb*=this.getArcSize(u+this.strokewidth,z+this.strokewidth),ab+=cb,ib+=cb);cb=p;var Fa=A;cb=ea==mxConstants.ALIGN_CENTER?cb+(u-ta)/2:ea==mxConstants.ALIGN_RIGHT?
+cb+(u-ta-ab):cb+ab;Fa=O==mxConstants.ALIGN_MIDDLE?Fa+(z-ma)/2:O==mxConstants.ALIGN_BOTTOM?Fa+(z-ma-ib):Fa+ib;d.save();ea=new H;ea.style=this.style;H.prototype.paintVertexShape.call(ea,d,cb,Fa,ta,ma);d.restore()}E++}while(null!=H)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",v);mxUtils.extend(J,mxCylinder);J.prototype.redrawPath=function(d,p,A,u,z,E){E?(d.moveTo(0,0),d.lineTo(u/2,z/2),d.lineTo(u,0),d.end()):(d.moveTo(0,0),d.lineTo(u,0),d.lineTo(u,
+z),d.lineTo(0,z),d.close())};mxCellRenderer.registerShape("message",J);mxUtils.extend(N,mxShape);N.prototype.paintBackground=function(d,p,A,u,z){d.translate(p,A);d.ellipse(u/4,0,u/2,z/4);d.fillAndStroke();d.begin();d.moveTo(u/2,z/4);d.lineTo(u/2,2*z/3);d.moveTo(u/2,z/3);d.lineTo(0,z/3);d.moveTo(u/2,z/3);d.lineTo(u,z/3);d.moveTo(u/2,2*z/3);d.lineTo(0,z);d.moveTo(u/2,2*z/3);d.lineTo(u,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",N);mxUtils.extend(T,mxShape);T.prototype.getLabelMargins=
+function(d){return new mxRectangle(d.width/6,0,0,0)};T.prototype.paintBackground=function(d,p,A,u,z){d.translate(p,A);d.begin();d.moveTo(0,z/4);d.lineTo(0,3*z/4);d.end();d.stroke();d.begin();d.moveTo(0,z/2);d.lineTo(u/6,z/2);d.end();d.stroke();d.ellipse(u/6,0,5*u/6,z);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",T);mxUtils.extend(W,mxEllipse);W.prototype.paintVertexShape=function(d,p,A,u,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+u/8,A+z);d.lineTo(p+
+7*u/8,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",W);mxUtils.extend(U,mxShape);U.prototype.paintVertexShape=function(d,p,A,u,z){d.translate(p,A);d.begin();d.moveTo(u,0);d.lineTo(0,z);d.moveTo(0,0);d.lineTo(u,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",U);mxUtils.extend(Y,mxShape);Y.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};Y.prototype.paintBackground=function(d,p,A,u,z){d.translate(p,A);d.begin();
+d.moveTo(3*u/8,z/8*1.1);d.lineTo(5*u/8,0);d.end();d.stroke();d.ellipse(0,z/8,u,7*z/8);d.fillAndStroke()};Y.prototype.paintForeground=function(d,p,A,u,z){d.begin();d.moveTo(3*u/8,z/8*1.1);d.lineTo(5*u/8,z/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",Y);mxUtils.extend(fa,mxRectangleShape);fa.prototype.size=40;fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.getLabelBounds=function(d){var p=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*
+this.scale));return new mxRectangle(d.x,d.y,d.width,p)};fa.prototype.paintBackground=function(d,p,A,u,z){var E=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),H=mxUtils.getValue(this.style,"participant");null==H||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,p,A,u,E):(H=this.state.view.graph.cellRenderer.getShape(H),null!=H&&H!=fa&&(H=new H,H.apply(this.state),d.save(),H.paintVertexShape(d,p,A,u,E),d.restore()));E<z&&(d.setDashed("1"==mxUtils.getValue(this.style,
+"lifelineDashed","1")),d.begin(),d.moveTo(p+u/2,A+E),d.lineTo(p+u/2,A+z),d.end(),d.stroke())};fa.prototype.paintForeground=function(d,p,A,u,z){var E=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,p,A,u,Math.min(z,E))};mxCellRenderer.registerShape("umlLifeline",fa);mxUtils.extend(oa,mxShape);oa.prototype.width=60;oa.prototype.height=30;oa.prototype.corner=10;oa.prototype.configurePointerEvents=function(d){var p=
+mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=p&&p!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};oa.prototype.getLabelMargins=function(d){return new mxRectangle(0,0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};oa.prototype.paintBackground=
+function(d,p,A,u,z){var E=this.corner,H=Math.min(u,Math.max(E,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),ea=Math.min(z,Math.max(1.5*E,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),O=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);O!=mxConstants.NONE&&(d.setFillColor(O),d.rect(p,A,u,z),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,p,A,u,z),d.setGradient(this.fill,
+this.gradient,p,A,u,z,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(p,A);d.lineTo(p+H,A);d.lineTo(p+H,A+Math.max(0,ea-1.5*E));d.lineTo(p+Math.max(0,H-E),A+ea);d.lineTo(p,A+ea);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(p+H,A);d.lineTo(p+u,A);d.lineTo(p+u,A+z);d.lineTo(p,A+z);d.lineTo(p,A+ea);d.stroke()};mxCellRenderer.registerShape("umlFrame",oa);mxPerimeter.CenterPerimeter=function(d,p,A,u){return new mxPoint(d.getCenterX(),
+d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,p,A,u){u=fa.prototype.size;null!=p&&(u=mxUtils.getValue(p.style,"size",u)*p.view.scale);p=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;A.x<d.getCenterX()&&(p=-1*(p+1));return new mxPoint(d.getCenterX()+p,Math.min(d.y+d.height,Math.max(d.y+u,A.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
+function(d,p,A,u){u=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,p,A,u){u=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;null!=p.style.backboneSize&&(u+=parseFloat(p.style.backboneSize)*p.view.scale/2-1);if("south"==p.style[mxConstants.STYLE_DIRECTION]||"north"==p.style[mxConstants.STYLE_DIRECTION])return A.x<d.getCenterX()&&(u=-1*(u+1)),
+new mxPoint(d.getCenterX()+u,Math.min(d.y+d.height,Math.max(d.y,A.y)));A.y<d.getCenterY()&&(u=-1*(u+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,A.x)),d.getCenterY()+u)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,p,A,u){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(p.style,"size",ka.prototype.size))*p.view.scale))),
+p.style),p,A,u)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,p,A,u){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),E=z?K.prototype.fixedSize:K.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var H=d.x,ea=d.y,O=d.width,ta=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==
+mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H,ea),new mxPoint(H+O,ea+z),new mxPoint(H+O,ea+ta),new mxPoint(H,ea+ta-z),new mxPoint(H,ea)]):(z=z?Math.max(0,Math.min(.5*O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H+z,ea),new mxPoint(H+O,ea),new mxPoint(H+O-z,ea+ta),new mxPoint(H,ea+ta),new mxPoint(H+z,ea)]);ta=d.getCenterX();d=d.getCenterY();d=new mxPoint(ta,d);u&&(A.x<H||A.x>H+O?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,
+A)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,p,A,u){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),E=z?Z.prototype.fixedSize:Z.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var H=d.x,ea=d.y,O=d.width,ta=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,
+Math.min(.5*O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H+z,ea),new mxPoint(H+O-z,ea),new mxPoint(H+O,ea+ta),new mxPoint(H,ea+ta),new mxPoint(H+z,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H,ea),new mxPoint(H+O,ea),new mxPoint(H+O-z,ea+ta),new mxPoint(H+z,ea+ta),new mxPoint(H,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H,ea+z),new mxPoint(H+O,ea),new mxPoint(H+
+O,ea+ta),new mxPoint(H,ea+ta-z),new mxPoint(H,ea+z)]):(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H,ea),new mxPoint(H+O,ea+z),new mxPoint(H+O,ea+ta-z),new mxPoint(H,ea+ta),new mxPoint(H,ea)]);ta=d.getCenterX();d=d.getCenterY();d=new mxPoint(ta,d);u&&(A.x<H||A.x>H+O?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,A)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,p,A,u){var z="0"!=mxUtils.getValue(p.style,
+"fixedSize","0"),E=z?aa.prototype.fixedSize:aa.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var H=d.x,ea=d.y,O=d.width,ta=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H,ea),new mxPoint(H+O-z,ea),new mxPoint(H+O,d),new mxPoint(H+O-z,ea+ta),new mxPoint(H,
+ea+ta),new mxPoint(H+z,d),new mxPoint(H,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H+z,ea),new mxPoint(H+O,ea),new mxPoint(H+O-z,d),new mxPoint(H+O,ea+ta),new mxPoint(H+z,ea+ta),new mxPoint(H,d),new mxPoint(H+z,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H,ea+z),new mxPoint(ma,ea),new mxPoint(H+O,ea+z),new mxPoint(H+O,ea+ta),new mxPoint(ma,ea+ta-z),new mxPoint(H,
+ea+ta),new mxPoint(H,ea+z)]):(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H,ea),new mxPoint(ma,ea+z),new mxPoint(H+O,ea),new mxPoint(H+O,ea+ta-z),new mxPoint(ma,ea+ta),new mxPoint(H,ea+ta-z),new mxPoint(H,ea)]);ma=new mxPoint(ma,d);u&&(A.x<H||A.x>H+O?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,p,A,u){var z="0"!=mxUtils.getValue(p.style,"fixedSize",
+"0"),E=z?V.prototype.fixedSize:V.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var H=d.x,ea=d.y,O=d.width,ta=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(ma,ea),new mxPoint(H+O,ea+z),new mxPoint(H+O,ea+ta-z),
+new mxPoint(ma,ea+ta),new mxPoint(H,ea+ta-z),new mxPoint(H,ea+z),new mxPoint(ma,ea)]):(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H+z,ea),new mxPoint(H+O-z,ea),new mxPoint(H+O,d),new mxPoint(H+O-z,ea+ta),new mxPoint(H+z,ea+ta),new mxPoint(H,d),new mxPoint(H+z,ea)]);ma=new mxPoint(ma,d);u&&(A.x<H||A.x>H+O?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(la,mxShape);
+la.prototype.size=10;la.prototype.paintBackground=function(d,p,A,u,z){var E=parseFloat(mxUtils.getValue(this.style,"size",this.size));d.translate(p,A);d.ellipse((u-E)/2,0,E,E);d.fillAndStroke();d.begin();d.moveTo(u/2,E);d.lineTo(u/2,z);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",la);mxUtils.extend(qa,mxShape);qa.prototype.size=10;qa.prototype.inset=2;qa.prototype.paintBackground=function(d,p,A,u,z){var E=parseFloat(mxUtils.getValue(this.style,"size",this.size)),H=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;d.translate(p,A);d.begin();d.moveTo(u/2,E+H);d.lineTo(u/2,z);d.end();d.stroke();d.begin();d.moveTo((u-E)/2-H,E/2);d.quadTo((u-E)/2-H,E+H,u/2,E+H);d.quadTo((u+E)/2+H,E+H,(u+E)/2+H,E/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",qa);mxUtils.extend(ya,mxShape);ya.prototype.paintBackground=function(d,p,A,u,z){d.translate(p,A);d.begin();d.moveTo(0,0);d.quadTo(u,0,u,z/2);d.quadTo(u,z,0,z);d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",
+ya);mxUtils.extend(wa,mxShape);wa.prototype.inset=2;wa.prototype.paintBackground=function(d,p,A,u,z){var E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,A);d.ellipse(0,E,u-2*E,z-2*E);d.fillAndStroke();d.begin();d.moveTo(u/2,0);d.quadTo(u,0,u,z/2);d.quadTo(u,z,u/2,z);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",wa);mxUtils.extend(Ia,mxCylinder);Ia.prototype.jettyWidth=20;Ia.prototype.jettyHeight=10;Ia.prototype.redrawPath=
+function(d,p,A,u,z,E){var H=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=H/2;H=A+H/2;var ea=Math.min(p,z-p),O=Math.min(ea+2*p,z-p);E?(d.moveTo(A,ea),d.lineTo(H,ea),d.lineTo(H,ea+p),d.lineTo(A,ea+p),d.moveTo(A,O),d.lineTo(H,O),d.lineTo(H,O+p),d.lineTo(A,O+p)):(d.moveTo(A,0),d.lineTo(u,0),d.lineTo(u,z),d.lineTo(A,z),d.lineTo(A,O+p),d.lineTo(0,O+p),d.lineTo(0,O),d.lineTo(A,O),d.lineTo(A,ea+p),d.lineTo(0,
+ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("module",Ia);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(d,p,A,u,z,E){var H=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=H/2;H=A+H/2;var ea=.3*z-p/2,O=.7*z-p/2;E?(d.moveTo(A,ea),d.lineTo(H,ea),d.lineTo(H,ea+p),d.lineTo(A,ea+p),d.moveTo(A,O),
+d.lineTo(H,O),d.lineTo(H,O+p),d.lineTo(A,O+p)):(d.moveTo(A,0),d.lineTo(u,0),d.lineTo(u,z),d.lineTo(A,z),d.lineTo(A,O+p),d.lineTo(0,O+p),d.lineTo(0,O),d.lineTo(A,O),d.lineTo(A,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(Ba,mxRectangleShape);Ba.prototype.paintForeground=function(d,p,A,u,z){var E=u/2,H=z/2,ea=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,
+[new mxPoint(p+E,A),new mxPoint(p+u,A+H),new mxPoint(p+E,A+z),new mxPoint(p,A+H)],this.isRounded,ea,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ba);mxUtils.extend(Ga,mxDoubleEllipse);Ga.prototype.outerStroke=!0;Ga.prototype.paintVertexShape=function(d,p,A,u,z){var E=Math.min(4,Math.min(u/5,z/5));0<u&&0<z&&(d.ellipse(p+E,A+E,u-2*E,z-2*E),d.fillAndStroke());d.setShadow(!1);this.outerStroke&&(d.ellipse(p,A,u,z),d.stroke())};
mxCellRenderer.registerShape("endState",Ga);mxUtils.extend(Ma,Ga);Ma.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ma);mxUtils.extend(sa,mxArrowConnector);sa.prototype.defaultWidth=4;sa.prototype.isOpenEnded=function(){return!0};sa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};sa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",sa);mxUtils.extend(Ca,
mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
-Ca);mxUtils.extend(Da,mxActor);Da.prototype.size=30;Da.prototype.isRoundable=function(){return!0};Da.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(0,p),new mxPoint(t,0),new mxPoint(t,z)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("manualInput",Da);mxUtils.extend(va,mxRectangleShape);va.prototype.dx=
-20;va.prototype.dy=20;va.prototype.isHtmlAllowed=function(){return!1};va.prototype.paintForeground=function(d,p,A,t,z){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var E=0;if(this.isRounded){var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;E=Math.max(E,Math.min(t*G,z*G))}G=Math.max(E,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));E=Math.max(E,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
-d.begin();d.moveTo(p,A+E);d.lineTo(p+t,A+E);d.end();d.stroke();d.begin();d.moveTo(p+G,A);d.lineTo(p+G,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",va);mxUtils.extend(Na,mxActor);Na.prototype.dx=20;Na.prototype.dy=20;Na.prototype.isRoundable=function(){return!0};Na.prototype.redrawPath=function(d,p,A,t,z){p=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,
-"size",this.size));var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,A),new mxPoint(p,A),new mxPoint(p,z),new mxPoint(0,z)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("corner",Na);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.lineTo(0,z);d.end();d.moveTo(t,0);d.lineTo(t,z);d.end();d.moveTo(0,z/2);d.lineTo(t,z/2);d.end()};mxCellRenderer.registerShape("crossbar",
-Sa);mxUtils.extend(Ua,mxActor);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototype.isRoundable=function(){return!0};Ua.prototype.redrawPath=function(d,p,A,t,z){p=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,
-0),new mxPoint(t,A),new mxPoint((t+p)/2,A),new mxPoint((t+p)/2,z),new mxPoint((t-p)/2,z),new mxPoint((t-p)/2,A),new mxPoint(0,A)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("tee",Ua);mxUtils.extend(Qa,mxActor);Qa.prototype.arrowWidth=.3;Qa.prototype.arrowSize=.2;Qa.prototype.isRoundable=function(){return!0};Qa.prototype.redrawPath=function(d,p,A,t,z){var E=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"arrowSize",this.arrowSize))));A=(z-E)/2;E=A+E;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,E),new mxPoint(0,E)],this.isRounded,G,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Qa);mxUtils.extend(za,mxActor);za.prototype.isRoundable=function(){return!0};za.prototype.redrawPath=function(d,p,A,t,z){var E=z*Math.max(0,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"arrowWidth",Qa.prototype.arrowWidth))));p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Qa.prototype.arrowSize))));A=(z-E)/2;E=A+E;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z/2),new mxPoint(p,0),new mxPoint(p,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,E),new mxPoint(p,E),new mxPoint(p,z)],this.isRounded,
-G,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",za);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.1;Ea.prototype.fixedSize=20;Ea.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(p,0);d.lineTo(t,0);d.quadTo(t-2*p,z/2,t,z);d.lineTo(p,z);d.quadTo(p-2*p,z/2,p,0);d.close();
-d.end()};mxCellRenderer.registerShape("dataStorage",Ea);mxUtils.extend(B,mxActor);B.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.close();d.end()};mxCellRenderer.registerShape("or",B);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.quadTo(t/2,z/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",Q);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=
-function(){return!0};R.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t/2,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,.8*p),new mxPoint(t,z),new mxPoint(0,z),new mxPoint(0,.8*p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(X,mxActor);X.prototype.size=.375;X.prototype.isRoundable=
-function(){return!0};X.prototype.redrawPath=function(d,p,A,t,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,z-p),new mxPoint(t/2,z),new mxPoint(0,z-p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",X);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,p,A,t,
-z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+t/2,A+z);d.lineTo(p+t,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+t,A+z/2);d.end();d.stroke();d.begin();d.moveTo(p+t/2,A);d.lineTo(p+t/2,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",
-ja);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p+.145*t,A+.145*z);d.lineTo(p+.855*t,A+.855*z);d.end();d.stroke();d.begin();d.moveTo(p+.855*t,A+.145*z);d.lineTo(p+.145*t,A+.855*z);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,p,A,t,z){mxRhombus.prototype.paintVertexShape.apply(this,
-arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+t,A+z/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(d,p,A,t,z){d.begin();d.moveTo(p,A);d.lineTo(p+t,A);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke();d.begin();d.moveTo(p,A+z);d.lineTo(p+t,A+z);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ra);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=
-function(d,p,A,t,z){var E=d.state.strokeWidth/2,G=10+2*E,ea=A+z-G/2;d.begin();d.moveTo(p,A);d.lineTo(p,A+z);d.moveTo(p+E,ea);d.lineTo(p+E+G,ea-G/2);d.moveTo(p+E,ea);d.lineTo(p+E+G,ea+G/2);d.moveTo(p+E,ea);d.lineTo(p+t-E,ea);d.moveTo(p+t,A);d.lineTo(p+t,A+z);d.moveTo(p+t-E,ea);d.lineTo(p+t-G-E,ea-G/2);d.moveTo(p+t-E,ea);d.lineTo(p+t-G-E,ea+G/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(Ka,mxEllipse);Ka.prototype.drawHidden=!0;Ka.prototype.paintVertexShape=function(d,
-p,A,t,z){this.outline||d.setStrokeColor(null);if(null!=this.style){var E=d.pointerEvents,G=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||G||(d.pointerEvents=!1);var ea="1"==mxUtils.getValue(this.style,"top","1"),O="1"==mxUtils.getValue(this.style,"left","1"),ta="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||G||this.outline||ea||ta||ma||O?(d.rect(p,A,t,z),d.fill(),
-d.pointerEvents=E,d.setStrokeColor(this.stroke),d.setLineCap("square"),d.begin(),d.moveTo(p,A),this.outline||ea?d.lineTo(p+t,A):d.moveTo(p+t,A),this.outline||ta?d.lineTo(p+t,A+z):d.moveTo(p+t,A+z),this.outline||ma?d.lineTo(p,A+z):d.moveTo(p,A+z),(this.outline||O)&&d.lineTo(p,A),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ka);mxUtils.extend(Va,mxEllipse);Va.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);d.setShadow(!1);d.begin();"vertical"==mxUtils.getValue(this.style,"line")?(d.moveTo(p+t/2,A),d.lineTo(p+t/2,A+z)):(d.moveTo(p,A+z/2),d.lineTo(p+t,A+z/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Va);mxUtils.extend(Oa,mxActor);Oa.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/2);d.moveTo(0,0);d.lineTo(t-p,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t-p,z);d.lineTo(0,z);d.close();d.end()};mxCellRenderer.registerShape("delay",Oa);mxUtils.extend(Ta,mxActor);Ta.prototype.size=
-.2;Ta.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(z,t);var E=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(z-E)/2;A=p+E;var G=(t-E)/2;E=G+E;d.moveTo(0,p);d.lineTo(G,p);d.lineTo(G,0);d.lineTo(E,0);d.lineTo(E,p);d.lineTo(t,p);d.lineTo(t,A);d.lineTo(E,A);d.lineTo(E,z);d.lineTo(G,z);d.lineTo(G,A);d.lineTo(0,A);d.close();d.end()};mxCellRenderer.registerShape("cross",Ta);mxUtils.extend(Za,mxActor);Za.prototype.size=.25;Za.prototype.redrawPath=function(d,
-p,A,t,z){p=Math.min(t,z/2);A=Math.min(t-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*t);d.moveTo(0,z/2);d.lineTo(A,0);d.lineTo(t-p,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t-p,z);d.lineTo(A,z);d.close();d.end()};mxCellRenderer.registerShape("display",Za);mxUtils.extend(Pa,mxActor);Pa.prototype.cst={RECT2:"mxgraph.basic.rect"};Pa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",
+Ca);mxUtils.extend(Da,mxActor);Da.prototype.size=30;Da.prototype.isRoundable=function(){return!0};Da.prototype.redrawPath=function(d,p,A,u,z){p=Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(0,p),new mxPoint(u,0),new mxPoint(u,z)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("manualInput",Da);mxUtils.extend(va,mxRectangleShape);va.prototype.dx=
+20;va.prototype.dy=20;va.prototype.isHtmlAllowed=function(){return!1};va.prototype.paintForeground=function(d,p,A,u,z){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var E=0;if(this.isRounded){var H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;E=Math.max(E,Math.min(u*H,z*H))}H=Math.max(E,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));E=Math.max(E,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
+d.begin();d.moveTo(p,A+E);d.lineTo(p+u,A+E);d.end();d.stroke();d.begin();d.moveTo(p+H,A);d.lineTo(p+H,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",va);mxUtils.extend(Na,mxActor);Na.prototype.dx=20;Na.prototype.dy=20;Na.prototype.isRoundable=function(){return!0};Na.prototype.redrawPath=function(d,p,A,u,z){p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,
+"size",this.size));var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,A),new mxPoint(p,A),new mxPoint(p,z),new mxPoint(0,z)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("corner",Na);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(d,p,A,u,z){d.moveTo(0,0);d.lineTo(0,z);d.end();d.moveTo(u,0);d.lineTo(u,z);d.end();d.moveTo(0,z/2);d.lineTo(u,z/2);d.end()};mxCellRenderer.registerShape("crossbar",
+Sa);mxUtils.extend(Ua,mxActor);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototype.isRoundable=function(){return!0};Ua.prototype.redrawPath=function(d,p,A,u,z){p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,
+0),new mxPoint(u,A),new mxPoint((u+p)/2,A),new mxPoint((u+p)/2,z),new mxPoint((u-p)/2,z),new mxPoint((u-p)/2,A),new mxPoint(0,A)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("tee",Ua);mxUtils.extend(Qa,mxActor);Qa.prototype.arrowWidth=.3;Qa.prototype.arrowSize=.2;Qa.prototype.isRoundable=function(){return!0};Qa.prototype.redrawPath=function(d,p,A,u,z){var E=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",this.arrowSize))));A=(z-E)/2;E=A+E;var H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,A),new mxPoint(u-p,A),new mxPoint(u-p,0),new mxPoint(u,z/2),new mxPoint(u-p,z),new mxPoint(u-p,E),new mxPoint(0,E)],this.isRounded,H,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Qa);mxUtils.extend(za,mxActor);za.prototype.isRoundable=function(){return!0};za.prototype.redrawPath=function(d,p,A,u,z){var E=z*Math.max(0,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"arrowWidth",Qa.prototype.arrowWidth))));p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Qa.prototype.arrowSize))));A=(z-E)/2;E=A+E;var H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z/2),new mxPoint(p,0),new mxPoint(p,A),new mxPoint(u-p,A),new mxPoint(u-p,0),new mxPoint(u,z/2),new mxPoint(u-p,z),new mxPoint(u-p,E),new mxPoint(p,E),new mxPoint(p,z)],this.isRounded,
+H,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",za);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.1;Ea.prototype.fixedSize=20;Ea.prototype.redrawPath=function(d,p,A,u,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(p,0);d.lineTo(u,0);d.quadTo(u-2*p,z/2,u,z);d.lineTo(p,z);d.quadTo(p-2*p,z/2,p,0);d.close();
+d.end()};mxCellRenderer.registerShape("dataStorage",Ea);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(d,p,A,u,z){d.moveTo(0,0);d.quadTo(u,0,u,z/2);d.quadTo(u,z,0,z);d.close();d.end()};mxCellRenderer.registerShape("or",C);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(d,p,A,u,z){d.moveTo(0,0);d.quadTo(u,0,u,z/2);d.quadTo(u,z,0,z);d.quadTo(u/2,z/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",Q);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=
+function(){return!0};R.prototype.redrawPath=function(d,p,A,u,z){p=Math.min(u/2,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,.8*p),new mxPoint(u,z),new mxPoint(0,z),new mxPoint(0,.8*p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(X,mxActor);X.prototype.size=.375;X.prototype.isRoundable=
+function(){return!0};X.prototype.redrawPath=function(d,p,A,u,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,z-p),new mxPoint(u/2,z),new mxPoint(0,z-p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",X);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(d,p,A,u,
+z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+u/2,A+z);d.lineTo(p+u,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ha);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,p,A,u,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+u,A+z/2);d.end();d.stroke();d.begin();d.moveTo(p+u/2,A);d.lineTo(p+u/2,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",
+ia);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(d,p,A,u,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p+.145*u,A+.145*z);d.lineTo(p+.855*u,A+.855*z);d.end();d.stroke();d.begin();d.moveTo(p+.855*u,A+.145*z);d.lineTo(p+.145*u,A+.855*z);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,p,A,u,z){mxRhombus.prototype.paintVertexShape.apply(this,
+arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+u,A+z/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(d,p,A,u,z){d.begin();d.moveTo(p,A);d.lineTo(p+u,A);d.lineTo(p+u/2,A+z/2);d.close();d.fillAndStroke();d.begin();d.moveTo(p,A+z);d.lineTo(p+u,A+z);d.lineTo(p+u/2,A+z/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ra);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=
+function(d,p,A,u,z){var E=d.state.strokeWidth/2,H=10+2*E,ea=A+z-H/2;d.begin();d.moveTo(p,A);d.lineTo(p,A+z);d.moveTo(p+E,ea);d.lineTo(p+E+H,ea-H/2);d.moveTo(p+E,ea);d.lineTo(p+E+H,ea+H/2);d.moveTo(p+E,ea);d.lineTo(p+u-E,ea);d.moveTo(p+u,A);d.lineTo(p+u,A+z);d.moveTo(p+u-E,ea);d.lineTo(p+u-H-E,ea-H/2);d.moveTo(p+u-E,ea);d.lineTo(p+u-H-E,ea+H/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(Ka,mxEllipse);Ka.prototype.drawHidden=!0;Ka.prototype.paintVertexShape=function(d,
+p,A,u,z){this.outline||d.setStrokeColor(null);if(null!=this.style){var E=d.pointerEvents,H=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||H||(d.pointerEvents=!1);var ea="1"==mxUtils.getValue(this.style,"top","1"),O="1"==mxUtils.getValue(this.style,"left","1"),ta="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||H||this.outline||ea||ta||ma||O?(d.rect(p,A,u,z),d.fill(),
+d.pointerEvents=E,d.setStrokeColor(this.stroke),d.setLineCap("square"),d.begin(),d.moveTo(p,A),this.outline||ea?d.lineTo(p+u,A):d.moveTo(p+u,A),this.outline||ta?d.lineTo(p+u,A+z):d.moveTo(p+u,A+z),this.outline||ma?d.lineTo(p,A+z):d.moveTo(p,A+z),(this.outline||O)&&d.lineTo(p,A),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ka);mxUtils.extend(Va,mxEllipse);Va.prototype.paintVertexShape=function(d,p,A,u,z){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);d.setShadow(!1);d.begin();"vertical"==mxUtils.getValue(this.style,"line")?(d.moveTo(p+u/2,A),d.lineTo(p+u/2,A+z)):(d.moveTo(p,A+z/2),d.lineTo(p+u,A+z/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Va);mxUtils.extend(Oa,mxActor);Oa.prototype.redrawPath=function(d,p,A,u,z){p=Math.min(u,z/2);d.moveTo(0,0);d.lineTo(u-p,0);d.quadTo(u,0,u,z/2);d.quadTo(u,z,u-p,z);d.lineTo(0,z);d.close();d.end()};mxCellRenderer.registerShape("delay",Oa);mxUtils.extend(Ta,mxActor);Ta.prototype.size=
+.2;Ta.prototype.redrawPath=function(d,p,A,u,z){p=Math.min(z,u);var E=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(z-E)/2;A=p+E;var H=(u-E)/2;E=H+E;d.moveTo(0,p);d.lineTo(H,p);d.lineTo(H,0);d.lineTo(E,0);d.lineTo(E,p);d.lineTo(u,p);d.lineTo(u,A);d.lineTo(E,A);d.lineTo(E,z);d.lineTo(H,z);d.lineTo(H,A);d.lineTo(0,A);d.close();d.end()};mxCellRenderer.registerShape("cross",Ta);mxUtils.extend(Za,mxActor);Za.prototype.size=.25;Za.prototype.redrawPath=function(d,
+p,A,u,z){p=Math.min(u,z/2);A=Math.min(u-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*u);d.moveTo(0,z/2);d.lineTo(A,0);d.lineTo(u-p,0);d.quadTo(u,0,u,z/2);d.quadTo(u,z,u-p,z);d.lineTo(A,z);d.close();d.end()};mxCellRenderer.registerShape("display",Za);mxUtils.extend(Pa,mxActor);Pa.prototype.cst={RECT2:"mxgraph.basic.rect"};Pa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",
dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",
dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",
type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},
{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",
-enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Pa.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);this.strictDrawShape(d,0,0,t,z)};Pa.prototype.strictDrawShape=function(d,p,A,t,z,E){var G=E&&E.rectStyle?E.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ea=E&&E.absoluteCornerSize?E.absoluteCornerSize:mxUtils.getValue(this.style,
-"absoluteCornerSize",this.absoluteCornerSize),O=E&&E.size?E.size:Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),ta=E&&E.rectOutline?E.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=E&&E.indent?E.indent:Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=E&&E.dashed?E.dashed:mxUtils.getValue(this.style,"dashed",!1),ib=E&&E.dashPattern?E.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),cb=
+enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Pa.prototype.paintVertexShape=function(d,p,A,u,z){d.translate(p,A);this.strictDrawShape(d,0,0,u,z)};Pa.prototype.strictDrawShape=function(d,p,A,u,z,E){var H=E&&E.rectStyle?E.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ea=E&&E.absoluteCornerSize?E.absoluteCornerSize:mxUtils.getValue(this.style,
+"absoluteCornerSize",this.absoluteCornerSize),O=E&&E.size?E.size:Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),ta=E&&E.rectOutline?E.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=E&&E.indent?E.indent:Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=E&&E.dashed?E.dashed:mxUtils.getValue(this.style,"dashed",!1),ib=E&&E.dashPattern?E.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),cb=
E&&E.relIndent?E.relIndent:Math.max(0,Math.min(50,ma)),Fa=E&&E.top?E.top:mxUtils.getValue(this.style,"top",!0),La=E&&E.right?E.right:mxUtils.getValue(this.style,"right",!0),Ja=E&&E.bottom?E.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=E&&E.left?E.left:mxUtils.getValue(this.style,"left",!0),Wa=E&&E.topLeftStyle?E.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Xa=E&&E.topRightStyle?E.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ya=E&&E.bottomRightStyle?
E.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),$a=E&&E.bottomLeftStyle?E.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Hb=E&&E.fillColor?E.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");E&&E.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Ib=E&&E.strokeWidth?E.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Fb=E&&E.fillColor2?E.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Gb=E&&E.gradientColor2?
-E.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Jb=E&&E.gradientDirection2?E.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Kb=E&&E.opacity?E.opacity:mxUtils.getValue(this.style,"opacity","100"),Lb=Math.max(0,Math.min(50,O));E=Pa.prototype;d.setDashed(ab);ib&&""!=ib&&d.setDashPattern(ib);d.setStrokeWidth(Ib);O=Math.min(.5*z,.5*t,O);ea||(O=Lb*Math.min(t,z)/100);O=Math.min(O,.5*Math.min(t,z));ea||(ma=Math.min(cb*Math.min(t,z)/100));ma=Math.min(ma,
-.5*Math.min(t,z)-O);(Fa||La||Ja||Ha)&&"frame"!=ta&&(d.begin(),Fa?E.moveNW(d,p,A,t,z,G,Wa,O,Ha):d.moveTo(0,0),Fa&&E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),La&&E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),Ja&&E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),Ha&&E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Fb),ab=ea=Kb,"none"==Fb&&(ea=0),"none"==Gb&&(ab=0),d.setGradient(Fb,
-Gb,0,0,t,z,Jb,ea,ab),d.begin(),Fa?E.moveNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha):d.moveTo(ma,0),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),Ha&&Ja&&E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),Ja&&La&&E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),La&&Fa&&E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),Fa&&Ha&&E.paintNWInner(d,p,A,t,z,G,Wa,O,ma),d.fill(),"none"==Hb&&(d.begin(),E.paintFolds(d,p,A,t,z,
-G,Wa,Xa,Ya,$a,O,Fa,La,Ja,Ha),d.stroke()));Fa||La||Ja||!Ha?Fa||La||!Ja||Ha?!Fa&&!La&&Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,
-t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.lineNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):Fa||!La||Ja||Ha?!Fa&&La&&!Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSW(d,p,A,t,z,G,Wa,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha)),d.stroke(),
-d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveSW(d,p,A,t,z,G,Wa,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.lineNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke(),d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.lineSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,
-p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa&&La&&Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,
-p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.lineSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa&&La&&Ja&&Ha?"frame"!=ta?(d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,
-p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.lineNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,
-p,A,t,z,G,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa||La||Ja||Ha?Fa&&!La&&!Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),"double"==ta&&(E.moveNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,
-p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha)),d.stroke()):(d.begin(),E.moveSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke()):Fa&&!La&&Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,
-La),"double"==ta&&(E.moveNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa)),d.stroke(),d.begin(),E.moveSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke(),d.begin(),E.moveSE(d,
-p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.lineSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):Fa&&!La&&Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),"double"==ta&&(E.moveNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,
-p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,
-A,t,z,G,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):Fa&&La&&!Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa)),d.stroke()):(d.begin(),
-E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.lineSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&!Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,
-z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha)),d.stroke()):(d.begin(),E.moveSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,
-A,t,z,G,Ya,O,Ja),E.lineSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke()):Fa&&La&&Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,
-p,A,t,z,G,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa)),d.stroke()):(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.lineSWInner(d,
-p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&Ja&&Ha&&("frame"!=ta?(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,
-p,A,t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),d.close(),"double"==ta&&(E.moveSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),d.close()),d.stroke()):(d.begin(),
-E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),d.close(),E.moveSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),
-E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke())):"frame"!=ta?(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),"double"==ta&&(E.moveNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa)),d.stroke()):(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,
-p,A,t,z,G,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.lineSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),E.moveSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,
-p,A,t,z,G,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.lineSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),E.moveSW(d,p,A,t,z,G,Wa,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,
-Ha)),d.stroke()):(d.begin(),E.moveSW(d,p,A,t,z,G,Wa,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.lineNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke());d.begin();E.paintFolds(d,p,A,t,z,G,Wa,Xa,Ya,$a,O,Fa,La,Ja,Ha);d.stroke()};Pa.prototype.moveNW=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.moveTo(0,0):d.moveTo(0,ea)};Pa.prototype.moveNE=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.moveTo(t,
-0):d.moveTo(t-ea,0)};Pa.prototype.moveSE=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.moveTo(t,z):d.moveTo(t,z-ea)};Pa.prototype.moveSW=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.moveTo(0,z):d.moveTo(ea,z)};Pa.prototype.paintNW=function(d,p,A,t,z,E,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==E||"invRound"==G||"default"==G&&"invRound"==E){p=0;if("rounded"==G||"default"==G&&"rounded"==E)p=1;d.arcTo(ea,ea,0,0,p,ea,0)}else("snip"==
-G||"default"==G&&"snip"==E||"fold"==G||"default"==G&&"fold"==E)&&d.lineTo(ea,0);else d.lineTo(0,0)};Pa.prototype.paintTop=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.lineTo(t,0):d.lineTo(t-ea,0)};Pa.prototype.paintNE=function(d,p,A,t,z,E,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==E||"invRound"==G||"default"==G&&"invRound"==E){p=0;if("rounded"==G||"default"==G&&"rounded"==E)p=1;d.arcTo(ea,ea,0,0,p,t,ea)}else("snip"==G||"default"==G&&"snip"==E||"fold"==G||"default"==
-G&&"fold"==E)&&d.lineTo(t,ea);else d.lineTo(t,0)};Pa.prototype.paintRight=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.lineTo(t,z):d.lineTo(t,z-ea)};Pa.prototype.paintLeft=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.lineTo(0,0):d.lineTo(0,ea)};Pa.prototype.paintSE=function(d,p,A,t,z,E,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==E||"invRound"==G||"default"==G&&"invRound"==E){p=0;if("rounded"==G||"default"==G&&"rounded"==E)p=1;d.arcTo(ea,
-ea,0,0,p,t-ea,z)}else("snip"==G||"default"==G&&"snip"==E||"fold"==G||"default"==G&&"fold"==E)&&d.lineTo(t-ea,z);else d.lineTo(t,z)};Pa.prototype.paintBottom=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.lineTo(0,z):d.lineTo(ea,z)};Pa.prototype.paintSW=function(d,p,A,t,z,E,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==E||"invRound"==G||"default"==G&&"invRound"==E){p=0;if("rounded"==G||"default"==G&&"rounded"==E)p=1;d.arcTo(ea,ea,0,0,p,0,z-ea)}else("snip"==G||"default"==
-G&&"snip"==E||"fold"==G||"default"==G&&"fold"==E)&&d.lineTo(0,z-ea);else d.lineTo(0,z)};Pa.prototype.paintNWInner=function(d,p,A,t,z,E,G,ea,O){if("rounded"==G||"default"==G&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,O,.5*O+ea);else if("invRound"==G||"default"==G&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,O,O+ea);else if("snip"==G||"default"==G&&"snip"==E)d.lineTo(O,.5*O+ea);else if("fold"==G||"default"==G&&"fold"==E)d.lineTo(O+ea,O+ea),d.lineTo(O,O+ea)};Pa.prototype.paintTopInner=function(d,p,A,t,z,
-E,G,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(0,O):ta&&!ma?d.lineTo(O,0):ta?"square"==G||"default"==G&&"square"==E?d.lineTo(O,O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(ea+.5*O,O):d.lineTo(ea+O,O):d.lineTo(0,O):d.lineTo(0,0)};Pa.prototype.paintNEInner=function(d,p,A,t,z,E,G,ea,O){if("rounded"==G||"default"==G&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,t-ea-.5*O,O);else if("invRound"==G||"default"==G&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,t-ea-O,O);else if("snip"==
-G||"default"==G&&"snip"==E)d.lineTo(t-ea-.5*O,O);else if("fold"==G||"default"==G&&"fold"==E)d.lineTo(t-ea-O,ea+O),d.lineTo(t-ea-O,O)};Pa.prototype.paintRightInner=function(d,p,A,t,z,E,G,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(t-O,0):ta&&!ma?d.lineTo(t,O):ta?"square"==G||"default"==G&&"square"==E?d.lineTo(t-O,O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(t-O,ea+.5*O):d.lineTo(t-O,ea+O):d.lineTo(t-O,0):d.lineTo(t,0)};Pa.prototype.paintLeftInner=function(d,p,A,
-t,z,E,G,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(O,z):ta&&!ma?d.lineTo(0,z-O):ta?"square"==G||"default"==G&&"square"==E?d.lineTo(O,z-O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(O,z-ea-.5*O):d.lineTo(O,z-ea-O):d.lineTo(O,z):d.lineTo(0,z)};Pa.prototype.paintSEInner=function(d,p,A,t,z,E,G,ea,O){if("rounded"==G||"default"==G&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,t-O,z-ea-.5*O);else if("invRound"==G||"default"==G&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,t-O,
-z-ea-O);else if("snip"==G||"default"==G&&"snip"==E)d.lineTo(t-O,z-ea-.5*O);else if("fold"==G||"default"==G&&"fold"==E)d.lineTo(t-ea-O,z-ea-O),d.lineTo(t-O,z-ea-O)};Pa.prototype.paintBottomInner=function(d,p,A,t,z,E,G,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(t,z-O):ta&&!ma?d.lineTo(t-O,z):"square"==G||"default"==G&&"square"==E||!ta?d.lineTo(t-O,z-O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(t-ea-.5*O,z-O):d.lineTo(t-ea-O,z-O):d.lineTo(t,z)};Pa.prototype.paintSWInner=
-function(d,p,A,t,z,E,G,ea,O,ta){if(!ta)d.lineTo(O,z);else if("square"==G||"default"==G&&"square"==E)d.lineTo(O,z-O);else if("rounded"==G||"default"==G&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,ea+.5*O,z-O);else if("invRound"==G||"default"==G&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,ea+O,z-O);else if("snip"==G||"default"==G&&"snip"==E)d.lineTo(ea+.5*O,z-O);else if("fold"==G||"default"==G&&"fold"==E)d.lineTo(O+ea,z-ea-O),d.lineTo(O+ea,z-O)};Pa.prototype.moveSWInner=function(d,p,A,t,z,E,G,ea,O,ta){ta?
-"square"==G||"default"==G&&"square"==E?d.moveTo(O,z-O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.moveTo(O,z-ea-.5*O):("invRound"==G||"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.moveTo(O,z-ea-O):d.moveTo(0,z-O)};Pa.prototype.lineSWInner=function(d,p,A,t,z,E,G,ea,O,ta){ta?"square"==G||"default"==G&&"square"==E?d.lineTo(O,z-O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(O,z-ea-.5*O):("invRound"==G||
-"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.lineTo(O,z-ea-O):d.lineTo(0,z-O)};Pa.prototype.moveSEInner=function(d,p,A,t,z,E,G,ea,O,ta){ta?"square"==G||"default"==G&&"square"==E?d.moveTo(t-O,z-O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.moveTo(t-O,z-ea-.5*O):("invRound"==G||"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.moveTo(t-O,z-ea-O):d.moveTo(t-O,z)};Pa.prototype.lineSEInner=function(d,p,A,t,z,E,G,ea,O,ta){ta?"square"==
-G||"default"==G&&"square"==E?d.lineTo(t-O,z-O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(t-O,z-ea-.5*O):("invRound"==G||"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.lineTo(t-O,z-ea-O):d.lineTo(t-O,z)};Pa.prototype.moveNEInner=function(d,p,A,t,z,E,G,ea,O,ta){ta?"square"==G||"default"==G&&"square"==E||ta?d.moveTo(t-O,O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.moveTo(t-O,ea+.5*O):("invRound"==G||
-"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.moveTo(t-O,ea+O):d.moveTo(t,O)};Pa.prototype.lineNEInner=function(d,p,A,t,z,E,G,ea,O,ta){ta?"square"==G||"default"==G&&"square"==E||ta?d.lineTo(t-O,O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(t-O,ea+.5*O):("invRound"==G||"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.lineTo(t-O,ea+O):d.lineTo(t,O)};Pa.prototype.moveNWInner=function(d,p,A,t,z,E,G,ea,O,ta,ma){ta||ma?
-!ta&&ma?d.moveTo(O,0):ta&&!ma?d.moveTo(0,O):"square"==G||"default"==G&&"square"==E?d.moveTo(O,O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.moveTo(O,ea+.5*O):("invRound"==G||"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.moveTo(O,ea+O):d.moveTo(0,0)};Pa.prototype.lineNWInner=function(d,p,A,t,z,E,G,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(O,0):ta&&!ma?d.lineTo(0,O):"square"==G||"default"==G&&"square"==E?d.lineTo(O,O):"rounded"==G||"default"==G&&"rounded"==
-E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(O,ea+.5*O):("invRound"==G||"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.lineTo(O,ea+O):d.lineTo(0,0)};Pa.prototype.paintFolds=function(d,p,A,t,z,E,G,ea,O,ta,ma,ab,ib,cb,Fa){if("fold"==E||"fold"==G||"fold"==ea||"fold"==O||"fold"==ta)("fold"==G||"default"==G&&"fold"==E)&&ab&&Fa&&(d.moveTo(0,ma),d.lineTo(ma,ma),d.lineTo(ma,0)),("fold"==ea||"default"==ea&&"fold"==E)&&ab&&ib&&(d.moveTo(t-ma,0),d.lineTo(t-ma,ma),d.lineTo(t,ma)),("fold"==
-O||"default"==O&&"fold"==E)&&cb&&ib&&(d.moveTo(t-ma,z),d.lineTo(t-ma,z-ma),d.lineTo(t,z-ma)),("fold"==ta||"default"==ta&&"fold"==E)&&cb&&Fa&&(d.moveTo(0,z-ma),d.lineTo(ma,z-ma),d.lineTo(ma,z))};mxCellRenderer.registerShape(Pa.prototype.cst.RECT2,Pa);Pa.prototype.constraints=null;mxUtils.extend(Ra,mxConnector);Ra.prototype.origPaintEdgeShape=Ra.prototype.paintEdgeShape;Ra.prototype.paintEdgeShape=function(d,p){for(var A=[],t=0;t<p.length;t++)A.push(mxUtils.clone(p[t]));t=d.state.dashed;var z=d.state.fixDash;
-Ra.prototype.origPaintEdgeShape.apply(this,[d,A]);3<=d.state.strokeWidth&&(A=mxUtils.getValue(this.style,"fillColor",null),null!=A&&(d.setStrokeColor(A),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(t,z),Ra.prototype.origPaintEdgeShape.apply(this,[d,p])))};mxCellRenderer.registerShape("filledEdge",Ra);mxUtils.extend(fb,mxConnector);fb.prototype.defaultWidth=4;fb.prototype.getEdgeWidth=function(){return Math.max(0,mxUtils.getNumber(this.style,"width",this.defaultWidth))};fb.prototype.getFlowAnimationPath=
-function(){return mxShape.prototype.getFlowAnimationPath.call(this,2)};fb.prototype.origPaintEdgeShape=fb.prototype.paintEdgeShape;fb.prototype.paintEdgeShape=function(d,p){for(var A=[],t=0;t<p.length;t++)A.push(mxUtils.clone(p[t]));t=d.state.dashed;var z=d.state.fixDash,E=this.getEdgeWidth();d.setStrokeWidth(E+2*this.strokewidth);d.setDashed(!1);fb.prototype.origPaintEdgeShape.apply(this,[d,A]);A=mxUtils.getValue(this.style,"fillColor",null);null!=A&&(d.setStrokeWidth(E),d.setStrokeColor(A),d.setDashed(t,
-z),fb.prototype.origPaintEdgeShape.apply(this,[d,p]))};mxCellRenderer.registerShape("pipe",fb);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var p=this.editorUi.getSelectionState(),A=d.apply(this,arguments);"umlFrame"==p.style.shape&&A.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return A}}();mxMarker.addMarker("dash",function(d,p,A,t,z,E,G,ea,O,ta){var ma=
-z*(G+O+1),ab=E*(G+O+1);return function(){d.begin();d.moveTo(t.x-ma/2-ab/2,t.y-ab/2+ma/2);d.lineTo(t.x+ab/2-3*ma/2,t.y-3*ab/2-ma/2);d.stroke()}});mxMarker.addMarker("box",function(d,p,A,t,z,E,G,ea,O,ta){var ma=z*(G+O+1),ab=E*(G+O+1),ib=t.x+ma/2,cb=t.y+ab/2;t.x-=ma;t.y-=ab;return function(){d.begin();d.moveTo(ib-ma/2-ab/2,cb-ab/2+ma/2);d.lineTo(ib-ma/2+ab/2,cb-ab/2-ma/2);d.lineTo(ib+ab/2-3*ma/2,cb-3*ab/2-ma/2);d.lineTo(ib-ab/2-3*ma/2,cb-3*ab/2+ma/2);d.close();ta?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",
-function(d,p,A,t,z,E,G,ea,O,ta){var ma=z*(G+O+1),ab=E*(G+O+1);return function(){d.begin();d.moveTo(t.x-ma/2-ab/2,t.y-ab/2+ma/2);d.lineTo(t.x+ab/2-3*ma/2,t.y-3*ab/2-ma/2);d.moveTo(t.x-ma/2+ab/2,t.y-ab/2-ma/2);d.lineTo(t.x-ab/2-3*ma/2,t.y-3*ab/2+ma/2);d.stroke()}});mxMarker.addMarker("circle",eb);mxMarker.addMarker("circlePlus",function(d,p,A,t,z,E,G,ea,O,ta){var ma=t.clone(),ab=eb.apply(this,arguments),ib=z*(G+2*O),cb=E*(G+2*O);return function(){ab.apply(this,arguments);d.begin();d.moveTo(ma.x-z*O,
-ma.y-E*O);d.lineTo(ma.x-2*ib+z*O,ma.y-2*cb+E*O);d.moveTo(ma.x-ib-cb+E*O,ma.y-cb+ib-z*O);d.lineTo(ma.x+cb-ib-E*O,ma.y-cb-ib+z*O);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,p,A,t,z,E,G,ea,O,ta){var ma=z*(G+O+1),ab=E*(G+O+1),ib=t.clone();t.x-=ma;t.y-=ab;return function(){d.begin();d.moveTo(ib.x-ab,ib.y+ma);d.quadTo(t.x-ab,t.y+ma,t.x,t.y);d.quadTo(t.x+ab,t.y-ma,ib.x+ab,ib.y-ma);d.stroke()}});mxMarker.addMarker("async",function(d,p,A,t,z,E,G,ea,O,ta){p=z*O*1.118;A=E*O*1.118;z*=G+O;E*=G+O;
-var ma=t.clone();ma.x-=p;ma.y-=A;t.x+=-z-p;t.y+=-E-A;return function(){d.begin();d.moveTo(ma.x,ma.y);ea?d.lineTo(ma.x-z-E/2,ma.y-E+z/2):d.lineTo(ma.x+E/2-z,ma.y-E-z/2);d.lineTo(ma.x-z,ma.y-E);d.close();ta?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(p,A,t,z,E,G,ea,O,ta,ma){E*=ea+ta;G*=ea+ta;var ab=z.clone();return function(){p.begin();p.moveTo(ab.x,ab.y);O?p.lineTo(ab.x-E-G/d,ab.y-G+E/d):p.lineTo(ab.x+G/d-E,ab.y-G-E/d);p.stroke()}}}(2));
-if("undefined"!==typeof mxVertexHandler){var hb=function(d,p,A){return nb(d,["width"],p,function(t,z,E,G,ea){ea=d.shape.getEdgeWidth()*d.view.scale+A;return new mxPoint(G.x+z*t/4+E*ea/2,G.y+E*t/4-z*ea/2)},function(t,z,E,G,ea,O){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));d.style.width=Math.round(2*t)/d.view.scale-A})},nb=function(d,p,A,t,z){return kb(d,p,function(E){var G=d.absolutePoints;if(null!=G&&0<G.length){var ea=G.length-1;E=d.view.translate;var O=d.view.scale,ta=A?G[0]:G[ea];
-G=A?G[1]:G[ea-1];ea=G.x-ta.x;var ma=G.y-ta.y,ab=Math.sqrt(ea*ea+ma*ma);ta=t.call(this,ab,ea/ab,ma/ab,ta,G);return new mxPoint(ta.x/O-E.x,ta.y/O-E.y)}return null},function(E,G,ea){var O=d.absolutePoints,ta=O.length-1;E=d.view.translate;var ma=d.view.scale,ab=A?O[0]:O[ta];O=A?O[1]:O[ta-1];ta=O.x-ab.x;var ib=O.y-ab.y,cb=Math.sqrt(ta*ta+ib*ib);G.x=(G.x+E.x)*ma;G.y=(G.y+E.y)*ma;z.call(this,cb,ta/cb,ib/cb,ab,O,G,ea)})},ob=function(d,p){return function(A){return[nb(A,["startWidth"],!0,function(t,z,E,G,ea){ea=
-mxUtils.getNumber(A.style,"startWidth",d)*A.view.scale+p;return new mxPoint(G.x+z*t/4+E*ea/2,G.y+E*t/4-z*ea/2)},function(t,z,E,G,ea,O){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));A.style.startWidth=Math.round(2*t)/A.view.scale-p})]}},rb=function(d){return function(p){return[kb(p,["arrowWidth","arrowSize"],function(A){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Qa.prototype.arrowWidth))),z=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",
-Qa.prototype.arrowSize)));return new mxPoint(A.x+(1-z)*A.width,A.y+(1-t)*A.height/2)},function(A,t){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(A.y+A.height/2-t.y)/A.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(A.x+A.width-t.x)/A.width))})]}},vb=function(d){return function(p){return[kb(p,["size"],function(A){var t=Math.max(0,Math.min(.5*A.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(A.x,A.y+t)},function(A,t){this.state.style.size=
-Math.max(0,t.y-A.y)},!0)]}},Ab=function(d,p,A){return function(t){var z=[kb(t,["size"],function(E){var G=Math.max(0,Math.min(E.width,Math.min(E.height,parseFloat(mxUtils.getValue(this.state.style,"size",p)))))*d;return new mxPoint(E.x+G,E.y+G)},function(E,G){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(E.width,G.x-E.x),Math.min(E.height,G.y-E.y)))/d)},!1)];A&&mxUtils.getValue(t.style,mxConstants.STYLE_ROUNDED,!1)&&z.push(wb(t));return z}},Cb=function(d,p,A,t,z){A=null!=A?A:.5;return function(E){var G=
-[kb(E,["size"],function(ea){var O=null!=z?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ta=parseFloat(mxUtils.getValue(this.state.style,"size",O?z:d));return new mxPoint(ea.x+Math.max(0,Math.min(.5*ea.width,ta*(O?1:ea.width))),ea.getCenterY())},function(ea,O,ta){ea=null!=z&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?O.x-ea.x:Math.max(0,Math.min(A,(O.x-ea.x)/ea.width));this.state.style.size=ea},!1,t)];p&&mxUtils.getValue(E.style,mxConstants.STYLE_ROUNDED,!1)&&G.push(wb(E));
-return G}},Eb=function(d,p,A){d=null!=d?d:.5;return function(t){var z=[kb(t,["size"],function(E){var G=null!=A?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ea=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",G?A:p)));return new mxPoint(E.x+Math.min(.75*E.width*d,ea*(G?.75:.75*E.width)),E.y+E.height/4)},function(E,G){E=null!=A&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?G.x-E.x:Math.max(0,Math.min(d,(G.x-E.x)/E.width*.75));this.state.style.size=E},!1,!0)];
-mxUtils.getValue(t.style,mxConstants.STYLE_ROUNDED,!1)&&z.push(wb(t));return z}},yb=function(){return function(d){var p=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p}},wb=function(d,p){return kb(d,[mxConstants.STYLE_ARCSIZE],function(A){var t=null!=p?p:A.height/8;if("1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var z=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(A.x+A.width-Math.min(A.width/
-2,z),A.y+t)}z=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(A.x+A.width-Math.min(Math.max(A.width/2,A.height/2),Math.min(A.width,A.height)*z),A.y+t)},function(A,t,z){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(A.width,2*(A.x+A.width-t.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,
-Math.max(0,100*(A.width-t.x+A.x)/Math.min(A.width,A.height))))})},kb=function(d,p,A,t,z,E,G){var ea=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);ea.execute=function(ta){for(var ma=0;ma<p.length;ma++)this.copyStyle(p[ma]);G&&G(ta)};ea.getPosition=A;ea.setPosition=t;ea.ignoreGrid=null!=z?z:!0;if(E){var O=ea.positionChanged;ea.positionChanged=function(){O.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return ea},jb={link:function(d){return[hb(d,!0,
-10),hb(d,!1,10)]},pipe:function(d){return[hb(d,!0,10),hb(d,!1,10)]},flexArrow:function(d){var p=d.view.graph.gridSize/d.view.scale,A=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(A.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(t,z,E,G,ea){t=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+
-z*(ea+d.shape.strokewidth*d.view.scale)+E*t/2,G.y+E*(ea+d.shape.strokewidth*d.view.scale)-z*t/2)},function(t,z,E,G,ea,O,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+E,G.y-z,O.x,O.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*t)/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];
-mxEvent.isAltDown(ta.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),A.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(t,z,E,G,ea){t=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;
-return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)+E*t/2,G.y+E*(ea+d.shape.strokewidth*d.view.scale)-z*t/2)},function(t,z,E,G,ea,O,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+E,G.y-z,O.x,O.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*t)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=
+E.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Jb=E&&E.gradientDirection2?E.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Kb=E&&E.opacity?E.opacity:mxUtils.getValue(this.style,"opacity","100"),Lb=Math.max(0,Math.min(50,O));E=Pa.prototype;d.setDashed(ab);ib&&""!=ib&&d.setDashPattern(ib);d.setStrokeWidth(Ib);O=Math.min(.5*z,.5*u,O);ea||(O=Lb*Math.min(u,z)/100);O=Math.min(O,.5*Math.min(u,z));ea||(ma=Math.min(cb*Math.min(u,z)/100));ma=Math.min(ma,
+.5*Math.min(u,z)-O);(Fa||La||Ja||Ha)&&"frame"!=ta&&(d.begin(),Fa?E.moveNW(d,p,A,u,z,H,Wa,O,Ha):d.moveTo(0,0),Fa&&E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),La&&E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),Ja&&E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),Ha&&E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Fb),ab=ea=Kb,"none"==Fb&&(ea=0),"none"==Gb&&(ab=0),d.setGradient(Fb,
+Gb,0,0,u,z,Jb,ea,ab),d.begin(),Fa?E.moveNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha):d.moveTo(ma,0),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),Ha&&Ja&&E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),Ja&&La&&E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),La&&Fa&&E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),Fa&&Ha&&E.paintNWInner(d,p,A,u,z,H,Wa,O,ma),d.fill(),"none"==Hb&&(d.begin(),E.paintFolds(d,p,A,u,z,
+H,Wa,Xa,Ya,$a,O,Fa,La,Ja,Ha),d.stroke()));Fa||La||Ja||!Ha?Fa||La||!Ja||Ha?!Fa&&!La&&Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,
+u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.lineNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):Fa||!La||Ja||Ha?!Fa&&La&&!Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSW(d,p,A,u,z,H,Wa,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha)),d.stroke(),
+d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveSW(d,p,A,u,z,H,Wa,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.lineNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke(),d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.lineSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,
+p,A,u,z,H,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa&&La&&Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,
+p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.lineSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa&&La&&Ja&&Ha?"frame"!=ta?(d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,
+p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.lineNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,
+p,A,u,z,H,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa||La||Ja||Ha?Fa&&!La&&!Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),"double"==ta&&(E.moveNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,
+p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha)),d.stroke()):(d.begin(),E.moveSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.lineNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke()):Fa&&!La&&Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,
+La),"double"==ta&&(E.moveNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa)),d.stroke(),d.begin(),E.moveSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.lineNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke(),d.begin(),E.moveSE(d,
+p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.lineSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):Fa&&!La&&Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),"double"==ta&&(E.moveNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,
+p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.lineNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,
+A,u,z,H,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):Fa&&La&&!Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa)),d.stroke()):(d.begin(),
+E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.lineSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&!Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,
+z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha)),d.stroke()):(d.begin(),E.moveSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,
+A,u,z,H,Ya,O,Ja),E.lineSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke()):Fa&&La&&Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,
+p,A,u,z,H,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa)),d.stroke()):(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.lineSWInner(d,
+p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&Ja&&Ha&&("frame"!=ta?(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,
+p,A,u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),d.close(),"double"==ta&&(E.moveSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),d.close()),d.stroke()):(d.begin(),
+E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),d.close(),E.moveSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),
+E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke())):"frame"!=ta?(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),"double"==ta&&(E.moveNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa)),d.stroke()):(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.lineNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,
+p,A,u,z,H,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.lineSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),E.moveSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,
+p,A,u,z,H,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.lineSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),E.moveSW(d,p,A,u,z,H,Wa,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,
+Ha)),d.stroke()):(d.begin(),E.moveSW(d,p,A,u,z,H,Wa,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.lineNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke());d.begin();E.paintFolds(d,p,A,u,z,H,Wa,Xa,Ya,$a,O,Fa,La,Ja,Ha);d.stroke()};Pa.prototype.moveNW=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.moveTo(0,0):d.moveTo(0,ea)};Pa.prototype.moveNE=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.moveTo(u,
+0):d.moveTo(u-ea,0)};Pa.prototype.moveSE=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.moveTo(u,z):d.moveTo(u,z-ea)};Pa.prototype.moveSW=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.moveTo(0,z):d.moveTo(ea,z)};Pa.prototype.paintNW=function(d,p,A,u,z,E,H,ea,O){if(O)if("rounded"==H||"default"==H&&"rounded"==E||"invRound"==H||"default"==H&&"invRound"==E){p=0;if("rounded"==H||"default"==H&&"rounded"==E)p=1;d.arcTo(ea,ea,0,0,p,ea,0)}else("snip"==
+H||"default"==H&&"snip"==E||"fold"==H||"default"==H&&"fold"==E)&&d.lineTo(ea,0);else d.lineTo(0,0)};Pa.prototype.paintTop=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.lineTo(u,0):d.lineTo(u-ea,0)};Pa.prototype.paintNE=function(d,p,A,u,z,E,H,ea,O){if(O)if("rounded"==H||"default"==H&&"rounded"==E||"invRound"==H||"default"==H&&"invRound"==E){p=0;if("rounded"==H||"default"==H&&"rounded"==E)p=1;d.arcTo(ea,ea,0,0,p,u,ea)}else("snip"==H||"default"==H&&"snip"==E||"fold"==H||"default"==
+H&&"fold"==E)&&d.lineTo(u,ea);else d.lineTo(u,0)};Pa.prototype.paintRight=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.lineTo(u,z):d.lineTo(u,z-ea)};Pa.prototype.paintLeft=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.lineTo(0,0):d.lineTo(0,ea)};Pa.prototype.paintSE=function(d,p,A,u,z,E,H,ea,O){if(O)if("rounded"==H||"default"==H&&"rounded"==E||"invRound"==H||"default"==H&&"invRound"==E){p=0;if("rounded"==H||"default"==H&&"rounded"==E)p=1;d.arcTo(ea,
+ea,0,0,p,u-ea,z)}else("snip"==H||"default"==H&&"snip"==E||"fold"==H||"default"==H&&"fold"==E)&&d.lineTo(u-ea,z);else d.lineTo(u,z)};Pa.prototype.paintBottom=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.lineTo(0,z):d.lineTo(ea,z)};Pa.prototype.paintSW=function(d,p,A,u,z,E,H,ea,O){if(O)if("rounded"==H||"default"==H&&"rounded"==E||"invRound"==H||"default"==H&&"invRound"==E){p=0;if("rounded"==H||"default"==H&&"rounded"==E)p=1;d.arcTo(ea,ea,0,0,p,0,z-ea)}else("snip"==H||"default"==
+H&&"snip"==E||"fold"==H||"default"==H&&"fold"==E)&&d.lineTo(0,z-ea);else d.lineTo(0,z)};Pa.prototype.paintNWInner=function(d,p,A,u,z,E,H,ea,O){if("rounded"==H||"default"==H&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,O,.5*O+ea);else if("invRound"==H||"default"==H&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,O,O+ea);else if("snip"==H||"default"==H&&"snip"==E)d.lineTo(O,.5*O+ea);else if("fold"==H||"default"==H&&"fold"==E)d.lineTo(O+ea,O+ea),d.lineTo(O,O+ea)};Pa.prototype.paintTopInner=function(d,p,A,u,z,
+E,H,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(0,O):ta&&!ma?d.lineTo(O,0):ta?"square"==H||"default"==H&&"square"==E?d.lineTo(O,O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(ea+.5*O,O):d.lineTo(ea+O,O):d.lineTo(0,O):d.lineTo(0,0)};Pa.prototype.paintNEInner=function(d,p,A,u,z,E,H,ea,O){if("rounded"==H||"default"==H&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,u-ea-.5*O,O);else if("invRound"==H||"default"==H&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,u-ea-O,O);else if("snip"==
+H||"default"==H&&"snip"==E)d.lineTo(u-ea-.5*O,O);else if("fold"==H||"default"==H&&"fold"==E)d.lineTo(u-ea-O,ea+O),d.lineTo(u-ea-O,O)};Pa.prototype.paintRightInner=function(d,p,A,u,z,E,H,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(u-O,0):ta&&!ma?d.lineTo(u,O):ta?"square"==H||"default"==H&&"square"==E?d.lineTo(u-O,O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(u-O,ea+.5*O):d.lineTo(u-O,ea+O):d.lineTo(u-O,0):d.lineTo(u,0)};Pa.prototype.paintLeftInner=function(d,p,A,
+u,z,E,H,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(O,z):ta&&!ma?d.lineTo(0,z-O):ta?"square"==H||"default"==H&&"square"==E?d.lineTo(O,z-O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(O,z-ea-.5*O):d.lineTo(O,z-ea-O):d.lineTo(O,z):d.lineTo(0,z)};Pa.prototype.paintSEInner=function(d,p,A,u,z,E,H,ea,O){if("rounded"==H||"default"==H&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,u-O,z-ea-.5*O);else if("invRound"==H||"default"==H&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,u-O,
+z-ea-O);else if("snip"==H||"default"==H&&"snip"==E)d.lineTo(u-O,z-ea-.5*O);else if("fold"==H||"default"==H&&"fold"==E)d.lineTo(u-ea-O,z-ea-O),d.lineTo(u-O,z-ea-O)};Pa.prototype.paintBottomInner=function(d,p,A,u,z,E,H,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(u,z-O):ta&&!ma?d.lineTo(u-O,z):"square"==H||"default"==H&&"square"==E||!ta?d.lineTo(u-O,z-O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(u-ea-.5*O,z-O):d.lineTo(u-ea-O,z-O):d.lineTo(u,z)};Pa.prototype.paintSWInner=
+function(d,p,A,u,z,E,H,ea,O,ta){if(!ta)d.lineTo(O,z);else if("square"==H||"default"==H&&"square"==E)d.lineTo(O,z-O);else if("rounded"==H||"default"==H&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,ea+.5*O,z-O);else if("invRound"==H||"default"==H&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,ea+O,z-O);else if("snip"==H||"default"==H&&"snip"==E)d.lineTo(ea+.5*O,z-O);else if("fold"==H||"default"==H&&"fold"==E)d.lineTo(O+ea,z-ea-O),d.lineTo(O+ea,z-O)};Pa.prototype.moveSWInner=function(d,p,A,u,z,E,H,ea,O,ta){ta?
+"square"==H||"default"==H&&"square"==E?d.moveTo(O,z-O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.moveTo(O,z-ea-.5*O):("invRound"==H||"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.moveTo(O,z-ea-O):d.moveTo(0,z-O)};Pa.prototype.lineSWInner=function(d,p,A,u,z,E,H,ea,O,ta){ta?"square"==H||"default"==H&&"square"==E?d.lineTo(O,z-O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(O,z-ea-.5*O):("invRound"==H||
+"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.lineTo(O,z-ea-O):d.lineTo(0,z-O)};Pa.prototype.moveSEInner=function(d,p,A,u,z,E,H,ea,O,ta){ta?"square"==H||"default"==H&&"square"==E?d.moveTo(u-O,z-O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.moveTo(u-O,z-ea-.5*O):("invRound"==H||"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.moveTo(u-O,z-ea-O):d.moveTo(u-O,z)};Pa.prototype.lineSEInner=function(d,p,A,u,z,E,H,ea,O,ta){ta?"square"==
+H||"default"==H&&"square"==E?d.lineTo(u-O,z-O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(u-O,z-ea-.5*O):("invRound"==H||"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.lineTo(u-O,z-ea-O):d.lineTo(u-O,z)};Pa.prototype.moveNEInner=function(d,p,A,u,z,E,H,ea,O,ta){ta?"square"==H||"default"==H&&"square"==E||ta?d.moveTo(u-O,O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.moveTo(u-O,ea+.5*O):("invRound"==H||
+"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.moveTo(u-O,ea+O):d.moveTo(u,O)};Pa.prototype.lineNEInner=function(d,p,A,u,z,E,H,ea,O,ta){ta?"square"==H||"default"==H&&"square"==E||ta?d.lineTo(u-O,O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(u-O,ea+.5*O):("invRound"==H||"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.lineTo(u-O,ea+O):d.lineTo(u,O)};Pa.prototype.moveNWInner=function(d,p,A,u,z,E,H,ea,O,ta,ma){ta||ma?
+!ta&&ma?d.moveTo(O,0):ta&&!ma?d.moveTo(0,O):"square"==H||"default"==H&&"square"==E?d.moveTo(O,O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.moveTo(O,ea+.5*O):("invRound"==H||"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.moveTo(O,ea+O):d.moveTo(0,0)};Pa.prototype.lineNWInner=function(d,p,A,u,z,E,H,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(O,0):ta&&!ma?d.lineTo(0,O):"square"==H||"default"==H&&"square"==E?d.lineTo(O,O):"rounded"==H||"default"==H&&"rounded"==
+E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(O,ea+.5*O):("invRound"==H||"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.lineTo(O,ea+O):d.lineTo(0,0)};Pa.prototype.paintFolds=function(d,p,A,u,z,E,H,ea,O,ta,ma,ab,ib,cb,Fa){if("fold"==E||"fold"==H||"fold"==ea||"fold"==O||"fold"==ta)("fold"==H||"default"==H&&"fold"==E)&&ab&&Fa&&(d.moveTo(0,ma),d.lineTo(ma,ma),d.lineTo(ma,0)),("fold"==ea||"default"==ea&&"fold"==E)&&ab&&ib&&(d.moveTo(u-ma,0),d.lineTo(u-ma,ma),d.lineTo(u,ma)),("fold"==
+O||"default"==O&&"fold"==E)&&cb&&ib&&(d.moveTo(u-ma,z),d.lineTo(u-ma,z-ma),d.lineTo(u,z-ma)),("fold"==ta||"default"==ta&&"fold"==E)&&cb&&Fa&&(d.moveTo(0,z-ma),d.lineTo(ma,z-ma),d.lineTo(ma,z))};mxCellRenderer.registerShape(Pa.prototype.cst.RECT2,Pa);Pa.prototype.constraints=null;mxUtils.extend(Ra,mxConnector);Ra.prototype.origPaintEdgeShape=Ra.prototype.paintEdgeShape;Ra.prototype.paintEdgeShape=function(d,p){for(var A=[],u=0;u<p.length;u++)A.push(mxUtils.clone(p[u]));u=d.state.dashed;var z=d.state.fixDash;
+Ra.prototype.origPaintEdgeShape.apply(this,[d,A]);3<=d.state.strokeWidth&&(A=mxUtils.getValue(this.style,"fillColor",null),null!=A&&(d.setStrokeColor(A),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(u,z),Ra.prototype.origPaintEdgeShape.apply(this,[d,p])))};mxCellRenderer.registerShape("filledEdge",Ra);mxUtils.extend(fb,mxConnector);fb.prototype.defaultWidth=4;fb.prototype.getEdgeWidth=function(){return Math.max(0,mxUtils.getNumber(this.style,"width",this.defaultWidth))};fb.prototype.getFlowAnimationPath=
+function(){return mxShape.prototype.getFlowAnimationPath.call(this,2)};fb.prototype.origPaintEdgeShape=fb.prototype.paintEdgeShape;fb.prototype.paintEdgeShape=function(d,p){for(var A=[],u=0;u<p.length;u++)A.push(mxUtils.clone(p[u]));u=d.state.dashed;var z=d.state.fixDash,E=this.getEdgeWidth();d.setStrokeWidth(E+2*this.strokewidth);d.setDashed(!1);fb.prototype.origPaintEdgeShape.apply(this,[d,A]);A=mxUtils.getValue(this.style,"fillColor",null);null!=A&&(d.setStrokeWidth(E),d.setStrokeColor(A),d.setDashed(u,
+z),fb.prototype.origPaintEdgeShape.apply(this,[d,p]))};mxCellRenderer.registerShape("pipe",fb);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var p=this.editorUi.getSelectionState(),A=d.apply(this,arguments);"umlFrame"==p.style.shape&&A.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return A}}();mxMarker.addMarker("dash",function(d,p,A,u,z,E,H,ea,O,ta){var ma=
+z*(H+O+1),ab=E*(H+O+1);return function(){d.begin();d.moveTo(u.x-ma/2-ab/2,u.y-ab/2+ma/2);d.lineTo(u.x+ab/2-3*ma/2,u.y-3*ab/2-ma/2);d.stroke()}});mxMarker.addMarker("box",function(d,p,A,u,z,E,H,ea,O,ta){var ma=z*(H+O+1),ab=E*(H+O+1),ib=u.x+ma/2,cb=u.y+ab/2;u.x-=ma;u.y-=ab;return function(){d.begin();d.moveTo(ib-ma/2-ab/2,cb-ab/2+ma/2);d.lineTo(ib-ma/2+ab/2,cb-ab/2-ma/2);d.lineTo(ib+ab/2-3*ma/2,cb-3*ab/2-ma/2);d.lineTo(ib-ab/2-3*ma/2,cb-3*ab/2+ma/2);d.close();ta?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",
+function(d,p,A,u,z,E,H,ea,O,ta){var ma=z*(H+O+1),ab=E*(H+O+1);return function(){d.begin();d.moveTo(u.x-ma/2-ab/2,u.y-ab/2+ma/2);d.lineTo(u.x+ab/2-3*ma/2,u.y-3*ab/2-ma/2);d.moveTo(u.x-ma/2+ab/2,u.y-ab/2-ma/2);d.lineTo(u.x-ab/2-3*ma/2,u.y-3*ab/2+ma/2);d.stroke()}});mxMarker.addMarker("circle",eb);mxMarker.addMarker("circlePlus",function(d,p,A,u,z,E,H,ea,O,ta){var ma=u.clone(),ab=eb.apply(this,arguments),ib=z*(H+2*O),cb=E*(H+2*O);return function(){ab.apply(this,arguments);d.begin();d.moveTo(ma.x-z*O,
+ma.y-E*O);d.lineTo(ma.x-2*ib+z*O,ma.y-2*cb+E*O);d.moveTo(ma.x-ib-cb+E*O,ma.y-cb+ib-z*O);d.lineTo(ma.x+cb-ib-E*O,ma.y-cb-ib+z*O);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,p,A,u,z,E,H,ea,O,ta){var ma=z*(H+O+1),ab=E*(H+O+1),ib=u.clone();u.x-=ma;u.y-=ab;return function(){d.begin();d.moveTo(ib.x-ab,ib.y+ma);d.quadTo(u.x-ab,u.y+ma,u.x,u.y);d.quadTo(u.x+ab,u.y-ma,ib.x+ab,ib.y-ma);d.stroke()}});mxMarker.addMarker("async",function(d,p,A,u,z,E,H,ea,O,ta){p=z*O*1.118;A=E*O*1.118;z*=H+O;E*=H+O;
+var ma=u.clone();ma.x-=p;ma.y-=A;u.x+=-z-p;u.y+=-E-A;return function(){d.begin();d.moveTo(ma.x,ma.y);ea?d.lineTo(ma.x-z-E/2,ma.y-E+z/2):d.lineTo(ma.x+E/2-z,ma.y-E-z/2);d.lineTo(ma.x-z,ma.y-E);d.close();ta?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(p,A,u,z,E,H,ea,O,ta,ma){E*=ea+ta;H*=ea+ta;var ab=z.clone();return function(){p.begin();p.moveTo(ab.x,ab.y);O?p.lineTo(ab.x-E-H/d,ab.y-H+E/d):p.lineTo(ab.x+H/d-E,ab.y-H-E/d);p.stroke()}}}(2));
+if("undefined"!==typeof mxVertexHandler){var hb=function(d,p,A){return nb(d,["width"],p,function(u,z,E,H,ea){ea=d.shape.getEdgeWidth()*d.view.scale+A;return new mxPoint(H.x+z*u/4+E*ea/2,H.y+E*u/4-z*ea/2)},function(u,z,E,H,ea,O){u=Math.sqrt(mxUtils.ptSegDistSq(H.x,H.y,ea.x,ea.y,O.x,O.y));d.style.width=Math.round(2*u)/d.view.scale-A})},nb=function(d,p,A,u,z){return kb(d,p,function(E){var H=d.absolutePoints;if(null!=H&&0<H.length){var ea=H.length-1;E=d.view.translate;var O=d.view.scale,ta=A?H[0]:H[ea];
+H=A?H[1]:H[ea-1];ea=H.x-ta.x;var ma=H.y-ta.y,ab=Math.sqrt(ea*ea+ma*ma);ta=u.call(this,ab,ea/ab,ma/ab,ta,H);return new mxPoint(ta.x/O-E.x,ta.y/O-E.y)}return null},function(E,H,ea){var O=d.absolutePoints,ta=O.length-1;E=d.view.translate;var ma=d.view.scale,ab=A?O[0]:O[ta];O=A?O[1]:O[ta-1];ta=O.x-ab.x;var ib=O.y-ab.y,cb=Math.sqrt(ta*ta+ib*ib);H.x=(H.x+E.x)*ma;H.y=(H.y+E.y)*ma;z.call(this,cb,ta/cb,ib/cb,ab,O,H,ea)})},ob=function(d,p){return function(A){return[nb(A,["startWidth"],!0,function(u,z,E,H,ea){ea=
+mxUtils.getNumber(A.style,"startWidth",d)*A.view.scale+p;return new mxPoint(H.x+z*u/4+E*ea/2,H.y+E*u/4-z*ea/2)},function(u,z,E,H,ea,O){u=Math.sqrt(mxUtils.ptSegDistSq(H.x,H.y,ea.x,ea.y,O.x,O.y));A.style.startWidth=Math.round(2*u)/A.view.scale-p})]}},rb=function(d){return function(p){return[kb(p,["arrowWidth","arrowSize"],function(A){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Qa.prototype.arrowWidth))),z=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",
+Qa.prototype.arrowSize)));return new mxPoint(A.x+(1-z)*A.width,A.y+(1-u)*A.height/2)},function(A,u){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(A.y+A.height/2-u.y)/A.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(A.x+A.width-u.x)/A.width))})]}},vb=function(d){return function(p){return[kb(p,["size"],function(A){var u=Math.max(0,Math.min(.5*A.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(A.x,A.y+u)},function(A,u){this.state.style.size=
+Math.max(0,u.y-A.y)},!0)]}},Ab=function(d,p,A){return function(u){var z=[kb(u,["size"],function(E){var H=Math.max(0,Math.min(E.width,Math.min(E.height,parseFloat(mxUtils.getValue(this.state.style,"size",p)))))*d;return new mxPoint(E.x+H,E.y+H)},function(E,H){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(E.width,H.x-E.x),Math.min(E.height,H.y-E.y)))/d)},!1)];A&&mxUtils.getValue(u.style,mxConstants.STYLE_ROUNDED,!1)&&z.push(wb(u));return z}},Cb=function(d,p,A,u,z){A=null!=A?A:.5;return function(E){var H=
+[kb(E,["size"],function(ea){var O=null!=z?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ta=parseFloat(mxUtils.getValue(this.state.style,"size",O?z:d));return new mxPoint(ea.x+Math.max(0,Math.min(.5*ea.width,ta*(O?1:ea.width))),ea.getCenterY())},function(ea,O,ta){ea=null!=z&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?O.x-ea.x:Math.max(0,Math.min(A,(O.x-ea.x)/ea.width));this.state.style.size=ea},!1,u)];p&&mxUtils.getValue(E.style,mxConstants.STYLE_ROUNDED,!1)&&H.push(wb(E));
+return H}},Eb=function(d,p,A){d=null!=d?d:.5;return function(u){var z=[kb(u,["size"],function(E){var H=null!=A?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ea=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",H?A:p)));return new mxPoint(E.x+Math.min(.75*E.width*d,ea*(H?.75:.75*E.width)),E.y+E.height/4)},function(E,H){E=null!=A&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?H.x-E.x:Math.max(0,Math.min(d,(H.x-E.x)/E.width*.75));this.state.style.size=E},!1,!0)];
+mxUtils.getValue(u.style,mxConstants.STYLE_ROUNDED,!1)&&z.push(wb(u));return z}},yb=function(){return function(d){var p=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p}},wb=function(d,p){return kb(d,[mxConstants.STYLE_ARCSIZE],function(A){var u=null!=p?p:A.height/8;if("1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var z=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(A.x+A.width-Math.min(A.width/
+2,z),A.y+u)}z=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(A.x+A.width-Math.min(Math.max(A.width/2,A.height/2),Math.min(A.width,A.height)*z),A.y+u)},function(A,u,z){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(A.width,2*(A.x+A.width-u.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,
+Math.max(0,100*(A.width-u.x+A.x)/Math.min(A.width,A.height))))})},kb=function(d,p,A,u,z,E,H){var ea=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);ea.execute=function(ta){for(var ma=0;ma<p.length;ma++)this.copyStyle(p[ma]);H&&H(ta)};ea.getPosition=A;ea.setPosition=u;ea.ignoreGrid=null!=z?z:!0;if(E){var O=ea.positionChanged;ea.positionChanged=function(){O.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return ea},jb={link:function(d){return[hb(d,!0,
+10),hb(d,!1,10)]},pipe:function(d){return[hb(d,!0,10),hb(d,!1,10)]},flexArrow:function(d){var p=d.view.graph.gridSize/d.view.scale,A=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(A.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(u,z,E,H,ea){u=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(H.x+
+z*(ea+d.shape.strokewidth*d.view.scale)+E*u/2,H.y+E*(ea+d.shape.strokewidth*d.view.scale)-z*u/2)},function(u,z,E,H,ea,O,ta){u=Math.sqrt(mxUtils.ptSegDistSq(H.x,H.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(H.x,H.y,H.x+E,H.y-z,O.x,O.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*u)/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];
+mxEvent.isAltDown(ta.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),A.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(u,z,E,H,ea){u=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;
+return new mxPoint(H.x+z*(ea+d.shape.strokewidth*d.view.scale)+E*u/2,H.y+E*(ea+d.shape.strokewidth*d.view.scale)-z*u/2)},function(u,z,E,H,ea,O,ta){u=Math.sqrt(mxUtils.ptSegDistSq(H.x,H.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(H.x,H.y,H.x+E,H.y-z,O.x,O.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*u)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=
d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=d.style.startWidth;mxEvent.isAltDown(ta.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<p&&(d.style.startWidth=d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(A.push(nb(d,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(t,z,E,G,ea){t=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)-E*t/2,G.y+E*(ea+d.shape.strokewidth*d.view.scale)+z*t/2)},function(t,z,E,G,ea,O,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+E,G.y-z,O.x,O.y);
-d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*t)/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(ta.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),
-A.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(t,z,E,G,ea){t=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)-E*t/2,G.y+E*(ea+d.shape.strokewidth*d.view.scale)+z*t/2)},function(t,z,E,G,ea,O,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,
-G.y,G.x+E,G.y-z,O.x,O.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*t)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(ta.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<
-p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<p&&(d.style.endWidth=d.style.startWidth))})));return A},swimlane:function(d){var p=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var A=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));p.push(wb(d,A/2))}p.push(kb(d,[mxConstants.STYLE_STARTSIZE],function(t){var z=parseFloat(mxUtils.getValue(d.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(t.getCenterX(),t.y+Math.max(0,Math.min(t.height,z))):new mxPoint(t.x+Math.max(0,Math.min(t.width,z)),t.getCenterY())},function(t,z){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(t.height,z.y-t.y))):Math.round(Math.max(0,Math.min(t.width,z.x-t.x)))},!1,null,function(t){var z=
-d.view.graph;if(!mxEvent.isShiftDown(t.getEvent())&&!mxEvent.isControlDown(t.getEvent())&&(z.isTableRow(d.cell)||z.isTableCell(d.cell))){t=z.getSwimlaneDirection(d.style);var E=z.model.getParent(d.cell);E=z.model.getChildCells(E,!0);for(var G=[],ea=0;ea<E.length;ea++)E[ea]!=d.cell&&z.isSwimlane(E[ea])&&z.getSwimlaneDirection(z.getCurrentCellStyle(E[ea]))==t&&G.push(E[ea]);z.setCellStyles(mxConstants.STYLE_STARTSIZE,d.style[mxConstants.STYLE_STARTSIZE],G)}}));return p},label:yb(),ext:yb(),rectangle:yb(),
-triangle:yb(),rhombus:yb(),umlLifeline:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));return new mxPoint(p.getCenterX(),p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},umlFrame:function(d){return[kb(d,["width","height"],function(p){var A=Math.max(na.prototype.corner,Math.min(p.width,mxUtils.getValue(this.state.style,"width",na.prototype.width))),
-t=Math.max(1.5*na.prototype.corner,Math.min(p.height,mxUtils.getValue(this.state.style,"height",na.prototype.height)));return new mxPoint(p.x+A,p.y+t)},function(p,A){this.state.style.width=Math.round(Math.max(na.prototype.corner,Math.min(p.width,A.x-p.x)));this.state.style.height=Math.round(Math.max(1.5*na.prototype.corner,Math.min(p.height,A.y-p.y)))},!1)]},process:function(d){var p=[kb(d,["size"],function(A){var t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),z=parseFloat(mxUtils.getValue(this.state.style,
-"size",oa.prototype.size));return t?new mxPoint(A.x+z,A.y+A.height/4):new mxPoint(A.x+A.width*z,A.y+A.height/4)},function(A,t){A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*A.width,t.x-A.x)):Math.max(0,Math.min(.5,(t.x-A.x)/A.width));this.state.style.size=A},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},cross:function(d){return[kb(d,["size"],function(p){var A=Math.min(p.width,p.height);A=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",Ta.prototype.size)))*A/2;return new mxPoint(p.getCenterX()-A,p.getCenterY()-A)},function(p,A){var t=Math.min(p.width,p.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,p.getCenterY()-A.y)/t*2,Math.max(0,p.getCenterX()-A.x)/t*2)))})]},note:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=
-Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},note2:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},manualInput:function(d){var p=[kb(d,["size"],function(A){var t=
-Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",Da.prototype.size)));return new mxPoint(A.x+A.width/4,A.y+3*t/4)},function(A,t){this.state.style.size=Math.round(Math.max(0,Math.min(A.height,4*(t.y-A.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},dataStorage:function(d){return[kb(d,["size"],function(p){var A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),t=parseFloat(mxUtils.getValue(this.state.style,"size",A?Ea.prototype.fixedSize:
-Ea.prototype.size));return new mxPoint(p.x+p.width-t*(A?1:p.width),p.getCenterY())},function(p,A){p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(p.width,p.x+p.width-A.x)):Math.max(0,Math.min(1,(p.x+p.width-A.x)/p.width));this.state.style.size=p},!1)]},callout:function(d){var p=[kb(d,["size","position"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",ka.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",ka.prototype.position)));mxUtils.getValue(this.state.style,"base",ka.prototype.base);return new mxPoint(A.x+z*A.width,A.y+A.height-t)},function(A,t){mxUtils.getValue(this.state.style,"base",ka.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(A.height,A.y+A.height-t.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),kb(d,["position2"],function(A){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ka.prototype.position2)));
-return new mxPoint(A.x+t*A.width,A.y+A.height)},function(A,t){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),kb(d,["base"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",ka.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ka.prototype.position))),E=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"base",ka.prototype.base)));return new mxPoint(A.x+Math.min(A.width,
-z*A.width+E),A.y+A.height-t)},function(A,t){var z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ka.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(A.width,t.x-A.x-z*A.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},internalStorage:function(d){var p=[kb(d,["dx","dy"],function(A){var t=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"dx",va.prototype.dx))),z=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,
-"dy",va.prototype.dy)));return new mxPoint(A.x+t,A.y+z)},function(A,t){this.state.style.dx=Math.round(Math.max(0,Math.min(A.width,t.x-A.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(A.height,t.y-A.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},module:function(d){return[kb(d,["jettyWidth","jettyHeight"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"jettyWidth",Ia.prototype.jettyWidth))),t=Math.max(0,Math.min(p.height,
-mxUtils.getValue(this.state.style,"jettyHeight",Ia.prototype.jettyHeight)));return new mxPoint(p.x+A/2,p.y+2*t)},function(p,A){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(p.height,A.y-p.y))/2)})]},corner:function(d){return[kb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Na.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,
-"dy",Na.prototype.dy)));return new mxPoint(p.x+A,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},tee:function(d){return[kb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Ua.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Ua.prototype.dy)));return new mxPoint(p.x+(p.width+A)/2,p.y+t)},function(p,
+["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(u,z,E,H,ea){u=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(H.x+z*(ea+d.shape.strokewidth*d.view.scale)-E*u/2,H.y+E*(ea+d.shape.strokewidth*d.view.scale)+z*u/2)},function(u,z,E,H,ea,O,ta){u=Math.sqrt(mxUtils.ptSegDistSq(H.x,H.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(H.x,H.y,H.x+E,H.y-z,O.x,O.y);
+d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*u)/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(ta.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),
+A.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(u,z,E,H,ea){u=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(H.x+z*(ea+d.shape.strokewidth*d.view.scale)-E*u/2,H.y+E*(ea+d.shape.strokewidth*d.view.scale)+z*u/2)},function(u,z,E,H,ea,O,ta){u=Math.sqrt(mxUtils.ptSegDistSq(H.x,H.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(H.x,
+H.y,H.x+E,H.y-z,O.x,O.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*u)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(ta.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<
+p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<p&&(d.style.endWidth=d.style.startWidth))})));return A},swimlane:function(d){var p=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var A=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));p.push(wb(d,A/2))}p.push(kb(d,[mxConstants.STYLE_STARTSIZE],function(u){var z=parseFloat(mxUtils.getValue(d.style,
+mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(u.getCenterX(),u.y+Math.max(0,Math.min(u.height,z))):new mxPoint(u.x+Math.max(0,Math.min(u.width,z)),u.getCenterY())},function(u,z){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(u.height,z.y-u.y))):Math.round(Math.max(0,Math.min(u.width,z.x-u.x)))},!1,null,function(u){var z=
+d.view.graph;if(!mxEvent.isShiftDown(u.getEvent())&&!mxEvent.isControlDown(u.getEvent())&&(z.isTableRow(d.cell)||z.isTableCell(d.cell))){u=z.getSwimlaneDirection(d.style);var E=z.model.getParent(d.cell);E=z.model.getChildCells(E,!0);for(var H=[],ea=0;ea<E.length;ea++)E[ea]!=d.cell&&z.isSwimlane(E[ea])&&z.getSwimlaneDirection(z.getCurrentCellStyle(E[ea]))==u&&H.push(E[ea]);z.setCellStyles(mxConstants.STYLE_STARTSIZE,d.style[mxConstants.STYLE_STARTSIZE],H)}}));return p},label:yb(),ext:yb(),rectangle:yb(),
+triangle:yb(),rhombus:yb(),umlLifeline:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));return new mxPoint(p.getCenterX(),p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},umlFrame:function(d){return[kb(d,["width","height"],function(p){var A=Math.max(oa.prototype.corner,Math.min(p.width,mxUtils.getValue(this.state.style,"width",oa.prototype.width))),
+u=Math.max(1.5*oa.prototype.corner,Math.min(p.height,mxUtils.getValue(this.state.style,"height",oa.prototype.height)));return new mxPoint(p.x+A,p.y+u)},function(p,A){this.state.style.width=Math.round(Math.max(oa.prototype.corner,Math.min(p.width,A.x-p.x)));this.state.style.height=Math.round(Math.max(1.5*oa.prototype.corner,Math.min(p.height,A.y-p.y)))},!1)]},process:function(d){var p=[kb(d,["size"],function(A){var u="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),z=parseFloat(mxUtils.getValue(this.state.style,
+"size",na.prototype.size));return u?new mxPoint(A.x+z,A.y+A.height/4):new mxPoint(A.x+A.width*z,A.y+A.height/4)},function(A,u){A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*A.width,u.x-A.x)):Math.max(0,Math.min(.5,(u.x-A.x)/A.width));this.state.style.size=A},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},cross:function(d){return[kb(d,["size"],function(p){var A=Math.min(p.width,p.height);A=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",Ta.prototype.size)))*A/2;return new mxPoint(p.getCenterX()-A,p.getCenterY()-A)},function(p,A){var u=Math.min(p.width,p.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,p.getCenterY()-A.y)/u*2,Math.max(0,p.getCenterX()-A.x)/u*2)))})]},note:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},note2:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},manualInput:function(d){var p=[kb(d,["size"],function(A){var u=
+Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",Da.prototype.size)));return new mxPoint(A.x+A.width/4,A.y+3*u/4)},function(A,u){this.state.style.size=Math.round(Math.max(0,Math.min(A.height,4*(u.y-A.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},dataStorage:function(d){return[kb(d,["size"],function(p){var A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",A?Ea.prototype.fixedSize:
+Ea.prototype.size));return new mxPoint(p.x+p.width-u*(A?1:p.width),p.getCenterY())},function(p,A){p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(p.width,p.x+p.width-A.x)):Math.max(0,Math.min(1,(p.x+p.width-A.x)/p.width));this.state.style.size=p},!1)]},callout:function(d){var p=[kb(d,["size","position"],function(A){var u=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",ka.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",ka.prototype.position)));mxUtils.getValue(this.state.style,"base",ka.prototype.base);return new mxPoint(A.x+z*A.width,A.y+A.height-u)},function(A,u){mxUtils.getValue(this.state.style,"base",ka.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(A.height,A.y+A.height-u.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(u.x-A.x)/A.width)))/100},!1),kb(d,["position2"],function(A){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ka.prototype.position2)));
+return new mxPoint(A.x+u*A.width,A.y+A.height)},function(A,u){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(u.x-A.x)/A.width)))/100},!1),kb(d,["base"],function(A){var u=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",ka.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ka.prototype.position))),E=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"base",ka.prototype.base)));return new mxPoint(A.x+Math.min(A.width,
+z*A.width+E),A.y+A.height-u)},function(A,u){var z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ka.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(A.width,u.x-A.x-z*A.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},internalStorage:function(d){var p=[kb(d,["dx","dy"],function(A){var u=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"dx",va.prototype.dx))),z=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,
+"dy",va.prototype.dy)));return new mxPoint(A.x+u,A.y+z)},function(A,u){this.state.style.dx=Math.round(Math.max(0,Math.min(A.width,u.x-A.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(A.height,u.y-A.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},module:function(d){return[kb(d,["jettyWidth","jettyHeight"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"jettyWidth",Ia.prototype.jettyWidth))),u=Math.max(0,Math.min(p.height,
+mxUtils.getValue(this.state.style,"jettyHeight",Ia.prototype.jettyHeight)));return new mxPoint(p.x+A/2,p.y+2*u)},function(p,A){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(p.height,A.y-p.y))/2)})]},corner:function(d){return[kb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Na.prototype.dx))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,
+"dy",Na.prototype.dy)));return new mxPoint(p.x+A,p.y+u)},function(p,A){this.state.style.dx=Math.round(Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},tee:function(d){return[kb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Ua.prototype.dx))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Ua.prototype.dy)));return new mxPoint(p.x+(p.width+A)/2,p.y+u)},function(p,
A){this.state.style.dx=Math.round(Math.max(0,2*Math.min(p.width/2,A.x-p.x-p.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},singleArrow:rb(1),doubleArrow:rb(.5),"mxgraph.arrows2.wedgeArrow":ob(20,20),"mxgraph.arrows2.wedgeArrowDashed":ob(20,20),"mxgraph.arrows2.wedgeArrowDashed2":ob(20,20),folder:function(d){return[kb(d,["tabWidth","tabHeight"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"tabWidth",x.prototype.tabWidth))),
-t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"tabHeight",x.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",x.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(A=p.width-A);return new mxPoint(p.x+A,p.y+t)},function(p,A){var t=Math.max(0,Math.min(p.width,A.x-p.x));mxUtils.getValue(this.state.style,"tabPosition",x.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=p.width-t);this.state.style.tabWidth=Math.round(t);this.state.style.tabHeight=Math.round(Math.max(0,
-Math.min(p.height,A.y-p.y)))},!1)]},document:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(p.x+3*p.width/4,p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},tape:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(p.getCenterX(),
-p.y+A*p.height/2)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(A.y-p.y)/p.height*2))},!1)]},isoCube2:function(d){return[kb(d,["isoAngle"],function(p){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",c.isoAngle))))*Math.PI/200;return new mxPoint(p.x,p.y+Math.min(p.width*Math.tan(A),.5*p.height))},function(p,A){this.state.style.isoAngle=Math.max(0,50*(A.y-p.y)/p.height)},!0)]},cylinder2:vb(g.prototype.size),cylinder3:vb(m.prototype.size),offPageConnector:function(d){return[kb(d,
-["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size))));return new mxPoint(p.getCenterX(),p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},"mxgraph.basic.rect":function(d){var p=[Graph.createHandle(d,["size"],function(A){var t=Math.max(0,Math.min(A.width/2,A.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(A.x+t,A.y+t)},function(A,
-t){this.state.style.size=Math.round(100*Math.max(0,Math.min(A.height/2,A.width/2,t.x-A.x)))/100})];d=Graph.createHandle(d,["indent"],function(A){var t=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(A.x+.75*A.width,A.y+t*A.height/200)},function(A,t){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(t.y-A.y)/A.height)))/100});p.push(d);return p},step:Cb(ba.prototype.size,!0,null,!0,ba.prototype.fixedSize),hexagon:Cb(V.prototype.size,
-!0,.5,!0,V.prototype.fixedSize),curlyBracket:Cb(ha.prototype.size,!1),display:Cb(Za.prototype.size,!1),cube:Ab(1,u.prototype.size,!1),card:Ab(.5,H.prototype.size,!0),loopLimit:Ab(.5,R.prototype.size,!0),trapezoid:Eb(.5,Z.prototype.size,Z.prototype.fixedSize),parallelogram:Eb(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=kb;Graph.handleFactory=jb;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=Bb.apply(this,arguments);
+u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"tabHeight",x.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",x.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(A=p.width-A);return new mxPoint(p.x+A,p.y+u)},function(p,A){var u=Math.max(0,Math.min(p.width,A.x-p.x));mxUtils.getValue(this.state.style,"tabPosition",x.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(u=p.width-u);this.state.style.tabWidth=Math.round(u);this.state.style.tabHeight=Math.round(Math.max(0,
+Math.min(p.height,A.y-p.y)))},!1)]},document:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(p.x+3*p.width/4,p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},tape:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(p.getCenterX(),
+p.y+A*p.height/2)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(A.y-p.y)/p.height*2))},!1)]},isoCube2:function(d){return[kb(d,["isoAngle"],function(p){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",c.isoAngle))))*Math.PI/200;return new mxPoint(p.x,p.y+Math.min(p.width*Math.tan(A),.5*p.height))},function(p,A){this.state.style.isoAngle=Math.max(0,50*(A.y-p.y)/p.height)},!0)]},cylinder2:vb(g.prototype.size),cylinder3:vb(l.prototype.size),offPageConnector:function(d){return[kb(d,
+["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size))));return new mxPoint(p.getCenterX(),p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},"mxgraph.basic.rect":function(d){var p=[Graph.createHandle(d,["size"],function(A){var u=Math.max(0,Math.min(A.width/2,A.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(A.x+u,A.y+u)},function(A,
+u){this.state.style.size=Math.round(100*Math.max(0,Math.min(A.height/2,A.width/2,u.x-A.x)))/100})];d=Graph.createHandle(d,["indent"],function(A){var u=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(A.x+.75*A.width,A.y+u*A.height/200)},function(A,u){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(u.y-A.y)/A.height)))/100});p.push(d);return p},step:Cb(aa.prototype.size,!0,null,!0,aa.prototype.fixedSize),hexagon:Cb(V.prototype.size,
+!0,.5,!0,V.prototype.fixedSize),curlyBracket:Cb(ja.prototype.size,!1),display:Cb(Za.prototype.size,!1),cube:Ab(1,t.prototype.size,!1),card:Ab(.5,G.prototype.size,!0),loopLimit:Ab(.5,R.prototype.size,!0),trapezoid:Eb(.5,Z.prototype.size,Z.prototype.fixedSize),parallelogram:Eb(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=kb;Graph.handleFactory=jb;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=Bb.apply(this,arguments);
if(this.graph.isCellRotatable(this.state.cell)){var p=this.state.style.shape;null==mxCellRenderer.defaultShapes[p]&&null==mxStencilRegistry.getStencil(p)?p=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(p=mxConstants.SHAPE_SWIMLANE);p=jb[p];null==p&&null!=this.state.shape&&this.state.shape.isRoundable()&&(p=jb[mxConstants.SHAPE_RECTANGLE]);null!=p&&(p=p(this.state),null!=p&&(d=null==d?p:d.concat(p)))}return d};mxEdgeHandler.prototype.createCustomHandles=function(){var d=
-this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=jb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var tb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);tb=mxUtils.getRotatedPoint(tb,Math.cos(zb),Math.sin(zb));var sb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(sb),Math.sin(sb));mxEdgeStyle.IsometricConnector=function(d,p,A,t,z){var E=
-d.view;t=null!=t&&0<t.length?t[0]:null;var G=d.absolutePoints,ea=G[0];G=G[G.length-1];null!=t&&(t=E.transformControlPoint(d,t));null==ea&&null!=p&&(ea=new mxPoint(p.getCenterX(),p.getCenterY()));null==G&&null!=A&&(G=new mxPoint(A.getCenterX(),A.getCenterY()));var O=tb.x,ta=tb.y,ma=xb.x,ab=xb.y,ib="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=G&&null!=ea){d=function(Fa,La,Ja){Fa-=cb.x;var Ha=La-cb.y;La=(ab*Fa-ma*Ha)/(O*ab-ta*ma);Fa=(ta*Fa-O*Ha)/(ta*ma-O*ab);ib?(Ja&&(cb=new mxPoint(cb.x+
-O*La,cb.y+ta*La),z.push(cb)),cb=new mxPoint(cb.x+ma*Fa,cb.y+ab*Fa)):(Ja&&(cb=new mxPoint(cb.x+ma*Fa,cb.y+ab*Fa),z.push(cb)),cb=new mxPoint(cb.x+O*La,cb.y+ta*La));z.push(cb)};var cb=ea;null==t&&(t=new mxPoint(ea.x+(G.x-ea.x)/2,ea.y+(G.y-ea.y)/2));d(t.x,t.y,!0);d(G.x,G.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Db=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,p){if(p==mxEdgeStyle.IsometricConnector){var A=new mxElbowEdgeHandler(d);
-A.snapToTerminals=!1;return A}return Db.apply(this,arguments)};C.prototype.constraints=[];J.prototype.getConstraints=function(d,p,A){d=[];var t=Math.tan(mxUtils.toRadians(30)),z=(.5-t)/2;t=Math.min(p,A/(.5+t));p=(p-t)/2;A=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*t,A+t*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+t,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
-null,p+t,A+.75*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*t,A+(1-z)*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.75*t));return d};c.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;t=Math.min(p*Math.tan(t),.5*A);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A-t));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));return d};ka.prototype.getConstraints=function(d,p,A){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var t=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,
+this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=jb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var tb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);tb=mxUtils.getRotatedPoint(tb,Math.cos(zb),Math.sin(zb));var sb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(sb),Math.sin(sb));mxEdgeStyle.IsometricConnector=function(d,p,A,u,z){var E=
+d.view;u=null!=u&&0<u.length?u[0]:null;var H=d.absolutePoints,ea=H[0];H=H[H.length-1];null!=u&&(u=E.transformControlPoint(d,u));null==ea&&null!=p&&(ea=new mxPoint(p.getCenterX(),p.getCenterY()));null==H&&null!=A&&(H=new mxPoint(A.getCenterX(),A.getCenterY()));var O=tb.x,ta=tb.y,ma=xb.x,ab=xb.y,ib="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=H&&null!=ea){d=function(Fa,La,Ja){Fa-=cb.x;var Ha=La-cb.y;La=(ab*Fa-ma*Ha)/(O*ab-ta*ma);Fa=(ta*Fa-O*Ha)/(ta*ma-O*ab);ib?(Ja&&(cb=new mxPoint(cb.x+
+O*La,cb.y+ta*La),z.push(cb)),cb=new mxPoint(cb.x+ma*Fa,cb.y+ab*Fa)):(Ja&&(cb=new mxPoint(cb.x+ma*Fa,cb.y+ab*Fa),z.push(cb)),cb=new mxPoint(cb.x+O*La,cb.y+ta*La));z.push(cb)};var cb=ea;null==u&&(u=new mxPoint(ea.x+(H.x-ea.x)/2,ea.y+(H.y-ea.y)/2));d(u.x,u.y,!0);d(H.x,H.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Db=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,p){if(p==mxEdgeStyle.IsometricConnector){var A=new mxElbowEdgeHandler(d);
+A.snapToTerminals=!1;return A}return Db.apply(this,arguments)};B.prototype.constraints=[];I.prototype.getConstraints=function(d,p,A){d=[];var u=Math.tan(mxUtils.toRadians(30)),z=(.5-u)/2;u=Math.min(p,A/(.5+u));p=(p-u)/2;A=(A-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.25*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*u,A+u*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+u,A+.25*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+null,p+u,A+.75*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*u,A+(1-z)*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.75*u));return d};c.prototype.getConstraints=function(d,p,A){d=[];var u=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;u=Math.min(p*Math.tan(u),.5*A);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A-u));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-u));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));return d};ka.prototype.getConstraints=function(d,p,A){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var u=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A-t)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A-t)));p>=2*t&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A-u)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A-u)));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),
new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,
0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ka.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;D.prototype.getConstraints=
-function(d,p,A){d=[];var t=Math.max(0,Math.min(p,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*t,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,.5*(A+t)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));p>=2*t&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};H.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*t,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A+t)));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
-1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));p>=2*t&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};u.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p-.5*t,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A+t)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*t,A-.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.5*(A-t)));return d};m.prototype.getConstraints=function(d,p,A){d=[];p=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,
+function(d,p,A){d=[];var u=Math.max(0,Math.min(p,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p,.5*(A+u)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};G.prototype.getConstraints=function(d,p,A){d=[];var u=Math.max(0,Math.min(p,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A+u)));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
+1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};t.prototype.getConstraints=function(d,p,A){d=[];var u=Math.max(0,Math.min(p,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A+u)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,A-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(A-u)));return d};l.prototype.getConstraints=function(d,p,A){d=[];p=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,
0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-p));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p+.5*(.5*A-p)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,p+.5*(.5*A-p)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,A-p-.5*(.5*A-p)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-p-.5*(.5*A-p)));d.push(new mxConnectionConstraint(new mxPoint(.145,
-0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-p));d.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-p));return d};x.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),z=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,
-"tabPosition",this.tabPosition)?(d.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),z))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p-t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.25*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.75*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-p));d.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-p));return d};x.prototype.getConstraints=function(d,p,A){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),z=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,
+"tabPosition",this.tabPosition)?(d.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),z))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.25*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.75*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,p,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A));d.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,
-1),!1));return d};va.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;Va.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Oa.prototype.constraints=mxRectangleShape.prototype.constraints;
-Za.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(p,A/2),z=Math.min(p-t,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p-t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Ia.prototype.getConstraints=function(d,p,A){p=parseFloat(mxUtils.getValue(d,"jettyWidth",Ia.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ia.prototype.jettyHeight));var t=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+1),!1));return d};va.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.constraints=mxRectangleShape.prototype.constraints;ha.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;Va.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Oa.prototype.constraints=mxRectangleShape.prototype.constraints;
+Za.prototype.getConstraints=function(d,p,A){d=[];var u=Math.min(p,A/2),z=Math.min(p-u,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-u,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-u),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Ia.prototype.getConstraints=function(d,p,A){p=parseFloat(mxUtils.getValue(d,"jettyWidth",Ia.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ia.prototype.jettyHeight));var u=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,p),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),
-!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,3.5*d))];A>5*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,p));A>8*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,p));A>15*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,p));return t};R.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;
+!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,3.5*d))];A>5*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,p));A>8*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,p));A>15*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,p));return u};R.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;
mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,
.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,
.5),!1)];Aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,
1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,
-1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];n.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];M.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];n.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];L.prototype.constraints=
+[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];
mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,
.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,
.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,
-.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),
-!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Ua.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),z=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*p+.25*t,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),A));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(p-t),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*p-.25*t,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*z));return d};Na.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx)))),z=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),z));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,t,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*t,A));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Qa.prototype.getConstraints=function(d,p,A){d=[];var t=A*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"arrowSize",this.arrowSize))));t=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-z),t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-z),A-t));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,A-t));return d};za.prototype.getConstraints=function(d,p,A){d=[];var t=A*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Qa.prototype.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Qa.prototype.arrowSize))));t=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,t));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p-z,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Ta.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(A,p),z=Math.max(0,Math.min(t,t*parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=(A-z)/2;var E=t+z,G=(p-z)/2;z=G+z;d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,G,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,A-.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,A));d.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A-.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+z),t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,E));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(p+z),E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*G,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*G,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,t));return d};fa.prototype.constraints=
-null;B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,
+.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),
+!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Ua.prototype.getConstraints=function(d,p,A){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),z=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*p+.25*u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),A));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(p-u),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*p-.25*u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*z));return d};Na.prototype.getConstraints=function(d,p,A){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx)))),z=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),z));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,A));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Qa.prototype.getConstraints=function(d,p,A){d=[];var u=A*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",this.arrowSize))));u=(A-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-z),u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-z),A-u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,A-u));return d};za.prototype.getConstraints=function(d,p,A){d=[];var u=A*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Qa.prototype.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Qa.prototype.arrowSize))));u=(A-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-z,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,A-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Ta.prototype.getConstraints=function(d,p,A){d=[];var u=Math.min(A,p),z=Math.max(0,Math.min(u,u*parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=(A-z)/2;var E=u+z,H=(p-z)/2;z=H+z;d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,H,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,H,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,H,A-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,H,A));d.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+z),u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,E));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(p+z),E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,H,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*H,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*H,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,H,u));return d};fa.prototype.constraints=
+null;C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,
.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];wa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(D){q.escape();D=q.deleteCells(q.getDeletableCells(q.getSelectionCells()),D);null!=D&&q.setSelectionCells(D)}function f(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{for(var D=q.getSelectionCells(),P=0;P<D.length;P++)q.cellLabelChanged(D[P],"")}finally{q.getModel().endUpdate()}}}function l(D,P,c,g,m){m.getModel().beginUpdate();try{var n=m.getCellGeometry(D);null!=n&&c&&g&&(c/=g,n=n.clone(),1<c?n.height=n.width/c:n.width=n.height*c,m.getModel().setGeometry(D,
-n));m.setCellStyles(mxConstants.STYLE_CLIP_PATH,P,[D]);m.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[D])}finally{m.getModel().endUpdate()}}var u=this.editorUi,y=u.editor,q=y.graph,C=function(){return Action.prototype.isEnabled.apply(this,arguments)&&q.isEnabled()};this.addAction("new...",function(){q.openLink(u.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";u.openFile()});var J=new Action("smartFit",function(){q.popupMenuHandler.hideMenu();var D=q.view.scale,
-P=q.container.scrollLeft,c=q.container.scrollTop,g=q.view.translate.x,m=q.view.translate.y;u.actions.get("resetView").funct();1E-5>Math.abs(D-q.view.scale)&&5>Math.abs(P-q.container.scrollLeft)&&5>Math.abs(c-q.container.scrollTop)&&g==q.view.translate.x&&m==q.view.translate.y&&u.actions.get("fitWindow").funct()},null,null,"Enter");J.getTitle=function(){return mxResources.get("fitWindow")+" / "+mxResources.get("resetView")};this.put("smartFit",J);this.addAction("keyPressEnter",function(){q.isSelectionEmpty()?
-u.actions.get("smartFit").funct():q.isEnabled()&&q.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){u.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(D,P){try{var c=mxUtils.parseXml(D);y.graph.setSelectionCells(y.graph.importGraphModel(c.documentElement))}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}));u.showDialog((new OpenDialog(this)).container,
-320,220,!0,!0,function(){window.openFile=null})}).isEnabled=C;this.addAction("save",function(){u.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=C;this.addAction("saveAs...",function(){u.saveFile(!0)},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+S");this.addAction("export...",function(){u.showDialog((new ExportDialog(u)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var D=new EditDiagramDialog(u);u.showDialog(D.container,620,420,!0,!1,null,null,null,new mxRectangle(0,
-0,440,280));D.init()}).isEnabled=C;this.addAction("pageSetup...",function(){u.showDialog((new PageSetupDialog(u)).container,320,240,!0,!0)}).isEnabled=C;this.addAction("print...",function(){u.showPrintDialog()},null,"",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(q,null,10,10)});this.addAction("undo",function(){u.undo()},null,"",Editor.ctrlKey+"+Z");this.addAction("redo",function(){u.redo()},null,"",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+"+Editor.shiftKey+"+Z");
-this.addAction("cut",function(){var D=null;try{D=u.copyXml(),null!=D&&q.removeCells(D,!1)}catch(P){}try{null==D&&mxClipboard.cut(q)}catch(P){u.handleError(P)}},null,"",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{u.copyXml()}catch(D){}try{mxClipboard.copy(q)}catch(D){u.handleError(D)}},null,"",Editor.ctrlKey+"+C");this.addAction("paste",function(){u.pasteFromClipboard()},!1,"",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(D){u.pasteFromClipboard(q.popupMenuHandler.getTriggerPoint())});
-this.addAction("swap",function(){var D=q.getSelectionCells();2==D.length&&q.swapShapes(D[0],D[1])});this.addAction("copySize",function(){var D=q.getSelectionCell();q.isEnabled()&&null!=D&&q.getModel().isVertex(D)&&(D=q.getCellGeometry(D),null!=D&&(u.copiedSize=new mxRectangle(D.x,D.y,D.width,D.height)))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+F");this.addAction("pasteSize",function(){if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=u.copiedSize){q.getModel().beginUpdate();try{for(var D=q.getResizableCells(q.getSelectionCells()),
-P=0;P<D.length;P++)if(q.getModel().isVertex(D[P])){var c=q.getCellGeometry(D[P]);null!=c&&(c=c.clone(),c.width=u.copiedSize.width,c.height=u.copiedSize.height,q.getModel().setGeometry(D[P],c))}}finally{q.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+V");this.addAction("copyData",function(){var D=q.getSelectionCell()||q.getModel().getRoot();q.isEnabled()&&null!=D&&(D=D.cloneValue(),null==D||isNaN(D.nodeType)||(u.copiedValue=D))},null,null,Editor.altKey+"+"+Editor.shiftKey+
-"+B");this.addAction("copyAsText",function(){var D=q.getSelectionCell();if(q.isEnabled()&&null!=D)try{q.isHtmlLabel(D)?u.writeHtmlToClipboard(q.getLabel(D),mxUtils.bind(this,function(P){u.handleError(P)})):u.writeTextToClipboard(q.getLabel(D),mxUtils.bind(this,function(P){u.handleError(P)}))}catch(P){u.handleError(P)}});this.addAction("pasteData",function(D,P){function c(n,x){var F=g.getValue(n);x=n.cloneValue(x);x.removeAttribute("placeholders");null==F||isNaN(F.nodeType)||x.setAttribute("placeholders",
-F.getAttribute("placeholders"));null!=D&&mxEvent.isShiftDown(D)||x.setAttribute("label",q.convertValueToString(n));g.setValue(n,x)}D=null!=P?P:D;var g=q.getModel();if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=u.copiedValue){g.beginUpdate();try{var m=q.getEditableCells(q.getSelectionCells());if(0==m.length)c(g.getRoot(),u.copiedValue);else for(P=0;P<m.length;P++)c(m[P],u.copiedValue)}finally{g.endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+E");this.addAction("delete",function(D,P){D=
-null!=P?P:D;null!=D&&mxEvent.isShiftDown(D)?f():b(null!=D&&(mxEvent.isControlDown(D)||mxEvent.isMetaDown(D)||mxEvent.isAltDown(D)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){f()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{q.setSelectionCells(q.duplicateCells()),q.scrollCellToVisible(q.getSelectionCell())}catch(D){u.handleError(D)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action("merge",
-function(){var D=u.getSelectionState();if(null!=D.mergeCell){q.getModel().beginUpdate();try{q.setCellStyles("rowspan",D.rowspan,[D.mergeCell]),q.setCellStyles("colspan",D.colspan,[D.mergeCell])}finally{q.getModel().endUpdate()}}}));this.put("unmergeCells",new Action("unmerge",function(){var D=u.getSelectionState();if(0<D.cells.length){q.getModel().beginUpdate();try{q.setCellStyles("rowspan",null,D.cells),q.setCellStyles("colspan",null,D.cells)}finally{q.getModel().endUpdate()}}}));J=new Action("turn",
-function(D,P){D=null!=P?P:D;q.turnShapes(q.getResizableCells(q.getSelectionCells()),null!=D?mxEvent.isShiftDown(D):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R");J.getTitle=function(){return mxResources.get("turn")+" / "+mxResources.get("reverse")};this.put("turn",J);this.put("selectConnections",new Action("selectEdges",function(D){D=q.getSelectionCell();q.isEnabled()&&null!=D&&q.addSelectionCells(q.getEdges(D))}));this.addAction("selectVertices",function(){q.selectVertices(null,!0)},null,
+Actions.prototype.init=function(){function b(D){q.escape();D=q.deleteCells(q.getDeletableCells(q.getSelectionCells()),D);null!=D&&q.setSelectionCells(D)}function f(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{for(var D=q.getSelectionCells(),P=0;P<D.length;P++)q.cellLabelChanged(D[P],"")}finally{q.getModel().endUpdate()}}}function m(D,P,c,g,l){l.getModel().beginUpdate();try{var n=l.getCellGeometry(D);null!=n&&c&&g&&(c/=g,n=n.clone(),1<c?n.height=n.width/c:n.width=n.height*c,l.getModel().setGeometry(D,
+n));l.setCellStyles(mxConstants.STYLE_CLIP_PATH,P,[D]);l.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[D])}finally{l.getModel().endUpdate()}}var t=this.editorUi,y=t.editor,q=y.graph,B=function(){return Action.prototype.isEnabled.apply(this,arguments)&&q.isEnabled()};this.addAction("new...",function(){q.openLink(t.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";t.openFile()});var I=new Action("smartFit",function(){q.popupMenuHandler.hideMenu();var D=q.view.scale,
+P=q.container.scrollLeft,c=q.container.scrollTop,g=q.view.translate.x,l=q.view.translate.y;t.actions.get("resetView").funct();1E-5>Math.abs(D-q.view.scale)&&5>Math.abs(P-q.container.scrollLeft)&&5>Math.abs(c-q.container.scrollTop)&&g==q.view.translate.x&&l==q.view.translate.y&&t.actions.get("fitWindow").funct()},null,null,"Enter");I.getTitle=function(){return mxResources.get("fitWindow")+" / "+mxResources.get("resetView")};this.put("smartFit",I);this.addAction("keyPressEnter",function(){q.isSelectionEmpty()?
+t.actions.get("smartFit").funct():q.isEnabled()&&q.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){t.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(D,P){try{var c=mxUtils.parseXml(D);y.graph.setSelectionCells(y.graph.importGraphModel(c.documentElement))}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}));t.showDialog((new OpenDialog(this)).container,
+320,220,!0,!0,function(){window.openFile=null})}).isEnabled=B;this.addAction("save",function(){t.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=B;this.addAction("saveAs...",function(){t.saveFile(!0)},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+S");this.addAction("export...",function(){t.showDialog((new ExportDialog(t)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var D=new EditDiagramDialog(t);t.showDialog(D.container,620,420,!0,!1,null,null,null,new mxRectangle(0,
+0,440,280));D.init()}).isEnabled=B;this.addAction("pageSetup...",function(){t.showDialog((new PageSetupDialog(t)).container,320,240,!0,!0)}).isEnabled=B;this.addAction("print...",function(){t.showPrintDialog()},null,"",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(q,null,10,10)});this.addAction("undo",function(){t.undo()},null,"",Editor.ctrlKey+"+Z");this.addAction("redo",function(){t.redo()},null,"",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+"+Editor.shiftKey+"+Z");
+this.addAction("cut",function(){var D=null;try{D=t.copyXml(),null!=D&&q.removeCells(D,!1)}catch(P){}try{null==D&&mxClipboard.cut(q)}catch(P){t.handleError(P)}},null,"",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{t.copyXml()}catch(D){}try{mxClipboard.copy(q)}catch(D){t.handleError(D)}},null,"",Editor.ctrlKey+"+C");this.addAction("paste",function(){t.pasteFromClipboard()},!1,"",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(D){t.pasteFromClipboard(q.popupMenuHandler.getTriggerPoint())});
+this.addAction("swap",function(){var D=q.getSelectionCells();2==D.length&&q.swapShapes(D[0],D[1])});this.addAction("copySize",function(){var D=q.getSelectionCell();q.isEnabled()&&null!=D&&q.getModel().isVertex(D)&&(D=q.getCellGeometry(D),null!=D&&(t.copiedSize=new mxRectangle(D.x,D.y,D.width,D.height)))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+F");this.addAction("pasteSize",function(){if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=t.copiedSize){q.getModel().beginUpdate();try{for(var D=q.getResizableCells(q.getSelectionCells()),
+P=0;P<D.length;P++)if(q.getModel().isVertex(D[P])){var c=q.getCellGeometry(D[P]);null!=c&&(c=c.clone(),c.width=t.copiedSize.width,c.height=t.copiedSize.height,q.getModel().setGeometry(D[P],c))}}finally{q.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+V");this.addAction("copyData",function(){var D=q.getSelectionCell()||q.getModel().getRoot();q.isEnabled()&&null!=D&&(D=D.cloneValue(),null==D||isNaN(D.nodeType)||(t.copiedValue=D))},null,null,Editor.altKey+"+"+Editor.shiftKey+
+"+B");this.addAction("copyAsText",function(){var D=q.getSelectionCell();if(q.isEnabled()&&null!=D)try{q.isHtmlLabel(D)?t.writeHtmlToClipboard(q.getLabel(D),mxUtils.bind(this,function(P){t.handleError(P)})):t.writeTextToClipboard(q.getLabel(D),mxUtils.bind(this,function(P){t.handleError(P)}))}catch(P){t.handleError(P)}});this.addAction("pasteData",function(D,P){function c(n,x){var F=g.getValue(n);x=n.cloneValue(x);x.removeAttribute("placeholders");null==F||isNaN(F.nodeType)||x.setAttribute("placeholders",
+F.getAttribute("placeholders"));null!=D&&mxEvent.isShiftDown(D)||x.setAttribute("label",q.convertValueToString(n));g.setValue(n,x)}D=null!=P?P:D;var g=q.getModel();if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=t.copiedValue){g.beginUpdate();try{var l=q.getEditableCells(q.getSelectionCells());if(0==l.length)c(g.getRoot(),t.copiedValue);else for(P=0;P<l.length;P++)c(l[P],t.copiedValue)}finally{g.endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+E");this.addAction("delete",function(D,P){D=
+null!=P?P:D;null!=D&&mxEvent.isShiftDown(D)?f():b(null!=D&&(mxEvent.isControlDown(D)||mxEvent.isMetaDown(D)||mxEvent.isAltDown(D)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){f()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{q.setSelectionCells(q.duplicateCells()),q.scrollCellToVisible(q.getSelectionCell())}catch(D){t.handleError(D)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action("merge",
+function(){var D=t.getSelectionState();if(null!=D.mergeCell){q.getModel().beginUpdate();try{q.setCellStyles("rowspan",D.rowspan,[D.mergeCell]),q.setCellStyles("colspan",D.colspan,[D.mergeCell])}finally{q.getModel().endUpdate()}}}));this.put("unmergeCells",new Action("unmerge",function(){var D=t.getSelectionState();if(0<D.cells.length){q.getModel().beginUpdate();try{q.setCellStyles("rowspan",null,D.cells),q.setCellStyles("colspan",null,D.cells)}finally{q.getModel().endUpdate()}}}));I=new Action("turn",
+function(D,P){D=null!=P?P:D;q.turnShapes(q.getResizableCells(q.getSelectionCells()),null!=D?mxEvent.isShiftDown(D):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R");I.getTitle=function(){return mxResources.get("turn")+" / "+mxResources.get("reverse")};this.put("turn",I);this.put("selectConnections",new Action("selectEdges",function(D){D=q.getSelectionCell();q.isEnabled()&&null!=D&&q.addSelectionCells(q.getEdges(D))}));this.addAction("selectVertices",function(){q.selectVertices(null,!0)},null,
null,Editor.ctrlKey+"+"+Editor.shiftKey+"+I");this.addAction("selectEdges",function(){q.selectEdges()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+E");this.addAction("selectAll",function(){q.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){q.clearSelection()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+A");this.addAction("lockUnlock",function(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{var D=q.getSelectionCells(),P=q.getCurrentCellStyle(q.getSelectionCell()),
c=1==mxUtils.getValue(P,mxConstants.STYLE_EDITABLE,1)?0:1;q.setCellStyles(mxConstants.STYLE_MOVABLE,c,D);q.setCellStyles(mxConstants.STYLE_RESIZABLE,c,D);q.setCellStyles(mxConstants.STYLE_ROTATABLE,c,D);q.setCellStyles(mxConstants.STYLE_DELETABLE,c,D);q.setCellStyles(mxConstants.STYLE_EDITABLE,c,D);q.setCellStyles("locked",1==c?0:1,D);q.setCellStyles("connectable",c,D)}finally{q.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){var D=q.getSelectionCell();
-q.model.isEdge(D)&&(D=q.model.getTerminal(D,!0));q.model.isVertex(D)&&Graph.exploreFromCell(u.editor.graph,D)});this.addAction("home",function(){q.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){q.exitGroup()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Home");this.addAction("enterGroup",function(){q.enterGroup()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+End");this.addAction("collapse",function(){q.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",
+q.model.isEdge(D)&&(D=q.model.getTerminal(D,!0));q.model.isVertex(D)&&Graph.exploreFromCell(t.editor.graph,D)});this.addAction("home",function(){q.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){q.exitGroup()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Home");this.addAction("enterGroup",function(){q.enterGroup()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+End");this.addAction("collapse",function(){q.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",
function(){q.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){q.orderCells(!1)},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+F");this.addAction("toBack",function(){q.orderCells(!0)},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+B");this.addAction("bringForward",function(D){q.orderCells(!1,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+F");this.addAction("sendBackward",function(D){q.orderCells(!0,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+B");this.addAction("group",
function(){if(q.isEnabled()){var D=mxUtils.sortCells(q.getSelectionCells(),!0);1!=D.length||q.isTable(D[0])||q.isTableRow(D[0])?(D=q.getCellsForGroup(D),1<D.length&&q.setSelectionCell(q.groupCells(null,0,D))):q.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(q.isEnabled()){var D=q.getEditableCells(q.getSelectionCells());q.model.beginUpdate();try{var P=q.ungroupCells();if(null!=D)for(var c=0;c<D.length;c++)q.model.contains(D[c])&&(0==q.model.getChildCount(D[c])&&
q.model.isVertex(D[c])&&q.setCellStyles("container","0",[D[c]]),P.push(D[c]))}finally{q.model.endUpdate()}0<P.length&&q.setSelectionCells(P)}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+U");this.addAction("removeFromGroup",function(){if(q.isEnabled()){var D=q.getSelectionCells();if(null!=D){for(var P=[],c=0;c<D.length;c++)q.isTableRow(D[c])||q.isTableCell(D[c])||P.push(D[c]);q.removeCellsFromParent(P);0<P.length&&q.scrollCellToVisible(P[0])}}});this.addAction("edit",function(){q.isEnabled()&&
-q.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var D=q.getSelectionCell()||q.getModel().getRoot();u.showDataDialog(D)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&null!=D&&q.isCellEditable(D)){var P="";if(mxUtils.isNode(D.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&D.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=D.value.getAttribute("tooltip_"+Graph.diagramLanguage));
-null==c&&(c=D.value.getAttribute("tooltip"));null!=c&&(P=c)}P=new TextareaDialog(u,mxResources.get("editTooltip")+":",P,function(g){q.setTooltipForCell(D,g)});u.showDialog(P.container,320,200,!0,!0);P.init()}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+T");this.addAction("openLink",function(){var D=q.getLinkForCell(q.getSelectionCell());null!=D&&q.openLink(D)});this.addAction("editLink...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&null!=D&&q.isCellEditable(D)){var P=q.getLinkForCell(D,
-!0)||"";u.showLinkDialog(P,mxResources.get("ok"),function(c,g,m){q.getModel().beginUpdate();try{q.setLinkForCell(D,0<c.length?c:null),q.setAttributeForCell(D,"linkTarget",m)}finally{q.getModel().endUpdate()}},!0,q.getLinkTargetForCell(D))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+L");this.put("insertImage",new Action("image...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&(q.clearSelection(),u.actions.get("image").funct())})).isEnabled=C;this.addAction("editImage...",function(){u.actions.get("image").funct()});
-this.put("insertLink",new Action("link...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&u.showLinkDialog("",mxResources.get("ok"),function(D,P,c){D=mxUtils.trim(D);if(0<D.length){var g=null,m=q.getLinkTitle(D);null!=P&&0<P.length&&(g=P[0].iconUrl,m=P[0].name||P[0].type,m=m.charAt(0).toUpperCase()+m.substring(1),30<m.length&&(m=m.substring(0,30)+"..."));P=new mxCell(m,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=g?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+
-g:"spacing=10;"));P.vertex=!0;g=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([P],!0));P.geometry.x=g.x;P.geometry.y=g.y;q.setAttributeForCell(P,"linkTarget",c);q.setLinkForCell(P,D);q.cellSizeUpdated(P,!0);q.getModel().beginUpdate();try{P=q.addCell(P),q.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{q.getModel().endUpdate()}q.setSelectionCell(P);q.scrollCellToVisible(q.getSelectionCell())}},!0)},null,null,"L")).isEnabled=C;this.addAction("link...",mxUtils.bind(this,function(){if(q.isEnabled())if(q.cellEditor.isContentEditing()){var D=
-q.getSelectedElement(),P=q.getParentByName(D,"A",q.cellEditor.textarea),c="";if(null==P&&null!=D&&null!=D.getElementsByTagName)for(var g=D.getElementsByTagName("a"),m=0;m<g.length&&null==P;m++)g[m].textContent==D.textContent&&(P=g[m]);null!=P&&"A"==P.nodeName&&(c=P.getAttribute("href")||"",q.selectNode(P));var n=q.cellEditor.saveSelection();u.showLinkDialog(c,mxResources.get("ok"),mxUtils.bind(this,function(x){q.cellEditor.restoreSelection(n);null!=x&&q.insertLink(x)}))}else q.isSelectionEmpty()?
-this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=C;this.addAction("autosize",function(){var D=q.getSelectionCells();if(null!=D){q.getModel().beginUpdate();try{for(var P=0;P<D.length;P++){var c=D[P];q.getModel().isVertex(c)&&(0<q.getModel().getChildCount(c)?q.updateGroupBounds([c],0,!0):q.updateCellSize(c))}}finally{q.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Y");this.addAction("snapToGrid",function(){q.snapCellsToGrid(q.getSelectionCells(),q.gridSize)});
-this.addAction("formattedText",function(){q.stopEditing();var D=q.getCommonStyle(q.getSelectionCells());D="1"==mxUtils.getValue(D,"html","0")?null:"1";q.getModel().beginUpdate();try{for(var P=q.getEditableCells(q.getSelectionCells()),c=0;c<P.length;c++)if(state=q.getView().getState(P[c]),null!=state){var g=mxUtils.getValue(state.style,"html","0");if("1"==g&&null==D)q.removeTextStyleForCell(state.cell),q.setCellStyles("html",D,[P[c]]);else if("0"==g&&"1"==D){var m=mxUtils.htmlEntities(q.convertValueToString(state.cell),
-!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(m=m.replace(/\n/g,"<br/>"));q.cellLabelChanged(state.cell,Graph.sanitizeHtml(m));q.setCellStyles("html",D,[P[c]])}}u.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=D?D:"0"],"cells",P))}finally{q.getModel().endUpdate()}});this.addAction("wordWrap",function(){var D=q.getView().getState(q.getSelectionCell()),P="wrap";q.stopEditing();null!=D&&"wrap"==D.style[mxConstants.STYLE_WHITE_SPACE]&&(P=null);q.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-P)});this.addAction("rotation",function(){var D="0",P=q.getView().getState(q.getSelectionCell());null!=P&&(D=P.style[mxConstants.STYLE_ROTATION]||D);D=new FilenameDialog(u,D,mxResources.get("apply"),function(c){null!=c&&0<c.length&&q.setCellStyles(mxConstants.STYLE_ROTATION,c)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");u.showDialog(D.container,375,80,!0,!0);D.init()});this.addAction("resetView",function(){q.zoomTo(1);u.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
-function(D){q.isFastZoomEnabled()?q.lazyZoom(!0,!0,u.buttonZoomDelay):q.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(D){q.isFastZoomEnabled()?q.lazyZoom(!1,!0,u.buttonZoomDelay):q.zoomOut()},null,null,Editor.ctrlKey+" - / Alt+Mousewheel");this.addAction("fitWindow",function(){q.pageVisible&&q.isSelectionEmpty()?q.fitPages():u.fitDiagramToWindow()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+H");this.addAction("fitPage",mxUtils.bind(this,function(){q.pageVisible?
+q.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var D=q.getSelectionCell()||q.getModel().getRoot();t.showDataDialog(D)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&null!=D&&q.isCellEditable(D)){var P="";if(mxUtils.isNode(D.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&D.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=D.value.getAttribute("tooltip_"+Graph.diagramLanguage));
+null==c&&(c=D.value.getAttribute("tooltip"));null!=c&&(P=c)}P=new TextareaDialog(t,mxResources.get("editTooltip")+":",P,function(g){q.setTooltipForCell(D,g)});t.showDialog(P.container,320,200,!0,!0);P.init()}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+T");this.addAction("openLink",function(){var D=q.getLinkForCell(q.getSelectionCell());null!=D&&q.openLink(D)});this.addAction("editLink...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&null!=D&&q.isCellEditable(D)){var P=q.getLinkForCell(D,
+!0)||"";t.showLinkDialog(P,mxResources.get("ok"),function(c,g,l){q.getModel().beginUpdate();try{q.setLinkForCell(D,0<c.length?c:null),q.setAttributeForCell(D,"linkTarget",l)}finally{q.getModel().endUpdate()}},!0,q.getLinkTargetForCell(D))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+L");this.put("insertImage",new Action("image...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&(q.clearSelection(),t.actions.get("image").funct())})).isEnabled=B;this.addAction("editImage...",function(){t.actions.get("image").funct()});
+this.put("insertLink",new Action("link...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&t.showLinkDialog("",mxResources.get("ok"),function(D,P,c){D=mxUtils.trim(D);if(0<D.length){var g=null,l=q.getLinkTitle(D);null!=P&&0<P.length&&(g=P[0].iconUrl,l=P[0].name||P[0].type,l=l.charAt(0).toUpperCase()+l.substring(1),30<l.length&&(l=l.substring(0,30)+"..."));P=new mxCell(l,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=g?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+
+g:"spacing=10;"));P.vertex=!0;g=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([P],!0));P.geometry.x=g.x;P.geometry.y=g.y;q.setAttributeForCell(P,"linkTarget",c);q.setLinkForCell(P,D);q.cellSizeUpdated(P,!0);q.getModel().beginUpdate();try{P=q.addCell(P),q.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{q.getModel().endUpdate()}q.setSelectionCell(P);q.scrollCellToVisible(q.getSelectionCell())}},!0)},null,null,"L")).isEnabled=B;this.addAction("link...",mxUtils.bind(this,function(){if(q.isEnabled())if(q.cellEditor.isContentEditing()){var D=
+q.getSelectedElement(),P=q.getParentByName(D,"A",q.cellEditor.textarea),c="";if(null==P&&null!=D&&null!=D.getElementsByTagName)for(var g=D.getElementsByTagName("a"),l=0;l<g.length&&null==P;l++)g[l].textContent==D.textContent&&(P=g[l]);null!=P&&"A"==P.nodeName&&(c=P.getAttribute("href")||"",q.selectNode(P));var n=q.cellEditor.saveSelection();t.showLinkDialog(c,mxResources.get("ok"),mxUtils.bind(this,function(x){q.cellEditor.restoreSelection(n);null!=x&&q.insertLink(x)}))}else q.isSelectionEmpty()?
+this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=B;this.addAction("autosize",function(){var D=q.getSelectionCells();if(null!=D){q.getModel().beginUpdate();try{for(var P=0;P<D.length;P++){var c=D[P];q.getModel().isVertex(c)&&(0<q.getModel().getChildCount(c)?q.updateGroupBounds([c],0,!0):q.updateCellSize(c))}}finally{q.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Y");this.addAction("snapToGrid",function(){q.snapCellsToGrid(q.getSelectionCells(),q.gridSize)});
+this.addAction("formattedText",function(){q.stopEditing();var D=q.getCommonStyle(q.getSelectionCells());D="1"==mxUtils.getValue(D,"html","0")?null:"1";q.getModel().beginUpdate();try{for(var P=q.getEditableCells(q.getSelectionCells()),c=0;c<P.length;c++)if(state=q.getView().getState(P[c]),null!=state){var g=mxUtils.getValue(state.style,"html","0");if("1"==g&&null==D)q.removeTextStyleForCell(state.cell),q.setCellStyles("html",D,[P[c]]);else if("0"==g&&"1"==D){var l=mxUtils.htmlEntities(q.convertValueToString(state.cell),
+!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(l=l.replace(/\n/g,"<br/>"));q.cellLabelChanged(state.cell,Graph.sanitizeHtml(l));q.setCellStyles("html",D,[P[c]])}}t.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=D?D:"0"],"cells",P))}finally{q.getModel().endUpdate()}});this.addAction("wordWrap",function(){var D=q.getView().getState(q.getSelectionCell()),P="wrap";q.stopEditing();null!=D&&"wrap"==D.style[mxConstants.STYLE_WHITE_SPACE]&&(P=null);q.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
+P)});this.addAction("rotation",function(){var D="0",P=q.getView().getState(q.getSelectionCell());null!=P&&(D=P.style[mxConstants.STYLE_ROTATION]||D);D=new FilenameDialog(t,D,mxResources.get("apply"),function(c){null!=c&&0<c.length&&q.setCellStyles(mxConstants.STYLE_ROTATION,c)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");t.showDialog(D.container,375,80,!0,!0);D.init()});this.addAction("resetView",function(){q.zoomTo(1);t.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
+function(D){q.isFastZoomEnabled()?q.lazyZoom(!0,!0,t.buttonZoomDelay):q.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(D){q.isFastZoomEnabled()?q.lazyZoom(!1,!0,t.buttonZoomDelay):q.zoomOut()},null,null,Editor.ctrlKey+" - / Alt+Mousewheel");this.addAction("fitWindow",function(){q.pageVisible&&q.isSelectionEmpty()?q.fitPages():t.fitDiagramToWindow()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+H");this.addAction("fitPage",mxUtils.bind(this,function(){q.pageVisible?
q.fitPages(1):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){q.pageVisible?q.fitPages(2):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){q.pageVisible?q.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action("custom...",mxUtils.bind(this,function(){var D=new FilenameDialog(this.editorUi,parseInt(100*q.getView().getScale()),
-mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&q.zoomTo(P/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(D.container,300,80,!0,!0);D.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var D=new FilenameDialog(this.editorUi,parseInt(100*q.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&(P=new ChangePageSetup(u,null,null,null,P/100),P.ignoreColor=!0,
-P.ignoreImage=!0,q.model.execute(P))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(D.container,300,80,!0,!0);D.init()}));J=null;J=this.addAction("grid",function(){q.setGridEnabled(!q.isGridEnabled());q.defaultGridEnabled=q.isGridEnabled();u.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+G");J.setToggleAction(!0);J.setSelectedCallback(function(){return q.isGridEnabled()});J.setEnabled(!1);J=this.addAction("guides",function(){q.graphHandler.guidesEnabled=
-!q.graphHandler.guidesEnabled;u.fireEvent(new mxEventObject("guidesEnabledChanged"))});J.setToggleAction(!0);J.setSelectedCallback(function(){return q.graphHandler.guidesEnabled});J.setEnabled(!1);J=this.addAction("animations",function(){Editor.enableAnimations=!Editor.enableAnimations;u.fireEvent(new mxEventObject("enableAnimationsChanged"))});J.setToggleAction(!0);J.setSelectedCallback(function(){return Editor.enableAnimations});J=this.addAction("tooltips",function(){q.tooltipHandler.setEnabled(!q.tooltipHandler.isEnabled());
-u.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});J.setToggleAction(!0);J.setSelectedCallback(function(){return q.tooltipHandler.isEnabled()});J=this.addAction("collapseExpand",function(){var D=new ChangePageSetup(u);D.ignoreColor=!0;D.ignoreImage=!0;D.foldingEnabled=!q.foldingEnabled;q.model.execute(D)});J.setToggleAction(!0);J.setSelectedCallback(function(){return q.foldingEnabled});J.isEnabled=C;J=this.addAction("pageView",mxUtils.bind(this,function(){u.setPageVisible(!q.pageVisible)}));
-J.setToggleAction(!0);J.setSelectedCallback(function(){return q.pageVisible});J=this.addAction("connectionArrows",function(){q.connectionArrowsEnabled=!q.connectionArrowsEnabled;u.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+A");J.setToggleAction(!0);J.setSelectedCallback(function(){return q.connectionArrowsEnabled});J=this.addAction("connectionPoints",function(){q.setConnectable(!q.connectionHandler.isEnabled());u.fireEvent(new mxEventObject("connectionPointsChanged"))},
-null,null,Editor.altKey+"+"+Editor.shiftKey+"+O");J.setToggleAction(!0);J.setSelectedCallback(function(){return q.connectionHandler.isEnabled()});J=this.addAction("copyConnect",function(){q.connectionHandler.setCreateTarget(!q.connectionHandler.isCreateTarget());u.fireEvent(new mxEventObject("copyConnectChanged"))});J.setToggleAction(!0);J.setSelectedCallback(function(){return q.connectionHandler.isCreateTarget()});J.isEnabled=C;J=this.addAction("autosave",function(){u.editor.setAutosave(!u.editor.autosave)});
-J.setToggleAction(!0);J.setSelectedCallback(function(){return u.editor.autosave});J.isEnabled=C;J.visible=!1;this.addAction("help",function(){var D="";mxResources.isLanguageSupported(mxClient.language)&&(D="_"+mxClient.language);q.openLink(RESOURCES_PATH+"/help"+D+".html")});var S=!1;J=new Action("about",function(){S||(u.showDialog((new AboutDialog(u)).container,320,280,!0,!0,function(){S=!1}),S=!0)});J.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",J);J=
-mxUtils.bind(this,function(D,P,c,g){return this.addAction(D,function(){if(null!=c&&q.cellEditor.isContentEditing())c();else{q.stopEditing(!1);q.getModel().beginUpdate();try{var m=q.getEditableCells(q.getSelectionCells());q.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,P,m);(P&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?q.updateLabelElements(m,function(x){x.style.fontWeight=null;"B"==x.nodeName&&q.replaceElement(x)}):(P&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?q.updateLabelElements(m,
-function(x){x.style.fontStyle=null;"I"==x.nodeName&&q.replaceElement(x)}):(P&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.updateLabelElements(m,function(x){x.style.textDecoration=null;"U"==x.nodeName&&q.replaceElement(x)});for(var n=0;n<m.length;n++)0==q.model.getChildCount(m[n])&&q.autoSizeCell(m[n],!1)}finally{q.getModel().endUpdate()}}},null,null,g)});J("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");J("italic",mxConstants.FONT_ITALIC,
-function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");J("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){u.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",q.shapeForegroundColor)});this.addAction("strokeColor...",function(){u.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("fillColor...",function(){u.menus.pickColor(mxConstants.STYLE_FILLCOLOR,
-null,null,"default",q.shapeBackgroundColor)});this.addAction("gradientColor...",function(){u.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("backgroundColor...",function(){u.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor",null,"default",q.shapeBackgroundColor)});this.addAction("borderColor...",function(){u.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("removeFormat",
-function(){if(q.isEnabled()&&!q.isSelectionEmpty()&&!q.isEditing()){q.getModel().beginUpdate();try{for(var D=q.getSelectionCells(),P=0;P<D.length;P++)q.removeTextStyleForCell(D[P],!0)}finally{q.getModel().endUpdate()}}});this.addAction("vertical",function(){u.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){u.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,
-null),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),u.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("dashed",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,"1"),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),u.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,
-mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("dotted",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,"1"),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),u.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("sharp",
-function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),q.setCellStyles(mxConstants.STYLE_CURVED,"0"),u.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("rounded",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),q.setCellStyles(mxConstants.STYLE_CURVED,"0"),u.fireEvent(new mxEventObject("styleChanged",
-"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!q.isSelectionEmpty()&&q.isEnabled()){q.getModel().beginUpdate();try{var D=q.getSelectionCells(),P=q.getCurrentCellStyle(D[0]),c="1"==mxUtils.getValue(P,mxConstants.STYLE_ROUNDED,"0")?"0":"1";q.setCellStyles(mxConstants.STYLE_ROUNDED,c);q.setCellStyles(mxConstants.STYLE_CURVED,null);u.fireEvent(new mxEventObject("styleChanged",
-"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}}});this.addAction("curved",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),q.setCellStyles(mxConstants.STYLE_CURVED,"1"),u.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("collapsible",
-function(){var D=q.view.getState(q.getSelectionCell()),P="1";null!=D&&null!=q.getFoldingImage(D)&&(P="0");q.setCellStyles("collapsible",P);u.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[P],"cells",q.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var D=q.getEditableCells(q.getSelectionCells());if(null!=D&&0<D.length){var P=q.getModel();P=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",P.getStyle(D[0])||"",function(c){null!=
-c&&q.setCellStyle(mxUtils.trim(c),D)},null,null,400,220);this.editorUi.showDialog(P.container,420,300,!0,!0);P.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&u.setDefaultStyle(q.getSelectionCell())},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+D");this.addAction("clearDefaultStyle",function(){q.isEnabled()&&u.clearDefaultStyle()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+R");this.addAction("addWaypoint",function(){var D=
-q.getSelectionCell();if(null!=D&&q.getModel().isEdge(D)){var P=y.graph.selectionCellsHandler.getHandler(D);if(P instanceof mxEdgeHandler){var c=0,g=0;D=q.getModel().getParent(D);for(var m=q.getCellGeometry(D);q.getModel().isVertex(D)&&null!=m;)c+=m.x,g+=m.y,D=q.getModel().getParent(D),m=q.getCellGeometry(D);D=q.popupMenuHandler.getTriggerPoint();c=Math.round(q.snap(D.x-c));g=Math.round(q.snap(D.y-g));P.addPointAt(P.state,c,g)}}});this.addAction("removeWaypoint",function(){var D=u.actions.get("removeWaypoint");
+mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&q.zoomTo(P/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(D.container,300,80,!0,!0);D.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var D=new FilenameDialog(this.editorUi,parseInt(100*q.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&(P=new ChangePageSetup(t,null,null,null,P/100),P.ignoreColor=!0,
+P.ignoreImage=!0,q.model.execute(P))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(D.container,300,80,!0,!0);D.init()}));I=null;I=this.addAction("grid",function(){q.setGridEnabled(!q.isGridEnabled());q.defaultGridEnabled=q.isGridEnabled();t.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+G");I.setToggleAction(!0);I.setSelectedCallback(function(){return q.isGridEnabled()});I.setEnabled(!1);I=this.addAction("guides",function(){q.graphHandler.guidesEnabled=
+!q.graphHandler.guidesEnabled;t.fireEvent(new mxEventObject("guidesEnabledChanged"))});I.setToggleAction(!0);I.setSelectedCallback(function(){return q.graphHandler.guidesEnabled});I.setEnabled(!1);I=this.addAction("animations",function(){Editor.enableAnimations=!Editor.enableAnimations;t.fireEvent(new mxEventObject("enableAnimationsChanged"))});I.setToggleAction(!0);I.setSelectedCallback(function(){return Editor.enableAnimations});I=this.addAction("tooltips",function(){q.tooltipHandler.setEnabled(!q.tooltipHandler.isEnabled());
+t.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});I.setToggleAction(!0);I.setSelectedCallback(function(){return q.tooltipHandler.isEnabled()});I=this.addAction("collapseExpand",function(){var D=new ChangePageSetup(t);D.ignoreColor=!0;D.ignoreImage=!0;D.foldingEnabled=!q.foldingEnabled;q.model.execute(D)});I.setToggleAction(!0);I.setSelectedCallback(function(){return q.foldingEnabled});I.isEnabled=B;I=this.addAction("pageView",mxUtils.bind(this,function(){t.setPageVisible(!q.pageVisible)}));
+I.setToggleAction(!0);I.setSelectedCallback(function(){return q.pageVisible});I=this.addAction("connectionArrows",function(){q.connectionArrowsEnabled=!q.connectionArrowsEnabled;t.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+A");I.setToggleAction(!0);I.setSelectedCallback(function(){return q.connectionArrowsEnabled});I=this.addAction("connectionPoints",function(){q.setConnectable(!q.connectionHandler.isEnabled());t.fireEvent(new mxEventObject("connectionPointsChanged"))},
+null,null,Editor.altKey+"+"+Editor.shiftKey+"+O");I.setToggleAction(!0);I.setSelectedCallback(function(){return q.connectionHandler.isEnabled()});I=this.addAction("copyConnect",function(){q.connectionHandler.setCreateTarget(!q.connectionHandler.isCreateTarget());t.fireEvent(new mxEventObject("copyConnectChanged"))});I.setToggleAction(!0);I.setSelectedCallback(function(){return q.connectionHandler.isCreateTarget()});I.isEnabled=B;I=this.addAction("autosave",function(){t.editor.setAutosave(!t.editor.autosave)});
+I.setToggleAction(!0);I.setSelectedCallback(function(){return t.editor.autosave});I.isEnabled=B;I.visible=!1;this.addAction("help",function(){var D="";mxResources.isLanguageSupported(mxClient.language)&&(D="_"+mxClient.language);q.openLink(RESOURCES_PATH+"/help"+D+".html")});var S=!1;I=new Action("about",function(){S||(t.showDialog((new AboutDialog(t)).container,320,280,!0,!0,function(){S=!1}),S=!0)});I.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",I);I=
+mxUtils.bind(this,function(D,P,c,g){return this.addAction(D,function(){if(null!=c&&q.cellEditor.isContentEditing())c();else{q.stopEditing(!1);q.getModel().beginUpdate();try{var l=q.getEditableCells(q.getSelectionCells());q.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,P,l);(P&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?q.updateLabelElements(l,function(x){x.style.fontWeight=null;"B"==x.nodeName&&q.replaceElement(x)}):(P&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?q.updateLabelElements(l,
+function(x){x.style.fontStyle=null;"I"==x.nodeName&&q.replaceElement(x)}):(P&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.updateLabelElements(l,function(x){x.style.textDecoration=null;"U"==x.nodeName&&q.replaceElement(x)});for(var n=0;n<l.length;n++)0==q.model.getChildCount(l[n])&&q.autoSizeCell(l[n],!1)}finally{q.getModel().endUpdate()}}},null,null,g)});I("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");I("italic",mxConstants.FONT_ITALIC,
+function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");I("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){t.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",q.shapeForegroundColor)});this.addAction("strokeColor...",function(){t.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("fillColor...",function(){t.menus.pickColor(mxConstants.STYLE_FILLCOLOR,
+null,null,"default",q.shapeBackgroundColor)});this.addAction("gradientColor...",function(){t.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("backgroundColor...",function(){t.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor",null,"default",q.shapeBackgroundColor)});this.addAction("borderColor...",function(){t.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("removeFormat",
+function(){if(q.isEnabled()&&!q.isSelectionEmpty()&&!q.isEditing()){q.getModel().beginUpdate();try{for(var D=q.getSelectionCells(),P=0;P<D.length;P++)q.removeTextStyleForCell(D[P],!0)}finally{q.getModel().endUpdate()}}});this.addAction("vertical",function(){t.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){t.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,
+null),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),t.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("dashed",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,"1"),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),t.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,
+mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("dotted",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,"1"),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),t.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("sharp",
+function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),q.setCellStyles(mxConstants.STYLE_CURVED,"0"),t.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("rounded",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),q.setCellStyles(mxConstants.STYLE_CURVED,"0"),t.fireEvent(new mxEventObject("styleChanged",
+"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!q.isSelectionEmpty()&&q.isEnabled()){q.getModel().beginUpdate();try{var D=q.getSelectionCells(),P=q.getCurrentCellStyle(D[0]),c="1"==mxUtils.getValue(P,mxConstants.STYLE_ROUNDED,"0")?"0":"1";q.setCellStyles(mxConstants.STYLE_ROUNDED,c);q.setCellStyles(mxConstants.STYLE_CURVED,null);t.fireEvent(new mxEventObject("styleChanged",
+"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}}});this.addAction("curved",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),q.setCellStyles(mxConstants.STYLE_CURVED,"1"),t.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("collapsible",
+function(){var D=q.view.getState(q.getSelectionCell()),P="1";null!=D&&null!=q.getFoldingImage(D)&&(P="0");q.setCellStyles("collapsible",P);t.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[P],"cells",q.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var D=q.getEditableCells(q.getSelectionCells());if(null!=D&&0<D.length){var P=q.getModel();P=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",P.getStyle(D[0])||"",function(c){null!=
+c&&q.setCellStyle(mxUtils.trim(c),D)},null,null,400,220);this.editorUi.showDialog(P.container,420,300,!0,!0);P.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&t.setDefaultStyle(q.getSelectionCell())},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+D");this.addAction("clearDefaultStyle",function(){q.isEnabled()&&t.clearDefaultStyle()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+R");this.addAction("addWaypoint",function(){var D=
+q.getSelectionCell();if(null!=D&&q.getModel().isEdge(D)){var P=y.graph.selectionCellsHandler.getHandler(D);if(P instanceof mxEdgeHandler){var c=0,g=0;D=q.getModel().getParent(D);for(var l=q.getCellGeometry(D);q.getModel().isVertex(D)&&null!=l;)c+=l.x,g+=l.y,D=q.getModel().getParent(D),l=q.getCellGeometry(D);D=q.popupMenuHandler.getTriggerPoint();c=Math.round(q.snap(D.x-c));g=Math.round(q.snap(D.y-g));P.addPointAt(P.state,c,g)}}});this.addAction("removeWaypoint",function(){var D=t.actions.get("removeWaypoint");
null!=D.handler&&D.handler.removePoint(D.handler.state,D.index)});this.addAction("clearAnchors",function(){var D=q.getSelectionCells();if(null!=D){D=q.getEditableCells(q.addAllEdges(D));q.getModel().beginUpdate();try{for(var P=0;P<D.length;P++){var c=D[P];q.getModel().isEdge(c)&&(q.setCellStyles(mxConstants.STYLE_EXIT_X,null,[c]),q.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[c]),q.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),q.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{q.getModel().endUpdate()}}});
-this.addAction("clearWaypoints",function(){var D=q.getSelectionCells();if(null!=D){D=q.getEditableCells(q.addAllEdges(D));q.getModel().beginUpdate();try{for(var P=0;P<D.length;P++){var c=D[P];if(q.getModel().isEdge(c)){var g=q.getCellGeometry(c);null!=g&&(g=g.clone(),g.points=null,g.x=0,g.y=0,g.offset=null,q.getModel().setGeometry(c,g))}}}finally{q.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+R");J=this.addAction("subscript",mxUtils.bind(this,function(){q.cellEditor.isContentEditing()&&
-document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");J=this.addAction("superscript",mxUtils.bind(this,function(){q.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");J=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var D=q.getCurrentCellStyle(q.getSelectionCell());D=mxUtils.getValue(D,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,
-Math.max(1,D-1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" + (Numpad)");J=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var D=q.getCurrentCellStyle(q.getSelectionCell());D=mxUtils.getValue(D,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,D+1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" - (Numpad)");this.addAction("image...",function(){if(q.isEnabled()&&
-!q.isCellLocked(q.getDefaultParent())){var D=mxResources.get("image")+" ("+mxResources.get("url")+"):",P=q.getView().getState(q.getSelectionCell()),c="",g=null;null!=P&&(c=P.style[mxConstants.STYLE_IMAGE]||c,g=P.style[mxConstants.STYLE_CLIP_PATH]||g);var m=q.cellEditor.saveSelection();u.showImageDialog(D,c,function(n,x,F,H,M,L){if(q.cellEditor.isContentEditing())q.cellEditor.restoreSelection(m),q.insertImage(n,x,F);else{var K=q.getSelectionCells();if(null!=n&&(0<n.length||0<K.length)){var Z=null;
-q.getModel().beginUpdate();try{if(0==K.length){K=[q.insertVertex(q.getDefaultParent(),null,"",0,0,x,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ha=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ha.x;K[0].geometry.y=ha.y;null!=H&&l(K[0],H,M,L,q);Z=K;q.fireEvent(new mxEventObject("cellsInserted","cells",Z))}q.setCellStyles(mxConstants.STYLE_IMAGE,0<n.length?n:null,K);var ca=q.getCurrentCellStyle(K[0]);"image"!=ca[mxConstants.STYLE_SHAPE]&&
-"label"!=ca[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==n.length&&q.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==H&&q.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=x&&null!=F)for(n=0;n<K.length;n++){var aa=K[n];if("0"!=q.getCurrentCellStyle(aa).expand){var oa=q.getModel().getGeometry(aa);null!=oa&&(oa=oa.clone(),oa.width=x,oa.height=F,q.getModel().setGeometry(aa,oa))}null!=H&&l(aa,H,M,L,q)}}finally{q.getModel().endUpdate()}null!=Z&&(q.setSelectionCells(Z),
-q.scrollCellToVisible(Z[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,g)}}).isEnabled=C;this.addAction("crop...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=D){var P=q.getCurrentCellStyle(D),c=P[mxConstants.STYLE_IMAGE],g=P[mxConstants.STYLE_SHAPE];c&&"image"==g&&(P=new CropImageDialog(u,c,P[mxConstants.STYLE_CLIP_PATH],function(m,n,x){l(D,m,n,x,q)}),u.showDialog(P.container,300,390,!0,!0))}}).isEnabled=C;J=this.addAction("layers",
-mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(u,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){u.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){u.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),u.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),
-null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+L");J.setToggleAction(!0);J.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));J=this.addAction("format",mxUtils.bind(this,function(){u.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+P");J.setToggleAction(!0);J.setSelectedCallback(mxUtils.bind(this,function(){return u.isFormatPanelVisible()}));J=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?
-(this.outlineWindow=new OutlineWindow(u,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){u.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){u.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),u.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+
-"+O");J.setToggleAction(!0);J.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=D&&null!=D.geometry){var P=new ConnectionPointsDialog(u,D);u.showDialog(P.container,350,450,!0,!1,function(){P.destroy()});P.init()}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+Q").isEnabled=C};
-Actions.prototype.addAction=function(b,f,l,u,y,q){var C=b;"..."==C.substring(C.length-3)&&(C=C.substring(0,C.length-3));return this.put(C,new Action(b,f,l,u,y,q))};Actions.prototype.put=function(b,f){return this.actions[b]=f};Actions.prototype.get=function(b){return this.actions[b]};function Action(b,f,l,u,y,q){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(f);this.enabled=null!=l?l:!0;this.iconCls=u;this.shortcut=y;this.visible=null!=q?q:!0}mxUtils.extend(Action,mxEventSource);
+this.addAction("clearWaypoints",function(){var D=q.getSelectionCells();if(null!=D){D=q.getEditableCells(q.addAllEdges(D));q.getModel().beginUpdate();try{for(var P=0;P<D.length;P++){var c=D[P];if(q.getModel().isEdge(c)){var g=q.getCellGeometry(c);null!=g&&(g=g.clone(),g.points=null,g.x=0,g.y=0,g.offset=null,q.getModel().setGeometry(c,g))}}}finally{q.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+R");I=this.addAction("subscript",mxUtils.bind(this,function(){q.cellEditor.isContentEditing()&&
+document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");I=this.addAction("superscript",mxUtils.bind(this,function(){q.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");I=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var D=q.getCurrentCellStyle(q.getSelectionCell());D=mxUtils.getValue(D,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,
+Math.max(1,D-1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" + (Numpad)");I=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var D=q.getCurrentCellStyle(q.getSelectionCell());D=mxUtils.getValue(D,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,D+1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" - (Numpad)");this.addAction("image...",function(){if(q.isEnabled()&&
+!q.isCellLocked(q.getDefaultParent())){var D=mxResources.get("image")+" ("+mxResources.get("url")+"):",P=q.getView().getState(q.getSelectionCell()),c="",g=null;null!=P&&(c=P.style[mxConstants.STYLE_IMAGE]||c,g=P.style[mxConstants.STYLE_CLIP_PATH]||g);var l=q.cellEditor.saveSelection();t.showImageDialog(D,c,function(n,x,F,G,L,M){if(q.cellEditor.isContentEditing())q.cellEditor.restoreSelection(l),q.insertImage(n,x,F);else{var K=q.getSelectionCells();if(null!=n&&(0<n.length||0<K.length)){var Z=null;
+q.getModel().beginUpdate();try{if(0==K.length){K=[q.insertVertex(q.getDefaultParent(),null,"",0,0,x,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ja=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ja.x;K[0].geometry.y=ja.y;null!=G&&m(K[0],G,L,M,q);Z=K;q.fireEvent(new mxEventObject("cellsInserted","cells",Z))}q.setCellStyles(mxConstants.STYLE_IMAGE,0<n.length?n:null,K);var da=q.getCurrentCellStyle(K[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&
+"label"!=da[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==n.length&&q.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==G&&q.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=x&&null!=F)for(n=0;n<K.length;n++){var ba=K[n];if("0"!=q.getCurrentCellStyle(ba).expand){var na=q.getModel().getGeometry(ba);null!=na&&(na=na.clone(),na.width=x,na.height=F,q.getModel().setGeometry(ba,na))}null!=G&&m(ba,G,L,M,q)}}finally{q.getModel().endUpdate()}null!=Z&&(q.setSelectionCells(Z),
+q.scrollCellToVisible(Z[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,g)}}).isEnabled=B;this.addAction("crop...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=D){var P=q.getCurrentCellStyle(D),c=P[mxConstants.STYLE_IMAGE],g=P[mxConstants.STYLE_SHAPE];c&&"image"==g&&(P=new CropImageDialog(t,c,P[mxConstants.STYLE_CLIP_PATH],function(l,n,x){m(D,l,n,x,q)}),t.showDialog(P.container,300,390,!0,!0))}}).isEnabled=B;I=this.addAction("layers",
+mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(t,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){t.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){t.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),t.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),
+null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+L");I.setToggleAction(!0);I.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));I=this.addAction("format",mxUtils.bind(this,function(){t.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+P");I.setToggleAction(!0);I.setSelectedCallback(mxUtils.bind(this,function(){return t.isFormatPanelVisible()}));I=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?
+(this.outlineWindow=new OutlineWindow(t,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){t.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){t.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),t.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+
+"+O");I.setToggleAction(!0);I.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=D&&null!=D.geometry){var P=new ConnectionPointsDialog(t,D);t.showDialog(P.container,350,450,!0,!1,function(){P.destroy()});P.init()}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+Q").isEnabled=B};
+Actions.prototype.addAction=function(b,f,m,t,y,q){var B=b;"..."==B.substring(B.length-3)&&(B=B.substring(0,B.length-3));return this.put(B,new Action(b,f,m,t,y,q))};Actions.prototype.put=function(b,f){return this.actions[b]=f};Actions.prototype.get=function(b){return this.actions[b]};function Action(b,f,m,t,y,q){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(f);this.enabled=null!=m?m:!0;this.iconCls=t;this.shortcut=y;this.visible=null!=q?q:!0}mxUtils.extend(Action,mxEventSource);
Action.prototype.getTitle=function(){var b=this.label;"..."==b.substring(b.length-3)?(b=b.substring(0,b.length-3),b=mxResources.get(b)+"..."):b=mxResources.get(b);return b};Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};Action.prototype.setToggleAction=function(b){this.toggleAction=b};
Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,f){mxEventSource.call(this);this.ui=b;this.setData(f||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;DrawioFile.RESTRICT_EXPORT=!1;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};
-DrawioFile.prototype.synchronizeFile=function(b,f){if(this.savingFile)null!=f&&f({message:mxResources.get("busy")});else{var l=!0,u=window.setTimeout(mxUtils.bind(this,function(){l=!1;null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,f)})})}),this.ui.timeout),y=mxUtils.bind(this,function(C){l&&(window.clearTimeout(u),null!=f&&f(C))}),q=mxUtils.bind(this,function(){return!l});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,
-function(C){l&&(window.clearTimeout(u),this.sync.cleanup(b,f,C))}),y,q):this.updateFile(mxUtils.bind(this,function(){l&&(window.clearTimeout(u),null!=b&&b())}),y,q)}};
-DrawioFile.prototype.updateFile=function(b,f,l,u,y){null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",y,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(q){try{null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[q]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=q?this.mergeFile(q,b,f,
-u,y):this.reloadFile(b,f))}catch(C){null!=f&&f(C)}}),f))};
-DrawioFile.prototype.mergeFile=function(b,f,l,u,y){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var C=this.getShadowPages(),J=[this.ui.diffPages(null!=u?u:C,q)],S=this.ignorePatches(J);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var D=this.isModified()?this.ui.diffPages(C,
-this.isRealtime()?this.ownPages:this.ui.pages):null,P=this.ui.patchPages(this.ui.clonePages(C),J[0]),c=this.ui.getHashValueForPages(P,{}),g=this.ui.getHashValueForPages(q,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",C,"pages",q,"patched",P,"patches",J,"changes",D,"checksum",c,"current",g,"valid",c==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",y);if(null!=c&&c!=g)this.checksumError(l,J,null,null,"mergeFile",
-c,g,b.getCurrentRevisionId());else{this.setShadowPages(q);if(null!=this.sync){var m=this.sync.patchRealtime(J,DrawioFile.LAST_WRITE_WINS?D:null,null,y);null==m||mxUtils.isEmptyObject(m)||J.push(m)}this.patch(J,DrawioFile.LAST_WRITE_WINS?D:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(F){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(F);try{var n=this.getCurrentUser(),x=null!=n?
-n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,F)}catch(H){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(F){null!=l&&l(F)}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),l=f.document.createElement("mxfile");if(null!=b)for(var u=0;u<b.length;u++){var y=f.encode(new mxGraphModel(b[u].root));"1"!=urlParams.dev&&(y=this.ui.anonymizeNode(y,!0));y.setAttribute("id",b[u].getId());b[u].viewState&&this.ui.editor.graph.saveViewState(b[u].viewState,y,!0);l.appendChild(y)}return mxUtils.getPrettyXml(l)};
-DrawioFile.prototype.compressReportData=function(b,f,l){f=null!=f?f:1E4;null!=l&&null!=b&&b.length>l?b=b.substring(0,l)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,f,l,u,y,q,C,J){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),D=null!=S?S.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(f).length,g=null;if(null!=f&&1E3>c){b=[];for(l=0;l<f.length;l++)b.push(this.ui.anonymizePatch(f[l]));g=JSON.stringify(b);g=null!=g&&1E3>
-g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(m){try{var n=null!=g?"report":"error",x=this.ui.getHashValueForPages(m.getShadowPages()),F="unknown",H="unknown",M="unknown";try{var L=null!=m.initialData&&0<m.initialData.length?mxUtils.parseXml(m.initialData).documentElement:null;null!=L&&(null!=L.getAttribute("version")&&(F=L.getAttribute("version")),null!=L.getAttribute("agent")&&(H=L.getAttribute("agent")),null!=L.getAttribute("type")&&(M=L.getAttribute("type")))}catch(K){}EditorUi.logError("Checksum "+
-n+" in "+y,null,this.getMode()+"."+P,"user_"+D+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=C?"-current_"+C:"")+(null!=J?"-rev_"+this.ui.hashValue(J):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(m.getCurrentRevisionId())+("-latestVersion_"+F)+("-latestAgent_"+H)+("-latestType_"+M));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+P,action:y,label:"user_"+
-D+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(m){}};
-DrawioFile.prototype.sendErrorReport=function(b,f,l,u){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),C=this.getCurrentUser(),J=null!=C?this.ui.hashValue(C.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",D=this.getTitle(),P=D.lastIndexOf(".");C="xml";0<P&&(C=D.substring(P));var c=null!=l?l.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+C+")\nUser="+J+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
-"")+(null!=l?"\n\nError: "+l.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+y+"\n\nData:\n"+q,u)}catch(g){}};
-DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var l=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),u=this.ui.editor.graph,y=u.getSelectionCells(),q=u.getViewState(),C=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(J){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[l],"viewState",[q],"latestFile",J);null!=J?(this.ui.replaceFileData(J.getData(),
-[l]),this.ui.restoreViewState(C,q,y),this.setDescriptor(J.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([l]),S.fileChanged());this.ui.restoreViewState(C,q,y);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(J){null!=f&&f(J)}};
-DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var l=0;l<b.length&&f;l++)f=f&&mxUtils.isEmptyObject(b[l]);return f};
-DrawioFile.prototype.patch=function(b,f,l,u){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),C=y.indexOfNextAdd,J=this.ui.editor.graph;J.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=l;var D=J.foldingEnabled,P=J.mathEnabled,c=J.cellRenderer.redraw;J.cellRenderer.redraw=function(H){H.view.graph.isEditing(H.cell)&&(H.view.graph.scrollCellToVisible(H.cell),H.view.graph.cellEditor.resize());c.apply(this,arguments)};J.model.beginUpdate();
-try{if(l){for(var g=this.ui.pages.slice(),m=this.ui.currentPage,n=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),x=0;x<n.length;x++){var F=mxUtils.indexOf(this.ui.pages,n[x]);0>F?this.ui.insertPage(n[x],Math.min(x,this.ui.pages.length)):this.ui.movePage(F,x)}for(x=0;x<g.length;x++)0>mxUtils.indexOf(n,g[x])&&this.ui.removePage(g[x]);0<=mxUtils.indexOf(this.ui.pages,m)&&this.ui.selectPage(m,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified());0==this.ui.pages.length&&
-this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);J.checkDefaultParent()}finally{J.container.style.visibility="";J.model.endUpdate();J.cellRenderer.redraw=c;this.changeListenerEnabled=S;l||(y.history=q,y.indexOfNextAdd=C,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=J.mathEnabled?(this.ui.editor.updateGraphComponents(),J.refresh()):(D!=J.foldingEnabled?
-J.view.revalidate():J.view.validate(),J.sizeDidChange());null!=this.sync&&this.isRealtime()&&!u&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",l)}return b};
-DrawioFile.prototype.save=function(b,f,l,u,y,q){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",u,"overwrite",y,"manual",q,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!y&&this.invalidChecksum)if(null!=l)l({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=l)l({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(C){if(null!=l)l(C);else throw C;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
+DrawioFile.prototype.synchronizeFile=function(b,f){if(this.savingFile)null!=f&&f({message:mxResources.get("busy")});else{var m=!0,t=window.setTimeout(mxUtils.bind(this,function(){m=!1;null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,f)})})}),this.ui.timeout),y=mxUtils.bind(this,function(B){m&&(window.clearTimeout(t),null!=f&&f(B))}),q=mxUtils.bind(this,function(){return!m});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,
+function(B){m&&(window.clearTimeout(t),this.sync.cleanup(b,f,B))}),y,q):this.updateFile(mxUtils.bind(this,function(){m&&(window.clearTimeout(t),null!=b&&b())}),y,q)}};
+DrawioFile.prototype.updateFile=function(b,f,m,t,y){null!=m&&m()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",y,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(q){try{null!=m&&m()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[q]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=q?this.mergeFile(q,b,f,
+t,y):this.reloadFile(b,f))}catch(B){null!=f&&f(B)}}),f))};
+DrawioFile.prototype.mergeFile=function(b,f,m,t,y){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var B=this.getShadowPages(),I=[this.ui.diffPages(null!=t?t:B,q)],S=this.ignorePatches(I);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var D=this.isModified()?this.ui.diffPages(B,
+this.isRealtime()?this.ownPages:this.ui.pages):null,P=this.ui.patchPages(this.ui.clonePages(B),I[0]),c=this.ui.getHashValueForPages(P,{}),g=this.ui.getHashValueForPages(q,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",B,"pages",q,"patched",P,"patches",I,"changes",D,"checksum",c,"current",g,"valid",c==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",y);if(null!=c&&c!=g)this.checksumError(m,I,null,null,"mergeFile",
+c,g,b.getCurrentRevisionId());else{this.setShadowPages(q);if(null!=this.sync){var l=this.sync.patchRealtime(I,DrawioFile.LAST_WRITE_WINS?D:null,null,y);null==l||mxUtils.isEmptyObject(l)||I.push(l)}this.patch(I,DrawioFile.LAST_WRITE_WINS?D:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(F){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=m&&m(F);try{var n=this.getCurrentUser(),x=null!=n?
+n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,F)}catch(G){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(F){null!=m&&m(F)}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),m=f.document.createElement("mxfile");if(null!=b)for(var t=0;t<b.length;t++){var y=f.encode(new mxGraphModel(b[t].root));"1"!=urlParams.dev&&(y=this.ui.anonymizeNode(y,!0));y.setAttribute("id",b[t].getId());b[t].viewState&&this.ui.editor.graph.saveViewState(b[t].viewState,y,!0);m.appendChild(y)}return mxUtils.getPrettyXml(m)};
+DrawioFile.prototype.compressReportData=function(b,f,m){f=null!=f?f:1E4;null!=m&&null!=b&&b.length>m?b=b.substring(0,m)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
+DrawioFile.prototype.checksumError=function(b,f,m,t,y,q,B,I){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),D=null!=S?S.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(f).length,g=null;if(null!=f&&1E3>c){b=[];for(m=0;m<f.length;m++)b.push(this.ui.anonymizePatch(f[m]));g=JSON.stringify(b);g=null!=g&&1E3>
+g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(l){try{var n=null!=g?"report":"error",x=this.ui.getHashValueForPages(l.getShadowPages()),F="unknown",G="unknown",L="unknown";try{var M=null!=l.initialData&&0<l.initialData.length?mxUtils.parseXml(l.initialData).documentElement:null;null!=M&&(null!=M.getAttribute("version")&&(F=M.getAttribute("version")),null!=M.getAttribute("agent")&&(G=M.getAttribute("agent")),null!=M.getAttribute("type")&&(L=M.getAttribute("type")))}catch(K){}EditorUi.logError("Checksum "+
+n+" in "+y,null,this.getMode()+"."+P,"user_"+D+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=B?"-current_"+B:"")+(null!=I?"-rev_"+this.ui.hashValue(I):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId())+("-latestVersion_"+F)+("-latestAgent_"+G)+("-latestType_"+L));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+P,action:y,label:"user_"+
+D+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(l){}};
+DrawioFile.prototype.sendErrorReport=function(b,f,m,t){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),I=null!=B?this.ui.hashValue(B.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",D=this.getTitle(),P=D.lastIndexOf(".");B="xml";0<P&&(B=D.substring(P));var c=null!=m?m.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+B+")\nUser="+I+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
+"")+(null!=m?"\n\nError: "+m.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+y+"\n\nData:\n"+q,t)}catch(g){}};
+DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var m=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),t=this.ui.editor.graph,y=t.getSelectionCells(),q=t.getViewState(),B=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(I){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[m],"viewState",[q],"latestFile",I);null!=I?(this.ui.replaceFileData(I.getData(),
+[m]),this.ui.restoreViewState(B,q,y),this.setDescriptor(I.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([m]),S.fileChanged());this.ui.restoreViewState(B,q,y);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(I){null!=f&&f(I)}};
+DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var m=0;m<b.length&&f;m++)f=f&&mxUtils.isEmptyObject(b[m]);return f};
+DrawioFile.prototype.patch=function(b,f,m,t){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),B=y.indexOfNextAdd,I=this.ui.editor.graph;I.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=m;var D=I.foldingEnabled,P=I.mathEnabled,c=I.cellRenderer.redraw;I.cellRenderer.redraw=function(G){G.view.graph.isEditing(G.cell)&&(G.view.graph.scrollCellToVisible(G.cell),G.view.graph.cellEditor.resize());c.apply(this,arguments)};I.model.beginUpdate();
+try{if(m){for(var g=this.ui.pages.slice(),l=this.ui.currentPage,n=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),x=0;x<n.length;x++){var F=mxUtils.indexOf(this.ui.pages,n[x]);0>F?this.ui.insertPage(n[x],Math.min(x,this.ui.pages.length)):this.ui.movePage(F,x)}for(x=0;x<g.length;x++)0>mxUtils.indexOf(n,g[x])&&this.ui.removePage(g[x]);0<=mxUtils.indexOf(this.ui.pages,l)&&this.ui.selectPage(l,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified());0==this.ui.pages.length&&
+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);I.checkDefaultParent()}finally{I.container.style.visibility="";I.model.endUpdate();I.cellRenderer.redraw=c;this.changeListenerEnabled=S;m||(y.history=q,y.indexOfNextAdd=B,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=I.mathEnabled?(this.ui.editor.updateGraphComponents(),I.refresh()):(D!=I.foldingEnabled?
+I.view.revalidate():I.view.validate(),I.sizeDidChange());null!=this.sync&&this.isRealtime()&&!t&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",m)}return b};
+DrawioFile.prototype.save=function(b,f,m,t,y,q){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",t,"overwrite",y,"manual",q,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!y&&this.invalidChecksum)if(null!=m)m({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=m)m({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(B){if(null!=m)m(B);else throw B;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return Editor.defaultCompressed};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};
-DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,f,l){};DrawioFile.prototype.saveFile=function(b,f,l,u){};DrawioFile.prototype.getFileUrl=function(){return null};
+DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,f,m){};DrawioFile.prototype.saveFile=function(b,f,m,t){};DrawioFile.prototype.getFileUrl=function(){return null};
DrawioFile.prototype.getFolderUrl=function(b){return null};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return DrawioFile.RESTRICT_EXPORT};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};
-DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,f,l){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,f,l){};
-DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var f=this.ui.editor.graph,l=f.getSelectionCells(),u=f.getViewState(),y=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(y,
-u,l);this.ui.actions.get("share").funct()}))}))}),null,mxResources.get("saveToGoogleDrive",null,"Save to Google Drive"),mxResources.get("cancel")):this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
-DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var f=0;null!=b&&f<b.length;f++){var l=b[f];null!=l.id&&0==l.id.indexOf("extFont_")&&l.parentNode.removeChild(l)}};
+DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,f,m){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,f,m){};
+DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var f=this.ui.editor.graph,m=f.getSelectionCells(),t=f.getViewState(),y=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(y,
+t,m);this.ui.actions.get("share").funct()}))}))}),null,mxResources.get("saveToGoogleDrive",null,"Save to Google Drive"),mxResources.get("cancel")):this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
+DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var f=0;null!=b&&f<b.length;f++){var m=b[f];null!=m.id&&0==m.id.indexOf("extFont_")&&m.parentNode.removeChild(m)}};
DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();null!=b&&(this.ui.setFileData(b),this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages)));this.installListeners();this.isSyncSupported()&&this.startSync();EditorUi.debug("DrawioFile.open",[this])};DrawioFile.prototype.isPolling=function(){return!1};DrawioFile.prototype.getPollingInterval=function(){return 1E4};DrawioFile.prototype.isSyncSupported=function(){return!1};
DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages&&null!=this.ui.pages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,f){b(null)};
-DrawioFile.prototype.loadDescriptor=function(b,f){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,f){this.loadDescriptor(mxUtils.bind(this,function(l){b(l)}),f)};DrawioFile.prototype.patchDescriptor=function(b,f){this.setDescriptorEtag(b,this.getDescriptorEtag(f));this.descriptorChanged()};
+DrawioFile.prototype.loadDescriptor=function(b,f){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,f){this.loadDescriptor(mxUtils.bind(this,function(m){b(m)}),f)};DrawioFile.prototype.patchDescriptor=function(b,f){this.setDescriptorEtag(b,this.getDescriptorEtag(f));this.descriptorChanged()};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};
DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,f){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,f){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};DrawioFile.prototype.getDescriptor=function(){return null};
@@ -3136,47 +3140,47 @@ this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener)
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
DrawioFile.prototype.addAllSavedStatus=function(b){if(null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this){b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));var f=this.isRevisionHistorySupported()&&b!=mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+f+'title="'+b+'">'+b+(this.isLocked()?' <img class="geToolbarButton" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+
Editor.lockedImage+'"/>':"")+"</div>")}};
-DrawioFile.prototype.saveDraft=function(b){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var f={type:"draft",created:this.created,modified:(new Date).getTime(),data:null!=b?b:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(f));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[f])}catch(l){this.removeDraft()}};
+DrawioFile.prototype.saveDraft=function(b){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var f={type:"draft",created:this.created,modified:(new Date).getTime(),data:null!=b?b:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(f));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[f])}catch(m){this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};
DrawioFile.prototype.addUnsavedStatus=function(b){this.inConflictState||null==this.ui.statusContainer||this.ui.getCurrentFile()!=this||(b instanceof Error&&null!=b.message&&""!=b.message?this.ui.updateStatus(mxUtils.bind(this,function(){var f=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+f+'" data-title="'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+'" data-message="'+mxUtils.htmlEntities(b.message)+'" class="geStatusAlert">'+f+" ("+mxUtils.htmlEntities(b.message)+
-")</div>")})):(this.ui.updateStatus(mxUtils.bind(this,function(){var f=this.getErrorMessage(b);if(null==f&&null!=this.lastSaved){var l=this.ui.timeSince(new Date(this.lastSaved));null!=l&&(f=mxResources.get("lastSaved",[l]))}null!=f&&60<f.length&&(f=f.substring(0,60)+"...");f=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=f&&""!=f?" ("+mxUtils.htmlEntities(f)+")":"");l='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"';this.ui.editor.setStatus("<div "+
-l+' title="'+f+'" class="geStatusAlert">'+f+"</div>")})),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=
+")</div>")})):(this.ui.updateStatus(mxUtils.bind(this,function(){var f=this.getErrorMessage(b);if(null==f&&null!=this.lastSaved){var m=this.ui.timeSince(new Date(this.lastSaved));null!=m&&(f=mxResources.get("lastSaved",[m]))}null!=f&&60<f.length&&(f=f.substring(0,60)+"...");f=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=f&&""!=f?" ("+mxUtils.htmlEntities(f)+")":"");m='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"';this.ui.editor.setStatus("<div "+
+m+' title="'+f+'" class="geStatusAlert">'+f+"</div>")})),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=
null;this.saveDraft()}),EditorUi.draftSaveDelay||0))))};DrawioFile.prototype.addConflictStatus=function(b,f){this.ui.updateStatus(mxUtils.bind(this,function(){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""),f)}));this.ui.spinner.stop();this.clearAutosave()};
DrawioFile.prototype.setConflictStatus=function(b,f){this.ui.editor.setStatus('<div title="'+b+'" '+(null!=f?'data-action="statusFunction"':"")+' class="geStatusAlert">'+b+'<img data-link="https://www.drawio.com/doc/faq/synchronize" src="'+Editor.helpImage+'" style="margin-left:2px;cursor:help;"/></div>',f)};
-DrawioFile.prototype.showRefreshDialog=function(b,f,l){null==l&&(l=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,f)})):(this.addConflictStatus(l,mxUtils.bind(this,function(){this.showRefreshDialog(b,f)})),this.ui.showError(mxResources.get("warning")+" ("+l+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(mxUtils.bind(this,
+DrawioFile.prototype.showRefreshDialog=function(b,f,m){null==m&&(m=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,f)})):(this.addConflictStatus(m,mxUtils.bind(this,function(){this.showRefreshDialog(b,f)})),this.ui.showError(mxResources.get("warning")+" ("+m+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(mxUtils.bind(this,
function(){null!=b&&b();this.ui.alert(mxResources.get("copyCreated"))}),f)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.reloadFile(mxUtils.bind(this,function(){this.ui.spinner.stop();null!=b&&b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=f&&f()}))}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
-DrawioFile.prototype.showCopyDialog=function(b,f,l){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,f)}),null,mxResources.get("overwrite"),l,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
+DrawioFile.prototype.showCopyDialog=function(b,f,m){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,f)}),null,mxResources.get("overwrite"),m,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
DrawioFile.prototype.showConflictDialog=function(b,f){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),f,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,f){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var l=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),u=mxResources.get("redirectToNewApp");null!=f&&(u+=" ("+f+")");f=mxUtils.bind(this,function(){var y=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==l?window.location.reload():window.location.href=
-l});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()});null!=b?this.isModified()?this.ui.confirm(u,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(u,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+DrawioFile.prototype.redirectToNewApp=function(b,f){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var m=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),t=mxResources.get("redirectToNewApp");null!=f&&(t+=" ("+f+")");f=mxUtils.bind(this,function(){var y=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==m?window.location.reload():window.location.href=
+m});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()});null!=b?this.isModified()?this.ui.confirm(t,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(t,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
f)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified(),"remoteFileChanged",null==this.sync?"n/a":this.sync.remoteFileChanged),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")")})):
this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus()})),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.clearStatus())};
-DrawioFile.prototype.handleFileError=function(b,f){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,f):(this.isModified()&&this.addUnsavedStatus(b),f?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||this.ui.updateStatus(mxUtils.bind(this,function(){var l=this.getErrorMessage(b);null!=l&&60<l.length&&(l=l.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+
-(null!=l?" ("+mxUtils.htmlEntities(l)+")":"")+"</div>")}))))};
-DrawioFile.prototype.handleConflictError=function(b,f){var l=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),u=mxUtils.bind(this,function(C){this.handleFileError(C,!0)}),y=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,l,u,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),q=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,l,u,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),u)});"none"==DrawioFile.SYNC?this.showCopyDialog(l,u,y):this.invalidChecksum&&f?this.showRefreshDialog(l,u,this.getErrorMessage(b)):f?this.showConflictDialog(y,q):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(l,u)}))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT?f=mxResources.get("timeout"):"0"==f&&(f=mxResources.get("noResponse"));return f};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
-DrawioFile.prototype.compressionChanged=function(b){var f=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=f)for(var l=0;l<f.length;l++){var u=f[l].node;if(null!=u&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=f[l].getId())){var y=u.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;var q=Graph.decompress(mxUtils.getNodeValue(u));b?0==q.length&&null!=y&&(EditorUi.removeChildNodes(u),mxUtils.setTextContent(u,Graph.compressNode(y)),EditorUi.debug("DrawioFile.compressionChanged",
-[this],"Page "+l+" compressed")):0<q.length&&null==y&&(EditorUi.removeChildNodes(u),u.appendChild(mxUtils.parseXml(q).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+l+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};
+DrawioFile.prototype.handleFileError=function(b,f){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,f):(this.isModified()&&this.addUnsavedStatus(b),f?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||this.ui.updateStatus(mxUtils.bind(this,function(){var m=this.getErrorMessage(b);null!=m&&60<m.length&&(m=m.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+
+(null!=m?" ("+mxUtils.htmlEntities(m)+")":"")+"</div>")}))))};
+DrawioFile.prototype.handleConflictError=function(b,f){var m=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),t=mxUtils.bind(this,function(B){this.handleFileError(B,!0)}),y=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,m,t,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),q=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,m,t,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),t)});"none"==DrawioFile.SYNC?this.showCopyDialog(m,t,y):this.invalidChecksum&&f?this.showRefreshDialog(m,t,this.getErrorMessage(b)):f?this.showConflictDialog(y,q):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(m,t)}))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT?f=mxResources.get("timeout"):"0"==f&&(f=mxResources.get("noResponse"));return f};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.compressionChanged=function(b){var f=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=f)for(var m=0;m<f.length;m++){var t=f[m].node;if(null!=t&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=f[m].getId())){var y=t.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;var q=Graph.decompress(mxUtils.getNodeValue(t));b?0==q.length&&null!=y&&(EditorUi.removeChildNodes(t),mxUtils.setTextContent(t,Graph.compressNode(y)),EditorUi.debug("DrawioFile.compressionChanged",
+[this],"Page "+m+" compressed")):0<q.length&&null==y&&(EditorUi.removeChildNodes(t),t.appendChild(mxUtils.parseXml(q).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+m+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};
DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosaveDelay",this.autosaveDelay,"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"...")})),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),
this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(f){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(f){this.handleFileError(f)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
-DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(f,mxUtils.bind(this,function(l){EditorUi.debug("DrawioFile.createSecret",[this],"secret",f,"token",l);b(f,l)}),mxUtils.bind(this,function(){b(f)})):b(f)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,f,l,u,y,q,C){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=l&&l()):this.sync.fileSaved(q,f,l,u,y,C)}catch(D){this.invalidChecksum=
-this.inConflictState=!0;this.descriptorChanged();null!=u&&u(D);try{var J=this.getCurrentUser(),S=null!=J?J.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,D)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(D){this.descriptorChanged(),null!=u&&u(D)}};
-DrawioFile.prototype.autosave=function(b,f,l,u){null==this.lastAutosave&&(this.lastAutosave=Date.now());var y=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var q=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==q&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var C=this.isAutosaveRevision();
-C&&(this.lastAutosaveRevision=(new Date).getTime());this.save(C,mxUtils.bind(this,function(J){this.autosaveCompleted();null!=l&&l(J)}),mxUtils.bind(this,function(J){null!=u&&u(J)}))}else this.isModified()||this.ui.clearStatus(),null!=l&&l(null)}catch(J){null!=u&&u(J)}}),y);this.autosaveThread=q;EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"delay",b,"maxDelay",f,"actualDelay",y,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
+DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(f,mxUtils.bind(this,function(m){EditorUi.debug("DrawioFile.createSecret",[this],"secret",f,"token",m);b(f,m)}),mxUtils.bind(this,function(){b(f)})):b(f)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
+DrawioFile.prototype.fileSaved=function(b,f,m,t,y,q,B){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=m&&m()):this.sync.fileSaved(q,f,m,t,y,B)}catch(D){this.invalidChecksum=
+this.inConflictState=!0;this.descriptorChanged();null!=t&&t(D);try{var I=this.getCurrentUser(),S=null!=I?I.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,D)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(D){this.descriptorChanged(),null!=t&&t(D)}};
+DrawioFile.prototype.autosave=function(b,f,m,t){null==this.lastAutosave&&(this.lastAutosave=Date.now());var y=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var q=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==q&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var B=this.isAutosaveRevision();
+B&&(this.lastAutosaveRevision=(new Date).getTime());this.save(B,mxUtils.bind(this,function(I){this.autosaveCompleted();null!=m&&m(I)}),mxUtils.bind(this,function(I){null!=t&&t(I)}))}else this.isModified()||this.ui.clearStatus(),null!=m&&m(null)}catch(I){null!=t&&t(I)}}),y);this.autosaveThread=q;EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"delay",b,"maxDelay",f,"actualDelay",y,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
-DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(f){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,f){if(null!=b&&null!=f){var l=b.lastIndexOf(".");b=0<l?b.substring(l):"";l=f.lastIndexOf(".");return b===(0<l?f.substring(l):"")}return b==f};
+DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(f){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,f){if(null!=b&&null!=f){var m=b.lastIndexOf(".");b=0<m?b.substring(m):"";m=f.lastIndexOf(".");return b===(0<m?f.substring(m):"")}return b==f};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,l){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,l,u,y,q,C){DrawioFile.call(this,b,f);this.title=l;this.mode=u?null:App.MODE_DEVICE;this.fileHandle=y;this.desc=q;this.editable=C};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
-LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,f,l,u,y){this.saveAs(this.title,f,l,u,y)};LocalFile.prototype.saveAs=function(b,f,l,u,y){this.saveFile(b,!1,f,l,null,u,y)};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,m){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,m,t,y,q,B){DrawioFile.call(this,b,f);this.title=m;this.mode=t?null:App.MODE_DEVICE;this.fileHandle=y;this.desc=q;this.editable=B};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
+LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,f,m,t,y){this.saveAs(this.title,f,m,t,y)};LocalFile.prototype.saveAs=function(b,f,m,t,y){this.saveFile(b,!1,f,m,null,t,y)};
LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?null!=f&&f({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};
-LocalFile.prototype.saveFile=function(b,f,l,u,y,q,C){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var J=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),D=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),P=mxUtils.bind(this,function(c){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!=u&&u({error:n})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);C||this.desc.lastModified==x.lastModified?n.write(J?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(F){try{var H=this.desc;this.savingFile=!1;this.desc=F;this.fileSaved(S,H,D,g);this.removeDraft()}catch(M){g(M)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;g(x)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,J?"image/png":"text/xml",J);else if(c.length<MAX_REQUEST_SIZE){var m=b.lastIndexOf(".");m=0<m?b.substring(m+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+m+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(J?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));D()}});J?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){P(c)}),u,this.ui.getCurrentFile()!=this?S:null,f.scale,f.border)):P(S)};
-LocalFile.prototype.rename=function(b,f,l){this.title=b;this.descriptorChanged();null!=f&&f()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);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)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
+LocalFile.prototype.saveFile=function(b,f,m,t,y,q,B){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var I=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),D=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=m&&m()}),P=mxUtils.bind(this,function(c){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!=t&&t({error:n})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);B||this.desc.lastModified==x.lastModified?n.write(I?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(F){try{var G=this.desc;this.savingFile=!1;this.desc=F;this.fileSaved(S,G,D,g);this.removeDraft()}catch(L){g(L)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;g(x)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,I?"image/png":"text/xml",I);else if(c.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf(".");l=0<l?b.substring(l+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(I?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));D()}});I?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){P(c)}),t,this.ui.getCurrentFile()!=this?S:null,f.scale,f.border)):P(S)};
+LocalFile.prototype.rename=function(b,f,m){this.title=b;this.descriptorChanged();null!=f&&f()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);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)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";
Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";
Editor.thinShapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI5Ljc1IDI5Ljc1Wm0tMTMgNS40NXEuNC4wNS43NS4wNUgxOS4wNXY0LjY1cTAgLjI1LjE3NS40MjV0LjQyNS4xNzVIMzkuOXEuMjUgMCAuNDI1LS4xNzV0LjE3NS0uNDI1VjE5LjY1cTAtLjI1LS4xNzUtLjQyNXQtLjQyNS0uMTc1aC00LjY1VjE3LjVxMC0uMzUtLjA1LS43NWg0LjdxMS4xNSAwIDIgLjg3NS44NS44NzUuODUgMi4wMjVWMzkuOXEwIDEuMTUtLjg1IDItLjg1Ljg1LTIgLjg1SDE5LjY1cS0xLjE1IDAtMi4wMjUtLjg1dC0uODc1LTJabTEuNS0zLjk1cS01LjQ1IDAtOS4yMjUtMy44LTMuNzc1LTMuOC0zLjc3NS05LjIgMC01LjQ1IDMuNzc1LTkuMjI1UTEyLjggNS4yNSAxOC4yNSA1LjI1cTUuNCAwIDkuMiAzLjc3NSAzLjggMy43NzUgMy44IDkuMjI1IDAgNS40LTMuOCA5LjItMy44IDMuOC05LjIgMy44Wm0tLjA1LTIuM3E0LjQ1IDAgNy42LTMuMTI1IDMuMTUtMy4xMjUgMy4xNS03LjU3NXQtMy4xMjUtNy42UTIyLjcgNy41IDE4LjI1IDcuNXQtNy42IDMuMTI1UTcuNSAxMy43NSA3LjUgMTguMnQzLjEyNSA3LjZxMy4xMjUgMy4xNSA3LjU3NSAzLjE1Wm0uMDUtMTAuN1oiLz48L3N2Zz4=";
@@ -3218,1077 +3222,1084 @@ Editor.chevronLeftImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3d
Editor.rightPanelOpenImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDYwLTMyMHYtMzIwTDMwMC00ODBsMTYwIDE2MFpNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoNTYwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2NTYwcTAgMzMtMjMuNSA1Ni41VDc2MC0xMjBIMjAwWm00NDAtODBoMTIwdi01NjBINjQwdjU2MFptLTgwIDB2LTU2MEgyMDB2NTYwaDM2MFptODAgMGgxMjAtMTIwWiIvPjwvc3ZnPg==";
Editor.rightPanelCloseImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzAwLTY0MHYzMjBsMTYwLTE2MC0xNjAtMTYwWk0yMDAtMTIwcS0zMyAwLTU2LjUtMjMuNVQxMjAtMjAwdi01NjBxMC0zMyAyMy41LTU2LjVUMjAwLTg0MGg1NjBxMzMgMCA1Ni41IDIzLjVUODQwLTc2MHY1NjBxMCAzMy0yMy41IDU2LjVUNzYwLTEyMEgyMDBabTQ0MC04MGgxMjB2LTU2MEg2NDB2NTYwWm0tODAgMHYtNTYwSDIwMHY1NjBoMzYwWm04MCAwaDEyMC0xMjBaIi8+PC9zdmc+";
Editor.spinImage="data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==";
+Editor.svgSpinImage="data:image/svg+xml;base64,77u/PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyMDAgMjAwJz4KICAgIDxyYWRpYWxHcmFkaWVudCBpZD0nYTUnIGN4PScuNjYnIGZ4PScuNjYnIGN5PScuMzEyNScgZnk9Jy4zMTI1JyBncmFkaWVudFRyYW5zZm9ybT0nc2NhbGUoMS41KSc+CiAgICAgICAgPHN0b3Agb2Zmc2V0PScwJyBzdG9wLWNvbG9yPScjNjc2NzY3Jz48L3N0b3A+CiAgICAgICAgPHN0b3Agb2Zmc2V0PScuMycgc3RvcC1jb2xvcj0nIzY3Njc2Nycgc3RvcC1vcGFjaXR5PScuOSc+PC9zdG9wPgogICAgICAgIDxzdG9wIG9mZnNldD0nLjYnIHN0b3AtY29sb3I9JyM2NzY3NjcnIHN0b3Atb3BhY2l0eT0nLjYnPjwvc3RvcD4KICAgICAgICA8c3RvcCBvZmZzZXQ9Jy44JyBzdG9wLWNvbG9yPScjNjc2NzY3JyBzdG9wLW9wYWNpdHk9Jy4zJz48L3N0b3A+CiAgICAgICAgPHN0b3Agb2Zmc2V0PScxJyBzdG9wLWNvbG9yPScjNjc2NzY3JyBzdG9wLW9wYWNpdHk9JzAnPjwvc3RvcD4KICAgIDwvcmFkaWFsR3JhZGllbnQ+CiAgICA8Y2lyY2xlIHRyYW5zZm9ybS1vcmlnaW49J2NlbnRlcicgZmlsbD0nbm9uZScgc3Ryb2tlPSd1cmwoI2E1KScgc3Ryb2tlLXdpZHRoPSc1MCcgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJyBzdHJva2UtZGFzaGFycmF5PScyMDAgMTAwMCcgc3Ryb2tlLWRhc2hvZmZzZXQ9JzAnIGN4PScxMDAnIGN5PScxMDAnIHI9JzcwJz4KICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybSB0eXBlPSdyb3RhdGUnIGF0dHJpYnV0ZU5hbWU9J3RyYW5zZm9ybScgY2FsY01vZGU9J3NwbGluZScgZHVyPScyJyB2YWx1ZXM9JzM2MDswJyBrZXlUaW1lcz0nMDsxJyBrZXlTcGxpbmVzPScwIDAgMSAxJyByZXBlYXRDb3VudD0naW5kZWZpbml0ZSc+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+CiAgICA8Y2lyY2xlIHRyYW5zZm9ybS1vcmlnaW49J2NlbnRlcicgZmlsbD0nbm9uZScgb3BhY2l0eT0nLjInIHN0cm9rZT0nIzY3Njc2Nycgc3Ryb2tlLXdpZHRoPSc1MCcgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJyBjeD0nMTAwJyBjeT0nMTAwJyByPSc3MCc+PC9jaXJjbGU+Cjwvc3ZnPg==";
Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=";
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.enableUncompressedLibraries=!1;Editor.enableCustomProperties=!0;
Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||"1"==urlParams.enableSW||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(k){Editor.enableServiceWorker=!1}Editor.enableWebFonts=
-"1"!=urlParams["safe-style-src"]&&!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.pasteAtMousePointer=!0;Editor.defaultTextStyle="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;";
-Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.gptModel=null!=urlParams["gpt-model"]?decodeURIComponent(urlParams["gpt-model"]):"gpt-3.5-turbo";Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):
-"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.createInheritProperty=function(k,v){return{name:v,dispName:k,type:"bool",defVal:!1,isVisible:function(I,N){return 1==I.vertices.length?(N=N.editorUi.editor.graph.model,I=N.getParent(I.vertices[0]),N.isEdge(I)||N.isVertex(I)):!1},getValue:function(I,N){return"inherit"==
-mxUtils.getValue(I.style,v)},valueChanged:function(I,N,T,W){N=W.editorUi.editor.graph;"1"==I?N.setCellStyles(v,"inherit",T.vertices):N.setCellStyles(v,null,T.vertices)}}};Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(k){k.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(k,
-v){return"1"!=mxUtils.getValue(k.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"comic","0")||"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,
-isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",
-dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch",
-"1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(k,
-v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(k,v){return"1"==
-mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",
-type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,
-"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",
-type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},{val:"round",dispName:"Round"}]},{name:"miterlimit",dispName:"Miter Limit",type:"int",min:1,defVal:4,isVisible:function(k,v){k=mxUtils.getValue(k.style,"linejoin","miter");return"miter"==k||"miter-clip"==k}}];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(k){return"orthogonalEdgeStyle"==mxUtils.getValue(k.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,isVisible:function(k){return"entityRelationEdgeStyle"==mxUtils.getValue(k.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:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",type:"color",defVal:null},{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:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"flowAnimation",null)}},{name:"flowAnimationTimingFunction",dispName:"Flow Timing",type:"enum",defVal:"linear",enumList:[{val:"linear",dispName:"Linear"},{val:"ease",dispName:"Ease"},{val:"ease-in",dispName:"Ease-in"},
-{val:"ease-out",dispName:"Ease-out"},{val:"ease-in-out",dispName:"Ease-in-out"}],isVisible:function(k){return"1"==mxUtils.getValue(k.style,"flowAnimation",null)}},{name:"flowAnimationDirection",dispName:"Flow Direction",type:"enum",defVal:"normal",enumList:[{val:"normal",dispName:"Normal"},{val:"reverse",dispName:"Reverse"},{val:"alternate",dispName:"Alternate"},{val:"alternate-reverse",dispName:"Alternate-Reverse"}],isVisible:function(k){return"1"==mxUtils.getValue(k.style,"flowAnimation",null)}},
-{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:"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(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTableCell(k.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,
-defVal:1,isVisible:function(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTableCell(k.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(k,v){k=v.editorUi.editor.graph.getCellStyle(1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null);return"1"==mxUtils.getValue(k,"resizeLastRow","0")},isVisible:function(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTable(k.vertices[0])}},
-{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(k,v){k=v.editorUi.editor.graph.getCellStyle(1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null);return"1"==mxUtils.getValue(k,"resizeLast","0")},isVisible:function(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTable(k.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(k,v){return v.editorUi.editor.graph.isCellConnectable(0<
-k.vertices.length&&0==k.edges.length?k.vertices[0]:null)},isVisible:function(k,v){return 0<k.vertices.length&&0==k.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",getDefaultValue:function(k,v){k=0<k.vertices.length&&0==k.edges.length?k.vertices[0]:null;v=v.editorUi.editor.graph;return null!=k&&v.isSwimlane(k)},isVisible:function(k,v){return 0<k.vertices.length&&0==k.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(k,v){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;v=v.editorUi.editor.graph;return null!=k&&(v.isSwimlane(k)||0<
-v.model.getChildCount(k))},isVisible:function(k,v){return 1==k.vertices.length&&0==k.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(k,v){var I=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;v=v.editorUi.editor.graph;return null!=I&&(v.isContainer(I)&&"0"!=k.style.collapsible||!v.isContainer(I)&&"1"==k.style.collapsible)},isVisible:function(k,v){return 1==k.vertices.length&&0==k.edges.length}},{name:"recursiveResize",dispName:"Resize Children",
-type:"bool",defVal:!0,isVisible:function(k,v){return 1==k.vertices.length&&0==k.edges.length&&!v.editorUi.editor.graph.isSwimlane(k.vertices[0])&&null==mxUtils.getValue(k.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(k,v){v=v.editorUi.editor.graph.model;return 0<k.vertices.length?v.isVertex(v.getParent(k.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(k,v){k=0<k.vertices.length?v.editorUi.editor.graph.getCellGeometry(k.vertices[0]):null;return null!=k&&!k.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",
-defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(k,v){return 0<k.vertices.length&&v.editorUi.editor.graph.isAutoSizeCell(k.vertices[0])}},{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(k,v){var I=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||v.editorUi.editor.graph.isSwimlane(k.vertices[0])||
-null==I||I==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(k,v){return 0<k.vertices.length&&v.editorUi.editor.graph.isContainer(k.vertices[0])}},Editor.createInheritProperty("Inherit Font Family",mxConstants.STYLE_FONTFAMILY),Editor.createInheritProperty("Inherit Font Size",mxConstants.STYLE_FONTSIZE),
-Editor.createInheritProperty("Inherit Font Color",mxConstants.STYLE_FONTCOLOR),Editor.createInheritProperty("Inherit Fill Color",mxConstants.STYLE_FILLCOLOR),Editor.createInheritProperty("Inherit Stroke Color",mxConstants.STYLE_STROKECOLOR)].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## An optional data object can be specified to define the metadata for the connector.\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, width 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,,[email protected],default,#6c8ebf,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.canvasSupported=!1;(function(){try{var k=document.createElement("canvas");Editor.canvasSupported=!(!k.getContext||!k.getContext("2d"))}catch(v){}})();Editor.useCanvasForExport=!1;(function(){try{var k=document.createElement("canvas"),v=new Image;v.onload=function(){try{k.getContext("2d").drawImage(v,0,0);var I=k.toDataURL("image/png");Editor.useCanvasForExport=null!=I&&6<I.length}catch(N){}};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(I){}})();
-Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var k=document.createElement("canvas");k.width=k.height=1;var v=k.toDataURL("image/jpeg");Editor.jpgSupported=null!==v.match("image/jpeg");v=k.toDataURL("image/webp");Editor.webpSupported=null!==v.match("image/webp")}catch(I){}})();Editor.loadCompatibleCss=function(k){mxUtils.lightDarkColorSupported||mxUtils.get(k||"styles/grapheditor.css",mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){var I=document.createElement("style");
-I.type="text/css";var N=I.appendChild,T=document,W=T.createTextNode;v=v.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(v=v.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(U){}N.call(I,W.call(T,v));document.head.appendChild(I)}}))};Editor.createRoughCanvas=function(k){var v=
-rough.canvas({getContext:function(){return k}});v.draw=function(I){var N=I.sets||[];I=I.options||this.getDefaultOptions();for(var T=0;T<N.length;T++){var W=N[T];switch(W.type){case "path":null!=I.stroke&&this._drawToContext(k,W,I);break;case "fillPath":this._drawToContext(k,W,I);break;case "fillSketch":this.fillSketch(k,W,I)}}};v.fillSketch=function(I,N,T){var W=k.state.strokeColor,U=k.state.strokeWidth,Y=k.state.strokeAlpha,fa=k.state.dashed,na=T.fillWeight;0>na&&(na=T.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);
-k.setStrokeColor(T.fill||"");k.setStrokeWidth(na);k.setDashed(!1);this._drawToContext(I,N,T);k.setDashed(fa);k.setStrokeWidth(U);k.setStrokeColor(W);k.setStrokeAlpha(Y)};v._drawToContext=function(I,N,T){I.begin();for(var W=0;W<N.ops.length;W++){var U=N.ops[W],Y=U.data;switch(U.op){case "move":I.moveTo(Y[0],Y[1]);break;case "bcurveTo":I.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":I.lineTo(Y[0],Y[1])}}I.end();"fillPath"===N.type&&T.filled?I.fill():I.stroke()};return v};(function(){function k(W,
+!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.pasteAtMousePointer=!0;Editor.defaultTextStyle="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;";
+Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.geminiApiKey=null!=urlParams["gemini-api-key"]?decodeURIComponent(urlParams["gemini-api-key"]):null;Editor.gptModels={"GPT-5.1":"gpt-5.1-2025-11-13","GPT-4.1":"gpt-4.1-2025-04-14",
+"GPT-4o":"chatgpt-4o-latest","GPT-3.5":"gpt-3.5-turbo-0125","Gemini 3 Pro Preview":"gemini-3-pro-preview","Gemini 2.5 Pro":"gemini-2.5-pro","Gemini 2.5 Flash":"gemini-2.5-flash","Gemini 2.0 Flash":"gemini-2.0-flash"};Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=
+null;Editor.createInheritProperty=function(k,v){return{name:v,dispName:k,type:"bool",defVal:!1,isVisible:function(J,N){return 1==J.vertices.length?(N=N.editorUi.editor.graph.model,J=N.getParent(J.vertices[0]),N.isEdge(J)||N.isVertex(J)):!1},getValue:function(J,N){return"inherit"==mxUtils.getValue(J.style,v)},valueChanged:function(J,N,T,W){N=W.editorUi.editor.graph;"1"==J?N.setCellStyles(v,"inherit",T.vertices):N.setCellStyles(v,null,T.vertices)}}};Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",
+type:"bool",defVal:!1,onChange:function(k){k.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(k,v){return"1"!=mxUtils.getValue(k.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"comic","0")||"1"==mxUtils.getValue(k.style,
+"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(k,v){return"1"==
+mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",
+type:"bool",defVal:!1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},
+{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],
+isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*
+mxConstants.SHADOW_OPACITY},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,
+dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,
+mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},{val:"round",dispName:"Round"}]},{name:"miterlimit",dispName:"Miter Limit",type:"int",min:1,defVal:4,
+isVisible:function(k,v){k=mxUtils.getValue(k.style,"linejoin","miter");return"miter"==k||"miter-clip"==k}}];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(k){return"orthogonalEdgeStyle"==mxUtils.getValue(k.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,isVisible:function(k){return"entityRelationEdgeStyle"==
+mxUtils.getValue(k.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:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",type:"color",defVal:null},{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:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"flowAnimation",null)}},{name:"flowAnimationTimingFunction",
+dispName:"Flow Timing",type:"enum",defVal:"linear",enumList:[{val:"linear",dispName:"Linear"},{val:"ease",dispName:"Ease"},{val:"ease-in",dispName:"Ease-in"},{val:"ease-out",dispName:"Ease-out"},{val:"ease-in-out",dispName:"Ease-in-out"}],isVisible:function(k){return"1"==mxUtils.getValue(k.style,"flowAnimation",null)}},{name:"flowAnimationDirection",dispName:"Flow Direction",type:"enum",defVal:"normal",enumList:[{val:"normal",dispName:"Normal"},{val:"reverse",dispName:"Reverse"},{val:"alternate",
+dispName:"Alternate"},{val:"alternate-reverse",dispName:"Alternate-Reverse"}],isVisible:function(k){return"1"==mxUtils.getValue(k.style,"flowAnimation",null)}},{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:"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(k,v){v=v.editorUi.editor.graph;
+return 1==k.vertices.length&&0==k.edges.length&&v.isTableCell(k.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTableCell(k.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(k,v){k=v.editorUi.editor.graph.getCellStyle(1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null);return"1"==mxUtils.getValue(k,
+"resizeLastRow","0")},isVisible:function(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTable(k.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(k,v){k=v.editorUi.editor.graph.getCellStyle(1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null);return"1"==mxUtils.getValue(k,"resizeLast","0")},isVisible:function(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTable(k.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(k,v){return v.editorUi.editor.graph.isCellConnectable(0<k.vertices.length&&0==k.edges.length?k.vertices[0]:null)},isVisible:function(k,v){return 0<k.vertices.length&&0==k.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",getDefaultValue:function(k,v){k=0<k.vertices.length&&0==k.edges.length?k.vertices[0]:null;v=v.editorUi.editor.graph;return null!=k&&v.isSwimlane(k)},isVisible:function(k,v){return 0<k.vertices.length&&0==k.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(k,
+v){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;v=v.editorUi.editor.graph;return null!=k&&(v.isSwimlane(k)||0<v.model.getChildCount(k))},isVisible:function(k,v){return 1==k.vertices.length&&0==k.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(k,v){var J=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;v=v.editorUi.editor.graph;return null!=J&&(v.isContainer(J)&&"0"!=k.style.collapsible||!v.isContainer(J)&&"1"==k.style.collapsible)},
+isVisible:function(k,v){return 1==k.vertices.length&&0==k.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(k,v){return 1==k.vertices.length&&0==k.edges.length&&!v.editorUi.editor.graph.isSwimlane(k.vertices[0])&&null==mxUtils.getValue(k.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(k,v){v=v.editorUi.editor.graph.model;return 0<k.vertices.length?
+v.isVertex(v.getParent(k.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(k,v){k=0<k.vertices.length?v.editorUi.editor.graph.getCellGeometry(k.vertices[0]):null;return null!=k&&!k.relative}},
+{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(k,v){return 0<k.vertices.length&&v.editorUi.editor.graph.isAutoSizeCell(k.vertices[0])}},{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(k,
+v){var J=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||v.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==J||J==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(k,v){return 0<k.vertices.length&&v.editorUi.editor.graph.isContainer(k.vertices[0])}},
+Editor.createInheritProperty("Inherit Font Family",mxConstants.STYLE_FONTFAMILY),Editor.createInheritProperty("Inherit Font Size",mxConstants.STYLE_FONTSIZE),Editor.createInheritProperty("Inherit Font Color",mxConstants.STYLE_FONTCOLOR),Editor.createInheritProperty("Inherit Fill Color",mxConstants.STYLE_FILLCOLOR),Editor.createInheritProperty("Inherit Stroke Color",mxConstants.STYLE_STROKECOLOR)].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## An optional data object can be specified to define the metadata for the connector.\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, width 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,,[email protected],default,#6c8ebf,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.canvasSupported=!1;(function(){try{var k=document.createElement("canvas");Editor.canvasSupported=!(!k.getContext||!k.getContext("2d"))}catch(v){}})();Editor.useCanvasForExport=!1;(function(){try{var k=document.createElement("canvas"),v=new Image;v.onload=function(){try{k.getContext("2d").drawImage(v,0,0);var J=k.toDataURL("image/png");Editor.useCanvasForExport=null!=J&&6<J.length}catch(N){}};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(J){}})();
+Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var k=document.createElement("canvas");k.width=k.height=1;var v=k.toDataURL("image/jpeg");Editor.jpgSupported=null!==v.match("image/jpeg");v=k.toDataURL("image/webp");Editor.webpSupported=null!==v.match("image/webp")}catch(J){}})();Editor.loadCompatibleCss=function(k){mxUtils.lightDarkColorSupported||mxUtils.get(k||"styles/grapheditor.css",mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){var J=document.createElement("style");
+J.type="text/css";var N=J.appendChild,T=document,W=T.createTextNode;v=v.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(v=v.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(U){}N.call(J,W.call(T,v));document.head.appendChild(J)}}))};Editor.createRoughCanvas=function(k){var v=
+rough.canvas({getContext:function(){return k}});v.draw=function(J){var N=J.sets||[];J=J.options||this.getDefaultOptions();for(var T=0;T<N.length;T++){var W=N[T];switch(W.type){case "path":null!=J.stroke&&this._drawToContext(k,W,J);break;case "fillPath":this._drawToContext(k,W,J);break;case "fillSketch":this.fillSketch(k,W,J)}}};v.fillSketch=function(J,N,T){var W=k.state.strokeColor,U=k.state.strokeWidth,Y=k.state.strokeAlpha,fa=k.state.dashed,oa=T.fillWeight;0>oa&&(oa=T.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);
+k.setStrokeColor(T.fill||"");k.setStrokeWidth(oa);k.setDashed(!1);this._drawToContext(J,N,T);k.setDashed(fa);k.setStrokeWidth(U);k.setStrokeColor(W);k.setStrokeAlpha(Y)};v._drawToContext=function(J,N,T){J.begin();for(var W=0;W<N.ops.length;W++){var U=N.ops[W],Y=U.data;switch(U.op){case "move":J.moveTo(Y[0],Y[1]);break;case "bcurveTo":J.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":J.lineTo(Y[0],Y[1])}}J.end();"fillPath"===N.type&&T.filled?J.fill():J.stroke()};return v};(function(){function k(W,
U,Y){this.canvas=W;this.rc=U;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;
this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=
mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp=
-"L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(W,U){var Y=1;if(null!=this.shape.state){var fa=this.shape.state.cell.id;if(null!=fa)for(var na=0;na<fa.length;na++)Y=(Y<<5)-Y+fa.charCodeAt(na)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};fa=this.rc.getDefaultOptions();Y.stroke=W?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;W=null;(Y.filled=U)?(Y.fill=
+"L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(W,U){var Y=1;if(null!=this.shape.state){var fa=this.shape.state.cell.id;if(null!=fa)for(var oa=0;oa<fa.length;oa++)Y=(Y<<5)-Y+fa.charCodeAt(oa)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};fa=this.rc.getDefaultOptions();Y.stroke=W?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;W=null;(Y.filled=U)?(Y.fill=
this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,W=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Y.fill="";Y.bowing=mxUtils.getValue(this.shape.style,"bowing",fa.bowing);Y.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",fa.hachureAngle);Y.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",fa.curveFitting);Y.roughness=mxUtils.getValue(this.shape.style,"jiggle",fa.roughness);Y.simplification=mxUtils.getValue(this.shape.style,
"simplification",fa.simplification);Y.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",fa.disableMultiStroke);Y.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",fa.disableMultiStrokeFill);U=mxUtils.getValue(this.shape.style,"hachureGap",-1);Y.hachureGap="auto"==U?-1:U;Y.dashGap=mxUtils.getValue(this.shape.style,"dashGap",U);Y.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",U);Y.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",
U);U=mxUtils.getValue(this.shape.style,"fillWeight",-1);Y.fillWeight="auto"==U?-1:U;U=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==U&&(U="auto");"auto"==U&&(U=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&U.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&U.push(mxUtils.hex2rgb(Editor.darkColor)),U=null!=Y.fill&&(null!=W||0<=mxUtils.indexOf(U,mxUtils.hex2rgb(Y.fill)))?"solid":fa.fillStyle);Y.fillStyle=U;return Y};k.prototype.begin=
function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var W=2;W<arguments.length;W+=2)this.lastX=arguments[W-1],this.lastY=arguments[W],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(W,U){this.passThrough?
this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,W,U),this.lastX=W,this.lastY=U)};k.prototype.moveTo=function(W,U){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,W,U),this.lastX=W,this.lastY=U,this.firstX=W,this.firstY=U)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(W,U,Y,fa){this.passThrough?this.originalQuadTo.apply(this.canvas,
-arguments):(this.addOp(this.quadOp,W,U,Y,fa),this.lastX=Y,this.lastY=fa)};k.prototype.curveTo=function(W,U,Y,fa,na,la){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,W,U,Y,fa,na,la),this.lastX=na,this.lastY=la)};k.prototype.arcTo=function(W,U,Y,fa,na,la,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ya=mxUtils.arcToCurves(this.lastX,this.lastY,W,U,Y,fa,na,la,qa);if(null!=ya)for(var wa=0;wa<ya.length;wa+=6)this.curveTo(ya[wa],
+arguments):(this.addOp(this.quadOp,W,U,Y,fa),this.lastX=Y,this.lastY=fa)};k.prototype.curveTo=function(W,U,Y,fa,oa,la){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,W,U,Y,fa,oa,la),this.lastX=oa,this.lastY=la)};k.prototype.arcTo=function(W,U,Y,fa,oa,la,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ya=mxUtils.arcToCurves(this.lastX,this.lastY,W,U,Y,fa,oa,la,qa);if(null!=ya)for(var wa=0;wa<ya.length;wa+=6)this.curveTo(ya[wa],
ya[wa+1],ya[wa+2],ya[wa+3],ya[wa+4],ya[wa+5]);this.lastX=la;this.lastY=qa}};k.prototype.rect=function(W,U,Y,fa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(W,U,Y,fa,this.getStyle(!0,!0)))};k.prototype.ellipse=function(W,U,Y,fa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(W+Y/2,U+fa/2,Y,fa,this.getStyle(!0,!0)))};k.prototype.roundrect=function(W,
-U,Y,fa,na,la){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(W+na,U),this.lineTo(W+Y-na,U),this.quadTo(W+Y,U,W+Y,U+la),this.lineTo(W+Y,U+fa-la),this.quadTo(W+Y,U+fa,W+Y-na,U+fa),this.lineTo(W+na,U+fa),this.quadTo(W,U+fa,W,U+fa-la),this.lineTo(W,U+la),this.quadTo(W,U,W+na,U))};k.prototype.drawPath=function(W){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),W)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var U in W)this.nextShape.options[U]=
+U,Y,fa,oa,la){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(W+oa,U),this.lineTo(W+Y-oa,U),this.quadTo(W+Y,U,W+Y,U+la),this.lineTo(W+Y,U+fa-la),this.quadTo(W+Y,U+fa,W+Y-oa,U+fa),this.lineTo(W+oa,U+fa),this.quadTo(W,U+fa,W,U+fa-la),this.lineTo(W,U+la),this.quadTo(W,U,W+oa,U))};k.prototype.drawPath=function(W){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),W)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var U in W)this.nextShape.options[U]=
W[U];W.stroke!=mxConstants.NONE&&null!=W.stroke||delete this.nextShape.options.stroke;W.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?
this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.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(W){return new k(W,Editor.createRoughCanvas(W),this)};var v=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(W){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?v.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
-"sketchStyle","rough")?this.createComicCanvas(W):this.createRoughCanvas(W)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(W,U,Y,fa,na){null!=W.handJiggle&&W.handJiggle.passThrough||I.apply(this,arguments)};var N=mxShape.prototype.paint;mxShape.prototype.paint=function(W){var U=W.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=W.handJiggle&&W.handJiggle.constructor==k&&!this.outline){W.save();
-var fa=this.fill,na=this.stroke;this.stroke=this.fill=null;var la=this.configurePointerEvents,qa=W.setStrokeColor;W.setStrokeColor=function(){};var ya=W.setFillColor;W.setFillColor=function(){};Y||null==fa||(this.configurePointerEvents=function(){});W.handJiggle.passThrough=!0;N.apply(this,arguments);W.handJiggle.passThrough=!1;W.setFillColor=ya;W.setStrokeColor=qa;this.configurePointerEvents=la;this.stroke=na;this.fill=fa;W.restore();Y&&null!=fa&&(W.addTolerance=function(){})}N.apply(this,arguments);
-W.addTolerance=U};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(W,U,Y,fa,na,la){null!=W.handJiggle&&W.handJiggle.constructor==k?(W.handJiggle.passThrough=!0,T.apply(this,arguments),W.handJiggle.passThrough=!1):T.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?
-k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,v,I){if(null!=k&&"undefined"!==typeof pako){var N=k.ownerDocument.getElementsByTagName("div"),T=[];if(null!=N&&0<N.length)for(var W=0;W<N.length;W++)if("mxgraph"==N[W].getAttribute("class")){T.push(N[W]);break}0<T.length&&(N=T[0].getAttribute("data-mxgraph"),null!=N?(T=JSON.parse(N),null!=T&&null!=T.xml&&(k=mxUtils.parseXml(T.xml),k=k.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&
-(N=mxUtils.getTextContent(T[0]),N=Graph.decompress(N,null,I),0<N.length&&(k=mxUtils.parseXml(N),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(N=k.getAttribute("content"),null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(cont,N))),null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N)),null!=N&&0<N.length)k=mxUtils.parseXml(N).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||v||(T=null,"diagram"==k.nodeName?T=k:"mxfile"==
-k.nodeName&&(N=k.getElementsByTagName("diagram"),0<N.length&&(T=N[Math.max(0,Math.min(N.length-1,urlParams.page||0))])),null!=T&&(k=Editor.parseDiagramNode(T,I)));null==k||"mxGraphModel"==k.nodeName||v&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,v,I){Editor.validateDiagramNode(k);var N=mxUtils.trim(mxUtils.getTextContent(k)),T=null;0<N.length?(v=Graph.decompress(N,null,v),null!=v&&0<v.length&&(T=mxUtils.parseXml(v).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&
-(T=k[0],I&&(T=Editor.parseDiagramNode(T,v,!1)),v=mxUtils.createXmlDocument(),v.appendChild(v.importNode(T,!0)),T=v.documentElement));return T};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var v=mxUtils.getNodeValue(k),I=null;0<v.length?I=Graph.decompress(v):(k=k.getElementsByTagName("mxGraphModel"),null!=k&&0<k.length&&(I=mxUtils.getXml(k[0])));return I};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var v=
-new mxCodec,I=new mxGraphModel;k.appendChild(v.encode(I))}return k};Editor.extractGraphModelFromPdf=function(k){var v=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var I=k.indexOf("EmbeddedFile");if(-1<I){var N=k.indexOf("stream",I)+9;if(0<k.substring(I,N).indexOf("application#2Fvnd.jgraph.mxfile")){var T=k.indexOf("endstream",N-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"})}}for(I=
-k.indexOf("/ObjStm");0<I;){N=k.indexOf("stream",I)+9;T=k.indexOf("endstream",N-1);N=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"});T=N.indexOf("/Subject <");if(0<T){I=N.substring(T+14,N.indexOf(">",T));if(null!=I){v=I;I=[];for(N=0;N<v.length;N+=2)T=v.substr(N,2),"00"!=T&&I.push(String.fromCharCode(parseInt(T,16)));v=I.join("")}break}I=k.indexOf("/ObjStm",I+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){I="";T=N=0;for(var W=[],U=null;T<k.length;){var Y=k.charCodeAt(T);T+=
-1;10!=Y&&(I+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(N)?N++:N=0;if(19==N){var fa=k.indexOf("%3C%2Fmxfile%3E",T)+15;T-=9;if(fa>T){v=k.substring(T,fa);break}}10==Y&&("endobj"==I?U=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(U=[],W[I.split(" ")[0]]=U):null!=U&&U.push(I),I="")}}null==v&&null!=W&&(v=Editor.extractGraphModelFromXref(W));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=
-k.trailer,I=null;null!=v&&(v=/.* \/Info (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(v=k[v[1]],null!=v&&(v=/.* \/Subject (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(k=k[v[1]],null!=k&&(k=k.join("\n"),I=k.substring(1,k.length-1))))));return I};Editor.extractParserError=function(k,v){var I=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(I=v||mxResources.get("invalidChars"),v=k[0].getElementsByTagName("div"),0<v.length&&(I=mxUtils.getTextContent(v[0])));
-return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(k,v){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=v))};Editor.mermaidToDrawio=function(k,v,I){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,v,I)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");if(null!=k.customCss){var v=document.createElement("style");v.type="text/css";v.appendChild(document.createTextNode(k.customCss));document.head.appendChild(v)}null!=
+"sketchStyle","rough")?this.createComicCanvas(W):this.createRoughCanvas(W)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(W,U,Y,fa,oa){null!=W.handJiggle&&W.handJiggle.passThrough||J.apply(this,arguments)};var N=mxShape.prototype.paint;mxShape.prototype.paint=function(W){var U=W.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=W.handJiggle&&W.handJiggle.constructor==k&&!this.outline){W.save();
+var fa=this.fill,oa=this.stroke;this.stroke=this.fill=null;var la=this.configurePointerEvents,qa=W.setStrokeColor;W.setStrokeColor=function(){};var ya=W.setFillColor;W.setFillColor=function(){};Y||null==fa||(this.configurePointerEvents=function(){});W.handJiggle.passThrough=!0;N.apply(this,arguments);W.handJiggle.passThrough=!1;W.setFillColor=ya;W.setStrokeColor=qa;this.configurePointerEvents=la;this.stroke=oa;this.fill=fa;W.restore();Y&&null!=fa&&(W.addTolerance=function(){})}N.apply(this,arguments);
+W.addTolerance=U};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(W,U,Y,fa,oa,la){null!=W.handJiggle&&W.handJiggle.constructor==k?(W.handJiggle.passThrough=!0,T.apply(this,arguments),W.handJiggle.passThrough=!1):T.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?
+k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,v,J){if(null!=k&&"undefined"!==typeof pako){var N=k.ownerDocument.getElementsByTagName("div"),T=[];if(null!=N&&0<N.length)for(var W=0;W<N.length;W++)if("mxgraph"==N[W].getAttribute("class")){T.push(N[W]);break}0<T.length&&(N=T[0].getAttribute("data-mxgraph"),null!=N?(T=JSON.parse(N),null!=T&&null!=T.xml&&(k=mxUtils.parseXml(T.xml),k=k.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&
+(N=mxUtils.getTextContent(T[0]),N=Graph.decompress(N,null,J),0<N.length&&(k=mxUtils.parseXml(N),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(N=k.getAttribute("content"),null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(cont,N))),null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N)),null!=N&&0<N.length)k=mxUtils.parseXml(N).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||v||(T=null,"diagram"==k.nodeName?T=k:"mxfile"==
+k.nodeName&&(N=k.getElementsByTagName("diagram"),0<N.length&&(T=N[Math.max(0,Math.min(N.length-1,urlParams.page||0))])),null!=T&&(k=Editor.parseDiagramNode(T,J)));null==k||"mxGraphModel"==k.nodeName||v&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,v,J){Editor.validateDiagramNode(k);var N=mxUtils.trim(mxUtils.getTextContent(k)),T=null;0<N.length?(v=Graph.decompress(N,null,v),null!=v&&0<v.length&&(T=mxUtils.parseXml(v).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&
+(T=k[0],J&&(T=Editor.parseDiagramNode(T,v,!1)),v=mxUtils.createXmlDocument(),v.appendChild(v.importNode(T,!0)),T=v.documentElement));return T};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var v=mxUtils.getNodeValue(k),J=null;0<v.length?J=Graph.decompress(v):(k=k.getElementsByTagName("mxGraphModel"),null!=k&&0<k.length&&(J=mxUtils.getXml(k[0])));return J};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var v=
+new mxCodec,J=new mxGraphModel;k.appendChild(v.encode(J))}return k};Editor.extractGraphModelFromPdf=function(k){var v=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var J=k.indexOf("EmbeddedFile");if(-1<J){var N=k.indexOf("stream",J)+9;if(0<k.substring(J,N).indexOf("application#2Fvnd.jgraph.mxfile")){var T=k.indexOf("endstream",N-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"})}}for(J=
+k.indexOf("/ObjStm");0<J;){N=k.indexOf("stream",J)+9;T=k.indexOf("endstream",N-1);N=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"});T=N.indexOf("/Subject <");if(0<T){J=N.substring(T+14,N.indexOf(">",T));if(null!=J){v=J;J=[];for(N=0;N<v.length;N+=2)T=v.substr(N,2),"00"!=T&&J.push(String.fromCharCode(parseInt(T,16)));v=J.join("")}break}J=k.indexOf("/ObjStm",J+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){J="";T=N=0;for(var W=[],U=null;T<k.length;){var Y=k.charCodeAt(T);T+=
+1;10!=Y&&(J+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(N)?N++:N=0;if(19==N){var fa=k.indexOf("%3C%2Fmxfile%3E",T)+15;T-=9;if(fa>T){v=k.substring(T,fa);break}}10==Y&&("endobj"==J?U=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(U=[],W[J.split(" ")[0]]=U):null!=U&&U.push(J),J="")}}null==v&&null!=W&&(v=Editor.extractGraphModelFromXref(W));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=
+k.trailer,J=null;null!=v&&(v=/.* \/Info (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(v=k[v[1]],null!=v&&(v=/.* \/Subject (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(k=k[v[1]],null!=k&&(k=k.join("\n"),J=k.substring(1,k.length-1))))));return J};Editor.extractParserError=function(k,v){var J=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(J=v||mxResources.get("invalidChars"),v=k[0].getElementsByTagName("div"),0<v.length&&(J=mxUtils.getTextContent(v[0])));
+return null!=J?mxUtils.trim(J):J};Editor.addRetryToError=function(k,v){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=v))};Editor.mermaidToDrawio=function(k,v,J){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,v,J)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");if(null!=k.customCss){var v=document.createElement("style");v.type="text/css";v.appendChild(document.createTextNode(k.customCss));document.head.appendChild(v)}null!=
k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);null!=k.selectParentLayer&&(Graph.selectParentLayer=
k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&(Editor.defaultIncludeDiagram=k.includeDiagram);
null!=k.simpleLabels&&(Editor.simpleLabels=k.simpleLabels);null!=k.pasteAtMousePointer&&(Editor.pasteAtMousePointer=k.pasteAtMousePointer);null!=k.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=k.oneDriveInlinePicker);null!=k.defaultAdaptiveColors?Graph.defaultAdaptiveColors=k.defaultAdaptiveColors:0==k.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=k.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=k.enableLightDarkColors);null!=k.darkColor&&(Editor.darkColor=k.darkColor);
null!=k.darkColorVar&&(Editor.darkColorVar=k.darkColorVar);Graph.prototype.defaultPageBackgroundColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=k.settingsName&&(Editor.configurationKey="."+k.settingsName+"-configuration",Editor.settingsKey="."+k.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=k.customFonts&&(Menus.prototype.defaultFonts=k.customFonts.concat(Menus.prototype.defaultFonts));
-null!=k.customPresetColors&&(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){v=document.createElement("style");v.setAttribute("type","text/css");v.appendChild(document.createTextNode(k.css));var I=document.getElementsByTagName("script")[0];I.parentNode.insertBefore(v,I)}null!=k.expandLibraries&&
+null!=k.customPresetColors&&(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){v=document.createElement("style");v.setAttribute("type","text/css");v.appendChild(document.createTextNode(k.css));var J=document.getElementsByTagName("script")[0];J.parentNode.insertBefore(v,J)}null!=k.expandLibraries&&
(Sidebar.prototype.expandLibraries=k.expandLibraries);null!=k.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=k.appendCustomLibraries);null!=k.libraries&&(Sidebar.prototype.customEntries=k.libraries);null!=k.enabledLibraries&&(Array.isArray(k.enabledLibraries)?Sidebar.prototype.enabledLibraries=k.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=k.defaultLibraries&&(Sidebar.prototype.defaultEntries=k.defaultLibraries);null!=k.defaultCustomLibraries&&
(Editor.defaultCustomLibraries=k.defaultCustomLibraries);null!=k.enableCustomLibraries&&(Editor.enableCustomLibraries=k.enableCustomLibraries);null!=k.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=k.defaultVertexStyle);null!=k.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=k.defaultEdgeStyle);null!=k.defaultPageVisible&&(Graph.prototype.defaultPageVisible=k.defaultPageVisible);null!=k.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=k.defaultGridEnabled);null!=k.zoomWheel&&(Graph.zoomWheel=
k.zoomWheel);null!=k.zoomFactor&&(v=parseFloat(k.zoomFactor),!isNaN(v)&&1<v?Graph.prototype.zoomFactor=v:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=k.defaultGridSize&&(v=parseInt(k.defaultGridSize),!isNaN(v)&&0<v?mxGraph.prototype.gridSize=v:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=k.gridSteps&&(v=parseInt(k.gridSteps),!isNaN(v)&&0<v?mxGraphView.prototype.gridSteps=v:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=k.pageFormat&&(v=parseInt(k.pageFormat.width),I=parseInt(k.pageFormat.height),!isNaN(v)&&0<v&&!isNaN(I)&&0<I?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,v,I),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+null!=k.pageFormat&&(v=parseInt(k.pageFormat.width),J=parseInt(k.pageFormat.height),!isNaN(v)&&0<v&&!isNaN(J)&&0<J?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,v,J),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=k.emptyDiagramXml);null!=k.sidebarWidth&&(EditorUi.prototype.hsplitPosition=k.sidebarWidth);null!=k.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=k.updateDefaultStyle);null!=k.sidebarTitles&&(Sidebar.prototype.sidebarTitles=k.sidebarTitles);null!=k.sidebarTitleSize&&(v=parseInt(k.sidebarTitleSize),!isNaN(v)&&0<v?Sidebar.prototype.sidebarTitleSize=v:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));
null!=k.fontCss&&("string"===typeof k.fontCss?Editor.configureFontCss(k.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=k.autosaveDelay&&(v=parseInt(k.autosaveDelay),!isNaN(v)&&0<v?DrawioFile.prototype.autosaveDelay=v:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=k.maxImageBytes&&(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&
(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);
-null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==
-typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var v=document.getElementsByTagName("script")[0];if(null!=v&&null!=v.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(k));v.parentNode.insertBefore(I,v);k=k.split("url(");for(I=1;I<k.length;I++){var N=k[I].indexOf(")");N=Editor.trimCssUrl(k[I].substring(0,N));var T=document.createElement("link");
-T.setAttribute("rel","preload");T.setAttribute("href",N);T.setAttribute("as","font");T.setAttribute("crossorigin","");v.parentNode.insertBefore(T,v)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=
-20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var v=[],I=0;I<k;I++)v.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return v.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},
-{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];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(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var v=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(v)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[v]),Error(mxResources.get("notADiagramFile")+" ("+v+")");if("mxGraphModel"==k.nodeName){v=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=v&&""!=v)v!=this.graph.currentStyle&&(I=null!=this.graph.themes?
-this.graph.themes[v]:mxUtils.load(STYLE_PATH+"/"+v+".xml").getDocumentElement(),null!=I&&(N=new mxCodec(I.ownerDocument),N.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var N=new mxCodec(I.ownerDocument);N.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=v;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));
-v=k.getAttribute("backgroundImage");null!=v?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(v)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(v=k.getAttribute("extFonts"))try{for(v=v.split("|").map(function(T){T=T.split("^");return{name:T[0],url:T[1]}}),I=0;I<v.length;I++)this.graph.addExtFont(v[I].name,
-v[I].url)}catch(T){console.log("ExtFonts format error: "+T.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 f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(k,v){k=null!=k?k:!0;var I=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",
-this.graph.currentStyle);var N=this.graph.getBackgroundImageObject(this.graph.backgroundImage,v);null!=N&&I.setAttribute("backgroundImage",JSON.stringify(N));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(N=this.graph.extFonts.map(function(T){return T.name+
-"^"+T.url}),I.setAttribute("extFonts",N.join("|")));return I};Editor.prototype.isDataSvg=function(k){try{var v=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=v&&(null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(cont,v))),null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v)),null!=v&&0<v.length)){var I=mxUtils.parseXml(v).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(N){}return!1};Editor.prototype.extractGraphModel=
-function(k,v,I){return Editor.extractGraphModel.apply(this,arguments)};var l=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();l.apply(this,arguments)};var u=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
-function(){u.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,v){if("undefined"===typeof window.MathJax){var I=function(){N=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var N=null;Editor.doMathJaxRender=function(U){try{null==
-N?(MathJax.typesetClear([U]),MathJax.typeset([U]),I()):N!=U&&Editor.mathJaxQueue.push(U)}catch(Y){MathJax.typesetClear([U]),null!=Y.retry?(N=U,Y.retry.then(function(){MathJax.typesetPromise([U]).then(I)["catch"](function(fa){console.log("Error in MathJax.typesetPromise: "+fa.toString());I()})})["catch"](function(fa){console.log("Error in MathJax.retry: "+fa.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+Y.toString())}};window.MathJax=null!=v?v:{options:{skipHtmlTags:{"[+]":["text"]},
-ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"],paths:{fonts:DRAW_MATH_URL+"/fonts","mathjax-tex":DRAW_MATH_URL+"/fonts/mathjax-tex-font","mathjax-mhchem-extension":DRAW_MATH_URL+"/fonts/mathjax-mhchem-font-extension","mathjax-bbm-extension":DRAW_MATH_URL+"/fonts/mathjax-bbm-font-extension","mathjax-bboldx-extension":DRAW_MATH_URL+"/fonts/mathjax-bboldx-font-extension","mathjax-dsfont-extension":DRAW_MATH_URL+
-"/fonts/mathjax-dsfont-font-extension"}},output:{font:"mathjax-tex"},startup:{pageReady:function(){for(var U=0;U<Editor.mathJaxQueue.length;U++)Editor.doMathJaxRender(Editor.mathJaxQueue[U])}}};Editor.MathJaxRender=function(U){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(U):Editor.mathJaxQueue.push(U)};Editor.onMathJaxDone=function(){};var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(Y,
-fa){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var W=document.createElement("script");W.setAttribute("type","text/javascript");W.setAttribute("src",k);v[0].parentNode.appendChild(W)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var v="",I=[""],N=0,T=!0,W;k=$jscomp.makeIterator(k);
-for(W=k.next();!W.done;W=k.next())W=W.value,'"'===W?(T&&W===v&&(I[N]+=W),T=!T):","===W&&T?W=I[++N]="":I[N]+=W,v=W;return I}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var I="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+I+(v?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=
-function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.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(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=
-function(){var k=new mxUrlConverter;k.updateBaseUrl();var v=k.convert,I=this;k.convert=function(N){null!=N&&navigator.onLine&&("http://"!=N.substring(0,7)&&"https://"!=N.substring(0,8)||N.substring(0,k.baseUrl.length)==k.baseUrl||I.crossOriginImages&&I.isCorsEnabledForUrl(N)?"chrome-extension://"!=N.substring(0,19)&&(N=v.apply(this,arguments)):N=PROXY_URL+"?url="+encodeURIComponent(N));return N};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};
-Editor.prototype.convertImageToDataUri=function(k,v,I,N,T){try{var W=!0,U=window.setTimeout(mxUtils.bind(this,function(){W=!1;v(k)}),this.timeout),Y=mxUtils.bind(this,function(){null!=N?this.convertImageToDataUri(k,v,I,N,!0):v(k)});if(/(\.svg)$/i.test(k)&&!T)mxUtils.get(k,mxUtils.bind(this,function(na){window.clearTimeout(U);W&&(200>na.getStatus()||299<na.getStatus()?Y():v(Editor.createSvgDataUri(na.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(U);W&&Y()}));else{var fa=new Image;
-this.crossOriginImages&&(fa.crossOrigin="anonymous");fa.onload=function(){window.clearTimeout(U);if(W)try{N=null!=N&&T?N:1;var na=document.createElement("canvas"),la=na.getContext("2d");la.scale(N,N);na.height=fa.height*N;na.width=fa.width*N;la.drawImage(fa,0,0);v(na.toDataURL())}catch(qa){v(k)}};fa.onerror=function(){window.clearTimeout(U);W&&(null!=I?I():v(k))};fa.src=k}}catch(na){null!=I?I():v(k)}};Editor.prototype.convertImages=function(k,v,I,N){function T(){0<W.length?W.shift()():v(k)}null==
-N&&(N=this.createImageUrlConverter());var W=[],U=I||{};I=mxUtils.bind(this,function(Y,fa){Y=k.getElementsByTagName(Y);for(var na=0;na<Y.length;na++)mxUtils.bind(this,function(la){W.push(mxUtils.bind(this,function(){try{if(null!=la){var qa=N.convert(la.getAttribute(fa));if(null!=qa&&"data:"!=qa.substring(0,5)){var ya=U[qa];null==ya?this.convertImageToDataUri(qa,function(wa){null!=wa&&(U[qa]=wa,la.setAttribute(fa,wa));T()},null,Editor.svgRasterScale):(la.setAttribute(fa,ya),T())}else null!=qa&&la.setAttribute(fa,
-qa),T()}}catch(wa){T()}}))})(Y[na])});I("image","xlink:href");I("img","src");T()};Editor.base64Encode=function(k){for(var v="",I=0,N=k.length,T,W,U;I<N;){T=k.charCodeAt(I++)&255;if(I==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4);v+="==";break}W=k.charCodeAt(I++);if(I==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
-3)<<4|(W&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((W&15)<<2);v+="=";break}U=k.charCodeAt(I++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(W&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((W&15)<<2|(U&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U&63)}return v};
-Editor.prototype.loadUrl=function(k,v,I,N,T,W,U,Y){try{var fa=!U&&(N||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));T=null!=T?T:!0;var na=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(la){200<=la.getStatus()&&299>=la.getStatus()?null!=v&&(la=la.getText(),fa&&(W=null!=W?W:"data:image/png;base64,",la=W+Editor.base64Encode(la)),v(la)):null!=I&&(0==la.getStatus()?I({message:mxResources.get("accessDenied")},la):404==la.getStatus()?
-I({message:mxResources.get("fileNotFound"),code:la.getStatus()},la):I({message:this.getErrorMessage(la)},la))}),function(la){null!=I&&I({message:mxResources.get("error")+" "+la.getStatus()})},fa,this.timeout,function(){T&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:na})},Y)});na()}catch(la){null!=I&&I(la)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var I=k.getText(),N=JSON.parse(I);null!=N&&null!=N.error&&null!=N.error.message&&(v=N.error.message+
-" ("+v+")")}catch(T){}return v};Editor.prototype.absoluteCssFonts=function(k){var v=null;if(null!=k){var I=k.split("url(");if(0<I.length){v=[I[0]];k=window.location.pathname;var N=null!=k?k.lastIndexOf("/"):-1;0<=N&&(k=k.substring(0,N+1));N=document.getElementsByTagName("base");var T=null;null!=N&&0<N.length&&(T=N[0].getAttribute("href"));for(var W=1;W<I.length;W++)if(N=I[W].indexOf(")"),0<N){var U=Editor.trimCssUrl(I[W].substring(0,N));this.graph.isRelativeUrl(U)&&(U=null!=T?T+U:window.location.protocol+
-"//"+window.location.hostname+("/"==U.charAt(0)?"":k)+U);v.push('url("'+U+'"'+I[W].substring(N))}else v.push(I[W])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,I){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+encodeURIComponent(v));I(k,v)};Editor.prototype.embedCssFonts=function(k,v){var I=k.split("url("),N=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==N){for(var fa=[I[0]],na=1;na<I.length;na++){var la=
-I[na].indexOf(")");fa.push('url("');fa.push(this.cachedFonts[Editor.trimCssUrl(I[na].substring(0,la))]);fa.push('"'+I[na].substring(la))}v(fa.join(""))}});if(0<I.length){for(k=1;k<I.length;k++){var W=I[k].indexOf(")"),U=null,Y=I[k].indexOf("format(",W);0<Y&&(U=Editor.trimCssUrl(I[k].substring(Y+7,I[k].indexOf(")",Y))));mxUtils.bind(this,function(fa){if(null==this.cachedFonts[fa]){this.cachedFonts[fa]=fa;N++;var na="application/x-font-ttf";if("svg"==U||/(\.svg)($|\?)/i.test(fa))na="image/svg+xml";
-else if("otf"==U||"embedded-opentype"==U||/(\.otf)($|\?)/i.test(fa))na="application/x-font-opentype";else if("woff"==U||/(\.woff)($|\?)/i.test(fa))na="application/font-woff";else if("woff2"==U||/(\.woff2)($|\?)/i.test(fa))na="application/font-woff2";else if("eot"==U||/(\.eot)($|\?)/i.test(fa))na="application/vnd.ms-fontobject";else if("sfnt"==U||/(\.sfnt)($|\?)/i.test(fa))na="application/font-sfnt";this.mapFontUrl(na,fa,mxUtils.bind(this,function(la,qa){this.loadUrl(qa,mxUtils.bind(this,function(ya){this.cachedFonts[fa]=
-ya;N--;T()}),mxUtils.bind(this,function(ya){N--;T()}),!0,null,"data:"+la+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[k].substring(0,W)),U)}T()}else v(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(v){this.resolvedFontCss=v;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},v;for(v in Graph.fontMapping)Graph.isCssFontUrl(v)&&(k[v]=Graph.fontMapping[v]);
-return k};Editor.prototype.embedExtFonts=function(k){var v=this.graph.getCustomFonts();if(0<v.length){var I=[],N=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==N&&this.embedCssFonts(I.join(""),k)}),W=0;W<v.length;W++)mxUtils.bind(this,function(U,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(N++,this.loadUrl(Graph.rewriteGoogleFontUrl(Y),mxUtils.bind(this,function(fa){this.cachedGoogleFonts[Y]=fa;I.push(fa+
-"\n");N--;T()}),mxUtils.bind(this,function(fa){N--;I.push("@import url("+Y+");\n");T()}))):I.push(this.cachedGoogleFonts[Y]+"\n"):I.push('@font-face {font-family: "'+U+'";src: url("'+Y+'")}\n')})(v[W].name,v[W].url);T()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),I=0;I<v.length;I++){var N=mxUtils.getTextContent(v[I]);0>N.indexOf("mxPageSelector")&&0<N.indexOf("MathJax")&&k[0].appendChild(v[I].cloneNode(!0))}};
-Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var I=mxUtils.getSvgDefs(k),N=v.split("\n");v=[];for(var T=[],W=0;W<N.length;W++)"@import"==N[W].substring(0,7)?v.push(N[W]):T.push(N[W]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),I.appendChild(k));0<T.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,
-T.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,I){var N=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(N/k,N/v))};Editor.prototype.exportToCanvas=function(k,v,I,N,T,W,U,Y,fa,na,la,qa,ya,wa,Ia,Aa,Ba,Ga){try{W=null!=W?W:!0;U=null!=U?U:!0;qa=null!=qa?qa:this.graph;ya=null!=ya?ya:0;var Ma=fa?null:qa.background;Ma==mxConstants.NONE&&(Ma=null);null==Ma&&(Ma=N);null==
-Ma&&0==fa&&(Ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,ya,wa,null,U,null,null,null,na,null,Aa,Ba,Ga),mxUtils.bind(this,function(sa){try{sa.style.setProperty("-webkit-font-smoothing","antialiased");sa.style.setProperty("-moz-osx-font-smoothing","grayscale");var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){Qa.drawImage(Ca,0,0);k(Na,sa)},0):(Qa.drawImage(Ca,0,0),k(Na,sa))},Na=document.createElement("canvas"),
-Sa=parseInt(sa.getAttribute("width")),Ua=parseInt(sa.getAttribute("height"));Y=null!=Y?Y:1;null!=v&&(Y=W?Math.min(1,Math.min(3*v/(4*Ua),v/Sa)):v/Sa);Y=this.getMaxCanvasScale(Sa,Ua,Y);Sa=Math.ceil(Y*Sa);Ua=Math.ceil(Y*Ua);Na.setAttribute("width",Sa);Na.setAttribute("height",Ua);var Qa=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Qa.beginPath();Qa.rect(0,0,Sa,Ua);Qa.fillStyle="dark"==Aa&&"none"!=qa.getAdaptiveColors()?za.dark:za.light;Qa.fill()}1!=Y&&Qa.scale(Y,Y);if(Ia){var Ea=
-qa.view,B=Ea.scale;Ea.scale=1;var Q=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=B;Q="data:image/svg+xml;base64,"+Q;var R=qa.gridSize*Ea.gridSteps*Y,X=qa.getGraphBounds(),ia=Ea.translate.x*B,ja=Ea.translate.y*B,pa=ia+(X.x-ia)/B-ya,xa=ja+(X.y-ja)/B-ya,ra=new Image;ra.onload=function(){try{for(var ua=-Math.round(R-mxUtils.mod((ia-pa)*Y,R)),Ka=-Math.round(R-mxUtils.mod((ja-xa)*Y,R));ua<Sa;ua+=R)for(var Va=Ka;Va<Ua;Va+=R)Qa.drawImage(ra,ua/Y,Va/Y);va()}catch(Oa){null!=T&&
-T(Oa)}};ra.onerror=function(ua){null!=T&&T(ua)};ra.src=Q}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};na&&this.graph.addSvgShadow(sa);this.graph.mathEnabled&&this.addMathCss(sa);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(sa,this.resolvedFontCss),Ca.src=Editor.createSvgDataUri(mxUtils.getXml(sa))}catch(va){null!=T&&T(va)}});this.embedExtFonts(mxUtils.bind(this,function(va){try{null!=va&&this.addFontCss(sa,va),this.loadFonts(Da)}catch(Na){null!=
-T&&T(Na)}}))}catch(va){null!=T&&T(va)}}),I,la)}catch(sa){null!=T&&T(sa)}};Editor.crcTable=[];for(var y=0;256>y;y++)for(var q=y,C=0;8>C;C++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[y]=q;Editor.updateCRC=function(k,v,I,N){for(var T=0;T<N;T++)k=Editor.crcTable[(k^v.charCodeAt(I+T))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,I=0;I<k.length;I++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(I))&255];return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,I,N,T){function W(la,qa){var ya=
-fa;fa+=qa;return la.substring(ya,fa)}function U(la){la=W(la,4);return la.charCodeAt(3)+(la.charCodeAt(2)<<8)+(la.charCodeAt(1)<<16)+(la.charCodeAt(0)<<24)}function Y(la){return String.fromCharCode(la>>24&255,la>>16&255,la>>8&255,la&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(W(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(W(k,4),"IHDR"!=W(k,4))null!=T&&T();else{W(k,17);T=k.substring(0,fa);do{var na=U(k);if("IDAT"==
-W(k,4)){T=k.substring(0,fa-8);"pHYs"==v&&"dpi"==I?(I=Math.round(N/.0254),I=Y(I)+Y(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,v,0,4);N=Editor.updateCRC(N,I,0,I.length);T+=Y(I.length)+v+I+Y(N^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+na);W(k,na);W(k,4)}while(na);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink=
-"https://www.drawio.com/doc/faq/save-file-formats";var J=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){J.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,v){var I=null;null!=
-k.editor.graph.getModel().getParent(v)?I=v.getId():null!=k.currentPage&&(I=k.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var D=Format.prototype.init;Format.prototype.init=function(){D.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var P=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?P.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=
-function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var v=this.editorUi,I=v.editor.graph;if(I.isEnabled()){var N=v.getCurrentFile();null!=N&&N.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},function(W){v.editor.setAutosave(W);v.editor.autosave&&N.isModified()&&
-N.fileChanged()},{install:function(W){this.listener=function(){W(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(W){v.actions.get("mathematicalTypesetting").funct()},{install:function(W){this.listener=function(){W(I.mathEnabled)};
-v.addListener("mathEnabledChanged",this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(T);(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&T.appendChild(v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return k};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,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.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:.25,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,
-defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];
-mxCellRenderer.defaultShapes.trapezoid.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.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",
-dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",
-dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",
-dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",
-dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
-type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
-type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
-type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
-max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
-defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
-[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
-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;var g=StyleFormatPanel.prototype.init;
-StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments);null!=k.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),k.customProperties,k))};var m=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var v=
-this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);m.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,I,N){function T(Qa,za,Ea,B,Q){if(null!=Ea.valueChanged)Ea.valueChanged(za,Q,I,qa);else{ya.getModel().beginUpdate();try{Q=[];var R=[];if(null!=Ea.index){for(var X=[],ia=Ea.parentRow.nextSibling;ia&&ia.getAttribute("data-pName")==
-Qa;)X.push(ia.getAttribute("data-pValue")),ia=ia.nextSibling;Ea.index<X.length?null!=B?X.splice(B,1):X[Ea.index]=za:X.push(za);null!=Ea.size&&X.length>Ea.size&&(X=X.slice(0,Ea.size));za=X.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,X.length,ya.getSelectionCells()),Q.push(Ea.countProperty),R.push(X.length))}ya.setCellStyles(Qa,za,ya.getSelectionCells());Q.push(Qa);R.push(za);if(null!=Ea.dependentProps)for(Qa=0;Qa<Ea.dependentProps.length;Qa++){var ja=Ea.dependentPropsDefVal[Qa],
-pa=Ea.dependentPropsVals[Qa];if(pa.length>za)pa=pa.slice(0,za);else for(var xa=pa.length;xa<za;xa++)pa.push(ja);pa=pa.join(",");ya.setCellStyles(Ea.dependentProps[Qa],pa,ya.getSelectionCells());Q.push(Ea.dependentProps[Qa]);R.push(pa)}if("function"==typeof Ea.onChange)Ea.onChange(ya,za);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",Q,"values",R,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}}function W(Qa,za){za.style.left="0px";za.style.top="0px";za.style.position=
-"relative";za.style.right="0px";za.style.bottom="0px";za.style.width="100%";za.style.maxWidth="100%";za.style.maxHeight="100%";za.style.textAlign="left"}function U(Qa,za,Ea){function B(R){if(null==R||R==mxConstants.NONE)Q.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==R)Q.style.background="";else{var X=mxUtils.getLightDarkColor(R);mxUtils.isLightDarkColor(R)&&X.light!=X.dark?Q.style.background="linear-gradient(to right bottom, "+X.cssText+" 50%, "+mxUtils.invertLightDarkColor(X).cssText+
-" 50.3%)":Q.style.background=R}}var Q=document.createElement("div");Q.style.width="32px";Q.style.height="8px";Q.style.margin="2px";Q.style.borderStyle="solid";Q.style.borderWidth="1px";B(za);btn=mxUtils.button("",mxUtils.bind(qa,function(R){this.editorUi.pickColor(za,function(X){T(Qa,X,Ea);B(X)});mxEvent.consume(R)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(Q);return btn}function Y(Qa,za,Ea,B,Q,
-R,X){null!=za&&(za=za.split(","),wa.push({name:Qa,values:za,type:Ea,defVal:B,countProperty:Q,parentRow:R,isDeletable:!0,flipBkg:X}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ia){for(var ja=R,pa=0;null!=ja.nextSibling;)if(ja.nextSibling.getAttribute("data-pName")==Qa)ja=ja.nextSibling,pa++;else break;var xa={type:Ea,parentRow:R,index:pa,isDeletable:!0,defVal:B,countProperty:Q};pa=la(Qa,"",xa,0==pa%2,X);T(Qa,B,xa);ja.parentNode.insertBefore(pa,ja.nextSibling);mxEvent.consume(ia)}));btn.style.height=
-"16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Qa,za,Ea,B,Q,R,X){if(0<Q){var ia=Array(Q);za=null!=za?za.split(","):[];for(var ja=0;ja<Q;ja++)ia[ja]=null!=za[ja]?za[ja]:null!=B?B:"";wa.push({name:Qa,values:ia,type:Ea,defVal:B,parentRow:R,flipBkg:X,size:Q})}return document.createElement("div")}function na(Qa,za,Ea){var B=document.createElement("input");B.type="checkbox";B.checked="1"==za;mxEvent.addListener(B,"change",function(){T(Qa,B.checked?"1":"0",Ea,null,B)});return B}
-function la(Qa,za,Ea,B,Q){var R=Ea.dispName,X=Ea.type,ia=document.createElement("tr");ia.className="gePropRow"+(Q?"Dark":"")+(B?"Alt":"")+" gePropNonHeaderRow";ia.setAttribute("data-pName",Qa);ia.setAttribute("data-pValue",za);B=!1;null!=Ea.index&&(ia.setAttribute("data-index",Ea.index),R=(null!=R?R:"")+"["+Ea.index+"]",B=!0);var ja=document.createElement("td");ja.className="gePropRowCell";R=mxResources.get(R,null,R);mxUtils.write(ja,R);ja.setAttribute("title",R);B&&(ja.style.textAlign="right");ia.appendChild(ja);
-ja=document.createElement("td");ja.className="gePropRowCell";ja.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ja,"click",mxUtils.bind(qa,function(ua){!mxUtils.isAncestorNode(ia,document.activeElement)&&mxUtils.isAncestorNode(ia.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==X)ja.appendChild(U(Qa,za,Ea));else if("bool"==X||"boolean"==
-X)ja.appendChild(na(Qa,za,Ea));else if("enum"==X){var pa=Ea.enumList;ja.innerHTML="";var xa=document.createElement("div");xa.className="gePropValue";ja.appendChild(xa);for(Q=0;Q<pa.length;Q++)if(R=pa[Q],R.val==za){mxUtils.write(xa,mxResources.get(R.dispName,null,R.dispName));break}mxEvent.addListener(ja,"click",mxUtils.bind(qa,function(ua){var Ka=mxEvent.getSource(ua);if(!(Ka!=ja&&Ka!=xa||mxEvent.isConsumed(ua))){xa.innerHTML="";var Va=document.createElement("select"),Oa=null;W(ja,Va);for(ua=0;ua<
-pa.length;ua++){Ka=pa[ua];var Ta=document.createElement("option");Ta.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Ta,mxResources.get(Ka.dispName,null,Ka.dispName));Va.appendChild(Ta);null==Ka.val&&(Ta.value="null",Oa=Ta)}Va.value=null==za&&null!=Oa?"null":za;xa.appendChild(Va);mxEvent.addListener(Va,"change",function(){var Za=mxUtils.htmlEntities(Va.value);if(Va[Va.selectedIndex]==Oa||"null"==Za.value)Za=null;T(Qa,Za,Ea)});Va.focus();mxEvent.addListener(Va,"blur",function(){xa.innerHTML="";for(var Za=
-0;Za<pa.length;Za++){var Pa=pa[Za];if(Pa.val==Va.value){mxUtils.write(xa,mxResources.get(Pa.dispName,null,Pa.dispName));break}}})}}))}else if("dynamicArr"==X)ja.appendChild(Y(Qa,za,Ea.subType,Ea.subDefVal,Ea.countProperty,ia,Q));else if("staticArr"==X)ja.appendChild(fa(Qa,za,Ea.subType,Ea.subDefVal,Ea.size,ia,Q));else if("readOnly"==X)Q=document.createElement("input"),Q.setAttribute("readonly",""),Q.value=za,Q.style.borderWidth="0px","id"==Qa||"shape"==Qa?(ia.firstChild.innerHTML="",ia.firstChild.setAttribute("colspan",
-"2"),Q.style.flexGrow="1",Q.style.marginLeft="4px",Q.style.textAlign="id"==Qa?"center":"left",Q.setAttribute("title",za),R=document.createElement("div"),mxUtils.write(R,mxResources.get(Qa)+":"),R.style.display="inline-flex",R.style.alignItems="center",R.style.width="100%",R.appendChild(Q),ia.firstChild.appendChild(R)):(Q.style.width="96px",ja.appendChild(Q));else{ja.innerHTML="";var ra=document.createElement("div");ra.className="gePropValue";ja.appendChild(ra);ra.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));
-mxEvent.addListener(ja,"click",mxUtils.bind(qa,function(ua){function Ka(){var Ta=Oa.value;Ta=0==Ta.length&&"string"!=X&&"numbers"!=X?0:Ta;Ea.allowAuto&&(null!=Ta.trim&&"auto"==Ta.trim().toLowerCase()?(Ta="auto",X="string"):(Ta=parseFloat(Ta),Ta=isNaN(Ta)?0:Ta));null!=Ea.min&&Ta<Ea.min?Ta=Ea.min:null!=Ea.max&&Ta>Ea.max&&(Ta=Ea.max);var Za=null;try{Za="numbers"==X?Ta.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==X?parseInt(Ta):Ta)+"")}catch(Pa){}T(Qa,Za,Ea,null,Oa)}var Va=mxEvent.getSource(ua);
-if(!(Va!=ja&&Va!=ra||mxEvent.isConsumed(ua))){ra.innerHTML="";var Oa=document.createElement("input");W(ra,Oa);Oa.value=decodeURIComponent(za);Oa.className="gePropEditor";"int"!=X&&"float"!=X||Ea.allowAuto||(Oa.type="number",Oa.step="int"==X?"1":"any",null!=Ea.min&&(Oa.min=parseFloat(Ea.min)),null!=Ea.max&&(Oa.max=parseFloat(Ea.max)));ra.appendChild(Oa);mxEvent.addListener(Oa,"keypress",function(Ta){13==Ta.keyCode&&Ka()});Oa.focus();mxEvent.addListener(Oa,"blur",function(){Ka()})}}))}Ea.isDeletable&&
-(Q=mxUtils.button("-",mxUtils.bind(qa,function(ua){T(Qa,"",Ea,Ea.index);mxEvent.consume(ua)})),Q.style.height="16px",Q.style.width="25px",Q.style.float="right",Q.className="geColorBtn",ja.appendChild(Q));ia.appendChild(ja);return ia}var qa=this,ya=this.editorUi.editor.graph,wa=[],Ia=document.createElement("table");Ia.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.style.paddingLeft=
-"16px";Ba.style.backgroundRepeat="no-repeat";Ba.style.backgroundPosition="-2px 50%";Ba.style.backgroundSize="20px";mxUtils.write(Ba,mxResources.get("property"));Aa.style.cursor="pointer";var Ga=function(){var Qa=Ia.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ba.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var za="none";for(var Ea=k.childNodes.length-1;0<=Ea;Ea--)try{var B=k.childNodes[Ea],Q=B.nodeName.toUpperCase();"INPUT"!=Q&&"SELECT"!=Q||k.removeChild(B)}catch(R){}}else Ba.style.backgroundImage=
-"url('"+Editor.arrowDownImage+"')",za="";for(Ea=0;Ea<Qa.length;Ea++)Qa[Ea].style.display=za};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;Ga()});Aa.appendChild(Ba);var Ma=document.createElement("th");Ma.className="gePropHeaderCell";Ma.style.paddingLeft="4px";mxUtils.write(Ma,mxResources.get("value"));Aa.appendChild(Ma);Ia.appendChild(Aa);var sa=Ma=!1;Aa=null;1==I.vertices.length&&0==I.edges.length?Aa=I.vertices[0].id:0==I.vertices.length&&
-1==I.edges.length&&(Aa=I.edges[0].id);null==Aa||N||(Ia.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"id",type:"readOnly"},!0,!1)),null!=I.style&&null!=I.style.shape&&Ia.appendChild(la("shape",mxUtils.htmlEntities(I.style.shape),{dispName:"shape",type:"readOnly"},!0,!1)));for(var Ca in v)if(N=v[Ca],("function"!=typeof N.isVisible||N.isVisible(I,this))&&!N.primary){var Da=null!=N.getValue?N.getValue(I,this):null!=I.style[Ca]?mxUtils.htmlEntities(I.style[Ca]+""):null!=N.getDefaultValue?N.getDefaultValue(I,
-this):N.defVal;if("separator"==N.type)sa=!sa;else{if("staticArr"==N.type)N.size=parseInt(I.style[N.sizeProperty]||v[N.sizeProperty].defVal)||0;else if(null!=N.dependentProps){var va=N.dependentProps,Na=[],Sa=[];for(Aa=0;Aa<va.length;Aa++)if(null!=v[va[Aa]]){var Ua=I.style[va[Aa]];Sa.push(v[va[Aa]].subDefVal);Na.push(null!=Ua?Ua.split(","):[])}N.dependentPropsDefVal=Sa;N.dependentPropsVals=Na}Ia.appendChild(la(Ca,Da,N,Ma,sa));Ma=!Ma}}for(Aa=0;Aa<wa.length;Aa++)for(N=wa[Aa],v=N.parentRow,Ca=0;Ca<N.values.length;Ca++)Ma=
-la(N.name,N.values[Ca],{type:N.type,parentRow:N.parentRow,isDeletable:N.isDeletable,index:Ca,defVal:N.defVal,countProperty:N.countProperty,size:N.size},0==Ca%2,N.flipBkg),v.parentNode.insertBefore(Ma,v.nextSibling),v=Ma;k.appendChild(Ia);Ga();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=this.editorUi,I=v.editor.graph,N=document.createElement("div");N.style.padding="6px 20px 0 24px";k.appendChild(N);var T=document.createElement("div");T.className=
-"geSwitcher";T.style.padding="4px 18px 6px 0px";for(var W=[],U=0;U<this.defaultColorSchemes.length;U++){var Y=document.createElement("div");Y.className="geSwitcherDot";mxUtils.bind(this,function(ya){mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){fa(ya)}))})(U);W.push(Y);T.appendChild(Y)}var fa=mxUtils.bind(this,function(ya){null!=W[ya]&&(null!=this.format.currentScheme&&null!=W[this.format.currentScheme]&&(W[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=
-ya,na(this.defaultColorSchemes[this.format.currentScheme]),W[this.format.currentScheme].style.background="#84d7ff")}),na=mxUtils.bind(this,function(ya){var wa=mxUtils.clone(I.defaultVertexStyle);wa[mxConstants.STYLE_STROKECOLOR]=null!=wa[mxConstants.STYLE_STROKECOLOR]?wa[mxConstants.STYLE_STROKECOLOR]:"default";wa[mxConstants.STYLE_FILLCOLOR]=null!=wa[mxConstants.STYLE_FILLCOLOR]?wa[mxConstants.STYLE_FILLCOLOR]:"default";wa[mxConstants.STYLE_FONTCOLOR]=null!=wa[mxConstants.STYLE_FONTCOLOR]?wa[mxConstants.STYLE_FONTCOLOR]:
-"default";I.replaceDefaultColors(new mxCell,wa);var Ia=mxUtils.bind(this,function(Ba){var Ga=mxUtils.button("",mxUtils.bind(this,function(Ca){I.getModel().beginUpdate();try{for(var Da=v.getSelectionState().cells,va=0;va<Da.length;va++){var Na=I.getModel().getStyle(Da[va]);null!=Ba?(mxEvent.isShiftDown(Ca)||(Na=""==Ba.fill||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,Ba.fill),Na=""==Ba.gradient||null==Ba.gradient?mxUtils.setStyle(Na,
-mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,Ba.gradient),mxEvent.isControlDown(Ca)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ca)||!I.getModel().isVertex(Da[va])||(Na=""==Ba.font||null==Ba.font?mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,Ba.font))),mxEvent.isAltDown(Ca)||(Na=""==Ba.stroke||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,
-Ba.stroke))):(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null),I.getModel().isVertex(Da[va])&&(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,null)));I.getModel().setStyle(Da[va],Na)}}finally{I.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";
-if(null!=Ba){var Ma="1px solid";null!=Ba.border&&(Ma=Ba.border);if(null!=Ba.gradient)Ga.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(Ba.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(Ba.gradient).cssText+" 100%)";else if(Ba.fill==mxConstants.NONE)Ga.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==Ba.fill||""==Ba.fill)Ga.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var sa=mxUtils.getLightDarkColor(Ba.fill);
-Ga.style.backgroundImage="linear-gradient(to right bottom, "+sa.cssText+" 50%, "+sa.light+" 50.3%)"}null==Ba.stroke||Ba.stroke==mxConstants.NONE?Ga.style.border=Ma+" transparent":""==Ba.stroke?Ga.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(sa=mxUtils.getLightDarkColor(Ba.stroke),Ga.style.border=Ma+" "+sa.cssText,Ga.style.borderRightColor=sa.light,Ga.style.borderBottomColor=Ga.style.borderRightColor);null!=Ba.title&&Ga.setAttribute("title",
-Ba.title)}else Ma=mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),sa=mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,"#000000"),Ga.style.backgroundColor=Ma,Ga.style.border="1px solid "+sa;Ga.style.borderRadius="0";N.appendChild(Ga);null!=Ba&&null!=Ba.gradient&&(Ma=Ga.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.gradient).light+") 100%)",Ma.style.clipPath=
-"polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",N.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ga.click()}))});N.innerText="";if(null!=ya)for(var Aa=0;Aa<ya.length;Aa++)0<Aa&&0==mxUtils.mod(Aa,4)&&mxUtils.br(N),Ia(ya[Aa])});null==this.format.currentScheme?fa(Math.min(W.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):fa(this.format.currentScheme);U=10>=this.defaultColorSchemes.length?43:23;var la=document.createElement("div");
-la.className="geButton";la.style.cssText="position:absolute;left:0px;bottom:"+U+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(la,"click",mxUtils.bind(this,function(){fa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var qa=document.createElement("div");qa.className="geButton";qa.style.cssText="position:absolute;left:186px;bottom:"+U+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&
-(k.appendChild(la),k.appendChild(qa));mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){fa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));na(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(T)}return k}}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.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=
-function(k,v){var I=Graph.fontMapping[v];null==I&&Graph.isCssFontUrl(v)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(v))):(null==I&&(I='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+v+'");\n}'),k=document.createElement("style"),mxUtils.write(k,I));return k};Graph.addRecentCustomFont=function(k,v){};Graph.addFont=function(k,v,I,N){if(null!=k&&0<k.length&&null!=
-v&&0<v.length){N=null!=N?N:Graph.customFontElements;var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var W=N[T];null!=W&&W.url!=v&&(W.elt.parentNode.removeChild(W.elt),W=null);null==W?(W=v,"http:"==v.substring(0,5)&&(W=PROXY_URL+"?url="+encodeURIComponent(v)),W={name:k,url:v,elt:Graph.createFontElement(k,W)},N[T]=W,v=N==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=I&&("link"==W.elt.nodeName.toLowerCase()?(W.elt.onload=I,W.elt.onerror=I):I()),null!=
-v&&v.appendChild(W.elt)):null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,v){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(v=k.url);return v};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var v=0;v<k.length;v++){var I=k[v].getAttribute("data-font-src");if(null!=I){var N="FONT"==k[v].nodeName?k[v].getAttribute("face"):k[v].style.fontFamily;null!=N&&Graph.addFont(N,I)}}};Graph.processFontStyle=function(k){if(null!=k){var v=mxUtils.getValue(k,
-"fontSource",null);if(null!=v){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(v))}catch(N){}}}return k};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.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";
-Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var n=Graph.prototype.init;Graph.prototype.init=function(){function k(T){v=T}n.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var v=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(T){v=null});this.isMouseInsertPoint=function(){return null!=
-v};var I=this.getInsertPoint;this.getInsertPoint=function(T){return null==v||T?I.apply(this,arguments):this.getPointForEvent(v)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var W=this.graph.getCellStyle(T);if(null!=W&&"rack"==W.childLayout){var U=new mxStackLayout(this.graph,!1);U.gridSize=null!=W.rackUnitSize?parseFloat(W.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;U.marginLeft=W.marginLeft||0;U.marginRight=W.marginRight||0;U.marginTop=
-W.marginTop||0;U.marginBottom=W.marginBottom||0;U.allowGaps=W.allowGaps||0;U.horizontal="1"==mxUtils.getValue(W,"horizontalRack","0");U.resizeParent=!1;U.fill=!0;return U}return N.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,I,N,T,W,U,Y,fa,na,
-la,qa){F.apply(this,arguments);Graph.processFontAttributes(qa)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,I,N){function T(){for(var Aa=Y.getSelectionCells(),Ba=[],Ga=0;Ga<Aa.length;Ga++)Y.isCellVisible(Aa[Ga])&&Ba.push(Aa[Ga]);Y.setSelectionCells(Ba)}function W(Aa){Y.setHiddenTags(Aa?[]:fa.slice());T();Y.refresh()}function U(Aa,
-Ba){la.innerText="";if(0<Aa.length){var Ga=document.createElement("table");Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";var Ma=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var sa=0;sa<Aa.length;sa++)(function(Ca){function Da(){var za=Y.getCellsForTags([Ca],null,null,!0);Y.isEnabled()?Y.setSelectionCells(za):Y.highlightCells(za,null,null,70)}var va=0>mxUtils.indexOf(Y.hiddenTags,Ca),Na=document.createElement("tr"),
-Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";var Ua=document.createElement("img");Ua.setAttribute("src",va?Editor.visibleImage:Editor.hiddenImage);Ua.setAttribute("title",mxResources.get(va?"hideIt":"show",[Ca]));mxUtils.setOpacity(Ua,va?75:25);Ua.className="geAdaptiveAsset";Ua.style.verticalAlign="middle";Ua.style.cursor="pointer";Ua.style.width="16px";if(v||Editor.isDarkMode())Ua.style.filter="invert(100%)";Sa.appendChild(Ua);mxEvent.addListener(Ua,"click",function(za){mxEvent.isShiftDown(za)?
-W(0<=mxUtils.indexOf(Y.hiddenTags,Ca)):(Y.toggleHiddenTag(Ca),T(),Y.refresh());mxEvent.consume(za)});Na.appendChild(Sa);Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";Ua=document.createElement("img");Ua.setAttribute("src",Editor.selectImage);Ua.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ua,va?75:25);Ua.className="geAdaptiveAsset";Ua.style.verticalAlign="middle";Ua.style.cursor="pointer";Ua.style.width="16px";if(v||Editor.isDarkMode())Ua.style.filter=
-"invert(100%)";mxEvent.addListener(Ua,"click",function(za){W(!0);Da();mxEvent.consume(za)});Sa.appendChild(Ua);Na.appendChild(Sa);Sa=document.createElement("td");Sa.style.overflow="hidden";Sa.style.whiteSpace="nowrap";Sa.style.textOverflow="ellipsis";Sa.style.verticalAlign="middle";Sa.style.cursor="pointer";Sa.setAttribute("title",Ca);a=document.createElement("a");mxUtils.write(a,Ca);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,va?100:40);Sa.appendChild(a);mxEvent.addListener(Sa,
-"click",function(za){if(mxEvent.isShiftDown(za))W(!0),Da();else if(va&&0<Y.hiddenTags.length)W(!0);else{var Ea=fa.slice(),B=mxUtils.indexOf(Ea,Ca);Ea.splice(B,1);Y.setHiddenTags(Ea);T();Y.refresh()}mxEvent.consume(za)});Na.appendChild(Sa);if(Y.isEnabled()){Sa=document.createElement("td");Sa.style.verticalAlign="middle";Sa.style.textAlign="center";Sa.style.width="18px";if(null==Ba){Sa.style.align="center";Sa.style.width="16px";Ua=document.createElement("img");Ua.setAttribute("src",Editor.trashImage);
-Ua.setAttribute("title",mxResources.get("removeIt",[Ca]));mxUtils.setOpacity(Ua,va?75:25);Ua.className="geAdaptiveAsset";Ua.style.verticalAlign="middle";Ua.style.cursor="pointer";Ua.style.width="16px";if(v||Editor.isDarkMode())Ua.style.filter="invert(100%)";mxEvent.addListener(Ua,"click",function(za){var Ea=mxUtils.indexOf(fa,Ca);0<=Ea&&fa.splice(Ea,1);Y.removeTagsForCells(Y.model.getDescendants(Y.model.getRoot()),[Ca]);Y.refresh();mxEvent.consume(za)});Sa.appendChild(Ua)}else{var Qa=document.createElement("input");
-Qa.setAttribute("type","checkbox");Qa.style.margin="0px";Qa.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,Ca);Qa.checked=Qa.defaultChecked;Qa.style.background="transparent";Qa.setAttribute("title",mxResources.get(Qa.defaultChecked?"removeIt":"add",[Ca]));mxEvent.addListener(Qa,"change",function(za){Qa.checked?Y.addTagsForCells(Y.getSelectionCells(),[Ca]):Y.removeTagsForCells(Y.getSelectionCells(),[Ca]);mxEvent.consume(za)});Sa.appendChild(Qa)}Na.appendChild(Sa)}Ma.appendChild(Na)})(Aa[sa]);Ga.appendChild(Ma);
-la.appendChild(Ga)}}var Y=this,fa=Y.hiddenTags.slice(),na=document.createElement("div");na.style.userSelect="none";na.style.overflow="hidden";na.style.padding="10px";na.style.height="100%";var la=document.createElement("div");la.style.position="absolute";la.style.boxSizing="border-box";la.style.userSelect="none";la.style.overflow="auto";la.style.padding="3px";la.style.left="0px";la.style.right="0px";la.style.top="0px";la.style.bottom="0px";na.appendChild(la);Y.addListener(mxEvent.ROOT,function(){fa=
-Y.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Aa,Ba){if(k()){Aa=Y.getAllTags();for(Ba=0;Ba<Aa.length;Ba++)0>mxUtils.indexOf(fa,Aa[Ba])&&fa.push(Aa[Ba]);fa.sort();Y.isSelectionEmpty()?U(fa):U(fa,Y.getCommonTagsForCells(Y.getSelectionCells()))}});Y.selectionModel.addListener(mxEvent.CHANGE,qa);Y.model.addListener(mxEvent.CHANGE,qa);Y.addListener(mxEvent.REFRESH,qa);var ya=document.createElement("div");ya.className="geToolbarContainer geDialogToolbar";ya.style.position="absolute";ya.style.display=
-"flex";ya.style.bottom="0px";ya.style.left="0px";ya.style.right="0px";ya.style.height="32px";ya.style.overflow="hidden";ya.style.padding="3px 4px 4px 4px";ya.style.borderWidth="1px 0px 0px 0px";ya.style.borderStyle="solid";ya.style.whiteSpace="nowrap";if(Y.isEnabled()){la.style.bottom="32px";var wa=document.createElement("a");wa.className="geButton";var Ia=wa.cloneNode(!1);Ia.style.backgroundImage="url("+Editor.visibleImage+")";Ia.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(Ia,
-"click",function(Aa){Y.setHiddenTags([]);mxEvent.isShiftDown(Aa)||(fa=Y.hiddenTags.slice());T();Y.refresh();mxEvent.consume(Aa)});ya.appendChild(Ia);null!=I&&(wa=wa.cloneNode(!1),wa.style.backgroundImage="url("+Editor.plusImage+")",wa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(wa,"click",function(Aa){I(fa,function(Ba){fa=Ba;qa()});mxEvent.consume(Aa)}),ya.appendChild(wa));na.appendChild(ya)}null!=N&&ya.appendChild(N);return{div:na,refresh:qa}};Graph.prototype.getCustomFonts=
-function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var I=Graph.customFontElements[v];k.push({name:I.name,url:I.url})}return k};Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var I=Editor.guid();document.execCommand("fontname",!1,I);for(var N=this.cellEditor.textarea.getElementsByTagName("font"),T=!1,W=0;W<N.length;W++)N[W].getAttribute("face")==I&&(T=!0,N[W].setAttribute("face",k),null!=v?N[W].setAttribute("data-font-src",v):N[W].removeAttribute("data-font-src"));
-T||document.execCommand("fontname",!1,k)};var M=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return M.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 k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var v in k)this.globalVars[v]=k[v]}catch(I){null!=
-window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var L=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var v=L.apply(this,arguments);null==v&&null!=this.globalVars&&(v=this.globalVars[k]);return v};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};
-Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,v,I,N,T,W,U,Y,fa,na,la,qa,ya,wa,Ia,Aa){var Ba=K.apply(this,arguments);if(null!=qa){var Ga=Ba.getAttribute("style");null==Ga&&(Ga="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ba.setAttribute("style",Ga+(" color-scheme: "+qa+";"))}var Ma=this.getCustomFonts();if(la&&0<Ma.length){var sa=Ba.ownerDocument;Ga=null!=sa.createElementNS?
-sa.createElementNS(mxConstants.NS_SVG,"style"):sa.createElement("style");null!=sa.setAttributeNS?Ga.setAttributeNS("type","text/css"):Ga.setAttribute("type","text/css");for(var Ca="",Da="",va=0;va<Ma.length;va++){var Na=Ma[va].name,Sa=Ma[va].url;Graph.isCssFontUrl(Sa)?Ca+="@import url("+Graph.rewriteGoogleFontUrl(Sa)+");\n":Da+='@font-face {\nfont-family: "'+Na+'";\nsrc: url("'+Sa+'");\n}\n'}Ga.appendChild(sa.createTextNode(Ca+Da));Ba.getElementsByTagName("defs")[0].appendChild(Ga)}Editor.replaceSvgDataUris&&
-null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(Ba);this.mathEnabled&&(document.body.appendChild(Ba),Editor.MathJaxRender(Ba),Ba.parentNode.removeChild(Ba),Ga=Ba.ownerDocument.getElementById("MJX-SVG-styles"),null!=Ga&&Ba.getElementsByTagName("defs")[0].appendChild(Ga.cloneNode(!0)));return Ba};var Z=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){Z.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=
-null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ha=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ha.apply(this,arguments);this.enumerationState=0};var ca=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return ca.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,
-"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var v="1"==mxUtils.getValue(k.style,"enumerate",0);v&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,
-this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):v||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);v=k.secondLabel;if(null!=v){var I=k.view.scale,N=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*I,k.y+4*I,0,0):mxRectangle.fromPoint(k.view.getPoint(k));v.bounds.equals(k)&&v.value==N&&v.scale==I||(v.bounds=k,v.value=N,v.scale=I,v.redraw())}};var aa=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();
-aa.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var oa=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){oa.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,v){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&
-this.executeCustomActions(k.actions,null,v))};Graph.prototype.executeCustomActions=function(k,v,I){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 N=!1,T=0,W=0,U=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),Y=mxUtils.bind(this,
-function(){N&&(N=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<T&&T--;0==T&&na()}),na=mxUtils.bind(this,function(){if(W<k.length){var la=this.stoppingCustomActions,qa=k[W++],ya=[];if(null!=qa.open)if(Y(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,I))return}else this.openLink(qa.open);null==qa.wait||la||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;fa()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=qa.wait?parseInt(qa.wait):1E3),Y());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,fa,la?0:qa.fadeIn.delay));null!=qa.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,fa,la?0:qa.fadeOut.delay));null!=qa.wipeIn&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,
-!0),!0)));null!=qa.wipeOut&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(U(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){U();var wa=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(wa),1);this.setCellsVisible(wa,!0)}null!=qa.hide&&(U(),wa=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(wa),0),this.setCellsVisible(wa,!1));null!=qa.toggleStyle&&null!=
-qa.toggleStyle.key&&(U(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(U(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));wa=[];null!=qa.select&&this.isEnabled()&&(wa=this.getCellsForAction(qa.select),this.setSelectionCells(wa));null!=qa.highlight&&(wa=this.getCellsForAction(qa.highlight),this.highlightCells(wa,qa.highlight.color,
-qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(wa=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<wa.length&&this.scrollCellToVisible(wa[0]);null!=I&&null!=qa.explore&&Graph.exploreFromCell(this,I,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var Ia=qa.tags.toggle;0==Ia.length&&(Ia=this.getAllTags());for(wa=0;wa<Ia.length;wa++)this.toggleHiddenTag(Ia[wa])}Ia=null;null!=qa.tags.hidden&&(null==Ia&&(Ia=[]),Ia=Ia.concat(qa.tags.hidden));
-if(null!=qa.tags.visible){null==Ia&&(Ia=[]);var Aa=this.getAllTags();for(wa=0;wa<Aa.length;wa++)0>mxUtils.indexOf(qa.tags.visible,Aa[wa])&&0>mxUtils.indexOf(Ia,Aa[wa])&&Ia.push(Aa[wa])}null!=Ia&&this.setHiddenTags(Ia);this.refresh()}0<ya.length&&(T++,this.executeAnimations(ya,fa,la?1:qa.steps,la?0:qa.delay));0==T?na():Y()}else this.stoppingCustomActions=this.executingCustomActions=!1,Y(),null!=v&&v()});na()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var I=this.getLinkForCell(v);null!=
-I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,I));if(this.isHtmlLabel(v)){var N=document.createElement("div");N.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var T=N.getElementsByTagName("a"),W=!1,U=0;U<T.length;U++)I=T[U].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(T[U].setAttribute("href",this.updateCustomLink(k,I)),W=!0);W&&this.labelChanged(v,N.innerHTML)}};Graph.prototype.updateCustomLink=function(k,v){if("data:action/json,"==
-v.substring(0,17))try{var I=JSON.parse(v.substring(17));null!=I.actions&&(this.updateCustomLinkActions(k,I.actions),v="data:action/json,"+JSON.stringify(I))}catch(N){}return v};Graph.prototype.updateCustomLinkActions=function(k,v){for(var I=0;I<v.length;I++){var N=v[I],T;for(T in N)this.updateCustomLinkAction(k,N[T],"cells"),this.updateCustomLinkAction(k,N[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,I){if(null!=v&&null!=v[I]){for(var N=[],T=0;T<v[I].length;T++)if("*"==
-v[I][T])N.push(v[I][T]);else{var W=k[v[I][T]];null!=W?""!=W&&N.push(W):N.push(v[I][T])}v[I]=N}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,v));if(null!=k.excludeCells){for(var I=[],N=0;N<v.length;N++)0>k.excludeCells.indexOf(v[N].id)&&I.push(v[N]);v=I}return v};Graph.prototype.getCellsById=function(k){var v=[];if(null!=k)for(var I=0;I<k.length;I++)if("*"==k[I]){var N=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(W){return W!=
-N},N))}else{var T=this.model.getCell(k[I]);null!=T&&v.push(T)}return v};var da=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return da.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var v=mxUtils.indexOf(this.hiddenTags,k);0>v?this.hiddenTags.push(k):0<=v&&this.hiddenTags.splice(v,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
-Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;for(var v=0;v<k.length;v++)if(0>mxUtils.indexOf(this.hiddenTags,k[v]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,v,I,N){var T=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var W=0,U={},Y=0;Y<k.length;Y++)0<k[Y].length&&(U[k[Y]]=!0,W++);for(Y=0;Y<v.length;Y++)if(I&&this.model.getParent(v[Y])==
-this.model.root||this.model.isVertex(v[Y])||this.model.isEdge(v[Y])){var fa=this.getTagsForCell(v[Y]),na=!1;if(0<fa.length&&(fa=fa.split(" "),fa.length>=k.length)){for(var la=na=0;la<fa.length&&na<W;la++)null!=U[fa[la]]&&na++;na=na==W}na&&(1!=N||this.isCellVisible(v[Y]))&&T.push(v[Y])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,I=[],N=0;N<k.length;N++){var T=
-this.getTagsForCell(k[N]);I=[];if(0<T.length){T=T.split(" ");for(var W={},U=0;U<T.length;U++)if(null==v||null!=v[T[U]])W[T[U]]=!0,I.push(T[U]);v=W}else return[]}return I};Graph.prototype.getTagsForCells=function(k){for(var v=[],I={},N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);if(0<T.length){T=T.split(" ");for(var W=0;W<T.length;W++)null==I[T[W]]&&(I[T[W]]=!0,v.push(T[W]))}}return v};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=
-function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){for(var N=this.getTagsForCell(k[I]),T=N.split(" "),W=!1,U=0;U<v.length;U++){var Y=mxUtils.trim(v[U]);""!=Y&&0>mxUtils.indexOf(T,Y)&&(N=0<N.length?N+" "+Y:Y,W=!0)}W&&this.setAttributeForCell(k[I],"tags",N)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){var N=this.getTagsForCell(k[I]);
-if(0<N.length){for(var T=N.split(" "),W=!1,U=0;U<v.length;U++){var Y=mxUtils.indexOf(T,v[U]);0<=Y&&(T.splice(Y,1),W=!0)}W&&this.setAttributeForCell(k[I],"tags",T.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var v=0;v<k.length;v++)this.model.setVisible(k[v],!this.model.isVisible(k[v]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,v){this.model.beginUpdate();try{for(var I=0;I<k.length;I++)this.model.setVisible(k[I],
-v)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,v,I,N){for(var T=0;T<k.length;T++)this.highlightCell(k[T],v,I,N)};Graph.prototype.highlightCell=function(k,v,I,N,T){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;k=this.view.getState(k);var W=null;null!=k&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+T),W=new mxCellHighlight(this,v,T,!1),null!=N&&(W.opacity=N),W.highlight(k),window.setTimeout(function(){null!=W.shape&&
-(mxUtils.setPrefixedStyle(W.shape.node.style,"transition","all 1200ms ease-in-out"),W.shape.node.style.opacity=0);window.setTimeout(function(){W.destroy()},1200)},I));return W};Graph.prototype.addSvgShadow=function(k,v,I,N){N=null!=N?N:!0;var T=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=I&&I||(v=null!=v?v:k.getElementsByTagName("g")[0],null!=v&&(this.updateShadowFilter(v,!0),!isNaN(parseInt(k.getAttribute("width")))&&N&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+T),k.setAttribute("height",
-parseInt(k.getAttribute("height"))+T),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+T,h=parseFloat(v[3])+T,k.setAttribute("viewBox",v[0]+" "+v[1]+" "+w+" "+h))))));return T};Graph.prototype.updateShadowFilter=function(k,v){mxClient.IS_SF||(v?(v=mxUtils.getLightDarkColor(this.svgShadowColor,this.svgShadowOpacity),k.style.filter="drop-shadow("+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowBlur)/
-100+"px "+v.cssText+")"):k.style.filter="")};Graph.prototype.setShadowVisible=function(k,v){v=null!=v?v:!0;this.shadowVisible=k;this.updateShadowFilter(this.view.getDrawPane(),this.shadowVisible);v&&this.fireEvent(new mxEventObject("shadowVisibleChanged"))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=
-this.model.getChildCount(this.model.root),v=0;do var I=this.model.getChildAt(this.model.root,v);while(v++<k&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};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",STENCIL_PATH+"/kubernetes2.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=
-[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",
-STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",
-STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/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.ibmcloud=[STENCIL_PATH+"/ibm_cloud.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.networks2=[SHAPES_PATH+"/mxNetworks2.js",
-STENCIL_PATH+"/networks2.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"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];
-mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var ka=mxMarker.createMarker;mxMarker.createMarker=function(k,v,I,N,T,W,U,Y,fa,na){if(null!=I&&null==mxMarker.markers[I]){var la=this.getPackageForType(I);null!=la&&mxStencilRegistry.getStencil(la)}return ka.apply(this,
-arguments)};var ba=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,I,N,T,W){"1"==mxUtils.getValue(v.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ba.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,I,N){function T(){Ia.value=Math.max(1,Math.min(la,Math.max(parseInt(Ia.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(la,Math.min(parseInt(Ia.value),parseInt(wa.value))))}function W(ua){k.lastPrintPagesRadioChecked=
-ya.checked;k.lastPrintSelectionOnlyChecked=Ba.checked;k.lastPrintCropRadioChecked=Ma.checked;k.lastPrintFitRadioChecked=sa.checked;ya.checked&&wa.value<Ia.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ia.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);R.value=Math.max(1,Math.min(1600,parseInt(R.value)))+"%";k.lastPrintZoom=R.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=X.checked;k.lastPrintTransparent=ja.checked;k.lastPrintInclude=pa.checked;k.lastPrintSheetsAcross=
-Ea.value;k.lastPrintSheetsDown=B.value;var Ka={};Ka.border=parseInt(Q.value);Ka.scale=parseInt(R.value)/100;Ka.grid=X.checked;Ka.shadows=ia.checked;Ka.transparent=ja.checked;Ka.includeCopy=pa.checked;Ka.sheetsAcross=parseInt(Ea.value);Ka.sheetsDown=parseInt(B.value);Ka.pagesFrom=parseInt(wa.value);Ka.pagesTo=parseInt(Ia.value);Ka.allPages=qa.checked;Ka.selection=Ba.checked;Ka.pageView=Ga.checked;Ka.crop=Ma.checked;Ka.fit=sa.checked;return null!=I?I(!ua,Ka):k.print(!ua,Ka)}var U=k.editor.graph,Y=document.createElement("div"),
-fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";fa.style.marginTop="0px";mxUtils.write(fa,v||mxResources.get("print"));Y.appendChild(fa);var na=1,la=1;fa=document.createElement("div");fa.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name","pages-printdialog");fa.appendChild(qa);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));
-mxEvent.addListener(v,"click",function(){qa.checked=!0});fa.appendChild(v);mxUtils.br(fa);var ya=qa.cloneNode(!0);fa.appendChild(ya);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");fa.appendChild(v);mxEvent.addListener(v,"click",function(){ya.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type","number");wa.setAttribute("min","1");wa.style.width="40px";fa.appendChild(wa);v=document.createElement("span");
-mxUtils.write(v,mxResources.get("to"));fa.appendChild(v);var Ia=wa.cloneNode(!0);fa.appendChild(Ia);mxEvent.addListener(wa,"focus",function(){ya.checked=!0});mxEvent.addListener(Ia,"focus",function(){ya.checked=!0});mxEvent.addListener(wa,"change",T);mxEvent.addListener(Ia,"change",T);if(null!=k.pages&&(la=k.pages.length,null!=k.currentPage))for(var Aa=0;Aa<la;Aa++)if(k.currentPage==k.pages[Aa]){na=Aa+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(la,Math.max(1,
-k.lastPrintPagesFromInput)),Ia.value=Math.min(la,Math.max(1,k.lastPrintPagesToInput))):(wa.value=na,Ia.value=na);wa.setAttribute("max",la);Ia.setAttribute("max",la);Aa=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=na;Ia.value=na;ya.checked=!0});Aa.setAttribute("title",mxResources.get("currentPage"));Aa.style.marginLeft="4px";Aa.style.maxWidth="100px";Aa.style.overflow="hidden";Aa.style.textOverflow="ellipsis";Aa.style.whiteSpace="nowrap";fa.appendChild(Aa);1<la&&Y.appendChild(fa);
-fa=document.createElement("div");fa.style.borderBottom="1px solid lightGray";fa.style.paddingBottom="12px";fa.style.marginBottom="12px";fa.style.whiteSpace="nowrap";var Ba=document.createElement("input");Ba.setAttribute("name","pages-printdialog");Ba.setAttribute("type",1==la?"checkbox":"radio");Ba.style.marginRight="8px";U.isSelectionEmpty()&&Ba.setAttribute("disabled","disabled");U.isEnabled()&&(fa.appendChild(Ba),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),
-fa.appendChild(v));(U.isEnabled()||1<la)&&Y.appendChild(fa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?ya.checked=!0:!U.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ba.checked=!0:qa.checked=!0;U.isSelectionEmpty()||mxEvent.addListener(v,"click",function(){Ba.checked=!Ba.checked});U=document.createElement("div");U.style.whiteSpace="nowrap";var Ga=document.createElement("input");Ga.style.marginBottom="8px";Ga.style.marginRight="8px";Ga.setAttribute("type","radio");Ga.setAttribute("name",
-"printSize");U.appendChild(Ga);v=document.createElement("span");mxUtils.write(v,mxResources.get("pageView"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ga.checked=!0});Y.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var Ma=document.createElement("input");Ma.style.marginBottom="8px";Ma.style.marginRight="8px";Ma.setAttribute("type","radio");Ma.setAttribute("name","printSize");U.appendChild(Ma);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));
-U.appendChild(v);mxEvent.addListener(U,"click",function(){Ma.checked=!0});Y.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginBottom="8px";sa.style.marginRight="8px";sa.setAttribute("type","radio");sa.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(sa);U.appendChild(v);fa=document.createElement("table");fa.style.display=
-"inline-block";fa.style.borderSpacing="0";Aa=document.createElement("tbody");var Ca=document.createElement("tr"),Da=Ca.cloneNode(!0),va=document.createElement("td"),Na=va.cloneNode(!0),Sa=va.cloneNode(!0),Ua=va.cloneNode(!0),Qa=va.cloneNode(!0),za=va.cloneNode(!0);va.style.textAlign="right";Ua.style.textAlign="right";mxUtils.write(va,mxResources.get("fitTo"));mxEvent.addListener(U,"click",function(ua){mxEvent.getSource(ua)!=sa&&(sa.checked=!sa.checked)});var Ea=document.createElement("input");Ea.style.margin=
-"0 2px";Ea.style.boxSizing="border-box";Ea.setAttribute("value",k.lastPrintSheetsAcross||"1");Ea.setAttribute("min","1");Ea.setAttribute("type","number");Ea.style.width="40px";Na.appendChild(Ea);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));Sa.appendChild(v);mxUtils.write(Ua,mxResources.get("fitToBy"));var B=Ea.cloneNode(!0);B.setAttribute("value",k.lastPrintSheetsDown||"1");Qa.appendChild(B);mxEvent.addListener(Ea,"click",function(ua){sa.checked=!0;mxEvent.consume(ua)});
-mxEvent.addListener(B,"click",function(ua){sa.checked=!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?Ma.checked=!0:k.lastPrintFitRadioChecked?sa.checked=!0:Ga.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));za.appendChild(v);Ca.appendChild(va);Ca.appendChild(Na);Ca.appendChild(Sa);Da.appendChild(Ua);Da.appendChild(Qa);Da.appendChild(za);Aa.appendChild(Ca);Aa.appendChild(Da);fa.appendChild(Aa);U.appendChild(fa);Y.appendChild(U);U=document.createElement("div");
-U.style.borderTop="1px solid lightGray";U.style.whiteSpace="nowrap";U.style.paddingTop="12px";U.style.marginTop="12px";U.style.paddingLeft="8px";mxUtils.write(U,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;U.appendChild(Q);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,
-mxResources.get("zoom")+":");U.appendChild(v);var R=document.createElement("input");R.style.width="60px";R.style.marginLeft="4px";R.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(R);mxUtils.br(U);var X=document.createElement("input");X.setAttribute("type","checkbox");X.style.marginTop="12px";X.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(X);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));
-U.appendChild(v);mxEvent.addListener(v,"click",function(ua){X.checked=!0;mxEvent.consume(ua)});var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintShadow?k.lastPrintShadow:!1;U.appendChild(ia);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("shadows"));U.appendChild(v);k.isOffline()&&!mxClient.IS_CHROMEAPP||v.appendChild(k.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));
-mxEvent.addListener(v,"click",function(ua){"IMG"!=mxEvent.getSource(ua).nodeName&&(ia.checked=!0,mxEvent.consume(ua))});Editor.enableShadowOption?null!=I&&mxUtils.br(U):(ia.style.display="none",v.style.display="none");var ja=document.createElement("input");ja.setAttribute("type","checkbox");ja.style.marginTop="10px";ja.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(U.appendChild(ja),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),
-U.appendChild(v),mxEvent.addListener(v,"click",function(ua){ja.checked=!0;mxEvent.consume(ua)}));var pa=document.createElement("input");pa.setAttribute("type","checkbox");pa.style.marginTop="10px";pa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(U),U.appendChild(pa),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),U.appendChild(v),
-mxEvent.addListener(v,"click",function(ua){pa.checked=!0;mxEvent.consume(ua)}));Y.appendChild(U);v=document.createElement("div");v.style.marginTop="30px";v.style.textAlign="right";v.style.whiteSpace="nowrap";k.isOffline()&&!mxClient.IS_CHROMEAPP||null!=I||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));U=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});U.className="geBtn";k.editor.cancelFirst&&v.appendChild(U);PrintDialog.previewEnabled&&null==I&&
-(fa=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),W(!1)}catch(ua){k.handleError(ua)}}),fa.className="geBtn",v.appendChild(fa));N=null!=N?N:null!=I?"export":PrintDialog.previewEnabled?"print":"ok";N=mxUtils.button(mxResources.get(N),function(){try{k.hideDialog(),W(!0)}catch(ua){k.handleError(ua)}});N.className="geBtn gePrimaryBtn";v.appendChild(N);k.editor.cancelFirst||v.appendChild(U);Y.appendChild(v);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?
+null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.geminiApiKey&&(Editor.geminiApiKey=k.geminiApiKey);null!=k.gptModels&&(Editor.gptModels=k.gptModels);null!=k.gptUrl&&
+(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var v=document.getElementsByTagName("script")[0];if(null!=v&&null!=v.parentNode){var J=document.createElement("style");J.setAttribute("type","text/css");J.appendChild(document.createTextNode(k));v.parentNode.insertBefore(J,v);k=k.split("url(");for(J=1;J<k.length;J++){var N=k[J].indexOf(")");
+N=Editor.trimCssUrl(k[J].substring(0,N));var T=document.createElement("link");T.setAttribute("rel","preload");T.setAttribute("href",N);T.setAttribute("as","font");T.setAttribute("crossorigin","");v.parentNode.insertBefore(T,v)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
+Editor.GUID_LENGTH=20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var v=[],J=0;J<k;J++)v.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return v.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},
+{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.generateTimeout=6E4;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(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var v=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(v)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[v]),Error(mxResources.get("notADiagramFile")+" ("+v+")");if("mxGraphModel"==k.nodeName){v=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=v&&""!=
+v)v!=this.graph.currentStyle&&(J=null!=this.graph.themes?this.graph.themes[v]:mxUtils.load(STYLE_PATH+"/"+v+".xml").getDocumentElement(),null!=J&&(N=new mxCodec(J.ownerDocument),N.decode(J,this.graph.getStylesheet())));else{var J=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=J){var N=new mxCodec(J.ownerDocument);N.decode(J,this.graph.getStylesheet())}}this.graph.currentStyle=v;this.graph.mathEnabled="1"==urlParams.math||
+"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));v=k.getAttribute("backgroundImage");null!=v?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(v)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(v=k.getAttribute("extFonts"))try{for(v=v.split("|").map(function(T){T=
+T.split("^");return{name:T[0],url:T[1]}}),J=0;J<v.length;J++)this.graph.addExtFont(v[J].name,v[J].url)}catch(T){console.log("ExtFonts format error: "+T.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 f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(k,v){k=null!=k?k:!0;var J=f.apply(this,arguments);
+null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&J.setAttribute("style",this.graph.currentStyle);var N=this.graph.getBackgroundImageObject(this.graph.backgroundImage,v);null!=N&&J.setAttribute("backgroundImage",JSON.stringify(N));J.setAttribute("math",this.graph.mathEnabled?"1":"0");J.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?J.setAttribute("adaptiveColors",this.graph.adaptiveColors):J.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&
+0<this.graph.extFonts.length&&(N=this.graph.extFonts.map(function(T){return T.name+"^"+T.url}),J.setAttribute("extFonts",N.join("|")));return J};Editor.prototype.isDataSvg=function(k){try{var v=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=v&&(null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(cont,v))),null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v)),null!=v&&0<v.length)){var J=mxUtils.parseXml(v).documentElement;return"mxfile"==
+J.nodeName||"mxGraphModel"==J.nodeName}}catch(N){}return!1};Editor.prototype.extractGraphModel=function(k,v,J){return Editor.extractGraphModel.apply(this,arguments)};var m=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
+m.apply(this,arguments)};var t=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){t.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,v){if("undefined"===typeof window.MathJax){var J=function(){N=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?
+k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var N=null;Editor.doMathJaxRender=function(U){try{null==N?(MathJax.typesetClear([U]),MathJax.typeset([U]),J()):N!=U&&Editor.mathJaxQueue.push(U)}catch(Y){MathJax.typesetClear([U]),null!=Y.retry?(N=U,Y.retry.then(function(){MathJax.typesetPromise([U]).then(J)["catch"](function(fa){console.log("Error in MathJax.typesetPromise: "+fa.toString());J()})})["catch"](function(fa){console.log("Error in MathJax.retry: "+fa.toString());J()})):null!=window.console&&
+console.log("Error in MathJax.typeset: "+Y.toString())}};window.MathJax=null!=v?v:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"],paths:{fonts:DRAW_MATH_URL+"/fonts","mathjax-tex":DRAW_MATH_URL+"/fonts/mathjax-tex-font","mathjax-mhchem-extension":DRAW_MATH_URL+"/fonts/mathjax-mhchem-font-extension","mathjax-bbm-extension":DRAW_MATH_URL+"/fonts/mathjax-bbm-font-extension",
+"mathjax-bboldx-extension":DRAW_MATH_URL+"/fonts/mathjax-bboldx-font-extension","mathjax-dsfont-extension":DRAW_MATH_URL+"/fonts/mathjax-dsfont-font-extension"}},output:{font:"mathjax-tex"},startup:{pageReady:function(){for(var U=0;U<Editor.mathJaxQueue.length;U++)Editor.doMathJaxRender(Editor.mathJaxQueue[U])}}};Editor.MathJaxRender=function(U){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(U):Editor.mathJaxQueue.push(U)};Editor.onMathJaxDone=function(){};
+var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(Y,fa){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var W=document.createElement("script");W.setAttribute("type","text/javascript");W.setAttribute("src",k);v[0].parentNode.appendChild(W)}}};
+Editor.prototype.csvToArray=function(k){if(0<k.length){var v="",J=[""],N=0,T=!0,W;k=$jscomp.makeIterator(k);for(W=k.next();!W.done;W=k.next())W=W.value,'"'===W?(T&&W===v&&(J[N]+=W),T=!T):","===W&&T?W=J[++N]="":J[N]+=W,v=W;return J}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var J=
+"t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+J+(v?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.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(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||
+"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var v=k.convert,J=this;k.convert=function(N){null!=N&&navigator.onLine&&("http://"!=N.substring(0,7)&&"https://"!=N.substring(0,8)||N.substring(0,k.baseUrl.length)==k.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(N)?"chrome-extension://"!=N.substring(0,19)&&(N=v.apply(this,arguments)):N=PROXY_URL+
+"?url="+encodeURIComponent(N));return N};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,J,N,T){try{var W=!0,U=window.setTimeout(mxUtils.bind(this,function(){W=!1;v(k)}),this.timeout),Y=mxUtils.bind(this,function(){null!=N?this.convertImageToDataUri(k,v,J,N,!0):v(k)});if(/(\.svg)$/i.test(k)&&!T)mxUtils.get(k,mxUtils.bind(this,function(oa){window.clearTimeout(U);W&&(200>oa.getStatus()||
+299<oa.getStatus()?Y():v(Editor.createSvgDataUri(oa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(U);W&&Y()}));else{var fa=new Image;this.crossOriginImages&&(fa.crossOrigin="anonymous");fa.onload=function(){window.clearTimeout(U);if(W)try{N=null!=N&&T?N:1;var oa=document.createElement("canvas"),la=oa.getContext("2d");la.scale(N,N);oa.height=fa.height*N;oa.width=fa.width*N;la.drawImage(fa,0,0);v(oa.toDataURL())}catch(qa){v(k)}};fa.onerror=function(){window.clearTimeout(U);W&&(null!=
+J?J():v(k))};fa.src=k}}catch(oa){null!=J?J():v(k)}};Editor.prototype.convertImages=function(k,v,J,N){function T(){0<W.length?W.shift()():v(k)}null==N&&(N=this.createImageUrlConverter());var W=[],U=J||{};J=mxUtils.bind(this,function(Y,fa){Y=k.getElementsByTagName(Y);for(var oa=0;oa<Y.length;oa++)mxUtils.bind(this,function(la){W.push(mxUtils.bind(this,function(){try{if(null!=la){var qa=N.convert(la.getAttribute(fa));if(null!=qa&&"data:"!=qa.substring(0,5)){var ya=U[qa];null==ya?this.convertImageToDataUri(qa,
+function(wa){null!=wa&&(U[qa]=wa,la.setAttribute(fa,wa));T()},null,Editor.svgRasterScale):(la.setAttribute(fa,ya),T())}else null!=qa&&la.setAttribute(fa,qa),T()}}catch(wa){T()}}))})(Y[oa])});J("image","xlink:href");J("img","src");T()};Editor.base64Encode=function(k){for(var v="",J=0,N=k.length,T,W,U;J<N;){T=k.charCodeAt(J++)&255;if(J==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
+3)<<4);v+="==";break}W=k.charCodeAt(J++);if(J==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(W&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((W&15)<<2);v+="=";break}U=k.charCodeAt(J++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
+3)<<4|(W&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((W&15)<<2|(U&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U&63)}return v};Editor.prototype.loadUrl=function(k,v,J,N,T,W,U,Y){try{var fa=!U&&(N||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));T=null!=T?T:!0;var oa=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(la){200<=la.getStatus()&&
+299>=la.getStatus()?null!=v&&(la=la.getText(),fa&&(W=null!=W?W:"data:image/png;base64,",la=W+Editor.base64Encode(la)),v(la)):null!=J&&(0==la.getStatus()?J({message:mxResources.get("accessDenied")},la):404==la.getStatus()?J({message:mxResources.get("fileNotFound"),code:la.getStatus()},la):J({message:this.getErrorMessage(la)},la))}),function(la){null!=J&&J({message:mxResources.get("error")+" "+la.getStatus()})},fa,this.timeout,function(){T&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:oa})},Y)});oa()}catch(la){null!=
+J&&J(la)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var J=k.getText(),N=JSON.parse(J);null!=N&&null!=N.error&&null!=N.error.message&&(v=N.error.message+" ("+v+")")}catch(T){}return v};Editor.prototype.absoluteCssFonts=function(k){var v=null;if(null!=k){var J=k.split("url(");if(0<J.length){v=[J[0]];k=window.location.pathname;var N=null!=k?k.lastIndexOf("/"):-1;0<=N&&(k=k.substring(0,N+1));N=document.getElementsByTagName("base");var T=null;null!=
+N&&0<N.length&&(T=N[0].getAttribute("href"));for(var W=1;W<J.length;W++)if(N=J[W].indexOf(")"),0<N){var U=Editor.trimCssUrl(J[W].substring(0,N));this.graph.isRelativeUrl(U)&&(U=null!=T?T+U:window.location.protocol+"//"+window.location.hostname+("/"==U.charAt(0)?"":k)+U);v.push('url("'+U+'"'+J[W].substring(N))}else v.push(J[W])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,J){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+encodeURIComponent(v));
+J(k,v)};Editor.prototype.embedCssFonts=function(k,v){var J=k.split("url("),N=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==N){for(var fa=[J[0]],oa=1;oa<J.length;oa++){var la=J[oa].indexOf(")");fa.push('url("');fa.push(this.cachedFonts[Editor.trimCssUrl(J[oa].substring(0,la))]);fa.push('"'+J[oa].substring(la))}v(fa.join(""))}});if(0<J.length){for(k=1;k<J.length;k++){var W=J[k].indexOf(")"),U=null,Y=J[k].indexOf("format(",W);0<Y&&(U=Editor.trimCssUrl(J[k].substring(Y+
+7,J[k].indexOf(")",Y))));mxUtils.bind(this,function(fa){if(null==this.cachedFonts[fa]){this.cachedFonts[fa]=fa;N++;var oa="application/x-font-ttf";if("svg"==U||/(\.svg)($|\?)/i.test(fa))oa="image/svg+xml";else if("otf"==U||"embedded-opentype"==U||/(\.otf)($|\?)/i.test(fa))oa="application/x-font-opentype";else if("woff"==U||/(\.woff)($|\?)/i.test(fa))oa="application/font-woff";else if("woff2"==U||/(\.woff2)($|\?)/i.test(fa))oa="application/font-woff2";else if("eot"==U||/(\.eot)($|\?)/i.test(fa))oa=
+"application/vnd.ms-fontobject";else if("sfnt"==U||/(\.sfnt)($|\?)/i.test(fa))oa="application/font-sfnt";this.mapFontUrl(oa,fa,mxUtils.bind(this,function(la,qa){this.loadUrl(qa,mxUtils.bind(this,function(ya){this.cachedFonts[fa]=ya;N--;T()}),mxUtils.bind(this,function(ya){N--;T()}),!0,null,"data:"+la+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(J[k].substring(0,W)),U)}T()}else v(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,
+mxUtils.bind(this,function(v){this.resolvedFontCss=v;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},v;for(v in Graph.fontMapping)Graph.isCssFontUrl(v)&&(k[v]=Graph.fontMapping[v]);return k};Editor.prototype.embedExtFonts=function(k){var v=this.graph.getCustomFonts();if(0<v.length){var J=[],N=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==N&&this.embedCssFonts(J.join(""),k)}),
+W=0;W<v.length;W++)mxUtils.bind(this,function(U,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(N++,this.loadUrl(Graph.rewriteGoogleFontUrl(Y),mxUtils.bind(this,function(fa){this.cachedGoogleFonts[Y]=fa;J.push(fa+"\n");N--;T()}),mxUtils.bind(this,function(fa){N--;J.push("@import url("+Y+");\n");T()}))):J.push(this.cachedGoogleFonts[Y]+"\n"):J.push('@font-face {font-family: "'+U+'";src: url("'+Y+'")}\n')})(v[W].name,v[W].url);T()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");
+if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),J=0;J<v.length;J++){var N=mxUtils.getTextContent(v[J]);0>N.indexOf("mxPageSelector")&&0<N.indexOf("MathJax")&&k[0].appendChild(v[J].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var J=mxUtils.getSvgDefs(k),N=v.split("\n");v=[];for(var T=[],W=0;W<N.length;W++)"@import"==N[W].substring(0,7)?v.push(N[W]):T.push(N[W]);k=k.ownerDocument;k=null!=k.createElementNS?
+k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),J.appendChild(k));0<T.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,T.join("\n")),J.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,J){var N=mxClient.IS_FF?8192:16384;return Math.min(J,Math.min(N/k,N/v))};Editor.prototype.exportToCanvas=
+function(k,v,J,N,T,W,U,Y,fa,oa,la,qa,ya,wa,Ia,Aa,Ba,Ga){try{W=null!=W?W:!0;U=null!=U?U:!0;qa=null!=qa?qa:this.graph;ya=null!=ya?ya:0;var Ma=fa?null:qa.background;Ma==mxConstants.NONE&&(Ma=null);null==Ma&&(Ma=N);null==Ma&&0==fa&&(Ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,ya,wa,null,U,null,null,null,oa,null,Aa,Ba,Ga),mxUtils.bind(this,function(sa){try{sa.style.setProperty("-webkit-font-smoothing","antialiased");sa.style.setProperty("-moz-osx-font-smoothing",
+"grayscale");var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){Qa.drawImage(Ca,0,0);k(Na,sa)},0):(Qa.drawImage(Ca,0,0),k(Na,sa))},Na=document.createElement("canvas"),Sa=parseInt(sa.getAttribute("width")),Ua=parseInt(sa.getAttribute("height"));Y=null!=Y?Y:1;null!=v&&(Y=W?Math.min(1,Math.min(3*v/(4*Ua),v/Sa)):v/Sa);Y=this.getMaxCanvasScale(Sa,Ua,Y);Sa=Math.ceil(Y*Sa);Ua=Math.ceil(Y*Ua);Na.setAttribute("width",Sa);Na.setAttribute("height",
+Ua);var Qa=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Qa.beginPath();Qa.rect(0,0,Sa,Ua);Qa.fillStyle="dark"==Aa&&"none"!=qa.getAdaptiveColors()?za.dark:za.light;Qa.fill()}1!=Y&&Qa.scale(Y,Y);if(Ia){var Ea=qa.view,C=Ea.scale;Ea.scale=1;var Q=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=C;Q="data:image/svg+xml;base64,"+Q;var R=qa.gridSize*Ea.gridSteps*Y,X=qa.getGraphBounds(),ha=Ea.translate.x*C,ia=Ea.translate.y*C,pa=ha+(X.x-ha)/C-ya,xa=ia+(X.y-
+ia)/C-ya,ra=new Image;ra.onload=function(){try{for(var ua=-Math.round(R-mxUtils.mod((ha-pa)*Y,R)),Ka=-Math.round(R-mxUtils.mod((ia-xa)*Y,R));ua<Sa;ua+=R)for(var Va=Ka;Va<Ua;Va+=R)Qa.drawImage(ra,ua/Y,Va/Y);va()}catch(Oa){null!=T&&T(Oa)}};ra.onerror=function(ua){null!=T&&T(ua)};ra.src=Q}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};oa&&this.graph.addSvgShadow(sa);this.graph.mathEnabled&&this.addMathCss(sa);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&
+this.addFontCss(sa,this.resolvedFontCss),Ca.src=Editor.createSvgDataUri(mxUtils.getXml(sa))}catch(va){null!=T&&T(va)}});this.embedExtFonts(mxUtils.bind(this,function(va){try{null!=va&&this.addFontCss(sa,va),this.loadFonts(Da)}catch(Na){null!=T&&T(Na)}}))}catch(va){null!=T&&T(va)}}),J,la)}catch(sa){null!=T&&T(sa)}};Editor.crcTable=[];for(var y=0;256>y;y++)for(var q=y,B=0;8>B;B++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[y]=q;Editor.updateCRC=function(k,v,J,N){for(var T=0;T<N;T++)k=Editor.crcTable[(k^
+v.charCodeAt(J+T))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,J=0;J<k.length;J++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(J))&255];return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,J,N,T){function W(la,qa){var ya=fa;fa+=qa;return la.substring(ya,fa)}function U(la){la=W(la,4);return la.charCodeAt(3)+(la.charCodeAt(2)<<8)+(la.charCodeAt(1)<<16)+(la.charCodeAt(0)<<24)}function Y(la){return String.fromCharCode(la>>24&255,la>>16&255,la>>8&255,la&255)}k=k.substring(k.indexOf(",")+
+1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(W(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(W(k,4),"IHDR"!=W(k,4))null!=T&&T();else{W(k,17);T=k.substring(0,fa);do{var oa=U(k);if("IDAT"==W(k,4)){T=k.substring(0,fa-8);"pHYs"==v&&"dpi"==J?(J=Math.round(N/.0254),J=Y(J)+Y(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,v,0,4);N=Editor.updateCRC(N,J,0,J.length);T+=Y(J.length)+
+v+J+Y(N^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+oa);W(k,oa);W(k,4)}while(oa);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var I=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){I.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
+function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,v){var J=null;null!=k.editor.graph.getModel().getParent(v)?J=v.getId():null!=k.currentPage&&(J=k.currentPage.getId());return J});if(null!=window.StyleFormatPanel){var D=Format.prototype.init;Format.prototype.init=function(){D.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};
+var P=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?P.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var v=this.editorUi,J=v.editor.graph;
+if(J.isEnabled()){var N=v.getCurrentFile();null!=N&&N.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},function(W){v.editor.setAutosave(W);v.editor.autosave&&N.isModified()&&N.fileChanged()},{install:function(W){this.listener=function(){W(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&J.isEnabled()&&"undefined"!==
+typeof MathJax){var T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return J.mathEnabled},function(W){v.actions.get("mathematicalTypesetting").funct()},{install:function(W){this.listener=function(){W(J.mathEnabled)};v.addListener("mathEnabledChanged",this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(T);(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&T.appendChild(v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return k};
+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,isVisible:function(k){return"0"==mxUtils.getValue(k.style,
+"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.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:.25,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",
+min:0,defVal:25,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",
+min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.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.tape.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},
+{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},
+{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",
+type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=
+[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];
+mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",
+type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",
+type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",
+dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
+[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
+min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
+stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",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;var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));
+g.apply(this,arguments);null!=k.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),k.customProperties,k))};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var v=this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);l.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=
+function(k,v,J,N){function T(Qa,za,Ea,C,Q){if(null!=Ea.valueChanged)Ea.valueChanged(za,Q,J,qa);else{ya.getModel().beginUpdate();try{Q=[];var R=[];if(null!=Ea.index){for(var X=[],ha=Ea.parentRow.nextSibling;ha&&ha.getAttribute("data-pName")==Qa;)X.push(ha.getAttribute("data-pValue")),ha=ha.nextSibling;Ea.index<X.length?null!=C?X.splice(C,1):X[Ea.index]=za:X.push(za);null!=Ea.size&&X.length>Ea.size&&(X=X.slice(0,Ea.size));za=X.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,X.length,
+ya.getSelectionCells()),Q.push(Ea.countProperty),R.push(X.length))}ya.setCellStyles(Qa,za,ya.getSelectionCells());Q.push(Qa);R.push(za);if(null!=Ea.dependentProps)for(Qa=0;Qa<Ea.dependentProps.length;Qa++){var ia=Ea.dependentPropsDefVal[Qa],pa=Ea.dependentPropsVals[Qa];if(pa.length>za)pa=pa.slice(0,za);else for(var xa=pa.length;xa<za;xa++)pa.push(ia);pa=pa.join(",");ya.setCellStyles(Ea.dependentProps[Qa],pa,ya.getSelectionCells());Q.push(Ea.dependentProps[Qa]);R.push(pa)}if("function"==typeof Ea.onChange)Ea.onChange(ya,
+za);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",Q,"values",R,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}}function W(Qa,za){za.style.left="0px";za.style.top="0px";za.style.position="relative";za.style.right="0px";za.style.bottom="0px";za.style.width="100%";za.style.maxWidth="100%";za.style.maxHeight="100%";za.style.textAlign="left"}function U(Qa,za,Ea){function C(R){if(null==R||R==mxConstants.NONE)Q.style.background="url('"+Dialog.prototype.noColorImage+"')";
+else if("default"==R)Q.style.background="";else{var X=mxUtils.getLightDarkColor(R);mxUtils.isLightDarkColor(R)&&X.light!=X.dark?Q.style.background="linear-gradient(to right bottom, "+X.cssText+" 50%, "+mxUtils.invertLightDarkColor(X).cssText+" 50.3%)":Q.style.background=R}}var Q=document.createElement("div");Q.style.width="32px";Q.style.height="8px";Q.style.margin="2px";Q.style.borderStyle="solid";Q.style.borderWidth="1px";C(za);btn=mxUtils.button("",mxUtils.bind(qa,function(R){this.editorUi.pickColor(za,
+function(X){T(Qa,X,Ea);C(X)});mxEvent.consume(R)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(Q);return btn}function Y(Qa,za,Ea,C,Q,R,X){null!=za&&(za=za.split(","),wa.push({name:Qa,values:za,type:Ea,defVal:C,countProperty:Q,parentRow:R,isDeletable:!0,flipBkg:X}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ha){for(var ia=R,pa=0;null!=ia.nextSibling;)if(ia.nextSibling.getAttribute("data-pName")==
+Qa)ia=ia.nextSibling,pa++;else break;var xa={type:Ea,parentRow:R,index:pa,isDeletable:!0,defVal:C,countProperty:Q};pa=la(Qa,"",xa,0==pa%2,X);T(Qa,C,xa);ia.parentNode.insertBefore(pa,ia.nextSibling);mxEvent.consume(ha)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Qa,za,Ea,C,Q,R,X){if(0<Q){var ha=Array(Q);za=null!=za?za.split(","):[];for(var ia=0;ia<Q;ia++)ha[ia]=null!=za[ia]?za[ia]:null!=C?C:"";wa.push({name:Qa,values:ha,type:Ea,defVal:C,parentRow:R,
+flipBkg:X,size:Q})}return document.createElement("div")}function oa(Qa,za,Ea){var C=document.createElement("input");C.type="checkbox";C.checked="1"==za;mxEvent.addListener(C,"change",function(){T(Qa,C.checked?"1":"0",Ea,null,C)});return C}function la(Qa,za,Ea,C,Q){var R=Ea.dispName,X=Ea.type,ha=document.createElement("tr");ha.className="gePropRow"+(Q?"Dark":"")+(C?"Alt":"")+" gePropNonHeaderRow";ha.setAttribute("data-pName",Qa);ha.setAttribute("data-pValue",za);C=!1;null!=Ea.index&&(ha.setAttribute("data-index",
+Ea.index),R=(null!=R?R:"")+"["+Ea.index+"]",C=!0);var ia=document.createElement("td");ia.className="gePropRowCell";R=mxResources.get(R,null,R);mxUtils.write(ia,R);ia.setAttribute("title",R);C&&(ia.style.textAlign="right");ha.appendChild(ia);ia=document.createElement("td");ia.className="gePropRowCell";ia.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ia,"click",mxUtils.bind(qa,function(ua){!mxUtils.isAncestorNode(ha,document.activeElement)&&mxUtils.isAncestorNode(ha.parentNode,
+document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==X)ia.appendChild(U(Qa,za,Ea));else if("bool"==X||"boolean"==X)ia.appendChild(oa(Qa,za,Ea));else if("enum"==X){var pa=Ea.enumList;ia.innerHTML="";var xa=document.createElement("div");xa.className="gePropValue";ia.appendChild(xa);for(Q=0;Q<pa.length;Q++)if(R=pa[Q],R.val==za){mxUtils.write(xa,mxResources.get(R.dispName,null,R.dispName));break}mxEvent.addListener(ia,
+"click",mxUtils.bind(qa,function(ua){var Ka=mxEvent.getSource(ua);if(!(Ka!=ia&&Ka!=xa||mxEvent.isConsumed(ua))){xa.innerHTML="";var Va=document.createElement("select"),Oa=null;W(ia,Va);for(ua=0;ua<pa.length;ua++){Ka=pa[ua];var Ta=document.createElement("option");Ta.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Ta,mxResources.get(Ka.dispName,null,Ka.dispName));Va.appendChild(Ta);null==Ka.val&&(Ta.value="null",Oa=Ta)}Va.value=null==za&&null!=Oa?"null":za;xa.appendChild(Va);mxEvent.addListener(Va,
+"change",function(){var Za=mxUtils.htmlEntities(Va.value);if(Va[Va.selectedIndex]==Oa||"null"==Za.value)Za=null;T(Qa,Za,Ea)});Va.focus();mxEvent.addListener(Va,"blur",function(){xa.innerHTML="";for(var Za=0;Za<pa.length;Za++){var Pa=pa[Za];if(Pa.val==Va.value){mxUtils.write(xa,mxResources.get(Pa.dispName,null,Pa.dispName));break}}})}}))}else if("dynamicArr"==X)ia.appendChild(Y(Qa,za,Ea.subType,Ea.subDefVal,Ea.countProperty,ha,Q));else if("staticArr"==X)ia.appendChild(fa(Qa,za,Ea.subType,Ea.subDefVal,
+Ea.size,ha,Q));else if("readOnly"==X)Q=document.createElement("input"),Q.setAttribute("readonly",""),Q.value=za,Q.style.borderWidth="0px","id"==Qa||"shape"==Qa?(ha.firstChild.innerHTML="",ha.firstChild.setAttribute("colspan","2"),Q.style.flexGrow="1",Q.style.marginLeft="4px",Q.style.textAlign="id"==Qa?"center":"left",Q.setAttribute("title",za),R=document.createElement("div"),mxUtils.write(R,mxResources.get(Qa)+":"),R.style.display="inline-flex",R.style.alignItems="center",R.style.width="100%",R.appendChild(Q),
+ha.firstChild.appendChild(R)):(Q.style.width="96px",ia.appendChild(Q));else{ia.innerHTML="";var ra=document.createElement("div");ra.className="gePropValue";ia.appendChild(ra);ra.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));mxEvent.addListener(ia,"click",mxUtils.bind(qa,function(ua){function Ka(){var Ta=Oa.value;Ta=0==Ta.length&&"string"!=X&&"numbers"!=X?0:Ta;Ea.allowAuto&&(null!=Ta.trim&&"auto"==Ta.trim().toLowerCase()?(Ta="auto",X="string"):(Ta=parseFloat(Ta),Ta=isNaN(Ta)?0:Ta));null!=
+Ea.min&&Ta<Ea.min?Ta=Ea.min:null!=Ea.max&&Ta>Ea.max&&(Ta=Ea.max);var Za=null;try{Za="numbers"==X?Ta.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==X?parseInt(Ta):Ta)+"")}catch(Pa){}T(Qa,Za,Ea,null,Oa)}var Va=mxEvent.getSource(ua);if(!(Va!=ia&&Va!=ra||mxEvent.isConsumed(ua))){ra.innerHTML="";var Oa=document.createElement("input");W(ra,Oa);Oa.value=decodeURIComponent(za);Oa.className="gePropEditor";"int"!=X&&"float"!=X||Ea.allowAuto||(Oa.type="number",Oa.step="int"==X?"1":"any",null!=
+Ea.min&&(Oa.min=parseFloat(Ea.min)),null!=Ea.max&&(Oa.max=parseFloat(Ea.max)));ra.appendChild(Oa);mxEvent.addListener(Oa,"keypress",function(Ta){13==Ta.keyCode&&Ka()});Oa.focus();mxEvent.addListener(Oa,"blur",function(){Ka()})}}))}Ea.isDeletable&&(Q=mxUtils.button("-",mxUtils.bind(qa,function(ua){T(Qa,"",Ea,Ea.index);mxEvent.consume(ua)})),Q.style.height="16px",Q.style.width="25px",Q.style.float="right",Q.className="geColorBtn",ia.appendChild(Q));ha.appendChild(ia);return ha}var qa=this,ya=this.editorUi.editor.graph,
+wa=[],Ia=document.createElement("table");Ia.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.style.paddingLeft="16px";Ba.style.backgroundRepeat="no-repeat";Ba.style.backgroundPosition="-2px 50%";Ba.style.backgroundSize="20px";mxUtils.write(Ba,mxResources.get("property"));Aa.style.cursor="pointer";var Ga=function(){var Qa=Ia.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ba.style.backgroundImage=
+"url('"+Editor.arrowRightImage+"')";var za="none";for(var Ea=k.childNodes.length-1;0<=Ea;Ea--)try{var C=k.childNodes[Ea],Q=C.nodeName.toUpperCase();"INPUT"!=Q&&"SELECT"!=Q||k.removeChild(C)}catch(R){}}else Ba.style.backgroundImage="url('"+Editor.arrowDownImage+"')",za="";for(Ea=0;Ea<Qa.length;Ea++)Qa[Ea].style.display=za};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;Ga()});Aa.appendChild(Ba);var Ma=document.createElement("th");Ma.className=
+"gePropHeaderCell";Ma.style.paddingLeft="4px";mxUtils.write(Ma,mxResources.get("value"));Aa.appendChild(Ma);Ia.appendChild(Aa);var sa=Ma=!1;Aa=null;1==J.vertices.length&&0==J.edges.length?Aa=J.vertices[0].id:0==J.vertices.length&&1==J.edges.length&&(Aa=J.edges[0].id);null==Aa||N||(Ia.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"id",type:"readOnly"},!0,!1)),null!=J.style&&null!=J.style.shape&&Ia.appendChild(la("shape",mxUtils.htmlEntities(J.style.shape),{dispName:"shape",type:"readOnly"},
+!0,!1)));for(var Ca in v)if(N=v[Ca],("function"!=typeof N.isVisible||N.isVisible(J,this))&&!N.primary){var Da=null!=N.getValue?N.getValue(J,this):null!=J.style[Ca]?mxUtils.htmlEntities(J.style[Ca]+""):null!=N.getDefaultValue?N.getDefaultValue(J,this):N.defVal;if("separator"==N.type)sa=!sa;else{if("staticArr"==N.type)N.size=parseInt(J.style[N.sizeProperty]||v[N.sizeProperty].defVal)||0;else if(null!=N.dependentProps){var va=N.dependentProps,Na=[],Sa=[];for(Aa=0;Aa<va.length;Aa++)if(null!=v[va[Aa]]){var Ua=
+J.style[va[Aa]];Sa.push(v[va[Aa]].subDefVal);Na.push(null!=Ua?Ua.split(","):[])}N.dependentPropsDefVal=Sa;N.dependentPropsVals=Na}Ia.appendChild(la(Ca,Da,N,Ma,sa));Ma=!Ma}}for(Aa=0;Aa<wa.length;Aa++)for(N=wa[Aa],v=N.parentRow,Ca=0;Ca<N.values.length;Ca++)Ma=la(N.name,N.values[Ca],{type:N.type,parentRow:N.parentRow,isDeletable:N.isDeletable,index:Ca,defVal:N.defVal,countProperty:N.countProperty,size:N.size},0==Ca%2,N.flipBkg),v.parentNode.insertBefore(Ma,v.nextSibling),v=Ma;k.appendChild(Ia);Ga();
+return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=this.editorUi,J=v.editor.graph,N=document.createElement("div");N.style.padding="6px 20px 0 24px";k.appendChild(N);var T=document.createElement("div");T.className="geSwitcher";T.style.padding="4px 18px 6px 0px";for(var W=[],U=0;U<this.defaultColorSchemes.length;U++){var Y=document.createElement("div");Y.className="geSwitcherDot";mxUtils.bind(this,function(ya){mxEvent.addListener(Y,"click",mxUtils.bind(this,
+function(){fa(ya)}))})(U);W.push(Y);T.appendChild(Y)}var fa=mxUtils.bind(this,function(ya){null!=W[ya]&&(null!=this.format.currentScheme&&null!=W[this.format.currentScheme]&&(W[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ya,oa(this.defaultColorSchemes[this.format.currentScheme]),W[this.format.currentScheme].style.background="#84d7ff")}),oa=mxUtils.bind(this,function(ya){var wa=mxUtils.clone(J.defaultVertexStyle);wa[mxConstants.STYLE_STROKECOLOR]=null!=wa[mxConstants.STYLE_STROKECOLOR]?
+wa[mxConstants.STYLE_STROKECOLOR]:"default";wa[mxConstants.STYLE_FILLCOLOR]=null!=wa[mxConstants.STYLE_FILLCOLOR]?wa[mxConstants.STYLE_FILLCOLOR]:"default";wa[mxConstants.STYLE_FONTCOLOR]=null!=wa[mxConstants.STYLE_FONTCOLOR]?wa[mxConstants.STYLE_FONTCOLOR]:"default";J.replaceDefaultColors(new mxCell,wa);var Ia=mxUtils.bind(this,function(Ba){var Ga=mxUtils.button("",mxUtils.bind(this,function(Ca){J.getModel().beginUpdate();try{for(var Da=v.getSelectionState().cells,va=0;va<Da.length;va++){var Na=
+J.getModel().getStyle(Da[va]);null!=Ba?(mxEvent.isShiftDown(Ca)||(Na=""==Ba.fill||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,Ba.fill),Na=""==Ba.gradient||null==Ba.gradient?mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,Ba.gradient),mxEvent.isControlDown(Ca)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ca)||!J.getModel().isVertex(Da[va])||(Na=""==Ba.font||null==Ba.font?mxUtils.setStyle(Na,
+mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,Ba.font))),mxEvent.isAltDown(Ca)||(Na=""==Ba.stroke||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,Ba.stroke))):(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null),J.getModel().isVertex(Da[va])&&(Na=mxUtils.setStyle(Na,
+mxConstants.STYLE_FONTCOLOR,null)));J.getModel().setStyle(Da[va],Na)}}finally{J.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";if(null!=Ba){var Ma="1px solid";null!=Ba.border&&(Ma=Ba.border);if(null!=Ba.gradient)Ga.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(Ba.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(Ba.gradient).cssText+" 100%)";else if(Ba.fill==
+mxConstants.NONE)Ga.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==Ba.fill||""==Ba.fill)Ga.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var sa=mxUtils.getLightDarkColor(Ba.fill);Ga.style.backgroundImage="linear-gradient(to right bottom, "+sa.cssText+" 50%, "+sa.light+" 50.3%)"}null==Ba.stroke||Ba.stroke==mxConstants.NONE?Ga.style.border=Ma+" transparent":""==Ba.stroke?Ga.style.border="1px solid "+
+mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(sa=mxUtils.getLightDarkColor(Ba.stroke),Ga.style.border=Ma+" "+sa.cssText,Ga.style.borderRightColor=sa.light,Ga.style.borderBottomColor=Ga.style.borderRightColor);null!=Ba.title&&Ga.setAttribute("title",Ba.title)}else Ma=mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),sa=mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,"#000000"),Ga.style.backgroundColor=Ma,Ga.style.border="1px solid "+sa;
+Ga.style.borderRadius="0";N.appendChild(Ga);null!=Ba&&null!=Ba.gradient&&(Ma=Ga.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",N.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ga.click()}))});N.innerText=
+"";if(null!=ya)for(var Aa=0;Aa<ya.length;Aa++)0<Aa&&0==mxUtils.mod(Aa,4)&&mxUtils.br(N),Ia(ya[Aa])});null==this.format.currentScheme?fa(Math.min(W.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):fa(this.format.currentScheme);U=10>=this.defaultColorSchemes.length?43:23;var la=document.createElement("div");la.className="geButton";la.style.cssText="position:absolute;left:0px;bottom:"+U+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(la,"click",mxUtils.bind(this,
+function(){fa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var qa=document.createElement("div");qa.className="geButton";qa.style.cssText="position:absolute;left:186px;bottom:"+U+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(k.appendChild(la),k.appendChild(qa));mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){fa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));oa(this.defaultColorSchemes[this.format.currentScheme]);
+10>=this.defaultColorSchemes.length&&k.appendChild(T)}return k}}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.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=
+function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=function(k,v){var J=Graph.fontMapping[v];null==J&&Graph.isCssFontUrl(v)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",
+Graph.rewriteGoogleFontUrl(v))):(null==J&&(J='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+v+'");\n}'),k=document.createElement("style"),mxUtils.write(k,J));return k};Graph.addRecentCustomFont=function(k,v){};Graph.addFont=function(k,v,J,N){if(null!=k&&0<k.length&&null!=v&&0<v.length){N=null!=N?N:Graph.customFontElements;var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var W=N[T];null!=W&&W.url!=v&&(W.elt.parentNode.removeChild(W.elt),W=null);null==W?(W=v,"http:"==v.substring(0,
+5)&&(W=PROXY_URL+"?url="+encodeURIComponent(v)),W={name:k,url:v,elt:Graph.createFontElement(k,W)},N[T]=W,v=N==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=J&&("link"==W.elt.nodeName.toLowerCase()?(W.elt.onload=J,W.elt.onerror=J):J()),null!=v&&v.appendChild(W.elt)):null!=J&&J()}else null!=J&&J()}else null!=J&&J();return k};Graph.getFontUrl=function(k,v){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(v=k.url);return v};Graph.processFontAttributes=function(k){k=
+k.getElementsByTagName("*");for(var v=0;v<k.length;v++){var J=k[v].getAttribute("data-font-src");if(null!=J){var N="FONT"==k[v].nodeName?k[v].getAttribute("face"):k[v].style.fontFamily;null!=N&&Graph.addFont(N,J)}}};Graph.processFontStyle=function(k){if(null!=k){var v=mxUtils.getValue(k,"fontSource",null);if(null!=v){var J=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=J)try{Graph.addFont(J,decodeURIComponent(v))}catch(N){}}}return k};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.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var n=Graph.prototype.init;Graph.prototype.init=function(){function k(T){v=T}n.apply(this,arguments);this.hiddenTags=
+[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var v=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(T){v=null});this.isMouseInsertPoint=function(){return null!=v};var J=this.getInsertPoint;this.getInsertPoint=function(T){return null==v||T?J.apply(this,arguments):this.getPointForEvent(v)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var W=this.graph.getCellStyle(T);
+if(null!=W&&"rack"==W.childLayout){var U=new mxStackLayout(this.graph,!1);U.gridSize=null!=W.rackUnitSize?parseFloat(W.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;U.marginLeft=W.marginLeft||0;U.marginRight=W.marginRight||0;U.marginTop=W.marginTop||0;U.marginBottom=W.marginBottom||0;U.allowGaps=W.allowGaps||0;U.horizontal="1"==mxUtils.getValue(W,"horizontalRack","0");U.resizeParent=!1;U.fill=!0;return U}return N.apply(this,arguments)};this.updateGlobalUrlVariables()};
+var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,J,N,T,W,U,Y,fa,oa,la,qa){F.apply(this,arguments);Graph.processFontAttributes(qa)};var G=mxText.prototype.redraw;mxText.prototype.redraw=function(){G.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};
+Graph.prototype.createTagsDialog=function(k,v,J,N){function T(){for(var Aa=Y.getSelectionCells(),Ba=[],Ga=0;Ga<Aa.length;Ga++)Y.isCellVisible(Aa[Ga])&&Ba.push(Aa[Ga]);Y.setSelectionCells(Ba)}function W(Aa){Y.setHiddenTags(Aa?[]:fa.slice());T();Y.refresh()}function U(Aa,Ba){la.innerText="";if(0<Aa.length){var Ga=document.createElement("table");Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";var Ma=document.createElement("tbody");
+if(null!=Aa&&0<Aa.length)for(var sa=0;sa<Aa.length;sa++)(function(Ca){function Da(){var za=Y.getCellsForTags([Ca],null,null,!0);Y.isEnabled()?Y.setSelectionCells(za):Y.highlightCells(za,null,null,70)}var va=0>mxUtils.indexOf(Y.hiddenTags,Ca),Na=document.createElement("tr"),Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";var Ua=document.createElement("img");Ua.setAttribute("src",va?Editor.visibleImage:Editor.hiddenImage);Ua.setAttribute("title",mxResources.get(va?"hideIt":
+"show",[Ca]));mxUtils.setOpacity(Ua,va?75:25);Ua.className="geAdaptiveAsset";Ua.style.verticalAlign="middle";Ua.style.cursor="pointer";Ua.style.width="16px";if(v||Editor.isDarkMode())Ua.style.filter="invert(100%)";Sa.appendChild(Ua);mxEvent.addListener(Ua,"click",function(za){mxEvent.isShiftDown(za)?W(0<=mxUtils.indexOf(Y.hiddenTags,Ca)):(Y.toggleHiddenTag(Ca),T(),Y.refresh());mxEvent.consume(za)});Na.appendChild(Sa);Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";Ua=
+document.createElement("img");Ua.setAttribute("src",Editor.selectImage);Ua.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ua,va?75:25);Ua.className="geAdaptiveAsset";Ua.style.verticalAlign="middle";Ua.style.cursor="pointer";Ua.style.width="16px";if(v||Editor.isDarkMode())Ua.style.filter="invert(100%)";mxEvent.addListener(Ua,"click",function(za){W(!0);Da();mxEvent.consume(za)});Sa.appendChild(Ua);Na.appendChild(Sa);Sa=document.createElement("td");Sa.style.overflow="hidden";Sa.style.whiteSpace=
+"nowrap";Sa.style.textOverflow="ellipsis";Sa.style.verticalAlign="middle";Sa.style.cursor="pointer";Sa.setAttribute("title",Ca);a=document.createElement("a");mxUtils.write(a,Ca);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,va?100:40);Sa.appendChild(a);mxEvent.addListener(Sa,"click",function(za){if(mxEvent.isShiftDown(za))W(!0),Da();else if(va&&0<Y.hiddenTags.length)W(!0);else{var Ea=fa.slice(),C=mxUtils.indexOf(Ea,Ca);Ea.splice(C,1);Y.setHiddenTags(Ea);T();Y.refresh()}mxEvent.consume(za)});
+Na.appendChild(Sa);if(Y.isEnabled()){Sa=document.createElement("td");Sa.style.verticalAlign="middle";Sa.style.textAlign="center";Sa.style.width="18px";if(null==Ba){Sa.style.align="center";Sa.style.width="16px";Ua=document.createElement("img");Ua.setAttribute("src",Editor.trashImage);Ua.setAttribute("title",mxResources.get("removeIt",[Ca]));mxUtils.setOpacity(Ua,va?75:25);Ua.className="geAdaptiveAsset";Ua.style.verticalAlign="middle";Ua.style.cursor="pointer";Ua.style.width="16px";if(v||Editor.isDarkMode())Ua.style.filter=
+"invert(100%)";mxEvent.addListener(Ua,"click",function(za){var Ea=mxUtils.indexOf(fa,Ca);0<=Ea&&fa.splice(Ea,1);Y.removeTagsForCells(Y.model.getDescendants(Y.model.getRoot()),[Ca]);Y.refresh();mxEvent.consume(za)});Sa.appendChild(Ua)}else{var Qa=document.createElement("input");Qa.setAttribute("type","checkbox");Qa.style.margin="0px";Qa.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,Ca);Qa.checked=Qa.defaultChecked;Qa.style.background="transparent";Qa.setAttribute("title",mxResources.get(Qa.defaultChecked?
+"removeIt":"add",[Ca]));mxEvent.addListener(Qa,"change",function(za){Qa.checked?Y.addTagsForCells(Y.getSelectionCells(),[Ca]):Y.removeTagsForCells(Y.getSelectionCells(),[Ca]);mxEvent.consume(za)});Sa.appendChild(Qa)}Na.appendChild(Sa)}Ma.appendChild(Na)})(Aa[sa]);Ga.appendChild(Ma);la.appendChild(Ga)}}var Y=this,fa=Y.hiddenTags.slice(),oa=document.createElement("div");oa.style.userSelect="none";oa.style.overflow="hidden";oa.style.padding="10px";oa.style.height="100%";var la=document.createElement("div");
+la.style.position="absolute";la.style.boxSizing="border-box";la.style.userSelect="none";la.style.overflow="auto";la.style.padding="3px";la.style.left="0px";la.style.right="0px";la.style.top="0px";la.style.bottom="0px";oa.appendChild(la);Y.addListener(mxEvent.ROOT,function(){fa=Y.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Aa,Ba){if(k()){Aa=Y.getAllTags();for(Ba=0;Ba<Aa.length;Ba++)0>mxUtils.indexOf(fa,Aa[Ba])&&fa.push(Aa[Ba]);fa.sort();Y.isSelectionEmpty()?U(fa):U(fa,Y.getCommonTagsForCells(Y.getSelectionCells()))}});
+Y.selectionModel.addListener(mxEvent.CHANGE,qa);Y.model.addListener(mxEvent.CHANGE,qa);Y.addListener(mxEvent.REFRESH,qa);var ya=document.createElement("div");ya.className="geToolbarContainer geDialogToolbar";ya.style.position="absolute";ya.style.display="flex";ya.style.bottom="0px";ya.style.left="0px";ya.style.right="0px";ya.style.height="32px";ya.style.overflow="hidden";ya.style.padding="3px 4px 4px 4px";ya.style.borderWidth="1px 0px 0px 0px";ya.style.borderStyle="solid";ya.style.whiteSpace="nowrap";
+if(Y.isEnabled()){la.style.bottom="32px";var wa=document.createElement("a");wa.className="geButton";var Ia=wa.cloneNode(!1);Ia.style.backgroundImage="url("+Editor.visibleImage+")";Ia.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(Ia,"click",function(Aa){Y.setHiddenTags([]);mxEvent.isShiftDown(Aa)||(fa=Y.hiddenTags.slice());T();Y.refresh();mxEvent.consume(Aa)});ya.appendChild(Ia);null!=J&&(wa=wa.cloneNode(!1),wa.style.backgroundImage="url("+Editor.plusImage+")",wa.setAttribute("title",
+mxResources.get("add")),mxEvent.addListener(wa,"click",function(Aa){J(fa,function(Ba){fa=Ba;qa()});mxEvent.consume(Aa)}),ya.appendChild(wa));oa.appendChild(ya)}null!=N&&ya.appendChild(N);return{div:oa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var J=Graph.customFontElements[v];k.push({name:J.name,url:J.url})}return k};Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var J=Editor.guid();document.execCommand("fontname",
+!1,J);for(var N=this.cellEditor.textarea.getElementsByTagName("font"),T=!1,W=0;W<N.length;W++)N[W].getAttribute("face")==J&&(T=!0,N[W].setAttribute("face",k),null!=v?N[W].setAttribute("data-font-src",v):N[W].removeAttribute("data-font-src"));T||document.execCommand("fontname",!1,k)};var L=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return L.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 k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var v in k)this.globalVars[v]=k[v]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var M=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var v=
+M.apply(this,arguments);null==v&&null!=this.globalVars&&(v=this.globalVars[k]);return v};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,v,J,N,T,W,U,Y,fa,oa,la,qa,ya,wa,Ia,Aa){var Ba=K.apply(this,arguments);if(null!=
+qa){var Ga=Ba.getAttribute("style");null==Ga&&(Ga="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ba.setAttribute("style",Ga+(" color-scheme: "+qa+";"))}var Ma=this.getCustomFonts();if(la&&0<Ma.length){var sa=Ba.ownerDocument;Ga=null!=sa.createElementNS?sa.createElementNS(mxConstants.NS_SVG,"style"):sa.createElement("style");null!=sa.setAttributeNS?Ga.setAttributeNS("type","text/css"):Ga.setAttribute("type","text/css");for(var Ca="",Da=
+"",va=0;va<Ma.length;va++){var Na=Ma[va].name,Sa=Ma[va].url;Graph.isCssFontUrl(Sa)?Ca+="@import url("+Graph.rewriteGoogleFontUrl(Sa)+");\n":Da+='@font-face {\nfont-family: "'+Na+'";\nsrc: url("'+Sa+'");\n}\n'}Ga.appendChild(sa.createTextNode(Ca+Da));Ba.getElementsByTagName("defs")[0].appendChild(Ga)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(Ba);this.mathEnabled&&(document.body.appendChild(Ba),Editor.MathJaxRender(Ba),Ba.parentNode.removeChild(Ba),
+Ga=Ba.ownerDocument.getElementById("MJX-SVG-styles"),null!=Ga&&Ba.getElementsByTagName("defs")[0].appendChild(Ga.cloneNode(!0)));return Ba};var Z=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){Z.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ja=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=
+function(){ja.apply(this,arguments);this.enumerationState=0};var da=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return da.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+
+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var v="1"==mxUtils.getValue(k.style,"enumerate",0);v&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):v||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);v=k.secondLabel;if(null!=v){var J=k.view.scale,
+N=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*J,k.y+4*J,0,0):mxRectangle.fromPoint(k.view.getPoint(k));v.bounds.equals(k)&&v.value==N&&v.scale==J||(v.bounds=k,v.value=N,v.scale=J,v.redraw())}};var ba=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ba.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),
+this.view.validateBackgroundImage())};var na=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){na.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,v){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,v))};Graph.prototype.executeCustomActions=function(k,v,J){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 N=!1,T=0,W=0,U=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),Y=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<T&&T--;0==T&&oa()}),oa=mxUtils.bind(this,function(){if(W<k.length){var la=this.stoppingCustomActions,qa=
+k[W++],ya=[];if(null!=qa.open)if(Y(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,J))return}else this.openLink(qa.open);null==qa.wait||la||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;fa()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),Y());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,
+!0)),qa.opacity.value);null!=qa.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,fa,la?0:qa.fadeIn.delay));null!=qa.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,fa,la?0:qa.fadeOut.delay));null!=qa.wipeIn&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&
+(U(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){U();var wa=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(wa),1);this.setCellsVisible(wa,!0)}null!=qa.hide&&(U(),wa=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(wa),0),this.setCellsVisible(wa,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(U(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:
+"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(U(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));wa=[];null!=qa.select&&this.isEnabled()&&(wa=this.getCellsForAction(qa.select),this.setSelectionCells(wa));null!=qa.highlight&&(wa=this.getCellsForAction(qa.highlight),this.highlightCells(wa,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(wa=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&
+this.fitWindow(qa.viewbox,qa.viewbox.border);0<wa.length&&this.scrollCellToVisible(wa[0]);null!=J&&null!=qa.explore&&Graph.exploreFromCell(this,J,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var Ia=qa.tags.toggle;0==Ia.length&&(Ia=this.getAllTags());for(wa=0;wa<Ia.length;wa++)this.toggleHiddenTag(Ia[wa])}Ia=null;null!=qa.tags.hidden&&(null==Ia&&(Ia=[]),Ia=Ia.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==Ia&&(Ia=[]);var Aa=this.getAllTags();for(wa=0;wa<Aa.length;wa++)0>mxUtils.indexOf(qa.tags.visible,
+Aa[wa])&&0>mxUtils.indexOf(Ia,Aa[wa])&&Ia.push(Aa[wa])}null!=Ia&&this.setHiddenTags(Ia);this.refresh()}0<ya.length&&(T++,this.executeAnimations(ya,fa,la?1:qa.steps,la?0:qa.delay));0==T?oa():Y()}else this.stoppingCustomActions=this.executingCustomActions=!1,Y(),null!=v&&v()});oa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var J=this.getLinkForCell(v);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,J));if(this.isHtmlLabel(v)){var N=document.createElement("div");
+N.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var T=N.getElementsByTagName("a"),W=!1,U=0;U<T.length;U++)J=T[U].getAttribute("href"),null!=J&&"data:action/json,"==J.substring(0,17)&&(T[U].setAttribute("href",this.updateCustomLink(k,J)),W=!0);W&&this.labelChanged(v,N.innerHTML)}};Graph.prototype.updateCustomLink=function(k,v){if("data:action/json,"==v.substring(0,17))try{var J=JSON.parse(v.substring(17));null!=J.actions&&(this.updateCustomLinkActions(k,J.actions),v="data:action/json,"+JSON.stringify(J))}catch(N){}return v};
+Graph.prototype.updateCustomLinkActions=function(k,v){for(var J=0;J<v.length;J++){var N=v[J],T;for(T in N)this.updateCustomLinkAction(k,N[T],"cells"),this.updateCustomLinkAction(k,N[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,J){if(null!=v&&null!=v[J]){for(var N=[],T=0;T<v[J].length;T++)if("*"==v[J][T])N.push(v[J][T]);else{var W=k[v[J][T]];null!=W?""!=W&&N.push(W):N.push(v[J][T])}v[J]=N}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,
+null,v));if(null!=k.excludeCells){for(var J=[],N=0;N<v.length;N++)0>k.excludeCells.indexOf(v[N].id)&&J.push(v[N]);v=J}return v};Graph.prototype.getCellsById=function(k){var v=[];if(null!=k)for(var J=0;J<k.length;J++)if("*"==k[J]){var N=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(W){return W!=N},N))}else{var T=this.model.getCell(k[J]);null!=T&&v.push(T)}return v};var ca=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return ca.apply(this,arguments)&&
+!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var v=mxUtils.indexOf(this.hiddenTags,k);0>v?this.hiddenTags.push(k):0<=v&&this.hiddenTags.splice(v,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;
+for(var v=0;v<k.length;v++)if(0>mxUtils.indexOf(this.hiddenTags,k[v]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,v,J,N){var T=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var W=0,U={},Y=0;Y<k.length;Y++)0<k[Y].length&&(U[k[Y]]=!0,W++);for(Y=0;Y<v.length;Y++)if(J&&this.model.getParent(v[Y])==this.model.root||this.model.isVertex(v[Y])||this.model.isEdge(v[Y])){var fa=this.getTagsForCell(v[Y]),oa=!1;if(0<fa.length&&(fa=fa.split(" "),fa.length>=k.length)){for(var la=
+oa=0;la<fa.length&&oa<W;la++)null!=U[fa[la]]&&oa++;oa=oa==W}oa&&(1!=N||this.isCellVisible(v[Y]))&&T.push(v[Y])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,J=[],N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);J=[];if(0<T.length){T=T.split(" ");for(var W={},U=0;U<T.length;U++)if(null==v||null!=v[T[U]])W[T[U]]=!0,J.push(T[U]);v=W}else return[]}return J};
+Graph.prototype.getTagsForCells=function(k){for(var v=[],J={},N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);if(0<T.length){T=T.split(" ");for(var W=0;W<T.length;W++)null==J[T[W]]&&(J[T[W]]=!0,v.push(T[W]))}}return v};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){for(var N=this.getTagsForCell(k[J]),T=N.split(" "),W=!1,U=0;U<
+v.length;U++){var Y=mxUtils.trim(v[U]);""!=Y&&0>mxUtils.indexOf(T,Y)&&(N=0<N.length?N+" "+Y:Y,W=!0)}W&&this.setAttributeForCell(k[J],"tags",N)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){var N=this.getTagsForCell(k[J]);if(0<N.length){for(var T=N.split(" "),W=!1,U=0;U<v.length;U++){var Y=mxUtils.indexOf(T,v[U]);0<=Y&&(T.splice(Y,1),W=!0)}W&&this.setAttributeForCell(k[J],"tags",
+T.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var v=0;v<k.length;v++)this.model.setVisible(k[v],!this.model.isVisible(k[v]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,v){this.model.beginUpdate();try{for(var J=0;J<k.length;J++)this.model.setVisible(k[J],v)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,v,J,N){for(var T=0;T<k.length;T++)this.highlightCell(k[T],v,
+J,N)};Graph.prototype.highlightCell=function(k,v,J,N,T){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;J=null!=J?J:1E3;k=this.view.getState(k);var W=null;null!=k&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+T),W=new mxCellHighlight(this,v,T,!1),null!=N&&(W.opacity=N),W.highlight(k),window.setTimeout(function(){null!=W.shape&&(mxUtils.setPrefixedStyle(W.shape.node.style,"transition","all 1200ms ease-in-out"),W.shape.node.style.opacity=0);window.setTimeout(function(){W.destroy()},
+1200)},J));return W};Graph.prototype.addSvgShadow=function(k,v,J,N){N=null!=N?N:!0;var T=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=J&&J||(v=null!=v?v:k.getElementsByTagName("g")[0],null!=v&&(this.updateShadowFilter(v,!0),!isNaN(parseInt(k.getAttribute("width")))&&N&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+T),k.setAttribute("height",parseInt(k.getAttribute("height"))+T),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+T,
+h=parseFloat(v[3])+T,k.setAttribute("viewBox",v[0]+" "+v[1]+" "+w+" "+h))))));return T};Graph.prototype.updateShadowFilter=function(k,v){mxClient.IS_SF||(v?(v=mxUtils.getLightDarkColor(this.svgShadowColor,this.svgShadowOpacity),k.style.filter="drop-shadow("+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowBlur)/100+"px "+v.cssText+")"):k.style.filter="")};Graph.prototype.setShadowVisible=function(k,v){v=null!=v?v:!0;this.shadowVisible=
+k;this.updateShadowFilter(this.view.getDrawPane(),this.shadowVisible);v&&this.fireEvent(new mxEventObject("shadowVisibleChanged"))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),v=0;do var J=this.model.getChildAt(this.model.root,v);while(v++<k&&"1"==mxUtils.getValue(this.getCellStyle(J),
+"locked","0"));null!=J&&this.setDefaultParent(J)}};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",STENCIL_PATH+"/kubernetes2.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=
+[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=
+[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",
+STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+
+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=
+[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];
+mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/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.ibmcloud=[STENCIL_PATH+"/ibm_cloud.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.networks2=[SHAPES_PATH+"/mxNetworks2.js",STENCIL_PATH+"/networks2.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"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=
+function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var ka=mxMarker.createMarker;mxMarker.createMarker=function(k,v,J,N,T,W,U,Y,fa,oa){if(null!=J&&null==mxMarker.markers[J]){var la=this.getPackageForType(J);null!=la&&mxStencilRegistry.getStencil(la)}return ka.apply(this,arguments)};var aa=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,J,N,T,W){"1"==mxUtils.getValue(v.style,"lineShape",
+null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return aa.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,J,N){function T(){Ia.value=Math.max(1,Math.min(la,Math.max(parseInt(Ia.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(la,Math.min(parseInt(Ia.value),parseInt(wa.value))))}function W(ua){k.lastPrintPagesRadioChecked=ya.checked;k.lastPrintSelectionOnlyChecked=Ba.checked;k.lastPrintCropRadioChecked=Ma.checked;k.lastPrintFitRadioChecked=
+sa.checked;ya.checked&&wa.value<Ia.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ia.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);R.value=Math.max(1,Math.min(1600,parseInt(R.value)))+"%";k.lastPrintZoom=R.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=X.checked;k.lastPrintTransparent=ia.checked;k.lastPrintInclude=pa.checked;k.lastPrintSheetsAcross=Ea.value;k.lastPrintSheetsDown=C.value;var Ka={};Ka.border=parseInt(Q.value);Ka.scale=parseInt(R.value)/100;
+Ka.grid=X.checked;Ka.shadows=ha.checked;Ka.transparent=ia.checked;Ka.includeCopy=pa.checked;Ka.sheetsAcross=parseInt(Ea.value);Ka.sheetsDown=parseInt(C.value);Ka.pagesFrom=parseInt(wa.value);Ka.pagesTo=parseInt(Ia.value);Ka.allPages=qa.checked;Ka.selection=Ba.checked;Ka.pageView=Ga.checked;Ka.crop=Ma.checked;Ka.fit=sa.checked;return null!=J?J(!ua,Ka):k.print(!ua,Ka)}var U=k.editor.graph,Y=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";
+fa.style.marginTop="0px";mxUtils.write(fa,v||mxResources.get("print"));Y.appendChild(fa);var oa=1,la=1;fa=document.createElement("div");fa.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name","pages-printdialog");fa.appendChild(qa);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));mxEvent.addListener(v,"click",function(){qa.checked=!0});fa.appendChild(v);
+mxUtils.br(fa);var ya=qa.cloneNode(!0);fa.appendChild(ya);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");fa.appendChild(v);mxEvent.addListener(v,"click",function(){ya.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type","number");wa.setAttribute("min","1");wa.style.width="40px";fa.appendChild(wa);v=document.createElement("span");mxUtils.write(v,mxResources.get("to"));fa.appendChild(v);var Ia=
+wa.cloneNode(!0);fa.appendChild(Ia);mxEvent.addListener(wa,"focus",function(){ya.checked=!0});mxEvent.addListener(Ia,"focus",function(){ya.checked=!0});mxEvent.addListener(wa,"change",T);mxEvent.addListener(Ia,"change",T);if(null!=k.pages&&(la=k.pages.length,null!=k.currentPage))for(var Aa=0;Aa<la;Aa++)if(k.currentPage==k.pages[Aa]){oa=Aa+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(la,Math.max(1,k.lastPrintPagesFromInput)),Ia.value=Math.min(la,Math.max(1,
+k.lastPrintPagesToInput))):(wa.value=oa,Ia.value=oa);wa.setAttribute("max",la);Ia.setAttribute("max",la);Aa=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=oa;Ia.value=oa;ya.checked=!0});Aa.setAttribute("title",mxResources.get("currentPage"));Aa.style.marginLeft="4px";Aa.style.maxWidth="100px";Aa.style.overflow="hidden";Aa.style.textOverflow="ellipsis";Aa.style.whiteSpace="nowrap";fa.appendChild(Aa);1<la&&Y.appendChild(fa);fa=document.createElement("div");fa.style.borderBottom=
+"1px solid lightGray";fa.style.paddingBottom="12px";fa.style.marginBottom="12px";fa.style.whiteSpace="nowrap";var Ba=document.createElement("input");Ba.setAttribute("name","pages-printdialog");Ba.setAttribute("type",1==la?"checkbox":"radio");Ba.style.marginRight="8px";U.isSelectionEmpty()&&Ba.setAttribute("disabled","disabled");U.isEnabled()&&(fa.appendChild(Ba),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),fa.appendChild(v));(U.isEnabled()||1<la)&&Y.appendChild(fa);
+!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?ya.checked=!0:!U.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ba.checked=!0:qa.checked=!0;U.isSelectionEmpty()||mxEvent.addListener(v,"click",function(){Ba.checked=!Ba.checked});U=document.createElement("div");U.style.whiteSpace="nowrap";var Ga=document.createElement("input");Ga.style.marginBottom="8px";Ga.style.marginRight="8px";Ga.setAttribute("type","radio");Ga.setAttribute("name","printSize");U.appendChild(Ga);v=document.createElement("span");
+mxUtils.write(v,mxResources.get("pageView"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ga.checked=!0});Y.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var Ma=document.createElement("input");Ma.style.marginBottom="8px";Ma.style.marginRight="8px";Ma.setAttribute("type","radio");Ma.setAttribute("name","printSize");U.appendChild(Ma);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ma.checked=
+!0});Y.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginBottom="8px";sa.style.marginRight="8px";sa.setAttribute("type","radio");sa.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(sa);U.appendChild(v);fa=document.createElement("table");fa.style.display="inline-block";fa.style.borderSpacing="0";Aa=document.createElement("tbody");
+var Ca=document.createElement("tr"),Da=Ca.cloneNode(!0),va=document.createElement("td"),Na=va.cloneNode(!0),Sa=va.cloneNode(!0),Ua=va.cloneNode(!0),Qa=va.cloneNode(!0),za=va.cloneNode(!0);va.style.textAlign="right";Ua.style.textAlign="right";mxUtils.write(va,mxResources.get("fitTo"));mxEvent.addListener(U,"click",function(ua){mxEvent.getSource(ua)!=sa&&(sa.checked=!sa.checked)});var Ea=document.createElement("input");Ea.style.margin="0 2px";Ea.style.boxSizing="border-box";Ea.setAttribute("value",
+k.lastPrintSheetsAcross||"1");Ea.setAttribute("min","1");Ea.setAttribute("type","number");Ea.style.width="40px";Na.appendChild(Ea);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));Sa.appendChild(v);mxUtils.write(Ua,mxResources.get("fitToBy"));var C=Ea.cloneNode(!0);C.setAttribute("value",k.lastPrintSheetsDown||"1");Qa.appendChild(C);mxEvent.addListener(Ea,"click",function(ua){sa.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(C,"click",function(ua){sa.checked=
+!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?Ma.checked=!0:k.lastPrintFitRadioChecked?sa.checked=!0:Ga.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));za.appendChild(v);Ca.appendChild(va);Ca.appendChild(Na);Ca.appendChild(Sa);Da.appendChild(Ua);Da.appendChild(Qa);Da.appendChild(za);Aa.appendChild(Ca);Aa.appendChild(Da);fa.appendChild(Aa);U.appendChild(fa);Y.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";
+U.style.whiteSpace="nowrap";U.style.paddingTop="12px";U.style.marginTop="12px";U.style.paddingLeft="8px";mxUtils.write(U,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;U.appendChild(Q);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,mxResources.get("zoom")+":");
+U.appendChild(v);var R=document.createElement("input");R.style.width="60px";R.style.marginLeft="4px";R.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(R);mxUtils.br(U);var X=document.createElement("input");X.setAttribute("type","checkbox");X.style.marginTop="12px";X.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(X);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));U.appendChild(v);mxEvent.addListener(v,
+"click",function(ua){X.checked=!0;mxEvent.consume(ua)});var ha=document.createElement("input");ha.setAttribute("type","checkbox");ha.style.marginTop="12px";ha.checked=null!=k.lastPrintShadow?k.lastPrintShadow:!1;U.appendChild(ha);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("shadows"));U.appendChild(v);k.isOffline()&&!mxClient.IS_CHROMEAPP||v.appendChild(k.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));mxEvent.addListener(v,
+"click",function(ua){"IMG"!=mxEvent.getSource(ua).nodeName&&(ha.checked=!0,mxEvent.consume(ua))});Editor.enableShadowOption?null!=J&&mxUtils.br(U):(ha.style.display="none",v.style.display="none");var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="10px";ia.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=J&&(U.appendChild(ia),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),
+U.appendChild(v),mxEvent.addListener(v,"click",function(ua){ia.checked=!0;mxEvent.consume(ua)}));var pa=document.createElement("input");pa.setAttribute("type","checkbox");pa.style.marginTop="10px";pa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==J||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(U),U.appendChild(pa),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),U.appendChild(v),
+mxEvent.addListener(v,"click",function(ua){pa.checked=!0;mxEvent.consume(ua)}));Y.appendChild(U);v=document.createElement("div");v.style.marginTop="30px";v.style.textAlign="right";v.style.whiteSpace="nowrap";k.isOffline()&&!mxClient.IS_CHROMEAPP||null!=J||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));U=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});U.className="geBtn";k.editor.cancelFirst&&v.appendChild(U);PrintDialog.previewEnabled&&null==J&&
+(fa=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),W(!1)}catch(ua){k.handleError(ua)}}),fa.className="geBtn",v.appendChild(fa));N=null!=N?N:null!=J?"export":PrintDialog.previewEnabled?"print":"ok";N=mxUtils.button(mxResources.get(N),function(){try{k.hideDialog(),W(!0)}catch(ua){k.handleError(ua)}});N.className="geBtn gePrimaryBtn";v.appendChild(N);k.editor.cancelFirst||v.appendChild(U);Y.appendChild(v);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?
(Y.classList.add("geDarkMode"),Y.style.colorScheme="dark"):(Y.classList.remove("geDarkMode"),Y.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ra=function(ua,Ka){ua=Ka.getProperty("dialog");Y.parentNode==ua.container&&(k.editor.removeListener(ra),k.removeListener(xa))};k.editor.addListener("hideDialog",ra)}this.container=Y};var V=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 k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=
this.shadowVisible)}}else V.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),
-this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="29.0.3";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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)||/.*\.cdn\.prod\.atlassian-dev\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&
+this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="29.2.2";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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)||/.*\.cdn\.prod\.atlassian-dev\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&
"support.draw.io"!=window.location.hostname&&"test.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||
"1"==urlParams.dev;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.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes=
"flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!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:{useWidth:1E3,useMaxWidth:!0,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,g,m,n,x,F,H){if(null!=c){x=null!=x?x:Error(c);x.stack=null!=x.stack?x.stack:"";F=null!=F?F:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&
-0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>x.stack.indexOf("extension:")&&0>x.stack.indexOf("<anonymous>:")&&0>x.stack.indexOf("/math4/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+F+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(m)+(null!=n?":colno:"+encodeURIComponent(n):
-"")+(""!=x.stack?"&stack="+encodeURIComponent(x.stack):""))}catch(M){}try{H||null==window.console||console.error(F,c,g,m,n,x)}catch(M){}}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);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!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(m){}};EditorUi.sendReport=function(c,g){if("1"==
-urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,c.length>g&&(c=c.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(m){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],g=0;g<arguments.length;g++)c.push(arguments[g]);mxClient.IS_IOS?(mxLog.show(),
-mxLog.debug(c.join(" "))):console.log.apply(console,c)}}catch(m){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");for(var g=[],m=0;m<c.length;m++)g.push(c[m]);for(m=0;m<g.length;m++)EditorUi.replaceSvgImage(g[m])};EditorUi.replaceSvgImage=function(c){try{var g=null;g=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var m=EditorUi.getSvgSubtree(g);
-if(null!=m&&"svg"==m.nodeName){var n=m.getAttribute("width"),x=m.getAttribute("height");m.setAttribute("x",c.getAttribute("x"));m.setAttribute("y",c.getAttribute("y"));m.setAttribute("width",c.getAttribute("width"));m.setAttribute("height",c.getAttribute("height"));m.style.fontFamily="initial";0<n&&0<x&&null==m.getAttribute("viewBox")&&m.setAttribute("viewBox","0 0 "+n+" "+x);var F=mxUtils.createElementNs(m.ownerDocument,mxConstants.NS_SVG,"g");F.appendChild(m);c.hasAttribute("transform")&&F.setAttribute("transform",
-c.getAttribute("transform"));c.parentNode.replaceChild(F,c)}}catch(H){}};EditorUi.getSvgSubtree=function(c){var g=Graph.getSvgFromDataUri(c);c=null;if(null!=g){c=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=c.getElementsByTagName("style");if(0<g.length){var m="svg-image-"+Editor.guid();c.setAttribute("id",m);for(var n=document.implementation.createHTMLDocument(""),x=document.createElement("style"),F=0;F<g.length;F++){x.textContent=g[F].textContent;n.body.appendChild(x);for(var H="",M=
-0;M<x.sheet.cssRules.length;M++){var L=x.sheet.cssRules[M];if(null!=L.selectorText){for(var K=L.selectorText.split(","),Z=0;Z<K.length;Z++)K[Z]="#"+m+" "+K[Z];L.selectorText=K.join(",")}H+=L.cssText+"\n"}g[F].textContent=H}}null!=c.style&&"light dark"==c.style.getPropertyValue("color-scheme")&&c.style.removeProperty("color-scheme");g=c.getElementsByTagName("*");for(m=0;m<g.length;m++)g[m].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,g,l,n,x,F,G){if(null!=c){x=null!=x?x:Error(c);x.stack=null!=x.stack?x.stack:"";F=null!=F?F:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&
+0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>x.stack.indexOf("extension:")&&0>x.stack.indexOf("<anonymous>:")&&0>x.stack.indexOf("/math4/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+F+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=n?":colno:"+encodeURIComponent(n):
+"")+(""!=x.stack?"&stack="+encodeURIComponent(x.stack):""))}catch(L){}try{G||null==window.console||console.error(F,c,g,l,n,x)}catch(L){}}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);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!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(l){}};EditorUi.sendReport=function(c,g){if("1"==
+urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,c.length>g&&(c=c.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],g=0;g<arguments.length;g++)c.push(arguments[g]);mxClient.IS_IOS?(mxLog.show(),
+mxLog.debug(c.join(" "))):console.log.apply(console,c)}}catch(l){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");for(var g=[],l=0;l<c.length;l++)g.push(c[l]);for(l=0;l<g.length;l++)EditorUi.replaceSvgImage(g[l])};EditorUi.replaceSvgImage=function(c){try{var g=null;g=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var l=EditorUi.getSvgSubtree(g);
+if(null!=l&&"svg"==l.nodeName){var n=l.getAttribute("width"),x=l.getAttribute("height");l.setAttribute("x",c.getAttribute("x"));l.setAttribute("y",c.getAttribute("y"));l.setAttribute("width",c.getAttribute("width"));l.setAttribute("height",c.getAttribute("height"));l.style.fontFamily="initial";0<n&&0<x&&null==l.getAttribute("viewBox")&&l.setAttribute("viewBox","0 0 "+n+" "+x);var F=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");F.appendChild(l);c.hasAttribute("transform")&&F.setAttribute("transform",
+c.getAttribute("transform"));c.parentNode.replaceChild(F,c)}}catch(G){}};EditorUi.getSvgSubtree=function(c){var g=Graph.getSvgFromDataUri(c);c=null;if(null!=g){c=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=c.getElementsByTagName("style");if(0<g.length){var l="svg-image-"+Editor.guid();c.setAttribute("id",l);for(var n=document.implementation.createHTMLDocument(""),x=document.createElement("style"),F=0;F<g.length;F++){x.textContent=g[F].textContent;n.body.appendChild(x);for(var G="",L=
+0;L<x.sheet.cssRules.length;L++){var M=x.sheet.cssRules[L];if(null!=M.selectorText){for(var K=M.selectorText.split(","),Z=0;Z<K.length;Z++)K[Z]="#"+l+" "+K[Z];M.selectorText=K.join(",")}G+=M.cssText+"\n"}g[F].textContent=G}}null!=c.style&&"light dark"==c.style.getPropertyValue("color-scheme")&&c.style.removeProperty("color-scheme");g=c.getElementsByTagName("*");for(l=0;l<g.length;l++)g[l].removeAttribute("data-cell-id")}return c};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.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=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;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.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";return c};EditorUi.prototype.openLink=function(c,g,m){return this.editor.graph.openLink(c,g,m)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=
-function(c,g){g(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,g,m){localStorage.setItem(c,g);null!=m&&m()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,g){localStorage.removeItem(c);g()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";return c};EditorUi.prototype.openLink=function(c,g,l){return this.editor.graph.openLink(c,g,l)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=
+function(c,g){g(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,g,l){localStorage.setItem(c,g);null!=l&&l()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,g){localStorage.removeItem(c);g()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};
EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var g=this.editor.graph;g.mathEnabled=c;null!=g.view.backgroundImage&&(g.view.backgroundImage.destroy(),g.view.backgroundImage=null);this.editor.updateGraphComponents();g.refresh();g.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};
EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||
-!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,g,m){var n=null==c||null==g;m=null!=m?m:24;var x=new Spinner({lines:12,length:m,width:Math.round(m/3),radius:Math.round(m/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),F=this.timeout,H=x.spin,M=null,L=null,
-K=mxUtils.bind(this,function(ca){null!=ca&&ca()}),Z=this;x.spin=function(ca,aa,oa,da){da=null!=da?da:F;var ka=!1;if(!this.active){var ba=Date.now();null!=oa&&(M=window.setTimeout(function(){x.stop();M=null;oa({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:L})},da));n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);ca==document.body&&"1"==urlParams.embedInline&&(ca=Z.diagramContainer,c=ca.scrollLeft+ca.clientWidth/
-2,g=ca.scrollTop+ca.clientHeight/2);H.call(this,ca);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=ca.scrollTop+"px",x.el.style.marginLeft=ca.scrollLeft+"px");this.active=!0;null!=aa&&(ka=document.createElement("div"),ka.className="geSpinnerStatus",ka.setAttribute("title",aa),ca==document.body?(ka.style.left=Math.max(0,c)+"px",ka.style.top=Math.max(0,g+66)+"px"):(ka.style.left="50%",ka.style.top="50%",ka.style.marginTop="70px"),"..."!=aa.substring(aa.length-3,aa.length)&&"!"!=aa.charAt(aa.length-
-1)&&(aa+="..."),ka.innerText=aa,ca.appendChild(ka),x.status=ka);this.pause=mxUtils.bind(this,function(){var V=K;this.active&&(da=Math.max(0,da-(Date.now()-ba)),V=mxUtils.bind(this,function(k){this.spin(ca,aa,oa,da);if(null!=k)try{k(),L=mxUtils.bind(this,function(){this.spin(ca,aa,oa,da);try{k()}catch(v){null!=oa&&oa(v)}})}catch(v){null!=oa&&oa(v)}}));this.stop();return V});ka=!0}return ka};var ha=x.stop;x.stop=function(){ha.call(this);this.active&&(this.active=!1,null!=M&&(window.clearTimeout(M),
-M=null),null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),x.status=null)};x.pause=function(){return K};return x};EditorUi.prototype.isCompatibleString=function(c){try{if(c=mxUtils.trim(c),"<"==c.charAt(0)){var g=mxUtils.parseXml(c),m=this.editor.extractGraphModel(g.documentElement,!0);return null!=m&&0==m.getElementsByTagName("parsererror").length}}catch(n){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};
+!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,g,l){var n=null==c||null==g;l=null!=l?l:24;var x=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),F=this.timeout,G=x.spin,L=null,M=null,
+K=mxUtils.bind(this,function(da){null!=da&&da()}),Z=this;x.spin=function(da,ba,na,ca){ca=null!=ca?ca:F;var ka=!1;if(!this.active){var aa=Date.now();null!=na&&(L=window.setTimeout(function(){x.stop();L=null;na({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:M})},ca));n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);da==document.body&&"1"==urlParams.embedInline&&(da=Z.diagramContainer,c=da.scrollLeft+da.clientWidth/
+2,g=da.scrollTop+da.clientHeight/2);G.call(this,da);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=da.scrollTop+"px",x.el.style.marginLeft=da.scrollLeft+"px");this.active=!0;null!=ba&&(ka=document.createElement("div"),ka.className="geSpinnerStatus",ka.setAttribute("title",ba),da==document.body?(ka.style.left=Math.max(0,c)+"px",ka.style.top=Math.max(0,g+66)+"px"):(ka.style.left="50%",ka.style.top="50%",ka.style.marginTop="70px"),"..."!=ba.substring(ba.length-3,ba.length)&&"!"!=ba.charAt(ba.length-
+1)&&(ba+="..."),ka.innerText=ba,da.appendChild(ka),x.status=ka);this.pause=mxUtils.bind(this,function(){var V=K;this.active&&(ca=Math.max(0,ca-(Date.now()-aa)),V=mxUtils.bind(this,function(k){this.spin(da,ba,na,ca);if(null!=k)try{k(),M=mxUtils.bind(this,function(){this.spin(da,ba,na,ca);try{k()}catch(v){null!=na&&na(v)}})}catch(v){null!=na&&na(v)}}));this.stop();return V});ka=!0}return ka};var ja=x.stop;x.stop=function(){ja.call(this);this.active&&(this.active=!1,null!=L&&(window.clearTimeout(L),
+L=null),null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),x.status=null)};x.pause=function(){return K};return x};EditorUi.prototype.isCompatibleString=function(c){try{if(c=mxUtils.trim(c),"<"==c.charAt(0)){var g=mxUtils.parseXml(c),l=this.editor.extractGraphModel(g.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}}catch(n){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};
EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&
-17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var m=g.getFunction,n=this.editor.graph,x=this;g.getFunction=function(F){if(n.isSelectionEmpty()&&
-null!=x.pages&&0<x.pages.length){var H=x.getSelectedPageIndex();if(mxEvent.isShiftDown(F)){if(37==F.keyCode)return function(){0<H&&x.movePage(H,H-1)};if(38==F.keyCode)return function(){0<H&&x.movePage(H,0)};if(39==F.keyCode)return function(){H<x.pages.length-1&&x.movePage(H,H+1)};if(40==F.keyCode)return function(){H<x.pages.length-1&&x.movePage(H,x.pages.length-1)}}else if(mxEvent.isControlDown(F)||mxClient.IS_MAC&&mxEvent.isMetaDown(F)){if(37==F.keyCode)return function(){0<H&&x.selectNextPage(!1)};
-if(38==F.keyCode)return function(){0<H&&x.selectPage(x.pages[0])};if(39==F.keyCode)return function(){H<x.pages.length-1&&x.selectNextPage(!0)};if(40==F.keyCode)return function(){H<x.pages.length-1&&x.selectPage(x.pages[x.pages.length-1])}}}return!(65<=F.keyCode&&90>=F.keyCode)||n.isSelectionEmpty()||mxEvent.isAltDown(F)||mxEvent.isShiftDown(F)||mxEvent.isControlDown(F)||mxClient.IS_MAC&&mxEvent.isMetaDown(F)?m.apply(this,arguments):null}}return g};var f=EditorUi.prototype.extractGraphModelFromHtml;
-EditorUi.prototype.extractGraphModelFromHtml=function(c){var g=f.apply(this,arguments);if(null==g)try{var m=c.indexOf("&lt;mxfile ");if(0<=m){var n=c.lastIndexOf("&lt;/mxfile&gt;");n>m&&(g=c.substring(m,n+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var x=mxUtils.parseXml(c),F=this.editor.extractGraphModel(x.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=F?mxUtils.getXml(F):""}}catch(H){}return g};EditorUi.prototype.validateFileData=
-function(c){if(null!=c&&0<c.length){var g=c.indexOf('<meta charset="utf-8">');0<=g&&(c=c.slice(0,g)+'<meta charset="utf-8"/>'+c.slice(g+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,g){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",g);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var m=null!=c?this.editor.extractGraphModel(c,!0):null;null!=m&&(c=m);if(null!=c){m=this.editor.graph;m.model.beginUpdate();
-try{var n=null!=this.pages?this.pages.slice():null,x=c.getElementsByTagName("diagram");if(1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var F=x.length-1;0<=F;F--){var H=this.updatePageRoot(new DiagramPage(x[F]));null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[F+1]));m.model.execute(new ChangePage(this,H,0==F?H:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=
-new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),m.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,m.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(F=0;F<n.length;F++)m.model.execute(new ChangePage(this,n[F],null));var M=this.getCurrentFile();null!=M&&M.fileReplaced(g)}finally{m.model.endUpdate()}}};
-EditorUi.prototype.createFileData=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca){g=null!=g?g:this.editor.graph;x=null!=x?x:!1;L=null!=L?L:!0;Z=null!=Z?Z:!Editor.defaultCompressed;var aa=null;if(null==m||m.getMode()==App.MODE_DEVICE||m.getMode()==App.MODE_BROWSER)var oa="_blank";else aa=oa=n;if(null==c)return"";var da=c;if("mxfile"!=da.nodeName.toLowerCase()){if(Z){var ka=c.ownerDocument.createElement("diagram");ka.setAttribute("name",mxResources.get("pageWithNumber",[1]));ka.setAttribute("id",Editor.guid());
-ka.appendChild(c)}else{ka=Graph.zapGremlins(mxUtils.getXml(c));da=Graph.compress(ka);if(Graph.decompress(da)!=ka)return ka;ka=c.ownerDocument.createElement("diagram");ka.setAttribute("name",mxResources.get("pageWithNumber",[1]));ka.setAttribute("id",Editor.guid());mxUtils.setTextContent(ka,da)}da=c.ownerDocument.createElement("mxfile");da.appendChild(ka)}K?(da=da.cloneNode(!0),da.removeAttribute("modified"),da.removeAttribute("host"),da.removeAttribute("agent"),da.removeAttribute("etag"),da.removeAttribute("userAgent"),
-da.removeAttribute("version"),da.removeAttribute("editor"),da.removeAttribute("type")):(da.removeAttribute("userAgent"),da.removeAttribute("modified"),da.removeAttribute("version"),da.removeAttribute("editor"),da.removeAttribute("pages"),da.removeAttribute("type"),da.removeAttribute("etag"),mxClient.IS_CHROMEAPP?da.setAttribute("host","Chrome"):EditorUi.isElectronApp?da.setAttribute("host","Electron"):da.setAttribute("host",window.location.hostname),da.setAttribute("agent",null!=navigator.userAgent?
-navigator.userAgent:navigator.appVersion),da.setAttribute("version",EditorUi.VERSION),1<da.getElementsByTagName("diagram").length&&null!=this.pages&&da.setAttribute("pages",this.pages.length));null!=ha&&(da=da.cloneNode(!0),da.setAttribute("scale",ha));null!=ca&&(da=da.cloneNode(!0),da.setAttribute("border",ca));c=Z?mxUtils.getPrettyXml(da):mxUtils.getXml(da);if(!F&&!x&&(H||null!=m&&/(\.html)$/i.test(m.getTitle())))c=this.getHtml2(mxUtils.getXml(da),g,null!=m?m.getTitle():null,oa,aa);else if(F||!x&&
-null!=m&&/(\.svg)$/i.test(m.getTitle()))null==m||m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER||(n=null),m=this.getSvgFileProperties(da),c=this.getEmbeddedSvg(c,g,n,null,M,L,aa,null,null,m.scale,m.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,g,m,n){c=null!=c?c:!0;g=null!=g?g:!1;m=null!=m?m:!Editor.defaultCompressed;var x=this.editor.getGraphXml(c,n);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(L){var K=L.getElementsByTagName("mxGraphModel"),
-Z=0<K.length?K[0]:null;K=L;null==Z&&m?(Z=mxUtils.getNodeValue(L),0<Z.length&&(Z=Graph.decompress(Z),null!=Z&&0<Z.length&&(K=L.cloneNode(!1),K.appendChild(mxUtils.parseXml(Z).documentElement)))):null==Z||m?K=L.cloneNode(!0):(K=L.cloneNode(!1),mxUtils.setTextContent(K,Graph.compressNode(Z)));x.appendChild(K)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(x),x=this.fileNode.cloneNode(!1),g)c(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var F=this.pages[g],
-H=F.node;if(F!=this.currentPage)if(F.needsUpdate){var M=new mxCodec(mxUtils.createXmlDocument());M=M.encode(new mxGraphModel(F.root));this.editor.graph.saveViewState(F.viewState,M,null,n);EditorUi.removeChildNodes(H);H.appendChild(M);delete F.needsUpdate}else n&&(this.updatePageRoot(F),null!=F.viewState.backgroundImage&&null!=F.viewState.backgroundImage.originalSrc&&(M=new mxCodec(mxUtils.createXmlDocument()),M=M.encode(new mxGraphModel(F.root)),this.editor.graph.saveViewState(F.viewState,M,null,
-n,F),H=H.cloneNode(!1),H.appendChild(M)));c(H)}return x};EditorUi.prototype.anonymizeString=function(c,g){for(var m=[],n=0;n<c.length;n++){var x=c.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?m.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?m.push(String.fromCharCode(65+Math.round(25*Math.random()))):x.toUpperCase()!=x?m.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?m.push(" "):m.push("?"):m.push(g?"0":Math.round(9*Math.random()))}return m.join("")};EditorUi.prototype.anonymizePatch=
-function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var g=0;g<c[EditorUi.DIFF_INSERT].length;g++)try{var m=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=m.getAttribute("name")&&m.setAttribute("name",this.anonymizeString(m.getAttribute("name")));c[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(m)}catch(F){c[EditorUi.DIFF_INSERT][g].data=F.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var n in c[EditorUi.DIFF_UPDATE]){var x=c[EditorUi.DIFF_UPDATE][n];
-null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(g=mxUtils.bind(this,function(F){var H=x.cells[F];if(null!=H){for(var M in H)null!=H[M].value&&(H[M].value="["+H[M].value.length+"]"),null!=H[M].xmlValue&&(H[M].xmlValue="["+H[M].xmlValue.length+"]"),null!=H[M].style&&(H[M].style="["+H[M].style.length+"]"),mxUtils.isEmptyObject(H[M])&&delete H[M];mxUtils.isEmptyObject(H)&&delete x.cells[F]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);
-mxUtils.isEmptyObject(x)&&delete c[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,g){if(null!=c.attributes)for(var m=0;m<c.attributes.length;m++)"as"!=c.attributes[m].name&&c.setAttribute(c.attributes[m].name,this.anonymizeString(c.attributes[m].value,g));if(null!=c.childNodes)for(m=0;m<c.childNodes.length;m++)this.anonymizeAttributes(c.childNodes[m],g)};EditorUi.prototype.anonymizeNode=
-function(c,g){g=c.getElementsByTagName("mxCell");for(var m=0;m<g.length;m++)null!=g[m].getAttribute("value")&&g[m].setAttribute("value","["+g[m].getAttribute("value").length+"]"),null!=g[m].getAttribute("xmlValue")&&g[m].setAttribute("xmlValue","["+g[m].getAttribute("xmlValue").length+"]"),null!=g[m].getAttribute("style")&&g[m].setAttribute("style","["+g[m].getAttribute("style").length+"]"),null!=g[m].parentNode&&"root"!=g[m].parentNode.nodeName&&null!=g[m].parentNode.parentNode&&(g[m].setAttribute("id",
-g[m].parentNode.getAttribute("id")),g[m].parentNode.parentNode.replaceChild(g[m],g[m].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.clearStatus(),c?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==
-DrawioFile.SYNC)}),mxUtils.bind(this,function(m){this.spinner.stop();g.handleFileError(m,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(m){g.handleFileError(m,!0)}))))};EditorUi.prototype.getFileData=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca){x=null!=x?x:!0;F=null!=F?F:!1;K=null!=K?K:!Editor.defaultCompressed;var aa=this.editor.graph;if((g||!c&&null!=L&&/(\.svg)$/i.test(L.getTitle()))&&null!=this.pages&&this.currentPage!=
-this.pages[0]){var oa=aa.getGlobalVariable;aa=this.createTemporaryGraph(aa.getStylesheet());aa.setBackgroundImage=this.editor.graph.setBackgroundImage;aa.background=this.editor.graph.background;var da=null!=this.pages?this.pages[0]:null;null==da||this.currentPage==da?aa.setBackgroundImage(this.editor.graph.backgroundImage):null!=da.viewState&&null!=da.viewState&&aa.setBackgroundImage(da.viewState.backgroundImage);aa.getGlobalVariable=function(ka){return"page"==ka&&null!=da?da.getName():"pagenumber"==
-ka?1:oa.apply(this,arguments)};document.body.appendChild(aa.container);null!=da&&aa.model.setRoot(da.root)}H=null!=H?H:this.getXmlFileData(x,F,K,Z);L=null!=L?L:this.getCurrentFile();c=this.createFileData(H,aa,L,window.location.href,c,g,m,n,x,M,K,ha,ca);aa!=this.editor.graph&&aa.container.parentNode.removeChild(aa.container);return c};EditorUi.prototype.getHtml=function(c,g,m,n,x,F){F=null!=F?F:!0;var H=null,M=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){H=F?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());
-var L=g.view.scale;F=Math.floor(H.x/L-g.view.translate.x);L=Math.floor(H.y/L-g.view.translate.y);H=g.background;null==x&&(g=this.getBasenames().join(";"),0<g.length&&(M=EditorUi.drawHost+"/embed.js?s="+g));c.setAttribute("x0",F);c.setAttribute("y0",L)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=n&&c.setAttribute("edit",n));null!=x&&(x=x.replace(/&/g,"&amp;"));c=
-null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";n=Graph.compress(c);Graph.decompress(n)!=c&&(n=encodeURIComponent(c));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+
-(null==x&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\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==x?'<script type="text/javascript" src="'+M+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};
-EditorUi.prototype.getHtml2=function(c,g,m,n,x){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+
-(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\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(c))+'"></div>\n'+(null==x?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var g=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,m=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(m)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[g],"cause",[m]),Error(mxResources.get("notADiagramFile")+
-" ("+m+")");c=null!=g?this.editor.extractGraphModel(g,!0):null;null!=c&&(g=c);if(null!=g&&"mxfile"==g.nodeName&&(c=g.getElementsByTagName("diagram"),m={},0<c.length)){var n=this.getHashObject(),x=null;this.fileNode=g;this.pages=[];for(var F=0;F<c.length;F++){null==c[F].getAttribute("id")&&c[F].setAttribute("id",F);g=new DiagramPage(c[F]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[F+1]));this.pages.push(g);if(null==n.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||
-null!=n.pageId&&g.getId()==n.pageId)x=g;if(null==m[g.getId()])m[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=null!=x?x:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}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,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var H=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(F=0;F<H.length;F++)g[H[F]]=!0;var M=this.editor.graph.getModel(),L=M.getChildren(M.root);for(F=0;F<L.length;F++){var K=L[F];M.setVisible(K,g[K.id]||!1)}}catch(Z){}};EditorUi.prototype.getBaseFilename=function(c){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(".")));!c&&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(c,g,m,n,x,
-F,H,M,L,K,Z,ha,ca,aa,oa,da,ka){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename(!x),V=ba+("xml"==c||"pdf"==c&&Z?".drawio":"")+"."+c;if("xml"==c){var k=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(V,c,k,"text/xml")}else if("html"==c)k=this.getHtml2(this.getFileData(!0),this.editor.graph,ba),this.saveData(V,c,k,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
-c?V=ba+".png":"jpeg"==c&&(V=ba+".jpg"),this.saveRequest(V,c,mxUtils.bind(this,function(W,U){try{return this.createDownloadRequest(W,c,n,U,H,x,M,L,K,Z,ha,void 0,void 0,!F,ca,aa,oa,da,ka)}catch(Y){this.handleError(Y)}}));else{var v=null,I=mxUtils.bind(this,function(W){W.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==c){var N=this.editor.graph.background;
-if(H||N==mxConstants.NONE)N=null;var T=this.editor.graph.getSvg(N,null,null,null,null,n);m&&this.editor.graph.addSvgShadow(T);this.editor.convertImages(T,mxUtils.bind(this,mxUtils.bind(this,function(W){this.spinner.stop();I(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(W))})))}else V=ba+".svg",v=this.getFileData(!1,!0,null,mxUtils.bind(this,function(W){this.spinner.stop();I(W)}),n)}}catch(W){this.handleError(W)}};EditorUi.prototype.createDownloadRequest=function(c,g,m,n,x,F,H,M,L,
-K,Z,ha,ca,aa,oa,da,ka,ba,V){c=this.downloadRequestBuilder(c,g,m,n,x,F,H,M,L,K,Z,ha,ca,aa,oa,da,ka,ba,V);g="";for(var k in c)m=c[k],null!=m&&(g+=k+"="+encodeURIComponent(m)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca,aa,oa,da,ka,ba,V){var k=this.editor.graph,v=k.getGraphBounds();m=this.getFileData(!0,null,null,null,m,0==F?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var I=null,N=null,T=null;if(!EditorUi.isElectronApp&&
-(v.width*v.height>MAX_AREA||m.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};K=K?"1":"0";"pdf"==g&&(null!=Z?(I=Z.from,N=Z.to):0==F&&(T="1"));"xmlpng"==g&&(K="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(F=0;F<this.pages.length;F++)if(this.pages[F]==this.currentPage){I=F;break}F=k.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!x?x||null!=F&&F!=mxConstants.NONE||(F="#ffffff"):F=mxConstants.NONE;x={globalVars:k.getExportVariables()};null!=
-Z&&null!=Z.from&&(x.globalVars.pagenumber=Z.from+1);L&&(x.grid={size:k.gridSize,steps:k.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:k.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:I,to:N,allPages:T,bg:null!=F?F:mxConstants.NONE,base64:n,embedXml:K,xml:m,filename:null!=c?c:"",extras:JSON.stringify(x),scale:H,border:M,pageMargin:oa,w:ha&&isFinite(ha)?ha:null,h:ca&&isFinite(ca)?ca:null,crop:null!=
-aa&&aa?"1":"0",fit:null!=da&&da?"1":"0",shadows:null!=V&&V?"1":"0",sheetsAcross:ka,sheetsDown:ba}};EditorUi.prototype.setMode=function(c,g){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var g=c.indexOf("#");0<=g&&(c=c.substring(0,g))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,g={};if(null!=c&&0<c.length){var m=c.lastIndexOf("#");if(0<m){c=decodeURIComponent(c.substring(m+
-1));try{g=JSON.parse(c)}catch(n){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var m=g.lastIndexOf("#");0<m&&(g=g.substring(0,m));try{null==c||mxUtils.isEmptyObject(c)||
-(g=g+"#"+encodeURIComponent(JSON.stringify(c)))}catch(n){}0<m&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(c,g,m){var n=window.location.hash,x=mxUtils.bind(this,function(H){var M=null!=c.data?c.data:"";null!=H&&0<H.length&&(0<M.length&&(M+="\n"),M+=H);H=new LocalFile(this,"csv"!=c.format&&0<M.length?M:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return n};
-this.fileLoaded(H);"csv"==c.format&&this.importCsv(M,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var L=null!=c.interval?parseInt(c.interval):6E4,K=null,Z=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(aa){ca===this.currentPage&&(200<=aa.getStatus()&&300>=aa.getStatus()?(this.updateDiagram(aa.getText()),
-ha()):this.handleError({message:mxResources.get("error")+" "+aa.getStatus()}))}),mxUtils.bind(this,function(aa){this.handleError(aa)}))}),ha=mxUtils.bind(this,function(){window.clearTimeout(K);K=window.setTimeout(Z,L)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ha();Z()}));ha();Z()}null!=g&&g()});if(null!=c.url&&0<c.url.length){var F=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(F,mxUtils.bind(this,function(H){x(H)}),mxUtils.bind(this,function(H){null!=m&&m(H)}))}else x("")};
-EditorUi.prototype.updateDiagram=function(c){function g(k){var v=new mxCellOverlay(k.image||x.warningImage,k.tooltip,k.align,k.valign,k.offset);v.addListener(mxEvent.CLICK,function(I,N){n.alert(k.tooltip)});return v}var m=null,n=this;if(null!=c&&0<c.length&&(m=mxUtils.parseXml(c),c=null!=m?m.documentElement:null,null!=c&&"updates"==c.nodeName)){var x=this.editor.graph,F=x.getModel();F.beginUpdate();var H=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var M=F.getCell(c.getAttribute("id"));
-if(null!=M){try{var L=c.getAttribute("value");if(null!=L){var K=mxUtils.parseXml(L).documentElement;if(null!=K)if("1"==K.getAttribute("replace-value"))F.setValue(M,K);else for(var Z=K.attributes,ha=0;ha<Z.length;ha++)x.setAttributeForCell(M,Z[ha].nodeName,0<Z[ha].nodeValue.length?Z[ha].nodeValue:null)}}catch(k){null!=window.console&&console.log("Error in value for "+M.id+": "+k)}try{var ca=c.getAttribute("style");null!=ca&&x.model.setStyle(M,ca)}catch(k){null!=window.console&&console.log("Error in style for "+
-M.id+": "+k)}try{var aa=c.getAttribute("icon");if(null!=aa){var oa=0<aa.length?JSON.parse(aa):null;null!=oa&&oa.append||x.removeCellOverlays(M);null!=oa&&x.addCellOverlay(M,g(oa))}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}try{var da=c.getAttribute("geometry");if(null!=da){da=JSON.parse(da);var ka=x.getCellGeometry(M);if(null!=ka){ka=ka.clone();for(key in da){var ba=parseFloat(da[key]);"dx"==key?ka.x+=ba:"dy"==key?ka.y+=ba:"dw"==key?ka.width+=ba:"dh"==key?ka.height+=
-ba:ka[key]=parseFloat(da[key])}x.model.setGeometry(M,ka)}}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}}}else if("model"==c.nodeName){for(var V=c.firstChild;null!=V&&V.nodeType!=mxConstants.NODETYPE_ELEMENT;)V=V.nextSibling;null!=V&&(new mxCodec(c.firstChild)).decode(V,F)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(x.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))x.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||
-0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(H=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{F.endUpdate()}null!=H&&this.chromelessResize&&this.chromelessResize(!0,H)}return m};EditorUi.prototype.getCopyFilename=function(c,g){var m=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var n=m.lastIndexOf(".");0<=n&&(c=m.substring(n),m=m.substring(0,n));if(g){g=m;var x=new Date;m=x.getFullYear();n=x.getMonth()+1;var F=
-x.getDate(),H=x.getHours(),M=x.getMinutes();x=x.getSeconds();m=g+(" "+(m+"-"+n+"-"+F+"-"+H+"-"+M+"-"+x))}return m=mxResources.get("copyOf",[m])+c};EditorUi.prototype.logIfModified=function(c,g){try{null!=c&&g&&EditorUi.debug("File.closed",[c])}catch(m){}};EditorUi.prototype.fileLoaded=function(c,g,m){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[c],"noDialogs",[g]);var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=
+17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=g.getFunction,n=this.editor.graph,x=this;g.getFunction=function(F){if(n.isSelectionEmpty()&&
+null!=x.pages&&0<x.pages.length){var G=x.getSelectedPageIndex();if(mxEvent.isShiftDown(F)){if(37==F.keyCode)return function(){0<G&&x.movePage(G,G-1)};if(38==F.keyCode)return function(){0<G&&x.movePage(G,0)};if(39==F.keyCode)return function(){G<x.pages.length-1&&x.movePage(G,G+1)};if(40==F.keyCode)return function(){G<x.pages.length-1&&x.movePage(G,x.pages.length-1)}}else if(mxEvent.isControlDown(F)||mxClient.IS_MAC&&mxEvent.isMetaDown(F)){if(37==F.keyCode)return function(){0<G&&x.selectNextPage(!1)};
+if(38==F.keyCode)return function(){0<G&&x.selectPage(x.pages[0])};if(39==F.keyCode)return function(){G<x.pages.length-1&&x.selectNextPage(!0)};if(40==F.keyCode)return function(){G<x.pages.length-1&&x.selectPage(x.pages[x.pages.length-1])}}}return!(65<=F.keyCode&&90>=F.keyCode)||n.isSelectionEmpty()||mxEvent.isAltDown(F)||mxEvent.isShiftDown(F)||mxEvent.isControlDown(F)||mxClient.IS_MAC&&mxEvent.isMetaDown(F)?l.apply(this,arguments):null}}return g};var f=EditorUi.prototype.extractGraphModelFromHtml;
+EditorUi.prototype.extractGraphModelFromHtml=function(c){var g=f.apply(this,arguments);if(null==g)try{var l=c.indexOf("&lt;mxfile ");if(0<=l){var n=c.lastIndexOf("&lt;/mxfile&gt;");n>l&&(g=c.substring(l,n+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var x=mxUtils.parseXml(c),F=this.editor.extractGraphModel(x.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=F?mxUtils.getXml(F):""}}catch(G){}return g};EditorUi.prototype.validateFileData=
+function(c){if(null!=c&&0<c.length){var g=c.indexOf('<meta charset="utf-8">');0<=g&&(c=c.slice(0,g)+'<meta charset="utf-8"/>'+c.slice(g+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,g){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",g);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var l=null!=c?this.editor.extractGraphModel(c,!0):null;null!=l&&(c=l);if(null!=c){l=this.editor.graph;l.model.beginUpdate();
+try{var n=null!=this.pages?this.pages.slice():null,x=c.getElementsByTagName("diagram");if(1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var F=x.length-1;0<=F;F--){var G=this.updatePageRoot(new DiagramPage(x[F]));null==G.getName()&&G.setName(mxResources.get("pageWithNumber",[F+1]));l.model.execute(new ChangePage(this,G,0==F?G:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=
+new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(F=0;F<n.length;F++)l.model.execute(new ChangePage(this,n[F],null));var L=this.getCurrentFile();null!=L&&L.fileReplaced(g)}finally{l.model.endUpdate()}}};
+EditorUi.prototype.createFileData=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da){g=null!=g?g:this.editor.graph;x=null!=x?x:!1;M=null!=M?M:!0;Z=null!=Z?Z:!Editor.defaultCompressed;var ba=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var na="_blank";else ba=na=n;if(null==c)return"";var ca=c;if("mxfile"!=ca.nodeName.toLowerCase()){if(Z){var ka=c.ownerDocument.createElement("diagram");ka.setAttribute("name",mxResources.get("pageWithNumber",[1]));ka.setAttribute("id",Editor.guid());
+ka.appendChild(c)}else{ka=Graph.zapGremlins(mxUtils.getXml(c));ca=Graph.compress(ka);if(Graph.decompress(ca)!=ka)return ka;ka=c.ownerDocument.createElement("diagram");ka.setAttribute("name",mxResources.get("pageWithNumber",[1]));ka.setAttribute("id",Editor.guid());mxUtils.setTextContent(ka,ca)}ca=c.ownerDocument.createElement("mxfile");ca.appendChild(ka)}K?(ca=ca.cloneNode(!0),ca.removeAttribute("modified"),ca.removeAttribute("host"),ca.removeAttribute("agent"),ca.removeAttribute("etag"),ca.removeAttribute("userAgent"),
+ca.removeAttribute("version"),ca.removeAttribute("editor"),ca.removeAttribute("type")):(ca.removeAttribute("userAgent"),ca.removeAttribute("modified"),ca.removeAttribute("version"),ca.removeAttribute("editor"),ca.removeAttribute("pages"),ca.removeAttribute("type"),ca.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ca.setAttribute("host","Chrome"):EditorUi.isElectronApp?ca.setAttribute("host","Electron"):ca.setAttribute("host",window.location.hostname),ca.setAttribute("agent",null!=navigator.userAgent?
+navigator.userAgent:navigator.appVersion),ca.setAttribute("version",EditorUi.VERSION),1<ca.getElementsByTagName("diagram").length&&null!=this.pages&&ca.setAttribute("pages",this.pages.length));null!=ja&&(ca=ca.cloneNode(!0),ca.setAttribute("scale",ja));null!=da&&(ca=ca.cloneNode(!0),ca.setAttribute("border",da));c=Z?mxUtils.getPrettyXml(ca):mxUtils.getXml(ca);if(!F&&!x&&(G||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ca),g,null!=l?l.getTitle():null,na,ba);else if(F||!x&&
+null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(n=null),l=this.getSvgFileProperties(ca),c=this.getEmbeddedSvg(c,g,n,null,L,M,ba,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,g,l,n){c=null!=c?c:!0;g=null!=g?g:!1;l=null!=l?l:!Editor.defaultCompressed;var x=this.editor.getGraphXml(c,n);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(M){var K=M.getElementsByTagName("mxGraphModel"),
+Z=0<K.length?K[0]:null;K=M;null==Z&&l?(Z=mxUtils.getNodeValue(M),0<Z.length&&(Z=Graph.decompress(Z),null!=Z&&0<Z.length&&(K=M.cloneNode(!1),K.appendChild(mxUtils.parseXml(Z).documentElement)))):null==Z||l?K=M.cloneNode(!0):(K=M.cloneNode(!1),mxUtils.setTextContent(K,Graph.compressNode(Z)));x.appendChild(K)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(x),x=this.fileNode.cloneNode(!1),g)c(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var F=this.pages[g],
+G=F.node;if(F!=this.currentPage)if(F.needsUpdate){var L=new mxCodec(mxUtils.createXmlDocument());L=L.encode(new mxGraphModel(F.root));this.editor.graph.saveViewState(F.viewState,L,null,n);EditorUi.removeChildNodes(G);G.appendChild(L);delete F.needsUpdate}else n&&(this.updatePageRoot(F),null!=F.viewState.backgroundImage&&null!=F.viewState.backgroundImage.originalSrc&&(L=new mxCodec(mxUtils.createXmlDocument()),L=L.encode(new mxGraphModel(F.root)),this.editor.graph.saveViewState(F.viewState,L,null,
+n,F),G=G.cloneNode(!1),G.appendChild(L)));c(G)}return x};EditorUi.prototype.anonymizeString=function(c,g){for(var l=[],n=0;n<c.length;n++){var x=c.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?l.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):x.toUpperCase()!=x?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?l.push(" "):l.push("?"):l.push(g?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=
+function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var g=0;g<c[EditorUi.DIFF_INSERT].length;g++)try{var l=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));c[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(l)}catch(F){c[EditorUi.DIFF_INSERT][g].data=F.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var n in c[EditorUi.DIFF_UPDATE]){var x=c[EditorUi.DIFF_UPDATE][n];
+null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(g=mxUtils.bind(this,function(F){var G=x.cells[F];if(null!=G){for(var L in G)null!=G[L].value&&(G[L].value="["+G[L].value.length+"]"),null!=G[L].xmlValue&&(G[L].xmlValue="["+G[L].xmlValue.length+"]"),null!=G[L].style&&(G[L].style="["+G[L].style.length+"]"),mxUtils.isEmptyObject(G[L])&&delete G[L];mxUtils.isEmptyObject(G)&&delete x.cells[F]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);
+mxUtils.isEmptyObject(x)&&delete c[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,g){if(null!=c.attributes)for(var l=0;l<c.attributes.length;l++)"as"!=c.attributes[l].name&&c.setAttribute(c.attributes[l].name,this.anonymizeString(c.attributes[l].value,g));if(null!=c.childNodes)for(l=0;l<c.childNodes.length;l++)this.anonymizeAttributes(c.childNodes[l],g)};EditorUi.prototype.anonymizeNode=
+function(c,g){g=c.getElementsByTagName("mxCell");for(var l=0;l<g.length;l++)null!=g[l].getAttribute("value")&&g[l].setAttribute("value","["+g[l].getAttribute("value").length+"]"),null!=g[l].getAttribute("xmlValue")&&g[l].setAttribute("xmlValue","["+g[l].getAttribute("xmlValue").length+"]"),null!=g[l].getAttribute("style")&&g[l].setAttribute("style","["+g[l].getAttribute("style").length+"]"),null!=g[l].parentNode&&"root"!=g[l].parentNode.nodeName&&null!=g[l].parentNode.parentNode&&(g[l].setAttribute("id",
+g[l].parentNode.getAttribute("id")),g[l].parentNode.parentNode.replaceChild(g[l],g[l].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.clearStatus(),c?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==
+DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();g.handleFileError(l,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){g.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da){x=null!=x?x:!0;F=null!=F?F:!1;K=null!=K?K:!Editor.defaultCompressed;var ba=this.editor.graph;if((g||!c&&null!=M&&/(\.svg)$/i.test(M.getTitle()))&&null!=this.pages&&this.currentPage!=
+this.pages[0]){var na=ba.getGlobalVariable;ba=this.createTemporaryGraph(ba.getStylesheet());ba.setBackgroundImage=this.editor.graph.setBackgroundImage;ba.background=this.editor.graph.background;var ca=null!=this.pages?this.pages[0]:null;null==ca||this.currentPage==ca?ba.setBackgroundImage(this.editor.graph.backgroundImage):null!=ca.viewState&&null!=ca.viewState&&ba.setBackgroundImage(ca.viewState.backgroundImage);ba.getGlobalVariable=function(ka){return"page"==ka&&null!=ca?ca.getName():"pagenumber"==
+ka?1:na.apply(this,arguments)};document.body.appendChild(ba.container);null!=ca&&ba.model.setRoot(ca.root)}G=null!=G?G:this.getXmlFileData(x,F,K,Z);M=null!=M?M:this.getCurrentFile();c=this.createFileData(G,ba,M,window.location.href,c,g,l,n,x,L,K,ja,da);ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);return c};EditorUi.prototype.getHtml=function(c,g,l,n,x,F){F=null!=F?F:!0;var G=null,L=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){G=F?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());
+var M=g.view.scale;F=Math.floor(G.x/M-g.view.translate.x);M=Math.floor(G.y/M-g.view.translate.y);G=g.background;null==x&&(g=this.getBasenames().join(";"),0<g.length&&(L=EditorUi.drawHost+"/embed.js?s="+g));c.setAttribute("x0",F);c.setAttribute("y0",M)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=n&&c.setAttribute("edit",n));null!=x&&(x=x.replace(/&/g,"&amp;"));c=
+null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";n=Graph.compress(c);Graph.decompress(n)!=c&&(n=encodeURIComponent(c));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+
+(null==x&&null!=G&&G!=mxConstants.NONE?' style="background-color:'+G+';">':">")+'\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==x?'<script type="text/javascript" src="'+L+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};
+EditorUi.prototype.getHtml2=function(c,g,l,n,x){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+
+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\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(c))+'"></div>\n'+(null==x?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var g=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,l=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[g],"cause",[l]),Error(mxResources.get("notADiagramFile")+
+" ("+l+")");c=null!=g?this.editor.extractGraphModel(g,!0):null;null!=c&&(g=c);if(null!=g&&"mxfile"==g.nodeName&&(c=g.getElementsByTagName("diagram"),l={},0<c.length)){var n=this.getHashObject(),x=null;this.fileNode=g;this.pages=[];for(var F=0;F<c.length;F++){null==c[F].getAttribute("id")&&c[F].setAttribute("id",F);g=new DiagramPage(c[F]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[F+1]));this.pages.push(g);if(null==n.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||
+null!=n.pageId&&g.getId()==n.pageId)x=g;if(null==l[g.getId()])l[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=null!=x?x:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}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,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var G=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(F=0;F<G.length;F++)g[G[F]]=!0;var L=this.editor.graph.getModel(),M=L.getChildren(L.root);for(F=0;F<M.length;F++){var K=M[F];L.setVisible(K,g[K.id]||!1)}}catch(Z){}};EditorUi.prototype.getBaseFilename=function(c){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(".")));!c&&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(c,g,l,n,x,
+F,G,L,M,K,Z,ja,da,ba,na,ca,ka){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var aa=this.getBaseFilename(!x),V=aa+("xml"==c||"pdf"==c&&Z?".drawio":"")+"."+c;if("xml"==c){var k=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(V,c,k,"text/xml")}else if("html"==c)k=this.getHtml2(this.getFileData(!0),this.editor.graph,aa),this.saveData(V,c,k,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
+c?V=aa+".png":"jpeg"==c&&(V=aa+".jpg"),this.saveRequest(V,c,mxUtils.bind(this,function(W,U){try{return this.createDownloadRequest(W,c,n,U,G,x,L,M,K,Z,ja,void 0,void 0,!F,da,ba,na,ca,ka)}catch(Y){this.handleError(Y)}}));else{var v=null,J=mxUtils.bind(this,function(W){W.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==c){var N=this.editor.graph.background;
+if(G||N==mxConstants.NONE)N=null;var T=this.editor.graph.getSvg(N,null,null,null,null,n);l&&this.editor.graph.addSvgShadow(T);this.editor.convertImages(T,mxUtils.bind(this,mxUtils.bind(this,function(W){this.spinner.stop();J(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(W))})))}else V=aa+".svg",v=this.getFileData(!1,!0,null,mxUtils.bind(this,function(W){this.spinner.stop();J(W)}),n)}}catch(W){this.handleError(W)}};EditorUi.prototype.createDownloadRequest=function(c,g,l,n,x,F,G,L,M,
+K,Z,ja,da,ba,na,ca,ka,aa,V){c=this.downloadRequestBuilder(c,g,l,n,x,F,G,L,M,K,Z,ja,da,ba,na,ca,ka,aa,V);g="";for(var k in c)l=c[k],null!=l&&(g+=k+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da,ba,na,ca,ka,aa,V){var k=this.editor.graph,v=k.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==F?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var J=null,N=null,T=null;if(!EditorUi.isElectronApp&&
+(v.width*v.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};K=K?"1":"0";"pdf"==g&&(null!=Z?(J=Z.from,N=Z.to):0==F&&(T="1"));"xmlpng"==g&&(K="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(F=0;F<this.pages.length;F++)if(this.pages[F]==this.currentPage){J=F;break}F=k.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!x?x||null!=F&&F!=mxConstants.NONE||(F="#ffffff"):F=mxConstants.NONE;x={globalVars:k.getExportVariables()};null!=
+Z&&null!=Z.from&&(x.globalVars.pagenumber=Z.from+1);M&&(x.grid={size:k.gridSize,steps:k.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:k.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:J,to:N,allPages:T,bg:null!=F?F:mxConstants.NONE,base64:n,embedXml:K,xml:l,filename:null!=c?c:"",extras:JSON.stringify(x),scale:G,border:L,pageMargin:na,w:ja&&isFinite(ja)?ja:null,h:da&&isFinite(da)?da:null,crop:null!=
+ba&&ba?"1":"0",fit:null!=ca&&ca?"1":"0",shadows:null!=V&&V?"1":"0",sheetsAcross:ka,sheetsDown:aa}};EditorUi.prototype.setMode=function(c,g){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var g=c.indexOf("#");0<=g&&(c=c.substring(0,g))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,g={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+
+1));try{g=JSON.parse(c)}catch(n){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var l=g.lastIndexOf("#");0<l&&(g=g.substring(0,l));try{null==c||mxUtils.isEmptyObject(c)||
+(g=g+"#"+encodeURIComponent(JSON.stringify(c)))}catch(n){}0<l&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(c,g,l){var n=window.location.hash,x=mxUtils.bind(this,function(G){var L=null!=c.data?c.data:"";null!=G&&0<G.length&&(0<L.length&&(L+="\n"),L+=G);G=new LocalFile(this,"csv"!=c.format&&0<L.length?L:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);G.getHash=function(){return n};
+this.fileLoaded(G);"csv"==c.format&&this.importCsv(L,mxUtils.bind(this,function(da){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var M=null!=c.interval?parseInt(c.interval):6E4,K=null,Z=mxUtils.bind(this,function(){var da=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ba){da===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),
+ja()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),ja=mxUtils.bind(this,function(){window.clearTimeout(K);K=window.setTimeout(Z,M)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ja();Z()}));ja();Z()}null!=g&&g()});if(null!=c.url&&0<c.url.length){var F=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(F,mxUtils.bind(this,function(G){x(G)}),mxUtils.bind(this,function(G){null!=l&&l(G)}))}else x("")};
+EditorUi.prototype.updateDiagram=function(c){function g(k){var v=new mxCellOverlay(k.image||x.warningImage,k.tooltip,k.align,k.valign,k.offset);v.addListener(mxEvent.CLICK,function(J,N){n.alert(k.tooltip)});return v}var l=null,n=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var x=this.editor.graph,F=x.getModel();F.beginUpdate();var G=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var L=F.getCell(c.getAttribute("id"));
+if(null!=L){try{var M=c.getAttribute("value");if(null!=M){var K=mxUtils.parseXml(M).documentElement;if(null!=K)if("1"==K.getAttribute("replace-value"))F.setValue(L,K);else for(var Z=K.attributes,ja=0;ja<Z.length;ja++)x.setAttributeForCell(L,Z[ja].nodeName,0<Z[ja].nodeValue.length?Z[ja].nodeValue:null)}}catch(k){null!=window.console&&console.log("Error in value for "+L.id+": "+k)}try{var da=c.getAttribute("style");null!=da&&x.model.setStyle(L,da)}catch(k){null!=window.console&&console.log("Error in style for "+
+L.id+": "+k)}try{var ba=c.getAttribute("icon");if(null!=ba){var na=0<ba.length?JSON.parse(ba):null;null!=na&&na.append||x.removeCellOverlays(L);null!=na&&x.addCellOverlay(L,g(na))}}catch(k){null!=window.console&&console.log("Error in icon for "+L.id+": "+k)}try{var ca=c.getAttribute("geometry");if(null!=ca){ca=JSON.parse(ca);var ka=x.getCellGeometry(L);if(null!=ka){ka=ka.clone();for(key in ca){var aa=parseFloat(ca[key]);"dx"==key?ka.x+=aa:"dy"==key?ka.y+=aa:"dw"==key?ka.width+=aa:"dh"==key?ka.height+=
+aa:ka[key]=parseFloat(ca[key])}x.model.setGeometry(L,ka)}}}catch(k){null!=window.console&&console.log("Error in icon for "+L.id+": "+k)}}}else if("model"==c.nodeName){for(var V=c.firstChild;null!=V&&V.nodeType!=mxConstants.NODETYPE_ELEMENT;)V=V.nextSibling;null!=V&&(new mxCodec(c.firstChild)).decode(V,F)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(x.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))x.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||
+0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(G=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{F.endUpdate()}null!=G&&this.chromelessResize&&this.chromelessResize(!0,G)}return l};EditorUi.prototype.getCopyFilename=function(c,g){var l=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var n=l.lastIndexOf(".");0<=n&&(c=l.substring(n),l=l.substring(0,n));if(g){g=l;var x=new Date;l=x.getFullYear();n=x.getMonth()+1;var F=
+x.getDate(),G=x.getHours(),L=x.getMinutes();x=x.getSeconds();l=g+(" "+(l+"-"+n+"-"+F+"-"+G+"-"+L+"-"+x))}return l=mxResources.get("copyOf",[l])+c};EditorUi.prototype.logIfModified=function(c,g){try{null!=c&&g&&EditorUi.debug("File.closed",[c])}catch(l){}};EditorUi.prototype.fileLoaded=function(c,g,l){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[c],"noDialogs",[g]);var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=
n&&(n.removeListener(this.descriptorChangedListener),this.logIfModified(n,!0),n.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var F=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=n&&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.fname.innerText="");
this.clearStatus();this.updateUi();g||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=c)try{this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();
this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.clearStatus():this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")}));!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();null!=m&&m();this.editor.fireEvent(new mxEventObject("fileLoaded"));x=!0;if(!this.isOffline()&&null!=c.getMode()){var H="1"==urlParams.sketch?"sketch":uiTheme;if(null==H)H="default";else if("sketch"==H||"min"==H)H+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?
-"on":"off")+"_theme_"+H})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(M){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(M){}}catch(M){this.fileLoadedError=M;if(null!=c)try{c.close()}catch(L){}c=mxUtils.bind(this,function(){null!=
-urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=n?this.fileLoaded(n)||F():F()});g?c():(null!=M.fallbackFileData&&(M.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var L=new LocalFile(this,M.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(L)})}),this.handleError(M,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else F();return x};EditorUi.prototype.getHashValueForPages=
-function(c,g){var m=0,n=new mxGraphModel,x=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var F=0;F<c.length;F++){this.updatePageRoot(c[F]);var H=c[F].node.cloneNode(!1);H.removeAttribute("name");n.root=c[F].root;var M=x.encode(n);this.editor.graph.saveViewState(c[F].viewState,M,!0);M.removeAttribute("pageWidth");M.removeAttribute("pageHeight");H.appendChild(M);null!=g&&(g.eltCount+=H.getElementsByTagName("*").length,g.nodeCount+=H.getElementsByTagName("mxCell").length);
-m=(m<<5)-m+this.hashValue(H,function(L,K,Z,ha){return!ha||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=K&&"y"!=K&&"width"!=K&&"height"!=K?ha&&"mxCell"==L.nodeName&&"previous"==K?null:Z:Math.round(Z)},g)<<0}return m};EditorUi.prototype.hashValue=function(c,g,m){var n=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(n^=this.hashValue(c.nodeName,g,m));if(null!=c.attributes){null!=m&&(m.attrCount+=
-c.attributes.length);for(var x=0;x<c.attributes.length;x++){var F=c.attributes[x].name,H=null!=g?g(c,F,c.attributes[x].value,!0):c.attributes[x].value;null!=H&&(n^=this.hashValue(F,g,m)+this.hashValue(H,g,m))}}if(null!=c.childNodes)for(x=0;x<c.childNodes.length;x++)n=(n<<5)-n+this.hashValue(c.childNodes[x],g,m)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);g=0;null!=m&&(m.byteCount+=c.length);for(x=0;x<c.length;x++)g=(g<<5)-g+c.charCodeAt(x)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=
-function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,g,m,n,x,F,H){};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(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};
-EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var g=0;g<c.length;g++)null!=c[g].xml&&"<"!=c[g].xml.charAt(0)&&(c[g].xml=mxUtils.trim(Graph.decompress(c[g].xml)));g=mxUtils.createXmlDocument();var m=g.createElement("mxlibrary");mxUtils.setTextContent(m,JSON.stringify(c,null,2));g.appendChild(m);return mxUtils.getXml(g,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),
-".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var g=this.sidebar.palettes[c];if(null!=g){for(var m=0;m<g.length;m++)g[m].parentNode.removeChild(g[m]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,g){var m=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!g){null==c&&(g=this.sidebar.palettes["L.scratchpad"],null==g&&(g=this.sidebar.palettes.search),null!=g&&(c=g[g.length-1].nextSibling));
-c=null!=c?c:m.firstChild.nextSibling.nextSibling;g=m.lastChild;var n=g.previousSibling;m.insertBefore(g,c);m.insertBefore(n,g)}};EditorUi.prototype.loadLibrary=function(c,g){var m=mxUtils.parseXml(c.getData());if("mxlibrary"==m.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(m.documentElement));this.libraryLoaded(c,n,m.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=
-function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.showSearchWindow=function(c,g){var m=c?"findReplace":"find",n=m+"Window";if(null==this[n]){var x="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,F=c?x?330:300:240;this[n]=new FindWindow(this,document.body.offsetWidth-(F+20),100,F,c?x?304:288:180,c);this[n].window.addListener("show",function(){this.fireEvent(new mxEventObject(m))});this[n].window.addListener("hide",
-function(){this.fireEvent(new mxEventObject(m))});this[n].window.setVisible(!0)}else null==g&&this[n].window.setVisible(!this[n].window.isVisible());null!=g&&(this[n].doSearch(g),this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,g,m,n){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var x=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var F=0;F<this.openLibraries.length;F++)if(this.openLibraries[F].file.getHash()==
-c.getHash()){mxUtils.remove(this.openLibraries[F],this.openLibraries);break}x={file:c,images:g,title:m,expand:n};this.openLibraries.push(x)}else this.scratchpad=c;F=this.sidebar.palettes[c.getHash()];F=null!=F?F[F.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var H=null,M=mxUtils.bind(this,function(ba,V){0==ba.length&&c.isEditable()?(null==H&&(H=document.createElement("div"),H.className="geDropTarget",mxUtils.write(H,mxResources.get("dragElementsHere"))),V.appendChild(H)):this.addLibraryEntries(ba,
-V)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==m&&(m=c.getTitle(),null!=m&&/(\.xml)$/i.test(m)&&(m=m.substring(0,m.lastIndexOf("."))));var L=this.sidebar.addPalette(c.getHash(),m,null!=n?n:!0,mxUtils.bind(this,function(ba){M(g,ba)}));null!=x&&(x.div=L);this.repositionLibrary(F,"L.scratchpad"!=c.getHash());n=L.parentNode.previousSibling;m=n.getAttribute("title");null!=m&&0<m.length&&".scratchpad"!=c.title&&n.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+m);var K=document.createElement("div");
-K.style.backgroundColor="inherit";n.style.position="relative";var Z=document.createElement("img");Z.className="geLibraryButton";Z.setAttribute("src",Editor.crossImage);Z.setAttribute("title",mxResources.get("close"));var ha=null;if(".scratchpad"!=c.title||this.closableScratchpad)K.appendChild(Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(ba){if(!mxEvent.isConsumed(ba)){var V=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(c)});null!=ha?this.confirm(mxResources.get("allChangesLost"),
-null,V,mxResources.get("cancel"),mxResources.get("discardChanges")):V();mxEvent.consume(ba)}}));if(c.isEditable()){var ca=this.editor.graph,aa=null;m=mxUtils.bind(this,function(ba){this.showLibraryDialog(c.getTitle(),L,g,c,c.getMode());mxEvent.consume(ba)});var oa=mxUtils.bind(this,function(ba){c.setModified(!0);c.isAutosave()?(null!=aa&&null!=aa.parentNode&&aa.parentNode.removeChild(aa),aa=Z.cloneNode(!1),aa.setAttribute("src",Editor.spinImage),aa.setAttribute("title",mxResources.get("saving")),
-aa.style.cursor="default",aa.style.marginRight="2px",aa.style.marginTop="-2px",K.insertBefore(aa,K.firstChild),this.saveLibrary(c.getTitle(),g,c,c.getMode(),!0,!0,function(){null!=aa&&null!=aa.parentNode&&aa.parentNode.removeChild(aa)})):null==ha&&(ha=Z.cloneNode(!1),ha.setAttribute("src",Editor.saveImage),ha.setAttribute("title",mxResources.get("save")),K.insertBefore(ha,K.firstChild),mxEvent.addListener(ha,"click",mxUtils.bind(this,function(V){this.saveLibrary(c.getTitle(),g,c,c.getMode(),c.constructor==
-LocalLibrary,!0,function(){null==ha||c.isModified()||(ha.parentNode.removeChild(ha),ha=null)});mxEvent.consume(V)})))}),da=mxUtils.bind(this,function(ba,V,k,v){ba=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(ba)));for(var I=0;I<ba.length;I++){var N=ca.getCellGeometry(ba[I]);null!=N&&N.translate(-V.x,-V.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(ba,V.width,V.height,v||"",!0,null,!1));ba=mxUtils.getXml(this.editor.graph.encodeCells(ba));Editor.defaultCompressed&&(ba=Graph.compress(ba));
-V={xml:ba,w:V.width,h:V.height};null!=v&&(V.title=v);g.push(V);oa(k);null!=H&&null!=H.parentNode&&0<g.length&&(H.parentNode.removeChild(H),H=null)}),ka=mxUtils.bind(this,function(ba){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(ba),ca.getRubberband().reset()):null!=ba&&mxEvent.getSource(ba).classList.contains("geLibraryButton")&&this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var V=ca.getSelectionCells(),
-k=ca.view.getBounds(V);if(null!=k&&0<k.width&&0<k.height){var v=ca.view.scale;k.x/=v;k.y/=v;k.width/=v;k.height/=v;k.x-=ca.view.translate.x;k.y-=ca.view.translate.y;da(V,k)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(ba)});mxEvent.addGestureListeners(L,function(){},mxUtils.bind(this,function(ba){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility=
-"hidden"),L.style.backgroundColor="light-dark(#fefefe, #000000)",L.style.cursor="copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(ba))}),mxUtils.bind(this,function(ba){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler&&(L.style.backgroundColor="",L.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,ka(ba),mxEvent.consume(ba))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(ba){ca.isMouseDown&&
-null!=ca.graphHandler.first&&(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(ba){L.style.backgroundColor="light-dark(#fefefe, #000000)";ba.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();ba.stopPropagation();ba.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,
-function(ba){L.style.cursor="";L.style.backgroundColor="";0<ba.dataTransfer.files.length&&this.importFiles(ba.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(V,k,v,I,N,T,W,U,Y){if(null!=V&&"image/"==k.substring(0,6))V="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(V),V=[new mxCell("",new mxGeometry(0,0,N,T),V)],V[0].vertex=!0,da(V,new mxRectangle(0,0,N,T),ba,mxEvent.isAltDown(ba)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g,
-" ")),null!=H&&null!=H.parentNode&&0<g.length&&(H.parentNode.removeChild(H),H=null);else{var fa=!1,na=mxUtils.bind(this,function(la,qa){null!=la&&"application/pdf"==qa&&(qa=Editor.extractGraphModelFromPdf(la),null!=qa&&0<qa.length&&(la=qa));if(null!=la)if(la=mxUtils.parseXml(la),"mxlibrary"==la.documentElement.nodeName)try{var ya=JSON.parse(mxUtils.getTextContent(la.documentElement));M(ya,L);g=g.concat(ya);oa(ba);this.spinner.stop();fa=!0}catch(Ba){}else if("mxfile"==la.documentElement.nodeName)try{var wa=
-la.documentElement.getElementsByTagName("diagram");for(ya=0;ya<wa.length;ya++){var Ia=this.stringToCells(Editor.getDiagramNodeXml(wa[ya])),Aa=this.editor.graph.getBoundingBoxFromGeometry(Ia);null!=Aa&&da(Ia,new mxRectangle(0,0,Aa.width,Aa.height),ba)}fa=!0}catch(Ba){null!=window.console&&console.log("error in drop handler:",Ba)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=H&&null!=H.parentNode&&0<g.length&&(H.parentNode.removeChild(H),H=null)});null!=
-Y&&null!=W&&EditorUi.isVisioFilename(W)?this.importVisio(Y,function(la){na(la,"text/xml")},null,W):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(V,W)&&null!=Y?this.isExternalDataComms()?this.parseFile(Y,mxUtils.bind(this,function(la){4==la.readyState&&(this.spinner.stop(),200<=la.status&&299>=la.status?na(la.responseText,"text/xml"):this.handleError({message:mxResources.get(413==la.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),
-this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):na(V,k)}}));ba.stopPropagation();ba.preventDefault()})),mxEvent.addListener(L,"dragleave",function(ba){L.style.cursor="";L.style.backgroundColor="";ba.stopPropagation();ba.preventDefault()}));Z=Z.cloneNode(!1);Z.setAttribute("src",Editor.editImage);Z.setAttribute("title",mxResources.get("edit"));K.insertBefore(Z,K.firstChild);mxEvent.addListener(Z,"click",m);m=Z.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",
-mxResources.get("add"));K.insertBefore(m,K.firstChild);mxEvent.addListener(m,"click",ka);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ka);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(m=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),m.className="geLibraryButton",K.insertBefore(m,K.firstChild))}n.appendChild(K);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,g){for(var m=0;m<c.length;m++)try{var n=
-c[m],x=n.data;if(null!=x){x="data:"==x.substring(0,5)?this.convertDataUri(x):x;var F="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(F+="aspect=fixed;");F=F+"image="+x+";";null!=n.style&&(F+=n.style);g.appendChild(this.sidebar.createVertexTemplate(F,n.w,n.h,"",n.title||"",!1,null,!0))}else if(null!=n.xml){var H=this.stringToCells("<"==n.xml.charAt(0)?n.xml:Graph.decompress(n.xml)),M=0==H.length?mxResources.get("drawingEmpty"):null!=n.title?n.title:"";
-g.appendChild(this.sidebar.createVertexTemplateFromCells(H,n.w,n.h,M,!0,null,!0))}}catch(L){M=null!=L.message?mxResources.get("error")+": "+L.message:String(L),F=this.sidebar.createVertexTemplateFromCells(null,n.w,n.h,M,!0,null,!0),g.appendChild(F)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||
-(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,g,m,n,x,F,H){c=new ImageDialog(this,c,g,m,n,x,F,H);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,g,m,n,x,F){var H=localStorage.getItem(g);c=new TextareaDialog(this,c,null!=H?JSON.stringify(JSON.parse(H),null,2):"",mxUtils.bind(this,function(M){if(null!=
-M)try{if(null!=F&&F(M),M==H)this.hideDialog();else{if(0<M.length){var L=JSON.parse(M);localStorage.setItem(g,JSON.stringify(L))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(K){this.handleError(K)}}),null,mxResources.get("close"),null,null,null,!0,null,null,x,m,n);this.showDialog(c.container,660,480,!0,!1,null,null,null,new mxRectangle(0,0,null!=m&&2<m.length?500:440,280));c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,
-g,m,n){c=null!=c?c:mxUtils.bind(this,function(x,F,H,M){F||(x=new ChangePageSetup(this,n?H:null,x),x.ignoreColor=!n,null!=M&&n&&(x.shadowVisible=M),this.editor.graph.model.execute(x))});c=new BackgroundImageDialog(this,c,g,m,n);this.showDialog(c.container,400,n?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,g,m,n,x){c=new LibraryDialog(this,c,g,m,n,x);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(F){F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&
-this.showSplash()}));c.init()};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var g=l.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(m){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(c,g,m,n,x,F,H){var M=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},L=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&
-null!=c.message)try{H||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!H||null==window.console||console.error("EditorUi.handleError:",c)}catch(ca){}if(null!=L||null!=g){H=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var K=mxResources.get("ok"),Z=null;g=null!=g?g:mxResources.get("error");if(null!=L){null!=L.retry&&(K=mxResources.get("cancel"),Z=function(){M();L.retry()});if(404==L.code||404==
-L.status||403==L.code){H=403==L.code?null!=L.message?mxUtils.htmlEntities(L.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ha=null!=x?null:null!=F?F:window.location.hash;if(null!=ha&&("#G"==ha.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ha.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&
-0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==L.code||404==L.status)){ha="#U"==ha.substring(0,2)?ha.substring(45,ha.lastIndexOf("%26ex")):ha.substring(2);this.showError(g,H,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ha);null!=n&&n()}),Z,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){ka.innerText=
-"";for(var ba=0;ba<aa.length;ba++){var V=document.createElement("option");mxUtils.write(V,aa[ba].displayName);V.value=ba;ka.appendChild(V);V=document.createElement("option");V.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(V,"<"+aa[ba].email+">");V.setAttribute("disabled","disabled");ka.appendChild(V)}V=document.createElement("option");mxUtils.write(V,mxResources.get("addAccount"));V.value=aa.length;ka.appendChild(V)}var aa=this.drive.getUsersList(),oa=document.createElement("div"),da=document.createElement("div");
-da.style.marginBottom="6px";mxUtils.write(da,mxResources.get("changeUser")+": ");oa.appendChild(da);var ka=document.createElement("select");ka.style.width="100%";ca();mxEvent.addListener(ka,"change",mxUtils.bind(this,function(){var ba=ka.value,V=aa.length!=ba;V&&this.drive.setUser(aa[ba]);this.drive.authorize(V,mxUtils.bind(this,function(){V||(aa=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(k){this.handleError(k)}),!0)}));oa.appendChild(ka);oa=new CustomDialog(this,oa,mxUtils.bind(this,
-function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(oa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=m&&m()}),520,150);return}}null!=L.message?H=""==L.message&&null!=L.name?mxUtils.htmlEntities(L.name,!1):mxUtils.htmlEntities(L.message,!1):null!=L.response&&null!=L.response.error?H=mxUtils.htmlEntities(L.response.error,!1):"undefined"!==typeof window.App&&(L.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout"),
-!1):L.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof L&&0<L.length&&(H=mxUtils.htmlEntities(L,!1)))}x=c=null;null!=L&&null!=L.helpLink?(c=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(L.helpLink)})):null!=L&&null!=L.ownerEmail?(c=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+c+": "+L.ownerEmail+")",!1),x=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(L.ownerEmail))})):
-null!=L&&null!=L.alternateAction&&(c=L.alternateAction.label,x=L.alternateAction.funct);this.showError(g,H,K,m,Z,null,null,c,x,null,null,null,n?m:null)}else null!=m&&m()};EditorUi.prototype.alert=function(c,g,m){c=new ErrorDialog(this,null,c,mxResources.get("ok"),g);this.showDialog(c.container,m||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,g,m,n,x,F){c=null!=c?c:"";var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},M=Math.min(220,28*Math.ceil(Math.max(1,
-c.length)/50));c=new ConfirmDialog(this,c,function(){H();null!=g&&g()},function(){H();null!=m&&m()},n,x,null,null,null,null,M);this.showDialog(c.container,340,46+M,!0,F);c.init()};EditorUi.prototype.showBanner=function(c,g,m,n,x,F,H,M,L){F=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){H=null!=H?H:"translate(-50%,120%)";M=null!=M?M:"translate(-50%,0%)";var K=document.createElement("div");K.className="geBtn gePrimaryBtn geBanner"+
-(x?" geSmallBanner":"");K.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(K.style,"transform",H);mxUtils.setPrefixedStyle(K.style,"transition","all 1000ms ease");null!=L&&mxUtils.setPrefixedStyle(K.style,"transform-origin",L);L=L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));L.setAttribute("border","0");x||(F=document.createElement("img"),F.setAttribute("src",IMAGE_PATH+"/logo.png"),F.setAttribute("border",
-"0"),F.setAttribute("align","absmiddle"),F.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",K.appendChild(F),L.style.cssText=(x?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",K.appendChild(L));mxUtils.write(K,g);document.body.appendChild(K);this.bannerShowing=!0;x&&(L.className="geLibraryButton",K.appendChild(L));g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";
-var Z=document.createElement("input");Z.setAttribute("type","checkbox");Z.setAttribute("id","geDoNotShowAgainCheckbox");Z.style.marginRight="6px";if(!n){g.appendChild(Z);var ha=document.createElement("label");ha.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ha,mxResources.get("doNotShowAgain"));g.appendChild(ha);K.style.paddingBottom=x?"16px":"30px";K.appendChild(g)}var ca=mxUtils.bind(this,function(){null!=K.parentNode&&(K.parentNode.removeChild(K),this.bannerShowing=!1,Z.checked||
-n)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=L&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(oa){mxEvent.consume(oa);ca()}));var aa=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(K.style,"transform",H);window.setTimeout(mxUtils.bind(this,function(){ca()}),1E3)});mxEvent.addListener(K,"click",mxUtils.bind(this,function(oa){var da=mxEvent.getSource(oa);da!=Z&&da!=ha?(null!=m&&m(),ca(),
-mxEvent.consume(oa)):aa()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(K.style,"transform",M)}),500);window.setTimeout(aa,x?5E3:3E4);F=!0}return F};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=function(c,g,m,n){c=c.toDataURL("image/"+m);if(null!=c&&6<c.length)null!=g&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",
-encodeURIComponent(g))),0<n&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,g,m,n,x){var F="jpeg"==m?"jpg":m;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+F;c=this.createImageDataUri(c,g,m,x);this.saveData(n,F,c.substring(c.lastIndexOf(",")+1),"image/"+m,!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(c,g){c=new TextareaDialog(this,c,g,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,g,m,n,x,F){"text/xml"!=m||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||
-/(\.html)$/i.test(g)||(g=g+"."+(null!=F?F:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=n?this.base64ToBlob(c,m):new Blob([c],{type:m}),navigator.msSaveOrOpenBlob(c,g);else if(mxClient.IS_IE)m=window.open("about:blank","_blank"),null==m?mxUtils.popup(c,!0):(m.document.write(c),m.document.close(),m.document.execCommand("SaveAs",!0,g),m.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==m||"image/"!=m.substring(0,6)?this.showTextDialog(g+":",c):this.openInNewWindow(c,
-m,n);else{var H=document.createElement("a");F=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var M=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);F=65==(M?parseInt(M[2],10):!1)?!1:F}if(F||this.isOffline()){H.href=URL.createObjectURL(n?this.base64ToBlob(c,m):new Blob([c],{type:m}));F?H.download=g:H.setAttribute("target","_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)},
-2E4),H.click(),H.parentNode.removeChild(H)}catch(L){}}else this.createEchoRequest(c,g,m,n,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,g,m,n,x,F){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=m?"&mime="+m:"")+(null!=x?"&format="+x:"")+(null!=F?"&base64="+F:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,g,m,n,x,F,H,M,L){F=null!=F?F:!1;H=null!=H?H:"vsdx"!=x&&(!mxClient.IS_IOS||
-!navigator.standalone);var K=mxUtils.bind(this,function(ha,ca,aa,oa){try{if("_blank"==ca)if(null!=m&&"image/"==m.substring(0,6))this.openInNewWindow(c,m,n);else if(null!=m&&"text/html"==m.substring(0,9)){var da=new EmbedDialog(this,c);this.showDialog(da.container,450,240,!0,!0);da.init()}else{var ka=window.open("about:blank");null==ka?mxUtils.popup(c,!0):(ka.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ka.document.close())}else if(ca==App.MODE_DEVICE||"download"==ca)this.doSaveLocalFile(c,
-ha,m,n,null,M);else if(null!=ha&&0<ha.length){var ba=mxUtils.bind(this,function(V){try{this.exportFile(c,ha,m,n,ca,V)}catch(k){this.handleError(k)}});null!=oa?ba(oa):this.pickFolder(ca,ba)}}catch(V){this.handleError(V)}});x=[];F||x.push(App.MODE_BROWSER);H||x.push("_blank");var Z=new SaveDialog(this,g,mxUtils.bind(this,function(ha,ca,aa){K(ha.value,ca,ha,aa);this.hideDialog(null,null,Z.container)}),x,c,m,n,L);this.showDialog(Z.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));
-Z.init()};EditorUi.prototype.openInNewWindow=function(c,g,m){var n=window.open("about:blank");if(null==n||null==n.document)mxUtils.popup(c,!0);else{var x="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var F=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=F&&(x="background: "+F+";")}x='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+x+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||m?(F=m?c:btoa(unescape(encodeURIComponent(c))),
-n.document.write(x+'<img style="max-width:100%;" src="data:'+g+";base64,"+F+'"/></body></html>')):n.document.write(x+c+"</body></html>"):n.document.write(x+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");n.document.close()}};var u=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=
+window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=l&&l();this.editor.fireEvent(new mxEventObject("fileLoaded"));x=!0;if(!this.isOffline()&&null!=c.getMode()){var G="1"==urlParams.sketch?"sketch":uiTheme;if(null==G)G="default";else if("sketch"==G||"min"==G)G+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?
+"on":"off")+"_theme_"+G})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(L){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(L){}}catch(L){this.fileLoadedError=L;if(null!=c)try{c.close()}catch(M){}c=mxUtils.bind(this,function(){null!=
+urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=n?this.fileLoaded(n)||F():F()});g?c():(null!=L.fallbackFileData&&(L.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var M=new LocalFile(this,L.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(M)})}),this.handleError(L,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else F();return x};EditorUi.prototype.getHashValueForPages=
+function(c,g){var l=0,n=new mxGraphModel,x=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var F=0;F<c.length;F++){this.updatePageRoot(c[F]);var G=c[F].node.cloneNode(!1);G.removeAttribute("name");n.root=c[F].root;var L=x.encode(n);this.editor.graph.saveViewState(c[F].viewState,L,!0);L.removeAttribute("pageWidth");L.removeAttribute("pageHeight");G.appendChild(L);null!=g&&(g.eltCount+=G.getElementsByTagName("*").length,g.nodeCount+=G.getElementsByTagName("mxCell").length);
+l=(l<<5)-l+this.hashValue(G,function(M,K,Z,ja){return!ja||"mxGeometry"!=M.nodeName&&"mxPoint"!=M.nodeName||"x"!=K&&"y"!=K&&"width"!=K&&"height"!=K?ja&&"mxCell"==M.nodeName&&"previous"==K?null:Z:Math.round(Z)},g)<<0}return l};EditorUi.prototype.hashValue=function(c,g,l){var n=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(n^=this.hashValue(c.nodeName,g,l));if(null!=c.attributes){null!=l&&(l.attrCount+=
+c.attributes.length);for(var x=0;x<c.attributes.length;x++){var F=c.attributes[x].name,G=null!=g?g(c,F,c.attributes[x].value,!0):c.attributes[x].value;null!=G&&(n^=this.hashValue(F,g,l)+this.hashValue(G,g,l))}}if(null!=c.childNodes)for(x=0;x<c.childNodes.length;x++)n=(n<<5)-n+this.hashValue(c.childNodes[x],g,l)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);g=0;null!=l&&(l.byteCount+=c.length);for(x=0;x<c.length;x++)g=(g<<5)-g+c.charCodeAt(x)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=
+function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,g,l,n,x,F,G){};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(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};
+EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var g=0;g<c.length;g++)null!=c[g].xml&&"<"!=c[g].xml.charAt(0)&&(c[g].xml=mxUtils.trim(Graph.decompress(c[g].xml)));g=mxUtils.createXmlDocument();var l=g.createElement("mxlibrary");mxUtils.setTextContent(l,JSON.stringify(c,null,2));g.appendChild(l);return mxUtils.getXml(g,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),
+".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var g=this.sidebar.palettes[c];if(null!=g){for(var l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,g){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!g){null==c&&(g=this.sidebar.palettes["L.scratchpad"],null==g&&(g=this.sidebar.palettes.search),null!=g&&(c=g[g.length-1].nextSibling));
+c=null!=c?c:l.firstChild.nextSibling.nextSibling;g=l.lastChild;var n=g.previousSibling;l.insertBefore(g,c);l.insertBefore(n,g)}};EditorUi.prototype.loadLibrary=function(c,g){var l=mxUtils.parseXml(c.getData());if("mxlibrary"==l.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(c,n,l.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=
+function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.showSearchWindow=function(c,g){var l=c?"findReplace":"find",n=l+"Window";if(null==this[n]){var x="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,F=c?x?330:300:240;this[n]=new FindWindow(this,document.body.offsetWidth-(F+20),100,F,c?x?304:288:180,c);this[n].window.addListener("show",function(){this.fireEvent(new mxEventObject(l))});this[n].window.addListener("hide",
+function(){this.fireEvent(new mxEventObject(l))});this[n].window.setVisible(!0)}else null==g&&this[n].window.setVisible(!this[n].window.isVisible());null!=g&&(this[n].doSearch(g),this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,g,l,n){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var x=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var F=0;F<this.openLibraries.length;F++)if(this.openLibraries[F].file.getHash()==
+c.getHash()){mxUtils.remove(this.openLibraries[F],this.openLibraries);break}x={file:c,images:g,title:l,expand:n};this.openLibraries.push(x)}else this.scratchpad=c;F=this.sidebar.palettes[c.getHash()];F=null!=F?F[F.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var G=null,L=mxUtils.bind(this,function(aa,V){0==aa.length&&c.isEditable()?(null==G&&(G=document.createElement("div"),G.className="geDropTarget",mxUtils.write(G,mxResources.get("dragElementsHere"))),V.appendChild(G)):this.addLibraryEntries(aa,
+V)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var M=this.sidebar.addPalette(c.getHash(),l,null!=n?n:!0,mxUtils.bind(this,function(aa){L(g,aa)}));null!=x&&(x.div=M);this.repositionLibrary(F,"L.scratchpad"!=c.getHash());n=M.parentNode.previousSibling;l=n.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&n.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var K=document.createElement("div");
+K.style.backgroundColor="inherit";n.style.position="relative";var Z=document.createElement("img");Z.className="geLibraryButton";Z.setAttribute("src",Editor.crossImage);Z.setAttribute("title",mxResources.get("close"));var ja=null;if(".scratchpad"!=c.title||this.closableScratchpad)K.appendChild(Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(aa){if(!mxEvent.isConsumed(aa)){var V=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(c)});null!=ja?this.confirm(mxResources.get("allChangesLost"),
+null,V,mxResources.get("cancel"),mxResources.get("discardChanges")):V();mxEvent.consume(aa)}}));if(c.isEditable()){var da=this.editor.graph,ba=null;l=mxUtils.bind(this,function(aa){this.showLibraryDialog(c.getTitle(),M,g,c,c.getMode());mxEvent.consume(aa)});var na=mxUtils.bind(this,function(aa){c.setModified(!0);c.isAutosave()?(null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba),ba=Z.cloneNode(!1),ba.setAttribute("src",Editor.spinImage),ba.setAttribute("title",mxResources.get("saving")),
+ba.style.cursor="default",ba.style.marginRight="2px",ba.style.marginTop="-2px",K.insertBefore(ba,K.firstChild),this.saveLibrary(c.getTitle(),g,c,c.getMode(),!0,!0,function(){null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba)})):null==ja&&(ja=Z.cloneNode(!1),ja.setAttribute("src",Editor.saveImage),ja.setAttribute("title",mxResources.get("save")),K.insertBefore(ja,K.firstChild),mxEvent.addListener(ja,"click",mxUtils.bind(this,function(V){this.saveLibrary(c.getTitle(),g,c,c.getMode(),c.constructor==
+LocalLibrary,!0,function(){null==ja||c.isModified()||(ja.parentNode.removeChild(ja),ja=null)});mxEvent.consume(V)})))}),ca=mxUtils.bind(this,function(aa,V,k,v){aa=da.cloneCells(mxUtils.sortCells(da.model.getTopmostCells(aa)));for(var J=0;J<aa.length;J++){var N=da.getCellGeometry(aa[J]);null!=N&&N.translate(-V.x,-V.y)}M.appendChild(this.sidebar.createVertexTemplateFromCells(aa,V.width,V.height,v||"",!0,null,!1));aa=mxUtils.getXml(this.editor.graph.encodeCells(aa));Editor.defaultCompressed&&(aa=Graph.compress(aa));
+V={xml:aa,w:V.width,h:V.height};null!=v&&(V.title=v);g.push(V);na(k);null!=G&&null!=G.parentNode&&0<g.length&&(G.parentNode.removeChild(G),G=null)}),ka=mxUtils.bind(this,function(aa){if(da.isSelectionEmpty())da.getRubberband().isActive()?(da.getRubberband().execute(aa),da.getRubberband().reset()):null!=aa&&mxEvent.getSource(aa).classList.contains("geLibraryButton")&&this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var V=da.getSelectionCells(),
+k=da.view.getBounds(V);if(null!=k&&0<k.width&&0<k.height){var v=da.view.scale;k.x/=v;k.y/=v;k.width/=v;k.height/=v;k.x-=da.view.translate.x;k.y-=da.view.translate.y;ca(V,k)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(aa)});mxEvent.addGestureListeners(M,function(){},mxUtils.bind(this,function(aa){da.isMouseDown&&null!=da.panningManager&&null!=da.graphHandler.first&&(da.graphHandler.suspend(),null!=da.graphHandler.hint&&(da.graphHandler.hint.style.visibility=
+"hidden"),M.style.backgroundColor="light-dark(#fefefe, #000000)",M.style.cursor="copy",da.panningManager.stop(),da.autoScroll=!1,mxEvent.consume(aa))}),mxUtils.bind(this,function(aa){da.isMouseDown&&null!=da.panningManager&&null!=da.graphHandler&&(M.style.backgroundColor="",M.style.cursor="default",this.sidebar.showTooltips=!0,da.panningManager.stop(),da.graphHandler.reset(),da.isMouseDown=!1,da.autoScroll=!0,ka(aa),mxEvent.consume(aa))}));mxEvent.addListener(M,"mouseleave",mxUtils.bind(this,function(aa){da.isMouseDown&&
+null!=da.graphHandler.first&&(da.graphHandler.resume(),null!=da.graphHandler.hint&&(da.graphHandler.hint.style.visibility="visible"),M.style.backgroundColor="",M.style.cursor="",da.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(aa){M.style.backgroundColor="light-dark(#fefefe, #000000)";aa.dataTransfer.dropEffect="copy";M.style.cursor="copy";this.sidebar.hideTooltip();aa.stopPropagation();aa.preventDefault()})),mxEvent.addListener(M,"drop",mxUtils.bind(this,
+function(aa){M.style.cursor="";M.style.backgroundColor="";0<aa.dataTransfer.files.length&&this.importFiles(aa.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(V,k,v,J,N,T,W,U,Y){if(null!=V&&"image/"==k.substring(0,6))V="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(V),V=[new mxCell("",new mxGeometry(0,0,N,T),V)],V[0].vertex=!0,ca(V,new mxRectangle(0,0,N,T),aa,mxEvent.isAltDown(aa)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g,
+" ")),null!=G&&null!=G.parentNode&&0<g.length&&(G.parentNode.removeChild(G),G=null);else{var fa=!1,oa=mxUtils.bind(this,function(la,qa){null!=la&&"application/pdf"==qa&&(qa=Editor.extractGraphModelFromPdf(la),null!=qa&&0<qa.length&&(la=qa));if(null!=la)if(la=mxUtils.parseXml(la),"mxlibrary"==la.documentElement.nodeName)try{var ya=JSON.parse(mxUtils.getTextContent(la.documentElement));L(ya,M);g=g.concat(ya);na(aa);this.spinner.stop();fa=!0}catch(Ba){}else if("mxfile"==la.documentElement.nodeName)try{var wa=
+la.documentElement.getElementsByTagName("diagram");for(ya=0;ya<wa.length;ya++){var Ia=this.stringToCells(Editor.getDiagramNodeXml(wa[ya])),Aa=this.editor.graph.getBoundingBoxFromGeometry(Ia);null!=Aa&&ca(Ia,new mxRectangle(0,0,Aa.width,Aa.height),aa)}fa=!0}catch(Ba){null!=window.console&&console.log("error in drop handler:",Ba)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=G&&null!=G.parentNode&&0<g.length&&(G.parentNode.removeChild(G),G=null)});null!=
+Y&&null!=W&&EditorUi.isVisioFilename(W)?this.importVisio(Y,function(la){oa(la,"text/xml")},null,W):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(V,W)&&null!=Y?this.isExternalDataComms()?this.parseFile(Y,mxUtils.bind(this,function(la){4==la.readyState&&(this.spinner.stop(),200<=la.status&&299>=la.status?oa(la.responseText,"text/xml"):this.handleError({message:mxResources.get(413==la.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),
+this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):oa(V,k)}}));aa.stopPropagation();aa.preventDefault()})),mxEvent.addListener(M,"dragleave",function(aa){M.style.cursor="";M.style.backgroundColor="";aa.stopPropagation();aa.preventDefault()}));Z=Z.cloneNode(!1);Z.setAttribute("src",Editor.editImage);Z.setAttribute("title",mxResources.get("edit"));K.insertBefore(Z,K.firstChild);mxEvent.addListener(Z,"click",l);l=Z.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",
+mxResources.get("add"));K.insertBefore(l,K.firstChild);mxEvent.addListener(l,"click",ka);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ka);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),l.className="geLibraryButton",K.insertBefore(l,K.firstChild))}n.appendChild(K);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,g){for(var l=0;l<c.length;l++)try{var n=
+c[l],x=n.data;if(null!=x){x="data:"==x.substring(0,5)?this.convertDataUri(x):x;var F="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(F+="aspect=fixed;");F=F+"image="+x+";";null!=n.style&&(F+=n.style);g.appendChild(this.sidebar.createVertexTemplate(F,n.w,n.h,"",n.title||"",!1,null,!0))}else if(null!=n.xml){var G=this.stringToCells("<"==n.xml.charAt(0)?n.xml:Graph.decompress(n.xml)),L=0==G.length?mxResources.get("drawingEmpty"):null!=n.title?n.title:"";
+g.appendChild(this.sidebar.createVertexTemplateFromCells(G,n.w,n.h,L,!0,null,!0))}}catch(M){L=null!=M.message?mxResources.get("error")+": "+M.message:String(M),F=this.sidebar.createVertexTemplateFromCells(null,n.w,n.h,L,!0,null,!0),g.appendChild(F)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||
+(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,g,l,n,x,F,G){c=new ImageDialog(this,c,g,l,n,x,F,G);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,g,l,n,x,F){var G=localStorage.getItem(g);c=new TextareaDialog(this,c,null!=G?JSON.stringify(JSON.parse(G),null,2):"",mxUtils.bind(this,function(L){if(null!=
+L)try{if(null!=F&&F(L),L==G)this.hideDialog();else{if(0<L.length){var M=JSON.parse(L);localStorage.setItem(g,JSON.stringify(M))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(K){this.handleError(K)}}),null,mxResources.get("close"),null,null,null,!0,null,null,x,l,n);this.showDialog(c.container,660,480,!0,!1,null,null,null,new mxRectangle(0,0,null!=l&&2<l.length?500:440,280));c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,
+g,l,n){c=null!=c?c:mxUtils.bind(this,function(x,F,G,L){F||(x=new ChangePageSetup(this,n?G:null,x),x.ignoreColor=!n,null!=L&&n&&(x.shadowVisible=L),this.editor.graph.model.execute(x))});c=new BackgroundImageDialog(this,c,g,l,n);this.showDialog(c.container,400,n?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,g,l,n,x){c=new LibraryDialog(this,c,g,l,n,x);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(F){F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&
+this.showSplash()}));c.init()};var m=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var g=m.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(c,g,l,n,x,F,G){var L=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},M=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&
+null!=c.message)try{G||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!G||null==window.console||console.error("EditorUi.handleError:",c)}catch(da){}if(null!=M||null!=g){G=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var K=mxResources.get("ok"),Z=null;g=null!=g?g:mxResources.get("error");if(null!=M){null!=M.retry&&(K=mxResources.get("cancel"),Z=function(){L();M.retry()});if(404==M.code||404==
+M.status||403==M.code){G=403==M.code?null!=M.message?mxUtils.htmlEntities(M.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ja=null!=x?null:null!=F?F:window.location.hash;if(null!=ja&&("#G"==ja.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ja.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&
+0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==M.code||404==M.status)){ja="#U"==ja.substring(0,2)?ja.substring(45,ja.lastIndexOf("%26ex")):ja.substring(2);this.showError(g,G,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ja);null!=n&&n()}),Z,mxResources.get("changeUser"),mxUtils.bind(this,function(){function da(){ka.innerText=
+"";for(var aa=0;aa<ba.length;aa++){var V=document.createElement("option");mxUtils.write(V,ba[aa].displayName);V.value=aa;ka.appendChild(V);V=document.createElement("option");V.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(V,"<"+ba[aa].email+">");V.setAttribute("disabled","disabled");ka.appendChild(V)}V=document.createElement("option");mxUtils.write(V,mxResources.get("addAccount"));V.value=ba.length;ka.appendChild(V)}var ba=this.drive.getUsersList(),na=document.createElement("div"),ca=document.createElement("div");
+ca.style.marginBottom="6px";mxUtils.write(ca,mxResources.get("changeUser")+": ");na.appendChild(ca);var ka=document.createElement("select");ka.style.width="100%";da();mxEvent.addListener(ka,"change",mxUtils.bind(this,function(){var aa=ka.value,V=ba.length!=aa;V&&this.drive.setUser(ba[aa]);this.drive.authorize(V,mxUtils.bind(this,function(){V||(ba=this.drive.getUsersList(),da())}),mxUtils.bind(this,function(k){this.handleError(k)}),!0)}));na.appendChild(ka);na=new CustomDialog(this,na,mxUtils.bind(this,
+function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(na.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=M.message?G=""==M.message&&null!=M.name?mxUtils.htmlEntities(M.name,!1):mxUtils.htmlEntities(M.message,!1):null!=M.response&&null!=M.response.error?G=mxUtils.htmlEntities(M.response.error,!1):"undefined"!==typeof window.App&&(M.code==App.ERROR_TIMEOUT?G=mxUtils.htmlEntities(mxResources.get("timeout"),
+!1):M.code==App.ERROR_BUSY?G=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof M&&0<M.length&&(G=mxUtils.htmlEntities(M,!1)))}x=c=null;null!=M&&null!=M.helpLink?(c=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(M.helpLink)})):null!=M&&null!=M.ownerEmail?(c=mxResources.get("contactOwner"),G+=mxUtils.htmlEntities(" ("+c+": "+M.ownerEmail+")",!1),x=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(M.ownerEmail))})):
+null!=M&&null!=M.alternateAction&&(c=M.alternateAction.label,x=M.alternateAction.funct);this.showError(g,G,K,l,Z,null,null,c,x,null,null,null,n?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,g,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),g);this.showDialog(c.container,l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,g,l,n,x,F){c=null!=c?c:"";var G=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},L=Math.min(220,28*Math.ceil(Math.max(1,
+c.length)/50));c=new ConfirmDialog(this,c,function(){G();null!=g&&g()},function(){G();null!=l&&l()},n,x,null,null,null,null,L);this.showDialog(c.container,340,46+L,!0,F);c.init()};EditorUi.prototype.showBanner=function(c,g,l,n,x,F,G,L,M){F=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){G=null!=G?G:"translate(-50%,120%)";L=null!=L?L:"translate(-50%,0%)";var K=document.createElement("div");K.className="geBtn gePrimaryBtn geBanner"+
+(x?" geSmallBanner":"");K.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(K.style,"transform",G);mxUtils.setPrefixedStyle(K.style,"transition","all 1000ms ease");null!=M&&mxUtils.setPrefixedStyle(K.style,"transform-origin",M);M=M=document.createElement("img");M.setAttribute("src",Editor.crossImage);M.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));M.setAttribute("border","0");x||(F=document.createElement("img"),F.setAttribute("src",IMAGE_PATH+"/logo.png"),F.setAttribute("border",
+"0"),F.setAttribute("align","absmiddle"),F.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",K.appendChild(F),M.style.cssText=(x?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",K.appendChild(M));mxUtils.write(K,g);document.body.appendChild(K);this.bannerShowing=!0;x&&(M.className="geLibraryButton",K.appendChild(M));g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";
+var Z=document.createElement("input");Z.setAttribute("type","checkbox");Z.setAttribute("id","geDoNotShowAgainCheckbox");Z.style.marginRight="6px";if(!n){g.appendChild(Z);var ja=document.createElement("label");ja.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ja,mxResources.get("doNotShowAgain"));g.appendChild(ja);K.style.paddingBottom=x?"16px":"30px";K.appendChild(g)}var da=mxUtils.bind(this,function(){null!=K.parentNode&&(K.parentNode.removeChild(K),this.bannerShowing=!1,Z.checked||
+n)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=M&&mxEvent.addListener(M,"click",mxUtils.bind(this,function(na){mxEvent.consume(na);da()}));var ba=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(K.style,"transform",G);window.setTimeout(mxUtils.bind(this,function(){da()}),1E3)});mxEvent.addListener(K,"click",mxUtils.bind(this,function(na){var ca=mxEvent.getSource(na);ca!=Z&&ca!=ja?(null!=l&&l(),da(),
+mxEvent.consume(na)):ba()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(K.style,"transform",L)}),500);window.setTimeout(ba,x?5E3:3E4);F=!0}return F};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=function(c,g,l,n){c=c.toDataURL("image/"+l);if(null!=c&&6<c.length)null!=g&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",
+encodeURIComponent(g))),0<n&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,g,l,n,x){var F="jpeg"==l?"jpg":l;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+F;c=this.createImageDataUri(c,g,l,x);this.saveData(n,F,c.substring(c.lastIndexOf(",")+1),"image/"+l,!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(c,g){c=new TextareaDialog(this,c,g,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,g,l,n,x,F){"text/xml"!=l||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||
+/(\.html)$/i.test(g)||(g=g+"."+(null!=F?F:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=n?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,g);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(c,!0):(l.document.write(c),l.document.close(),l.document.execCommand("SaveAs",!0,g),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(g+":",c):this.openInNewWindow(c,
+l,n);else{var G=document.createElement("a");F=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof G.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var L=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);F=65==(L?parseInt(L[2],10):!1)?!1:F}if(F||this.isOffline()){G.href=URL.createObjectURL(n?this.base64ToBlob(c,l):new Blob([c],{type:l}));F?G.download=g:G.setAttribute("target","_blank");document.body.appendChild(G);try{window.setTimeout(function(){URL.revokeObjectURL(G.href)},
+2E4),G.click(),G.parentNode.removeChild(G)}catch(M){}}else this.createEchoRequest(c,g,l,n,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,g,l,n,x,F){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=l?"&mime="+l:"")+(null!=x?"&format="+x:"")+(null!=F?"&base64="+F:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,g,l,n,x,F,G,L,M){F=null!=F?F:!1;G=null!=G?G:"vsdx"!=x&&(!mxClient.IS_IOS||
+!navigator.standalone);var K=mxUtils.bind(this,function(ja,da,ba,na){try{if("_blank"==da)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,n);else if(null!=l&&"text/html"==l.substring(0,9)){var ca=new EmbedDialog(this,c);this.showDialog(ca.container,450,240,!0,!0);ca.init()}else{var ka=window.open("about:blank");null==ka?mxUtils.popup(c,!0):(ka.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ka.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(c,
+ja,l,n,null,L);else if(null!=ja&&0<ja.length){var aa=mxUtils.bind(this,function(V){try{this.exportFile(c,ja,l,n,da,V)}catch(k){this.handleError(k)}});null!=na?aa(na):this.pickFolder(da,aa)}}catch(V){this.handleError(V)}});x=[];F||x.push(App.MODE_BROWSER);G||x.push("_blank");var Z=new SaveDialog(this,g,mxUtils.bind(this,function(ja,da,ba){K(ja.value,da,ja,ba);this.hideDialog(null,null,Z.container)}),x,c,l,n,M);this.showDialog(Z.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));
+Z.init()};EditorUi.prototype.openInNewWindow=function(c,g,l){var n=window.open("about:blank");if(null==n||null==n.document)mxUtils.popup(c,!0);else{var x="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var F=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=F&&(x="background: "+F+";")}x='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+x+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||l?(F=l?c:btoa(unescape(encodeURIComponent(c))),
+n.document.write(x+'<img style="max-width:100%;" src="data:'+g+";base64,"+F+'"/></body></html>')):n.document.write(x+c+"</body></html>"):n.document.write(x+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");n.document.close()}};var t=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(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=c(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.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,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 x=g.getBoundingClientRect();this.tagsDialog.style.left=x.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=x.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"}))}u.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=
+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"}))}t.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.editor.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var m=c(mxUtils.bind(this,function(n){var x=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",x);null!=this.exportDialog&&
-(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)x.apply(this);else{this.exportDialog=document.createElement("div");var F=m.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,80);this.exportDialog.style.left=F.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";F=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=F.zIndex;var H=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",
-speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});H.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",x);this.editor.exportToCanvas(mxUtils.bind(this,function(M){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var L=this.createImageDataUri(M,null,"png");M=document.createElement("img");M.style.maxWidth="140px";M.style.maxHeight="140px";
-M.style.cursor="pointer";M.style.backgroundColor="white";M.setAttribute("title",mxResources.get("openInNewWindow"));M.setAttribute("border","0");M.setAttribute("src",L);this.exportDialog.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){this.openInNewWindow(L.substring(L.indexOf(",")+1),"image/png",!0);x.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(M){H.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null);this.handleError(M)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,g,m,n,x,F){this.isLocalFileSave()?this.saveLocalFile(m,c,n,x,g,F):this.saveRequest(c,g,mxUtils.bind(this,function(H,M){return this.createEchoRequest(m,H,n,x,g,M)}),m,x,n)};EditorUi.prototype.saveRequest=function(c,g,m,n,x,F,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;var M=mxUtils.bind(this,
-function(K,Z,ha,ca){if("_blank"==Z||null!=K&&0<K.length){var aa=m("_blank"==Z?null:K,Z==App.MODE_DEVICE||"download"==Z||null==Z||"_blank"==Z?"0":"1");null!=aa&&(Z==App.MODE_DEVICE||"download"==Z||"_blank"==Z?aa.simulate(document,"_blank"):(ha=mxUtils.bind(this,function(oa){F=null!=F?F:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,K,F,!0,Z,oa)}catch(da){this.handleError(da)}else this.spinner.spin(document.body,mxResources.get("saving"))&&aa.send(mxUtils.bind(this,function(){this.spinner.stop();
-if(200<=aa.getStatus()&&299>=aa.getStatus())try{this.exportFile(aa.getText(),K,F,!0,Z,oa)}catch(da){this.handleError(da)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(da){this.spinner.stop();this.handleError(da)}))}),null!=ca?ha(ca):this.pickFolder(Z,ha)))}});x=[App.MODE_BROWSER];H||x.push("_blank");var L=new SaveDialog(this,c,mxUtils.bind(this,function(K,Z,ha){M(K.value,Z,K,ha);this.hideDialog(null,null,L.container)}),x,null,"application/pdf");this.showDialog(L.container,
-420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));L.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,g,m,n,x,F){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,g,m){g(null)};EditorUi.prototype.exportSvg=function(c,g,m,n,x,F,
-H,M,L,K,Z,ha,ca,aa){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(la){Editor.addRetryToError(la,mxUtils.bind(this,function(){this.exportSvg(c,g,m,n,x,F,H,M,L,K,Z,ha,ca,aa)}));this.handleError(la)})))try{var oa=this.editor.graph.isSelectionEmpty();m=null!=m?m:oa;var da=g?null:this.editor.graph.background;da==mxConstants.NONE&&(da=null);null==da&&0==g&&(da=this.editor.graph.shapeBackgroundColor);var ka=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&
-(this.editor.graph.addForeignObjectWarning=function(){});var ba=mxUtils.lightDarkColorSupported,V=mxUtils.preferDarkColor;if("light"==Z||"dark"==Z)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==Z;var k=Graph.addFont,v={};Graph.addFont=function(la,qa,ya,wa){k.call(this,la,qa,ya,v)};var I=this.editor.graph.createSvgImageExport(x),N=I.drawCellState;I.drawCellState=function(la,qa){null!=la&&Graph.processFontStyle(la.style);N.apply(this,arguments)};var T=this.editor.graph.getSvg(da,
-c,H,M,null,m,null,I,"blank"==K?"_blank":"self"==K?"_top":null,null,!ca,Z,ha);mxUtils.lightDarkColorSupported=ba;mxUtils.preferDarkColor=V;this.editor.graph.addForeignObjectWarning=ka;n&&this.editor.graph.addSvgShadow(T);var W=this.getBaseFilename()+(x?".drawio":"")+".svg";aa=null!=aa?aa:mxUtils.bind(this,function(la){this.isLocalFileSave()||la.length<=MAX_REQUEST_SIZE?this.saveData(W,"svg",la,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
-function(){mxUtils.popup(la)}))});var U=mxUtils.bind(this,function(la){this.spinner.stop();x&&la.setAttribute("content",this.getFileData(!0,null,null,null,m,L,null,null,null,null,null,c,H));aa(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(la))});this.editor.graph.mathEnabled&&this.editor.addMathCss(T);var Y=mxUtils.bind(this,function(la){Editor.replaceSvgDataUris&&F&&EditorUi.embedSvgImages(la);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(la,
-Z,U):U(la)}),fa=Graph.customFontElements;Graph.customFontElements=v;var na=mxUtils.bind(this,function(la){Graph.customFontElements=fa;Graph.addFont=k;F&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(la,Y,this.thumbImageCache)):Y(la)});ca?this.embedFonts(T,na):(this.editor.addFontCss(T),na(T))}catch(la){this.handleError(la)}};EditorUi.prototype.replaceAlternateContent=function(c,g,m){function n(ha,ca,aa,oa,da){var ka=mxUtils.createElementNs(c.ownerDocument,
-mxConstants.NS_SVG,"image");ka.setAttribute("x",ca);ka.setAttribute("y",aa+.5);ka.setAttribute("width",oa.width);ka.setAttribute("height",oa.height);null==ka.setAttributeNS?ka.setAttribute("xlink:href",da):ka.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",da);ha.replaceChild(ka,ha.lastChild);M()}function x(){if(H<Z.length)Z[H++](x)}var F="";g=c.getElementsByTagName("style");for(var H=0;H<g.length;H++)F+=g[H].innerHTML;g=c.getElementsByTagName("switch");counter=g.length;var M=mxUtils.bind(this,function(){counter--;
-0==counter&&m(c)}),L={},K={},Z=[];for(H=0;H<g.length;H++)mxUtils.bind(this,function(ha){var ca=ha.getElementsByTagName("div");if(0<ca.length)try{var aa=ca[0].cloneNode(!0),oa=parseInt(aa.style.marginLeft),da=parseInt(aa.style.paddingTop),ka=aa.getElementsByTagName("div")[1],ba=ca=!1,V=aa.style.alignItems,k=aa.style.justifyContent;if(null!=aa.style.writingMode){var v=aa.style.writingMode;ba="vertical-"==v.substring(0,9);ca="-rl"==v.substring(v.length-3)}var I=!ba&&"1px"==aa.style.width||ba&&"1px"==
-aa.style.height;if(!ba&&"1px"==aa.style.height||ba&&"1px"==aa.style.width)aa.style.alignItems=ba&&ca?"unsafe flex-end":"unsafe flex-start";I&&(aa.style.justifyContent="unsafe flex-start");aa.style.paddingTop="";aa.style.marginLeft="";var N=aa.outerHTML,T=L[N];null==T&&(aa.style.position="absolute",aa.style.visibility="hidden",document.body.appendChild(aa),v=1,v="1px"==aa.style.width?ka.offsetWidth:parseInt(aa.style.width),I=1,I="1px"==aa.style.height?ka.offsetHeight:parseInt(aa.style.height),document.body.removeChild(aa),
-T=new mxRectangle(oa,da,v,I),L[N]=T);"1px"==aa.style.height&&("unsafe center"==V?da-=T.height/2:"unsafe flex-end"==V&&(da-=T.height));if("1px"==aa.style.width)if(!ba&&"unsafe center"==k||ba&&"unsafe center"==V)oa-=T.width/2;else if(!ba&&"unsafe flex-end"==k||ba&&(!ca&&"unsafe flex-end"==V||ca&&"unsafe flex-start"==V))oa-=T.width;T=new mxRectangle(oa,da,T.width,T.height+parseInt(ka.style.fontSize)/4);Z.push(mxUtils.bind(this,function(W){var U=K[N];null==U?Graph.htmlToPng(N,T.width,T.height,mxUtils.bind(this,
-function(Y){n(ha,oa,da,T,Y);K[N]=Y;W()}),F):(n(ha,oa,da,T,U),W())}))}catch(W){M()}else M()})(g[H]);0==counter&&m(c);H=0;x()};EditorUi.prototype.addRadiobox=function(c,g,m,n,x,F,H){return this.addCheckbox(c,m,n,x,F,H,!0,g)};EditorUi.prototype.addCheckbox=function(c,g,m,n,x,F,H,M){F=null!=F?F:!0;var L=document.createElement("input");L.style.marginRight="8px";L.style.marginTop="16px";L.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();L.id=H;null!=M&&L.setAttribute("name",M);m&&
-(L.setAttribute("checked","checked"),L.defaultChecked=!0);n&&L.setAttribute("disabled","disabled");F&&(c.appendChild(L),m=document.createElement("label"),mxUtils.write(m,g),m.setAttribute("for",H),c.appendChild(m),x||mxUtils.br(c));return L};EditorUi.prototype.addEditButton=function(c,g){var m=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);m.style.marginLeft="24px";var n=this.getCurrentFile(),x="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(x=window.location.href);
-var F=document.createElement("select");F.style.maxWidth="200px";F.style.width="auto";F.style.marginLeft="8px";F.style.marginRight="10px";F.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));F.appendChild(n);var H=document.createElement("option");H.setAttribute("value","custom");mxUtils.write(H,mxResources.get("custom")+"...");F.appendChild(H);c.appendChild(F);mxEvent.addListener(F,"change",mxUtils.bind(this,function(){if("custom"==
-F.value){var M=new FilenameDialog(this,x,mxResources.get("ok"),function(L){null!=L?(x=L,H.setAttribute("title",L)):(F.value="blank",H.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){F.value="blank"});this.showDialog(M.container,300,80,!0,!1);M.init()}}));mxEvent.addListener(m,"change",mxUtils.bind(this,function(){m.checked&&(null==g||g.checked)?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return m.checked?
-"blank"===F.value?"_blank":x:null},getEditInput:function(){return m},getEditSelect:function(){return F}}};EditorUi.prototype.addLinkSection=function(c,g){function m(){var M=document.createElement("div");M.style.width="100%";M.style.height="100%";M.style.boxSizing="border-box";null!=F&&F!=mxConstants.NONE?(M.style.border="1px solid black",M.style.backgroundColor=F):(M.style.backgroundPosition="center center",M.style.backgroundRepeat="no-repeat",M.style.backgroundImage="url('"+Dialog.prototype.closeImage+
-"')");H.innerText="";H.appendChild(M)}mxUtils.write(c,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 x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));n.appendChild(x);x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("openInNewWindow"));n.appendChild(x);
-x=document.createElement("option");x.setAttribute("value","self");mxUtils.write(x,mxResources.get("openInThisWindow"));n.appendChild(x);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));c.appendChild(n);mxUtils.write(c,mxResources.get("borderColor")+":");var F="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(M){this.pickColor(F||"none",function(L){F=L;m()});
-mxEvent.consume(M)}));m();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";c.appendChild(H);mxUtils.br(c);return{getColor:function(){return F},getTarget:function(){return n.value},focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(c,g,m,n,x,F){F=null!=F?F:[];m&&(F.push("lightbox=1"),
-"auto"!=c&&F.push("target="+c),null!=g&&g!=mxConstants.NONE&&F.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=n&&0<n.length&&F.push("edit="+encodeURIComponent(n)),x&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));return F};EditorUi.prototype.createLink=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca){var aa=this.getCurrentFile();L=this.createUrlParameters(c,g,n,x,F,L);c=!0;null!=H?m="#U"+encodeURIComponent(H):M||null==aa||""==aa.getHash()?m="#R"+encodeURIComponent(m?this.getFileData(!0,
-null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(m="#"+aa.getHash(),c=!1);c&&null!=aa&&null!=aa.getTitle()&&aa.getTitle()!=this.defaultFilename&&L.push("title="+encodeURIComponent(aa.getTitle()));K&&1<m.length&&(L.push("open="+m.substring(1)),m="");Z&&null!=this.currentPage&&L.push("page-id="+this.currentPage.getId());ha&&L.push("transparent=1");null!=ca&&L.push("dark="+ca);return(n&&(null!=H||null!=aa&&aa.getMode()!=App.MODE_GITHUB&&aa.getMode()!=
-App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<L.length?"?"+L.join("&"):"")+m};EditorUi.prototype.createHtml=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca){this.getBasenames();var aa={};""!=x&&x!=mxConstants.NONE&&(aa.highlight=x);"auto"!==n&&(aa.target=n);K||(aa.lightbox=!1);aa.nav=this.editor.graph.foldingEnabled;m=parseInt(m);isNaN(m)||100==m||(aa.zoom=m/100);
-m=[];H&&(m.push("pages"),aa.resize=!0,null!=this.pages&&null!=this.currentPage&&(aa.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(m.push("zoom"),aa.resize=!0);M&&m.push("layers");L&&m.push("tags");null!=ca&&(aa["dark-mode"]=ca);0<m.length&&(K&&m.push("lightbox"),aa.toolbar=m.join(" "));null!=Z&&0<Z.length&&(aa.edit=Z);null!=c?aa.url=c:aa.xml=this.getFileData(!0,null,null,null,null,!H);g='<div class="mxgraph" style="'+(F?"max-width:100%;":"")+(""!=m?"border:1px solid transparent;":"")+'" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(aa))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ha(g,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"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(c,g,m,n){var x=document.createElement("div");
-x.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("html"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(F);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var M=document.createElement("input");M.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";M.setAttribute("value","url");M.setAttribute("type","radio");M.setAttribute("name",
-"type-embedhtmldialog");F=M.cloneNode(!0);F.setAttribute("value","copy");H.appendChild(F);var L=document.createElement("span");mxUtils.write(L,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(L);mxUtils.br(H);H.appendChild(M);L=document.createElement("span");mxUtils.write(L,mxResources.get("publicDiagramUrl"));H.appendChild(L);var K=this.getCurrentFile();null==m&&null!=K&&K.constructor==window.DriveFile&&(L=document.createElement("a"),L.style.paddingLeft="12px",L.style.color="gray",L.style.cursor=
-"pointer",mxUtils.write(L,mxResources.get("share")),H.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(K.getId(),K)})));F.setAttribute("checked","checked");null==m&&M.setAttribute("disabled","disabled");x.appendChild(H);H=380;var Z=this.addLinkSection(x),ha=document.createElement("select");ha.style.maxWidth="260px";ha.style.marginLeft="8px";ha.style.marginTop="16px";L=document.createElement("option");L.setAttribute("value","light");
-mxUtils.write(L,mxResources.get("light"));ha.appendChild(L);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));ha.appendChild(L);L=document.createElement("option");L.setAttribute("value","auto");mxUtils.write(L,mxResources.get("automatic"));L.setAttribute("selected","selected");ha.appendChild(L);L.setAttribute("selected","selected");mxUtils.write(x,mxResources.get("appearance")+":");x.appendChild(ha);mxUtils.br(x);H+=26;var ca=this.addCheckbox(x,
-mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var aa=document.createElement("input");aa.setAttribute("type","text");aa.style.marginRight="16px";aa.style.width="60px";aa.style.marginLeft="4px";aa.style.marginRight="12px";aa.value="100%";x.appendChild(aa);var oa=this.addCheckbox(x,mxResources.get("fit"),!0);L=null!=this.pages&&1<this.pages.length;var da=da=this.addCheckbox(x,mxResources.get("allPages"),L,!L),ka=this.addCheckbox(x,mxResources.get("layers"),!0),ba=this.addCheckbox(x,mxResources.get("tags"),
-!0),V=this.addCheckbox(x,mxResources.get("lightbox"),!0),k=null;if(EditorUi.enableHtmlEditOption){k=this.addEditButton(x,V);var v=k.getEditInput();v.style.marginBottom="16px";H+=50;mxEvent.addListener(V,"change",function(){V.checked?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled");v.checked&&V.checked?k.getEditSelect().removeAttribute("disabled"):k.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,x,mxUtils.bind(this,function(){n(M.checked?m:null,ca.checked,
-aa.value,Z.getTarget(),Z.getColor(),oa.checked,da.checked,ka.checked,ba.checked,V.checked,null!=k?k.getLink():null,null!=ha?ha.value:null)}),null,c,g);this.showDialog(c.container,340,H,!0,!0);F.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,g,m,n,x,F,H,M,L,K,Z,ha){var ca=document.createElement("div");ca.style.whiteSpace="nowrap";var aa=document.createElement("h3");mxUtils.write(aa,c||mxResources.get("publish"));aa.style.width="100%";aa.style.textAlign="center";aa.style.marginTop="2px";
-aa.style.marginBottom="20px";ca.appendChild(aa);var oa=document.createElement("select");c=30;oa.className="geBtn";oa.style.marginBottom="8px";oa.style.marginLeft="0px";oa.style.width="100%";oa.style.boxSizing="border-box";if(null==M||""==M.getHash())x=null!=x?x:"https://www.drawio.com/doc/faq/publish-diagram-as-link",aa=document.createElement("option"),mxUtils.write(aa,mxResources.get("makeCopy")),aa.setAttribute("value","copy"),oa.appendChild(aa);aa=document.createElement("option");mxUtils.write(aa,
-mxResources.get("authorizationRequired"));aa.setAttribute("value","auth");oa.appendChild(aa);null!=M&&""!=M.getHash()||aa.setAttribute("disabled","disabled");M=document.createElement("option");M.setAttribute("value","public");oa.appendChild(M);null!=H?(mxUtils.write(M,mxResources.get("publicDiagramUrl")),M.setAttribute("title",H),oa.value="public"):(mxUtils.write(M,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),M.setAttribute("disabled","disabled"));ca.appendChild(oa);
-mxUtils.br(ca);oa.focus();var da=null,ka=null;if(null!=g||null!=m)c+=30,mxUtils.write(ca,mxResources.get("width")+":"),da=document.createElement("input"),da.setAttribute("type","text"),da.style.marginRight="16px",da.style.width="50px",da.style.marginLeft="6px",da.style.marginRight="16px",da.style.marginBottom="10px",da.value="100%",ca.appendChild(da),mxUtils.write(ca,mxResources.get("height")+":"),ka=document.createElement("input"),ka.setAttribute("type","text"),ka.style.width="50px",ka.style.marginLeft=
-"6px",ka.style.marginBottom="10px",ka.value=m+"px",ca.appendChild(ka),mxUtils.br(ca);var ba=this.addLinkSection(ca,n),V=K?this.addCheckbox(ca,mxResources.get("transparentBackground"),!1):null;null!=V&&(c+=20);var k=document.createElement("select");k.className="geBtn";k.style.marginTop="8px";g=document.createElement("option");mxUtils.write(g,mxResources.get("allPages"));g.setAttribute("value","allPages");k.appendChild(g);g=document.createElement("option");mxUtils.write(g,mxResources.get("currentPage"));
-g.setAttribute("value","currentPage");k.appendChild(g);var v=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),ha&&(mxUtils.write(ca,mxResources.get("pages")+":"),ca.appendChild(k),mxUtils.br(ca),c+=30),v=this.addCheckbox(ca,mxResources.get("selectedPage")+": "+g));var I=document.createElement("select");I.style.maxWidth="260px";I.style.marginLeft="8px";I.style.marginTop=
-"16px";ha=document.createElement("option");ha.setAttribute("value","0");mxUtils.write(ha,mxResources.get("light"));I.appendChild(ha);ha=document.createElement("option");ha.setAttribute("value","1");mxUtils.write(ha,mxResources.get("dark"));I.appendChild(ha);ha=document.createElement("option");ha.setAttribute("value","auto");mxUtils.write(ha,mxResources.get("automatic"));ha.setAttribute("selected","selected");I.appendChild(ha);Z&&(mxUtils.write(ca,mxResources.get("appearance")+":"),ca.appendChild(I),
-mxUtils.br(ca),c+=30);var N=this.addCheckbox(ca,mxResources.get("lightbox"),!0,null,null,!n),T=this.addEditButton(ca,N),W=T.getEditInput();n&&(W.style.marginLeft=N.style.marginLeft,N.style.display="none",c-=20);var U=this.addCheckbox(ca,mxResources.get("layers"),!0);U.style.marginLeft=W.style.marginLeft;U.style.marginTop="8px";var Y=this.addCheckbox(ca,mxResources.get("tags"),!0);Y.style.marginLeft=W.style.marginLeft;Y.style.marginBottom="16px";Y.style.marginTop="16px";mxEvent.addListener(N,"change",
-function(){N.checked?(U.removeAttribute("disabled"),W.removeAttribute("disabled"),Y.removeAttribute("disabled")):(U.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),Y.setAttribute("disabled","disabled"));W.checked&&N.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,ca,mxUtils.bind(this,function(){L(ba.getTarget(),ba.getColor(),null==v?!1:v.checked,N.checked,T.getLink(),U.checked,null!=da?
-da.value:null,null!=ka?ka.value:null,Y.checked,oa.value,null!=V?V.checked:!1,I.value,"allPages"==k.value)}),null,mxResources.get("create"),x,F);this.showDialog(n.container,340,296+c,!0,!0);null!=da?(da.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?da.select():document.execCommand("selectAll",!1,null)):null==oa.parentNode;ba.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,g,m,n,x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var H=document.createElement("h3");
-mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(x?"10":"4")+"px";F.appendChild(H);if(x){mxUtils.write(F,mxResources.get("zoom")+":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value=this.lastExportZoom||"100%";F.appendChild(M);mxUtils.write(F,mxResources.get("borderWidth")+":");var L=document.createElement("input");
-L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.value=this.lastExportBorder||"0";F.appendChild(L);mxUtils.br(F)}var K=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Z=n?null:this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var ha=n?null:this.addCheckbox(F,mxResources.get("transparentBackground"),H.background==mxConstants.NONE||null==H.background);
-null!=ha&&(ha.style.marginBottom="16px");c=new CustomDialog(this,F,mxUtils.bind(this,function(){var ca=parseInt(M.value)/100||1,aa=parseInt(L.value)||0;m(!K.checked,null!=Z?Z.checked:!1,null!=ha?ha.checked:!1,ca,aa)}),null,c,g);this.showDialog(c.container,300,(x?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,g,m,n,x,F,H,M,L){H=null!=H?H:Editor.defaultIncludeDiagram;var K=document.createElement("div");K.style.whiteSpace="nowrap";var Z=this.editor.graph,ha="jpeg"==M||"webp"==
-M?220:320,ca=document.createElement("h3");mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";K.appendChild(ca);mxUtils.write(K,mxResources.get("zoom")+":");var aa=document.createElement("input");aa.setAttribute("type","text");aa.style.marginRight="16px";aa.style.width="60px";aa.style.marginLeft="4px";aa.style.marginRight="12px";aa.value=this.lastExportZoom||"100%";K.appendChild(aa);mxUtils.write(K,mxResources.get("borderWidth")+":");var oa=document.createElement("input");
-oa.setAttribute("type","text");oa.style.marginRight="16px";oa.style.width="60px";oa.style.marginLeft="4px";oa.value=this.lastExportBorder||"0";K.appendChild(oa);mxUtils.br(K);var da=this.addCheckbox(K,mxResources.get("selectionOnly"),!1,Z.isSelectionEmpty()),ka=document.createElement("input");ka.style.marginTop="16px";ka.style.marginRight="8px";ka.style.marginLeft="24px";ka.setAttribute("disabled","disabled");ka.setAttribute("type","checkbox");var ba=document.createElement("select");ba.style.marginTop=
-"16px";ba.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!Z.isSelectionEmpty()||"selectionOnly"!=c[ca]){var V=document.createElement("option");mxUtils.write(V,mxResources.get(c[ca]));V.setAttribute("value",c[ca]);ba.appendChild(V)}L?(mxUtils.write(K,mxResources.get("size")+":"),K.appendChild(ba),mxUtils.br(K),ha+=26,mxEvent.addListener(ba,"change",function(){"selectionOnly"==ba.value&&(da.checked=!0)})):F&&(K.appendChild(ka),mxUtils.write(K,mxResources.get("crop")),
-mxUtils.br(K),ha+=30,mxEvent.addListener(da,"change",function(){da.checked?ka.removeAttribute("disabled"):ka.setAttribute("disabled","disabled")}));Z.isSelectionEmpty()?L&&(da.style.display="none",da.nextSibling.style.display="none",da.nextSibling.nextSibling.style.display="none",ha-=30):(ba.value="diagram",ka.setAttribute("checked","checked"),ka.defaultChecked=!0,mxEvent.addListener(da,"change",function(){ba.value=da.checked?"selectionOnly":"diagram"}));var k=this.addCheckbox(K,mxResources.get("transparentBackground"),
-!1,null,null,"jpeg"!=M&&"webp"!=M),v=document.createElement("select");v.style.maxWidth="260px";v.style.marginLeft="8px";v.style.marginTop="16px";F=document.createElement("option");F.setAttribute("value","light");mxUtils.write(F,mxResources.get("light"));v.appendChild(F);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));v.appendChild(L);"svg"==M&&mxUtils.lightDarkColorSupported?(F=document.createElement("option"),F.setAttribute("value","auto"),
-mxUtils.write(F,mxResources.get("automatic")),F.setAttribute("selected","selected"),v.appendChild(F)):Editor.isDarkMode()?L.setAttribute("selected","selected"):F.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("appearance")+":");K.appendChild(v);mxUtils.br(K);ha+=26;var I=this.addCheckbox(K,mxResources.get("shadow"),Z.shadowVisible),N=null;if("png"==M||"jpeg"==M||"webp"==M)N=this.addCheckbox(K,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),ha+=30;Z=
-null!=this.pages?this.pages.length:1;var T=this.addCheckbox(K,mxResources.get("includeCopyOfMyDiagram")+(1<Z?":":""),H,null,null,"jpeg"!=M&&"webp"!=M),W=document.createElement("select");W.style.maxWidth="260px";W.style.marginLeft="28px";"png"==M||"svg"==M?(H=function(){T.checked?W.removeAttribute("disabled"):W.setAttribute("disabled","disabled")},F=document.createElement("option"),F.setAttribute("value","allPages"),mxUtils.write(F,mxResources.get("allPages")),W.appendChild(F),F=document.createElement("option"),
-F.setAttribute("value","currentPage"),mxUtils.write(F,mxResources.get("currentPage")),W.appendChild(F),1<Z?(T.style.marginBottom="12px",W.style.marginBottom="16px",K.appendChild(W),mxUtils.br(K),ha+=20):T.style.marginBottom="16px",null!=this.lastEmbedInclude&&(W.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",H),H()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");U.id="geCheckbox-"+
-Editor.guid();var Y=document.createElement("input");Y.style.marginBottom="16px";Y.style.marginRight="8px";Y.setAttribute("type","checkbox");Y.id="geCheckbox-"+Editor.guid();g&&(U.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,K.appendChild(U),H=document.createElement("label"),mxUtils.write(H,mxResources.get("embedImages")),H.setAttribute("for",U.id),K.appendChild(H),mxUtils.br(K),Y.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,K.appendChild(Y),H=document.createElement("label"),
-mxUtils.write(H,mxResources.get("embedFonts")),H.setAttribute("for",Y.id),K.appendChild(H),mxUtils.br(K),ha+=50);var fa=document.createElement("select");fa.style.maxWidth="260px";fa.style.marginLeft="8px";F=document.createElement("option");F.setAttribute("value","auto");mxUtils.write(F,mxResources.get("automatic"));fa.appendChild(F);H=document.createElement("option");H.setAttribute("value","blank");mxUtils.write(H,mxResources.get("openInNewWindow"));fa.appendChild(H);H=document.createElement("option");
-H.setAttribute("value","self");mxUtils.write(H,mxResources.get("openInThisWindow"));fa.appendChild(H);H=document.createElement("div");mxUtils.write(H,mxResources.get("LinksLost"));H.style.margin="7px";H.style.display="none";"svg"==M&&(mxUtils.write(K,mxResources.get("links")+":"),K.appendChild(fa),K.appendChild(H),mxUtils.br(K),mxUtils.br(K),ha+=50);m=new CustomDialog(this,K,mxUtils.bind(this,function(){this.lastExportBorder=oa.value;this.lastExportZoom=aa.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=
-Y.checked;this.lastEmbedInclude=W.value;x(aa.value,k.checked,!da.checked,I.checked,T.checked,U.checked&&g,oa.value,ka.checked,("png"==M||"svg"==M)&&"currentPage"==W.value,fa.value,null!=N?N.checked:null,null!=v?v.value:null,ba.value,Y.checked)}),null,m,n);this.showDialog(m.container,340,ha,!0,!0,null,null,null,null,!0);aa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?aa.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,g,m,n,
-x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=g){var M=document.createElement("h3");mxUtils.write(M,g);M.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";F.appendChild(M)}var L=this.addCheckbox(F,mxResources.get("fit"),!0),K=this.addCheckbox(F,mxResources.get("shadow"),H.shadowVisible&&n,!n),Z=this.addCheckbox(F,m),ha=this.addCheckbox(F,mxResources.get("lightbox"),!0),ca=this.addEditButton(F,ha),aa=ca.getEditInput(),
-oa=1<H.model.getChildCount(H.model.getRoot()),da=this.addCheckbox(F,mxResources.get("layers"),oa,!oa);da.style.marginLeft=aa.style.marginLeft;da.style.marginBottom="12px";da.style.marginTop="8px";mxEvent.addListener(ha,"change",function(){ha.checked?(oa&&da.removeAttribute("disabled"),aa.removeAttribute("disabled")):(da.setAttribute("disabled","disabled"),aa.setAttribute("disabled","disabled"));aa.checked&&ha.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled",
-"disabled")});g=new CustomDialog(this,F,mxUtils.bind(this,function(){c(L.checked,K.checked,Z.checked,ha.checked,ca.getLink(),da.checked)}),null,mxResources.get("embed"),x);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,g,m,n,x,F,H,M){function L(aa){var oa=" ",da="";n&&(oa=" 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!=Z?"&page="+Z:"")+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}})(this);\"",da+="cursor:pointer;");c&&(da+="max-width:100%;");var ka="";m&&(ka=' width="'+Math.round(K.width)+'" height="'+Math.round(K.height)+'"');H('<img src="'+aa+'"'+ka+(""!=da?' style="'+da+'"':"")+oa+"/>")}var K=this.editor.graph.getGraphBounds(),Z=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(aa){var oa=n?this.getFileData(!0):
-null;aa=this.createImageDataUri(aa,oa,"png");L(aa)}),null,null,null,mxUtils.bind(this,function(aa){M({message:mxResources.get("unknownError")})}),null,!0,m?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),K.width*K.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var ha="";m&&(ha="&w="+Math.round(2*K.width)+"&h="+Math.round(2*K.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+ha+"&xml="+encodeURIComponent(g));ca.send(mxUtils.bind(this,function(){200<=
-ca.getStatus()&&299>=ca.getStatus()?L("data:image/png;base64,"+ca.getText()):M({message:mxResources.get("unknownError")})}))}else M({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,g,m,n,x,F,H){var M=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!m,"auto"),L=M.getElementsByTagName("a");if(null!=L)for(var K=0;K<L.length;K++){var Z=L[K].getAttribute("href");null!=Z&&"#"==Z.charAt(0)&&"_blank"==L[K].getAttribute("target")&&L[K].removeAttribute("target")}n&&
-M.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(M);if(m){var ha=" ",ca="";n&&(ha="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"+(x?"&edit=_blank":"")+(F?"&layers=1":
-"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");this.editor.convertImages(M,mxUtils.bind(this,function(aa){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(aa))+'"'+(""!=ca?' style="'+ca+'"':"")+ha+"/>")}))}else ca="",n&&(g=this.getSelectedPageIndex(),M.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:"")+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),c&&(c=parseInt(M.getAttribute("width")),x=parseInt(M.getAttribute("height")),M.setAttribute("viewBox","-0.5 -0.5 "+c+" "+x),ca+="max-width:100%;max-height:"+x+"px;",M.removeAttribute("height")),""!=ca&&M.setAttribute("style",ca),this.editor.addFontCss(M),this.editor.graph.mathEnabled&&this.editor.addMathCss(M),H(mxUtils.getXml(M))};EditorUi.prototype.timeSince=
-function(c){c=Math.floor((new Date-c)/1E3);var g=Math.floor(c/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(c/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(c/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(c/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(c/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,g){if(null!=c){var m=null;if("diagram"==
-c.nodeName)m=c;else if("mxfile"==c.nodeName){var n=c.getElementsByTagName("diagram");if(0<n.length){m=n[0];var x=g.getGlobalVariable;g.getGlobalVariable=function(F){return"page"==F?m.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==F?1:x.apply(this,arguments)}}}null!=m&&(c=Editor.parseDiagramNode(m))}n=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(c)}catch(F){}finally{this.editor.graph=n}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};
-EditorUi.prototype.getPngFileProperties=function(c){var g=1,m=0;if(null!=c){if(c.hasAttribute("scale")){var n=parseFloat(c.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}c.hasAttribute("border")&&(n=parseInt(c.getAttribute("border")),!isNaN(n)&&0<n&&(m=n))}return{scale:g,border:m}};EditorUi.prototype.getEmbeddedPng=function(c,g,m,n,x){try{var F=this.editor.graph,H=null;if(null!=m&&0<m.length)F=this.createTemporaryGraph(F.getStylesheet()),document.body.appendChild(F.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,
-!0),F),H=m;else if(null!=this.pages&&this.currentPage!=this.pages[0]){F=this.createTemporaryGraph(F.getStylesheet());var M=F.getGlobalVariable;F.setBackgroundImage=this.editor.graph.setBackgroundImage;var L=this.pages[0];this.currentPage==L?F.setBackgroundImage(this.editor.graph.backgroundImage):null!=L.viewState&&null!=L.viewState&&F.setBackgroundImage(L.viewState.backgroundImage);F.getGlobalVariable=function(K){return"page"==K?L.getName():"pagenumber"==K?1:M.apply(this,arguments)};document.body.appendChild(F.container);
-F.model.setRoot(L.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(K){try{null==H&&(H=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var Z=K.toDataURL("image/png");Z=Editor.writeGraphModelToPng(Z,"tEXt","mxfile",encodeURIComponent(H));c(Z.substring(Z.lastIndexOf(",")+1));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container)}catch(ha){null!=g&&g(ha)}}),null,null,null,mxUtils.bind(this,function(K){null!=g&&g(K)}),null,null,n,null,F.shadowVisible,null,F,x,
-null,null,null,"diagram",null)}catch(K){null!=g&&g(K)}};EditorUi.prototype.getEmbeddedSvg=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca){M=null!=M?M:!0;Z=null!=Z?Z:0;H=null!=L?L:g.background;H==mxConstants.NONE&&(H=null);null==H&&"none"==g.getAdaptiveColors()&&(H="#ffffff");L=this.editor.graph.createSvgImageExport(null!=c);F=g.getSvg(H,K,Z,null,null,F,null,L,null,g.shadowVisible||ha,null,ca,"diagram");(g.shadowVisible||ha)&&g.addSvgShadow(F,null,null,0==Z);null!=c&&F.setAttribute("content",c);null!=m&&F.setAttribute("resource",
-m);var aa=mxUtils.bind(this,function(oa){oa=(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(oa);null!=x&&x(oa);return oa});g.mathEnabled&&this.editor.addMathCss(F);if(null!=x)this.embedFonts(F,mxUtils.bind(this,function(oa){M?this.editor.convertImages(oa,mxUtils.bind(this,function(da){aa(da)})):aa(oa)}));else return aa(F)};EditorUi.prototype.embedFonts=function(c,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
-this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(m){try{null!=m&&this.editor.addFontCss(c,m),g(c)}catch(n){g(c)}}))}catch(m){g(c)}}))};EditorUi.prototype.exportImage=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca){L=null!=L?L:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(oa){Editor.addRetryToError(oa,mxUtils.bind(this,function(){this.exportImage(c,g,m,n,x,F,H,M,L,K,Z,ha,ca)}));this.handleError(oa)}))){var aa=
-this.editor.graph.isSelectionEmpty();m=null!=m?m:aa;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(oa){this.spinner.stop();try{this.saveCanvas(oa,x?this.getFileData(!0,null,null,null,m,M,null,null,null,null,null,c,F):null,L,null==this.pages||0==this.pages.length,Z)}catch(da){this.handleError(da)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(oa){this.spinner.stop();this.handleError(oa)}),null,m,c||1,g,n,null,null,F,H,K,
-ha,ca)}catch(oa){this.spinner.stop(),this.handleError(oa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)c[this.pages[g].getId()]=this.pages[g].getId();return c};EditorUi.prototype.importXml=function(c,g,m,n,x,F,H){g=null!=g?g:0;m=null!=m?m:0;var M=[];try{var L=this.editor.graph;if(null!=c&&0<c.length){L.model.beginUpdate();
-try{var K=mxUtils.parseXml(c);c={};var Z=this.editor.extractGraphModel(K.documentElement,null!=this.pages);if(null!=Z&&"mxfile"==Z.nodeName&&null!=this.pages){var ha=Z.getElementsByTagName("diagram");if(1==ha.length&&!F){if(Z=Editor.parseDiagramNode(ha[0]),null!=this.currentPage&&(c[ha[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=ha[0].getAttribute("name");null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ca))}}else if(0<ha.length){F=
-[];var aa=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ha[0].getAttribute("id")]=this.pages[0].getId(),ca=ha[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),Z=Editor.parseDiagramNode(ha[0]),n=!1,aa=1);for(;aa<ha.length;aa++){var oa=ha[aa].getAttribute("id");ha[aa].removeAttribute("id");var da=this.updatePageRoot(new DiagramPage(ha[aa]));c[oa]=ha[aa].getAttribute("id");var ka=this.pages.length;null==da.getName()&&
-da.setName(mxResources.get("pageWithNumber",[ka+1]));L.model.execute(new ChangePage(this,da,da,ka,!0));F.push(da)}this.updatePageLinks(c,F)}}if(null!=Z&&"mxGraphModel"===Z.nodeName){M=L.importGraphModel(Z,g,m,n);if(null!=M)for(this.addLocalPagesToMapping(c),aa=0;aa<M.length;aa++)this.updatePageLinksForCell(c,M[aa]);var ba=L.parseBackgroundImage(Z.getAttribute("backgroundImage"));if(null!=ba&&null!=ba.originalSrc){this.updateBackgroundPageLink(c,ba);var V=new ChangePageSetup(this,null,ba);V.ignoreColor=
-!0;L.model.execute(V)}}H&&L.pasteCellStyles(L.includeDescendants(M),L.defaultVertexStyle,L.defaultEdgeStyle)}finally{L.model.endUpdate()}}}catch(k){if(x)throw k;this.handleError(k)}return M};EditorUi.prototype.updatePageLinks=function(c,g){for(var m=0;m<g.length;m++)this.updatePageLinksForCell(c,g[m].root),null!=g[m].viewState&&this.updateBackgroundPageLink(c,g[m].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var m=
-c[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=m&&(g.originalSrc="data:page/id,"+m)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=function(c,g){var m=document.createElement("div"),n=this.editor.graph,x=n.getLinkForCell(g);null!=x&&n.setLinkForCell(g,this.updatePageLink(c,x));if(n.isHtmlLabel(g)){m.innerHTML=Graph.sanitizeHtml(n.getLabel(g));for(var F=m.getElementsByTagName("a"),H=!1,M=0;M<F.length;M++)x=F[M].getAttribute("href"),null!=x&&(F[M].setAttribute("href",this.updatePageLink(c,
-x)),H=!0);H&&n.labelChanged(g,m.innerHTML)}for(M=0;M<n.model.getChildCount(g);M++)this.updatePageLinksForCell(c,n.model.getChildAt(g,M))};EditorUi.prototype.updatePageLink=function(c,g){if(Graph.isPageLink(g)){var m=c[g.substring(g.indexOf(",")+1)];g=null!=m?"data:page/id,"+m:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var x=0;x<n.actions.length;x++){var F=n.actions[x];if(null!=F.open&&Graph.isPageLink(F.open)){var H=F.open.substring(F.open.indexOf(",")+
-1);m=c[H];null!=m?F.open="data:page/id,"+m:null==this.getPageById(H)&&delete F.open}}g="data:action/json,"+JSON.stringify(n)}}catch(M){}return g};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,g,m,n,x){var F=mxUtils.bind(this,function(H){this.loadingExtensions=!1;null!=m?m(H):this.handleError(H)});this.createTimeout(null,mxUtils.bind(this,function(H){n=null!=n?n:c.name;var M=mxUtils.bind(this,
-function(K){H.clear()&&F(K)}),L=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var K=this.isRemoteVisioFormat(n);try{var Z=n.lastIndexOf(".");if(0<=Z&&Z<n.length)n.substring(Z+1).toUpperCase();else{var ha=n.lastIndexOf("/");0<=ha&&ha<n.length&&(n=n.substring(ha+1))}}catch(aa){}if(K)if(null==VSS_CONVERT_URL||this.isOffline())M({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{K=new FormData;
-K.append("file1",c,n);var ca=new XMLHttpRequest;ca.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=x&&ca.setRequestHeader("x-convert-custom",x);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&H.clear())if(200<=ca.status&&299>=ca.status)try{var aa=ca.response;if("text/xml"==aa.type){var oa=new FileReader;oa.onload=mxUtils.bind(this,function(da){try{g(da.target.result)}catch(ka){M({message:mxResources.get("errorLoadingFile")})}});
-oa.readAsText(aa)}else this.doImportVisio(aa,g,M,n)}catch(da){M(da)}else try{""==ca.responseType||"text"==ca.responseType?M({message:ca.responseText}):(oa=new FileReader,oa.onload=function(){try{M({message:JSON.parse(oa.result).Message})}catch(da){null!=oa.result&&0<oa.result.length?M({message:oa.result}):M(da)}},oa.readAsText(ca.response))}catch(da){M({})}});ca.send(K)}else if(H.clear())try{this.doImportVisio(c,g,M,n)}catch(aa){M(aa)}}else M({message:mxResources.get("serviceUnavailableOrBlocked")})});
-this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?L():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",L,null,null,null,M))}),F)};EditorUi.prototype.importGraphML=function(c,g,m){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=m?m(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var F=mxUtils.bind(this,function(M){x.clear()&&n(M)}),H=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,
-g,n)}catch(M){F(M)}else F({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?H():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",H,null,null,null,F))}),n)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var g=mxUtils.bind(this,function(m){this.loadingExtensions=!1;this.handleError(m)});this.vsdxExportEnabled()?this.createTimeout(null,
-mxUtils.bind(this,function(m){var n=mxUtils.bind(this,function(F){m.clear()&&g(F)}),x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(m.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||n({message:mxResources.get("unknownError")})}catch(F){n(F)}else n({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=
-!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,n))}),g):g({message:mxResources.get("serviceUnavailableOrBlocked")})}};EditorUi.prototype.convertLucidChart=function(c,g,m){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=m?m(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var F=mxUtils.bind(this,function(M){x.clear()&&n(M)}),H=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if("undefined"!==typeof window.LucidImporter)try{var M=
-JSON.parse(c);g(LucidImporter.importState(M));try{if(null!=window.console&&"1"==urlParams.test){var L=[(new Date).toISOString(),"convertLucidChart",M];null!=M.state&&L.push(JSON.parse(M.state));if(null!=M.svgThumbs)for(var K=0;K<M.svgThumbs.length;K++)L.push(Editor.createSvgDataUri(M.svgThumbs[K]));null!=M.thumb&&L.push(M.thumb);console.log.apply(console,L)}}catch(Z){}}catch(Z){null!=window.console&&console.error(Z),F(Z)}else F({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==
-typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(H,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",H,null,null,null,F)},null,null,null,F)},null,null,null,F)},null,null,null,F)},null,null,null,F):mxscript(window.DRAWIO_SERVER_URL+
-"js/extensions.min.js",H,null,null,null,F))}),n)};EditorUi.prototype.createMermaidXml=function(c,g,m,n,x,F){var H=new Graph(document.createElement("div"));m=H.insertVertex(null,null,null,0,0,n,x,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+m+";");H.setAttributeForCell(m,"mermaidData",JSON.stringify({data:c,config:g},null,2));null!=F&&H.setAttributeForCell(m,"templatePrompt",F);c=(new mxCodec).encode(H.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=
-function(c,g,m){var n=0,x=function(){for(var H=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),M=0;M<H.length;M++)null!=H[M].parentNode&&H[M].parentNode.removeChild(H[M])},F=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(H){var M=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),L=mxUtils.bind(this,function(K){H.clear()&&(x(),m(K))});M.send(mxUtils.bind(this,function(K){if(H.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,
-function(){var ha=mxUtils.trim(K.getText());this.generateMermaidImage(ha,null,mxUtils.bind(this,function(ca,aa,oa){this.tryAndHandle(mxUtils.bind(this,function(){H.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[ha]),x(),g(ha,ca,aa,oa))}),L)}),L,mxUtils.bind(this,function(ca){3>n++?H.clear()&&F():L(ca)}))}),L);else{var Z={message:mxResources.get("error")+" "+K.getStatus()};try{Z=JSON.parse(K.getText()),Z=Z.error}catch(ha){}L(Z)}}),L)}),m)});F()};EditorUi.prototype.extractMermaidDeclaration=
-function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var g=c.split("```");g=1<g.length?g:c.split("<pre>");g=1<g.length?g:c.split("~~~");g=1<g.length?g:c.split("%%");g=1<g.length?g:c.split("(Begins)");c=mxUtils.trim(1>=g.length?c:g[1]);g=c.split("\n");var m=1<g.length?g[1]:null;if(null!=m){var n=m.indexOf("-");0<n&&(m=m.substring(0,n))}if(0<g.length&&"mermaid"==mxUtils.trim(g[0])||null!=m&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,m))g.shift(),c=mxUtils.trim(g.join("\n")),
-g=c.split("\n");m=g[0].split(" ")[0].replace(/:$/,"");n=m.indexOf("-");0<n&&(m=m.substring(0,n));try{"mindmap"==m&&2<g.length&&(c=extractMermaidMindmap(g))}catch(x){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,m)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,g,m,n,x){var F=mxUtils.bind(this,function(M){this.loadingMermaid=!1;null!=n?n(M):this.handleError(M)}),H=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);
-g.securityLevel="strict";g.startOnLoad=!1;g.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=c.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(g.theme="dark");var M=mxUtils.bind(this,function(L){try{if(mxClient.IS_IE||mxClient.IS_IE11)L=L.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');L=L.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");
-var K=mxUtils.parseXml(L).getElementsByTagName("svg");if(0<K.length&&"error"!=K[0].getAttribute("aria-roledescription")){var Z=parseFloat(K[0].getAttribute("width")),ha=parseFloat(K[0].getAttribute("height"));if(isNaN(Z)||isNaN(ha))try{var ca=K[0].getAttribute("viewBox").split(/\s+/);Z=parseFloat(ca[2]);ha=parseFloat(ca[3])}catch(aa){Z=Z||100,ha=ha||100}m(this.convertDataUri(Editor.createSvgDataUri(L)),Z,ha)}else null!=x?x():n({message:mxResources.get("invalidInput")})}catch(aa){n(aa)}});mermaid.mermaidAPI.initialize(g);
-mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(L){M(L.svg)}).catch(function(L){null!=x?x(L):n(L)})}catch(L){n(L)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(H,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(M){this.importXml(M,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",H,null,null,null,F)):mxscript(window.DRAWIO_SERVER_URL+
-"js/extensions.min.js",H,null,null,null,F))};EditorUi.prototype.generatePlantUmlImage=function(c,g,m,n){function x(M,L,K){c1=M>>2;c2=(M&3)<<4|L>>4;c3=(L&15)<<2|K>>6;c4=K&63;r="";r+=F(c1&63);r+=F(c2&63);r+=F(c3&63);return r+=F(c4&63)}function F(M){if(10>M)return String.fromCharCode(48+M);M-=10;if(26>M)return String.fromCharCode(65+M);M-=26;if(26>M)return String.fromCharCode(97+M);M-=26;return 0==M?"-":1==M?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+
-"/png/":PLANT_URL+"/svg/")+function(M){r="";for(i=0;i<M.length;i+=3)r=i+2==M.length?r+x(M.charCodeAt(i),M.charCodeAt(i+1),0):i+1==M.length?r+x(M.charCodeAt(i),0,0):r+x(M.charCodeAt(i),M.charCodeAt(i+1),M.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=g&&(H.responseType="blob");H.onload=function(M){if(200<=this.status&&300>this.status)if("txt"==g)m(this.response);else{var L=new FileReader;L.readAsDataURL(this.response);L.onloadend=function(K){var Z=new Image;Z.onload=
-function(){try{var ha=Z.width,ca=Z.height;if(0==ha&&0==ca){var aa=L.result,oa=aa.indexOf(","),da=decodeURIComponent(escape(atob(aa.substring(oa+1)))),ka=mxUtils.parseXml(da).getElementsByTagName("svg");0<ka.length&&(ha=parseFloat(ka[0].getAttribute("width")),ca=parseFloat(ka[0].getAttribute("height")))}m(L.result,ha,ca)}catch(ba){n(ba)}};Z.src=L.result};L.onerror=function(K){n(K)}}else n(M)};H.onerror=function(M){n(M)};H.send()};EditorUi.prototype.insertAsPreText=function(c,g,m){var n=this.editor.graph,
-x=null;n.getModel().beginUpdate();try{x=n.insertVertex(null,null,"<pre>"+c+"</pre>",g,m,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(x,!0)}finally{n.getModel().endUpdate()}return x};EditorUi.prototype.insertTextAt=function(c,g,m,n,x,F,H,M){F=null!=F?F:!0;H=null!=H?H:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g,
-" "),mxUtils.bind(this,function(ca){4==ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,g,m,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var L=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var K=Editor.extractGraphModelFromPdf(c);if(null!=K&&0<K.length)return this.importXml(K,g,m,F,!0,M)}if(Editor.isPngDataUrl(c)&&(K=Editor.extractGraphModelFromPng(c),
-null!=K&&0<K.length))return this.importXml(K,g,m,F,!0,M);if("data:image/svg+xml;"==c.substring(0,19))try{K=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(K=c.substring(c.indexOf(",")+1),K=window.atob&&!mxClient.IS_SF?atob(K):Base64.decode(K,!0)):K=decodeURIComponent(c.substring(c.indexOf(",")+1));var Z=this.importXml(K,g,m,F,!0,M);if(0<Z.length)return Z}catch(ca){}this.loadImage(c,mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,c,mxUtils.bind(this,function(da,
-ka,ba){L.setSelectionCell(L.insertVertex(null,null,"",L.snap(g),L.snap(m),ka,ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(da)+";"))}),H,this.maxImageSize);else{var aa=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),oa=Math.round(ca.width*aa);ca=Math.round(ca.height*aa);L.setSelectionCell(L.insertVertex(null,null,"",L.snap(g),L.snap(m),oa,ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-c+";"))}}),mxUtils.bind(this,function(){var ca=null;L.getModel().beginUpdate();try{ca=L.insertVertex(L.getDefaultParent(),null,c,L.snap(g),L.snap(m),1,1,"text;"+(n?"html=1;":"")),L.updateCellSize(ca),L.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{L.getModel().endUpdate()}L.setSelectionCell(ca)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,g,m,F,null,M);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
-function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,g,m,F,null,M))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{L=this.editor.graph;x=null;L.getModel().beginUpdate();try{x=L.insertVertex(L.getDefaultParent(),null,"",L.snap(g),L.snap(m),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));L.fireEvent(new mxEventObject("textInserted","cells",[x]));n&&(c=L.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");x.value=c;L.updateCellSize(x);if(0<
-this.maxTextWidth&&x.geometry.width>this.maxTextWidth){var ha=L.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=ha.width;x.geometry.height=ha.height}Graph.isLink(x.value)&&L.setLinkForCell(x,x.value);x.geometry.width+=L.gridSize;x.geometry.height+=L.gridSize}finally{L.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=function(c){var g=-1;do c/=1024,g++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};EditorUi.prototype.convertDataUri=
-function(c){if("data:"==c.substring(0,5)){var g=c.indexOf(";");0<g&&(c=c.substring(0,g)+c.substring(c.indexOf(",",g+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,g){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,g){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var m=
-document.createElement("input");m.setAttribute("type","file");mxEvent.addListener(m,"change",mxUtils.bind(this,function(){null!=m.files&&(this.importFiles(m.files,null,null,this.maxImageSize),m.type="",m.type="file",m.value="")}));m.style.display="none";document.body.appendChild(m);this.importFileInputElt=m}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(H,M){StorageFile.listFiles(this,"F",H,M)});window.openBrowserFile=
-mxUtils.bind(this,function(H,M,L){StorageFile.getFileContent(this,H,M,L)});window.deleteBrowserFile=mxUtils.bind(this,function(H,M,L){StorageFile.deleteFile(this,H,M,L)});if(!g){var n=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(H){this.hideDialog(H)}));window.openFile.setConsumer(mxUtils.bind(this,function(H,M){null!=M&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(M)?(H=new Blob([H],{type:"application/octet-stream"}),this.importVisio(H,
-mxUtils.bind(this,function(L){this.importXml(L,0,0,!0)}),null,M)):this.editor.graph.setSelectionCells(this.importXml(H,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 x=this.dialog,F=x.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=n;F.apply(x,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
-function(c,g,m){var n=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(F){if(mxUtils.isEmptyObject(F.files))m();else{var H=0,M,L=!1;F.forEach(function(K,Z){K=Z.name.toLowerCase();"diagram/diagram.xml"==K?(L=!0,Z.async("string").then(function(ha){0==ha.indexOf("<mxfile ")?g(ha):m()})):0==K.indexOf("versions/")&&(K=parseInt(K.substr(9)),K>H&&(H=K,M=Z))});0<H?M.async("string").then(function(K){(new XMLHttpRequest).upload&&n.isRemoteFileFormat(K,
-c.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,m):n.parseFileData(K,mxUtils.bind(this,function(Z){4==Z.readyState&&(200<=Z.status&&299>=Z.status?g(Z.responseText):m())}),c.name):m()}):L||m()}},function(F){m(F)}):m()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,m))};EditorUi.prototype.importFile=function(c,g,m,n,x,F,H,
-M,L,K,Z,ha){K=null!=K?K:!0;var ca=!1,aa=null,oa=mxUtils.bind(this,function(da){var ka=null;null!=da&&"<mxlibrary"==da.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,da,H)),this.showSidebar()):ka=this.importXml(da,m,n,K,null,null!=ha?mxEvent.isControlDown(ha):null);null!=M&&M(ka)});"image"==g.substring(0,5)?(L=!1,"image/png"==g.substring(0,9)&&(Z=Z?null:this.extractGraphModelFromPng(c),null!=Z&&0<Z.length&&(aa=this.importXml(Z,m,n,K,null,null!=ha?mxEvent.isControlDown(ha):null),L=!0)),L||
-(L=this.editor.graph,Z=c.indexOf(";"),0<Z&&(c=c.substring(0,Z)+c.substring(c.indexOf(",",Z+1))),K&&L.isGridEnabled()&&(m=L.snap(m),n=L.snap(n)),Z="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(Z+="editableCssRules=.*;"),aa=[L.insertVertex(null,null,"",m,n,x,F,Z+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ca=!0,this.importGraphML(c,oa)):null!=L&&null!=H&&EditorUi.isVisioFilename(H)?(ca=!0,this.importVisio(L,
-oa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,H)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,g=mxUtils.bind(this,function(da){4==da.readyState&&(200<=da.status&&299>=da.status?oa(da.responseText):null!=M&&(M(null),this.showError(mxResources.get("error"),413==da.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,g,H):this.parseFile(L,g,H)):0==c.indexOf("PK")&&null!=L?(ca=!0,this.importZipFile(L,
-oa,mxUtils.bind(this,function(){aa=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K);M(aa)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(aa=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K,null,null!=ha?mxEvent.isControlDown(ha):null));ca||null==M||M(aa);return aa};EditorUi.prototype.importFiles=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca){n=null!=n?n:this.maxImageSize;K=null!=K?K:this.maxImageBytes;var aa=null!=g&&null!=m,oa=!0;g=null!=g?g:0;m=null!=m?m:0;var da=!1;if(!mxClient.IS_CHROMEAPP&&
-null!=c)for(var ka=Z||this.resampleThreshold,ba=0;ba<c.length;ba++)if("image/svg"!==c[ba].type.substring(0,9)&&"image/"===c[ba].type.substring(0,6)&&c[ba].size>ka){da=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[g],"y",[m],"maxSize",[n],"maxBytes",[K],"resampleThreshold",[this.resampleThreshold],"largeImages",[da],"crop",[aa],"resizeImages",[oa],"ignoreEmbeddedXml",[ha],"evt",[ca]);var V=mxUtils.bind(this,function(){var k=this.editor.graph,v=k.gridSize;x=null!=x?x:mxUtils.bind(this,
-function(Y,fa,na,la,qa,ya,wa,Ia,Aa){try{if(null!=Y&&"<mxlibrary"==Y.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,Y,wa)),this.showSidebar(),null;this.isCompatibleString(Y)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(aa=!1,la=na=0);return this.importFile(Y,fa,na,la,qa,ya,wa,Ia,Aa,aa,ha,ca)}catch(Ba){return this.handleError(Ba),null}});F=null!=F?F:mxUtils.bind(this,function(Y){k.setSelectionCells(Y)});if(this.spinner.spin(document.body,
-mxResources.get("loading")))for(var I=c.length,N=I,T=[],W=mxUtils.bind(this,function(Y,fa){T[Y]=fa;if(0==--N){this.spinner.stop();if(null!=M)M(T);else{var na=[];k.getModel().beginUpdate();try{for(Y=0;Y<T.length;Y++){var la=T[Y]();null!=la&&(na=na.concat(la))}}finally{k.getModel().endUpdate()}}F(na)}}),U=0;U<I;U++)mxUtils.bind(this,function(Y){var fa=c[Y];if(null!=fa){var na=new FileReader;na.onload=mxUtils.bind(this,function(la){if(null==H||H(fa))try{if("image/"==fa.type.substring(0,6))if("image/svg"==
-fa.type.substring(0,9)){var qa=Graph.clipSvgDataUri(la.target.result),ya=qa.indexOf(","),wa=decodeURIComponent(escape(atob(qa.substring(ya+1)))),Ia=mxUtils.parseXml(wa),Aa=Ia.getElementsByTagName("svg");if(0<Aa.length){var Ba=Aa[0],Ga=ha?null:Ba.getAttribute("content");null!=Ga&&"<"!=Ga.charAt(0)&&"%"!=Ga.charAt(0)&&(Ga=unescape(window.atob?atob(Ga):Base64.decode(Ga,!0)));null!=Ga&&"%"==Ga.charAt(0)&&(Ga=decodeURIComponent(Ga));null==Ga||"<mxfile "!==Ga.substring(0,8)&&"<mxGraphModel>"!==Ga.substring(0,
-14)&&"<mxGraphModel "!==Ga.substring(0,14)?W(Y,mxUtils.bind(this,function(){try{if(null!=Ia){var Ca=Ia.getElementsByTagName("svg");if(0<Ca.length){var Da=Ca[0],va=Da.getAttribute("width"),Na=Da.getAttribute("height");va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Sa=Da.getAttribute("viewBox");if(null==Sa||0==Sa.length)Da.setAttribute("viewBox","0 0 "+va+" "+Na);else if(isNaN(va)||isNaN(Na)){var Ua=Sa.split(" ");3<Ua.length&&
-(va=parseFloat(Ua[2]),Na=parseFloat(Ua[3]))}qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var Qa=Math.min(1,Math.min(n/Math.max(1,va)),n/Math.max(1,Na)),za=x(qa,fa.type,g+Y*v,m+Y*v,Math.max(1,Math.round(va*Qa)),Math.max(1,Math.round(Na*Qa)),fa.name);if(null!=za&&(isNaN(va)||isNaN(Na))){var Ea=new Image;Ea.onload=mxUtils.bind(this,function(){va=Math.max(1,Ea.width);Na=Math.max(1,Ea.height);za[0].geometry.width=va;za[0].geometry.height=Na;Da.setAttribute("viewBox","0 0 "+va+" "+Na);qa=Editor.createSvgDataUri(mxUtils.getXml(Da));
-var B=qa.indexOf(";");0<B&&(qa=qa.substring(0,B)+qa.substring(qa.indexOf(",",B+1)));k.setCellStyles("image",qa,[za[0]])});Ea.src=Editor.createSvgDataUri(mxUtils.getXml(Da))}return za}}}catch(B){}return null})):W(Y,mxUtils.bind(this,function(){return x(Ga,"text/xml",g+Y*v,m+Y*v,0,0,fa.name)}))}else W(Y,mxUtils.bind(this,function(){return null}))}else{ya=!1;if("image/png"==fa.type){var Ma=ha?null:this.extractGraphModelFromPng(la.target.result);if(null!=Ma&&0<Ma.length){var sa=new Image;sa.src=la.target.result;
-W(Y,mxUtils.bind(this,function(){return x(Ma,"text/xml",g+Y*v,m+Y*v,sa.width,sa.height,fa.name)}));ya=!0}}ya||(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(la.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,la.target.result,mxUtils.bind(this,
-function(Da,va,Na){W(Y,mxUtils.bind(this,function(){if(null!=Da&&Da.length<K){var Sa=oa&&this.isResampleImageSize(fa.size,Z)?Math.min(1,Math.min(n/va,n/Na)):1;return x(Da,fa.type,g+Y*v,m+Y*v,Math.round(va*Sa),Math.round(Na*Sa),fa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),oa,n,Z,fa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else qa=la.target.result,x(qa,fa.type,g+Y*v,m+Y*v,240,160,fa.name,function(Ca){W(Y,
-function(){return Ca})},fa)}catch(Ca){W(Y,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ca,fa)}else W(Y,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(fa.name)?x(null,fa.type,g+Y*v,m+Y*v,240,160,fa.name,function(la){W(Y,function(){return la})},fa):"image"==fa.type.substring(0,5)||"application/pdf"==fa.type?na.readAsDataURL(fa):na.readAsText(fa)}})(U)});if(da){da=[];for(ba=0;ba<c.length;ba++)da.push(c[ba]);c=da;this.confirmImageResize(function(k){oa=
-k;V()},L)}else V()};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(c,g){g=null!=g?g:!1;var m=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,x=function(F,H){if(F||g)mxSettings.setResizeImages(F?H:null),mxSettings.save();
-m();c(H)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(F){x(F,!0)},function(F){x(F,!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?226:200,!0,!0):x(!1,n)};EditorUi.prototype.parseFile=function(c,g,m){m=null!=m?m:c.name;var n=
-new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,g,m)});n.readAsText(c)};EditorUi.prototype.parseFileData=function(c,g,m){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(m)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=
-function(c,g){g=null!=g?g:this.resampleThreshold;return c>g};EditorUi.prototype.resizeImage=function(c,g,m,n,x,F,H){x=null!=x?x:this.maxImageSize;var M=Math.max(1,c.width),L=Math.max(1,c.height),K=g;if(n&&this.isResampleImageSize(null!=H?H:g.length,F))try{var Z=Math.max(M/x,L/x);if(1<Z){var ha=Math.round(M/Z),ca=Math.round(L/Z),aa=document.createElement("canvas");aa.width=ha;aa.height=ca;aa.getContext("2d").drawImage(c,0,0,ha,ca);var oa=aa.toDataURL();if(oa.length<g.length){var da=document.createElement("canvas");
-da.width=ha;da.height=ca;var ka=da.toDataURL();oa!==ka&&(g=oa,M=ha,L=ca)}}}catch(ba){}n&&K!=g&&x>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(c,g,m,n,x/1.5,F,H):m(g,M,L)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,g,m){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!=m&&(n.onerror=m);n.src=c}catch(x){if(null!=m)m(x);
-else throw x;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var y=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());y.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&
-null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,g=this.editor.graph,m=g.isEnabled;g.isEnabled=function(){return m.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(v){var I=v.getEvent();return null==v.getState()&&!mxEvent.isMouseEvent(I)&&
-!g.freehand.isDrawing()||mxEvent.isPopupTrigger(I)&&(null==v.getState()||mxEvent.isControlDown(I)||mxEvent.isShiftDown(I))});g.cellEditor.editPlantUmlData=function(v,I,N){var T=JSON.parse(N);I=new SimpleTextareaDialog(c,T.data,function(W){null!=W&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(W,T.format,function(U,Y,fa){c.spinner.stop();g.getModel().beginUpdate();try{if("txt"==T.format)g.labelChanged(v,"<pre>"+U+"</pre>"),g.updateCellSize(v,!0);else{g.setCellStyles("image",
-c.convertDataUri(U),[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=Y,na.height=fa,g.cellsResized([v],[na],!1))}g.setAttributeForCell(v,"plantUmlData",JSON.stringify({data:W,format:T.format}))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(I.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));I.init()};g.cellEditor.editMermaidData=function(v,I,N){var T=JSON.parse(N);I=new SimpleTextareaDialog(c,T.data,function(W){null!=W&&c.spinner.spin(document.body,
-mxResources.get("inserting"))&&c.generateMermaidImage(W,T.config,function(U,Y,fa){c.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=Math.max(na.width,Y),na.height=Math.max(na.height,fa),g.cellsResized([v],[na],!1));g.setAttributeForCell(v,"mermaidData",JSON.stringify({data:W,config:T.config},null,2))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(I.container,640,420,!0,!0,
-null,null,null,new mxRectangle(0,0,320,280));I.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=function(v,I){try{var N=this.graph.getAttributeForCell(v,"plantUmlData");if(null!=N)this.editPlantUmlData(v,I,N);else if(N=this.graph.getAttributeForCell(v,"mermaidData"),null!=N&&window.isMermaidEnabled)this.editMermaidData(v,I,N);else{var T=g.getCellStyle(v);"1"==mxUtils.getValue(T,"metaEdit","0")?c.showDataDialog(v):n.apply(this,arguments)}}catch(W){c.handleError(W)}};g.getLinkTitle=
-function(v){return c.getLinkTitle(v)};g.customLinkClicked=function(v,I){var N=!1;try{var T=this.getGraphBounds();c.handleCustomLink(v,I);N=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(I))}catch(W){c.handleError(W)}return N};var x=g.parseBackgroundImage;g.parseBackgroundImage=function(v){var I=x.apply(this,arguments);null!=I&&null!=I.src&&Graph.isPageLink(I.src)&&(I={originalSrc:I.src});return I};var F=g.setBackgroundImage;g.setBackgroundImage=
-function(v){null!=v&&null!=v.originalSrc&&(v=c.createImageForPageLink(v.originalSrc,c.currentPage,this));F.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(v,I){v=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=v){var N=v.indexOf(",");if(0<N)for(v=v.substring(N+
-1),I=I.getProperty("patches"),N=0;N<I.length;N++)if(null!=I[N][EditorUi.DIFF_UPDATE]&&null!=I[N][EditorUi.DIFF_UPDATE][v]||null!=I[N][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(I[N][EditorUi.DIFF_REMOVE],v)){g.refreshBackgroundImage();break}}}));var H=g.getBackgroundImageObject;g.getBackgroundImageObject=function(v,I,N){var T=H.apply(this,arguments);null!=T&&null!=T.originalSrc&&(T=I?c.createImageForPageLink(T.originalSrc,N,null,!0):{src:T.originalSrc});return T};this.isOffline()||"undefined"===typeof window.EditDataDialog||
-(EditDataDialog.placeholderHelpLink="https://www.drawio.com/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 M=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(v){v=null!=v?v:"";"1"==urlParams.dev&&(v+=(0<v.length?"&":"?")+"dev=1");return M.apply(this,arguments)};var L=g.addClickHandler;g.addClickHandler=function(v,I,N){var T=I;I=
-function(W,U,Y){if(null==U){var fa=mxEvent.getSource(W);"a"==fa.nodeName.toLowerCase()&&(U=fa.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(W)||!mxEvent.isPopupTrigger(W))&&g.customLinkClicked(U,Y)&&mxEvent.consume(W);null!=T&&T(W,U,Y)};L.call(this,v,I,N)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var K=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(v,I,N){g.isSelectionEmpty()&&
-"simple"==Editor.currentTheme&&this.addMenuItems(v,["zoomIn","zoomOut","-"],null,N);K.apply(this,arguments);g.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(v,["-","addToScratchpad"],null,N);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(v,["-","exitGroup","home"],null,N)};var Z=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(v,I,N){if(c.editor.graph.isSelectionEmpty())Z.apply(this,arguments),c.menus.addMenuItems(v,["copyAsImage",
-"copyAsSvg"],null,N);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(v,I,N):this.addPopupMenuArrangeItems(v,I,N),this.addMenuItems(v,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,N),this.isShowCellEditItems()||this.addPopupDeleteItem(v,I,N),this.addMenuItems(v,["lockUnlock","-"],null,N),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(I)&&g.isCellEditable(I)&&(this.addSubmenu("editCell",v,null,mxResources.get("edit")),v.addSeparator(),g.getModel().isEdge(I))){this.addSubmenu("line",
-v);var T=g.getModel().getGeometry(I);null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(v,["clearWaypoints"],null,N)}1==g.getSelectionCount()&&this.addMenuItems(v,["enterGroup"],null,N);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(v,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(v,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=
-function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var ha=g.getExportVariables;g.getExportVariables=function(){var v=ha.apply(this,arguments),I=c.getCurrentFile();null!=I&&(v.filename=I.getTitle());v.pagecount=null!=c.pages?
-c.pages.length:1;v.page=null!=c.currentPage?c.currentPage.getName():"";v.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return v};var ca=g.getGlobalVariable;g.getGlobalVariable=function(v){var I=c.getCurrentFile();return"filename"==v&&null!=I?I.getTitle():"page"==v&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==v?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==v?null!=c.pages?c.pages.length:1:ca.apply(this,
-arguments)};var aa=null,oa=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var v=this.getCurrentFile(),I=null!=v&&null!=v.getTitle()?v.getTitle():this.defaultFilename;aa!=I&&v==oa&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());aa=I;oa=v}));var da=g.labelLinkClicked;g.labelLinkClicked=function(v,I,N){var T=I.getAttribute("href");if(null==T||!g.isCustomLink(T)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))da.apply(this,arguments);else{if(!g.isEnabled()||
-null!=v&&g.isCellLocked(v.cell))g.customLinkClicked(T),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var v=c.defaultFilename,I=c.getCurrentFile();null!=I&&(v=null!=I.getTitle()?I.getTitle():v);return v};var ka=this.actions.get("print");ka.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ka.visible=ka.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",
+"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.editor.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var l=c(mxUtils.bind(this,function(n){var x=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",x);null!=this.exportDialog&&
+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)x.apply(this);else{this.exportDialog=document.createElement("div");var F=l.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,80);this.exportDialog.style.left=F.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";F=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=F.zIndex;var G=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});G.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",x);this.editor.exportToCanvas(mxUtils.bind(this,function(L){G.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var M=this.createImageDataUri(L,null,"png");L=document.createElement("img");L.style.maxWidth="140px";L.style.maxHeight="140px";
+L.style.cursor="pointer";L.style.backgroundColor="white";L.setAttribute("title",mxResources.get("openInNewWindow"));L.setAttribute("border","0");L.setAttribute("src",M);this.exportDialog.appendChild(L);mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.openInNewWindow(M.substring(M.indexOf(",")+1),"image/png",!0);x.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(L){G.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+this.exportDialog=null);this.handleError(L)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,g,l,n,x,F){this.isLocalFileSave()?this.saveLocalFile(l,c,n,x,g,F):this.saveRequest(c,g,mxUtils.bind(this,function(G,L){return this.createEchoRequest(l,G,n,x,g,L)}),l,x,n)};EditorUi.prototype.saveRequest=function(c,g,l,n,x,F,G){G=null!=G?G:!mxClient.IS_IOS||!navigator.standalone;var L=mxUtils.bind(this,
+function(K,Z,ja,da){if("_blank"==Z||null!=K&&0<K.length){var ba=l("_blank"==Z?null:K,Z==App.MODE_DEVICE||"download"==Z||null==Z||"_blank"==Z?"0":"1");null!=ba&&(Z==App.MODE_DEVICE||"download"==Z||"_blank"==Z?ba.simulate(document,"_blank"):(ja=mxUtils.bind(this,function(na){F=null!=F?F:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,K,F,!0,Z,na)}catch(ca){this.handleError(ca)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ba.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=ba.getStatus()&&299>=ba.getStatus())try{this.exportFile(ba.getText(),K,F,!0,Z,na)}catch(ca){this.handleError(ca)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ca){this.spinner.stop();this.handleError(ca)}))}),null!=da?ja(da):this.pickFolder(Z,ja)))}});x=[App.MODE_BROWSER];G||x.push("_blank");var M=new SaveDialog(this,c,mxUtils.bind(this,function(K,Z,ja){L(K.value,Z,K,ja);this.hideDialog(null,null,M.container)}),x,null,"application/pdf");this.showDialog(M.container,
+420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));M.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,g,l,n,x,F){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,g,l){g(null)};EditorUi.prototype.exportSvg=function(c,g,l,n,x,F,
+G,L,M,K,Z,ja,da,ba){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(la){Editor.addRetryToError(la,mxUtils.bind(this,function(){this.exportSvg(c,g,l,n,x,F,G,L,M,K,Z,ja,da,ba)}));this.handleError(la)})))try{var na=this.editor.graph.isSelectionEmpty();l=null!=l?l:na;var ca=g?null:this.editor.graph.background;ca==mxConstants.NONE&&(ca=null);null==ca&&0==g&&(ca=this.editor.graph.shapeBackgroundColor);var ka=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&
+(this.editor.graph.addForeignObjectWarning=function(){});var aa=mxUtils.lightDarkColorSupported,V=mxUtils.preferDarkColor;if("light"==Z||"dark"==Z)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==Z;var k=Graph.addFont,v={};Graph.addFont=function(la,qa,ya,wa){k.call(this,la,qa,ya,v)};var J=this.editor.graph.createSvgImageExport(x),N=J.drawCellState;J.drawCellState=function(la,qa){null!=la&&Graph.processFontStyle(la.style);N.apply(this,arguments)};var T=this.editor.graph.getSvg(ca,
+c,G,L,null,l,null,J,"blank"==K?"_blank":"self"==K?"_top":null,null,!da,Z,ja);mxUtils.lightDarkColorSupported=aa;mxUtils.preferDarkColor=V;this.editor.graph.addForeignObjectWarning=ka;n&&this.editor.graph.addSvgShadow(T);var W=this.getBaseFilename()+(x?".drawio":"")+".svg";ba=null!=ba?ba:mxUtils.bind(this,function(la){this.isLocalFileSave()||la.length<=MAX_REQUEST_SIZE?this.saveData(W,"svg",la,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
+function(){mxUtils.popup(la)}))});var U=mxUtils.bind(this,function(la){this.spinner.stop();x&&la.setAttribute("content",this.getFileData(!0,null,null,null,l,M,null,null,null,null,null,c,G));ba(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(la))});this.editor.graph.mathEnabled&&this.editor.addMathCss(T);var Y=mxUtils.bind(this,function(la){Editor.replaceSvgDataUris&&F&&EditorUi.embedSvgImages(la);Editor.foreignObjectImages&&da?this.replaceAlternateContent(la,
+Z,U):U(la)}),fa=Graph.customFontElements;Graph.customFontElements=v;var oa=mxUtils.bind(this,function(la){Graph.customFontElements=fa;Graph.addFont=k;F&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(la,Y,this.thumbImageCache)):Y(la)});da?this.embedFonts(T,oa):(this.editor.addFontCss(T),oa(T))}catch(la){this.handleError(la)}};EditorUi.prototype.replaceAlternateContent=function(c,g,l){function n(ja,da,ba,na,ca){var ka=mxUtils.createElementNs(c.ownerDocument,
+mxConstants.NS_SVG,"image");ka.setAttribute("x",da);ka.setAttribute("y",ba+.5);ka.setAttribute("width",na.width);ka.setAttribute("height",na.height);null==ka.setAttributeNS?ka.setAttribute("xlink:href",ca):ka.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",ca);ja.replaceChild(ka,ja.lastChild);L()}function x(){if(G<Z.length)Z[G++](x)}var F="";g=c.getElementsByTagName("style");for(var G=0;G<g.length;G++)F+=g[G].innerHTML;g=c.getElementsByTagName("switch");counter=g.length;var L=mxUtils.bind(this,function(){counter--;
+0==counter&&l(c)}),M={},K={},Z=[];for(G=0;G<g.length;G++)mxUtils.bind(this,function(ja){var da=ja.getElementsByTagName("div");if(0<da.length)try{var ba=da[0].cloneNode(!0),na=parseInt(ba.style.marginLeft),ca=parseInt(ba.style.paddingTop),ka=ba.getElementsByTagName("div")[1],aa=da=!1,V=ba.style.alignItems,k=ba.style.justifyContent;if(null!=ba.style.writingMode){var v=ba.style.writingMode;aa="vertical-"==v.substring(0,9);da="-rl"==v.substring(v.length-3)}var J=!aa&&"1px"==ba.style.width||aa&&"1px"==
+ba.style.height;if(!aa&&"1px"==ba.style.height||aa&&"1px"==ba.style.width)ba.style.alignItems=aa&&da?"unsafe flex-end":"unsafe flex-start";J&&(ba.style.justifyContent="unsafe flex-start");ba.style.paddingTop="";ba.style.marginLeft="";var N=ba.outerHTML,T=M[N];null==T&&(ba.style.position="absolute",ba.style.visibility="hidden",document.body.appendChild(ba),v=1,v="1px"==ba.style.width?ka.offsetWidth:parseInt(ba.style.width),J=1,J="1px"==ba.style.height?ka.offsetHeight:parseInt(ba.style.height),document.body.removeChild(ba),
+T=new mxRectangle(na,ca,v,J),M[N]=T);"1px"==ba.style.height&&("unsafe center"==V?ca-=T.height/2:"unsafe flex-end"==V&&(ca-=T.height));if("1px"==ba.style.width)if(!aa&&"unsafe center"==k||aa&&"unsafe center"==V)na-=T.width/2;else if(!aa&&"unsafe flex-end"==k||aa&&(!da&&"unsafe flex-end"==V||da&&"unsafe flex-start"==V))na-=T.width;T=new mxRectangle(na,ca,T.width,T.height+parseInt(ka.style.fontSize)/4);Z.push(mxUtils.bind(this,function(W){var U=K[N];null==U?Graph.htmlToPng(N,T.width,T.height,mxUtils.bind(this,
+function(Y){n(ja,na,ca,T,Y);K[N]=Y;W()}),F):(n(ja,na,ca,T,U),W())}))}catch(W){L()}else L()})(g[G]);0==counter&&l(c);G=0;x()};EditorUi.prototype.addRadiobox=function(c,g,l,n,x,F,G){return this.addCheckbox(c,l,n,x,F,G,!0,g)};EditorUi.prototype.addCheckbox=function(c,g,l,n,x,F,G,L){F=null!=F?F:!0;var M=document.createElement("input");M.style.marginRight="8px";M.style.marginTop="16px";M.setAttribute("type",G?"radio":"checkbox");G="geCheckbox-"+Editor.guid();M.id=G;null!=L&&M.setAttribute("name",L);l&&
+(M.setAttribute("checked","checked"),M.defaultChecked=!0);n&&M.setAttribute("disabled","disabled");F&&(c.appendChild(M),l=document.createElement("label"),mxUtils.write(l,g),l.setAttribute("for",G),c.appendChild(l),x||mxUtils.br(c));return M};EditorUi.prototype.addEditButton=function(c,g){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var n=this.getCurrentFile(),x="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(x=window.location.href);
+var F=document.createElement("select");F.style.maxWidth="200px";F.style.width="auto";F.style.marginLeft="8px";F.style.marginRight="10px";F.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));F.appendChild(n);var G=document.createElement("option");G.setAttribute("value","custom");mxUtils.write(G,mxResources.get("custom")+"...");F.appendChild(G);c.appendChild(F);mxEvent.addListener(F,"change",mxUtils.bind(this,function(){if("custom"==
+F.value){var L=new FilenameDialog(this,x,mxResources.get("ok"),function(M){null!=M?(x=M,G.setAttribute("title",M)):(F.value="blank",G.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){F.value="blank"});this.showDialog(L.container,300,80,!0,!1);L.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==g||g.checked)?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?
+"blank"===F.value?"_blank":x:null},getEditInput:function(){return l},getEditSelect:function(){return F}}};EditorUi.prototype.addLinkSection=function(c,g){function l(){var L=document.createElement("div");L.style.width="100%";L.style.height="100%";L.style.boxSizing="border-box";null!=F&&F!=mxConstants.NONE?(L.style.border="1px solid black",L.style.backgroundColor=F):(L.style.backgroundPosition="center center",L.style.backgroundRepeat="no-repeat",L.style.backgroundImage="url('"+Dialog.prototype.closeImage+
+"')");G.innerText="";G.appendChild(L)}mxUtils.write(c,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 x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));n.appendChild(x);x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("openInNewWindow"));n.appendChild(x);
+x=document.createElement("option");x.setAttribute("value","self");mxUtils.write(x,mxResources.get("openInThisWindow"));n.appendChild(x);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));c.appendChild(n);mxUtils.write(c,mxResources.get("borderColor")+":");var F="#0000ff",G=null;G=mxUtils.button("",mxUtils.bind(this,function(L){this.pickColor(F||"none",function(M){F=M;l()});
+mxEvent.consume(L)}));l();G.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";G.style.marginLeft="4px";G.style.height="22px";G.style.width="22px";G.style.position="relative";G.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";G.className="geColorBtn";c.appendChild(G);mxUtils.br(c);return{getColor:function(){return F},getTarget:function(){return n.value},focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(c,g,l,n,x,F){F=null!=F?F:[];l&&(F.push("lightbox=1"),
+"auto"!=c&&F.push("target="+c),null!=g&&g!=mxConstants.NONE&&F.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=n&&0<n.length&&F.push("edit="+encodeURIComponent(n)),x&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));return F};EditorUi.prototype.createLink=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da){var ba=this.getCurrentFile();M=this.createUrlParameters(c,g,n,x,F,M);c=!0;null!=G?l="#U"+encodeURIComponent(G):L||null==ba||""==ba.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,
+null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+ba.getHash(),c=!1);c&&null!=ba&&null!=ba.getTitle()&&ba.getTitle()!=this.defaultFilename&&M.push("title="+encodeURIComponent(ba.getTitle()));K&&1<l.length&&(M.push("open="+l.substring(1)),l="");Z&&null!=this.currentPage&&M.push("page-id="+this.currentPage.getId());ja&&M.push("transparent=1");null!=da&&M.push("dark="+da);return(n&&(null!=G||null!=ba&&ba.getMode()!=App.MODE_GITHUB&&ba.getMode()!=
+App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<M.length?"?"+M.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da){this.getBasenames();var ba={};""!=x&&x!=mxConstants.NONE&&(ba.highlight=x);"auto"!==n&&(ba.target=n);K||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(ba.zoom=l/100);
+l=[];G&&(l.push("pages"),ba.resize=!0,null!=this.pages&&null!=this.currentPage&&(ba.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(l.push("zoom"),ba.resize=!0);L&&l.push("layers");M&&l.push("tags");null!=da&&(ba["dark-mode"]=da);0<l.length&&(K&&l.push("lightbox"),ba.toolbar=l.join(" "));null!=Z&&0<Z.length&&(ba.edit=Z);null!=c?ba.url=c:ba.xml=this.getFileData(!0,null,null,null,null,!G);g='<div class="mxgraph" style="'+(F?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(ba))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ja(g,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"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(c,g,l,n){var x=document.createElement("div");
+x.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("html"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(F);var G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";L.setAttribute("value","url");L.setAttribute("type","radio");L.setAttribute("name",
+"type-embedhtmldialog");F=L.cloneNode(!0);F.setAttribute("value","copy");G.appendChild(F);var M=document.createElement("span");mxUtils.write(M,mxResources.get("includeCopyOfMyDiagram"));G.appendChild(M);mxUtils.br(G);G.appendChild(L);M=document.createElement("span");mxUtils.write(M,mxResources.get("publicDiagramUrl"));G.appendChild(M);var K=this.getCurrentFile();null==l&&null!=K&&K.constructor==window.DriveFile&&(M=document.createElement("a"),M.style.paddingLeft="12px",M.style.color="gray",M.style.cursor=
+"pointer",mxUtils.write(M,mxResources.get("share")),G.appendChild(M),mxEvent.addListener(M,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(K.getId(),K)})));F.setAttribute("checked","checked");null==l&&L.setAttribute("disabled","disabled");x.appendChild(G);G=380;var Z=this.addLinkSection(x),ja=document.createElement("select");ja.style.maxWidth="260px";ja.style.marginLeft="8px";ja.style.marginTop="16px";M=document.createElement("option");M.setAttribute("value","light");
+mxUtils.write(M,mxResources.get("light"));ja.appendChild(M);M=document.createElement("option");M.setAttribute("value","dark");mxUtils.write(M,mxResources.get("dark"));ja.appendChild(M);M=document.createElement("option");M.setAttribute("value","auto");mxUtils.write(M,mxResources.get("automatic"));M.setAttribute("selected","selected");ja.appendChild(M);M.setAttribute("selected","selected");mxUtils.write(x,mxResources.get("appearance")+":");x.appendChild(ja);mxUtils.br(x);G+=26;var da=this.addCheckbox(x,
+mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value="100%";x.appendChild(ba);var na=this.addCheckbox(x,mxResources.get("fit"),!0);M=null!=this.pages&&1<this.pages.length;var ca=ca=this.addCheckbox(x,mxResources.get("allPages"),M,!M),ka=this.addCheckbox(x,mxResources.get("layers"),!0),aa=this.addCheckbox(x,mxResources.get("tags"),
+!0),V=this.addCheckbox(x,mxResources.get("lightbox"),!0),k=null;if(EditorUi.enableHtmlEditOption){k=this.addEditButton(x,V);var v=k.getEditInput();v.style.marginBottom="16px";G+=50;mxEvent.addListener(V,"change",function(){V.checked?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled");v.checked&&V.checked?k.getEditSelect().removeAttribute("disabled"):k.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,x,mxUtils.bind(this,function(){n(L.checked?l:null,da.checked,
+ba.value,Z.getTarget(),Z.getColor(),na.checked,ca.checked,ka.checked,aa.checked,V.checked,null!=k?k.getLink():null,null!=ja?ja.value:null)}),null,c,g);this.showDialog(c.container,340,G,!0,!0);F.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,g,l,n,x,F,G,L,M,K,Z,ja){var da=document.createElement("div");da.style.whiteSpace="nowrap";var ba=document.createElement("h3");mxUtils.write(ba,c||mxResources.get("publish"));ba.style.width="100%";ba.style.textAlign="center";ba.style.marginTop="2px";
+ba.style.marginBottom="20px";da.appendChild(ba);var na=document.createElement("select");c=30;na.className="geBtn";na.style.marginBottom="8px";na.style.marginLeft="0px";na.style.width="100%";na.style.boxSizing="border-box";if(null==L||""==L.getHash())x=null!=x?x:"https://www.drawio.com/doc/faq/publish-diagram-as-link",ba=document.createElement("option"),mxUtils.write(ba,mxResources.get("makeCopy")),ba.setAttribute("value","copy"),na.appendChild(ba);ba=document.createElement("option");mxUtils.write(ba,
+mxResources.get("authorizationRequired"));ba.setAttribute("value","auth");na.appendChild(ba);null!=L&&""!=L.getHash()||ba.setAttribute("disabled","disabled");L=document.createElement("option");L.setAttribute("value","public");na.appendChild(L);null!=G?(mxUtils.write(L,mxResources.get("publicDiagramUrl")),L.setAttribute("title",G),na.value="public"):(mxUtils.write(L,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),L.setAttribute("disabled","disabled"));da.appendChild(na);
+mxUtils.br(da);na.focus();var ca=null,ka=null;if(null!=g||null!=l)c+=30,mxUtils.write(da,mxResources.get("width")+":"),ca=document.createElement("input"),ca.setAttribute("type","text"),ca.style.marginRight="16px",ca.style.width="50px",ca.style.marginLeft="6px",ca.style.marginRight="16px",ca.style.marginBottom="10px",ca.value="100%",da.appendChild(ca),mxUtils.write(da,mxResources.get("height")+":"),ka=document.createElement("input"),ka.setAttribute("type","text"),ka.style.width="50px",ka.style.marginLeft=
+"6px",ka.style.marginBottom="10px",ka.value=l+"px",da.appendChild(ka),mxUtils.br(da);var aa=this.addLinkSection(da,n),V=K?this.addCheckbox(da,mxResources.get("transparentBackground"),!1):null;null!=V&&(c+=20);var k=document.createElement("select");k.className="geBtn";k.style.marginTop="8px";g=document.createElement("option");mxUtils.write(g,mxResources.get("allPages"));g.setAttribute("value","allPages");k.appendChild(g);g=document.createElement("option");mxUtils.write(g,mxResources.get("currentPage"));
+g.setAttribute("value","currentPage");k.appendChild(g);var v=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),ja&&(mxUtils.write(da,mxResources.get("pages")+":"),da.appendChild(k),mxUtils.br(da),c+=30),v=this.addCheckbox(da,mxResources.get("selectedPage")+": "+g));var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginTop=
+"16px";ja=document.createElement("option");ja.setAttribute("value","0");mxUtils.write(ja,mxResources.get("light"));J.appendChild(ja);ja=document.createElement("option");ja.setAttribute("value","1");mxUtils.write(ja,mxResources.get("dark"));J.appendChild(ja);ja=document.createElement("option");ja.setAttribute("value","auto");mxUtils.write(ja,mxResources.get("automatic"));ja.setAttribute("selected","selected");J.appendChild(ja);Z&&(mxUtils.write(da,mxResources.get("appearance")+":"),da.appendChild(J),
+mxUtils.br(da),c+=30);var N=this.addCheckbox(da,mxResources.get("lightbox"),!0,null,null,!n),T=this.addEditButton(da,N),W=T.getEditInput();n&&(W.style.marginLeft=N.style.marginLeft,N.style.display="none",c-=20);var U=this.addCheckbox(da,mxResources.get("layers"),!0);U.style.marginLeft=W.style.marginLeft;U.style.marginTop="8px";var Y=this.addCheckbox(da,mxResources.get("tags"),!0);Y.style.marginLeft=W.style.marginLeft;Y.style.marginBottom="16px";Y.style.marginTop="16px";mxEvent.addListener(N,"change",
+function(){N.checked?(U.removeAttribute("disabled"),W.removeAttribute("disabled"),Y.removeAttribute("disabled")):(U.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),Y.setAttribute("disabled","disabled"));W.checked&&N.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,da,mxUtils.bind(this,function(){M(aa.getTarget(),aa.getColor(),null==v?!1:v.checked,N.checked,T.getLink(),U.checked,null!=ca?
+ca.value:null,null!=ka?ka.value:null,Y.checked,na.value,null!=V?V.checked:!1,J.value,"allPages"==k.value)}),null,mxResources.get("create"),x,F);this.showDialog(n.container,340,296+c,!0,!0);null!=ca?(ca.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)):null==na.parentNode;aa.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,g,l,n,x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var G=document.createElement("h3");
+mxUtils.write(G,mxResources.get("image"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(x?"10":"4")+"px";F.appendChild(G);if(x){mxUtils.write(F,mxResources.get("zoom")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.style.marginRight="12px";L.value=this.lastExportZoom||"100%";F.appendChild(L);mxUtils.write(F,mxResources.get("borderWidth")+":");var M=document.createElement("input");
+M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.value=this.lastExportBorder||"0";F.appendChild(M);mxUtils.br(F)}var K=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Z=n?null:this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);G=this.editor.graph;var ja=n?null:this.addCheckbox(F,mxResources.get("transparentBackground"),G.background==mxConstants.NONE||null==G.background);
+null!=ja&&(ja.style.marginBottom="16px");c=new CustomDialog(this,F,mxUtils.bind(this,function(){var da=parseInt(L.value)/100||1,ba=parseInt(M.value)||0;l(!K.checked,null!=Z?Z.checked:!1,null!=ja?ja.checked:!1,da,ba)}),null,c,g);this.showDialog(c.container,300,(x?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,g,l,n,x,F,G,L,M){G=null!=G?G:Editor.defaultIncludeDiagram;var K=document.createElement("div");K.style.whiteSpace="nowrap";var Z=this.editor.graph,ja="jpeg"==L||"webp"==
+L?220:320,da=document.createElement("h3");mxUtils.write(da,c);da.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";K.appendChild(da);mxUtils.write(K,mxResources.get("zoom")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value=this.lastExportZoom||"100%";K.appendChild(ba);mxUtils.write(K,mxResources.get("borderWidth")+":");var na=document.createElement("input");
+na.setAttribute("type","text");na.style.marginRight="16px";na.style.width="60px";na.style.marginLeft="4px";na.value=this.lastExportBorder||"0";K.appendChild(na);mxUtils.br(K);var ca=this.addCheckbox(K,mxResources.get("selectionOnly"),!1,Z.isSelectionEmpty()),ka=document.createElement("input");ka.style.marginTop="16px";ka.style.marginRight="8px";ka.style.marginLeft="24px";ka.setAttribute("disabled","disabled");ka.setAttribute("type","checkbox");var aa=document.createElement("select");aa.style.marginTop=
+"16px";aa.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(da=0;da<c.length;da++)if(!Z.isSelectionEmpty()||"selectionOnly"!=c[da]){var V=document.createElement("option");mxUtils.write(V,mxResources.get(c[da]));V.setAttribute("value",c[da]);aa.appendChild(V)}M?(mxUtils.write(K,mxResources.get("size")+":"),K.appendChild(aa),mxUtils.br(K),ja+=26,mxEvent.addListener(aa,"change",function(){"selectionOnly"==aa.value&&(ca.checked=!0)})):F&&(K.appendChild(ka),mxUtils.write(K,mxResources.get("crop")),
+mxUtils.br(K),ja+=30,mxEvent.addListener(ca,"change",function(){ca.checked?ka.removeAttribute("disabled"):ka.setAttribute("disabled","disabled")}));Z.isSelectionEmpty()?M&&(ca.style.display="none",ca.nextSibling.style.display="none",ca.nextSibling.nextSibling.style.display="none",ja-=30):(aa.value="diagram",ka.setAttribute("checked","checked"),ka.defaultChecked=!0,mxEvent.addListener(ca,"change",function(){aa.value=ca.checked?"selectionOnly":"diagram"}));var k=this.addCheckbox(K,mxResources.get("transparentBackground"),
+!1,null,null,"jpeg"!=L&&"webp"!=L),v=document.createElement("select");v.style.maxWidth="260px";v.style.marginLeft="8px";v.style.marginTop="16px";F=document.createElement("option");F.setAttribute("value","light");mxUtils.write(F,mxResources.get("light"));v.appendChild(F);M=document.createElement("option");M.setAttribute("value","dark");mxUtils.write(M,mxResources.get("dark"));v.appendChild(M);"svg"==L&&mxUtils.lightDarkColorSupported?(F=document.createElement("option"),F.setAttribute("value","auto"),
+mxUtils.write(F,mxResources.get("automatic")),F.setAttribute("selected","selected"),v.appendChild(F)):Editor.isDarkMode()?M.setAttribute("selected","selected"):F.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("appearance")+":");K.appendChild(v);mxUtils.br(K);ja+=26;var J=this.addCheckbox(K,mxResources.get("shadow"),Z.shadowVisible),N=null;if("png"==L||"jpeg"==L||"webp"==L)N=this.addCheckbox(K,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),ja+=30;Z=
+null!=this.pages?this.pages.length:1;var T=this.addCheckbox(K,mxResources.get("includeCopyOfMyDiagram")+(1<Z?":":""),G,null,null,"jpeg"!=L&&"webp"!=L),W=document.createElement("select");W.style.maxWidth="260px";W.style.marginLeft="28px";"png"==L||"svg"==L?(G=function(){T.checked?W.removeAttribute("disabled"):W.setAttribute("disabled","disabled")},F=document.createElement("option"),F.setAttribute("value","allPages"),mxUtils.write(F,mxResources.get("allPages")),W.appendChild(F),F=document.createElement("option"),
+F.setAttribute("value","currentPage"),mxUtils.write(F,mxResources.get("currentPage")),W.appendChild(F),1<Z?(T.style.marginBottom="12px",W.style.marginBottom="16px",K.appendChild(W),mxUtils.br(K),ja+=20):T.style.marginBottom="16px",null!=this.lastEmbedInclude&&(W.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",G),G()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");U.id="geCheckbox-"+
+Editor.guid();var Y=document.createElement("input");Y.style.marginBottom="16px";Y.style.marginRight="8px";Y.setAttribute("type","checkbox");Y.id="geCheckbox-"+Editor.guid();g&&(U.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,K.appendChild(U),G=document.createElement("label"),mxUtils.write(G,mxResources.get("embedImages")),G.setAttribute("for",U.id),K.appendChild(G),mxUtils.br(K),Y.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,K.appendChild(Y),G=document.createElement("label"),
+mxUtils.write(G,mxResources.get("embedFonts")),G.setAttribute("for",Y.id),K.appendChild(G),mxUtils.br(K),ja+=50);var fa=document.createElement("select");fa.style.maxWidth="260px";fa.style.marginLeft="8px";F=document.createElement("option");F.setAttribute("value","auto");mxUtils.write(F,mxResources.get("automatic"));fa.appendChild(F);G=document.createElement("option");G.setAttribute("value","blank");mxUtils.write(G,mxResources.get("openInNewWindow"));fa.appendChild(G);G=document.createElement("option");
+G.setAttribute("value","self");mxUtils.write(G,mxResources.get("openInThisWindow"));fa.appendChild(G);G=document.createElement("div");mxUtils.write(G,mxResources.get("LinksLost"));G.style.margin="7px";G.style.display="none";"svg"==L&&(mxUtils.write(K,mxResources.get("links")+":"),K.appendChild(fa),K.appendChild(G),mxUtils.br(K),mxUtils.br(K),ja+=50);l=new CustomDialog(this,K,mxUtils.bind(this,function(){this.lastExportBorder=na.value;this.lastExportZoom=ba.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=
+Y.checked;this.lastEmbedInclude=W.value;x(ba.value,k.checked,!ca.checked,J.checked,T.checked,U.checked&&g,na.value,ka.checked,("png"==L||"svg"==L)&&"currentPage"==W.value,fa.value,null!=N?N.checked:null,null!=v?v.value:null,aa.value,Y.checked)}),null,l,n);this.showDialog(l.container,340,ja,!0,!0,null,null,null,null,!0);ba.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,g,l,n,
+x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var G=this.editor.graph;if(null!=g){var L=document.createElement("h3");mxUtils.write(L,g);L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";F.appendChild(L)}var M=this.addCheckbox(F,mxResources.get("fit"),!0),K=this.addCheckbox(F,mxResources.get("shadow"),G.shadowVisible&&n,!n),Z=this.addCheckbox(F,l),ja=this.addCheckbox(F,mxResources.get("lightbox"),!0),da=this.addEditButton(F,ja),ba=da.getEditInput(),
+na=1<G.model.getChildCount(G.model.getRoot()),ca=this.addCheckbox(F,mxResources.get("layers"),na,!na);ca.style.marginLeft=ba.style.marginLeft;ca.style.marginBottom="12px";ca.style.marginTop="8px";mxEvent.addListener(ja,"change",function(){ja.checked?(na&&ca.removeAttribute("disabled"),ba.removeAttribute("disabled")):(ca.setAttribute("disabled","disabled"),ba.setAttribute("disabled","disabled"));ba.checked&&ja.checked?da.getEditSelect().removeAttribute("disabled"):da.getEditSelect().setAttribute("disabled",
+"disabled")});g=new CustomDialog(this,F,mxUtils.bind(this,function(){c(M.checked,K.checked,Z.checked,ja.checked,da.getLink(),ca.checked)}),null,mxResources.get("embed"),x);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,g,l,n,x,F,G,L){function M(ba){var na=" ",ca="";n&&(na=" 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!=Z?"&page="+Z:"")+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");var ka="";l&&(ka=' width="'+Math.round(K.width)+'" height="'+Math.round(K.height)+'"');G('<img src="'+ba+'"'+ka+(""!=ca?' style="'+ca+'"':"")+na+"/>")}var K=this.editor.graph.getGraphBounds(),Z=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ba){var na=n?this.getFileData(!0):
+null;ba=this.createImageDataUri(ba,na,"png");M(ba)}),null,null,null,mxUtils.bind(this,function(ba){L({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),K.width*K.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var ja="";l&&(ja="&w="+Math.round(2*K.width)+"&h="+Math.round(2*K.height));var da=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+ja+"&xml="+encodeURIComponent(g));da.send(mxUtils.bind(this,function(){200<=
+da.getStatus()&&299>=da.getStatus()?M("data:image/png;base64,"+da.getText()):L({message:mxResources.get("unknownError")})}))}else L({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,g,l,n,x,F,G){var L=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),M=L.getElementsByTagName("a");if(null!=M)for(var K=0;K<M.length;K++){var Z=M[K].getAttribute("href");null!=Z&&"#"==Z.charAt(0)&&"_blank"==M[K].getAttribute("target")&&M[K].removeAttribute("target")}n&&
+L.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(L);if(l){var ja=" ",da="";n&&(ja="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"+(x?"&edit=_blank":"")+(F?"&layers=1":
+"")+"');}})(this);\"",da+="cursor:pointer;");c&&(da+="max-width:100%;");this.editor.convertImages(L,mxUtils.bind(this,function(ba){G('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ba))+'"'+(""!=da?' style="'+da+'"':"")+ja+"/>")}))}else da="",n&&(g=this.getSelectedPageIndex(),L.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:"")+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}}})(this);"),da+="cursor:pointer;"),c&&(c=parseInt(L.getAttribute("width")),x=parseInt(L.getAttribute("height")),L.setAttribute("viewBox","-0.5 -0.5 "+c+" "+x),da+="max-width:100%;max-height:"+x+"px;",L.removeAttribute("height")),""!=da&&L.setAttribute("style",da),this.editor.addFontCss(L),this.editor.graph.mathEnabled&&this.editor.addMathCss(L),G(mxUtils.getXml(L))};EditorUi.prototype.timeSince=
+function(c){c=Math.floor((new Date-c)/1E3);var g=Math.floor(c/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(c/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(c/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(c/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(c/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,g){if(null!=c){var l=null;if("diagram"==
+c.nodeName)l=c;else if("mxfile"==c.nodeName){var n=c.getElementsByTagName("diagram");if(0<n.length){l=n[0];var x=g.getGlobalVariable;g.getGlobalVariable=function(F){return"page"==F?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==F?1:x.apply(this,arguments)}}}null!=l&&(c=Editor.parseDiagramNode(l))}n=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(c)}catch(F){}finally{this.editor.graph=n}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};
+EditorUi.prototype.getPngFileProperties=function(c){var g=1,l=0;if(null!=c){if(c.hasAttribute("scale")){var n=parseFloat(c.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}c.hasAttribute("border")&&(n=parseInt(c.getAttribute("border")),!isNaN(n)&&0<n&&(l=n))}return{scale:g,border:l}};EditorUi.prototype.getEmbeddedPng=function(c,g,l,n,x){try{var F=this.editor.graph,G=null;if(null!=l&&0<l.length)F=this.createTemporaryGraph(F.getStylesheet()),document.body.appendChild(F.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,
+!0),F),G=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){F=this.createTemporaryGraph(F.getStylesheet());var L=F.getGlobalVariable;F.setBackgroundImage=this.editor.graph.setBackgroundImage;var M=this.pages[0];this.currentPage==M?F.setBackgroundImage(this.editor.graph.backgroundImage):null!=M.viewState&&null!=M.viewState&&F.setBackgroundImage(M.viewState.backgroundImage);F.getGlobalVariable=function(K){return"page"==K?M.getName():"pagenumber"==K?1:L.apply(this,arguments)};document.body.appendChild(F.container);
+F.model.setRoot(M.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(K){try{null==G&&(G=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var Z=K.toDataURL("image/png");Z=Editor.writeGraphModelToPng(Z,"tEXt","mxfile",encodeURIComponent(G));c(Z.substring(Z.lastIndexOf(",")+1));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container)}catch(ja){null!=g&&g(ja)}}),null,null,null,mxUtils.bind(this,function(K){null!=g&&g(K)}),null,null,n,null,F.shadowVisible,null,F,x,
+null,null,null,"diagram",null)}catch(K){null!=g&&g(K)}};EditorUi.prototype.getEmbeddedSvg=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da){L=null!=L?L:!0;Z=null!=Z?Z:0;G=null!=M?M:g.background;G==mxConstants.NONE&&(G=null);null==G&&"none"==g.getAdaptiveColors()&&(G="#ffffff");M=this.editor.graph.createSvgImageExport(null!=c);F=g.getSvg(G,K,Z,null,null,F,null,M,null,g.shadowVisible||ja,null,da,"diagram");(g.shadowVisible||ja)&&g.addSvgShadow(F,null,null,0==Z);null!=c&&F.setAttribute("content",c);null!=l&&F.setAttribute("resource",
+l);var ba=mxUtils.bind(this,function(na){na=(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(na);null!=x&&x(na);return na});g.mathEnabled&&this.editor.addMathCss(F);if(null!=x)this.embedFonts(F,mxUtils.bind(this,function(na){L?this.editor.convertImages(na,mxUtils.bind(this,function(ca){ba(ca)})):ba(na)}));else return ba(F)};EditorUi.prototype.embedFonts=function(c,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
+this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),g(c)}catch(n){g(c)}}))}catch(l){g(c)}}))};EditorUi.prototype.exportImage=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da){M=null!=M?M:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(na){Editor.addRetryToError(na,mxUtils.bind(this,function(){this.exportImage(c,g,l,n,x,F,G,L,M,K,Z,ja,da)}));this.handleError(na)}))){var ba=
+this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(na){this.spinner.stop();try{this.saveCanvas(na,x?this.getFileData(!0,null,null,null,l,L,null,null,null,null,null,c,F):null,M,null==this.pages||0==this.pages.length,Z)}catch(ca){this.handleError(ca)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(na){this.spinner.stop();this.handleError(na)}),null,l,c||1,g,n,null,null,F,G,K,
+ja,da)}catch(na){this.spinner.stop(),this.handleError(na)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)c[this.pages[g].getId()]=this.pages[g].getId();return c};EditorUi.prototype.importXml=function(c,g,l,n,x,F,G){g=null!=g?g:0;l=null!=l?l:0;var L=[];try{var M=this.editor.graph;if(null!=c&&0<c.length){M.model.beginUpdate();
+try{var K=mxUtils.parseXml(c);c={};var Z=this.editor.extractGraphModel(K.documentElement,null!=this.pages);if(null!=Z&&"mxfile"==Z.nodeName&&null!=this.pages){var ja=Z.getElementsByTagName("diagram");if(1==ja.length&&!F){if(Z=Editor.parseDiagramNode(ja[0]),null!=this.currentPage&&(c[ja[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var da=ja[0].getAttribute("name");null!=da&&""!=da&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,da))}}else if(0<ja.length){F=
+[];var ba=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ja[0].getAttribute("id")]=this.pages[0].getId(),da=ja[0].getAttribute("name"),null!=da&&""!=da&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],da)),Z=Editor.parseDiagramNode(ja[0]),n=!1,ba=1);for(;ba<ja.length;ba++){var na=ja[ba].getAttribute("id");ja[ba].removeAttribute("id");var ca=this.updatePageRoot(new DiagramPage(ja[ba]));c[na]=ja[ba].getAttribute("id");var ka=this.pages.length;null==ca.getName()&&
+ca.setName(mxResources.get("pageWithNumber",[ka+1]));M.model.execute(new ChangePage(this,ca,ca,ka,!0));F.push(ca)}this.updatePageLinks(c,F)}}if(null!=Z&&"mxGraphModel"===Z.nodeName){L=M.importGraphModel(Z,g,l,n);if(null!=L)for(this.addLocalPagesToMapping(c),ba=0;ba<L.length;ba++)this.updatePageLinksForCell(c,L[ba]);var aa=M.parseBackgroundImage(Z.getAttribute("backgroundImage"));if(null!=aa&&null!=aa.originalSrc){this.updateBackgroundPageLink(c,aa);var V=new ChangePageSetup(this,null,aa);V.ignoreColor=
+!0;M.model.execute(V)}}G&&M.pasteCellStyles(M.includeDescendants(L),M.defaultVertexStyle,M.defaultEdgeStyle)}finally{M.model.endUpdate()}}}catch(k){if(x)throw k;this.handleError(k)}return L};EditorUi.prototype.updatePageLinks=function(c,g){for(var l=0;l<g.length;l++)this.updatePageLinksForCell(c,g[l].root),null!=g[l].viewState&&this.updateBackgroundPageLink(c,g[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var l=
+c[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=l&&(g.originalSrc="data:page/id,"+l)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=function(c,g){var l=document.createElement("div"),n=this.editor.graph,x=n.getLinkForCell(g);null!=x&&n.setLinkForCell(g,this.updatePageLink(c,x));if(n.isHtmlLabel(g)){l.innerHTML=Graph.sanitizeHtml(n.getLabel(g));for(var F=l.getElementsByTagName("a"),G=!1,L=0;L<F.length;L++)x=F[L].getAttribute("href"),null!=x&&(F[L].setAttribute("href",this.updatePageLink(c,
+x)),G=!0);G&&n.labelChanged(g,l.innerHTML)}for(L=0;L<n.model.getChildCount(g);L++)this.updatePageLinksForCell(c,n.model.getChildAt(g,L))};EditorUi.prototype.updatePageLink=function(c,g){if(Graph.isPageLink(g)){var l=c[g.substring(g.indexOf(",")+1)];g=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var x=0;x<n.actions.length;x++){var F=n.actions[x];if(null!=F.open&&Graph.isPageLink(F.open)){var G=F.open.substring(F.open.indexOf(",")+
+1);l=c[G];null!=l?F.open="data:page/id,"+l:null==this.getPageById(G)&&delete F.open}}g="data:action/json,"+JSON.stringify(n)}}catch(L){}return g};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,g,l,n,x){var F=mxUtils.bind(this,function(G){this.loadingExtensions=!1;null!=l?l(G):this.handleError(G)});this.createTimeout(null,mxUtils.bind(this,function(G){n=null!=n?n:c.name;var L=mxUtils.bind(this,
+function(K){G.clear()&&F(K)}),M=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var K=this.isRemoteVisioFormat(n);try{var Z=n.lastIndexOf(".");if(0<=Z&&Z<n.length)n.substring(Z+1).toUpperCase();else{var ja=n.lastIndexOf("/");0<=ja&&ja<n.length&&(n=n.substring(ja+1))}}catch(ba){}if(K)if(null==VSS_CONVERT_URL||this.isOffline())L({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{K=new FormData;
+K.append("file1",c,n);var da=new XMLHttpRequest;da.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));da.responseType="blob";this.addRemoteServiceSecurityCheck(da);null!=x&&da.setRequestHeader("x-convert-custom",x);da.onreadystatechange=mxUtils.bind(this,function(){if(4==da.readyState&&G.clear())if(200<=da.status&&299>=da.status)try{var ba=da.response;if("text/xml"==ba.type){var na=new FileReader;na.onload=mxUtils.bind(this,function(ca){try{g(ca.target.result)}catch(ka){L({message:mxResources.get("errorLoadingFile")})}});
+na.readAsText(ba)}else this.doImportVisio(ba,g,L,n)}catch(ca){L(ca)}else try{""==da.responseType||"text"==da.responseType?L({message:da.responseText}):(na=new FileReader,na.onload=function(){try{L({message:JSON.parse(na.result).Message})}catch(ca){null!=na.result&&0<na.result.length?L({message:na.result}):L(ca)}},na.readAsText(da.response))}catch(ca){L({})}});da.send(K)}else if(G.clear())try{this.doImportVisio(c,g,L,n)}catch(ba){L(ba)}}else L({message:mxResources.get("serviceUnavailableOrBlocked")})});
+this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?M():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",M,null,null,null,L))}),F)};EditorUi.prototype.importGraphML=function(c,g,l){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=l?l(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var F=mxUtils.bind(this,function(L){x.clear()&&n(L)}),G=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,
+g,n)}catch(L){F(L)}else F({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?G():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",G,null,null,null,F))}),n)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var g=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.vsdxExportEnabled()?this.createTimeout(null,
+mxUtils.bind(this,function(l){var n=mxUtils.bind(this,function(F){l.clear()&&g(F)}),x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||n({message:mxResources.get("unknownError")})}catch(F){n(F)}else n({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=
+!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,n))}),g):g({message:mxResources.get("serviceUnavailableOrBlocked")})}};EditorUi.prototype.convertLucidChart=function(c,g,l){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=l?l(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var F=mxUtils.bind(this,function(L){x.clear()&&n(L)}),G=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if("undefined"!==typeof window.LucidImporter)try{var L=
+JSON.parse(c);g(LucidImporter.importState(L));try{if(null!=window.console&&"1"==urlParams.test){var M=[(new Date).toISOString(),"convertLucidChart",L];null!=L.state&&M.push(JSON.parse(L.state));if(null!=L.svgThumbs)for(var K=0;K<L.svgThumbs.length;K++)M.push(Editor.createSvgDataUri(L.svgThumbs[K]));null!=L.thumb&&M.push(L.thumb);console.log.apply(console,M)}}catch(Z){}}catch(Z){null!=window.console&&console.error(Z),F(Z)}else F({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==
+typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(G,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",G,null,null,null,F)},null,null,null,F)},null,null,null,F)},null,null,null,F)},null,null,null,F):mxscript(window.DRAWIO_SERVER_URL+
+"js/extensions.min.js",G,null,null,null,F))}),n)};EditorUi.prototype.createMermaidXml=function(c,g,l,n,x,F){var G=new Graph(document.createElement("div"));l=G.insertVertex(null,null,null,0,0,n,x,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");G.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:g},null,2));null!=F&&G.setAttributeForCell(l,"templatePrompt",F);c=(new mxCodec).encode(G.getModel());return mxUtils.getXml(c)};EditorUi.prototype.getSvgForXml=function(c){var g=
+null,l=this.createTemporaryGraph(this.editor.graph.getStylesheet());try{document.body.appendChild(l.container),(new mxCodec(mxUtils.parseXml(c))).decode(mxUtils.parseXml(c).documentElement,l.getModel()),g=l.getSvg(null,null,null,null,null,null,null,null,null,null,null,null,null,null,!0,!0)}finally{document.body.removeChild(l.container)}return g};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,g,l,n,x){var F=0,G=mxUtils.bind(this,function(){this.createTimeout(this.editor.generateTimeout,
+mxUtils.bind(this,function(L){var M="";if(null!=this.drive&&null!=this.drive.getUser()){var K=this.drive.getUser();null!=K.email&&0<K.email.indexOf("@")&&(M=K.email.substring(K.email.indexOf("@")+1))}var Z={prompt:c,driveDomain:M,options:null!=x?x:{}};EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"enableParser",n,"data",[Z],"url",["https://www.draw.io/generate/v3"]);var ja=Date.now();M=new mxXmlRequest("https://www.draw.io/generate/v3",JSON.stringify(Z),"POST");var da=mxUtils.bind(this,
+function(na){L.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"data",[Z],"error",[na],"time",Date.now()-ja+" ms"),l(na))}),ba=mxUtils.bind(this,function(na){3>F++?L.clear()&&G():da(na)});M.send(mxUtils.bind(this,function(na){if(L.isAlive())if(200<=na.getStatus()&&299>=na.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ka=na.getText();try{ka=JSON.parse(ka),result=ka.result}catch(aa){result=ka}EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"data",
+[Z],"response",[ka],"time",Date.now()-ja+" ms");n?"<"==result.charAt(0)?L.clear()&&(ka=Editor.extractGraphModelFromText(result),g(null!=ka&&3==ka.length?ka[1]:result)):this.parseMermaidDiagram(result,null,mxUtils.bind(this,function(aa){this.tryAndHandle(mxUtils.bind(this,function(){L.clear()&&g(aa)}),da)}),da,ba,!0):this.generateMermaidImage(result,null,mxUtils.bind(this,function(aa,V,k){this.tryAndHandle(mxUtils.bind(this,function(){L.clear()&&g(result,aa,V,k)}),da)}),da,ba)}),da,!0);else{var ca=
+{message:mxResources.get("error")+" "+na.getStatus()};try{ca=JSON.parse(na.getText()),null!=ca.error&&(ca.message=ca.error)}catch(ka){}da(ca)}}),da)}),l)});G()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var g=c.split("```");g=1<g.length?g:c.split("<pre>");g=1<g.length?g:c.split("~~~");g=1<g.length?g:c.split("%%");g=1<g.length?g:c.split("(Begins)");c=mxUtils.trim(1>=g.length?c:g[1]);g=c.split("\n");var l=1<g.length?g[1]:
+null;if(null!=l){var n=l.indexOf("-");0<n&&(l=l.substring(0,n))}if(0<g.length&&"mermaid"==mxUtils.trim(g[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))g.shift(),c=mxUtils.trim(g.join("\n")),g=c.split("\n");l=g[0].split(" ")[0].replace(/:$/,"");n=l.indexOf("-");0<n&&(l=l.substring(0,n));0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.isSupportedMermaidDiagramType=function(c){return"graph"==c||"flowchart"==c||"sequencediagram"==c||"classdiagram"==
+c||"statediagram-v2"==c||"statediagram"==c||"erdiagram"==c||"requirementdiagram"==c||"gitgraph"==c||"mindmap"==c||"journey"==c};EditorUi.prototype.getMermaidDiagramType=function(c){c=c.split("\n");for(var g=0;g<c.length&&(0==c[g].trim().length||"%%"==c[g].substring(0,2));)g++;if("---"==c[g].trim()){do g++;while(g<c.length&&"---"!=c[g].trim());g++}c=c[g].trim().toLowerCase();g=c.indexOf(" ");return c.substring(0,0<g?g:c.length)};EditorUi.prototype.parseMermaidDiagram=function(c,g,l,n,x,F){var G=!1;
+F&&"undefined"!==typeof mxMermaidToDrawio&&this.isSupportedMermaidDiagramType(this.getMermaidDiagramType(c))&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(L){G||L==this.emptyDiagramXml||(G=!0,l(L))}));this.generateMermaidImage(c,g,mxUtils.bind(this,function(L,M,K){G||(G=!0,l(this.createMermaidXml(c,g,L,M,K)))}),n,x)};EditorUi.prototype.loadMermaid=function(c,g){var l=mxUtils.bind(this,function(x){this.loadingMermaid=!1;g(x)}),n=mxUtils.bind(this,function(){try{this.loadingMermaid=!1,c()}catch(x){l(x)}});
+"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(n,0):(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",n,null,null,null,l):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",n,null,null,null,l))};EditorUi.prototype.mermaidSvgToDataUri=function(c,g,l,n){try{c=c.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var x=mxUtils.parseXml(c).getElementsByTagName("svg");if(0<x.length&&"error"!=x[0].getAttribute("aria-roledescription")){var F=
+parseFloat(x[0].getAttribute("width")),G=parseFloat(x[0].getAttribute("height"));if(isNaN(F)||isNaN(G))try{var L=x[0].getAttribute("viewBox").split(/\s+/);F=parseFloat(L[2]);G=parseFloat(L[3])}catch(M){F=F||100,G=G||100}g(this.convertDataUri(Editor.createSvgDataUri(c)),F,G)}else null!=n?n():l({message:mxResources.get("invalidInput")})}catch(M){l(M)}};EditorUi.prototype.getMermaidConfig=function(c,g){g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);g.securityLevel="strict";g.startOnLoad=!1;
+g.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=c.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(g.theme="dark");return g};EditorUi.prototype.generateMermaidImage=function(c,g,l,n,x){var F=mxUtils.bind(this,function(G){null!=n?n(G):this.handleError(G)});this.loadMermaid(mxUtils.bind(this,function(){try{mermaid.mermaidAPI.initialize(this.getMermaidConfig(c,g)),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),
+c).then(mxUtils.bind(this,function(G){this.mermaidSvgToDataUri(G.svg,l,n,x)})).catch(mxUtils.bind(this,function(G){this.removeMermaidErrors();"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();null!=x?x(G):F(G)}))}catch(G){F(G)}}),F)};EditorUi.prototype.removeMermaidErrors=function(){for(var c=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),g=0;g<c.length;g++)null!=c[g].parentNode&&c[g].parentNode.removeChild(c[g])};EditorUi.prototype.generatePlantUmlImage=function(c,
+g,l,n){function x(L,M,K){c1=L>>2;c2=(L&3)<<4|M>>4;c3=(M&15)<<2|K>>6;c4=K&63;r="";r+=F(c1&63);r+=F(c2&63);r+=F(c3&63);return r+=F(c4&63)}function F(L){if(10>L)return String.fromCharCode(48+L);L-=10;if(26>L)return String.fromCharCode(65+L);L-=26;if(26>L)return String.fromCharCode(97+L);L-=26;return 0==L?"-":1==L?"_":"?"}var G=new XMLHttpRequest;G.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(L){r="";for(i=0;i<L.length;i+=3)r=i+2==L.length?r+x(L.charCodeAt(i),
+L.charCodeAt(i+1),0):i+1==L.length?r+x(L.charCodeAt(i),0,0):r+x(L.charCodeAt(i),L.charCodeAt(i+1),L.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=g&&(G.responseType="blob");G.onload=function(L){if(200<=this.status&&300>this.status)if("txt"==g)l(this.response);else{var M=new FileReader;M.readAsDataURL(this.response);M.onloadend=function(K){var Z=new Image;Z.onload=function(){try{var ja=Z.width,da=Z.height;if(0==ja&&0==da){var ba=M.result,na=ba.indexOf(","),ca=
+decodeURIComponent(escape(atob(ba.substring(na+1)))),ka=mxUtils.parseXml(ca).getElementsByTagName("svg");0<ka.length&&(ja=parseFloat(ka[0].getAttribute("width")),da=parseFloat(ka[0].getAttribute("height")))}l(M.result,ja,da)}catch(aa){n(aa)}};Z.src=M.result};M.onerror=function(K){n(K)}}else n(L)};G.onerror=function(L){n(L)};G.send()};EditorUi.prototype.insertAsPreText=function(c,g,l){var n=this.editor.graph,x=null;n.getModel().beginUpdate();try{x=n.insertVertex(null,null,"<pre>"+c+"</pre>",g,l,1,
+1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(x,!0)}finally{n.getModel().endUpdate()}return x};EditorUi.prototype.insertTextAt=function(c,g,l,n,x,F,G,L){F=null!=F?F:!0;G=null!=G?G:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(da){4==da.readyState&&200<=da.status&&299>=da.status&&
+this.editor.graph.setSelectionCells(this.insertTextAt(da.responseText,g,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var M=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var K=Editor.extractGraphModelFromPdf(c);if(null!=K&&0<K.length)return this.importXml(K,g,l,F,!0,L)}if(Editor.isPngDataUrl(c)&&(K=Editor.extractGraphModelFromPng(c),null!=K&&0<K.length))return this.importXml(K,g,l,F,!0,L);if("data:image/svg+xml;"==
+c.substring(0,19))try{K=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(K=c.substring(c.indexOf(",")+1),K=window.atob&&!mxClient.IS_SF?atob(K):Base64.decode(K,!0)):K=decodeURIComponent(c.substring(c.indexOf(",")+1));var Z=this.importXml(K,g,l,F,!0,L);if(0<Z.length)return Z}catch(da){}this.loadImage(c,mxUtils.bind(this,function(da){if("data:"==c.substring(0,5))this.resizeImage(da,c,mxUtils.bind(this,function(ca,ka,aa){M.setSelectionCell(M.insertVertex(null,null,"",M.snap(g),M.snap(l),ka,aa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+this.convertDataUri(ca)+";"))}),G,this.maxImageSize);else{var ba=Math.min(1,Math.min(this.maxImageSize/da.width,this.maxImageSize/da.height)),na=Math.round(da.width*ba);da=Math.round(da.height*ba);M.setSelectionCell(M.insertVertex(null,null,"",M.snap(g),M.snap(l),na,da,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var da=null;M.getModel().beginUpdate();try{da=M.insertVertex(M.getDefaultParent(),
+null,c,M.snap(g),M.snap(l),1,1,"text;"+(n?"html=1;":"")),M.updateCellSize(da),M.fireEvent(new mxEventObject("textInserted","cells",[da]))}finally{M.getModel().endUpdate()}M.setSelectionCell(da)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,g,l,F,null,L);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(da){this.editor.graph.setSelectionCells(this.importXml(da,g,l,F,null,L))}),mxUtils.bind(this,function(da){this.handleError(da)}));
+else{M=this.editor.graph;x=null;M.getModel().beginUpdate();try{x=M.insertVertex(M.getDefaultParent(),null,"",M.snap(g),M.snap(l),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));M.fireEvent(new mxEventObject("textInserted","cells",[x]));n&&(c=M.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");x.value=c;M.updateCellSize(x);if(0<this.maxTextWidth&&x.geometry.width>this.maxTextWidth){var ja=M.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=ja.width;x.geometry.height=
+ja.height}Graph.isLink(x.value)&&M.setLinkForCell(x,x.value);x.geometry.width+=M.gridSize;x.geometry.height+=M.gridSize}finally{M.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=function(c){var g=-1;do c/=1024,g++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var g=c.indexOf(";");0<g&&(c=c.substring(0,g)+c.substring(c.indexOf(",",g+1)))}return c};
+EditorUi.prototype.isRemoteFileFormat=function(c,g){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,g){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=
+l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(G,L){StorageFile.listFiles(this,"F",G,L)});window.openBrowserFile=mxUtils.bind(this,function(G,L,M){StorageFile.getFileContent(this,G,L,M)});window.deleteBrowserFile=mxUtils.bind(this,function(G,
+L,M){StorageFile.deleteFile(this,G,L,M)});if(!g){var n=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(G){this.hideDialog(G)}));window.openFile.setConsumer(mxUtils.bind(this,function(G,L){null!=L&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(L)?(G=new Blob([G],{type:"application/octet-stream"}),this.importVisio(G,mxUtils.bind(this,function(M){this.importXml(M,0,0,!0)}),null,L)):this.editor.graph.setSelectionCells(this.importXml(G,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 x=this.dialog,F=x.close;this.dialog.close=mxUtils.bind(this,function(G){Editor.useLocalStorage=n;F.apply(x,arguments);G&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,g,l){var n=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?
+JSZip.loadAsync(c).then(function(F){if(mxUtils.isEmptyObject(F.files))l();else{var G=0,L,M=!1;F.forEach(function(K,Z){K=Z.name.toLowerCase();"diagram/diagram.xml"==K?(M=!0,Z.async("string").then(function(ja){0==ja.indexOf("<mxfile ")?g(ja):l()})):0==K.indexOf("versions/")&&(K=parseInt(K.substr(9)),K>G&&(G=K,L=Z))});0<G?L.async("string").then(function(K){(new XMLHttpRequest).upload&&n.isRemoteFileFormat(K,c.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,
+l):n.parseFileData(K,mxUtils.bind(this,function(Z){4==Z.readyState&&(200<=Z.status&&299>=Z.status?g(Z.responseText):l())}),c.name):l()}):M||l()}},function(F){l(F)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,l))};EditorUi.prototype.importFile=function(c,g,l,n,x,F,G,L,M,K,Z,ja){K=null!=K?K:!0;var da=!1,ba=null,na=mxUtils.bind(this,function(ca){var ka=null;null!=
+ca&&"<mxlibrary"==ca.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ca,G)),this.showSidebar()):ka=this.importXml(ca,l,n,K,null,null!=ja?mxEvent.isControlDown(ja):null);null!=L&&L(ka)});"image"==g.substring(0,5)?(M=!1,"image/png"==g.substring(0,9)&&(Z=Z?null:this.extractGraphModelFromPng(c),null!=Z&&0<Z.length&&(ba=this.importXml(Z,l,n,K,null,null!=ja?mxEvent.isControlDown(ja):null),M=!0)),M||(M=this.editor.graph,Z=c.indexOf(";"),0<Z&&(c=c.substring(0,Z)+c.substring(c.indexOf(",",Z+1))),K&&
+M.isGridEnabled()&&(l=M.snap(l),n=M.snap(n)),Z="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(Z+="editableCssRules=.*;"),ba=[M.insertVertex(null,null,"",l,n,x,F,Z+"image="+c+";")])):/(\.*<graphml )/.test(c)?(da=!0,this.importGraphML(c,na)):null!=M&&null!=G&&EditorUi.isVisioFilename(G)?(da=!0,this.importVisio(M,na)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,G)?this.isOffline()?this.showError(mxResources.get("error"),
+mxResources.get("notInOffline")):(da=!0,g=mxUtils.bind(this,function(ca){4==ca.readyState&&(200<=ca.status&&299>=ca.status?na(ca.responseText):null!=L&&(L(null),this.showError(mxResources.get("error"),413==ca.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,g,G):this.parseFile(M,g,G)):0==c.indexOf("PK")&&null!=M?(da=!0,this.importZipFile(M,na,mxUtils.bind(this,function(){ba=this.insertTextAt(this.validateFileData(c),l,n,!0,null,K);L(ba)}))):
+/(\.v(sd|dx))($|\?)/i.test(G)||/(\.vs(s|x))($|\?)/i.test(G)||(ba=this.insertTextAt(this.validateFileData(c),l,n,!0,null,K,null,null!=ja?mxEvent.isControlDown(ja):null));da||null==L||L(ba);return ba};EditorUi.prototype.importFiles=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da){n=null!=n?n:this.maxImageSize;K=null!=K?K:this.maxImageBytes;var ba=null!=g&&null!=l,na=!0;g=null!=g?g:0;l=null!=l?l:0;var ca=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var ka=Z||this.resampleThreshold,aa=0;aa<c.length;aa++)if("image/svg"!==
+c[aa].type.substring(0,9)&&"image/"===c[aa].type.substring(0,6)&&c[aa].size>ka){ca=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[g],"y",[l],"maxSize",[n],"maxBytes",[K],"resampleThreshold",[this.resampleThreshold],"largeImages",[ca],"crop",[ba],"resizeImages",[na],"ignoreEmbeddedXml",[ja],"evt",[da]);var V=mxUtils.bind(this,function(){var k=this.editor.graph,v=k.gridSize;x=null!=x?x:mxUtils.bind(this,function(Y,fa,oa,la,qa,ya,wa,Ia,Aa){try{if(null!=Y&&"<mxlibrary"==Y.substring(0,
+10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,Y,wa)),this.showSidebar(),null;this.isCompatibleString(Y)&&1==c.length&&null!=da&&"drop"==da.type&&this.isBlankFile()&&!this.canUndo()&&(ba=!1,la=oa=0);return this.importFile(Y,fa,oa,la,qa,ya,wa,Ia,Aa,ba,ja,da)}catch(Ba){return this.handleError(Ba),null}});F=null!=F?F:mxUtils.bind(this,function(Y){k.setSelectionCells(Y)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=c.length,N=J,T=[],W=mxUtils.bind(this,
+function(Y,fa){T[Y]=fa;if(0==--N){this.spinner.stop();if(null!=L)L(T);else{var oa=[];k.getModel().beginUpdate();try{for(Y=0;Y<T.length;Y++){var la=T[Y]();null!=la&&(oa=oa.concat(la))}}finally{k.getModel().endUpdate()}}F(oa)}}),U=0;U<J;U++)mxUtils.bind(this,function(Y){var fa=c[Y];if(null!=fa){var oa=new FileReader;oa.onload=mxUtils.bind(this,function(la){if(null==G||G(fa))try{if("image/"==fa.type.substring(0,6))if("image/svg"==fa.type.substring(0,9)){var qa=Graph.clipSvgDataUri(la.target.result),
+ya=qa.indexOf(","),wa=decodeURIComponent(escape(atob(qa.substring(ya+1)))),Ia=mxUtils.parseXml(wa),Aa=Ia.getElementsByTagName("svg");if(0<Aa.length){var Ba=Aa[0],Ga=ja?null:Ba.getAttribute("content");null!=Ga&&"<"!=Ga.charAt(0)&&"%"!=Ga.charAt(0)&&(Ga=unescape(window.atob?atob(Ga):Base64.decode(Ga,!0)));null!=Ga&&"%"==Ga.charAt(0)&&(Ga=decodeURIComponent(Ga));null==Ga||"<mxfile "!==Ga.substring(0,8)&&"<mxGraphModel>"!==Ga.substring(0,14)&&"<mxGraphModel "!==Ga.substring(0,14)?W(Y,mxUtils.bind(this,
+function(){try{if(null!=Ia){var Ca=Ia.getElementsByTagName("svg");if(0<Ca.length){var Da=Ca[0],va=Da.getAttribute("width"),Na=Da.getAttribute("height");va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Sa=Da.getAttribute("viewBox");if(null==Sa||0==Sa.length)Da.setAttribute("viewBox","0 0 "+va+" "+Na);else if(isNaN(va)||isNaN(Na)){var Ua=Sa.split(" ");3<Ua.length&&(va=parseFloat(Ua[2]),Na=parseFloat(Ua[3]))}qa=Editor.createSvgDataUri(mxUtils.getXml(Da));
+var Qa=Math.min(1,Math.min(n/Math.max(1,va)),n/Math.max(1,Na)),za=x(qa,fa.type,g+Y*v,l+Y*v,Math.max(1,Math.round(va*Qa)),Math.max(1,Math.round(Na*Qa)),fa.name);if(null!=za&&(isNaN(va)||isNaN(Na))){var Ea=new Image;Ea.onload=mxUtils.bind(this,function(){va=Math.max(1,Ea.width);Na=Math.max(1,Ea.height);za[0].geometry.width=va;za[0].geometry.height=Na;Da.setAttribute("viewBox","0 0 "+va+" "+Na);qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var C=qa.indexOf(";");0<C&&(qa=qa.substring(0,C)+qa.substring(qa.indexOf(",",
+C+1)));k.setCellStyles("image",qa,[za[0]])});Ea.src=Editor.createSvgDataUri(mxUtils.getXml(Da))}return za}}}catch(C){}return null})):W(Y,mxUtils.bind(this,function(){return x(Ga,"text/xml",g+Y*v,l+Y*v,0,0,fa.name)}))}else W(Y,mxUtils.bind(this,function(){return null}))}else{ya=!1;if("image/png"==fa.type){var Ma=ja?null:this.extractGraphModelFromPng(la.target.result);if(null!=Ma&&0<Ma.length){var sa=new Image;sa.src=la.target.result;W(Y,mxUtils.bind(this,function(){return x(Ma,"text/xml",g+Y*v,l+Y*
+v,sa.width,sa.height,fa.name)}));ya=!0}}ya||(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(la.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,la.target.result,mxUtils.bind(this,function(Da,va,Na){W(Y,mxUtils.bind(this,function(){if(null!=
+Da&&Da.length<K){var Sa=na&&this.isResampleImageSize(fa.size,Z)?Math.min(1,Math.min(n/va,n/Na)):1;return x(Da,fa.type,g+Y*v,l+Y*v,Math.round(va*Sa),Math.round(Na*Sa),fa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),na,n,Z,fa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else qa=la.target.result,x(qa,fa.type,g+Y*v,l+Y*v,240,160,fa.name,function(Ca){W(Y,function(){return Ca})},fa)}catch(Ca){W(Y,mxUtils.bind(this,
+function(){return null})),null!=window.console&&console.error(Ca,fa)}else W(Y,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(fa.name)?x(null,fa.type,g+Y*v,l+Y*v,240,160,fa.name,function(la){W(Y,function(){return la})},fa):"image"==fa.type.substring(0,5)||"application/pdf"==fa.type?oa.readAsDataURL(fa):oa.readAsText(fa)}})(U)});if(ca){ca=[];for(aa=0;aa<c.length;aa++)ca.push(c[aa]);c=ca;this.confirmImageResize(function(k){na=k;V()},M)}else V()};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(c,g){g=null!=g?g:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,x=function(F,G){if(F||g)mxSettings.setResizeImages(F?G:null),mxSettings.save();l();c(G)};null==n||g?this.showDialog((new ConfirmDialog(this,
+mxResources.get("resizeLargeImages"),function(F){x(F,!0)},function(F){x(F,!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?226:200,!0,!0):x(!1,n)};EditorUi.prototype.parseFile=function(c,g,l){l=null!=l?l:c.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,
+g,l)});n.readAsText(c)};EditorUi.prototype.parseFileData=function(c,g,l){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(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=function(c,g){g=null!=g?g:this.resampleThreshold;return c>
+g};EditorUi.prototype.resizeImage=function(c,g,l,n,x,F,G){x=null!=x?x:this.maxImageSize;var L=Math.max(1,c.width),M=Math.max(1,c.height),K=g;if(n&&this.isResampleImageSize(null!=G?G:g.length,F))try{var Z=Math.max(L/x,M/x);if(1<Z){var ja=Math.round(L/Z),da=Math.round(M/Z),ba=document.createElement("canvas");ba.width=ja;ba.height=da;ba.getContext("2d").drawImage(c,0,0,ja,da);var na=ba.toDataURL();if(na.length<g.length){var ca=document.createElement("canvas");ca.width=ja;ca.height=da;var ka=ca.toDataURL();
+na!==ka&&(g=na,L=ja,M=da)}}}catch(aa){}n&&K!=g&&x>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(c,g,l,n,x/1.5,F,G):l(g,L,M)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,g,l){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!=l&&(n.onerror=l);n.src=c}catch(x){if(null!=l)l(x);else throw x;}};EditorUi.prototype.getDefaultSketchMode=
+function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var y=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());y.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?
+mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,g=this.editor.graph,l=g.isEnabled;g.isEnabled=function(){return l.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(v){var J=v.getEvent();return null==v.getState()&&!mxEvent.isMouseEvent(J)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(J)&&
+(null==v.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))});g.cellEditor.editPlantUmlData=function(v,J,N){var T=JSON.parse(N);J=new SimpleTextareaDialog(c,T.data,function(W){null!=W&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(W,T.format,function(U,Y,fa){c.spinner.stop();g.getModel().beginUpdate();try{if("txt"==T.format)g.labelChanged(v,"<pre>"+U+"</pre>"),g.updateCellSize(v,!0);else{g.setCellStyles("image",c.convertDataUri(U),[v]);var oa=g.model.getGeometry(v);
+null!=oa&&(oa=oa.clone(),oa.width=Y,oa.height=fa,g.cellsResized([v],[oa],!1))}g.setAttributeForCell(v,"plantUmlData",JSON.stringify({data:W,format:T.format}))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(J.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));J.init()};g.cellEditor.editMermaidData=function(v,J,N){var T=JSON.parse(N);J=new SimpleTextareaDialog(c,T.data,function(W){null!=W&&c.spinner.spin(document.body,mxResources.get("inserting"))&&
+c.generateMermaidImage(W,T.config,function(U,Y,fa){c.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[v]);var oa=g.model.getGeometry(v);null!=oa&&(oa=oa.clone(),oa.width=Math.max(oa.width,Y),oa.height=Math.max(oa.height,fa),g.cellsResized([v],[oa],!1));g.setAttributeForCell(v,"mermaidData",JSON.stringify({data:W,config:T.config},null,2))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(J.container,640,420,!0,!0,null,null,null,new mxRectangle(0,
+0,320,280));J.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=function(v,J){try{var N=this.graph.getAttributeForCell(v,"plantUmlData");if(null!=N)this.editPlantUmlData(v,J,N);else if(N=this.graph.getAttributeForCell(v,"mermaidData"),null!=N&&window.isMermaidEnabled)this.editMermaidData(v,J,N);else{var T=g.getCellStyle(v);"1"==mxUtils.getValue(T,"metaEdit","0")?c.showDataDialog(v):n.apply(this,arguments)}}catch(W){c.handleError(W)}};g.getLinkTitle=function(v){return c.getLinkTitle(v)};
+g.customLinkClicked=function(v,J){var N=!1;try{var T=this.getGraphBounds();c.handleCustomLink(v,J);N=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(J))}catch(W){c.handleError(W)}return N};var x=g.parseBackgroundImage;g.parseBackgroundImage=function(v){var J=x.apply(this,arguments);null!=J&&null!=J.src&&Graph.isPageLink(J.src)&&(J={originalSrc:J.src});return J};var F=g.setBackgroundImage;g.setBackgroundImage=function(v){null!=v&&null!=v.originalSrc&&
+(v=c.createImageForPageLink(v.originalSrc,c.currentPage,this));F.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(v,J){v=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=v){var N=v.indexOf(",");if(0<N)for(v=v.substring(N+1),J=J.getProperty("patches"),
+N=0;N<J.length;N++)if(null!=J[N][EditorUi.DIFF_UPDATE]&&null!=J[N][EditorUi.DIFF_UPDATE][v]||null!=J[N][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(J[N][EditorUi.DIFF_REMOVE],v)){g.refreshBackgroundImage();break}}}));var G=g.getBackgroundImageObject;g.getBackgroundImageObject=function(v,J,N){var T=G.apply(this,arguments);null!=T&&null!=T.originalSrc&&(T=J?c.createImageForPageLink(T.originalSrc,N,null,!0):{src:T.originalSrc});return T};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
+"https://www.drawio.com/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 L=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(v){v=null!=v?v:"";"1"==urlParams.dev&&(v+=(0<v.length?"&":"?")+"dev=1");return L.apply(this,arguments)};var M=g.addClickHandler;g.addClickHandler=function(v,J,N){var T=J;J=function(W,U,Y){if(null==U){var fa=
+mxEvent.getSource(W);"a"==fa.nodeName.toLowerCase()&&(U=fa.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(W)||!mxEvent.isPopupTrigger(W))&&g.customLinkClicked(U,Y)&&mxEvent.consume(W);null!=T&&T(W,U,Y)};M.call(this,v,J,N)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var K=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(v,J,N){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&
+this.addMenuItems(v,["zoomIn","zoomOut","-"],null,N);K.apply(this,arguments);g.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(v,["-","addToScratchpad"],null,N);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(v,["-","exitGroup","home"],null,N)};var Z=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(v,J,N){if(c.editor.graph.isSelectionEmpty())Z.apply(this,arguments),c.menus.addMenuItems(v,["copyAsImage","copyAsSvg"],null,N);else if(this.isShowCellEditItems()?
+this.addPopupDeleteItem(v,J,N):this.addPopupMenuArrangeItems(v,J,N),this.addMenuItems(v,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,N),this.isShowCellEditItems()||this.addPopupDeleteItem(v,J,N),this.addMenuItems(v,["lockUnlock","-"],null,N),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(J)&&g.isCellEditable(J)&&(this.addSubmenu("editCell",v,null,mxResources.get("edit")),v.addSeparator(),g.getModel().isEdge(J))){this.addSubmenu("line",v);var T=g.getModel().getGeometry(J);
+null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(v,["clearWaypoints"],null,N)}1==g.getSelectionCount()&&this.addMenuItems(v,["enterGroup"],null,N);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(v,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(v,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=
+Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var ja=g.getExportVariables;g.getExportVariables=function(){var v=ja.apply(this,arguments),J=c.getCurrentFile();null!=J&&(v.filename=J.getTitle());v.pagecount=null!=c.pages?c.pages.length:1;v.page=
+null!=c.currentPage?c.currentPage.getName():"";v.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return v};var da=g.getGlobalVariable;g.getGlobalVariable=function(v){var J=c.getCurrentFile();return"filename"==v&&null!=J?J.getTitle():"page"==v&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==v?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==v?null!=c.pages?c.pages.length:1:da.apply(this,arguments)};var ba=
+null,na=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var v=this.getCurrentFile(),J=null!=v&&null!=v.getTitle()?v.getTitle():this.defaultFilename;ba!=J&&v==na&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());ba=J;na=v}));var ca=g.labelLinkClicked;g.labelLinkClicked=function(v,J,N){var T=J.getAttribute("href");if(null==T||!g.isCustomLink(T)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))ca.apply(this,arguments);else{if(!g.isEnabled()||
+null!=v&&g.isCellLocked(v.cell))g.customLinkClicked(T),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var v=c.defaultFilename,J=c.getCurrentFile();null!=J&&(v=null!=J.getTitle()?J.getTitle():v);return v};var ka=this.actions.get("print");ka.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ka.visible=ka.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",
!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(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,
-!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),g.addListener(mxEvent.ESCAPE,function(v,I){null!=I&&g.isEnabled()&&!g.isEditing()&&null!=I.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,
-24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(v){var I=g.cellEditor.text2,N=null;null!=I&&(mxEvent.addListener(I,"dragleave",function(T){null!=N&&(N.parentNode.removeChild(N),N=null);T.stopPropagation();T.preventDefault()}),mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(T){null==N&&(N=this.highlightElement(I));T.stopPropagation();T.preventDefault()})),mxEvent.addListener(I,"drop",mxUtils.bind(this,function(T){null!=N&&(N.parentNode.removeChild(N),
-N=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,Y,fa,na,la,qa){g.insertImage(U,la,qa)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var Y=0;Y<U.length;Y++)U[Y]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var W=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(U){var Y=
+!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),g.addListener(mxEvent.ESCAPE,function(v,J){null!=J&&g.isEnabled()&&!g.isEditing()&&null!=J.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,
+24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(v){var J=g.cellEditor.text2,N=null;null!=J&&(mxEvent.addListener(J,"dragleave",function(T){null!=N&&(N.parentNode.removeChild(N),N=null);T.stopPropagation();T.preventDefault()}),mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(T){null==N&&(N=this.highlightElement(J));T.stopPropagation();T.preventDefault()})),mxEvent.addListener(J,"drop",mxUtils.bind(this,function(T){null!=N&&(N.parentNode.removeChild(N),
+N=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,Y,fa,oa,la,qa){g.insertImage(U,la,qa)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var Y=0;Y<U.length;Y++)U[Y]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var W=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(U){var Y=
Math.max(1,U.width);U=Math.max(1,U.height);var fa=this.maxImageSize;fa=Math.min(1,Math.min(fa/Math.max(1,Y)),fa/Math.max(1,U));g.insertImage(decodeURIComponent(W),Y*fa,U*fa)})):document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(T.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(T.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"));
-T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){ka=this.editor.graph.view;var ba=mxSettings.getUnit();ka.setUnit(ba);Editor.pageSizeUnit=ba==mxConstants.METERS?mxConstants.MILLIMETERS:ba;ka.addListener("unitChanged",function(v,I){v=I.getProperty("unit");mxSettings.setUnit(v);mxSettings.save();Editor.pageSizeUnit=v==mxConstants.METERS?mxConstants.MILLIMETERS:v});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||
+T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){ka=this.editor.graph.view;var aa=mxSettings.getUnit();ka.setUnit(aa);Editor.pageSizeUnit=aa==mxConstants.METERS?mxConstants.MILLIMETERS:aa;ka.addListener("unitChanged",function(v,J){v=J.getProperty("unit");mxSettings.setUnit(v);mxSettings.save();Editor.pageSizeUnit=v==mxConstants.METERS?mxConstants.MILLIMETERS:v});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||
this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ka.unit);this.refresh()}if("1"==urlParams.styledev){ka=document.getElementById("geFooter");null!=ka&&(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)})),ka.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,I){0<this.editor.graph.getSelectionCount()?(v=this.editor.graph.getSelectionCell(),v=this.editor.graph.getModel().getStyle(v),this.styleInput.value=v||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));
+"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),ka.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,J){0<this.editor.graph.getSelectionCount()?(v=this.editor.graph.getSelectionCell(),v=this.editor.graph.getModel().getStyle(v),this.styleInput.value=v||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));
var V=this.isSelectionAllowed;this.isSelectionAllowed=function(v){return mxEvent.getSource(v)==this.styleInput?!0:V.apply(this,arguments)}}ka=document.getElementById("geInfo");null!=ka&&ka.parentNode.removeChild(ka);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var k=null;mxEvent.addListener(g.container,"dragleave",function(v){g.isEnabled()&&(null!=k&&(k.parentNode.removeChild(k),k=null),v.stopPropagation(),v.preventDefault())});mxEvent.addListener(g.container,"dragover",
-mxUtils.bind(this,function(v){null==k&&(k=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();v.stopPropagation();v.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(v){null!=k&&(k.parentNode.removeChild(k),k=null);if(g.isEnabled()){var I=mxUtils.convertPoint(g.container,mxEvent.getClientX(v),mxEvent.getClientY(v)),N=v.dataTransfer.files,T=g.view.translate,W=g.view.scale,U=I.x/W-T.x,Y=I.y/W-T.y;if(0<N.length)"1"!=urlParams.embed&&
-mxEvent.isShiftDown(v)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(v)&&(Y=U=null),this.importFiles(N,U,Y,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(v),null,null,mxEvent.isShiftDown(v),v));else{mxEvent.isAltDown(v)&&(Y=U=0);var fa=0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):null;I=this.extractGraphModelFromEvent(v,null!=this.pages);if(null!=I)g.setSelectionCells(this.importXml(I,
-U,Y,!0));else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/html")){var na=v.dataTransfer.getData("text/html");I=document.createElement("div");I.innerHTML=Graph.sanitizeHtml(na);var la=null;N=I.getElementsByTagName("img");null!=N&&1==N.length?(na=N[0].getAttribute("src"),null==na&&(na=N[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(na)||(la=!0)):(N=I.getElementsByTagName("a"),null!=N&&1==N.length?na=N[0].getAttribute("href"):(I=I.getElementsByTagName("pre"),null!=I&&1==I.length&&
-(na=mxUtils.getTextContent(I[0]))));var qa=!0,ya=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(na,U,Y,!0,la,null,qa,mxEvent.isControlDown(v)))});la&&null!=na&&na.length>this.resampleThreshold?this.confirmImageResize(function(wa){qa=wa;ya()},mxEvent.isControlDown(v)):ya()}else null!=fa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(fa)?this.loadImage(decodeURIComponent(fa),mxUtils.bind(this,function(wa){var Ia=Math.max(1,wa.width);wa=Math.max(1,wa.height);var Aa=this.maxImageSize;Aa=
+mxUtils.bind(this,function(v){null==k&&(k=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();v.stopPropagation();v.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(v){null!=k&&(k.parentNode.removeChild(k),k=null);if(g.isEnabled()){var J=mxUtils.convertPoint(g.container,mxEvent.getClientX(v),mxEvent.getClientY(v)),N=v.dataTransfer.files,T=g.view.translate,W=g.view.scale,U=J.x/W-T.x,Y=J.y/W-T.y;if(0<N.length)"1"!=urlParams.embed&&
+mxEvent.isShiftDown(v)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(v)&&(Y=U=null),this.importFiles(N,U,Y,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(v),null,null,mxEvent.isShiftDown(v),v));else{mxEvent.isAltDown(v)&&(Y=U=0);var fa=0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):null;J=this.extractGraphModelFromEvent(v,null!=this.pages);if(null!=J)g.setSelectionCells(this.importXml(J,
+U,Y,!0));else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/html")){var oa=v.dataTransfer.getData("text/html");J=document.createElement("div");J.innerHTML=Graph.sanitizeHtml(oa);var la=null;N=J.getElementsByTagName("img");null!=N&&1==N.length?(oa=N[0].getAttribute("src"),null==oa&&(oa=N[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(oa)||(la=!0)):(N=J.getElementsByTagName("a"),null!=N&&1==N.length?oa=N[0].getAttribute("href"):(J=J.getElementsByTagName("pre"),null!=J&&1==J.length&&
+(oa=mxUtils.getTextContent(J[0]))));var qa=!0,ya=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(oa,U,Y,!0,la,null,qa,mxEvent.isControlDown(v)))});la&&null!=oa&&oa.length>this.resampleThreshold?this.confirmImageResize(function(wa){qa=wa;ya()},mxEvent.isControlDown(v)):ya()}else null!=fa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(fa)?this.loadImage(decodeURIComponent(fa),mxUtils.bind(this,function(wa){var Ia=Math.max(1,wa.width);wa=Math.max(1,wa.height);var Aa=this.maxImageSize;Aa=
Math.min(1,Math.min(Aa/Math.max(1,Ia)),Aa/Math.max(1,wa));g.setSelectionCell(g.insertVertex(null,null,"",U,Y,Ia*Aa,wa*Aa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+fa+";"))}),mxUtils.bind(this,function(wa){g.setSelectionCells(this.insertTextAt(fa,U,Y,!0))})):0<=mxUtils.indexOf(v.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(v.dataTransfer.getData("text/plain"),U,Y,!0))}}v.stopPropagation();v.preventDefault()}),
!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});g.addListener("enabledChanged",mxUtils.bind(this,
-function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var v=parseInt(this.div.offsetLeft),I=parseInt(this.div.offsetWidth),N=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),W=parseInt(this.div.offsetHeight),U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(v,N-I))+"px";this.div.style.top=Math.max(c.embedViewport.y,
+function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var v=parseInt(this.div.offsetLeft),J=parseInt(this.div.offsetWidth),N=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),W=parseInt(this.div.offsetHeight),U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(v,N-J))+"px";this.div.style.top=Math.max(c.embedViewport.y,
Math.min(T,U-W))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ka=Editor.currentTheme,"simple"==ka||"sketch"==ka)this.doSetCurrentTheme(ka,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&
this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));ka=!1;if(null!=urlParams.dark)ka=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)ka="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||ka&&"auto"!=mxSettings.settings.darkMode||(ka=mxSettings.settings.darkMode);"auto"==ka&&this.isAutoDarkModeSupported()&&(ka=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof ka?"1"==ka:ka);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",
mxUtils.bind(this,function(v){this.isAutoDarkMode()&&this.setDarkMode(v.matches)}))}catch(v){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&
-this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(v,I){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var C=EditorUi.prototype.windowResized;
-EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&c<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&c>=g&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}C.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=
-function(){var c=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,m=this.sketchPickerMenuElt,n=this.editor.graph;m.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(K){mxEvent.getSource(K)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var x=document.createElement("div");x.style.position="absolute";x.style.width=
-"10px";x.style.height="10px";x.style.borderRadius="5px";x.style.border="1px solid gray";x.style.background="#ffffff";x.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(x);this.bottomResizer=x;var F=null,H=null,M=null,L=null;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(K){L=parseInt(this.diagramContainer.style.height);H=mxEvent.getClientY(K);n.popupMenuHandler.hideMenu();mxEvent.consume(K)}));x=x.cloneNode(!1);x.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(x);
-this.rightResizer=x;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(K){M=parseInt(this.diagramContainer.style.width);F=mxEvent.getClientX(K);n.popupMenuHandler.hideMenu();mxEvent.consume(K)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(K){var Z=!1;null!=F&&(this.diagramContainer.style.width=Math.max(20,M+mxEvent.getClientX(K)-F)+"px",Z=!0);null!=H&&(this.diagramContainer.style.height=Math.max(20,L+mxEvent.getClientY(K)-H)+"px",Z=!0);Z&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(K){null==F&&null==H||mxEvent.consume(K);H=F=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";g.style.visibility="hidden";c.style.visibility="hidden";m.style.display="none";
-this.addListener("editInlineStart",mxUtils.bind(this,function(K){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(K){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";g.style.visibility="hidden";c.style.visibility="hidden";m.style.display="none"}));this.windowResized=mxUtils.bind(this,
-function(){});this.inlineSizeChanged()};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){m.innerHTML="&nbsp;";m.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,m=document.createElement("div");m.setAttribute("autocomplete","off");m.setAttribute("autocorrect","off");m.setAttribute("autocapitalize","off");m.setAttribute("spellcheck","false");m.style.textRendering="optimizeSpeed";m.style.fontFamily="monospace";m.style.wordBreak=
-"break-all";m.style.background="transparent";m.style.color="transparent";m.style.position="absolute";m.style.whiteSpace="nowrap";m.style.overflow="hidden";m.style.display="block";m.style.fontSize="1";m.style.zIndex="-1";m.style.resize="none";m.style.outline="none";m.style.width="1px";m.style.height="1px";mxUtils.setOpacity(m,0);m.contentEditable=!0;m.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(F){var H=mxEvent.getSource(F);null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||"true"==H.contentEditable||224!=F.keyCode&&(mxClient.IS_MAC||17!=F.keyCode)&&(!mxClient.IS_MAC||91!=F.keyCode&&93!=F.keyCode)||n||(m.style.left=g.container.scrollLeft+10+"px",m.style.top=g.container.scrollTop+10+"px",F=g.container.scrollLeft,H=g.container.scrollTop,g.container.appendChild(m),
-n=!0,m.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=F,g.container.scrollTop=H)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(F){var H=F.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=H&&17!=H&&91!=H&&93!=H||(n=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),m.parentNode.removeChild(m),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(m,"copy",mxUtils.bind(this,function(F){if(g.isEnabled())try{mxClipboard.copy(g),
-this.copyCells(m),c()}catch(H){this.handleError(H)}}));mxEvent.addListener(m,"cut",mxUtils.bind(this,function(F){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(m,!0),c()}catch(H){this.handleError(H)}}));mxEvent.addListener(m,"paste",mxUtils.bind(this,function(F){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{if(m.innerHTML="&nbsp;",m.focus(),null!=F.clipboardData&&(Graph.removePasteFormatting(m.firstChild),this.pasteCells(F,m,!0,!0)),!mxEvent.isConsumed(F)){var H=g.container.scrollLeft,
-M=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{g.container.scrollLeft=H,g.container.scrollTop=M,Graph.removePasteFormatting(m.firstChild),this.pasteCells(F,m,!1,!0)}catch(L){this.handleError(L)}}),0)}}catch(L){this.handleError(L)}}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=function(F){return mxEvent.getSource(F)==m?!0:x.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,g){mxSettings.setUi(c);(g=this.doSetCurrentTheme(c)||g)||this.alert(mxResources.get("restartForChangeRequired"))};
-EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,g){if(null==c||""==c)c=App.isSimpleThemePreferred()?"simple":"kennedy";var m="simple"==Editor.currentTheme&&this.isDefaultTheme(c)||this.isDefaultTheme(Editor.currentTheme)&&"simple"==c||c==Editor.currentTheme;if(m||g)g=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=c,this.switchTheme(c),this.fireEvent(new mxEventObject("currentThemeChanged")),
-this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(g);return m};EditorUi.prototype.saveScrollState=function(c){var g=this.editor.graph.view.translate,m=this.diagramContainer.scrollLeft,n=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(m-=this.embedViewport.x,n-=this.embedViewport.y):(m+=this.embedViewport.x,n+=this.embedViewport.y));g={x:m,y:n,tx:g.x,ty:g.y};c&&(g.boundingRect=this.diagramContainer.getBoundingClientRect());return g};
-EditorUi.prototype.restoreScrollState=function(c){var g=this.editor.graph.view.scale,m=this.editor.graph.view.translate;if(null!=c.boundingRect){var n=this.diagramContainer.getBoundingClientRect();c.x-=c.boundingRect.x-n.x;c.y-=c.boundingRect.y-n.y}this.diagramContainer.scrollLeft=c.x+(m.x-c.tx)*g;this.diagramContainer.scrollTop=c.y+(m.y-c.ty)*g};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var g=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,
-function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||g||(this.statusContainer.style.display="none")}));var m=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var n=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;g=null!=n&&null!=n.getAttribute("class");
+this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(v,J){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var B=EditorUi.prototype.windowResized;
+EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&c<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&c>=g&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=
+function(){var c=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,n=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(K){mxEvent.getSource(K)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var x=document.createElement("div");x.style.position="absolute";x.style.width=
+"10px";x.style.height="10px";x.style.borderRadius="5px";x.style.border="1px solid gray";x.style.background="#ffffff";x.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(x);this.bottomResizer=x;var F=null,G=null,L=null,M=null;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(K){M=parseInt(this.diagramContainer.style.height);G=mxEvent.getClientY(K);n.popupMenuHandler.hideMenu();mxEvent.consume(K)}));x=x.cloneNode(!1);x.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(x);
+this.rightResizer=x;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(K){L=parseInt(this.diagramContainer.style.width);F=mxEvent.getClientX(K);n.popupMenuHandler.hideMenu();mxEvent.consume(K)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(K){var Z=!1;null!=F&&(this.diagramContainer.style.width=Math.max(20,L+mxEvent.getClientX(K)-F)+"px",Z=!0);null!=G&&(this.diagramContainer.style.height=Math.max(20,M+mxEvent.getClientY(K)-G)+"px",Z=!0);Z&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
+fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(K){null==F&&null==G||mxEvent.consume(K);G=F=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";g.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";
+this.addListener("editInlineStart",mxUtils.bind(this,function(K){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(K){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";g.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,
+function(){});this.inlineSizeChanged()};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak=
+"break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.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(F){var G=mxEvent.getSource(F);null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==G.nodeName||"TEXTAREA"==G.nodeName||"true"==G.contentEditable||224!=F.keyCode&&(mxClient.IS_MAC||17!=F.keyCode)&&(!mxClient.IS_MAC||91!=F.keyCode&&93!=F.keyCode)||n||(l.style.left=g.container.scrollLeft+10+"px",l.style.top=g.container.scrollTop+10+"px",F=g.container.scrollLeft,G=g.container.scrollTop,g.container.appendChild(l),
+n=!0,l.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=F,g.container.scrollTop=G)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(F){var G=F.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=G&&17!=G&&91!=G&&93!=G||(n=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(F){if(g.isEnabled())try{mxClipboard.copy(g),
+this.copyCells(l),c()}catch(G){this.handleError(G)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(F){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(l,!0),c()}catch(G){this.handleError(G)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(F){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{if(l.innerHTML="&nbsp;",l.focus(),null!=F.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(F,l,!0,!0)),!mxEvent.isConsumed(F)){var G=g.container.scrollLeft,
+L=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{g.container.scrollLeft=G,g.container.scrollTop=L,Graph.removePasteFormatting(l.firstChild),this.pasteCells(F,l,!1,!0)}catch(M){this.handleError(M)}}),0)}}catch(M){this.handleError(M)}}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=function(F){return mxEvent.getSource(F)==l?!0:x.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,g){mxSettings.setUi(c);(g=this.doSetCurrentTheme(c)||g)||this.alert(mxResources.get("restartForChangeRequired"))};
+EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,g){if(null==c||""==c)c=App.isSimpleThemePreferred()?"simple":"kennedy";var l="simple"==Editor.currentTheme&&this.isDefaultTheme(c)||this.isDefaultTheme(Editor.currentTheme)&&"simple"==c||c==Editor.currentTheme;if(l||g)g=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=c,this.switchTheme(c),this.fireEvent(new mxEventObject("currentThemeChanged")),
+this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(g);return l};EditorUi.prototype.saveScrollState=function(c){var g=this.editor.graph.view.translate,l=this.diagramContainer.scrollLeft,n=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(l-=this.embedViewport.x,n-=this.embedViewport.y):(l+=this.embedViewport.x,n+=this.embedViewport.y));g={x:l,y:n,tx:g.x,ty:g.y};c&&(g.boundingRect=this.diagramContainer.getBoundingClientRect());return g};
+EditorUi.prototype.restoreScrollState=function(c){var g=this.editor.graph.view.scale,l=this.editor.graph.view.translate;if(null!=c.boundingRect){var n=this.diagramContainer.getBoundingClientRect();c.x-=c.boundingRect.x-n.x;c.y-=c.boundingRect.y-n.y}this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*g;this.diagramContainer.scrollTop=c.y+(l.y-c.ty)*g};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var g=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,
+function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||g||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var n=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;g=null!=n&&null!=n.getAttribute("class");
if(!g&&null!=n){n=n.getAttribute("title");var x=this.getCurrentFile();x=null!=x?x.savingStatusKey:DrawioFile.prototype.savingStatusKey;n==mxResources.get(x)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(x))+'..."src="'+Editor.tailSpin+'"></div>',g=!0)}this.statusContainer.style.display="none";n=32>=c.clientWidth;c.style.visibility=n&&""==this.editor.getStatus()?"hidden":"";if(n||g)this.statusContainer.style.display="",g=!0}else"simple"==Editor.currentTheme?
-(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",m);m()};EditorUi.prototype.switchTheme=function(c){this.destroyWindows(!0);this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);"sketch"==c&&(this.createFormatWindow(),
+(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.destroyWindows(!0);this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);"sketch"==c&&(this.createFormatWindow(),
this.createShapesWindow())};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),g=0;g<c.length;g++)null!=c[g]&&c[g].window.fit()};EditorUi.prototype.hideWindows=
-function(){for(var c=this.getWindows(),g=0;g<c.length;g++)null!=c[g]&&c[g].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(c){null==this.sidebarWindow||c||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||c||(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=
-this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=
-this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var g=this.editor.graph;g.defaultEdgeLength=Graph.prototype.defaultEdgeLength;g.defaultGridEnabled=Graph.prototype.defaultGridEnabled;g.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||
-null==Editor.config.defaultEdgeLength)g.defaultEdgeLength=120;null==urlParams.grid&&(g.defaultGridEnabled=!1);null==urlParams.pv&&(g.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=
-function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var g=this.getCurrentFile();null!=g&&(g.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==g.sync||g.sync.enabled&&g.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==g.sync||g.sync.isConnected()?g.isRealtimeEnabled()&&g.isRealtimeSupported()&&1<g.getRealtimeState()&&(c=g.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+
-": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity=
-"");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,g,m,n){m=null!=m?m:"geButton";var x=this.menus.get(c);n=this.menubar.addMenu(mxResources.get(c),x.funct,null,n);n.className=m;n.setAttribute("title",mxResources.get(c));this.menus.menuCreated(x,n,m);null!=g&&(n.style.backgroundImage="url("+
-g+")",n.innerText="");return n};EditorUi.prototype.addButton=function(c,g,m,n){c=this.createToolbarButton(c,g,m);n=null!=n?n:this.container;n.appendChild(c);return c};EditorUi.prototype.createToolbarButton=function(c,g,m){var n=document.createElement("a");n.className="geButton";null!=c&&"data:"==c.substring(0,5)&&(n.style.backgroundImage="url("+c+")");null!=g&&n.setAttribute("title",g);null!=m&&mxEvent.addListener(n,"click",function(x){"disabled"!=n.getAttribute("disabled")&&m(x);mxEvent.consume(x)});
-mxEvent.preventDefault(n);return n};EditorUi.prototype.createMenuItem=function(c,g,m){var n=this.actions.get(c),x=null!=n?n.funct:null,F=this.createToolbarButton(g,mxResources.get(c)+(null!=n&&null!=n.shortcut?" ("+n.shortcut+")":""),x);null==n||m||(c=function(){n.isEnabled()?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",c),n.addListener("stateChanged",c),c());return F};EditorUi.prototype.createFormatWindow=function(){if(null==
-this.formatWindow){var c=this,g=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),m="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),g,60,240,m,mxUtils.bind(this,function(F){F.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var n=this.formatWindow.window.toggleMinimized,
+function(){for(var c=this.getWindows(),g=0;g<c.length;g++)null!=c[g]&&c[g].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(c){null==this.sidebarWindow||c||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||c||(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.chatWindow&&(this.chatWindow.destroy(),this.chatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),
+this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=
+null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var g=this.editor.graph;g.defaultEdgeLength=Graph.prototype.defaultEdgeLength;g.defaultGridEnabled=Graph.prototype.defaultGridEnabled;g.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==
+Editor.config||null==Editor.config.defaultEdgeLength)g.defaultEdgeLength=120;null==urlParams.grid&&(g.defaultGridEnabled=!1);null==urlParams.pv&&(g.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.createFooterMenuForTheme=function(c){};
+EditorUi.prototype.createPickerMenuForTheme=function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var g=this.getCurrentFile();null!=g&&(g.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==g.sync||g.sync.enabled&&g.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==g.sync||g.sync.isConnected()?g.isRealtimeEnabled()&&g.isRealtimeSupported()&&1<g.getRealtimeState()&&(c=g.getRealtimeError(),
+c=mxResources.get("realtimeCollaboration")+": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent=
+"",this.statusContainer.style.opacity="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,g,l,n){l=null!=l?l:"geButton";var x=this.menus.get(c);n=this.menubar.addMenu(mxResources.get(c),x.funct,null,n);n.className=l;n.setAttribute("title",mxResources.get(c));this.menus.menuCreated(x,n,
+l);null!=g&&(n.style.backgroundImage="url("+g+")",n.innerText="");return n};EditorUi.prototype.addButton=function(c,g,l,n){c=this.createToolbarButton(c,g,l);n=null!=n?n:this.container;n.appendChild(c);return c};EditorUi.prototype.createToolbarButton=function(c,g,l){var n=document.createElement("a");n.className="geButton";null!=c&&"data:"==c.substring(0,5)&&(n.style.backgroundImage="url("+c+")");null!=g&&n.setAttribute("title",g);null!=l&&mxEvent.addListener(n,"click",function(x){"disabled"!=n.getAttribute("disabled")&&
+l(x);mxEvent.consume(x)});mxEvent.preventDefault(n);return n};EditorUi.prototype.createMenuItem=function(c,g,l){var n=this.actions.get(c),x=null!=n?n.funct:null,F=this.createToolbarButton(g,mxResources.get(c)+(null!=n&&null!=n.shortcut?" ("+n.shortcut+")":""),x);null==n||l||(c=function(){n.isEnabled()?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",c),n.addListener("stateChanged",c),c());return F};EditorUi.prototype.createFormatWindow=
+function(){if(null==this.formatWindow){var c=this,g=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),l="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),g,60,240,l,mxUtils.bind(this,function(F){F.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var n=this.formatWindow.window.toggleMinimized,
x=240;this.formatWindow.window.toggleMinimized=function(){n.apply(this,arguments);this.minimized?(x=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+x-140+"px"):(this.div.style.width=x+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-x+140)+"px");c.format.refresh();this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,
-function(F){mxEvent.getSource(F)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var F=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,H=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>F||690>
-H)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var J=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var g=this.formatWindow;null!=g?g.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):J.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));
-var m=this.hsplitPosition,n=mxUtils.bind(this,function(){this.hsplitPosition=x;this.refresh();this.diagramContainer.scrollLeft-=m-this.hsplitPosition}),x=c?g:0,F=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(0)":"translateX(-100%)");0!=x&&n();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,
+function(F){mxEvent.getSource(F)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var F=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,G=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>F||690>
+G)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var I=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var g=this.formatWindow;null!=g?g.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):I.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));
+var l=this.hsplitPosition,n=mxUtils.bind(this,function(){this.hsplitPosition=x;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),x=c?g:0,F=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(0)":"translateX(-100%)");0!=x&&n();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,
"transition","transform "+F+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==x&&n()}),1E3*F)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};
-var S=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():S.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var g=mxUtils.bind(this,function(H,M){var L=this.menus.get(H);H=this.createMenuElement(M,mxUtils.bind(this,function(){L.funct.apply(this,arguments)}));H.setAttribute("title",M);H.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";
-H.className="geButton";c.parentNode.appendChild(H);return H});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))g=document.createElement("div"),g.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",g.className="geButton",g.style.left="0px",g.style.right="50%",mxUtils.write(g,mxResources.get("newLibrary")),c.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("newLibrary").funct),
-g=g.cloneNode(!1),g.style.left="50%",g.style.right="0px",mxUtils.write(g,mxResources.get("openLibrary")),c.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct);else{var m=g("newLibrary","");m.style.left="0px";m.style.right="50%";var n=document.createElement("span");m.appendChild(n);var x=g("openLibraryFrom","");x.style.borderLeftWidth="1px";x.style.left="50%";x.style.right="0px";var F=document.createElement("span");x.appendChild(F);this.dependsOnLanguage(mxUtils.bind(this,
-function(){n.innerHTML="";mxUtils.write(n,mxResources.get("newLibrary"));m.setAttribute("title",mxResources.get("newLibrary"));F.innerHTML="";mxUtils.write(F,mxResources.get("openLibraryFrom"));x.setAttribute("title",mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,
-650),m="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),m&&"1"!=urlParams.embedInline?66:10,m&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,c-6,g-6,mxUtils.bind(this,function(n){this.createShapesPanel(n)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,
+var S=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():S.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var g=mxUtils.bind(this,function(G,L){var M=this.menus.get(G);G=this.createMenuElement(L,mxUtils.bind(this,function(){M.funct.apply(this,arguments)}));G.setAttribute("title",L);G.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";
+G.className="geButton";c.parentNode.appendChild(G);return G});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))g=document.createElement("div"),g.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",g.className="geButton",g.style.left="0px",g.style.right="50%",mxUtils.write(g,mxResources.get("newLibrary")),c.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("newLibrary").funct),
+g=g.cloneNode(!1),g.style.left="50%",g.style.right="0px",mxUtils.write(g,mxResources.get("openLibrary")),c.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct);else{var l=g("newLibrary","");l.style.left="0px";l.style.right="50%";var n=document.createElement("span");l.appendChild(n);var x=g("openLibraryFrom","");x.style.borderLeftWidth="1px";x.style.left="50%";x.style.right="0px";var F=document.createElement("span");x.appendChild(F);this.dependsOnLanguage(mxUtils.bind(this,
+function(){n.innerHTML="";mxUtils.write(n,mxResources.get("newLibrary"));l.setAttribute("title",mxResources.get("newLibrary"));F.innerHTML="";mxUtils.write(F,mxResources.get("openLibraryFrom"));x.setAttribute("title",mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,
+650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,c-6,g-6,mxUtils.bind(this,function(n){this.createShapesPanel(n)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,
0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};EditorUi.prototype.setAndPersistDarkMode=function(c){var g=c;"auto"==c&&(g=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(g);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==
urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(c){this.spinner.spin(document.body,mxResources.get("working"))&&(mxSettings.setLanguage(c),mxSettings.save(),mxClient.language=c,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(c,g){this.dependsOnLanguage(mxUtils.bind(this,
function(){c.setAttribute("title",mxResources.get(g))}))};EditorUi.prototype.dependsOnLanguage=function(c){c();this.addListener("languageChanged",c)};EditorUi.prototype.setAndPersistHighContrast=function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&
-window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var g=document.getElementById("high-contrast-stylesheet");if(null!=g&&window.matchMedia){var m=window.matchMedia("(forced-colors: active)").matches,n=g.getAttribute("media");(n="all"==n||"not all"!=n&&m)&&!c?g.setAttribute("media",m?"not all":"(forced-colors: active)"):!n&&c&&g.setAttribute("media",m?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};
+window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var g=document.getElementById("high-contrast-stylesheet");if(null!=g&&window.matchMedia){var l=window.matchMedia("(forced-colors: active)").matches,n=g.getAttribute("media");(n="all"==n||"not all"!=n&&l)&&!c?g.setAttribute("media",l?"not all":"(forced-colors: active)"):!n&&c&&g.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};
EditorUi.prototype.setRulerVisible=function(c){var g=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.fireEvent(new mxEventObject("rulerVisibleChanged"));c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-g.x;this.diagramContainer.scrollTop+=c.x-g.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=
window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(c){mxUtils.lightDarkColorSupported&&(Editor.darkMode=c,c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container,mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff",null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),
c.style.colorScheme="dark"):(c.classList.remove("geDarkMode"),c.style.colorScheme="light")),null!=this.ruler&&this.ruler.updateStyle(),this.fireEvent(new mxEventObject("darkModeChanged")))};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,g){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=
c,Editor.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState(!0))),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=
-function(){var c=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,m=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)g.style.left="10px",g.style.top="10px",m.style.left="10px",m.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),
+function(){var c=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,l=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)g.style.left="10px",g.style.top="10px",l.style.left="10px",l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),
this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var n=this.diagramContainer.getAttribute("data-bounds");if(null!=n){this.diagramContainer.removeAttribute("data-bounds");var x=n.split(" ");n=mxUtils.getDocumentSize();this.diagramContainer.style.top=x[0];this.diagramContainer.style.left=x[1];var F=parseInt(x[2]);
x=parseInt(x[3]);F=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,F):F,n.width-80);x=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,x):x,n.height-80);this.diagramContainer.style.width=F+"px";this.diagramContainer.style.height=x+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}g.style.left=this.diagramContainer.offsetLeft+
-"px";g.style.top=this.diagramContainer.offsetTop-g.offsetHeight-4+"px";m.style.display="";m.style.left=this.diagramContainer.offsetLeft-m.offsetWidth-4+"px";m.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=g.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=
+"px";g.style.top=this.diagramContainer.offsetTop-g.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=g.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=
this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;
g.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||
"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize-4):(c.vertexFontSize=Graph.prototype.vertexFontSize,c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded=
"0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==
Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,
c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);
-this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var m=c.indexOf(",");0<m&&(g=this.getPageById(c.substring(m+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(g=this.getCustomLinkTitle(c));return g};EditorUi.prototype.getCustomLinkTitle=function(c){var g=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var m=JSON.parse(c.substring(17));
-null!=m&&null!=m.title&&(g=m.title)}catch(n){}return g};EditorUi.prototype.handleCustomLink=function(c,g){if(Graph.isPageLink(c))if(g=c.indexOf(","),c=this.getPageById(c.substring(g+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,g)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();
-if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(g){g.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(g){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(g,m){mxSettings.setCustomFonts(this.menus.customFonts);
-mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(g,m){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(g,m){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));
-c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(g,m){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,
-function(g,m){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(g,m){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?
+this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(g=this.getPageById(c.substring(l+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(g=this.getCustomLinkTitle(c));return g};EditorUi.prototype.getCustomLinkTitle=function(c){var g=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var l=JSON.parse(c.substring(17));
+null!=l&&null!=l.title&&(g=l.title)}catch(n){}return g};EditorUi.prototype.handleCustomLink=function(c,g){if(Graph.isPageLink(c))if(g=c.indexOf(","),c=this.getPageById(c.substring(g+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,g)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();
+if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(g){g.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(g){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(g,l){mxSettings.setCustomFonts(this.menus.customFonts);
+mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(g,l){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(g,l){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));
+c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(g,l){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,
+function(g,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(g,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));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.writeImageToClipboard=function(c,
-g,m,n,x,F){n=null!=n?n:"image/png";var H=null==g||null==m?'<img src="'+c+'">':'<img src="'+c+'" width="'+g+'" height="'+m+'">',M={"text/html":new Blob([H],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(n)&&(M[n]=this.base64ToBlob(c.substring(c.indexOf(",")+1),n));var L=new ClipboardItem(M);navigator.clipboard.write([L]).then(x)["catch"](F);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[c],"w",g,"h",m,"type",n,"html",[H],"data",[M],"item",[L])};EditorUi.prototype.writeHtmlToClipboard=
-function(c,g){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(c)],{type:"text/plain"}),"text/html":new Blob([c],{type:"text/html"})})])["catch"](g)};EditorUi.prototype.writeTextToClipboard=function(c,g){navigator.clipboard.writeText(c)["catch"](g)};EditorUi.prototype.copySvg=function(c,g,m){try{if(null!=navigator.clipboard&&"function"===typeof window.ClipboardItem){var n=this.editor.graph.getSvg(null,m,null,null,null,null,null,null,null,null,null,null,
-null,0<c.length?c:null);n.setAttribute("content",g);var x=Editor.createSvgDataUri(mxUtils.getXml(n)),F=parseInt(n.getAttribute("width")),H=parseInt(n.getAttribute("height"));this.writeImageToClipboard(x,F,H,"image/svg+xml",null,mxUtils.bind(this,function(M){this.handleError(M)}))}}catch(M){this.handleError(M)}};EditorUi.prototype.copyImage=function(c,g,m){try{m=null!=m?m:4,null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(n,x){try{this.spinner.stop();var F=this.createImageDataUri(n,g,"png"),H=Math.round(parseInt(x.getAttribute("width"))/m),M=Math.round(parseInt(x.getAttribute("height"))/m);EditorUi.debug("EditorUi.copyImage",[this],"cells",[c],"xml",[g],"scale",[m]);this.writeImageToClipboard(F,H,M,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var L=this.getBaseFilename(!1)+(null!=g?".drawio":"")+".png";this.saveLocalFile(F.substring(F.lastIndexOf(",")+
-1),L,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(L){this.handleError(L)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,null,m,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(n){this.handleError(n)}};EditorUi.prototype.copyCells=function(c,g){var m=this.editor.graph;if(m.isSelectionEmpty())c.innerText="";else{var n=mxUtils.sortCells(m.model.getTopmostCells(m.getSelectionCells())),
-x=mxUtils.getXml(m.encodeCells(n));mxUtils.setTextContent(c,encodeURIComponent(x));g?(m.removeCells(n,!1),m.lastPasteXml=null):(m.lastPasteXml=x,m.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeClipboard){var g=this.editor.graph;g.isSelectionEmpty()||(c=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(c)),navigator.clipboard.writeText(g))}return c};
-EditorUi.prototype.pasteXml=function(c,g,m,n,x,F){EditorUi.debug("EditorUi.pasteXml",[this],"xml",[c],"pasteAsLabel",[g],"compat",[m],"evt",[n],"html",[x],"pt",[F]);x=null!=x?x:!0;var H=this.editor.graph,M=null!=F?F:Editor.pasteAtMousePointer&&H.isMouseInsertPoint()?H.getInsertPoint():null;F=null;H.lastPasteXml==c?null==M&&H.pasteCounter++:(H.lastPasteXml=c,H.pasteCounter=0);var L=H.pasteCounter*H.gridSize;if(m||this.isCompatibleString(c)){H.model.beginUpdate();try{if(F=this.importXml(c,L,L),null!=
-M){var K=H.getBoundingBoxFromGeometry(F,!0);if(null!=K){var Z=Math.round(H.snap(M.x)),ha=Math.round(H.snap(M.y));H.cellsMoved(F,Z-K.x,ha-K.y)}}}finally{H.model.endUpdate()}H.setSelectionCells(F)}else if(g&&1==H.getSelectionCount()){g=H.getStartEditingCell(H.getSelectionCell(),n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==H.getCurrentCellStyle(g)[mxConstants.STYLE_SHAPE])H.setCellStyles(mxConstants.STYLE_IMAGE,c,[g]);else{H.model.beginUpdate();try{H.labelChanged(g,c),Graph.isLink(c)&&H.setLinkForCell(g,
-c)}finally{H.model.endUpdate()}}H.setSelectionCell(g)}else M=null!=M?M:H.getInsertPoint(),H.isMouseInsertPoint()&&(L=0,H.lastPasteXml==c&&0<H.pasteCounter&&H.pasteCounter--),F=this.insertTextAt(c,M.x+L,M.y+L,x),H.setSelectionCells(F);H.isSelectionEmpty()||(H.scrollCellToVisible(H.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(H.view.getState(H.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,g,m,n){if(!mxEvent.isConsumed(c)){var x=c.clipboardData,F=this.editor.graph,
-H=!1,M=g;if(m&&null!=x&&x.getData){var L=x.getData("text/plain"),K=!1;if(null!=L&&0<L.length&&"%3CmxGraphModel%3E"==L.substring(0,18))try{var Z=decodeURIComponent(L);this.isCompatibleString(Z)&&(K=!0,L=Z)}catch(ba){}K=K?null:x.getData("text/html");null!=K&&0<K.length?(M=this.parseHtmlData(K),H="text/plain"!=M.getAttribute("data-type")):null!=L&&0<L.length&&(M=document.createElement("div"),mxUtils.setTextContent(M,K))}L=M.getElementsByTagName("span");if(null!=L&&0<L.length&&"application/vnd.lucid.chart.objects"===
-L[0].getAttribute("data-lucid-type"))m=L[0].getAttribute("data-lucid-content"),null!=m&&0<m.length&&(this.convertLucidChart(m,mxUtils.bind(this,function(ba){var V=this.editor.graph;V.lastPasteXml==ba?V.pasteCounter++:(V.lastPasteXml=ba,V.pasteCounter=0);var k=V.pasteCounter*V.gridSize;V.setSelectionCells(this.importXml(ba,k,k));V.scrollCellToVisible(V.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(c));else{var ha=!1,ca="";ca=H?null!=M.textContent&&"<mxfile"==
-M.textContent.substring(0,7)&&"</mxfile>"==M.textContent.substring(M.textContent.length-9)||"<mxGraphModel"==M.textContent.substring(0,13)&&"</mxGraphModel>"==M.textContent.substring(M.textContent.length-15)?M.textContent.replace(/\u00a0/g," "):M.innerHTML:mxUtils.trim(null==M.innerText?mxUtils.getTextContent(M):M.innerText);try{var aa=ca.lastIndexOf("%3E");0<=aa&&aa<ca.length-3&&(ca=ca.substring(0,aa+3))}catch(ba){}try{L=M.getElementsByTagName("span"),(Z=null!=L&&0<L.length?mxUtils.trim(decodeURIComponent(L[0].textContent)):
-decodeURIComponent(ca))&&(this.isCompatibleString(Z)||0==Z.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ha=!0,ca=Z)}catch(ba){}Z=null;try{if(!ha&&""==M.textContent)for(aa=0;aa<x.items.length;aa++){var oa=x.items[aa];if("file"===oa.kind){Z=oa.getAsFile();break}}}catch(ba){}EditorUi.debug("EditorUi.pasteCells",[this],"evt",[c],"realElt",[g.outerHTML],"elt",[M.outerHTML],"useEvent",m,"pasteAsLabel",n,"xml",[ca],"compat",ha,"asHtml",H,"data",x,"items",[x.items.length],"files",[x.files.length],
-"types",[JSON.stringify(x.types)],"blob",[Z]);try{if(ha||null==Z)if(null!=ca&&0<ca.length){if(0==ca.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ka=mxUtils.bind(this,function(){try{ca=(new MiroImporter).importMiroJson(JSON.parse(ca)),this.pasteXml(ca,n,ha,c)}catch(ba){console.log("Miro import error:",ba)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ka):ka()}else this.pasteXml(ca,n,ha,c,H);mxEvent.consume(c)}else m||(F.lastPasteXml=null,F.pasteCounter=
-0);else{var da=F.getInsertPoint();this.importFiles([Z],da.x,da.y,this.maxImageSize);mxEvent.consume(c)}}catch(ba){this.handleError(ba)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.pasteFromClipboard=function(c){var g=this.editor.graph;if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,function(m,n,x,F,H){if(null!=m){g.getModel().beginUpdate();try{this.pasteXml(m,!0,null,null,null,c)}finally{g.getModel().endUpdate()}}else m=
-null!=n?n:null!=x?x:F,null!=m?(c=null!=c?c:g.getInsertPoint(),this.importFiles([m],c.x,c.y,this.maxImageSize)):this.pasteFromLocalClipboard(c)})):this.pasteFromLocalClipboard(c)}catch(m){}};EditorUi.prototype.pasteFromLocalClipboard=function(c){var g=this.editor.graph;g.getModel().beginUpdate();try{g.moveCellsTo(mxClipboard.paste(g),c)}finally{g.getModel().endUpdate()}};EditorUi.prototype.installImagePasteHandler=function(){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,
-function(g){for(var m=null!=g.clipboardData?g.clipboardData:g.originalEvent.clipboardData,n=!1,x=null,F=0;F<m.types.length;F++)if("text/"===m.types[F].substring(0,5)){n=!0;break}for(F=0;F<m.items.length;F++){var H=m.items[F];if("file"===H.kind){x=H.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[g],"data",[m],"items",[m.items.length],"files",[m.files.length],"types",[JSON.stringify(m.types)],"containsText",n,"file",[x],"editing",c.isEditing());var M=mxUtils.bind(this,
-function(){try{if(!n&&null!=x){if(c.isEditing())this.importFiles([x],0,0,this.maxImageSize,function(K,Z,ha,ca,aa,oa){c.insertImage(K,aa,oa)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var Z=0;Z<K.length;Z++)K[Z]()});else{var L=this.editor.graph.getInsertPoint();this.importFiles([x],L.x,L.y,this.maxImageSize)}mxEvent.consume(g)}}catch(K){}});if(!mxEvent.isConsumed(g)&&!n)if(Editor.enableNativeClipboard)navigator.clipboard.read().then(mxUtils.bind(this,function(L){this.readTypeFromClipboardData(L,
-"image/svg+xml",mxUtils.bind(this,function(K){if(null!=K){K=new Blob([K],{type:"image/svg+xml"});var Z=this.editor.graph.getInsertPoint();this.importFiles([K],Z.x,Z.y,this.maxImageSize)}else M()}),"image")}))["catch"](M);else M()}),!1)};EditorUi.prototype.readGraphModelFromClipboard=function(c){navigator.clipboard.read().then(mxUtils.bind(this,function(g){try{EditorUi.debug("EditorUi.readGraphModelFromClipboard",[this],"data",g,"types",null!=g&&0<g.length?[JSON.stringify(g[0].types)]:[]),this.readGraphModelFromHtmlClipboardData(g,
-mxUtils.bind(this,function(m,n){null!=m?c(m):this.readGraphModelFromImageClipboardData(g,mxUtils.bind(this,function(x,F,H){null!=x?c(x):this.readTypeFromClipboardData(g,"text/plain",mxUtils.bind(this,function(M){c(M,F,H,n,g)}))}))}))}catch(m){c(null)}}))["catch"](function(){c(null)})};EditorUi.prototype.readGraphModelFromHtmlClipboardData=function(c,g){this.readTypeFromClipboardData(c,"text/html",mxUtils.bind(this,function(m){var n=null,x=null;try{var F=this.parseHtmlData(m);if(null!=F){n="text/plain"!=
-F.getAttribute("data-type")?F.innerHTML:mxUtils.trim(null==F.innerText?mxUtils.getTextContent(F):F.innerText);try{var H=n.lastIndexOf("%3E");0<=H&&H<n.length-3&&(n=n.substring(0,H+3))}catch(K){}try{null==n&&(m=null,""==F.textContent&&1==F.children.length&&"IMG"==F.firstChild.nodeName&&(m=F.firstChild.getAttribute("src")),null!=m&&0<m.length&&("data:image/png;base64,"==m.substring(0,22)?x=this.base64ToBlob(m.substring(m.indexOf(",")+1),"image/png"):"data:image/svg+xml;base64,"==m.substring(0,26)&&
-(x=this.base64ToBlob(m.substring(m.indexOf(",")+1),"image/svg+xml"))))}catch(K){}try{var M=F.getElementsByTagName("span"),L=null!=M&&0<M.length?mxUtils.trim(decodeURIComponent(M[0].textContent)):decodeURIComponent(n);this.isCompatibleString(L)&&(n=L)}catch(K){}}}catch(K){}g(this.isCompatibleString(n)?n:null,x)}))};EditorUi.prototype.readGraphModelFromImageClipboardData=function(c,g){this.readTypeFromClipboardData(c,"image/svg+xml",mxUtils.bind(this,function(m,n){var x=null;try{null!=m&&(x=mxUtils.parseXml(m).documentElement.getAttribute("content"))}catch(F){}this.isCompatibleString(x)?
-g(x):this.readTypeFromClipboardData(c,"image/png",mxUtils.bind(this,function(F,H){x=Editor.extractGraphModelFromPng("data:image/png;base64,"+F);this.isCompatibleString(x)?g(x):g(null,n,H)}))}))};EditorUi.prototype.readTypeFromClipboardData=function(c,g,m){var n=!1;if(null!=c&&0<c.length)for(var x=0;x<c.length&&!n;x++)(function(F){0<=mxUtils.indexOf(F.types,g)&&(n=!0,F.getType(g).then(mxUtils.bind(this,function(H){if("image/png"==g)H.arrayBuffer().then(function(M){m(btoa(Graph.arrayBufferToString(M)),
-H)})["catch"](function(){m(null)});else H.text().then(mxUtils.bind(this,function(M){EditorUi.debug("EditorUi.readTypeFromClipboardData",[this],"data",[c],"type",[g],"result",[M]);m(M,H)}))["catch"](function(){m(null)})}))["catch"](function(){m(null)}))})(c[x]);n||m()};EditorUi.prototype.parseHtmlData=function(c){var g=null;if(null!=c&&0<c.length){var m="<meta "==c.substring(0,6);g=document.createElement("div");g.innerHTML=(m?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(c);asHtml=!0;m=g.getElementsByTagName("style");
-if(null!=m)for(;0<m.length;)m[0].parentNode.removeChild(m[0]);if(null!=g.firstChild&&g.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=g.firstChild.nextSibling&&g.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==g.firstChild.nodeName&&"A"==g.firstChild.nextSibling.nodeName&&null==g.firstChild.nextSibling.nextSibling){var n=null==g.firstChild.nextSibling.innerText?mxUtils.getTextContent(g.firstChild.nextSibling):g.firstChild.nextSibling.innerText;n==g.firstChild.nextSibling.getAttribute("href")&&
-(mxUtils.setTextContent(g,n),asHtml=!1)}if(""==g.textContent&&(m=g.getElementsByTagName("img"),1==m.length&&(n=m[0].getAttribute("src"),m=null,null!=n))){if(Editor.isPngDataUrl(n)){var x=Editor.extractGraphModelFromPng(n);null!=x&&0<x.length&&(m=x)}else if("data:image/svg+xml;base64,"==n.substring(0,26)){img=this.base64ToBlob(n.substring(n.indexOf(",")+1),"image/svg+xml");n=Graph.getSvgFromDataUri(n);try{x=mxUtils.parseXml(n).documentElement.getAttribute("content"),this.isCompatibleString(x)&&(m=
-x)}catch(F){}}null!=m&&(mxUtils.setTextContent(g,m),asHtml=!1)}asHtml?Graph.removePasteFormatting(g):g.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[c],"elt",[g],"asHtml",asHtml);return g};EditorUi.prototype.showPrintDialog=function(c,g,m){var n=330;this.editor.graph.isEnabled()&&(n+=40);null!=this.pages&&1<this.pages.length&&(n+=40,this.editor.graph.isEnabled()||(n+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(n+=20);this.showDialog((new PrintDialog(this,
-c,g,m)).container,320,n,!0,!0)};EditorUi.prototype.print=function(c,g){var m=this.editor,n=m.graph,x=this.getPageIndex(this.currentPage),F=null!=x?x+1:1,H=mxUtils.bind(this,function(ba,V,k,v){var I=ba.useCssTransforms,N=ba.currentTranslate,T=ba.currentScale,W=ba.view.translate,U=ba.view.scale;ba.useCssTransforms&&(ba.useCssTransforms=!1,ba.currentTranslate=new mxPoint(0,0),ba.currentScale=1,ba.view.translate=new mxPoint(0,0),ba.view.scale=1);var Y=ba.getGraphBounds(),fa=0,na=0,la=mxRectangle.fromRectangle(ba.pageFormat),
-qa=g.fit||g.crop||!ba.pageVisible,ya=g.scale;la.width=Math.ceil(la.width*ba.pageScale);la.height=Math.ceil(la.height*ba.pageScale);var wa=1;if(g.fit){wa=g.sheetsAcross;var Ia=g.sheetsDown;isNaN(ya)||(la.width=Math.ceil(la.width*ya),la.height=Math.ceil(la.height*ya));wa=Math.min(la.height*Ia/(Y.height/ba.view.scale),la.width*wa/(Y.width/ba.view.scale))}else wa=isNaN(ya)?1:ya;wa*=1;!qa&&ba.pageVisible?(ya=ba.getPageLayout(),fa-=ya.x*la.width,na-=ya.y*la.height):qa=!0;g.crop&&(g.selection&&(Y=n.getBoundingBox(n.getSelectionCells())),
-la.width=(Y.width+1)*wa/ba.view.scale,la.height=(Y.height+1)*wa/ba.view.scale);la.width=Math.ceil(1*la.width);la.height=Math.ceil(1*la.height);v=null!=v?"page/id,"+v:null;if(null==V){V=PrintDialog.createPrintPreview(ba,wa,null,0,fa,na,qa);V.title=this.getBaseFilename(!0);V.pageSelector=!1;V.mathEnabled=!1;fa=g.border;isNaN(fa)||(V.pageMargin=fa);g.selection&&(V.isCellVisible=function(Ma){return ba.isCellSelected(Ma)});var Aa=V.writeHead;V.writeHead=function(Ma,sa){sa=null!=sa?sa:"";g.shadows||(sa+=
-'g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');mxClient.IS_GC&&(sa+="@media print {\n .MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=m.fontCss&&(sa+=m.fontCss);Aa.apply(this,arguments);for(var Ca=ba.getCustomFonts(),Da=0;Da<Ca.length;Da++){var va=Ca[Da].name,Na=Ca[Da].url;Graph.isCssFontUrl(Na)?Ma.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Na))+'" charset="UTF-8" type="text/css">'):(Ma.writeln('<style type="text/css">'),
+g,l,n,x,F){n=null!=n?n:"image/png";var G=null==g||null==l?'<img src="'+c+'">':'<img src="'+c+'" width="'+g+'" height="'+l+'">',L={"text/html":new Blob([G],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(n)&&(L[n]=this.base64ToBlob(c.substring(c.indexOf(",")+1),n));var M=new ClipboardItem(L);navigator.clipboard.write([M]).then(x)["catch"](F);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[c],"w",g,"h",l,"type",n,"html",[G],"data",[L],"item",[M])};EditorUi.prototype.writeHtmlToClipboard=
+function(c,g){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(c)],{type:"text/plain"}),"text/html":new Blob([c],{type:"text/html"})})])["catch"](g)};EditorUi.prototype.writeTextToClipboard=function(c,g){navigator.clipboard.writeText(c)["catch"](g)};EditorUi.prototype.copySvg=function(c,g,l){try{if(null!=navigator.clipboard&&"function"===typeof window.ClipboardItem){var n=this.editor.graph.getSvg(null,l,null,null,null,null,null,null,null,null,null,null,
+null,0<c.length?c:null);n.setAttribute("content",g);var x=Editor.createSvgDataUri(mxUtils.getXml(n)),F=parseInt(n.getAttribute("width")),G=parseInt(n.getAttribute("height"));this.writeImageToClipboard(x,F,G,"image/svg+xml",null,mxUtils.bind(this,function(L){this.handleError(L)}))}}catch(L){this.handleError(L)}};EditorUi.prototype.copyImage=function(c,g,l){try{l=null!=l?l:4,null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
+this.editor.exportToCanvas(mxUtils.bind(this,function(n,x){try{this.spinner.stop();var F=this.createImageDataUri(n,g,"png"),G=Math.round(parseInt(x.getAttribute("width"))/l),L=Math.round(parseInt(x.getAttribute("height"))/l);EditorUi.debug("EditorUi.copyImage",[this],"cells",[c],"xml",[g],"scale",[l]);this.writeImageToClipboard(F,G,L,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var M=this.getBaseFilename(!1)+(null!=g?".drawio":"")+".png";this.saveLocalFile(F.substring(F.lastIndexOf(",")+
+1),M,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(M){this.handleError(M)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,null,l,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(n){this.handleError(n)}};EditorUi.prototype.copyCells=function(c,g){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText="";else{var n=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),
+x=mxUtils.getXml(l.encodeCells(n));mxUtils.setTextContent(c,encodeURIComponent(x));g?(l.removeCells(n,!1),l.lastPasteXml=null):(l.lastPasteXml=x,l.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeClipboard){var g=this.editor.graph;g.isSelectionEmpty()||(c=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(c)),navigator.clipboard.writeText(g))}return c};
+EditorUi.prototype.pasteXml=function(c,g,l,n,x,F){EditorUi.debug("EditorUi.pasteXml",[this],"xml",[c],"pasteAsLabel",[g],"compat",[l],"evt",[n],"html",[x],"pt",[F]);x=null!=x?x:!0;var G=this.editor.graph,L=null!=F?F:Editor.pasteAtMousePointer&&G.isMouseInsertPoint()?G.getInsertPoint():null;F=null;G.lastPasteXml==c?null==L&&G.pasteCounter++:(G.lastPasteXml=c,G.pasteCounter=0);var M=G.pasteCounter*G.gridSize;if(l||this.isCompatibleString(c)){G.model.beginUpdate();try{if(F=this.importXml(c,M,M),null!=
+L){var K=G.getBoundingBoxFromGeometry(F,!0);if(null!=K){var Z=Math.round(G.snap(L.x)),ja=Math.round(G.snap(L.y));G.cellsMoved(F,Z-K.x,ja-K.y)}}}finally{G.model.endUpdate()}G.setSelectionCells(F)}else if(g&&1==G.getSelectionCount()){g=G.getStartEditingCell(G.getSelectionCell(),n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==G.getCurrentCellStyle(g)[mxConstants.STYLE_SHAPE])G.setCellStyles(mxConstants.STYLE_IMAGE,c,[g]);else{G.model.beginUpdate();try{G.labelChanged(g,c),Graph.isLink(c)&&G.setLinkForCell(g,
+c)}finally{G.model.endUpdate()}}G.setSelectionCell(g)}else L=null!=L?L:G.getInsertPoint(),G.isMouseInsertPoint()&&(M=0,G.lastPasteXml==c&&0<G.pasteCounter&&G.pasteCounter--),F=this.insertTextAt(c,L.x+M,L.y+M,x),G.setSelectionCells(F);G.isSelectionEmpty()||(G.scrollCellToVisible(G.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(G.view.getState(G.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,g,l,n){if(!mxEvent.isConsumed(c)){var x=c.clipboardData,F=this.editor.graph,
+G=!1,L=g;if(l&&null!=x&&x.getData){var M=x.getData("text/plain"),K=!1;if(null!=M&&0<M.length&&"%3CmxGraphModel%3E"==M.substring(0,18))try{var Z=decodeURIComponent(M);this.isCompatibleString(Z)&&(K=!0,M=Z)}catch(aa){}K=K?null:x.getData("text/html");null!=K&&0<K.length?(L=this.parseHtmlData(K),G="text/plain"!=L.getAttribute("data-type")):null!=M&&0<M.length&&(L=document.createElement("div"),mxUtils.setTextContent(L,K))}M=L.getElementsByTagName("span");if(null!=M&&0<M.length&&"application/vnd.lucid.chart.objects"===
+M[0].getAttribute("data-lucid-type"))l=M[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(aa){var V=this.editor.graph;V.lastPasteXml==aa?V.pasteCounter++:(V.lastPasteXml=aa,V.pasteCounter=0);var k=V.pasteCounter*V.gridSize;V.setSelectionCells(this.importXml(aa,k,k));V.scrollCellToVisible(V.getSelectionCell())}),mxUtils.bind(this,function(aa){this.handleError(aa)})),mxEvent.consume(c));else{var ja=!1,da="";da=G?null!=L.textContent&&"<mxfile"==
+L.textContent.substring(0,7)&&"</mxfile>"==L.textContent.substring(L.textContent.length-9)||"<mxGraphModel"==L.textContent.substring(0,13)&&"</mxGraphModel>"==L.textContent.substring(L.textContent.length-15)?L.textContent.replace(/\u00a0/g," "):L.innerHTML:mxUtils.trim(null==L.innerText?mxUtils.getTextContent(L):L.innerText);try{var ba=da.lastIndexOf("%3E");0<=ba&&ba<da.length-3&&(da=da.substring(0,ba+3))}catch(aa){}try{M=L.getElementsByTagName("span"),(Z=null!=M&&0<M.length?mxUtils.trim(decodeURIComponent(M[0].textContent)):
+decodeURIComponent(da))&&(this.isCompatibleString(Z)||0==Z.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ja=!0,da=Z)}catch(aa){}Z=null;try{if(!ja&&""==L.textContent)for(ba=0;ba<x.items.length;ba++){var na=x.items[ba];if("file"===na.kind){Z=na.getAsFile();break}}}catch(aa){}EditorUi.debug("EditorUi.pasteCells",[this],"evt",[c],"realElt",[g.outerHTML],"elt",[L.outerHTML],"useEvent",l,"pasteAsLabel",n,"xml",[da],"compat",ja,"asHtml",G,"data",x,"items",[x.items.length],"files",[x.files.length],
+"types",[JSON.stringify(x.types)],"blob",[Z]);try{if(ja||null==Z)if(null!=da&&0<da.length){if(0==da.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ka=mxUtils.bind(this,function(){try{da=(new MiroImporter).importMiroJson(JSON.parse(da)),this.pasteXml(da,n,ja,c)}catch(aa){console.log("Miro import error:",aa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ka):ka()}else this.pasteXml(da,n,ja,c,G);mxEvent.consume(c)}else l||(F.lastPasteXml=null,F.pasteCounter=
+0);else{var ca=F.getInsertPoint();this.importFiles([Z],ca.x,ca.y,this.maxImageSize);mxEvent.consume(c)}}catch(aa){this.handleError(aa)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.pasteFromClipboard=function(c){var g=this.editor.graph;if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,function(l,n,x,F,G){if(null!=l){g.getModel().beginUpdate();try{this.pasteXml(l,!0,null,null,null,c)}finally{g.getModel().endUpdate()}}else l=
+null!=n?n:null!=x?x:F,null!=l?(c=null!=c?c:g.getInsertPoint(),this.importFiles([l],c.x,c.y,this.maxImageSize)):this.pasteFromLocalClipboard(c)})):this.pasteFromLocalClipboard(c)}catch(l){}};EditorUi.prototype.pasteFromLocalClipboard=function(c){var g=this.editor.graph;g.getModel().beginUpdate();try{g.moveCellsTo(mxClipboard.paste(g),c)}finally{g.getModel().endUpdate()}};EditorUi.prototype.installImagePasteHandler=function(){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,
+function(g){for(var l=null!=g.clipboardData?g.clipboardData:g.originalEvent.clipboardData,n=!1,x=null,F=0;F<l.types.length;F++)if("text/"===l.types[F].substring(0,5)){n=!0;break}for(F=0;F<l.items.length;F++){var G=l.items[F];if("file"===G.kind){x=G.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[g],"data",[l],"items",[l.items.length],"files",[l.files.length],"types",[JSON.stringify(l.types)],"containsText",n,"file",[x],"editing",c.isEditing());var L=mxUtils.bind(this,
+function(){try{if(!n&&null!=x){if(c.isEditing())this.importFiles([x],0,0,this.maxImageSize,function(K,Z,ja,da,ba,na){c.insertImage(K,ba,na)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var Z=0;Z<K.length;Z++)K[Z]()});else{var M=this.editor.graph.getInsertPoint();this.importFiles([x],M.x,M.y,this.maxImageSize)}mxEvent.consume(g)}}catch(K){}});if(!mxEvent.isConsumed(g)&&!n)if(Editor.enableNativeClipboard)navigator.clipboard.read().then(mxUtils.bind(this,function(M){this.readTypeFromClipboardData(M,
+"image/svg+xml",mxUtils.bind(this,function(K){if(null!=K){K=new Blob([K],{type:"image/svg+xml"});var Z=this.editor.graph.getInsertPoint();this.importFiles([K],Z.x,Z.y,this.maxImageSize)}else L()}),"image")}))["catch"](L);else L()}),!1)};EditorUi.prototype.readGraphModelFromClipboard=function(c){navigator.clipboard.read().then(mxUtils.bind(this,function(g){try{EditorUi.debug("EditorUi.readGraphModelFromClipboard",[this],"data",g,"types",null!=g&&0<g.length?[JSON.stringify(g[0].types)]:[]),this.readGraphModelFromHtmlClipboardData(g,
+mxUtils.bind(this,function(l,n){null!=l?c(l):this.readGraphModelFromImageClipboardData(g,mxUtils.bind(this,function(x,F,G){null!=x?c(x):this.readTypeFromClipboardData(g,"text/plain",mxUtils.bind(this,function(L){c(L,F,G,n,g)}))}))}))}catch(l){c(null)}}))["catch"](function(){c(null)})};EditorUi.prototype.readGraphModelFromHtmlClipboardData=function(c,g){this.readTypeFromClipboardData(c,"text/html",mxUtils.bind(this,function(l){var n=null,x=null;try{var F=this.parseHtmlData(l);if(null!=F){n="text/plain"!=
+F.getAttribute("data-type")?F.innerHTML:mxUtils.trim(null==F.innerText?mxUtils.getTextContent(F):F.innerText);try{var G=n.lastIndexOf("%3E");0<=G&&G<n.length-3&&(n=n.substring(0,G+3))}catch(K){}try{null==n&&(l=null,""==F.textContent&&1==F.children.length&&"IMG"==F.firstChild.nodeName&&(l=F.firstChild.getAttribute("src")),null!=l&&0<l.length&&("data:image/png;base64,"==l.substring(0,22)?x=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/png"):"data:image/svg+xml;base64,"==l.substring(0,26)&&
+(x=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/svg+xml"))))}catch(K){}try{var L=F.getElementsByTagName("span"),M=null!=L&&0<L.length?mxUtils.trim(decodeURIComponent(L[0].textContent)):decodeURIComponent(n);this.isCompatibleString(M)&&(n=M)}catch(K){}}}catch(K){}g(this.isCompatibleString(n)?n:null,x)}))};EditorUi.prototype.readGraphModelFromImageClipboardData=function(c,g){this.readTypeFromClipboardData(c,"image/svg+xml",mxUtils.bind(this,function(l,n){var x=null;try{null!=l&&(x=mxUtils.parseXml(l).documentElement.getAttribute("content"))}catch(F){}this.isCompatibleString(x)?
+g(x):this.readTypeFromClipboardData(c,"image/png",mxUtils.bind(this,function(F,G){x=Editor.extractGraphModelFromPng("data:image/png;base64,"+F);this.isCompatibleString(x)?g(x):g(null,n,G)}))}))};EditorUi.prototype.readTypeFromClipboardData=function(c,g,l){var n=!1;if(null!=c&&0<c.length)for(var x=0;x<c.length&&!n;x++)(function(F){0<=mxUtils.indexOf(F.types,g)&&(n=!0,F.getType(g).then(mxUtils.bind(this,function(G){if("image/png"==g)G.arrayBuffer().then(function(L){l(btoa(Graph.arrayBufferToString(L)),
+G)})["catch"](function(){l(null)});else G.text().then(mxUtils.bind(this,function(L){EditorUi.debug("EditorUi.readTypeFromClipboardData",[this],"data",[c],"type",[g],"result",[L]);l(L,G)}))["catch"](function(){l(null)})}))["catch"](function(){l(null)}))})(c[x]);n||l()};EditorUi.prototype.parseHtmlData=function(c){var g=null;if(null!=c&&0<c.length){var l="<meta "==c.substring(0,6);g=document.createElement("div");g.innerHTML=(l?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(c);asHtml=!0;l=g.getElementsByTagName("style");
+if(null!=l)for(;0<l.length;)l[0].parentNode.removeChild(l[0]);if(null!=g.firstChild&&g.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=g.firstChild.nextSibling&&g.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==g.firstChild.nodeName&&"A"==g.firstChild.nextSibling.nodeName&&null==g.firstChild.nextSibling.nextSibling){var n=null==g.firstChild.nextSibling.innerText?mxUtils.getTextContent(g.firstChild.nextSibling):g.firstChild.nextSibling.innerText;n==g.firstChild.nextSibling.getAttribute("href")&&
+(mxUtils.setTextContent(g,n),asHtml=!1)}if(""==g.textContent&&(l=g.getElementsByTagName("img"),1==l.length&&(n=l[0].getAttribute("src"),l=null,null!=n))){if(Editor.isPngDataUrl(n)){var x=Editor.extractGraphModelFromPng(n);null!=x&&0<x.length&&(l=x)}else if("data:image/svg+xml;base64,"==n.substring(0,26)){img=this.base64ToBlob(n.substring(n.indexOf(",")+1),"image/svg+xml");n=Graph.getSvgFromDataUri(n);try{x=mxUtils.parseXml(n).documentElement.getAttribute("content"),this.isCompatibleString(x)&&(l=
+x)}catch(F){}}null!=l&&(mxUtils.setTextContent(g,l),asHtml=!1)}asHtml?Graph.removePasteFormatting(g):g.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[c],"elt",[g],"asHtml",asHtml);return g};EditorUi.prototype.showPrintDialog=function(c,g,l){var n=330;this.editor.graph.isEnabled()&&(n+=40);null!=this.pages&&1<this.pages.length&&(n+=40,this.editor.graph.isEnabled()||(n+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(n+=20);this.showDialog((new PrintDialog(this,
+c,g,l)).container,320,n,!0,!0)};EditorUi.prototype.print=function(c,g){var l=this.editor,n=l.graph,x=this.getPageIndex(this.currentPage),F=null!=x?x+1:1,G=mxUtils.bind(this,function(aa,V,k,v){var J=aa.useCssTransforms,N=aa.currentTranslate,T=aa.currentScale,W=aa.view.translate,U=aa.view.scale;aa.useCssTransforms&&(aa.useCssTransforms=!1,aa.currentTranslate=new mxPoint(0,0),aa.currentScale=1,aa.view.translate=new mxPoint(0,0),aa.view.scale=1);var Y=aa.getGraphBounds(),fa=0,oa=0,la=mxRectangle.fromRectangle(aa.pageFormat),
+qa=g.fit||g.crop||!aa.pageVisible,ya=g.scale;la.width=Math.ceil(la.width*aa.pageScale);la.height=Math.ceil(la.height*aa.pageScale);var wa=1;if(g.fit){wa=g.sheetsAcross;var Ia=g.sheetsDown;isNaN(ya)||(la.width=Math.ceil(la.width*ya),la.height=Math.ceil(la.height*ya));wa=Math.min(la.height*Ia/(Y.height/aa.view.scale),la.width*wa/(Y.width/aa.view.scale))}else wa=isNaN(ya)?1:ya;wa*=1;!qa&&aa.pageVisible?(ya=aa.getPageLayout(),fa-=ya.x*la.width,oa-=ya.y*la.height):qa=!0;g.crop&&(g.selection&&(Y=n.getBoundingBox(n.getSelectionCells())),
+la.width=(Y.width+1)*wa/aa.view.scale,la.height=(Y.height+1)*wa/aa.view.scale);la.width=Math.ceil(1*la.width);la.height=Math.ceil(1*la.height);v=null!=v?"page/id,"+v:null;if(null==V){V=PrintDialog.createPrintPreview(aa,wa,null,0,fa,oa,qa);V.title=this.getBaseFilename(!0);V.pageSelector=!1;V.mathEnabled=!1;fa=g.border;isNaN(fa)||(V.pageMargin=fa);g.selection&&(V.isCellVisible=function(Ma){return aa.isCellSelected(Ma)});var Aa=V.writeHead;V.writeHead=function(Ma,sa){sa=null!=sa?sa:"";g.shadows||(sa+=
+'g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');mxClient.IS_GC&&(sa+="@media print {\n .MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=l.fontCss&&(sa+=l.fontCss);Aa.apply(this,arguments);for(var Ca=aa.getCustomFonts(),Da=0;Da<Ca.length;Da++){var va=Ca[Da].name,Na=Ca[Da].url;Graph.isCssFontUrl(Na)?Ma.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Na))+'" charset="UTF-8" type="text/css">'):(Ma.writeln('<style type="text/css">'),
Ma.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(va)+'";\nsrc: url("'+mxUtils.htmlEntities(Na)+'");\n}'),Ma.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var Ba=V.drawBackgroundImage;V.drawBackgroundImage=function(Ma){Ba.apply(this,arguments);null!=Ma.node&&(EditorUi.embedSvgImages(Ma.node),n.disableSvgLinks(Ma.node,function(sa){sa.setAttribute("href","javascript:void(0)")}))}}var Ga=V.addGraphFragment;V.addGraphFragment=function(Ma,sa,Ca,Da,va,Na){Ga.apply(this,arguments);this.graph.mathEnabled?
-this.mathEnabled=this.mathEnabled||!0:va.classList.add("geDisableMathJax");if(this.graph.shadowVisible)for(var Sa=va.getElementsByTagName("svg"),Ua=0;Ua<Sa.length;Ua++)ba.addSvgShadow(Sa[Ua])};g.grid&&(V.gridSize=ba.gridSize,V.gridSteps=ba.view.gridSteps,V.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ba.view.gridColor);V.open(null,null,k,!0,v,la,g.selection?ba.getSelectionCells():null)}else{Y=ba.background;if(null==Y||""==Y||Y==mxConstants.NONE)Y="#ffffff";V.backgroundColor=
-Y;V.autoOrigin=qa;g.grid&&(V.gridSize=ba.gridSize,V.gridSteps=ba.view.gridSteps,V.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ba.view.gridColor);V.appendGraph(ba,wa,fa,na,k,!0,v,la,g.selection?ba.getSelectionCells():null);k=ba.getCustomFonts();if(null!=V.wnd)for(la=0;la<k.length;la++)fa=k[la].name,na=k[la].url,Graph.isCssFontUrl(na)?V.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(na)+'" charset="UTF-8" type="text/css">'):(V.wnd.document.writeln('<style type="text/css">'),
-V.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fa)+'";\nsrc: url("'+mxUtils.htmlEntities(na)+'");\n}'),V.wnd.document.writeln("</style>"))}I&&(ba.useCssTransforms=I,ba.currentTranslate=N,ba.currentScale=T,ba.view.translate=W,ba.view.scale=U);return V}),M=g.pagesFrom,L=g.pagesTo,K=!g.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,g);else{K&&(K=g.selection||M==F&&L==F);if(!K&&null!=this.pages&&this.pages.length){K=0;F=this.pages.length-1;g.allPages||
-(K=parseInt(M)-1,F=parseInt(L)-1);for(var Z=K;Z<=F;Z++){var ha=this.pages[Z];M=ha==this.currentPage?n:null;if(null==M){M=this.createTemporaryGraph(n.stylesheet);M.shapeForegroundColor=n.shapeForegroundColor;M.shapeBackgroundColor=n.shapeBackgroundColor;L=!0;var ca=K=!1,aa=null,oa=null;null==ha.viewState&&null==ha.root&&this.updatePageRoot(ha);null!=ha.viewState&&(L=ha.viewState.pageVisible,K=ha.viewState.mathEnabled,ca=ha.viewState.shadowVisible,aa=ha.viewState.background,oa=ha.viewState.backgroundImage,
-M.pageFormat=ha.viewState.pageFormat,M.gridSize=ha.viewState.gridSize);null!=oa&&null!=oa.originalSrc&&(oa=this.createImageForPageLink(oa.originalSrc,ha));M.background=aa;M.backgroundImage=null!=oa?new mxImage(oa.src,oa.width,oa.height,oa.x,oa.y):null;M.pageVisible=L;M.mathEnabled=K;M.shadowVisible=ca;var da=M.getGraphBounds;M.getGraphBounds=function(){var ba=da.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var k=this.view.translate,v=this.view.scale;ba=mxRectangle.fromRectangle(ba);
-ba.add(new mxRectangle((k.x+V.x)*v,(k.y+V.y)*v,V.width*v,V.height*v))}return ba};var ka=M.getGlobalVariable;M.getGlobalVariable=function(ba){return"page"==ba?ha.getName():"pagenumber"==ba?Z+1:"pagecount"==ba?null!=this.pages?this.pages.length:1:ka.apply(this,arguments)};document.body.appendChild(M.container);this.updatePageRoot(ha);M.model.setRoot(ha.root)}x=H(M,x,Z!=F,ha.getId());M!=n&&M.container.parentNode.removeChild(M.container)}}else x=H(n);null==x||null==x.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):
-(x.mathEnabled&&(H=x.wnd.document,c||(x.wnd.IMMEDIATE_PRINT=!0),H.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),x.closeDocument(),Graph.rewritePageLinks(x.wnd.document,!0),x.mathEnabled||c||PrintDialog.printPreview(x));return x}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var g=null,m=0;m<c.length;m++)mxEvent.addListener(c[m],"dragleave",function(n){null!=g&&(g.parentNode.removeChild(g),g=null);n.stopPropagation();n.preventDefault()}),
-mxEvent.addListener(c[m],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(g=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(c[m],"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,
+this.mathEnabled=this.mathEnabled||!0:va.classList.add("geDisableMathJax");if(this.graph.shadowVisible)for(var Sa=va.getElementsByTagName("svg"),Ua=0;Ua<Sa.length;Ua++)aa.addSvgShadow(Sa[Ua])};g.grid&&(V.gridSize=aa.gridSize,V.gridSteps=aa.view.gridSteps,V.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:aa.view.gridColor);V.open(null,null,k,!0,v,la,g.selection?aa.getSelectionCells():null)}else{Y=aa.background;if(null==Y||""==Y||Y==mxConstants.NONE)Y="#ffffff";V.backgroundColor=
+Y;V.autoOrigin=qa;g.grid&&(V.gridSize=aa.gridSize,V.gridSteps=aa.view.gridSteps,V.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:aa.view.gridColor);V.appendGraph(aa,wa,fa,oa,k,!0,v,la,g.selection?aa.getSelectionCells():null);k=aa.getCustomFonts();if(null!=V.wnd)for(la=0;la<k.length;la++)fa=k[la].name,oa=k[la].url,Graph.isCssFontUrl(oa)?V.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(oa)+'" charset="UTF-8" type="text/css">'):(V.wnd.document.writeln('<style type="text/css">'),
+V.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fa)+'";\nsrc: url("'+mxUtils.htmlEntities(oa)+'");\n}'),V.wnd.document.writeln("</style>"))}J&&(aa.useCssTransforms=J,aa.currentTranslate=N,aa.currentScale=T,aa.view.translate=W,aa.view.scale=U);return V}),L=g.pagesFrom,M=g.pagesTo,K=!g.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,g);else{K&&(K=g.selection||L==F&&M==F);if(!K&&null!=this.pages&&this.pages.length){K=0;F=this.pages.length-1;g.allPages||
+(K=parseInt(L)-1,F=parseInt(M)-1);for(var Z=K;Z<=F;Z++){var ja=this.pages[Z];L=ja==this.currentPage?n:null;if(null==L){L=this.createTemporaryGraph(n.stylesheet);L.shapeForegroundColor=n.shapeForegroundColor;L.shapeBackgroundColor=n.shapeBackgroundColor;M=!0;var da=K=!1,ba=null,na=null;null==ja.viewState&&null==ja.root&&this.updatePageRoot(ja);null!=ja.viewState&&(M=ja.viewState.pageVisible,K=ja.viewState.mathEnabled,da=ja.viewState.shadowVisible,ba=ja.viewState.background,na=ja.viewState.backgroundImage,
+L.pageFormat=ja.viewState.pageFormat,L.gridSize=ja.viewState.gridSize);null!=na&&null!=na.originalSrc&&(na=this.createImageForPageLink(na.originalSrc,ja));L.background=ba;L.backgroundImage=null!=na?new mxImage(na.src,na.width,na.height,na.x,na.y):null;L.pageVisible=M;L.mathEnabled=K;L.shadowVisible=da;var ca=L.getGraphBounds;L.getGraphBounds=function(){var aa=ca.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var k=this.view.translate,v=this.view.scale;aa=mxRectangle.fromRectangle(aa);
+aa.add(new mxRectangle((k.x+V.x)*v,(k.y+V.y)*v,V.width*v,V.height*v))}return aa};var ka=L.getGlobalVariable;L.getGlobalVariable=function(aa){return"page"==aa?ja.getName():"pagenumber"==aa?Z+1:"pagecount"==aa?null!=this.pages?this.pages.length:1:ka.apply(this,arguments)};document.body.appendChild(L.container);this.updatePageRoot(ja);L.model.setRoot(ja.root)}x=G(L,x,Z!=F,ja.getId());L!=n&&L.container.parentNode.removeChild(L.container)}}else x=G(n);null==x||null==x.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):
+(x.mathEnabled&&(G=x.wnd.document,c||(x.wnd.IMMEDIATE_PRINT=!0),G.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),x.closeDocument(),Graph.rewritePageLinks(x.wnd.document,!0),x.mathEnabled||c||PrintDialog.printPreview(x));return x}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var g=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(n){null!=g&&(g.parentNode.removeChild(g),g=null);n.stopPropagation();n.preventDefault()}),
+mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(g=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(c[l],"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 x=this.extractGraphModelFromEvent(n);if(null==x){var F=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=F&&(10==document.documentMode||11==document.documentMode?x=F.getData("Text"):(x=null,x=0<=mxUtils.indexOf(F.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(F.types,"text/html")?F.getData("text/html"):null,null!=x&&0<x.length?(F=document.createElement("div"),
F.innerHTML=Graph.sanitizeHtml(x),F=F.getElementsByTagName("img"),0<F.length&&(x=F[0].getAttribute("src"))):0<=mxUtils.indexOf(F.types,"text/plain")&&(x=F.getData("text/plain"))),null!=x&&(Editor.isPngDataUrl(x)?(x=Editor.extractGraphModelFromPng(x),null!=x&&0<x.length&&this.openLocalFile(x,null,!0)):this.isRemoteFileFormat(x)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(x))).send(mxUtils.bind(this,
-function(H){200<=H.getStatus()&&299>=H.getStatus()?this.openLocalFile(H.getText(),null,!0):this.showError(mxResources.get("error"),413==H.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(x)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(x):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(x)))))}else this.openLocalFile(x,null,
-!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var g=0,m=0;if(null==c){var n=document.body;var x=document.documentElement;var F=(n.clientWidth||x.clientWidth)-3;n=Math.max(n.clientHeight||0,x.clientHeight)-3}else n=c.getBoundingClientRect(),g=n.top,m=n.left,F=n.width,n=n.height;x=document.createElement("div");x.style.zIndex=mxPopupMenu.prototype.zIndex+2;x.style.border="3px dotted rgb(254, 137, 12)";x.style.pointerEvents="none";x.style.position="absolute";
-x.style.top=g+"px";x.style.left=m+"px";x.style.width=Math.max(0,F-3)+"px";x.style.height=Math.max(0,n-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(x):document.body.appendChild(x);return x};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var g=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=g){var m=new mxCodec(g.ownerDocument),n=new mxGraphModel;m.decode(g,n);g=n.getChildAt(n.getRoot(),0);for(m=0;m<n.getChildCount(g);m++)c.push(n.getChildAt(g,
-m))}return c};EditorUi.prototype.openFileHandle=function(c,g,m,n,x,F){if(null!=g&&0<g.length){if(!Editor.useCanvasForExport&&/(\.png)$/i.test(g)||/(\.pdf)$/i.test(g))g=g.substring(0,g.length-4),/(\.drawio)$/i.test(g)||(g+=".drawio");var H=mxUtils.bind(this,function(L){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==L.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,
-L,g)),this.showSidebar()}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(L,g,n)});if(EditorUi.isVisioFilename(g))this.importVisio(m,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),
-mxResources.get("notInOffline"))):this.parseFile(m,mxUtils.bind(this,function(L){4==L.readyState&&(this.spinner.stop(),200<=L.status&&299>=L.status?H(L.responseText):this.handleError({message:mxResources.get(413==L.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(L){this.spinner.stop();this.openLocalFile(L,g,n)}),
-mxUtils.bind(this,function(L){this.spinner.stop();this.handleError(L)}));else if("<mxlibrary"==c.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,c,m.name)),this.showSidebar()}catch(L){this.handleError(L,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(m,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}),mxUtils.bind(this,
-function(){this.spinner.stop();this.openLocalFile(c,g,n)}));else{if("image/png"==m.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==m.type){var M=Editor.extractGraphModelFromPdf(c);null!=M&&(x=null,n=!0,c=M)}this.spinner.stop();this.openLocalFile(c,g,n,x,null!=x?m:null,F)}}};EditorUi.prototype.openFiles=function(c,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var m=0;m<c.length;m++)mxUtils.bind(this,function(n){var x=new FileReader;x.onload=
-mxUtils.bind(this,function(F){try{this.openFileHandle(F.target.result,n.name,n,g)}catch(H){this.handleError(H)}});x.onerror=mxUtils.bind(this,function(F){this.spinner.stop();this.handleError(F);window.openFile=null});"image"!==n.type.substring(0,5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?x.readAsText(n):x.readAsDataURL(n)})(c[m])};EditorUi.prototype.openLocalFile=function(c,g,m,n,x,F){var H=this.getCurrentFile(),M=mxUtils.bind(this,function(){window.openFile=null;if(null==
-g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var L=mxUtils.parseXml(c);null!=L&&(this.editor.setGraphXml(L.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,g||this.defaultFilename,m,n,x,F))});if(null!=c&&0<c.length)null==H||!H.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?M():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),
-mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,g),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),
-this.addBasenamesForCell(this.pages[g].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);g=[];for(var m in c)g.push(m);return g};EditorUi.prototype.addBasenamesForCell=function(c,g){function m(H){if(null!=H){var M=H.lastIndexOf(".");0<M&&(H=H.substring(M+1,H.length));null==g[H]&&(g[H]=!0)}}var n=this.editor.graph,x=n.getCellStyle(c);m(mxStencilRegistry.getBasenameForStencil(x[mxConstants.STYLE_SHAPE]));n.model.isEdge(c)&&(m(mxMarker.getPackageForType(x[mxConstants.STYLE_STARTARROW])),
-m(mxMarker.getPackageForType(x[mxConstants.STYLE_ENDARROW])));x=n.model.getChildCount(c);for(var F=0;F<x;F++)this.addBasenamesForCell(n.model.getChildAt(c,F),g)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;this.editor.graph.setEnabled(c);null!=this.tabContainer&&
-(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);c||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};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 c=!1;this.installMessageHandler(mxUtils.bind(this,function(g,m,n,x){c||(c=!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(x)try{var F=this.editor.graph;F.setGridEnabled(!1);F.pageVisible=!1;var H=F.model.cells,M;for(M in H){var L=H[M];null!=L&&null!=L.style&&(L.style+=";sketch=1;"+(-1==L.style.indexOf("fontFamily=")||-1<L.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+function(G){200<=G.getStatus()&&299>=G.getStatus()?this.openLocalFile(G.getText(),null,!0):this.showError(mxResources.get("error"),413==G.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(x)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(x):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(x)))))}else this.openLocalFile(x,null,
+!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var g=0,l=0;if(null==c){var n=document.body;var x=document.documentElement;var F=(n.clientWidth||x.clientWidth)-3;n=Math.max(n.clientHeight||0,x.clientHeight)-3}else n=c.getBoundingClientRect(),g=n.top,l=n.left,F=n.width,n=n.height;x=document.createElement("div");x.style.zIndex=mxPopupMenu.prototype.zIndex+2;x.style.border="3px dotted rgb(254, 137, 12)";x.style.pointerEvents="none";x.style.position="absolute";
+x.style.top=g+"px";x.style.left=l+"px";x.style.width=Math.max(0,F-3)+"px";x.style.height=Math.max(0,n-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(x):document.body.appendChild(x);return x};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var g=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=g){var l=new mxCodec(g.ownerDocument),n=new mxGraphModel;l.decode(g,n);g=n.getChildAt(n.getRoot(),0);for(l=0;l<n.getChildCount(g);l++)c.push(n.getChildAt(g,
+l))}return c};EditorUi.prototype.openFileHandle=function(c,g,l,n,x,F){if(null!=g&&0<g.length){if(!Editor.useCanvasForExport&&/(\.png)$/i.test(g)||/(\.pdf)$/i.test(g))g=g.substring(0,g.length-4),/(\.drawio)$/i.test(g)||(g+=".drawio");var G=mxUtils.bind(this,function(M){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==M.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,
+M,g)),this.showSidebar()}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(M,g,n)});if(EditorUi.isVisioFilename(g))this.importVisio(l,mxUtils.bind(this,function(M){this.spinner.stop();G(M)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(M){this.spinner.stop();G(M)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),
+mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(M){4==M.readyState&&(this.spinner.stop(),200<=M.status&&299>=M.status?G(M.responseText):this.handleError({message:mxResources.get(413==M.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(M){this.spinner.stop();this.openLocalFile(M,g,n)}),
+mxUtils.bind(this,function(M){this.spinner.stop();this.handleError(M)}));else if("<mxlibrary"==c.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,c,l.name)),this.showSidebar()}catch(M){this.handleError(M,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(M){this.spinner.stop();G(M)}),mxUtils.bind(this,
+function(){this.spinner.stop();this.openLocalFile(c,g,n)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==l.type){var L=Editor.extractGraphModelFromPdf(c);null!=L&&(x=null,n=!0,c=L)}this.spinner.stop();this.openLocalFile(c,g,n,x,null!=x?l:null,F)}}};EditorUi.prototype.openFiles=function(c,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=0;l<c.length;l++)mxUtils.bind(this,function(n){var x=new FileReader;x.onload=
+mxUtils.bind(this,function(F){try{this.openFileHandle(F.target.result,n.name,n,g)}catch(G){this.handleError(G)}});x.onerror=mxUtils.bind(this,function(F){this.spinner.stop();this.handleError(F);window.openFile=null});"image"!==n.type.substring(0,5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?x.readAsText(n):x.readAsDataURL(n)})(c[l])};EditorUi.prototype.openLocalFile=function(c,g,l,n,x,F){var G=this.getCurrentFile(),L=mxUtils.bind(this,function(){window.openFile=null;if(null==
+g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var M=mxUtils.parseXml(c);null!=M&&(this.editor.setGraphXml(M.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,g||this.defaultFilename,l,n,x,F))});if(null!=c&&0<c.length)null==G||!G.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?L():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=G&&G.isModified()?this.confirm(mxResources.get("allChangesLost"),null,L,mxResources.get("cancel"),
+mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,g),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=G&&G.isModified()?this.confirm(mxResources.get("allChangesLost"),null,L,mxResources.get("cancel"),mxResources.get("discardChanges")):L()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),
+this.addBasenamesForCell(this.pages[g].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);g=[];for(var l in c)g.push(l);return g};EditorUi.prototype.addBasenamesForCell=function(c,g){function l(G){if(null!=G){var L=G.lastIndexOf(".");0<L&&(G=G.substring(L+1,G.length));null==g[G]&&(g[G]=!0)}}var n=this.editor.graph,x=n.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(x[mxConstants.STYLE_SHAPE]));n.model.isEdge(c)&&(l(mxMarker.getPackageForType(x[mxConstants.STYLE_STARTARROW])),
+l(mxMarker.getPackageForType(x[mxConstants.STYLE_ENDARROW])));x=n.model.getChildCount(c);for(var F=0;F<x;F++)this.addBasenamesForCell(n.model.getChildAt(c,F),g)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;this.editor.graph.setEnabled(c);null!=this.tabContainer&&
+(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);c||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};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 c=!1;this.installMessageHandler(mxUtils.bind(this,function(g,l,n,x){c||(c=!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(x)try{var F=this.editor.graph;F.setGridEnabled(!1);F.pageVisible=!1;var G=F.model.cells,L;for(L in G){var M=G[L];null!=M&&null!=M.style&&(M.style+=";sketch=1;"+(-1==M.style.indexOf("fontFamily=")||-1<M.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
""))}}catch(K){console.log(K)}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(c,g){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(m){this.spinner.stop();g(m)})):g(null)};EditorUi.prototype.createLoadMessage=function(c){var g=this.editor.graph;return{event:c,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(c){try{var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var m=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(x){m.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,
-exit:null!=c?!c:!0,data:Editor.createSvgDataUri(x)}),"*")}),null,null,!0,n,1,this.embedExportBorder,null,this.embedExportTheme)}else c||m.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(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")))}catch(x){c||this.handleError(x)}};
-EditorUi.prototype.installMessageHandler=function(c){var g=null,m=!1,n=!1,x=null,F=mxUtils.bind(this,function(L,K){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,F);mxEvent.addListener(window,"message",mxUtils.bind(this,function(L){if(L.source==(window.opener||window.parent)){var K=
-L.data,Z=null,ha=mxUtils.bind(this,function(sa){if(null!=sa&&"function"===typeof sa.charAt&&"<"!=sa.charAt(0))try{Editor.isPngDataUrl(sa)?sa=Editor.extractGraphModelFromPng(sa):"data:image/svg+xml;base64,"==sa.substring(0,26)?sa=atob(sa.substring(26)):"data:image/svg+xml;utf8,"==sa.substring(0,24)&&(sa=sa.substring(24)),null!=sa&&(""==sa.trim()?sa=null:"%"==sa.charAt(0)?sa=decodeURIComponent(sa):"<"!=sa.charAt(0)&&(sa=Graph.decompress(sa)))}catch(Ca){}return sa});if("json"==urlParams.proto){var ca=
-!1;try{K=JSON.parse(K),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[L],"data",[K])}catch(sa){K=null}try{if(null==K)return;if("dialog"==K.action){this.showError(null!=K.titleKey?mxResources.get(K.titleKey):K.title,null!=K.messageKey?mxResources.get(K.messageKey):mxUtils.htmlEntities(K.message),null!=K.buttonKey?mxResources.get(K.buttonKey):K.button);null!=K.modified&&(this.editor.modified=K.modified);return}if("layout"==K.action){this.executeLayouts(this.editor.graph.createLayouts(K.layouts));
-return}if("prompt"==K.action){this.spinner.stop();var aa=new FilenameDialog(this,K.defaultValue||"",null!=K.okKey?mxResources.get(K.okKey):K.ok,function(sa){null!=sa?H.postMessage(JSON.stringify({event:"prompt",value:sa,message:K}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")},null!=K.titleKey?mxResources.get(K.titleKey):K.title,null,null,null,null,function(){H.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")});this.showDialog(aa.container,300,80,!0,
-!1);aa.init();return}if("draft"==K.action){var oa=ha(K.xml);this.spinner.stop();aa=new DraftDialog(this,mxResources.get("draftFound",[K.name||this.defaultFilename]),oa,mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"edit",message:K}),"*")}),mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"discard",message:K}),"*")}),K.editKey?mxResources.get(K.editKey):null,K.discardKey?mxResources.get(K.discardKey):
-null,K.ignore?mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"ignore",message:K}),"*")}):null);this.showDialog(aa.container,640,480,!0,!1,mxUtils.bind(this,function(sa){sa&&this.actions.get("exit").funct()}));try{aa.init()}catch(sa){H.postMessage(JSON.stringify({event:"draft",error:sa.toString(),message:K}),"*")}return}if("template"==K.action){this.spinner.stop();var da=1==K.enableRecent,ka=1==K.enableSearch,ba=1==K.enableCustomTemp;aa=new NewDialog(this,
-!1,K.templatesOnly?!1:null!=K.callback,mxUtils.bind(this,function(sa,Ca,Da,va){sa=sa||this.emptyDiagramXml;null!=K.callback?H.postMessage(JSON.stringify({event:"template",xml:sa,blank:sa==this.emptyDiagramXml,name:Ca,tempUrl:Da,libs:va,builtIn:!0,message:K}),"*"):(c(sa,L,sa!=this.emptyDiagramXml,K.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,da?mxUtils.bind(this,function(sa){this.remoteInvoke("getRecentDiagrams",[null],null,sa,function(){sa(null,"Network Error!")})}):
-null,ka?mxUtils.bind(this,function(sa,Ca){this.remoteInvoke("searchDiagrams",[sa,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(sa,Ca,Da){H.postMessage(JSON.stringify({event:"template",docUrl:sa,info:Ca,name:Da}),"*")}),null,null,ba?mxUtils.bind(this,function(sa){this.remoteInvoke("getCustomTemplates",null,null,sa,function(){sa({},0)})}):null,1==K.withoutType,null,K.templatesOnly);this.showDialog(aa.container,620,460,!0,!1,mxUtils.bind(this,function(sa){null!=
-this.sidebar&&this.sidebar.hideTooltip();sa&&this.actions.get("exit").funct()}));aa.init();return}if("textContent"==K.action){var V=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent",data:V,message:K}),"*");return}if("status"==K.action){this.updateStatus(mxUtils.bind(this,function(){null!=K.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(K.messageKey))):null!=K.message&&this.editor.setStatus(mxUtils.htmlEntities(K.message))}));null!=K.modified&&(this.editor.modified=
-K.modified);return}if("spinner"==K.action){var k=null!=K.messageKey?mxResources.get(K.messageKey):K.message;null==K.show||K.show?this.spinner.spin(document.body,k):this.spinner.stop();return}if("exit"==K.action){this.actions.get("exit").funct();return}if("viewport"==K.action){if(null!=K.viewport){var v=this.editor.graph,I=v.view.translate.x,N=v.view.translate.y;this.embedViewport=K.viewport;v.refresh();this.diagramContainer.scrollTop-=(N-v.view.translate.y)*v.view.scale;this.diagramContainer.scrollLeft-=
-(I-v.view.translate.x)*v.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==K.action){aa=null;try{var T=this.diagramContainer.getAttribute("data-scrollState");null!=T&&(this.diagramContainer.removeAttribute("data-scrollState"),aa=JSON.parse(T))}catch(sa){}Editor.inlineFullscreen=K.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=aa&&this.restoreScrollState(aa);return}if("snapshot"==K.action){this.sendEmbeddedSvgExport(!0);return}if("export"==
+this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,g){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();g(l)})):g(null)};EditorUi.prototype.createLoadMessage=function(c){var g=this.editor.graph;return{event:c,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(c){try{var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var l=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(x){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,
+exit:null!=c?!c:!0,data:Editor.createSvgDataUri(x)}),"*")}),null,null,!0,n,1,this.embedExportBorder,null,this.embedExportTheme)}else c||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(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")))}catch(x){c||this.handleError(x)}};
+EditorUi.prototype.installMessageHandler=function(c){var g=null,l=!1,n=!1,x=null,F=mxUtils.bind(this,function(M,K){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,F);mxEvent.addListener(window,"message",mxUtils.bind(this,function(M){if(M.source==(window.opener||window.parent)){var K=
+M.data,Z=null,ja=mxUtils.bind(this,function(sa){if(null!=sa&&"function"===typeof sa.charAt&&"<"!=sa.charAt(0))try{Editor.isPngDataUrl(sa)?sa=Editor.extractGraphModelFromPng(sa):"data:image/svg+xml;base64,"==sa.substring(0,26)?sa=atob(sa.substring(26)):"data:image/svg+xml;utf8,"==sa.substring(0,24)&&(sa=sa.substring(24)),null!=sa&&(""==sa.trim()?sa=null:"%"==sa.charAt(0)?sa=decodeURIComponent(sa):"<"!=sa.charAt(0)&&(sa=Graph.decompress(sa)))}catch(Ca){}return sa});if("json"==urlParams.proto){var da=
+!1;try{K=JSON.parse(K),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[M],"data",[K])}catch(sa){K=null}try{if(null==K)return;if("dialog"==K.action){this.showError(null!=K.titleKey?mxResources.get(K.titleKey):K.title,null!=K.messageKey?mxResources.get(K.messageKey):mxUtils.htmlEntities(K.message),null!=K.buttonKey?mxResources.get(K.buttonKey):K.button);null!=K.modified&&(this.editor.modified=K.modified);return}if("layout"==K.action){this.executeLayouts(this.editor.graph.createLayouts(K.layouts));
+return}if("prompt"==K.action){this.spinner.stop();var ba=new FilenameDialog(this,K.defaultValue||"",null!=K.okKey?mxResources.get(K.okKey):K.ok,function(sa){null!=sa?G.postMessage(JSON.stringify({event:"prompt",value:sa,message:K}),"*"):G.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")},null!=K.titleKey?mxResources.get(K.titleKey):K.title,null,null,null,null,function(){G.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")});this.showDialog(ba.container,300,80,!0,
+!1);ba.init();return}if("draft"==K.action){var na=ja(K.xml);this.spinner.stop();ba=new DraftDialog(this,mxResources.get("draftFound",[K.name||this.defaultFilename]),na,mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"edit",message:K}),"*")}),mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"discard",message:K}),"*")}),K.editKey?mxResources.get(K.editKey):null,K.discardKey?mxResources.get(K.discardKey):
+null,K.ignore?mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"ignore",message:K}),"*")}):null);this.showDialog(ba.container,640,480,!0,!1,mxUtils.bind(this,function(sa){sa&&this.actions.get("exit").funct()}));try{ba.init()}catch(sa){G.postMessage(JSON.stringify({event:"draft",error:sa.toString(),message:K}),"*")}return}if("template"==K.action){this.spinner.stop();var ca=1==K.enableRecent,ka=1==K.enableSearch,aa=1==K.enableCustomTemp;ba=new NewDialog(this,
+!1,K.templatesOnly?!1:null!=K.callback,mxUtils.bind(this,function(sa,Ca,Da,va){sa=sa||this.emptyDiagramXml;null!=K.callback?G.postMessage(JSON.stringify({event:"template",xml:sa,blank:sa==this.emptyDiagramXml,name:Ca,tempUrl:Da,libs:va,builtIn:!0,message:K}),"*"):(c(sa,M,sa!=this.emptyDiagramXml,K.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,ca?mxUtils.bind(this,function(sa){this.remoteInvoke("getRecentDiagrams",[null],null,sa,function(){sa(null,"Network Error!")})}):
+null,ka?mxUtils.bind(this,function(sa,Ca){this.remoteInvoke("searchDiagrams",[sa,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(sa,Ca,Da){G.postMessage(JSON.stringify({event:"template",docUrl:sa,info:Ca,name:Da}),"*")}),null,null,aa?mxUtils.bind(this,function(sa){this.remoteInvoke("getCustomTemplates",null,null,sa,function(){sa({},0)})}):null,1==K.withoutType,null,K.templatesOnly);this.showDialog(ba.container,620,460,!0,!1,mxUtils.bind(this,function(sa){null!=
+this.sidebar&&this.sidebar.hideTooltip();sa&&this.actions.get("exit").funct()}));ba.init();return}if("textContent"==K.action){var V=this.getDiagramTextContent();G.postMessage(JSON.stringify({event:"textContent",data:V,message:K}),"*");return}if("status"==K.action){this.updateStatus(mxUtils.bind(this,function(){null!=K.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(K.messageKey))):null!=K.message&&this.editor.setStatus(mxUtils.htmlEntities(K.message))}));null!=K.modified&&(this.editor.modified=
+K.modified);return}if("spinner"==K.action){var k=null!=K.messageKey?mxResources.get(K.messageKey):K.message;null==K.show||K.show?this.spinner.spin(document.body,k):this.spinner.stop();return}if("exit"==K.action){this.actions.get("exit").funct();return}if("viewport"==K.action){if(null!=K.viewport){var v=this.editor.graph,J=v.view.translate.x,N=v.view.translate.y;this.embedViewport=K.viewport;v.refresh();this.diagramContainer.scrollTop-=(N-v.view.translate.y)*v.view.scale;this.diagramContainer.scrollLeft-=
+(J-v.view.translate.x)*v.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==K.action){ba=null;try{var T=this.diagramContainer.getAttribute("data-scrollState");null!=T&&(this.diagramContainer.removeAttribute("data-scrollState"),ba=JSON.parse(T))}catch(sa){}Editor.inlineFullscreen=K.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=ba&&this.restoreScrollState(ba);return}if("snapshot"==K.action){this.sendEmbeddedSvgExport(!0);return}if("export"==
K.action){if("png"==K.format||"xmlpng"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){var W=null!=K.xml?K.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);v=this.editor.graph;var U=mxUtils.bind(this,function(sa,Ca){if(K.withSvg)K.withSvg=!1,this.getEmbeddedSvg(W,this.editor.graph,null,!0,function(va){U(sa,va)},null,null,K.embedImages,this.editor.graph.background,K.scale,K.border,K.shadow,"auto");else{this.editor.graph.setEnabled(!0);
-this.spinner.stop();var Da=this.createLoadMessage("export");Da.format=K.format;Da.message=K;Da.data=sa;Da.svg=Ca;Da.xml=W;H.postMessage(JSON.stringify(Da),"*")}}),Y=mxUtils.bind(this,function(sa){null==sa&&(sa=Editor.blankImage);"xmlpng"==K.format&&(sa=Editor.writeGraphModelToPng(sa,"tEXt","mxfile",encodeURIComponent(W)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);U(sa)}),fa=K.pageId||(null!=this.pages?K.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var na=
+this.spinner.stop();var Da=this.createLoadMessage("export");Da.format=K.format;Da.message=K;Da.data=sa;Da.svg=Ca;Da.xml=W;G.postMessage(JSON.stringify(Da),"*")}}),Y=mxUtils.bind(this,function(sa){null==sa&&(sa=Editor.blankImage);"xmlpng"==K.format&&(sa=Editor.writeGraphModelToPng(sa,"tEXt","mxfile",encodeURIComponent(W)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);U(sa)}),fa=K.pageId||(null!=this.pages?K.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var oa=
mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=fa){var sa=v.getGlobalVariable;v=this.createTemporaryGraph(v.getStylesheet());for(var Ca,Da=0;Da<this.pages.length;Da++)if(this.pages[Da].getId()==fa){Ca=this.updatePageRoot(this.pages[Da]);break}null==Ca&&(Ca=this.currentPage);v.getGlobalVariable=function(Ua){return"page"==Ua?Ca.getName():"pagenumber"==Ua?1:sa.apply(this,arguments)};document.body.appendChild(v.container);v.model.setRoot(Ca.root)}if(null!=K.layerIds){var va=
-v.model,Na=va.getChildCells(va.getRoot()),Sa={};for(Da=0;Da<K.layerIds.length;Da++)Sa[K.layerIds[Da]]=!0;for(Da=0;Da<Na.length;Da++)va.setVisible(Na[Da],Sa[Na[Da].id]||!1)}Da=null;K.keepTheme&&(Da=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ua){Y(Ua.toDataURL("image/png"))}),K.width,null,K.background,mxUtils.bind(this,function(){Y(null)}),null,null,K.scale,K.transparent,K.shadow,null,v,K.border,null,K.grid,Da)});null!=K.xml&&0<K.xml.length&&(m=!0,this.setFileData(W),
-m=!1);na()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==K.format?"1":"0")+(null!=fa?"&pageId="+fa:"")+(null!=K.layerIds&&0<K.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:K.layerIds})):"")+(null!=K.scale?"&scale="+K.scale:"")+"&base64=1&xml="+encodeURIComponent(W))).send(mxUtils.bind(this,function(sa){200<=sa.getStatus()&&299>=sa.getStatus()?U("data:image/png;base64,"+sa.getText()):Y(null)}),mxUtils.bind(this,function(){Y(null)}))}}else if(na=mxUtils.bind(this,
+v.model,Na=va.getChildCells(va.getRoot()),Sa={};for(Da=0;Da<K.layerIds.length;Da++)Sa[K.layerIds[Da]]=!0;for(Da=0;Da<Na.length;Da++)va.setVisible(Na[Da],Sa[Na[Da].id]||!1)}Da=null;K.keepTheme&&(Da=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ua){Y(Ua.toDataURL("image/png"))}),K.width,null,K.background,mxUtils.bind(this,function(){Y(null)}),null,null,K.scale,K.transparent,K.shadow,null,v,K.border,null,K.grid,Da)});null!=K.xml&&0<K.xml.length&&(l=!0,this.setFileData(W),
+l=!1);oa()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==K.format?"1":"0")+(null!=fa?"&pageId="+fa:"")+(null!=K.layerIds&&0<K.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:K.layerIds})):"")+(null!=K.scale?"&scale="+K.scale:"")+"&base64=1&xml="+encodeURIComponent(W))).send(mxUtils.bind(this,function(sa){200<=sa.getStatus()&&299>=sa.getStatus()?U("data:image/png;base64,"+sa.getText()):Y(null)}),mxUtils.bind(this,function(){Y(null)}))}}else if(oa=mxUtils.bind(this,
function(){var sa=this.createLoadMessage("export");sa.message=K;if("html2"==K.format||"html"==K.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Ca=this.getXmlFileData();sa.xml=mxUtils.getXml(Ca);sa.data=this.getFileData(null,null,!0,null,null,null,Ca);sa.format=K.format}else if("html"==K.format)Ca=this.editor.getGraphXml(),sa.data=this.getHtml(Ca,this.editor.graph),sa.xml=mxUtils.getXml(Ca),sa.format=K.format;else{mxSvgCanvas2D.prototype.foAltText=null;Ca=null!=K.background?
-K.background:this.editor.graph.background;Ca==mxConstants.NONE&&(Ca=null);sa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);sa.format="svg";var Da=mxUtils.bind(this,function(Na){this.editor.graph.setEnabled(!0);this.spinner.stop();sa.data=K.asText?Na:Editor.createSvgDataUri(Na);H.postMessage(JSON.stringify(sa),"*")}),va="auto";K.keepTheme&&(va=Editor.isDarkMode()?"dark":"light");null!=K.theme&&(va=K.theme);if("xmlsvg"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,
+K.background:this.editor.graph.background;Ca==mxConstants.NONE&&(Ca=null);sa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);sa.format="svg";var Da=mxUtils.bind(this,function(Na){this.editor.graph.setEnabled(!0);this.spinner.stop();sa.data=K.asText?Na:Editor.createSvgDataUri(Na);G.postMessage(JSON.stringify(sa),"*")}),va="auto";K.keepTheme&&(va=Editor.isDarkMode()?"dark":"light");null!=K.theme&&(va=K.theme);if("xmlsvg"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,
null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){va=null;if(this.isAutoDarkMode()||Editor.isDarkMode())va="auto";null!=K.theme&&(va=K.theme);this.getEmbeddedSvg(sa.xml,this.editor.graph,null,!0,Da,null,null,K.embedImages,Ca,K.scale,K.border,K.shadow,va)}}else if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin))this.editor.graph.setEnabled(!1),Ca=this.editor.graph.getSvg(Ca,K.scale,K.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||
-K.shadow,null,va),(this.editor.graph.shadowVisible||K.shadow)&&this.editor.graph.addSvgShadow(Ca),this.embedFonts(Ca,mxUtils.bind(this,function(Na){K.embedImages||null==K.embedImages?this.editor.convertImages(Na,mxUtils.bind(this,function(Sa){Da(mxUtils.getXml(Sa))})):Da(mxUtils.getXml(Na))}));return}H.postMessage(JSON.stringify(sa),"*")}),null!=K.xml&&0<K.xml.length){if(this.editor.graph.mathEnabled){var la=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){la.apply(this,arguments);na()}}m=!0;
-this.setFileData(K.xml);m=!1;this.editor.graph.mathEnabled||na()}else na();return}if("load"==K.action){ca=K.toSketch;n=1==K.autosave;this.hideDialog();null!=K.modified&&null==urlParams.modified&&(urlParams.modified=K.modified);null!=K.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=K.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),
+K.shadow,null,va),(this.editor.graph.shadowVisible||K.shadow)&&this.editor.graph.addSvgShadow(Ca),this.embedFonts(Ca,mxUtils.bind(this,function(Na){K.embedImages||null==K.embedImages?this.editor.convertImages(Na,mxUtils.bind(this,function(Sa){Da(mxUtils.getXml(Sa))})):Da(mxUtils.getXml(Na))}));return}G.postMessage(JSON.stringify(sa),"*")}),null!=K.xml&&0<K.xml.length){if(this.editor.graph.mathEnabled){var la=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){la.apply(this,arguments);oa()}}l=!0;
+this.setFileData(K.xml);l=!1;this.editor.graph.mathEnabled||oa()}else oa();return}if("load"==K.action){da=K.toSketch;n=1==K.autosave;this.hideDialog();null!=K.modified&&null==urlParams.modified&&(urlParams.modified=K.modified);null!=K.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=K.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),
"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+"+Editor.shiftKey+"+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=K.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=K.noSaveBtn);if(null!=K.rough){var qa=Editor.sketchMode;this.doSetSketchMode(K.rough);qa!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=K.dark&&this.setDarkMode(K.dark);null!=K.border&&(this.embedExportBorder=K.border);null!=K.theme&&(this.embedExportTheme=
K.theme);null!=K.background&&(this.embedExportBackground=K.background);null!=K.viewport&&(this.embedViewport=K.viewport);this.embedExitPoint=null;if(null!=K.rect){var ya=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,K.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,K.rect.top)+"px";this.minInlineWidth=K.minWidth;this.minInlineHeight=K.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
"";var wa=K.maxFitScale,Ia=K.rect.width+2*ya,Aa=K.rect.height+2*ya;Z=mxUtils.bind(this,function(){var sa=mxUtils.getDocumentSize();Ia=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Ia):Ia,sa.width-80);sa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,Aa):Aa,sa.height-80);this.diagramContainer.style.width=Ia+"px";this.diagramContainer.style.height=sa+"px";var Ca=this.editor.graph;sa=Ca.maxFitScale;Ca.maxFitScale=wa;Ca.fit(2*ya,null,null,null,null,null,Aa);this.setPageVisible(!1);
if(null!=this.minInlineWidth&&Ca.getGraphBounds().width<this.minInlineWidth){var Da=Ca.container.scrollTop;this.resetScrollbars();Ca.container.scrollTop=Da}Ca.maxFitScale=sa;Ca.container.scrollTop-=ya;Ca.container.scrollLeft-=ya;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[K]));Ca.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=Ca.container.style.top);
var va=Ca.getGraphBounds();Ca.container.clientWidth>va.width+2*ya&&(Ca.container.scrollLeft=va.x+(va.width+ya-Ca.container.clientWidth)/2)}),10)})}null!=K.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=K.noExitBtn);null!=K.title&&null!=this.buttonContainer&&this.setEmbedTitle(K.title);try{K.libs&&this.sidebar.showEntries(K.libs)}catch(sa){}K=null!=K.xmlpng?this.extractGraphModelFromPng(K.xmlpng):null!=K.descriptor?K.descriptor:K.xml}else{if("merge"==K.action){var Ba=this.getCurrentFile();
-null!=Ba&&(oa=ha(K.xml),null!=oa&&""!=oa&&Ba.mergeFile(new LocalFile(this,oa),function(){H.postMessage(JSON.stringify({event:"merge",message:K}),"*")},function(sa){H.postMessage(JSON.stringify({event:"merge",message:K,error:sa}),"*")}))}else"remoteInvokeReady"==K.action?this.handleRemoteInvokeReady(H):"remoteInvoke"==K.action?this.handleRemoteInvoke(K,L.origin):"remoteInvokeResponse"==K.action?this.handleRemoteInvokeResponse(K):H.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(K)}),
-"*");return}}catch(sa){this.handleError(sa)}}var Ga=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ma=mxUtils.bind(this,function(sa,Ca){m=!0;try{c(sa,Ca,null,ca)}catch(Da){this.handleError(Da)}m=!1;null!=urlParams.modified&&this.clearStatus();x=Ga();n&&null==g&&(g=mxUtils.bind(this,function(Da,va){Da=Ga();Da==x||m||(va=this.createLoadMessage("autosave"),va.xml=Da,(window.opener||window.parent).postMessage(JSON.stringify(va),
+null!=Ba&&(na=ja(K.xml),null!=na&&""!=na&&Ba.mergeFile(new LocalFile(this,na),function(){G.postMessage(JSON.stringify({event:"merge",message:K}),"*")},function(sa){G.postMessage(JSON.stringify({event:"merge",message:K,error:sa}),"*")}))}else"remoteInvokeReady"==K.action?this.handleRemoteInvokeReady(G):"remoteInvoke"==K.action?this.handleRemoteInvoke(K,M.origin):"remoteInvokeResponse"==K.action?this.handleRemoteInvokeResponse(K):G.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(K)}),
+"*");return}}catch(sa){this.handleError(sa)}}var Ga=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ma=mxUtils.bind(this,function(sa,Ca){l=!0;try{c(sa,Ca,null,da)}catch(Da){this.handleError(Da)}l=!1;null!=urlParams.modified&&this.clearStatus();x=Ga();n&&null==g&&(g=mxUtils.bind(this,function(Da,va){Da=Ga();Da==x||l||(va=this.createLoadMessage("autosave"),va.xml=Da,(window.opener||window.parent).postMessage(JSON.stringify(va),
"*"));x=Da}),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)Ca=this.createLoadMessage("load"),Ca.xml=sa,H.postMessage(JSON.stringify(Ca),"*");null!=Z&&Z()});null!=K&&"function"===typeof K.substring&&"data:application/vnd.visio;base64,"==K.substring(0,34)?(ha="0M8R4KGxGuE"==K.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(sa){Ma(sa,L)},mxUtils.bind(this,function(sa){this.handleError(sa)}),ha)):null!=
-K&&"function"===typeof K.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(K,mxUtils.bind(this,function(sa){4==sa.readyState&&(200<=sa.status&&299>=sa.status&&"<mxGraphModel"==sa.responseText.substring(0,13)?Ma(sa.responseText,L):this.handleError({message:413==sa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=K&&"function"===typeof K.substring&&
-this.isLucidChartData(K)?this.convertLucidChart(K,mxUtils.bind(this,function(sa){Ma(sa)}),mxUtils.bind(this,function(sa){this.handleError(sa)})):null==K||"object"!==typeof K||null==K.format||null==K.data&&null==K.url?(K=ha(K),Ma(K,L)):this.loadDescriptor(K,mxUtils.bind(this,function(sa){Ma(Ga(),L)}),mxUtils.bind(this,function(sa){this.handleError(sa,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;F="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||
-"ready";H.postMessage(F,"*");if("json"==urlParams.proto){var M=this.editor.graph.openLink;this.editor.graph.openLink=function(L,K,Z){M.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:L,target:K,allowOpener:Z}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,g,m,n){var x=document.createElement("button");x.className="geEmbedBtn geBtn";x.setAttribute("title",c+(null!=m?" ("+m+")":""));mxUtils.write(x,c);n&&x.classList.add("gePrimaryBtn");mxEvent.addListener(x,"click",
+g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Ca=this.createLoadMessage("load"),Ca.xml=sa,G.postMessage(JSON.stringify(Ca),"*");null!=Z&&Z()});null!=K&&"function"===typeof K.substring&&"data:application/vnd.visio;base64,"==K.substring(0,34)?(ja="0M8R4KGxGuE"==K.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(sa){Ma(sa,M)},mxUtils.bind(this,function(sa){this.handleError(sa)}),ja)):null!=
+K&&"function"===typeof K.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(K,mxUtils.bind(this,function(sa){4==sa.readyState&&(200<=sa.status&&299>=sa.status&&"<mxGraphModel"==sa.responseText.substring(0,13)?Ma(sa.responseText,M):this.handleError({message:413==sa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=K&&"function"===typeof K.substring&&
+this.isLucidChartData(K)?this.convertLucidChart(K,mxUtils.bind(this,function(sa){Ma(sa)}),mxUtils.bind(this,function(sa){this.handleError(sa)})):null==K||"object"!==typeof K||null==K.format||null==K.data&&null==K.url?(K=ja(K),Ma(K,M)):this.loadDescriptor(K,mxUtils.bind(this,function(sa){Ma(Ga(),M)}),mxUtils.bind(this,function(sa){this.handleError(sa,mxResources.get("errorLoadingFile"))}))}}));var G=window.opener||window.parent;F="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||
+"ready";G.postMessage(F,"*");if("json"==urlParams.proto){var L=this.editor.graph.openLink;this.editor.graph.openLink=function(M,K,Z){L.apply(this,arguments);G.postMessage(JSON.stringify({event:"openLink",href:M,target:K,allowOpener:Z}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,g,l,n){var x=document.createElement("button");x.className="geEmbedBtn geBtn";x.setAttribute("title",c+(null!=l?" ("+l+")":""));mxUtils.write(x,c);n&&x.classList.add("gePrimaryBtn");mxEvent.addListener(x,"click",
g);return x};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==
this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),
mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+"+Editor.shiftKey+"+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct))}))};
EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new SimpleTextareaDialog(this,Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),mxResources.get("import"),"https://www.drawio.com/blog/insert-from-csv"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,new mxRectangle(0,0,320,280));this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,
-function(){var g=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(m){if(0<m.length)try{var n=JSON.parse(m);this.executeLayouts(this.editor.graph.createLayouts(n));this.customLayoutConfig=n;this.hideDialog()}catch(x){this.handleError(x)}}),null,null,null,null,mxUtils.bind(this,function(m,n){var x=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var F=n.value;n.value=JSON.stringify(JSON.parse(F));n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));n.value=F}catch(H){this.handleError(H)}}));x.setAttribute("title","copy");x.className="geBtn";m.appendChild(x)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(g){var m=mxUtils.bind(this,function(){this.loadingOrgChart=
-!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),n=mxUtils.bind(this,function(x){this.loadingOrgChart=!1;g.clear()&&this.handleError(x)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?m():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",m,null,null,null,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",m,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(c,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,g)}))};EditorUi.prototype.doImportCsv=function(c,g){try{var m=c.split("\n"),n=[],x=[],F=[],H={};if(0<m.length){var M={},L=this.editor.graph,K=null,Z=null,ha=null,ca=null,
-aa=null,oa=null,da=null,ka="whiteSpace=wrap;html=1;",ba=null,V=null,k="",v="auto",I="auto",N=!1,T=null,W=null,U=40,Y=40,fa=100,na=0,la=mxUtils.bind(this,function(){null!=g?g(ra):(L.setSelectionCells(ra),L.scrollCellToVisible(L.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),qa=L.getFreeInsertPoint(),ya=qa.x,wa=qa.y;qa=wa;var Ia=null,Aa="auto";V=null;for(var Ba=[],Ga=null,Ma=null,sa=0;sa<m.length&&"#"==m[sa].charAt(0);){c=
-m[sa].replace(/\r$/,"");for(sa++;sa<m.length&&"\\"==c.charAt(c.length-1)&&"#"==m[sa].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(m[sa].substring(1)),sa++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var Da=mxUtils.trim(c.substring(1,Ca)),va=mxUtils.trim(c.substring(Ca+1));"label"==Da?Ia=Graph.sanitizeHtml(va):"labelname"==Da&&0<va.length&&"-"!=va?aa=va:"labels"==Da&&0<va.length&&"-"!=va?da=JSON.parse(va):"style"==Da?Z=va:"parentstyle"==Da?ka=va:"unknownStyle"==Da&&"-"!=va?oa=va:"stylename"==
-Da&&0<va.length&&"-"!=va?ca=va:"styles"==Da&&0<va.length&&"-"!=va?ha=JSON.parse(va):"vars"==Da&&0<va.length&&"-"!=va?K=JSON.parse(va):"identity"==Da&&0<va.length&&"-"!=va?ba=va:"parent"==Da&&0<va.length&&"-"!=va?V=va:"namespace"==Da&&0<va.length&&"-"!=va?k=va:"width"==Da?v=va:"height"==Da?I=va:"collapsed"==Da&&"-"!=va?N="true"==va:"left"==Da&&0<va.length?T=va:"top"==Da&&0<va.length?W=va:"ignore"==Da?Ma=va.split(","):"connect"==Da?Ba.push(JSON.parse(va)):"link"==Da?Ga=va:"padding"==Da?na=parseFloat(va):
-"edgespacing"==Da?U=parseFloat(va):"nodespacing"==Da?Y=parseFloat(va):"levelspacing"==Da?fa=parseFloat(va):"layout"==Da&&(Aa=va)}}}if(null==m[sa])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(m[sa].replace(/\r$/,""));Ca=c=null;Da=[];for(va=0;va<Na.length;va++)ba==Na[va]&&(c=va),V==Na[va]&&(Ca=va),Da.push(mxUtils.trim(Na[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ia&&(Ia="%"+Da[0]+"%");if(null!=Ba)for(var Sa=0;Sa<Ba.length;Sa++)null==
-M[Ba[Sa].to]&&(M[Ba[Sa].to]={});ba=[];for(va=sa+1;va<m.length;va++){var Ua=this.editor.csvToArray(m[va].replace(/\r$/,""));if(null==Ua){var Qa=40<m[va].length?m[va].substring(0,40)+"...":m[va];throw Error(Qa+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Ua.length&&ba.push(Ua)}L.model.beginUpdate();try{for(va=0;va<ba.length;va++){Ua=ba[va];var za=null,Ea=null!=c?k+Ua[c]:null;m=!1;null!=Ea&&(za=L.model.getCell(Ea),m=null==za||0<=mxUtils.indexOf(n,za));var B=new mxCell(Ia,new mxGeometry(ya,
-qa,0,0),Z||"whiteSpace=wrap;html=1;");B.collapsed=N;B.vertex=!0;B.id=Ea;null==za||m||L.model.setCollapsed(za,N);for(var Q=0;Q<Ua.length;Q++)L.setAttributeForCell(B,Da[Q],Ua[Q]),null==za||m||L.setAttributeForCell(za,Da[Q],Ua[Q]);if(null!=aa&&null!=da){var R=da[B.getAttribute(aa)];null!=R&&(L.labelChanged(B,R),null==za||m||L.cellLabelChanged(za,R))}if(null!=ca&&null!=ha){var X=ha[B.getAttribute(ca)];null!=X&&(B.style=X)}L.setAttributeForCell(B,"placeholders","1");B.style=L.replacePlaceholders(B,B.style,
-K);null==za||m?L.fireEvent(new mxEventObject("cellsInserted","cells",[B])):(L.model.setStyle(za,B.style),0>mxUtils.indexOf(F,za)&&F.push(za),L.fireEvent(new mxEventObject("cellsInserted","cells",[za])));m=null!=za;za=B;if(!m)for(Sa=0;Sa<Ba.length;Sa++)M[Ba[Sa].to][za.getAttribute(Ba[Sa].to)]=za;null!=Ga&&"link"!=Ga&&(L.setLinkForCell(za,za.getAttribute(Ga)),L.setAttributeForCell(za,Ga,null));var ia=this.editor.graph.getPreferredSizeForCell(za);V=null!=Ca?L.model.getCell(k+Ua[Ca]):null;if(za.vertex){Qa=
-null!=V?0:ya;sa=null!=V?0:wa;null!=T&&null!=za.getAttribute(T)&&(za.geometry.x=Qa+parseFloat(za.getAttribute(T)));null!=W&&null!=za.getAttribute(W)&&(za.geometry.y=sa+parseFloat(za.getAttribute(W)));var ja="@"==v.charAt(0)?za.getAttribute(v.substring(1)):null;za.geometry.width=null!=ja&&"auto"!=ja?parseFloat(za.getAttribute(v.substring(1))):"auto"==v||"auto"==ja?ia.width+na:parseFloat(v);var pa="@"==I.charAt(0)?za.getAttribute(I.substring(1)):null;za.geometry.height=null!=pa&&"auto"!=pa&&"width"!=
-I?parseFloat(pa):"auto"==I||"auto"==pa?ia.height+na:"width"==I?za.geometry.width:parseFloat(I);qa+=za.geometry.height+Y}m?(null==H[Ea]&&(H[Ea]=[]),H[Ea].push(za)):(n.push(za),null!=V?(V.style=L.replacePlaceholders(V,ka,K),L.addCell(za,V),x.push(V)):F.push(L.addCell(za)))}for(va=0;va<x.length;va++)ja="@"==v.charAt(0)?x[va].getAttribute(v.substring(1)):null,pa="@"==I.charAt(0)?x[va].getAttribute(I.substring(1)):null,"auto"!=v&&"auto"!=ja||"auto"!=I&&"auto"!=pa||L.updateGroupBounds([x[va]],na,!0);var xa=
-F.slice(),ra=F.slice();for(Sa=0;Sa<Ba.length;Sa++){var ua=Ba[Sa];for(va=0;va<n.length;va++){za=n[va];var Ka=mxUtils.bind(this,function(lb,pb,gb){var qb=pb.getAttribute(gb.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var ub=0;ub<qb.length;ub++){var hb=M[gb.to][qb[ub]];if(null==hb&&null!=oa){hb=new mxCell(qb[ub],new mxGeometry(ya,wa,0,0),oa);hb.style=L.replacePlaceholders(pb,hb.style,K);var nb=this.editor.graph.getPreferredSizeForCell(hb);hb.geometry.width=nb.width+na;hb.geometry.height=nb.height+
-na;M[gb.to][qb[ub]]=hb;hb.vertex=!0;hb.id=qb[ub];F.push(L.addCell(hb))}if(null!=hb){nb=gb.label;null!=gb.fromlabel&&(nb=(pb.getAttribute(gb.fromlabel)||"")+(nb||""));null!=gb.sourcelabel&&(nb=L.replacePlaceholders(pb,gb.sourcelabel,K)+(nb||""));null!=gb.tolabel&&(nb=(nb||"")+(hb.getAttribute(gb.tolabel)||""));null!=gb.targetlabel&&(nb=(nb||"")+L.replacePlaceholders(hb,gb.targetlabel,K));var ob="target"==gb.placeholders==!gb.invert?hb:lb;ob=null!=gb.style?L.replacePlaceholders(ob,gb.style,K):L.createCurrentEdgeStyle();
-nb=L.insertEdge(null,null,nb||"",gb.invert?hb:lb,gb.invert?lb:hb,ob);if(null!=gb.labels)for(ob=0;ob<gb.labels.length;ob++){var rb=gb.labels[ob],vb=new mxCell(rb.label||ob,new mxGeometry(null!=rb.x?rb.x:0,null!=rb.y?rb.y:0,0,0),"resizable=0;html=1;");vb.vertex=!0;vb.connectable=!1;vb.geometry.relative=!0;null!=rb.placeholders&&(vb.value=L.replacePlaceholders("target"==rb.placeholders==!gb.invert?hb:lb,vb.value,K));if(null!=rb.dx||null!=rb.dy)vb.geometry.offset=new mxPoint(null!=rb.dx?rb.dx:0,null!=
-rb.dy?rb.dy:0);nb.insert(vb)}if(null!=gb.data)for(var Ab in gb.data)L.setAttributeForCell(nb,Ab,gb.data[Ab]);ra.push(nb);mxUtils.remove(gb.invert?lb:hb,xa)}}}});Ka(za,za,ua);if(null!=H[za.id])for(Q=0;Q<H[za.id].length;Q++)Ka(za,H[za.id][Q],ua)}}if(null!=Ma)for(va=0;va<n.length;va++)for(za=n[va],Q=0;Q<Ma.length;Q++)L.setAttributeForCell(za,mxUtils.trim(Ma[Q]),null);if(0<F.length){var Va=new mxParallelEdgeLayout(L);Va.spacing=U;Va.checkOverlap=!0;var Oa=function(){0<Va.spacing&&Va.execute(L.getDefaultParent());
-for(var lb=0;lb<F.length;lb++){var pb=L.getCellGeometry(F[lb]);pb.x=Math.round(L.snap(pb.x));pb.y=Math.round(L.snap(pb.y));"auto"==v&&(pb.width=Math.round(L.snap(pb.width)));"auto"==I&&(pb.height=Math.round(L.snap(pb.height)))}};if("["==Aa.charAt(0)){var Ta=la;L.view.validate();this.executeLayouts(L.createLayouts(JSON.parse(Aa)),function(){Oa();Ta()});la=null}else if("circle"==Aa){var Za=new mxCircleLayout(L);Za.disableEdgeStyle=!1;Za.resetEdges=!1;var Pa=Za.isVertexIgnored;Za.isVertexIgnored=function(lb){return Pa.apply(this,
-arguments)||0>mxUtils.indexOf(F,lb)};this.executeLayout(function(){Za.execute(L.getDefaultParent());Oa()},!0,la);la=null}else if("horizontaltree"==Aa||"verticaltree"==Aa||"auto"==Aa&&ra.length==2*F.length-1&&1==xa.length){L.view.validate();var Ra=new mxCompactTreeLayout(L,"horizontaltree"==Aa);Ra.levelDistance=Y;Ra.edgeRouting=!1;Ra.resetEdges=!1;Ra.sortEdges=!0;this.executeLayout(function(){Ra.execute(L.getDefaultParent(),0<xa.length?xa[0]:null)},!0,la);la=null}else if("horizontalflow"==Aa||"verticalflow"==
-Aa||"auto"==Aa&&1==xa.length){L.view.validate();var fb=new mxHierarchicalLayout(L,"horizontalflow"==Aa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fb.intraCellSpacing=Y;fb.parallelEdgeSpacing=U;fb.interRankCellSpacing=fa;fb.disableEdgeStyle=!1;this.executeLayout(function(){fb.execute(L.getDefaultParent(),ra);L.moveCells(ra,ya,wa)},!0,la);la=null}else if("orgchart"==Aa){L.view.validate();var eb=new mxOrgChartLayout(L,2,fa,Y),bb=eb.isVertexIgnored;eb.isVertexIgnored=function(lb){return bb.apply(this,
-arguments)||0>mxUtils.indexOf(F,lb)};this.executeLayout(function(){eb.execute(L.getDefaultParent());Oa()},!0,la);la=null}else if("organic"==Aa||"auto"==Aa&&ra.length>F.length){L.view.validate();var db=new mxFastOrganicLayout(L);db.forceConstant=3*Y;db.disableEdgeStyle=!1;db.resetEdges=!1;var mb=db.isVertexIgnored;db.isVertexIgnored=function(lb){return mb.apply(this,arguments)||0>mxUtils.indexOf(F,lb)};this.executeLayout(function(){db.execute(L.getDefaultParent());Oa()},!0,la);la=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=
-la&&la()}}catch(lb){this.handleError(lb)}};EditorUi.prototype.getSearch=function(c){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var m="?",n;for(n in urlParams)0>mxUtils.indexOf(c,n)&&null!=urlParams[n]&&(g+=m+n+"="+urlParams[n],m="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var g=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var m="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-n;for(n in urlParams)0>mxUtils.indexOf(m,n)&&(c=0==g?c+"?":c+"&",null!=urlParams[n]&&(c+=n+"="+urlParams[n],g++))}return c};EditorUi.prototype.showLinkDialog=function(c,g,m,n,x){c=new LinkDialog(this,c,g,m,!0,n,x);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){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++;c&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),g=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var m=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!m);
-this.actions.get("print").setEnabled(!m);this.menus.get("exportAs").setEnabled(!m);this.menus.get("embed").setEnabled(!m);m="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(m);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(m),this.menus.get("newLibrary").setEnabled(m));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);
+function(){var g=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var n=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(n));this.customLayoutConfig=n;this.hideDialog()}catch(x){this.handleError(x)}}),null,null,null,null,mxUtils.bind(this,function(l,n){var x=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var F=n.value;n.value=JSON.stringify(JSON.parse(F));n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));n.value=F}catch(G){this.handleError(G)}}));x.setAttribute("title","copy");x.className="geBtn";l.appendChild(x)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(g){var l=mxUtils.bind(this,function(){this.loadingOrgChart=
+!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),n=mxUtils.bind(this,function(x){this.loadingOrgChart=!1;g.clear()&&this.handleError(x)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():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",l,null,null,null,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(c,g,l){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,g,l)}))};EditorUi.prototype.doImportCsv=function(c,g,l){try{var n=c.split("\n"),x=[],F=[],G=[],L={};if(0<n.length){var M={};l=null!=l?l:this.editor.graph;var K=null,
+Z=null,ja=null,da=null,ba=null,na=null,ca=null,ka="whiteSpace=wrap;html=1;",aa=null,V=null,k="",v="auto",J="auto",N=!1,T=null,W=null,U=40,Y=40,fa=100,oa=0,la=mxUtils.bind(this,function(){null!=g?g(ra):(l.setSelectionCells(ra),l.scrollCellToVisible(l.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),qa=l.getFreeInsertPoint(),ya=qa.x,wa=qa.y;qa=wa;var Ia=null,Aa="auto";V=null;for(var Ba=[],Ga=null,Ma=null,sa=0;sa<n.length&&
+"#"==n[sa].charAt(0);){c=n[sa].replace(/\r$/,"");for(sa++;sa<n.length&&"\\"==c.charAt(c.length-1)&&"#"==n[sa].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(n[sa].substring(1)),sa++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var Da=mxUtils.trim(c.substring(1,Ca)),va=mxUtils.trim(c.substring(Ca+1));"label"==Da?Ia=Graph.sanitizeHtml(va):"labelname"==Da&&0<va.length&&"-"!=va?ba=va:"labels"==Da&&0<va.length&&"-"!=va?ca=JSON.parse(va):"style"==Da?Z=va:"parentstyle"==Da?ka=va:"unknownStyle"==
+Da&&"-"!=va?na=va:"stylename"==Da&&0<va.length&&"-"!=va?da=va:"styles"==Da&&0<va.length&&"-"!=va?ja=JSON.parse(va):"vars"==Da&&0<va.length&&"-"!=va?K=JSON.parse(va):"identity"==Da&&0<va.length&&"-"!=va?aa=va:"parent"==Da&&0<va.length&&"-"!=va?V=va:"namespace"==Da&&0<va.length&&"-"!=va?k=va:"width"==Da?v=va:"height"==Da?J=va:"collapsed"==Da&&"-"!=va?N="true"==va:"left"==Da&&0<va.length?T=va:"top"==Da&&0<va.length?W=va:"ignore"==Da?Ma=va.split(","):"connect"==Da?Ba.push(JSON.parse(va)):"link"==Da?Ga=
+va:"padding"==Da?oa=parseFloat(va):"edgespacing"==Da?U=parseFloat(va):"nodespacing"==Da?Y=parseFloat(va):"levelspacing"==Da?fa=parseFloat(va):"layout"==Da&&(Aa=va)}}}if(null==n[sa])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(n[sa].replace(/\r$/,""));Ca=c=null;Da=[];for(va=0;va<Na.length;va++)aa==Na[va]&&(c=va),V==Na[va]&&(Ca=va),Da.push(mxUtils.trim(Na[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ia&&(Ia="%"+Da[0]+"%");if(null!=
+Ba)for(var Sa=0;Sa<Ba.length;Sa++)null==M[Ba[Sa].to]&&(M[Ba[Sa].to]={});aa=[];for(va=sa+1;va<n.length;va++){var Ua=this.editor.csvToArray(n[va].replace(/\r$/,""));if(null==Ua){var Qa=40<n[va].length?n[va].substring(0,40)+"...":n[va];throw Error(Qa+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Ua.length&&aa.push(Ua)}l.model.beginUpdate();try{for(va=0;va<aa.length;va++){Ua=aa[va];var za=null,Ea=null!=c?k+Ua[c]:null;n=!1;null!=Ea&&(za=l.model.getCell(Ea),n=null==za||0<=mxUtils.indexOf(x,
+za));var C=new mxCell(Ia,new mxGeometry(ya,qa,0,0),Z||"whiteSpace=wrap;html=1;");C.collapsed=N;C.vertex=!0;C.id=Ea;null==za||n||l.model.setCollapsed(za,N);for(var Q=0;Q<Ua.length;Q++)l.setAttributeForCell(C,Da[Q],Ua[Q]),null==za||n||l.setAttributeForCell(za,Da[Q],Ua[Q]);if(null!=ba&&null!=ca){var R=ca[C.getAttribute(ba)];null!=R&&(l.labelChanged(C,R),null==za||n||l.cellLabelChanged(za,R))}if(null!=da&&null!=ja){var X=ja[C.getAttribute(da)];null!=X&&(C.style=X)}l.setAttributeForCell(C,"placeholders",
+"1");C.style=l.replacePlaceholders(C,C.style,K);null==za||n?l.fireEvent(new mxEventObject("cellsInserted","cells",[C])):(l.model.setStyle(za,C.style),0>mxUtils.indexOf(G,za)&&G.push(za),l.fireEvent(new mxEventObject("cellsInserted","cells",[za])));n=null!=za;za=C;if(!n)for(Sa=0;Sa<Ba.length;Sa++)M[Ba[Sa].to][za.getAttribute(Ba[Sa].to)]=za;null!=Ga&&"link"!=Ga&&(l.setLinkForCell(za,za.getAttribute(Ga)),l.setAttributeForCell(za,Ga,null));var ha=l.getPreferredSizeForCell(za);V=null!=Ca?l.model.getCell(k+
+Ua[Ca]):null;if(za.vertex){Qa=null!=V?0:ya;sa=null!=V?0:wa;null!=T&&null!=za.getAttribute(T)&&(za.geometry.x=Qa+parseFloat(za.getAttribute(T)));null!=W&&null!=za.getAttribute(W)&&(za.geometry.y=sa+parseFloat(za.getAttribute(W)));var ia="@"==v.charAt(0)?za.getAttribute(v.substring(1)):null;za.geometry.width=null!=ia&&"auto"!=ia?parseFloat(za.getAttribute(v.substring(1))):"auto"==v||"auto"==ia?ha.width+oa:parseFloat(v);var pa="@"==J.charAt(0)?za.getAttribute(J.substring(1)):null;za.geometry.height=
+null!=pa&&"auto"!=pa&&"width"!=J?parseFloat(pa):"auto"==J||"auto"==pa?ha.height+oa:"width"==J?za.geometry.width:parseFloat(J);qa+=za.geometry.height+Y}n?(null==L[Ea]&&(L[Ea]=[]),L[Ea].push(za)):(x.push(za),null!=V?(V.style=l.replacePlaceholders(V,ka,K),l.addCell(za,V),F.push(V)):G.push(l.addCell(za)))}for(va=0;va<F.length;va++)ia="@"==v.charAt(0)?F[va].getAttribute(v.substring(1)):null,pa="@"==J.charAt(0)?F[va].getAttribute(J.substring(1)):null,"auto"!=v&&"auto"!=ia||"auto"!=J&&"auto"!=pa||l.updateGroupBounds([F[va]],
+oa,!0);var xa=G.slice(),ra=G.slice();for(Sa=0;Sa<Ba.length;Sa++){var ua=Ba[Sa];for(va=0;va<x.length;va++){za=x[va];var Ka=mxUtils.bind(this,function(lb,pb,gb){var qb=pb.getAttribute(gb.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var ub=0;ub<qb.length;ub++){var hb=M[gb.to][qb[ub]];if(null==hb&&null!=na){hb=new mxCell(qb[ub],new mxGeometry(ya,wa,0,0),na);hb.style=l.replacePlaceholders(pb,hb.style,K);var nb=l.getPreferredSizeForCell(hb);hb.geometry.width=nb.width+oa;hb.geometry.height=nb.height+
+oa;M[gb.to][qb[ub]]=hb;hb.vertex=!0;hb.id=qb[ub];G.push(l.addCell(hb))}if(null!=hb){nb=gb.label;null!=gb.fromlabel&&(nb=(pb.getAttribute(gb.fromlabel)||"")+(nb||""));null!=gb.sourcelabel&&(nb=l.replacePlaceholders(pb,gb.sourcelabel,K)+(nb||""));null!=gb.tolabel&&(nb=(nb||"")+(hb.getAttribute(gb.tolabel)||""));null!=gb.targetlabel&&(nb=(nb||"")+l.replacePlaceholders(hb,gb.targetlabel,K));var ob="target"==gb.placeholders==!gb.invert?hb:lb;ob=null!=gb.style?l.replacePlaceholders(ob,gb.style,K):l.createCurrentEdgeStyle();
+nb=l.insertEdge(null,null,nb||"",gb.invert?hb:lb,gb.invert?lb:hb,ob);if(null!=gb.labels)for(ob=0;ob<gb.labels.length;ob++){var rb=gb.labels[ob],vb=new mxCell(rb.label||ob,new mxGeometry(null!=rb.x?rb.x:0,null!=rb.y?rb.y:0,0,0),"resizable=0;html=1;");vb.vertex=!0;vb.connectable=!1;vb.geometry.relative=!0;null!=rb.placeholders&&(vb.value=l.replacePlaceholders("target"==rb.placeholders==!gb.invert?hb:lb,vb.value,K));if(null!=rb.dx||null!=rb.dy)vb.geometry.offset=new mxPoint(null!=rb.dx?rb.dx:0,null!=
+rb.dy?rb.dy:0);nb.insert(vb)}if(null!=gb.data)for(var Ab in gb.data)l.setAttributeForCell(nb,Ab,gb.data[Ab]);ra.push(nb);mxUtils.remove(gb.invert?lb:hb,xa)}}}});Ka(za,za,ua);if(null!=L[za.id])for(Q=0;Q<L[za.id].length;Q++)Ka(za,L[za.id][Q],ua)}}if(null!=Ma)for(va=0;va<x.length;va++)for(za=x[va],Q=0;Q<Ma.length;Q++)l.setAttributeForCell(za,mxUtils.trim(Ma[Q]),null);if(0<G.length){var Va=new mxParallelEdgeLayout(l);Va.spacing=U;Va.checkOverlap=!0;var Oa=function(){0<Va.spacing&&Va.execute(l.getDefaultParent());
+for(var lb=0;lb<G.length;lb++){var pb=l.getCellGeometry(G[lb]);pb.x=Math.round(l.snap(pb.x));pb.y=Math.round(l.snap(pb.y));"auto"==v&&(pb.width=Math.round(l.snap(pb.width)));"auto"==J&&(pb.height=Math.round(l.snap(pb.height)))}};if("["==Aa.charAt(0)){var Ta=la;l.view.validate();this.executeLayouts(l.createLayouts(JSON.parse(Aa)),function(){Oa();Ta()});la=null}else if("circle"==Aa){var Za=new mxCircleLayout(l);Za.disableEdgeStyle=!1;Za.resetEdges=!1;var Pa=Za.isVertexIgnored;Za.isVertexIgnored=function(lb){return Pa.apply(this,
+arguments)||0>mxUtils.indexOf(G,lb)};this.executeLayout(function(){Za.execute(l.getDefaultParent());Oa()},!0,la);la=null}else if("horizontaltree"==Aa||"verticaltree"==Aa||"auto"==Aa&&ra.length==2*G.length-1&&1==xa.length){l.view.validate();var Ra=new mxCompactTreeLayout(l,"horizontaltree"==Aa);Ra.levelDistance=Y;Ra.edgeRouting=!1;Ra.resetEdges=!1;Ra.sortEdges=!0;this.executeLayout(function(){Ra.execute(l.getDefaultParent(),0<xa.length?xa[0]:null)},!0,la);la=null}else if("horizontalflow"==Aa||"verticalflow"==
+Aa||"auto"==Aa&&1==xa.length){l.view.validate();var fb=new mxHierarchicalLayout(l,"horizontalflow"==Aa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fb.intraCellSpacing=Y;fb.parallelEdgeSpacing=U;fb.interRankCellSpacing=fa;fb.disableEdgeStyle=!1;this.executeLayout(function(){fb.execute(l.getDefaultParent(),ra);l.moveCells(ra,ya,wa)},!0,la);la=null}else if("orgchart"==Aa){l.view.validate();var eb=new mxOrgChartLayout(l,2,fa,Y),bb=eb.isVertexIgnored;eb.isVertexIgnored=function(lb){return bb.apply(this,
+arguments)||0>mxUtils.indexOf(G,lb)};this.executeLayout(function(){eb.execute(l.getDefaultParent());Oa()},!0,la);la=null}else if("organic"==Aa||"auto"==Aa&&ra.length>G.length){l.view.validate();var db=new mxFastOrganicLayout(l);db.forceConstant=3*Y;db.disableEdgeStyle=!1;db.resetEdges=!1;var mb=db.isVertexIgnored;db.isVertexIgnored=function(lb){return mb.apply(this,arguments)||0>mxUtils.indexOf(G,lb)};this.executeLayout(function(){db.execute(l.getDefaultParent());Oa()},!0,la);la=null}}this.hideDialog()}finally{l.model.endUpdate()}null!=
+la&&la()}}catch(lb){this.handleError(lb)}};EditorUi.prototype.getSearch=function(c){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",n;for(n in urlParams)0>mxUtils.indexOf(c,n)&&null!=urlParams[n]&&(g+=l+n+"="+urlParams[n],l="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var g=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+n;for(n in urlParams)0>mxUtils.indexOf(l,n)&&(c=0==g?c+"?":c+"&",null!=urlParams[n]&&(c+=n+"="+urlParams[n],g++))}return c};EditorUi.prototype.showLinkDialog=function(c,g,l,n,x){c=new LinkDialog(this,c,g,l,!0,n,x);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){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++;c&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),g=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!l);
+this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);
this.actions.get("smartFit").setEnabled(g);this.actions.get("resetView").setEnabled(g);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);this.menus.get("edgeShape").setEnabled(c);this.menus.get("edgeStyle").setEnabled(c);this.menus.get("appearance").setEnabled(mxUtils.lightDarkColorSupported)};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};
EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var g=0;g<c.length;g++)this.libraryLoaded(c[g].file,c[g].images,c[g].title,null!=c[g].div?"none"!=c[g].div.style.display:c[g].expand)};var D=EditorUi.prototype.updateActionStates;
-EditorUi.prototype.updateActionStates=function(){D.apply(this,arguments);var c=this.editor.graph,g=this.getCurrentFile(),m=this.getSelectionState(),n=this.isDiagramActive(),x="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=g&&g.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&x);this.actions.get("redo").setEnabled(this.canRedo()&&x);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(c.isEnabled());
-this.actions.get("explore").setEnabled(n&&(1==m.edges.length||1==m.vertices.length));this.actions.get("editConnectionPoints").setEnabled(n&&0==m.edges.length&&1==m.vertices.length);this.actions.get("editImage").setEnabled(n&&m.image&&0<m.cells.length);this.actions.get("crop").setEnabled(n&&m.image&&0<m.cells.length);this.actions.get("pageSetup").setEnabled(n);this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);
-this.actions.get("copyStyle").setEnabled(n&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&n&&0<m.cells.length);this.actions.get("editGeometry").setEnabled(0<m.vertices.length);this.actions.get("addToScratchpad").setEnabled(0<m.cells.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&&
+EditorUi.prototype.updateActionStates=function(){D.apply(this,arguments);var c=this.editor.graph,g=this.getCurrentFile(),l=this.getSelectionState(),n=this.isDiagramActive(),x="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=g&&g.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&x);this.actions.get("redo").setEnabled(this.canRedo()&&x);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(c.isEnabled());
+this.actions.get("explore").setEnabled(n&&(1==l.edges.length||1==l.vertices.length));this.actions.get("editConnectionPoints").setEnabled(n&&0==l.edges.length&&1==l.vertices.length);this.actions.get("editImage").setEnabled(n&&l.image&&0<l.cells.length);this.actions.get("crop").setEnabled(n&&l.image&&0<l.cells.length);this.actions.get("pageSetup").setEnabled(n);this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);
+this.actions.get("copyStyle").setEnabled(n&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&n&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);this.actions.get("addToScratchpad").setEnabled(0<l.cells.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("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||
"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.actions.get("properties").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("none"!=this.diagramContainer.style.display);g.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var P=EditorUi.prototype.destroy;
-EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);P.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,g,m,n,x,F,H,M){var L=c.editor.graph;if("xml"==m)c.hideDialog(),c.saveData(g,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==m)c.hideDialog(),c.saveData(g,"svg",mxUtils.getXml(L.getSvg(n,
-x,F)),"image/svg+xml");else{var K=c.getFileData(!0,null,null,null,null,!0),Z=L.getGraphBounds(),ha=Math.floor(Z.width*x/L.view.scale),ca=Math.floor(Z.height*x/L.view.scale);if(K.length<=MAX_REQUEST_SIZE&&ha*ca<MAX_AREA)if(c.hideDialog(),"png"!=m&&"jpg"!=m&&"jpeg"!=m||!c.editor.isExportToCanvas()){var aa={globalVars:L.getExportVariables()};M&&(aa.grid={size:L.gridSize,steps:L.view.gridSteps,color:L.view.gridColor});c.saveRequest(g,m,function(oa,da){return new mxXmlRequest(EXPORT_URL,"format="+m+"&base64="+
-(da||"0")+(null!=oa?"&filename="+encodeURIComponent(oa):"")+"&extras="+encodeURIComponent(JSON.stringify(aa))+(0<H?"&dpi="+H:"")+"&bg="+(null!=n?n:"none")+"&w="+ha+"&h="+ca+"&border="+F+"&xml="+encodeURIComponent(K))})}else"png"==m?c.exportImage(x,null==n||"none"==n,!0,!1,!1,F,!0,!1,null,M,H):c.exportImage(x,!1,!0,!1,!1,F,!0,!1,"jpeg",M);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,
-g="";if(null!=this.pages)for(var m=0;m<this.pages.length;m++){var n=c;this.currentPage!=this.pages[m]&&(n=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[m]),n.model.setRoot(this.pages[m].root));g+=this.pages[m].getName()+" "+n.getIndexableText()+" "}else g=c.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var g={},m=document.createElement("div");m.style.whiteSpace="nowrap";var n=document.createElement("h3");
-mxUtils.write(n,mxUtils.htmlEntities(c));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(n);var x=document.createElement("div");x.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";x.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var F={};try{var H=mxSettings.getCustomLibraries();for(c=0;c<H.length;c++){var M=H[c];if("R"==M.substring(0,1)){var L=JSON.parse(decodeURIComponent(M.substring(1)));
-F[L[0]]={id:L[0],title:L[1],downloadUrl:L[2]}}}}catch(K){}this.remoteInvoke("getCustomLibraries",null,null,function(K){x.innerText="";if(0==K.length)x.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Z=0;Z<K.length;Z++){var ha=K[Z];F[ha.id]&&(g[ha.id]=ha);var ca=this.addCheckbox(x,ha.title,F[ha.id]);(function(aa,oa){mxEvent.addListener(oa,"change",function(){this.checked?g[aa.id]=aa:delete g[aa.id]})})(ha,
-ca)}},mxUtils.bind(this,function(K){x.innerText="";var Z=document.createElement("div");Z.style.padding="8px";Z.style.textAlign="center";mxUtils.write(Z,mxResources.get("error")+": ");mxUtils.write(Z,null!=K&&null!=K.message?K.message:mxResources.get("unknownError"));x.appendChild(Z)}));m.appendChild(x);m=new CustomDialog(this,m,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var K=0,Z;for(Z in g)null==F[Z]&&(K++,mxUtils.bind(this,function(ha){this.remoteInvoke("getFileContent",
-[ha.downloadUrl],null,mxUtils.bind(this,function(ca){K--;0==K&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,ha)),this.showSidebar()}catch(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){K--;0==K&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[Z]));for(Z in F)g[Z]||this.closeLibrary(new RemoteLibrary(this,null,F[Z]));0==K&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");
-this.showDialog(m.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(c){this.remoteWin=
-c;for(var g=0;g<this.remoteInvokeQueue.length;g++)c.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var g=c.msgMarkers,m=this.remoteInvokeCallbacks[g.callbackId];if(null==m)throw Error("No callback for "+(null!=g?g.callbackId:"null"));c.error?m.error&&m.error(c.error.errResp):m.callback&&m.callback.apply(this,c.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,g,m,n,x){var F=
-!0,H=window.setTimeout(mxUtils.bind(this,function(){F=!1;x({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),M=mxUtils.bind(this,function(){window.clearTimeout(H);F&&n.apply(this,arguments)}),L=mxUtils.bind(this,function(){window.clearTimeout(H);F&&x.apply(this,arguments)});m=m||{};m.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:M,error:L});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:g,msgMarkers:m});null!=this.remoteWin?
-this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,g){var m=mxUtils.bind(this,function(K,Z){var ha={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=Z?ha.error={errResp:Z}:null!=K&&(ha.resp=K);this.remoteWin.postMessage(JSON.stringify(ha),"*")});try{var n=c.funtionName,x=this.remoteInvokableFns[n];if(null!=x&&"function"===typeof this[n]){if(x.allowedDomains){for(var F=!1,H=0;H<x.allowedDomains.length;H++)if(g=="https://"+x.allowedDomains[H]){F=
-!0;break}if(!F){m(null,"Invalid Call: "+n+" is not allowed.");return}}var M=c.functionArgs;Array.isArray(M)||(M=[]);if(x.isAsync)M.push(function(){m(Array.prototype.slice.apply(arguments))}),M.push(function(K){m(null,K||"Unkown Error")}),this[n].apply(this,M);else{var L=this[n].apply(this,M);m([L])}}else m(null,"Invalid Call: "+n+" is not found.")}catch(K){m(null,"Invalid Call: An error occurred, "+K.message)}};EditorUi.prototype.openDatabase=function(c,g){if(null==this.database){var m=window.indexedDB||
-window.mozIndexedDB||window.webkitIndexedDB;if(null!=m)try{var n=m.open("database",2);n.onupgradeneeded=function(x){try{var F=n.result;1>x.oldVersion&&F.createObjectStore("objects",{keyPath:"key"});2>x.oldVersion&&(F.createObjectStore("files",{keyPath:"title"}),F.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=g&&g(H)}};n.onsuccess=mxUtils.bind(this,function(x){try{var F=n.result;this.database=F;EditorUi.migrateStorageFiles&&(StorageFile.migrate(F),
-EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if((!H||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var M=document.createElement("iframe");M.style.display="none";M.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(M);var L=!0,K=!1,Z,ha=0,ca=mxUtils.bind(this,
-function(){K=!0;this.setDatabaseItem(".drawioMigrated3",!0);M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),aa=mxUtils.bind(this,function(){ha++;oa()}),oa=mxUtils.bind(this,function(){try{if(ha>=Z.length)ca();else{var ka=Z[ha];StorageFile.getFileContent(this,ka,mxUtils.bind(this,function(ba){null==ba||".scratchpad"==ka&&ba==this.emptyLibraryXml?M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",
-functionArgs:[ka]}),"*"):aa()}),aa)}}catch(ba){console.log(ba)}}),da=mxUtils.bind(this,function(ka){try{this.setDatabaseItem(null,[{title:ka.title,size:ka.data.length,lastModified:Date.now(),type:ka.isLib?"L":"F"},{title:ka.title,data:ka.data}],aa,aa,["filesInfo","files"])}catch(ba){console.log(ba)}});H=mxUtils.bind(this,function(ka){try{if(ka.source==M.contentWindow){var ba={};try{ba=JSON.parse(ka.data)}catch(V){}"init"==ba.event?(M.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
-"*"),M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ba.event||K||(L?null!=ba.resp&&0<ba.resp.length&&null!=ba.resp[0]?(Z=ba.resp[0],L=!1,oa()):ca():null!=ba.resp&&0<ba.resp.length&&null!=ba.resp[0]?da(ba.resp[0]):aa())}}catch(V){console.log(V)}});window.addEventListener("message",H)}})));c(F);F.onversionchange=function(){F.close()}}catch(H){null!=g?g(H):null!=window.console&&console.warn(H)}});n.onerror=g;n.onblocked=
-function(){}}catch(x){null!=g?g(x):null!=window.console&&console.error(x)}else null!=g&&g(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,g,m,n,x){this.openDatabase(mxUtils.bind(this,function(F){try{x=x||"objects";Array.isArray(x)||(x=[x],c=[c],g=[g]);var H=F.transaction(x,"readwrite");H.oncomplete=m;H.onerror=n;for(F=0;F<x.length;F++)H.objectStore(x[F]).put(null!=c&&null!=c[F]?{key:c[F],data:g[F]}:g[F])}catch(M){null!=n&&n(M)}}),n)};EditorUi.prototype.removeDatabaseItem=
-function(c,g,m,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";Array.isArray(n)||(n=[n],c=[c]);var F=x.transaction(n,"readwrite");F.oncomplete=g;F.onerror=m;for(x=0;x<n.length;x++)F.objectStore(n[x]).delete(c[x])}catch(H){null!=m&&m(H)}}),m)};EditorUi.prototype.getDatabaseItem=function(c,g,m,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";var F=x.transaction([n],"readonly").objectStore(n).get(c);F.onsuccess=function(){g(F.result)};F.onerror=m}catch(H){null!=
-m&&m(H)}}),m)};EditorUi.prototype.getDatabaseItems=function(c,g,m){this.openDatabase(mxUtils.bind(this,function(n){try{m=m||"objects";var x=n.transaction([m],"readonly").objectStore(m).openCursor(IDBKeyRange.lowerBound(0)),F=[];x.onsuccess=function(H){null==H.target.result?c(F):(F.push(H.target.result.value),H.target.result.continue())};x.onerror=g}catch(H){null!=g&&g(H)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(c,g,m){this.openDatabase(mxUtils.bind(this,function(n){try{m=m||"objects";
-var x=n.transaction([m],"readonly").objectStore(m).getAllKeys();x.onsuccess=function(){c(x.result)};x.onerror=g}catch(F){null!=g&&g(F)}}),g)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};
-EditorUi.prototype.getComments=function(c,g){var m=this.getCurrentFile();null!=m?m.getComments(c,g):c([])};EditorUi.prototype.addComment=function(c,g,m){var n=this.getCurrentFile();null!=n?n.addComment(c,g,m):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,g){var m=this.getCurrentFile();
-return null!=m?m.newComment(c,g):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,g){var m=this.getCurrentFile();null!=m&&m.getRevisions?m.getRevisions(c,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==
-DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,g,m,n,x,F,H,M){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,g,m,n,x,F,H,M)};EditorUi.prototype.loadFonts=
+EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);P.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,g,l,n,x,F,G,L){var M=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(g,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(g,"svg",mxUtils.getXml(M.getSvg(n,
+x,F)),"image/svg+xml");else{var K=c.getFileData(!0,null,null,null,null,!0),Z=M.getGraphBounds(),ja=Math.floor(Z.width*x/M.view.scale),da=Math.floor(Z.height*x/M.view.scale);if(K.length<=MAX_REQUEST_SIZE&&ja*da<MAX_AREA)if(c.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.editor.isExportToCanvas()){var ba={globalVars:M.getExportVariables()};L&&(ba.grid={size:M.gridSize,steps:M.view.gridSteps,color:M.view.gridColor});c.saveRequest(g,l,function(na,ca){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+
+(ca||"0")+(null!=na?"&filename="+encodeURIComponent(na):"")+"&extras="+encodeURIComponent(JSON.stringify(ba))+(0<G?"&dpi="+G:"")+"&bg="+(null!=n?n:"none")+"&w="+ja+"&h="+da+"&border="+F+"&xml="+encodeURIComponent(K))})}else"png"==l?c.exportImage(x,null==n||"none"==n,!0,!1,!1,F,!0,!1,null,L,G):c.exportImage(x,!1,!0,!1,!1,F,!0,!1,"jpeg",L);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,
+g="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var n=c;this.currentPage!=this.pages[l]&&(n=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[l]),n.model.setRoot(this.pages[l].root));g+=this.pages[l].getName()+" "+n.getIndexableText()+" "}else g=c.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var g={},l=document.createElement("div");l.style.whiteSpace="nowrap";var n=document.createElement("h3");
+mxUtils.write(n,mxUtils.htmlEntities(c));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(n);var x=document.createElement("div");x.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";x.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var F={};try{var G=mxSettings.getCustomLibraries();for(c=0;c<G.length;c++){var L=G[c];if("R"==L.substring(0,1)){var M=JSON.parse(decodeURIComponent(L.substring(1)));
+F[M[0]]={id:M[0],title:M[1],downloadUrl:M[2]}}}}catch(K){}this.remoteInvoke("getCustomLibraries",null,null,function(K){x.innerText="";if(0==K.length)x.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Z=0;Z<K.length;Z++){var ja=K[Z];F[ja.id]&&(g[ja.id]=ja);var da=this.addCheckbox(x,ja.title,F[ja.id]);(function(ba,na){mxEvent.addListener(na,"change",function(){this.checked?g[ba.id]=ba:delete g[ba.id]})})(ja,
+da)}},mxUtils.bind(this,function(K){x.innerText="";var Z=document.createElement("div");Z.style.padding="8px";Z.style.textAlign="center";mxUtils.write(Z,mxResources.get("error")+": ");mxUtils.write(Z,null!=K&&null!=K.message?K.message:mxResources.get("unknownError"));x.appendChild(Z)}));l.appendChild(x);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var K=0,Z;for(Z in g)null==F[Z]&&(K++,mxUtils.bind(this,function(ja){this.remoteInvoke("getFileContent",
+[ja.downloadUrl],null,mxUtils.bind(this,function(da){K--;0==K&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,da,ja)),this.showSidebar()}catch(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){K--;0==K&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[Z]));for(Z in F)g[Z]||this.closeLibrary(new RemoteLibrary(this,null,F[Z]));0==K&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");
+this.showDialog(l.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(c){this.remoteWin=
+c;for(var g=0;g<this.remoteInvokeQueue.length;g++)c.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var g=c.msgMarkers,l=this.remoteInvokeCallbacks[g.callbackId];if(null==l)throw Error("No callback for "+(null!=g?g.callbackId:"null"));c.error?l.error&&l.error(c.error.errResp):l.callback&&l.callback.apply(this,c.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,g,l,n,x){var F=
+!0,G=window.setTimeout(mxUtils.bind(this,function(){F=!1;x({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),L=mxUtils.bind(this,function(){window.clearTimeout(G);F&&n.apply(this,arguments)}),M=mxUtils.bind(this,function(){window.clearTimeout(G);F&&x.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:L,error:M});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:g,msgMarkers:l});null!=this.remoteWin?
+this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,g){var l=mxUtils.bind(this,function(K,Z){var ja={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=Z?ja.error={errResp:Z}:null!=K&&(ja.resp=K);this.remoteWin.postMessage(JSON.stringify(ja),"*")});try{var n=c.funtionName,x=this.remoteInvokableFns[n];if(null!=x&&"function"===typeof this[n]){if(x.allowedDomains){for(var F=!1,G=0;G<x.allowedDomains.length;G++)if(g=="https://"+x.allowedDomains[G]){F=
+!0;break}if(!F){l(null,"Invalid Call: "+n+" is not allowed.");return}}var L=c.functionArgs;Array.isArray(L)||(L=[]);if(x.isAsync)L.push(function(){l(Array.prototype.slice.apply(arguments))}),L.push(function(K){l(null,K||"Unkown Error")}),this[n].apply(this,L);else{var M=this[n].apply(this,L);l([M])}}else l(null,"Invalid Call: "+n+" is not found.")}catch(K){l(null,"Invalid Call: An error occurred, "+K.message)}};EditorUi.prototype.openDatabase=function(c,g){if(null==this.database){var l=window.indexedDB||
+window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var n=l.open("database",2);n.onupgradeneeded=function(x){try{var F=n.result;1>x.oldVersion&&F.createObjectStore("objects",{keyPath:"key"});2>x.oldVersion&&(F.createObjectStore("files",{keyPath:"title"}),F.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(G){null!=g&&g(G)}};n.onsuccess=mxUtils.bind(this,function(x){try{var F=n.result;this.database=F;EditorUi.migrateStorageFiles&&(StorageFile.migrate(F),
+EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(G){if((!G||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var L=document.createElement("iframe");L.style.display="none";L.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(L);var M=!0,K=!1,Z,ja=0,da=mxUtils.bind(this,
+function(){K=!0;this.setDatabaseItem(".drawioMigrated3",!0);L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ba=mxUtils.bind(this,function(){ja++;na()}),na=mxUtils.bind(this,function(){try{if(ja>=Z.length)da();else{var ka=Z[ja];StorageFile.getFileContent(this,ka,mxUtils.bind(this,function(aa){null==aa||".scratchpad"==ka&&aa==this.emptyLibraryXml?L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",
+functionArgs:[ka]}),"*"):ba()}),ba)}}catch(aa){console.log(aa)}}),ca=mxUtils.bind(this,function(ka){try{this.setDatabaseItem(null,[{title:ka.title,size:ka.data.length,lastModified:Date.now(),type:ka.isLib?"L":"F"},{title:ka.title,data:ka.data}],ba,ba,["filesInfo","files"])}catch(aa){console.log(aa)}});G=mxUtils.bind(this,function(ka){try{if(ka.source==L.contentWindow){var aa={};try{aa=JSON.parse(ka.data)}catch(V){}"init"==aa.event?(L.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=aa.event||K||(M?null!=aa.resp&&0<aa.resp.length&&null!=aa.resp[0]?(Z=aa.resp[0],M=!1,na()):da():null!=aa.resp&&0<aa.resp.length&&null!=aa.resp[0]?ca(aa.resp[0]):ba())}}catch(V){console.log(V)}});window.addEventListener("message",G)}})));c(F);F.onversionchange=function(){F.close()}}catch(G){null!=g?g(G):null!=window.console&&console.warn(G)}});n.onerror=g;n.onblocked=
+function(){}}catch(x){null!=g?g(x):null!=window.console&&console.error(x)}else null!=g&&g(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,g,l,n,x){this.openDatabase(mxUtils.bind(this,function(F){try{x=x||"objects";Array.isArray(x)||(x=[x],c=[c],g=[g]);var G=F.transaction(x,"readwrite");G.oncomplete=l;G.onerror=n;for(F=0;F<x.length;F++)G.objectStore(x[F]).put(null!=c&&null!=c[F]?{key:c[F],data:g[F]}:g[F])}catch(L){null!=n&&n(L)}}),n)};EditorUi.prototype.removeDatabaseItem=
+function(c,g,l,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";Array.isArray(n)||(n=[n],c=[c]);var F=x.transaction(n,"readwrite");F.oncomplete=g;F.onerror=l;for(x=0;x<n.length;x++)F.objectStore(n[x]).delete(c[x])}catch(G){null!=l&&l(G)}}),l)};EditorUi.prototype.getDatabaseItem=function(c,g,l,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";var F=x.transaction([n],"readonly").objectStore(n).get(c);F.onsuccess=function(){g(F.result)};F.onerror=l}catch(G){null!=
+l&&l(G)}}),l)};EditorUi.prototype.getDatabaseItems=function(c,g,l){this.openDatabase(mxUtils.bind(this,function(n){try{l=l||"objects";var x=n.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),F=[];x.onsuccess=function(G){null==G.target.result?c(F):(F.push(G.target.result.value),G.target.result.continue())};x.onerror=g}catch(G){null!=g&&g(G)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(c,g,l){this.openDatabase(mxUtils.bind(this,function(n){try{l=l||"objects";
+var x=n.transaction([l],"readonly").objectStore(l).getAllKeys();x.onsuccess=function(){c(x.result)};x.onerror=g}catch(F){null!=g&&g(F)}}),g)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};
+EditorUi.prototype.getComments=function(c,g){var l=this.getCurrentFile();null!=l?l.getComments(c,g):c([])};EditorUi.prototype.addComment=function(c,g,l){var n=this.getCurrentFile();null!=n?n.addComment(c,g,l):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,g){var l=this.getCurrentFile();
+return null!=l?l.newComment(c,g):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,g){var l=this.getCurrentFile();null!=l&&l.getRevisions?l.getRevisions(c,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==
+DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,g,l,n,x,F,G,L){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,g,l,n,x,F,G,L)};EditorUi.prototype.loadFonts=
function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,g)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};
-EditorUi.prototype.exportToCanvas=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca,aa,oa,da){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,g,m,n,x,F,H,M,L,K,Z,ha,ca,aa,oa,da)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,g,m,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,
-g,m,n)};EditorUi.prototype.convertImageToDataUri=function(c,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,g)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,g,m,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,g,m,n)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,g,m,n,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,g,m,n,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],g=0;g<localStorage.length;g++){var m=localStorage.key(g),n=localStorage.getItem(m);if(0<m.length&&(".scratchpad"==m||"."!=m.charAt(0))&&0<n.length){var x=
-"<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(x||n)&&c.push(m)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(c);return{title:c,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,f,l,u,y,q){function C(){for(var da=M.getElementsByTagName("div"),ka=0,ba=0;ba<da.length;ba++)"none"!=da[ba].style.display&&da[ba].parentNode==M&&ka++;L.style.display=0==ka?"block":"none"}function J(da,ka,ba,V){function k(){ka.removeChild(N);ka.removeChild(T);I.style.display="block";v.style.display="block"}x={div:ka,comment:da,saveCallback:ba,deleteOnCancel:V};var v=ka.querySelector(".geCommentTxt"),I=ka.querySelector(".geCommentActionsList"),N=document.createElement("textarea");
-N.className="geCommentEditTxtArea";N.style.minHeight=v.offsetHeight+"px";N.value=da.content;ka.insertBefore(N,v);var T=document.createElement("div");T.className="geCommentEditBtns";var W=mxUtils.button(mxResources.get("cancel"),function(){V?(ka.parentNode.removeChild(ka),C()):k();x=null});W.className="geCommentEditBtn";T.appendChild(W);var U=mxUtils.button(mxResources.get("save"),function(){v.innerText="";da.content=N.value;mxUtils.write(v,da.content);k();ba(da);x=null});mxEvent.addListener(N,"keydown",
-mxUtils.bind(this,function(Y){mxEvent.isConsumed(Y)||((mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y))&&13==Y.keyCode?(U.click(),mxEvent.consume(Y)):27==Y.keyCode&&(W.click(),mxEvent.consume(Y)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);ka.insertBefore(T,v);I.style.display="none";v.style.display="none";N.focus()}function S(da,ka){ka.innerText="";da=new Date(da.modifiedDate);var ba=b.timeSince(da);null==ba&&(ba=mxResources.get("lessThanAMinute"));
-mxUtils.write(ka,mxResources.get("timeAgo",[ba],"{1} ago"));ka.setAttribute("title",da.toLocaleDateString()+" "+da.toLocaleTimeString())}function D(da){var ka=document.createElement("img");ka.className="geCommentBusyImg";ka.src=IMAGE_PATH+"/spin.gif";da.appendChild(ka);da.busyImg=ka}function P(da){da.style.border="1px solid red";da.busyImg.parentNode==da&&da.removeChild(da.busyImg)}function c(da){da.style.border="";da.busyImg.parentNode==da&&da.removeChild(da.busyImg)}function g(da,ka,ba,V,k){function v(na,
-la,qa){var ya=document.createElement("li");ya.className="geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,na);ya.appendChild(wa);mxEvent.addListener(wa,"click",function(Ia){la(Ia,da);Ia.preventDefault();mxEvent.consume(Ia)});fa.appendChild(ya);qa&&(ya.style.display="none")}function I(){function na(ya){la.push(qa);if(null!=ya.replies)for(var wa=0;wa<ya.replies.length;wa++)qa=qa.nextSibling,na(ya.replies[wa])}var la=[],qa=T;na(da);return{pdiv:qa,
-replies:la}}function N(na,la,qa,ya,wa){function Ia(){D(Ma);da.addReply(Ga,function(sa){Ga.id=sa;da.replies.push(Ga);c(Ma);qa&&qa()},function(sa){Aa();P(Ma);b.handleError(sa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ya,wa)}function Aa(){J(Ga,Ma,function(sa){Ia()},!0)}var Ba=I().pdiv,Ga=b.newComment(na,b.getCurrentUser());Ga.pCommentId=da.id;null==da.replies&&(da.replies=[]);var Ma=g(Ga,da.replies,Ba,V+1);la?Aa():Ia()}if(k||!da.isResolved){L.style.display="none";var T=
-document.createElement("div");T.className="geCommentContainer";T.setAttribute("data-commentId",da.id);T.style.marginLeft=20*V+5+"px";da.isResolved&&(F.style.opacity="0.7");var W=document.createElement("div");W.className="geCommentHeader";var U=document.createElement("img");U.className="geCommentUserImg";U.src=null!=da.user&&null!=da.user.pictureUrl?da.user.pictureUrl:Editor.userImage;W.appendChild(U);U=document.createElement("div");U.className="geCommentHeaderTxt";W.appendChild(U);var Y=document.createElement("div");
-Y.className="geCommentUsername";mxUtils.write(Y,null!=da.user?da.user.displayName:mxResources.get("unknownUser"));U.appendChild(Y);Y=document.createElement("div");Y.className="geCommentDate";Y.setAttribute("data-commentId",da.id);S(da,Y);U.appendChild(Y);T.appendChild(W);W=document.createElement("div");W.className="geCommentTxt";mxUtils.write(W,da.content||"");T.appendChild(W);da.isLocked&&(T.style.opacity="0.5");W=document.createElement("div");W.className="geCommentActions";var fa=document.createElement("ul");
-fa.className="geCommentActionsList";W.appendChild(fa);m||da.isLocked||0!=V&&!n||v(mxResources.get("reply"),function(){N("",!0)},da.isResolved);U=b.getCurrentUser();null==U||null==da.user||U.id!=da.user.id||m||da.isLocked||(v(mxResources.get("edit"),function(){function na(){J(da,T,function(){D(T);da.editComment(da.content,function(){c(T)},function(la){P(T);na();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}na()},da.isResolved),v(mxResources.get("delete"),
-function(){b.confirm(mxResources.get("areYouSure"),function(){D(T);da.deleteComment(function(na){if(!0===na){na=T.querySelector(".geCommentTxt");na.innerText="";mxUtils.write(na,mxResources.get("msgDeleted"));var la=T.querySelectorAll(".geCommentAction");for(na=0;na<la.length;na++)la[na].parentNode.removeChild(la[na]);c(T);T.style.opacity="0.5"}else{la=I(da).replies;for(na=0;na<la.length;na++)M.removeChild(la[na]);for(na=0;na<ka.length;na++)if(ka[na]==da){ka.splice(na,1);break}L.style.display=0==
-M.getElementsByTagName("div").length?"block":"none"}},function(na){P(T);b.handleError(na,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},da.isResolved));m||da.isLocked||0!=V||v(da.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(na){function la(){var qa=na.target;qa.innerText="";da.isResolved=!da.isResolved;mxUtils.write(qa,da.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ya=da.isResolved?"none":"",wa=I(da).replies,Ia=
-"light-dark("+(da.isResolved?"ghostWhite":"white")+", transparent)",Aa=0;Aa<wa.length;Aa++){wa[Aa].style.backgroundColor=Ia;for(var Ba=wa[Aa].querySelectorAll(".geCommentAction"),Ga=0;Ga<Ba.length;Ga++)Ba[Ga]!=qa.parentNode&&(Ba[Ga].style.display=ya);ca||(wa[Aa].style.display="none")}C()}da.isResolved?N(mxResources.get("reOpened")+": ",!0,la,!1,!0):N(mxResources.get("markedAsResolved"),!1,la,!0)});T.appendChild(W);null!=ba?M.insertBefore(T,ba.nextSibling):M.appendChild(T);for(ba=0;null!=da.replies&&
-ba<da.replies.length;ba++)W=da.replies[ba],W.isResolved=da.isResolved,g(W,da.replies,null,V+1,k);null!=x&&(x.comment.id==da.id?(k=da.content,da.content=x.comment.content,J(da,T,x.saveCallback,x.deleteOnCancel),da.content=k):null==x.comment.id&&x.comment.pCommentId==da.id&&(M.appendChild(x.div),J(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return T}}var m=!b.canComment(),n=b.canReplyToReplies(),x=null,F=document.createElement("div");F.className="geCommentsWin";var H=EditorUi.compactUi?"26px":
-"30px",M=document.createElement("div");M.className="geCommentsList";M.style.bottom=parseInt(H)+7+"px";F.appendChild(M);var L=document.createElement("span");L.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(L,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=H;K.style.padding="3px 4px 4px 4px";H=document.createElement("a");H.className="geButton";if(!m){var Z=H.cloneNode();Z.style.backgroundImage=
-"url("+Editor.plusImage+")";Z.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Z,"click",function(da){function ka(){J(ba,V,function(k){D(V);b.addComment(k,function(v){k.id=v;aa.push(k);c(V)},function(v){P(V);ka();b.handleError(v,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ba=b.newComment("",b.getCurrentUser()),V=g(ba,aa,null,0);ka();da.preventDefault();mxEvent.consume(da)});K.appendChild(Z)}var ha=H.cloneNode();ha.style.backgroundImage=
-"url("+Editor.checkImage+")";ha.setAttribute("title",mxResources.get("showResolved"));var ca=!1;mxEvent.addListener(ha,"click",function(da){(ca=!ca)?ha.classList.add("geActiveItem"):ha.classList.remove("geActiveItem");oa();da.preventDefault();mxEvent.consume(da)});K.appendChild(ha);b.commentsRefreshNeeded()&&(Z=H.cloneNode(),Z.style.backgroundImage="url("+Editor.refreshImage+")",Z.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(Z,"click",function(da){oa();da.preventDefault();
-mxEvent.consume(da)}),K.appendChild(Z));b.commentsSaveNeeded()&&(H=H.cloneNode(),H.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',H.setAttribute("title",mxResources.get("save")),H.className="geButton geAdaptiveAsset",mxEvent.addListener(H,"click",function(da){q();da.preventDefault();mxEvent.consume(da)}),K.appendChild(H));F.appendChild(K);var aa=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var da=x.div.querySelector(".geCommentEditTxtArea"),
-ka=x.div.querySelector(".geCommentEditBtns");x.comment.content=da.value;da.parentNode.removeChild(da);ka.parentNode.removeChild(ka)}catch(ba){b.handleError(ba)}M.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ba){function V(k){if(null!=k){k.sort(function(I,N){return new Date(I.modifiedDate)-new Date(N.modifiedDate)});
-for(var v=0;v<k.length;v++)V(k[v].replies)}}ba.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});M.innerText="";M.appendChild(L);L.style.display="block";aa=ba;for(ba=0;ba<aa.length;ba++)V(aa[ba].replies),g(aa[ba],aa,null,0,ca);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(M.appendChild(x.div),J(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(ba){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ba&&ba.message?": "+ba.message:
-""));this.hasError=!0})):M.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;K=mxUtils.bind(this,function(){function da(v){var I=ba[v.id];if(null!=I)for(S(v,I),I=0;null!=v.replies&&I<v.replies.length;I++)da(v.replies[I])}if(this.window.isVisible()){for(var ka=M.querySelectorAll(".geCommentDate"),ba={},V=0;V<ka.length;V++){var k=ka[V];ba[k.getAttribute("data-commentId")]=k}for(V=0;V<aa.length;V++)da(aa[V])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=
-new mxWindow(mxResources.get("comments"),F,f,l,u,y,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,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,f,l,u,y,q,C,J,S,D,P){var c=document.createElement("div");c.style.textAlign="center";P=null!=P?P:44;var g=
-document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=P+"px";g.style.lineHeight="1.2em";mxUtils.write(g,f);c.appendChild(g);null!=D&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",D),g.appendChild(f),c.appendChild(g));D=document.createElement("div");D.style.textAlign="center";D.style.whiteSpace="nowrap";var m=document.createElement("input");m.setAttribute("type","checkbox");q=mxUtils.button(q||
-mxResources.get("cancel"),function(){b.hideDialog();null!=u&&u(m.checked)});q.className="geBtn";null!=J&&(q.innerHTML=J+"<br>"+q.innerHTML,q.style.display="inline-block",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.style.width="40%");b.editor.cancelFirst&&D.appendChild(q);var n=mxUtils.button(y||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(m.checked)});D.appendChild(n);null!=C?(n.innerHTML=C+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom=
-"8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||D.appendChild(q);c.appendChild(D);S?(D.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.style.marginBottom="0px",g.appendChild(m),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),g.appendChild(y),c.appendChild(g),mxEvent.addListener(y,"click",function(x){m.checked=!m.checked;mxEvent.consume(x)})):
+EditorUi.prototype.exportToCanvas=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da,ba,na,ca){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,g,l,n,x,F,G,L,M,K,Z,ja,da,ba,na,ca)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,g,l,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,
+g,l,n)};EditorUi.prototype.convertImageToDataUri=function(c,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,g)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,g,l,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,g,l,n)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
+return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,g,l,n,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,g,l,n,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],g=0;g<localStorage.length;g++){var l=localStorage.key(g),n=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<n.length){var x=
+"<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(x||n)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(c);return{title:c,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,f,m,t,y,q){function B(){for(var ca=L.getElementsByTagName("div"),ka=0,aa=0;aa<ca.length;aa++)"none"!=ca[aa].style.display&&ca[aa].parentNode==L&&ka++;M.style.display=0==ka?"block":"none"}function I(ca,ka,aa,V){function k(){ka.removeChild(N);ka.removeChild(T);J.style.display="block";v.style.display="block"}x={div:ka,comment:ca,saveCallback:aa,deleteOnCancel:V};var v=ka.querySelector(".geCommentTxt"),J=ka.querySelector(".geCommentActionsList"),N=document.createElement("textarea");
+N.className="geCommentEditTxtArea";N.style.minHeight=v.offsetHeight+"px";N.value=ca.content;ka.insertBefore(N,v);var T=document.createElement("div");T.className="geCommentEditBtns";var W=mxUtils.button(mxResources.get("cancel"),function(){V?(ka.parentNode.removeChild(ka),B()):k();x=null});W.className="geCommentEditBtn";T.appendChild(W);var U=mxUtils.button(mxResources.get("save"),function(){v.innerText="";ca.content=N.value;mxUtils.write(v,ca.content);k();aa(ca);x=null});mxEvent.addListener(N,"keydown",
+mxUtils.bind(this,function(Y){mxEvent.isConsumed(Y)||((mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y))&&13==Y.keyCode?(U.click(),mxEvent.consume(Y)):27==Y.keyCode&&(W.click(),mxEvent.consume(Y)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);ka.insertBefore(T,v);J.style.display="none";v.style.display="none";N.focus()}function S(ca,ka){ka.innerText="";ca=new Date(ca.modifiedDate);var aa=b.timeSince(ca);null==aa&&(aa=mxResources.get("lessThanAMinute"));
+mxUtils.write(ka,mxResources.get("timeAgo",[aa],"{1} ago"));ka.setAttribute("title",ca.toLocaleDateString()+" "+ca.toLocaleTimeString())}function D(ca){var ka=document.createElement("img");ka.className="geCommentBusyImg";ka.src=IMAGE_PATH+"/spin.gif";ca.appendChild(ka);ca.busyImg=ka}function P(ca){ca.style.border="1px solid red";ca.busyImg.parentNode==ca&&ca.removeChild(ca.busyImg)}function c(ca){ca.style.border="";ca.busyImg.parentNode==ca&&ca.removeChild(ca.busyImg)}function g(ca,ka,aa,V,k){function v(oa,
+la,qa){var ya=document.createElement("li");ya.className="geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,oa);ya.appendChild(wa);mxEvent.addListener(wa,"click",function(Ia){la(Ia,ca);Ia.preventDefault();mxEvent.consume(Ia)});fa.appendChild(ya);qa&&(ya.style.display="none")}function J(){function oa(ya){la.push(qa);if(null!=ya.replies)for(var wa=0;wa<ya.replies.length;wa++)qa=qa.nextSibling,oa(ya.replies[wa])}var la=[],qa=T;oa(ca);return{pdiv:qa,
+replies:la}}function N(oa,la,qa,ya,wa){function Ia(){D(Ma);ca.addReply(Ga,function(sa){Ga.id=sa;ca.replies.push(Ga);c(Ma);qa&&qa()},function(sa){Aa();P(Ma);b.handleError(sa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ya,wa)}function Aa(){I(Ga,Ma,function(sa){Ia()},!0)}var Ba=J().pdiv,Ga=b.newComment(oa,b.getCurrentUser());Ga.pCommentId=ca.id;null==ca.replies&&(ca.replies=[]);var Ma=g(Ga,ca.replies,Ba,V+1);la?Aa():Ia()}if(k||!ca.isResolved){M.style.display="none";var T=
+document.createElement("div");T.className="geCommentContainer";T.setAttribute("data-commentId",ca.id);T.style.marginLeft=20*V+5+"px";ca.isResolved&&(F.style.opacity="0.7");var W=document.createElement("div");W.className="geCommentHeader";var U=document.createElement("img");U.className="geCommentUserImg";U.src=null!=ca.user&&null!=ca.user.pictureUrl?ca.user.pictureUrl:Editor.userImage;W.appendChild(U);U=document.createElement("div");U.className="geCommentHeaderTxt";W.appendChild(U);var Y=document.createElement("div");
+Y.className="geCommentUsername";mxUtils.write(Y,null!=ca.user?ca.user.displayName:mxResources.get("unknownUser"));U.appendChild(Y);Y=document.createElement("div");Y.className="geCommentDate";Y.setAttribute("data-commentId",ca.id);S(ca,Y);U.appendChild(Y);T.appendChild(W);W=document.createElement("div");W.className="geCommentTxt";mxUtils.write(W,ca.content||"");T.appendChild(W);ca.isLocked&&(T.style.opacity="0.5");W=document.createElement("div");W.className="geCommentActions";var fa=document.createElement("ul");
+fa.className="geCommentActionsList";W.appendChild(fa);l||ca.isLocked||0!=V&&!n||v(mxResources.get("reply"),function(){N("",!0)},ca.isResolved);U=b.getCurrentUser();null==U||null==ca.user||U.id!=ca.user.id||l||ca.isLocked||(v(mxResources.get("edit"),function(){function oa(){I(ca,T,function(){D(T);ca.editComment(ca.content,function(){c(T)},function(la){P(T);oa();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}oa()},ca.isResolved),v(mxResources.get("delete"),
+function(){b.confirm(mxResources.get("areYouSure"),function(){D(T);ca.deleteComment(function(oa){if(!0===oa){oa=T.querySelector(".geCommentTxt");oa.innerText="";mxUtils.write(oa,mxResources.get("msgDeleted"));var la=T.querySelectorAll(".geCommentAction");for(oa=0;oa<la.length;oa++)la[oa].parentNode.removeChild(la[oa]);c(T);T.style.opacity="0.5"}else{la=J(ca).replies;for(oa=0;oa<la.length;oa++)L.removeChild(la[oa]);for(oa=0;oa<ka.length;oa++)if(ka[oa]==ca){ka.splice(oa,1);break}M.style.display=0==
+L.getElementsByTagName("div").length?"block":"none"}},function(oa){P(T);b.handleError(oa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},ca.isResolved));l||ca.isLocked||0!=V||v(ca.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(oa){function la(){var qa=oa.target;qa.innerText="";ca.isResolved=!ca.isResolved;mxUtils.write(qa,ca.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ya=ca.isResolved?"none":"",wa=J(ca).replies,Ia=
+"light-dark("+(ca.isResolved?"ghostWhite":"white")+", transparent)",Aa=0;Aa<wa.length;Aa++){wa[Aa].style.backgroundColor=Ia;for(var Ba=wa[Aa].querySelectorAll(".geCommentAction"),Ga=0;Ga<Ba.length;Ga++)Ba[Ga]!=qa.parentNode&&(Ba[Ga].style.display=ya);da||(wa[Aa].style.display="none")}B()}ca.isResolved?N(mxResources.get("reOpened")+": ",!0,la,!1,!0):N(mxResources.get("markedAsResolved"),!1,la,!0)});T.appendChild(W);null!=aa?L.insertBefore(T,aa.nextSibling):L.appendChild(T);for(aa=0;null!=ca.replies&&
+aa<ca.replies.length;aa++)W=ca.replies[aa],W.isResolved=ca.isResolved,g(W,ca.replies,null,V+1,k);null!=x&&(x.comment.id==ca.id?(k=ca.content,ca.content=x.comment.content,I(ca,T,x.saveCallback,x.deleteOnCancel),ca.content=k):null==x.comment.id&&x.comment.pCommentId==ca.id&&(L.appendChild(x.div),I(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return T}}var l=!b.canComment(),n=b.canReplyToReplies(),x=null,F=document.createElement("div");F.className="geCommentsWin";var G=EditorUi.compactUi?"26px":
+"30px",L=document.createElement("div");L.className="geCommentsList";L.style.bottom=parseInt(G)+7+"px";F.appendChild(L);var M=document.createElement("span");M.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(M,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=G;K.style.padding="3px 4px 4px 4px";G=document.createElement("a");G.className="geButton";if(!l){var Z=G.cloneNode();Z.style.backgroundImage=
+"url("+Editor.plusImage+")";Z.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Z,"click",function(ca){function ka(){I(aa,V,function(k){D(V);b.addComment(k,function(v){k.id=v;ba.push(k);c(V)},function(v){P(V);ka();b.handleError(v,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var aa=b.newComment("",b.getCurrentUser()),V=g(aa,ba,null,0);ka();ca.preventDefault();mxEvent.consume(ca)});K.appendChild(Z)}var ja=G.cloneNode();ja.style.backgroundImage=
+"url("+Editor.checkImage+")";ja.setAttribute("title",mxResources.get("showResolved"));var da=!1;mxEvent.addListener(ja,"click",function(ca){(da=!da)?ja.classList.add("geActiveItem"):ja.classList.remove("geActiveItem");na();ca.preventDefault();mxEvent.consume(ca)});K.appendChild(ja);b.commentsRefreshNeeded()&&(Z=G.cloneNode(),Z.style.backgroundImage="url("+Editor.refreshImage+")",Z.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(Z,"click",function(ca){na();ca.preventDefault();
+mxEvent.consume(ca)}),K.appendChild(Z));b.commentsSaveNeeded()&&(G=G.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',G.setAttribute("title",mxResources.get("save")),G.className="geButton geAdaptiveAsset",mxEvent.addListener(G,"click",function(ca){q();ca.preventDefault();mxEvent.consume(ca)}),K.appendChild(G));F.appendChild(K);var ba=[],na=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var ca=x.div.querySelector(".geCommentEditTxtArea"),
+ka=x.div.querySelector(".geCommentEditBtns");x.comment.content=ca.value;ca.parentNode.removeChild(ca);ka.parentNode.removeChild(ka)}catch(aa){b.handleError(aa)}L.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(aa){function V(k){if(null!=k){k.sort(function(J,N){return new Date(J.modifiedDate)-new Date(N.modifiedDate)});
+for(var v=0;v<k.length;v++)V(k[v].replies)}}aa.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});L.innerText="";L.appendChild(M);M.style.display="block";ba=aa;for(aa=0;aa<ba.length;aa++)V(ba[aa].replies),g(ba[aa],ba,null,0,da);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(L.appendChild(x.div),I(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(aa){L.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(aa&&aa.message?": "+aa.message:
+""));this.hasError=!0})):L.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});na();this.refreshComments=na;K=mxUtils.bind(this,function(){function ca(v){var J=aa[v.id];if(null!=J)for(S(v,J),J=0;null!=v.replies&&J<v.replies.length;J++)ca(v.replies[J])}if(this.window.isVisible()){for(var ka=L.querySelectorAll(".geCommentDate"),aa={},V=0;V<ka.length;V++){var k=ka[V];aa[k.getAttribute("data-commentId")]=k}for(V=0;V<ba.length;V++)ca(ba[V])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=
+new mxWindow(mxResources.get("comments"),F,f,m,t,y,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,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,f,m,t,y,q,B,I,S,D,P){var c=document.createElement("div");c.style.textAlign="center";P=null!=P?P:44;var g=
+document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=P+"px";g.style.lineHeight="1.2em";mxUtils.write(g,f);c.appendChild(g);null!=D&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",D),g.appendChild(f),c.appendChild(g));D=document.createElement("div");D.style.textAlign="center";D.style.whiteSpace="nowrap";var l=document.createElement("input");l.setAttribute("type","checkbox");q=mxUtils.button(q||
+mxResources.get("cancel"),function(){b.hideDialog();null!=t&&t(l.checked)});q.className="geBtn";null!=I&&(q.innerHTML=I+"<br>"+q.innerHTML,q.style.display="inline-block",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.style.width="40%");b.editor.cancelFirst&&D.appendChild(q);var n=mxUtils.button(y||mxResources.get("ok"),function(){b.hideDialog();null!=m&&m(l.checked)});D.appendChild(n);null!=B?(n.innerHTML=B+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom=
+"8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||D.appendChild(q);c.appendChild(D);S?(D.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.style.marginBottom="0px",g.appendChild(l),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),g.appendChild(y),c.appendChild(g),mxEvent.addListener(y,"click",function(x){l.checked=!l.checked;mxEvent.consume(x)})):
D.style.marginTop="12px";this.init=function(){n.focus()};this.container=c},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;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)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,f,l){this.ui=b;this.page=f;this.previous=this.name=l}
-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,f,l){this.ui=b;this.oldIndex=f;this.newIndex=l}
-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,f,l){this.ui=b;this.previousPage=this.page=f;null!=f&&(this.ui.updatePageRoot(f),null!=l&&(f.viewState=l))}
-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var f=this.ui.editor,l=f.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(f.getGraphXml(!0)));b.viewState=l.getViewState();b.root=l.model.root;null!=b.model&&b.model.rootChanged(b.root);l.view.clear(b.root,!0);l.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;
-l.model.prefix=Editor.guid()+"-";l.model.rootChanged(b.root);l.setViewState(b.viewState);l.gridEnabled=l.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);f.graph.fireEvent(new mxEventObject(mxEvent.ROOT));f.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,f,l,u,y){SelectPage.call(this,b,l);this.relatedPage=f;this.index=u;this.previousIndex=null;this.noSelect=y}mxUtils.extend(ChangePage,SelectPage);
+DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,f,m){this.ui=b;this.page=f;this.previous=this.name=m}
+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,f,m){this.ui=b;this.oldIndex=f;this.newIndex=m}
+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,f,m){this.ui=b;this.previousPage=this.page=f;null!=f&&(this.ui.updatePageRoot(f),null!=m&&(f.viewState=m))}
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var f=this.ui.editor,m=f.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(f.getGraphXml(!0)));b.viewState=m.getViewState();b.root=m.model.root;null!=b.model&&b.model.rootChanged(b.root);m.view.clear(b.root,!0);m.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;
+m.model.prefix=Editor.guid()+"-";m.model.rootChanged(b.root);m.setViewState(b.viewState);m.gridEnabled=m.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);f.graph.fireEvent(new mxEventObject(mxEvent.ROOT));f.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,f,m,t,y){SelectPage.call(this,b,m);this.relatedPage=f;this.index=t;this.previousIndex=null;this.noSelect=y}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};function ReplaceDiagram(b,f){this.ui=b;this.data=f}
-ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,f=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var l=new mxCodec(this.data.ownerDocument),u=new mxGraphModel;l.decode(this.data,u);this.data=f;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=u.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,
-!0);b.model.rootChanged(u.root);b.fireEvent(new mxEventObject(mxEvent.ROOT))};EditorUi.prototype.tabContainerVisible=!0;EditorUi.prototype.setTabContainerVisible=function(b,f){Editor.isSettingsEnabled()&&f&&(mxSettings.settings.pages=b,mxSettings.save());this.tabContainerVisible=b;this.updateTabContainer()};EditorUi.prototype.isTabContainerVisible=function(){return this.tabContainerVisible};EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
-EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&null!=b)for(var l=0;l<this.pages.length;l++)if(this.pages[l]==b){f=l;break}return f};EditorUi.prototype.getPageById=function(b,f){f=null!=f?f:this.pages;if(null!=f)for(var l=0;l<f.length;l++)if(f[l].getId()==b)return f[l];return null};
-EditorUi.prototype.createImageForPageLink=function(b,f,l,u){var y=b.indexOf(","),q=null;0<y&&(y=this.getPageById(b.substring(y+1)),null!=y&&y!=f&&(q=this.getImageForPage(y,f,l,u),q.originalSrc=b));null==q&&(q={originalSrc:b});return q};
+ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,f=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var m=new mxCodec(this.data.ownerDocument),t=new mxGraphModel;m.decode(this.data,t);this.data=f;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=t.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,
+!0);b.model.rootChanged(t.root);b.fireEvent(new mxEventObject(mxEvent.ROOT))};EditorUi.prototype.tabContainerVisible=!0;EditorUi.prototype.setTabContainerVisible=function(b,f){Editor.isSettingsEnabled()&&f&&(mxSettings.settings.pages=b,mxSettings.save());this.tabContainerVisible=b;this.updateTabContainer()};EditorUi.prototype.isTabContainerVisible=function(){return this.tabContainerVisible};EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
+EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&null!=b)for(var m=0;m<this.pages.length;m++)if(this.pages[m]==b){f=m;break}return f};EditorUi.prototype.getPageById=function(b,f){f=null!=f?f:this.pages;if(null!=f)for(var m=0;m<f.length;m++)if(f[m].getId()==b)return f[m];return null};
+EditorUi.prototype.createImageForPageLink=function(b,f,m,t){var y=b.indexOf(","),q=null;0<y&&(y=this.getPageById(b.substring(y+1)),null!=y&&y!=f&&(q=this.getImageForPage(y,f,m,t),q.originalSrc=b));null==q&&(q={originalSrc:b});return q};
EditorUi.prototype.pageSelected=function(){var b=this.editor.graph,f=this.currentPage;null!=f&&(b.tooltipHandler.hide(),null==f.viewState||null==f.viewState.scrollTop||null==f.viewState.scrollLeft?(b.selectUnlockedLayer(),this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollleft=0,b.container.scrollTop=0,this.chromelessResize())):b.setScrollbarPositions(f.viewState,b.view.translate.x,b.view.translate.y),this.updateTabContainer(),this.scrollToPage())};
-EditorUi.prototype.getImageForPage=function(b,f,l,u){l=null!=l?l:this.editor.graph;var y=l.getGlobalVariable;l=this.createTemporaryGraph(l.getStylesheet());var q=this.getPageIndex(null!=f?f:this.currentPage);l.getGlobalVariable=function(J){return"pagenumber"==J?q+1:"page"==J&&null!=f?f.getName():y.apply(this,arguments)};document.body.appendChild(l.container);this.updatePageRoot(b);l.setAdaptiveColors(b.viewState.adaptiveColors);l.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=
-"";u=l.getSvg(null,null,null,null,null,null,null,null,null,null,u,null,null,null,!0,!0);var C=l.getGraphBounds();document.body.removeChild(l.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(u)),C.width,C.height,C.x,C.y)};
+EditorUi.prototype.getImageForPage=function(b,f,m,t){m=null!=m?m:this.editor.graph;var y=m.getGlobalVariable;m=this.createTemporaryGraph(m.getStylesheet());var q=this.getPageIndex(null!=f?f:this.currentPage);m.getGlobalVariable=function(I){return"pagenumber"==I?q+1:"page"==I&&null!=f?f.getName():y.apply(this,arguments)};document.body.appendChild(m.container);this.updatePageRoot(b);m.setAdaptiveColors(b.viewState.adaptiveColors);m.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=
+"";t=m.getSvg(null,null,null,null,null,null,null,null,null,null,t,null,null,null,!0,!0);var B=m.getGraphBounds();document.body.removeChild(m.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(t)),B.width,B.height,B.x,B.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,f=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){f.apply(b.view,
-arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,J){C=J.getProperty("edit").changes;for(J=0;J<C.length;J++)if(C[J]instanceof RenamePage||C[J]instanceof ChangePage||C[J]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==C.length&&C[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var l=b.sizeDidChange,u=null,y=this;b.sizeDidChange=
-function(){var C=l.apply(this,arguments);null!=y.currentPage&&u!=y.currentPage&&(u=y.currentPage,y.pageSelected());return C};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var q=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",q);this.editor.addListener("pagesPatched",q);this.editor.addListener("pageRenamed",q);this.editor.addListener("pageMoved",q);this.editor.addListener("fileLoaded",q);
-this.editor.addListener("pageSelected",mxUtils.bind(this,function(C,J){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(C,J){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
-EditorUi.prototype.scrollToPage=function(b,f){var l=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),u=null!=b?b:this.currentPage;null!=l&&null!=this.tabScroller&&this.tabScroller.children.length>l&&null!=this.tabScroller.children[l]&&(u!=this.lastScrollPage||f)&&(this.tabScroller.children[l].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[l].className="geTab gePageTab geActivePage",this.lastScrollPage=u)};
-EditorUi.prototype.restoreViewState=function(b,f,l){b=null!=b?this.getPageById(b.getId()):null;var u=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(u.setViewState(f),this.editor.updateGraphComponents(),u.view.revalidate(),u.sizeDidChange()),u.container.scrollLeft=u.view.translate.x*u.view.scale+f.scrollLeft,u.container.scrollTop=u.view.translate.y*u.view.scale+f.scrollTop,u.restoreSelection(l))};
-Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),l=parseFloat(b.getAttribute("pageScale")),u=parseFloat(b.getAttribute("pageWidth")),y=parseFloat(b.getAttribute("pageHeight")),q=b.getAttribute("background"),C=this.parseBackgroundImage(b.getAttribute("backgroundImage")),J=b.getAttribute("extFonts");if(J)try{J=J.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=q&&0<q.length?q:null,backgroundImage:C,pageScale:isNaN(l)?mxGraph.prototype.pageScale:l,pageFormat:isNaN(u)||isNaN(y)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,u,y),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:J||[]}};
-Graph.prototype.saveViewState=function(b,f,l,u,y){l||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),
-f.setAttribute("fold",null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);l=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=l&&(f.setAttribute("pageWidth",l.width),f.setAttribute("pageHeight",l.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),u=this.getBackgroundImageObject(b.backgroundImage,
-u,y),null!=u&&f.setAttribute("backgroundImage",JSON.stringify(u)));f.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");f.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?f.removeAttribute("adaptiveColors"):f.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&f.setAttribute("extFonts",b.extFonts.map(function(q){return q.name+"^"+q.url}).join("|"))};
+arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(B,I){B=I.getProperty("edit").changes;for(I=0;I<B.length;I++)if(B[I]instanceof RenamePage||B[I]instanceof ChangePage||B[I]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==B.length&&B[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var m=b.sizeDidChange,t=null,y=this;b.sizeDidChange=
+function(){var B=m.apply(this,arguments);null!=y.currentPage&&t!=y.currentPage&&(t=y.currentPage,y.pageSelected());return B};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var q=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",q);this.editor.addListener("pagesPatched",q);this.editor.addListener("pageRenamed",q);this.editor.addListener("pageMoved",q);this.editor.addListener("fileLoaded",q);
+this.editor.addListener("pageSelected",mxUtils.bind(this,function(B,I){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(B,I){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
+EditorUi.prototype.scrollToPage=function(b,f){var m=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),t=null!=b?b:this.currentPage;null!=m&&null!=this.tabScroller&&this.tabScroller.children.length>m&&null!=this.tabScroller.children[m]&&(t!=this.lastScrollPage||f)&&(this.tabScroller.children[m].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[m].className="geTab gePageTab geActivePage",this.lastScrollPage=t)};
+EditorUi.prototype.restoreViewState=function(b,f,m){b=null!=b?this.getPageById(b.getId()):null;var t=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(t.setViewState(f),this.editor.updateGraphComponents(),t.view.revalidate(),t.sizeDidChange()),t.container.scrollLeft=t.view.translate.x*t.view.scale+f.scrollLeft,t.container.scrollTop=t.view.translate.y*t.view.scale+f.scrollTop,t.restoreSelection(m))};
+Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),m=parseFloat(b.getAttribute("pageScale")),t=parseFloat(b.getAttribute("pageWidth")),y=parseFloat(b.getAttribute("pageHeight")),q=b.getAttribute("background"),B=this.parseBackgroundImage(b.getAttribute("backgroundImage")),I=b.getAttribute("extFonts");if(I)try{I=I.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=q&&0<q.length?q:null,backgroundImage:B,pageScale:isNaN(m)?mxGraph.prototype.pageScale:m,pageFormat:isNaN(t)||isNaN(y)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,t,y),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:I||[]}};
+Graph.prototype.saveViewState=function(b,f,m,t,y){m||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),
+f.setAttribute("fold",null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);m=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=m&&(f.setAttribute("pageWidth",m.width),f.setAttribute("pageHeight",m.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),t=this.getBackgroundImageObject(b.backgroundImage,
+t,y),null!=t&&f.setAttribute("backgroundImage",JSON.stringify(t)));f.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");f.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?f.removeAttribute("adaptiveColors"):f.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&f.setAttribute("extFonts",b.extFonts.map(function(q){return q.name+"^"+q.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,adaptiveColors:this.adaptiveColors,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
Graph.prototype.setViewState=function(b,f){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.adaptiveColors=b.adaptiveColors;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;
-this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var l=this.extFonts;this.extFonts=b.extFonts||[];if(f&&null!=l)for(f=0;f<l.length;f++){var u=document.getElementById("extFont_"+l[f].name);null!=u&&u.parentNode.removeChild(u)}for(f=0;f<this.extFonts.length;f++)this.addExtFont(this.extFonts[f].name,
+this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var m=this.extFonts;this.extFonts=b.extFonts||[];if(f&&null!=m)for(f=0;f<m.length;f++){var t=document.getElementById("extFont_"+m[f].name);null!=t&&t.parentNode.removeChild(t)}for(f=0;f<this.extFonts.length;f++)this.addExtFont(this.extFonts[f].name,
this.extFonts[f].url,!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,
this.pageFormat="undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.adaptiveColors=
-null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,f,l){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=f*this.view.scale+b.scrollLeft,this.container.scrollTop=l*this.view.scale+b.scrollTop)};
-Graph.prototype.addExtFont=function(b,f,l){if(b&&f){var u="extFont_"+b;if(null==document.getElementById(u))if(0==f.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",f,null,u);else{document.getElementsByTagName("head");var y=document.createElement("style");y.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+f+'");\n}'));y.setAttribute("id",u);document.getElementsByTagName("head")[0].appendChild(y)}if(!l){null==this.extFonts&&(this.extFonts=[]);l=this.extFonts;
-u=!0;for(y=0;y<l.length;y++)if(l[y].name==b){u=!1;break}u&&this.extFonts.push({name:b,url:f})}}};
-EditorUi.prototype.updatePageRoot=function(b,f){if(null==b.root){f=this.editor.extractGraphModel(b.node,null,f);var l=Editor.extractParserError(f);if(l)throw Error(l);null!=f?(b.graphModelNode=f,b.viewState=this.editor.graph.createViewState(f),l=new mxCodec(f.ownerDocument),b.root=l.decode(f).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){f=this.editor.extractGraphModel(b.node);
-if(l=Editor.extractParserError(f))throw Error(l);null!=f&&(b.graphModelNode=f)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)f=new mxCell,f.setId("1"),b.root.insert(f),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};
-EditorUi.prototype.updateDiagramData=function(b,f){if(null==this.getPageIndex(b.page))this.insertPage(null,null,f);else{var l=new mxCodec(b.node.ownerDocument),u=new mxGraphModel;l.decode(b.node,u);l=new mxCodec(f.ownerDocument);var y=new mxGraphModel;l.decode(f,y);this.selectPage(b.page);f=this.diffCells(u.root,y.root);this.patchPage(b.page,f,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};
-EditorUi.prototype.selectPage=function(b,f,l){try{if(b!=this.currentPage){var u=this.editor.graph;u.isEditing()&&u.stopEditing(!1);f=null!=f?f:!1;u.isMouseDown=!1;u.reset();var y=u.model.createUndoableEdit();y.ignoreEdit=!0;var q=new SelectPage(this,b,l);q.execute();y.add(q);y.notify();f||u.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",y))}}catch(C){this.handleError(C)}};
+null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,f,m){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=f*this.view.scale+b.scrollLeft,this.container.scrollTop=m*this.view.scale+b.scrollTop)};
+Graph.prototype.addExtFont=function(b,f,m){if(b&&f){var t="extFont_"+b;if(null==document.getElementById(t))if(0==f.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",f,null,t);else{document.getElementsByTagName("head");var y=document.createElement("style");y.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+f+'");\n}'));y.setAttribute("id",t);document.getElementsByTagName("head")[0].appendChild(y)}if(!m){null==this.extFonts&&(this.extFonts=[]);m=this.extFonts;
+t=!0;for(y=0;y<m.length;y++)if(m[y].name==b){t=!1;break}t&&this.extFonts.push({name:b,url:f})}}};
+EditorUi.prototype.updatePageRoot=function(b,f){if(null==b.root){f=this.editor.extractGraphModel(b.node,null,f);var m=Editor.extractParserError(f);if(m)throw Error(m);null!=f?(b.graphModelNode=f,b.viewState=this.editor.graph.createViewState(f),m=new mxCodec(f.ownerDocument),b.root=m.decode(f).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){f=this.editor.extractGraphModel(b.node);
+if(m=Editor.extractParserError(f))throw Error(m);null!=f&&(b.graphModelNode=f)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)f=new mxCell,f.setId("1"),b.root.insert(f),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};
+EditorUi.prototype.updateDiagramData=function(b,f){if(null==this.getPageIndex(b.page))this.insertPage(null,null,f);else{var m=new mxCodec(b.node.ownerDocument),t=new mxGraphModel;m.decode(b.node,t);m=new mxCodec(f.ownerDocument);var y=new mxGraphModel;m.decode(f,y);this.selectPage(b.page);f=this.diffCells(t.root,y.root);this.patchPage(b.page,f,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};
+EditorUi.prototype.selectPage=function(b,f,m){try{if(b!=this.currentPage){var t=this.editor.graph;t.isEditing()&&t.stopEditing(!1);f=null!=f?f:!1;t.isMouseDown=!1;t.reset();var y=t.model.createUndoableEdit();y.ignoreEdit=!0;var q=new SelectPage(this,b,m);q.execute();y.add(q);y.notify();f||t.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",y))}}catch(B){this.handleError(B)}};
EditorUi.prototype.selectNextPage=function(b){var f=this.currentPage;null!=f&&null!=this.pages&&(f=mxUtils.indexOf(this.pages,f),b?this.selectPage(this.pages[mxUtils.mod(f+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(f-1,this.pages.length)]))};
-EditorUi.prototype.insertPage=function(b,f,l){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),l),f=null!=f?f:this.pages.length,f=new ChangePage(this,b,b,f),this.editor.graph.model.execute(f));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
-EditorUi.prototype.createPage=function(b,f,l){f=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f,l);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var l=this.pages[f].getName();null!=l&&0<l.length&&(b[l]=l)}f=this.pages.length;do l=mxResources.get("pageWithNumber",[++f]);while(null!=b[l]);return l};
-EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,l=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=l){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var u=this.currentPage;u==b&&1<this.pages.length?(l==this.pages.length-1?l--:l++,u=this.pages[l]):1>=this.pages.length&&(u=this.insertPage(),f.model.execute(new RenamePage(this,u,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,u))}finally{f.model.endUpdate()}}}catch(y){this.handleError(y)}return b};
-EditorUi.prototype.duplicatePage=function(b,f){var l=null;try{var u=this.editor.graph;if(u.isEnabled()){u.isEditing()&&u.stopEditing();var y=b.node.cloneNode(!1);y.removeAttribute("id");var q={},C=u.createCellLookup([u.model.root]);l=new DiagramPage(y);l.root=u.cloneCell(u.model.root,null,q);var J=new mxGraphModel;J.prefix=Editor.guid()+"-";J.setRoot(l.root);u.updateCustomLinks(u.createCellMapping(q,C),[l.root]);l.viewState=b==this.currentPage?u.getViewState():b.viewState;this.initDiagramNode(l);
-l.viewState.scale=1;delete l.viewState.scrollLeft;delete l.viewState.scrollTop;delete l.viewState.currentRoot;delete l.viewState.defaultParent;l.setName(f);l=this.insertPage(l,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return l};EditorUi.prototype.initDiagramNode=function(b,f){null==f&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,f);EditorUi.removeChildNodes(b.node);b.node.appendChild(f)};
-EditorUi.prototype.clonePages=function(b){for(var f=[],l=[],u=0;u<b.length;u++)try{l.push(this.clonePage(b[u]))}catch(y){f.push(mxResources.get("pageWithNumber",[u+1])+": "+y.toString())}if(0<f.length){b=Error(f.join("\n"));try{0<l.length&&(b.fallbackFileData=this.getXmlForPages(l))}catch(y){}throw b;}return l};
-EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),l=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(l,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);f.diagramModified=b.diagramModified;return f};
-EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(l){null!=l&&0<l.length&&this.editor.graph.model.execute(new RenamePage(this,b,l))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};
+EditorUi.prototype.insertPage=function(b,f,m){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),m),f=null!=f?f:this.pages.length,f=new ChangePage(this,b,b,f),this.editor.graph.model.execute(f));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
+EditorUi.prototype.createPage=function(b,f,m){f=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f,m);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var m=this.pages[f].getName();null!=m&&0<m.length&&(b[m]=m)}f=this.pages.length;do m=mxResources.get("pageWithNumber",[++f]);while(null!=b[m]);return m};
+EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,m=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=m){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var t=this.currentPage;t==b&&1<this.pages.length?(m==this.pages.length-1?m--:m++,t=this.pages[m]):1>=this.pages.length&&(t=this.insertPage(),f.model.execute(new RenamePage(this,t,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,t))}finally{f.model.endUpdate()}}}catch(y){this.handleError(y)}return b};
+EditorUi.prototype.duplicatePage=function(b,f){var m=null;try{var t=this.editor.graph;if(t.isEnabled()){t.isEditing()&&t.stopEditing();var y=b.node.cloneNode(!1);y.removeAttribute("id");var q={},B=t.createCellLookup([t.model.root]);m=new DiagramPage(y);m.root=t.cloneCell(t.model.root,null,q);var I=new mxGraphModel;I.prefix=Editor.guid()+"-";I.setRoot(m.root);t.updateCustomLinks(t.createCellMapping(q,B),[m.root]);m.viewState=b==this.currentPage?t.getViewState():b.viewState;this.initDiagramNode(m);
+m.viewState.scale=1;delete m.viewState.scrollLeft;delete m.viewState.scrollTop;delete m.viewState.currentRoot;delete m.viewState.defaultParent;m.setName(f);m=this.insertPage(m,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return m};EditorUi.prototype.initDiagramNode=function(b,f){null==f&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,f);EditorUi.removeChildNodes(b.node);b.node.appendChild(f)};
+EditorUi.prototype.clonePages=function(b){for(var f=[],m=[],t=0;t<b.length;t++)try{m.push(this.clonePage(b[t]))}catch(y){f.push(mxResources.get("pageWithNumber",[t+1])+": "+y.toString())}if(0<f.length){b=Error(f.join("\n"));try{0<m.length&&(b.fallbackFileData=this.getXmlForPages(m))}catch(y){}throw b;}return m};
+EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),m=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(m,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);f.diagramModified=b.diagramModified;return f};
+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(m){null!=m&&0<m.length&&this.editor.graph.model.execute(new RenamePage(this,b,m))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer geTabItem";return b};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&!this.isTabContainerVisible())this.tabContainer.style.display="none";else if(null!=this.tabContainer&&null!=this.pages){this.tabContainer.style.display="";var b=this.editor.graph,f=document.createElement("div");f.className="geTabScroller";for(var l=null,u=0;u<this.pages.length;u++)mxUtils.bind(this,function(y,q){q.className="geTab gePageTab";this.pages[y]==this.currentPage&&q.classList.add("geActivePage");q.setAttribute("draggable",
-"true");mxEvent.addListener(q,"dragstart",mxUtils.bind(this,function(C){b.isEnabled()?(mxClient.IS_FF&&C.dataTransfer.setData("Text","<diagram/>"),l=y):mxEvent.consume(C)}));mxEvent.addListener(q,"dragend",mxUtils.bind(this,function(C){l=null;C.stopPropagation();C.preventDefault()}));mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(C){null!=l&&(C.dataTransfer.dropEffect="move");C.stopPropagation();C.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(C){null!=l&&
-y!=l&&this.movePage(l,y);C.stopPropagation();C.preventDefault()}));f.appendChild(q)})(u,this.createTabForPage(this.pages[u],u+1));u=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(f);this.leftScrollTab=this.createLeftScrollTab();
-this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);this.tabScroller=f;this.tabScroller.scrollLeft=u;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(y){this.checkTabScrollerOverflow()}))}};
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&!this.isTabContainerVisible())this.tabContainer.style.display="none";else if(null!=this.tabContainer&&null!=this.pages){this.tabContainer.style.display="";var b=this.editor.graph,f=document.createElement("div");f.className="geTabScroller";for(var m=null,t=0;t<this.pages.length;t++)mxUtils.bind(this,function(y,q){q.className="geTab gePageTab";this.pages[y]==this.currentPage&&q.classList.add("geActivePage");q.setAttribute("draggable",
+"true");mxEvent.addListener(q,"dragstart",mxUtils.bind(this,function(B){b.isEnabled()?(mxClient.IS_FF&&B.dataTransfer.setData("Text","<diagram/>"),m=y):mxEvent.consume(B)}));mxEvent.addListener(q,"dragend",mxUtils.bind(this,function(B){m=null;B.stopPropagation();B.preventDefault()}));mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(B){null!=m&&(B.dataTransfer.dropEffect="move");B.stopPropagation();B.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(B){null!=m&&
+y!=m&&this.movePage(m,y);B.stopPropagation();B.preventDefault()}));f.appendChild(q)})(t,this.createTabForPage(this.pages[t],t+1));t=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(f);this.leftScrollTab=this.createLeftScrollTab();
+this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);this.tabScroller=f;this.tabScroller.scrollLeft=t;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(y){this.checkTabScrollerOverflow()}))}};
EditorUi.prototype.checkTabScrollerOverflow=function(){null!=this.tabScroller&&null!=this.tabContainer&&2<this.tabContainer.children.length&&(this.tabScroller.scrollWidth>this.tabScroller.offsetWidth?(this.leftScrollTab.style.display="",this.rightScrollTab.style.display="",0==this.tabScroller.scrollLeft?this.leftScrollTab.classList.add("mxDisabled"):this.leftScrollTab.classList.remove("mxDisabled"),Math.ceil(this.tabScroller.scrollLeft)+this.tabScroller.offsetWidth>=this.tabScroller.scrollWidth?this.rightScrollTab.classList.add("mxDisabled"):
this.rightScrollTab.classList.remove("mxDisabled")):(this.leftScrollTab.style.display="none",this.rightScrollTab.style.display="none"))};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};EditorUi.prototype.createTab=function(){var b=document.createElement("div");b.className="geTab";return b};
-EditorUi.prototype.getShortPageName=function(b){var f=null;null!=b&&(f=b.getName(),null!=f&&36<f.length&&(f=f.substring(0,34)+"..."));return f};EditorUi.prototype.createControlTab=function(b,f,l){var u=this.createTab();u.className="geTab geControlTab";null!=b&&u.setAttribute("title",b);b=document.createElement("div");b.className="geButton";b.style.backgroundImage="url("+f+")";u.appendChild(b);mxEvent.addListener(u,"click",l);return u};
+EditorUi.prototype.getShortPageName=function(b){var f=null;null!=b&&(f=b.getName(),null!=f&&36<f.length&&(f=f.substring(0,34)+"..."));return f};EditorUi.prototype.createControlTab=function(b,f,m){var t=this.createTab();t.className="geTab geControlTab";null!=b&&t.setAttribute("title",b);b=document.createElement("div");b.className="geButton";b.style.backgroundImage="url("+f+")";t.appendChild(b);mxEvent.addListener(t,"click",m);return t};
EditorUi.prototype.createPageInsertTab=function(){return this.createControlTab(mxResources.get("insertPage"),Editor.plusImage,mxUtils.bind(this,function(b){try{this.insertPage()}catch(f){this.handleError(f)}mxEvent.consume(b)}))};
EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(null,Editor.chevronLeftImage,mxUtils.bind(this,function(b){var f=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:-f,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft-=f;mxEvent.consume(b)}))};
EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,mxUtils.bind(this,function(b){var f=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:f,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=f;mxEvent.consume(b)}))};
-EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(mxUtils.bind(this,function(y,q){this.menus.get("pages").funct(y,q)}));f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});var l=mxEvent.getClientX(b),u=mxEvent.getClientY(b);f.popup(l,
-u,null,b);this.setCurrentMenu(f);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,f){var l=this.createTab(),u=b.getName()||mxResources.get("untitled"),y=b.getId();l.setAttribute("title",u+(null!=y?" ("+y+")":"")+" ["+f+"]");f=document.createElement("span");f.style.maxWidth="160px";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,u);l.appendChild(f);this.addTabListeners(b,l);return l};
-EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var l=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var u=document.createElement("div");u.style.backgroundImage="url("+Editor.thinExpandImage+")";u.className="geButton";f.appendChild(u);var y=!1,q=!1,C=mxUtils.bind(this,function(S){y=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);l.isMouseDown||q||this.selectPage(b)}),J=mxUtils.bind(this,
-function(S){if(!l.isMouseDown&&(q&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==u)||mxEvent.isPopupTrigger(S))&&(l.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!y)){var D=new mxPopupMenu(this.createPageMenu(b));D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);this.resetCurrentMenu();D.destroy()});var P=mxEvent.getClientX(S),c=mxEvent.getClientY(S);D.popup(P,c,null,S);
-this.setCurrentMenu(D,f)}mxEvent.consume(S)});mxEvent.addGestureListeners(u,C,null,J);mxEvent.addGestureListeners(f,C,null,J)};
-EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(l,u){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||l.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),u));this.editor.graph.isEnabled()&&(l.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",
-[b.getName()]))}),u),l.addSeparator(u),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",l,u,mxResources.get("move")),l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),u),l.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),u))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(u,y,q,C,J){y=null!=y?y:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),u));this.stopEditing();this.model.beginUpdate();try{for(var S=q.slice(),D=0;D<q.length;D++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[D]),"treeFolding","0")&&this.foldTreeCell(u,q[D]);q=S;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(u,y){this.model.beginUpdate();try{var q=
-[];this.traverse(y,!0,mxUtils.bind(this,function(J,S){var D=null!=S&&this.isTreeEdge(S);D&&q.push(S);J==y||null!=S&&!D||q.push(J);return(null==S||D)&&(J==y||!this.model.isCollapsed(J))}));this.model.setCollapsed(y,u);for(var C=0;C<q.length;C++)this.model.setVisible(q[C],!u)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(u){return!this.isEdgeIgnored(u)};Graph.prototype.getTreeEdges=function(u,y,q,C,J,S){return this.model.filterCells(this.getEdges(u,y,q,C,J,S),mxUtils.bind(this,
-function(D){return this.isTreeEdge(D)}))};Graph.prototype.getIncomingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function u(V){return x.isVertex(V)&&q(V)}function y(V){var k=!1;null!=V&&(k="1"==
-n.getCurrentCellStyle(V).treeMoving);return k}function q(V){var k=!1;null!=V&&(V=x.getParent(V),k=n.view.getState(V),k="tree"==(null!=k?k.style:n.getCellStyle(V)).containerType);return k}function C(V){var k=!1;null!=V&&(V=x.getParent(V),k=n.view.getState(V),n.view.getState(V),k=null!=(null!=k?k.style:n.getCellStyle(V)).childLayout);return k}function J(V){V=n.view.getState(V);if(null!=V){var k=n.getIncomingTreeEdges(V.cell);if(0<k.length&&(k=n.view.getState(k[0]),null!=k&&(k=k.absolutePoints,null!=
-k&&0<k.length&&(k=k[k.length-1],null!=k)))){if(k.y==V.y&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_SOUTH;if(k.y==V.y+V.height&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_NORTH;if(k.x>V.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(V,k){k=null!=k?k:!0;n.model.beginUpdate();try{var v=n.model.getParent(V),I=n.getIncomingTreeEdges(V),N=n.cloneCells([I[0],V]);n.model.setTerminal(N[0],n.model.getTerminal(I[0],
-!0),!0);var T=J(V),W=v.geometry;T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?N[1].geometry.x+=k?V.geometry.width+10:-N[1].geometry.width-10:N[1].geometry.y+=k?V.geometry.height+10:-N[1].geometry.height-10;n.view.currentRoot!=v&&(N[1].geometry.x-=W.x,N[1].geometry.y-=W.y);var U=n.view.getState(V),Y=n.view.scale;if(null!=U){var fa=mxRectangle.fromRectangle(U);T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?fa.x+=(k?V.geometry.width+10:-N[1].geometry.width-10)*Y:fa.y+=
-(k?V.geometry.height+10:-N[1].geometry.height-10)*Y;var na=n.getOutgoingTreeEdges(n.model.getTerminal(I[0],!0));if(null!=na){for(var la=T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH,qa=W=I=0;qa<na.length;qa++){var ya=n.model.getTerminal(na[qa],!1);if(T==J(ya)){var wa=n.view.getState(ya);ya!=V&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY())&&mxUtils.intersects(fa,wa)&&(I=10+Math.max(I,(Math.min(fa.x+fa.width,wa.x+wa.width)-Math.max(fa.x,wa.x))/
-Y),W=10+Math.max(W,(Math.min(fa.y+fa.height,wa.y+wa.height)-Math.max(fa.y,wa.y))/Y))}}la?W=0:I=0;for(qa=0;qa<na.length;qa++)if(ya=n.model.getTerminal(na[qa],!1),T==J(ya)&&(wa=n.view.getState(ya),ya!=V&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY()))){var Ia=[];n.traverse(wa.cell,!0,function(Aa,Ba){var Ga=null!=Ba&&n.isTreeEdge(Ba);Ga&&Ia.push(Ba);(null==Ba||Ga)&&Ia.push(Aa);return null==Ba||Ga});n.moveCells(Ia,(k?1:-1)*I,(k?1:-1)*W)}}}return n.addCells(N,
-v)}finally{n.model.endUpdate()}}function D(V){n.model.beginUpdate();try{var k=J(V),v=n.getIncomingTreeEdges(V),I=n.cloneCells([v[0],V]);n.model.setTerminal(v[0],I[1],!1);n.model.setTerminal(I[0],I[1],!0);n.model.setTerminal(I[0],V,!1);var N=n.model.getParent(V),T=N.geometry,W=[];n.view.currentRoot!=N&&(I[1].geometry.x-=T.x,I[1].geometry.y-=T.y);n.traverse(V,!0,function(fa,na){var la=null!=na&&n.isTreeEdge(na);la&&W.push(na);(null==na||la)&&W.push(fa);return null==na||la});var U=V.geometry.width+40,
-Y=V.geometry.height+40;k==mxConstants.DIRECTION_SOUTH?U=0:k==mxConstants.DIRECTION_NORTH?(U=0,Y=-Y):k==mxConstants.DIRECTION_WEST?(U=-U,Y=0):k==mxConstants.DIRECTION_EAST&&(Y=0);n.moveCells(W,U,Y);return n.addCells(I,N)}finally{n.model.endUpdate()}}function P(V,k){n.model.beginUpdate();try{var v=n.model.getParent(V),I=n.getIncomingTreeEdges(V),N=J(V);0==I.length&&(I=[n.createEdge(v,null,"",null,null,n.createCurrentEdgeStyle())],N=k);var T=n.cloneCells([I[0],V]);n.model.setTerminal(T[0],V,!0);null==
-n.model.getTerminal(T[0],!1)&&(n.model.setTerminal(T[0],T[1],!1),n.applyNewEdgeStyle(T[1],[T[0]],N));I=n.getOutgoingTreeEdges(V);var W=v.geometry;k=[];n.view.currentRoot==v&&(W=new mxRectangle);for(var U=0;U<I.length;U++){var Y=n.model.getTerminal(I[U],!1);null!=Y&&k.push(Y)}var fa=n.view.getBounds(k),na=n.view.translate,la=n.view.scale;N==mxConstants.DIRECTION_SOUTH?(T[1].geometry.x=null==fa?V.geometry.x+(V.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x-W.x+10,T[1].geometry.y+=T[1].geometry.height-
-W.y+40):N==mxConstants.DIRECTION_NORTH?(T[1].geometry.x=null==fa?V.geometry.x+(V.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x+-W.x+10,T[1].geometry.y-=T[1].geometry.height+W.y+40):(T[1].geometry.x=N==mxConstants.DIRECTION_WEST?T[1].geometry.x-(T[1].geometry.width+W.x+40):T[1].geometry.x+(T[1].geometry.width-W.x+40),T[1].geometry.y=null==fa?V.geometry.y+(V.geometry.height-T[1].geometry.height)/2:(fa.y+fa.height)/la-na.y+-W.y+10);return n.addCells(T,v)}finally{n.model.endUpdate()}}
-function c(V,k,v){V=n.getOutgoingTreeEdges(V);v=n.view.getState(v);var I=[];if(null!=v&&null!=V){for(var N=0;N<V.length;N++){var T=n.view.getState(n.model.getTerminal(V[N],!1));null!=T&&(!k&&Math.min(T.x+T.width,v.x+v.width)>=Math.max(T.x,v.x)||k&&Math.min(T.y+T.height,v.y+v.height)>=Math.max(T.y,v.y))&&I.push(T)}I.sort(function(W,U){return k?W.x+W.width-U.x-U.width:W.y+W.height-U.y-U.height})}return I}function g(V,k){var v=J(V),I=k==mxConstants.DIRECTION_EAST||k==mxConstants.DIRECTION_WEST;(v==mxConstants.DIRECTION_EAST||
-v==mxConstants.DIRECTION_WEST)==I&&v!=k?m.actions.get("selectParent").funct():v==k?(k=n.getOutgoingTreeEdges(V),null!=k&&0<k.length&&n.setSelectionCell(n.model.getTerminal(k[0],!1))):(v=n.getIncomingTreeEdges(V),null!=v&&0<v.length&&(I=c(n.model.getTerminal(v[0],!0),I,V),V=n.view.getState(V),null!=V&&(V=mxUtils.indexOf(I,V),0<=V&&(V+=k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_WEST?-1:1,0<=V&&V<=I.length-1&&n.setSelectionCell(I[V].cell)))))}var m=this,n=m.editor.graph,x=n.getModel(),
-F=m.menus.createPopupMenu;m.menus.createPopupMenu=function(V,k,v){F.apply(this,arguments);if(1==n.getSelectionCount()){k=n.getSelectionCell();var I=n.getOutgoingTreeEdges(k);V.addSeparator();0<I.length&&(u(n.getSelectionCell())&&this.addMenuItems(V,["selectChildren"],null,v),this.addMenuItems(V,["selectDescendants"],null,v));u(n.getSelectionCell())?(V.addSeparator(),0<n.getIncomingTreeEdges(k).length&&this.addMenuItems(V,["selectSiblings","selectParent"],null,v)):0<n.model.getEdgeCount(k)&&this.addMenuItems(V,
-["selectConnections"],null,v)}};m.actions.addAction("selectChildren",function(V){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell();V=mxEvent.isControlDown(V)?null:n.getOutgoingTreeEdges(k);if(null!=V&&0<V.length){k=[];for(var v=0;v<V.length;v++)k.push(n.model.getTerminal(V[v],!1));n.setSelectionCells(k)}else n.setSelectionCells(n.model.getChildren(k))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");m.actions.addAction("selectDescendants",function(V){var k=n.getSelectionCell();
-if(n.isEnabled()&&null!=k){var v=[];mxEvent.isControlDown(V)||n.traverse(k,!0,function(I,N){var T=null!=N&&n.isTreeEdge(N);T&&mxEvent.isControlDown(V)&&v.push(N);(null==N||T)&&v.push(I);return null==N||T});if(0==v.length||1==v.length&&v[0]==k)v=n.model.getDescendants(k);n.setSelectionCells(v)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");m.actions.addAction("selectParent",function(V){var k=n.getSelectionCell();n.isEnabled()&&null!=k&&(V=mxEvent.isControlDown(V)?null:n.getIncomingTreeEdges(k),
-null!=V&&0<V.length?n.setSelectionCell(n.model.getTerminal(V[0],!0)):n.selectParentCell())},null,null,Editor.altKey+"+"+Editor.shiftKey+"+P");m.actions.addAction("selectSiblings",function(V){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell(),v=mxEvent.isControlDown(V)?null:n.getIncomingTreeEdges(k);V=[];if(null!=v&&0<v.length&&(v=n.getOutgoingTreeEdges(n.model.getTerminal(v[0],!0)),null!=v))for(var I=0;I<v.length;I++)V.push(n.model.getTerminal(v[I],!1));0==V.length&&(V=n.model.getChildren(n.model.getParent(k)));
-n.setSelectionCells(V)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");var H=n.removeCells;n.removeCells=function(V,k){k=null!=k?k:!0;null==V&&(V=this.getDeletableCells(this.getSelectionCells()));k&&(V=this.getDeletableCells(this.addAllEdges(V)));for(var v=[],I=0;I<V.length;I++){var N=V[I];x.isEdge(N)&&q(N)&&(v.push(N),N=x.getTerminal(N,!1));if(u(N)){var T=[];n.traverse(N,!0,function(W,U){var Y=null!=U&&n.isTreeEdge(U);Y&&T.push(U);(null==U||Y)&&T.push(W);return null==U||Y});0<T.length&&(v=v.concat(T),
-N=n.getIncomingTreeEdges(V[I]),V=V.concat(N))}else null!=N&&v.push(V[I])}V=v;return H.apply(this,arguments)};m.hoverIcons.getStateAt=function(V,k,v){return u(V.cell)?null:this.graph.view.getState(this.graph.getCellAt(k,v))};var M=n.duplicateCells;n.duplicateCells=function(V,k){V=null!=V?V:this.getSelectionCells();for(var v=V.slice(0),I=0;I<v.length;I++){var N=n.view.getState(v[I]);if(null!=N&&u(N.cell)){var T=n.getIncomingTreeEdges(N.cell);for(N=0;N<T.length;N++)mxUtils.remove(T[N],V)}}this.model.beginUpdate();
-try{var W=M.call(this,V,k);if(W.length==V.length)for(I=0;I<V.length;I++)if(u(V[I])){var U=n.getIncomingTreeEdges(W[I]);T=n.getIncomingTreeEdges(V[I]);if(0==U.length&&0<T.length){var Y=this.cloneCell(T[0]);this.addEdge(Y,n.getDefaultParent(),this.model.getTerminal(T[0],!0),W[I])}}}finally{this.model.endUpdate()}return W};var L=n.moveCells;n.moveCells=function(V,k,v,I,N,T,W){for(var U=null,Y=[],fa=0;fa<V.length;fa++)(y(V[fa])||u(V[fa]))&&!C(V[fa])&&this.isCellCollapsed(V[fa])?Y=Y.concat(this.getSubtree(V[fa])):
-Y.push(V[fa]);V=mxUtils.removeDuplicates(Y);this.model.beginUpdate();try{Y=N;var na=this.getCurrentCellStyle(N);if(null!=V&&u(N)&&"1"==mxUtils.getValue(na,"treeFolding","0")){for(fa=0;fa<V.length;fa++)if(u(V[fa])||n.model.isEdge(V[fa])&&null==n.model.getTerminal(V[fa],!0)){N=n.model.getParent(V[fa]);break}if(null!=Y&&N!=Y&&null!=this.view.getState(V[0])){var la=n.getIncomingTreeEdges(V[0]);if(0<la.length){var qa=n.view.getState(n.model.getTerminal(la[0],!0));if(null!=qa){var ya=n.view.getState(Y);
-null!=ya&&(k=(ya.getCenterX()-qa.getCenterX())/n.view.scale,v=(ya.getCenterY()-qa.getCenterY())/n.view.scale)}}}}U=L.apply(this,arguments);if(null!=U&&null!=V&&U.length==V.length)for(fa=0;fa<U.length;fa++)if(this.model.isEdge(U[fa]))u(Y)&&0>mxUtils.indexOf(U,this.model.getTerminal(U[fa],!0))&&this.model.setTerminal(U[fa],Y,!0);else if(u(V[fa])&&(la=n.getIncomingTreeEdges(V[fa]),0<la.length))if(!I)u(Y)&&0>mxUtils.indexOf(V,this.model.getTerminal(la[0],!0))&&this.model.setTerminal(la[0],Y,!0);else if(0==
-n.getIncomingTreeEdges(U[fa]).length){na=Y;if(null==na||na==n.model.getParent(V[fa]))na=n.model.getTerminal(la[0],!0);I=this.cloneCell(la[0]);this.addEdge(I,n.getDefaultParent(),na,U[fa])}}finally{this.model.endUpdate()}return U};if(null!=m.sidebar){var K=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(V,k,v,I){var N=n.model,T=null;N.beginUpdate();try{if(T=K.apply(this,arguments),u(V))for(var W=0;W<T.length;W++)if(N.isEdge(T[W])&&null==N.getTerminal(T[W],!0)){N.setTerminal(T[W],V,!0);var U=
-n.getCellGeometry(T[W]);U.points=null;null!=U.getTerminalPoint(!0)&&U.setTerminalPoint(null,!0)}}finally{N.endUpdate()}return T}}var Z={67:m.actions.get("selectChildren"),88:m.actions.get("selectDescendants"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},ha={67:m.actions.get("copyStyle"),86:m.actions.get("pasteStyle")},ca=m.onKeyDown;m.onKeyDown=function(V){try{var k=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=k){var v=mxEvent.isAltDown(V)&&mxEvent.isShiftDown(V)?
-Z[V.keyCode]:mxEvent.isAltDown(V)?ha[V.keyCode]:null;null!=v?(v.funct(V),mxEvent.consume(V)):u(k)&&(v=null,0<n.getIncomingTreeEdges(k).length&&(9==V.which?v=mxEvent.isShiftDown(V)?D(k):P(k):13==V.which&&(v=S(k,!mxEvent.isShiftDown(V)))),null!=v&&0<v.length?(1==v.length&&n.model.isEdge(v[0])?n.setSelectionCell(n.model.getTerminal(v[0],!1)):n.setSelectionCell(v[v.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(n.view.getState(k)),n.startEditingAtCell(k),mxEvent.consume(V)):37==V.keyCode?(g(k,mxConstants.DIRECTION_WEST),
-mxEvent.consume(V)):38==V.keyCode?(g(k,mxConstants.DIRECTION_NORTH),mxEvent.consume(V)):39==V.keyCode?(g(k,mxConstants.DIRECTION_EAST),mxEvent.consume(V)):40==V.keyCode&&(g(k,mxConstants.DIRECTION_SOUTH),mxEvent.consume(V)))}}catch(I){m.handleError(I)}mxEvent.isConsumed(V)||ca.apply(this,arguments)};var aa=n.connectVertex;n.connectVertex=function(V,k,v,I,N,T,W){var U=n.getIncomingTreeEdges(V);if(u(V)){var Y=J(V),fa=Y==mxConstants.DIRECTION_EAST||Y==mxConstants.DIRECTION_WEST,na=k==mxConstants.DIRECTION_EAST||
-k==mxConstants.DIRECTION_WEST;return Y==k||0==U.length?P(V,k):fa==na?D(V):S(V,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return aa.apply(this,arguments)};n.getSubtree=function(V){var k=[V];!y(V)&&!u(V)||C(V)||n.traverse(V,!0,function(v,I){var N=null!=I&&n.isTreeEdge(I);N&&0>mxUtils.indexOf(k,I)&&k.push(I);(null==I||N)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==I||N});return k};var oa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){oa.apply(this,
-arguments);(y(this.state.cell)||u(this.state.cell))&&!C(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(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),
-this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(V){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(V),mxEvent.getClientY(V),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(V);this.graph.isMouseDown=!0;m.hoverIcons.reset();mxEvent.consume(V)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var da=mxVertexHandler.prototype.redrawHandles;
-mxVertexHandler.prototype.redrawHandles=function(){da.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 ka=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(V){ka.apply(this,arguments);null!=
-this.moveHandle&&(this.moveHandle.style.display=V?"":"none")};var ba=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(V,k){ba.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var l=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var u=l.apply(this,arguments),y=this.graph,q=this;return u.concat([this.addEntry("tree container",
-function(){var C=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.vertex=!0;var J=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');J.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);S.insertEdge(D,!1);C.insert(D);C.insert(J);C.insert(S);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var C=new mxCell("Mindmap",new mxGeometry(0,
-0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.vertex=!0;var J=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');J.vertex=!0;var S=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);S.insertEdge(D,!1);var P=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-P.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),D.style);c.geometry.relative=!0;c.edge=!0;J.insertEdge(c,!0);P.insertEdge(c,!1);var g=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),D.style);m.geometry.relative=!0;m.edge=!0;J.insertEdge(m,!0);g.insertEdge(m,!1);var n=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),D.style);x.geometry.relative=!0;x.edge=!0;J.insertEdge(x,!0);n.insertEdge(x,!1);C.insert(D);C.insert(c);C.insert(m);C.insert(x);C.insert(J);C.insert(S);C.insert(P);C.insert(g);C.insert(n);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var C=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
-C.vertex=!0;return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var C=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");J.geometry.setTerminalPoint(new mxPoint(-40,40),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);return q.createVertexTemplateFromCells([C,J],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var C=new mxCell("Sub Topic",new mxGeometry(0,0,80,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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
-J.geometry.setTerminalPoint(new mxPoint(-40,40),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);return q.createVertexTemplateFromCells([C,J],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree orgchart organization division",function(){var C=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.vertex=!0;var J=new mxCell("Organization",new mxGeometry(80,
-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(J,"treeRoot","1");J.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);S.insertEdge(D,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
-!0;c.edge=!0;J.insertEdge(c,!0);P.insertEdge(c,!1);C.insert(D);C.insert(c);C.insert(J);C.insert(S);C.insert(P);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree root",function(){var C=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(C,"treeRoot","1");C.vertex=!0;return q.createVertexTemplateFromCells([C],
-C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree division",function(){var C=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-J.geometry.setTerminalPoint(new mxPoint(0,0),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);return q.createVertexTemplateFromCells([C,J],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree sub sections",function(){var C=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
-J.geometry.setTerminalPoint(new mxPoint(110,-40),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),J.style);D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative=!0;D.edge=!0;S.insertEdge(D,!1);return q.createVertexTemplateFromCells([J,D,C,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(mxUtils.bind(this,function(y,q){this.menus.get("pages").funct(y,q)}));f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});var m=mxEvent.getClientX(b),t=mxEvent.getClientY(b);f.popup(m,
+t,null,b);this.setCurrentMenu(f);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,f){var m=this.createTab(),t=b.getName()||mxResources.get("untitled"),y=b.getId();m.setAttribute("title",t+(null!=y?" ("+y+")":"")+" ["+f+"]");f=document.createElement("span");f.style.maxWidth="160px";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,t);m.appendChild(f);this.addTabListeners(b,m);return m};
+EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var m=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var t=document.createElement("div");t.style.backgroundImage="url("+Editor.thinExpandImage+")";t.className="geButton";f.appendChild(t);var y=!1,q=!1,B=mxUtils.bind(this,function(S){y=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);m.isMouseDown||q||this.selectPage(b)}),I=mxUtils.bind(this,
+function(S){if(!m.isMouseDown&&(q&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==t)||mxEvent.isPopupTrigger(S))&&(m.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!y)){var D=new mxPopupMenu(this.createPageMenu(b));D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);this.resetCurrentMenu();D.destroy()});var P=mxEvent.getClientX(S),c=mxEvent.getClientY(S);D.popup(P,c,null,S);
+this.setCurrentMenu(D,f)}mxEvent.consume(S)});mxEvent.addGestureListeners(t,B,null,I);mxEvent.addGestureListeners(f,B,null,I)};
+EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(m,t){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||m.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),t));this.editor.graph.isEnabled()&&(m.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",
+[b.getName()]))}),t),m.addSeparator(t),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",m,t,mxResources.get("move")),m.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),t),m.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),t))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(t,y,q,B,I){y=null!=y?y:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),t));this.stopEditing();this.model.beginUpdate();try{for(var S=q.slice(),D=0;D<q.length;D++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[D]),"treeFolding","0")&&this.foldTreeCell(t,q[D]);q=S;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(t,y){this.model.beginUpdate();try{var q=
+[];this.traverse(y,!0,mxUtils.bind(this,function(I,S){var D=null!=S&&this.isTreeEdge(S);D&&q.push(S);I==y||null!=S&&!D||q.push(I);return(null==S||D)&&(I==y||!this.model.isCollapsed(I))}));this.model.setCollapsed(y,t);for(var B=0;B<q.length;B++)this.model.setVisible(q[B],!t)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(t){return!this.isEdgeIgnored(t)};Graph.prototype.getTreeEdges=function(t,y,q,B,I,S){return this.model.filterCells(this.getEdges(t,y,q,B,I,S),mxUtils.bind(this,
+function(D){return this.isTreeEdge(D)}))};Graph.prototype.getIncomingTreeEdges=function(t,y){return this.getTreeEdges(t,y,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(t,y){return this.getTreeEdges(t,y,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function t(V){return x.isVertex(V)&&q(V)}function y(V){var k=!1;null!=V&&(k="1"==
+n.getCurrentCellStyle(V).treeMoving);return k}function q(V){var k=!1;null!=V&&(V=x.getParent(V),k=n.view.getState(V),k="tree"==(null!=k?k.style:n.getCellStyle(V)).containerType);return k}function B(V){var k=!1;null!=V&&(V=x.getParent(V),k=n.view.getState(V),n.view.getState(V),k=null!=(null!=k?k.style:n.getCellStyle(V)).childLayout);return k}function I(V){V=n.view.getState(V);if(null!=V){var k=n.getIncomingTreeEdges(V.cell);if(0<k.length&&(k=n.view.getState(k[0]),null!=k&&(k=k.absolutePoints,null!=
+k&&0<k.length&&(k=k[k.length-1],null!=k)))){if(k.y==V.y&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_SOUTH;if(k.y==V.y+V.height&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_NORTH;if(k.x>V.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(V,k){k=null!=k?k:!0;n.model.beginUpdate();try{var v=n.model.getParent(V),J=n.getIncomingTreeEdges(V),N=n.cloneCells([J[0],V]);n.model.setTerminal(N[0],n.model.getTerminal(J[0],
+!0),!0);var T=I(V),W=v.geometry;T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?N[1].geometry.x+=k?V.geometry.width+10:-N[1].geometry.width-10:N[1].geometry.y+=k?V.geometry.height+10:-N[1].geometry.height-10;n.view.currentRoot!=v&&(N[1].geometry.x-=W.x,N[1].geometry.y-=W.y);var U=n.view.getState(V),Y=n.view.scale;if(null!=U){var fa=mxRectangle.fromRectangle(U);T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?fa.x+=(k?V.geometry.width+10:-N[1].geometry.width-10)*Y:fa.y+=
+(k?V.geometry.height+10:-N[1].geometry.height-10)*Y;var oa=n.getOutgoingTreeEdges(n.model.getTerminal(J[0],!0));if(null!=oa){for(var la=T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH,qa=W=J=0;qa<oa.length;qa++){var ya=n.model.getTerminal(oa[qa],!1);if(T==I(ya)){var wa=n.view.getState(ya);ya!=V&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY())&&mxUtils.intersects(fa,wa)&&(J=10+Math.max(J,(Math.min(fa.x+fa.width,wa.x+wa.width)-Math.max(fa.x,wa.x))/
+Y),W=10+Math.max(W,(Math.min(fa.y+fa.height,wa.y+wa.height)-Math.max(fa.y,wa.y))/Y))}}la?W=0:J=0;for(qa=0;qa<oa.length;qa++)if(ya=n.model.getTerminal(oa[qa],!1),T==I(ya)&&(wa=n.view.getState(ya),ya!=V&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY()))){var Ia=[];n.traverse(wa.cell,!0,function(Aa,Ba){var Ga=null!=Ba&&n.isTreeEdge(Ba);Ga&&Ia.push(Ba);(null==Ba||Ga)&&Ia.push(Aa);return null==Ba||Ga});n.moveCells(Ia,(k?1:-1)*J,(k?1:-1)*W)}}}return n.addCells(N,
+v)}finally{n.model.endUpdate()}}function D(V){n.model.beginUpdate();try{var k=I(V),v=n.getIncomingTreeEdges(V),J=n.cloneCells([v[0],V]);n.model.setTerminal(v[0],J[1],!1);n.model.setTerminal(J[0],J[1],!0);n.model.setTerminal(J[0],V,!1);var N=n.model.getParent(V),T=N.geometry,W=[];n.view.currentRoot!=N&&(J[1].geometry.x-=T.x,J[1].geometry.y-=T.y);n.traverse(V,!0,function(fa,oa){var la=null!=oa&&n.isTreeEdge(oa);la&&W.push(oa);(null==oa||la)&&W.push(fa);return null==oa||la});var U=V.geometry.width+40,
+Y=V.geometry.height+40;k==mxConstants.DIRECTION_SOUTH?U=0:k==mxConstants.DIRECTION_NORTH?(U=0,Y=-Y):k==mxConstants.DIRECTION_WEST?(U=-U,Y=0):k==mxConstants.DIRECTION_EAST&&(Y=0);n.moveCells(W,U,Y);return n.addCells(J,N)}finally{n.model.endUpdate()}}function P(V,k){n.model.beginUpdate();try{var v=n.model.getParent(V),J=n.getIncomingTreeEdges(V),N=I(V);0==J.length&&(J=[n.createEdge(v,null,"",null,null,n.createCurrentEdgeStyle())],N=k);var T=n.cloneCells([J[0],V]);n.model.setTerminal(T[0],V,!0);null==
+n.model.getTerminal(T[0],!1)&&(n.model.setTerminal(T[0],T[1],!1),n.applyNewEdgeStyle(T[1],[T[0]],N));J=n.getOutgoingTreeEdges(V);var W=v.geometry;k=[];n.view.currentRoot==v&&(W=new mxRectangle);for(var U=0;U<J.length;U++){var Y=n.model.getTerminal(J[U],!1);null!=Y&&k.push(Y)}var fa=n.view.getBounds(k),oa=n.view.translate,la=n.view.scale;N==mxConstants.DIRECTION_SOUTH?(T[1].geometry.x=null==fa?V.geometry.x+(V.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-oa.x-W.x+10,T[1].geometry.y+=T[1].geometry.height-
+W.y+40):N==mxConstants.DIRECTION_NORTH?(T[1].geometry.x=null==fa?V.geometry.x+(V.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-oa.x+-W.x+10,T[1].geometry.y-=T[1].geometry.height+W.y+40):(T[1].geometry.x=N==mxConstants.DIRECTION_WEST?T[1].geometry.x-(T[1].geometry.width+W.x+40):T[1].geometry.x+(T[1].geometry.width-W.x+40),T[1].geometry.y=null==fa?V.geometry.y+(V.geometry.height-T[1].geometry.height)/2:(fa.y+fa.height)/la-oa.y+-W.y+10);return n.addCells(T,v)}finally{n.model.endUpdate()}}
+function c(V,k,v){V=n.getOutgoingTreeEdges(V);v=n.view.getState(v);var J=[];if(null!=v&&null!=V){for(var N=0;N<V.length;N++){var T=n.view.getState(n.model.getTerminal(V[N],!1));null!=T&&(!k&&Math.min(T.x+T.width,v.x+v.width)>=Math.max(T.x,v.x)||k&&Math.min(T.y+T.height,v.y+v.height)>=Math.max(T.y,v.y))&&J.push(T)}J.sort(function(W,U){return k?W.x+W.width-U.x-U.width:W.y+W.height-U.y-U.height})}return J}function g(V,k){var v=I(V),J=k==mxConstants.DIRECTION_EAST||k==mxConstants.DIRECTION_WEST;(v==mxConstants.DIRECTION_EAST||
+v==mxConstants.DIRECTION_WEST)==J&&v!=k?l.actions.get("selectParent").funct():v==k?(k=n.getOutgoingTreeEdges(V),null!=k&&0<k.length&&n.setSelectionCell(n.model.getTerminal(k[0],!1))):(v=n.getIncomingTreeEdges(V),null!=v&&0<v.length&&(J=c(n.model.getTerminal(v[0],!0),J,V),V=n.view.getState(V),null!=V&&(V=mxUtils.indexOf(J,V),0<=V&&(V+=k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_WEST?-1:1,0<=V&&V<=J.length-1&&n.setSelectionCell(J[V].cell)))))}var l=this,n=l.editor.graph,x=n.getModel(),
+F=l.menus.createPopupMenu;l.menus.createPopupMenu=function(V,k,v){F.apply(this,arguments);if(1==n.getSelectionCount()){k=n.getSelectionCell();var J=n.getOutgoingTreeEdges(k);V.addSeparator();0<J.length&&(t(n.getSelectionCell())&&this.addMenuItems(V,["selectChildren"],null,v),this.addMenuItems(V,["selectDescendants"],null,v));t(n.getSelectionCell())?(V.addSeparator(),0<n.getIncomingTreeEdges(k).length&&this.addMenuItems(V,["selectSiblings","selectParent"],null,v)):0<n.model.getEdgeCount(k)&&this.addMenuItems(V,
+["selectConnections"],null,v)}};l.actions.addAction("selectChildren",function(V){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell();V=mxEvent.isControlDown(V)?null:n.getOutgoingTreeEdges(k);if(null!=V&&0<V.length){k=[];for(var v=0;v<V.length;v++)k.push(n.model.getTerminal(V[v],!1));n.setSelectionCells(k)}else n.setSelectionCells(n.model.getChildren(k))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");l.actions.addAction("selectDescendants",function(V){var k=n.getSelectionCell();
+if(n.isEnabled()&&null!=k){var v=[];mxEvent.isControlDown(V)||n.traverse(k,!0,function(J,N){var T=null!=N&&n.isTreeEdge(N);T&&mxEvent.isControlDown(V)&&v.push(N);(null==N||T)&&v.push(J);return null==N||T});if(0==v.length||1==v.length&&v[0]==k)v=n.model.getDescendants(k);n.setSelectionCells(v)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");l.actions.addAction("selectParent",function(V){var k=n.getSelectionCell();n.isEnabled()&&null!=k&&(V=mxEvent.isControlDown(V)?null:n.getIncomingTreeEdges(k),
+null!=V&&0<V.length?n.setSelectionCell(n.model.getTerminal(V[0],!0)):n.selectParentCell())},null,null,Editor.altKey+"+"+Editor.shiftKey+"+P");l.actions.addAction("selectSiblings",function(V){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell(),v=mxEvent.isControlDown(V)?null:n.getIncomingTreeEdges(k);V=[];if(null!=v&&0<v.length&&(v=n.getOutgoingTreeEdges(n.model.getTerminal(v[0],!0)),null!=v))for(var J=0;J<v.length;J++)V.push(n.model.getTerminal(v[J],!1));0==V.length&&(V=n.model.getChildren(n.model.getParent(k)));
+n.setSelectionCells(V)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");var G=n.removeCells;n.removeCells=function(V,k){k=null!=k?k:!0;null==V&&(V=this.getDeletableCells(this.getSelectionCells()));k&&(V=this.getDeletableCells(this.addAllEdges(V)));for(var v=[],J=0;J<V.length;J++){var N=V[J];x.isEdge(N)&&q(N)&&(v.push(N),N=x.getTerminal(N,!1));if(t(N)){var T=[];n.traverse(N,!0,function(W,U){var Y=null!=U&&n.isTreeEdge(U);Y&&T.push(U);(null==U||Y)&&T.push(W);return null==U||Y});0<T.length&&(v=v.concat(T),
+N=n.getIncomingTreeEdges(V[J]),V=V.concat(N))}else null!=N&&v.push(V[J])}V=v;return G.apply(this,arguments)};l.hoverIcons.getStateAt=function(V,k,v){return t(V.cell)?null:this.graph.view.getState(this.graph.getCellAt(k,v))};var L=n.duplicateCells;n.duplicateCells=function(V,k){V=null!=V?V:this.getSelectionCells();for(var v=V.slice(0),J=0;J<v.length;J++){var N=n.view.getState(v[J]);if(null!=N&&t(N.cell)){var T=n.getIncomingTreeEdges(N.cell);for(N=0;N<T.length;N++)mxUtils.remove(T[N],V)}}this.model.beginUpdate();
+try{var W=L.call(this,V,k);if(W.length==V.length)for(J=0;J<V.length;J++)if(t(V[J])){var U=n.getIncomingTreeEdges(W[J]);T=n.getIncomingTreeEdges(V[J]);if(0==U.length&&0<T.length){var Y=this.cloneCell(T[0]);this.addEdge(Y,n.getDefaultParent(),this.model.getTerminal(T[0],!0),W[J])}}}finally{this.model.endUpdate()}return W};var M=n.moveCells;n.moveCells=function(V,k,v,J,N,T,W){for(var U=null,Y=[],fa=0;fa<V.length;fa++)(y(V[fa])||t(V[fa]))&&!B(V[fa])&&this.isCellCollapsed(V[fa])?Y=Y.concat(this.getSubtree(V[fa])):
+Y.push(V[fa]);V=mxUtils.removeDuplicates(Y);this.model.beginUpdate();try{Y=N;var oa=this.getCurrentCellStyle(N);if(null!=V&&t(N)&&"1"==mxUtils.getValue(oa,"treeFolding","0")){for(fa=0;fa<V.length;fa++)if(t(V[fa])||n.model.isEdge(V[fa])&&null==n.model.getTerminal(V[fa],!0)){N=n.model.getParent(V[fa]);break}if(null!=Y&&N!=Y&&null!=this.view.getState(V[0])){var la=n.getIncomingTreeEdges(V[0]);if(0<la.length){var qa=n.view.getState(n.model.getTerminal(la[0],!0));if(null!=qa){var ya=n.view.getState(Y);
+null!=ya&&(k=(ya.getCenterX()-qa.getCenterX())/n.view.scale,v=(ya.getCenterY()-qa.getCenterY())/n.view.scale)}}}}U=M.apply(this,arguments);if(null!=U&&null!=V&&U.length==V.length)for(fa=0;fa<U.length;fa++)if(this.model.isEdge(U[fa]))t(Y)&&0>mxUtils.indexOf(U,this.model.getTerminal(U[fa],!0))&&this.model.setTerminal(U[fa],Y,!0);else if(t(V[fa])&&(la=n.getIncomingTreeEdges(V[fa]),0<la.length))if(!J)t(Y)&&0>mxUtils.indexOf(V,this.model.getTerminal(la[0],!0))&&this.model.setTerminal(la[0],Y,!0);else if(0==
+n.getIncomingTreeEdges(U[fa]).length){oa=Y;if(null==oa||oa==n.model.getParent(V[fa]))oa=n.model.getTerminal(la[0],!0);J=this.cloneCell(la[0]);this.addEdge(J,n.getDefaultParent(),oa,U[fa])}}finally{this.model.endUpdate()}return U};if(null!=l.sidebar){var K=l.sidebar.dropAndConnect;l.sidebar.dropAndConnect=function(V,k,v,J){var N=n.model,T=null;N.beginUpdate();try{if(T=K.apply(this,arguments),t(V))for(var W=0;W<T.length;W++)if(N.isEdge(T[W])&&null==N.getTerminal(T[W],!0)){N.setTerminal(T[W],V,!0);var U=
+n.getCellGeometry(T[W]);U.points=null;null!=U.getTerminalPoint(!0)&&U.setTerminalPoint(null,!0)}}finally{N.endUpdate()}return T}}var Z={67:l.actions.get("selectChildren"),88:l.actions.get("selectDescendants"),80:l.actions.get("selectParent"),83:l.actions.get("selectSiblings")},ja={67:l.actions.get("copyStyle"),86:l.actions.get("pasteStyle")},da=l.onKeyDown;l.onKeyDown=function(V){try{var k=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=k){var v=mxEvent.isAltDown(V)&&mxEvent.isShiftDown(V)?
+Z[V.keyCode]:mxEvent.isAltDown(V)?ja[V.keyCode]:null;null!=v?(v.funct(V),mxEvent.consume(V)):t(k)&&(v=null,0<n.getIncomingTreeEdges(k).length&&(9==V.which?v=mxEvent.isShiftDown(V)?D(k):P(k):13==V.which&&(v=S(k,!mxEvent.isShiftDown(V)))),null!=v&&0<v.length?(1==v.length&&n.model.isEdge(v[0])?n.setSelectionCell(n.model.getTerminal(v[0],!1)):n.setSelectionCell(v[v.length-1]),null!=l.hoverIcons&&l.hoverIcons.update(n.view.getState(k)),n.startEditingAtCell(k),mxEvent.consume(V)):37==V.keyCode?(g(k,mxConstants.DIRECTION_WEST),
+mxEvent.consume(V)):38==V.keyCode?(g(k,mxConstants.DIRECTION_NORTH),mxEvent.consume(V)):39==V.keyCode?(g(k,mxConstants.DIRECTION_EAST),mxEvent.consume(V)):40==V.keyCode&&(g(k,mxConstants.DIRECTION_SOUTH),mxEvent.consume(V)))}}catch(J){l.handleError(J)}mxEvent.isConsumed(V)||da.apply(this,arguments)};var ba=n.connectVertex;n.connectVertex=function(V,k,v,J,N,T,W){var U=n.getIncomingTreeEdges(V);if(t(V)){var Y=I(V),fa=Y==mxConstants.DIRECTION_EAST||Y==mxConstants.DIRECTION_WEST,oa=k==mxConstants.DIRECTION_EAST||
+k==mxConstants.DIRECTION_WEST;return Y==k||0==U.length?P(V,k):fa==oa?D(V):S(V,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return ba.apply(this,arguments)};n.getSubtree=function(V){var k=[V];!y(V)&&!t(V)||B(V)||n.traverse(V,!0,function(v,J){var N=null!=J&&n.isTreeEdge(J);N&&0>mxUtils.indexOf(k,J)&&k.push(J);(null==J||N)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==J||N});return k};var na=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){na.apply(this,
+arguments);(y(this.state.cell)||t(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(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),
+this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(V){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(V),mxEvent.getClientY(V),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(V);this.graph.isMouseDown=!0;l.hoverIcons.reset();mxEvent.consume(V)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var ca=mxVertexHandler.prototype.redrawHandles;
+mxVertexHandler.prototype.redrawHandles=function(){ca.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 ka=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(V){ka.apply(this,arguments);null!=
+this.moveHandle&&(this.moveHandle.style.display=V?"":"none")};var aa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(V,k){aa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var m=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var t=m.apply(this,arguments),y=this.graph,q=this;return t.concat([this.addEntry("tree container",
+function(){var B=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var I=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');I.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");D.geometry.relative=!0;D.edge=!0;I.insertEdge(D,!0);S.insertEdge(D,!1);B.insert(D);B.insert(I);B.insert(S);return q.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var B=new mxCell("Mindmap",new mxGeometry(0,
+0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var I=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');I.vertex=!0;var S=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");D.geometry.relative=!0;D.edge=!0;I.insertEdge(D,!0);S.insertEdge(D,!1);var P=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+P.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),D.style);c.geometry.relative=!0;c.edge=!0;I.insertEdge(c,!0);P.insertEdge(c,!1);var g=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+g.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),D.style);l.geometry.relative=!0;l.edge=!0;I.insertEdge(l,!0);g.insertEdge(l,!1);var n=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),D.style);x.geometry.relative=!0;x.edge=!0;I.insertEdge(x,!0);n.insertEdge(x,!1);B.insert(D);B.insert(c);B.insert(l);B.insert(x);B.insert(I);B.insert(S);B.insert(P);B.insert(g);B.insert(n);return q.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var B=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
+B.vertex=!0;return q.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var B=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+B.vertex=!0;var I=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");I.geometry.setTerminalPoint(new mxPoint(-40,40),!0);I.geometry.relative=!0;I.edge=!0;B.insertEdge(I,!1);return q.createVertexTemplateFromCells([B,I],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var B=new mxCell("Sub Topic",new mxGeometry(0,0,80,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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');B.vertex=!0;var I=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
+I.geometry.setTerminalPoint(new mxPoint(-40,40),!0);I.geometry.relative=!0;I.edge=!0;B.insertEdge(I,!1);return q.createVertexTemplateFromCells([B,I],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree orgchart organization division",function(){var B=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var I=new mxCell("Organization",new mxGeometry(80,
+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(I,"treeRoot","1");I.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+D.geometry.relative=!0;D.edge=!0;I.insertEdge(D,!0);S.insertEdge(D,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
+!0;c.edge=!0;I.insertEdge(c,!0);P.insertEdge(c,!1);B.insert(D);B.insert(c);B.insert(I);B.insert(S);B.insert(P);return q.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree root",function(){var B=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;return q.createVertexTemplateFromCells([B],
+B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree division",function(){var B=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var I=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+I.geometry.setTerminalPoint(new mxPoint(0,0),!0);I.geometry.relative=!0;I.edge=!0;B.insertEdge(I,!1);return q.createVertexTemplateFromCells([B,I],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree sub sections",function(){var B=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");B.vertex=!0;var I=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
+I.geometry.setTerminalPoint(new mxPoint(110,-40),!0);I.geometry.relative=!0;I.edge=!0;B.insertEdge(I,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),I.style);D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative=!0;D.edge=!0;S.insertEdge(D,!1);return q.createVertexTemplateFromCells([I,D,B,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
EditorUi.initMinimalTheme=function(){function b(D,P){if(EditorUi.windowed){var c=D.editor.graph;c.popupMenuHandler.hideMenu();null==D.formatWindow?(D.formatWindow=new WrapperWindow(D,"",Math.max(10,D.diagramContainer.clientWidth-248),60,240,Math.min(566,c.container.clientHeight-10),function(g){g.className="geSidebarContainer geFormatContainer";D.createFormat(g).init()}),D.dependsOnLanguage(mxUtils.bind(this,function(){D.formatWindow.window.setTitle(mxResources.get("format"))})),D.formatWindow.window.addListener(mxEvent.SHOW,
mxUtils.bind(this,function(){D.formatWindow.window.fit()})),D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):D.formatWindow.window.setVisible(null!=P?P:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeftWidth="1px",D.formatElt.style.borderLeftStyle="solid",D.formatElt.style.right="0px"),P=D.diagramContainer.parentNode,
null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),P.style.right="0px"):(P.parentNode.appendChild(D.formatElt),P.style.right=D.formatElt.style.width)}function f(D,P){if(EditorUi.windowed){var c=D.editor.graph;c.popupMenuHandler.hideMenu();null==D.sidebarWindow?(D.sidebarWindow=new WrapperWindow(D,"",10,56,Math.min(c.container.clientWidth-10,218)-6,Math.min(c.container.clientHeight-40,650)-6,function(g){D.createShapesPanel(g)}),D.dependsOnLanguage(mxUtils.bind(this,function(){D.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
D.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){D.sidebarWindow.window.fit()})),D.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),D.sidebarWindow.window.setVisible(!0),isLocalStorage&&D.getLocalData("sidebar",function(g){D.sidebar.showEntries(g,null,!0)}),D.restoreLibraries()):D.sidebarWindow.window.setVisible(null!=P?P:!D.sidebarWindow.window.isVisible())}else null==D.sidebarElt&&(D.sidebarElt=D.createSidebarContainer(),D.createShapesPanel(D.sidebarElt),D.sidebarElt.style.border=
-"none",D.sidebarElt.style.width="210px",D.sidebarElt.style.borderRight="1px solid gray"),P=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),P.style.left="0px"):(P.parentNode.appendChild(D.sidebarElt),P.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var l=0;try{l=window.innerWidth||document.documentElement.clientWidth||
+"none",D.sidebarElt.style.width="210px",D.sidebarElt.style.borderRight="1px solid gray"),P=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),P.style.left="0px"):(P.parentNode.appendChild(D.sidebarElt),P.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||
document.body.clientWidth}catch(D){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
"#C0C0C0";mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;EditorUi.prototype.closableScratchpad=!1;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=
-function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var u=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){u.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var y=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,P){null!=P.shortcut&&900>l&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",P.shortcut):y.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
-function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?D:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();q.apply(this,arguments)};var C=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){C.apply(this,
+function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var y=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,P){null!=P.shortcut&&900>m&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",P.shortcut):y.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
+function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?D:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();q.apply(this,arguments)};var B=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){B.apply(this,
arguments);if(D){var P=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=P&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=P&&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(){};EditorUi.prototype.installFormatToolbar=function(D){var P=
-this.editor.graph,c=document.createElement("div");c.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%;";P.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(g,m){0<P.getSelectionCount()?(D.appendChild(c),c.innerHTML="Selected: "+P.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var J=!1;EditorUi.prototype.initFormatWindow=
-function(){if(!J&&null!=this.formatWindow){J=!0;var D=this.formatWindow.window.toggleMinimized,P=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(P=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+P-140+"px"):(this.div.style.width=P+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-P+140)+"px");this.fit()};
-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var S=EditorUi.prototype.init;EditorUi.prototype.init=function(){function D(I,N,T){var W=n.menus.get(I);N=H.addMenu(mxResources.get(I),mxUtils.bind(this,function(){W.funct.apply(this,arguments)}));N.className="geButton";N.setAttribute("title",mxResources.get(I));n.menus.menuCreated(W,N,"geButton");null!=T&&
-(N.style.backgroundImage="url("+T+")",N.innerText="");return N}function P(I,N,T,W,U,Y){var fa=document.createElement("a");fa.className="geButton";F.appendChild(fa);null!=Y?fa.style.backgroundImage="url("+Y+")":mxUtils.write(fa,I);mxEvent.addListener(fa,"click",function(na){"disabled"!=fa.getAttribute("disabled")&&N(na);mxEvent.consume(na)});mxEvent.preventDefault(fa);null!=W&&fa.setAttribute("title",W);null!=U&&(I=function(){U.isEnabled()?fa.removeAttribute("disabled"):fa.setAttribute("disabled",
-"disabled")},U.addListener("stateChanged",I),x.addListener("enabledChanged",I),I());return fa}function c(I,N,T){N=document.createElement("div");N.className="geButtonGroup";for(T=0;T<I.length;T++)null!=I[T]&&N.appendChild(I[T]);F.appendChild(N);return N}function g(){l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.innerHTML="";var I=1E3>l,N=D("diagram",null,I?Editor.menuImage:null);c([N,P(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),
-n.actions.get("image"),I?Editor.shapesImage:null),P(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),I?Editor.formatImage:null)]);N=D("insert",!0,I?ha:null);c([N,P(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),I?Editor.trashImage:null)]);x.isEnabled()||N.setAttribute("disabled","disabled");V.setAttribute("title",mxResources.get("undo")+
-" ("+ka.shortcut+")");k.setAttribute("title",mxResources.get("redo")+" ("+ba.shortcut+")");v.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=l&&(c([V,k]),520<=l&&c([v,640<=l?P("",oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",oa,Editor.zoomInImage):null,640<=l?P("",da.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",da,Editor.zoomOutImage):null]));F.appendChild(n.statusContainer);F.appendChild(n.buttonContainer)}S.apply(this,arguments);var m=
-mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=m&&(m.classList.add("geSimple"),m.classList.add("geMinimal"),m.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=l||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"));
-EditorUi.windowed&&1E3<=l&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var F=document.createElement("div");F.className="geMenubarContainer";var H=new Menubar(n,F),M=n.hideCurrentMenu;n.hideCurrentMenu=function(){M.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var L=n.descriptorChanged;n.descriptorChanged=function(){L.apply(this,arguments);var I=n.getCurrentFile();if(null!=I&&null!=I.getTitle()){var N=
-I.getMode();"google"==N?N="googleDrive":"github"==N?N="gitHub":"gitlab"==N?N="gitLab":"onedrive"==N&&(N="oneDrive");N=mxResources.get(N);F.setAttribute("title",I.getTitle()+(null!=N?" ("+N+")":""))}else F.removeAttribute("title")};n.setStatusText(n.editor.getStatus());F.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();F.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var K=this.createZoomInput(!0),Z=n.updateTabContainer;
-n.updateTabContainer=function(){Z.apply(this,arguments);n.tabContainer.appendChild(K)};var ha=Editor.addBoxImage;if(null!=n.hoverIcons){var ca=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||ca.apply(this,arguments)}}if(null!=x.freehand){var aa=x.freehand.createStyle;x.freehand.createStyle=function(I){return aa.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());
-var oa=n.actions.get("zoomIn"),da=n.actions.get("zoomOut");m=n.actions.get("resetView");var ka=n.actions.get("undo"),ba=n.actions.get("redo"),V=P("",ka.funct,null,"",ka,Editor.undoImage),k=P("",ba.funct,null,"",ba,Editor.redoImage),v=P("",function(I){mxEvent.isAltDown(I)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(I)},!0,"",m,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,
-null)});n.container.appendChild(n.tabContainer);n.container.appendChild(F);n.updateTabContainer();!EditorUi.windowed&&1E3<=l&&b(this,!0);g();n.addListener("lockedChanged",g);n.addListener("languageChanged",g);n.editor.graph.addListener("enabledChanged",g);mxEvent.addListener(window,"resize",function(){g();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&
+this.editor.graph,c=document.createElement("div");c.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%;";P.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(g,l){0<P.getSelectionCount()?(D.appendChild(c),c.innerHTML="Selected: "+P.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var I=!1;EditorUi.prototype.initFormatWindow=
+function(){if(!I&&null!=this.formatWindow){I=!0;var D=this.formatWindow.window.toggleMinimized,P=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(P=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+P-140+"px"):(this.div.style.width=P+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-P+140)+"px");this.fit()};
+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var S=EditorUi.prototype.init;EditorUi.prototype.init=function(){function D(J,N,T){var W=n.menus.get(J);N=G.addMenu(mxResources.get(J),mxUtils.bind(this,function(){W.funct.apply(this,arguments)}));N.className="geButton";N.setAttribute("title",mxResources.get(J));n.menus.menuCreated(W,N,"geButton");null!=T&&
+(N.style.backgroundImage="url("+T+")",N.innerText="");return N}function P(J,N,T,W,U,Y){var fa=document.createElement("a");fa.className="geButton";F.appendChild(fa);null!=Y?fa.style.backgroundImage="url("+Y+")":mxUtils.write(fa,J);mxEvent.addListener(fa,"click",function(oa){"disabled"!=fa.getAttribute("disabled")&&N(oa);mxEvent.consume(oa)});mxEvent.preventDefault(fa);null!=W&&fa.setAttribute("title",W);null!=U&&(J=function(){U.isEnabled()?fa.removeAttribute("disabled"):fa.setAttribute("disabled",
+"disabled")},U.addListener("stateChanged",J),x.addListener("enabledChanged",J),J());return fa}function c(J,N,T){N=document.createElement("div");N.className="geButtonGroup";for(T=0;T<J.length;T++)null!=J[T]&&N.appendChild(J[T]);F.appendChild(N);return N}function g(){m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.innerHTML="";var J=1E3>m,N=D("diagram",null,J?Editor.menuImage:null);c([N,P(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),
+n.actions.get("image"),J?Editor.shapesImage:null),P(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),J?Editor.formatImage:null)]);N=D("insert",!0,J?ja:null);c([N,P(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),J?Editor.trashImage:null)]);x.isEnabled()||N.setAttribute("disabled","disabled");V.setAttribute("title",mxResources.get("undo")+
+" ("+ka.shortcut+")");k.setAttribute("title",mxResources.get("redo")+" ("+aa.shortcut+")");v.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=m&&(c([V,k]),520<=m&&c([v,640<=m?P("",na.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",na,Editor.zoomInImage):null,640<=m?P("",ca.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ca,Editor.zoomOutImage):null]));F.appendChild(n.statusContainer);F.appendChild(n.buttonContainer)}S.apply(this,arguments);var l=
+mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=l&&(l.classList.add("geSimple"),l.classList.add("geMinimal"),l.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=m||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"));
+EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var F=document.createElement("div");F.className="geMenubarContainer";var G=new Menubar(n,F),L=n.hideCurrentMenu;n.hideCurrentMenu=function(){L.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var M=n.descriptorChanged;n.descriptorChanged=function(){M.apply(this,arguments);var J=n.getCurrentFile();if(null!=J&&null!=J.getTitle()){var N=
+J.getMode();"google"==N?N="googleDrive":"github"==N?N="gitHub":"gitlab"==N?N="gitLab":"onedrive"==N&&(N="oneDrive");N=mxResources.get(N);F.setAttribute("title",J.getTitle()+(null!=N?" ("+N+")":""))}else F.removeAttribute("title")};n.setStatusText(n.editor.getStatus());F.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();F.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var K=this.createZoomInput(!0),Z=n.updateTabContainer;
+n.updateTabContainer=function(){Z.apply(this,arguments);n.tabContainer.appendChild(K)};var ja=Editor.addBoxImage;if(null!=n.hoverIcons){var da=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||da.apply(this,arguments)}}if(null!=x.freehand){var ba=x.freehand.createStyle;x.freehand.createStyle=function(J){return ba.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());
+var na=n.actions.get("zoomIn"),ca=n.actions.get("zoomOut");l=n.actions.get("resetView");var ka=n.actions.get("undo"),aa=n.actions.get("redo"),V=P("",ka.funct,null,"",ka,Editor.undoImage),k=P("",aa.funct,null,"",aa,Editor.redoImage),v=P("",function(J){mxEvent.isAltDown(J)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(J)},!0,"",l,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,
+null)});n.container.appendChild(n.tabContainer);n.container.appendChild(F);n.updateTabContainer();!EditorUi.windowed&&1E3<=m&&b(this,!0);g();n.addListener("lockedChanged",g);n.addListener("languageChanged",g);n.editor.graph.addListener("enabledChanged",g);mxEvent.addListener(window,"resize",function(){g();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&
n.actions.layersWindow.window.fit();null!=n.menus.chatWindow&&n.menus.chatWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,f,l,u,y,q,C){this.file=b;this.id=f;this.content=l;this.modifiedDate=u;this.createdDate=y;this.isResolved=q;this.user=C;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,u,y){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,l,u,y){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=u;this.locale=y};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on Connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Был обнаружен черновик \'{1}\'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfindInDiagram=Find in Diagram\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to Right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste Here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to Left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshadows=Shadows\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate Shape Only by 90°\ntype=Type\ntypeSlashToSearch=Type / to search\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\ncopyAsSvg=Copy as SVG\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\nconfACacheMapping=Cache page IDs mapping\nconfARemImpPages=Remember imported pages\ndelCachedData=Delete Cached Data\nk15tPagesError=Error retrieving Scroll pages. Is Scroll Versions installed?\ndrawioUninstalled=draw.io has been uninstalled, the editor will now close\nconfAttachmentArchived=Diagram belongs to an archived page and cannot be loaded. Restore the page (ID: {1}) to load it.\n');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;
-Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];Editor.currentTheme="";window.uiTheme="";GraphViewer=function(b,f,l){this.init(b,f,l)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="1"==urlParams.dev?"https://test.draw.io/":"https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl=window.DRAWIO_BASE_URL+"/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,f,m,t,y,q,B){this.file=b;this.id=f;this.content=m;this.modifiedDate=t;this.createdDate=y;this.isResolved=q;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,m,t,y){f()};DrawioComment.prototype.editComment=function(b,f,m){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,m,t,y){this.id=b;this.email=f;this.displayName=m;this.pictureUrl=t;this.locale=y};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on Connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Был обнаружен черновик \'{1}\'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfindInDiagram=Find in Diagram\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to Right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste Here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to Left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshadows=Shadows\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate Shape Only by 90°\ntype=Type\ntypeSlashToSearch=Type / to search\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\ncopyAsSvg=Copy as SVG\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\nconfACacheMapping=Cache page IDs mapping\nconfARemImpPages=Remember imported pages\ndelCachedData=Delete Cached Data\nk15tPagesError=Error retrieving Scroll pages. Is Scroll Versions installed?\ndrawioUninstalled=draw.io has been uninstalled, the editor will now close\nconfAttachmentArchived=Diagram belongs to an archived page and cannot be loaded. Restore the page (ID: {1}) to load it.\n');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;
+Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];Editor.currentTheme="";window.uiTheme="";GraphViewer=function(b,f,m){this.init(b,f,m)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="1"==urlParams.dev?"https://test.draw.io/":"https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl=window.DRAWIO_BASE_URL+"/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;
GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;GraphViewer.prototype.darkMode=null;
-GraphViewer.prototype.init=function(b,f,l){GraphViewer.initCss();this.graphConfig=null!=l?l:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=
+GraphViewer.prototype.init=function(b,f,m){GraphViewer.initCss();this.graphConfig=null!=m?m:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=
null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.darkMode=null!=this.graphConfig["dark-mode"]?this.graphConfig["dark-mode"]:this.darkMode;
this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=
-null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;var u=this;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=f&&(this.xmlDocument=f.ownerDocument,this.xmlNode=f,this.xml=mxUtils.getXml(f),null!=b)){var y=
-mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var J=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?J.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(J.style.padding="8px");J.style.forcedColorAdjust="none";J.style.boxSizing="border-box";J.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var x=
-this.view.graphBounds,F=this.view.translate;J.setAttribute("viewBox",x.x+F.x-this.panDx+" "+(x.y+F.y-this.panDy)+" "+(x.width+1)+" "+(x.height+1));this.container.style.backgroundColor=J.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",x))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(x){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=
-!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=f)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(x){}this.graph.getImageFromBundles=function(x){return u.getImageUrl(x)};this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var D=
-this.xmlNode.getElementsByTagName("diagram");if(0<D.length){if(null!=this.pageId)for(S=0;S<D.length;S++)if(this.pageId==D[S].getAttribute("id")){this.currentPage=S;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(x){var F=D[u.currentPage];return"page"==x?F.getAttribute("name")||"Page-"+(u.currentPage+1):"pagenumber"==x?u.currentPage+1:"pagecount"==x?D.length:P.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(x){this.handlingResize||(this.currentPage=
+null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;var t=this;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=f&&(this.xmlDocument=f.ownerDocument,this.xmlNode=f,this.xml=mxUtils.getXml(f),null!=b)){var y=
+mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var I=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?I.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(I.style.padding="8px");I.style.forcedColorAdjust="none";I.style.boxSizing="border-box";I.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var x=
+this.view.graphBounds,F=this.view.translate;I.setAttribute("viewBox",x.x+F.x-this.panDx+" "+(x.y+F.y-this.panDy)+" "+(x.width+1)+" "+(x.height+1));this.container.style.backgroundColor=I.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",x))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(x){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=
+!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=f)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(x){}this.graph.getImageFromBundles=function(x){return t.getImageUrl(x)};this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var D=
+this.xmlNode.getElementsByTagName("diagram");if(0<D.length){if(null!=this.pageId)for(S=0;S<D.length;S++)if(this.pageId==D[S].getAttribute("id")){this.currentPage=S;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(x){var F=D[t.currentPage];return"page"==x?F.getAttribute("name")||"Page-"+(t.currentPage+1):"pagenumber"==x?t.currentPage+1:"pagecount"==x?D.length:P.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(x){this.handlingResize||(this.currentPage=
mxUtils.mod(x,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(x){x=this.getIndexById(x);var F=0<=x;F&&this.selectPage(x);return F};S=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});var g=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(x){if(null!=x&&
-Graph.isPageLink(x.src)){var F=x.src,H=F.indexOf(",");0<H&&(H=u.getIndexById(F.substring(H+1)),0<=H&&(x=u.getImageForGraphModel(Editor.parseDiagramNode(u.diagrams[H])),x.originalSrc=F))}g.apply(this,arguments)};var m=this.graph.getGraphBounds;this.graph.getGraphBounds=function(x){var F=m.apply(this,arguments);x=this.backgroundImage;if(null!=x){var H=this.view.translate,M=this.view.scale;F=mxRectangle.fromRectangle(F);F.add(new mxRectangle((H.x+x.x)*M,(H.y+x.y)*M,x.width*M,x.height*M))}return F};this.addListener("xmlNodeChanged",
-S);S();urlParams.page=u.currentPage;S=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||
+Graph.isPageLink(x.src)){var F=x.src,G=F.indexOf(",");0<G&&(G=t.getIndexById(F.substring(G+1)),0<=G&&(x=t.getImageForGraphModel(Editor.parseDiagramNode(t.diagrams[G])),x.originalSrc=F))}g.apply(this,arguments)};var l=this.graph.getGraphBounds;this.graph.getGraphBounds=function(x){var F=l.apply(this,arguments);x=this.backgroundImage;if(null!=x){var G=this.view.translate,L=this.view.scale;F=mxRectangle.fromRectangle(F);F.add(new mxRectangle((G.x+x.x)*L,(G.y+x.y)*L,x.width*L,x.height*L))}return F};this.addListener("xmlNodeChanged",
+S);S();urlParams.page=t.currentPage;S=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||
(this.graph.panningHandler.isForcePanningEvent=function(x){return!mxEvent.isPopupTrigger(x.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.titleTooltip||
-this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(x,F){try{if(Graph.isPageLink(x)){var H=x.indexOf(",");u.selectPageById(x.substring(H+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var M=
-this.getGraphBounds();this.handleCustomLink(x,F);M.equals(this.getGraphBounds())||u.crop()}}catch(L){alert(L.message)}return!0};var n=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return n.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});l=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof l){var q=
-this.getObservableParent(b),C=new l(mxUtils.bind(this,function(J){0<b.offsetWidth&&(C.disconnect(),y())}));C.observe(q,{attributes:!0})}else y()}};
-GraphViewer.prototype.installBackgroundColorHandler=function(){var b=this.graph;if(null!=b){null!=GraphViewer.shapeBackgroundColor&&(b.shapeBackgroundColor=GraphViewer.shapeBackgroundColor);b.defaultPageBackgroundColor="transparent";b.diagramBackgroundColor="transparent";b.transparentBackground=!1;var f=b.background,l=mxUtils.bind(this,function(u){"none"==b.getAdaptiveColors()&&null==f&&(this.isDarkMode()?b.background="#ffffff":b.background=null,u&&b.view.validateBackground())});this.addListener("graphChanged",
-function(){f=b.background;l(!0)});this.addListener("darkModeChanged",function(){l(!0)});l(!1)}};GraphViewer.prototype.installDarkModeListener=function(){null!=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(){this.darkModeChanged();this.fireEvent(new mxEventObject("darkModeChanged"))}));this.darkModeChanged()};
+this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(x,F){try{if(Graph.isPageLink(x)){var G=x.indexOf(",");t.selectPageById(x.substring(G+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var L=
+this.getGraphBounds();this.handleCustomLink(x,F);L.equals(this.getGraphBounds())||t.crop()}}catch(M){alert(M.message)}return!0};var n=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return n.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});m=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof m){var q=
+this.getObservableParent(b),B=new m(mxUtils.bind(this,function(I){0<b.offsetWidth&&(B.disconnect(),y())}));B.observe(q,{attributes:!0})}else y()}};
+GraphViewer.prototype.installBackgroundColorHandler=function(){var b=this.graph;if(null!=b){null!=GraphViewer.shapeBackgroundColor&&(b.shapeBackgroundColor=GraphViewer.shapeBackgroundColor);b.defaultPageBackgroundColor="transparent";b.diagramBackgroundColor="transparent";b.transparentBackground=!1;var f=b.background,m=mxUtils.bind(this,function(t){"none"==b.getAdaptiveColors()&&null==f&&(this.isDarkMode()?b.background="#ffffff":b.background=null,t&&b.view.validateBackground())});this.addListener("graphChanged",
+function(){f=b.background;m(!0)});this.addListener("darkModeChanged",function(){m(!0)});m(!1)}};GraphViewer.prototype.installDarkModeListener=function(){null!=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(){this.darkModeChanged();this.fireEvent(new mxEventObject("darkModeChanged"))}));this.darkModeChanged()};
GraphViewer.prototype.darkModeChanged=function(){if(null!=this.graph){var b=this.graph.container,f=this.isDarkMode();f?b.classList.add("geDarkMode"):b.classList.remove("geDarkMode");b.style.colorScheme=f?"dark":"light"}};GraphViewer.prototype.getAncestorDetails=function(b){for(;null!=b;){if("DETAILS"==b.nodeName)return b;b=b.parentNode}return null};
GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
-GraphViewer.prototype.getImageForGraphModel=function(b){var f=Graph.createOffscreenGraph(this.graph.getStylesheet());f.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(f.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;f.model.setRoot(b);b=f.getSvg();var l=f.getGraphBounds();document.body.removeChild(f.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),l.width,l.height,l.x,l.y)};
+GraphViewer.prototype.getImageForGraphModel=function(b){var f=Graph.createOffscreenGraph(this.graph.getStylesheet());f.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(f.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;f.model.setRoot(b);b=f.getSvg();var m=f.getGraphBounds();document.body.removeChild(f.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),m.width,m.height,m.x,m.y)};
GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var f=0;f<this.diagrams.length;f++)if(this.diagrams[f].getAttribute("id")==b)return f;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocument=b.ownerDocument,this.xml=mxUtils.getXml(b),this.xmlNode=b);this.setGraphXml(b)};GraphViewer.prototype.updateGraphXml=function(b){this.setGraphXml(b);this.fireEvent(new mxEventObject("graphChanged"))};
-GraphViewer.prototype.setLayersVisible=function(b){var f=!0;if(!this.autoOrigin){var l=[],u=this.graph.getModel();u.beginUpdate();try{for(var y=0;y<u.getChildCount(u.root);y++){var q=u.getChildAt(u.root,y);f=f&&u.isVisible(q);l.push(u.isVisible(q));u.setVisible(q,null!=b?b[y]:!0)}}finally{u.endUpdate()}}return f?null:l};
+GraphViewer.prototype.setLayersVisible=function(b){var f=!0;if(!this.autoOrigin){var m=[],t=this.graph.getModel();t.beginUpdate();try{for(var y=0;y<t.getChildCount(t.root);y++){var q=t.getChildAt(t.root,y);f=f&&t.isVisible(q);m.push(t.isVisible(q));t.setVisible(q,null!=b?b[y]:!0)}}finally{t.endUpdate()}}return f?null:m};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var f=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),f=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};f&&this.setLayersVisible(f)}};GraphViewer.prototype.isDarkMode=function(){return"dark"==this.darkMode||"auto"==this.darkMode&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,f=this.graph.getGraphBounds(),l=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var u=mxUtils.bind(this,function(){if(!l){l=!0;var J=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?J.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){J=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);
-S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};J={left:J.left-S.left,top:J.top-S.top,bottom:J.bottom-S.top,right:J.right-S.left};this.toolbar.style.left=J.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=J.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=J.top+1+"px"):this.toolbar.style.top=J.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());l=!1}}),y=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(J){var S=b.offsetWidth;S==y||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=J?J:this.graphConfig.zoom||
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,f=this.graph.getGraphBounds(),m=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var t=mxUtils.bind(this,function(){if(!m){m=!0;var I=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?I.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){I=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);
+S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};I={left:I.left-S.left,top:I.top-S.top,bottom:I.bottom-S.top,right:I.right-S.left};this.toolbar.style.left=I.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=I.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=I.top+1+"px"):this.toolbar.style.top=I.top+"px"}else null!=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());m=!1}}),y=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(I){var S=b.offsetWidth;S==y||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=I?I:this.graphConfig.zoom||
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},y=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
-!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",u),this.graph.addListener("size",u)):new ResizeSensor(this.graph.container,u));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,f.width+2*this.graph.border),
-0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,f.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var q=y=null;u=mxUtils.bind(this,function(){window.clearTimeout(q);this.handlingResize||(q=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",u):new ResizeSensor(this.graph.container,u))}else 9>=document.documentMode||this.graph.addListener("size",
-u);var C=mxUtils.bind(this,function(J){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var D=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==J&&this.allowZoomOut&&(this.allowZoomIn||f.width+2*this.graph.border>b.offsetWidth||f.height+2*this.graph.border>D)?(J=null,null!=D&&f.height+2*this.graph.border>D-2&&(J=(D-2*this.graph.border-2)/f.height),this.fitGraph(J)):this.widthIsEmpty||
-null!=J||0!=this.graphConfig.resize||""==b.style.height?(J=null!=J?J:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-f.x/this.graph.view.scale)+J.x,Math.floor(this.graph.border-f.y/this.graph.view.scale)+J.y),y=b.offsetWidth):this.graph.center((!this.widthIsEmpty||f.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(C,0):C();this.positionGraph=function(J){f=this.graph.getGraphBounds();y=null;C(J)}};
-GraphViewer.prototype.crop=function(){var b=this.graph,f=b.getGraphBounds(),l=b.border,u=b.view.scale;b.view.setTranslate(null!=f.x?Math.floor(b.view.translate.x-f.x/u+l):l,null!=f.y?Math.floor(b.view.translate.y-f.y/u+l):l)};GraphViewer.prototype.updateContainerWidth=function(b,f){b.style.width=f+"px"};GraphViewer.prototype.updateContainerHeight=function(b,f){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=f+"px"};
-GraphViewer.prototype.showLayers=function(b,f){var l=this.graphConfig.layers;l=null!=l&&0<l.length?l.split(" "):[];var u=this.graphConfig.layerIds,y=null!=u&&0<u.length,q=!1;if(0<l.length||y||null!=f){f=null!=f?f.getModel():null;b=b.getModel();b.beginUpdate();try{var C=b.getChildCount(b.root);if(null==f){f=!1;q={};if(y)for(var J=0;J<u.length;J++){var S=b.getCell(u[J]);null!=S&&(f=!0,q[S.id]=!0)}else for(J=0;J<l.length;J++)S=b.getChildAt(b.root,parseInt(l[J])),null!=S&&(f=!0,q[S.id]=!0);for(J=0;f&&
-J<C;J++)S=b.getChildAt(b.root,J),b.setVisible(S,q[S.id]||!1)}else for(J=0;J<C;J++)b.setVisible(b.getChildAt(b.root,J),f.isVisible(f.getChildAt(f.root,J)))}finally{b.endUpdate()}q=!0}return q};
+!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",t),this.graph.addListener("size",t)):new ResizeSensor(this.graph.container,t));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,f.width+2*this.graph.border),
+0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,f.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var q=y=null;t=mxUtils.bind(this,function(){window.clearTimeout(q);this.handlingResize||(q=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",t):new ResizeSensor(this.graph.container,t))}else 9>=document.documentMode||this.graph.addListener("size",
+t);var B=mxUtils.bind(this,function(I){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var D=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==I&&this.allowZoomOut&&(this.allowZoomIn||f.width+2*this.graph.border>b.offsetWidth||f.height+2*this.graph.border>D)?(I=null,null!=D&&f.height+2*this.graph.border>D-2&&(I=(D-2*this.graph.border-2)/f.height),this.fitGraph(I)):this.widthIsEmpty||
+null!=I||0!=this.graphConfig.resize||""==b.style.height?(I=null!=I?I:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-f.x/this.graph.view.scale)+I.x,Math.floor(this.graph.border-f.y/this.graph.view.scale)+I.y),y=b.offsetWidth):this.graph.center((!this.widthIsEmpty||f.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(B,0):B();this.positionGraph=function(I){f=this.graph.getGraphBounds();y=null;B(I)}};
+GraphViewer.prototype.crop=function(){var b=this.graph,f=b.getGraphBounds(),m=b.border,t=b.view.scale;b.view.setTranslate(null!=f.x?Math.floor(b.view.translate.x-f.x/t+m):m,null!=f.y?Math.floor(b.view.translate.y-f.y/t+m):m)};GraphViewer.prototype.updateContainerWidth=function(b,f){b.style.width=f+"px"};GraphViewer.prototype.updateContainerHeight=function(b,f){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=f+"px"};
+GraphViewer.prototype.showLayers=function(b,f){var m=this.graphConfig.layers;m=null!=m&&0<m.length?m.split(" "):[];var t=this.graphConfig.layerIds,y=null!=t&&0<t.length,q=!1;if(0<m.length||y||null!=f){f=null!=f?f.getModel():null;b=b.getModel();b.beginUpdate();try{var B=b.getChildCount(b.root);if(null==f){f=!1;q={};if(y)for(var I=0;I<t.length;I++){var S=b.getCell(t[I]);null!=S&&(f=!0,q[S.id]=!0)}else for(I=0;I<m.length;I++)S=b.getChildAt(b.root,parseInt(m[I])),null!=S&&(f=!0,q[S.id]=!0);for(I=0;f&&
+I<B;I++)S=b.getChildAt(b.root,I),b.setVisible(S,q[S.id]||!1)}else for(I=0;I<B;I++)b.setVisible(b.getChildAt(b.root,I),f.isVisible(f.getChildAt(f.root,I)))}finally{b.endUpdate()}q=!0}return q};
GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var f=b.ownerDocument.createElement("div");f.style.display="flex";f.style.alignItems="center";f.style.position="absolute";f.style.overflow="hidden";f.style.boxSizing="border-box";f.style.whiteSpace="nowrap";f.style.textAlign="left";f.style.zIndex=
-this.toolbarZIndex;f.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";f.style.height=this.toolbarHeight+"px";var l=mxUtils.bind(this,function(){this.isDarkMode()?(f.classList.add("geDarkMode"),f.style.colorScheme="dark"):(f.classList.remove("geDarkMode"),f.style.colorScheme="light")});this.addListener("darkModeChanged",l);this.toolbar=f;l();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");
-mxUtils.setOpacity(f,30);var u=null,y=null,q=mxUtils.bind(this,function(aa){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);u=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,0);u=null;y=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";y=null}),100)}),aa||200)}),C=mxUtils.bind(this,function(aa){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);f.style.display=
-"flex";mxUtils.setOpacity(f,aa||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||(C(30),q())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":"mousemove",function(aa){mxEvent.consume(aa)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(aa){C(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(aa){C(100);mxEvent.consume(aa)}));mxEvent.addListener(f,"mouseleave",
-mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||C(30)}));var J=this.graph,S=J.getTolerance();J.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(aa,oa){this.startX=oa.getGraphX();this.startY=oa.getGraphY();this.scrollLeft=J.container.scrollLeft;this.scrollTop=J.container.scrollTop},mouseMove:function(aa,oa){},mouseUp:function(aa,oa){mxEvent.isTouchEvent(oa.getEvent())&&Math.abs(this.scrollLeft-J.container.scrollLeft)<S&&Math.abs(this.scrollTop-J.container.scrollTop)<
-S&&Math.abs(this.startX-oa.getGraphX())<S&&Math.abs(this.startY-oa.getGraphY())<S&&(0<parseFloat(f.style.opacity||0)?q():C(30))}})}l=this.toolbarItems;for(var D=0,P=mxUtils.bind(this,function(aa,oa,da,ka){aa=this.createToolbarButton(aa,oa,da,ka);f.appendChild(aa);D++;return aa}),c=this.graph.getModel(),g=null,m=null,n=null,x=null,F=0;F<l.length;F++){var H=l[F];if("pages"==H){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";
-x.style.padding="4px";x.style.fontFamily=GraphViewer.cssFontFamily;x.style.fontSize="12px";x.style.cursor="default";x.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(x,70);var M=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.chevronLeftImage,mxResources.get("previousPage")||"Previous Page");M.style.borderRightStyle="none";M.style.paddingLeft="0px";M.style.paddingRight="0px";f.appendChild(x);var L=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.chevronRightImage,mxResources.get("nextPage")||"Next Page");L.style.paddingLeft="0px";L.style.paddingRight="0px";H=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,this.currentPage+1+" / "+this.diagrams.length);x.style.display=1<this.diagrams.length?"inline-flex":"none";M.style.display=x.style.display;L.style.display=x.style.display});this.addListener("graphChanged",H);H()}else if("zoom"==H)this.zoomEnabled&&(P(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),P(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),P(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==H){if(this.layersEnabled){var K=P(mxUtils.bind(this,function(aa){if(null!=g)g.parentNode.removeChild(g),
-g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var da=this.graph.getGraphBounds(),ka=this.graph.view;0>da.x||0>da.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ka.translate.clone(),scale:ka.scale}):null!=this.graph.originalViewState&&0<da.x/ka.scale+this.graph.originalViewState.translate.x-ka.translate.x&&0<da.y/ka.scale+this.graph.originalViewState.translate.y-
-ka.translate.y&&(ka.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ka.translate.clone(),scale:ka.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});aa=K.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=GraphViewer.cssFontFamily;
-g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;g.style.color="#000";mxUtils.setOpacity(g,85);var oa=mxUtils.getDocumentScrollOrigin(document);g.style.left=oa.x+aa.left-1+"px";g.style.top=oa.y+aa.bottom-2+"px";this.isDarkMode()&&(g.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");c.addListener(mxEvent.CHANGE,
-function(){K.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"});K.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"}}else if("tags"==H){if(this.tagsEnabled){var Z=P(mxUtils.bind(this,function(aa){null==m&&(m=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),m.div.getElementsByTagName("div")[0].style.position="",m.div.style.maxHeight="160px",m.div.style.maxWidth="120px",m.div.style.padding="2px",m.div.style.overflow="auto",m.div.style.height="auto",m.div.style.position=
-"fixed",m.div.style.fontFamily=GraphViewer.cssFontFamily,m.div.style.fontSize="11px",m.div.style.backgroundColor="#eee",m.div.style.color="#000",m.div.style.border="1px solid #d0d0d0",m.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(m.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(m.div,85));if(null!=n)n.parentNode.removeChild(n),n=null;else{n=m.div;n.style.position="absolute";mxEvent.addListener(n,"mouseleave",function(){null!=n&&(n.parentNode.removeChild(n),n=null)});
-aa=Z.getBoundingClientRect();var oa=mxUtils.getDocumentScrollOrigin(document);n.style.left=oa.x+aa.left-1+"px";n.style.top=oa.y+aa.bottom-2+"px";document.body.appendChild(n);m.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");c.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Z.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=n&&0==this.graph.getAllTags().length&&(n.parentNode.removeChild(n),n=null)}));Z.style.display=0<this.graph.getAllTags().length?"inline-flex":
-"none"}}else"lightbox"==H?this.lightboxEnabled&&P(mxUtils.bind(this,function(){try{this.showLightbox()}catch(aa){alert(aa.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(H=this.graphConfig["toolbar-buttons"][H],null!=H&&(H.elem=P(null==H.enabled||H.enabled?H.handler:function(){},H.image,H.title,H.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*D);null!=this.graphConfig.title&&(l=
-b.ownerDocument.createElement("div"),l.style.display="inline-flex",l.style.position="relative",l.style.alignItems="center",l.style.padding="6px",l.style.fontFamily=GraphViewer.cssFontFamily,l.style.fontSize="12px",l.style.cursor="default",l.style.color="light-dark(#000000, #ffffff)",l.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),f.appendChild(l),this.filename=l);this.minToolbarWidth=34*D;var ha=b.style.border,
-ca=mxUtils.bind(this,function(){f.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";f.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var aa=b.getBoundingClientRect(),oa=mxUtils.getScrollOrigin(document.body);oa="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-oa.x,top:-oa.y};aa={left:aa.left-oa.left,top:aa.top-oa.top,bottom:aa.bottom-oa.top,right:aa.right-oa.left};f.style.left=
-aa.left+"px";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=aa.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=aa.top+1+"px"):f.style.top=aa.top+"px";"1px solid transparent"==ha&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(f);var da=mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f);null!=n&&(n.parentNode.removeChild(n),n=null);null!=g&&(g.parentNode.removeChild(g),g=null);
-b.style.border=ha});mxEvent.addListener(document,"mousemove",function(ka){for(ka=mxEvent.getSource(ka);null!=ka;){if(ka==b||ka==f||ka==g||ka==n)return;ka=ka.parentNode}da()});mxEvent.addListener(document.body,"mouseleave",function(ka){da()})}else f.style.top=-this.toolbarHeight+"px",b.appendChild(f)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ca):ca();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=f.parentNode&&ca()})).observe(b)};
-GraphViewer.prototype.createToolbarButton=function(b,f,l,u){var y=document.createElement("div");y.style.borderRight="1px solid #d0d0d0";y.style.display="inline-flex";y.style.alignItems="center";y.style.padding="6px";mxEvent.addListener(y,"click",b);null!=l&&y.setAttribute("title",l);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",f);b.style.width="18px";b.className="geAdaptiveAsset";null==u||u?(mxEvent.addListener(y,"mouseenter",function(){y.style.backgroundColor=
+this.toolbarZIndex;f.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";f.style.height=this.toolbarHeight+"px";var m=mxUtils.bind(this,function(){this.isDarkMode()?(f.classList.add("geDarkMode"),f.style.colorScheme="dark"):(f.classList.remove("geDarkMode"),f.style.colorScheme="light")});this.addListener("darkModeChanged",m);this.toolbar=f;m();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");
+mxUtils.setOpacity(f,30);var t=null,y=null,q=mxUtils.bind(this,function(ba){null!=t&&(window.clearTimeout(t),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);t=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,0);t=null;y=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";y=null}),100)}),ba||200)}),B=mxUtils.bind(this,function(ba){null!=t&&(window.clearTimeout(t),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);f.style.display=
+"flex";mxUtils.setOpacity(f,ba||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||(B(30),q())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":"mousemove",function(ba){mxEvent.consume(ba)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(ba){B(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(ba){B(100);mxEvent.consume(ba)}));mxEvent.addListener(f,"mouseleave",
+mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||B(30)}));var I=this.graph,S=I.getTolerance();I.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ba,na){this.startX=na.getGraphX();this.startY=na.getGraphY();this.scrollLeft=I.container.scrollLeft;this.scrollTop=I.container.scrollTop},mouseMove:function(ba,na){},mouseUp:function(ba,na){mxEvent.isTouchEvent(na.getEvent())&&Math.abs(this.scrollLeft-I.container.scrollLeft)<S&&Math.abs(this.scrollTop-I.container.scrollTop)<
+S&&Math.abs(this.startX-na.getGraphX())<S&&Math.abs(this.startY-na.getGraphY())<S&&(0<parseFloat(f.style.opacity||0)?q():B(30))}})}m=this.toolbarItems;for(var D=0,P=mxUtils.bind(this,function(ba,na,ca,ka){ba=this.createToolbarButton(ba,na,ca,ka);f.appendChild(ba);D++;return ba}),c=this.graph.getModel(),g=null,l=null,n=null,x=null,F=0;F<m.length;F++){var G=m[F];if("pages"==G){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";
+x.style.padding="4px";x.style.fontFamily=GraphViewer.cssFontFamily;x.style.fontSize="12px";x.style.cursor="default";x.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(x,70);var L=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.chevronLeftImage,mxResources.get("previousPage")||"Previous Page");L.style.borderRightStyle="none";L.style.paddingLeft="0px";L.style.paddingRight="0px";f.appendChild(x);var M=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.chevronRightImage,mxResources.get("nextPage")||"Next Page");M.style.paddingLeft="0px";M.style.paddingRight="0px";G=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,this.currentPage+1+" / "+this.diagrams.length);x.style.display=1<this.diagrams.length?"inline-flex":"none";L.style.display=x.style.display;M.style.display=x.style.display});this.addListener("graphChanged",G);G()}else if("zoom"==G)this.zoomEnabled&&(P(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),P(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),P(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==G){if(this.layersEnabled){var K=P(mxUtils.bind(this,function(ba){if(null!=g)g.parentNode.removeChild(g),
+g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ca=this.graph.getGraphBounds(),ka=this.graph.view;0>ca.x||0>ca.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ka.translate.clone(),scale:ka.scale}):null!=this.graph.originalViewState&&0<ca.x/ka.scale+this.graph.originalViewState.translate.x-ka.translate.x&&0<ca.y/ka.scale+this.graph.originalViewState.translate.y-
+ka.translate.y&&(ka.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ka.translate.clone(),scale:ka.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});ba=K.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=GraphViewer.cssFontFamily;
+g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;g.style.color="#000";mxUtils.setOpacity(g,85);var na=mxUtils.getDocumentScrollOrigin(document);g.style.left=na.x+ba.left-1+"px";g.style.top=na.y+ba.bottom-2+"px";this.isDarkMode()&&(g.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");c.addListener(mxEvent.CHANGE,
+function(){K.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"});K.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"}}else if("tags"==G){if(this.tagsEnabled){var Z=P(mxUtils.bind(this,function(ba){null==l&&(l=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),l.div.getElementsByTagName("div")[0].style.position="",l.div.style.maxHeight="160px",l.div.style.maxWidth="120px",l.div.style.padding="2px",l.div.style.overflow="auto",l.div.style.height="auto",l.div.style.position=
+"fixed",l.div.style.fontFamily=GraphViewer.cssFontFamily,l.div.style.fontSize="11px",l.div.style.backgroundColor="#eee",l.div.style.color="#000",l.div.style.border="1px solid #d0d0d0",l.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(l.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(l.div,85));if(null!=n)n.parentNode.removeChild(n),n=null;else{n=l.div;n.style.position="absolute";mxEvent.addListener(n,"mouseleave",function(){null!=n&&(n.parentNode.removeChild(n),n=null)});
+ba=Z.getBoundingClientRect();var na=mxUtils.getDocumentScrollOrigin(document);n.style.left=na.x+ba.left-1+"px";n.style.top=na.y+ba.bottom-2+"px";document.body.appendChild(n);l.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");c.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Z.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=n&&0==this.graph.getAllTags().length&&(n.parentNode.removeChild(n),n=null)}));Z.style.display=0<this.graph.getAllTags().length?"inline-flex":
+"none"}}else"lightbox"==G?this.lightboxEnabled&&P(mxUtils.bind(this,function(){try{this.showLightbox()}catch(ba){alert(ba.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(G=this.graphConfig["toolbar-buttons"][G],null!=G&&(G.elem=P(null==G.enabled||G.enabled?G.handler:function(){},G.image,G.title,G.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*D);null!=this.graphConfig.title&&(m=
+b.ownerDocument.createElement("div"),m.style.display="inline-flex",m.style.position="relative",m.style.alignItems="center",m.style.padding="6px",m.style.fontFamily=GraphViewer.cssFontFamily,m.style.fontSize="12px",m.style.cursor="default",m.style.color="light-dark(#000000, #ffffff)",m.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(m,this.graphConfig.title),mxUtils.setOpacity(m,70),f.appendChild(m),this.filename=m);this.minToolbarWidth=34*D;var ja=b.style.border,
+da=mxUtils.bind(this,function(){f.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";f.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ba=b.getBoundingClientRect(),na=mxUtils.getScrollOrigin(document.body);na="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-na.x,top:-na.y};ba={left:ba.left-na.left,top:ba.top-na.top,bottom:ba.bottom-na.top,right:ba.right-na.left};f.style.left=
+ba.left+"px";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=ba.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=ba.top+1+"px"):f.style.top=ba.top+"px";"1px solid transparent"==ja&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(f);var ca=mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f);null!=n&&(n.parentNode.removeChild(n),n=null);null!=g&&(g.parentNode.removeChild(g),g=null);
+b.style.border=ja});mxEvent.addListener(document,"mousemove",function(ka){for(ka=mxEvent.getSource(ka);null!=ka;){if(ka==b||ka==f||ka==g||ka==n)return;ka=ka.parentNode}ca()});mxEvent.addListener(document.body,"mouseleave",function(ka){ca()})}else f.style.top=-this.toolbarHeight+"px",b.appendChild(f)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",da):da();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=f.parentNode&&da()})).observe(b)};
+GraphViewer.prototype.createToolbarButton=function(b,f,m,t){var y=document.createElement("div");y.style.borderRight="1px solid #d0d0d0";y.style.display="inline-flex";y.style.alignItems="center";y.style.padding="6px";mxEvent.addListener(y,"click",b);null!=m&&y.setAttribute("title",m);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",f);b.style.width="18px";b.className="geAdaptiveAsset";null==t||t?(mxEvent.addListener(y,"mouseenter",function(){y.style.backgroundColor=
"light-dark(#dddddd,#333333)"}),mxEvent.addListener(y,"mouseleave",function(){y.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),y.style.cursor="pointer"):mxUtils.setOpacity(y,30);y.appendChild(b);return y};
-GraphViewer.prototype.disableButton=function(b,f){var l=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=l&&(mxUtils.setOpacity(l.elem,30),mxEvent.removeListener(l.elem,"click",l.handler),mxEvent.addListener(l.elem,"mouseenter",function(){l.elem.style.backgroundColor="#eee"}),f&&l.elem.setAttribute("title",f))};
-GraphViewer.prototype.addClickHandler=function(b,f){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(l,u,y){if(null==u)for(var q=mxEvent.getSource(l);q!=b.container&&null!=q&&null==u;)"a"==q.nodeName.toLowerCase()&&(u=q.getAttribute("href")),q=q.parentNode;null!=f?null==u||b.isCustomLink(u)?mxEvent.consume(l):b.isExternalProtocol(u)||b.isBlankLink(u)||window.setTimeout(function(){f.destroy()},0):null!=u&&null==f&&b.isCustomLink(u)&&
-(mxEvent.isTouchEvent(l)||!mxEvent.isPopupTrigger(l))&&b.customLinkClicked(u,y)&&(mxUtils.clearSelection(),mxEvent.consume(l))}),mxUtils.bind(this,function(l){if(null==f&&this.lightboxClickEnabled&&(!mxEvent.isTouchEvent(l)||0==this.toolbarItems.length))try{this.showLightbox()}catch(u){alert(u.message)}}))};
-GraphViewer.prototype.showLightbox=function(b,f,l){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;l={client:1,target:null!=l?l:"blank"};b&&(l.edit=this.graphConfig.edit||"_blank");if(null!=f?f:1)l.close=1;this.layersEnabled&&(l.layers=1);this.tagsEnabled&&(l.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(l.nav=1);null!=this.graphConfig&&null!=
-this.graphConfig.highlight&&(l.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(l.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(u){"ready"==u.data&&u.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):l.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(l.dev=
-"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(l)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
-GraphViewer.prototype.showLocalLightbox=function(b){var f=document.createElement("div");f.style.position="fixed";f.style.top="0";f.style.left="0";f.style.bottom="0";f.style.right="0";f.style.zIndex=this.lightboxZIndex;f.style.backgroundColor="#000000";mxUtils.setOpacity(f,70);document.body.appendChild(f);var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("src",Editor.closeBlackImage);l.style.position="fixed";l.style.top="32px";l.style.right="32px";l.style.cursor="pointer";
-l.className="geAdaptiveAsset";var u=mxUtils.bind(this,function(){q.setDarkMode(this.isDarkMode())});mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",u);q.destroy()}));urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=
-this.layersEnabled?"1":"0";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var y=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));y.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(y))}catch(m){}if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};
-EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var q=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",u);q.editor.editBlankUrl=this.editBlankUrl;q.refresh=function(){};var C=mxUtils.bind(this,function(m){27==m.keyCode&&q.destroy()}),J=this.initialOverflow,S=q.destroy;q.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",C),document.body.removeChild(f),
-document.body.removeChild(l),document.body.style.overflow=J,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var D=q.editor.graph,P=D.container;P.style.overflow="hidden";P.style.inset="0";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",C)):(f.style.display="none",l.style.display="none");var c=this;D.getImageFromBundles=function(m){return c.getImageUrl(m)};var g=q.createTemporaryGraph;q.createTemporaryGraph=
-function(){var m=g.apply(this,arguments);m.getImageFromBundles=function(n){return c.getImageUrl(n)};return m};this.graphConfig.move&&(D.isMoveCellsEvent=function(m){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(D,q);window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(f,"click",function(){q.destroy()}),P.style.outline="none",P.style.zIndex=this.lightboxZIndex,
-l.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(P)):(document.body.appendChild(P),document.body.appendChild(l)),q.setFileData(this.xml),mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)"),q.chromelessToolbar.style.bottom="60px",q.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(q.chromelessToolbar),q.getEditBlankXml=mxUtils.bind(this,function(){return this.xml}),this.showLayers(D,this.graph),q.lightboxFit(),q.chromelessResize()}catch(m){q.handleError(m,
+GraphViewer.prototype.disableButton=function(b,f){var m=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=m&&(mxUtils.setOpacity(m.elem,30),mxEvent.removeListener(m.elem,"click",m.handler),mxEvent.addListener(m.elem,"mouseenter",function(){m.elem.style.backgroundColor="#eee"}),f&&m.elem.setAttribute("title",f))};
+GraphViewer.prototype.addClickHandler=function(b,f){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(m,t,y){if(null==t)for(var q=mxEvent.getSource(m);q!=b.container&&null!=q&&null==t;)"a"==q.nodeName.toLowerCase()&&(t=q.getAttribute("href")),q=q.parentNode;null!=f?null==t||b.isCustomLink(t)?mxEvent.consume(m):b.isExternalProtocol(t)||b.isBlankLink(t)||window.setTimeout(function(){f.destroy()},0):null!=t&&null==f&&b.isCustomLink(t)&&
+(mxEvent.isTouchEvent(m)||!mxEvent.isPopupTrigger(m))&&b.customLinkClicked(t,y)&&(mxUtils.clearSelection(),mxEvent.consume(m))}),mxUtils.bind(this,function(m){if(null==f&&this.lightboxClickEnabled&&(!mxEvent.isTouchEvent(m)||0==this.toolbarItems.length))try{this.showLightbox()}catch(t){alert(t.message)}}))};
+GraphViewer.prototype.showLightbox=function(b,f,m){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;m={client:1,target:null!=m?m:"blank"};b&&(m.edit=this.graphConfig.edit||"_blank");if(null!=f?f:1)m.close=1;this.layersEnabled&&(m.layers=1);this.tagsEnabled&&(m.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(m.nav=1);null!=this.graphConfig&&null!=
+this.graphConfig.highlight&&(m.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(m.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(t){"ready"==t.data&&t.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):m.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(m.dev=
+"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(m)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
+GraphViewer.prototype.showLocalLightbox=function(b){var f=document.createElement("div");f.style.position="fixed";f.style.top="0";f.style.left="0";f.style.bottom="0";f.style.right="0";f.style.zIndex=this.lightboxZIndex;f.style.backgroundColor="#000000";mxUtils.setOpacity(f,70);document.body.appendChild(f);var m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("src",Editor.closeBlackImage);m.style.position="fixed";m.style.top="32px";m.style.right="32px";m.style.cursor="pointer";
+m.className="geAdaptiveAsset";var t=mxUtils.bind(this,function(){q.setDarkMode(this.isDarkMode())});mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",t);q.destroy()}));urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=
+this.layersEnabled?"1":"0";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var y=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));y.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(y))}catch(l){}if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};
+EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var q=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",t);q.editor.editBlankUrl=this.editBlankUrl;q.refresh=function(){};var B=mxUtils.bind(this,function(l){27==l.keyCode&&q.destroy()}),I=this.initialOverflow,S=q.destroy;q.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",B),document.body.removeChild(f),
+document.body.removeChild(m),document.body.style.overflow=I,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var D=q.editor.graph,P=D.container;P.style.overflow="hidden";P.style.inset="0";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",B)):(f.style.display="none",m.style.display="none");var c=this;D.getImageFromBundles=function(l){return c.getImageUrl(l)};var g=q.createTemporaryGraph;q.createTemporaryGraph=
+function(){var l=g.apply(this,arguments);l.getImageFromBundles=function(n){return c.getImageUrl(n)};return l};this.graphConfig.move&&(D.isMoveCellsEvent=function(l){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(D,q);window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(f,"click",function(){q.destroy()}),P.style.outline="none",P.style.zIndex=this.lightboxZIndex,
+m.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(P)):(document.body.appendChild(P),document.body.appendChild(m)),q.setFileData(this.xml),mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)"),q.chromelessToolbar.style.bottom="60px",q.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(q.chromelessToolbar),q.getEditBlankXml=mxUtils.bind(this,function(){return this.xml}),this.showLayers(D,this.graph),q.lightboxFit(),q.chromelessResize()}catch(l){q.handleError(l,
null,function(){q.destroy()})}}),0);return q};Dialog.prototype.getDocumentSize=function(){return new mxRectangle(0,0,Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0))};
GraphViewer.prototype.updateTitle=function(b,f){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",f||b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",f||b))};
-GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(f){try{f.innerText="",GraphViewer.createViewerForElement(f)}catch(l){f.innerText=l.message,null!=window.console&&console.error(l)}})};
-GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var f=document.getElementsByClassName(b);b=[];for(var l=0;l<f.length;l++)b.push(f[l]);return b}var u=document.getElementsByTagName("*");f=[];for(l=0;l<u.length;l++){var y=u[l].className;null!=y&&0<y.length&&(y=y.split(" "),0<=mxUtils.indexOf(y,b)&&f.push(u[l]))}return f};
-GraphViewer.createViewerForElement=function(b,f){var l=b.getAttribute("data-mxgraph");if(null!=l){var u=JSON.parse(l),y=function(q){q=mxUtils.parseXml(q);q=new GraphViewer(b,q.documentElement,u);null!=f&&f(q)};null!=u.url?GraphViewer.getUrl(u.url,function(q){y(q)}):y(u.xml)}};
-GraphViewer.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));for(var f="",l=0;l<window.location.ancestorOrigins.length;l++)if(f+=" -> "+window.location.ancestorOrigins[l],f.endsWith("dan6v7pm1f1a1.cloudfront.net")||f.endsWith("confluence-cloud-excalidraw-ll3likebca-uc.a.run.app"))return!0;
-(b.endsWith("ac.draw.io")||b.endsWith("aj.draw.io"))&&1==window.location.ancestorOrigins.length&&window.location.ancestorOrigins[0]&&window.location.ancestorOrigins[0].endsWith(".atlassian.net")}}catch(u){}return!1};GraphViewer.darkBackgroundColor=Editor.darkColor;GraphViewer.cssFontFamily=Editor.defaultHtmlFont;GraphViewer.shapeBackgroundColor=null;GraphViewer.viewerInitialized=function(b){};
+GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(f){try{f.innerText="",GraphViewer.createViewerForElement(f)}catch(m){f.innerText=m.message,null!=window.console&&console.error(m)}})};
+GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var f=document.getElementsByClassName(b);b=[];for(var m=0;m<f.length;m++)b.push(f[m]);return b}var t=document.getElementsByTagName("*");f=[];for(m=0;m<t.length;m++){var y=t[m].className;null!=y&&0<y.length&&(y=y.split(" "),0<=mxUtils.indexOf(y,b)&&f.push(t[m]))}return f};
+GraphViewer.createViewerForElement=function(b,f){var m=b.getAttribute("data-mxgraph");if(null!=m){var t=JSON.parse(m),y=function(q){q=mxUtils.parseXml(q);q=new GraphViewer(b,q.documentElement,t);null!=f&&f(q)};null!=t.url?GraphViewer.getUrl(t.url,function(q){y(q)}):y(t.xml)}};
+GraphViewer.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));for(var f="",m=0;m<window.location.ancestorOrigins.length;m++)if(f+=" -> "+window.location.ancestorOrigins[m],f.endsWith("dan6v7pm1f1a1.cloudfront.net")||f.endsWith("confluence-cloud-excalidraw-ll3likebca-uc.a.run.app"))return!0;
+(b.endsWith("ac.draw.io")||b.endsWith("aj.draw.io"))&&1==window.location.ancestorOrigins.length&&window.location.ancestorOrigins[0]&&window.location.ancestorOrigins[0].endsWith(".atlassian.net")}}catch(t){}return!1};GraphViewer.darkBackgroundColor=Editor.darkColor;GraphViewer.cssFontFamily=Editor.defaultHtmlFont;GraphViewer.shapeBackgroundColor=null;GraphViewer.viewerInitialized=function(b){};
GraphViewer.initCss=function(){try{null==GraphViewer.styleElement&&(GraphViewer.styleElement=document.createElement("style"),GraphViewer.styleElement.setAttribute("type","text/css"),GraphViewer.styleElement.innerHTML=GraphViewer.getCss(),GraphViewer.blockedAncestorFrames()||document.getElementsByTagName("head")[0].appendChild(GraphViewer.styleElement))}catch(b){}};
GraphViewer.getCss=function(){return[".geDarkMode img {\n filter: invert(1);\n}\ndiv.mxTooltip {\n box-shadow: 3px 3px 12px light-dark(#c0c0c0, transparent);"," background: light-dark(#ffffcc, "+GraphViewer.darkBackgroundColor+");"," border-style: solid;\n border-width: 1px;\n border-color: black;"," font-family: "+GraphViewer.cssFontFamily+";"," font-size: 8pt;\n position: absolute;\n cursor: default;\n padding: 4px;\n color: black;\n}\ntd.mxPopupMenuIcon div {\n width: 16px;\n height: 16px;\n}\ndiv.mxPopupMenu {\n box-shadow: 2px 2px 3px light-dark(#d5d5d5, transparent);\n background: white;\n position: absolute;\n border: 3px solid #e7e7e7;\n padding: 3px;\n}\ntable.mxPopupMenu {\n border-collapse: collapse;\n margin: 0px;\n}\ntd.mxPopupMenuItem {\n padding: 7px 30px;",
" font-family: "+GraphViewer.cssFontFamily+";"," font-size: 10pt;\n}\ntd.mxPopupMenuIcon {"," background-color: light-dark(#ffffff, "+GraphViewer.darkBackgroundColor+");"," padding: 0px;\n}\ntr.mxPopupMenuItemHover {\n background-color: #eeeeee;\n color: black;\n}\ntable.mxPopupMenu hr {\n color: #cccccc;\n background-color: #cccccc;\n border: none;\n height: 1px;\n}\ntable.mxPopupMenu tr {\n font-size: 4pt;\n}\n.geDialog, .geDialog table {"," font-family: "+GraphViewer.cssFontFamily+
";"," font-size: 10pt;\n border: none;\n margin: 0px;\n}\n.geDialog {\n position: fixed;"," background: light-dark(#ffffff, "+GraphViewer.darkBackgroundColor+");","\t color: light-dark(#3f3f3f, #c0c0c0);\n box-shadow: 0px 0px 2px 2px light-dark(#d5d5d5, transparent);\n border: 1px solid light-dark(#dadada, #565656);\n overflow: hidden;\n padding: 30px;\n left: 50%;\n top: 50%;\n max-height: 100%;\n max-width: 100%;\n\t box-sizing: border-box;\n transform: translate(-50%, -50%);",
"\t z-index: "+(GraphViewer.prototype.lightboxZIndex+2)+";","}\n.geBackground {"," background-color: light-dark(#ffffff, "+GraphViewer.darkBackgroundColor+");","\t position: fixed;\n left: 0px;\n top: 0px;\n right: 0px;\n bottom: 0px;\n opacity: 0.9;","\t z-index: "+(GraphViewer.prototype.lightboxZIndex+1)+";","}\n.geDialogTitle {\n box-sizing: border-box;\n white-space: nowrap;"," background: light-dark(#f1f3f4, "+GraphViewer.darkBackgroundColor+");"," border-bottom: 1px solid rgb(192, 192, 192);\n font-size: 15px;\n font-weight: bold;\n text-align: center;\n color: rgb(35, 86, 149);\n}\n.geDialogFooter {",
" background: light-dark(#f1f3f4, "+GraphViewer.darkBackgroundColor+");"," white-space: nowrap;\n text-align: right;\n box-sizing: border-box;\n border-top: 1px solid #e5e5e5;\n color: darkGray;\n}\n.geHelpIcon {\n width: 16px;\n margin: 0 4px;\n vertical-align: text-bottom;\n}\n.geBtn, .mxWindow .geBtn {\n background-color: light-dark(#eeeeee, #1b1d1e);\n border: 1px solid light-dark(#d8d8d8, #333333);\n color: light-dark(#3f3f3f, #c0c0c0);\n font-size: 13px;\n font-weight: 500;\n border-radius: 4px;\n height: 30px;\n margin: 0 0 0 8px;\n min-width: 72px;\n outline: 0;\n padding: 0 8px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n.geBtn:hover:not(.gePrimaryBtn), .geBtn:focus {\n border: 1px solid light-dark(#c6c6c6, #333333);\n background: light-dark(#dadada, #333333);\n}\n.geBtn:disabled {\n opacity: .5;\n}\n.gePrimaryBtn {\n background: linear-gradient(light-dark(#4d90fe, #003555) 0px, light-dark(#4787ed, #003555) 100%);\n border: 1px solid light-dark(#3079ed, transparent);\n color: light-dark(#ffffff, #c0c0c0);\n}\n.gePrimaryBtn:hover:not([disabled]) {\n background: linear-gradient(light-dark(#4d90fe, #004a77) 0px, light-dark(#357ae8, #004a77) 100%);\n border: 1px solid light-dark(#2f5bb7, transparent);\n}\n.geBtn:disabled {\n opacity: .5;\n}"].join("\n")};
-GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,f,l){if(null!=GraphViewer.cachedUrls[b])f(GraphViewer.cachedUrls[b]);else{var u=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;u.open("GET",b);u.onload=function(){f(null!=u.getText?u.getText():u.responseText)};u.onerror=l;u.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;
-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(l){return window.setTimeout(l,20)},f=function(l,u){function y(){this.q=[];this.add=function(x){this.q.push(x)};var m,n;this.call=function(){m=0;for(n=this.q.length;m<n;m++)this.q[m].call()}}function q(m,n){return m.currentStyle?m.currentStyle[n]:window.getComputedStyle?window.getComputedStyle(m,null).getPropertyValue(n):m.style[n]}function C(m,n){if(!m.resizedAttached)m.resizedAttached=
-new y,m.resizedAttached.add(n);else if(m.resizedAttached){m.resizedAttached.add(n);return}m.resizeSensor=document.createElement("div");m.resizeSensor.className="resize-sensor";m.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";m.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-m.appendChild(m.resizeSensor);"static"==q(m,"position")&&(m.style.position="relative");var x=m.resizeSensor.childNodes[0],F=x.childNodes[0],H=m.resizeSensor.childNodes[1],M=function(){F.style.width="100000px";F.style.height="100000px";x.scrollLeft=1E5;x.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};M();var L=!1,K=function(){m.resizedAttached&&(L&&(m.resizedAttached.call(),L=!1),b(K))};b(K);var Z,ha,ca,aa;n=function(){if((ca=m.offsetWidth)!=Z||(aa=m.offsetHeight)!=ha)L=!0,Z=ca,ha=aa;M()};var oa=
-function(da,ka,ba){da.attachEvent?da.attachEvent("on"+ka,ba):da.addEventListener(ka,ba)};oa(x,"scroll",n);oa(H,"scroll",n)}var J=function(){GraphViewer.resizeSensorEnabled&&u()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,D=!1;(new ResizeObserver(function(){D||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){D=!0;J();S=null;D=!1},200))})).observe(l)}else{var P=Object.prototype.toString.call(l),c="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===
-P||"undefined"!==typeof jQuery&&l instanceof jQuery||"undefined"!==typeof Elements&&l instanceof Elements;if(c){P=0;for(var g=l.length;P<g;P++)C(l[P],J)}else C(l,J);this.detach=function(){if(c)for(var m=0,n=l.length;m<n;m++)f.detach(l[m]);else f.detach(l)}}};f.detach=function(l){l.resizeSensor&&(l.removeChild(l.resizeSensor),delete l.resizeSensor,delete l.resizedAttached)};window.ResizeSensor=f})();
+GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,f,m){if(null!=GraphViewer.cachedUrls[b])f(GraphViewer.cachedUrls[b]);else{var t=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;t.open("GET",b);t.onload=function(){f(null!=t.getText?t.getText():t.responseText)};t.onerror=m;t.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;
+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(m){return window.setTimeout(m,20)},f=function(m,t){function y(){this.q=[];this.add=function(x){this.q.push(x)};var l,n;this.call=function(){l=0;for(n=this.q.length;l<n;l++)this.q[l].call()}}function q(l,n){return l.currentStyle?l.currentStyle[n]:window.getComputedStyle?window.getComputedStyle(l,null).getPropertyValue(n):l.style[n]}function B(l,n){if(!l.resizedAttached)l.resizedAttached=
+new y,l.resizedAttached.add(n);else if(l.resizedAttached){l.resizedAttached.add(n);return}l.resizeSensor=document.createElement("div");l.resizeSensor.className="resize-sensor";l.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";l.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
+l.appendChild(l.resizeSensor);"static"==q(l,"position")&&(l.style.position="relative");var x=l.resizeSensor.childNodes[0],F=x.childNodes[0],G=l.resizeSensor.childNodes[1],L=function(){F.style.width="100000px";F.style.height="100000px";x.scrollLeft=1E5;x.scrollTop=1E5;G.scrollLeft=1E5;G.scrollTop=1E5};L();var M=!1,K=function(){l.resizedAttached&&(M&&(l.resizedAttached.call(),M=!1),b(K))};b(K);var Z,ja,da,ba;n=function(){if((da=l.offsetWidth)!=Z||(ba=l.offsetHeight)!=ja)M=!0,Z=da,ja=ba;L()};var na=
+function(ca,ka,aa){ca.attachEvent?ca.attachEvent("on"+ka,aa):ca.addEventListener(ka,aa)};na(x,"scroll",n);na(G,"scroll",n)}var I=function(){GraphViewer.resizeSensorEnabled&&t()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,D=!1;(new ResizeObserver(function(){D||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){D=!0;I();S=null;D=!1},200))})).observe(m)}else{var P=Object.prototype.toString.call(m),c="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===
+P||"undefined"!==typeof jQuery&&m instanceof jQuery||"undefined"!==typeof Elements&&m instanceof Elements;if(c){P=0;for(var g=m.length;P<g;P++)B(m[P],I)}else B(m,I);this.detach=function(){if(c)for(var l=0,n=m.length;l<n;l++)f.detach(m[l]);else f.detach(m)}}};f.detach=function(m){m.resizeSensor&&(m.removeChild(m.resizeSensor),delete m.resizeSensor,delete m.resizedAttached)};window.ResizeSensor=f})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
{val:"parallelMultiple",dispName:"Parallel Multiple"},{val:"terminate",dispName:"Terminate"},{val:"exclusiveGw",dispName:"Exclusive Gw"},{val:"parallelGw",dispName:"Parallel Gw"},{val:"complexGw",dispName:"Complex Gw"}]},{name:"outline",dispName:"Event Type",type:"enum",defVal:"standard",enumList:[{val:"standard",dispName:"Standard"},{val:"eventInt",dispName:"Interrupting"},{val:"eventNonint",dispName:"Non-Interrupting"},{val:"catching",dispName:"Catching"},{val:"boundInt",dispName:"Bound Interrupting"},
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 6008706f3..95249490c 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -30,7 +30,7 @@ b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlPa
"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);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"29.0.3",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.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"29.2.2",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:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -1859,7 +1859,8 @@ mxCodec.prototype.decodeCell=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&
mxCodec.prototype.insertIntoGraph=function(a){var b=a.parent,c=a.getTerminal(!0),d=a.getTerminal(!1);a.setTerminal(null,!1);a.setTerminal(null,!0);a.parent=null;if(null!=b){if(b==a)throw Error(b.id+": Self Reference");b.insert(a)}null!=c&&c.insertEdge(a,!0);null!=d&&d.insertEdge(a,!1)};mxCodec.prototype.setAttribute=function(a,b,c){null!=b&&null!=c&&a.setAttribute(b,c)};
function mxObjectCodec(a,b,c,d){this.template=a;this.exclude=null!=b?b:[];this.idrefs=null!=c?c:[];this.mapping=null!=d?d:[];this.reverse={};for(var e in this.mapping)this.reverse[this.mapping[e]]=e}mxObjectCodec.allowEval=!1;mxObjectCodec.prototype.template=null;mxObjectCodec.prototype.exclude=null;mxObjectCodec.prototype.idrefs=null;mxObjectCodec.prototype.mapping=null;mxObjectCodec.prototype.reverse=null;mxObjectCodec.prototype.getName=function(){return mxUtils.getFunctionName(this.template.constructor)};
mxObjectCodec.prototype.cloneTemplate=function(){return new this.template.constructor};mxObjectCodec.prototype.getFieldName=function(a){if(null!=a){var b=this.reverse[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.getAttributeName=function(a){if(null!=a){var b=this.mapping[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.isExcluded=function(a,b,c,d){return b==mxObjectIdentity.FIELD_NAME||0<=mxUtils.indexOf(this.exclude,b)};
-mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));for(var d in b){var e=d,f=b[e];null==f||this.isExcluded(b,e,f,!0)||(mxUtils.isInteger(e)&&(e=null),this.encodeValue(a,b,e,f,c))}};
+mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};
+mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));var d=[],e;for(e in b){var f=e,g=b[f];null==g||this.isExcluded(b,f,g,!0)||(mxUtils.isInteger(f)?this.encodeValue(a,b,null,g,c):d.push({name:f,value:g}))}d.sort(function(k,l){return k.name<l.name?-1:k.name>l.name?1:0});for(e=0;e<d.length;e++)this.encodeValue(a,b,d[e].name,d[e].value,c)};
mxObjectCodec.prototype.encodeValue=function(a,b,c,d,e){if(null!=d){if(this.isReference(b,c,d,!0)){var f=a.getId(d);if(null==f){mxLog.warn("mxObjectCodec.encode: No ID for "+this.getName()+"."+c+"="+d);return}d=f}f=this.template[c];if(null==c||a.encodeDefaults||f!=d)c=this.getAttributeName(c),this.writeAttribute(a,b,c,d,e)}};mxObjectCodec.prototype.writeAttribute=function(a,b,c,d,e){"object"!=typeof d?this.writePrimitiveAttribute(a,b,c,d,e):this.writeComplexAttribute(a,b,c,d,e)};
mxObjectCodec.prototype.writePrimitiveAttribute=function(a,b,c,d,e){d=this.convertAttributeToXml(a,b,c,d,e);null==c?(b=a.document.createElement("add"),"function"==typeof d?b.appendChild(a.document.createTextNode(d)):a.setAttribute(b,"value",d),e.appendChild(b)):"function"!=typeof d&&a.setAttribute(e,c,d)};
mxObjectCodec.prototype.writeComplexAttribute=function(a,b,c,d,e){a=a.encode(d);null!=a?(null!=c&&a.setAttribute("as",c),e.appendChild(a)):mxLog.warn("mxObjectCodec.encode: No node for "+this.getName()+"."+c+": "+d)};mxObjectCodec.prototype.convertAttributeToXml=function(a,b,c,d){this.isBooleanAttribute(a,b,c,d)&&(d=1==d?"1":"0");return d};mxObjectCodec.prototype.isBooleanAttribute=function(a,b,c,d){return"undefined"==typeof d.length&&(1==d||0==d)};
@@ -1890,8 +1891,8 @@ var mxStylesheetCodec=mxCodecRegistry.register(function(){var a=new mxObjectCode
function(b,c){b=typeof c;"function"==b?c=mxStyleRegistry.getName(c):"object"==b&&(c=null);return c};a.decode=function(b,c,d){d=d||new this.template.constructor;var e=c.getAttribute("id");null!=e&&(b.objects[e]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(b,c,d)&&"add"==c.nodeName&&(e=c.getAttribute("as"),null!=e)){var f=c.getAttribute("extend"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+f+" not found to extend"),g={});
for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var k=f.getAttribute("as");if("add"==f.nodeName){var l=mxUtils.getTextContent(f);null!=l&&0<l.length&&mxStylesheetCodec.allowEval?l=mxUtils.eval(l):(l=f.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[k]=l)}else"remove"==f.nodeName&&delete g[k]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());mxStylesheetCodec.allowEval=!1;
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,f){b.raw=f;return b};$jscomp.arrayIteratorImpl=function(b){var f=0;return function(){return f<b.length?{done:!1,value:b[f++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return f?f.call(b):$jscomp.arrayIterator(b)};
-Editor=function(b,f,l,u,y){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=u||this.createGraph(f,l);this.editable=null!=y?y:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(q,C){this.status=q;this.statusFunction=C;this.fireEvent(new mxEventObject("statusChanged"))};
-this.getStatus=function(){return this.status};this.graphChangeListener=function(q,C){q=null!=C?C.getProperty("edit"):null;null!=q&&q.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;
+Editor=function(b,f,m,t,y){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=t||this.createGraph(f,m);this.editable=null!=y?y:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(q,B){this.status=q;this.statusFunction=B;this.fireEvent(new mxEventObject("statusChanged"))};
+this.getStatus=function(){return this.status};this.graphChangeListener=function(q,B){q=null!=B?B.getProperty("edit"):null;null!=q&&q.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;
Editor.pageCounter=0;(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(f){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.smallScreenWidth=1024;Editor.helpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDc4LTI0MHEyMSAwIDM1LjUtMTQuNVQ1MjgtMjkwcTAtMjEtMTQuNS0zNS41VDQ3OC0zNDBxLTIxIDAtMzUuNSAxNC41VDQyOC0yOTBxMCAyMSAxNC41IDM1LjVUNDc4LTI0MFptLTM2LTE1NGg3NHEwLTMzIDcuNS01MnQ0Mi41LTUycTI2LTI2IDQxLTQ5LjV0MTUtNTYuNXEwLTU2LTQxLTg2dC05Ny0zMHEtNTcgMC05Mi41IDMwVDM0Mi02MThsNjYgMjZxNS0xOCAyMi41LTM5dDUzLjUtMjFxMzIgMCA0OCAxNy41dDE2IDM4LjVxMCAyMC0xMiAzNy41VDUwNi01MjZxLTQ0IDM5LTU0IDU5dC0xMCA3M1ptMzggMzE0cS04MyAwLTE1Ni0zMS41VDE5Ny0xOTdxLTU0LTU0LTg1LjUtMTI3VDgwLTQ4MHEwLTgzIDMxLjUtMTU2VDE5Ny03NjNxNTQtNTQgMTI3LTg1LjVUNDgwLTg4MHE4MyAwIDE1NiAzMS41VDc2My03NjNxNTQgNTQgODUuNSAxMjdUODgwLTQ4MHEwIDgzLTMxLjUgMTU2VDc2My0xOTdxLTU0IDU0LTEyNyA4NS41VDQ4MC04MFptMC04MHExMzQgMCAyMjctOTN0OTMtMjI3cTAtMTM0LTkzLTIyN3QtMjI3LTkzcS0xMzQgMC0yMjcgOTN0LTkzIDIyN3EwIDEzNCA5MyAyMjd0MjI3IDkzWm0wLTMyMFoiLz48L3N2Zz4=";
Editor.menuImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTIwLTI0MHYtODBoNzIwdjgwSDEyMFptMC0yMDB2LTgwaDcyMHY4MEgxMjBabTAtMjAwdi04MGg3MjB2ODBIMTIwWiIvPjwvc3ZnPg==";Editor.moveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=";
@@ -1921,7 +1922,8 @@ Editor.expandMoreImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy
Editor.extensionImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTguOCAyMUg1cS0uODI1IDAtMS40MTMtLjU4N1EzIDE5LjgyNSAzIDE5di0zLjhxMS4yIDAgMi4xLS43NjIuOS0uNzYzLjktMS45MzggMC0xLjE3NS0uOS0xLjkzOFE0LjIgOS44IDMgOS44VjZxMC0uODI1LjU4Ny0xLjQxMlE0LjE3NSA0IDUgNGg0cTAtMS4wNS43MjUtMS43NzVRMTAuNDUgMS41IDExLjUgMS41cTEuMDUgMCAxLjc3NS43MjVRMTQgMi45NSAxNCA0aDRxLjgyNSAwIDEuNDEzLjU4OFEyMCA1LjE3NSAyMCA2djRxMS4wNSAwIDEuNzc1LjcyNS43MjUuNzI1LjcyNSAxLjc3NSAwIDEuMDUtLjcyNSAxLjc3NVEyMS4wNSAxNSAyMCAxNXY0cTAgLjgyNS0uNTg3IDEuNDEzUTE4LjgyNSAyMSAxOCAyMWgtMy44cTAtMS4yNS0uNzg3LTIuMTI1UTEyLjYyNSAxOCAxMS41IDE4dC0xLjkxMi44NzVROC44IDE5Ljc1IDguOCAyMVpNNSAxOWgyLjEyNXEuNi0xLjY1IDEuOTI1LTIuMzI1UTEwLjM3NSAxNiAxMS41IDE2cTEuMTI1IDAgMi40NS42NzUgMS4zMjUuNjc1IDEuOTI1IDIuMzI1SDE4di02aDJxLjIgMCAuMzUtLjE1LjE1LS4xNS4xNS0uMzUgMC0uMi0uMTUtLjM1UTIwLjIgMTIgMjAgMTJoLTJWNmgtNlY0cTAtLjItLjE1LS4zNS0uMTUtLjE1LS4zNS0uMTUtLjIgMC0uMzUuMTVRMTEgMy44IDExIDR2Mkg1djIuMnExLjM1LjUgMi4xNzUgMS42NzVROCAxMS4wNSA4IDEyLjVxMCAxLjQyNS0uODI1IDIuNlQ1IDE2LjhabTcuNzUtNy43NVoiLz48L3N2Zz4=";
Editor.colorDropperImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTYgNDJ2LTguNGwxOC44NS0xOC44NS0zLjYtMy42TDIzLjMgOS4xbDQuNiA0LjZMMzUgNi42cS41NS0uNTUgMS4xNzUtLjU1dDEuMTc1LjU1bDQuMDUgNC4wNXEuNTUuNTUuNTUgMS4xNzVUNDEuNCAxM2wtNy4xIDcuMSA0LjYgNC42LTIuMDUgMi4wNS0zLjYtMy42TDE0LjQgNDJabTMtM2g0LjM1TDMxLjEgMjEuMjVsLTQuMzUtNC4zNUw5IDM0LjY1Wm0yMy4xNS0yMSA2LjItNi4yLTIuMTUtMi4xNS02LjIgNi4yWm0wIDBMMzAgMTUuODUgMzIuMTUgMThaIi8+PC9zdmc+";
Editor.magnifyImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik03ODQtMTIwIDUzMi0zNzJxLTMwIDI0LTY5IDM4dC04MyAxNHEtMTA5IDAtMTg0LjUtNzUuNVQxMjAtNTgwcTAtMTA5IDc1LjUtMTg0LjVUMzgwLTg0MHExMDkgMCAxODQuNSA3NS41VDY0MC01ODBxMCA0NC0xNCA4M3QtMzggNjlsMjUyIDI1Mi01NiA1NlpNMzgwLTQwMHE3NSAwIDEyNy41LTUyLjVUNTYwLTU4MHEwLTc1LTUyLjUtMTI3LjVUMzgwLTc2MHEtNzUgMC0xMjcuNSA1Mi41VDIwMC01ODBxMCA3NSA1Mi41IDEyNy41VDM4MC00MDBaIi8+PC9zdmc+";
-Editor.sendImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik0xMjAtMTYwdi02NDBsNzYwIDMyMC03NjAgMzIwWm04MC0xMjAgNDc0LTIwMC00NzQtMjAwdjE0MGwyNDAgNjAtMjQwIDYwdjE0MFptMCAwdi00MDAgNDAwWiIvPjwvc3ZnPg==";Editor.sparklesImage="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KDTwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIFRyYW5zZm9ybWVkIGJ5OiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4KPHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBpZD0iaWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgZmlsbD0iI2ZjZmY0NyIgZGF0YS1kYXJrcmVhZGVyLWlubGluZS1maWxsPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6ICNkNmQ4NTA7IC0tZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlOiAjZDZkODUwOyIgc3Ryb2tlPSIjZmNmZjQ3IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIj4KDTxnIGlkPSJTVkdSZXBvX2JnQ2FycmllciIgc3Ryb2tlLXdpZHRoPSIwIi8+Cg08ZyBpZD0iU1ZHUmVwb190cmFjZXJDYXJyaWVyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KDTxnIGlkPSJTVkdSZXBvX2ljb25DYXJyaWVyIj4KDTxwYXRoIGQ9Ik0yNTkuOTIsMjYyLjkxLDIxNi40LDE0OS43N2E5LDksMCwwLDAtMTYuOCwwTDE1Ni4wOCwyNjIuOTFhOSw5LDAsMCwxLTUuMTcsNS4xN0wzNy43NywzMTEuNmE5LDksMCwwLDAsMCwxNi44bDExMy4xNCw0My41MmE5LDksMCwwLDEsNS4xNyw1LjE3TDE5OS42LDQ5MC4yM2E5LDksMCwwLDAsMTYuOCwwbDQzLjUyLTExMy4xNGE5LDksMCwwLDEsNS4xNy01LjE3TDM3OC4yMywzMjguNGE5LDksMCwwLDAsMC0xNi44TDI2NS4wOSwyNjguMDhBOSw5LDAsMCwxLDI1OS45MiwyNjIuOTFaIiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KDTxwb2x5Z29uIHBvaW50cz0iMTA4IDY4IDg4IDE2IDY4IDY4IDE2IDg4IDY4IDEwOCA4OCAxNjAgMTA4IDEwOCAxNjAgODggMTA4IDY4IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KDTxwb2x5Z29uIHBvaW50cz0iNDI2LjY3IDExNy4zMyA0MDAgNDggMzczLjMzIDExNy4zMyAzMDQgMTQ0IDM3My4zMyAxNzAuNjcgNDAwIDI0MCA0MjYuNjcgMTcwLjY3IDQ5NiAxNDQgNDI2LjY3IDExNy4zMyIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMTkuOTY4IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6ICMxODFhMWI7Ii8+Cg08L2c+Cg08L3N2Zz4=";
+Editor.sendImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik0xMjAtMTYwdi02NDBsNzYwIDMyMC03NjAgMzIwWm04MC0xMjAgNDc0LTIwMC00NzQtMjAwdjE0MGwyNDAgNjAtMjQwIDYwdjE0MFptMCAwdi00MDAgNDAwWiIvPjwvc3ZnPg==";Editor.sparklesImage="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjU5LjkyLDI2Mi45MSwyMTYuNCwxNDkuNzdhOSw5LDAsMCwwLTE2LjgsMEwxNTYuMDgsMjYyLjkxYTksOSwwLDAsMS01LjE3LDUuMTdMMzcuNzcsMzExLjZhOSw5LDAsMCwwLDAsMTYuOGwxMTMuMTQsNDMuNTJhOSw5LDAsMCwxLDUuMTcsNS4xN0wxOTkuNiw0OTAuMjNhOSw5LDAsMCwwLDE2LjgsMGw0My41Mi0xMTMuMTRhOSw5LDAsMCwxLDUuMTctNS4xN0wzNzguMjMsMzI4LjRhOSw5LDAsMCwwLDAtMTYuOEwyNjUuMDksMjY4LjA4QTksOSwwLDAsMSwyNTkuOTIsMjYyLjkxWiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iNDAiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KPHBvbHlnb24gcG9pbnRzPSIxMDggNjggODggMTYgNjggNjggMTYgODggNjggMTA4IDg4IDE2MCAxMDggMTA4IDE2MCA4OCAxMDggNjgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzAwMDAwMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjMwIi8+Cjxwb2x5Z29uIHBvaW50cz0iNDI2LjY3IDExNy4zMyA0MDAgNDggMzczLjMzIDExNy4zMyAzMDQgMTQ0IDM3My4zMyAxNzAuNjcgNDAwIDI0MCA0MjYuNjcgMTcwLjY3IDQ5NiAxNDQgNDI2LjY3IDExNy4zMyIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMzAiLz4KPC9zdmc+";
+Editor.thinSparklesImage="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjU5LjkyLDI2Mi45MSwyMTYuNCwxNDkuNzdhOSw5LDAsMCwwLTE2LjgsMEwxNTYuMDgsMjYyLjkxYTksOSwwLDAsMS01LjE3LDUuMTdMMzcuNzcsMzExLjZhOSw5LDAsMCwwLDAsMTYuOGwxMTMuMTQsNDMuNTJhOSw5LDAsMCwxLDUuMTcsNS4xN0wxOTkuNiw0OTAuMjNhOSw5LDAsMCwwLDE2LjgsMGw0My41Mi0xMTMuMTRhOSw5LDAsMCwxLDUuMTctNS4xN0wzNzguMjMsMzI4LjRhOSw5LDAsMCwwLDAtMTYuOEwyNjUuMDksMjY4LjA4QTksOSwwLDAsMSwyNTkuOTIsMjYyLjkxWiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMTkuOTY4IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6ICMxODFhMWI7Ii8+Cjxwb2x5Z29uIHBvaW50cz0iMTA4IDY4IDg4IDE2IDY4IDY4IDE2IDg4IDY4IDEwOCA4OCAxNjAgMTA4IDEwOCAxNjAgODggMTA4IDY4IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiLz4KPHBvbHlnb24gcG9pbnRzPSI0MjYuNjcgMTE3LjMzIDQwMCA0OCAzNzMuMzMgMTE3LjMzIDMwNCAxNDQgMzczLjMzIDE3MC42NyA0MDAgMjQwIDQyNi42NyAxNzAuNjcgNDk2IDE0NCA0MjYuNjcgMTE3LjMzIiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiLz4KPC9zdmc+";
Editor.arrowRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDAwLTI4MHYtNDAwbDIwMCAyMDAtMjAwIDIwMFoiLz48L3N2Zz4=";Editor.arrowDownImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTM2MCAyODAtNTYwaDQwMEw0ODAtMzYwWiIvPjwvc3ZnPg==";
Editor.arrowUpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJtMjgwLTQwMCAyMDAtMjAwIDIwMCAyMDBIMjgwWiIvPjwvc3ZnPg==";Editor.refreshImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTE2MHEtMTM0IDAtMjI3LTkzdC05My0yMjdxMC0xMzQgOTMtMjI3dDIyNy05M3E2OSAwIDEzMiAyOC41VDcyMC02OTB2LTExMGg4MHYyODBINTIwdi04MGgxNjhxLTMyLTU2LTg3LjUtODhUNDgwLTcyMHEtMTAwIDAtMTcwIDcwdC03MCAxNzBxMCAxMDAgNzAgMTcwdDE3MCA3MHE3NyAwIDEzOS00NHQ4Ny0xMTZoODRxLTI4IDEwNi0xMTQgMTczdC0xOTYgNjdaIi8+PC9zdmc+";
Editor.checkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzgyLTI0MCAxNTQtNDY4bDU3LTU3IDE3MSAxNzEgMzY3LTM2NyA1NyA1Ny00MjQgNDI0WiIvPjwvc3ZnPg==";Editor.dockRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoNTYwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2NTYwcTAgMzMtMjMuNSA1Ni41VDc2MC0xMjBIMjAwWm0xMjAtODB2LTU2MEgyMDB2NTYwaDEyMFptODAgMGgzNjB2LTU2MEg0MDB2NTYwWm0tODAgMEgyMDBoMTIwWiIvPjwvc3ZnPg==";
@@ -1957,361 +1959,362 @@ Editor.removeRowImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy5
Editor.checkmarkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjJweCIgaGVpZ2h0PSIxOHB4IiB2ZXJzaW9uPSIxLjEiPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDQgMCkiIGQ9Ik03LjE4MSwxNS4wMDdhMSwxLDAsMCwxLS43OTMtMC4zOTFMMy4yMjIsMTAuNUExLDEsMCwxLDEsNC44MDgsOS4yNzRMNy4xMzIsMTIuM2w2LjA0NC04Ljg2QTEsMSwwLDEsMSwxNC44Myw0LjU2OWwtNi44MjMsMTBhMSwxLDAsMCwxLS44LjQzN0g3LjE4MVoiIGZpbGw9IiMwMDAwMDAiLz48L3N2Zz4=";
Editor.swapImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzIwLTQ0MHYtMjg3TDIxNy02MjRsLTU3LTU2IDIwMC0yMDAgMjAwIDIwMC01NyA1Ni0xMDMtMTAzdjI4N2gtODBaTTYwMC04MCA0MDAtMjgwbDU3LTU2IDEwMyAxMDN2LTI4N2g4MHYyODdsMTAzLTEwMyA1NyA1Nkw2MDAtODBaIi8+PC9zdmc+";Editor.copyImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNzYwLTIwMEgzMjBxLTMzIDAtNTYuNS0yMy41VDI0MC0yODB2LTU2MHEwLTMzIDIzLjUtNTYuNVQzMjAtOTIwaDI4MGwyNDAgMjQwdjQwMHEwIDMzLTIzLjUgNTYuNVQ3NjAtMjAwWk01NjAtNjQwdi0yMDBIMzIwdjU2MGg0NDB2LTM2MEg1NjBaTTE2MC00MHEtMzMgMC01Ni41LTIzLjVUODAtMTIwdi01NjBoODB2NTYwaDQ0MHY4MEgxNjBabTE2MC04MDB2MjAwLTIwMCA1NjAtNTYwWiIvPjwvc3ZnPg==";
Editor.doubleArrowUpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJtMjk2LTIyNC01Ni01NiAyNDAtMjQwIDI0MCAyNDAtNTYgNTYtMTg0LTE4My0xODQgMTgzWm0wLTI0MC01Ni01NiAyNDAtMjQwIDI0MCAyNDAtNTYgNTYtMTg0LTE4My0xODQgMTgzWiIvPjwvc3ZnPg==";Editor.doubleArrowDownImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTIwMCAyNDAtNDQwbDU2LTU2IDE4NCAxODMgMTg0LTE4MyA1NiA1Ni0yNDAgMjQwWm0wLTI0MEwyNDAtNjgwbDU2LTU2IDE4NCAxODMgMTg0LTE4MyA1NiA1Ni0yNDAgMjQwWiIvPjwvc3ZnPg==";
-Editor.opacityImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMWYxZjFmIj48cGF0aCBkPSJNNDgwLTEyMHEtMTMzIDAtMjI2LjUtOTJUMTYwLTQzNnEwLTY1IDI1LTEyMS41VDI1NC02NThsMjI2LTIyMiAyMjYgMjIycTQ0IDQ0IDY5IDEwMC41VDgwMC00MzZxMCAxMzItOTMuNSAyMjRUNDgwLTEyMFpNMjQyLTQwMGg0NzRxMTItNzItMTMuNS0xMjNUNjUwLTYwMEw0ODAtNzY4IDMxMC02MDBxLTI3IDI2LTUzIDc3dC0xNSAxMjNaIi8+PC9zdmc+";
+Editor.opacityImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMWYxZjFmIj48cGF0aCBkPSJNNDgwLTEyMHEtMTMzIDAtMjI2LjUtOTJUMTYwLTQzNnEwLTY1IDI1LTEyMS41VDI1NC02NThsMjI2LTIyMiAyMjYgMjIycTQ0IDQ0IDY5IDEwMC41VDgwMC00MzZxMCAxMzItOTMuNSAyMjRUNDgwLTEyMFpNMjQyLTQwMGg0NzRxMTItNzItMTMuNS0xMjNUNjUwLTYwMEw0ODAtNzY4IDMxMC02MDBxLTI3IDI2LTUzIDc3dC0xNSAxMjNaIi8+PC9zdmc+";Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMWYxZjFmIj48cGF0aCBkPSJNMjQwLTgwcS0zMyAwLTU2LjUtMjMuNVQxNjAtMTYwdi00MDBxMC0zMyAyMy41LTU2LjVUMjQwLTY0MGgxMjB2ODBIMjQwdjQwMGg0ODB2LTQwMEg2MDB2LTgwaDEyMHEzMyAwIDU2LjUgMjMuNVQ4MDAtNTYwdjQwMHEwIDMzLTIzLjUgNTYuNVQ3MjAtODBIMjQwWm0yMDAtMjQwdi00NDdsLTY0IDY0LTU2LTU3IDE2MC0xNjAgMTYwIDE2MC01NiA1Ny02NC02NHY0NDdoLTgwWiIvPjwvc3ZnPg==";
Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];
Editor.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=[];Editor.ctrlKey=mxClient.IS_MAC?"⌘":"Ctrl";Editor.altKey=mxClient.IS_MAC?"⌥":"Alt";Editor.shiftKey=mxClient.IS_MAC?"⇧":"Shift";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;
Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;Editor.enableNativeClipboard=window==window.top&&null!=navigator.clipboard&&null!=navigator.clipboard.read;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#121212";Editor.darkColorVar="--ge-dark-color";Editor.fontSizeUnit="px";Editor.transitionDelay=.1;Editor.pageSizeUnit=mxConstants.INCHES;Editor.isDarkMode=function(){return Editor.darkMode};
Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};Editor.convertHtmlToText=function(b){if(null!=b){var f=document.createElement("div");f.innerHTML=Graph.sanitizeHtml(b);return mxUtils.extractTextWithWhitespace(f.childNodes)}return null};
-Editor.extractGraphModelFromPng=function(b){var f=null;try{var l=b.substring(b.indexOf(",")+1),u=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0);EditorUi.parsePng(u,mxUtils.bind(this,function(y,q,C){y=u.substring(y+8,y+8+C);"zTXt"==q?(C=y.indexOf(String.fromCharCode(0)),"mxGraphModel"==y.substring(0,C)&&(y=pako.inflateRaw(Graph.stringToArrayBuffer(y.substring(C+2)),{to:"string"}).replace(/\+/g," "),null!=y&&0<y.length&&(f=y))):"tEXt"==q&&(y=y.split(String.fromCharCode(0)),1<y.length&&("mxGraphModel"==
-y[0]||"mxfile"==y[0])&&(f=y[1]));if(null!=f||"IDAT"==q)return!0}))}catch(y){}null!=f&&"%"==f.charAt(0)&&(f=decodeURIComponent(f));null!=f&&"%"==f.charAt(0)&&(f=decodeURIComponent(f));return f};Editor.getLabelForStylename=function(b){var f=b.match(/^([A-Za-z]*)(\d*)$/);null!=f&&1<f.length&&(b=mxUtils.trim(f[1].replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,function(l){return l.toUpperCase()}).replace(/Color[s]?/g,"")),b=mxUtils.trim(b+(0<f[2].length?" ("+f[2]+")":"")));return b};
-Editor.soundex=function(b){if(null==b||0==b.length)return"";var f=[],l=1;f[0]=b[0].toUpperCase();for(var u=1,y=b.length;u<y;u++){var q=b[u].toUpperCase().charCodeAt(0)-65;if(0<=q&&25>=q&&"0"!="01230120022455012603010202"[q]&&("01230120022455012603010202"[q]!=f[l-1]&&(f[l]="01230120022455012603010202"[q],l++),3<l))break}if(3>=l)for(;3>=l;)f[l]="0",l++;return f.join("")};
-Editor.selectFilename=function(b){var f=b.value.lastIndexOf(".");if(0<f){var l=b.value.substring(f+1);"drawio"!=l&&0<=mxUtils.indexOf(["png","svg","html","xml","pdf"],l)&&(l=b.value.lastIndexOf(".drawio.",f),0<l&&(f=l))}f=0<f?f:b.value.length;Editor.selectSubstring(b,0,f)};
-Editor.selectSubstring=function(b,f,l){b.focus();"undefined"!=typeof b.selectionStart?(b.selectionStart=f,b.selectionEnd=l):document.selection&&document.selection.createRange&&(b.select(),b=document.selection.createRange(),b.collapse(!0),b.moveEnd("character",l),b.moveStart("character",f),b.select())};
+Editor.extractGraphModelFromText=function(b){function f(q){var B=q.indexOf("```");0<=B&&(q=q.substring(q,0,B+6));return q}function m(q){var B=q.lastIndexOf("```");0<=B&&(q=q.substring(B+3));return q}var t=b.indexOf("<mxGraphModel "),y=b.indexOf("</mxGraphModel>");0>t&&(t=b.indexOf("<mxGraphModel>"));return 0<=t&&y>t?[mxUtils.trim(f(b.substring(0,t))),b.substring(t,y+15),mxUtils.trim(m(b.substring(y+15)))]:[b,"",""]};
+Editor.extractGraphModelFromPng=function(b){var f=null;try{var m=b.substring(b.indexOf(",")+1),t=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0);EditorUi.parsePng(t,mxUtils.bind(this,function(y,q,B){y=t.substring(y+8,y+8+B);"zTXt"==q?(B=y.indexOf(String.fromCharCode(0)),"mxGraphModel"==y.substring(0,B)&&(y=pako.inflateRaw(Graph.stringToArrayBuffer(y.substring(B+2)),{to:"string"}).replace(/\+/g," "),null!=y&&0<y.length&&(f=y))):"tEXt"==q&&(y=y.split(String.fromCharCode(0)),1<y.length&&("mxGraphModel"==
+y[0]||"mxfile"==y[0])&&(f=y[1]));if(null!=f||"IDAT"==q)return!0}))}catch(y){}null!=f&&"%"==f.charAt(0)&&(f=decodeURIComponent(f));null!=f&&"%"==f.charAt(0)&&(f=decodeURIComponent(f));return f};Editor.getLabelForStylename=function(b){var f=b.match(/^([A-Za-z]*)(\d*)$/);null!=f&&1<f.length&&(b=mxUtils.trim(f[1].replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,function(m){return m.toUpperCase()}).replace(/Color[s]?/g,"")),b=mxUtils.trim(b+(0<f[2].length?" ("+f[2]+")":"")));return b};
+Editor.soundex=function(b){if(null==b||0==b.length)return"";var f=[],m=1;f[0]=b[0].toUpperCase();for(var t=1,y=b.length;t<y;t++){var q=b[t].toUpperCase().charCodeAt(0)-65;if(0<=q&&25>=q&&"0"!="01230120022455012603010202"[q]&&("01230120022455012603010202"[q]!=f[m-1]&&(f[m]="01230120022455012603010202"[q],m++),3<m))break}if(3>=m)for(;3>=m;)f[m]="0",m++;return f.join("")};
+Editor.selectFilename=function(b){var f=b.value.lastIndexOf(".");if(0<f){var m=b.value.substring(f+1);"drawio"!=m&&0<=mxUtils.indexOf(["png","svg","html","xml","pdf"],m)&&(m=b.value.lastIndexOf(".drawio.",f),0<m&&(f=m))}f=0<f?f:b.value.length;Editor.selectSubstring(b,0,f)};
+Editor.selectSubstring=function(b,f,m){b.focus();"undefined"!=typeof b.selectionStart?(b.selectionStart=f,b.selectionEnd=m):document.selection&&document.selection.createRange&&(b.select(),b=document.selection.createRange(),b.collapse(!0),b.moveEnd("character",m),b.moveStart("character",f),b.select())};
Editor.toUnit=function(b,f){return f==mxConstants.INCHES?Math.round(100*b/mxConstants.PIXELS_PER_INCH)/100:f==mxConstants.MILLIMETERS?Math.round(100*b/mxConstants.PIXELS_PER_MM)/100:f==mxConstants.METERS?Math.round(1E3*b/(1E3*mxConstants.PIXELS_PER_MM))/1E3:Math.round(b)};
Editor.fromUnit=function(b,f){return f==mxConstants.INCHES?Math.round(b*mxConstants.PIXELS_PER_INCH):f==mxConstants.MILLIMETERS?Math.round(b*mxConstants.PIXELS_PER_MM):f==mxConstants.METERS?Math.round(b*mxConstants.PIXELS_PER_MM*1E3):Math.round(b)};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.appName=document.title;
Editor.prototype.editBlankUrl=window.location.origin+window.location.pathname;Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
-Editor.prototype.editAsNew=function(b,f,l,u){f=null!=f?"?title="+encodeURIComponent(f):"";l?f+=(0<f.length?"&":"?")+"lightbox=1":null!=urlParams.ui&&(f+=(0<f.length?"&":"?")+"ui="+urlParams.ui);null!=u&&(f+=(0<f.length?"&":"?")+"page-id="+u);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var y=null,q=mxUtils.bind(this,function(C){"ready"==C.data&&C.source==y&&(mxEvent.removeListener(window,"message",q),y.postMessage(b,"*"))});
+Editor.prototype.editAsNew=function(b,f,m,t){f=null!=f?"?title="+encodeURIComponent(f):"";m?f+=(0<f.length?"&":"?")+"lightbox=1":null!=urlParams.ui&&(f+=(0<f.length?"&":"?")+"ui="+urlParams.ui);null!=t&&(f+=(0<f.length?"&":"?")+"page-id="+t);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var y=null,q=mxUtils.bind(this,function(B){"ready"==B.data&&B.source==y&&(mxEvent.removeListener(window,"message",q),y.postMessage(b,"*"))});
mxEvent.addListener(window,"message",q);y=this.graph.openLink(this.getEditBlankUrl(f+(0<f.length?"&":"?")+"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(f)+"#R"+encodeURIComponent(b))};
-Editor.prototype.createGraph=function(b,f){b=new Graph(null,f,null,null,b);b.transparentBackground=!1;var l=b.isCssTransformsSupported,u=this;b.isCssTransformsSupported=function(){return l.apply(this,arguments)&&(!u.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(y){return!this.isExternalProtocol(y)});return b};
+Editor.prototype.createGraph=function(b,f){b=new Graph(null,f,null,null,b);b.transparentBackground=!1;var m=b.isCssTransformsSupported,t=this;b.isCssTransformsSupported=function(){return m.apply(this,arguments)&&(!t.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(y){return!this.isExternalProtocol(y)});return b};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
Editor.prototype.readGraphState=function(b){var f=b.getAttribute("grid");if(null==f||""==f)f=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=f&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=
"0"!=b.getAttribute("arrows");this.graph.foldingEnabled="0"!=b.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);f=parseFloat(b.getAttribute("pageScale"));!isNaN(f)&&0<f?this.graph.pageScale=f:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(f=b.getAttribute("page"),this.graph.pageVisible=
-null!=f?"0"!=f:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;f=parseFloat(b.getAttribute("pageWidth"));var l=parseFloat(b.getAttribute("pageHeight"));isNaN(f)||isNaN(l)||(this.graph.pageFormat=new mxRectangle(0,0,f,l));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
-Editor.prototype.setGraphXml=function(b){if(null!=b){var f=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),f.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}}else if("root"==b.nodeName){this.resetGraph();var l=f.document.createElement("mxGraphModel");l.appendChild(b);f.decode(l,this.graph.getModel());this.updateGraphComponents()}else throw{message:mxResources.get("cannotOpenFile"),
+null!=f?"0"!=f:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;f=parseFloat(b.getAttribute("pageWidth"));var m=parseFloat(b.getAttribute("pageHeight"));isNaN(f)||isNaN(m)||(this.graph.pageFormat=new mxRectangle(0,0,f,m));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
+Editor.prototype.setGraphXml=function(b){if(null!=b){var f=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),f.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}}else if("root"==b.nodeName){this.resetGraph();var m=f.document.createElement("mxGraphModel");m.appendChild(b);f.decode(m,this.graph.getModel());this.updateGraphComponents()}else throw{message:mxResources.get("cannotOpenFile"),
node:b,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear();this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(b){if(null!=b?b:1){var f=new mxCodec(mxUtils.createXmlDocument());b=f.encode(this.graph.getModel());f.document.appendChild(b)}else b=this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)b.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),b.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);b.setAttribute("grid",
this.graph.isGridEnabled()?"1":"0");b.setAttribute("gridSize",this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",
this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width);b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};
Editor.prototype.setModified=function(b){this.modified=b};Editor.prototype.setFilename=function(b){this.filename=b};
-Editor.prototype.createUndoManager=function(){var b=this.graph,f=new mxUndoManager;this.undoListener=function(u,y){f.undoableEditHappened(y.getProperty("edit"))};var l=mxUtils.bind(this,function(u,y){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,l);b.getView().addListener(mxEvent.UNDO,l);l=function(u,y){u=y.getProperty("edit").changes;u=b.getSelectionCellsForChanges(u);y=!1;if(0<u.length){for(var q=[],C=0;C<u.length;C++)null!=b.view.getState(u[C])&&(q.push(u[C]),
-y||(b.scrollCellToVisible(u[C]),y=!0));b.setSelectionCells(q)}};f.addListener(mxEvent.UNDO,l);f.addListener(mxEvent.REDO,l);return f};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+Editor.prototype.createUndoManager=function(){var b=this.graph,f=new mxUndoManager;this.undoListener=function(t,y){f.undoableEditHappened(y.getProperty("edit"))};var m=mxUtils.bind(this,function(t,y){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,m);b.getView().addListener(mxEvent.UNDO,m);m=function(t,y){t=y.getProperty("edit").changes;t=b.getSelectionCellsForChanges(t);y=!1;if(0<t.length){for(var q=[],B=0;B<t.length;B++)null!=b.view.getState(t[B])&&(q.push(t[B]),
+y||(b.scrollCellToVisible(t[B]),y=!0));b.setSelectionCells(q)}};f.addListener(mxEvent.UNDO,m);f.addListener(mxEvent.REDO,m);return f};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,f,l,u,y,q,C,J,S,D,P){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));y&&document.body.appendChild(this.bg);y=b.createDiv(S?"geTransDialog":"geDialog");y.style.width=l+60+"px";y.style.height=u+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(y.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",y.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");y.appendChild(f);document.body.appendChild(y);if(q&&(f=document.createElement("div"),
-f.className="geButton",f.setAttribute("title",mxResources.get("close")),f.style.backgroundImage="url("+Editor.crossImage+")",f.style.position="absolute",f.style.top="0px",f.style.right="0px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),y.appendChild(f),!P)){var c=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(g){c=!0}),null,mxUtils.bind(this,function(g){c&&(b.hideDialog(!0),c=!1)}))}this.onDialogClose=C;this.container=y;null!=D&&this.addResizeHandler(D);
+function Dialog(b,f,m,t,y,q,B,I,S,D,P){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));y&&document.body.appendChild(this.bg);y=b.createDiv(S?"geTransDialog":"geDialog");y.style.width=m+60+"px";y.style.height=t+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(y.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",y.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");y.appendChild(f);document.body.appendChild(y);if(q&&(f=document.createElement("div"),
+f.className="geButton",f.setAttribute("title",mxResources.get("close")),f.style.backgroundImage="url("+Editor.crossImage+")",f.style.position="absolute",f.style.top="0px",f.style.right="0px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),y.appendChild(f),!P)){var c=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(g){c=!0}),null,mxUtils.bind(this,function(g){c&&(b.hideDialog(!0),c=!1)}))}this.onDialogClose=B;this.container=y;null!=D&&this.addResizeHandler(D);
b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.noColorImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC";
Dialog.prototype.closeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==";Dialog.prototype.clearImage="data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==";
Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(b,f){return new mxPoint(b,f)};
-Dialog.prototype.addResizeHandler=function(b){var f=document.createElement("img");f.setAttribute("src",mxWindow.prototype.resizeImage);f.style.cursor="nwse-resize";f.style.position="absolute";f.style.bottom="0px";f.style.right="0px";f.style.zIndex="2";var l=null,u=null,y=null,q=null,C=mxUtils.bind(this,function(D){l=mxEvent.getClientX(D);u=mxEvent.getClientY(D);y=parseInt(this.container.style.width);q=parseInt(this.container.style.height);mxEvent.addGestureListeners(document,null,J,S);mxEvent.consume(D)}),
-J=mxUtils.bind(this,function(D){if(null!=l&&null!=u){var P=mxEvent.getClientX(D)-l,c=mxEvent.getClientY(D)-u;this.container.style.width=Math.max(b.width,y+2*P)+"px";this.container.style.height=Math.max(b.height,q+2*c)+"px";mxEvent.consume(D)}}),S=mxUtils.bind(this,function(D){null!=l&&null!=u&&(u=l=null,mxEvent.removeGestureListeners(document,null,J,S),mxEvent.consume(D))});mxEvent.addGestureListeners(f,C,J,S);this.container.appendChild(f)};
+Dialog.prototype.addResizeHandler=function(b){var f=document.createElement("img");f.setAttribute("src",mxWindow.prototype.resizeImage);f.style.cursor="nwse-resize";f.style.position="absolute";f.style.bottom="0px";f.style.right="0px";f.style.zIndex="2";var m=null,t=null,y=null,q=null,B=mxUtils.bind(this,function(D){m=mxEvent.getClientX(D);t=mxEvent.getClientY(D);y=parseInt(this.container.style.width);q=parseInt(this.container.style.height);mxEvent.addGestureListeners(document,null,I,S);mxEvent.consume(D)}),
+I=mxUtils.bind(this,function(D){if(null!=m&&null!=t){var P=mxEvent.getClientX(D)-m,c=mxEvent.getClientY(D)-t;this.container.style.width=Math.max(b.width,y+2*P)+"px";this.container.style.height=Math.max(b.height,q+2*c)+"px";mxEvent.consume(D)}}),S=mxUtils.bind(this,function(D){null!=m&&null!=t&&(t=m=null,mxEvent.removeGestureListeners(document,null,I,S),mxEvent.consume(D))});mxEvent.addGestureListeners(f,B,I,S);this.container.appendChild(f)};
Dialog.prototype.close=function(b,f){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,f))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&
this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,f,l,u,y,q,C,J,S,D,P){S=null!=S?S:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=f){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,f);g.setAttribute("title",f);c.appendChild(g)}f=
-document.createElement("div");f.style.lineHeight="1.2em";f.style.padding="6px";"string"===typeof l&&(l=l.replace(/\n/g,"<br/>"));f.innerHTML=Graph.sanitizeHtml(l);c.appendChild(f);l=document.createElement("div");l.style.marginTop="12px";l.style.textAlign="center";null!=q&&(f=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();q()}),f.className="geBtn",l.appendChild(f),l.style.textAlign="center");null!=D&&(D=mxUtils.button(D,function(){null!=P&&P()}),D.className="geBtn",l.appendChild(D));
-var m=mxUtils.button(u,function(){S&&b.hideDialog();null!=y&&y()});m.className="geBtn";l.appendChild(m);null!=C&&(u=mxUtils.button(C,function(){S&&b.hideDialog();null!=J&&J()}),u.className="geBtn gePrimaryBtn",l.appendChild(u));this.init=function(){m.focus()};c.appendChild(l);this.container=c},PrintDialog=function(b,f,l,u){this.create(b,f,l,u)};
-PrintDialog.prototype.create=function(b){function f(m){var n=C.checked||D.checked,x=parseInt(c.value)/100;isNaN(x)&&(x=1,c.value="100%");mxClient.IS_SF&&(x*=.75);var F=l.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/l.pageScale;if(n){var M=C.checked?1:parseInt(P.value);isNaN(M)||(H=mxUtils.getScaleForPageCount(M,l,F))}var L=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*x);F.height=Math.ceil(F.height*x);H*=x;!n&&l.pageVisible?(x=l.getPageLayout(),M-=x.x*F.width,L-=x.y*F.height):
-n=!0;n=PrintDialog.createPrintPreview(l,H,F,0,M,L,n);n.open();m&&PrintDialog.printPreview(n)}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");var q=document.createElement("tr");var C=document.createElement("input");C.setAttribute("type","checkbox");var J=document.createElement("td");J.setAttribute("colspan","2");J.style.fontSize="10pt";J.appendChild(C);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));
-J.appendChild(S);mxEvent.addListener(S,"click",function(m){C.checked=!C.checked;D.checked=!C.checked;mxEvent.consume(m)});mxEvent.addListener(C,"change",function(){D.checked=!C.checked});q.appendChild(J);y.appendChild(q);q=q.cloneNode(!1);var D=document.createElement("input");D.setAttribute("type","checkbox");J=document.createElement("td");J.style.fontSize="10pt";J.appendChild(D);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");J.appendChild(S);mxEvent.addListener(S,
-"click",function(m){D.checked=!D.checked;C.checked=!D.checked;mxEvent.consume(m)});q.appendChild(J);var P=document.createElement("input");P.setAttribute("value","1");P.setAttribute("type","number");P.setAttribute("min","1");P.setAttribute("size","4");P.setAttribute("disabled","disabled");P.style.width="50px";J=document.createElement("td");J.style.fontSize="10pt";J.appendChild(P);mxUtils.write(J," "+mxResources.get("pages")+" (max)");q.appendChild(J);y.appendChild(q);mxEvent.addListener(D,"change",
-function(){D.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");C.checked=!D.checked});q=q.cloneNode(!1);J=document.createElement("td");mxUtils.write(J,mxResources.get("pageScale")+":");q.appendChild(J);J=document.createElement("td");var c=document.createElement("input");c.setAttribute("value","100 %");c.setAttribute("size","5");c.style.width="50px";J.appendChild(c);q.appendChild(J);y.appendChild(q);q=document.createElement("tr");J=document.createElement("td");J.colSpan=2;
-J.style.paddingTop="20px";J.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&J.appendChild(S);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)});g.className="geBtn";J.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});g.className="geBtn gePrimaryBtn";J.appendChild(g);b.editor.cancelFirst||
-J.appendChild(S);q.appendChild(J);y.appendChild(q);u.appendChild(y);this.container=u};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(f){}};
-PrintDialog.createPrintPreview=function(b,f,l,u,y,q,C){f=new mxPrintPreview(b,f,l,u,y,q);f.title=mxResources.get("preview");f.addPageCss=!mxClient.IS_SF;f.printBackgroundImage=!0;f.autoOrigin=C;C=b.background;if(null==C||""==C||C==mxConstants.NONE)C="#ffffff";f.backgroundColor=C;var J=f.isTextLabel;f.isTextLabel=function(D){return"geHint"==!D.className&&J.apply(this,arguments)};var S=f.getLinkForCellState;f.getLinkForCellState=function(D){return b.getAbsoluteUrl(S.apply(this,arguments))};return f};
+var ErrorDialog=function(b,f,m,t,y,q,B,I,S,D,P){S=null!=S?S:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=f){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,f);g.setAttribute("title",f);c.appendChild(g)}f=
+document.createElement("div");f.style.lineHeight="1.2em";f.style.padding="6px";"string"===typeof m&&(m=m.replace(/\n/g,"<br/>"));f.innerHTML=Graph.sanitizeHtml(m);c.appendChild(f);m=document.createElement("div");m.style.marginTop="12px";m.style.textAlign="center";null!=q&&(f=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();q()}),f.className="geBtn",m.appendChild(f),m.style.textAlign="center");null!=D&&(D=mxUtils.button(D,function(){null!=P&&P()}),D.className="geBtn",m.appendChild(D));
+var l=mxUtils.button(t,function(){S&&b.hideDialog();null!=y&&y()});l.className="geBtn";m.appendChild(l);null!=B&&(t=mxUtils.button(B,function(){S&&b.hideDialog();null!=I&&I()}),t.className="geBtn gePrimaryBtn",m.appendChild(t));this.init=function(){l.focus()};c.appendChild(m);this.container=c},PrintDialog=function(b,f,m,t){this.create(b,f,m,t)};
+PrintDialog.prototype.create=function(b){function f(l){var n=B.checked||D.checked,x=parseInt(c.value)/100;isNaN(x)&&(x=1,c.value="100%");mxClient.IS_SF&&(x*=.75);var F=m.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,G=1/m.pageScale;if(n){var L=B.checked?1:parseInt(P.value);isNaN(L)||(G=mxUtils.getScaleForPageCount(L,m,F))}var M=L=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*x);F.height=Math.ceil(F.height*x);G*=x;!n&&m.pageVisible?(x=m.getPageLayout(),L-=x.x*F.width,M-=x.y*F.height):
+n=!0;n=PrintDialog.createPrintPreview(m,G,F,0,L,M,n);n.open();l&&PrintDialog.printPreview(n)}var m=b.editor.graph,t=document.createElement("table");t.style.width="100%";t.style.height="100%";var y=document.createElement("tbody");var q=document.createElement("tr");var B=document.createElement("input");B.setAttribute("type","checkbox");var I=document.createElement("td");I.setAttribute("colspan","2");I.style.fontSize="10pt";I.appendChild(B);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));
+I.appendChild(S);mxEvent.addListener(S,"click",function(l){B.checked=!B.checked;D.checked=!B.checked;mxEvent.consume(l)});mxEvent.addListener(B,"change",function(){D.checked=!B.checked});q.appendChild(I);y.appendChild(q);q=q.cloneNode(!1);var D=document.createElement("input");D.setAttribute("type","checkbox");I=document.createElement("td");I.style.fontSize="10pt";I.appendChild(D);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");I.appendChild(S);mxEvent.addListener(S,
+"click",function(l){D.checked=!D.checked;B.checked=!D.checked;mxEvent.consume(l)});q.appendChild(I);var P=document.createElement("input");P.setAttribute("value","1");P.setAttribute("type","number");P.setAttribute("min","1");P.setAttribute("size","4");P.setAttribute("disabled","disabled");P.style.width="50px";I=document.createElement("td");I.style.fontSize="10pt";I.appendChild(P);mxUtils.write(I," "+mxResources.get("pages")+" (max)");q.appendChild(I);y.appendChild(q);mxEvent.addListener(D,"change",
+function(){D.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");B.checked=!D.checked});q=q.cloneNode(!1);I=document.createElement("td");mxUtils.write(I,mxResources.get("pageScale")+":");q.appendChild(I);I=document.createElement("td");var c=document.createElement("input");c.setAttribute("value","100 %");c.setAttribute("size","5");c.style.width="50px";I.appendChild(c);q.appendChild(I);y.appendChild(q);q=document.createElement("tr");I=document.createElement("td");I.colSpan=2;
+I.style.paddingTop="20px";I.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&I.appendChild(S);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)});g.className="geBtn";I.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});g.className="geBtn gePrimaryBtn";I.appendChild(g);b.editor.cancelFirst||
+I.appendChild(S);q.appendChild(I);y.appendChild(q);t.appendChild(y);this.container=t};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(f){}};
+PrintDialog.createPrintPreview=function(b,f,m,t,y,q,B){f=new mxPrintPreview(b,f,m,t,y,q);f.title=mxResources.get("preview");f.addPageCss=!mxClient.IS_SF;f.printBackgroundImage=!0;f.autoOrigin=B;B=b.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";f.backgroundColor=B;var I=f.isTextLabel;f.isTextLabel=function(D){return"geHint"==!D.className&&I.apply(this,arguments)};var S=f.getLinkForCellState;f.getLinkForCellState=function(D){return b.getAbsoluteUrl(S.apply(this,arguments))};return f};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function f(){var x=c;null!=x&&null!=x.originalSrc&&(x=b.createImageForPageLink(x.originalSrc,null));null!=x&&null!=x.src?(P.style.backgroundImage="url("+x.src+")",P.style.display="inline-block"):(P.style.backgroundImage="",P.style.display="none");P.style.backgroundColor="";null!=g&&g!=mxConstants.NONE&&(P.style.backgroundColor=g,P.style.display="inline-block")}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");
-var q=document.createElement("tr");var C=document.createElement("td");C.style.verticalAlign="top";C.style.fontSize="10pt";mxUtils.write(C,mxResources.get("paperSize")+":");q.appendChild(C);C=document.createElement("td");C.style.verticalAlign="top";C.style.fontSize="10pt";var J=PageSetupDialog.addPageFormatPanel(C,"pagesetupdialog",l.pageFormat);q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");mxUtils.write(C,mxResources.get("gridSize")+":");q.appendChild(C);
-C=document.createElement("td");C.style.whiteSpace="nowrap";var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","0");S.style.width="40px";S.style.marginLeft="6px";S.value=l.getGridSize();C.appendChild(S);mxEvent.addListener(S,"change",function(){var x=parseInt(S.value);S.value=Math.max(1,isNaN(x)?l.getGridSize():x)});q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");mxUtils.write(C,mxResources.get("background")+":");
-q.appendChild(C);C=document.createElement("td");var D=document.createElement("button");D.className="geBtn";D.style.margin="0px";mxUtils.write(D,mxResources.get("change")+"...");var P=document.createElement("div");P.style.display="inline-block";P.style.verticalAlign="middle";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.backgroundSize="contain";P.style.border="1px solid lightGray";P.style.borderRadius="4px";P.style.marginRight="14px";P.style.height="32px";
-P.style.width="64px";P.style.cursor="pointer";P.style.padding="4px";var c=l.backgroundImage,g=l.background,m=l.shadowVisible,n=function(x){b.showBackgroundImageDialog(function(F,H,M,L){H||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),c=F,m=L);g=M;f()},c,g,!0);mxEvent.consume(x)};mxEvent.addListener(D,"click",n);mxEvent.addListener(P,"click",n);f();C.appendChild(P);C.appendChild(D);q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");
-C.colSpan=2;C.style.paddingTop="16px";C.setAttribute("align","right");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&C.appendChild(D);n=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var x=parseInt(S.value);isNaN(x)||l.gridSize===x||l.setGridSize(x);x=new ChangePageSetup(b,g,c,J.get());x.ignoreColor=l.background==g;x.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=c?c.src:null);null!=m&&
-(x.shadowVisible=m);l.pageFormat.width==x.previousFormat.width&&l.pageFormat.height==x.previousFormat.height&&x.ignoreColor&&x.ignoreImage&&x.shadowVisible==l.shadowVisible||l.model.execute(x)});n.className="geBtn gePrimaryBtn";C.appendChild(n);b.editor.cancelFirst||C.appendChild(D);q.appendChild(C);y.appendChild(q);u.appendChild(y);this.container=u};
-PageSetupDialog.addPageFormatPanel=function(b,f,l,u){f="format-"+f;var y=document.createElement("input");y.setAttribute("name",f);y.setAttribute("type","radio");y.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",f);q.setAttribute("type","radio");q.setAttribute("value","landscape");var C=document.createElement("select");C.style.position="relative";C.style.marginBottom="4px";C.style.borderRadius="4px";C.style.borderWidth="1px";C.style.borderStyle="solid";
-C.style.boxSizing="border-box";C.style.padding="2px";C.style.width="210px";var J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.marginLeft="4px";J.style.width="210px";J.style.height="24px";y.style.marginRight="6px";J.appendChild(y);f=document.createElement("span");f.style.maxWidth="100px";mxUtils.write(f,mxResources.get("portrait"));J.appendChild(f);q.style.marginLeft="10px";q.style.marginRight="6px";J.appendChild(q);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,
-mxResources.get("landscape"));J.appendChild(S);var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.marginLeft="4px";D.style.fontSize="12px";D.style.width="210px";D.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";D.appendChild(P);mxUtils.write(D," x ");var c=document.createElement("input");c.setAttribute("size","7");c.setAttribute("title",mxResources.get("height"));c.style.textAlign=
-"right";D.appendChild(c);var g=document.createElement("select");g.style.marginLeft="4px";g.style.maxWidth="78px";g.style.width="78px";for(var m=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],n=0;n<m.length;n++){var x=document.createElement("option");x.setAttribute("value",m[n].unit);mxUtils.write(x,m[n].label);g.appendChild(x)}g.value=Editor.pageSizeUnit;D.appendChild(g);
-J.style.display="none";D.style.display="none";var F={},H=PageSetupDialog.getFormats();for(n=0;n<H.length;n++)m=H[n],F[m.key]=m,x=document.createElement("option"),x.setAttribute("value",m.key),mxUtils.write(x,m.title),C.appendChild(x);var M=function(){C.value="custom";for(var K=0;K<H.length;K++){var Z=H[K];null!=Z.format&&("a4"==Z.key?826==l.width?(l=mxRectangle.fromRectangle(l),l.width=827):826==l.height&&(l=mxRectangle.fromRectangle(l),l.height=827):"a5"==Z.key&&(584==l.width?(l=mxRectangle.fromRectangle(l),
-l.width=583):584==l.height&&(l=mxRectangle.fromRectangle(l),l.height=583)),l.width==Z.format.width&&l.height==Z.format.height?(C.value=Z.key,y.setAttribute("checked","checked"),y.defaultChecked=!0,y.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,detected=!0):l.width==Z.format.height&&l.height==Z.format.width&&(C.value=Z.key,y.removeAttribute("checked"),y.defaultChecked=!1,y.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,detected=q.checked=!0))}"custom"==
-C.value?(P.value=Editor.toUnit(l.width,g.value),c.value=Editor.toUnit(l.height,g.value),y.setAttribute("checked","checked"),C.value="custom",J.style.display="none",D.style.display=""):(J.style.display="",D.style.display="none")};M();b.appendChild(C);mxUtils.br(b);b.appendChild(J);b.appendChild(D);var L=function(K,Z){K=F[C.value];null!=K.format?(P.value=Editor.toUnit(q.checked?K.format.height:K.format.width,g.value),c.value=Editor.toUnit(q.checked?K.format.width:K.format.height,g.value),D.style.display=
-"none",J.style.display=""):(J.style.display="none",D.style.display="");K=parseFloat(P.value);if(isNaN(K)||0>=K)P.value=Editor.toUnit(l.width,g.value);K=parseFloat(c.value);if(isNaN(K)||0>=K)c.value=Editor.toUnit(l.height,g.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(P.value),g.value)),Math.floor(Editor.fromUnit(parseFloat(c.value),g.value)));Z||K.width==l.width&&K.height==l.height||(l=K,null!=u&&u(l))};mxEvent.addListener(f,"click",function(K){y.checked=!0;L(K);mxEvent.consume(K)});
-mxEvent.addListener(S,"click",function(K){q.checked=!0;L(K);mxEvent.consume(K)});mxEvent.addListener(P,"blur",L);mxEvent.addListener(P,"click",L);mxEvent.addListener(c,"blur",L);mxEvent.addListener(c,"click",L);mxEvent.addListener(q,"change",L);mxEvent.addListener(y,"change",L);mxEvent.addListener(C,"change",function(K){L(K,"custom"==C.value);mxEvent.consume(K)});mxEvent.addListener(g,"change",function(K){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),g.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,
-Editor.pageSizeUnit),g.value);Editor.pageSizeUnit=g.value;L(K,!0);mxEvent.consume(K)});L(null,!0);return{set:function(K){l=K;M(null,null,!0)},get:function(){return l},widthInput:P,heightInput:c}};
+var PageSetupDialog=function(b){function f(){var x=c;null!=x&&null!=x.originalSrc&&(x=b.createImageForPageLink(x.originalSrc,null));null!=x&&null!=x.src?(P.style.backgroundImage="url("+x.src+")",P.style.display="inline-block"):(P.style.backgroundImage="",P.style.display="none");P.style.backgroundColor="";null!=g&&g!=mxConstants.NONE&&(P.style.backgroundColor=g,P.style.display="inline-block")}var m=b.editor.graph,t=document.createElement("table");t.style.width="100%";t.style.height="100%";var y=document.createElement("tbody");
+var q=document.createElement("tr");var B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";mxUtils.write(B,mxResources.get("paperSize")+":");q.appendChild(B);B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";var I=PageSetupDialog.addPageFormatPanel(B,"pagesetupdialog",m.pageFormat);q.appendChild(B);y.appendChild(q);q=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("gridSize")+":");q.appendChild(B);
+B=document.createElement("td");B.style.whiteSpace="nowrap";var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","0");S.style.width="40px";S.style.marginLeft="6px";S.value=m.getGridSize();B.appendChild(S);mxEvent.addListener(S,"change",function(){var x=parseInt(S.value);S.value=Math.max(1,isNaN(x)?m.getGridSize():x)});q.appendChild(B);y.appendChild(q);q=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("background")+":");
+q.appendChild(B);B=document.createElement("td");var D=document.createElement("button");D.className="geBtn";D.style.margin="0px";mxUtils.write(D,mxResources.get("change")+"...");var P=document.createElement("div");P.style.display="inline-block";P.style.verticalAlign="middle";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.backgroundSize="contain";P.style.border="1px solid lightGray";P.style.borderRadius="4px";P.style.marginRight="14px";P.style.height="32px";
+P.style.width="64px";P.style.cursor="pointer";P.style.padding="4px";var c=m.backgroundImage,g=m.background,l=m.shadowVisible,n=function(x){b.showBackgroundImageDialog(function(F,G,L,M){G||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),c=F,l=M);g=L;f()},c,g,!0);mxEvent.consume(x)};mxEvent.addListener(D,"click",n);mxEvent.addListener(P,"click",n);f();B.appendChild(P);B.appendChild(D);q.appendChild(B);y.appendChild(q);q=document.createElement("tr");B=document.createElement("td");
+B.colSpan=2;B.style.paddingTop="16px";B.setAttribute("align","right");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&B.appendChild(D);n=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var x=parseInt(S.value);isNaN(x)||m.gridSize===x||m.setGridSize(x);x=new ChangePageSetup(b,g,c,I.get());x.ignoreColor=m.background==g;x.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=c?c.src:null);null!=l&&
+(x.shadowVisible=l);m.pageFormat.width==x.previousFormat.width&&m.pageFormat.height==x.previousFormat.height&&x.ignoreColor&&x.ignoreImage&&x.shadowVisible==m.shadowVisible||m.model.execute(x)});n.className="geBtn gePrimaryBtn";B.appendChild(n);b.editor.cancelFirst||B.appendChild(D);q.appendChild(B);y.appendChild(q);t.appendChild(y);this.container=t};
+PageSetupDialog.addPageFormatPanel=function(b,f,m,t){f="format-"+f;var y=document.createElement("input");y.setAttribute("name",f);y.setAttribute("type","radio");y.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",f);q.setAttribute("type","radio");q.setAttribute("value","landscape");var B=document.createElement("select");B.style.position="relative";B.style.marginBottom="4px";B.style.borderRadius="4px";B.style.borderWidth="1px";B.style.borderStyle="solid";
+B.style.boxSizing="border-box";B.style.padding="2px";B.style.width="210px";var I=document.createElement("div");I.style.whiteSpace="nowrap";I.style.marginLeft="4px";I.style.width="210px";I.style.height="24px";y.style.marginRight="6px";I.appendChild(y);f=document.createElement("span");f.style.maxWidth="100px";mxUtils.write(f,mxResources.get("portrait"));I.appendChild(f);q.style.marginLeft="10px";q.style.marginRight="6px";I.appendChild(q);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,
+mxResources.get("landscape"));I.appendChild(S);var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.marginLeft="4px";D.style.fontSize="12px";D.style.width="210px";D.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";D.appendChild(P);mxUtils.write(D," x ");var c=document.createElement("input");c.setAttribute("size","7");c.setAttribute("title",mxResources.get("height"));c.style.textAlign=
+"right";D.appendChild(c);var g=document.createElement("select");g.style.marginLeft="4px";g.style.maxWidth="78px";g.style.width="78px";for(var l=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],n=0;n<l.length;n++){var x=document.createElement("option");x.setAttribute("value",l[n].unit);mxUtils.write(x,l[n].label);g.appendChild(x)}g.value=Editor.pageSizeUnit;D.appendChild(g);
+I.style.display="none";D.style.display="none";var F={},G=PageSetupDialog.getFormats();for(n=0;n<G.length;n++)l=G[n],F[l.key]=l,x=document.createElement("option"),x.setAttribute("value",l.key),mxUtils.write(x,l.title),B.appendChild(x);var L=function(){B.value="custom";for(var K=0;K<G.length;K++){var Z=G[K];null!=Z.format&&("a4"==Z.key?826==m.width?(m=mxRectangle.fromRectangle(m),m.width=827):826==m.height&&(m=mxRectangle.fromRectangle(m),m.height=827):"a5"==Z.key&&(584==m.width?(m=mxRectangle.fromRectangle(m),
+m.width=583):584==m.height&&(m=mxRectangle.fromRectangle(m),m.height=583)),m.width==Z.format.width&&m.height==Z.format.height?(B.value=Z.key,y.setAttribute("checked","checked"),y.defaultChecked=!0,y.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,detected=!0):m.width==Z.format.height&&m.height==Z.format.width&&(B.value=Z.key,y.removeAttribute("checked"),y.defaultChecked=!1,y.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,detected=q.checked=!0))}"custom"==
+B.value?(P.value=Editor.toUnit(m.width,g.value),c.value=Editor.toUnit(m.height,g.value),y.setAttribute("checked","checked"),B.value="custom",I.style.display="none",D.style.display=""):(I.style.display="",D.style.display="none")};L();b.appendChild(B);mxUtils.br(b);b.appendChild(I);b.appendChild(D);var M=function(K,Z){K=F[B.value];null!=K.format?(P.value=Editor.toUnit(q.checked?K.format.height:K.format.width,g.value),c.value=Editor.toUnit(q.checked?K.format.width:K.format.height,g.value),D.style.display=
+"none",I.style.display=""):(I.style.display="none",D.style.display="");K=parseFloat(P.value);if(isNaN(K)||0>=K)P.value=Editor.toUnit(m.width,g.value);K=parseFloat(c.value);if(isNaN(K)||0>=K)c.value=Editor.toUnit(m.height,g.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(P.value),g.value)),Math.floor(Editor.fromUnit(parseFloat(c.value),g.value)));Z||K.width==m.width&&K.height==m.height||(m=K,null!=t&&t(m))};mxEvent.addListener(f,"click",function(K){y.checked=!0;M(K);mxEvent.consume(K)});
+mxEvent.addListener(S,"click",function(K){q.checked=!0;M(K);mxEvent.consume(K)});mxEvent.addListener(P,"blur",M);mxEvent.addListener(P,"click",M);mxEvent.addListener(c,"blur",M);mxEvent.addListener(c,"click",M);mxEvent.addListener(q,"change",M);mxEvent.addListener(y,"change",M);mxEvent.addListener(B,"change",function(K){M(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(g,"change",function(K){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),g.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,
+Editor.pageSizeUnit),g.value);Editor.pageSizeUnit=g.value;M(K,!0);mxEvent.consume(K)});M(null,!0);return{set:function(K){m=K;L(null,null,!0)},get:function(){return m},widthInput:P,heightInput:c}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,f,l,u,y,q,C,J,S,D,P){S=null!=S?S:!0;var c=document.createElement("div"),g=document.createElement("div");g.style.width="100%";g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoColumns="auto 1fr";g.style.boxSizing="border-box";g.style.padding="3px";var m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.justifyContent="flex-end";m.style.minWidth="0";var n=document.createElement("div");n.style.display="inline-block";
-n.style.textOverflow="ellipsis";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.fontSize="10pt";n.style.padding="2px 0";n.setAttribute("title",y||mxResources.get("filename"));mxUtils.write(n,(y||mxResources.get("filename"))+":");m.appendChild(n);g.appendChild(m);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.flexGrow="1";var F=mxUtils.button(l,function(){if(null==q||q(x.value))S&&b.hideDialog(),u(x.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
-y||null==C)if(null!=P?Editor.selectFilename(x):(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=g.parentNode;if(null!=H){var M=null;mxEvent.addListener(H,"dragleave",function(L){null!=M&&(M.style.backgroundColor="",M=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(L){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=x,M.style.backgroundColor=
-"#ebf2f9");L.stopPropagation();L.preventDefault()}));mxEvent.addListener(H,"drop",mxUtils.bind(this,function(L){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(L.dataTransfer.getData("text/uri-list")),F.click());L.stopPropagation();L.preventDefault()}))}}};m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.gap="4px";m.style.whiteSpace="nowrap";m.appendChild(x);g.appendChild(m);
-null==y&&null!=C||null==P||null==b.editor.diagramFileTypes||(m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.textOverflow="ellipsis",m.style.justifyContent="flex-end",m.style.fontSize="10pt",mxUtils.write(m,mxResources.get("type")+":"),g.appendChild(m),m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.whiteSpace="nowrap",g.appendChild(m),f=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),
-f.style.width="100%",m.appendChild(f));null!=C&&g.appendChild(C);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=P?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=D&&D()});m.className="geBtn";null==J||b.isOffline()||row.appendChild(b.createHelpIcon(J));
-b.editor.cancelFirst&&row.appendChild(m);mxEvent.addListener(x,"keypress",function(H){13==H.keyCode&&F.click()});row.appendChild(F);b.editor.cancelFirst||row.appendChild(m);g.appendChild(row);c.appendChild(g);this.container=c};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createFileTypes=function(b,f,l){var u=document.createElement("select");for(b=0;b<l.length;b++){var y=document.createElement("option");y.setAttribute("value",b);mxUtils.write(y,mxResources.get(l[b].description)+" (."+l[b].extension+")");u.appendChild(y)}mxEvent.addListener(u,"change",function(q){q=l[u.value].extension;var C=f.value.lastIndexOf(".drawio.");C=0<C?C:f.value.lastIndexOf(".");"drawio"!=q&&(q="drawio."+q);f.value=0<C?f.value.substring(0,C+1)+q:f.value+"."+q;"createEvent"in
-document?(q=document.createEvent("HTMLEvents"),q.initEvent("change",!1,!0),f.dispatchEvent(q)):f.fireEvent("onchange")});b=function(q){q=f.value.toLowerCase();for(var C=0,J=0;J<l.length;J++){var S=l[J].extension,D=null;"drawio"!=S&&(D=S,S=".drawio."+S);if(q.substring(q.length-S.length-1)=="."+S||null!=D&&q.substring(q.length-D.length-1)=="."+D){C=J;break}}u.value=C};mxEvent.addListener(f,"change",b);mxEvent.addListener(f,"keyup",b);b();return u};
-var WrapperWindow=function(b,f,l,u,y,q,C,J){J=null!=J?J:document.createElement("div");this.window=new mxWindow(f,J,l,u,y,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);C(J)};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var C=this.graph;if(null!=C.container&&!C.transparentBackground){if(C.pageVisible){var J=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=C.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(J),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
-this.backgroundPageShape.init(C.container),S.style.position="absolute",C.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(D){C.dblClick(D)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(D){C.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(D))}),mxUtils.bind(this,function(D){null!=
-C.tooltipHandler&&C.tooltipHandler.isHideOnHover()&&C.tooltipHandler.hide();C.isMouseDown&&!mxEvent.isConsumed(D)&&C.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(D))}),mxUtils.bind(this,function(D){C.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(D))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=J,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(C,J,S){var D=this.graph;C=null!=C?C:1;var P=mxUtils.getLightDarkColor(null==D.background||D.background==mxConstants.NONE?D.defaultPageBackgroundColor:D.background).cssText,c=mxUtils.getLightDarkColor(D.defaultPageBorderColor).cssText,g=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",m="none",n="";"simple"==D.getAdaptiveColors()&&D.background!=mxConstants.NONE&&null!=D.background&&(P=D.background);if(D.isGridEnabled()||D.gridVisible){n=
-10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(g,C))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",n=D.gridSize*this.scale*this.gridSteps*C):m="url("+this.gridImage+")";var x=g=0;J=null!=J?J-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var F=D.gridSize*this.scale*this.gridSteps,H=J%F;F=S%F;null!=D.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),g=1+x.x,x=1+x.y);n=-Math.round(n-mxUtils.mod(this.translate.x*
-this.scale-g+J,n)+H*C)+"px "+-Math.round(n-mxUtils.mod(this.translate.y*this.scale-x+S,n)+F*C)+"px"}C=D.view.canvas;null!=C.ownerSVGElement&&(C=C.ownerSVGElement);g=!Editor.isDarkMode()&&D.enableDiagramBackground;null!=D.view.backgroundPageShape?(D.view.backgroundPageShape.node.style.backgroundPosition=n,D.view.backgroundPageShape.node.style.backgroundImage=m,D.view.backgroundPageShape.node.style.backgroundColor=P,D.view.backgroundPageShape.node.style.borderColor=c,D.view.backgroundPageShape.node.style.colorScheme=
-"none"==D.getAdaptiveColors()?"light":"",C.style.backgroundImage="none",C.style.backgroundColor="",D.container.style.backgroundColor=g?D.diagramBackgroundColor:""):(C.style.backgroundPosition=n,C.style.backgroundImage=m,"1"==urlParams.transparent?D.container.style.background="transparent":!g||null!=D.background&&D.background!=mxConstants.NONE?C.style.backgroundColor=P:(C.style.backgroundColor=D.diagramBackgroundColor,D.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(C,
-J){for(var S=this.graph.gridSize*this.scale*(null!=J?J:1);S<this.minGridSize;)S*=2;J=this.gridSteps*S;for(var D=[],P=1;P<this.gridSteps;P++){var c=P*S;D.push("M 0 "+c+" L "+J+" "+c+" M "+c+" 0 L "+c+" "+J)}C=mxUtils.getLightDarkColor(C);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+J+'" height="'+J+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
-J+'" height="'+J+'" patternUnits="userSpaceOnUse"><path d="'+D.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(C.cssText)+';" stroke="'+C.light+'" opacity="0.2" stroke-width="1"/><path d="M '+J+" 0 L 0 0 0 "+J+'" fill="none" style="stroke:'+mxUtils.htmlEntities(C.cssText)+';" stroke="'+C.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(C,J){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var D=this.gridSize*this.view.scale*this.view.gridSteps;D=-Math.round(D-mxUtils.mod(this.view.translate.x*this.view.scale+C,D))+"px "+-Math.round(D-mxUtils.mod(this.view.translate.y*this.view.scale+J,D))+"px";S.style.backgroundPosition=D}};mxGraph.prototype.updatePageBreaks=function(C,J,S){var D=this.view.scale,P=this.view.translate,c=this.pageFormat,g=D*this.pageScale,m=this.view.getBackgroundPageBounds();
-J=m.width;S=m.height;var n=new mxRectangle(D*P.x,D*P.y,c.width*g,c.height*g),x=(C=C&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(S/n.height)-1:0,F=C?Math.ceil(J/n.width)-1:0,H=m.x+J,M=m.y+S;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);C=mxUtils.bind(this,function(L){if(null!=L){for(var K=L==this.horizontalPageBreaks?x:F,Z=0;Z<=K;Z++){var ha=L==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),
-Math.round(m.y+(Z+1)*n.height)),new mxPoint(Math.round(H),Math.round(m.y+(Z+1)*n.height))]:[new mxPoint(Math.round(m.x+(Z+1)*n.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(Z+1)*n.width),Math.round(M))];null!=L[Z]?(L[Z].points=ha,L[Z].redraw()):(ha=new mxPolyline(ha,this.pageBreakColor),ha.dialect=this.dialect,ha.isDashed=this.pageBreakDashed,ha.pointerEvents=!1,ha.init(this.view.backgroundPane),ha.redraw(),L[Z]=ha)}for(Z=K;Z<L.length;Z++)null!=L[Z]&&L[Z].destroy();L.splice(K,L.length-K)}});
-C(this.horizontalPageBreaks);C(this.verticalPageBreaks)};var f=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(C,J,S){for(var D=0;D<J.length;D++){if(this.graph.isTableCell(J[D])||this.graph.isTableRow(J[D]))return!1;if(this.graph.getModel().isVertex(J[D])){var P=this.graph.getCellGeometry(J[D]);if(null!=P&&P.relative)return!1}}return f.apply(this,arguments)};var l=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
-function(){var C=l.apply(this,arguments);C.intersects=mxUtils.bind(this,function(J,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(C,arguments)});return C};mxGraphView.prototype.createBackgroundPageShape=function(C){return new mxRectangleShape(C,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var C=this.getGraphBounds(),J=0<C.width?C.x/this.scale-this.translate.x:0,S=0<C.height?C.y/this.scale-this.translate.y:0,D=this.graph.pageFormat,
-P=this.graph.pageScale,c=D.width*P;D=D.height*P;P=Math.floor(Math.min(0,J)/c);var g=Math.floor(Math.min(0,S)/D);return new mxRectangle(this.scale*(this.translate.x+P*c),this.scale*(this.translate.y+g*D),this.scale*(Math.ceil(Math.max(1,J+C.width/this.scale)/c)-P)*c,this.scale*(Math.ceil(Math.max(1,S+C.height/this.scale)/D)-g)*D)};var u=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(C,J){u.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=C+"px",this.view.backgroundPageShape.node.style.marginTop=J+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(C,J,S,D,P,c){var g=y.apply(this,arguments);null==c||c||mxEvent.addListener(g,"mousedown",function(m){mxEvent.consume(m)});return g};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(C,J,S){var D=this.graph.model.getParent(C);if(J){var P=this.graph.model.isEdge(C)?null:this.graph.getCellGeometry(C);P=!this.graph.model.isEdge(D)&&!this.graph.isSiblingSelected(C)&&(null!=P&&P.relative||!this.graph.isContainer(D)||this.graph.isPart(C))}else if(P=q.apply(this,arguments),this.graph.isTableCell(C)||this.graph.isTableRow(C))P=D,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(S.getEvent())||
-this.graph.isCellSelected(C)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(C)&&this.graph.isCellSelected(D);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(C){C=C.getCell();for(var J=this.graph.getModel(),S=J.getParent(C),D=this.graph.view.getState(S),P=this.graph.isCellSelected(C);null!=D&&(J.isVertex(S)||J.isEdge(S));){var c=this.graph.isCellSelected(S);P=P||c;if(c||!P&&(this.graph.isTableCell(C)||this.graph.isTableRow(C)))C=S;S=J.getParent(S)}return C}})();EditorUi=function(b,f,l){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var u=this,y=this.editor.graph;y.lightbox=l;var q=y.getGraphBounds;y.getGraphBounds=function(){var ba=q.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var k=this.view.translate,v=this.view.scale;ba=mxRectangle.fromRectangle(ba);ba.add(new mxRectangle((k.x+V.x)*v,(k.y+V.y)*v,V.width*v,V.height*v))}return ba};y.useCssTransforms&&
-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(ba,V){this.clearSelectionState()});y.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);y.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);y.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){y.isEnabled=
-function(){return!1};y.panningHandler.isForcePanningEvent=function(ba){for(var V=ba.getSource();null!=V&&V!=y.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(ba.getEvent())};var C=y.panningHandler.start;y.panningHandler.start=function(){C.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var J=!1,S=!1;this.setDefaultStyle=function(ba){try{y.getModel().isEdge(ba)?
-S=y.pasteEdgeStyle=!1:J=!1;var V=y.getCellStyle(ba,!1),k=[],v=[],I;for(I in V)k.push(V[I]),v.push(I);y.getModel().isEdge(ba)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",v,"values",k,"cells",[ba],"force",!0));y.getModel().isEdge(ba)?S=y.pasteEdgeStyle=!0:J=!0}catch(N){this.handleError(N)}};this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);J=S=y.pasteEdgeStyle=
-!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};y.addListener("cellsInserted",function(ba,V){y.pasteCellStyles(y.includeDescendants(V.getProperty("cells")))});y.addListener("textInserted",function(ba,V){y.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var D=mxUtils.bind(this,function(ba){null==ba&&(ba=window.event);return y.isEditing()||null!=ba&&this.isSelectionAllowed(ba)});this.container!=document.body||this.editor.chromeless&&
-!this.editor.editable||(this.menubarContainer.onselectstart=D,this.menubarContainer.onmousedown=D,this.toolbarContainer.onselectstart=D,this.toolbarContainer.onmousedown=D,this.diagramContainer.onselectstart=D,this.diagramContainer.onmousedown=D,this.sidebarContainer.onselectstart=D,this.sidebarContainer.onmousedown=D,this.formatContainer.onselectstart=D,this.formatContainer.onmousedown=D,null!=this.tabContainer&&(this.tabContainer.onselectstart=D),mxClient.IS_IOS&&(f=function(){var ba=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=
-navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{ba=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(k){}}return ba}(),null!=f&&16<=f[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,
-"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(f=function(ba){if(null!=ba){var V=mxEvent.getSource(ba);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return D(ba)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",f):this.diagramContainer.oncontextmenu=f):y.panningHandler.usePopupTrigger=!1;y.init(this.diagramContainer);mxClient.IS_SVG&&null!=y.view.getDrawPane()&&
-(f=y.view.getDrawPane().ownerSVGElement,null!=f&&(f.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=y.graphHandler){var P=y.graphHandler.start;y.graphHandler.start=function(){null!=u.hoverIcons&&u.hoverIcons.reset();P.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(ba){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(ba)-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(ba)-V.y-this.diagramContainer.clientHeight?
-this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(ba,V){return u.isSpaceDown()||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(ba){16==ba.which?this.shiftDown=!0:32!=ba.which||y.isEditing()?mxEvent.isConsumed(ba)||27!=ba.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),y.container.style.cursor="move",
-y.isEditing()||mxEvent.getSource(ba)!=y.container||mxEvent.consume(ba))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(ba){y.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var g=y.panningHandler.isForcePanningEvent;y.panningHandler.isForcePanningEvent=function(ba){return g.apply(this,arguments)||u.isSpaceDown()||mxEvent.isMouseEvent(ba.getEvent())&&(this.usePopupTrigger||
-!mxEvent.isPopupTrigger(ba.getEvent()))&&(!mxEvent.isControlDown(ba.getEvent())&&mxEvent.isRightMouseButton(ba.getEvent())||mxEvent.isMiddleMouseButton(ba.getEvent()))};var m=y.cellEditor.isStopEditingEvent;y.cellEditor.isStopEditingEvent=function(ba){return m.apply(this,arguments)||13==ba.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(ba)||mxClient.IS_MAC&&mxEvent.isMetaDown(ba)||mxClient.IS_SF&&mxEvent.isShiftDown(ba))};var n=y.isZoomWheelEvent;y.isZoomWheelEvent=function(){return u.isSpaceDown()||
-n.apply(this,arguments)};var x=mxUtils.bind(this,function(){if(null!=this.toolbar)for(var ba=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,V=this.toolbar.container.firstChild;null!=V;){var k=V.getAttribute("data-min-width");null!=k&&parseInt(k)>ba?V.style.display="none":V.style.display="";V=V.nextSibling}}),F=!1,H=null,M=null,L=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&F!=y.cellEditor.isContentEditing()){for(var ba=this.toolbar.container.firstChild,
-V=[];null!=ba;){var k=ba.nextSibling;ba.parentNode.removeChild(ba);V.push(ba);ba=k}ba=this.toolbar.fontMenu;k=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var v=0;v<L.length;v++)this.toolbar.container.appendChild(L[v]);this.toolbar.fontMenu=H;this.toolbar.sizeMenu=M}F=y.cellEditor.isContentEditing();H=ba;M=k;L=V;x()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",
-x);mxEvent.addListener(window,"resize",x);x();y.isTouchPopupMenuEnabled=function(){return null==u.dialog};var Z=y.cellEditor.startEditing;y.cellEditor.startEditing=function(){Z.apply(this,arguments);K();if(y.cellEditor.isContentEditing()){var ba=!1,V=function(){ba||(ba=!0,window.setTimeout(function(){var k=y.getSelectedEditingElement();null!=k&&(k=mxUtils.getCurrentStyle(k),null!=k&&null!=u.toolbar&&(u.toolbar.setFontName(mxUtils.getCssFontFamily(k.fontFamily)),u.toolbar.setFontSize(parseInt(k.fontSize))));
-ba=!1},0))};mxEvent.addListener(y.cellEditor.textarea,"input",V);mxEvent.addListener(y.cellEditor.textarea,"touchend",V);mxEvent.addListener(y.cellEditor.textarea,"mouseup",V);mxEvent.addListener(y.cellEditor.textarea,"keyup",V);V()}};var ha=y.cellEditor.stopEditing;y.cellEditor.stopEditing=function(ba,V){try{ha.apply(this,arguments),K()}catch(k){u.handleError(k)}};y.container.setAttribute("tabindex","0");y.container.style.cursor="default";if(window.self===window.top&&null!=y.container.parentNode)try{y.container.focus()}catch(ba){}var ca=
-y.fireMouseEvent;y.fireMouseEvent=function(ba,V,k){try{ba==mxEvent.MOUSE_DOWN&&this.container.focus(),ca.apply(this,arguments)}catch(v){u.handleError(v)}};var aa=y.foldCells;y.foldCells=function(ba,V,k,v,I){try{aa.apply(this,arguments)}catch(N){u.handleError(N)}};y.popupMenuHandler.autoExpand=!0;null!=this.menus&&(y.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(ba,V,k){this.menus.createPopupMenu(ba,V,k)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(ba){y.popupMenuHandler.hideMenu()}));
-this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};y.connectionHandler.addListener(mxEvent.CONNECT,function(ba,V){var k=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(k.push(V.getProperty("terminal")),window.setTimeout(function(){null!=u.hoverIcons&&u.hoverIcons.update(y.view.getState(k[k.length-1]))},0));y.pasteCellStyles(k)});var oa=null,da=null;b=mxUtils.bind(this,function(){if(null!=this.toolbar){var ba=this.getSelectionState();y.isEnabled()&&
-0<ba.edges.length?(null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+this.getImageForEdgeStyle(ba.style)+")"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+this.getImageForEdgeShape(ba.style)+")")):(null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+oa+")"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+da+")"))}});y.selectionModel.addListener(mxEvent.CHANGE,
-b);y.getModel().addListener(mxEvent.CHANGE,b);this.addListener("styleChanged",mxUtils.bind(this,function(ba,V){ba=V.getProperty("force");(this.updateDefaultStyle||ba)&&y.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),y.currentVertexStyle,y.currentEdgeStyle,J,S);null!=this.toolbar&&(this.toolbar.setFontName(y.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(y.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),V=this.getSelectionState(),
-null!=this.toolbar.edgeStyleMenu&&(oa=this.getImageForEdgeStyle(y.currentEdgeStyle),0==V.edges.length&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+oa+")")),null!=this.toolbar.edgeShapeMenu&&(da=this.getImageForEdgeShape(y.currentEdgeStyle),0==V.edges.length&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+da+")")))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var ba=y.currentVertexStyle.fontFamily||"Helvetica",V=String(y.currentVertexStyle.fontSize||"12"),k=y.getView().getState(y.getSelectionCell());
-null!=k&&(ba=k.style[mxConstants.STYLE_FONTFAMILY]||ba,V=k.style[mxConstants.STYLE_FONTSIZE]||V,10<ba.length&&(ba=ba.substring(0,8)+"..."));this.toolbar.setFontName(ba);this.toolbar.setFontSize(V)}),y.getSelectionModel().addListener(mxEvent.CHANGE,b),y.getModel().addListener(mxEvent.CHANGE,b));y.addListener(mxEvent.CELLS_ADDED,function(ba,V){ba=V.getProperty("cells");V=V.getProperty("parent");null!=V&&y.getModel().isLayer(V)&&!y.isCellVisible(V)&&null!=ba&&0<ba.length&&y.getModel().setVisible(V,!0)});
-Graph.selectParentLayer&&y.selectionModel.addListener(mxEvent.CHANGE,function(){if(y.isEnabled()&&!y.isSelectionEmpty()){var ba=y.getLayerForCells(y.getSelectionCells());null!=ba&&y.setDefaultParent(ba)}});this.gestureHandler=mxUtils.bind(this,function(ba){this.isHideCurrentMenuEvent(ba)&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ka=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ka&&window.clearTimeout(ka);ka=window.setTimeout(mxUtils.bind(this,
+var FilenameDialog=function(b,f,m,t,y,q,B,I,S,D,P){S=null!=S?S:!0;var c=document.createElement("div"),g=document.createElement("div");g.style.width="100%";g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoColumns="auto 1fr";g.style.boxSizing="border-box";g.style.padding="3px";var l=document.createElement("div");l.style.display="inline-flex";l.style.alignItems="center";l.style.justifyContent="flex-end";l.style.minWidth="0";var n=document.createElement("div");n.style.display="inline-block";
+n.style.textOverflow="ellipsis";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.fontSize="10pt";n.style.padding="2px 0";n.setAttribute("title",y||mxResources.get("filename"));mxUtils.write(n,(y||mxResources.get("filename"))+":");l.appendChild(n);g.appendChild(l);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.flexGrow="1";var F=mxUtils.button(m,function(){if(null==q||q(x.value))S&&b.hideDialog(),t(x.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
+y||null==B)if(null!=P?Editor.selectFilename(x):(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var G=g.parentNode;if(null!=G){var L=null;mxEvent.addListener(G,"dragleave",function(M){null!=L&&(L.style.backgroundColor="",L=null);M.stopPropagation();M.preventDefault()});mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(M){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=x,L.style.backgroundColor=
+"#ebf2f9");M.stopPropagation();M.preventDefault()}));mxEvent.addListener(G,"drop",mxUtils.bind(this,function(M){null!=L&&(L.style.backgroundColor="",L=null);0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(M.dataTransfer.getData("text/uri-list")),F.click());M.stopPropagation();M.preventDefault()}))}}};l=document.createElement("div");l.style.display="inline-flex";l.style.alignItems="center";l.style.gap="4px";l.style.whiteSpace="nowrap";l.appendChild(x);g.appendChild(l);
+null==y&&null!=B||null==P||null==b.editor.diagramFileTypes||(l=document.createElement("div"),l.style.display="inline-flex",l.style.alignItems="center",l.style.textOverflow="ellipsis",l.style.justifyContent="flex-end",l.style.fontSize="10pt",mxUtils.write(l,mxResources.get("type")+":"),g.appendChild(l),l=document.createElement("div"),l.style.display="inline-flex",l.style.alignItems="center",l.style.whiteSpace="nowrap",g.appendChild(l),f=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),
+f.style.width="100%",l.appendChild(f));null!=B&&g.appendChild(B);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=P?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=D&&D()});l.className="geBtn";null==I||b.isOffline()||row.appendChild(b.createHelpIcon(I));
+b.editor.cancelFirst&&row.appendChild(l);mxEvent.addListener(x,"keypress",function(G){13==G.keyCode&&F.click()});row.appendChild(F);b.editor.cancelFirst||row.appendChild(l);g.appendChild(row);c.appendChild(g);this.container=c};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createFileTypes=function(b,f,m){var t=document.createElement("select");for(b=0;b<m.length;b++){var y=document.createElement("option");y.setAttribute("value",b);mxUtils.write(y,mxResources.get(m[b].description)+" (."+m[b].extension+")");t.appendChild(y)}mxEvent.addListener(t,"change",function(q){q=m[t.value].extension;var B=f.value.lastIndexOf(".drawio.");B=0<B?B:f.value.lastIndexOf(".");"drawio"!=q&&(q="drawio."+q);f.value=0<B?f.value.substring(0,B+1)+q:f.value+"."+q;"createEvent"in
+document?(q=document.createEvent("HTMLEvents"),q.initEvent("change",!1,!0),f.dispatchEvent(q)):f.fireEvent("onchange")});b=function(q){q=f.value.toLowerCase();for(var B=0,I=0;I<m.length;I++){var S=m[I].extension,D=null;"drawio"!=S&&(D=S,S=".drawio."+S);if(q.substring(q.length-S.length-1)=="."+S||null!=D&&q.substring(q.length-D.length-1)=="."+D){B=I;break}}t.value=B};mxEvent.addListener(f,"change",b);mxEvent.addListener(f,"keyup",b);b();return t};
+var WrapperWindow=function(b,f,m,t,y,q,B,I){I=null!=I?I:document.createElement("div");this.window=new mxWindow(f,I,m,t,y,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);B(I)};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph;if(null!=B.container&&!B.transparentBackground){if(B.pageVisible){var I=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=B.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(I),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+this.backgroundPageShape.init(B.container),S.style.position="absolute",B.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(D){B.dblClick(D)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(D){B.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(D))}),mxUtils.bind(this,function(D){null!=
+B.tooltipHandler&&B.tooltipHandler.isHideOnHover()&&B.tooltipHandler.hide();B.isMouseDown&&!mxEvent.isConsumed(D)&&B.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(D))}),mxUtils.bind(this,function(D){B.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(D))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=I,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
+mxGraphView.prototype.validateBackgroundStyles=function(B,I,S){var D=this.graph;B=null!=B?B:1;var P=mxUtils.getLightDarkColor(null==D.background||D.background==mxConstants.NONE?D.defaultPageBackgroundColor:D.background).cssText,c=mxUtils.getLightDarkColor(D.defaultPageBorderColor).cssText,g=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",l="none",n="";"simple"==D.getAdaptiveColors()&&D.background!=mxConstants.NONE&&null!=D.background&&(P=D.background);if(D.isGridEnabled()||D.gridVisible){n=
+10;mxClient.IS_SVG?(l=unescape(encodeURIComponent(this.createSvgGrid(g,B))),l=window.btoa?btoa(l):Base64.encode(l,!0),l="url(data:image/svg+xml;base64,"+l+")",n=D.gridSize*this.scale*this.gridSteps*B):l="url("+this.gridImage+")";var x=g=0;I=null!=I?I-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var F=D.gridSize*this.scale*this.gridSteps,G=I%F;F=S%F;null!=D.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),g=1+x.x,x=1+x.y);n=-Math.round(n-mxUtils.mod(this.translate.x*
+this.scale-g+I,n)+G*B)+"px "+-Math.round(n-mxUtils.mod(this.translate.y*this.scale-x+S,n)+F*B)+"px"}B=D.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);g=!Editor.isDarkMode()&&D.enableDiagramBackground;null!=D.view.backgroundPageShape?(D.view.backgroundPageShape.node.style.backgroundPosition=n,D.view.backgroundPageShape.node.style.backgroundImage=l,D.view.backgroundPageShape.node.style.backgroundColor=P,D.view.backgroundPageShape.node.style.borderColor=c,D.view.backgroundPageShape.node.style.colorScheme=
+"none"==D.getAdaptiveColors()?"light":"",B.style.backgroundImage="none",B.style.backgroundColor="",D.container.style.backgroundColor=g?D.diagramBackgroundColor:""):(B.style.backgroundPosition=n,B.style.backgroundImage=l,"1"==urlParams.transparent?D.container.style.background="transparent":!g||null!=D.background&&D.background!=mxConstants.NONE?B.style.backgroundColor=P:(B.style.backgroundColor=D.diagramBackgroundColor,D.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(B,
+I){for(var S=this.graph.gridSize*this.scale*(null!=I?I:1);S<this.minGridSize;)S*=2;I=this.gridSteps*S;for(var D=[],P=1;P<this.gridSteps;P++){var c=P*S;D.push("M 0 "+c+" L "+I+" "+c+" M "+c+" 0 L "+c+" "+I)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+I+'" height="'+I+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
+I+'" height="'+I+'" patternUnits="userSpaceOnUse"><path d="'+D.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" opacity="0.2" stroke-width="1"/><path d="M '+I+" 0 L 0 0 0 "+I+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,I){b.apply(this,arguments);
+if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var D=this.gridSize*this.view.scale*this.view.gridSteps;D=-Math.round(D-mxUtils.mod(this.view.translate.x*this.view.scale+B,D))+"px "+-Math.round(D-mxUtils.mod(this.view.translate.y*this.view.scale+I,D))+"px";S.style.backgroundPosition=D}};mxGraph.prototype.updatePageBreaks=function(B,I,S){var D=this.view.scale,P=this.view.translate,c=this.pageFormat,g=D*this.pageScale,l=this.view.getBackgroundPageBounds();
+I=l.width;S=l.height;var n=new mxRectangle(D*P.x,D*P.y,c.width*g,c.height*g),x=(B=B&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(S/n.height)-1:0,F=B?Math.ceil(I/n.width)-1:0,G=l.x+I,L=l.y+S;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(M){if(null!=M){for(var K=M==this.horizontalPageBreaks?x:F,Z=0;Z<=K;Z++){var ja=M==this.horizontalPageBreaks?[new mxPoint(Math.round(l.x),
+Math.round(l.y+(Z+1)*n.height)),new mxPoint(Math.round(G),Math.round(l.y+(Z+1)*n.height))]:[new mxPoint(Math.round(l.x+(Z+1)*n.width),Math.round(l.y)),new mxPoint(Math.round(l.x+(Z+1)*n.width),Math.round(L))];null!=M[Z]?(M[Z].points=ja,M[Z].redraw()):(ja=new mxPolyline(ja,this.pageBreakColor),ja.dialect=this.dialect,ja.isDashed=this.pageBreakDashed,ja.pointerEvents=!1,ja.init(this.view.backgroundPane),ja.redraw(),M[Z]=ja)}for(Z=K;Z<M.length;Z++)null!=M[Z]&&M[Z].destroy();M.splice(K,M.length-K)}});
+B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var f=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,I,S){for(var D=0;D<I.length;D++){if(this.graph.isTableCell(I[D])||this.graph.isTableRow(I[D]))return!1;if(this.graph.getModel().isVertex(I[D])){var P=this.graph.getCellGeometry(I[D]);if(null!=P&&P.relative)return!1}}return f.apply(this,arguments)};var m=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
+function(){var B=m.apply(this,arguments);B.intersects=mxUtils.bind(this,function(I,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(B,arguments)});return B};mxGraphView.prototype.createBackgroundPageShape=function(B){return new mxRectangleShape(B,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var B=this.getGraphBounds(),I=0<B.width?B.x/this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,D=this.graph.pageFormat,
+P=this.graph.pageScale,c=D.width*P;D=D.height*P;P=Math.floor(Math.min(0,I)/c);var g=Math.floor(Math.min(0,S)/D);return new mxRectangle(this.scale*(this.translate.x+P*c),this.scale*(this.translate.y+g*D),this.scale*(Math.ceil(Math.max(1,I+B.width/this.scale)/c)-P)*c,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/D)-g)*D)};var t=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,I){t.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=I+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,I,S,D,P,c){var g=y.apply(this,arguments);null==c||c||mxEvent.addListener(g,"mousedown",function(l){mxEvent.consume(l)});return g};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(B,I,S){var D=this.graph.model.getParent(B);if(I){var P=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);P=!this.graph.model.isEdge(D)&&!this.graph.isSiblingSelected(B)&&(null!=P&&P.relative||!this.graph.isContainer(D)||this.graph.isPart(B))}else if(P=q.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))P=D,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(S.getEvent())||
+this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(D);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var I=this.graph.getModel(),S=I.getParent(B),D=this.graph.view.getState(S),P=this.graph.isCellSelected(B);null!=D&&(I.isVertex(S)||I.isEdge(S));){var c=this.graph.isCellSelected(S);P=P||c;if(c||!P&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=I.getParent(S)}return B}})();EditorUi=function(b,f,m){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var t=this,y=this.editor.graph;y.lightbox=m;var q=y.getGraphBounds;y.getGraphBounds=function(){var aa=q.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var k=this.view.translate,v=this.view.scale;aa=mxRectangle.fromRectangle(aa);aa.add(new mxRectangle((k.x+V.x)*v,(k.y+V.y)*v,V.width*v,V.height*v))}return aa};y.useCssTransforms&&
+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(aa,V){this.clearSelectionState()});y.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);y.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);y.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){y.isEnabled=
+function(){return!1};y.panningHandler.isForcePanningEvent=function(aa){for(var V=aa.getSource();null!=V&&V!=y.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(aa.getEvent())};var B=y.panningHandler.start;y.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var I=!1,S=!1;this.setDefaultStyle=function(aa){try{y.getModel().isEdge(aa)?
+S=y.pasteEdgeStyle=!1:I=!1;var V=y.getCellStyle(aa,!1),k=[],v=[],J;for(J in V)k.push(V[J]),v.push(J);y.getModel().isEdge(aa)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",v,"values",k,"cells",[aa],"force",!0));y.getModel().isEdge(aa)?S=y.pasteEdgeStyle=!0:I=!0}catch(N){this.handleError(N)}};this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);I=S=y.pasteEdgeStyle=
+!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};y.addListener("cellsInserted",function(aa,V){y.pasteCellStyles(y.includeDescendants(V.getProperty("cells")))});y.addListener("textInserted",function(aa,V){y.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var D=mxUtils.bind(this,function(aa){null==aa&&(aa=window.event);return y.isEditing()||null!=aa&&this.isSelectionAllowed(aa)});this.container!=document.body||this.editor.chromeless&&
+!this.editor.editable||(this.menubarContainer.onselectstart=D,this.menubarContainer.onmousedown=D,this.toolbarContainer.onselectstart=D,this.toolbarContainer.onmousedown=D,this.diagramContainer.onselectstart=D,this.diagramContainer.onmousedown=D,this.sidebarContainer.onselectstart=D,this.sidebarContainer.onmousedown=D,this.formatContainer.onselectstart=D,this.formatContainer.onmousedown=D,null!=this.tabContainer&&(this.tabContainer.onselectstart=D),mxClient.IS_IOS&&(f=function(){var aa=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=
+navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{aa=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(k){}}return aa}(),null!=f&&16<=f[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,
+"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(f=function(aa){if(null!=aa){var V=mxEvent.getSource(aa);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return D(aa)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",f):this.diagramContainer.oncontextmenu=f):y.panningHandler.usePopupTrigger=!1;y.init(this.diagramContainer);mxClient.IS_SVG&&null!=y.view.getDrawPane()&&
+(f=y.view.getDrawPane().ownerSVGElement,null!=f&&(f.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=y.graphHandler){var P=y.graphHandler.start;y.graphHandler.start=function(){null!=t.hoverIcons&&t.hoverIcons.reset();P.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(aa){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(aa)-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(aa)-V.y-this.diagramContainer.clientHeight?
+this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(aa,V){return t.isSpaceDown()||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(aa){16==aa.which?this.shiftDown=!0:32!=aa.which||y.isEditing()?mxEvent.isConsumed(aa)||27!=aa.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),y.container.style.cursor="move",
+y.isEditing()||mxEvent.getSource(aa)!=y.container||mxEvent.consume(aa))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(aa){y.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var g=y.panningHandler.isForcePanningEvent;y.panningHandler.isForcePanningEvent=function(aa){return g.apply(this,arguments)||t.isSpaceDown()||mxEvent.isMouseEvent(aa.getEvent())&&(this.usePopupTrigger||
+!mxEvent.isPopupTrigger(aa.getEvent()))&&(!mxEvent.isControlDown(aa.getEvent())&&mxEvent.isRightMouseButton(aa.getEvent())||mxEvent.isMiddleMouseButton(aa.getEvent()))};var l=y.cellEditor.isStopEditingEvent;y.cellEditor.isStopEditingEvent=function(aa){return l.apply(this,arguments)||13==aa.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(aa)||mxClient.IS_SF&&mxEvent.isShiftDown(aa))};var n=y.isZoomWheelEvent;y.isZoomWheelEvent=function(){return t.isSpaceDown()||
+n.apply(this,arguments)};var x=mxUtils.bind(this,function(){if(null!=this.toolbar)for(var aa=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,V=this.toolbar.container.firstChild;null!=V;){var k=V.getAttribute("data-min-width");null!=k&&parseInt(k)>aa?V.style.display="none":V.style.display="";V=V.nextSibling}}),F=!1,G=null,L=null,M=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&F!=y.cellEditor.isContentEditing()){for(var aa=this.toolbar.container.firstChild,
+V=[];null!=aa;){var k=aa.nextSibling;aa.parentNode.removeChild(aa);V.push(aa);aa=k}aa=this.toolbar.fontMenu;k=this.toolbar.sizeMenu;if(null==M)this.toolbar.createTextToolbar();else{for(var v=0;v<M.length;v++)this.toolbar.container.appendChild(M[v]);this.toolbar.fontMenu=G;this.toolbar.sizeMenu=L}F=y.cellEditor.isContentEditing();G=aa;L=k;M=V;x()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",
+x);mxEvent.addListener(window,"resize",x);x();y.isTouchPopupMenuEnabled=function(){return null==t.dialog};var Z=y.cellEditor.startEditing;y.cellEditor.startEditing=function(){Z.apply(this,arguments);K();if(y.cellEditor.isContentEditing()){var aa=!1,V=function(){aa||(aa=!0,window.setTimeout(function(){var k=y.getSelectedEditingElement();null!=k&&(k=mxUtils.getCurrentStyle(k),null!=k&&null!=t.toolbar&&(t.toolbar.setFontName(mxUtils.getCssFontFamily(k.fontFamily)),t.toolbar.setFontSize(parseInt(k.fontSize))));
+aa=!1},0))};mxEvent.addListener(y.cellEditor.textarea,"input",V);mxEvent.addListener(y.cellEditor.textarea,"touchend",V);mxEvent.addListener(y.cellEditor.textarea,"mouseup",V);mxEvent.addListener(y.cellEditor.textarea,"keyup",V);V()}};var ja=y.cellEditor.stopEditing;y.cellEditor.stopEditing=function(aa,V){try{ja.apply(this,arguments),K()}catch(k){t.handleError(k)}};y.container.setAttribute("tabindex","0");y.container.style.cursor="default";if(window.self===window.top&&null!=y.container.parentNode)try{y.container.focus()}catch(aa){}var da=
+y.fireMouseEvent;y.fireMouseEvent=function(aa,V,k){try{aa==mxEvent.MOUSE_DOWN&&this.container.focus(),da.apply(this,arguments)}catch(v){t.handleError(v)}};var ba=y.foldCells;y.foldCells=function(aa,V,k,v,J){try{ba.apply(this,arguments)}catch(N){t.handleError(N)}};y.popupMenuHandler.autoExpand=!0;null!=this.menus&&(y.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(aa,V,k){this.menus.createPopupMenu(aa,V,k)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(aa){y.popupMenuHandler.hideMenu()}));
+this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};y.connectionHandler.addListener(mxEvent.CONNECT,function(aa,V){var k=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(k.push(V.getProperty("terminal")),window.setTimeout(function(){null!=t.hoverIcons&&t.hoverIcons.update(y.view.getState(k[k.length-1]))},0));y.pasteCellStyles(k)});var na=null,ca=null;b=mxUtils.bind(this,function(){if(null!=this.toolbar){var aa=this.getSelectionState();y.isEnabled()&&
+0<aa.edges.length?(null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+this.getImageForEdgeStyle(aa.style)+")"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+this.getImageForEdgeShape(aa.style)+")")):(null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+na+")"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+ca+")"))}});y.selectionModel.addListener(mxEvent.CHANGE,
+b);y.getModel().addListener(mxEvent.CHANGE,b);this.addListener("styleChanged",mxUtils.bind(this,function(aa,V){aa=V.getProperty("force");(this.updateDefaultStyle||aa)&&y.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),y.currentVertexStyle,y.currentEdgeStyle,I,S);null!=this.toolbar&&(this.toolbar.setFontName(y.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(y.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),V=this.getSelectionState(),
+null!=this.toolbar.edgeStyleMenu&&(na=this.getImageForEdgeStyle(y.currentEdgeStyle),0==V.edges.length&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+na+")")),null!=this.toolbar.edgeShapeMenu&&(ca=this.getImageForEdgeShape(y.currentEdgeStyle),0==V.edges.length&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+ca+")")))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var aa=y.currentVertexStyle.fontFamily||"Helvetica",V=String(y.currentVertexStyle.fontSize||"12"),k=y.getView().getState(y.getSelectionCell());
+null!=k&&(aa=k.style[mxConstants.STYLE_FONTFAMILY]||aa,V=k.style[mxConstants.STYLE_FONTSIZE]||V,10<aa.length&&(aa=aa.substring(0,8)+"..."));this.toolbar.setFontName(aa);this.toolbar.setFontSize(V)}),y.getSelectionModel().addListener(mxEvent.CHANGE,b),y.getModel().addListener(mxEvent.CHANGE,b));y.addListener(mxEvent.CELLS_ADDED,function(aa,V){aa=V.getProperty("cells");V=V.getProperty("parent");null!=V&&y.getModel().isLayer(V)&&!y.isCellVisible(V)&&null!=aa&&0<aa.length&&y.getModel().setVisible(V,!0)});
+Graph.selectParentLayer&&y.selectionModel.addListener(mxEvent.CHANGE,function(){if(y.isEnabled()&&!y.isSelectionEmpty()){var aa=y.getLayerForCells(y.getSelectionCells());null!=aa&&y.setDefaultParent(aa)}});this.gestureHandler=mxUtils.bind(this,function(aa){this.isHideCurrentMenuEvent(aa)&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ka=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ka&&window.clearTimeout(ka);ka=window.setTimeout(mxUtils.bind(this,
function(){ka=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){y.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){y.view.validateBackground()}));y.addListener("gridSizeChanged",mxUtils.bind(this,function(){y.isGridEnabled()&&y.view.validateBackground()}));this.editor.resetGraph()}this.init();y.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,f,l){function u(J,S){var D=q;q+=S;return J.substring(D,q)}function y(J){J=u(J,4);return J.charCodeAt(3)+(J.charCodeAt(2)<<8)+(J.charCodeAt(1)<<16)+(J.charCodeAt(0)<<24)}var q=0;if(u(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(u(b,4),"IHDR"!=u(b,4))null!=l&&l();else{u(b,17);do{l=y(b);var C=u(b,4);if(null!=f&&f(q-8,C,l))break;value=u(b,l);u(b,4);if("IEND"==C)break}while(l)}};mxUtils.extend(EditorUi,mxEventSource);
+EditorUi.parsePng=function(b,f,m){function t(I,S){var D=q;q+=S;return I.substring(D,q)}function y(I){I=t(I,4);return I.charCodeAt(3)+(I.charCodeAt(2)<<8)+(I.charCodeAt(1)<<16)+(I.charCodeAt(0)<<24)}var q=0;if(t(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=m&&m();else if(t(b,4),"IHDR"!=t(b,4))null!=m&&m();else{t(b,17);do{m=y(b);var B=t(b,4);if(null!=f&&f(q-8,B,m))break;value=t(b,m);t(b,4);if("IEND"==B)break}while(m)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?220:230);EditorUi.prototype.hsplitPosition=screen.width<=Editor.smallScreenWidth?0:EditorUi.prototype.defaultSidebarWidth;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;
EditorUi.prototype.hsplitClickEnabled=!1;EditorUi.prototype.updateDefaultStyle=!1;EditorUi.prototype.spaceDown=!1;EditorUi.prototype.shiftDown=!1;
-EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var u=b.getRubberband();null!=u&&u.cancel()}));mxEvent.addListener(b.container,
-"keydown",mxUtils.bind(this,function(u){this.onKeyDown(u)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(u){this.onKeyPress(u)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var f=b.setDefaultParent,l=this;this.editor.graph.setDefaultParent=function(){f.apply(this,
-arguments);l.updateActionStates()};b.showLinkDialog=mxUtils.bind(l,l.showLinkDialog);b.editLink=l.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
-EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,f=b.getSelectionCells(),l=this.initSelectionState(),u=!0,y=0;y<f.length;y++){var q=b.getCurrentCellStyle(f[y]);"0"!=mxUtils.getValue(q,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(l,f[y],f,u),u=!1)}this.updateSelectionStateForTableCells(l);if(Editor.enableCustomProperties){l.customProperties={};b=l.vertices;f=l.edges;for(y=0;y<b.length;y++)this.findCommonProperties(b[y],l.customProperties,0==y,l);
-for(y=0;y<f.length;y++)this.findCommonProperties(f[y],l.customProperties,0==b.length&&0==y,l)}return l};
-EditorUi.prototype.findCommonProperties=function(b,f,l,u){u=mxUtils.bind(this,function(D){if(null!=D)if(l)for(var P=0;P<D.length;P++)f[D[P].name]=D[P];else for(var c in f)if(null!=c){var g=!1;for(P=0;P<D.length;P++)if(D[P].name==c&&D[P].type==f[c].type){g=!0;break}g||delete f[c]}});var y=this.editor.graph,q=y.view.getState(b);if(null!=q&&null!=q.shape){if(!q.shape.commonCustomPropAdded){q.shape.commonCustomPropAdded=!0;q.shape.customProperties=q.shape.customProperties||[];if(null!=q.shape&&null!=
-q.shape.stencil&&null!=q.shape.stencil.desc){var C=q.shape.stencil,J=[],S=mxUtils.bind(this,function(D){D=C.desc.getElementsByTagName(D);for(var P=[],c=0;c<D.length;c++){var g=D[c].getAttribute("color");if(!mxUtils.isValidColor(g)&&!J[g]){J[g]=!0;var m=D[c].getAttribute("name");m=null!=m?m:Editor.getLabelForStylename(g);var n=D[c].getAttribute("default");n=null!=n?n:C.getDefaultColorValue(D[c],y);P.push({name:g,type:"color",primary:"false"!=D[c].getAttribute("primary"),defVal:n,defaultColor:n,undefinedColor:n,
-dispName:m})}}return P});Array.prototype.push.apply(q.shape.customProperties,S("fillcolor"));Array.prototype.push.apply(q.shape.customProperties,S("strokecolor"));Array.prototype.push.apply(q.shape.customProperties,S("fontcolor"))}q.cell.vertex?Array.prototype.push.apply(q.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(q.shape.customProperties,Editor.commonEdgeProperties)}u(q.shape.customProperties)}b=b.getAttribute("customProperties");if(null!=b)try{u(JSON.parse(b))}catch(D){}};
+EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var t=b.getRubberband();null!=t&&t.cancel()}));mxEvent.addListener(b.container,
+"keydown",mxUtils.bind(this,function(t){this.onKeyDown(t)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(t){this.onKeyPress(t)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var f=b.setDefaultParent,m=this;this.editor.graph.setDefaultParent=function(){f.apply(this,
+arguments);m.updateActionStates()};b.showLinkDialog=mxUtils.bind(m,m.showLinkDialog);b.editLink=m.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
+EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,f=b.getSelectionCells(),m=this.initSelectionState(),t=!0,y=0;y<f.length;y++){var q=b.getCurrentCellStyle(f[y]);"0"!=mxUtils.getValue(q,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(m,f[y],f,t),t=!1)}this.updateSelectionStateForTableCells(m);if(Editor.enableCustomProperties){m.customProperties={};b=m.vertices;f=m.edges;for(y=0;y<b.length;y++)this.findCommonProperties(b[y],m.customProperties,0==y,m);
+for(y=0;y<f.length;y++)this.findCommonProperties(f[y],m.customProperties,0==b.length&&0==y,m)}return m};
+EditorUi.prototype.findCommonProperties=function(b,f,m,t){t=mxUtils.bind(this,function(D){if(null!=D)if(m)for(var P=0;P<D.length;P++)f[D[P].name]=D[P];else for(var c in f)if(null!=c){var g=!1;for(P=0;P<D.length;P++)if(D[P].name==c&&D[P].type==f[c].type){g=!0;break}g||delete f[c]}});var y=this.editor.graph,q=y.view.getState(b);if(null!=q&&null!=q.shape){if(!q.shape.commonCustomPropAdded){q.shape.commonCustomPropAdded=!0;q.shape.customProperties=q.shape.customProperties||[];if(null!=q.shape&&null!=
+q.shape.stencil&&null!=q.shape.stencil.desc){var B=q.shape.stencil,I=[],S=mxUtils.bind(this,function(D){D=B.desc.getElementsByTagName(D);for(var P=[],c=0;c<D.length;c++){var g=D[c].getAttribute("color");if(!mxUtils.isValidColor(g)&&!I[g]){I[g]=!0;var l=D[c].getAttribute("name");l=null!=l?l:Editor.getLabelForStylename(g);var n=D[c].getAttribute("default");n=null!=n?n:B.getDefaultColorValue(D[c],y);P.push({name:g,type:"color",primary:"false"!=D[c].getAttribute("primary"),defVal:n,defaultColor:n,undefinedColor:n,
+dispName:l})}}return P});Array.prototype.push.apply(q.shape.customProperties,S("fillcolor"));Array.prototype.push.apply(q.shape.customProperties,S("strokecolor"));Array.prototype.push.apply(q.shape.customProperties,S("fontcolor"))}q.cell.vertex?Array.prototype.push.apply(q.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(q.shape.customProperties,Editor.commonEdgeProperties)}t(q.shape.customProperties)}b=b.getAttribute("customProperties");if(null!=b)try{t(JSON.parse(b))}catch(D){}};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var f=mxUtils.sortCells(b.cells),l=this.editor.graph.model,u=l.getParent(f[0]),y=l.getParent(u);if(null!=u&&null!=y){for(var q=u.getIndex(f[0]),C=y.getIndex(u),J=null,S=1,D=1,P=0,c=C<y.getChildCount()-1?l.getChildAt(l.getChildAt(y,C+1),q):null;P<f.length-1;){var g=f[++P];null==c||c!=g||null!=J&&S!=J||(J=S,S=0,D++,u=l.getParent(c),c=C+D<y.getChildCount()?l.getChildAt(l.getChildAt(y,C+D),q):null);var m=this.editor.graph.view.getState(g);
-if(g==l.getChildAt(u,q+S)&&null!=m&&1==mxUtils.getValue(m.style,"colspan",1)&&1==mxUtils.getValue(m.style,"rowspan",1))S++;else break}P==D*S-1&&(b.mergeCell=f[0],b.colspan=S,b.rowspan=D)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};
-EditorUi.prototype.createTimeout=function(b,f,l){var u=!0,y=null,q=mxUtils.bind(this,function(J){y.clear()&&(u=!1,J=null!=J?J:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,f,l)})},null!=l?l(J):this.handleError(J))}),C=window.setTimeout(q,null!=b?b:this.timeout);y={clear:function(){window.clearTimeout(C);return u},isAlive:function(){return u}};null!=f&&this.tryAndHandle(mxUtils.bind(this,function(){f(y)}),q);return y};
-EditorUi.prototype.tryAndHandle=function(b,f){try{b()}catch(l){null!=f?f(l):this.handleError(l)}};
-EditorUi.prototype.removeUserDefinedDarkColors=function(b,f,l){var u=this.editor.graph;b=null!=b?b:u.getSelectionCells();var y=Graph.colorStyles,q=document.createElement("div");u.model.beginUpdate();try{for(var C=0;C<b.length;C++)if(u.model.isEdge(b[C])||u.model.isVertex(b[C])){var J=u.getCellStyle(b[C],!1);if(null!=J)for(var S=0;S<y.length;S++)try{var D=J[y[S]];if(mxUtils.isLightDarkColor(D)){var P=mxUtils.getLightDarkColor(D);u.setCellStyles(y[S],P.light,[b[C]])}}catch(g){}f&&u.isHtmlLabel(b[C])&&
-"0"!=mxUtils.getValue(J,"html","0")&&(q.innerHTML=Graph.sanitizeHtml(u.getLabel(b[C])),Graph.addLightDarkColors(q,null,null,function(g,m,n){return mxUtils.isLightDarkColor(n)?(n=mxUtils.getLightDarkColor(n),g.style.setProperty(m,n.light),!0):!1})&&u.cellLabelChanged(b[C],q.innerHTML))}if(l&&mxUtils.isLightDarkColor(u.background)){P=mxUtils.getLightDarkColor(u.background);var c=new ChangePageSetup(this,P.light);c.ignoreImage=!0;u.model.execute(c)}}finally{u.model.endUpdate()}return b};
-EditorUi.prototype.updateSelectionStateForCell=function(b,f,l,u){l=this.editor.graph;b.cells.push(f);if(l.getModel().isVertex(f)){b.connections=0<l.model.getEdgeCount(f);b.unlocked=b.unlocked&&!l.isCellLocked(f);b.resizable=b.resizable&&l.isCellResizable(f);b.rotatable=b.rotatable&&l.isCellRotatable(f);b.movable=b.movable&&l.isCellMovable(f)&&!l.isTableRow(f)&&!l.isTableCell(f);b.swimlane=b.swimlane||l.isSwimlane(f);b.table=b.table||l.isTable(f);b.cell=b.cell||l.isTableCell(f);b.row=b.row||l.isTableRow(f);
-b.vertices.push(f);var y=l.getCellGeometry(f);if(null!=y&&(0<y.width?null==b.width?b.width=y.width:b.width!=y.width&&(b.width=""):b.containsLabel=!0,0<y.height?null==b.height?b.height=y.height:b.height!=y.height&&(b.height=""):b.containsLabel=!0,!y.relative||null!=y.offset)){var q=y.relative?y.offset.x:y.x;y=y.relative?y.offset.y:y.y;null==b.x?b.x=q:b.x!=q&&(b.x="");null==b.y?b.y=y:b.y!=y&&(b.y="")}}else l.getModel().isEdge(f)&&(b.edges.push(f),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
-!1);q=l.view.getState(f);null!=q&&(b.html=b.html&&l.isHtmlLabel(f),b.autoSize=b.autoSize||l.isAutoSizeState(q),b.glass=b.glass&&l.isGlassState(q),b.rounded=b.rounded&&l.isRoundedState(q),b.lineJumps=b.lineJumps&&l.isLineJumpState(q),b.image=b.image||l.isImageState(q),b.shadow=b.shadow&&l.isShadowState(q),b.fill=b.fill&&l.isFillState(q),b.gradient=b.fill&&l.isGradientState(q),b.stroke=b.stroke&&l.isStrokeState(q),f=mxUtils.getValue(q.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||
-"image"==f,l.mergeStyle(q.style,b.style,u))};
-EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,f=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,D){"mouseDown"==D.getProperty("eventName")&&f.hideShapePicker()}));var l=mxUtils.bind(this,function(){f.hideShapePicker(!0)});b.addListener("wheel",l);b.addListener(mxEvent.ESCAPE,l);b.view.addListener(mxEvent.SCALE,l);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,l);b.getSelectionModel().addListener(mxEvent.CHANGE,l);var u=b.popupMenuHandler.isMenuShowing;
-b.popupMenuHandler.isMenuShowing=function(){return u.apply(this,arguments)||null!=f.shapePicker||null!=f.currentMenu};var y=b.dblClick;b.dblClick=function(S,D){if(this.isEnabled())if(null!=D||null==f.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))y.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-l);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){f.hideShapePicker();q.apply(this,arguments)};var C=this.hoverIcons.execute;this.hoverIcons.execute=function(S,D,P){var c=P.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?C.apply(this,arguments):this.graph.connectVertex(S.cell,D,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(g,m,n){var x=b.getCompositeParent(S.cell);g=b.getCellGeometry(x);for(P.consume();null!=x&&b.model.isVertex(x)&&null!=g&&g.relative;)cell=
-x,x=b.model.getParent(cell),g=b.getCellGeometry(x);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.getGraphX(),P.getGraphY(),x,mxUtils.bind(this,function(F){n(F);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(F))}),D)}),30)}),mxUtils.bind(this,function(g){this.graph.selectCellsForConnectVertex(g,c,this)}))};var J=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,D){null!=J&&window.clearTimeout(J);J=window.setTimeout(mxUtils.bind(this,function(){var P=
-D.getProperty("arrow"),c=D.getProperty("direction"),g=D.getProperty("event");P=P.getBoundingClientRect();var m=mxUtils.getOffset(b.container),n=b.container.scrollLeft+P.x-m.x;m=b.container.scrollTop+P.y-m.y;var x=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=f.showShapePicker(n,m,x,mxUtils.bind(this,function(H){null!=H&&b.connectVertex(x,c,b.defaultEdgeLength,g,!0,!1,function(M,L,K){K(H);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(H))},
-function(M){b.selectCellsForConnectVertex(M)},g,this.hoverIcons)}),c,!0);null!=F&&(this.centerShapePicker(F,P,n,m,c),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){f.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,D){null!=J&&window.clearTimeout(J)}))}};
-EditorUi.prototype.centerShapePicker=function(b,f,l,u,y){if(y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST)b.style.width="40px";var q=b.getBoundingClientRect();y==mxConstants.DIRECTION_NORTH?(l-=q.width/2-10,u-=q.height+6):y==mxConstants.DIRECTION_SOUTH?(l-=q.width/2-10,u+=f.height+6):y==mxConstants.DIRECTION_WEST?(l-=q.width+6,u-=q.height/2-10):y==mxConstants.DIRECTION_EAST&&(l+=f.width+6,u-=q.height/2-10);b.style.left=l+"px";b.style.top=u+"px"};
-EditorUi.prototype.showShapePicker=function(b,f,l,u,y,q,C,J,S){var D=null;this.editor.graph.freehand.isDrawing()||(J=J||null==l,D=this.createShapePicker(b,f,l,u,y,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(l,q,J),q,C,J,S),null!=D&&(null==this.hoverIcons||q||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=u,this.shapePicker=D));return D};
-EditorUi.prototype.createShapePicker=function(b,f,l,u,y,q,C,J,S,D,P){P=null!=P?P:!0;var c=this.editor.graph,g=null;S=null!=S?S:function(x){x=x[0];var F=0,H=0,M=x.geometry;null!=M&&(c.model.isEdge(x)&&(x=M.getTerminalPoint(!1),M=new mxRectangle(0,0,x.x,x.y)),F=M.width/2,H=M.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-F),c.snap(Math.round(f/c.view.scale)-c.view.translate.y-H))};if(null!=C&&0<C.length){var m=this;c=this.editor.graph;g=document.createElement("div");
-y=c.view.getState(l);var n=null==l||null!=y&&c.isTransparentState(y)?null:c.copyStyle(l);g.className="geShapePicker";g.setAttribute("title",mxResources.get("sidebarTooltip"));g.style.left=Math.round(b)+"px";g.style.top=Math.round(f)+"px";mxClient.IS_POINTER&&(g.style.touchAction="none");J||mxUtils.setPrefixedStyle(g.style,"transform","translate(-22px,-22px)");c.container.appendChild(g);y=mxUtils.bind(this,function(x){var F=document.createElement("a");g.appendChild(F);null!=n&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(n,[x]):this.sidebar.graph.pasteCellStyles([x],c.currentVertexStyle,c.currentEdgeStyle);var H=x.geometry;c.model.isEdge(x)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([x],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=c.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==l&&c.isSelectionEmpty()){var L=c.cloneCell(x);if(null!=u)u(L);else{var K=S([L]);c.model.isEdge(L)?
-L.geometry.translate(K.x,K.y):(L.geometry.x=K.x,L.geometry.y=K.y);c.model.beginUpdate();try{c.addCell(L),c.model.isVertex(L)&&c.isAutoSizeCell(L)&&c.updateCellSize(L)}finally{c.model.endUpdate()}c.setSelectionCell(L);c.scrollCellToVisible(L);P&&c.startEditing(L);null!=m.hoverIcons&&m.hoverIcons.update(c.view.getState(L))}}else L=c.getEditableCells(null!=l?[l]:c.getSelectionCells()),c.updateShapes(x,L);null!=q&&q(M);mxEvent.consume(M)}}),25,25,null,null,l),H.style.display="flex",H.style.alignItems=
-"center",H.style.justifyContent="center",F.appendChild(H))});for(D=0;D<(J?Math.min(C.length,4):C.length);D++)y(C[D]);C=g.offsetTop+g.clientHeight-(c.container.scrollTop+c.container.offsetHeight);0<C&&(g.style.top=Math.max(c.container.scrollTop+22,f-C)+"px");C=g.offsetLeft+g.clientWidth-(c.container.scrollLeft+c.container.offsetWidth);0<C&&(g.style.left=Math.max(c.container.scrollLeft+22,b-C)+"px")}return g};
-EditorUi.prototype.getCellsForShapePicker=function(b,f,l){var u=this.editor.graph,y=mxUtils.bind(this,function(q,C,J,S){return u.createVertex(null,null,S||"",0,0,C||120,J||60,q,!1)});f=mxUtils.bind(this,function(q,C,J){q=new mxCell(J||"",new mxGeometry(0,0,u.defaultEdgeLength+20,0),q);q.geometry.setTerminalPoint(new mxPoint(0,0),!0);q.geometry.setTerminalPoint(new mxPoint(q.geometry.width,null!=C?C:0),!1);q.geometry.points=null!=C?[new mxPoint(q.geometry.width/2,C)]:[];q.geometry.relative=!0;q.edge=
-!0;return q});if(null!=b)try{b=u.cloneCell(b),u.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(q){b=null}null==b&&(b=y(u.appendFontSize(Editor.defaultTextStyle,u.vertexFontSize),60,30,"Text"));b=[b,y("whiteSpace=wrap;html=1;"),y("ellipse;whiteSpace=wrap;html=1;",80,80),y("rhombus;whiteSpace=wrap;html=1;",80,80),y("rounded=1;whiteSpace=wrap;html=1;"),y("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),y("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var f=mxUtils.sortCells(b.cells),m=this.editor.graph.model,t=m.getParent(f[0]),y=m.getParent(t);if(null!=t&&null!=y){for(var q=t.getIndex(f[0]),B=y.getIndex(t),I=null,S=1,D=1,P=0,c=B<y.getChildCount()-1?m.getChildAt(m.getChildAt(y,B+1),q):null;P<f.length-1;){var g=f[++P];null==c||c!=g||null!=I&&S!=I||(I=S,S=0,D++,t=m.getParent(c),c=B+D<y.getChildCount()?m.getChildAt(m.getChildAt(y,B+D),q):null);var l=this.editor.graph.view.getState(g);
+if(g==m.getChildAt(t,q+S)&&null!=l&&1==mxUtils.getValue(l.style,"colspan",1)&&1==mxUtils.getValue(l.style,"rowspan",1))S++;else break}P==D*S-1&&(b.mergeCell=f[0],b.colspan=S,b.rowspan=D)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};
+EditorUi.prototype.createTimeout=function(b,f,m){var t=!0,y=null,q=mxUtils.bind(this,function(I){y.clear()&&(t=!1,I=null!=I?I:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,f,m)})},null!=m?m(I):this.handleError(I))}),B=window.setTimeout(q,null!=b?b:this.timeout);y={clear:function(){window.clearTimeout(B);return t},isAlive:function(){return t}};null!=f&&this.tryAndHandle(mxUtils.bind(this,function(){f(y)}),q);return y};
+EditorUi.prototype.tryAndHandle=function(b,f){try{b()}catch(m){null!=f?f(m):this.handleError(m)}};
+EditorUi.prototype.removeUserDefinedDarkColors=function(b,f,m){var t=this.editor.graph;b=null!=b?b:t.getSelectionCells();var y=Graph.colorStyles,q=document.createElement("div");t.model.beginUpdate();try{for(var B=0;B<b.length;B++)if(t.model.isEdge(b[B])||t.model.isVertex(b[B])){var I=t.getCellStyle(b[B],!1);if(null!=I)for(var S=0;S<y.length;S++)try{var D=I[y[S]];if(mxUtils.isLightDarkColor(D)){var P=mxUtils.getLightDarkColor(D);t.setCellStyles(y[S],P.light,[b[B]])}}catch(g){}f&&t.isHtmlLabel(b[B])&&
+"0"!=mxUtils.getValue(I,"html","0")&&(q.innerHTML=Graph.sanitizeHtml(t.getLabel(b[B])),Graph.addLightDarkColors(q,null,null,function(g,l,n){return mxUtils.isLightDarkColor(n)?(n=mxUtils.getLightDarkColor(n),g.style.setProperty(l,n.light),!0):!1})&&t.cellLabelChanged(b[B],q.innerHTML))}if(m&&mxUtils.isLightDarkColor(t.background)){P=mxUtils.getLightDarkColor(t.background);var c=new ChangePageSetup(this,P.light);c.ignoreImage=!0;t.model.execute(c)}}finally{t.model.endUpdate()}return b};
+EditorUi.prototype.updateSelectionStateForCell=function(b,f,m,t){m=this.editor.graph;b.cells.push(f);if(m.getModel().isVertex(f)){b.connections=0<m.model.getEdgeCount(f);b.unlocked=b.unlocked&&!m.isCellLocked(f);b.resizable=b.resizable&&m.isCellResizable(f);b.rotatable=b.rotatable&&m.isCellRotatable(f);b.movable=b.movable&&m.isCellMovable(f)&&!m.isTableRow(f)&&!m.isTableCell(f);b.swimlane=b.swimlane||m.isSwimlane(f);b.table=b.table||m.isTable(f);b.cell=b.cell||m.isTableCell(f);b.row=b.row||m.isTableRow(f);
+b.vertices.push(f);var y=m.getCellGeometry(f);if(null!=y&&(0<y.width?null==b.width?b.width=y.width:b.width!=y.width&&(b.width=""):b.containsLabel=!0,0<y.height?null==b.height?b.height=y.height:b.height!=y.height&&(b.height=""):b.containsLabel=!0,!y.relative||null!=y.offset)){var q=y.relative?y.offset.x:y.x;y=y.relative?y.offset.y:y.y;null==b.x?b.x=q:b.x!=q&&(b.x="");null==b.y?b.y=y:b.y!=y&&(b.y="")}}else m.getModel().isEdge(f)&&(b.edges.push(f),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
+!1);q=m.view.getState(f);null!=q&&(b.html=b.html&&m.isHtmlLabel(f),b.autoSize=b.autoSize||m.isAutoSizeState(q),b.glass=b.glass&&m.isGlassState(q),b.rounded=b.rounded&&m.isRoundedState(q),b.lineJumps=b.lineJumps&&m.isLineJumpState(q),b.image=b.image||m.isImageState(q),b.shadow=b.shadow&&m.isShadowState(q),b.fill=b.fill&&m.isFillState(q),b.gradient=b.fill&&m.isGradientState(q),b.stroke=b.stroke&&m.isStrokeState(q),f=mxUtils.getValue(q.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||
+"image"==f,m.mergeStyle(q.style,b.style,t))};
+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,f=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,D){"mouseDown"==D.getProperty("eventName")&&f.hideShapePicker()}));var m=mxUtils.bind(this,function(){f.hideShapePicker(!0)});b.addListener("wheel",m);b.addListener(mxEvent.ESCAPE,m);b.view.addListener(mxEvent.SCALE,m);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,m);b.getSelectionModel().addListener(mxEvent.CHANGE,m);var t=b.popupMenuHandler.isMenuShowing;
+b.popupMenuHandler.isMenuShowing=function(){return t.apply(this,arguments)||null!=f.shapePicker||null!=f.currentMenu};var y=b.dblClick;b.dblClick=function(S,D){if(this.isEnabled())if(null!=D||null==f.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))y.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+m);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){f.hideShapePicker();q.apply(this,arguments)};var B=this.hoverIcons.execute;this.hoverIcons.execute=function(S,D,P){var c=P.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?B.apply(this,arguments):this.graph.connectVertex(S.cell,D,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(g,l,n){var x=b.getCompositeParent(S.cell);g=b.getCellGeometry(x);for(P.consume();null!=x&&b.model.isVertex(x)&&null!=g&&g.relative;)cell=
+x,x=b.model.getParent(cell),g=b.getCellGeometry(x);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.getGraphX(),P.getGraphY(),x,mxUtils.bind(this,function(F){n(F);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(F))}),D)}),30)}),mxUtils.bind(this,function(g){this.graph.selectCellsForConnectVertex(g,c,this)}))};var I=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,D){null!=I&&window.clearTimeout(I);I=window.setTimeout(mxUtils.bind(this,function(){var P=
+D.getProperty("arrow"),c=D.getProperty("direction"),g=D.getProperty("event");P=P.getBoundingClientRect();var l=mxUtils.getOffset(b.container),n=b.container.scrollLeft+P.x-l.x;l=b.container.scrollTop+P.y-l.y;var x=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=f.showShapePicker(n,l,x,mxUtils.bind(this,function(G){null!=G&&b.connectVertex(x,c,b.defaultEdgeLength,g,!0,!1,function(L,M,K){K(G);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(G))},
+function(L){b.selectCellsForConnectVertex(L)},g,this.hoverIcons)}),c,!0);null!=F&&(this.centerShapePicker(F,P,n,l,c),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){f.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,D){null!=I&&window.clearTimeout(I)}))}};
+EditorUi.prototype.centerShapePicker=function(b,f,m,t,y){if(y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST)b.style.width="40px";var q=b.getBoundingClientRect();y==mxConstants.DIRECTION_NORTH?(m-=q.width/2-10,t-=q.height+6):y==mxConstants.DIRECTION_SOUTH?(m-=q.width/2-10,t+=f.height+6):y==mxConstants.DIRECTION_WEST?(m-=q.width+6,t-=q.height/2-10):y==mxConstants.DIRECTION_EAST&&(m+=f.width+6,t-=q.height/2-10);b.style.left=m+"px";b.style.top=t+"px"};
+EditorUi.prototype.showShapePicker=function(b,f,m,t,y,q,B,I,S){var D=null;this.editor.graph.freehand.isDrawing()||(I=I||null==m,D=this.createShapePicker(b,f,m,t,y,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(m,q,I),q,B,I,S),null!=D&&(null==this.hoverIcons||q||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=t,this.shapePicker=D));return D};
+EditorUi.prototype.createShapePicker=function(b,f,m,t,y,q,B,I,S,D,P){P=null!=P?P:!0;var c=this.editor.graph,g=null;S=null!=S?S:function(x){x=x[0];var F=0,G=0,L=x.geometry;null!=L&&(c.model.isEdge(x)&&(x=L.getTerminalPoint(!1),L=new mxRectangle(0,0,x.x,x.y)),F=L.width/2,G=L.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-F),c.snap(Math.round(f/c.view.scale)-c.view.translate.y-G))};if(null!=B&&0<B.length){var l=this;c=this.editor.graph;g=document.createElement("div");
+y=c.view.getState(m);var n=null==m||null!=y&&c.isTransparentState(y)?null:c.copyStyle(m);g.className="geShapePicker";g.setAttribute("title",mxResources.get("sidebarTooltip"));g.style.left=Math.round(b)+"px";g.style.top=Math.round(f)+"px";mxClient.IS_POINTER&&(g.style.touchAction="none");I||mxUtils.setPrefixedStyle(g.style,"transform","translate(-22px,-22px)");c.container.appendChild(g);y=mxUtils.bind(this,function(x){var F=document.createElement("a");g.appendChild(F);null!=n&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(n,[x]):this.sidebar.graph.pasteCellStyles([x],c.currentVertexStyle,c.currentEdgeStyle);var G=x.geometry;c.model.isEdge(x)&&(G=G.getTerminalPoint(!1),G=new mxRectangle(0,0,G.x,G.y));null!=G&&(G=this.sidebar.createVertexTemplateFromCells([x],G.width,G.height,"",!0,!1,null,!1,mxUtils.bind(this,function(L){if(!mxEvent.isAltDown(L)||1!=c.getSelectionCount()){if(!mxEvent.isShiftDown(L)||null==m&&c.isSelectionEmpty()){var M=c.cloneCell(x);if(null!=t)t(M);else{var K=S([M]);c.model.isEdge(M)?
+M.geometry.translate(K.x,K.y):(M.geometry.x=K.x,M.geometry.y=K.y);c.model.beginUpdate();try{c.addCell(M),c.model.isVertex(M)&&c.isAutoSizeCell(M)&&c.updateCellSize(M)}finally{c.model.endUpdate()}c.setSelectionCell(M);c.scrollCellToVisible(M);P&&c.startEditing(M);null!=l.hoverIcons&&l.hoverIcons.update(c.view.getState(M))}}else M=c.getEditableCells(null!=m?[m]:c.getSelectionCells()),c.updateShapes(x,M);null!=q&&q(L);mxEvent.consume(L)}}),25,25,null,null,m),G.style.display="flex",G.style.alignItems=
+"center",G.style.justifyContent="center",F.appendChild(G))});for(D=0;D<(I?Math.min(B.length,4):B.length);D++)y(B[D]);B=g.offsetTop+g.clientHeight-(c.container.scrollTop+c.container.offsetHeight);0<B&&(g.style.top=Math.max(c.container.scrollTop+22,f-B)+"px");B=g.offsetLeft+g.clientWidth-(c.container.scrollLeft+c.container.offsetWidth);0<B&&(g.style.left=Math.max(c.container.scrollLeft+22,b-B)+"px")}return g};
+EditorUi.prototype.getCellsForShapePicker=function(b,f,m){var t=this.editor.graph,y=mxUtils.bind(this,function(q,B,I,S){return t.createVertex(null,null,S||"",0,0,B||120,I||60,q,!1)});f=mxUtils.bind(this,function(q,B,I){q=new mxCell(I||"",new mxGeometry(0,0,t.defaultEdgeLength+20,0),q);q.geometry.setTerminalPoint(new mxPoint(0,0),!0);q.geometry.setTerminalPoint(new mxPoint(q.geometry.width,null!=B?B:0),!1);q.geometry.points=null!=B?[new mxPoint(q.geometry.width/2,B)]:[];q.geometry.relative=!0;q.edge=
+!0;return q});if(null!=b)try{b=t.cloneCell(b),t.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(q){b=null}null==b&&(b=y(t.appendFontSize(Editor.defaultTextStyle,t.vertexFontSize),60,30,"Text"));b=[b,y("whiteSpace=wrap;html=1;"),y("ellipse;whiteSpace=wrap;html=1;",80,80),y("rhombus;whiteSpace=wrap;html=1;",80,80),y("rounded=1;whiteSpace=wrap;html=1;"),y("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),y("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",
120,60),y("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),y("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),y("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),y("triangle;whiteSpace=wrap;html=1;",60,80),y("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),y("shape=tape;whiteSpace=wrap;html=1;",120,100),y("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),y("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",
-80,60),y("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];l&&(b=b.concat([f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;"),f("edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;curved=0;rounded=0;endSize=8;startSize=8;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;",
+80,60),y("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];m&&(b=b.concat([f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;"),f("edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;curved=0;rounded=0;endSize=8;startSize=8;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;",
this.editor.graph.defaultEdgeLength/2)]));return b};EditorUi.prototype.isShapePickerVisible=function(b){return null!=this.shapePicker};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};EditorUi.prototype.isSpaceDown=function(){return this.spaceDown};EditorUi.prototype.isShiftDown=function(){return this.shiftDown};
-EditorUi.prototype.onKeyDown=function(b){var f=this.editor.graph;if(9==b.which&&f.isEnabled()&&!mxEvent.isControlDown(b)){if(f.isEditing())if(mxEvent.isAltDown(b))f.stopEditing(!1);else try{var l=f.cellEditor.isContentEditing()&&f.cellEditor.isTextSelected();if(window.getSelection&&f.cellEditor.isContentEditing()&&!l&&!mxClient.IS_IE&&!mxClient.IS_IE11){var u=window.getSelection(),y=0<u.rangeCount?u.getRangeAt(0).commonAncestorContainer:null;l=null!=y&&("LI"==y.nodeName||null!=y.parentNode&&"LI"==
-y.parentNode.nodeName)}l?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?f.stopEditing(!1):f.cellEditor.insertTab(f.cellEditor.isContentEditing()?null:4)}catch(q){}else mxEvent.isAltDown(b)?f.selectParentCell():f.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
+EditorUi.prototype.onKeyDown=function(b){var f=this.editor.graph;if(9==b.which&&f.isEnabled()&&!mxEvent.isControlDown(b)){if(f.isEditing())if(mxEvent.isAltDown(b))f.stopEditing(!1);else try{var m=f.cellEditor.isContentEditing()&&f.cellEditor.isTextSelected();if(window.getSelection&&f.cellEditor.isContentEditing()&&!m&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=window.getSelection(),y=0<t.rangeCount?t.getRangeAt(0).commonAncestorContainer:null;m=null!=y&&("LI"==y.nodeName||null!=y.parentNode&&"LI"==
+y.parentNode.nodeName)}m?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?f.stopEditing(!1):f.cellEditor.insertTab(f.cellEditor.isContentEditing()?null:4)}catch(q){}else mxEvent.isAltDown(b)?f.selectParentCell():f.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
EditorUi.prototype.onKeyPress=function(b){var f=this.editor.graph;!this.isImmediateEditingEvent(b)||f.isEditing()||f.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(f.escape(),f.startEditing(null,String.fromCharCode(b.which)))};EditorUi.prototype.isImmediateEditingEvent=function(b){return!0};
-EditorUi.prototype.updateCssForMarker=function(b,f,l,u,y){l=this.getImageForMarker(u,y,l);b.innerHTML="";null==l?b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")):(u=document.createElement("img"),u.setAttribute("src",l),"end"==f&&mxUtils.setPrefixedStyle(u.style,"transform","scaleX(-1)"),b.appendChild(u))};
-EditorUi.prototype.getImageForMarker=function(b,f,l){return"flexArrow"==l?null!=b&&b!=mxConstants.NONE?Format.blockMarkerImage.src:null:b==mxConstants.ARROW_CLASSIC?"1"!=f?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?"1"!=f?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?
+EditorUi.prototype.updateCssForMarker=function(b,f,m,t,y){m=this.getImageForMarker(t,y,m);b.innerHTML="";null==m?b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")):(t=document.createElement("img"),t.setAttribute("src",m),"end"==f&&mxUtils.setPrefixedStyle(t.style,"transform","scaleX(-1)"),b.appendChild(t))};
+EditorUi.prototype.getImageForMarker=function(b,f,m){return"flexArrow"==m?null!=b&&b!=mxConstants.NONE?Format.blockMarkerImage.src:null:b==mxConstants.ARROW_CLASSIC?"1"!=f?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?"1"!=f?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?
"1"!=f?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK_THIN?"1"!=f?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?"1"!=f?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?"1"!=f?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?"1"!=f?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==
b?"1"!=f?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:"box"==b?Format.boxMarkerImage.src:"halfCircle"==b?Format.halfCircleMarkerImage.src:"openAsync"==b?Format.openAsyncFilledMarkerImage.src:"async"==b?"1"!=f?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?Format.dashMarkerImage.src:"baseDash"==b?Format.baseDashMarkerImage.src:"cross"==b?Format.crossMarkerImage.src:"circle"==b?Format.circleMarkerImage.src:"circlePlus"==b?Format.circlePlusMarkerImage.src:
"ERone"==b?Format.EROneMarkerImage.src:"ERmandOne"==b?Format.ERmandOneMarkerImage.src:"ERmany"==b?Format.ERmanyMarkerImage.src:"ERoneToMany"==b?Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b?Format.ERzeroToManyMarkerImage.src:null};
EditorUi.prototype.getImageForEdgeShape=function(b){var f=Format.connectionImage.src;"link"==b.shape?f=Format.linkEdgeImage.src:"flexArrow"==b.shape?f=Format.arrowImage.src:"arrow"==b.shape?f=Format.simpleArrowImage.src:"filledEdge"==b.shape?f=Format.filledEdgeImage.src:"pipe"==b.shape?f=Format.pipeEdgeImage.src:"wire"==b.shape&&(f=Format.wireEdgeImage.src);return f};
-EditorUi.prototype.getImageForEdgeStyle=function(b){var f=Format.orthogonalImage.src,l=mxUtils.getValue(b,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(b,mxConstants.STYLE_NOEDGESTYLE,null)&&(l=null);"orthogonalEdgeStyle"==l&&"1"==mxUtils.getValue(b,mxConstants.STYLE_CURVED,null)?f=Format.curvedImage.src:"straight"==l||"none"==l||null==l?f=Format.straightImage.src:"entityRelationEdgeStyle"==l?f=Format.entityImage.src:"elbowEdgeStyle"==l?f="vertical"==mxUtils.getValue(b,mxConstants.STYLE_ELBOW,
-null)?Format.verticalElbowImage.src:Format.horizontalElbowImage.src:"isometricEdgeStyle"==l&&(f="vertical"==mxUtils.getValue(b,mxConstants.STYLE_ELBOW,null)?Format.verticalIsometricImage.src:Format.horizontalIsometricImage.src);return f};EditorUi.prototype.createMenus=function(){return null};
-EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,f=this.actions.get("paste"),l=this.actions.get("pasteHere");f.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));l.setEnabled(f.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,f=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):f.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var C=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{C=C||q.getSelectionCells();C=q.getExportableCells(q.model.getTopmostCells(C));for(var J={},S=q.createCellLookup(C),D=q.cloneCells(C,null,J),P=new mxGraphModel,c=P.getChildAt(P.getRoot(),
-0),g=0;g<D.length;g++){P.add(c,D[g]);var m=q.view.getState(C[g]);if(null!=m){var n=q.getCellGeometry(D[g]);null!=n&&n.relative&&!P.isEdge(C[g])&&null==S[mxObjectIdentity.get(P.getParent(C[g]))]&&(n.offset=null,n.relative=!1,n.x=m.x/m.view.scale-m.view.translate.x,n.y=m.y/m.view.scale-m.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(J,S),D);mxClipboard.insertCount=1;mxClipboard.setCells(D)}b.updatePasteActionStates();return C};var l=mxClipboard.paste;mxClipboard.paste=function(q){var C=
-null;q.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):C=l.apply(this,arguments);b.updatePasteActionStates();return C};var u=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){u.apply(this,arguments);b.updatePasteActionStates()};var y=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(q,C){y.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.getImageForEdgeStyle=function(b){var f=Format.orthogonalImage.src,m=mxUtils.getValue(b,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(b,mxConstants.STYLE_NOEDGESTYLE,null)&&(m=null);"orthogonalEdgeStyle"==m&&"1"==mxUtils.getValue(b,mxConstants.STYLE_CURVED,null)?f=Format.curvedImage.src:"straight"==m||"none"==m||null==m?f=Format.straightImage.src:"entityRelationEdgeStyle"==m?f=Format.entityImage.src:"elbowEdgeStyle"==m?f="vertical"==mxUtils.getValue(b,mxConstants.STYLE_ELBOW,
+null)?Format.verticalElbowImage.src:Format.horizontalElbowImage.src:"isometricEdgeStyle"==m&&(f="vertical"==mxUtils.getValue(b,mxConstants.STYLE_ELBOW,null)?Format.verticalIsometricImage.src:Format.horizontalIsometricImage.src);return f};EditorUi.prototype.createMenus=function(){return null};
+EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,f=this.actions.get("paste"),m=this.actions.get("pasteHere");f.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));m.setEnabled(f.isEnabled())};
+EditorUi.prototype.initClipboard=function(){var b=this,f=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):f.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var B=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{B=B||q.getSelectionCells();B=q.getExportableCells(q.model.getTopmostCells(B));for(var I={},S=q.createCellLookup(B),D=q.cloneCells(B,null,I),P=new mxGraphModel,c=P.getChildAt(P.getRoot(),
+0),g=0;g<D.length;g++){P.add(c,D[g]);var l=q.view.getState(B[g]);if(null!=l){var n=q.getCellGeometry(D[g]);null!=n&&n.relative&&!P.isEdge(B[g])&&null==S[mxObjectIdentity.get(P.getParent(B[g]))]&&(n.offset=null,n.relative=!1,n.x=l.x/l.view.scale-l.view.translate.x,n.y=l.y/l.view.scale-l.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(I,S),D);mxClipboard.insertCount=1;mxClipboard.setCells(D)}b.updatePasteActionStates();return B};var m=mxClipboard.paste;mxClipboard.paste=function(q){var B=
+null;q.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):B=m.apply(this,arguments);b.updatePasteActionStates();return B};var t=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){t.apply(this,arguments);b.updatePasteActionStates()};var y=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(q,B){y.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var U=this.graph.getPageLayout(),Y=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+U.x*Y.width),this.scale*(this.translate.y+U.y*Y.height),this.scale*U.width*Y.width,
-this.scale*U.height*Y.height)};b.getPreferredPageSize=function(U,Y,fa){U=this.getPageLayout();Y=this.getPageSize();return new mxRectangle(0,0,U.width*Y.width,U.height*Y.height)};var f=null,l=this;if(this.editor.isChromelessView()){this.chromelessResize=f=mxUtils.bind(this,function(U,Y,fa,na){if(null!=b.container&&!b.isViewer()){fa=null!=fa?fa:0;na=null!=na?na:0;var la=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),qa=mxUtils.hasScrollbars(b.container),ya=b.view.translate,wa=b.view.scale,
+this.scale*U.height*Y.height)};b.getPreferredPageSize=function(U,Y,fa){U=this.getPageLayout();Y=this.getPageSize();return new mxRectangle(0,0,U.width*Y.width,U.height*Y.height)};var f=null,m=this;if(this.editor.isChromelessView()){this.chromelessResize=f=mxUtils.bind(this,function(U,Y,fa,oa){if(null!=b.container&&!b.isViewer()){fa=null!=fa?fa:0;oa=null!=oa?oa:0;var la=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),qa=mxUtils.hasScrollbars(b.container),ya=b.view.translate,wa=b.view.scale,
Ia=mxRectangle.fromRectangle(la);Ia.x=Ia.x/wa-ya.x;Ia.y=Ia.y/wa-ya.y;Ia.width/=wa;Ia.height/=wa;ya=b.container.scrollTop;var Aa=b.container.scrollLeft,Ba=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ba+=3;var Ga=b.container.offsetWidth-Ba;Ba=b.container.offsetHeight-Ba;U=U?Math.max(.3,Math.min(Y||1,Ga/Ia.width)):wa;Y=(Ga-U*Ia.width)/2/U;var Ma=0==this.lightboxVerticalDivider?0:(Ba-U*Ia.height)/this.lightboxVerticalDivider/U;qa&&(Y=Math.max(Y,0),Ma=Math.max(Ma,
-0));if(qa||la.width<Ga||la.height<Ba)b.view.scaleAndTranslate(U,Math.floor(Y-Ia.x),Math.floor(Ma-Ia.y)),b.container.scrollTop=ya*U/wa,b.container.scrollLeft=Aa*U/wa;else if(0!=fa||0!=na)la=b.view.translate,b.view.setTranslate(Math.floor(la.x+fa/wa),Math.floor(la.y+na/wa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var u=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",u);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",u)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(U){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(U){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var y=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
+0));if(qa||la.width<Ga||la.height<Ba)b.view.scaleAndTranslate(U,Math.floor(Y-Ia.x),Math.floor(Ma-Ia.y)),b.container.scrollTop=ya*U/wa,b.container.scrollLeft=Aa*U/wa;else if(0!=fa||0!=oa)la=b.view.translate,b.view.setTranslate(Math.floor(la.x+fa/wa),Math.floor(la.y+oa/wa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var t=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",t);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",t)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(U){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(U){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var y=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var q=mxUtils.bind(this,function(){var U=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=U?parseInt(U["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",q);q();var C=0;q=mxUtils.bind(this,function(U,Y,fa){C++;
-var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",U);null!=fa&&na.setAttribute("title",fa);U=document.createElement("img");U.setAttribute("border","0");U.setAttribute("src",Y);U.style.width="36px";U.style.filter="invert(100%)";na.appendChild(U);this.chromelessToolbar.appendChild(na);return na});if(null!=y.backBtn){var J=Graph.sanitizeLink(y.backBtn.url);null!=J&&q(mxUtils.bind(this,function(U){window.location.href=
-J;mxEvent.consume(U)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=q(mxUtils.bind(this,function(U){this.actions.get("previousPage").funct();mxEvent.consume(U)}),Editor.chevronLeftImage,mxResources.get("previousPage")),D=document.createElement("div");D.style.fontFamily=Editor.defaultHtmlFont;D.style.display="inline-block";D.style.verticalAlign="top";D.style.fontWeight="bold";D.style.marginTop="8px";D.style.fontSize="14px";D.style.cursor="default";D.style.color=
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var q=mxUtils.bind(this,function(){var U=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=U?parseInt(U["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",q);q();var B=0;q=mxUtils.bind(this,function(U,Y,fa){B++;
+var oa=document.createElement("span");oa.style.paddingLeft="8px";oa.style.paddingRight="8px";oa.style.cursor="pointer";mxEvent.addListener(oa,"click",U);null!=fa&&oa.setAttribute("title",fa);U=document.createElement("img");U.setAttribute("border","0");U.setAttribute("src",Y);U.style.width="36px";U.style.filter="invert(100%)";oa.appendChild(U);this.chromelessToolbar.appendChild(oa);return oa});if(null!=y.backBtn){var I=Graph.sanitizeLink(y.backBtn.url);null!=I&&q(mxUtils.bind(this,function(U){window.location.href=
+I;mxEvent.consume(U)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=q(mxUtils.bind(this,function(U){this.actions.get("previousPage").funct();mxEvent.consume(U)}),Editor.chevronLeftImage,mxResources.get("previousPage")),D=document.createElement("div");D.style.fontFamily=Editor.defaultHtmlFont;D.style.display="inline-block";D.style.verticalAlign="top";D.style.fontWeight="bold";D.style.marginTop="8px";D.style.fontSize="14px";D.style.cursor="default";D.style.color=
mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(D);var P=q(mxUtils.bind(this,function(U){this.actions.get("nextPage").funct();mxEvent.consume(U)}),Editor.chevronRightImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){D.innerText="";var U=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(D,U+1+" / "+this.pages.length);D.setAttribute("title",mxResources.get("currentPage")+
": "+this.currentPage.getName());S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(U-1,this.pages.length)].getName());P.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(U+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";P.style.paddingLeft="4px";P.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(P.style.display="",S.style.display=
-"",D.style.display="inline-block"):(P.style.display="none",S.style.display="none",D.style.display="none");c()});if(null!=this.menus){var m=this.menus.get("pages");null!=m&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(U){var Y=new mxPopupMenu(m.funct);Y.smartSeparators=!0;Y.showDisabled=!0;Y.autoExpand=!0;Y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(Y,arguments);Y.destroy()});var fa=mxUtils.getOffset(D);Y.popup(fa.x,fa.y+D.offsetHeight,null,U);mxEvent.addListener(Y.div,
+"",D.style.display="inline-block"):(P.style.display="none",S.style.display="none",D.style.display="none");c()});if(null!=this.menus){var l=this.menus.get("pages");null!=l&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(U){var Y=new mxPopupMenu(l.funct);Y.smartSeparators=!0;Y.showDisabled=!0;Y.autoExpand=!0;Y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(Y,arguments);Y.destroy()});var fa=mxUtils.getOffset(D);Y.popup(fa.x,fa.y+D.offsetHeight,null,U);mxEvent.addListener(Y.div,
"mouseleave",mxUtils.bind(this,function(){Y.hideMenu()}))}))}this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",c)}q(mxUtils.bind(this,function(U){this.actions.get("zoomOut").funct();mxEvent.consume(U)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){this.actions.get("zoomIn").funct();mxEvent.consume(U)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){b.isLightboxView()?
(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(U)}),Editor.zoomFitImage,mxResources.get("fit"));var n=null,x=null,F=mxUtils.bind(this,function(U){null!=n&&(window.clearTimeout(n),n=null);null!=x&&(window.clearTimeout(x),x=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;x=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";x=null}),
-600)}),U||200)}),H=mxUtils.bind(this,function(U){null!=n&&(window.clearTimeout(n),n=null);null!=x&&(window.clearTimeout(x),x=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,U||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=q(mxUtils.bind(this,function(U){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var Y=M.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
+600)}),U||200)}),G=mxUtils.bind(this,function(U){null!=n&&(window.clearTimeout(n),n=null);null!=x&&(window.clearTimeout(x),x=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,U||30)});if("1"==urlParams.layers){this.layersDialog=null;var L=q(mxUtils.bind(this,function(U){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var Y=L.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
Y.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));Y=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
-Y.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(U)}),Editor.layersImage,mxResources.get("layers")),L=b.getModel();L.addListener(mxEvent.CHANGE,function(){M.style.display=1<L.getChildCount(L.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(q);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||q(mxUtils.bind(this,function(U){if(null!=this.editor.editButtonFunc)this.editor.editButtonFunc();
+Y.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(U)}),Editor.layersImage,mxResources.get("layers")),M=b.getModel();M.addListener(mxEvent.CHANGE,function(){L.style.display=1<M.getChildCount(M.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(q);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||q(mxUtils.bind(this,function(U){if(null!=this.editor.editButtonFunc)this.editor.editButtonFunc();
else if("_blank"==this.editor.editButtonLink){var Y=null!=this.currentPage?this.currentPage.getId():null;this.editor.editAsNew(this.getEditBlankXml(),null,null,Y)}else b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(U)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(g=0;g<this.lightboxToolbarActions.length;g++){var K=this.lightboxToolbarActions[g];K.elem=q(K.fn,K.icon,K.tooltip)}if(null!=y.refreshBtn){var Z=null==y.refreshBtn.url?null:Graph.sanitizeLink(y.refreshBtn.url);
q(mxUtils.bind(this,function(U){null!=Z?window.location.href=Z:window.location.reload();mxEvent.consume(U)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=y.fullscreenBtn&&window.self!==window.top&&q(mxUtils.bind(this,function(U){y.fullscreenBtn.url?b.openLink(y.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(U)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!y.noCloseBtn&&(y.closeBtn&&window.self===window.top||b.lightbox&&
("1"==urlParams.close||this.container!=document.body))&&q(mxUtils.bind(this,function(U){"1"==urlParams.close||y.closeBtn?window.close():(this.destroy(),mxEvent.consume(U))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",
-mxUtils.bind(this,function(U){mxEvent.isTouchEvent(U)||(mxEvent.isShiftDown(U)||H(30),F())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(U){mxEvent.consume(U)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(U){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(U)?F():H(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(U){mxEvent.isShiftDown(U)?
-F():H(100);mxEvent.consume(U)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(U){mxEvent.isTouchEvent(U)||H(30)}));var ha=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(U,Y){this.startX=Y.getGraphX();this.startY=Y.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(U,Y){},mouseUp:function(U,Y){mxEvent.isTouchEvent(Y.getEvent())&&Math.abs(this.scrollLeft-
-b.container.scrollLeft)<ha&&Math.abs(this.scrollTop-b.container.scrollTop)<ha&&Math.abs(this.startX-Y.getGraphX())<ha&&Math.abs(this.startY-Y.getGraphY())<ha&&(0<parseFloat(l.chromelessToolbar.style.opacity||0)?F():H(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ca=b.view.validate,aa=new mxPoint,oa=!1,da=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=l.currentPage&&da!=l.currentPage){da=l.currentPage;
-oa=!0;var U=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,!0);null==U&&(U=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));U=b.getPageLayout(U,aa,1);var Y=b.getDefaultTranslate(U);this.x0=U.x;this.y0=U.y;if(Y.x!=this.translate.x||Y.y!=this.translate.y)this.invalidate(),this.translate.x=Y.x,this.translate.y=Y.y}Y=b.getPagePadding();var fa=b.getPageSize();U=Y.x-(this.x0||0)*fa.width;Y=Y.y-(this.y0||0)*fa.height;if(this.translate.x!=U||this.translate.y!=Y)this.invalidate(),
-this.translate.x=U,this.translate.y=Y}ca.apply(this,arguments)};if(!b.isViewer()){var ka=b.sizeDidChange;b.sizeDidChange=function(){var U=oa;oa=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var Y=this.getPageLayout(),fa=this.getDefaultTranslate(Y),na=this.view.translate.x,la=this.view.translate.y;if(fa.x!=na||fa.y!=la){this.view.x0=Y.x;this.view.y0=Y.y;this.autoTranslate=!0;this.view.setTranslate(fa.x,fa.y);this.autoTranslate=!1;
-U||(this.container.scrollLeft+=Math.round((fa.x-na)*this.view.scale),this.container.scrollTop+=Math.round((fa.y-la)*this.view.scale));return}}ka.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ba=b.view.getBackgroundPane(),V=b.view.getDrawPane();b.cumulativeZoomFactor=1;var k=null,v=null,I=null,N=null,T=null,W=function(U){null!=k&&window.clearTimeout(k);0<=U&&window.setTimeout(function(){if(!b.isMouseDown||N)k=window.setTimeout(mxUtils.bind(this,
-function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),V.style.transformOrigin="",ba.style.transformOrigin="",mxClient.IS_SF?(V.style.transform="scale(1)",ba.style.transform="scale(1)",window.setTimeout(function(){V.style.transform="";ba.style.transform=""},0)):(V.style.transform=
-"",ba.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var Y=new mxPoint(b.container.scrollLeft,b.container.scrollTop),fa=mxUtils.getOffset(b.container),na=b.view.scale,la=0,qa=0;null!=v&&(la=b.container.offsetWidth/2-v.x+fa.x,qa=b.container.offsetHeight/2-v.y+fa.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=na&&(null!=I&&(la+=Y.x-I.x,qa+=Y.y-I.y),null!=f&&l.chromelessResize(!1,null,la*(b.cumulativeZoomFactor-
-1),qa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==la&&0==qa||(b.container.scrollLeft-=la*(b.cumulativeZoomFactor-1),b.container.scrollTop-=qa*(b.cumulativeZoomFactor-1)));null!=T&&V.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=N=v=I=k=null}),null!=U?U:b.isFastZoomEnabled()?l.wheelZoomDelay:l.lazyZoomDelay)},0)};b.lazyZoom=function(U,Y,fa,na){na=null!=na?na:this.zoomFactor;(Y=Y||!b.scrollbars)&&(v=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+
-b.container.clientHeight/2));U?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*
-100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==T&&""!=V.getAttribute("filter")&&(T=V.getAttribute("filter"),V.removeAttribute("filter"));I=new mxPoint(b.container.scrollLeft,b.container.scrollTop);U=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);na=Y||null==v?b.container.scrollLeft+b.container.clientWidth/2:v.x+b.container.scrollLeft-
-b.container.offsetLeft;var la=Y||null==v?b.container.scrollTop+b.container.clientHeight/2:v.y+b.container.scrollTop-b.container.offsetTop;V.style.transformOrigin=na+"px "+la+"px";V.style.transform="scale("+U+")";ba.style.transformOrigin=na+"px "+la+"px";ba.style.transform="scale("+U+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(na=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(na.style,"transform-origin",(Y||null==v?b.container.clientWidth/2+b.container.scrollLeft-
-na.offsetLeft+"px":v.x+b.container.scrollLeft-na.offsetLeft-b.container.offsetLeft+"px")+" "+(Y||null==v?b.container.clientHeight/2+b.container.scrollTop-na.offsetTop+"px":v.y+b.container.scrollTop-na.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(na.style,"transform","scale("+U+")")):b.view.validateBackgroundStyles(U,na,la);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=l.hoverIcons&&l.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview",
-"factor",U))}W(b.isFastZoomEnabled()?fa:0)};mxEvent.addGestureListeners(b.container,function(U){null!=k&&window.clearTimeout(k)},null,function(U){1!=b.cumulativeZoomFactor&&W(0)});mxEvent.addListener(b.container,"scroll",function(U){null==k||b.isMouseDown||1==b.cumulativeZoomFactor||W(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(U,Y,fa,na,la){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!fa&&b.isScrollWheelEvent(U))fa=b.view.getTranslate(),
-na=40/b.view.scale,mxEvent.isShiftDown(U)?b.view.setTranslate(fa.x+(Y?-na:na),fa.y):b.view.setTranslate(fa.x,fa.y+(Y?na:-na));else if(fa||b.isZoomWheelEvent(U))for(var qa=mxEvent.getSource(U);null!=qa;){if(qa==b.container)return b.tooltipHandler.hideTooltip(),v=null!=na&&null!=la?new mxPoint(na,la):new mxPoint(mxEvent.getClientX(U),mxEvent.getClientY(U)),N=fa,fa=b.zoomFactor,na=null,U.ctrlKey&&null!=U.deltaY&&40>Math.abs(U.deltaY)&&Math.round(U.deltaY)!=U.deltaY?fa=1+Math.abs(U.deltaY)/20*(fa-1):
-null!=U.movementY&&"pointermove"==U.type&&(fa=1+Math.max(1,Math.abs(U.movementY))/20*(fa-1),na=-1),b.lazyZoom(Y,null,na,fa),mxEvent.consume(U),!1;qa=qa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(U){b.cumulativeZoomFactor=U.scale;b.lazyZoom(0<U.scale,!0);mxEvent.consume(U)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(f){this.actions.get("print").funct();mxEvent.consume(f)}),Editor.printImage,mxResources.get("print"))};
+mxUtils.bind(this,function(U){mxEvent.isTouchEvent(U)||(mxEvent.isShiftDown(U)||G(30),F())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(U){mxEvent.consume(U)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(U){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(U)?F():G(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(U){mxEvent.isShiftDown(U)?
+F():G(100);mxEvent.consume(U)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(U){mxEvent.isTouchEvent(U)||G(30)}));var ja=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(U,Y){this.startX=Y.getGraphX();this.startY=Y.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(U,Y){},mouseUp:function(U,Y){mxEvent.isTouchEvent(Y.getEvent())&&Math.abs(this.scrollLeft-
+b.container.scrollLeft)<ja&&Math.abs(this.scrollTop-b.container.scrollTop)<ja&&Math.abs(this.startX-Y.getGraphX())<ja&&Math.abs(this.startY-Y.getGraphY())<ja&&(0<parseFloat(m.chromelessToolbar.style.opacity||0)?F():G(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var da=b.view.validate,ba=new mxPoint,na=!1,ca=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=m.currentPage&&ca!=m.currentPage){ca=m.currentPage;
+na=!0;var U=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,!0);null==U&&(U=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));U=b.getPageLayout(U,ba,1);var Y=b.getDefaultTranslate(U);this.x0=U.x;this.y0=U.y;if(Y.x!=this.translate.x||Y.y!=this.translate.y)this.invalidate(),this.translate.x=Y.x,this.translate.y=Y.y}Y=b.getPagePadding();var fa=b.getPageSize();U=Y.x-(this.x0||0)*fa.width;Y=Y.y-(this.y0||0)*fa.height;if(this.translate.x!=U||this.translate.y!=Y)this.invalidate(),
+this.translate.x=U,this.translate.y=Y}da.apply(this,arguments)};if(!b.isViewer()){var ka=b.sizeDidChange;b.sizeDidChange=function(){var U=na;na=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var Y=this.getPageLayout(),fa=this.getDefaultTranslate(Y),oa=this.view.translate.x,la=this.view.translate.y;if(fa.x!=oa||fa.y!=la){this.view.x0=Y.x;this.view.y0=Y.y;this.autoTranslate=!0;this.view.setTranslate(fa.x,fa.y);this.autoTranslate=!1;
+U||(this.container.scrollLeft+=Math.round((fa.x-oa)*this.view.scale),this.container.scrollTop+=Math.round((fa.y-la)*this.view.scale));return}}ka.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var aa=b.view.getBackgroundPane(),V=b.view.getDrawPane();b.cumulativeZoomFactor=1;var k=null,v=null,J=null,N=null,T=null,W=function(U){null!=k&&window.clearTimeout(k);0<=U&&window.setTimeout(function(){if(!b.isMouseDown||N)k=window.setTimeout(mxUtils.bind(this,
+function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),V.style.transformOrigin="",aa.style.transformOrigin="",mxClient.IS_SF?(V.style.transform="scale(1)",aa.style.transform="scale(1)",window.setTimeout(function(){V.style.transform="";aa.style.transform=""},0)):(V.style.transform=
+"",aa.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var Y=new mxPoint(b.container.scrollLeft,b.container.scrollTop),fa=mxUtils.getOffset(b.container),oa=b.view.scale,la=0,qa=0;null!=v&&(la=b.container.offsetWidth/2-v.x+fa.x,qa=b.container.offsetHeight/2-v.y+fa.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=oa&&(null!=J&&(la+=Y.x-J.x,qa+=Y.y-J.y),null!=f&&m.chromelessResize(!1,null,la*(b.cumulativeZoomFactor-
+1),qa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==la&&0==qa||(b.container.scrollLeft-=la*(b.cumulativeZoomFactor-1),b.container.scrollTop-=qa*(b.cumulativeZoomFactor-1)));null!=T&&V.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=N=v=J=k=null}),null!=U?U:b.isFastZoomEnabled()?m.wheelZoomDelay:m.lazyZoomDelay)},0)};b.lazyZoom=function(U,Y,fa,oa){oa=null!=oa?oa:this.zoomFactor;(Y=Y||!b.scrollbars)&&(v=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+
+b.container.clientHeight/2));U?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=oa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=oa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*
+100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==T&&""!=V.getAttribute("filter")&&(T=V.getAttribute("filter"),V.removeAttribute("filter"));J=new mxPoint(b.container.scrollLeft,b.container.scrollTop);U=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);oa=Y||null==v?b.container.scrollLeft+b.container.clientWidth/2:v.x+b.container.scrollLeft-
+b.container.offsetLeft;var la=Y||null==v?b.container.scrollTop+b.container.clientHeight/2:v.y+b.container.scrollTop-b.container.offsetTop;V.style.transformOrigin=oa+"px "+la+"px";V.style.transform="scale("+U+")";aa.style.transformOrigin=oa+"px "+la+"px";aa.style.transform="scale("+U+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(oa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(oa.style,"transform-origin",(Y||null==v?b.container.clientWidth/2+b.container.scrollLeft-
+oa.offsetLeft+"px":v.x+b.container.scrollLeft-oa.offsetLeft-b.container.offsetLeft+"px")+" "+(Y||null==v?b.container.clientHeight/2+b.container.scrollTop-oa.offsetTop+"px":v.y+b.container.scrollTop-oa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(oa.style,"transform","scale("+U+")")):b.view.validateBackgroundStyles(U,oa,la);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=m.hoverIcons&&m.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview",
+"factor",U))}W(b.isFastZoomEnabled()?fa:0)};mxEvent.addGestureListeners(b.container,function(U){null!=k&&window.clearTimeout(k)},null,function(U){1!=b.cumulativeZoomFactor&&W(0)});mxEvent.addListener(b.container,"scroll",function(U){null==k||b.isMouseDown||1==b.cumulativeZoomFactor||W(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(U,Y,fa,oa,la){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!fa&&b.isScrollWheelEvent(U))fa=b.view.getTranslate(),
+oa=40/b.view.scale,mxEvent.isShiftDown(U)?b.view.setTranslate(fa.x+(Y?-oa:oa),fa.y):b.view.setTranslate(fa.x,fa.y+(Y?oa:-oa));else if(fa||b.isZoomWheelEvent(U))for(var qa=mxEvent.getSource(U);null!=qa;){if(qa==b.container)return b.tooltipHandler.hideTooltip(),v=null!=oa&&null!=la?new mxPoint(oa,la):new mxPoint(mxEvent.getClientX(U),mxEvent.getClientY(U)),N=fa,fa=b.zoomFactor,oa=null,U.ctrlKey&&null!=U.deltaY&&40>Math.abs(U.deltaY)&&Math.round(U.deltaY)!=U.deltaY?fa=1+Math.abs(U.deltaY)/20*(fa-1):
+null!=U.movementY&&"pointermove"==U.type&&(fa=1+Math.max(1,Math.abs(U.movementY))/20*(fa-1),oa=-1),b.lazyZoom(Y,null,oa,fa),mxEvent.consume(U),!1;qa=qa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(U){b.cumulativeZoomFactor=U.scale;b.lazyZoom(0<U.scale,!0);mxEvent.consume(U)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(f){this.actions.get("print").funct();mxEvent.consume(f)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;if(null!=this.format){var f=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.formatContainer.style,"transition","width "+f+"s ease-in-out");window.setTimeout(mxUtils.bind(this,function(){this.formatWidth=b?240:0;this.hsplitPosition=Math.min(this.container.clientWidth-this.hsplit.clientWidth-this.formatWidth,this.hsplitPosition);this.refresh();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.formatContainer.style,
-"transition",null);this.refresh(!0);this.fireEvent(new mxEventObject("formatWidthChanged"))}),1E3*f)},0))}};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var f=urlParams.border,l=60;null!=f&&(l=parseInt(f));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(l,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};
+"transition",null);this.refresh(!0);this.fireEvent(new mxEventObject("formatWidthChanged"))}),1E3*f)},0))}};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var f=urlParams.border,m=60;null!=f&&(m=parseInt(f));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(m,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};
EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};
EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,f){try{var l=mxUtils.parseXml(b);this.editor.setGraphXml(l.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=f&&(this.editor.setFilename(f),this.updateDocumentTitle())}catch(u){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+u.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPrintDialog=function(b,f){this.showDialog((new PrintDialog(this,b,f)).container,300,180,!0,!0)};EditorUi.prototype.showPopupMenu=function(b,f,l,u){this.editor.graph.popupMenuHandler.hideMenu();var y=new mxPopupMenu(b);y.smartSeparators=!0;y.showDisabled=!0;y.autoExpand=!0;y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(y,arguments);y.destroy()});y.popup(f,l,null,u);this.setCurrentMenu(y)};
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,f){try{var m=mxUtils.parseXml(b);this.editor.setGraphXml(m.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=f&&(this.editor.setFilename(f),this.updateDocumentTitle())}catch(t){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+t.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPrintDialog=function(b,f){this.showDialog((new PrintDialog(this,b,f)).container,300,180,!0,!0)};EditorUi.prototype.showPopupMenu=function(b,f,m,t){this.editor.graph.popupMenuHandler.hideMenu();var y=new mxPopupMenu(b);y.smartSeparators=!0;y.showDisabled=!0;y.autoExpand=!0;y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(y,arguments);y.destroy()});y.popup(f,m,null,t);this.setCurrentMenu(y)};
EditorUi.prototype.isHideCurrentMenuEvent=function(b){b=mxEvent.getSource(b);if(null!=this.currentMenu){if(b==this.currentMenu.div)return!1;for(var f=this.currentMenu.activeRow;null!=f;){if(b==f.div)return!1;f=f.activeRow}return!0}return!1};EditorUi.prototype.setCurrentMenu=function(b,f){this.currentMenuElt=f;this.currentMenu=b;this.hideShapePicker()};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};
EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(b){}};
-EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var f=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);f==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(l){}};EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};
+EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var f=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);f==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(m){}};EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};
EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml()}};EditorUi.prototype.updateDiagramData=function(b,f){this.replaceDiagramData(xUtils.getXml(f))};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.beginUpdate();try{this.editor.setGraphXml(mxUtils.parseXml(b).documentElement)}finally{this.editor.graph.model.endUpdate()}};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};
-EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var f=0<b.indexOf("?")?1:0,l;for(l in urlParams)b=0==f?b+"?":b+"&",b+=l+"="+urlParams[l],f++;return b};EditorUi.prototype.setScrollbars=function(b){var f=this.editor.graph,l=f.container.style.overflow;f.scrollbars=b;this.editor.updateGraphComponents();l!=f.container.style.overflow&&(f.container.scrollTop=0,f.container.scrollLeft=0,f.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};
-EditorUi.prototype.fitDiagramToWindow=function(){var b=this.editor.graph,f=b.isSelectionEmpty()?mxRectangle.fromRectangle(b.getGraphBounds()):b.getBoundingBox(b.getSelectionCells()),l=b.view.translate,u=b.view.scale;f.x=f.x/u-l.x;f.y=f.y/u-l.y;f.width/=u;f.height/=u;null!=b.backgroundImage&&f.add(new mxRectangle(0,0,b.backgroundImage.width,b.backgroundImage.height));0==f.width||0==f.height?(b.zoomTo(1),this.resetScrollbars()):(l=Editor.fitWindowBorders,null!=l&&(f.x-=l.x,f.y-=l.y,f.width+=l.width+
-l.x,f.height+=l.height+l.y),b.fitWindow(f))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
-EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph,f=b.container;if(!this.editor.extendCanvas)f.scrollTop=0,f.scrollLeft=0,mxUtils.hasScrollbars(f)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(f))if(b.pageVisible){var l=b.getPagePadding();f.scrollTop=Math.floor(l.y);f.scrollLeft=Math.floor(Math.min(l.x,(f.scrollWidth-f.clientWidth)/2));l=b.getGraphBounds();0<l.width&&0<l.height&&(l.x>f.scrollLeft+.9*f.clientWidth&&(f.scrollLeft=Math.min(l.x+
-l.width-f.clientWidth,l.x-10)),l.y>f.scrollTop+.9*f.clientHeight&&(f.scrollTop=Math.min(l.y+l.height-f.clientHeight,l.y-10)))}else if(l=b.getGraphBounds(),0==l.width&&0==l.height)f.scrollLeft=(f.scrollWidth-f.clientWidth)/2,f.scrollTop=(f.scrollHeight-f.clientHeight)/2;else{var u=Math.max(l.height,b.scrollTileSize.height*b.view.scale);f.scrollLeft=Math.floor(Math.max(0,l.x-Math.max(0,(f.clientWidth-Math.max(l.width,b.scrollTileSize.width*b.view.scale))/2)));f.scrollTop=Math.floor(Math.max(0,l.y-Math.max(20,
-(f.clientHeight-u)/4)))}else{l=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());u=b.view.translate;var y=b.view.scale;l.x=l.x/y-u.x;l.y=l.y/y-u.y;l.width/=y;l.height/=y;b.view.setTranslate(Math.floor(Math.max(0,(f.clientWidth-l.width)/2)-l.x+2),Math.floor((b.pageVisible?0:Math.max(0,(f.clientHeight-l.height)/4))-l.y+1))}};
-EditorUi.prototype.setPageVisible=function(b){var f=this.editor.graph,l=mxUtils.hasScrollbars(f.container),u=0,y=0;l&&(u=f.view.translate.x*f.view.scale-f.container.scrollLeft,y=f.view.translate.y*f.view.scale-f.container.scrollTop);f.pageVisible=b;f.pageBreaksVisible=b;f.preferPageSize=b;f.view.validateBackground();if(l){var q=f.getSelectionCells();f.clearSelection();f.setSelectionCells(q)}f.sizeDidChange();l&&(f.container.scrollLeft=f.view.translate.x*f.view.scale-u,f.container.scrollTop=f.view.translate.y*
+EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var f=0<b.indexOf("?")?1:0,m;for(m in urlParams)b=0==f?b+"?":b+"&",b+=m+"="+urlParams[m],f++;return b};EditorUi.prototype.setScrollbars=function(b){var f=this.editor.graph,m=f.container.style.overflow;f.scrollbars=b;this.editor.updateGraphComponents();m!=f.container.style.overflow&&(f.container.scrollTop=0,f.container.scrollLeft=0,f.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};
+EditorUi.prototype.fitDiagramToWindow=function(){var b=this.editor.graph,f=b.isSelectionEmpty()?mxRectangle.fromRectangle(b.getGraphBounds()):b.getBoundingBox(b.getSelectionCells()),m=b.view.translate,t=b.view.scale;f.x=f.x/t-m.x;f.y=f.y/t-m.y;f.width/=t;f.height/=t;null!=b.backgroundImage&&f.add(new mxRectangle(0,0,b.backgroundImage.width,b.backgroundImage.height));0==f.width||0==f.height?(b.zoomTo(1),this.resetScrollbars()):(m=Editor.fitWindowBorders,null!=m&&(f.x-=m.x,f.y-=m.y,f.width+=m.width+
+m.x,f.height+=m.height+m.y),b.fitWindow(f))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
+EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph,f=b.container;if(!this.editor.extendCanvas)f.scrollTop=0,f.scrollLeft=0,mxUtils.hasScrollbars(f)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(f))if(b.pageVisible){var m=b.getPagePadding();f.scrollTop=Math.floor(m.y);f.scrollLeft=Math.floor(Math.min(m.x,(f.scrollWidth-f.clientWidth)/2));m=b.getGraphBounds();0<m.width&&0<m.height&&(m.x>f.scrollLeft+.9*f.clientWidth&&(f.scrollLeft=Math.min(m.x+
+m.width-f.clientWidth,m.x-10)),m.y>f.scrollTop+.9*f.clientHeight&&(f.scrollTop=Math.min(m.y+m.height-f.clientHeight,m.y-10)))}else if(m=b.getGraphBounds(),0==m.width&&0==m.height)f.scrollLeft=(f.scrollWidth-f.clientWidth)/2,f.scrollTop=(f.scrollHeight-f.clientHeight)/2;else{var t=Math.max(m.height,b.scrollTileSize.height*b.view.scale);f.scrollLeft=Math.floor(Math.max(0,m.x-Math.max(0,(f.clientWidth-Math.max(m.width,b.scrollTileSize.width*b.view.scale))/2)));f.scrollTop=Math.floor(Math.max(0,m.y-Math.max(20,
+(f.clientHeight-t)/4)))}else{m=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());t=b.view.translate;var y=b.view.scale;m.x=m.x/y-t.x;m.y=m.y/y-t.y;m.width/=y;m.height/=y;b.view.setTranslate(Math.floor(Math.max(0,(f.clientWidth-m.width)/2)-m.x+2),Math.floor((b.pageVisible?0:Math.max(0,(f.clientHeight-m.height)/4))-m.y+1))}};
+EditorUi.prototype.setPageVisible=function(b){var f=this.editor.graph,m=mxUtils.hasScrollbars(f.container),t=0,y=0;m&&(t=f.view.translate.x*f.view.scale-f.container.scrollLeft,y=f.view.translate.y*f.view.scale-f.container.scrollTop);f.pageVisible=b;f.pageBreaksVisible=b;f.preferPageSize=b;f.view.validateBackground();if(m){var q=f.getSelectionCells();f.clearSelection();f.setSelectionCells(q)}f.sizeDidChange();m&&(f.container.scrollLeft=f.view.translate.x*f.view.scale-t,f.container.scrollTop=f.view.translate.y*
f.view.scale-y);f.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
-EditorUi.prototype.installResizeHandler=function(b,f,l){f&&(b.window.setSize=function(y,q){if(!this.minimized){var C=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;y=Math.min(y,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());q=Math.min(q,C-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(y,q){var C=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-J=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),D=parseInt(this.div.style.height);y=Math.max(0,Math.min(y,C-S));q=Math.max(0,Math.min(q,J-D));this.getX()==y&&this.getY()==q||mxWindow.prototype.setLocation.apply(this,arguments);f&&!this.minimized&&this.setSize(S,D)};var u=mxUtils.bind(this,function(){var y=b.window.getX(),q=b.window.getY();b.window.setLocation(y,q)});mxEvent.addListener(window,"resize",u);b.destroy=function(){mxEvent.removeListener(window,
-"resize",u);b.window.destroy();null!=l&&l()}};function ChangeGridColor(b,f){this.ui=b;this.color=f}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};function ChangePageSetup(b,f,l,u,y){this.ui=b;this.previousColor=this.color=f;this.previousImage=this.image=l;this.previousFormat=this.format=u;this.previousPageScale=this.pageScale=y;this.ignoreImage=this.ignoreColor=!1}
-ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var f=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=f}if(!this.ignoreImage){this.image=this.previousImage;f=b.backgroundImage;var l=this.previousImage;null!=l&&Graph.isPageLink(l.src)&&(l=this.ui.createImageForPageLink(l.src,this.ui.currentPage));this.ui.setBackgroundImage(l);this.previousImage=f}null!=this.previousFormat&&(this.format=this.previousFormat,
+EditorUi.prototype.installResizeHandler=function(b,f,m){f&&(b.window.setSize=function(y,q){if(!this.minimized){var B=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;y=Math.min(y,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());q=Math.min(q,B-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(y,q){var B=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
+I=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),D=parseInt(this.div.style.height);y=Math.max(0,Math.min(y,B-S));q=Math.max(0,Math.min(q,I-D));this.getX()==y&&this.getY()==q||mxWindow.prototype.setLocation.apply(this,arguments);f&&!this.minimized&&this.setSize(S,D)};var t=mxUtils.bind(this,function(){var y=b.window.getX(),q=b.window.getY();b.window.setLocation(y,q)});mxEvent.addListener(window,"resize",t);b.destroy=function(){mxEvent.removeListener(window,
+"resize",t);b.window.destroy();null!=m&&m()}};function ChangeGridColor(b,f){this.ui=b;this.color=f}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};function ChangePageSetup(b,f,m,t,y){this.ui=b;this.previousColor=this.color=f;this.previousImage=this.image=m;this.previousFormat=this.format=t;this.previousPageScale=this.pageScale=y;this.ignoreImage=this.ignoreColor=!1}
+ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var f=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=f}if(!this.ignoreImage){this.image=this.previousImage;f=b.backgroundImage;var m=this.previousImage;null!=m&&Graph.isPageLink(m.src)&&(m=this.ui.createImageForPageLink(m.src,this.ui.currentPage));this.ui.setBackgroundImage(m);this.previousImage=f}null!=this.previousFormat&&(this.format=this.previousFormat,
f=b.pageFormat,this.previousFormat.width!=f.width||this.previousFormat.height!=f.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=f);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),this.previousPageScale=b))};
EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(b){this.editor.graph.foldingEnabled=b;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
EditorUi.prototype.setPageFormat=function(b,f){f=null!=f?f:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;f||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};
-EditorUi.prototype.setGridColor=function(b,f){f=null!=f?f:Editor.isDarkMode();var l=this.editor.graph;f?l.view.defaultDarkGridColor=b:l.view.defaultGridColor=b;l.view.gridColor="light-dark("+l.view.defaultGridColor+", "+l.view.defaultDarkGridColor+")";l.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var b=this.editor.undoManager,f=mxUtils.bind(this,function(){this.updateActionStates()});b.addListener(mxEvent.ADD,f);b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);b.addListener(mxEvent.CLEAR,f);var l=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){l.apply(this,arguments);f()};var u=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(y,q){u.apply(this,arguments);
+EditorUi.prototype.setGridColor=function(b,f){f=null!=f?f:Editor.isDarkMode();var m=this.editor.graph;f?m.view.defaultDarkGridColor=b:m.view.defaultGridColor=b;m.view.gridColor="light-dark("+m.view.defaultGridColor+", "+m.view.defaultDarkGridColor+")";m.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
+EditorUi.prototype.addUndoListener=function(){var b=this.editor.undoManager,f=mxUtils.bind(this,function(){this.updateActionStates()});b.addListener(mxEvent.ADD,f);b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);b.addListener(mxEvent.CLEAR,f);var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);f()};var t=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(y,q){t.apply(this,arguments);
f()};f()};
-EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,f=this.getSelectionState(),l=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),u=!this.editor.chromeless||this.editor.editable,y="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),q=0;q<y.length;q++)this.actions.get(y[q]).setEnabled(0<
-f.cells.length);this.actions.get("grid").setEnabled(u);this.actions.get("undo").setEnabled(this.canUndo()&&u);this.actions.get("redo").setEnabled(this.canRedo()&&u);this.actions.get("swap").setEnabled(2==f.cells.length&&2==f.vertices.length);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<f.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<f.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());
+EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,f=this.getSelectionState(),m=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),t=!this.editor.chromeless||this.editor.editable,y="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),q=0;q<y.length;q++)this.actions.get(y[q]).setEnabled(0<
+f.cells.length);this.actions.get("grid").setEnabled(t);this.actions.get("undo").setEnabled(this.canUndo()&&t);this.actions.get("redo").setEnabled(this.canRedo()&&t);this.actions.get("swap").setEnabled(2==f.cells.length&&2==f.vertices.length);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<f.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<f.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());
this.actions.get("bringForward").setEnabled(1==f.cells.length);this.actions.get("sendBackward").setEnabled(1==f.cells.length);this.actions.get("rotation").setEnabled(1==f.vertices.length);this.actions.get("wordWrap").setEnabled(1==f.vertices.length);this.actions.get("autosize").setEnabled(0<f.vertices.length);this.actions.get("copySize").setEnabled(1==f.vertices.length);this.actions.get("clearWaypoints").setEnabled(f.connections);this.actions.get("clearAnchors").setEnabled(f.connections);this.actions.get("curved").setEnabled(0<
f.edges.length);this.actions.get("turn").setEnabled(0<f.cells.length);this.actions.get("group").setEnabled(1<f.cells.length||1==f.vertices.length&&0==b.model.getChildCount(f.cells[0])&&!b.isContainer(f.vertices[0]));this.actions.get("ungroup").setEnabled(!f.row&&!f.cell&&!f.table&&0<f.vertices.length&&(b.isContainer(f.vertices[0])||0<b.getModel().getChildCount(f.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==f.cells.length&&b.getModel().isVertex(b.getModel().getParent(f.cells[0])));
this.actions.get("collapsible").setEnabled(1==f.vertices.length&&(0<b.model.getChildCount(f.vertices[0])||b.isContainer(f.vertices[0])));this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==f.cells.length&&b.isValidRoot(f.cells[0]));this.actions.get("copyData").setEnabled(1==f.cells.length);this.actions.get("copyAsText").setEnabled(1==f.cells.length);this.actions.get("editLink").setEnabled(1==
-f.cells.length);this.actions.get("editStyle").setEnabled(0<f.cells.length);this.actions.get("editTooltip").setEnabled(1==f.cells.length);this.actions.get("openLink").setEnabled(1==f.cells.length&&null!=b.getLinkForCell(f.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(l);this.actions.get("selectEdges").setEnabled(l);this.actions.get("selectAll").setEnabled(l);this.actions.get("selectNone").setEnabled(l);u=1==f.vertices.length&&b.isCellFoldable(f.vertices[0]);
-this.actions.get("expand").setEnabled(u);this.actions.get("collapse").setEnabled(u);this.menus.get("navigation").setEnabled(0<f.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(l);this.menus.get("insert").setEnabled(l);this.menus.get("direction").setEnabled(f.unlocked&&1==f.vertices.length);this.menus.get("distribute").setEnabled(f.unlocked&&1<f.vertices.length);this.menus.get("align").setEnabled(f.unlocked&&0<f.cells.length);this.updatePasteActionStates()};
-EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};EditorUi.prototype.refresh=function(b){var f=this.sidebarContainer.style.width,l=this.formatContainer.style.width;this.sidebarContainer.style.width=this.hsplitPosition+"px";this.formatContainer.style.width=null!=this.format&&0<this.formatWidth?"":"0";(b||f!=this.sidebarContainer.style.width||l!=this.formatContainer.style.width)&&this.editor.graph.sizeDidChange()};
+f.cells.length);this.actions.get("editStyle").setEnabled(0<f.cells.length);this.actions.get("editTooltip").setEnabled(1==f.cells.length);this.actions.get("openLink").setEnabled(1==f.cells.length&&null!=b.getLinkForCell(f.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(m);this.actions.get("selectEdges").setEnabled(m);this.actions.get("selectAll").setEnabled(m);this.actions.get("selectNone").setEnabled(m);t=1==f.vertices.length&&b.isCellFoldable(f.vertices[0]);
+this.actions.get("expand").setEnabled(t);this.actions.get("collapse").setEnabled(t);this.menus.get("navigation").setEnabled(0<f.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(m);this.menus.get("insert").setEnabled(m);this.menus.get("direction").setEnabled(f.unlocked&&1==f.vertices.length);this.menus.get("distribute").setEnabled(f.unlocked&&1<f.vertices.length);this.menus.get("align").setEnabled(f.unlocked&&0<f.cells.length);this.updatePasteActionStates()};
+EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};EditorUi.prototype.refresh=function(b){var f=this.sidebarContainer.style.width,m=this.formatContainer.style.width;this.sidebarContainer.style.width=this.hsplitPosition+"px";this.formatContainer.style.width=null!=this.format&&0<this.formatWidth?"":"0";(b||f!=this.sidebarContainer.style.width||m!=this.formatContainer.style.width)&&this.editor.graph.sizeDidChange()};
EditorUi.prototype.createTabContainer=function(){return null};EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.hsplit=this.createDiv("geHsplit");this.editor.chromeless||(this.tabContainer=this.createTabContainer())};
EditorUi.prototype.createSidebarContainer=function(){var b=document.createElement("div");b.className="geSidebarContainer";return b};
EditorUi.prototype.createUi=function(){this.statusContainer=this.createStatusContainer();this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?
null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,!0,0,mxUtils.bind(this,function(b){this.hsplitPosition=b;this.refresh()})))};
-EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geStatus";mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){var l=mxEvent.getSource(f);if(l!=b)for(;l.parentNode!=b;)l=l.parentNode;if("A"!=l.nodeName){var u=l.getAttribute("data-action");if("statusFunction"==u&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=u)l=this.actions.get(u),null!=l&&l.funct();else{u=l.getAttribute("data-title");var y=l.getAttribute("data-message");
-null!=u&&null!=y?this.showError(u,y):(l=l.getAttribute("data-link"),null!=l&&this.editor.graph.openLink(l))}mxEvent.consume(f)}}));return b};
-EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Graph.sanitizeHtml(b);0==this.statusContainer.getElementsByTagName("div").length&&null!=b&&0<b.length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b));b=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=b)for(var f=0;f<b.length;f++)(function(l){mxUtils.setOpacity(l,0);mxUtils.setPrefixedStyle(l.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(l.style,
-"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(l,100);mxUtils.setPrefixedStyle(l.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(l.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(l.style,"transform","scaleX(0)");mxUtils.setOpacity(l,0);window.setTimeout(mxUtils.bind(this,function(){null!=l.parentNode&&l.parentNode.removeChild(l)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[f])};
+EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geStatus";mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){var m=mxEvent.getSource(f);if(m!=b)for(;m.parentNode!=b;)m=m.parentNode;if("A"!=m.nodeName){var t=m.getAttribute("data-action");if("statusFunction"==t&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=t)m=this.actions.get(t),null!=m&&m.funct();else{t=m.getAttribute("data-title");var y=m.getAttribute("data-message");
+null!=t&&null!=y?this.showError(t,y):(m=m.getAttribute("data-link"),null!=m&&this.editor.graph.openLink(m))}mxEvent.consume(f)}}));return b};
+EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Graph.sanitizeHtml(b);0==this.statusContainer.getElementsByTagName("div").length&&null!=b&&0<b.length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b));b=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=b)for(var f=0;f<b.length;f++)(function(m){mxUtils.setOpacity(m,0);mxUtils.setPrefixedStyle(m.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(m.style,
+"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(m,100);mxUtils.setPrefixedStyle(m.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(m.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(m.style,"transform","scaleX(0)");mxUtils.setOpacity(m,0);window.setTimeout(mxUtils.bind(this,function(){null!=m.parentNode&&m.parentNode.removeChild(m)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[f])};
EditorUi.prototype.clearStatus=function(){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus("")}))};EditorUi.prototype.updateStatus=function(b){null!=b&&b();this.lastStatusUpdate=b};EditorUi.prototype.updateStatusAgain=function(){null!=this.lastStatusUpdate&&this.lastStatusUpdate()};EditorUi.prototype.createStatusDiv=function(b){var f=document.createElement("div");f.className="geStatusDiv";f.setAttribute("title",b);f.innerText=b;return f};
EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createDiv=function(b){var f=document.createElement("div");f.className=b;return f};
-EditorUi.prototype.addSplitHandler=function(b,f,l,u){function y(c){if(null!=C){var g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));u(Math.max(0,J+(f?g.x-C.x:C.y-g.y)-l));mxEvent.consume(c);J!=P()&&(S=!0,D=null)}}function q(c){y(c);C=J=null}var C=null,J=null,S=!0,D=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var c=parseInt(f?b.offsetLeft:b.offsetTop);f||(c+=l);return c});mxEvent.addGestureListeners(b,function(c){C=new mxPoint(mxEvent.getClientX(c),
-mxEvent.getClientY(c));J=P();S=!1;mxEvent.consume(c)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){if(!S&&this.hsplitClickEnabled){var g=null!=D?D-l:0;D=P();u(g);mxEvent.consume(c)}}));mxEvent.addGestureListeners(document,null,y,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,y,q)})};
-EditorUi.prototype.prompt=function(b,f,l){b=new FilenameDialog(this,f,mxResources.get("apply"),function(u){l(parseFloat(u))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
-EditorUi.prototype.handleError=function(b,f,l,u,y){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=f){y=mxUtils.htmlEntities(mxResources.get("unknownError"));var q=mxResources.get("ok");f=null!=f?f:mxResources.get("error");null!=b&&null!=b.message&&(y=mxUtils.htmlEntities(b.message));this.showError(f,y,q,l,null,null,null,null,null,null,null,null,u?l:null)}else null!=l&&l()};
-EditorUi.prototype.showError=function(b,f,l,u,y,q,C,J,S,D,P,c,g){b=new ErrorDialog(this,b,f,l||mxResources.get("ok"),u,y,q,C,c,J,S);f=Math.ceil(null!=f?f.length/50:1);this.showDialog(b.container,D||340,P||100+20*f,!0,!1,g);b.init()};EditorUi.prototype.showDialog=function(b,f,l,u,y,q,C,J,S,D){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,f,l,u,y,q,C,J,S,D);this.dialogs.push(this.dialog)};
-EditorUi.prototype.hideDialog=function(b,f,l){var u=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var y=this.dialogs.length-1;0<=y;y--)if(!this.dialogs[y].closing){u=this.dialogs[y];break}null==u||null!=l&&l!=this.dialog.container.firstChild||(u.closing=!0,0==u.close(b,f)?delete u.closing:(delete u.closing,b=mxUtils.lastIndexOf(this.dialogs,u),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog",
-"dialog",u)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus()))}),0)))};
-EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var f=b.getSelectionCells(),l=new mxDictionary,u=[],y=0;y<f.length;y++){var q=b.isTableCell(f[y])?b.model.getParent(f[y]):f[y];null==q||l.get(q)||(l.put(q,!0),u.push(q))}b.setSelectionCells(b.duplicateCells(u,!1))}catch(C){this.handleError(C)}};
-EditorUi.prototype.pickColor=function(b,f,l,u,y){var q=this.editor.graph,C=q.cellEditor.saveSelection(),J=(y?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){q.cellEditor.restoreSelection(C);f(S)},function(){q.cellEditor.restoreSelection(C)},l,u,y);this.showDialog(b.container,230,J,!0,!1);b.init()};
+EditorUi.prototype.addSplitHandler=function(b,f,m,t){function y(c){if(null!=B){var g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));t(Math.max(0,I+(f?g.x-B.x:B.y-g.y)-m));mxEvent.consume(c);I!=P()&&(S=!0,D=null)}}function q(c){y(c);B=I=null}var B=null,I=null,S=!0,D=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var c=parseInt(f?b.offsetLeft:b.offsetTop);f||(c+=m);return c});mxEvent.addGestureListeners(b,function(c){B=new mxPoint(mxEvent.getClientX(c),
+mxEvent.getClientY(c));I=P();S=!1;mxEvent.consume(c)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){if(!S&&this.hsplitClickEnabled){var g=null!=D?D-m:0;D=P();t(g);mxEvent.consume(c)}}));mxEvent.addGestureListeners(document,null,y,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,y,q)})};
+EditorUi.prototype.prompt=function(b,f,m){b=new FilenameDialog(this,f,mxResources.get("apply"),function(t){m(parseFloat(t))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
+EditorUi.prototype.handleError=function(b,f,m,t,y){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=f){y=mxUtils.htmlEntities(mxResources.get("unknownError"));var q=mxResources.get("ok");f=null!=f?f:mxResources.get("error");null!=b&&null!=b.message&&(y=mxUtils.htmlEntities(b.message));this.showError(f,y,q,m,null,null,null,null,null,null,null,null,t?m:null)}else null!=m&&m()};
+EditorUi.prototype.showError=function(b,f,m,t,y,q,B,I,S,D,P,c,g){b=new ErrorDialog(this,b,f,m||mxResources.get("ok"),t,y,q,B,c,I,S);f=Math.ceil(null!=f?f.length/50:1);this.showDialog(b.container,D||340,P||100+20*f,!0,!1,g);b.init()};EditorUi.prototype.showDialog=function(b,f,m,t,y,q,B,I,S,D){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,f,m,t,y,q,B,I,S,D);this.dialogs.push(this.dialog)};
+EditorUi.prototype.hideDialog=function(b,f,m){var t=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var y=this.dialogs.length-1;0<=y;y--)if(!this.dialogs[y].closing){t=this.dialogs[y];break}null==t||null!=m&&m!=this.dialog.container.firstChild||(t.closing=!0,0==t.close(b,f)?delete t.closing:(delete t.closing,b=mxUtils.lastIndexOf(this.dialogs,t),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog",
+"dialog",t)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus()))}),0)))};
+EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var f=b.getSelectionCells(),m=new mxDictionary,t=[],y=0;y<f.length;y++){var q=b.isTableCell(f[y])?b.model.getParent(f[y]):f[y];null==q||m.get(q)||(m.put(q,!0),t.push(q))}b.setSelectionCells(b.duplicateCells(t,!1))}catch(B){this.handleError(B)}};
+EditorUi.prototype.pickColor=function(b,f,m,t,y){var q=this.editor.graph,B=q.cellEditor.saveSelection(),I=(y?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){q.cellEditor.restoreSelection(B);f(S)},function(){q.cellEditor.restoreSelection(B)},m,t,y);this.showDialog(b.container,230,I,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.base64ToBlob=function(b,f){f=f||"";b=atob(b);for(var l=b.length,u=Math.ceil(l/1024),y=Array(u),q=0;q<u;++q){for(var C=1024*q,J=Math.min(C+1024,l),S=Array(J-C),D=0;C<J;++D,++C)S[D]=b[C].charCodeAt(0);y[q]=new Uint8Array(S)}return new Blob(y,{type:f})};
-EditorUi.prototype.extractGraphModelFromHtml=function(b){var f=null;try{var l=b.indexOf("&lt;mxGraphModel ");if(0<=l){var u=b.lastIndexOf("&lt;/mxGraphModel&gt;");u>l&&(f=b.substring(l,u+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(y){}return f};
-EditorUi.prototype.extractGraphModelFromEvent=function(b){var f=null,l=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(l=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==l||0==l.length)&&(l=b.getData("text/plain")),null!=l&&(l=Graph.zapGremlins(mxUtils.trim(l)),b=this.extractGraphModelFromHtml(l),null!=b&&(l=b))));null!=l&&this.isCompatibleString(l)&&(f=l);return f};
+EditorUi.prototype.base64ToBlob=function(b,f){f=f||"";b=atob(b);for(var m=b.length,t=Math.ceil(m/1024),y=Array(t),q=0;q<t;++q){for(var B=1024*q,I=Math.min(B+1024,m),S=Array(I-B),D=0;B<I;++D,++B)S[D]=b[B].charCodeAt(0);y[q]=new Uint8Array(S)}return new Blob(y,{type:f})};
+EditorUi.prototype.extractGraphModelFromHtml=function(b){var f=null;try{var m=b.indexOf("&lt;mxGraphModel ");if(0<=m){var t=b.lastIndexOf("&lt;/mxGraphModel&gt;");t>m&&(f=b.substring(m,t+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(y){}return f};
+EditorUi.prototype.extractGraphModelFromEvent=function(b){var f=null,m=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(m=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==m||0==m.length)&&(m=b.getData("text/plain")),null!=m&&(m=Graph.zapGremlins(mxUtils.trim(m)),b=this.extractGraphModelFromHtml(m),null!=b&&(m=b))));null!=m&&this.isCompatibleString(m)&&(f=m);return f};
EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(f){this.save(f)}),null,mxUtils.bind(this,function(f){if(null!=f&&0<f.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,340,96,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var f=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,f);this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}))}else if(f.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,
-"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(f))).simulate(document,"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(f);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(l){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}))}}};
-EditorUi.prototype.executeLayouts=function(b,f){this.executeLayout(mxUtils.bind(this,function(){var l=new mxCompositeLayout(this.editor.graph,b),u=this.editor.graph.getSelectionCells();l.execute(this.editor.graph.getDefaultParent(),0==u.length?null:u)}),!0,f)};
-EditorUi.prototype.executeLayout=function(b,f,l){var u=this.editor.graph;u.getModel().beginUpdate();try{b()}catch(y){throw y;}finally{this.allowAnimation&&f&&u.isEnabled()?(b=new mxMorphing(u),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){u.getModel().endUpdate();null!=l&&l()})),b.startAnimation()):(u.getModel().endUpdate(),null!=l&&l())}};
-EditorUi.prototype.showImageDialog=function(b,f,l,u){u=this.editor.graph.cellEditor;var y=u.saveSelection(),q=mxUtils.prompt(b,f);u.restoreSelection(y);if(null!=q&&0<q.length){var C=new Image;C.onload=function(){l(q,C.width,C.height)};C.onerror=function(){l(null);mxUtils.alert(mxResources.get("fileNotFound"))};C.src=q}else l(null)};EditorUi.prototype.showLinkDialog=function(b,f,l){b=new LinkDialog(this,b,f,l);this.showDialog(b.container,420,90,!0,!0);b.init()};
+"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(f))).simulate(document,"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(f);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(m){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}))}}};
+EditorUi.prototype.executeLayouts=function(b,f){this.executeLayout(mxUtils.bind(this,function(){var m=new mxCompositeLayout(this.editor.graph,b),t=this.editor.graph.getSelectionCells();m.execute(this.editor.graph.getDefaultParent(),0==t.length?null:t)}),!0,f)};
+EditorUi.prototype.executeLayout=function(b,f,m){var t=this.editor.graph;t.getModel().beginUpdate();try{b()}catch(y){throw y;}finally{this.allowAnimation&&f&&t.isEnabled()?(b=new mxMorphing(t),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){t.getModel().endUpdate();null!=m&&m()})),b.startAnimation()):(t.getModel().endUpdate(),null!=m&&m())}};
+EditorUi.prototype.showImageDialog=function(b,f,m,t){t=this.editor.graph.cellEditor;var y=t.saveSelection(),q=mxUtils.prompt(b,f);t.restoreSelection(y);if(null!=q&&0<q.length){var B=new Image;B.onload=function(){m(q,B.width,B.height)};B.onerror=function(){m(null);mxUtils.alert(mxResources.get("fileNotFound"))};B.src=q}else m(null)};EditorUi.prototype.showLinkDialog=function(b,f,m){b=new LinkDialog(this,b,f,m);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&"undefined"!==typeof window.EditDataDialog&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1,null,new mxRectangle(0,0,440,220)),b.init())};
-EditorUi.prototype.showBackgroundImageDialog=function(b,f){b=null!=b?b:mxUtils.bind(this,function(u){u=new ChangePageSetup(this,null,u);u.ignoreColor=!0;this.editor.graph.model.execute(u)});var l=mxUtils.prompt(mxResources.get("backgroundImage"),null!=f?f.src:"");null!=l&&0<l.length?(f=new Image,f.onload=function(){b(new mxImage(l,f.width,f.height),!1)},f.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},f.src=l):b(null)};
-EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,f,l){mxUtils.confirm(b)?null!=f&&f():null!=l&&l()};EditorUi.prototype.createOutline=function(b){var f=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){f.update(!1)});return f};
+EditorUi.prototype.showBackgroundImageDialog=function(b,f){b=null!=b?b:mxUtils.bind(this,function(t){t=new ChangePageSetup(this,null,t);t.ignoreColor=!0;this.editor.graph.model.execute(t)});var m=mxUtils.prompt(mxResources.get("backgroundImage"),null!=f?f.src:"");null!=m&&0<m.length?(f=new Image,f.onload=function(){b(new mxImage(m,f.width,f.height),!1)},f.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},f.src=m):b(null)};
+EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,f,m){mxUtils.confirm(b)?null!=f&&f():null!=m&&m()};EditorUi.prototype.createOutline=function(b){var f=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){f.update(!1)});return f};
EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward",88:"copyAsSvg"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};
-EditorUi.prototype.createKeyHandler=function(b){function f(c,g,m){if(!u.isSelectionEmpty()&&u.isEnabled()){g=null!=g?g:1;var n=u.getCompositeParents(u.getSelectionCells()),x=0<n.length?n[0]:null;if(null!=x)if(m){u.getModel().beginUpdate();try{for(x=0;x<n.length;x++)if(u.getModel().isVertex(n[x])&&u.isCellResizable(n[x])){var F=u.getCellGeometry(n[x]);null!=F&&(F=F.clone(),37==c?F.width=Math.max(0,F.width-g):38==c?F.height=Math.max(0,F.height-g):39==c?F.width+=g:40==c&&(F.height+=g),u.getModel().setGeometry(n[x],
-F))}}finally{u.getModel().endUpdate()}}else{F=u.model.getParent(x);var H=u.getView().scale;m=null;1==u.getSelectionCount()&&u.model.isVertex(x)&&null!=u.layoutManager&&!u.isCellLocked(x)&&(m=u.layoutManager.getLayout(F));if(null!=m&&m.constructor==mxStackLayout)g=F.getIndex(x),37==c||38==c?u.model.add(F,x,Math.max(0,g-1)):(39==c||40==c)&&u.model.add(F,x,Math.min(u.model.getChildCount(F),g+1));else{var M=u.graphHandler;null!=M&&(null==M.first&&M.start(x,0,0,u.getMovableCells(n)),null!=M.first&&(x=
-n=0,37==c?n=-g:38==c?x=-g:39==c?n=g:40==c&&(x=g),M.currentDx+=n*H,M.currentDy+=x*H,M.checkPreview(),M.updatePreview()),null!=C&&window.clearTimeout(C),C=window.setTimeout(function(){if(null!=M.first){var L=M.roundLength(M.currentDx/H),K=M.roundLength(M.currentDy/H);M.moveCells(M.cells,L,K);M.reset()}},400))}}}}var l=this,u=this.editor.graph,y=new mxKeyHandler(u),q=y.isEventIgnored;y.isEventIgnored=function(c){return!(mxEvent.isShiftDown(c)&&9==c.keyCode)&&(!this.isControlDown(c)||mxEvent.isShiftDown(c)||
+EditorUi.prototype.createKeyHandler=function(b){function f(c,g,l){if(!t.isSelectionEmpty()&&t.isEnabled()){g=null!=g?g:1;var n=t.getCompositeParents(t.getSelectionCells()),x=0<n.length?n[0]:null;if(null!=x)if(l){t.getModel().beginUpdate();try{for(x=0;x<n.length;x++)if(t.getModel().isVertex(n[x])&&t.isCellResizable(n[x])){var F=t.getCellGeometry(n[x]);null!=F&&(F=F.clone(),37==c?F.width=Math.max(0,F.width-g):38==c?F.height=Math.max(0,F.height-g):39==c?F.width+=g:40==c&&(F.height+=g),t.getModel().setGeometry(n[x],
+F))}}finally{t.getModel().endUpdate()}}else{F=t.model.getParent(x);var G=t.getView().scale;l=null;1==t.getSelectionCount()&&t.model.isVertex(x)&&null!=t.layoutManager&&!t.isCellLocked(x)&&(l=t.layoutManager.getLayout(F));if(null!=l&&l.constructor==mxStackLayout)g=F.getIndex(x),37==c||38==c?t.model.add(F,x,Math.max(0,g-1)):(39==c||40==c)&&t.model.add(F,x,Math.min(t.model.getChildCount(F),g+1));else{var L=t.graphHandler;null!=L&&(null==L.first&&L.start(x,0,0,t.getMovableCells(n)),null!=L.first&&(x=
+n=0,37==c?n=-g:38==c?x=-g:39==c?n=g:40==c&&(x=g),L.currentDx+=n*G,L.currentDy+=x*G,L.checkPreview(),L.updatePreview()),null!=B&&window.clearTimeout(B),B=window.setTimeout(function(){if(null!=L.first){var M=L.roundLength(L.currentDx/G),K=L.roundLength(L.currentDy/G);L.moveCells(L.cells,M,K);L.reset()}},400))}}}}var m=this,t=this.editor.graph,y=new mxKeyHandler(t),q=y.isEventIgnored;y.isEventIgnored=function(c){return!(mxEvent.isShiftDown(c)&&9==c.keyCode)&&(!this.isControlDown(c)||mxEvent.isShiftDown(c)||
90!=c.keyCode&&89!=c.keyCode&&188!=c.keyCode&&190!=c.keyCode&&85!=c.keyCode&&83!=c.keyCode)&&(66!=c.keyCode&&73!=c.keyCode||!this.isControlDown(c)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=c.keyCode&&107!=c.keyCode||!this.isControlDown(c)&&!mxEvent.isShiftDown(c)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&q.apply(this,arguments)};y.isEnabledForEvent=function(c){return!mxEvent.isConsumed(c)&&this.isGraphEvent(c)&&this.isEnabled()&&
-(null==l.dialogs||0==l.dialogs.length)};y.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var C=null,J={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=y.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(u.isEnabled()){var g=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?g=l.actions.get(l.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?
-g=l.actions.get(l.altShiftActions[c.keyCode]):this.isControlDown(c)&&mxEvent.isAltDown(c)&&(g=l.actions.get(l.ctrlAltActions[c.keyCode]));if(null!=g)return g.funct;if("/"==c.key&&!this.isControlDown(c)&&!mxEvent.isAltDown(c))return function(){var m=document.getElementById("geOmniSearch");null!=m&&30<m.clientWidth&&m.focus()};if(null!=J[c.keyCode]&&!u.isSelectionEmpty())if(!this.isControlDown(c)&&mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)){if(u.model.isVertex(u.getSelectionCell()))return function(){var m=
-u.connectVertex(u.getSelectionCell(),J[c.keyCode],u.defaultEdgeLength,c,!0);null!=m&&0<m.length&&(1==m.length&&u.model.isEdge(m[0])?u.setSelectionCell(u.model.getTerminal(m[0],!1)):u.setSelectionCell(m[m.length-1]),u.scrollCellToVisible(u.getSelectionCell()),null!=l.hoverIcons&&l.hoverIcons.update(u.view.getState(u.getSelectionCell())))}}else return this.isControlDown(c)?function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null,!0)}:function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null)}}return S.apply(this,
-arguments)};y.bindAction=mxUtils.bind(this,function(c,g,m,n){var x=this.actions.get(m);null!=x&&(m=function(){x.isEnabled()&&x.funct.apply(this,arguments)},g?n?y.bindControlShiftKey(c,m):y.bindControlKey(c,m):n?y.bindShiftKey(c,m):y.bindKey(c,m))});var D=this,P=y.escape;y.escape=function(c){P.apply(this,arguments)};y.enter=function(){};y.bindControlShiftKey(36,function(){u.exitGroup()});y.bindControlShiftKey(35,function(){u.enterGroup()});y.bindShiftKey(36,function(){u.home()});y.bindKey(35,function(){u.refresh()});
-y.bindAction(80,!0,"print");y.bindAction(107,!0,"zoomIn");y.bindAction(109,!0,"zoomOut");y.bindAction(61,!0,"zoomIn");y.bindAction(187,!0,"zoomIn");y.bindAction(222,!0,"zoomIn");y.bindAction(173,!0,"zoomOut");y.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)y.bindAction(79,!0,"outline",!0),y.bindControlKey(36,function(){u.isEnabled()&&u.foldCells(!0)}),y.bindControlKey(35,function(){u.isEnabled()&&u.foldCells(!1)}),y.bindControlKey(13,function(){D.ctrlEnter()}),y.bindAction(8,
+(null==m.dialogs||0==m.dialogs.length)};y.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var B=null,I={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=y.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(t.isEnabled()){var g=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?g=m.actions.get(m.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?
+g=m.actions.get(m.altShiftActions[c.keyCode]):this.isControlDown(c)&&mxEvent.isAltDown(c)&&(g=m.actions.get(m.ctrlAltActions[c.keyCode]));if(null!=g)return g.funct;if("/"==c.key&&!this.isControlDown(c)&&!mxEvent.isAltDown(c))return function(){var l=document.getElementById("geOmniSearch");null!=l&&30<l.clientWidth&&l.focus()};if(null!=I[c.keyCode]&&!t.isSelectionEmpty())if(!this.isControlDown(c)&&mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)){if(t.model.isVertex(t.getSelectionCell()))return function(){var l=
+t.connectVertex(t.getSelectionCell(),I[c.keyCode],t.defaultEdgeLength,c,!0);null!=l&&0<l.length&&(1==l.length&&t.model.isEdge(l[0])?t.setSelectionCell(t.model.getTerminal(l[0],!1)):t.setSelectionCell(l[l.length-1]),t.scrollCellToVisible(t.getSelectionCell()),null!=m.hoverIcons&&m.hoverIcons.update(t.view.getState(t.getSelectionCell())))}}else return this.isControlDown(c)?function(){f(c.keyCode,mxEvent.isShiftDown(c)?t.gridSize:null,!0)}:function(){f(c.keyCode,mxEvent.isShiftDown(c)?t.gridSize:null)}}return S.apply(this,
+arguments)};y.bindAction=mxUtils.bind(this,function(c,g,l,n){var x=this.actions.get(l);null!=x&&(l=function(){x.isEnabled()&&x.funct.apply(this,arguments)},g?n?y.bindControlShiftKey(c,l):y.bindControlKey(c,l):n?y.bindShiftKey(c,l):y.bindKey(c,l))});var D=this,P=y.escape;y.escape=function(c){P.apply(this,arguments)};y.enter=function(){};y.bindControlShiftKey(36,function(){t.exitGroup()});y.bindControlShiftKey(35,function(){t.enterGroup()});y.bindShiftKey(36,function(){t.home()});y.bindKey(35,function(){t.refresh()});
+y.bindAction(80,!0,"print");y.bindAction(107,!0,"zoomIn");y.bindAction(109,!0,"zoomOut");y.bindAction(61,!0,"zoomIn");y.bindAction(187,!0,"zoomIn");y.bindAction(222,!0,"zoomIn");y.bindAction(173,!0,"zoomOut");y.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)y.bindAction(79,!0,"outline",!0),y.bindControlKey(36,function(){t.isEnabled()&&t.foldCells(!0)}),y.bindControlKey(35,function(){t.isEnabled()&&t.foldCells(!1)}),y.bindControlKey(13,function(){D.ctrlEnter()}),y.bindAction(8,
!1,"delete"),y.bindAction(8,!0,"deleteAll"),y.bindAction(8,!1,"deleteLabels",!0),y.bindAction(46,!1,"delete"),y.bindAction(46,!0,"deleteAll"),y.bindAction(46,!1,"deleteLabels",!0),y.bindAction(36,!1,"resetView"),y.bindAction(72,!0,"fitWindow",!0),y.bindAction(74,!0,"fitPage"),y.bindAction(74,!0,"fitTwoPages",!0),y.bindAction(48,!0,"customZoom"),y.bindAction(82,!0,"turn"),y.bindAction(82,!0,"clearDefaultStyle",!0),y.bindAction(83,!0,"save"),y.bindAction(83,!0,"saveAs",!0),y.bindAction(65,!0,"selectAll"),
y.bindAction(65,!0,"selectNone",!0),y.bindAction(73,!0,"selectVertices",!0),y.bindAction(69,!0,"selectEdges",!0),y.bindAction(69,!0,"editStyle"),y.bindAction(66,!0,"bold"),y.bindAction(66,!0,"toBack",!0),y.bindAction(70,!0,"toFront",!0),y.bindAction(68,!0,"duplicate"),y.bindAction(68,!0,"setAsDefaultStyle",!0),y.bindAction(90,!0,"undo"),y.bindAction(90,!0,"redo",!0),y.bindAction(89,!0,"redo"),y.bindAction(89,!0,"autosize",!0),y.bindAction(88,!0,"cut"),y.bindAction(67,!0,"copy"),y.bindAction(86,!0,
"paste"),y.bindAction(71,!0,"group"),y.bindAction(77,!0,"editData"),y.bindAction(71,!0,"grid",!0),y.bindAction(73,!0,"italic"),y.bindAction(76,!0,"lockUnlock"),y.bindAction(76,!0,"layers",!0),y.bindAction(80,!0,"format",!0),y.bindAction(85,!0,"underline"),y.bindAction(85,!0,"ungroup",!0),y.bindAction(109,!0,"decreaseFontSize",!0),y.bindAction(107,!0,"increaseFontSize",!0),y.bindAction(219,!0,"decreaseFontSize",!0),y.bindAction(221,!0,"increaseFontSize",!0),y.bindAction(190,!0,"superscript"),y.bindAction(188,
-!0,"subscript"),y.bindAction(13,!1,"keyPressEnter"),y.bindKey(113,function(){u.isEnabled()&&u.startEditingAtCell()});return y};EditorUi.prototype.createMenuElement=function(b,f,l){var u=document.createElement("a");this.addMenuHandler(u,f,l);mxUtils.write(u,b);u.className="geItem";return u};
-EditorUi.prototype.addMenuHandler=function(b,f,l,u){if(null!=f){var y=null,q=!0,C=mxUtils.bind(this,function(J){null!=l&&l(J);if(!mxEvent.isConsumed(J)&&q&&(null==b.enabled||b.enabled)){this.editor.graph.popupMenuHandler.hideMenu();var S=new mxPopupMenu(f);S.smartSeparators=!0;S.showDisabled=!0;S.autoExpand=!0;S.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(S,arguments);this.resetCurrentMenu();y=null;S.destroy()});this.menus.autoPopup||null==this.currentMenu||this.hideCurrentMenu();
-var D=mxUtils.getOffset(b);S.popup(D.x,D.y+b.offsetHeight,null,J);this.setCurrentMenu(S,b);y=S}u||mxEvent.consume(J)});mxEvent.addListener(b,"mousemove",mxUtils.bind(this,function(J){if(this.menus.autoPopup&&null!=this.currentMenu&&this.currentMenuElt!=b&&null!=this.currentMenuElt){var S=this.currentMenuElt;this.hideCurrentMenu();S.parentNode==b.parentNode&&"INPUT"!=b.nodeName&&C(J)}}));mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(J){!this.menus.autoPopup&&
-null!=this.currentMenu&&this.currentMenuElt!=b&&mxEvent.isMouseEvent(J)&&this.hideCurrentMenu();q=null==this.currentMenu;"INPUT"!=mxEvent.getSource(J).nodeName?J.preventDefault():J.stopPropagation()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(J){C(J);q=!0}));u&&(mxEvent.addListener(b,"focus",mxUtils.bind(this,function(J){C(J);q=!0})),mxEvent.addListener(b,"blur",mxUtils.bind(this,function(J){this.currentMenu==y&&this.hideCurrentMenu()})),mxEvent.addListener(b,"keyup",mxUtils.bind(this,
-function(J){this.hideCurrentMenu();13!=J.keyCode&&27!=J.keyCode&&(C(J),q=!0)})))}};
-EditorUi.prototype.addShapePicker=function(b,f){var l=this.editor.graph;mxEvent.addListener(b,"click",mxUtils.bind(this,function(u){if(this.isShapePickerVisible())this.hideShapePicker();else{var y=mxUtils.getOffset(b);Editor.inlineFullscreen||null==this.embedViewport?f?(y.x-=this.diagramContainer.offsetLeft+30,y.y=b.offsetHeight-2):(y.x+=16+b.offsetHeight+this.sketchPickerMenuElt.offsetWidth/2,y.y+=20):(y.x=0,y.y=b.offsetTop);this.showShapePicker(Math.max(this.diagramContainer.scrollLeft+Math.max(24,
-y.x)),this.diagramContainer.scrollTop+y.y,null,null,null,null,mxUtils.bind(this,function(q){return l.getCenterInsertPoint(l.getBoundingBoxFromGeometry(q,!0))}),f,!1)}mxEvent.consume(u)}))};
-EditorUi.prototype.createZoomInput=function(b){var f=document.createElement("input");f.className="geButton geZoomInput";f.style.backgroundImage="url("+Editor.thinExpandImage+")";f.setAttribute("type","text");f.setAttribute("value","100%");var l=this.menus.get("viewZoom");this.dependsOnLanguage(mxUtils.bind(this,function(){f.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)")}));(b||mxClient.IS_TOUCH)&&f.setAttribute("readonly","true");var u=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,
-function(y){u=!1;mxClient.IS_TOUCH||mxEvent.getSource(y)!=f||document.activeElement==f||(f.focus(),mxClient.IS_GC||mxClient.IS_FF?f.select():document.execCommand("selectAll",!1,null),u=!0)}),mxUtils.bind(this,function(y){mxEvent.getSource(y)==f&&u&&mxEvent.consume(y)}),mxUtils.bind(this,function(y){u&&(mxEvent.consume(y),u=!1)}));this.addMenuHandler(f,l.funct);mxUtils.bind(this,function(y){mxEvent.addListener(y,"click",mxUtils.bind(this,function(C){mxEvent.isAltDown(C)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),
-mxEvent.consume(C)):mxEvent.isShiftDown(C)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(C))}));var q=mxUtils.bind(this,function(C,J,S){f.value=Math.round(100*this.editor.graph.view.scale*(null!=S?S:1))+"%";document.activeElement==f&&this.editor.graph.container.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(C){if(27==C.keyCode||13==C.keyCode||9==C.keyCode)27==C.keyCode||isNaN(parseInt(f.value))?q():this.editor.graph.zoomTo(parseInt(f.value)/100),
-this.hideCurrentMenu(),mxEvent.consume(C)}));this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,q);this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",q);mxEvent.addListener(f,"blur",q);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(C,J){q(C,J,J.getProperty("factor"))}))})(f);return f};
-EditorUi.prototype.createHelpIcon=function(b,f){f=document.createElement("img");f.setAttribute("src",Editor.helpImage);f.setAttribute("title",mxResources.get("help")+" ("+b+")");f.className="geHelpIcon";mxEvent.addGestureListeners(f,mxUtils.bind(this,function(l){this.hideCurrentMenu();this.openLink(b);mxEvent.consume(l)}));return f};
+!0,"subscript"),y.bindAction(13,!1,"keyPressEnter"),y.bindKey(113,function(){t.isEnabled()&&t.startEditingAtCell()});return y};EditorUi.prototype.createMenuElement=function(b,f,m){var t=document.createElement("a");this.addMenuHandler(t,f,m);mxUtils.write(t,b);t.className="geItem";return t};
+EditorUi.prototype.addMenuHandler=function(b,f,m,t){if(null!=f){var y=null,q=!0,B=mxUtils.bind(this,function(I){null!=m&&m(I);if(!mxEvent.isConsumed(I)&&q&&(null==b.enabled||b.enabled)){this.editor.graph.popupMenuHandler.hideMenu();var S=new mxPopupMenu(f);S.smartSeparators=!0;S.showDisabled=!0;S.autoExpand=!0;S.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(S,arguments);this.resetCurrentMenu();y=null;S.destroy()});this.menus.autoPopup||null==this.currentMenu||this.hideCurrentMenu();
+var D=mxUtils.getOffset(b);S.popup(D.x,D.y+b.offsetHeight,null,I);this.setCurrentMenu(S,b);y=S}t||mxEvent.consume(I)});mxEvent.addListener(b,"mousemove",mxUtils.bind(this,function(I){if(this.menus.autoPopup&&null!=this.currentMenu&&this.currentMenuElt!=b&&null!=this.currentMenuElt){var S=this.currentMenuElt;this.hideCurrentMenu();S.parentNode==b.parentNode&&"INPUT"!=b.nodeName&&B(I)}}));mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(I){!this.menus.autoPopup&&
+null!=this.currentMenu&&this.currentMenuElt!=b&&mxEvent.isMouseEvent(I)&&this.hideCurrentMenu();q=null==this.currentMenu;"INPUT"!=mxEvent.getSource(I).nodeName?I.preventDefault():I.stopPropagation()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(I){B(I);q=!0}));t&&(mxEvent.addListener(b,"focus",mxUtils.bind(this,function(I){B(I);q=!0})),mxEvent.addListener(b,"blur",mxUtils.bind(this,function(I){this.currentMenu==y&&this.hideCurrentMenu()})),mxEvent.addListener(b,"keyup",mxUtils.bind(this,
+function(I){this.hideCurrentMenu();13!=I.keyCode&&27!=I.keyCode&&(B(I),q=!0)})))}};
+EditorUi.prototype.addShapePicker=function(b,f){var m=this.editor.graph;mxEvent.addListener(b,"click",mxUtils.bind(this,function(t){if(this.isShapePickerVisible())this.hideShapePicker();else{var y=mxUtils.getOffset(b);Editor.inlineFullscreen||null==this.embedViewport?f?(y.x-=this.diagramContainer.offsetLeft+30,y.y=b.offsetHeight-2):(y.x+=16+b.offsetHeight+this.sketchPickerMenuElt.offsetWidth/2,y.y+=20):(y.x=0,y.y=b.offsetTop);this.showShapePicker(Math.max(this.diagramContainer.scrollLeft+Math.max(24,
+y.x)),this.diagramContainer.scrollTop+y.y,null,null,null,null,mxUtils.bind(this,function(q){return m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0))}),f,!1)}mxEvent.consume(t)}))};
+EditorUi.prototype.createZoomInput=function(b){var f=document.createElement("input");f.className="geButton geZoomInput";f.style.backgroundImage="url("+Editor.thinExpandImage+")";f.setAttribute("type","text");f.setAttribute("value","100%");var m=this.menus.get("viewZoom");this.dependsOnLanguage(mxUtils.bind(this,function(){f.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)")}));(b||mxClient.IS_TOUCH)&&f.setAttribute("readonly","true");var t=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,
+function(y){t=!1;mxClient.IS_TOUCH||mxEvent.getSource(y)!=f||document.activeElement==f||(f.focus(),mxClient.IS_GC||mxClient.IS_FF?f.select():document.execCommand("selectAll",!1,null),t=!0)}),mxUtils.bind(this,function(y){mxEvent.getSource(y)==f&&t&&mxEvent.consume(y)}),mxUtils.bind(this,function(y){t&&(mxEvent.consume(y),t=!1)}));this.addMenuHandler(f,m.funct);mxUtils.bind(this,function(y){mxEvent.addListener(y,"click",mxUtils.bind(this,function(B){mxEvent.isAltDown(B)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),
+mxEvent.consume(B)):mxEvent.isShiftDown(B)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(B))}));var q=mxUtils.bind(this,function(B,I,S){f.value=Math.round(100*this.editor.graph.view.scale*(null!=S?S:1))+"%";document.activeElement==f&&this.editor.graph.container.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(B){if(27==B.keyCode||13==B.keyCode||9==B.keyCode)27==B.keyCode||isNaN(parseInt(f.value))?q():this.editor.graph.zoomTo(parseInt(f.value)/100),
+this.hideCurrentMenu(),mxEvent.consume(B)}));this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,q);this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",q);mxEvent.addListener(f,"blur",q);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(B,I){q(B,I,I.getProperty("factor"))}))})(f);return f};
+EditorUi.prototype.createHelpIcon=function(b,f){f=document.createElement("img");f.setAttribute("src",Editor.helpImage);f.setAttribute("title",mxResources.get("help")+" ("+b+")");f.className="geHelpIcon";mxEvent.addGestureListeners(f,mxUtils.bind(this,function(m){this.hideCurrentMenu();this.openLink(b);mxEvent.consume(m)}));return f};
EditorUi.prototype.destroy=function(){var b=this.editor.graph;null!=b&&null!=this.selectionStateListener&&(b.getSelectionModel().removeListener(this.selectionStateListener),b.getModel().removeListener(this.selectionStateListener),b.getView().removeListener(this.selectionStateListener),b.removeListener(this.selectionStateListener),this.selectionStateListener=null);null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&
(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=
null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=
-null}var f=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.hsplit,this.chromelessToolbar,this.layersDialog];for(b=0;b<f.length;b++)null!=f[b]&&null!=f[b].parentNode&&f[b].parentNode.removeChild(f[b])};(function(){var b=[["nbsp","160"],["shy","173"]],f=mxUtils.parseXml;mxUtils.parseXml=function(u){for(var y=0;y<b.length;y++)u=u.replace(new RegExp("&"+b[y][0]+";","g"),"&#"+b[y][1]+";");return f(u)};var l=mxUtils.getSizeForString;mxUtils.getSizeForString=function(u,y,q,C){return l(Graph.sanitizeHtml(u),y,q,C)}})();
+null}var f=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.hsplit,this.chromelessToolbar,this.layersDialog];for(b=0;b<f.length;b++)null!=f[b]&&null!=f[b].parentNode&&f[b].parentNode.removeChild(f[b])};(function(){var b=[["nbsp","160"],["shy","173"]],f=mxUtils.parseXml;mxUtils.parseXml=function(t){for(var y=0;y<b.length;y++)t=t.replace(new RegExp("&"+b[y][0]+";","g"),"&#"+b[y][1]+";");return f(t)};var m=mxUtils.getSizeForString;mxUtils.getSizeForString=function(t,y,q,B){return m(Graph.sanitizeHtml(t),y,q,B)}})();
Date.prototype.toISOString||function(){function b(f){f=String(f);1===f.length&&(f="0"+f);return f}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,f=function(u){return"function"===typeof u||"[object Function]"===b.call(u)},l=Math.pow(2,53)-1;return function(u){var y=Object(u);if(null==u)throw new TypeError("Array.from requires an array-like object - not null or undefined");var q=1<arguments.length?arguments[1]:void 0,C;if("undefined"!==typeof q){if(!f(q))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(C=
-arguments[2])}var J=Number(y.length);J=isNaN(J)?0:0!==J&&isFinite(J)?(0<J?1:-1)*Math.floor(Math.abs(J)):J;J=Math.min(Math.max(J,0),l);for(var S=f(this)?Object(new this(J)):Array(J),D=0,P;D<J;)P=y[D],S[D]=q?"undefined"===typeof C?q(P,D):q.call(C,P,D):P,D+=1;S.length=J;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");
+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,f=function(t){return"function"===typeof t||"[object Function]"===b.call(t)},m=Math.pow(2,53)-1;return function(t){var y=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var q=1<arguments.length?arguments[1]:void 0,B;if("undefined"!==typeof q){if(!f(q))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(B=
+arguments[2])}var I=Number(y.length);I=isNaN(I)?0:0!==I&&isFinite(I)?(0<I?1:-1)*Math.floor(Math.abs(I)):I;I=Math.min(Math.max(I,0),m);for(var S=f(this)?Object(new this(I)):Array(I),D=0,P;D<I;)P=y[D],S[D]=q?"undefined"===typeof B?q(P,D):q.call(B,P,D):P,D+=1;S.length=I;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");
mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(f){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage="data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=";
mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#424242";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.graph.refresh(),this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
-mxShape.prototype.getConstraints=function(b,f,l){return null};mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};
-(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(f,l,u,y,q){return"default"==y&&null!=q?"fillcolor"==u.nodeName?q.shapeBackgroundColor:q.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(f,l,u){null==u&&(u=f);return b.apply(this,[f,l,u])}})();
-(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(f,l,u,y,q,C,J,S){var D=b.apply(this,arguments);if(null!=l){var P=D.getElementsByTagName("img");0<P.length&&(P[0].className="geButton")}return D}})();
-Graph=function(b,f,l,u,y,q){mxGraph.call(this,b,f,l,u);this.themes=y||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=q?q:!1;b=this.baseUrl;f=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<f&&(f=b.indexOf("/",f+2),0<f&&(this.domainUrl=b.substring(0,f)),f=b.lastIndexOf("/"),0<f&&(this.domainPathUrl=b.substring(0,f+1)));this.isHtmlLabel=function(k){k=this.getCurrentCellStyle(k);
-return null!=k?"1"==k.html||"wrap"==k[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var C=null,J=null,S=null,D=null,P=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var I=k.getState();v=this.view.scale;if(!mxEvent.isAltDown(k.getEvent())&&null!=I&&(c=this.isCellSelected(I.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(k.getEvent()))){var N=this.selectionCellsHandler.getHandler(I.cell);
-if(null==N||null==N.getHandleForEvent(k)){var T=new mxRectangle(k.getGraphX()-1,k.getGraphY()-1),W=mxEvent.isTouchEvent(k.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;N=W+2;T.grow(W);if(this.isTableCell(I.cell)&&this.isCellMovable(I.cell)&&!this.isCellSelected(I.cell)&&!(mxUtils.contains(I,k.getGraphX()-N,k.getGraphY()-N)&&mxUtils.contains(I,k.getGraphX()-N,k.getGraphY()+N)&&mxUtils.contains(I,k.getGraphX()+N,k.getGraphY()+N)&&mxUtils.contains(I,k.getGraphX()+
-N,k.getGraphY()-N))){var U=this.model.getParent(I.cell);N=this.model.getParent(U);if(!this.isCellSelected(N)){W*=v;var Y=2*W;if(this.model.getChildAt(N,0)!=U&&mxUtils.intersects(T,new mxRectangle(I.x,I.y-W,I.width,Y))||this.model.getChildAt(U,0)!=I.cell&&mxUtils.intersects(T,new mxRectangle(I.x-W,I.y,Y,I.height))||mxUtils.intersects(T,new mxRectangle(I.x,I.y+I.height-W,I.width,Y))||mxUtils.intersects(T,new mxRectangle(I.x+I.width-W,I.y,Y,I.height)))U=this.selectionCellsHandler.isHandled(N),this.selectCellForEvent(N,
-k.getEvent()),N=this.selectionCellsHandler.getHandler(N),null!=N&&(W=N.getHandleForEvent(k),null!=W&&(N.start(k.getGraphX(),k.getGraphY(),W),N.blockDelayedSelection=!U,k.consume()))}}for(;!k.isConsumed()&&null!=I&&(this.isTableCell(I.cell)||this.isTableRow(I.cell)||this.isTable(I.cell));)this.isSwimlane(I.cell)&&this.isCellMovable(I.cell)&&(N=this.getActualStartSize(I.cell),(0<N.x||0<N.width)&&mxUtils.intersects(T,new mxRectangle(I.x+(N.x-N.width-1)*v+(0==N.x?I.width:0),I.y,1,I.height))||(0<N.y||
-0<N.height)&&mxUtils.intersects(T,new mxRectangle(I.x,I.y+(N.y-N.height-1)*v+(0==N.y?I.height:0),I.width,1)))&&(this.selectCellForEvent(I.cell,k.getEvent()),N=this.selectionCellsHandler.getHandler(I.cell),null!=N&&null!=N.customHandles&&(W=mxEvent.CUSTOM_HANDLE-N.customHandles.length+1,N.start(k.getGraphX(),k.getGraphY(),W),k.consume())),I=this.view.getState(this.model.getParent(I.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&
-this.isEnabled()){k=v.getProperty("event");var I=k.getState();mxEvent.isAltDown(k.getEvent())||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v)||c||null==I||!this.model.isEdge(I.cell)||(C=new mxPoint(k.getGraphX(),k.getGraphY()),P=this.isCellSelected(I.cell),S=I,J=k,null!=I.text&&null!=I.text.boundingBox&&mxUtils.contains(I.text.boundingBox,k.getGraphX(),k.getGraphY())?D=mxEvent.LABEL_HANDLE:(v=this.selectionCellsHandler.getHandler(I.cell),null!=v&&null!=v.bends&&0<v.bends.length&&(D=v.getHandleForEvent(k))))}}));
-this.addMouseListener({mouseDown:function(k,v){},mouseMove:mxUtils.bind(this,function(k,v){k=this.selectionCellsHandler.handlers.map;for(var I in k)if(null!=k[I].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(v.getEvent())){var N=this.tolerance;if(null!=C&&null!=S&&null!=J){if(I=S,null!=D||Math.abs(C.x-v.getGraphX())>N||Math.abs(C.y-v.getGraphY())>N){var T=null;mxEvent.isShiftDown(v.getEvent())||(T=this.selectionCellsHandler.getHandler(I.cell));if(null!=T&&null!=
-T.bends&&0<T.bends.length){T.redrawHandles();var W=null!=D?D:T.getHandleForEvent(J),U=this.view.getEdgeStyle(I),Y=U==mxEdgeStyle.EntityRelation;N=I.absolutePoints;P||(W=D);W!=mxEvent.LABEL_HANDLE&&null!=N&&(W=D,null==W&&(k=new mxRectangle(C.x,C.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,N[0].x,N[0].y)?W=0:mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?W=T.bends.length-1:null!=N&&(null==U&&null==W||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&
-(null!=U&&(2==N.length||3==N.length&&(0==Math.round(N[0].x-N[1].x)&&0==Math.round(N[1].x-N[2].x)||0==Math.round(N[0].y-N[1].y)&&0==Math.round(N[1].y-N[2].y)))?W=2:(W=mxUtils.findNearestSegment(I,C.x,C.y),W=null==U?mxEvent.VIRTUAL_HANDLE-W:W+1))),null==W&&(W=mxEvent.VIRTUAL_HANDLE));k=W==mxEvent.LABEL_HANDLE||0==W||W==T.bends.length-1;if(!Y&&(null!=I.visibleSourceState||null!=I.visibleTargetState)||k)T.start(v.getGraphX(),v.getGraphX(),W),v.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?
-this.isCellSelected(I.cell)||(this.selectionCellsHandler.handlers.put(I.cell,T),this.selectCellForEvent(I.cell,v.getEvent())):this.isCellSelected(I.cell)||T.destroy());P=!1;C=J=S=D=null}}else if(I=v.getState(),null!=I&&this.isCellEditable(I.cell)){k=this.model.getParent(I.cell);T=null;if(this.model.isEdge(I.cell)&&!this.isCellSelected(I.cell)&&!mxEvent.isAltDown(v.getEvent())&&!mxEvent.isShiftDown(v.getEvent())&&!this.isAncestorSelected(I.cell)&&(this.isSwimlane(k)||this.model.isLayer(k)||this.getCurrentRoot()==
-k)){if(k=new mxRectangle(v.getGraphX(),v.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),N=I.absolutePoints,null!=N)null!=I.text&&null!=I.text.boundingBox&&mxUtils.contains(I.text.boundingBox,v.getGraphX(),v.getGraphY())?T="move":mxUtils.contains(k,N[0].x,N[0].y)||mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(I),U==mxEdgeStyle.EntityRelation||null==I.visibleSourceState&&null==I.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&
-U!=mxEdgeStyle.OrthConnector))||(v=mxUtils.findNearestSegment(I,v.getGraphX(),v.getGraphY()),v<N.length-1&&0<=v&&(T=0==Math.round(N[v].x-N[v+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(v.getEvent())){N=mxShape.prototype.svgStrokeTolerance/2;k=new mxRectangle(v.getGraphX(),v.getGraphY());k.grow(N);if(this.isTableCell(I.cell)&&this.isCellMovable(I.cell)&&(v=this.model.getParent(I.cell),N=this.model.getParent(v),!this.isCellSelected(N)))if(mxUtils.intersects(k,new mxRectangle(I.x,
-I.y-2,I.width,4))&&this.model.getChildAt(N,0)!=v||mxUtils.intersects(k,new mxRectangle(I.x,I.y+I.height-2,I.width,4)))T="row-resize";else if(mxUtils.intersects(k,new mxRectangle(I.x-2,I.y,4,I.height))&&this.model.getChildAt(v,0)!=I.cell||mxUtils.intersects(k,new mxRectangle(I.x+I.width-2,I.y,4,I.height)))T="col-resize";for(v=I;null==T&&null!=v&&(this.isTableCell(v.cell)||this.isTableRow(v.cell)||this.isTable(v.cell));)this.isSwimlane(v.cell)&&this.isCellMovable(v.cell)&&(N=this.getActualStartSize(v.cell),
-W=this.view.scale,(0<N.x||0<N.width)&&mxUtils.intersects(k,new mxRectangle(v.x+(N.x-N.width-1)*W+(0==N.x?v.width*W:0),v.y,1,v.height))?T="col-resize":(0<N.y||0<N.height)&&mxUtils.intersects(k,new mxRectangle(v.x,v.y+(N.y-N.height-1)*W+(0==N.y?v.height:0),v.width,1))&&(T="row-resize")),v=this.view.getState(this.model.getParent(v.cell))}null!=T&&I.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(k,v){D=C=J=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var g=document.createElement("div");this.cellRenderer.getLabelValue=
+mxShape.prototype.getConstraints=function(b,f,m){return null};mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};
+(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(f,m,t,y,q){return"default"==y&&null!=q?"fillcolor"==t.nodeName?q.shapeBackgroundColor:q.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(f,m,t){null==t&&(t=f);return b.apply(this,[f,m,t])}})();
+(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(f,m,t,y,q,B,I,S){var D=b.apply(this,arguments);if(null!=m){var P=D.getElementsByTagName("img");0<P.length&&(P[0].className="geButton")}return D}})();
+Graph=function(b,f,m,t,y,q){mxGraph.call(this,b,f,m,t);this.themes=y||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=q?q:!1;b=this.baseUrl;f=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<f&&(f=b.indexOf("/",f+2),0<f&&(this.domainUrl=b.substring(0,f)),f=b.lastIndexOf("/"),0<f&&(this.domainPathUrl=b.substring(0,f+1)));this.isHtmlLabel=function(k){k=this.getCurrentCellStyle(k);
+return null!=k?"1"==k.html||"wrap"==k[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,I=null,S=null,D=null,P=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var J=k.getState();v=this.view.scale;if(!mxEvent.isAltDown(k.getEvent())&&null!=J&&(c=this.isCellSelected(J.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(k.getEvent()))){var N=this.selectionCellsHandler.getHandler(J.cell);
+if(null==N||null==N.getHandleForEvent(k)){var T=new mxRectangle(k.getGraphX()-1,k.getGraphY()-1),W=mxEvent.isTouchEvent(k.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;N=W+2;T.grow(W);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&!this.isCellSelected(J.cell)&&!(mxUtils.contains(J,k.getGraphX()-N,k.getGraphY()-N)&&mxUtils.contains(J,k.getGraphX()-N,k.getGraphY()+N)&&mxUtils.contains(J,k.getGraphX()+N,k.getGraphY()+N)&&mxUtils.contains(J,k.getGraphX()+
+N,k.getGraphY()-N))){var U=this.model.getParent(J.cell);N=this.model.getParent(U);if(!this.isCellSelected(N)){W*=v;var Y=2*W;if(this.model.getChildAt(N,0)!=U&&mxUtils.intersects(T,new mxRectangle(J.x,J.y-W,J.width,Y))||this.model.getChildAt(U,0)!=J.cell&&mxUtils.intersects(T,new mxRectangle(J.x-W,J.y,Y,J.height))||mxUtils.intersects(T,new mxRectangle(J.x,J.y+J.height-W,J.width,Y))||mxUtils.intersects(T,new mxRectangle(J.x+J.width-W,J.y,Y,J.height)))U=this.selectionCellsHandler.isHandled(N),this.selectCellForEvent(N,
+k.getEvent()),N=this.selectionCellsHandler.getHandler(N),null!=N&&(W=N.getHandleForEvent(k),null!=W&&(N.start(k.getGraphX(),k.getGraphY(),W),N.blockDelayedSelection=!U,k.consume()))}}for(;!k.isConsumed()&&null!=J&&(this.isTableCell(J.cell)||this.isTableRow(J.cell)||this.isTable(J.cell));)this.isSwimlane(J.cell)&&this.isCellMovable(J.cell)&&(N=this.getActualStartSize(J.cell),(0<N.x||0<N.width)&&mxUtils.intersects(T,new mxRectangle(J.x+(N.x-N.width-1)*v+(0==N.x?J.width:0),J.y,1,J.height))||(0<N.y||
+0<N.height)&&mxUtils.intersects(T,new mxRectangle(J.x,J.y+(N.y-N.height-1)*v+(0==N.y?J.height:0),J.width,1)))&&(this.selectCellForEvent(J.cell,k.getEvent()),N=this.selectionCellsHandler.getHandler(J.cell),null!=N&&null!=N.customHandles&&(W=mxEvent.CUSTOM_HANDLE-N.customHandles.length+1,N.start(k.getGraphX(),k.getGraphY(),W),k.consume())),J=this.view.getState(this.model.getParent(J.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&
+this.isEnabled()){k=v.getProperty("event");var J=k.getState();mxEvent.isAltDown(k.getEvent())||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v)||c||null==J||!this.model.isEdge(J.cell)||(B=new mxPoint(k.getGraphX(),k.getGraphY()),P=this.isCellSelected(J.cell),S=J,I=k,null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,k.getGraphX(),k.getGraphY())?D=mxEvent.LABEL_HANDLE:(v=this.selectionCellsHandler.getHandler(J.cell),null!=v&&null!=v.bends&&0<v.bends.length&&(D=v.getHandleForEvent(k))))}}));
+this.addMouseListener({mouseDown:function(k,v){},mouseMove:mxUtils.bind(this,function(k,v){k=this.selectionCellsHandler.handlers.map;for(var J in k)if(null!=k[J].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(v.getEvent())){var N=this.tolerance;if(null!=B&&null!=S&&null!=I){if(J=S,null!=D||Math.abs(B.x-v.getGraphX())>N||Math.abs(B.y-v.getGraphY())>N){var T=null;mxEvent.isShiftDown(v.getEvent())||(T=this.selectionCellsHandler.getHandler(J.cell));if(null!=T&&null!=
+T.bends&&0<T.bends.length){T.redrawHandles();var W=null!=D?D:T.getHandleForEvent(I),U=this.view.getEdgeStyle(J),Y=U==mxEdgeStyle.EntityRelation;N=J.absolutePoints;P||(W=D);W!=mxEvent.LABEL_HANDLE&&null!=N&&(W=D,null==W&&(k=new mxRectangle(B.x,B.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,N[0].x,N[0].y)?W=0:mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?W=T.bends.length-1:null!=N&&(null==U&&null==W||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&
+(null!=U&&(2==N.length||3==N.length&&(0==Math.round(N[0].x-N[1].x)&&0==Math.round(N[1].x-N[2].x)||0==Math.round(N[0].y-N[1].y)&&0==Math.round(N[1].y-N[2].y)))?W=2:(W=mxUtils.findNearestSegment(J,B.x,B.y),W=null==U?mxEvent.VIRTUAL_HANDLE-W:W+1))),null==W&&(W=mxEvent.VIRTUAL_HANDLE));k=W==mxEvent.LABEL_HANDLE||0==W||W==T.bends.length-1;if(!Y&&(null!=J.visibleSourceState||null!=J.visibleTargetState)||k)T.start(v.getGraphX(),v.getGraphX(),W),v.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?
+this.isCellSelected(J.cell)||(this.selectionCellsHandler.handlers.put(J.cell,T),this.selectCellForEvent(J.cell,v.getEvent())):this.isCellSelected(J.cell)||T.destroy());P=!1;B=I=S=D=null}}else if(J=v.getState(),null!=J&&this.isCellEditable(J.cell)){k=this.model.getParent(J.cell);T=null;if(this.model.isEdge(J.cell)&&!this.isCellSelected(J.cell)&&!mxEvent.isAltDown(v.getEvent())&&!mxEvent.isShiftDown(v.getEvent())&&!this.isAncestorSelected(J.cell)&&(this.isSwimlane(k)||this.model.isLayer(k)||this.getCurrentRoot()==
+k)){if(k=new mxRectangle(v.getGraphX(),v.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),N=J.absolutePoints,null!=N)null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,v.getGraphX(),v.getGraphY())?T="move":mxUtils.contains(k,N[0].x,N[0].y)||mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(J),U==mxEdgeStyle.EntityRelation||null==J.visibleSourceState&&null==J.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&
+U!=mxEdgeStyle.OrthConnector))||(v=mxUtils.findNearestSegment(J,v.getGraphX(),v.getGraphY()),v<N.length-1&&0<=v&&(T=0==Math.round(N[v].x-N[v+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(v.getEvent())){N=mxShape.prototype.svgStrokeTolerance/2;k=new mxRectangle(v.getGraphX(),v.getGraphY());k.grow(N);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&(v=this.model.getParent(J.cell),N=this.model.getParent(v),!this.isCellSelected(N)))if(mxUtils.intersects(k,new mxRectangle(J.x,
+J.y-2,J.width,4))&&this.model.getChildAt(N,0)!=v||mxUtils.intersects(k,new mxRectangle(J.x,J.y+J.height-2,J.width,4)))T="row-resize";else if(mxUtils.intersects(k,new mxRectangle(J.x-2,J.y,4,J.height))&&this.model.getChildAt(v,0)!=J.cell||mxUtils.intersects(k,new mxRectangle(J.x+J.width-2,J.y,4,J.height)))T="col-resize";for(v=J;null==T&&null!=v&&(this.isTableCell(v.cell)||this.isTableRow(v.cell)||this.isTable(v.cell));)this.isSwimlane(v.cell)&&this.isCellMovable(v.cell)&&(N=this.getActualStartSize(v.cell),
+W=this.view.scale,(0<N.x||0<N.width)&&mxUtils.intersects(k,new mxRectangle(v.x+(N.x-N.width-1)*W+(0==N.x?v.width*W:0),v.y,1,v.height))?T="col-resize":(0<N.y||0<N.height)&&mxUtils.intersects(k,new mxRectangle(v.x,v.y+(N.y-N.height-1)*W+(0==N.y?v.height:0),v.width,1))&&(T="row-resize")),v=this.view.getState(this.model.getParent(v.cell))}null!=T&&J.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(k,v){D=B=I=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var g=document.createElement("div");this.cellRenderer.getLabelValue=
function(k){var v=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);k.view.graph.isHtmlLabel(k.cell)&&("0"==mxUtils.getValue(k.style,"html","0")?v=mxUtils.htmlEntities(v,!1):(k.lastLabelValue!=v&&(k.lastLabelValue=v,k.lastSanitizedLabelValue=Graph.sanitizeHtml(v),g.innerHTML=k.lastSanitizedLabelValue,Graph.addLightDarkColors(g,null,"simple"==k.view.graph.getAdaptiveColors())&&(k.lastSanitizedLabelValue=g.innerHTML)),v=k.lastSanitizedLabelValue));return v};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);
-this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(k,v){return!1};this.alternateEdgeStyle="vertical";null==u&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;
-this.graphHandler.getGuideStates=function(){var k=m.apply(this,arguments);if(this.graph.pageVisible){var v=[],I=this.graph.pageFormat,N=this.graph.pageScale,T=I.width*N;I=I.height*N;N=this.graph.view.translate;for(var W=this.graph.view.scale,U=this.graph.getPageLayout(),Y=0;Y<U.width;Y++)v.push(new mxRectangle(((U.x+Y)*T+N.x)*W,(U.y*I+N.y)*W,T*W,I*W));for(Y=1;Y<U.height;Y++)v.push(new mxRectangle((U.x*T+N.x)*W,((U.y+Y)*I+N.y)*W,T*W,I*W));k=v.concat(k)}return k};mxDragSource.prototype.dragElementZIndex=
-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(k,v){return null==k.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(k){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(k){for(var v=n.apply(this,arguments),I=new mxDictionary,N=[],T=0;T<v.length;T++){var W=
-this.graph.isTableCell(k)&&this.graph.isTableCell(v[T])&&this.graph.isCellSelected(v[T])?this.graph.model.getParent(v[T]):this.graph.isTableRow(k)&&this.graph.isTableRow(v[T])&&this.graph.isCellSelected(v[T])?v[T]:this.graph.getCompositeParent(v[T]);null==W||I.get(W)||(I.put(W,!0),N.push(W))}return N};var x=this.graphHandler.start;this.graphHandler.start=function(k,v,I,N){var T=!1;this.graph.isTableCell(k)&&(this.graph.isCellSelected(k)?T=!0:k=this.graph.model.getParent(k));T||this.graph.isTableRow(k)&&
-this.graph.isCellSelected(k)||(k=this.graph.getCompositeParent(k));x.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(k,v){v=this.graph.getCompositeParent(v);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(k,v,I,N,T,W){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=N&&this.graph.applyNewEdgeStyle(N,[U]);return U};var F=new mxRubberband(this);this.getRubberband=function(){return F};
-var H=(new Date).getTime(),M=0,L=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var k=this.currentState;L.apply(this,arguments);k!=this.currentState?(H=(new Date).getTime(),M=0):M=(new Date).getTime()-H};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(k){return mxEvent.isShiftDown(k.getEvent())&&mxEvent.isAltDown(k.getEvent())?!1:null!=this.currentState&&k.getState()==this.currentState&&2E3<M||(null==this.currentState||
-"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var Z=this.isToggleEvent;this.isToggleEvent=function(k){return Z.apply(this,arguments)||mxEvent.isShiftDown(k)};var ha=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ha=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=
-ha)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(k){return mxEvent.isMouseEvent(k.getEvent())};var ca=this.click;this.click=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(this.getLayerForCell(k.sourceState.cell));if(this.isEnabled()&&!v||k.isConsumed())return ca.apply(this,arguments);var I=v?k.sourceState.cell:k.getCell();if(null!=I){var N=this.getClickableLinkForCell(I);null!=N?this.isCustomLink(N)?this.customLinkClicked(N,I):this.openLink(N):
-v&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};var aa=this.tooltipHandler.show;this.tooltipHandler.show=function(){aa.apply(this,arguments);if(null!=this.div)for(var k=this.div.getElementsByTagName("a"),v=0;v<k.length;v++)null!=k[v].getAttribute("href")&&null==k[v].getAttribute("target")&&k[v].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};this.getCursorForMouseEvent=function(k){var v=null==
-k.state&&null!=k.sourceState&&this.isCellLocked(k.sourceState.cell);return this.getCursorForCell(v?k.sourceState.cell:k.getCell())};var oa=this.getCursorForCell;this.getCursorForCell=function(k){if(!this.isEnabled()||this.isCellLocked(k)){if(null!=this.getClickableLinkForCell(k))return"pointer";if(this.isCellLocked(k))return"default"}return oa.apply(this,arguments)};this.selectRegion=function(k,v){var I=mxEvent.isAltDown(v)?k:null;k=this.getCells(k.x,k.y,k.width,k.height,null,null,I,null,!0);if(this.isToggleEvent(v))for(I=
-0;I<k.length;I++)this.selectCellForEvent(k[I],v);else this.selectCellsForEvent(k,v);return k};var da=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(k,v,I){return this.graph.isCellSelected(k)?!1:da.apply(this,arguments)};var ka=this.updateMouseEvent;this.updateMouseEvent=function(k){k=ka.apply(this,arguments);null!=k.state&&this.isCellLocked(this.getLayerForCell(k.getCell()))&&(null==this.getLinkForCell(k.getCell())?k.state=this.view.getState(this.getCellAt(k.getGraphX(),
-k.getGraphY(),null,null,null,mxUtils.bind(this,function(v,I,N){return k.state==v||this.isCellLocked(this.getLayerForCell(v.cell))&&null==this.getLinkForCell(v.cell)}))):k.state=null);return k};var ba=this.isCellSelectable;this.isCellSelectable=function(k){return ba.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(k))};this.isCellLocked=function(k){for(;null!=k;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(k),"locked","0"))return!0;k=this.model.getParent(k)}return!1};var V=null;
-this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){"mouseDown"==v.getProperty("eventName")&&(k=v.getProperty("event").getState(),V=null==k||this.isSelectionEmpty()||this.isCellSelected(k.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(k,v){if(!mxEvent.isMultiTouchEvent(v)){k=v.getProperty("event");var I=v.getProperty("cell");null==I?(k=mxUtils.convertPoint(this.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),F.start(k.x,
-k.y)):null!=V?this.addSelectionCells(V):1<this.getSelectionCount()&&this.isCellSelected(I)&&this.removeSelectionCell(I);V=null;v.consume()}}));this.connectionHandler.selectCells=function(k,v){this.graph.setSelectionCell(v||k)};this.connectionHandler.constraintHandler.isStateIgnored=function(k,v){var I=k.view.graph;return v&&(I.isCellSelected(k.cell)||I.isTableRow(k.cell)&&I.selectionCellsHandler.isHandled(I.model.getParent(k.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
+this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(k,v){return!1};this.alternateEdgeStyle="vertical";null==t&&this.loadStylesheet();var l=this.graphHandler.getGuideStates;
+this.graphHandler.getGuideStates=function(){var k=l.apply(this,arguments);if(this.graph.pageVisible){var v=[],J=this.graph.pageFormat,N=this.graph.pageScale,T=J.width*N;J=J.height*N;N=this.graph.view.translate;for(var W=this.graph.view.scale,U=this.graph.getPageLayout(),Y=0;Y<U.width;Y++)v.push(new mxRectangle(((U.x+Y)*T+N.x)*W,(U.y*J+N.y)*W,T*W,J*W));for(Y=1;Y<U.height;Y++)v.push(new mxRectangle((U.x*T+N.x)*W,((U.y+Y)*J+N.y)*W,T*W,J*W));k=v.concat(k)}return k};mxDragSource.prototype.dragElementZIndex=
+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(k,v){return null==k.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(k){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(k){for(var v=n.apply(this,arguments),J=new mxDictionary,N=[],T=0;T<v.length;T++){var W=
+this.graph.isTableCell(k)&&this.graph.isTableCell(v[T])&&this.graph.isCellSelected(v[T])?this.graph.model.getParent(v[T]):this.graph.isTableRow(k)&&this.graph.isTableRow(v[T])&&this.graph.isCellSelected(v[T])?v[T]:this.graph.getCompositeParent(v[T]);null==W||J.get(W)||(J.put(W,!0),N.push(W))}return N};var x=this.graphHandler.start;this.graphHandler.start=function(k,v,J,N){var T=!1;this.graph.isTableCell(k)&&(this.graph.isCellSelected(k)?T=!0:k=this.graph.model.getParent(k));T||this.graph.isTableRow(k)&&
+this.graph.isCellSelected(k)||(k=this.graph.getCompositeParent(k));x.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(k,v){v=this.graph.getCompositeParent(v);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(k,v,J,N,T,W){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=N&&this.graph.applyNewEdgeStyle(N,[U]);return U};var F=new mxRubberband(this);this.getRubberband=function(){return F};
+var G=(new Date).getTime(),L=0,M=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var k=this.currentState;M.apply(this,arguments);k!=this.currentState?(G=(new Date).getTime(),L=0):L=(new Date).getTime()-G};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(k){return mxEvent.isShiftDown(k.getEvent())&&mxEvent.isAltDown(k.getEvent())?!1:null!=this.currentState&&k.getState()==this.currentState&&2E3<L||(null==this.currentState||
+"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var Z=this.isToggleEvent;this.isToggleEvent=function(k){return Z.apply(this,arguments)||mxEvent.isShiftDown(k)};var ja=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ja=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=
+ja)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(k){return mxEvent.isMouseEvent(k.getEvent())};var da=this.click;this.click=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(this.getLayerForCell(k.sourceState.cell));if(this.isEnabled()&&!v||k.isConsumed())return da.apply(this,arguments);var J=v?k.sourceState.cell:k.getCell();if(null!=J){var N=this.getClickableLinkForCell(J);null!=N?this.isCustomLink(N)?this.customLinkClicked(N,J):this.openLink(N):
+v&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};var ba=this.tooltipHandler.show;this.tooltipHandler.show=function(){ba.apply(this,arguments);if(null!=this.div)for(var k=this.div.getElementsByTagName("a"),v=0;v<k.length;v++)null!=k[v].getAttribute("href")&&null==k[v].getAttribute("target")&&k[v].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};this.getCursorForMouseEvent=function(k){var v=null==
+k.state&&null!=k.sourceState&&this.isCellLocked(k.sourceState.cell);return this.getCursorForCell(v?k.sourceState.cell:k.getCell())};var na=this.getCursorForCell;this.getCursorForCell=function(k){if(!this.isEnabled()||this.isCellLocked(k)){if(null!=this.getClickableLinkForCell(k))return"pointer";if(this.isCellLocked(k))return"default"}return na.apply(this,arguments)};this.selectRegion=function(k,v){var J=mxEvent.isAltDown(v)?k:null;k=this.getCells(k.x,k.y,k.width,k.height,null,null,J,null,!0);if(this.isToggleEvent(v))for(J=
+0;J<k.length;J++)this.selectCellForEvent(k[J],v);else this.selectCellsForEvent(k,v);return k};var ca=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(k,v,J){return this.graph.isCellSelected(k)?!1:ca.apply(this,arguments)};var ka=this.updateMouseEvent;this.updateMouseEvent=function(k){k=ka.apply(this,arguments);null!=k.state&&this.isCellLocked(this.getLayerForCell(k.getCell()))&&(null==this.getLinkForCell(k.getCell())?k.state=this.view.getState(this.getCellAt(k.getGraphX(),
+k.getGraphY(),null,null,null,mxUtils.bind(this,function(v,J,N){return k.state==v||this.isCellLocked(this.getLayerForCell(v.cell))&&null==this.getLinkForCell(v.cell)}))):k.state=null);return k};var aa=this.isCellSelectable;this.isCellSelectable=function(k){return aa.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(k))};this.isCellLocked=function(k){for(;null!=k;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(k),"locked","0"))return!0;k=this.model.getParent(k)}return!1};var V=null;
+this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){"mouseDown"==v.getProperty("eventName")&&(k=v.getProperty("event").getState(),V=null==k||this.isSelectionEmpty()||this.isCellSelected(k.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(k,v){if(!mxEvent.isMultiTouchEvent(v)){k=v.getProperty("event");var J=v.getProperty("cell");null==J?(k=mxUtils.convertPoint(this.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),F.start(k.x,
+k.y)):null!=V?this.addSelectionCells(V):1<this.getSelectionCount()&&this.isCellSelected(J)&&this.removeSelectionCell(J);V=null;v.consume()}}));this.connectionHandler.selectCells=function(k,v){this.graph.setSelectionCell(v||k)};this.connectionHandler.constraintHandler.isStateIgnored=function(k,v){var J=k.view.graph;return v&&(J.isCellSelected(k.cell)||J.isTableRow(k.cell)&&J.selectionCellsHandler.isHandled(J.model.getParent(k.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
function(){var k=this.connectionHandler.constraintHandler;null!=k.currentFocus&&k.isStateIgnored(k.currentFocus,!0)&&(k.currentFocus=null,k.constraints=null,k.destroyIcons());k.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
Graph.foreignObjectWarningLink="https://www.drawio.com/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than draw.io --\x3e";
@@ -2321,158 +2324,159 @@ Graph.cellStyles=mxUtils.addItems(mxUtils.addItems(mxUtils.addItems("rounded sha
Graph.edgeStyles),Graph.cellStyleGroups);Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");Graph.backupStyleAttribute="data-mx-given-colors";Graph.newColorPlaceholder="rgba(0, 0, 0, 0)";Graph.newBackgroundPlaceholder="rgb(0, 0, 0)";Graph.defaultAdaptiveColors=window.mxIsElectron||"0"==urlParams.contrast?"simple":"auto";
Graph.getDefaultAdaptiveColorsKey=function(){return"auto"==Graph.defaultAdaptiveColors?"automatic":Graph.defaultAdaptiveColors};
Graph.createOffscreenGraph=function(b){var f=new Graph(document.createElement("div"));f.stylesheet.styles=mxUtils.clone(b.styles);f.resetViewOnRootChange=!1;f.setConnectable(!1);f.gridEnabled=!1;f.autoScroll=!1;f.setTooltips(!1);f.setEnabled(!1);f.container.style.visibility="hidden";f.container.style.position="absolute";f.container.style.overflow="hidden";f.container.style.height="1px";f.container.style.width="1px";return f};
-Graph.createSvgImage=function(b,f,l,u,y){l=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+f+'px" '+(null!=u&&null!=y?'viewBox="0 0 '+u+" "+y+'" ':"")+'version="1.1" style="color-scheme: light dark;">'+l+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(l):Base64.encode(l,!0)),b,f)};
+Graph.createSvgImage=function(b,f,m,t,y){m=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+f+'px" '+(null!=t&&null!=y?'viewBox="0 0 '+t+" "+y+'" ':"")+'version="1.1" style="color-scheme: light dark;">'+m+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(m):Base64.encode(m,!0)),b,f)};
Graph.getSvgFromDataUri=function(b){return null!=b&&"data:image/svg"==b.substring(0,14)?Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+decodeURIComponent(escape(atob(b.substring(b.indexOf(",")+1)))):null};
-Graph.createSvgNode=function(b,f,l,u,y){var q=mxUtils.createXmlDocument(),C=null!=q.createElementNS?q.createElementNS(mxConstants.NS_SVG,"svg"):q.createElement("svg");null!=y&&C.setAttribute("style","background: "+y.light+"; background-color: "+y.cssText+";");null==q.createElementNS?(C.setAttribute("xmlns",mxConstants.NS_SVG),C.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):C.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);C.setAttribute("version","1.1");C.setAttribute("width",
-l+"px");C.setAttribute("height",u+"px");C.setAttribute("viewBox",b+" "+f+" "+l+" "+u);q.appendChild(C);return C};
-Graph.htmlToPng=function(b,f,l,u,y,q){y=null!=y?y:"";q=null!=q?q:Editor.htmlRasterScale;var C=document.createElement("canvas");C.width=f*q;C.height=l*q;var J=document.createElement("img");J.onload=mxUtils.bind(this,function(){try{var D=C.getContext("2d");D.scale(q,q);D.drawImage(J,0,0);u(C.toDataURL())}catch(P){u(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);J.onerror=
-function(D){u(null)};J.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+f+'" height="'+l+'">'+(""!=y?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+y+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};
-Graph.addLightDarkColors=function(b,f,l,u){function y(g,m,n){return null!=u?u(g,m,n):mxUtils.isValidColor(n)?(null==C&&null!=f&&(C={}),null!=C&&(C[m]=g.style.getPropertyValue(m)),n=mxUtils.getLightDarkColor(n,null,null,l),g.style.setProperty(m,n.cssText),!0):!1}for(var q=b.getElementsByTagName("*"),C=null,J=!1,S=0;S<q.length;S++)if(q[S]!=b&&null!=q[S].style){C=null;for(var D=0;D<q[S].style.length;D++){var P=q[S].style.item(D),c=q[S].style.getPropertyValue(P);J=y(q[S],P,c)||J}"FONT"==q[S].nodeName&&
-""==q[S].style.getPropertyValue("color")&&(c=q[S].getAttribute("color"),J=y(q[S],"color",c)||J);null!=f&&null!=C&&q[S].setAttribute(f,JSON.stringify(C))}return J};Graph.removeLightDarkColors=function(b,f){b=b.getElementsByTagName("*");for(var l=!1,u=0;u<b.length;u++)try{var y=b[u].getAttribute(f);if(null!=y){b[u].removeAttribute(f);var q=JSON.parse(y),C;for(C in q){var J=q[C];""==J?(b[u].style[C]=null,""==b[u].getAttribute("style")&&b[u].removeAttribute("style")):b[u].style[C]=J;l=!0}}}catch(S){}return l};
-Graph.getGivenColor=function(b,f){var l=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var u=b.getAttribute(Graph.backupStyleAttribute);if(null!=u){var y=JSON.parse(u);null!=y&&null!=y[f]&&("color"==f&&"FONT"==b.nodeName&&""==y[f]&&null!=b.getAttribute("color")?l=b.getAttribute("color"):""!=y[f]&&(l=y[f]))}}catch(q){}null==l&&""!=b.style[f]&&(l=b.style[f])}return l};
-Graph.setTextColor=function(b,f,l){for(var u=l?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,y=l?"color":"background-color",q=b.getElementsByTagName("*"),C=[],J=0;J<q.length;J++)C.push({node:q[J],value:q[J].style[y]});document.execCommand(l?"forecolor":"backcolor",!1,u);b=b.getElementsByTagName("*");for(J=0;J<b.length;J++){if(J<C.length&&C[J].node==b[J]&&C[J].value!=b[J].style[y]&&""==b[J].style[y])try{if(q=b[J].getAttribute(Graph.backupStyleAttribute),null!=q){var S=JSON.parse(q);S[y]=
-"";b[J].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(D){}if(l&&b[J].getAttribute("color")==u||b[J].style[y]==u){l&&b[J].getAttribute("color")==u&&b[J].removeAttribute("color");b[J].style[y]=f!=mxConstants.NONE?mxUtils.getLightDarkColor(f).cssText:null;try{q=b[J].getAttribute(Graph.backupStyleAttribute),S=null!=q?JSON.parse(q):{},S[y]=f!=mxConstants.NONE?f:"",b[J].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(D){}if(l&&mxClient.IS_FF){f=b[J];l=f.firstChild;if(null!=
-l&&"A"==l.nodeName&&null==l.nextSibling&&null!=l.firstChild){f.parentNode.insertBefore(l,f);for(u=l.firstChild;null!=u;)y=u.nextSibling,f.appendChild(u),u=y;l.appendChild(f)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var f=Array(b.length),l=0;l<b.length;l++)f[l]=b.charCodeAt(l);return f};Graph.bytesToString=function(b){for(var f=Array(b.length),l=0;l<b.length;l++)f[l]=String.fromCharCode(b[l]);return f.join("")};
-Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(f,l){return String.fromCharCode(parseInt(l,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(f){return"%"+("00"+f.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,f){b=mxUtils.getXml(b);return Graph.compress(f?b:Graph.zapGremlins(b))};
-Graph.arrayBufferToString=function(b){var f="";b=new Uint8Array(b);for(var l=b.byteLength,u=0;u<l;u++)f+=String.fromCharCode(b[u]);return f};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(f){return f.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(b,f,l){var u=f.charCodeAt(0),y=1,q=-1;for(l=l||0;l<b.byteLength;l++)if(b[l]==u){q=l;break}for(l=q+1;-1<q&&l<b.byteLength&&l<q+f.length-1;l++){if(b[l]!=f.charCodeAt(y))return Graph.arrayBufferIndexOfString(b,f,q+1);y++}return y==f.length-1?q:-1};Graph.compress=function(b,f){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=f?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
-Graph.decompress=function(b,f,l){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));f=decodeURIComponent(f?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return l?f:Graph.zapGremlins(f)};
-Graph.fadeNodes=function(b,f,l,u,y){y=null!=y?y:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,f);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+y+"ms ease-in-out");Graph.setOpacityForNodes(b,l);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=u&&u()},y)},0)};
-Graph.exploreFromCell=function(b,f,l){pageSize=null!=l&&null!=l.pageSize?l.pageSize:8;minSize=null!=l&&null!=l.minSize?l.minSize:180;(function(u,y){function q(c){c.view.states.visit(function(g,m){null!=m.shape&&c.model.isEdge(c.model.getParent(m.cell))?m.shape.node.parentNode.appendChild(m.shape.node):null!=m.text&&c.model.isEdge(m.cell)&&m.text.node.parentNode.appendChild(m.text.node)})}function C(c,g){if(c.getModel().isVertex(g)){var m=c.container.offsetWidth/2,n=c.container.offsetHeight/2;c.rootCell=
-g.referenceCell||g;c.getModel().beginUpdate();try{pageSize=null!=l&&null!=l.pageSize?l.pageSize:8+Math.max(0,Math.floor(Math.min(c.container.offsetWidth-800/120,c.container.offsetHeight-600)/30));for(var x=g.referenceCell||g,F=u.model.getCell(x.sourceCellId),H=u.getEdges(F,null,!0,!0,!1,!0),M=[],L=0;L<H.length;L++)null!=H[L].getTerminal(!0)&&null!=H[L].getTerminal(!1)&&u.isCellVisible(H[L])&&!u.isEdgeIgnored(H[L])&&u.isCellVisible(H[L].getTerminal(!0))&&u.isCellVisible(H[L].getTerminal(!1))&&u.isCellVisible(u.getLayerForCell(H[L]))&&
-M.push(H[L]);M=H=M;if(null!=g.startIndex||0<pageSize&&H.length>pageSize){var K=g.startIndex||0;M=H.slice(Math.max(0,K),Math.min(H.length,K+pageSize))}M=u.getOpposites(M,F).concat(M);var Z=c.cloneCells(M);for(L=0;L<M.length;L++)if(Z[L].sourceCellId=M[L].id,c.model.isEdge(Z[L]))for(Z[L].geometry.x=0,Z[L].geometry.y=0,Z[L].geometry.points=null,Z[L].setStyle(Z[L].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),Z[L].setTerminal(x,
-null==Z[L].getTerminal(!0)),F=0;F<Z[L].getChildCount();F++){var ha=Z[L].getChildAt(F);null!=ha.geometry&&ha.geometry.relative&&(ha.setStyle(ha.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),ha.geometry.offset=new mxPoint(0,0),ha.geometry.y=0,ha.geometry.x=.5>ha.geometry.x?-.8:.5<ha.geometry.x?.8:0)}if(0<g.startIndex){var ca=c.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((g.startIndex||0)/pageSize)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
-ca.referenceCell=x;ca.startIndex=Math.max(0,(g.startIndex||0)-pageSize);Z.splice(0,0,ca)}if(H.length>(g.startIndex||0)+pageSize){var aa=c.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((g.startIndex||0)/pageSize)+2)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");aa.referenceCell=x;aa.startIndex=(g.startIndex||0)+pageSize;Z.splice(0,0,aa)}for(var oa in c.getModel().cells){var da=c.getModel().getCell(oa);da!=c.rootCell&&
-!c.getModel().isAncestor(c.rootCell,da)&&c.getModel().isVertex(da)&&c.removeCells([da])}c.addCells(Z);var ka=c.getModel().getGeometry(c.rootCell);null!=ka&&(ka=ka.clone(),ka.x=m-ka.width/2,ka.y=n-ka.height/3,c.getModel().setGeometry(c.rootCell,ka));g=[];for(oa in c.getModel().cells)da=c.getModel().getCell(oa),da!=c.rootCell&&c.getModel().isVertex(da)&&c.getModel().getParent(da)==c.getDefaultParent()&&(g.push(da),ka=c.getModel().getGeometry(da),null!=ka&&(ka.x=m-ka.width/2,ka.y=n-ka.height/2));var ba=
-g.length,V=2*Math.PI/ba,k=Math.max(minSize,Math.min(c.container.offsetWidth/2-40,c.container.offsetHeight/2-80));for(m=0;m<ba;m++)ka=c.getModel().getGeometry(g[m]),null!=ka&&(ka=ka.clone(),ka.x+=k*Math.sin(m*V),ka.y+=k*Math.cos(m*V),c.getModel().setGeometry(g[m],ka))}finally{c.getModel().endUpdate()}}}var J=document.createElement("div");J.style.position="absolute";J.style.display="block";J.style.overflow="auto";J.style.width="100%";J.style.height="100%";J.style.left="0px";J.style.top="0px";J.style.zIndex=
-2;J.style.background=u.background==mxConstants.NONE||null==u.background?"light-dark(#ffffff,"+Editor.darkColor+")":u.background;var S=document.createElement("img");S.setAttribute("src",Editor.closeBlackImage);S.style.position="absolute";S.style.cursor="pointer";S.style.right="10px";S.style.top="10px";J.appendChild(S);var D=document.createElement("div");D.style.position="absolute";D.style.cursor="pointer";D.style.right="38px";D.style.top="14px";D.style.textAlign="right";D.style.verticalAlign="top";
-mxUtils.write(D,mxResources.get("close"));J.appendChild(D);document.body.appendChild(J);var P=function(c){27==c.keyCode&&S.click()};mxEvent.addListener(document,"keydown",P);(function(c){var g=new Graph(c);g.keepEdgesInBackground=!0;g.isCellResizable=function(){return!1};g.isCellRotatable=function(){return!1};g.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};g.getFoldingImage=function(){return null};var m=function(){mxEvent.removeListener(document,"keydown",P);c.parentNode.removeChild(c);
-u.scrollCellToVisible(y)};mxEvent.addListener(S,"click",m);mxEvent.addListener(D,"click",m);g.setEnabled(!1);var n=g.click;g.click=function(M){var L=M.getCell(),K=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&0<g.getEdges(K).length?C(g,L):n.apply(this,arguments)};m=g.container.offsetWidth/2;var x=g.container.offsetHeight/3;g.model.beginUpdate();var F=g.importCells([y])[0];F.sourceCellId=y.id;F.geometry.x=m-F.geometry.width/2;F.geometry.y=x-F.geometry.height/2;g.model.endUpdate();var H=
-!1;g.getModel().addListener(mxEvent.CHANGE,function(M,L){H||(M=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,g.labelsVisible=!1,H=!0,mxEffects.animateChanges(g,M,function(){var K=new mxParallelEdgeLayout(g);K.spacing=60;var Z=K.layout;K.layout=function(ha){K.spacing=Math.min(60,Math.max(30,60-5*ha.length));Z.apply(this,arguments)};K.execute(g.getDefaultParent());mxText.prototype.enableBoundingBox=!0;g.labelsVisible=!0;g.tooltipHandler.hide();g.refresh();q(g);H=!1}))});C(g,F)})(J)})(b,
-f)};Graph.removeKeys=function(b,f){for(var l in b)f(l)&&delete b[l]};Graph.setTransitionForNodes=function(b,f){for(var l=0;l<b.length;l++)mxUtils.setPrefixedStyle(b[l].style,"transition",f)};Graph.setOpacityForNodes=function(b,f){for(var l=0;l<b.length;l++)b[l].style.opacity=f};
-Graph.removePasteFormatting=function(b,f){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var l=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var u=Graph.createTabNode(4);b.parentNode.replaceChild(u,b);b=u}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=l&&"P"==l.nodeName&&"p1"==
-l.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!f&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(u=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,u.outerHTML))}b=l}};Graph.createTabNode=function(b){var f="\t";if(null!=b)for(f="";0<b;)f+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(f));return b};Graph.sanitizeHtml=function(b,f){return Graph.domPurify(b,!1)};
+Graph.createSvgNode=function(b,f,m,t,y){var q=mxUtils.createXmlDocument(),B=null!=q.createElementNS?q.createElementNS(mxConstants.NS_SVG,"svg"):q.createElement("svg");null!=y&&B.setAttribute("style","background: "+y.light+"; background-color: "+y.cssText+";");null==q.createElementNS?(B.setAttribute("xmlns",mxConstants.NS_SVG),B.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):B.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);B.setAttribute("version","1.1");B.setAttribute("width",
+m+"px");B.setAttribute("height",t+"px");B.setAttribute("viewBox",b+" "+f+" "+m+" "+t);q.appendChild(B);return B};
+Graph.htmlToPng=function(b,f,m,t,y,q){y=null!=y?y:"";q=null!=q?q:Editor.htmlRasterScale;var B=document.createElement("canvas");B.width=f*q;B.height=m*q;var I=document.createElement("img");I.onload=mxUtils.bind(this,function(){try{var D=B.getContext("2d");D.scale(q,q);D.drawImage(I,0,0);t(B.toDataURL())}catch(P){t(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);I.onerror=
+function(D){t(null)};I.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+f+'" height="'+m+'">'+(""!=y?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+y+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};
+Graph.addLightDarkColors=function(b,f,m,t){function y(g,l,n){return null!=t?t(g,l,n):mxUtils.isValidColor(n)?(null==B&&null!=f&&(B={}),null!=B&&(B[l]=g.style.getPropertyValue(l)),n=mxUtils.getLightDarkColor(n,null,null,m),g.style.setProperty(l,n.cssText),!0):!1}for(var q=b.getElementsByTagName("*"),B=null,I=!1,S=0;S<q.length;S++)if(q[S]!=b&&null!=q[S].style){B=null;for(var D=0;D<q[S].style.length;D++){var P=q[S].style.item(D),c=q[S].style.getPropertyValue(P);I=y(q[S],P,c)||I}"FONT"==q[S].nodeName&&
+""==q[S].style.getPropertyValue("color")&&(c=q[S].getAttribute("color"),I=y(q[S],"color",c)||I);null!=f&&null!=B&&q[S].setAttribute(f,JSON.stringify(B))}return I};Graph.removeLightDarkColors=function(b,f){b=b.getElementsByTagName("*");for(var m=!1,t=0;t<b.length;t++)try{var y=b[t].getAttribute(f);if(null!=y){b[t].removeAttribute(f);var q=JSON.parse(y),B;for(B in q){var I=q[B];""==I?(b[t].style[B]=null,""==b[t].getAttribute("style")&&b[t].removeAttribute("style")):b[t].style[B]=I;m=!0}}}catch(S){}return m};
+Graph.getGivenColor=function(b,f){var m=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var t=b.getAttribute(Graph.backupStyleAttribute);if(null!=t){var y=JSON.parse(t);null!=y&&null!=y[f]&&("color"==f&&"FONT"==b.nodeName&&""==y[f]&&null!=b.getAttribute("color")?m=b.getAttribute("color"):""!=y[f]&&(m=y[f]))}}catch(q){}null==m&&""!=b.style[f]&&(m=b.style[f])}return m};
+Graph.setTextColor=function(b,f,m){for(var t=m?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,y=m?"color":"background-color",q=b.getElementsByTagName("*"),B=[],I=0;I<q.length;I++)B.push({node:q[I],value:q[I].style[y]});document.execCommand(m?"forecolor":"backcolor",!1,t);b=b.getElementsByTagName("*");for(I=0;I<b.length;I++){if(I<B.length&&B[I].node==b[I]&&B[I].value!=b[I].style[y]&&""==b[I].style[y])try{if(q=b[I].getAttribute(Graph.backupStyleAttribute),null!=q){var S=JSON.parse(q);S[y]=
+"";b[I].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(D){}if(m&&b[I].getAttribute("color")==t||b[I].style[y]==t){m&&b[I].getAttribute("color")==t&&b[I].removeAttribute("color");b[I].style[y]=f!=mxConstants.NONE?mxUtils.getLightDarkColor(f).cssText:null;try{q=b[I].getAttribute(Graph.backupStyleAttribute),S=null!=q?JSON.parse(q):{},S[y]=f!=mxConstants.NONE?f:"",b[I].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(D){}if(m&&mxClient.IS_FF){f=b[I];m=f.firstChild;if(null!=
+m&&"A"==m.nodeName&&null==m.nextSibling&&null!=m.firstChild){f.parentNode.insertBefore(m,f);for(t=m.firstChild;null!=t;)y=t.nextSibling,f.appendChild(t),t=y;m.appendChild(f)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var f=Array(b.length),m=0;m<b.length;m++)f[m]=b.charCodeAt(m);return f};Graph.bytesToString=function(b){for(var f=Array(b.length),m=0;m<b.length;m++)f[m]=String.fromCharCode(b[m]);return f.join("")};
+Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(f,m){return String.fromCharCode(parseInt(m,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(f){return"%"+("00"+f.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,f){b=mxUtils.getXml(b);return Graph.compress(f?b:Graph.zapGremlins(b))};
+Graph.arrayBufferToString=function(b){var f="";b=new Uint8Array(b);for(var m=b.byteLength,t=0;t<m;t++)f+=String.fromCharCode(b[t]);return f};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(f){return f.charCodeAt(0)})};
+Graph.arrayBufferIndexOfString=function(b,f,m){var t=f.charCodeAt(0),y=1,q=-1;for(m=m||0;m<b.byteLength;m++)if(b[m]==t){q=m;break}for(m=q+1;-1<q&&m<b.byteLength&&m<q+f.length-1;m++){if(b[m]!=f.charCodeAt(y))return Graph.arrayBufferIndexOfString(b,f,q+1);y++}return y==f.length-1?q:-1};Graph.compress=function(b,f){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=f?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
+Graph.decompress=function(b,f,m){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));f=decodeURIComponent(f?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return m?f:Graph.zapGremlins(f)};
+Graph.fadeNodes=function(b,f,m,t,y){y=null!=y?y:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,f);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+y+"ms ease-in-out");Graph.setOpacityForNodes(b,m);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=t&&t()},y)},0)};
+Graph.exploreFromCell=function(b,f,m){pageSize=null!=m&&null!=m.pageSize?m.pageSize:8;minSize=null!=m&&null!=m.minSize?m.minSize:180;(function(t,y){function q(c){c.view.states.visit(function(g,l){null!=l.shape&&c.model.isEdge(c.model.getParent(l.cell))?l.shape.node.parentNode.appendChild(l.shape.node):null!=l.text&&c.model.isEdge(l.cell)&&l.text.node.parentNode.appendChild(l.text.node)})}function B(c,g){if(c.getModel().isVertex(g)){var l=c.container.offsetWidth/2,n=c.container.offsetHeight/2;c.rootCell=
+g.referenceCell||g;c.getModel().beginUpdate();try{pageSize=null!=m&&null!=m.pageSize?m.pageSize:8+Math.max(0,Math.floor(Math.min(c.container.offsetWidth-800/120,c.container.offsetHeight-600)/30));for(var x=g.referenceCell||g,F=t.model.getCell(x.sourceCellId),G=t.getEdges(F,null,!0,!0,!1,!0),L=[],M=0;M<G.length;M++)null!=G[M].getTerminal(!0)&&null!=G[M].getTerminal(!1)&&t.isCellVisible(G[M])&&!t.isEdgeIgnored(G[M])&&t.isCellVisible(G[M].getTerminal(!0))&&t.isCellVisible(G[M].getTerminal(!1))&&t.isCellVisible(t.getLayerForCell(G[M]))&&
+L.push(G[M]);L=G=L;if(null!=g.startIndex||0<pageSize&&G.length>pageSize){var K=g.startIndex||0;L=G.slice(Math.max(0,K),Math.min(G.length,K+pageSize))}L=t.getOpposites(L,F).concat(L);var Z=c.cloneCells(L);for(M=0;M<L.length;M++)if(Z[M].sourceCellId=L[M].id,c.model.isEdge(Z[M]))for(Z[M].geometry.x=0,Z[M].geometry.y=0,Z[M].geometry.points=null,Z[M].setStyle(Z[M].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),Z[M].setTerminal(x,
+null==Z[M].getTerminal(!0)),F=0;F<Z[M].getChildCount();F++){var ja=Z[M].getChildAt(F);null!=ja.geometry&&ja.geometry.relative&&(ja.setStyle(ja.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),ja.geometry.offset=new mxPoint(0,0),ja.geometry.y=0,ja.geometry.x=.5>ja.geometry.x?-.8:.5<ja.geometry.x?.8:0)}if(0<g.startIndex){var da=c.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((g.startIndex||0)/pageSize)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
+da.referenceCell=x;da.startIndex=Math.max(0,(g.startIndex||0)-pageSize);Z.splice(0,0,da)}if(G.length>(g.startIndex||0)+pageSize){var ba=c.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((g.startIndex||0)/pageSize)+2)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ba.referenceCell=x;ba.startIndex=(g.startIndex||0)+pageSize;Z.splice(0,0,ba)}for(var na in c.getModel().cells){var ca=c.getModel().getCell(na);ca!=c.rootCell&&
+!c.getModel().isAncestor(c.rootCell,ca)&&c.getModel().isVertex(ca)&&c.removeCells([ca])}c.addCells(Z);var ka=c.getModel().getGeometry(c.rootCell);null!=ka&&(ka=ka.clone(),ka.x=l-ka.width/2,ka.y=n-ka.height/3,c.getModel().setGeometry(c.rootCell,ka));g=[];for(na in c.getModel().cells)ca=c.getModel().getCell(na),ca!=c.rootCell&&c.getModel().isVertex(ca)&&c.getModel().getParent(ca)==c.getDefaultParent()&&(g.push(ca),ka=c.getModel().getGeometry(ca),null!=ka&&(ka.x=l-ka.width/2,ka.y=n-ka.height/2));var aa=
+g.length,V=2*Math.PI/aa,k=Math.max(minSize,Math.min(c.container.offsetWidth/2-40,c.container.offsetHeight/2-80));for(l=0;l<aa;l++)ka=c.getModel().getGeometry(g[l]),null!=ka&&(ka=ka.clone(),ka.x+=k*Math.sin(l*V),ka.y+=k*Math.cos(l*V),c.getModel().setGeometry(g[l],ka))}finally{c.getModel().endUpdate()}}}var I=document.createElement("div");I.style.position="absolute";I.style.display="block";I.style.overflow="auto";I.style.width="100%";I.style.height="100%";I.style.left="0px";I.style.top="0px";I.style.zIndex=
+2;I.style.background=t.background==mxConstants.NONE||null==t.background?"light-dark(#ffffff,"+Editor.darkColor+")":t.background;var S=document.createElement("img");S.setAttribute("src",Editor.closeBlackImage);S.style.position="absolute";S.style.cursor="pointer";S.style.right="10px";S.style.top="10px";I.appendChild(S);var D=document.createElement("div");D.style.position="absolute";D.style.cursor="pointer";D.style.right="38px";D.style.top="14px";D.style.textAlign="right";D.style.verticalAlign="top";
+mxUtils.write(D,mxResources.get("close"));I.appendChild(D);document.body.appendChild(I);var P=function(c){27==c.keyCode&&S.click()};mxEvent.addListener(document,"keydown",P);(function(c){var g=new Graph(c);g.keepEdgesInBackground=!0;g.isCellResizable=function(){return!1};g.isCellRotatable=function(){return!1};g.getCursorForCell=function(L){return this.model.isVertex(L)?"pointer":null};g.getFoldingImage=function(){return null};var l=function(){mxEvent.removeListener(document,"keydown",P);c.parentNode.removeChild(c);
+t.scrollCellToVisible(y)};mxEvent.addListener(S,"click",l);mxEvent.addListener(D,"click",l);g.setEnabled(!1);var n=g.click;g.click=function(L){var M=L.getCell(),K=null!=M?null!=M.referenceCell?M.referenceCell:M:null;null!=M&&0<g.getEdges(K).length?B(g,M):n.apply(this,arguments)};l=g.container.offsetWidth/2;var x=g.container.offsetHeight/3;g.model.beginUpdate();var F=g.importCells([y])[0];F.sourceCellId=y.id;F.geometry.x=l-F.geometry.width/2;F.geometry.y=x-F.geometry.height/2;g.model.endUpdate();var G=
+!1;g.getModel().addListener(mxEvent.CHANGE,function(L,M){G||(L=M.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,g.labelsVisible=!1,G=!0,mxEffects.animateChanges(g,L,function(){var K=new mxParallelEdgeLayout(g);K.spacing=60;var Z=K.layout;K.layout=function(ja){K.spacing=Math.min(60,Math.max(30,60-5*ja.length));Z.apply(this,arguments)};K.execute(g.getDefaultParent());mxText.prototype.enableBoundingBox=!0;g.labelsVisible=!0;g.tooltipHandler.hide();g.refresh();q(g);G=!1}))});B(g,F)})(I)})(b,
+f)};Graph.removeKeys=function(b,f){for(var m in b)f(m)&&delete b[m]};Graph.setTransitionForNodes=function(b,f){for(var m=0;m<b.length;m++)mxUtils.setPrefixedStyle(b[m].style,"transition",f)};Graph.setOpacityForNodes=function(b,f){for(var m=0;m<b.length;m++)b[m].style.opacity=f};
+Graph.removePasteFormatting=function(b,f){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var m=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var t=Graph.createTabNode(4);b.parentNode.replaceChild(t,b);b=t}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=m&&"P"==m.nodeName&&"p1"==
+m.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!f&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(t=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,t.outerHTML))}b=m}};Graph.createTabNode=function(b){var f="\t";if(null!=b)for(f="";0<b;)f+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(f));return b};Graph.sanitizeHtml=function(b,f){return Graph.domPurify(b,!1)};
Graph.sanitizeLink=function(b){if(null==b)return null;var f=document.createElement("a");f.setAttribute("href",b);Graph.sanitizeNode(f);return f.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});
Graph.domPurify=function(b,f){window.DOM_PURIFY_CONFIG.IN_PLACE=f;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
-Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),u=l.indexOf("<svg");if(0<=u){f.innerHTML=Graph.sanitizeHtml(l.substring(u));var y=f.getElementsByTagName("svg");if(0<y.length){document.body.appendChild(f);try{u=l=1;var q=y[0].getAttribute("width"),C=y[0].getAttribute("height");q=null!=q&&"%"!=q.charAt(q.length-
-1)?parseFloat(q):NaN;C=null!=C&&"%"!=C.charAt(C.length-1)?parseFloat(C):NaN;var J=y[0].getAttribute("viewBox");if(null!=J&&!isNaN(q)&&!isNaN(C)){var S=J.split(" ");4<=J.length&&(l=parseFloat(S[2])/q,u=parseFloat(S[3])/C,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var D=y[0].getBBox();if(0<D.width&&0<D.height){q=0;var P=y[0].querySelectorAll("[stroke-width]");for(C=0;C<P.length;C++)q=Math.max(q,parseFloat(P[C].getAttribute("stroke-width")));D=new mxRectangle(D.x,
-D.y,D.width,D.height);D.grow(q/2);f.getElementsByTagName("svg")[0].setAttribute("viewBox",D.x+" "+D.y+" "+D.width+" "+D.height);f.getElementsByTagName("svg")[0].setAttribute("width",D.width/l);f.getElementsByTagName("svg")[0].setAttribute("height",D.height/u)}}catch(c){}finally{document.body.removeChild(f)}b=Editor.createSvgDataUri(mxUtils.getXml(y[0]))}}}catch(c){}return b};
-Graph.createRemoveIcon=function(b,f){var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.clearImage);l.setAttribute("title",b);l.setAttribute("width","13");l.setAttribute("height","10");l.style.marginLeft="4px";l.style.marginBottom="-1px";l.style.cursor="pointer";mxEvent.addListener(l,"click",f);return l};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};
-Graph.rewritePageLinks=function(b,f){function l(y,q){var C=y.getAttribute(q);if(null!=C){Graph.isPageLink(C)&&(C="#"+C.substring(C.indexOf(":")+1));var J=q;f&&"xlink:href"==q&&(y.removeAttribute(q),J="href");y.setAttribute(J,C)}}b=b.getElementsByTagName("a");if(null!=b)for(var u=0;u<b.length;u++)l(b[u],"href"),l(b[u],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};
+Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),t=m.indexOf("<svg");if(0<=t){f.innerHTML=Graph.sanitizeHtml(m.substring(t));var y=f.getElementsByTagName("svg");if(0<y.length){document.body.appendChild(f);try{t=m=1;var q=y[0].getAttribute("width"),B=y[0].getAttribute("height");q=null!=q&&"%"!=q.charAt(q.length-
+1)?parseFloat(q):NaN;B=null!=B&&"%"!=B.charAt(B.length-1)?parseFloat(B):NaN;var I=y[0].getAttribute("viewBox");if(null!=I&&!isNaN(q)&&!isNaN(B)){var S=I.split(" ");4<=I.length&&(m=parseFloat(S[2])/q,t=parseFloat(S[3])/B,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var D=y[0].getBBox();if(0<D.width&&0<D.height){q=0;var P=y[0].querySelectorAll("[stroke-width]");for(B=0;B<P.length;B++)q=Math.max(q,parseFloat(P[B].getAttribute("stroke-width")));D=new mxRectangle(D.x,
+D.y,D.width,D.height);D.grow(q/2);f.getElementsByTagName("svg")[0].setAttribute("viewBox",D.x+" "+D.y+" "+D.width+" "+D.height);f.getElementsByTagName("svg")[0].setAttribute("width",D.width/m);f.getElementsByTagName("svg")[0].setAttribute("height",D.height/t)}}catch(c){}finally{document.body.removeChild(f)}b=Editor.createSvgDataUri(mxUtils.getXml(y[0]))}}}catch(c){}return b};
+Graph.createRemoveIcon=function(b,f){var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.clearImage);m.setAttribute("title",b);m.setAttribute("width","13");m.setAttribute("height","10");m.style.marginLeft="4px";m.style.marginBottom="-1px";m.style.cursor="pointer";mxEvent.addListener(m,"click",f);return m};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};
+Graph.rewritePageLinks=function(b,f){function m(y,q){var B=y.getAttribute(q);if(null!=B){Graph.isPageLink(B)&&(B="#"+B.substring(B.indexOf(":")+1));var I=q;f&&"xlink:href"==q&&(y.removeAttribute(q),I="href");y.setAttribute(I,B)}}b=b.getElementsByTagName("a");if(null!=b)for(var t=0;t<b.length;t++)m(b[t],"href"),m(b[t],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;
Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBackground=!1;Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, #000000)";Graph.prototype.shapeForegroundColor="light-dark(#000000, #ffffff)";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";
-Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
+Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%{}\"'=;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(l,u){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=l.view.graph.tolerance,q=!0,C=null,J=mxUtils.bind(this,function(P){q=!0;C=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),S=mxUtils.bind(this,function(P){q=q&&null!=C&&Math.abs(C.x-mxEvent.getClientX(P))<y&&Math.abs(C.y-mxEvent.getClientY(P))<y}),D=mxUtils.bind(this,function(P){if(q)for(var c=mxEvent.getSource(P);null!=
-c&&c!=u.node;){if("a"==c.nodeName.toLowerCase()){l.view.graph.labelLinkClicked(l,c,P);break}c=c.parentNode}});mxEvent.addGestureListeners(u.node,J,S,D);mxEvent.addListener(u.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var f=this.tooltipHandler.init;this.tooltipHandler.init=function(){f.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(l){var u=mxEvent.getSource(l);"A"==u.nodeName&&(u=u.getAttribute("href"),null!=
-u&&this.graph.isCustomLink(u)&&(mxEvent.isTouchEvent(l)||!mxEvent.isPopupTrigger(l))&&this.graph.customLinkClicked(u)&&mxEvent.consume(l))}))}}this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(C){var J=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return!this.isSpecialColor(C.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(C.style,"lineShape",null)&&(this.model.isVertex(C.cell)||"arrow"==J||"pipe"==J||"wire"==J||"filledEdge"==J||"flexArrow"==J||"mxgraph.arrows2.wedgeArrow"==
-J)};Graph.prototype.isGradientState=function(C){var J=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return this.isFillState(C)&&"wire"!=J&&"pipe"!=J};Graph.prototype.isStrokeState=function(C){return!0};Graph.prototype.getTextColor=function(C,J){for(var S=J?"color":"background-color",D=C==this.cellEditor.textarea&&J?"default":Graph.getGivenColor(C,S);null==D&&null!=C&&C!=this.cellEditor.textarea.parentNode;)D=C==this.cellEditor.textarea&&J?"default":Graph.getGivenColor(C,S),C=C.parentNode;
-if("rgba(0, 0, 0, 0)"==D||"transparent"==D)D=mxConstants.NONE;return D};Graph.prototype.isSpecialColor=function(C){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],C)};Graph.prototype.isGlassState=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return"label"==C||"rectangle"==C||"internalStorage"==C||"ext"==C||"umlLifeline"==C||"swimlane"==C||"process"==C};Graph.prototype.isRoundedState=function(C){return null!=
-C.shape?C.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(C){var J=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(C.style,mxConstants.STYLE_CURVED,!1)&&("connector"==J||"filledEdge"==J||"wire"==J)};Graph.prototype.isAutoSizeState=function(C){return"1"==mxUtils.getValue(C.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(C){return null!=
-mxUtils.getValue(C.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(C){return!0};Graph.prototype.getVerticesAndEdges=function(C,J){C=null!=C?C:!0;J=null!=J?J:!0;var S=this.model;return S.filterDescendants(function(D){return C&&S.isVertex(D)||J&&S.isEdge(D)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(C,J,S){C=this.getCellStyle(C).newEdgeStyle;if(null!=C){this.model.beginUpdate();try{var D=JSON.parse(C),P;for(P in D)this.setCellStyles(P,D[P],J),"edgeStyle"==
-P&&"elbowEdgeStyle"==D[P]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",J)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(C){for(var J={},S=0;S<C.length;S++){var D=this.view.getState(C[S]);null!=D&&this.mergeStyle(D.style,J,0==S)}return J};Graph.prototype.mergeStyle=function(C,J,S){if(null!=C){var D={},P;for(P in C){var c=C[P];null!=c&&(D[P]=!0,null==J[P]&&S?J[P]=c:J[P]!=c&&delete J[P])}for(P in J)D[P]||
-delete J[P]}};Graph.prototype.getStartEditingCell=function(C,J){J=this.getCellStyle(C);J=parseInt(mxUtils.getValue(J,mxConstants.STYLE_STARTSIZE,0));this.isTable(C)&&(!this.isSwimlane(C)||0==J)&&""==this.getLabel(C)&&0<this.model.getChildCount(C)&&(C=this.model.getChildAt(C,0),J=this.getCellStyle(C),J=parseInt(mxUtils.getValue(J,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(C)&&(!this.isSwimlane(C)||0==J)&&""==this.getLabel(C)&&0<this.model.getChildCount(C))for(J=0;J<this.model.getChildCount(C);J++){var S=
-this.model.getChildAt(C,J);if(this.isCellEditable(S)){C=S;break}}return C};Graph.prototype.copyStyle=function(C){return this.getCellStyle(C,!1)};Graph.prototype.pasteStyle=function(C,J,S,D){null!=C&&(D||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(C,function(P){return 0>mxUtils.indexOf(S,P)})),this.updateCellStyles(C,J))};Graph.prototype.copyCellStyles=function(C,J,S,D,P,c,g){var m=!1,n=!1;if(0<C.length)for(var x=0;x<C.length&&(m=this.getModel().isVertex(C[x])||m,!(n=this.getModel().isEdge(C[x])||
-n)||!m);x++);else n=m=!0;m=m&&!c;n=n&&!g;for(x=0;x<J.length;x++)if(C=0<=mxUtils.indexOf(Graph.textStyles,J[x]),"strokeColor"!=J[x]||null!=S[x]&&"none"!=S[x])if(0<=mxUtils.indexOf(Graph.cellStyles,J[x])||"shape"==J[x])if("shape"!=J[x]&&(m||C)&&(null==S[x]?delete D[J[x]]:D[J[x]]=S[x]),n||C)null==S[x]?delete P[J[x]]:P[J[x]]=S[x]};Graph.prototype.includeDescendants=function(C){for(var J=[],S=0;S<C.length;S++)J=J.concat(this.model.getDescendants(C[S]));return J};Graph.prototype.pasteCellStyles=function(C,
-J,S,D,P){J=null!=J?J:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<C.length;c++){var g=C[c],m=this.model.getStyle(g),n=!1;null!=g.style&&(pairs=g.style.split(";"),n=n||0<=mxUtils.indexOf(pairs,"text"));if(n)var x=Graph.textStyles;else if(x=Graph.cellStyles.slice(),!D)for(var F=null!=m?m.split(";"):[],H=0;H<F.length;H++){var M=F[H],L=M.indexOf("=");if(0<=L){var K=M.substring(0,L),Z=mxUtils.indexOf(x,K);0<=Z&&x.splice(Z,
-1);for(n=0;n<Graph.cellStyleGroups.length;n++){var ha=Graph.cellStyleGroups[n];if(0<=mxUtils.indexOf(ha,K))for(var ca=0;ca<ha.length;ca++){var aa=mxUtils.indexOf(x,ha[ca]);0<=aa&&x.splice(aa,1)}}}}var oa=this.model.isEdge(g);n=oa?S:J;for(H=0;H<x.length;H++){K=x[H];var da=n[K];null!=da&&("edgeStyle"!=K||P)&&(oa||!oa&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(m=mxUtils.setStyle(m,K,da),"fontFamily"==K&&null==n.fontSource&&(m=mxUtils.setStyle(m,"fontSource",null)),oa&&"rounded"==K&&"1"==da&&null==n.curved&&
-(m=mxUtils.setStyle(m,"curved",null)))}Editor.simpleLabels&&(m=mxUtils.setStyle(mxUtils.setStyle(m,"html",null),"whiteSpace",null));this.model.setStyle(g,m)}}finally{this.model.endUpdate()}return C};Graph.prototype.updateCellStyles=function(C,J){this.model.beginUpdate();try{for(var S=0;S<J.length;S++)if(this.model.isVertex(J[S])||this.model.isEdge(J[S])){var D=this.getCellStyle(J[S],!1),P=D[mxConstants.STYLE_PERIMETER],c=!1;for(m in C){var g=C[m];if(D[m]!=g){if(m==mxConstants.STYLE_SHAPE&&"umlLifeline"==
-D[m]&&"umlLifeline"!=g){c=!0;var m="participant"}this.setCellStyles(m,g,[J[S]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[J[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};
-Graph.prototype.getCellAt=function(C,J,S,D,P,c){this.useCssTransforms&&(C=C/this.currentScale-this.currentTranslate.x,J=J/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(C,J,S,D,P,c){D=null!=D?D:!0;P=null!=P?P:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var g=this.model.getChildCount(S)-1;0<=g;g--){var m=this.model.getChildAt(S,g),n=this.getScaledCellAt(C,J,m,D,P,
-c);if(null!=n)return n;if(this.isCellVisible(m)&&(P&&this.model.isEdge(m)||D&&this.model.isVertex(m))&&(n=this.view.getState(m),null!=n&&(null==c||!c(n,C,J))&&this.intersects(n,C,J)))return m}return null};Graph.prototype.isRecursiveVertexResize=function(C){return!this.isSwimlane(C.cell)&&0<this.model.getChildCount(C.cell)&&!this.isCellCollapsed(C.cell)&&"1"==mxUtils.getValue(C.style,"recursiveResize","1")&&null==mxUtils.getValue(C.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(C){for(var J=
-this.getCellGeometry(C);null!=J&&J.relative;)C=this.getModel().getParent(C),J=this.getCellGeometry(C);return C};Graph.prototype.isPart=function(C){return"1"==mxUtils.getValue(this.getCurrentCellStyle(C),"part","0")||this.isTableCell(C)||this.isTableRow(C)};Graph.prototype.getCompositeParents=function(C){for(var J=new mxDictionary,S=[],D=0;D<C.length;D++){var P=this.getCompositeParent(C[D]);this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));
-null==P||J.get(P)||(J.put(P,!0),S.push(P))}return S};Graph.prototype.getReferenceTerminal=function(C){if(null!=C){var J=this.getCellGeometry(C);null!=J&&J.relative&&(C=this.model.getParent(C))}null!=C&&this.model.isEdge(C)&&(C=this.model.getParent(C));null!=C&&(C=this.getCompositeParent(C));return C};Graph.prototype.getCompositeParent=function(C){for(;this.isPart(C);){var J=this.model.getParent(C);if(!this.model.isVertex(J))break;C=J}return C};Graph.prototype.filterSelectionCells=function(C){var J=
-this.getSelectionCells();if(null!=C){for(var S=[],D=0;D<J.length;D++)C(J[D])||S.push(J[D]);J=S}return J};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(C){if(this.useCssTransforms){var J=this.currentScale,S=this.currentTranslate;C=new mxRectangle((C.x+2*S.x)*J-S.x,(C.y+2*S.y)*J-S.y,C.width*J,C.height*J)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(C){C=this.strokeWidth;this.graph.useCssTransforms&&(C/=this.graph.currentScale);
-return C};mxGraphView.prototype.getGraphBounds=function(){var C=this.graphBounds;if(this.graph.useCssTransforms){var J=this.graph.currentTranslate,S=this.graph.currentScale;C=new mxRectangle((C.x+J.x)*S,(C.y+J.y)*S,C.width*S,C.height*S)}return C};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var f=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(C){this.graph.useCssTransforms&&(this.graph.currentScale=
-this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);f.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var l=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(C){C=l.apply(this,arguments);for(var J=[],S=
-0;S<C.length;S++)this.isTableRow(C[S])||this.isTableCell(C[S])||J.push(C[S]);return J};var u=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(C){C=u.apply(this,arguments);for(var J=[],S=0;S<C.length;S++)this.isTable(C[S])||this.isTableRow(C[S])||this.isTableCell(C[S])||J.push(C[S]);return J};Graph.prototype.updateCssTransform=function(){var C=this.view.getDrawPane();if(null!=C)if(C=C.parentNode,this.useCssTransforms){var J=C.getAttribute("transform");C.setAttribute("transformOrigin",
-"0 0");var S=Math.round(100*this.currentScale)/100;C.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");J!=C.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",C.getAttribute("transform"))}else C.removeAttribute("transformOrigin"),C.removeAttribute("transform")};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
-function(){var C=this.graph.useCssTransforms,J=this.scale,S=this.translate;C&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);y.apply(this,arguments);C&&(this.scale=J,this.translate=S)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(C,J,S){var D=this.useCssTransforms,P=this.view.scale,c=this.view.translate;D&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);D&&(this.view.scale=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(m,t){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=m.view.graph.tolerance,q=!0,B=null,I=mxUtils.bind(this,function(P){q=!0;B=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),S=mxUtils.bind(this,function(P){q=q&&null!=B&&Math.abs(B.x-mxEvent.getClientX(P))<y&&Math.abs(B.y-mxEvent.getClientY(P))<y}),D=mxUtils.bind(this,function(P){if(q)for(var c=mxEvent.getSource(P);null!=
+c&&c!=t.node;){if("a"==c.nodeName.toLowerCase()){m.view.graph.labelLinkClicked(m,c,P);break}c=c.parentNode}});mxEvent.addGestureListeners(t.node,I,S,D);mxEvent.addListener(t.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var f=this.tooltipHandler.init;this.tooltipHandler.init=function(){f.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(m){var t=mxEvent.getSource(m);"A"==t.nodeName&&(t=t.getAttribute("href"),null!=
+t&&this.graph.isCustomLink(t)&&(mxEvent.isTouchEvent(m)||!mxEvent.isPopupTrigger(m))&&this.graph.customLinkClicked(t)&&mxEvent.consume(m))}))}}this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(B){var I=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return!this.isSpecialColor(B.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(B.style,"lineShape",null)&&(this.model.isVertex(B.cell)||"arrow"==I||"pipe"==I||"wire"==I||"filledEdge"==I||"flexArrow"==I||"mxgraph.arrows2.wedgeArrow"==
+I)};Graph.prototype.isGradientState=function(B){var I=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return this.isFillState(B)&&"wire"!=I&&"pipe"!=I};Graph.prototype.isStrokeState=function(B){return!0};Graph.prototype.getTextColor=function(B,I){for(var S=I?"color":"background-color",D=B==this.cellEditor.textarea&&I?"default":Graph.getGivenColor(B,S);null==D&&null!=B&&B!=this.cellEditor.textarea.parentNode;)D=B==this.cellEditor.textarea&&I?"default":Graph.getGivenColor(B,S),B=B.parentNode;
+if("rgba(0, 0, 0, 0)"==D||"transparent"==D)D=mxConstants.NONE;return D};Graph.prototype.isSpecialColor=function(B){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],B)};Graph.prototype.isGlassState=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return"label"==B||"rectangle"==B||"internalStorage"==B||"ext"==B||"umlLifeline"==B||"swimlane"==B||"process"==B};Graph.prototype.isRoundedState=function(B){return null!=
+B.shape?B.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(B){var I=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(B.style,mxConstants.STYLE_CURVED,!1)&&("connector"==I||"filledEdge"==I||"wire"==I)};Graph.prototype.isAutoSizeState=function(B){return"1"==mxUtils.getValue(B.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(B){return null!=
+mxUtils.getValue(B.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(B){return!0};Graph.prototype.getVerticesAndEdges=function(B,I){B=null!=B?B:!0;I=null!=I?I:!0;var S=this.model;return S.filterDescendants(function(D){return B&&S.isVertex(D)||I&&S.isEdge(D)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(B,I,S){B=this.getCellStyle(B).newEdgeStyle;if(null!=B){this.model.beginUpdate();try{var D=JSON.parse(B),P;for(P in D)this.setCellStyles(P,D[P],I),"edgeStyle"==
+P&&"elbowEdgeStyle"==D[P]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",I)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(B){for(var I={},S=0;S<B.length;S++){var D=this.view.getState(B[S]);null!=D&&this.mergeStyle(D.style,I,0==S)}return I};Graph.prototype.mergeStyle=function(B,I,S){if(null!=B){var D={},P;for(P in B){var c=B[P];null!=c&&(D[P]=!0,null==I[P]&&S?I[P]=c:I[P]!=c&&delete I[P])}for(P in I)D[P]||
+delete I[P]}};Graph.prototype.getStartEditingCell=function(B,I){I=this.getCellStyle(B);I=parseInt(mxUtils.getValue(I,mxConstants.STYLE_STARTSIZE,0));this.isTable(B)&&(!this.isSwimlane(B)||0==I)&&""==this.getLabel(B)&&0<this.model.getChildCount(B)&&(B=this.model.getChildAt(B,0),I=this.getCellStyle(B),I=parseInt(mxUtils.getValue(I,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(B)&&(!this.isSwimlane(B)||0==I)&&""==this.getLabel(B)&&0<this.model.getChildCount(B))for(I=0;I<this.model.getChildCount(B);I++){var S=
+this.model.getChildAt(B,I);if(this.isCellEditable(S)){B=S;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,I,S,D){null!=B&&(D||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(P){return 0>mxUtils.indexOf(S,P)})),this.updateCellStyles(B,I))};Graph.prototype.copyCellStyles=function(B,I,S,D,P,c,g){var l=!1,n=!1;if(0<B.length)for(var x=0;x<B.length&&(l=this.getModel().isVertex(B[x])||l,!(n=this.getModel().isEdge(B[x])||
+n)||!l);x++);else n=l=!0;l=l&&!c;n=n&&!g;for(x=0;x<I.length;x++)if(B=0<=mxUtils.indexOf(Graph.textStyles,I[x]),"strokeColor"!=I[x]||null!=S[x]&&"none"!=S[x])if(0<=mxUtils.indexOf(Graph.cellStyles,I[x])||"shape"==I[x])if("shape"!=I[x]&&(l||B)&&(null==S[x]?delete D[I[x]]:D[I[x]]=S[x]),n||B)null==S[x]?delete P[I[x]]:P[I[x]]=S[x]};Graph.prototype.includeDescendants=function(B){for(var I=[],S=0;S<B.length;S++)I=I.concat(this.model.getDescendants(B[S]));return I};Graph.prototype.pasteCellStyles=function(B,
+I,S,D,P){I=null!=I?I:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<B.length;c++){var g=B[c],l=this.model.getStyle(g),n=!1;null!=g.style&&(pairs=g.style.split(";"),n=n||0<=mxUtils.indexOf(pairs,"text"));if(n)var x=Graph.textStyles;else if(x=Graph.cellStyles.slice(),!D)for(var F=null!=l?l.split(";"):[],G=0;G<F.length;G++){var L=F[G],M=L.indexOf("=");if(0<=M){var K=L.substring(0,M),Z=mxUtils.indexOf(x,K);0<=Z&&x.splice(Z,
+1);for(n=0;n<Graph.cellStyleGroups.length;n++){var ja=Graph.cellStyleGroups[n];if(0<=mxUtils.indexOf(ja,K))for(var da=0;da<ja.length;da++){var ba=mxUtils.indexOf(x,ja[da]);0<=ba&&x.splice(ba,1)}}}}var na=this.model.isEdge(g);n=na?S:I;for(G=0;G<x.length;G++){K=x[G];var ca=n[K];null!=ca&&("edgeStyle"!=K||P)&&(na||!na&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(l=mxUtils.setStyle(l,K,ca),"fontFamily"==K&&null==n.fontSource&&(l=mxUtils.setStyle(l,"fontSource",null)),na&&"rounded"==K&&"1"==ca&&null==n.curved&&
+(l=mxUtils.setStyle(l,"curved",null)))}Editor.simpleLabels&&(l=mxUtils.setStyle(mxUtils.setStyle(l,"html",null),"whiteSpace",null));this.model.setStyle(g,l)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,I){this.model.beginUpdate();try{for(var S=0;S<I.length;S++)if(this.model.isVertex(I[S])||this.model.isEdge(I[S])){var D=this.getCellStyle(I[S],!1),P=D[mxConstants.STYLE_PERIMETER],c=!1;for(l in B){var g=B[l];if(D[l]!=g){if(l==mxConstants.STYLE_SHAPE&&"umlLifeline"==
+D[l]&&"umlLifeline"!=g){c=!0;var l="participant"}this.setCellStyles(l,g,[I[S]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[I[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};
+Graph.prototype.getCellAt=function(B,I,S,D,P,c){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,I=I/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,I,S,D,P,c){D=null!=D?D:!0;P=null!=P?P:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var g=this.model.getChildCount(S)-1;0<=g;g--){var l=this.model.getChildAt(S,g),n=this.getScaledCellAt(B,I,l,D,P,
+c);if(null!=n)return n;if(this.isCellVisible(l)&&(P&&this.model.isEdge(l)||D&&this.model.isVertex(l))&&(n=this.view.getState(l),null!=n&&(null==c||!c(n,B,I))&&this.intersects(n,B,I)))return l}return null};Graph.prototype.isRecursiveVertexResize=function(B){return!this.isSwimlane(B.cell)&&0<this.model.getChildCount(B.cell)&&!this.isCellCollapsed(B.cell)&&"1"==mxUtils.getValue(B.style,"recursiveResize","1")&&null==mxUtils.getValue(B.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(B){for(var I=
+this.getCellGeometry(B);null!=I&&I.relative;)B=this.getModel().getParent(B),I=this.getCellGeometry(B);return B};Graph.prototype.isPart=function(B){return"1"==mxUtils.getValue(this.getCurrentCellStyle(B),"part","0")||this.isTableCell(B)||this.isTableRow(B)};Graph.prototype.getCompositeParents=function(B){for(var I=new mxDictionary,S=[],D=0;D<B.length;D++){var P=this.getCompositeParent(B[D]);this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));
+null==P||I.get(P)||(I.put(P,!0),S.push(P))}return S};Graph.prototype.getReferenceTerminal=function(B){if(null!=B){var I=this.getCellGeometry(B);null!=I&&I.relative&&(B=this.model.getParent(B))}null!=B&&this.model.isEdge(B)&&(B=this.model.getParent(B));null!=B&&(B=this.getCompositeParent(B));return B};Graph.prototype.getCompositeParent=function(B){for(;this.isPart(B);){var I=this.model.getParent(B);if(!this.model.isVertex(I))break;B=I}return B};Graph.prototype.filterSelectionCells=function(B){var I=
+this.getSelectionCells();if(null!=B){for(var S=[],D=0;D<I.length;D++)B(I[D])||S.push(I[D]);I=S}return I};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(B){if(this.useCssTransforms){var I=this.currentScale,S=this.currentTranslate;B=new mxRectangle((B.x+2*S.x)*I-S.x,(B.y+2*S.y)*I-S.y,B.width*I,B.height*I)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(B){B=this.strokeWidth;this.graph.useCssTransforms&&(B/=this.graph.currentScale);
+return B};mxGraphView.prototype.getGraphBounds=function(){var B=this.graphBounds;if(this.graph.useCssTransforms){var I=this.graph.currentTranslate,S=this.graph.currentScale;B=new mxRectangle((B.x+I.x)*S,(B.y+I.y)*S,B.width*S,B.height*S)}return B};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var f=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(B){this.graph.useCssTransforms&&(this.graph.currentScale=
+this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);f.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var m=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(B){B=m.apply(this,arguments);for(var I=[],S=
+0;S<B.length;S++)this.isTableRow(B[S])||this.isTableCell(B[S])||I.push(B[S]);return I};var t=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(B){B=t.apply(this,arguments);for(var I=[],S=0;S<B.length;S++)this.isTable(B[S])||this.isTableRow(B[S])||this.isTableCell(B[S])||I.push(B[S]);return I};Graph.prototype.updateCssTransform=function(){var B=this.view.getDrawPane();if(null!=B)if(B=B.parentNode,this.useCssTransforms){var I=B.getAttribute("transform");B.setAttribute("transformOrigin",
+"0 0");var S=Math.round(100*this.currentScale)/100;B.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");I!=B.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",B.getAttribute("transform"))}else B.removeAttribute("transformOrigin"),B.removeAttribute("transform")};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
+function(){var B=this.graph.useCssTransforms,I=this.scale,S=this.translate;B&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);y.apply(this,arguments);B&&(this.scale=I,this.translate=S)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(B,I,S){var D=this.useCssTransforms,P=this.view.scale,c=this.view.translate;D&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);D&&(this.view.scale=
P,this.view.translate=c,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
-Graph.prototype.labelLinkClicked=function(b,f,l){var u=f.getAttribute("href");u!=Graph.sanitizeLink(u)&&Graph.sanitizeNode(f);if(null!=u&&!this.isCustomLink(u)&&(mxEvent.isLeftMouseButton(l)&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(u)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(u),b);mxEvent.consume(l)}};
-Graph.prototype.openLink=function(b,f,l){var u=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==f&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)!=this.baseUrl||"#"!=b.charAt(this.baseUrl.length)||"_top"!=f||window!=window.top||navigator.standalone)u=window.open(b,null!=f?f:"_blank",l?null:"noopener,noreferrer"),null==u||l||(u.opener=null);else{var y=b.split("#")[1];window.location.hash=="#"+y&&(window.location.hash="");window.location.hash=y}}catch(q){}return u};
+Graph.prototype.labelLinkClicked=function(b,f,m){var t=f.getAttribute("href");t!=Graph.sanitizeLink(t)&&Graph.sanitizeNode(f);if(null!=t&&!this.isCustomLink(t)&&(mxEvent.isLeftMouseButton(m)&&!mxEvent.isPopupTrigger(m)||mxEvent.isTouchEvent(m))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(t)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(t),b);mxEvent.consume(m)}};
+Graph.prototype.openLink=function(b,f,m){var t=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==f&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)!=this.baseUrl||"#"!=b.charAt(this.baseUrl.length)||"_top"!=f||window!=window.top||navigator.standalone)t=window.open(b,null!=f?f:"_blank",m?null:"noopener,noreferrer"),null==t||m||(t.opener=null);else{var y=b.split("#")[1];window.location.hash=="#"+y&&(window.location.hash="");window.location.hash=y}}catch(q){}return t};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b,f){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(b){return null!=b&&!this.absoluteUrlPattern.test(b)&&"data:"!==b.substring(0,5)&&!this.isExternalProtocol(b)};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="#"==b.charAt(0)?this.baseUrl+b:"/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};
-Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,f){var l=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(f!=mxEvent.BEGIN_UPDATE||this.hasLayout(l,f))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return f=new mxStackLayout(this.graph,!0),f.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,f){var m=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(f!=mxEvent.BEGIN_UPDATE||this.hasLayout(m,f))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return f=new mxStackLayout(this.graph,!0),f.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
"1"),f.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),f.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),f.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),f.spacing=b.stackSpacing||f.spacing,f.border=b.stackBorder||f.border,f.marginLeft=b.marginLeft||0,f.marginRight=b.marginRight||0,f.marginTop=b.marginTop||0,f.marginBottom=b.marginBottom||0,f.allowGaps=b.allowGaps||0,f.fill=!0,f.allowGaps&&(f.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),f;if("treeLayout"==
b.childLayout)return f=new mxCompactTreeLayout(this.graph),f.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),f.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),f.sortEdges="1"==mxUtils.getValue(b,"sortEdges","0"),f.groupPadding=mxUtils.getValue(b,"parentPadding",20),f.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),f.maintainParentLocation=!0,f.edgeRouting=!1,f.resetEdges=!1,f;if("flowLayout"==b.childLayout)return f=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,
"flowOrientation",mxConstants.DIRECTION_EAST)),f.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),f.parentBorder=mxUtils.getValue(b,"parentPadding",20),f.maintainParentLocation=!0,f.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),f.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),f.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),
-f.parallelEdgeSpacing=mxUtils.getValue(b,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),f;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==String(b.childLayout).charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(u){null!=
-window.console&&console.error(u)}}return null}};
-Graph.prototype.createLayouts=function(b){for(var f=[],l=0;l<b.length;l++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[l].layout)){var u="mxOrgChartLayout"==b[l].layout&&null!=b[l].config?new window[b[l].layout](this,b[l].config.branchOptimizer):new window[b[l].layout](this);if(null!=b[l].config)for(var y in b[l].config)if("mxOrgChartLayout"!=b[l].layout||"branchOptimizer"!=y)u[y]=b[l].config[y];f.push(u)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[l].layout]));return f};
-Graph.prototype.getDataForCells=function(b,f){for(var l=[],u=0;u<b.length;u++){var y={};y.id=b[u].id;var q=null!=b[u].value?b[u].value.attributes:null;this.isReplacePlaceholders(b[u])&&f&&(y.value=this.getLabel(b[u]));if(null!=q)for(var C=0;C<q.length;C++)y[q[C].nodeName]=q[C].nodeValue;else y.label=this.convertValueToString(b[u]);l.push(y)}return l};
-Graph.prototype.getNodesForCells=function(b){for(var f=[],l=0;l<b.length;l++){var u=this.view.getState(b[l]);if(null!=u){for(var y=this.cellRenderer.getShapesForState(u),q=0;q<y.length;q++)null!=y[q]&&null!=y[q].node&&f.push(y[q].node);null!=u.control&&null!=u.control.node&&f.push(u.control.node)}}return f};
-Graph.prototype.createWipeAnimations=function(b,f){for(var l=[],u=0;u<b.length;u++){var y=this.view.getState(b[u]);null!=y&&null!=y.shape&&(this.model.isEdge(y.cell)&&null!=y.absolutePoints&&1<y.absolutePoints.length?l.push(this.createEdgeWipeAnimation(y,f)):this.model.isVertex(y.cell)&&null!=y.shape.bounds&&l.push(this.createVertexWipeAnimation(y,f)))}return l};
-Graph.prototype.createEdgeWipeAnimation=function(b,f){var l=b.absolutePoints.slice(),u=b.segments,y=b.length,q=l.length;return{execute:mxUtils.bind(this,function(C,J){if(null!=b.shape){var S=[l[0]];J=C/J;f||(J=1-J);for(var D=y*J,P=1;P<q;P++)if(D<=u[P-1]){S.push(new mxPoint(l[P-1].x+(l[P].x-l[P-1].x)*D/u[P-1],l[P-1].y+(l[P].y-l[P-1].y)*D/u[P-1]));break}else D-=u[P-1],S.push(l[P]);b.shape.points=S;b.shape.redraw();0==C&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=J)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=l,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(b,f){var l=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(u,y){null!=b.shape&&(y=u/y,f||(y=1-y),b.shape.bounds=new mxRectangle(l.x,l.y,l.width*y,l.height),b.shape.redraw(),0==u&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=y))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=l,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};Graph.prototype.executeAnimations=function(b,f,l,u){l=null!=l?l:30;u=null!=u?u:30;var y=null,q=0,C=mxUtils.bind(this,function(){if(q==l||this.stoppingCustomActions){window.clearInterval(y);for(var J=0;J<b.length;J++)b[J].stop();null!=f&&f()}else for(J=0;J<b.length;J++)b[J].execute(q,l);q++});y=window.setInterval(C,u);C()};
+f.parallelEdgeSpacing=mxUtils.getValue(b,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),f;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==String(b.childLayout).charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(t){null!=
+window.console&&console.error(t)}}return null}};
+Graph.prototype.createLayouts=function(b){for(var f=[],m=0;m<b.length;m++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[m].layout)){var t="mxOrgChartLayout"==b[m].layout&&null!=b[m].config?new window[b[m].layout](this,b[m].config.branchOptimizer):new window[b[m].layout](this);if(null!=b[m].config)for(var y in b[m].config)if("mxOrgChartLayout"!=b[m].layout||"branchOptimizer"!=y)t[y]=b[m].config[y];f.push(t)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[m].layout]));return f};
+Graph.prototype.getDataForCells=function(b,f){for(var m=[],t=0;t<b.length;t++){var y={};y.id=b[t].id;var q=null!=b[t].value?b[t].value.attributes:null;this.isReplacePlaceholders(b[t])&&f&&(y.value=this.getLabel(b[t]));if(null!=q)for(var B=0;B<q.length;B++)y[q[B].nodeName]=q[B].nodeValue;else y.label=this.convertValueToString(b[t]);m.push(y)}return m};
+Graph.prototype.getNodesForCells=function(b){for(var f=[],m=0;m<b.length;m++){var t=this.view.getState(b[m]);if(null!=t){for(var y=this.cellRenderer.getShapesForState(t),q=0;q<y.length;q++)null!=y[q]&&null!=y[q].node&&f.push(y[q].node);null!=t.control&&null!=t.control.node&&f.push(t.control.node)}}return f};
+Graph.prototype.createWipeAnimations=function(b,f){for(var m=[],t=0;t<b.length;t++){var y=this.view.getState(b[t]);null!=y&&null!=y.shape&&(this.model.isEdge(y.cell)&&null!=y.absolutePoints&&1<y.absolutePoints.length?m.push(this.createEdgeWipeAnimation(y,f)):this.model.isVertex(y.cell)&&null!=y.shape.bounds&&m.push(this.createVertexWipeAnimation(y,f)))}return m};
+Graph.prototype.createEdgeWipeAnimation=function(b,f){var m=b.absolutePoints.slice(),t=b.segments,y=b.length,q=m.length;return{execute:mxUtils.bind(this,function(B,I){if(null!=b.shape){var S=[m[0]];I=B/I;f||(I=1-I);for(var D=y*I,P=1;P<q;P++)if(D<=t[P-1]){S.push(new mxPoint(m[P-1].x+(m[P].x-m[P-1].x)*D/t[P-1],m[P-1].y+(m[P].y-m[P-1].y)*D/t[P-1]));break}else D-=t[P-1],S.push(m[P]);b.shape.points=S;b.shape.redraw();0==B&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=I)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=m,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};
+Graph.prototype.createVertexWipeAnimation=function(b,f){var m=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(t,y){null!=b.shape&&(y=t/y,f||(y=1-y),b.shape.bounds=new mxRectangle(m.x,m.y,m.width*y,m.height),b.shape.redraw(),0==t&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=y))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=m,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};Graph.prototype.executeAnimations=function(b,f,m,t){m=null!=m?m:30;t=null!=t?t:30;var y=null,q=0,B=mxUtils.bind(this,function(){if(q==m||this.stoppingCustomActions){window.clearInterval(y);for(var I=0;I<b.length;I++)b[I].stop();null!=f&&f()}else for(I=0;I<b.length;I++)b[I].execute(q,m);q++});y=window.setInterval(B,t);B()};
Graph.prototype.getPageSize=function(){return this.pageVisible&&null!=this.pageFormat?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(b,f,l){b=null!=b?b:this.getGraphBounds();f=null!=f?f:this.view.translate;l=null!=l?l:this.view.scale;var u=this.getPageSize();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var y=Math.floor(Math.ceil(b.x/l-f.x)/u.width),q=Math.floor(Math.ceil(b.y/l-f.y)/u.height);return new mxRectangle(y,q,Math.ceil((Math.floor((b.x+b.width)/l)-f.x)/u.width)-y,Math.ceil((Math.floor((b.y+b.height)/l)-f.y)/u.height)-q)};
-Graph.prototype.getDefaultTranslate=function(b){var f=this.getPagePadding(),l=this.getPageSize();return new mxPoint(f.x-b.x*l.width,f.y-b.y*l.height)};Graph.prototype.updateMinimumSize=function(){var b=this.getPageLayout(),f=this.getPagePadding(),l=this.getPageSize(),u=Math.ceil(2*f.x+b.width*l.width);b=Math.ceil(2*f.y+b.height*l.height);if(null==this.minimumGraphSize||this.minimumGraphSize.width!=u||this.minimumGraphSize.height!=b)this.minimumGraphSize=new mxRectangle(0,0,u,b)};
-Graph.prototype.sanitizeHtml=function(b,f){return Graph.sanitizeHtml(b,f)};Graph.prototype.updatePlaceholders=function(){var b=!1,f;for(f in this.model.cells){var l=this.model.cells[f];this.isReplacePlaceholders(l)&&(this.view.invalidate(l,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
+Graph.prototype.getPageLayout=function(b,f,m){b=null!=b?b:this.getGraphBounds();f=null!=f?f:this.view.translate;m=null!=m?m:this.view.scale;var t=this.getPageSize();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var y=Math.floor(Math.ceil(b.x/m-f.x)/t.width),q=Math.floor(Math.ceil(b.y/m-f.y)/t.height);return new mxRectangle(y,q,Math.ceil((Math.floor((b.x+b.width)/m)-f.x)/t.width)-y,Math.ceil((Math.floor((b.y+b.height)/m)-f.y)/t.height)-q)};
+Graph.prototype.getDefaultTranslate=function(b){var f=this.getPagePadding(),m=this.getPageSize();return new mxPoint(f.x-b.x*m.width,f.y-b.y*m.height)};Graph.prototype.updateMinimumSize=function(){var b=this.getPageLayout(),f=this.getPagePadding(),m=this.getPageSize(),t=Math.ceil(2*f.x+b.width*m.width);b=Math.ceil(2*f.y+b.height*m.height);if(null==this.minimumGraphSize||this.minimumGraphSize.width!=t||this.minimumGraphSize.height!=b)this.minimumGraphSize=new mxRectangle(0,0,t,b)};
+Graph.prototype.sanitizeHtml=function(b,f){return Graph.sanitizeHtml(b,f)};Graph.prototype.updatePlaceholders=function(){var b=!1,f;for(f in this.model.cells){var m=this.model.cells[f];this.isReplacePlaceholders(m)&&(this.view.invalidate(m,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(b){return Graph.zoomWheel&&!mxEvent.isShiftDown(b)&&!mxEvent.isMetaDown(b)&&!mxEvent.isAltDown(b)&&(!mxEvent.isControlDown(b)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(b)||mxEvent.isControlDown(b))};Graph.prototype.isScrollWheelEvent=function(b){return!this.isZoomWheelEvent(b)};Graph.prototype.isTransparentClickEvent=function(b){return mxEvent.isAltDown(b)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};
Graph.prototype.isIgnoreTerminalEvent=function(b){return mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b)};Graph.prototype.isEdgeIgnored=function(b){var f=!1;null!=b&&(b=this.getCurrentCellStyle(b),f="1"==mxUtils.getValue(b,"ignoreEdge","0"));return f};
-Graph.prototype.isSplitTarget=function(b,f,l){return!this.model.isEdge(f[0])&&!mxEvent.isAltDown(l)&&!mxEvent.isShiftDown(l)&&!this.isCellLocked(this.getLayerForCell(b))&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(b){var f=mxGraph.prototype.getLabel.apply(this,arguments);null!=f&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(f=this.replacePlaceholders(b,f));return f};
+Graph.prototype.isSplitTarget=function(b,f,m){return!this.model.isEdge(f[0])&&!mxEvent.isAltDown(m)&&!mxEvent.isShiftDown(m)&&!this.isCellLocked(this.getLayerForCell(b))&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(b){var f=mxGraph.prototype.getLabel.apply(this,arguments);null!=f&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(f=this.replacePlaceholders(b,f));return f};
Graph.prototype.isLabelMovable=function(b){var f=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(f,"labelMovable","0")))};Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};
Graph.prototype.getClickableLinkForCell=function(b){do{var f=this.getLinkForCell(b);if(null!=f)return f;b=this.model.getParent(b)}while(null!=b);return null};Graph.prototype.getGlobalVariable=function(b){var f=null;"date"==b?f=(new Date).toLocaleDateString():"time"==b?f=(new Date).toLocaleTimeString():"timestamp"==b?f=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),f=this.formatDate(new Date,b));return f};
-Graph.prototype.formatDate=function(b,f,l){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var u=this.dateFormatCache,y=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,q=/[^-+\dA-Z]/g,C=function(H,M){H=String(H);for(M=M||2;H.length<M;)H="0"+H;return H};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(f=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");f=String(u.masks[f]||f||u.masks["default"]);"UTC:"==f.slice(0,4)&&(f=f.slice(4),l=!0);var J=l?"getUTC":"get",S=b[J+"Date"](),D=b[J+"Day"](),P=b[J+"Month"](),c=b[J+"FullYear"](),g=b[J+"Hours"](),m=b[J+"Minutes"](),n=b[J+"Seconds"]();J=b[J+"Milliseconds"]();var x=l?0:b.getTimezoneOffset(),F={d:S,dd:C(S),ddd:u.i18n.dayNames[D],dddd:u.i18n.dayNames[D+7],m:P+1,mm:C(P+1),mmm:u.i18n.monthNames[P],mmmm:u.i18n.monthNames[P+
-12],yy:String(c).slice(2),yyyy:c,h:g%12||12,hh:C(g%12||12),H:g,HH:C(g),M:m,MM:C(m),s:n,ss:C(n),l:C(J,3),L:C(99<J?Math.round(J/10):J),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:l?"UTC":(String(b).match(y)||[""]).pop().replace(q,""),o:(0<x?"-":"+")+C(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return f.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in F?F[H]:H.slice(1,
-H.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var f=null;if(0<b.length){f=this.getLayerForCell(b[0]);for(var l=1;l<b.length;l++)if(!this.model.isAncestor(f,b[l])){f=null;break}}return f};
-Graph.prototype.createLayersDialog=function(b,f){var l=document.createElement("div");l.style.position="absolute";for(var u=this.getModel(),y=u.getChildCount(u.root),q=0;q<y;q++)mxUtils.bind(this,function(C){function J(){u.isVisible(C)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(D,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(D,25))}var S=this.convertValueToString(C)||mxResources.get("background")||"Background",D=document.createElement("div");D.style.overflow=
-"hidden";D.style.textOverflow="ellipsis";D.style.padding="2px";D.style.whiteSpace="nowrap";D.style.cursor="pointer";D.setAttribute("title",mxResources.get(u.isVisible(C)?"hideIt":"show",[S]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";f&&(P.style.filter="invert(100%)",P.style.top="-2px");D.appendChild(P);mxUtils.write(D,S);l.appendChild(D);
-mxEvent.addListener(D,"click",function(){u.setVisible(C,!u.isVisible(C));J();null!=b&&b(C)});J()})(u.getChildAt(u.root,q));return l};
-Graph.prototype.replacePlaceholders=function(b,f,l,u){u=[];if(null!=f){for(var y=0;match=this.placeholderPattern.exec(f);){var q=match[0];if(2<q.length&&"%label%"!=q&&"%tooltip%"!=q){var C=null;if(match.index>y&&"%"==f.charAt(match.index-1))C=q.substring(1);else{var J=q.substring(1,q.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==J)C=b.id;else if("width"===J.substring(0,5)&&this.model.isVertex(b)){var D=this.getCellGeometry(b);
-null!=D&&(C=D.width,5<J.length&&(C=Editor.toUnit(C,S[J.substring(6)])))}else if("height"==J.substring(0,6)&&this.model.isVertex(b))D=this.getCellGeometry(b),null!=D&&(C=D.height,6<J.length&&(C=Editor.toUnit(C,S[J.substring(7)])));else if("length"==J.substring(0,6)){for(D=b;null!=D&&!this.model.isEdge(D);)D=this.model.getParent(D);D=this.view.getState(D);null!=D&&(C=Math.round(D.length/this.view.scale),6<J.length&&(C=Editor.toUnit(C,S[J.substring(7)])))}else if(0>J.indexOf("{"))for(S=b;null==C&&null!=
-S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(C=S.getAttribute(J+"_"+Graph.diagramLanguage)),null==C&&(C=S.hasAttribute(J)?null!=S.getAttribute(J)?S.getAttribute(J):"":null)),S=this.model.getParent(S);null==C&&(C=this.getGlobalVariable(J));null==C&&null!=l&&(C=l[J])}u.push(f.substring(y,match.index)+(null!=C?C:q));y=match.index+q.length}}u.push(f.substring(y))}return u.join("")};
-Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var f=[],l=0;l<b.length;l++){var u=this.model.getCell(b[l].id);null!=u&&f.push(u)}this.setSelectionCells(f)}else this.clearSelection()};Graph.prototype.selectCellForEvent=function(b,f){mxEvent.isShiftDown(f)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,f){var l=!1;if(this.isTableCell(b)&&this.isTableCell(f)){var u=this.model.getParent(b),y=this.model.getParent(u),q=this.model.getParent(f);if(y==this.model.getParent(q)){b=u.getIndex(b);u=y.getIndex(u);var C=q.getIndex(f),J=y.getIndex(q);q=Math.max(u,J);f=Math.min(b,C);b=Math.max(b,C);C=[];for(u=Math.min(u,J);u<=q;u++){J=this.model.getChildAt(y,u);for(var S=f;S<=b;S++)C.push(this.model.getChildAt(J,S))}0<C.length&&(1<C.length||1<this.getSelectionCount()||
-!this.isCellSelected(C[0]))&&(this.setSelectionCells(C),l=!0)}}return l};
-Graph.prototype.snapCellsToGrid=function(b,f){this.getModel().beginUpdate();try{for(var l=0;l<b.length;l++){var u=b[l],y=this.getCellGeometry(u);if(null!=y){y=y.clone();if(this.getModel().isVertex(u))y.x=Math.round(y.x/f)*f,y.y=Math.round(y.y/f)*f,y.width=Math.round(y.width/f)*f,y.height=Math.round(y.height/f)*f;else if(this.getModel().isEdge(u)&&null!=y.points)for(var q=0;q<y.points.length;q++)y.points[q].x=Math.round(y.points[q].x/f)*f,y.points[q].y=Math.round(y.points[q].y/f)*f;this.getModel().setGeometry(u,
+Graph.prototype.formatDate=function(b,f,m){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var t=this.dateFormatCache,y=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,q=/[^-+\dA-Z]/g,B=function(G,L){G=String(G);for(L=L||2;G.length<L;)G="0"+G;return G};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(f=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");f=String(t.masks[f]||f||t.masks["default"]);"UTC:"==f.slice(0,4)&&(f=f.slice(4),m=!0);var I=m?"getUTC":"get",S=b[I+"Date"](),D=b[I+"Day"](),P=b[I+"Month"](),c=b[I+"FullYear"](),g=b[I+"Hours"](),l=b[I+"Minutes"](),n=b[I+"Seconds"]();I=b[I+"Milliseconds"]();var x=m?0:b.getTimezoneOffset(),F={d:S,dd:B(S),ddd:t.i18n.dayNames[D],dddd:t.i18n.dayNames[D+7],m:P+1,mm:B(P+1),mmm:t.i18n.monthNames[P],mmmm:t.i18n.monthNames[P+
+12],yy:String(c).slice(2),yyyy:c,h:g%12||12,hh:B(g%12||12),H:g,HH:B(g),M:l,MM:B(l),s:n,ss:B(n),l:B(I,3),L:B(99<I?Math.round(I/10):I),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:m?"UTC":(String(b).match(y)||[""]).pop().replace(q,""),o:(0<x?"-":"+")+B(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return f.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(G){return G in F?F[G]:G.slice(1,
+G.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var f=null;if(0<b.length){f=this.getLayerForCell(b[0]);for(var m=1;m<b.length;m++)if(!this.model.isAncestor(f,b[m])){f=null;break}}return f};
+Graph.prototype.createLayersDialog=function(b,f){var m=document.createElement("div");m.style.position="absolute";for(var t=this.getModel(),y=t.getChildCount(t.root),q=0;q<y;q++)mxUtils.bind(this,function(B){function I(){t.isVisible(B)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(D,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(D,25))}var S=this.convertValueToString(B)||mxResources.get("background")||"Background",D=document.createElement("div");D.style.overflow=
+"hidden";D.style.textOverflow="ellipsis";D.style.padding="2px";D.style.whiteSpace="nowrap";D.style.cursor="pointer";D.setAttribute("title",mxResources.get(t.isVisible(B)?"hideIt":"show",[S]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";f&&(P.style.filter="invert(100%)",P.style.top="-2px");D.appendChild(P);mxUtils.write(D,S);m.appendChild(D);
+mxEvent.addListener(D,"click",function(){t.setVisible(B,!t.isVisible(B));I();null!=b&&b(B)});I()})(t.getChildAt(t.root,q));return m};
+Graph.prototype.replacePlaceholders=function(b,f,m,t){t=[];if(null!=f){for(var y=0;match=this.placeholderPattern.exec(f);){var q=match[0];if(2<q.length&&"%label%"!=q&&"%tooltip%"!=q){var B=null;if(match.index>y&&"%"==f.charAt(match.index-1))B=q.substring(1);else{var I=q.substring(1,q.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==I)B=b.id;else if("width"===I.substring(0,5)&&this.model.isVertex(b)){var D=this.getCellGeometry(b);
+null!=D&&(B=D.width,5<I.length&&(B=Editor.toUnit(B,S[I.substring(6)])))}else if("height"==I.substring(0,6)&&this.model.isVertex(b))D=this.getCellGeometry(b),null!=D&&(B=D.height,6<I.length&&(B=Editor.toUnit(B,S[I.substring(7)])));else if("length"==I.substring(0,6)){for(D=b;null!=D&&!this.model.isEdge(D);)D=this.model.getParent(D);D=this.view.getState(D);null!=D&&(B=Math.round(D.length/this.view.scale),6<I.length&&(B=Editor.toUnit(B,S[I.substring(7)])))}else if(0>I.indexOf("{"))for(S=b;null==B&&null!=
+S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(B=S.getAttribute(I+"_"+Graph.diagramLanguage)),null==B&&(B=S.hasAttribute(I)?null!=S.getAttribute(I)?S.getAttribute(I):"":null)),S=this.model.getParent(S);null==B&&("pagecount"==I.substring(0,9)&&9<I.length||"pagenumber"==I.substring(0,10)&&10<I.length?(S=I.match(/(pagecount|pagenumber)[\s]*([+-])[\s]*(\d+)/),null!=S&&(B=this.getGlobalVariable(S[1]),3<S.length&&(D=parseInt(S[3]),B+="+"==S[2]?D:-D))):
+B=this.getGlobalVariable(I));null==B&&null!=m&&(B=m[I])}t.push(f.substring(y,match.index)+(null!=B?B:q));y=match.index+q.length}}t.push(f.substring(y))}return t.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var f=[],m=0;m<b.length;m++){var t=this.model.getCell(b[m].id);null!=t&&f.push(t)}this.setSelectionCells(f)}else this.clearSelection()};
+Graph.prototype.selectCellForEvent=function(b,f){mxEvent.isShiftDown(f)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
+Graph.prototype.selectTableRange=function(b,f){var m=!1;if(this.isTableCell(b)&&this.isTableCell(f)){var t=this.model.getParent(b),y=this.model.getParent(t),q=this.model.getParent(f);if(y==this.model.getParent(q)){b=t.getIndex(b);t=y.getIndex(t);var B=q.getIndex(f),I=y.getIndex(q);q=Math.max(t,I);f=Math.min(b,B);b=Math.max(b,B);B=[];for(t=Math.min(t,I);t<=q;t++){I=this.model.getChildAt(y,t);for(var S=f;S<=b;S++)B.push(this.model.getChildAt(I,S))}0<B.length&&(1<B.length||1<this.getSelectionCount()||
+!this.isCellSelected(B[0]))&&(this.setSelectionCells(B),m=!0)}}return m};
+Graph.prototype.snapCellsToGrid=function(b,f){this.getModel().beginUpdate();try{for(var m=0;m<b.length;m++){var t=b[m],y=this.getCellGeometry(t);if(null!=y){y=y.clone();if(this.getModel().isVertex(t))y.x=Math.round(y.x/f)*f,y.y=Math.round(y.y/f)*f,y.width=Math.round(y.width/f)*f,y.height=Math.round(y.height/f)*f;else if(this.getModel().isEdge(t)&&null!=y.points)for(var q=0;q<y.points.length;q++)y.points[q].x=Math.round(y.points[q].x/f)*f,y.points[q].y=Math.round(y.points[q].y/f)*f;this.getModel().setGeometry(t,
y)}}}finally{this.getModel().endUpdate()}};Graph.prototype.removeChildCells=function(b){this.model.beginUpdate();try{for(var f=this.model.getChildCount(b);0<=f;f--)this.model.remove(this.model.getChildAt(b,f))}finally{this.model.endUpdate()}};
-Graph.prototype.updateShapes=function(b,f,l){this.model.beginUpdate();try{var u=this.model.getStyle(b),y=l?this.stylesheet.getCellStyle(u,{},!1):null;null!=y&&null==y[mxConstants.STYLE_SHAPE]&&(this.model.isVertex(b)?y[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultVertexStyle()[mxConstants.STYLE_SHAPE]:this.model.isEdge(b)&&(y[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultEdgeStyle()[mxConstants.STYLE_SHAPE]));for(var q=0;q<f.length;q++){if(this.model.isVertex(b)&&this.model.isVertex(f[q])||
-this.model.isEdge(b)&&this.model.isEdge(f[q]))if(l){var C=this.model.getStyle(f[q]);if(null!=C){var J=C.split(";");0<J.length&&0>J[0].indexOf("=")&&(J=J.slice(1));this.model.setStyle(f[q],J.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[f[q]]);this.setCellStyles("points",null,[f[q]]);this.pasteStyle(y,[f[q]],null,!0)}else y=this.copyStyle(f[q]),this.model.setStyle(f[q],u),this.pasteStyle(y,[f[q]]);"1"==mxUtils.getValue(this.getCellStyle(f[q],!1),"composite","0")&&this.removeChildCells(f[q])}}finally{this.model.endUpdate()}};
-Graph.prototype.selectCellsForConnectVertex=function(b,f,l){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=l&&(mxEvent.isTouchEvent(f)?l.update(l.getState(this.view.getState(b[1]))):l.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=f&&f.constructor==mxStackLayout};
-Graph.prototype.insertEdgeBeforeCell=function(b,f){for(var l=f;null!=l.parent&&null!=l.geometry&&l.geometry.relative&&l.parent!=b.parent;)l=this.model.getParent(l);null!=l&&null!=l.parent&&l.parent==b.parent&&(f=l.parent.getIndex(l),this.model.add(l.parent,b,f))};
-Graph.prototype.connectVertex=function(b,f,l,u,y,q,C,J){q=q?q:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),D=S?b:this.getCompositeParent(b),P=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(D.geometry.x,D.geometry.y);f==mxConstants.DIRECTION_NORTH?(P.x+=D.geometry.width/2,P.y-=l):f==
-mxConstants.DIRECTION_SOUTH?(P.x+=D.geometry.width/2,P.y+=D.geometry.height+l):(P.x=f==mxConstants.DIRECTION_WEST?P.x-l:P.x+(D.geometry.width+l),P.y+=D.geometry.height/2);var c=this.view.getState(this.model.getParent(b));l=this.view.scale;var g=this.view.translate;D=g.x*l;g=g.y*l;null!=c&&this.model.isVertex(c.cell)&&(D=c.x,g=c.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(P.x+=b.parent.geometry.x,P.y+=b.parent.geometry.y);q=q?null:(new mxRectangle(D+P.x*l,g+P.y*l)).grow(40*l);q=null!=q?
-this.getCells(0,0,0,0,null,null,q,null,!0):null;c=this.view.getState(b);var m=null,n=null;if(null!=q){q=q.reverse();for(var x=0;x<q.length;x++)if(!this.isCellLocked(q[x])&&!this.model.isEdge(q[x])&&q[x]!=b)if(!this.model.isAncestor(b,q[x])&&this.isContainer(q[x])&&(null==m||q[x]==this.model.getParent(b)))m=q[x];else if(null==n&&this.isCellConnectable(q[x])&&!this.model.isAncestor(q[x],b)&&!this.isSwimlane(q[x])){var F=this.view.getState(q[x]);null==c||null==F||mxUtils.intersects(c,F)||(n=q[x])}}var H=
-!mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||y;H&&("1"!=urlParams.sketch||y)&&(f==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var M=[],L=n;n=m;y=mxUtils.bind(this,function(K){if(null==C||null!=K||null==n&&S){this.model.beginUpdate();try{if(null==L&&H){var Z=this.getAbsoluteParent(null!=K?K:b);Z=S?b:this.getCompositeParent(Z);L=null!=K?K:this.duplicateCells([Z],
-!1)[0];null!=K&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ha=this.getCellGeometry(L);null!=ha&&(null!=K&&"1"==urlParams.sketch&&(f==mxConstants.DIRECTION_NORTH?P.y-=ha.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=ha.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-ha.width/2:P.x+ha.width/2),ha.x=P.x-ha.width/2,ha.y=P.y-ha.height/2);null!=m?(this.addCells([L],m,null,null,null,!0),n=null):H&&!S&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var ca=mxEvent.isControlDown(u)&&
-mxEvent.isShiftDown(u)&&H||null==n&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=ca&&(M.push(ca),this.applyNewEdgeStyle(b,[ca],f),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ca,b));if(null==n&&null!=L&&null!=b.parent&&S&&f==mxConstants.DIRECTION_WEST){var aa=b.parent.getIndex(b);this.model.add(b.parent,L,aa)}null==n&&null!=L&&M.push(L);null==L&&null!=ca&&ca.geometry.setTerminalPoint(P,!1);null!=ca&&this.fireEvent(new mxEventObject("cellsInserted",
-"cells",[ca]))}finally{this.model.endUpdate()}}if(null!=J)J(M);else return M});if(null==C||null!=L||!H||null==n&&S)return y(L);C(D+P.x*l,g+P.y*l,y)};
-Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var f=document.createElement("div"),l=[],u,y=0;y<b.length;y++)if(u=b[y],this.model.isVertex(u)||this.model.isEdge(u))this.isHtmlLabel(u)?(f.innerHTML=Graph.sanitizeHtml(this.getLabel(u)),u=mxUtils.extractTextWithWhitespace([f])):u=this.getLabel(u),u=mxUtils.trim(u.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<u.length&&l.push(u);return l.join(" ")};
-Graph.prototype.convertValueToString=function(b){var f=this.model.getValue(b);if(null!=f&&"object"==typeof f){var l=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){f=b.getAttribute("placeholder");for(var u=b;null==l&&null!=u;)null!=u.value&&"object"==typeof u.value&&(l=u.hasAttribute(f)?null!=u.getAttribute(f)?u.getAttribute(f):"":null),u=this.model.getParent(u)}else l=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(l=f.getAttribute("label_"+Graph.diagramLanguage)),
-null==l&&(l=f.getAttribute("label")||"");return l||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b,f){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),f||(b=mxUtils.removeJavascriptProtocol(b)),b):null};
+Graph.prototype.updateShapes=function(b,f,m){this.model.beginUpdate();try{var t=this.model.getStyle(b),y=m?this.stylesheet.getCellStyle(t,{},!1):null;null!=y&&null==y[mxConstants.STYLE_SHAPE]&&(this.model.isVertex(b)?y[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultVertexStyle()[mxConstants.STYLE_SHAPE]:this.model.isEdge(b)&&(y[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultEdgeStyle()[mxConstants.STYLE_SHAPE]));for(var q=0;q<f.length;q++){if(this.model.isVertex(b)&&this.model.isVertex(f[q])||
+this.model.isEdge(b)&&this.model.isEdge(f[q]))if(m){var B=this.model.getStyle(f[q]);if(null!=B){var I=B.split(";");0<I.length&&0>I[0].indexOf("=")&&(I=I.slice(1));this.model.setStyle(f[q],I.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[f[q]]);this.setCellStyles("points",null,[f[q]]);this.pasteStyle(y,[f[q]],null,!0)}else y=this.copyStyle(f[q]),this.model.setStyle(f[q],t),this.pasteStyle(y,[f[q]]);"1"==mxUtils.getValue(this.getCellStyle(f[q],!1),"composite","0")&&this.removeChildCells(f[q])}}finally{this.model.endUpdate()}};
+Graph.prototype.selectCellsForConnectVertex=function(b,f,m){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=m&&(mxEvent.isTouchEvent(f)?m.update(m.getState(this.view.getState(b[1]))):m.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=f&&f.constructor==mxStackLayout};
+Graph.prototype.insertEdgeBeforeCell=function(b,f){for(var m=f;null!=m.parent&&null!=m.geometry&&m.geometry.relative&&m.parent!=b.parent;)m=this.model.getParent(m);null!=m&&null!=m.parent&&m.parent==b.parent&&(f=m.parent.getIndex(m),this.model.add(m.parent,b,f))};
+Graph.prototype.connectVertex=function(b,f,m,t,y,q,B,I){q=q?q:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),D=S?b:this.getCompositeParent(b),P=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(D.geometry.x,D.geometry.y);f==mxConstants.DIRECTION_NORTH?(P.x+=D.geometry.width/2,P.y-=m):f==
+mxConstants.DIRECTION_SOUTH?(P.x+=D.geometry.width/2,P.y+=D.geometry.height+m):(P.x=f==mxConstants.DIRECTION_WEST?P.x-m:P.x+(D.geometry.width+m),P.y+=D.geometry.height/2);var c=this.view.getState(this.model.getParent(b));m=this.view.scale;var g=this.view.translate;D=g.x*m;g=g.y*m;null!=c&&this.model.isVertex(c.cell)&&(D=c.x,g=c.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(P.x+=b.parent.geometry.x,P.y+=b.parent.geometry.y);q=q?null:(new mxRectangle(D+P.x*m,g+P.y*m)).grow(40*m);q=null!=q?
+this.getCells(0,0,0,0,null,null,q,null,!0):null;c=this.view.getState(b);var l=null,n=null;if(null!=q){q=q.reverse();for(var x=0;x<q.length;x++)if(!this.isCellLocked(q[x])&&!this.model.isEdge(q[x])&&q[x]!=b)if(!this.model.isAncestor(b,q[x])&&this.isContainer(q[x])&&(null==l||q[x]==this.model.getParent(b)))l=q[x];else if(null==n&&this.isCellConnectable(q[x])&&!this.model.isAncestor(q[x],b)&&!this.isSwimlane(q[x])){var F=this.view.getState(q[x]);null==c||null==F||mxUtils.intersects(c,F)||(n=q[x])}}var G=
+!mxEvent.isShiftDown(t)||mxEvent.isControlDown(t)||y;G&&("1"!=urlParams.sketch||y)&&(f==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var L=[],M=n;n=l;y=mxUtils.bind(this,function(K){if(null==B||null!=K||null==n&&S){this.model.beginUpdate();try{if(null==M&&G){var Z=this.getAbsoluteParent(null!=K?K:b);Z=S?b:this.getCompositeParent(Z);M=null!=K?K:this.duplicateCells([Z],
+!1)[0];null!=K&&this.addCells([M],this.model.getParent(b),null,null,null,!0);var ja=this.getCellGeometry(M);null!=ja&&(null!=K&&"1"==urlParams.sketch&&(f==mxConstants.DIRECTION_NORTH?P.y-=ja.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=ja.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-ja.width/2:P.x+ja.width/2),ja.x=P.x-ja.width/2,ja.y=P.y-ja.height/2);null!=l?(this.addCells([M],l,null,null,null,!0),n=null):G&&!S&&this.addCells([M],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(t)&&
+mxEvent.isShiftDown(t)&&G||null==n&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,M,this.createCurrentEdgeStyle());null!=da&&(L.push(da),this.applyNewEdgeStyle(b,[da],f),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(da,b));if(null==n&&null!=M&&null!=b.parent&&S&&f==mxConstants.DIRECTION_WEST){var ba=b.parent.getIndex(b);this.model.add(b.parent,M,ba)}null==n&&null!=M&&L.push(M);null==M&&null!=da&&da.geometry.setTerminalPoint(P,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted",
+"cells",[da]))}finally{this.model.endUpdate()}}if(null!=I)I(L);else return L});if(null==B||null!=M||!G||null==n&&S)return y(M);B(D+P.x*m,g+P.y*m,y)};
+Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var f=document.createElement("div"),m=[],t,y=0;y<b.length;y++)if(t=b[y],this.model.isVertex(t)||this.model.isEdge(t))this.isHtmlLabel(t)?(f.innerHTML=Graph.sanitizeHtml(this.getLabel(t)),t=mxUtils.extractTextWithWhitespace([f])):t=this.getLabel(t),t=mxUtils.trim(t.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<t.length&&m.push(t);return m.join(" ")};
+Graph.prototype.convertValueToString=function(b){var f=this.model.getValue(b);if(null!=f&&"object"==typeof f){var m=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){f=b.getAttribute("placeholder");for(var t=b;null==m&&null!=t;)null!=t.value&&"object"==typeof t.value&&(m=t.hasAttribute(f)?null!=t.getAttribute(f)?t.getAttribute(f):"":null),t=this.model.getParent(t)}else m=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(m=f.getAttribute("label_"+Graph.diagramLanguage)),
+null==m&&(m=f.getAttribute("label")||"");return m||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b,f){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),f||(b=mxUtils.removeJavascriptProtocol(b)),b):null};
Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,f){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
-Graph.prototype.updateHorizontalStyle=function(b,f){if(null!=b&&null!=f&&null!=this.layoutManager){var l=this.model.getParent(b);this.model.isVertex(l)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(l),null!=b&&b.constructor==mxStackLayout&&(f[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return f};
-Graph.prototype.replaceDefaultColors=function(b,f){if(null!=f&&null!=this.shapeBackgroundColor&&null!=this.shapeForegroundColor){b=this.shapeBackgroundColor;var l=this.shapeForegroundColor;this.replaceDefaultColor(f,mxConstants.STYLE_FONTCOLOR,l);this.replaceDefaultColor(f,mxConstants.STYLE_FILLCOLOR,b);this.replaceDefaultColor(f,mxConstants.STYLE_GRADIENTCOLOR,l);this.replaceDefaultColor(f,mxConstants.STYLE_STROKECOLOR,l);this.replaceDefaultColor(f,mxConstants.STYLE_IMAGE_BORDER,l);this.replaceDefaultColor(f,
-mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(f,mxConstants.STYLE_LABEL_BORDERCOLOR,l);this.replaceDefaultColor(f,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b);this.replaceDefaultColor(f,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b)}return f};Graph.prototype.replaceDefaultColor=function(b,f,l){null!=b&&null!=l&&"none"!=l&&""!=l&&"default"==b[f]&&(b[f]=this.getDefaultColor(b,f,l))};
-Graph.prototype.getDefaultColor=function(b,f,l){f="default"+f.charAt(0).toUpperCase()+f.substring(1);"invert"==b[f]&&(b=mxUtils.getLightDarkColor(l),l="light-dark("+b.dark+", "+b.light+")");return l};
+Graph.prototype.updateHorizontalStyle=function(b,f){if(null!=b&&null!=f&&null!=this.layoutManager){var m=this.model.getParent(b);this.model.isVertex(m)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(m),null!=b&&b.constructor==mxStackLayout&&(f[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return f};
+Graph.prototype.replaceDefaultColors=function(b,f){if(null!=f&&null!=this.shapeBackgroundColor&&null!=this.shapeForegroundColor){b=this.shapeBackgroundColor;var m=this.shapeForegroundColor;this.replaceDefaultColor(f,mxConstants.STYLE_FONTCOLOR,m);this.replaceDefaultColor(f,mxConstants.STYLE_FILLCOLOR,b);this.replaceDefaultColor(f,mxConstants.STYLE_GRADIENTCOLOR,m);this.replaceDefaultColor(f,mxConstants.STYLE_STROKECOLOR,m);this.replaceDefaultColor(f,mxConstants.STYLE_IMAGE_BORDER,m);this.replaceDefaultColor(f,
+mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(f,mxConstants.STYLE_LABEL_BORDERCOLOR,m);this.replaceDefaultColor(f,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b);this.replaceDefaultColor(f,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b)}return f};Graph.prototype.replaceDefaultColor=function(b,f,m){null!=b&&null!=m&&"none"!=m&&""!=m&&"default"==b[f]&&(b[f]=this.getDefaultColor(b,f,m))};
+Graph.prototype.getDefaultColor=function(b,f,m){f="default"+f.charAt(0).toUpperCase()+f.substring(1);"invert"==b[f]&&(b=mxUtils.getLightDarkColor(m),m="light-dark("+b.dark+", "+b.light+")");return m};
Graph.prototype.setAdaptiveColors=function(b){this.adaptiveColors="default"==b?null:b;"1"==urlParams.embedInline?null!=this.container&&(this.container.style.colorScheme="none"==this.getAdaptiveColors()?"light":""):(b=this.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.colorScheme="none"==this.getAdaptiveColors()?"light":""))};Graph.prototype.getAdaptiveColors=function(){return null!=this.adaptiveColors?this.adaptiveColors:Graph.defaultAdaptiveColors};
-Graph.prototype.updateAlternateBounds=function(b,f,l){if(null!=b&&null!=f&&null!=this.layoutManager&&null!=f.alternateBounds){var u=this.layoutManager.getLayout(this.model.getParent(b));null!=u&&u.constructor==mxStackLayout&&(u.horizontal?f.alternateBounds.height=0:f.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};
-Graph.prototype.moveCellsTo=function(b,f){if(null!=b&&null!=f){for(var l=!0,u=0;u<b.length&&l;u++)l=l&&this.model.isEdge(b[u]);u=null;if(1==b.length&&l){var y=this.getCellGeometry(b[0]);null!=y&&(u=y.getTerminalPoint(!0))}u=null!=u?u:this.getBoundingBoxFromGeometry(b,l);null!=u&&(l=Math.round(this.snap(f.x)),f=Math.round(this.snap(f.y)),this.cellsMoved(b,l-u.x,f-u.y))}};Graph.prototype.isMoveCellsEvent=function(b,f){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(f.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,f,l,u,y){f=null!=f?f:!1;null==l&&(l=this.getFoldableCells(this.getSelectionCells(),b));if(null!=l){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<l.length;q++){var C=this.view.getState(l[q]),J=this.getCellGeometry(l[q]);if(null!=C&&null!=J){var S=0,D=0;if(J.alternateBounds)S=J.width-J.alternateBounds.width,D=J.height-J.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;
-S=Math.round(J.width-C.width/P);D=Math.round(J.height-C.height/P)}if(0!=D||0!=S){var c=this.model.getParent(l[q]),g=this.layoutManager.getLayout(c);null==g?null!=y&&this.isMoveCellsEvent(y,C)&&this.moveSiblings(C,c,S,D):null!=y&&mxEvent.isAltDown(y)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(c,g,S,D)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(l)}};
-Graph.prototype.moveSiblings=function(b,f,l,u){this.model.beginUpdate();try{var y=this.getCellsBeyond(b.x,b.y,f,!0,!0);for(f=0;f<y.length;f++)if(y[f]!=b.cell){var q=this.view.getState(y[f]),C=this.getCellGeometry(y[f]);null!=q&&null!=C&&(C=C.clone(),C.translate(Math.round(l*Math.max(0,Math.min(1,(q.x-b.x)/b.width))),Math.round(u*Math.max(0,Math.min(1,(q.y-b.y)/b.height)))),this.model.setGeometry(y[f],C))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(b,f,l,u){if(null!=this.layoutManager&&null!=f&&f.constructor==mxStackLayout&&!f.resizeLast){this.model.beginUpdate();try{for(var y=f.horizontal;null!=b&&null!=f&&f.constructor==mxStackLayout&&f.horizontal==y&&!f.resizeLast;){var q=this.getCellGeometry(b),C=this.view.getState(b);null!=C&&null!=q&&(q=q.clone(),f.horizontal?q.width+=l+Math.min(0,C.width/this.view.scale-q.width):q.height+=u+Math.min(0,C.height/this.view.scale-q.height),this.model.setGeometry(b,
+Graph.prototype.updateAlternateBounds=function(b,f,m){if(null!=b&&null!=f&&null!=this.layoutManager&&null!=f.alternateBounds){var t=this.layoutManager.getLayout(this.model.getParent(b));null!=t&&t.constructor==mxStackLayout&&(t.horizontal?f.alternateBounds.height=0:f.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};
+Graph.prototype.moveCellsTo=function(b,f){if(null!=b&&null!=f){for(var m=!0,t=0;t<b.length&&m;t++)m=m&&this.model.isEdge(b[t]);t=null;if(1==b.length&&m){var y=this.getCellGeometry(b[0]);null!=y&&(t=y.getTerminalPoint(!0))}t=null!=t?t:this.getBoundingBoxFromGeometry(b,m);null!=t&&(m=Math.round(this.snap(f.x)),f=Math.round(this.snap(f.y)),this.cellsMoved(b,m-t.x,f-t.y))}};Graph.prototype.isMoveCellsEvent=function(b,f){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(f.style,"moveCells","0")};
+Graph.prototype.foldCells=function(b,f,m,t,y){f=null!=f?f:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),b));if(null!=m){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<m.length;q++){var B=this.view.getState(m[q]),I=this.getCellGeometry(m[q]);if(null!=B&&null!=I){var S=0,D=0;if(I.alternateBounds)S=I.width-I.alternateBounds.width,D=I.height-I.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;
+S=Math.round(I.width-B.width/P);D=Math.round(I.height-B.height/P)}if(0!=D||0!=S){var c=this.model.getParent(m[q]),g=this.layoutManager.getLayout(c);null==g?null!=y&&this.isMoveCellsEvent(y,B)&&this.moveSiblings(B,c,S,D):null!=y&&mxEvent.isAltDown(y)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(c,g,S,D)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(m)}};
+Graph.prototype.moveSiblings=function(b,f,m,t){this.model.beginUpdate();try{var y=this.getCellsBeyond(b.x,b.y,f,!0,!0);for(f=0;f<y.length;f++)if(y[f]!=b.cell){var q=this.view.getState(y[f]),B=this.getCellGeometry(y[f]);null!=q&&null!=B&&(B=B.clone(),B.translate(Math.round(m*Math.max(0,Math.min(1,(q.x-b.x)/b.width))),Math.round(t*Math.max(0,Math.min(1,(q.y-b.y)/b.height)))),this.model.setGeometry(y[f],B))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(b,f,m,t){if(null!=this.layoutManager&&null!=f&&f.constructor==mxStackLayout&&!f.resizeLast){this.model.beginUpdate();try{for(var y=f.horizontal;null!=b&&null!=f&&f.constructor==mxStackLayout&&f.horizontal==y&&!f.resizeLast;){var q=this.getCellGeometry(b),B=this.view.getState(b);null!=B&&null!=q&&(q=q.clone(),f.horizontal?q.width+=m+Math.min(0,B.width/this.view.scale-q.width):q.height+=t+Math.min(0,B.height/this.view.scale-q.height),this.model.setGeometry(b,
q));b=this.model.getParent(b);f=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var f=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=f.container:"1"==f.container};Graph.prototype.isCellConnectable=function(b){var f=this.getCurrentCellStyle(b);return!this.isCellLocked(this.getLayerForCell(b))&&(null!=f.connectable?"0"!=f.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};
-Graph.prototype.isLabelMovable=function(b){var f=this.getCurrentCellStyle(b);return null!=f.movableLabel?"0"!=f.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,f,l){l=l||this.getDefaultParent();this.isCellLocked(l)||mxGraph.prototype.selectCells.apply(this,arguments)};
-Graph.prototype.getSwimlaneAt=function(b,f,l){var u=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(u)&&(u=null);return u};Graph.prototype.isCellFoldable=function(b){var f=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&("1"==f.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=f.collapsible||!this.isContainer(b)&&"1"==f.collapsible))};
+Graph.prototype.isLabelMovable=function(b){var f=this.getCurrentCellStyle(b);return null!=f.movableLabel?"0"!=f.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,f,m){m=m||this.getDefaultParent();this.isCellLocked(m)||mxGraph.prototype.selectCells.apply(this,arguments)};
+Graph.prototype.getSwimlaneAt=function(b,f,m){var t=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(t)&&(t=null);return t};Graph.prototype.isCellFoldable=function(b){var f=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&("1"==f.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=f.collapsible||!this.isContainer(b)&&"1"==f.collapsible))};
Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,f){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitPages=function(b,f){var l=1;null==b&&(l=this.getPageLayout(),b=l.width,l=l.height);var u=this.pageScale,y=this.pageFormat,q=this.container.clientHeight-10;b=(this.container.clientWidth-10)/(b*y.width)/u;this.zoomTo(Math.floor(20*(f?b:Math.min(b,q/(l*y.height)/u)))/20);mxUtils.hasScrollbars(this.container)&&(b=this.getPagePadding(),this.container.scrollLeft=Math.min(b.x*this.view.scale,(this.container.scrollWidth-this.container.clientWidth)/2),f||(this.container.scrollTop=Math.min(b.y*
+Graph.prototype.fitPages=function(b,f){var m=1;null==b&&(m=this.getPageLayout(),b=m.width,m=m.height);var t=this.pageScale,y=this.pageFormat,q=this.container.clientHeight-10;b=(this.container.clientWidth-10)/(b*y.width)/t;this.zoomTo(Math.floor(20*(f?b:Math.min(b,q/(m*y.height)/t)))/20);mxUtils.hasScrollbars(this.container)&&(b=this.getPagePadding(),this.container.scrollLeft=Math.min(b.x*this.view.scale,(this.container.scrollWidth-this.container.clientWidth)/2),f||(this.container.scrollTop=Math.min(b.y*
this.view.scale,(this.container.scrollHeight-this.container.clientHeight)/2)))};
-Graph.prototype.fitWindow=function(b,f){f=null!=f?f:10;var l=this.container.clientWidth-f,u=this.container.clientHeight-f;this.zoomTo(Math.floor(20*Math.min(l/b.width,u/b.height))/20);mxUtils.hasScrollbars(this.container)&&window.setTimeout(mxUtils.bind(this,function(){var y=this.view.translate;this.container.scrollLeft=(b.x+y.x)*this.view.scale-Math.max((l-b.width*this.view.scale)/2+f/2,0);this.container.scrollTop=(b.y+y.y)*this.view.scale-Math.max((u-b.height*this.view.scale)/2+f/2,0)}),0)};
+Graph.prototype.fitWindow=function(b,f){f=null!=f?f:10;var m=this.container.clientWidth-f,t=this.container.clientHeight-f;this.zoomTo(Math.floor(20*Math.min(m/b.width,t/b.height))/20);mxUtils.hasScrollbars(this.container)&&window.setTimeout(mxUtils.bind(this,function(){var y=this.view.translate;this.container.scrollLeft=(b.x+y.x)*this.view.scale-Math.max((m-b.width*this.view.scale)/2+f/2,0);this.container.scrollTop=(b.y+y.y)*this.view.scale-Math.max((t-b.height*this.view.scale)/2+f/2,0)}),0)};
Graph.prototype.convertValueToTooltip=function(b){var f=null;mxUtils.isNode(b.value)&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.value.getAttribute("tooltip_"+Graph.diagramLanguage)),null==f&&(f=b.value.getAttribute("tooltip")),null!=f&&(null!=f&&this.isReplacePlaceholders(b)&&(f=this.replacePlaceholders(b,f)),f=Graph.sanitizeHtml(f)));return f};
-Graph.prototype.getTooltipForCell=function(b){var f="";if(mxUtils.isNode(b.value)&&(f=this.convertValueToTooltip(b),null==f)){var l=this.builtInProperties;b=b.value.attributes;var u=[];f="";this.isEnabled()&&(l.push("linkTarget"),l.push("link"));for(var y=0;y<b.length;y++)(Graph.translateDiagram&&"label"==b[y].nodeName||0>mxUtils.indexOf(l,b[y].nodeName))&&0<b[y].nodeValue.length&&u.push({name:b[y].nodeName,value:b[y].nodeValue});u.sort(function(q,C){return q.name<C.name?-1:q.name>C.name?1:0});for(y=
-0;y<u.length;y++)"link"==u[y].name&&this.isCustomLink(u[y].value)||(f+=("link"!=u[y].name?"<b>"+mxUtils.htmlEntities(u[y].name)+":</b> ":"")+mxUtils.htmlEntities(u[y].value)+"\n");0<f.length&&(f=f.substring(0,f.length-1),mxClient.IS_SVG&&(f='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+f+"</div>"))}return f};
-Graph.prototype.addFlowAnimationToNode=function(b,f,l,u){if(null!=b&&null!=u){var y=b.getAttribute("stroke-dasharray");if(""==y||null==y){var q=String(mxUtils.getValue(f,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");y=1==mxUtils.getValue(f,mxConstants.STYLE_FIX_DASH,!1)||null==f.dashPattern?1:mxUtils.getNumber(f,mxConstants.STYLE_STROKEWIDTH,1);if(0<q.length)for(var C=0;C<q.length;C++)q[C]=Math.round(Number(q[C])*l*y*100)/100;b.setAttribute("stroke-dasharray",q.join(" "))}else q=y.split(" ");if(0<
-q.length){for(C=y=0;C<q.length;C++){var J=parseFloat(q[C]);isNaN(J)||(y+=parseFloat(q[C]))}0!=q.length%2&&(y*=2);l=Math.round(y/l/16*parseInt(mxUtils.getValue(f,"flowAnimationDuration",500)));q=mxUtils.getValue(f,"flowAnimationTimingFunction","linear");f=mxUtils.getValue(f,"flowAnimationDirection","normal");b.style.animation=u+" "+l+"ms "+mxUtils.htmlEntities(q)+" infinite "+mxUtils.htmlEntities(f);b.style.strokeDashoffset=y}}};
+Graph.prototype.getTooltipForCell=function(b){var f="";if(mxUtils.isNode(b.value)&&(f=this.convertValueToTooltip(b),null==f)){var m=this.builtInProperties;b=b.value.attributes;var t=[];f="";this.isEnabled()&&(m.push("linkTarget"),m.push("link"));for(var y=0;y<b.length;y++)(Graph.translateDiagram&&"label"==b[y].nodeName||0>mxUtils.indexOf(m,b[y].nodeName))&&0<b[y].nodeValue.length&&t.push({name:b[y].nodeName,value:b[y].nodeValue});t.sort(function(q,B){return q.name<B.name?-1:q.name>B.name?1:0});for(y=
+0;y<t.length;y++)"link"==t[y].name&&this.isCustomLink(t[y].value)||(f+=("link"!=t[y].name?"<b>"+mxUtils.htmlEntities(t[y].name)+":</b> ":"")+mxUtils.htmlEntities(t[y].value)+"\n");0<f.length&&(f=f.substring(0,f.length-1),mxClient.IS_SVG&&(f='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+f+"</div>"))}return f};
+Graph.prototype.addFlowAnimationToNode=function(b,f,m,t){if(null!=b&&null!=t){var y=b.getAttribute("stroke-dasharray");if(""==y||null==y){var q=String(mxUtils.getValue(f,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");y=1==mxUtils.getValue(f,mxConstants.STYLE_FIX_DASH,!1)||null==f.dashPattern?1:mxUtils.getNumber(f,mxConstants.STYLE_STROKEWIDTH,1);if(0<q.length)for(var B=0;B<q.length;B++)q[B]=Math.round(Number(q[B])*m*y*100)/100;b.setAttribute("stroke-dasharray",q.join(" "))}else q=y.split(" ");if(0<
+q.length){for(B=y=0;B<q.length;B++){var I=parseFloat(q[B]);isNaN(I)||(y+=parseFloat(q[B]))}0!=q.length%2&&(y*=2);m=Math.round(y/m/16*parseInt(mxUtils.getValue(f,"flowAnimationDuration",500)));q=mxUtils.getValue(f,"flowAnimationTimingFunction","linear");f=mxUtils.getValue(f,"flowAnimationDirection","normal");b.style.animation=t+" "+m+"ms "+mxUtils.htmlEntities(q)+" infinite "+mxUtils.htmlEntities(f);b.style.strokeDashoffset=y}}};
Graph.prototype.addFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationId){this.flowAnimationId="ge-flow-animation-"+Editor.guid();var f=document.createElement("style");f.innerHTML=this.createFlowAnimationCss(this.flowAnimationId);b.appendChild(f)}return this.flowAnimationId};Graph.prototype.createFlowAnimationCss=function(b){return"@keyframes "+b+" {\n to {\n stroke-dashoffset: 0;\n }\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};
Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,f){return Graph.compress(b,f)};Graph.prototype.decompress=function(b,f){return Graph.decompress(b,f)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;
HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');
@@ -2482,233 +2486,233 @@ HoverIcons.prototype.refreshTarget=new mxImage("data:image/svg+xml;base64,PHN2Zy
38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"),mxConstants.DIRECTION_NORTH);this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"),mxConstants.DIRECTION_EAST);this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"),mxConstants.DIRECTION_SOUTH);this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"),mxConstants.DIRECTION_WEST);this.elts=[this.arrowUp,this.arrowRight,
this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);
-this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(l){null!=l.relatedTarget&&
-mxEvent.getSource(l)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(l){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(l){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(l.getEvent())||this.graph.model.isVertex(l.getCell())||this.reset()});var f=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(l,
-u){f=!1;l=u.getEvent();this.isResetEvent(l)?this.reset():this.isActive()||(u=this.getState(u.getState()),null==u&&mxEvent.isTouchEvent(l)||this.update(u));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(l,u){l=u.getEvent();this.isResetEvent(l)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(l)||this.update(this.getState(u.getState()),u.getGraphX(),u.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(f=!0)}),mouseUp:mxUtils.bind(this,
-function(l,u){l=u.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(l),mxEvent.getClientY(l));this.isResetEvent(l)?this.reset():this.isActive()&&!f&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),u):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(u.getGraphX(),u.getGraphY())))):mxEvent.isTouchEvent(l)||null!=
-this.bbox&&mxUtils.contains(this.bbox,u.getGraphX(),u.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(l)||this.reset();f=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,f){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
-HoverIcons.prototype.createArrow=function(b,f,l){var u=null;u=mxUtils.createImage(b.src);u.style.width=b.width+"px";u.style.height=b.height+"px";u.style.padding=this.tolerance+"px";null!=f&&u.setAttribute("title",f);u.style.position="absolute";u.style.cursor=this.cssCursor;mxEvent.addGestureListeners(u,mxUtils.bind(this,function(y){null==this.currentState||this.isResetEvent(y)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(y),mxEvent.getClientY(y)),this.drag(y,
-this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=u,this.setDisplay("none"),mxEvent.consume(y))}));mxEvent.redirectMouseEvents(u,this.graph,this.currentState);mxEvent.addListener(u,"mouseenter",mxUtils.bind(this,function(y){mxEvent.isMouseEvent(y)&&(null!=this.activeArrow&&this.activeArrow!=u&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(u,100),this.activeArrow=u,this.fireEvent(new mxEventObject("focus",
-"arrow",u,"direction",l,"event",y)))}));mxEvent.addListener(u,"mouseleave",mxUtils.bind(this,function(y){mxEvent.isMouseEvent(y)&&this.fireEvent(new mxEventObject("blur","arrow",u,"direction",l,"event",y));this.graph.isMouseDown||this.resetActiveArrow()}));return u};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
+this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(m){null!=m.relatedTarget&&
+mxEvent.getSource(m)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(m){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(m){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(m.getEvent())||this.graph.model.isVertex(m.getCell())||this.reset()});var f=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(m,
+t){f=!1;m=t.getEvent();this.isResetEvent(m)?this.reset():this.isActive()||(t=this.getState(t.getState()),null==t&&mxEvent.isTouchEvent(m)||this.update(t));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(m,t){m=t.getEvent();this.isResetEvent(m)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(m)||this.update(this.getState(t.getState()),t.getGraphX(),t.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(f=!0)}),mouseUp:mxUtils.bind(this,
+function(m,t){m=t.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(m),mxEvent.getClientY(m));this.isResetEvent(m)?this.reset():this.isActive()&&!f&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),t):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(t.getGraphX(),t.getGraphY())))):mxEvent.isTouchEvent(m)||null!=
+this.bbox&&mxUtils.contains(this.bbox,t.getGraphX(),t.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(m)||this.reset();f=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,f){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
+HoverIcons.prototype.createArrow=function(b,f,m){var t=null;t=mxUtils.createImage(b.src);t.style.width=b.width+"px";t.style.height=b.height+"px";t.style.padding=this.tolerance+"px";null!=f&&t.setAttribute("title",f);t.style.position="absolute";t.style.cursor=this.cssCursor;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(y){null==this.currentState||this.isResetEvent(y)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(y),mxEvent.getClientY(y)),this.drag(y,
+this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=t,this.setDisplay("none"),mxEvent.consume(y))}));mxEvent.redirectMouseEvents(t,this.graph,this.currentState);mxEvent.addListener(t,"mouseenter",mxUtils.bind(this,function(y){mxEvent.isMouseEvent(y)&&(null!=this.activeArrow&&this.activeArrow!=t&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(t,100),this.activeArrow=t,this.fireEvent(new mxEventObject("focus",
+"arrow",t,"direction",m,"event",y)))}));mxEvent.addListener(t,"mouseleave",mxUtils.bind(this,function(y){mxEvent.isMouseEvent(y)&&this.fireEvent(new mxEventObject("blur","arrow",t,"direction",m,"event",y));this.graph.isMouseDown||this.resetActiveArrow()}));return t};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var f=0;f<this.elts.length;f++)null!=this.elts[f]&&b(this.elts[f])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};
HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(f){f.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
-HoverIcons.prototype.drag=function(b,f,l){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,f,l),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,f=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=f&&f.setHandlesVisible(!1),f=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=f&&"orthogonalEdgeStyle"===
-mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),f.cell.style=mxUtils.setStyle(f.cell.style,"sourcePortConstraint",b),f.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,f,l){return this.graph.view.getState(this.graph.getCellAt(f,l))};
-HoverIcons.prototype.click=function(b,f,l){var u=l.getEvent(),y=l.getGraphX(),q=l.getGraphY();y=this.getStateAt(b,y,q);null==y||!this.graph.model.isEdge(y.cell)||this.graph.isCloneEvent(u)||y.getVisibleTerminalState(!0)!=b&&y.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,f,l):(this.graph.setSelectionCell(y.cell),this.reset());l.consume()};
-HoverIcons.prototype.execute=function(b,f,l){l=l.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,f,this.graph.defaultEdgeLength,l,this.graph.isCloneEvent(l),this.graph.isCloneEvent(l)),l,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
+HoverIcons.prototype.drag=function(b,f,m){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,f,m),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,f=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=f&&f.setHandlesVisible(!1),f=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=f&&"orthogonalEdgeStyle"===
+mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),f.cell.style=mxUtils.setStyle(f.cell.style,"sourcePortConstraint",b),f.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,f,m){return this.graph.view.getState(this.graph.getCellAt(f,m))};
+HoverIcons.prototype.click=function(b,f,m){var t=m.getEvent(),y=m.getGraphX(),q=m.getGraphY();y=this.getStateAt(b,y,q);null==y||!this.graph.model.isEdge(y.cell)||this.graph.isCloneEvent(t)||y.getVisibleTerminalState(!0)!=b&&y.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,f,m):(this.graph.setSelectionCell(y.cell),this.reset());m.consume()};
+HoverIcons.prototype.execute=function(b,f,m){m=m.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,f,this.graph.defaultEdgeLength,m,this.graph.isCloneEvent(m),this.graph.isCloneEvent(m)),m,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
-var f=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(f=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var l=null;null!=f&&(b.x-=f.horizontalOffset/2,b.y-=f.verticalOffset/2,b.width+=f.horizontalOffset,b.height+=f.verticalOffset,null!=f.rotationShape&&null!=f.rotationShape.node&&"hidden"!=f.rotationShape.node.style.visibility&&"none"!=f.rotationShape.node.style.display&&null!=f.rotationShape.boundingBox&&
-(l=f.rotationShape.boundingBox));f=mxUtils.bind(this,function(J,S,D){if(null!=l){var P=new mxRectangle(S,D,J.clientWidth,J.clientHeight);mxUtils.intersects(P,l)&&(J==this.arrowUp?D-=P.y+P.height-l.y:J==this.arrowRight?S+=l.x+l.width-P.x:J==this.arrowDown?D+=l.y+l.height-P.y:J==this.arrowLeft&&(S-=P.x+P.width-l.x))}J.style.left=S+"px";J.style.top=D+"px";mxUtils.setOpacity(J,this.inactiveOpacity)});f(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+var f=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(f=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var m=null;null!=f&&(b.x-=f.horizontalOffset/2,b.y-=f.verticalOffset/2,b.width+=f.horizontalOffset,b.height+=f.verticalOffset,null!=f.rotationShape&&null!=f.rotationShape.node&&"hidden"!=f.rotationShape.node.style.visibility&&"none"!=f.rotationShape.node.style.display&&null!=f.rotationShape.boundingBox&&
+(m=f.rotationShape.boundingBox));f=mxUtils.bind(this,function(I,S,D){if(null!=m){var P=new mxRectangle(S,D,I.clientWidth,I.clientHeight);mxUtils.intersects(P,m)&&(I==this.arrowUp?D-=P.y+P.height-m.y:I==this.arrowRight?S+=m.x+m.width-P.x:I==this.arrowDown?D+=m.y+m.height-P.y:I==this.arrowLeft&&(S-=P.x+P.width-m.x))}I.style.left=S+"px";I.style.top=D+"px";mxUtils.setOpacity(I,this.inactiveOpacity)});f(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));f(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));f(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));f(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){f=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var u=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),y=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=f&&f==u&&u==y&&y==b&&(b=y=u=f=null);var q=this.graph.getCellGeometry(this.currentState.cell),C=mxUtils.bind(this,function(J,S){var D=this.graph.model.isVertex(J)&&this.graph.getCellGeometry(J);null==J||this.graph.model.isAncestor(J,
-this.currentState.cell)||this.graph.isSwimlane(J)||!(null==D||null==q||D.height<3*q.height&&D.width<3*q.width)?S.style.visibility="visible":S.style.visibility="hidden"});C(f,this.arrowRight);C(u,this.arrowLeft);C(y,this.arrowUp);C(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var t=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),y=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=f&&f==t&&t==y&&y==b&&(b=y=t=f=null);var q=this.graph.getCellGeometry(this.currentState.cell),B=mxUtils.bind(this,function(I,S){var D=this.graph.model.isVertex(I)&&this.graph.getCellGeometry(I);null==I||this.graph.model.isAncestor(I,
+this.currentState.cell)||this.graph.isSwimlane(I)||!(null==D||null==q||D.height<3*q.height&&D.width<3*q.width)?S.style.visibility="visible":S.style.visibility="hidden"});B(f,this.arrowRight);B(t,this.arrowLeft);B(y,this.arrowUp);B(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(f){null!=f.parentNode&&(f=new mxRectangle(f.offsetLeft,f.offsetTop,f.offsetWidth,f.offsetHeight),null==b?b=f:b.add(f))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var f=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(b=f)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
-HoverIcons.prototype.update=function(b,f,l){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var u=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,u=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
-window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,f,l))}),this.updateDelay+10))):null!=this.startTime&&(u=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&u<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,f,l)?this.reset(!1):(null!=this.currentState||u>this.activationDelay)&&this.currentState!=b&&(u>this.updateDelay&&null!=
-b||null==this.bbox||null==f||null==l||!mxUtils.contains(this.bbox,f,l))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
+HoverIcons.prototype.update=function(b,f,m){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var t=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,t=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
+window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,f,m))}),this.updateDelay+10))):null!=this.startTime&&(t=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&t<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,f,m)?this.reset(!1):(null!=this.currentState||t>this.activationDelay)&&this.currentState!=b&&(t>this.updateDelay&&null!=
+b||null==this.bbox||null==f||null==m||!mxUtils.contains(this.bbox,f,m))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};
-Graph.prototype.removeTextStyleForCell=function(b,f){var l=this.getCurrentCellStyle(b),u=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(l,"html","0")){var y=this.convertValueToString(b);"0"!=mxUtils.getValue(l,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));y=Editor.convertHtmlToText(y);this.cellLabelChanged(b,y);u=!0}f&&(this.setCellStyles("fontSource",null,[b]),this.setCellStyles(mxConstants.STYLE_FONTFAMILY,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSIZE,
-null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSTYLE,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BORDERCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null,[b]))}finally{this.getModel().endUpdate()}return u};Graph.prototype.createParent=function(b,f,l,u,y){b=this.cloneCell(b);for(var q=0;q<l;q++){var C=this.cloneCell(f),J=this.getCellGeometry(C);null!=J&&(J.x+=q*u,J.y+=q*y);b.insert(C)}return b};
-Graph.prototype.createTable=function(b,f,l,u,y,q,C,J,S){l=null!=l?l:60;u=null!=u?u:40;q=null!=q?q:30;J=null!=J?J:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=y?y:"",0,0,f*l,b*u+(null!=y?q:0),null!=C?C:"shape=table;startSize="+(null!=y?q:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,f*l,u,J),this.createVertex(null,null,"",0,0,l,u,S),f,l,0),b,0,u)};
-Graph.prototype.setTableValues=function(b,f,l){for(var u=this.model.getChildCells(b,!0),y=0;y<u.length;y++)if(null!=l&&(u[y].value=l[y]),null!=f)for(var q=this.model.getChildCells(u[y],!0),C=0;C<q.length;C++)null!=f[y][C]&&(q[C].value=f[y][C]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,f,l,u,y,q,C,J,S){l=null!=l?l:120;u=null!=u?u:120;C=null!=C?C:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";J=null!=J?J:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";y=this.createVertex(null,null,null!=y?y:"",0,0,f*l,b*u,null!=q?q:"shape=table;childLayout=tableLayout;"+(null==y?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");q=mxUtils.getValue(this.getCellStyle(y),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);y.geometry.width+=q;y.geometry.height+=
-q;C=this.createVertex(null,null,"",0,q,f*l+q,u,C);y.insert(this.createParent(C,this.createVertex(null,null,"",q,0,l,u,J),f,l,0));return 1<b?(C.geometry.y=u+q,this.createParent(y,this.createParent(C,this.createVertex(null,null,"",q,0,l,u,S),f,l,0),b-1,0,u)):y};
-Graph.prototype.visitTableCells=function(b,f){var l=null,u=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<u.length;y++){for(var q=this.getActualStartSize(u[y],!0),C=this.model.getChildCells(u[y],!0),J=this.getCellStyle(u[y],!0),S=null,D=[],P=0;P<C.length;P++){var c=this.getCellGeometry(C[P]),g={cell:C[P],rospan:1,colspan:1,row:y,col:P,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;g.point=new mxPoint(c.width+(null!=S?S.point.x:b.x+q.x),c.height+(null!=l&&null!=
-l[0]?l[0].point.y:b.y+q.y));g.actual=g;null!=l&&null!=l[P]&&1<l[P].rowspan?(g.rowspan=l[P].rowspan-1,g.colspan=l[P].colspan,g.actual=l[P].actual):null!=S&&1<S.colspan?(g.rowspan=S.rowspan,g.colspan=S.colspan-1,g.actual=S.actual):(S=this.getCurrentCellStyle(C[P],!0),null!=S&&(g.rowspan=parseInt(S.rowspan||1),g.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(J,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;f(g,C.length,
-u.length,b.x+(S?q.x:0),b.y+(S?q.y:0));D.push(g);S=g}l=D}};Graph.prototype.getTableLines=function(b,f,l){var u=[],y=[];(f||l)&&this.visitTableCells(b,mxUtils.bind(this,function(q,C,J,S,D){f&&q.row<J-1&&(null==u[q.row]&&(u[q.row]=[new mxPoint(S,q.point.y)]),1<q.rowspan&&u[q.row].push(null),u[q.row].push(q.point));l&&q.col<C-1&&(null==y[q.col]&&(y[q.col]=[new mxPoint(q.point.x,D)]),1<q.colspan&&y[q.col].push(null),y[q.col].push(q.point))}));return u.concat(y)};
+Graph.prototype.removeTextStyleForCell=function(b,f){var m=this.getCurrentCellStyle(b),t=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(m,"html","0")){var y=this.convertValueToString(b);"0"!=mxUtils.getValue(m,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));y=Editor.convertHtmlToText(y);this.cellLabelChanged(b,y);t=!0}f&&(this.setCellStyles("fontSource",null,[b]),this.setCellStyles(mxConstants.STYLE_FONTFAMILY,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSIZE,
+null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSTYLE,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BORDERCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null,[b]))}finally{this.getModel().endUpdate()}return t};Graph.prototype.createParent=function(b,f,m,t,y){b=this.cloneCell(b);for(var q=0;q<m;q++){var B=this.cloneCell(f),I=this.getCellGeometry(B);null!=I&&(I.x+=q*t,I.y+=q*y);b.insert(B)}return b};
+Graph.prototype.createTable=function(b,f,m,t,y,q,B,I,S){m=null!=m?m:60;t=null!=t?t:40;q=null!=q?q:30;I=null!=I?I:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=y?y:"",0,0,f*m,b*t+(null!=y?q:0),null!=B?B:"shape=table;startSize="+(null!=y?q:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,f*m,t,I),this.createVertex(null,null,"",0,0,m,t,S),f,m,0),b,0,t)};
+Graph.prototype.setTableValues=function(b,f,m){for(var t=this.model.getChildCells(b,!0),y=0;y<t.length;y++)if(null!=m&&(t[y].value=m[y]),null!=f)for(var q=this.model.getChildCells(t[y],!0),B=0;B<q.length;B++)null!=f[y][B]&&(q[B].value=f[y][B]);return b};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,f,m,t,y,q,B,I,S){m=null!=m?m:120;t=null!=t?t:120;B=null!=B?B:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";I=null!=I?I:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";y=this.createVertex(null,null,null!=y?y:"",0,0,f*m,b*t,null!=q?q:"shape=table;childLayout=tableLayout;"+(null==y?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");q=mxUtils.getValue(this.getCellStyle(y),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);y.geometry.width+=q;y.geometry.height+=
+q;B=this.createVertex(null,null,"",0,q,f*m+q,t,B);y.insert(this.createParent(B,this.createVertex(null,null,"",q,0,m,t,I),f,m,0));return 1<b?(B.geometry.y=t+q,this.createParent(y,this.createParent(B,this.createVertex(null,null,"",q,0,m,t,S),f,m,0),b-1,0,t)):y};
+Graph.prototype.visitTableCells=function(b,f){var m=null,t=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<t.length;y++){for(var q=this.getActualStartSize(t[y],!0),B=this.model.getChildCells(t[y],!0),I=this.getCellStyle(t[y],!0),S=null,D=[],P=0;P<B.length;P++){var c=this.getCellGeometry(B[P]),g={cell:B[P],rospan:1,colspan:1,row:y,col:P,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;g.point=new mxPoint(c.width+(null!=S?S.point.x:b.x+q.x),c.height+(null!=m&&null!=
+m[0]?m[0].point.y:b.y+q.y));g.actual=g;null!=m&&null!=m[P]&&1<m[P].rowspan?(g.rowspan=m[P].rowspan-1,g.colspan=m[P].colspan,g.actual=m[P].actual):null!=S&&1<S.colspan?(g.rowspan=S.rowspan,g.colspan=S.colspan-1,g.actual=S.actual):(S=this.getCurrentCellStyle(B[P],!0),null!=S&&(g.rowspan=parseInt(S.rowspan||1),g.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(I,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(I,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;f(g,B.length,
+t.length,b.x+(S?q.x:0),b.y+(S?q.y:0));D.push(g);S=g}m=D}};Graph.prototype.getTableLines=function(b,f,m){var t=[],y=[];(f||m)&&this.visitTableCells(b,mxUtils.bind(this,function(q,B,I,S,D){f&&q.row<I-1&&(null==t[q.row]&&(t[q.row]=[new mxPoint(S,q.point.y)]),1<q.rowspan&&t[q.row].push(null),t[q.row].push(q.point));m&&q.col<B-1&&(null==y[q.col]&&(y[q.col]=[new mxPoint(q.point.x,D)]),1<q.colspan&&y[q.col].push(null),y[q.col].push(q.point))}));return t.concat(y)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,f,l){l=null!=l?l:!0;var u=this.getModel();u.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=f;u.setGeometry(b,y);var q=u.getParent(b),C=u.getChildCells(q,!0);if(!l){var J=mxUtils.indexOf(C,b);if(J<C.length-1){var S=C[J+1],D=this.getCellGeometry(S);null!=D&&(D=D.clone(),D.y+=f,D.height-=f,u.setGeometry(S,D))}}var P=this.getCellGeometry(q);null!=P&&(l||(l=b==C[C.length-1]),l&&(P=P.clone(),P.height+=f,u.setGeometry(q,P)))}}finally{u.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,f,l){l=null!=l?l:!1;var u=this.getModel(),y=u.getParent(b),q=u.getParent(y),C=u.getChildCells(y,!0);b=mxUtils.indexOf(C,b);var J=b==C.length-1;u.beginUpdate();try{for(var S=u.getChildCells(q,!0),D=0;D<S.length;D++){y=S[D];C=u.getChildCells(y,!0);var P=C[b],c=this.getCellGeometry(P);null!=c&&(c=c.clone(),c.width+=f,null!=c.alternateBounds&&(c.alternateBounds.width+=f),u.setGeometry(P,c));b<C.length-1&&(P=C[b+1],c=this.getCellGeometry(P),null!=c&&(c=c.clone(),
-c.x+=f,l||(c.width-=f,null!=c.alternateBounds&&(c.alternateBounds.width-=f)),u.setGeometry(P,c)))}if(J||l){var g=this.getCellGeometry(q);null!=g&&(g=g.clone(),g.width+=f,u.setGeometry(q,g))}null!=this.layoutManager&&this.layoutManager.executeLayout(q)}finally{u.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
-TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,f){for(var l=0,u=0;u<b.length;u++)if(!this.isVertexIgnored(b[u])){var y=this.graph.getCellGeometry(b[u]);null!=y&&(l+=f?y.width:y.height)}return l};
-TableLayout.prototype.getRowLayout=function(b,f){var l=this.graph.model.getChildCells(b,!0),u=this.graph.getActualStartSize(b,!0);b=this.getSize(l,!0);f=f-u.x-u.width;var y=[];u=u.x;for(var q=0;q<l.length;q++){var C=this.graph.getCellGeometry(l[q]);null!=C&&(u+=(null!=C.alternateBounds?C.alternateBounds.width:C.width)*f/b,y.push(Math.round(u)))}return y};
-TableLayout.prototype.layoutRow=function(b,f,l,u){var y=this.graph.getModel(),q=y.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var C=b.x,J=0;null!=f&&(f=f.slice(),f.splice(0,0,b.x));for(var S=0;S<q.length;S++){var D=this.graph.getCellGeometry(q[S]);null!=D&&(D=D.clone(),D.y=b.y,D.height=l-b.y-b.height,null!=f?(D.x=f[S],D.width=f[S+1]-D.x,S==q.length-1&&S<f.length-2&&(D.width=u-D.x-b.x-b.width)):(D.x=C,C+=D.width,S==q.length-1?D.width=u-b.x-b.width-J:J+=D.width),D.alternateBounds=new mxRectangle(0,
-0,D.width,D.height),y.setGeometry(q[S],D))}return J};
-TableLayout.prototype.execute=function(b){if(null!=b){var f=this.graph.getActualStartSize(b,!0),l=this.graph.getCellGeometry(b),u=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(u,"resizeLastRow","0"),q="1"==mxUtils.getValue(u,"resizeLast","0");u="1"==mxUtils.getValue(u,"fixedRows","0");var C=this.graph.getModel(),J=0;C.beginUpdate();try{for(var S=l.height-f.y-f.height,D=l.width-f.x-f.width,P=C.getChildCells(b,!0),c=0;c<P.length;c++)C.setVisible(P[c],!0);var g=this.getSize(P,!1);if(0<S&&0<D&&0<
-P.length&&0<g){if(y){var m=this.graph.getCellGeometry(P[P.length-1]);null!=m&&(m=m.clone(),m.height=S-g+m.height,C.setGeometry(P[P.length-1],m))}var n=q?null:this.getRowLayout(P[0],D),x=[],F=f.y;for(c=0;c<P.length;c++)m=this.graph.getCellGeometry(P[c]),null!=m&&(m=m.clone(),m.x=f.x,m.width=D,m.y=Math.round(F),F=y||u?F+m.height:F+m.height/g*S,m.height=Math.round(F)-m.y,C.setGeometry(P[c],m)),J=Math.max(J,this.layoutRow(P[c],n,m.height,D,x));u&&S<g&&(l=l.clone(),l.height=F+f.height,C.setGeometry(b,
-l));q&&D<J+Graph.minTableColumnWidth&&(l=l.clone(),l.width=J+f.width+f.x+Graph.minTableColumnWidth,C.setGeometry(b,l));this.graph.visitTableCells(b,mxUtils.bind(this,function(H){C.setVisible(H.cell,H.actual.cell==H.cell);if(H.actual.cell!=H.cell){if(H.actual.row==H.row){var M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo;H.actual.geo.width+=M.width}H.actual.col==H.col&&(M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo,H.actual.geo.height+=M.height)}}))}else for(c=0;c<P.length;c++)C.setVisible(P[c],
-!1)}finally{C.endUpdate()}}};
-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var f=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(c,g){g=null!=g?g:!0;var m=this.getState(c);null!=m&&g&&this.graph.model.isEdge(m.cell)&&null!=m.style&&1!=m.style[mxConstants.STYLE_CURVED]&&!m.invalid&&this.updateLineJumps(m)&&this.graph.cellRenderer.redraw(m,!1,this.isRendering());m=f.apply(this,
-arguments);null!=m&&g&&this.graph.model.isEdge(m.cell)&&null!=m.style&&1!=m.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(m);return m};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(c){var g=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
-g)for(var m=null,n=0;n<g.length;n++)if("hidden"!=g[n].getAttribute("visibility")){if(!(null!=m&&m!=g[n].getAttribute("d")||null!=c&&0!=--c))return g[n]}else null==m&&(m=g[n].getAttribute("d"));return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var l=mxShape.prototype.paint;mxShape.prototype.paint=function(c){l.apply(this,
-arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var u=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(c){c=u.apply(this,arguments);null!=this.state&&(c.adaptiveColors=this.state.view.graph.getAdaptiveColors());return c};var y=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(c,g){return y.apply(this,arguments)||null!=c.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,c.routedPoints)};
-var q=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(c){q.apply(this,arguments);this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(c)};mxGraphView.prototype.updateLineJumps=function(c){var g=c.absolutePoints;if(Graph.lineJumpsEnabled){var m=null!=c.routedPoints,n=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(c.style,"jumpStyle","none")){var x=function(V,k,v){var I=new mxPoint(k,v);I.type=V;n.push(I);
-I=null!=c.routedPoints?c.routedPoints[n.length-1]:null;return null==I||I.type!=V||I.x!=k||I.y!=v},F=.5*this.scale;m=!1;n=[];for(var H=0;H<g.length-1;H++){for(var M=g[H+1],L=g[H],K=[],Z=g[H+2];H<g.length-2&&mxUtils.ptSegDistSq(L.x,L.y,Z.x,Z.y,M.x,M.y)<1*this.scale*this.scale;)M=Z,H++,Z=g[H+2];m=x(0,L.x,L.y)||m;for(var ha=0;ha<this.validEdges.length;ha++){var ca=this.validEdges[ha],aa=ca.absolutePoints;if(null!=aa&&mxUtils.intersects(c,ca)&&"1"!=ca.style.noJump){var oa=null;for(ca=0;ca<aa.length-1;ca++){var da=
-aa[ca+1],ka=aa[ca];for(Z=aa[ca+2];ca<aa.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Z.x,Z.y,da.x,da.y)<1*this.scale*this.scale;)da=Z,ca++,Z=aa[ca+2];var ba=mxUtils.intersection(L.x,L.y,M.x,M.y,ka.x,ka.y,da.x,da.y);if(null!=ba&&(Math.abs(ba.x-L.x)>F||Math.abs(ba.y-L.y)>F)&&(Math.abs(ba.x-M.x)>F||Math.abs(ba.y-M.y)>F)&&(null==oa||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,oa.x,oa.y)>F||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,ka.x,ka.y)>F)&&(null==Z||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,Z.x,Z.y)>F||mxUtils.ptLineDist(L.x,
-L.y,M.x,M.y,da.x,da.y)>F)){Z=ba.x-L.x;oa=ba.y-L.y;ba={distSq:Z*Z+oa*oa,x:ba.x,y:ba.y};for(Z=0;Z<K.length;Z++)if(K[Z].distSq>ba.distSq){K.splice(Z,0,ba);ba=null;break}null==ba||0!=K.length&&K[K.length-1].x===ba.x&&K[K.length-1].y===ba.y||K.push(ba)}oa=ka}}}for(ca=0;ca<K.length;ca++)m=x(1,K[ca].x,K[ca].y)||m}ba=g[g.length-1];m=x(0,ba.x,ba.y)||m}c.routedPoints=n;return m}return!1};var C=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,g,m){this.routedPoints=null!=this.state?
-this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)C.apply(this,arguments);else{var n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,x=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,M=null,L=null,K=[],Z=null;c.begin();for(var ha=0;ha<this.state.routedPoints.length;ha++){var ca=
-this.state.routedPoints[ha],aa=new mxPoint(ca.x/this.scale,ca.y/this.scale);0==ha?aa=g[0]:ha==this.state.routedPoints.length-1&&(aa=g[g.length-1]);var oa=!1;if(null!=M&&1==ca.type){var da=this.state.routedPoints[ha+1];ca=da.x/this.scale-aa.x;da=da.y/this.scale-aa.y;ca=ca*ca+da*da;null==Z&&(Z=new mxPoint(aa.x-M.x,aa.y-M.y),L=Math.sqrt(Z.x*Z.x+Z.y*Z.y),0<L?(Z.x=Z.x*x/L,Z.y=Z.y*x/L):Z=null);ca>x*x&&0<L&&(ca=M.x-aa.x,da=M.y-aa.y,ca=ca*ca+da*da,ca>x*x&&(oa=new mxPoint(aa.x-Z.x,aa.y-Z.y),ca=new mxPoint(aa.x+
-Z.x,aa.y+Z.y),K.push(oa),this.addPoints(c,K,m,n,!1,null,H),K=0>Math.round(Z.x)||0==Math.round(Z.x)&&0>=Math.round(Z.y)?1:-1,H=!1,"sharp"==F?(c.lineTo(oa.x-Z.y*K,oa.y+Z.x*K),c.lineTo(ca.x-Z.y*K,ca.y+Z.x*K),c.lineTo(ca.x,ca.y)):"line"==F?(c.moveTo(oa.x+Z.y*K,oa.y-Z.x*K),c.lineTo(oa.x-Z.y*K,oa.y+Z.x*K),c.moveTo(ca.x-Z.y*K,ca.y+Z.x*K),c.lineTo(ca.x+Z.y*K,ca.y-Z.x*K),c.moveTo(ca.x,ca.y)):"arc"==F?(K*=1.3,c.curveTo(oa.x-Z.y*K,oa.y+Z.x*K,ca.x-Z.y*K,ca.y+Z.x*K,ca.x,ca.y)):(c.moveTo(ca.x,ca.y),H=!0),K=[ca],
-oa=!0))}else Z=null;oa||(K.push(aa),M=aa)}this.addPoints(c,K,m,n,!1,null,H);c.stroke()}};var J=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(c,g,m,n){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):J.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,g,m,n){if(null==g||null==c||"1"!=g.style.snapToPoint&&
-"1"!=c.style.snapToPoint)S.apply(this,arguments);else{g=this.getTerminalPort(c,g,n);var x=this.getNextPoint(c,m,n),F=this.graph.isOrthogonal(c),H=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=H){var L=Math.cos(-H),K=Math.sin(-H);x=mxUtils.getRotatedPoint(x,L,K,M)}L=parseFloat(c.style[mxConstants.STYLE_PERIMETER_SPACING]||0);L+=parseFloat(c.style[n?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
-0);x=this.getPerimeterPoint(g,x,0==H&&F,L);0!=H&&(L=Math.cos(H),K=Math.sin(H),x=mxUtils.getRotatedPoint(x,L,K,M));c.setAbsoluteTerminalPoint(this.snapToAnchorPoint(c,g,m,n,x),n)}};mxGraphView.prototype.snapToAnchorPoint=function(c,g,m,n,x){if(null!=g&&null!=c){c=this.graph.getAllConnectionConstraints(g);n=m=null;if(null!=c)for(var F=0;F<c.length;F++){var H=this.graph.getConnectionPoint(g,c[F]);if(null!=H){var M=(H.x-x.x)*(H.x-x.x)+(H.y-x.y)*(H.y-x.y);if(null==n||M<n)m=H,n=M}}null!=m&&(x=m)}return x};
-var D=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(c,g,m){var n=D.apply(this,arguments);"1"==c.getAttribute("placeholders")&&null!=m.state&&(n=m.state.view.graph.replacePlaceholders(m.state.cell,n));return n};var P=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(c){if(null!=c.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,
-8))try{var m=g.substring(8,g.length-1),n=mxUtils.parseXml(Graph.decompress(m));return new mxShape(new mxStencil(n.documentElement))}catch(x){null!=window.console&&console.log("Error in shape: "+x)}}return P.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(b){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[b]};
+Graph.prototype.setTableRowHeight=function(b,f,m){m=null!=m?m:!0;var t=this.getModel();t.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=f;t.setGeometry(b,y);var q=t.getParent(b),B=t.getChildCells(q,!0);if(!m){var I=mxUtils.indexOf(B,b);if(I<B.length-1){var S=B[I+1],D=this.getCellGeometry(S);null!=D&&(D=D.clone(),D.y+=f,D.height-=f,t.setGeometry(S,D))}}var P=this.getCellGeometry(q);null!=P&&(m||(m=b==B[B.length-1]),m&&(P=P.clone(),P.height+=f,t.setGeometry(q,P)))}}finally{t.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,f,m){m=null!=m?m:!1;var t=this.getModel(),y=t.getParent(b),q=t.getParent(y),B=t.getChildCells(y,!0);b=mxUtils.indexOf(B,b);var I=b==B.length-1;t.beginUpdate();try{for(var S=t.getChildCells(q,!0),D=0;D<S.length;D++){y=S[D];B=t.getChildCells(y,!0);var P=B[b],c=this.getCellGeometry(P);null!=c&&(c=c.clone(),c.width+=f,null!=c.alternateBounds&&(c.alternateBounds.width+=f),t.setGeometry(P,c));b<B.length-1&&(P=B[b+1],c=this.getCellGeometry(P),null!=c&&(c=c.clone(),
+c.x+=f,m||(c.width-=f,null!=c.alternateBounds&&(c.alternateBounds.width-=f)),t.setGeometry(P,c)))}if(I||m){var g=this.getCellGeometry(q);null!=g&&(g=g.clone(),g.width+=f,t.setGeometry(q,g))}null!=this.layoutManager&&this.layoutManager.executeLayout(q)}finally{t.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,f){for(var m=0,t=0;t<b.length;t++)if(!this.isVertexIgnored(b[t])){var y=this.graph.getCellGeometry(b[t]);null!=y&&(m+=f?y.width:y.height)}return m};
+TableLayout.prototype.getRowLayout=function(b,f){var m=this.graph.model.getChildCells(b,!0),t=this.graph.getActualStartSize(b,!0);b=this.getSize(m,!0);f=f-t.x-t.width;var y=[];t=t.x;for(var q=0;q<m.length;q++){var B=this.graph.getCellGeometry(m[q]);null!=B&&(t+=(null!=B.alternateBounds?B.alternateBounds.width:B.width)*f/b,y.push(Math.round(t)))}return y};
+TableLayout.prototype.layoutRow=function(b,f,m,t){var y=this.graph.getModel(),q=y.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var B=b.x,I=0;null!=f&&(f=f.slice(),f.splice(0,0,b.x));for(var S=0;S<q.length;S++){var D=this.graph.getCellGeometry(q[S]);null!=D&&(D=D.clone(),D.y=b.y,D.height=m-b.y-b.height,null!=f?(D.x=f[S],D.width=f[S+1]-D.x,S==q.length-1&&S<f.length-2&&(D.width=t-D.x-b.x-b.width)):(D.x=B,B+=D.width,S==q.length-1?D.width=t-b.x-b.width-I:I+=D.width),D.alternateBounds=new mxRectangle(0,
+0,D.width,D.height),y.setGeometry(q[S],D))}return I};
+TableLayout.prototype.execute=function(b){if(null!=b){var f=this.graph.getActualStartSize(b,!0),m=this.graph.getCellGeometry(b),t=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(t,"resizeLastRow","0"),q="1"==mxUtils.getValue(t,"resizeLast","0");t="1"==mxUtils.getValue(t,"fixedRows","0");var B=this.graph.getModel(),I=0;B.beginUpdate();try{for(var S=m.height-f.y-f.height,D=m.width-f.x-f.width,P=B.getChildCells(b,!0),c=0;c<P.length;c++)B.setVisible(P[c],!0);var g=this.getSize(P,!1);if(0<S&&0<D&&0<
+P.length&&0<g){if(y){var l=this.graph.getCellGeometry(P[P.length-1]);null!=l&&(l=l.clone(),l.height=S-g+l.height,B.setGeometry(P[P.length-1],l))}var n=q?null:this.getRowLayout(P[0],D),x=[],F=f.y;for(c=0;c<P.length;c++)l=this.graph.getCellGeometry(P[c]),null!=l&&(l=l.clone(),l.x=f.x,l.width=D,l.y=Math.round(F),F=y||t?F+l.height:F+l.height/g*S,l.height=Math.round(F)-l.y,B.setGeometry(P[c],l)),I=Math.max(I,this.layoutRow(P[c],n,l.height,D,x));t&&S<g&&(m=m.clone(),m.height=F+f.height,B.setGeometry(b,
+m));q&&D<I+Graph.minTableColumnWidth&&(m=m.clone(),m.width=I+f.width+f.x+Graph.minTableColumnWidth,B.setGeometry(b,m));this.graph.visitTableCells(b,mxUtils.bind(this,function(G){B.setVisible(G.cell,G.actual.cell==G.cell);if(G.actual.cell!=G.cell){if(G.actual.row==G.row){var L=null!=G.geo.alternateBounds?G.geo.alternateBounds:G.geo;G.actual.geo.width+=L.width}G.actual.col==G.col&&(L=null!=G.geo.alternateBounds?G.geo.alternateBounds:G.geo,G.actual.geo.height+=L.height)}}))}else for(c=0;c<P.length;c++)B.setVisible(P[c],
+!1)}finally{B.endUpdate()}}};
+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var f=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(c,g){g=null!=g?g:!0;var l=this.getState(c);null!=l&&g&&this.graph.model.isEdge(l.cell)&&null!=l.style&&1!=l.style[mxConstants.STYLE_CURVED]&&!l.invalid&&this.updateLineJumps(l)&&this.graph.cellRenderer.redraw(l,!1,this.isRendering());l=f.apply(this,
+arguments);null!=l&&g&&this.graph.model.isEdge(l.cell)&&null!=l.style&&1!=l.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(l);return l};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(c){var g=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
+g)for(var l=null,n=0;n<g.length;n++)if("hidden"!=g[n].getAttribute("visibility")){if(!(null!=l&&l!=g[n].getAttribute("d")||null!=c&&0!=--c))return g[n]}else null==l&&(l=g[n].getAttribute("d"));return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var m=mxShape.prototype.paint;mxShape.prototype.paint=function(c){m.apply(this,
+arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var t=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(c){c=t.apply(this,arguments);null!=this.state&&(c.adaptiveColors=this.state.view.graph.getAdaptiveColors());return c};var y=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(c,g){return y.apply(this,arguments)||null!=c.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,c.routedPoints)};
+var q=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(c){q.apply(this,arguments);this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(c)};mxGraphView.prototype.updateLineJumps=function(c){var g=c.absolutePoints;if(Graph.lineJumpsEnabled){var l=null!=c.routedPoints,n=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(c.style,"jumpStyle","none")){var x=function(V,k,v){var J=new mxPoint(k,v);J.type=V;n.push(J);
+J=null!=c.routedPoints?c.routedPoints[n.length-1]:null;return null==J||J.type!=V||J.x!=k||J.y!=v},F=.5*this.scale;l=!1;n=[];for(var G=0;G<g.length-1;G++){for(var L=g[G+1],M=g[G],K=[],Z=g[G+2];G<g.length-2&&mxUtils.ptSegDistSq(M.x,M.y,Z.x,Z.y,L.x,L.y)<1*this.scale*this.scale;)L=Z,G++,Z=g[G+2];l=x(0,M.x,M.y)||l;for(var ja=0;ja<this.validEdges.length;ja++){var da=this.validEdges[ja],ba=da.absolutePoints;if(null!=ba&&mxUtils.intersects(c,da)&&"1"!=da.style.noJump){var na=null;for(da=0;da<ba.length-1;da++){var ca=
+ba[da+1],ka=ba[da];for(Z=ba[da+2];da<ba.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Z.x,Z.y,ca.x,ca.y)<1*this.scale*this.scale;)ca=Z,da++,Z=ba[da+2];var aa=mxUtils.intersection(M.x,M.y,L.x,L.y,ka.x,ka.y,ca.x,ca.y);if(null!=aa&&(Math.abs(aa.x-M.x)>F||Math.abs(aa.y-M.y)>F)&&(Math.abs(aa.x-L.x)>F||Math.abs(aa.y-L.y)>F)&&(null==na||mxUtils.ptLineDist(M.x,M.y,L.x,L.y,na.x,na.y)>F||mxUtils.ptLineDist(M.x,M.y,L.x,L.y,ka.x,ka.y)>F)&&(null==Z||mxUtils.ptLineDist(M.x,M.y,L.x,L.y,Z.x,Z.y)>F||mxUtils.ptLineDist(M.x,
+M.y,L.x,L.y,ca.x,ca.y)>F)){Z=aa.x-M.x;na=aa.y-M.y;aa={distSq:Z*Z+na*na,x:aa.x,y:aa.y};for(Z=0;Z<K.length;Z++)if(K[Z].distSq>aa.distSq){K.splice(Z,0,aa);aa=null;break}null==aa||0!=K.length&&K[K.length-1].x===aa.x&&K[K.length-1].y===aa.y||K.push(aa)}na=ka}}}for(da=0;da<K.length;da++)l=x(1,K[da].x,K[da].y)||l}aa=g[g.length-1];l=x(0,aa.x,aa.y)||l}c.routedPoints=n;return l}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,g,l){this.routedPoints=null!=this.state?
+this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)B.apply(this,arguments);else{var n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,x=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,L=null,M=null,K=[],Z=null;c.begin();for(var ja=0;ja<this.state.routedPoints.length;ja++){var da=
+this.state.routedPoints[ja],ba=new mxPoint(da.x/this.scale,da.y/this.scale);0==ja?ba=g[0]:ja==this.state.routedPoints.length-1&&(ba=g[g.length-1]);var na=!1;if(null!=L&&1==da.type){var ca=this.state.routedPoints[ja+1];da=ca.x/this.scale-ba.x;ca=ca.y/this.scale-ba.y;da=da*da+ca*ca;null==Z&&(Z=new mxPoint(ba.x-L.x,ba.y-L.y),M=Math.sqrt(Z.x*Z.x+Z.y*Z.y),0<M?(Z.x=Z.x*x/M,Z.y=Z.y*x/M):Z=null);da>x*x&&0<M&&(da=L.x-ba.x,ca=L.y-ba.y,da=da*da+ca*ca,da>x*x&&(na=new mxPoint(ba.x-Z.x,ba.y-Z.y),da=new mxPoint(ba.x+
+Z.x,ba.y+Z.y),K.push(na),this.addPoints(c,K,l,n,!1,null,G),K=0>Math.round(Z.x)||0==Math.round(Z.x)&&0>=Math.round(Z.y)?1:-1,G=!1,"sharp"==F?(c.lineTo(na.x-Z.y*K,na.y+Z.x*K),c.lineTo(da.x-Z.y*K,da.y+Z.x*K),c.lineTo(da.x,da.y)):"line"==F?(c.moveTo(na.x+Z.y*K,na.y-Z.x*K),c.lineTo(na.x-Z.y*K,na.y+Z.x*K),c.moveTo(da.x-Z.y*K,da.y+Z.x*K),c.lineTo(da.x+Z.y*K,da.y-Z.x*K),c.moveTo(da.x,da.y)):"arc"==F?(K*=1.3,c.curveTo(na.x-Z.y*K,na.y+Z.x*K,da.x-Z.y*K,da.y+Z.x*K,da.x,da.y)):(c.moveTo(da.x,da.y),G=!0),K=[da],
+na=!0))}else Z=null;na||(K.push(ba),L=ba)}this.addPoints(c,K,l,n,!1,null,G);c.stroke()}};var I=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(c,g,l,n){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):I.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,g,l,n){if(null==g||null==c||"1"!=g.style.snapToPoint&&
+"1"!=c.style.snapToPoint)S.apply(this,arguments);else{g=this.getTerminalPort(c,g,n);var x=this.getNextPoint(c,l,n),F=this.graph.isOrthogonal(c),G=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),L=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=G){var M=Math.cos(-G),K=Math.sin(-G);x=mxUtils.getRotatedPoint(x,M,K,L)}M=parseFloat(c.style[mxConstants.STYLE_PERIMETER_SPACING]||0);M+=parseFloat(c.style[n?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+0);x=this.getPerimeterPoint(g,x,0==G&&F,M);0!=G&&(M=Math.cos(G),K=Math.sin(G),x=mxUtils.getRotatedPoint(x,M,K,L));c.setAbsoluteTerminalPoint(this.snapToAnchorPoint(c,g,l,n,x),n)}};mxGraphView.prototype.snapToAnchorPoint=function(c,g,l,n,x){if(null!=g&&null!=c){c=this.graph.getAllConnectionConstraints(g);n=l=null;if(null!=c)for(var F=0;F<c.length;F++){var G=this.graph.getConnectionPoint(g,c[F]);if(null!=G){var L=(G.x-x.x)*(G.x-x.x)+(G.y-x.y)*(G.y-x.y);if(null==n||L<n)l=G,n=L}}null!=l&&(x=l)}return x};
+var D=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(c,g,l){var n=D.apply(this,arguments);"1"==c.getAttribute("placeholders")&&null!=l.state&&(n=l.state.view.graph.replacePlaceholders(l.state.cell,n));return n};var P=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(c){if(null!=c.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,
+8))try{var l=g.substring(8,g.length-1),n=mxUtils.parseXml(Graph.decompress(l));return new mxShape(new mxStencil(n.documentElement))}catch(x){null!=window.console&&console.log("Error in shape: "+x)}}return P.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(b){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[b]};
mxStencilRegistry.setFileLoaded=function(b){mxStencilRegistry.filesLoaded[b]=!0};
-mxStencilRegistry.getStencil=function(b){var f=mxStencilRegistry.stencils[b];if(null==f&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var l=mxStencilRegistry.getBasenameForStencil(b);if(null!=l){f=mxStencilRegistry.libraries[l];if(null!=f){if(null==mxStencilRegistry.packages[l]){for(var u=0;u<f.length;u++){var y=f[u];if(!mxStencilRegistry.isFileLoaded(y))if(mxStencilRegistry.setFileLoaded(y),".xml"==y.toLowerCase().substring(y.length-4,y.length))mxStencilRegistry.loadStencilSet(y,
-null);else if(".js"==y.toLowerCase().substring(y.length-3,y.length))try{if(mxStencilRegistry.allowEval){var q=mxUtils.load(y);null!=q&&200<=q.getStatus()&&299>=q.getStatus()&&eval.call(window,q.getText())}}catch(C){null!=window.console&&console.log("error in getStencil:",b,l,f,y,C)}}mxStencilRegistry.packages[l]=1}}else l=l.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+l+".xml",null);f=mxStencilRegistry.stencils[b]}}return f};
-mxStencilRegistry.getBasenameForStencil=function(b){var f=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){f=b[1];for(var l=2;l<b.length-1;l++)f+="/"+b[l]}return f};
-mxStencilRegistry.loadStencilSet=function(b,f,l,u){var y=mxStencilRegistry.packages[b];if(null!=l&&l||null==y){var q=!1;if(null==y)try{if(u){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(C){null!=C&&null!=C.documentElement&&(mxStencilRegistry.packages[b]=C,q=!0,mxStencilRegistry.parseStencilSet(C.documentElement,f,q))}));return}y=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=y;q=!0}catch(C){null!=window.console&&console.log("error in loadStencilSet:",b,C)}null!=y&&null!=
-y.documentElement&&mxStencilRegistry.parseStencilSet(y.documentElement,f,q)}};mxStencilRegistry.loadStencil=function(b,f){if(null!=f)mxUtils.get(b,mxUtils.bind(this,function(l){f(200<=l.getStatus()&&299>=l.getStatus()?l.getXml():null)}),mxUtils.bind(this,function(l){f(null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var f=0;f<b.length;f++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[f]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(b,f,l){if("stencils"==b.nodeName)for(var u=b.firstChild;null!=u;)"shapes"==u.nodeName&&mxStencilRegistry.parseStencilSet(u,f,l),u=u.nextSibling;else{l=null!=l?l:!0;u=b.firstChild;var y="";b=b.getAttribute("name");for(null!=b&&(y=b+".");null!=u;){if(u.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=u.getAttribute("name"),null!=b)){y=y.toLowerCase();var q=b.replace(/ /g,"_");l&&mxStencilRegistry.addStencil(y+q.toLowerCase(),new mxStencil(u));if(null!=f){var C=u.getAttribute("w"),
-J=u.getAttribute("h");C=null==C?80:parseInt(C,10);J=null==J?80:parseInt(J,10);f(y,q,b,C,J)}}u=u.nextSibling}}};
-"undefined"!==typeof mxVertexHandler&&function(){function b(){var B=document.createElement("div");B.className="geHint";B.style.whiteSpace="nowrap";B.style.position="absolute";return B}function f(B,Q){switch(Q){case mxConstants.POINTS:return 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(3)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
+mxStencilRegistry.getStencil=function(b){var f=mxStencilRegistry.stencils[b];if(null==f&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var m=mxStencilRegistry.getBasenameForStencil(b);if(null!=m){f=mxStencilRegistry.libraries[m];if(null!=f){if(null==mxStencilRegistry.packages[m]){for(var t=0;t<f.length;t++){var y=f[t];if(!mxStencilRegistry.isFileLoaded(y))if(mxStencilRegistry.setFileLoaded(y),".xml"==y.toLowerCase().substring(y.length-4,y.length))mxStencilRegistry.loadStencilSet(y,
+null);else if(".js"==y.toLowerCase().substring(y.length-3,y.length))try{if(mxStencilRegistry.allowEval){var q=mxUtils.load(y);null!=q&&200<=q.getStatus()&&299>=q.getStatus()&&eval.call(window,q.getText())}}catch(B){null!=window.console&&console.log("error in getStencil:",b,m,f,y,B)}}mxStencilRegistry.packages[m]=1}}else m=m.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+m+".xml",null);f=mxStencilRegistry.stencils[b]}}return f};
+mxStencilRegistry.getBasenameForStencil=function(b){var f=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){f=b[1];for(var m=2;m<b.length-1;m++)f+="/"+b[m]}return f};
+mxStencilRegistry.loadStencilSet=function(b,f,m,t){var y=mxStencilRegistry.packages[b];if(null!=m&&m||null==y){var q=!1;if(null==y)try{if(t){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(B){null!=B&&null!=B.documentElement&&(mxStencilRegistry.packages[b]=B,q=!0,mxStencilRegistry.parseStencilSet(B.documentElement,f,q))}));return}y=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=y;q=!0}catch(B){null!=window.console&&console.log("error in loadStencilSet:",b,B)}null!=y&&null!=
+y.documentElement&&mxStencilRegistry.parseStencilSet(y.documentElement,f,q)}};mxStencilRegistry.loadStencil=function(b,f){if(null!=f)mxUtils.get(b,mxUtils.bind(this,function(m){f(200<=m.getStatus()&&299>=m.getStatus()?m.getXml():null)}),mxUtils.bind(this,function(m){f(null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var f=0;f<b.length;f++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[f]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(b,f,m){if("stencils"==b.nodeName)for(var t=b.firstChild;null!=t;)"shapes"==t.nodeName&&mxStencilRegistry.parseStencilSet(t,f,m),t=t.nextSibling;else{m=null!=m?m:!0;t=b.firstChild;var y="";b=b.getAttribute("name");for(null!=b&&(y=b+".");null!=t;){if(t.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=t.getAttribute("name"),null!=b)){y=y.toLowerCase();var q=b.replace(/ /g,"_");m&&mxStencilRegistry.addStencil(y+q.toLowerCase(),new mxStencil(t));if(null!=f){var B=t.getAttribute("w"),
+I=t.getAttribute("h");B=null==B?80:parseInt(B,10);I=null==I?80:parseInt(I,10);f(y,q,b,B,I)}}t=t.nextSibling}}};
+"undefined"!==typeof mxVertexHandler&&function(){function b(){var C=document.createElement("div");C.className="geHint";C.style.whiteSpace="nowrap";C.style.position="absolute";return C}function f(C,Q){switch(Q){case mxConstants.POINTS:return C;case mxConstants.MILLIMETERS:return(C/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(C/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(C/mxConstants.PIXELS_PER_INCH).toFixed(3)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=50;mxConstants.HIGHLIGHT_SIZE=
5;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#707070" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.resizeImage=Graph.createSvgImage(10,10,'<path d="Z" stroke="#C0C0C0" stroke-width="1" fill="none"/>').src;
-mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(B){return!mxEvent.isAltDown(B)||mxEvent.isShiftDown(B)};var l=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(B){return l.apply(this,arguments)||this.graph.isTableRow(B)||this.graph.isTableCell(B)};var u=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=
-function(B){return u.apply(this,arguments)||this.graph.isEdgeIgnored(B)};var y=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(B){return this.graph.isCloneEvent(B)!=y.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var B=new mxEllipse(null,this.highlightColor,this.highlightColor,0);B.opacity=mxConstants.HIGHLIGHT_OPACITY;return B};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=
-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(B){B=this.graph.createCurrentEdgeStyle();B=this.graph.createEdge(null,null,null,null,null,B);B=new mxCellState(this.graph.view,B,this.graph.getCellStyle(B));for(var Q in this.graph.currentEdgeStyle)B.style[Q]=this.graph.currentEdgeStyle[Q];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var X=JSON.parse(R);for(Q in X)B.style[Q]=X[Q]}catch(ia){}}B.style=this.graph.postProcessCellStyle(B.cell,B.style);return B};
-var q=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var B=q.apply(this,arguments);B.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return B};mxConnectionHandler.prototype.updatePreview=function(B){};var C=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=C.apply(this,arguments),Q=B.getCell;B.getCell=mxUtils.bind(this,function(R){var X=Q.apply(this,arguments);this.error=null;return X});
-return B};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var B="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",Q="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<Q.length;R++)null!=
-this.currentEdgeStyle[Q[R]]&&(B+=Q[R]+"="+this.currentEdgeStyle[Q[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?B+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(B+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?B+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(B+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
-";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(B+="elbow="+this.currentEdgeStyle.elbow+";");return B=null!=this.currentEdgeStyle.html?B+("html="+this.currentEdgeStyle.html+";"):B+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var B=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=
-B&&(new mxCodec(B.ownerDocument)).decode(B,this.getStylesheet())};Graph.prototype.createCellLookup=function(B,Q){Q=null!=Q?Q:{};for(var R=0;R<B.length;R++){var X=B[R];Q[mxObjectIdentity.get(X)]=X.getId();for(var ia=this.model.getChildCount(X),ja=0;ja<ia;ja++)this.createCellLookup([this.model.getChildAt(X,ja)],Q)}return Q};Graph.prototype.createCellMapping=function(B,Q,R){R=null!=R?R:{};for(var X in B){var ia=Q[X];null==R[ia]&&(R[ia]=B[X].getId()||"")}return R};Graph.prototype.importGraphModel=function(B,
-Q,R,X){Q=null!=Q?Q:0;R=null!=R?R:0;var ia=new mxCodec(B.ownerDocument),ja=new mxGraphModel;ia.decode(B,ja);B=[];ia={};var pa={},xa=ja.getChildren(this.cloneCell(ja.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ra=this.createCellLookup([ja.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ja=0;ja<xa.length;ja++)ua=this.model.getChildren(this.moveCells([xa[ja]],Q,R,!1,this.model.getRoot())[0]),null!=ua&&(B=B.concat(ua));else{var ua=
-ja.getChildren(xa[0]);null!=ua&&(B=this.moveCells(ua,Q,R,!1,this.getDefaultParent()),pa[ja.getChildAt(ja.root,0).getId()]=this.getDefaultParent().getId())}if(null!=B&&(this.createCellMapping(ia,ra,pa),this.updateCustomLinks(pa,B),X)){this.isGridEnabled()&&(Q=this.snap(Q),R=this.snap(R));var Ka=this.getBoundingBoxFromGeometry(B,!0);null!=Ka&&this.moveCells(B,Q-Ka.x,R-Ka.y)}}finally{this.model.endUpdate()}}return B};Graph.prototype.encodeCells=function(B){for(var Q={},R=this.cloneCells(B,null,Q),X=
-new mxDictionary,ia=0;ia<B.length;ia++)X.put(B[ia],!0);var ja=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ia=0;ia<R.length;ia++){pa.add(xa,R[ia]);var ra=this.view.getState(B[ia]);if(null!=ra){var ua=this.getCellGeometry(R[ia]);null!=ua&&ua.relative&&!this.model.isEdge(B[ia])&&null==X.get(this.model.getParent(B[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ra.x/ra.view.scale-ra.view.translate.x,ua.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(Q,
-this.createCellLookup(B)),R);return ja.encode(pa)};Graph.prototype.isSwimlane=function(B,Q){var R=null;null==B||this.model.isEdge(B)||this.model.getParent(B)==this.model.getRoot()||(R=this.getCurrentCellStyle(B,Q)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var J=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(B){return null!=B&&J.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellEditable(this.model.getParent(B)):
-!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(B){return null!=B&&S.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellMovable(this.model.getParent(B)):!0:!1};var D=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(B){var Q=this.model.getParent(B);if(null!=Q){var R=this.getCurrentCellStyle(Q);if(null!=R.expand)return"0"!=R.expand}return D.apply(this,arguments)&&(null==Q||!this.isTable(Q))};var P=Graph.prototype.splitEdge;
-Graph.prototype.splitEdge=function(B,Q,R,X,ia,ja,pa,xa){null==xa&&(xa=this.model.getParent(B),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ja,pa,null,!0,!1));R=null;this.model.beginUpdate();try{var ra=this.getCellGeometry(B);if(null!=ra&&null!=ra.points&&0<ra.points.length&&1==Q.length&&this.model.isVertex(Q[0])){var ua=this.getCellGeometry(Q[0]);if(null!=ua&&!ua.relative){var Ka=new mxRectangle(ua.x+X,ua.y+ia,ua.width,ua.height),Va=ra.points;ua=[];for(var Oa=0;Oa<Va.length;Oa++)Ka.intersectsPoint(Va[Oa].x,
-Va[Oa].y)||ua.push(Va[Oa]);ua.length<Va.length&&(ra=ra.clone(),ra.points=ua,this.model.setGeometry(B,ra))}}R=P.apply(this,[B,Q,R,X,ia,ja,pa,xa]);this.model.setValue(R,"");var Ta=this.getChildCells(R,!0);for(Oa=0;Oa<Ta.length;Oa++)ra=this.getCellGeometry(Ta[Oa]),null!=ra&&ra.relative&&0<ra.x&&this.model.remove(Ta[Oa]);var Za=this.getChildCells(B,!0);for(Oa=0;Oa<Za.length;Oa++)ra=this.getCellGeometry(Za[Oa]),null!=ra&&ra.relative&&0>=ra.x&&this.model.remove(Za[Oa]);var Pa=this.model.getTerminal(R,!1);
-if(null!=Pa){var Ra=this.getCurrentCellStyle(Pa);null!=Ra&&"1"==Ra.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[B]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(B,Q,R){if(Q||R)c.apply(this,arguments);else{var X=this.getSelectionCell(),ia=null,ja=[],pa=
-mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ja.push(xa),xa==X)ia=ja.length-1;else if(B&&null==X&&0<ja.length||null!=ia&&B&&ja.length>ia||!B&&0<ia)return;for(var ra=0;ra<this.model.getChildCount(xa);ra++)pa(this.model.getChildAt(xa,ra))});pa(this.model.root);0<ja.length&&(ia=null!=ia?mxUtils.mod(ia+(B?1:-1),ja.length):0,this.setSelectionCell(ja[ia]))}};Graph.prototype.swapShapes=function(B,Q){if(this.model.isVertex(B)&&this.model.isVertex(Q)&&
-2==this.getMovableCells([B,Q]).length){var R=this.getCellGeometry(B),X=this.getCellGeometry(Q);if(null!=R&&null!=X){var ia=R.clone(),ja=X.clone();this.model.beginUpdate();try{ia.x=X.getCenterX()-R.width/2,ia.y=X.getCenterY()-R.height/2,ja.x=R.getCenterX()-X.width/2,ja.y=R.getCenterY()-X.height/2,this.model.setGeometry(B,ia),this.model.setGeometry(Q,ja)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(B,Q,R,X,ia,ja,pa){pa=null!=pa?pa:{};if(this.isTable(ia)){for(var xa=
-[],ra=0;ra<B.length;ra++)this.isTable(B[ra])?xa=xa.concat(this.model.getChildCells(B[ra],!0).reverse()):xa.push(B[ra]);B=xa}this.model.beginUpdate();try{xa=[];for(ra=0;ra<B.length;ra++)if(null!=ia&&this.isTableRow(B[ra])){var ua=this.model.getParent(B[ra]),Ka=this.getCellGeometry(B[ra]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Ka&&this.isTable(ua)&&this.isTable(ia)&&(X||ua!=ia)){if(!X){var Va=this.getCellGeometry(ua);null!=Va&&(Va=Va.clone(),Va.height-=Ka.height,this.model.setGeometry(ua,
-Va))}Va=this.getCellGeometry(ia);null!=Va&&(Va=Va.clone(),Va.height+=Ka.height,this.model.setGeometry(ia,Va));var Oa=this.model.getChildCells(ia,!0);if(0<Oa.length){B[ra]=X?this.cloneCell(B[ra]):B[ra];var Ta=this.model.getChildCells(B[ra],!0),Za=this.model.getChildCells(Oa[0],!0),Pa=Za.length-Ta.length;if(0<Pa)for(var Ra=0;Ra<Pa;Ra++){var fb=this.cloneCell(Ta[Ta.length-1]);null!=fb&&(fb.value="",this.model.add(B[ra],fb))}else if(0>Pa)for(Ra=0;Ra>Pa;Ra--)this.model.remove(Ta[Ta.length+Ra-1]);Ta=this.model.getChildCells(B[ra],
-!0);for(Ra=0;Ra<Za.length;Ra++){var eb=this.getCellGeometry(Za[Ra]),bb=this.getCellGeometry(Ta[Ra]);null!=eb&&null!=bb&&(bb=bb.clone(),bb.width=eb.width,this.model.setGeometry(Ta[Ra],bb))}}}}var db=g.apply(this,arguments);for(ra=0;ra<xa.length;ra++)!X&&this.model.contains(xa[ra])&&0==this.model.getChildCount(xa[ra])&&this.model.remove(xa[ra]);X&&this.updateCustomLinks(this.createCellMapping(pa,this.createCellLookup(B)),db)}finally{this.model.endUpdate()}return db};var m=Graph.prototype.removeCells;
-Graph.prototype.removeCells=function(B,Q){var R=[];this.model.beginUpdate();try{for(var X=0;X<B.length;X++)if(this.isTableCell(B[X])){var ia=this.model.getParent(B[X]),ja=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ja)?0>mxUtils.indexOf(B,ja)&&0>mxUtils.indexOf(R,ja)&&R.push(ja):this.labelChanged(B[X],"")}else{if(this.isTableRow(B[X])&&(ja=this.model.getParent(B[X]),0>mxUtils.indexOf(B,ja)&&0>mxUtils.indexOf(R,ja))){for(var pa=this.model.getChildCells(ja,
-!0),xa=0,ra=0;ra<pa.length;ra++)0<=mxUtils.indexOf(B,pa[ra])&&xa++;xa==pa.length&&R.push(ja)}R.push(B[X])}R=m.apply(this,[R,Q])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(B,Q,R){R=null!=R?R:new Graph;for(var X=0;X<Q.length;X++)null!=Q[X]&&R.updateCustomLinksForCell(B,Q[X],R)};Graph.prototype.updateCustomLinksForCell=function(B,Q){this.doUpdateCustomLinksForCell(B,Q);for(var R=this.model.getChildCount(Q),X=0;X<R;X++)this.updateCustomLinksForCell(B,this.model.getChildAt(Q,
-X))};Graph.prototype.doUpdateCustomLinksForCell=function(B,Q){};Graph.prototype.getAllConnectionConstraints=function(B,Q){if(null!=B){Q=mxUtils.getValue(B.style,"points",null);if(null!=Q){B=[];try{var R=JSON.parse(Q);for(Q=0;Q<R.length;Q++){var X=R[Q];B.push(new mxConnectionConstraint(new mxPoint(X[0],X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(ja){}return B}if(null!=B.shape&&null!=B.shape.bounds){X=B.shape.direction;Q=B.shape.bounds;var ia=B.shape.scale;R=Q.width/
-ia;Q=Q.height/ia;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=R,R=Q,Q=X;Q=B.shape.getConstraints(B.style,R,Q);if(null!=Q)return Q;if(null!=B.shape.stencil&&null!=B.shape.stencil.constraints)return B.shape.stencil.constraints;if(null!=B.shape.constraints)return B.shape.constraints}}return null};Graph.prototype.flipEdge=function(B){if(null!=B){var Q=this.getCurrentCellStyle(B);Q=mxUtils.getValue(Q,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?
-mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,Q,[B])}};Graph.prototype.isValidRoot=function(B){for(var Q=this.model.getChildCount(B),R=0,X=0;X<Q;X++){var ia=this.model.getChildAt(B,X);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||R++)}return 0<R||this.isContainer(B)};Graph.prototype.isValidDropTarget=function(B,Q,R){for(var X=this.getCurrentCellStyle(B),ia=!0,ja=!0,pa=0;pa<Q.length&&ja;pa++)ia=ia&&this.isTable(Q[pa]),
-ja=ja&&this.isTableRow(Q[pa]);return!this.isCellLocked(B)&&(this.isTargetShape(B,Q,R)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(B))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(B))&&!this.isTableRow(B)&&(!this.isTable(B)||ja||ia))};Graph.prototype.createGroupCell=function(){var B=mxGraph.prototype.createGroupCell.apply(this,arguments);B.setStyle("group");return B};Graph.prototype.isExtendParentsOnAdd=function(B){var Q=
-mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(Q&&null!=B&&null!=this.layoutManager){var R=this.model.getParent(B);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(Q=!1))}return Q};Graph.prototype.getPreferredSizeForCell=function(B,Q,R){R=null!=R?R:this.gridEnabled;var X=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=X&&(X.width+=10,X.height+=4,R&&(X.width=this.snap(X.width),X.height=this.snap(X.height)));return X};Graph.prototype.turnShapes=
-function(B,Q){var R=this.getModel(),X=[];R.beginUpdate();try{for(var ia=0;ia<B.length;ia++){var ja=B[ia];if(R.isEdge(ja)){var pa=R.getTerminal(ja,!0),xa=R.getTerminal(ja,!1);R.setTerminal(ja,xa,!0);R.setTerminal(ja,pa,!1);var ra=R.getGeometry(ja);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var ua=ra.getTerminalPoint(!0),Ka=ra.getTerminalPoint(!1);ra.setTerminalPoint(ua,!1);ra.setTerminalPoint(Ka,!0);R.setGeometry(ja,ra);var Va=this.view.getState(ja),Oa=this.view.getState(pa),Ta=
-this.view.getState(xa);if(null!=Va){var Za=null!=Oa?this.getConnectionConstraint(Va,Oa,!0):null,Pa=null!=Ta?this.getConnectionConstraint(Va,Ta,!1):null;this.setConnectionConstraint(ja,pa,!0,Pa);this.setConnectionConstraint(ja,xa,!1,Za);var Ra=mxUtils.getValue(Va.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Va.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ja]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-Ra,[ja])}X.push(ja)}}else if(R.isVertex(ja)&&(ra=this.getCellGeometry(ja),null!=ra)){if(!(this.isTable(ja)||this.isTableRow(ja)||this.isTableCell(ja)||this.isSwimlane(ja))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var fb=ra.width;ra.width=ra.height;ra.height=fb;R.setGeometry(ja,ra)}var eb=this.view.getState(ja);if(null!=eb){var bb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],db=mxUtils.getValue(eb.style,
-mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,bb[mxUtils.mod(mxUtils.indexOf(bb,db)+(Q?-1:1),bb.length)],[ja])}X.push(ja)}}}finally{R.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(B){if(null!=B&&null!=B.fgNode)for(B=B.fgNode.firstChild;null!=B;){if("text"==B.nodeName&&"1"==B.getAttribute("placeholders"))return!0;B=B.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(B){if(B instanceof
-mxGeometryChange&&(this.isTableCell(B.cell)||this.isTableRow(B.cell))&&(null==B.previous&&null!=B.geometry||null!=B.previous&&!B.previous.equals(B.geometry))){var Q=B.cell;this.isTableCell(Q)&&(Q=this.model.getParent(Q));this.isTableRow(Q)&&(Q=this.model.getParent(Q));var R=this.view.getState(Q);null!=R&&null!=R.shape&&(this.view.invalidate(Q),R.shape.bounds=null)}n.apply(this,arguments);B instanceof mxValueChange&&null!=B.cell&&null!=B.cell.value&&"object"==typeof B.cell.value&&this.invalidateDescendantsWithPlaceholders(B.cell)};
-Graph.prototype.invalidateDescendantsWithPlaceholders=function(B){B=this.model.getDescendants(B);if(0<B.length)for(var Q=0;Q<B.length;Q++){var R=this.view.getState(B[Q]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(B[Q]):this.isReplacePlaceholders(B[Q])&&this.view.invalidate(B[Q],!1,!1)}};Graph.prototype.replaceElement=function(B,Q){Q=B.ownerDocument.createElement(null!=Q?Q:"span");for(var R=Array.prototype.slice.call(B.attributes);attr=
-R.pop();)Q.setAttribute(attr.nodeName,attr.nodeValue);Q.innerHTML=B.innerHTML;B.parentNode.replaceChild(Q,B)};Graph.prototype.processElements=function(B,Q){if(null!=B){B=B.getElementsByTagName("*");for(var R=0;R<B.length;R++)null!=B[R]&&Q(B[R])}};Graph.prototype.updateLabelElements=function(B,Q,R){B=null!=B?B:this.getSelectionCells();for(var X=document.createElement("div"),ia=0;ia<B.length;ia++){var ja=this.getCurrentCellStyle(B[ia]);if(null!=ja&&"1"==ja.html&&(ja=this.convertValueToString(B[ia]),
-null!=ja&&0<ja.length)){X.innerHTML=Graph.sanitizeHtml(ja);for(var pa=X.getElementsByTagName(null!=R?R:"*"),xa=0;xa<pa.length;xa++)Q(pa[xa]);X.innerHTML!=ja&&this.cellLabelChanged(B[ia],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(B,Q,R){Q=Graph.zapGremlins(Q);this.model.beginUpdate();try{if(null!=B.value&&"object"==typeof B.value){if(this.isReplacePlaceholders(B)&&null!=B.getAttribute("placeholder"))for(var X=B.getAttribute("placeholder"),ia=B;null!=ia;){if(ia==this.model.getRoot()||
-null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(X)){this.setAttributeForCell(ia,X,Q);break}ia=this.model.getParent(ia)}var ja=B.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ja.hasAttribute("label_"+Graph.diagramLanguage)?ja.setAttribute("label_"+Graph.diagramLanguage,Q):ja.setAttribute("label",Q);Q=ja}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(B){if(null!=B){for(var Q=new mxDictionary,
-R=0;R<B.length;R++)Q.put(B[R],!0);var X=[];for(R=0;R<B.length;R++){var ia=this.model.getParent(B[R]);null==ia||Q.get(ia)||(Q.put(ia,!0),X.push(ia))}for(R=0;R<X.length;R++)if(ia=this.view.getState(X[R]),null!=ia&&(this.model.isEdge(ia.cell)||this.model.isVertex(ia.cell))&&this.isCellDeletable(ia.cell)&&this.isTransparentState(ia)){for(var ja=!0,pa=0;pa<this.model.getChildCount(ia.cell)&&ja;pa++)Q.get(this.model.getChildAt(ia.cell,pa))||(ja=!1);ja&&B.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(B){for(var Q=[],R=0;R<B.length;R++)this.isCellDeletable(B[R])&&this.isTransparentState(this.view.getState(B[R]))&&Q.push(B[R]);B=Q;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(B,Q){this.setAttributeForCell(B,"link",Q)};Graph.prototype.setTooltipForCell=function(B,Q){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(B.value)&&B.value.hasAttribute("tooltip_"+
-Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(B,R,Q)};Graph.prototype.getAttributeForCell=function(B,Q,R){B=null!=B.value&&"object"===typeof B.value?B.value.getAttribute(Q):null;return null!=B?B:R};Graph.prototype.setAttributeForCell=function(B,Q,R){if(null!=B.value&&"object"==typeof B.value)var X=B.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),X.setAttribute("label",B.value||"");null!=R?X.setAttribute(Q,R):X.removeAttribute(Q);
-this.model.setValue(B,X)};Graph.prototype.isTargetShape=function(B,Q,R){B=mxUtils.getValue(this.getCurrentCellStyle(B),mxConstants.STYLE_SHAPE,"");for(R=0;R<Q.length;R++){var X=mxUtils.getValue(this.getCurrentCellStyle(Q[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(X,B))return!0}return!1};var x=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(B,Q,R,X){if(mxEvent.isAltDown(Q))return null;for(var ia=0;ia<B.length;ia++){var ja=this.model.getParent(B[ia]);if(this.model.isEdge(ja)&&
-0>mxUtils.indexOf(B,ja))return null}ja=x.apply(this,arguments);var pa=!0;for(ia=0;ia<B.length&&pa;ia++)pa=pa&&this.isTableRow(B[ia]);pa&&(this.isTableCell(ja)&&(ja=this.model.getParent(ja)),this.isTableRow(ja)&&(ja=this.model.getParent(ja)),this.isTable(ja)||(ja=null));return ja};Graph.prototype.click=function(B){mxGraph.prototype.click.call(this,B);this.firstClickState=B.getState();this.firstClickSource=B.getSource()};Graph.prototype.dblClick=function(B,Q){this.isEnabled()&&(Q=this.insertTextForEvent(B,
-Q),mxGraph.prototype.dblClick.call(this,B,Q))};Graph.prototype.insertTextForEvent=function(B,Q){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(B),mxEvent.getClientY(B));if(null!=B&&!this.model.isVertex(Q)){var X=this.model.isEdge(Q)?this.view.getState(Q):null,ia=mxEvent.getSource(B);this.firstClickState!=X||this.firstClickSource!=ia||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(B)))||
-(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==X&&(X=this.view.getState(this.getCellAt(R.x,R.y))),Q=this.addText(R.x,R.y,X))}return Q};Graph.prototype.getInsertPoint=function(B){B=this.getGridSize();var Q=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),
-ia=this.getPageSize();Q=Math.max(Q,X.x*ia.width);R=Math.max(R,X.y*ia.height)}return new mxPoint(this.snap(Q+B),this.snap(R+B))};Graph.prototype.getFreeInsertPoint=function(B){var Q=this.view,R=this.getGraphBounds(),X=this.getInsertPoint(B);B=this.snap(Math.round(Math.max(X.x,R.x/Q.scale-Q.translate.x+(0==R.width?2*this.gridSize:0))));Q=this.snap(Math.round(Math.max(X.y,(R.y+R.height)/Q.scale-Q.translate.y+2*this.gridSize)));return new mxPoint(B,Q)};Graph.prototype.getCenterInsertPoint=function(B){B=
-null!=B?B:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-B.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-B.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-B.width/2)),this.snap(Math.round(this.container.clientHeight/
-2/this.view.scale-this.view.translate.y-B.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(B,Q){B=null!=B?B:"";null!=Q&&(0<B.length&&";"!=B.charAt(B.length-1)&&(B+=";"),B+="fontSize="+Q+";");return B};Graph.prototype.addText=function(B,Q,R){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,0,0,0);X.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){X.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
-this.edgeFontSize);X.geometry.relative=!0;X.connectable=!1;var ia=this.view.getRelativePoint(R,B,Q);X.geometry.x=Math.round(1E4*ia.x)/1E4;X.geometry.y=Math.round(ia.y);X.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(R,X.geometry);var ja=this.view.scale;X.geometry.offset=new mxPoint(Math.round((B-ia.x)/ja),Math.round((Q-ia.y)/ja))}else ia=this.view.translate,X.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),X.geometry.width=
-40,X.geometry.height=20,X.geometry.x=Math.round(B/this.view.scale)-ia.x-(null!=R?R.origin.x:0),X.geometry.y=Math.round(Q/this.view.scale)-ia.y-(null!=R?R.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(B,Q,R){var X=mxUtils.bind(this,function(){var ra=this.container.getElementsByTagName("a");
-if(null!=ra)for(var ua=0;ua<ra.length;ua++){var Ka=this.getAbsoluteUrl(ra[ua].getAttribute("href"));null!=Ka&&(ra[ua].setAttribute("rel",this.linkRelation),ra[ua].setAttribute("href",Ka),null!=Q&&mxEvent.addGestureListeners(ra[ua],null,null,Q))}});this.model.addListener(mxEvent.CHANGE,X);X();var ia=this.container.style.cursor,ja=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=B&&""!=B&&B!=mxConstants.NONE?new mxCellHighlight(pa,B,4):null,startX:0,
+mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(C){return!mxEvent.isAltDown(C)||mxEvent.isShiftDown(C)};var m=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(C){return m.apply(this,arguments)||this.graph.isTableRow(C)||this.graph.isTableCell(C)};var t=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=
+function(C){return t.apply(this,arguments)||this.graph.isEdgeIgnored(C)};var y=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(C){return this.graph.isCloneEvent(C)!=y.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var C=new mxEllipse(null,this.highlightColor,this.highlightColor,0);C.opacity=mxConstants.HIGHLIGHT_OPACITY;return C};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=
+"crosshair";mxConnectionHandler.prototype.createEdgeState=function(C){C=this.graph.createCurrentEdgeStyle();C=this.graph.createEdge(null,null,null,null,null,C);C=new mxCellState(this.graph.view,C,this.graph.getCellStyle(C));for(var Q in this.graph.currentEdgeStyle)C.style[Q]=this.graph.currentEdgeStyle[Q];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var X=JSON.parse(R);for(Q in X)C.style[Q]=X[Q]}catch(ha){}}C.style=this.graph.postProcessCellStyle(C.cell,C.style);return C};
+var q=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var C=q.apply(this,arguments);C.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return C};mxConnectionHandler.prototype.updatePreview=function(C){};var B=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var C=B.apply(this,arguments),Q=C.getCell;C.getCell=mxUtils.bind(this,function(R){var X=Q.apply(this,arguments);this.error=null;return X});
+return C};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var C="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",Q="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<Q.length;R++)null!=
+this.currentEdgeStyle[Q[R]]&&(C+=Q[R]+"="+this.currentEdgeStyle[Q[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?C+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(C+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?C+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(C+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(C+="elbow="+this.currentEdgeStyle.elbow+";");return C=null!=this.currentEdgeStyle.html?C+("html="+this.currentEdgeStyle.html+";"):C+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var C=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=
+C&&(new mxCodec(C.ownerDocument)).decode(C,this.getStylesheet())};Graph.prototype.createCellLookup=function(C,Q){Q=null!=Q?Q:{};for(var R=0;R<C.length;R++){var X=C[R];Q[mxObjectIdentity.get(X)]=X.getId();for(var ha=this.model.getChildCount(X),ia=0;ia<ha;ia++)this.createCellLookup([this.model.getChildAt(X,ia)],Q)}return Q};Graph.prototype.createCellMapping=function(C,Q,R){R=null!=R?R:{};for(var X in C){var ha=Q[X];null==R[ha]&&(R[ha]=C[X].getId()||"")}return R};Graph.prototype.importGraphModel=function(C,
+Q,R,X){Q=null!=Q?Q:0;R=null!=R?R:0;var ha=new mxCodec(C.ownerDocument),ia=new mxGraphModel;ha.decode(C,ia);C=[];ha={};var pa={},xa=ia.getChildren(this.cloneCell(ia.root,this.isCloneInvalidEdges(),ha));if(null!=xa){var ra=this.createCellLookup([ia.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ia=0;ia<xa.length;ia++)ua=this.model.getChildren(this.moveCells([xa[ia]],Q,R,!1,this.model.getRoot())[0]),null!=ua&&(C=C.concat(ua));else{var ua=
+ia.getChildren(xa[0]);null!=ua&&(C=this.moveCells(ua,Q,R,!1,this.getDefaultParent()),pa[ia.getChildAt(ia.root,0).getId()]=this.getDefaultParent().getId())}if(null!=C&&(this.createCellMapping(ha,ra,pa),this.updateCustomLinks(pa,C),X)){this.isGridEnabled()&&(Q=this.snap(Q),R=this.snap(R));var Ka=this.getBoundingBoxFromGeometry(C,!0);null!=Ka&&this.moveCells(C,Q-Ka.x,R-Ka.y)}}finally{this.model.endUpdate()}}return C};Graph.prototype.encodeCells=function(C){for(var Q={},R=this.cloneCells(C,null,Q),X=
+new mxDictionary,ha=0;ha<C.length;ha++)X.put(C[ha],!0);var ia=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ha=0;ha<R.length;ha++){pa.add(xa,R[ha]);var ra=this.view.getState(C[ha]);if(null!=ra){var ua=this.getCellGeometry(R[ha]);null!=ua&&ua.relative&&!this.model.isEdge(C[ha])&&null==X.get(this.model.getParent(C[ha]))&&(ua.offset=null,ua.relative=!1,ua.x=ra.x/ra.view.scale-ra.view.translate.x,ua.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(Q,
+this.createCellLookup(C)),R);return ia.encode(pa)};Graph.prototype.isSwimlane=function(C,Q){var R=null;null==C||this.model.isEdge(C)||this.model.getParent(C)==this.model.getRoot()||(R=this.getCurrentCellStyle(C,Q)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var I=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(C){return null!=C&&I.apply(this,arguments)?this.isTableCell(C)||this.isTableRow(C)?this.isCellEditable(this.model.getParent(C)):
+!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(C){return null!=C&&S.apply(this,arguments)?this.isTableCell(C)||this.isTableRow(C)?this.isCellMovable(this.model.getParent(C)):!0:!1};var D=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(C){var Q=this.model.getParent(C);if(null!=Q){var R=this.getCurrentCellStyle(Q);if(null!=R.expand)return"0"!=R.expand}return D.apply(this,arguments)&&(null==Q||!this.isTable(Q))};var P=Graph.prototype.splitEdge;
+Graph.prototype.splitEdge=function(C,Q,R,X,ha,ia,pa,xa){null==xa&&(xa=this.model.getParent(C),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ia,pa,null,!0,!1));R=null;this.model.beginUpdate();try{var ra=this.getCellGeometry(C);if(null!=ra&&null!=ra.points&&0<ra.points.length&&1==Q.length&&this.model.isVertex(Q[0])){var ua=this.getCellGeometry(Q[0]);if(null!=ua&&!ua.relative){var Ka=new mxRectangle(ua.x+X,ua.y+ha,ua.width,ua.height),Va=ra.points;ua=[];for(var Oa=0;Oa<Va.length;Oa++)Ka.intersectsPoint(Va[Oa].x,
+Va[Oa].y)||ua.push(Va[Oa]);ua.length<Va.length&&(ra=ra.clone(),ra.points=ua,this.model.setGeometry(C,ra))}}R=P.apply(this,[C,Q,R,X,ha,ia,pa,xa]);this.model.setValue(R,"");var Ta=this.getChildCells(R,!0);for(Oa=0;Oa<Ta.length;Oa++)ra=this.getCellGeometry(Ta[Oa]),null!=ra&&ra.relative&&0<ra.x&&this.model.remove(Ta[Oa]);var Za=this.getChildCells(C,!0);for(Oa=0;Oa<Za.length;Oa++)ra=this.getCellGeometry(Za[Oa]),null!=ra&&ra.relative&&0>=ra.x&&this.model.remove(Za[Oa]);var Pa=this.model.getTerminal(R,!1);
+if(null!=Pa){var Ra=this.getCurrentCellStyle(Pa);null!=Ra&&"1"==Ra.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[C]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[C]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(C,Q,R){if(Q||R)c.apply(this,arguments);else{var X=this.getSelectionCell(),ha=null,ia=[],pa=
+mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ia.push(xa),xa==X)ha=ia.length-1;else if(C&&null==X&&0<ia.length||null!=ha&&C&&ia.length>ha||!C&&0<ha)return;for(var ra=0;ra<this.model.getChildCount(xa);ra++)pa(this.model.getChildAt(xa,ra))});pa(this.model.root);0<ia.length&&(ha=null!=ha?mxUtils.mod(ha+(C?1:-1),ia.length):0,this.setSelectionCell(ia[ha]))}};Graph.prototype.swapShapes=function(C,Q){if(this.model.isVertex(C)&&this.model.isVertex(Q)&&
+2==this.getMovableCells([C,Q]).length){var R=this.getCellGeometry(C),X=this.getCellGeometry(Q);if(null!=R&&null!=X){var ha=R.clone(),ia=X.clone();this.model.beginUpdate();try{ha.x=X.getCenterX()-R.width/2,ha.y=X.getCenterY()-R.height/2,ia.x=R.getCenterX()-X.width/2,ia.y=R.getCenterY()-X.height/2,this.model.setGeometry(C,ha),this.model.setGeometry(Q,ia)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(C,Q,R,X,ha,ia,pa){pa=null!=pa?pa:{};if(this.isTable(ha)){for(var xa=
+[],ra=0;ra<C.length;ra++)this.isTable(C[ra])?xa=xa.concat(this.model.getChildCells(C[ra],!0).reverse()):xa.push(C[ra]);C=xa}this.model.beginUpdate();try{xa=[];for(ra=0;ra<C.length;ra++)if(null!=ha&&this.isTableRow(C[ra])){var ua=this.model.getParent(C[ra]),Ka=this.getCellGeometry(C[ra]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Ka&&this.isTable(ua)&&this.isTable(ha)&&(X||ua!=ha)){if(!X){var Va=this.getCellGeometry(ua);null!=Va&&(Va=Va.clone(),Va.height-=Ka.height,this.model.setGeometry(ua,
+Va))}Va=this.getCellGeometry(ha);null!=Va&&(Va=Va.clone(),Va.height+=Ka.height,this.model.setGeometry(ha,Va));var Oa=this.model.getChildCells(ha,!0);if(0<Oa.length){C[ra]=X?this.cloneCell(C[ra]):C[ra];var Ta=this.model.getChildCells(C[ra],!0),Za=this.model.getChildCells(Oa[0],!0),Pa=Za.length-Ta.length;if(0<Pa)for(var Ra=0;Ra<Pa;Ra++){var fb=this.cloneCell(Ta[Ta.length-1]);null!=fb&&(fb.value="",this.model.add(C[ra],fb))}else if(0>Pa)for(Ra=0;Ra>Pa;Ra--)this.model.remove(Ta[Ta.length+Ra-1]);Ta=this.model.getChildCells(C[ra],
+!0);for(Ra=0;Ra<Za.length;Ra++){var eb=this.getCellGeometry(Za[Ra]),bb=this.getCellGeometry(Ta[Ra]);null!=eb&&null!=bb&&(bb=bb.clone(),bb.width=eb.width,this.model.setGeometry(Ta[Ra],bb))}}}}var db=g.apply(this,arguments);for(ra=0;ra<xa.length;ra++)!X&&this.model.contains(xa[ra])&&0==this.model.getChildCount(xa[ra])&&this.model.remove(xa[ra]);X&&this.updateCustomLinks(this.createCellMapping(pa,this.createCellLookup(C)),db)}finally{this.model.endUpdate()}return db};var l=Graph.prototype.removeCells;
+Graph.prototype.removeCells=function(C,Q){var R=[];this.model.beginUpdate();try{for(var X=0;X<C.length;X++)if(this.isTableCell(C[X])){var ha=this.model.getParent(C[X]),ia=this.model.getParent(ha);1==this.model.getChildCount(ha)&&1==this.model.getChildCount(ia)?0>mxUtils.indexOf(C,ia)&&0>mxUtils.indexOf(R,ia)&&R.push(ia):this.labelChanged(C[X],"")}else{if(this.isTableRow(C[X])&&(ia=this.model.getParent(C[X]),0>mxUtils.indexOf(C,ia)&&0>mxUtils.indexOf(R,ia))){for(var pa=this.model.getChildCells(ia,
+!0),xa=0,ra=0;ra<pa.length;ra++)0<=mxUtils.indexOf(C,pa[ra])&&xa++;xa==pa.length&&R.push(ia)}R.push(C[X])}R=l.apply(this,[R,Q])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(C,Q,R){R=null!=R?R:new Graph;for(var X=0;X<Q.length;X++)null!=Q[X]&&R.updateCustomLinksForCell(C,Q[X],R)};Graph.prototype.updateCustomLinksForCell=function(C,Q){this.doUpdateCustomLinksForCell(C,Q);for(var R=this.model.getChildCount(Q),X=0;X<R;X++)this.updateCustomLinksForCell(C,this.model.getChildAt(Q,
+X))};Graph.prototype.doUpdateCustomLinksForCell=function(C,Q){};Graph.prototype.getAllConnectionConstraints=function(C,Q){if(null!=C){Q=mxUtils.getValue(C.style,"points",null);if(null!=Q){C=[];try{var R=JSON.parse(Q);for(Q=0;Q<R.length;Q++){var X=R[Q];C.push(new mxConnectionConstraint(new mxPoint(X[0],X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(ia){}return C}if(null!=C.shape&&null!=C.shape.bounds){X=C.shape.direction;Q=C.shape.bounds;var ha=C.shape.scale;R=Q.width/
+ha;Q=Q.height/ha;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=R,R=Q,Q=X;Q=C.shape.getConstraints(C.style,R,Q);if(null!=Q)return Q;if(null!=C.shape.stencil&&null!=C.shape.stencil.constraints)return C.shape.stencil.constraints;if(null!=C.shape.constraints)return C.shape.constraints}}return null};Graph.prototype.flipEdge=function(C){if(null!=C){var Q=this.getCurrentCellStyle(C);Q=mxUtils.getValue(Q,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?
+mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,Q,[C])}};Graph.prototype.isValidRoot=function(C){for(var Q=this.model.getChildCount(C),R=0,X=0;X<Q;X++){var ha=this.model.getChildAt(C,X);this.model.isVertex(ha)&&(ha=this.getCellGeometry(ha),null==ha||ha.relative||R++)}return 0<R||this.isContainer(C)};Graph.prototype.isValidDropTarget=function(C,Q,R){for(var X=this.getCurrentCellStyle(C),ha=!0,ia=!0,pa=0;pa<Q.length&&ia;pa++)ha=ha&&this.isTable(Q[pa]),
+ia=ia&&this.isTableRow(Q[pa]);return!this.isCellLocked(C)&&(this.isTargetShape(C,Q,R)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(C))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(C))&&!this.isTableRow(C)&&(!this.isTable(C)||ia||ha))};Graph.prototype.createGroupCell=function(){var C=mxGraph.prototype.createGroupCell.apply(this,arguments);C.setStyle("group");return C};Graph.prototype.isExtendParentsOnAdd=function(C){var Q=
+mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(Q&&null!=C&&null!=this.layoutManager){var R=this.model.getParent(C);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(Q=!1))}return Q};Graph.prototype.getPreferredSizeForCell=function(C,Q,R){R=null!=R?R:this.gridEnabled;var X=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=X&&(X.width+=10,X.height+=4,R&&(X.width=this.snap(X.width),X.height=this.snap(X.height)));return X};Graph.prototype.turnShapes=
+function(C,Q){var R=this.getModel(),X=[];R.beginUpdate();try{for(var ha=0;ha<C.length;ha++){var ia=C[ha];if(R.isEdge(ia)){var pa=R.getTerminal(ia,!0),xa=R.getTerminal(ia,!1);R.setTerminal(ia,xa,!0);R.setTerminal(ia,pa,!1);var ra=R.getGeometry(ia);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var ua=ra.getTerminalPoint(!0),Ka=ra.getTerminalPoint(!1);ra.setTerminalPoint(ua,!1);ra.setTerminalPoint(Ka,!0);R.setGeometry(ia,ra);var Va=this.view.getState(ia),Oa=this.view.getState(pa),Ta=
+this.view.getState(xa);if(null!=Va){var Za=null!=Oa?this.getConnectionConstraint(Va,Oa,!0):null,Pa=null!=Ta?this.getConnectionConstraint(Va,Ta,!1):null;this.setConnectionConstraint(ia,pa,!0,Pa);this.setConnectionConstraint(ia,xa,!1,Za);var Ra=mxUtils.getValue(Va.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Va.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ia]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+Ra,[ia])}X.push(ia)}}else if(R.isVertex(ia)&&(ra=this.getCellGeometry(ia),null!=ra)){if(!(this.isTable(ia)||this.isTableRow(ia)||this.isTableCell(ia)||this.isSwimlane(ia))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var fb=ra.width;ra.width=ra.height;ra.height=fb;R.setGeometry(ia,ra)}var eb=this.view.getState(ia);if(null!=eb){var bb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],db=mxUtils.getValue(eb.style,
+mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,bb[mxUtils.mod(mxUtils.indexOf(bb,db)+(Q?-1:1),bb.length)],[ia])}X.push(ia)}}}finally{R.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(C){if(null!=C&&null!=C.fgNode)for(C=C.fgNode.firstChild;null!=C;){if("text"==C.nodeName&&"1"==C.getAttribute("placeholders"))return!0;C=C.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(C){if(C instanceof
+mxGeometryChange&&(this.isTableCell(C.cell)||this.isTableRow(C.cell))&&(null==C.previous&&null!=C.geometry||null!=C.previous&&!C.previous.equals(C.geometry))){var Q=C.cell;this.isTableCell(Q)&&(Q=this.model.getParent(Q));this.isTableRow(Q)&&(Q=this.model.getParent(Q));var R=this.view.getState(Q);null!=R&&null!=R.shape&&(this.view.invalidate(Q),R.shape.bounds=null)}n.apply(this,arguments);C instanceof mxValueChange&&null!=C.cell&&null!=C.cell.value&&"object"==typeof C.cell.value&&this.invalidateDescendantsWithPlaceholders(C.cell)};
+Graph.prototype.invalidateDescendantsWithPlaceholders=function(C){C=this.model.getDescendants(C);if(0<C.length)for(var Q=0;Q<C.length;Q++){var R=this.view.getState(C[Q]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(C[Q]):this.isReplacePlaceholders(C[Q])&&this.view.invalidate(C[Q],!1,!1)}};Graph.prototype.replaceElement=function(C,Q){Q=C.ownerDocument.createElement(null!=Q?Q:"span");for(var R=Array.prototype.slice.call(C.attributes);attr=
+R.pop();)Q.setAttribute(attr.nodeName,attr.nodeValue);Q.innerHTML=C.innerHTML;C.parentNode.replaceChild(Q,C)};Graph.prototype.processElements=function(C,Q){if(null!=C){C=C.getElementsByTagName("*");for(var R=0;R<C.length;R++)null!=C[R]&&Q(C[R])}};Graph.prototype.updateLabelElements=function(C,Q,R){C=null!=C?C:this.getSelectionCells();for(var X=document.createElement("div"),ha=0;ha<C.length;ha++){var ia=this.getCurrentCellStyle(C[ha]);if(null!=ia&&"1"==ia.html&&(ia=this.convertValueToString(C[ha]),
+null!=ia&&0<ia.length)){X.innerHTML=Graph.sanitizeHtml(ia);for(var pa=X.getElementsByTagName(null!=R?R:"*"),xa=0;xa<pa.length;xa++)Q(pa[xa]);X.innerHTML!=ia&&this.cellLabelChanged(C[ha],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(C,Q,R){Q=Graph.zapGremlins(Q);this.model.beginUpdate();try{if(null!=C.value&&"object"==typeof C.value){if(this.isReplacePlaceholders(C)&&null!=C.getAttribute("placeholder"))for(var X=C.getAttribute("placeholder"),ha=C;null!=ha;){if(ha==this.model.getRoot()||
+null!=ha.value&&"object"==typeof ha.value&&ha.hasAttribute(X)){this.setAttributeForCell(ha,X,Q);break}ha=this.model.getParent(ha)}var ia=C.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ia.hasAttribute("label_"+Graph.diagramLanguage)?ia.setAttribute("label_"+Graph.diagramLanguage,Q):ia.setAttribute("label",Q);Q=ia}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(C){if(null!=C){for(var Q=new mxDictionary,
+R=0;R<C.length;R++)Q.put(C[R],!0);var X=[];for(R=0;R<C.length;R++){var ha=this.model.getParent(C[R]);null==ha||Q.get(ha)||(Q.put(ha,!0),X.push(ha))}for(R=0;R<X.length;R++)if(ha=this.view.getState(X[R]),null!=ha&&(this.model.isEdge(ha.cell)||this.model.isVertex(ha.cell))&&this.isCellDeletable(ha.cell)&&this.isTransparentState(ha)){for(var ia=!0,pa=0;pa<this.model.getChildCount(ha.cell)&&ia;pa++)Q.get(this.model.getChildAt(ha.cell,pa))||(ia=!1);ia&&C.push(ha.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(C){for(var Q=[],R=0;R<C.length;R++)this.isCellDeletable(C[R])&&this.isTransparentState(this.view.getState(C[R]))&&Q.push(C[R]);C=Q;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(C,Q){this.setAttributeForCell(C,"link",Q)};Graph.prototype.setTooltipForCell=function(C,Q){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(C.value)&&C.value.hasAttribute("tooltip_"+
+Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(C,R,Q)};Graph.prototype.getAttributeForCell=function(C,Q,R){C=null!=C.value&&"object"===typeof C.value?C.value.getAttribute(Q):null;return null!=C?C:R};Graph.prototype.setAttributeForCell=function(C,Q,R){if(null!=C.value&&"object"==typeof C.value)var X=C.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),X.setAttribute("label",C.value||"");null!=R?X.setAttribute(Q,R):X.removeAttribute(Q);
+this.model.setValue(C,X)};Graph.prototype.isTargetShape=function(C,Q,R){C=mxUtils.getValue(this.getCurrentCellStyle(C),mxConstants.STYLE_SHAPE,"");for(R=0;R<Q.length;R++){var X=mxUtils.getValue(this.getCurrentCellStyle(Q[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(X,C))return!0}return!1};var x=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(C,Q,R,X){if(mxEvent.isAltDown(Q))return null;for(var ha=0;ha<C.length;ha++){var ia=this.model.getParent(C[ha]);if(this.model.isEdge(ia)&&
+0>mxUtils.indexOf(C,ia))return null}ia=x.apply(this,arguments);var pa=!0;for(ha=0;ha<C.length&&pa;ha++)pa=pa&&this.isTableRow(C[ha]);pa&&(this.isTableCell(ia)&&(ia=this.model.getParent(ia)),this.isTableRow(ia)&&(ia=this.model.getParent(ia)),this.isTable(ia)||(ia=null));return ia};Graph.prototype.click=function(C){mxGraph.prototype.click.call(this,C);this.firstClickState=C.getState();this.firstClickSource=C.getSource()};Graph.prototype.dblClick=function(C,Q){this.isEnabled()&&(Q=this.insertTextForEvent(C,
+Q),mxGraph.prototype.dblClick.call(this,C,Q))};Graph.prototype.insertTextForEvent=function(C,Q){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(C),mxEvent.getClientY(C));if(null!=C&&!this.model.isVertex(Q)){var X=this.model.isEdge(Q)?this.view.getState(Q):null,ha=mxEvent.getSource(C);this.firstClickState!=X||this.firstClickSource!=ha||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(C)))||
+(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&ha==this.view.getCanvas().ownerSVGElement)||(null==X&&(X=this.view.getState(this.getCellAt(R.x,R.y))),Q=this.addText(R.x,R.y,X))}return Q};Graph.prototype.getInsertPoint=function(C){C=this.getGridSize();var Q=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),
+ha=this.getPageSize();Q=Math.max(Q,X.x*ha.width);R=Math.max(R,X.y*ha.height)}return new mxPoint(this.snap(Q+C),this.snap(R+C))};Graph.prototype.getFreeInsertPoint=function(C){var Q=this.view,R=this.getGraphBounds(),X=this.getInsertPoint(C);C=this.snap(Math.round(Math.max(X.x,R.x/Q.scale-Q.translate.x+(0==R.width?2*this.gridSize:0))));Q=this.snap(Math.round(Math.max(X.y,(R.y+R.height)/Q.scale-Q.translate.y+2*this.gridSize)));return new mxPoint(C,Q)};Graph.prototype.getCenterInsertPoint=function(C){C=
+null!=C?C:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-C.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-C.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-C.width/2)),this.snap(Math.round(this.container.clientHeight/
+2/this.view.scale-this.view.translate.y-C.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(C,Q){C=null!=C?C:"";null!=Q&&(0<C.length&&";"!=C.charAt(C.length-1)&&(C+=";"),C+="fontSize="+Q+";");return C};Graph.prototype.addText=function(C,Q,R){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,0,0,0);X.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){X.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
+this.edgeFontSize);X.geometry.relative=!0;X.connectable=!1;var ha=this.view.getRelativePoint(R,C,Q);X.geometry.x=Math.round(1E4*ha.x)/1E4;X.geometry.y=Math.round(ha.y);X.geometry.offset=new mxPoint(0,0);ha=this.view.getPoint(R,X.geometry);var ia=this.view.scale;X.geometry.offset=new mxPoint(Math.round((C-ha.x)/ia),Math.round((Q-ha.y)/ia))}else ha=this.view.translate,X.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),X.geometry.width=
+40,X.geometry.height=20,X.geometry.x=Math.round(C/this.view.scale)-ha.x-(null!=R?R.origin.x:0),X.geometry.y=Math.round(Q/this.view.scale)-ha.y-(null!=R?R.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(C,Q,R){var X=mxUtils.bind(this,function(){var ra=this.container.getElementsByTagName("a");
+if(null!=ra)for(var ua=0;ua<ra.length;ua++){var Ka=this.getAbsoluteUrl(ra[ua].getAttribute("href"));null!=Ka&&(ra[ua].setAttribute("rel",this.linkRelation),ra[ua].setAttribute("href",Ka),null!=Q&&mxEvent.addGestureListeners(ra[ua],null,null,Q))}});this.model.addListener(mxEvent.CHANGE,X);X();var ha=this.container.style.cursor,ia=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=C&&""!=C&&C!=mxConstants.NONE?new mxCellHighlight(pa,C,4):null,startX:0,
startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ra){var ua=ra.sourceState;if(null==ua||null==pa.getLinkForCell(ua.cell))ra=pa.getCellAt(ra.getGraphX(),ra.getGraphY(),null,null,null,function(Ka,Va,Oa){return null==pa.getLinkForCell(Ka.cell)}),ua=null==ua||pa.model.isAncestor(ra,ua.cell)?pa.view.getState(ra):null;ua!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ua,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ra,ua){this.startX=
-ua.getGraphX();this.startY=ua.getGraphY();this.scrollLeft=pa.container.scrollLeft;this.scrollTop=pa.container.scrollTop;null==this.currentLink&&"auto"==pa.container.style.overflow&&(pa.container.style.cursor="move");this.updateCurrentState(ua)},mouseMove:function(ra,ua){if(pa.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-ua.getGraphX()),ua=Math.abs(this.startY-ua.getGraphY()),(ra>ja||ua>ja)&&this.clear());else{for(ra=ua.getSource();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;
+ua.getGraphX();this.startY=ua.getGraphY();this.scrollLeft=pa.container.scrollLeft;this.scrollTop=pa.container.scrollTop;null==this.currentLink&&"auto"==pa.container.style.overflow&&(pa.container.style.cursor="move");this.updateCurrentState(ua)},mouseMove:function(ra,ua){if(pa.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-ua.getGraphX()),ua=Math.abs(this.startY-ua.getGraphY()),(ra>ia||ua>ia)&&this.clear());else{for(ra=ua.getSource();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;
null!=ra?this.clear():(null!=pa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&pa.tooltipHandler.reset(ua,!0,this.currentState),(null==this.currentState||ua.getState()!=this.currentState&&null!=ua.sourceState||!pa.intersects(this.currentState,ua.getGraphX(),ua.getGraphY()))&&this.updateCurrentState(ua))}},mouseUp:function(ra,ua){var Ka=ua.getSource();for(ra=ua.getEvent();null!=Ka&&"a"!=Ka.nodeName.toLowerCase();)Ka=Ka.parentNode;null==Ka&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<
-ja&&Math.abs(this.scrollTop-pa.container.scrollTop)<ja&&(null==ua.sourceState||!ua.isSource(ua.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Ka=pa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ka||null==Q||Q(ra,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ra)||(ra=null!=this.currentTarget?this.currentTarget:
-mxEvent.isMiddleMouseButton(ra)?"_blank":Ka?pa.linkTarget:"_top",pa.openLink(this.currentLink,ra),ua.consume())):null!=R&&!ua.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ja&&Math.abs(this.scrollTop-pa.container.scrollTop)<ja&&Math.abs(this.startX-ua.getGraphX())<ja&&Math.abs(this.startY-ua.getGraphY())<ja&&R(ua.getEvent()));this.clear()},activate:function(ra){this.currentLink=pa.getAbsoluteUrl(pa.getLinkForCell(ra.cell));null!=this.currentLink&&(this.currentTarget=pa.getLinkTargetForCell(ra.cell),
-pa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=pa.container&&(pa.container.style.cursor=ia);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=pa.tooltipHandler&&pa.tooltipHandler.hide()}};pa.click=function(ra){};pa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ra){xa.clear()})};Graph.prototype.duplicateCells=function(B,Q){B=null!=B?B:this.getSelectionCells();
-Q=null!=Q?Q:!0;for(var R=0;R<B.length;R++)this.isTableCell(B[R])&&(B[R]=this.model.getParent(B[R]));B=this.model.getTopmostCells(B);var X=this.getModel(),ia=this.gridSize,ja=[];X.beginUpdate();try{var pa={},xa=this.createCellLookup(B),ra=this.cloneCells(B,!1,pa,!0);for(R=0;R<B.length;R++){var ua=X.getParent(B[R]);if(null!=ua){var Ka=this.moveCells([ra[R]],ia,ia,!1)[0];ja.push(Ka);if(Q)X.add(ua,ra[R]);else{var Va=ua.getIndex(B[R]);X.add(ua,ra[R],Va+1)}if(this.isTable(ua)){var Oa=this.getCellGeometry(ra[R]),
-Ta=this.getCellGeometry(ua);null!=Oa&&null!=Ta&&(Ta=Ta.clone(),Ta.height+=Oa.height,X.setGeometry(ua,Ta))}}else ja.push(ra[R])}this.updateCustomLinks(this.createCellMapping(pa,xa),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{X.endUpdate()}return ja};Graph.prototype.insertImage=function(B,Q,R){if(null!=B&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),ia=[],ja=0;ja<X.length;ja++)ia.push(X[ja]);document.execCommand("insertimage",
-!1,B);B=this.cellEditor.textarea.getElementsByTagName("img");if(B.length==ia.length+1)for(ja=B.length-1;0<=ja;ja--)if(0==ja||B[ja]!=ia[ja-1]){B[ja].setAttribute("width",Q);B[ja].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(B){if(null!=this.cellEditor.textarea)if(0==B.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var Q=this.cellEditor.textarea.getElementsByTagName("a"),R=[],X=0;X<Q.length;X++)R.push(Q[X]);document.execCommand("createlink",!1,mxUtils.trim(B));
-Q=this.cellEditor.textarea.getElementsByTagName("a");if(Q.length==R.length+1)for(X=Q.length-1;0<=X;X--)if(Q[X]!=R[X-1]){for(Q=Q[X].getElementsByTagName("a");0<Q.length;){for(R=Q[0].parentNode;null!=Q[0].firstChild;)R.insertBefore(Q[0].firstChild,Q[0]);R.removeChild(Q[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(B))};Graph.prototype.isCellResizable=function(B){var Q=mxGraph.prototype.isCellResizable.apply(this,arguments),R=this.getCurrentCellStyle(B);return!this.isTableCell(B)&&
-!this.isTableRow(B)&&(Q||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(B,Q,R){null==Q&&(Q=this.getSelectionCells());if(null!=Q&&1<Q.length){for(var X=[],ia=null,ja=null,pa=0,xa=0;xa<Q.length;xa++)if(this.getModel().isVertex(Q[xa])){var ra=this.view.getState(Q[xa]);if(null!=ra){var ua=B?ra.getCenterX():ra.getCenterY();ia=null!=ia?Math.max(ia,ua):ua;ja=null!=ja?Math.min(ja,ua):ua;R&&(pa+=B?ra.width:ra.height);
-X.push(ra)}}if(2<X.length){X.sort(function(Za,Pa){return B?Za.x-Pa.x:Za.y-Pa.y});R&&(pa-=B?X[0].width/2+X[X.length-1].width/2:X[0].height/2+X[X.length-1].height/2);ra=this.view.translate;ua=this.view.scale;ja=ja/ua-(B?ra.x:ra.y);ia=ia/ua-(B?ra.x:ra.y);this.getModel().beginUpdate();try{var Ka=(ia-ja-pa)/(X.length-1),Va=ja+(R?B?X[0].width/2:X[0].height/2:0);for(xa=1;xa<X.length-1;xa++){var Oa=this.view.getState(this.model.getParent(X[xa].cell)),Ta=this.getCellGeometry(X[xa].cell);Va+=Ka;null!=Ta&&null!=
-Oa&&(Ta=Ta.clone(),B?Ta.x=Math.round(Va-(R?0:Ta.width/2))-Oa.origin.x:Ta.y=Math.round(Va-(R?0:Ta.height/2))-Oa.origin.y,this.getModel().setGeometry(X[xa].cell,Ta));R&&(Va+=B?X[xa].width:X[xa].height)}}finally{this.getModel().endUpdate()}}}return Q};Graph.prototype.isCloneEvent=function(B){return mxClient.IS_MAC&&mxEvent.isMetaDown(B)||mxEvent.isControlDown(B)};Graph.prototype.createSvgImageExport=function(B){B=new mxImageExport;B.addCellData=function(R,X,ia){X.setAttribute("data-cell-id",R.id);if(ia)if(mxUtils.isNode(R.value))for(ia=
-0;ia<R.value.attributes.length;ia++){var ja=R.value.attributes[ia];X.setAttribute("data-cell-"+ja.name,ja.value)}else if("object"===typeof R.value)for(ja in R.value)X.setAttribute("data-cell-"+ja,R.value[ja]);else null!=R.value&&X.setAttribute("data-cell-value",R.value);return X};var Q=B.visitStatesRecursive;B.visitStatesRecursive=function(R,X,ia){if(null!=R){var ja=X.root,pa=X.root.ownerDocument;X.root=this.addCellData(R.cell,null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),
-Editor.addSvgMetadata);ja.appendChild(X.root);Q.apply(this,arguments);X.root=ja}};B.getLinkForCellState=mxUtils.bind(this,function(R,X){return this.getLinkForCell(R.cell)});B.getTitleForCellState=mxUtils.bind(this,function(R,X){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return B};Graph.prototype.parseBackgroundImage=function(B){var Q=null;null!=B&&0<B.length&&(B=JSON.parse(B),Q=new mxImage(B.src,B.width,B.height));return Q};Graph.prototype.getBackgroundImageObject=function(B){return B};
-Graph.prototype.getSvg=function(B,Q,R,X,ia,ja,pa,xa,ra,ua,Ka,Va,Oa,Ta,Za,Pa){var Ra=null;if(null!=Ta)for(Ra=new mxDictionary,ia=0;ia<Ta.length;ia++)Ra.put(Ta[ia],!0);Ta=this.useCssTransforms;var fb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Ta&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{Q=null!=Q?Q:1;R=null!=R?R:0;ja=null!=ja?ja:!0;pa=null!=pa?pa:!0;ua=null!=ua?ua:!1;var eb="page"==Oa?this.view.getBackgroundPageBounds():ja&&null==Ra||X||"diagram"==Oa?this.getGraphBounds():
-this.getBoundingBox(this.getSelectionCells()),bb=this.backgroundImage,db=this.view.translate,mb=this.view.scale;"diagram"==Oa&&null!=bb&&null!=bb.width&&null!=bb.height&&(eb=mxRectangle.fromRectangle(eb),eb.add(new mxRectangle((db.x+bb.x)*mb,(db.y+bb.y)*mb,bb.width*mb,bb.height*mb)));if(null==eb)throw Error(mxResources.get("drawingEmpty"));X=Q/mb;var lb=Math.max(1,Math.ceil(eb.width*X)+2*R)+(ua&&0==R?5:0),pb=Math.max(1,Math.ceil(eb.height*X)+2*R)+(ua&&0==R?5:0),gb=mxUtils.getLightDarkColor(B),qb=
-Graph.createSvgNode(0,0,lb,pb,gb),ub=qb.ownerDocument;if(null!=B){var hb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"rect");hb.setAttribute("fill",gb.light);hb.style.fill=gb.cssText;hb.setAttribute("width","100%");hb.setAttribute("height","100%");hb.setAttribute("x","0");hb.setAttribute("y","0");qb.appendChild(hb)}var nb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"g");qb.appendChild(nb);var ob=this.createSvgCanvas(nb);ob.translate(Math.floor(R/Q-eb.x/mb),Math.floor(R/Q-eb.y/mb));ob.idPrefix=
-"drawio-svg-"+Editor.guid();var rb=document.createElement("div"),vb=ob.getAlternateText;ob.getAlternateText=function(jb,Bb,tb,xb,zb,sb,Db,d,p,A,t,z,E){if(null!=sb&&0<this.state.fontSize)try{mxUtils.isNode(sb)?sb=sb.innerText:(rb.innerHTML=sb,sb=mxUtils.extractTextWithWhitespace(rb.childNodes));for(var G=Math.ceil(2*xb/this.state.fontSize),ea=[],O=0,ta=0;(0==G||O<G)&&ta<sb.length;){var ma=sb.charCodeAt(ta);if(10==ma||13==ma){if(0<O)break}else ea.push(sb.charAt(ta)),255>ma&&O++;ta++}ea.length<sb.length&&
-1<sb.length-ea.length&&(sb=mxUtils.trim(ea.join(""))+"...");return sb}catch(ab){return vb.apply(this,arguments)}else return vb.apply(this,arguments)};if(null!=bb&&null!=bb.width&&null!=bb.height){B=mb/Q;var Ab=new mxRectangle((bb.x+db.x)*B,(bb.y+db.y)*B,bb.width*B,bb.height*B);mxUtils.intersects(eb,Ab)&&ob.image(bb.x+db.x,bb.y+db.y,bb.width,bb.height,bb.src,!0)}ob.scale(X);ob.textEnabled=pa;xa=null!=xa?xa:this.createSvgImageExport();var Cb=xa.getLinkForCellState;xa.getLinkForCellState=function(jb,
+ia&&Math.abs(this.scrollTop-pa.container.scrollTop)<ia&&(null==ua.sourceState||!ua.isSource(ua.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Ka=pa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ka||null==Q||Q(ra,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ra)||(ra=null!=this.currentTarget?this.currentTarget:
+mxEvent.isMiddleMouseButton(ra)?"_blank":Ka?pa.linkTarget:"_top",pa.openLink(this.currentLink,ra),ua.consume())):null!=R&&!ua.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ia&&Math.abs(this.scrollTop-pa.container.scrollTop)<ia&&Math.abs(this.startX-ua.getGraphX())<ia&&Math.abs(this.startY-ua.getGraphY())<ia&&R(ua.getEvent()));this.clear()},activate:function(ra){this.currentLink=pa.getAbsoluteUrl(pa.getLinkForCell(ra.cell));null!=this.currentLink&&(this.currentTarget=pa.getLinkTargetForCell(ra.cell),
+pa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=pa.container&&(pa.container.style.cursor=ha);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=pa.tooltipHandler&&pa.tooltipHandler.hide()}};pa.click=function(ra){};pa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ra){xa.clear()})};Graph.prototype.duplicateCells=function(C,Q){C=null!=C?C:this.getSelectionCells();
+Q=null!=Q?Q:!0;for(var R=0;R<C.length;R++)this.isTableCell(C[R])&&(C[R]=this.model.getParent(C[R]));C=this.model.getTopmostCells(C);var X=this.getModel(),ha=this.gridSize,ia=[];X.beginUpdate();try{var pa={},xa=this.createCellLookup(C),ra=this.cloneCells(C,!1,pa,!0);for(R=0;R<C.length;R++){var ua=X.getParent(C[R]);if(null!=ua){var Ka=this.moveCells([ra[R]],ha,ha,!1)[0];ia.push(Ka);if(Q)X.add(ua,ra[R]);else{var Va=ua.getIndex(C[R]);X.add(ua,ra[R],Va+1)}if(this.isTable(ua)){var Oa=this.getCellGeometry(ra[R]),
+Ta=this.getCellGeometry(ua);null!=Oa&&null!=Ta&&(Ta=Ta.clone(),Ta.height+=Oa.height,X.setGeometry(ua,Ta))}}else ia.push(ra[R])}this.updateCustomLinks(this.createCellMapping(pa,xa),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{X.endUpdate()}return ia};Graph.prototype.insertImage=function(C,Q,R){if(null!=C&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),ha=[],ia=0;ia<X.length;ia++)ha.push(X[ia]);document.execCommand("insertimage",
+!1,C);C=this.cellEditor.textarea.getElementsByTagName("img");if(C.length==ha.length+1)for(ia=C.length-1;0<=ia;ia--)if(0==ia||C[ia]!=ha[ia-1]){C[ia].setAttribute("width",Q);C[ia].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(C){if(null!=this.cellEditor.textarea)if(0==C.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var Q=this.cellEditor.textarea.getElementsByTagName("a"),R=[],X=0;X<Q.length;X++)R.push(Q[X]);document.execCommand("createlink",!1,mxUtils.trim(C));
+Q=this.cellEditor.textarea.getElementsByTagName("a");if(Q.length==R.length+1)for(X=Q.length-1;0<=X;X--)if(Q[X]!=R[X-1]){for(Q=Q[X].getElementsByTagName("a");0<Q.length;){for(R=Q[0].parentNode;null!=Q[0].firstChild;)R.insertBefore(Q[0].firstChild,Q[0]);R.removeChild(Q[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(C))};Graph.prototype.isCellResizable=function(C){var Q=mxGraph.prototype.isCellResizable.apply(this,arguments),R=this.getCurrentCellStyle(C);return!this.isTableCell(C)&&
+!this.isTableRow(C)&&(Q||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(C,Q,R){null==Q&&(Q=this.getSelectionCells());if(null!=Q&&1<Q.length){for(var X=[],ha=null,ia=null,pa=0,xa=0;xa<Q.length;xa++)if(this.getModel().isVertex(Q[xa])){var ra=this.view.getState(Q[xa]);if(null!=ra){var ua=C?ra.getCenterX():ra.getCenterY();ha=null!=ha?Math.max(ha,ua):ua;ia=null!=ia?Math.min(ia,ua):ua;R&&(pa+=C?ra.width:ra.height);
+X.push(ra)}}if(2<X.length){X.sort(function(Za,Pa){return C?Za.x-Pa.x:Za.y-Pa.y});R&&(pa-=C?X[0].width/2+X[X.length-1].width/2:X[0].height/2+X[X.length-1].height/2);ra=this.view.translate;ua=this.view.scale;ia=ia/ua-(C?ra.x:ra.y);ha=ha/ua-(C?ra.x:ra.y);this.getModel().beginUpdate();try{var Ka=(ha-ia-pa)/(X.length-1),Va=ia+(R?C?X[0].width/2:X[0].height/2:0);for(xa=1;xa<X.length-1;xa++){var Oa=this.view.getState(this.model.getParent(X[xa].cell)),Ta=this.getCellGeometry(X[xa].cell);Va+=Ka;null!=Ta&&null!=
+Oa&&(Ta=Ta.clone(),C?Ta.x=Math.round(Va-(R?0:Ta.width/2))-Oa.origin.x:Ta.y=Math.round(Va-(R?0:Ta.height/2))-Oa.origin.y,this.getModel().setGeometry(X[xa].cell,Ta));R&&(Va+=C?X[xa].width:X[xa].height)}}finally{this.getModel().endUpdate()}}}return Q};Graph.prototype.isCloneEvent=function(C){return mxClient.IS_MAC&&mxEvent.isMetaDown(C)||mxEvent.isControlDown(C)};Graph.prototype.createSvgImageExport=function(C){C=new mxImageExport;C.addCellData=function(R,X,ha){X.setAttribute("data-cell-id",R.id);if(ha)if(mxUtils.isNode(R.value))for(ha=
+0;ha<R.value.attributes.length;ha++){var ia=R.value.attributes[ha];X.setAttribute("data-cell-"+ia.name,ia.value)}else if("object"===typeof R.value)for(ia in R.value)X.setAttribute("data-cell-"+ia,R.value[ia]);else null!=R.value&&X.setAttribute("data-cell-value",R.value);return X};var Q=C.visitStatesRecursive;C.visitStatesRecursive=function(R,X,ha){if(null!=R){var ia=X.root,pa=X.root.ownerDocument;X.root=this.addCellData(R.cell,null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),
+Editor.addSvgMetadata);ia.appendChild(X.root);Q.apply(this,arguments);X.root=ia}};C.getLinkForCellState=mxUtils.bind(this,function(R,X){return this.getLinkForCell(R.cell)});C.getTitleForCellState=mxUtils.bind(this,function(R,X){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return C};Graph.prototype.parseBackgroundImage=function(C){var Q=null;null!=C&&0<C.length&&(C=JSON.parse(C),Q=new mxImage(C.src,C.width,C.height));return Q};Graph.prototype.getBackgroundImageObject=function(C){return C};
+Graph.prototype.getSvg=function(C,Q,R,X,ha,ia,pa,xa,ra,ua,Ka,Va,Oa,Ta,Za,Pa){var Ra=null;if(null!=Ta)for(Ra=new mxDictionary,ha=0;ha<Ta.length;ha++)Ra.put(Ta[ha],!0);Ta=this.useCssTransforms;var fb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Ta&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{Q=null!=Q?Q:1;R=null!=R?R:0;ia=null!=ia?ia:!0;pa=null!=pa?pa:!0;ua=null!=ua?ua:!1;var eb="page"==Oa?this.view.getBackgroundPageBounds():ia&&null==Ra||X||"diagram"==Oa?this.getGraphBounds():
+this.getBoundingBox(this.getSelectionCells()),bb=this.backgroundImage,db=this.view.translate,mb=this.view.scale;"diagram"==Oa&&null!=bb&&null!=bb.width&&null!=bb.height&&(eb=mxRectangle.fromRectangle(eb),eb.add(new mxRectangle((db.x+bb.x)*mb,(db.y+bb.y)*mb,bb.width*mb,bb.height*mb)));if(null==eb)throw Error(mxResources.get("drawingEmpty"));X=Q/mb;var lb=Math.max(1,Math.ceil(eb.width*X)+2*R)+(ua&&0==R?5:0),pb=Math.max(1,Math.ceil(eb.height*X)+2*R)+(ua&&0==R?5:0),gb=mxUtils.getLightDarkColor(C),qb=
+Graph.createSvgNode(0,0,lb,pb,gb),ub=qb.ownerDocument;if(null!=C){var hb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"rect");hb.setAttribute("fill",gb.light);hb.style.fill=gb.cssText;hb.setAttribute("width","100%");hb.setAttribute("height","100%");hb.setAttribute("x","0");hb.setAttribute("y","0");qb.appendChild(hb)}var nb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"g");qb.appendChild(nb);var ob=this.createSvgCanvas(nb);ob.translate(Math.floor(R/Q-eb.x/mb),Math.floor(R/Q-eb.y/mb));ob.idPrefix=
+"drawio-svg-"+Editor.guid();var rb=document.createElement("div"),vb=ob.getAlternateText;ob.getAlternateText=function(jb,Bb,tb,xb,zb,sb,Db,d,p,A,u,z,E){if(null!=sb&&0<this.state.fontSize)try{mxUtils.isNode(sb)?sb=sb.innerText:(rb.innerHTML=sb,sb=mxUtils.extractTextWithWhitespace(rb.childNodes));for(var H=Math.ceil(2*xb/this.state.fontSize),ea=[],O=0,ta=0;(0==H||O<H)&&ta<sb.length;){var ma=sb.charCodeAt(ta);if(10==ma||13==ma){if(0<O)break}else ea.push(sb.charAt(ta)),255>ma&&O++;ta++}ea.length<sb.length&&
+1<sb.length-ea.length&&(sb=mxUtils.trim(ea.join(""))+"...");return sb}catch(ab){return vb.apply(this,arguments)}else return vb.apply(this,arguments)};if(null!=bb&&null!=bb.width&&null!=bb.height){C=mb/Q;var Ab=new mxRectangle((bb.x+db.x)*C,(bb.y+db.y)*C,bb.width*C,bb.height*C);mxUtils.intersects(eb,Ab)&&ob.image(bb.x+db.x,bb.y+db.y,bb.width,bb.height,bb.src,!0)}ob.scale(X);ob.textEnabled=pa;xa=null!=xa?xa:this.createSvgImageExport();var Cb=xa.getLinkForCellState;xa.getLinkForCellState=function(jb,
Bb){var tb=jb.view.graph.getAbsoluteUrl(Cb.apply(this,arguments));return null==tb||jb.view.graph.isCustomLink(tb)?null:tb};xa.getLinkTargetForCellState=function(jb,Bb){return jb.view.graph.getLinkTargetForCell(jb.cell)};var Eb=xa.drawCellState,yb=null,wb=mxUtils.bind(this,function(){if(null==yb){yb="ge-flow-animation-"+Editor.guid();var jb=null!=ub.createElementNS?ub.createElementNS(mxConstants.NS_SVG,"style"):ub.createElement("style");jb.innerHTML=this.createFlowAnimationCss(yb);ub.getElementsByTagName("defs")[0].appendChild(jb)}return yb});
-xa.drawCellState=function(jb,Bb){for(var tb=jb.view.graph,xb=null!=Ra?Ra.get(jb.cell):tb.isCellSelected(jb.cell),zb=tb.model.getParent(jb.cell);!(ja&&null==Ra||xb)&&null!=zb;)xb=null!=Ra?Ra.get(zb):tb.isCellSelected(zb),zb=tb.model.getParent(zb);if(null!=jb.shape)try{var sb=jb.shape.isFlowAnimationEnabled,Db=jb.shape.addFlowAnimationToShape;jb.shape.isFlowAnimationEnabled=function(){return fb&&tb.model.isEdge(jb.cell)&&"1"==mxUtils.getValue(jb.style,"flowAnimation","0")};jb.shape.addFlowAnimationToShape=
-function(){tb.addFlowAnimationToNode(this.getFlowAnimationPath(),jb.style,Q,wb())};if(ja&&null==Ra||xb)tb.view.redrawEnumerationState(jb),Eb.apply(this,arguments),this.doDrawShape(jb.secondLabel,Bb)}finally{jb.shape.isFlowAnimationEnabled=sb,jb.shape.addFlowAnimationToShape=Db}};var kb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(kb),ob);this.addForeignObjectWarning(ob,qb);Pa?this.disableSvgLinks(qb):this.updateSvgLinks(qb,ra,!0);return qb}finally{this.enableFlowAnimation=
-fb,Ta&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(B,Q){if("0"!=urlParams["svg-warning"]&&0<Q.getElementsByTagName("foreignObject").length){var R=B.createElement("switch"),X=B.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=B.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||Q.ownerDocument!=document&&null==document.documentMode?
-(ia.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ia.setAttribute("target","_blank")):(ia.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ia.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));B=B.createElement("text");B.setAttribute("text-anchor","middle");B.setAttribute("font-size","10px");B.setAttribute("x","50%");B.setAttribute("y","100%");mxUtils.write(B,Graph.foreignObjectWarningText);R.appendChild(X);ia.appendChild(B);R.appendChild(ia);Q.appendChild(R)}};
-Graph.prototype.disableSvgLinks=function(B,Q){B=B.getElementsByTagName("a");for(var R=0;R<B.length;R++){var X=B[R].getAttribute("href");null==X&&(X=B[R].getAttribute("xlink:href"));null!=X&&(B[R].style.pointerEvents="none",B[R].setAttribute("href",""));Q&&Q(B[R])}};Graph.prototype.updateSvgLinks=function(B,Q,R){B=B.getElementsByTagName("a");for(var X=0;X<B.length;X++)if(null==B[X].getAttribute("target")){var ia=B[X].getAttribute("href");null==ia&&(ia=B[X].getAttribute("xlink:href"));null!=ia&&(null!=
-Q&&/^https?:\/\//.test(ia)?B[X].setAttribute("target",Q):R&&this.isCustomLink(ia)&&B[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(B){B=new mxSvgCanvas2D(B);B.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;B.adaptiveColors=this.getAdaptiveColors();B.pointerEvents=!0;return B};Graph.prototype.getSelectedElement=function(){var B=null;if(window.getSelection){var Q=window.getSelection();Q.getRangeAt&&Q.rangeCount&&(B=Q.getRangeAt(0).commonAncestorContainer)}else document.selection&&
-(B=document.selection.createRange().parentElement());return B};Graph.prototype.getSelectedEditingElement=function(){var B=null;if(null!=this.cellEditor.textarea)for(B=this.getSelectedElement();null!=B&&B.nodeType!=mxConstants.NODETYPE_ELEMENT;)B=B.parentNode;return B};Graph.prototype.getParentByName=function(B,Q,R){for(;null!=B&&B.nodeName!=Q;){if(B==R)return null;B=B.parentNode}return B};Graph.prototype.getParentByNames=function(B,Q,R){for(;null!=B&&!(0<=mxUtils.indexOf(Q,B.nodeName));){if(B==R)return null;
-B=B.parentNode}return B};Graph.prototype.selectNode=function(B){var Q=null;if(window.getSelection){if(Q=window.getSelection(),Q.getRangeAt&&Q.rangeCount){var R=document.createRange();R.selectNode(B);Q.removeAllRanges();Q.addRange(R)}}else(Q=document.selection)&&"Control"!=Q.type&&(B=Q.createRange(),B.collapse(!0),R=Q.createRange(),R.setEndPoint("StartToStart",B),R.select())};Graph.prototype.flipEdgePoints=function(B,Q,R){var X=this.getCellGeometry(B);if(null!=X){X=X.clone();if(null!=X.points)for(var ia=
-0;ia<X.points.length;ia++)Q?X.points[ia].x=R+(R-X.points[ia].x):X.points[ia].y=R+(R-X.points[ia].y);ia=function(ja){null!=ja&&(Q?ja.x=R+(R-ja.x):ja.y=R+(R-ja.y))};ia(X.getTerminalPoint(!0));ia(X.getTerminalPoint(!1));this.model.setGeometry(B,X)}};Graph.prototype.flipChildren=function(B,Q,R){this.model.beginUpdate();try{for(var X=this.model.getChildCount(B),ia=0;ia<X;ia++){var ja=this.model.getChildAt(B,ia);if(this.model.isEdge(ja))this.flipEdgePoints(ja,Q,R);else{var pa=this.getCellGeometry(ja);null!=
-pa&&(pa=pa.clone(),Q?pa.x=R+(R-pa.x-pa.width):pa.y=R+(R-pa.y-pa.height),this.model.setGeometry(ja,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(B,Q){this.model.beginUpdate();try{B=this.model.getTopmostCells(B);for(var R=[],X=0;X<B.length;X++)if(this.model.isEdge(B[X])){var ia=this.view.getState(B[X]);null!=ia&&this.flipEdgePoints(B[X],Q,(Q?ia.getCenterX():ia.getCenterY())/this.view.scale-(Q?ia.origin.x:ia.origin.y)-(Q?this.view.translate.x:this.view.translate.y))}else{var ja=
-this.getCellGeometry(B[X]);null!=ja&&this.flipChildren(B[X],Q,Q?ja.getCenterX()-ja.x:ja.getCenterY()-ja.y);R.push(B[X])}this.toggleCellStyles(Q?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(B,Q){var R=null;if(null!=B&&0<B.length){this.model.beginUpdate();try{for(var X=0;X<B.length;X++){var ia=this.model.getParent(B[X]);if(this.isTable(ia)){var ja=this.getCellGeometry(B[X]),pa=this.getCellGeometry(ia);null!=ja&&null!=pa&&
-(pa=pa.clone(),pa.height-=ja.height,this.model.setGeometry(ia,pa))}}var xa=this.selectParentAfterDelete?this.model.getParents(B):null;this.removeCells(B,Q)}finally{this.model.endUpdate()}if(null!=xa)for(R=[],X=0;X<xa.length;X++)this.model.contains(xa[X])&&(this.model.isVertex(xa[X])||this.model.isEdge(xa[X]))&&R.push(xa[X])}return R};Graph.prototype.insertTableColumn=function(B,Q){var R=this.getModel();R.beginUpdate();try{var X=B,ia=0;if(this.isTableCell(B)){var ja=R.getParent(B);X=R.getParent(ja);
-ia=mxUtils.indexOf(R.getChildCells(ja,!0),B)}else this.isTableRow(B)?X=R.getParent(B):B=R.getChildCells(X,!0)[0],Q||(ia=R.getChildCells(B,!0).length-1);var pa=R.getChildCells(X,!0),xa=Graph.minTableColumnWidth;for(B=0;B<pa.length;B++){var ra=R.getChildCells(pa[B],!0)[ia],ua=R.cloneCell(ra,!1);null==ua&&(ua=this.createVertex());var Ka=this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ka){null!=Ka.alternateBounds&&(Ka.width=
-Ka.alternateBounds.width,Ka.height=Ka.alternateBounds.height,Ka.alternateBounds=null);xa=Ka.width;var Va=this.getCellGeometry(pa[B]);null!=Va&&(Ka.height=Va.height)}R.add(pa[B],ua,ia+(Q?0:1))}var Oa=this.getCellGeometry(X);null!=Oa&&(Oa=Oa.clone(),Oa.width+=xa,R.setGeometry(X,Oa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=function(B){var Q=this.getModel();Q.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(B).childLayout?B:Q.getParent(B);var X=Q.getChildCells(R,!0);0==
-X.length?Q.remove(R):(R==B&&(B=X[X.length-1]),Q.remove(B))}finally{Q.endUpdate()}};Graph.prototype.insertLane=function(B,Q){var R=this.getModel();R.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(B).childLayout){X=B;var ia=R.getChildCells(X,!0);B=ia[Q?0:ia.length-1]}else X=R.getParent(B);var ja=X.getIndex(B);B=R.cloneCell(B,!1);B.value=null;R.add(X,B,ja+(Q?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(B,Q){var R=this.getModel();R.beginUpdate();try{var X=
-B,ia=B;if(this.isTableCell(B))ia=R.getParent(B),X=R.getParent(ia);else if(this.isTableRow(B))X=R.getParent(B);else{var ja=R.getChildCells(X,!0);ia=ja[Q?0:ja.length-1]}var pa=R.getChildCells(ia,!0),xa=X.getIndex(ia);ia=R.cloneCell(ia,!1);ia.value=null;var ra=this.getCellGeometry(ia);if(null!=ra){for(ja=0;ja<pa.length;ja++){B=R.cloneCell(pa[ja],!1);B.value=null;B.style=mxUtils.setStyle(mxUtils.setStyle(B.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(B);null!=ua&&(null!=ua.alternateBounds&&
-(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ra.height);ia.insert(B)}R.add(X,ia,xa+(Q?0:1));var Ka=this.getCellGeometry(X);null!=Ka&&(Ka=Ka.clone(),Ka.height+=ra.height,R.setGeometry(X,Ka))}}finally{R.endUpdate()}};Graph.prototype.deleteTableColumn=function(B){var Q=this.getModel();Q.beginUpdate();try{var R=B,X=B;this.isTableCell(B)&&(X=Q.getParent(B));this.isTableRow(X)&&(R=Q.getParent(X));var ia=Q.getChildCells(R,!0);if(0==ia.length)Q.remove(R);
-else{this.isTableRow(X)||(X=ia[0]);var ja=Q.getChildCells(X,!0);if(1>=ja.length)Q.remove(R);else{var pa=ja.length-1;this.isTableCell(B)&&(pa=mxUtils.indexOf(ja,B));for(X=B=0;X<ia.length;X++){var xa=Q.getChildCells(ia[X],!0)[pa];Q.remove(xa);var ra=this.getCellGeometry(xa);null!=ra&&(B=Math.max(B,ra.width))}var ua=this.getCellGeometry(R);null!=ua&&(ua=ua.clone(),ua.width-=B,Q.setGeometry(R,ua))}}}finally{Q.endUpdate()}};Graph.prototype.deleteTableRow=function(B){var Q=this.getModel();Q.beginUpdate();
-try{var R=B,X=B;this.isTableCell(B)&&(B=X=Q.getParent(B));this.isTableRow(B)&&(R=Q.getParent(X));var ia=Q.getChildCells(R,!0);if(1>=ia.length)Q.remove(R);else{this.isTableRow(X)||(X=ia[ia.length-1]);Q.remove(X);B=0;var ja=this.getCellGeometry(X);null!=ja&&(B=ja.height);var pa=this.getCellGeometry(R);null!=pa&&(pa=pa.clone(),pa.height-=B,Q.setGeometry(R,pa))}}finally{Q.endUpdate()}};Graph.prototype.insertRow=function(B,Q){for(var R=B.tBodies[0],X=R.rows[0].cells,ia=B=0;ia<X.length;ia++){var ja=X[ia].getAttribute("colspan");
-B+=null!=ja?parseInt(ja):1}Q=R.insertRow(Q);for(ia=0;ia<B;ia++)mxUtils.br(Q.insertCell(-1));return Q.cells[0]};Graph.prototype.deleteRow=function(B,Q){B.tBodies[0].deleteRow(Q)};Graph.prototype.insertColumn=function(B,Q){var R=B.tHead;if(null!=R)for(var X=0;X<R.rows.length;X++){var ia=document.createElement("th");R.rows[X].appendChild(ia);mxUtils.br(ia)}B=B.tBodies[0];for(R=0;R<B.rows.length;R++)X=B.rows[R].insertCell(Q),mxUtils.br(X);return B.rows[0].cells[0<=Q?Q:B.rows[0].cells.length-1]};Graph.prototype.deleteColumn=
-function(B,Q){if(0<=Q){B=B.tBodies[0].rows;for(var R=0;R<B.length;R++)B[R].cells.length>Q&&B[R].deleteCell(Q)}};Graph.prototype.pasteHtmlAtCaret=function(B){if(window.getSelection){var Q=window.getSelection();if(Q.getRangeAt&&Q.rangeCount){Q=Q.getRangeAt(0);Q.deleteContents();var R=document.createElement("div");R.innerHTML=B;B=document.createDocumentFragment();for(var X;X=R.firstChild;)lastNode=B.appendChild(X);Q.insertNode(B)}}else(Q=document.selection)&&"Control"!=Q.type&&Q.createRange().pasteHTML(B)};
-Graph.prototype.createLinkForHint=function(B,Q,R){function X(ja,pa){ja.length>pa&&(ja=ja.substring(0,Math.round(pa/2))+"..."+ja.substring(ja.length-Math.round(pa/4)));return ja}B=null!=B?B:"javascript:void(0);";if(null==Q||0==Q.length)Q=this.isCustomLink(B)?this.getLinkTitle(B):B;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(B));ia.setAttribute("title",X(this.isCustomLink(B)?this.getLinkTitle(B):B,80));null!=this.linkTarget&&
-ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,X(Q,40));this.isCustomLink(B)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ja){this.customLinkClicked(B,R);mxEvent.consume(ja)}));return ia};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ja,pa){this.popupMenuHandler.hideMenu()});var B=this.updateMouseEvent;this.updateMouseEvent=function(ja){ja=
-B.apply(this,arguments);if(mxEvent.isTouchEvent(ja.getEvent())&&null==ja.getState()){var pa=this.getCellAt(ja.graphX,ja.graphY);null!=pa&&this.isSwimlane(pa)&&this.hitsSwimlaneContent(pa,ja.graphX,ja.graphY)||(ja.state=this.view.getState(pa),null!=ja.state&&null!=ja.state.shape&&(this.container.style.cursor=ja.state.shape.node.style.cursor))}null==ja.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ja};var Q=!1,R=!1,X=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ja,
-pa,xa){ja==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),Q=this.isCellSelected(pa.getCell()),R=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());ia.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ja,pa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(pa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==pa.getState()||!pa.isSource(pa.getState().control))&&(this.popupMenuHandler.popupTrigger||
-!X&&!xa&&(R&&null==pa.getCell()&&this.isSelectionEmpty()||Q&&this.isCellSelected(pa.getCell())));xa=!Q||xa?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ua=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(pa.getX()+ua.x+1,pa.getY()+ua.y+1,ra,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ja,pa,xa])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};
-mxCellEditor.prototype.isContentEditing=function(){var B=this.graph.view.getState(this.editingCell);return null!=B&&1==B.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var B="";window.getSelection?B=window.getSelection():document.getSelection?B=document.getSelection():document.selection&&(B=document.selection.createRange().text);return""!=
-B};mxCellEditor.prototype.insertTab=function(B){var Q=this.textarea.ownerDocument.defaultView.getSelection(),R=Q.getRangeAt(0);B=Graph.createTabNode(B);R.insertNode(B);R.setStartAfter(B);R.setEndAfter(B);Q.removeAllRanges();Q.addRange(R)};mxCellEditor.prototype.alignText=function(B,Q){var R=this.graph.getView().getState(this.editingCell);if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var X=null!=R&&"vertical-"==R.substring(0,9),ia=null!=
-Q&&mxEvent.isShiftDown(Q);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ja=!0;this.graph.processElements(this.textarea,function(pa){ia||X||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ja=!1});(ja||X)&&this.graph.cellEditor.setAlign(B)}X||document.execCommand("justify"+B.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var B=window.getSelection();if(B.getRangeAt&&B.rangeCount){for(var Q=
-[],R=0,X=B.rangeCount;R<X;++R)Q.push(B.getRangeAt(R));return Q}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(B){try{if(B)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var Q=0,R=B.length;Q<R;++Q)sel.addRange(B[Q])}else document.selection&&B.select&&B.select()}catch(X){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
-function(B){null!=B.text&&(B.text.replaceLinefeeds="0"!=mxUtils.getValue(B.style,"nl2Br","1"));F.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(B,Q){this.isKeepFocusEvent(B)||!mxEvent.isAltDown(B.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(B){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var M=mxCellEditor.prototype.startEditing;
-mxCellEditor.prototype.startEditing=function(B,Q){B=this.graph.getStartEditingCell(B,Q);M.apply(this,arguments);var R=this.graph.view.getState(B);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(B)};mxCellEditor.prototype.toggleViewMode=function(){var B=this.graph.view.getState(this.editingCell);
-if(null!=B){var Q=null!=B&&"0"!=mxUtils.getValue(B.style,"nl2Br","1"),R=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=Graph.sanitizeHtml(Q?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(B.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
-Q=mxUtils.getValue(B.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(B.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ja=(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,pa=[];(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
-pa.push("underline");(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&pa.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration=pa.join(" ");this.textarea.style.fontWeight=ia?"bold":"normal";this.textarea.style.fontStyle=ja?"italic":"";this.textarea.style.fontFamily=
+xa.drawCellState=function(jb,Bb){for(var tb=jb.view.graph,xb=null!=Ra?Ra.get(jb.cell):tb.isCellSelected(jb.cell),zb=tb.model.getParent(jb.cell);!(ia&&null==Ra||xb)&&null!=zb;)xb=null!=Ra?Ra.get(zb):tb.isCellSelected(zb),zb=tb.model.getParent(zb);if(null!=jb.shape)try{var sb=jb.shape.isFlowAnimationEnabled,Db=jb.shape.addFlowAnimationToShape;jb.shape.isFlowAnimationEnabled=function(){return fb&&tb.model.isEdge(jb.cell)&&"1"==mxUtils.getValue(jb.style,"flowAnimation","0")};jb.shape.addFlowAnimationToShape=
+function(){tb.addFlowAnimationToNode(this.getFlowAnimationPath(),jb.style,Q,wb())};if(ia&&null==Ra||xb)tb.view.redrawEnumerationState(jb),Eb.apply(this,arguments),this.doDrawShape(jb.secondLabel,Bb)}finally{jb.shape.isFlowAnimationEnabled=sb,jb.shape.addFlowAnimationToShape=Db}};var kb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(kb),ob);this.addForeignObjectWarning(ob,qb);Pa?this.disableSvgLinks(qb):this.updateSvgLinks(qb,ra,!0);return qb}finally{this.enableFlowAnimation=
+fb,Ta&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(C,Q){if("0"!=urlParams["svg-warning"]&&0<Q.getElementsByTagName("foreignObject").length){var R=C.createElement("switch"),X=C.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ha=C.createElement("a");ha.setAttribute("transform","translate(0,-5)");null==ha.setAttributeNS||Q.ownerDocument!=document&&null==document.documentMode?
+(ha.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ha.setAttribute("target","_blank")):(ha.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ha.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));C=C.createElement("text");C.setAttribute("text-anchor","middle");C.setAttribute("font-size","10px");C.setAttribute("x","50%");C.setAttribute("y","100%");mxUtils.write(C,Graph.foreignObjectWarningText);R.appendChild(X);ha.appendChild(C);R.appendChild(ha);Q.appendChild(R)}};
+Graph.prototype.disableSvgLinks=function(C,Q){C=C.getElementsByTagName("a");for(var R=0;R<C.length;R++){var X=C[R].getAttribute("href");null==X&&(X=C[R].getAttribute("xlink:href"));null!=X&&(C[R].style.pointerEvents="none",C[R].setAttribute("href",""));Q&&Q(C[R])}};Graph.prototype.updateSvgLinks=function(C,Q,R){C=C.getElementsByTagName("a");for(var X=0;X<C.length;X++)if(null==C[X].getAttribute("target")){var ha=C[X].getAttribute("href");null==ha&&(ha=C[X].getAttribute("xlink:href"));null!=ha&&(null!=
+Q&&/^https?:\/\//.test(ha)?C[X].setAttribute("target",Q):R&&this.isCustomLink(ha)&&C[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(C){C=new mxSvgCanvas2D(C);C.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;C.adaptiveColors=this.getAdaptiveColors();C.pointerEvents=!0;return C};Graph.prototype.getSelectedElement=function(){var C=null;if(window.getSelection){var Q=window.getSelection();Q.getRangeAt&&Q.rangeCount&&(C=Q.getRangeAt(0).commonAncestorContainer)}else document.selection&&
+(C=document.selection.createRange().parentElement());return C};Graph.prototype.getSelectedEditingElement=function(){var C=null;if(null!=this.cellEditor.textarea)for(C=this.getSelectedElement();null!=C&&C.nodeType!=mxConstants.NODETYPE_ELEMENT;)C=C.parentNode;return C};Graph.prototype.getParentByName=function(C,Q,R){for(;null!=C&&C.nodeName!=Q;){if(C==R)return null;C=C.parentNode}return C};Graph.prototype.getParentByNames=function(C,Q,R){for(;null!=C&&!(0<=mxUtils.indexOf(Q,C.nodeName));){if(C==R)return null;
+C=C.parentNode}return C};Graph.prototype.selectNode=function(C){var Q=null;if(window.getSelection){if(Q=window.getSelection(),Q.getRangeAt&&Q.rangeCount){var R=document.createRange();R.selectNode(C);Q.removeAllRanges();Q.addRange(R)}}else(Q=document.selection)&&"Control"!=Q.type&&(C=Q.createRange(),C.collapse(!0),R=Q.createRange(),R.setEndPoint("StartToStart",C),R.select())};Graph.prototype.flipEdgePoints=function(C,Q,R){var X=this.getCellGeometry(C);if(null!=X){X=X.clone();if(null!=X.points)for(var ha=
+0;ha<X.points.length;ha++)Q?X.points[ha].x=R+(R-X.points[ha].x):X.points[ha].y=R+(R-X.points[ha].y);ha=function(ia){null!=ia&&(Q?ia.x=R+(R-ia.x):ia.y=R+(R-ia.y))};ha(X.getTerminalPoint(!0));ha(X.getTerminalPoint(!1));this.model.setGeometry(C,X)}};Graph.prototype.flipChildren=function(C,Q,R){this.model.beginUpdate();try{for(var X=this.model.getChildCount(C),ha=0;ha<X;ha++){var ia=this.model.getChildAt(C,ha);if(this.model.isEdge(ia))this.flipEdgePoints(ia,Q,R);else{var pa=this.getCellGeometry(ia);null!=
+pa&&(pa=pa.clone(),Q?pa.x=R+(R-pa.x-pa.width):pa.y=R+(R-pa.y-pa.height),this.model.setGeometry(ia,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(C,Q){this.model.beginUpdate();try{C=this.model.getTopmostCells(C);for(var R=[],X=0;X<C.length;X++)if(this.model.isEdge(C[X])){var ha=this.view.getState(C[X]);null!=ha&&this.flipEdgePoints(C[X],Q,(Q?ha.getCenterX():ha.getCenterY())/this.view.scale-(Q?ha.origin.x:ha.origin.y)-(Q?this.view.translate.x:this.view.translate.y))}else{var ia=
+this.getCellGeometry(C[X]);null!=ia&&this.flipChildren(C[X],Q,Q?ia.getCenterX()-ia.x:ia.getCenterY()-ia.y);R.push(C[X])}this.toggleCellStyles(Q?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(C,Q){var R=null;if(null!=C&&0<C.length){this.model.beginUpdate();try{for(var X=0;X<C.length;X++){var ha=this.model.getParent(C[X]);if(this.isTable(ha)){var ia=this.getCellGeometry(C[X]),pa=this.getCellGeometry(ha);null!=ia&&null!=pa&&
+(pa=pa.clone(),pa.height-=ia.height,this.model.setGeometry(ha,pa))}}var xa=this.selectParentAfterDelete?this.model.getParents(C):null;this.removeCells(C,Q)}finally{this.model.endUpdate()}if(null!=xa)for(R=[],X=0;X<xa.length;X++)this.model.contains(xa[X])&&(this.model.isVertex(xa[X])||this.model.isEdge(xa[X]))&&R.push(xa[X])}return R};Graph.prototype.insertTableColumn=function(C,Q){var R=this.getModel();R.beginUpdate();try{var X=C,ha=0;if(this.isTableCell(C)){var ia=R.getParent(C);X=R.getParent(ia);
+ha=mxUtils.indexOf(R.getChildCells(ia,!0),C)}else this.isTableRow(C)?X=R.getParent(C):C=R.getChildCells(X,!0)[0],Q||(ha=R.getChildCells(C,!0).length-1);var pa=R.getChildCells(X,!0),xa=Graph.minTableColumnWidth;for(C=0;C<pa.length;C++){var ra=R.getChildCells(pa[C],!0)[ha],ua=R.cloneCell(ra,!1);null==ua&&(ua=this.createVertex());var Ka=this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ka){null!=Ka.alternateBounds&&(Ka.width=
+Ka.alternateBounds.width,Ka.height=Ka.alternateBounds.height,Ka.alternateBounds=null);xa=Ka.width;var Va=this.getCellGeometry(pa[C]);null!=Va&&(Ka.height=Va.height)}R.add(pa[C],ua,ha+(Q?0:1))}var Oa=this.getCellGeometry(X);null!=Oa&&(Oa=Oa.clone(),Oa.width+=xa,R.setGeometry(X,Oa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=function(C){var Q=this.getModel();Q.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(C).childLayout?C:Q.getParent(C);var X=Q.getChildCells(R,!0);0==
+X.length?Q.remove(R):(R==C&&(C=X[X.length-1]),Q.remove(C))}finally{Q.endUpdate()}};Graph.prototype.insertLane=function(C,Q){var R=this.getModel();R.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(C).childLayout){X=C;var ha=R.getChildCells(X,!0);C=ha[Q?0:ha.length-1]}else X=R.getParent(C);var ia=X.getIndex(C);C=R.cloneCell(C,!1);C.value=null;R.add(X,C,ia+(Q?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(C,Q){var R=this.getModel();R.beginUpdate();try{var X=
+C,ha=C;if(this.isTableCell(C))ha=R.getParent(C),X=R.getParent(ha);else if(this.isTableRow(C))X=R.getParent(C);else{var ia=R.getChildCells(X,!0);ha=ia[Q?0:ia.length-1]}var pa=R.getChildCells(ha,!0),xa=X.getIndex(ha);ha=R.cloneCell(ha,!1);ha.value=null;var ra=this.getCellGeometry(ha);if(null!=ra){for(ia=0;ia<pa.length;ia++){C=R.cloneCell(pa[ia],!1);C.value=null;C.style=mxUtils.setStyle(mxUtils.setStyle(C.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(C);null!=ua&&(null!=ua.alternateBounds&&
+(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ra.height);ha.insert(C)}R.add(X,ha,xa+(Q?0:1));var Ka=this.getCellGeometry(X);null!=Ka&&(Ka=Ka.clone(),Ka.height+=ra.height,R.setGeometry(X,Ka))}}finally{R.endUpdate()}};Graph.prototype.deleteTableColumn=function(C){var Q=this.getModel();Q.beginUpdate();try{var R=C,X=C;this.isTableCell(C)&&(X=Q.getParent(C));this.isTableRow(X)&&(R=Q.getParent(X));var ha=Q.getChildCells(R,!0);if(0==ha.length)Q.remove(R);
+else{this.isTableRow(X)||(X=ha[0]);var ia=Q.getChildCells(X,!0);if(1>=ia.length)Q.remove(R);else{var pa=ia.length-1;this.isTableCell(C)&&(pa=mxUtils.indexOf(ia,C));for(X=C=0;X<ha.length;X++){var xa=Q.getChildCells(ha[X],!0)[pa];Q.remove(xa);var ra=this.getCellGeometry(xa);null!=ra&&(C=Math.max(C,ra.width))}var ua=this.getCellGeometry(R);null!=ua&&(ua=ua.clone(),ua.width-=C,Q.setGeometry(R,ua))}}}finally{Q.endUpdate()}};Graph.prototype.deleteTableRow=function(C){var Q=this.getModel();Q.beginUpdate();
+try{var R=C,X=C;this.isTableCell(C)&&(C=X=Q.getParent(C));this.isTableRow(C)&&(R=Q.getParent(X));var ha=Q.getChildCells(R,!0);if(1>=ha.length)Q.remove(R);else{this.isTableRow(X)||(X=ha[ha.length-1]);Q.remove(X);C=0;var ia=this.getCellGeometry(X);null!=ia&&(C=ia.height);var pa=this.getCellGeometry(R);null!=pa&&(pa=pa.clone(),pa.height-=C,Q.setGeometry(R,pa))}}finally{Q.endUpdate()}};Graph.prototype.insertRow=function(C,Q){for(var R=C.tBodies[0],X=R.rows[0].cells,ha=C=0;ha<X.length;ha++){var ia=X[ha].getAttribute("colspan");
+C+=null!=ia?parseInt(ia):1}Q=R.insertRow(Q);for(ha=0;ha<C;ha++)mxUtils.br(Q.insertCell(-1));return Q.cells[0]};Graph.prototype.deleteRow=function(C,Q){C.tBodies[0].deleteRow(Q)};Graph.prototype.insertColumn=function(C,Q){var R=C.tHead;if(null!=R)for(var X=0;X<R.rows.length;X++){var ha=document.createElement("th");R.rows[X].appendChild(ha);mxUtils.br(ha)}C=C.tBodies[0];for(R=0;R<C.rows.length;R++)X=C.rows[R].insertCell(Q),mxUtils.br(X);return C.rows[0].cells[0<=Q?Q:C.rows[0].cells.length-1]};Graph.prototype.deleteColumn=
+function(C,Q){if(0<=Q){C=C.tBodies[0].rows;for(var R=0;R<C.length;R++)C[R].cells.length>Q&&C[R].deleteCell(Q)}};Graph.prototype.pasteHtmlAtCaret=function(C){if(window.getSelection){var Q=window.getSelection();if(Q.getRangeAt&&Q.rangeCount){Q=Q.getRangeAt(0);Q.deleteContents();var R=document.createElement("div");R.innerHTML=C;C=document.createDocumentFragment();for(var X;X=R.firstChild;)lastNode=C.appendChild(X);Q.insertNode(C)}}else(Q=document.selection)&&"Control"!=Q.type&&Q.createRange().pasteHTML(C)};
+Graph.prototype.createLinkForHint=function(C,Q,R){function X(ia,pa){ia.length>pa&&(ia=ia.substring(0,Math.round(pa/2))+"..."+ia.substring(ia.length-Math.round(pa/4)));return ia}C=null!=C?C:"javascript:void(0);";if(null==Q||0==Q.length)Q=this.isCustomLink(C)?this.getLinkTitle(C):C;var ha=document.createElement("a");ha.setAttribute("rel",this.linkRelation);ha.setAttribute("href",this.getAbsoluteUrl(C));ha.setAttribute("title",X(this.isCustomLink(C)?this.getLinkTitle(C):C,80));null!=this.linkTarget&&
+ha.setAttribute("target",this.linkTarget);mxUtils.write(ha,X(Q,40));this.isCustomLink(C)&&mxEvent.addListener(ha,"click",mxUtils.bind(this,function(ia){this.customLinkClicked(C,R);mxEvent.consume(ia)}));return ha};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ia,pa){this.popupMenuHandler.hideMenu()});var C=this.updateMouseEvent;this.updateMouseEvent=function(ia){ia=
+C.apply(this,arguments);if(mxEvent.isTouchEvent(ia.getEvent())&&null==ia.getState()){var pa=this.getCellAt(ia.graphX,ia.graphY);null!=pa&&this.isSwimlane(pa)&&this.hitsSwimlaneContent(pa,ia.graphX,ia.graphY)||(ia.state=this.view.getState(pa),null!=ia.state&&null!=ia.state.shape&&(this.container.style.cursor=ia.state.shape.node.style.cursor))}null==ia.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ia};var Q=!1,R=!1,X=!1,ha=this.fireMouseEvent;this.fireMouseEvent=function(ia,
+pa,xa){ia==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),Q=this.isCellSelected(pa.getCell()),R=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());ha.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ia,pa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(pa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==pa.getState()||!pa.isSource(pa.getState().control))&&(this.popupMenuHandler.popupTrigger||
+!X&&!xa&&(R&&null==pa.getCell()&&this.isSelectionEmpty()||Q&&this.isCellSelected(pa.getCell())));xa=!Q||xa?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ua=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(pa.getX()+ua.x+1,pa.getY()+ua.y+1,ra,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ia,pa,xa])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};
+mxCellEditor.prototype.isContentEditing=function(){var C=this.graph.view.getState(this.editingCell);return null!=C&&1==C.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var C="";window.getSelection?C=window.getSelection():document.getSelection?C=document.getSelection():document.selection&&(C=document.selection.createRange().text);return""!=
+C};mxCellEditor.prototype.insertTab=function(C){var Q=this.textarea.ownerDocument.defaultView.getSelection(),R=Q.getRangeAt(0);C=Graph.createTabNode(C);R.insertNode(C);R.setStartAfter(C);R.setEndAfter(C);Q.removeAllRanges();Q.addRange(R)};mxCellEditor.prototype.alignText=function(C,Q){var R=this.graph.getView().getState(this.editingCell);if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var X=null!=R&&"vertical-"==R.substring(0,9),ha=null!=
+Q&&mxEvent.isShiftDown(Q);if(ha||null!=window.getSelection&&null!=window.getSelection().containsNode){var ia=!0;this.graph.processElements(this.textarea,function(pa){ha||X||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ia=!1});(ia||X)&&this.graph.cellEditor.setAlign(C)}X||document.execCommand("justify"+C.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var C=window.getSelection();if(C.getRangeAt&&C.rangeCount){for(var Q=
+[],R=0,X=C.rangeCount;R<X;++R)Q.push(C.getRangeAt(R));return Q}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(C){try{if(C)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var Q=0,R=C.length;Q<R;++Q)sel.addRange(C[Q])}else document.selection&&C.select&&C.select()}catch(X){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
+function(C){null!=C.text&&(C.text.replaceLinefeeds="0"!=mxUtils.getValue(C.style,"nl2Br","1"));F.apply(this,arguments)};var G=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(C,Q){this.isKeepFocusEvent(C)||!mxEvent.isAltDown(C.getEvent())?G.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(C){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var L=mxCellEditor.prototype.startEditing;
+mxCellEditor.prototype.startEditing=function(C,Q){C=this.graph.getStartEditingCell(C,Q);L.apply(this,arguments);var R=this.graph.view.getState(C);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(C)};mxCellEditor.prototype.toggleViewMode=function(){var C=this.graph.view.getState(this.editingCell);
+if(null!=C){var Q=null!=C&&"0"!=mxUtils.getValue(C.style,"nl2Br","1"),R=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=Graph.sanitizeHtml(Q?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(C.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
+Q=mxUtils.getValue(C.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(C.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ha=(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ia=(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,pa=[];(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
+pa.push("underline");(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&pa.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration=pa.join(" ");this.textarea.style.fontWeight=ha?"bold":"normal";this.textarea.style.fontStyle=ia?"italic":"";this.textarea.style.fontFamily=
Q;this.textarea.style.textAlign=X;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText=
"");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=Graph.sanitizeHtml(Q?xa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):xa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ra=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;
this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
-this.switchSelectionState=R;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(B,Q){if(null!=this.textarea)if(B=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=B){var R=B.view.scale;this.bounds=mxRectangle.fromRectangle(B);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*R;this.bounds.height=60*R;var X=null!=B.text?B.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(B.style,mxConstants.STYLE_ALIGN,
-mxConstants.ALIGN_CENTER),mxUtils.getValue(B.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/R)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/R)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/R)+(this.textarea.offsetHeight-
+this.switchSelectionState=R;this.resize()}};var M=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(C,Q){if(null!=this.textarea)if(C=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=C){var R=C.view.scale;this.bounds=mxRectangle.fromRectangle(C);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*R;this.bounds.height=60*R;var X=null!=C.text?C.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(C.style,mxConstants.STYLE_ALIGN,
+mxConstants.ALIGN_CENTER),mxUtils.getValue(C.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/R)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/R)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/R)+(this.textarea.offsetHeight-
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*R);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/R)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*R);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+R+","+
-R+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(B,Q){if("0"==mxUtils.getValue(B.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var R=this.graph.getEditingValue(B.cell,Q);"1"==mxUtils.getValue(B.style,"nl2Br","1")&&(R=R.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(R,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;
-mxCellEditor.prototype.setEditingValue=function(B,Q){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(B.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(B){if("0"==mxUtils.getValue(B.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,
-Graph.backupStyleAttribute);var Q=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(B.style,"nl2Br","1")?(Q=Q.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<Q.length&&("<br/>"==Q.substring(Q.length-5)||"<br>"==Q.substring(Q.length-4))&&(Q=Q.substring(0,Q.lastIndexOf("<br"))+"<div><br/></div>")):Q=Q.replace(/\r\n/g,"").replace(/\n/g,"");return Q};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(B){this.codeViewMode&&this.toggleViewMode();K.apply(this,
-arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(B){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(B,Q){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==Q&&this.graph.isCellDeletable(B.cell)&&0==this.graph.model.getChildCount(B.cell)&&this.graph.isTransparentState(B)&&this.graph.removeCells([B.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
-function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);B==mxConstants.NONE&&(B=null);return B};mxCellEditor.prototype.getBorderColor=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);B==mxConstants.NONE&&(B=null);return B};mxCellEditor.prototype.getMinimumSize=function(B){var Q=this.graph.getView().scale;return new mxRectangle(0,0,null==B.text?30:B.text.size*Q+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;
-mxGraphHandler.prototype.isValidDropTarget=function(B,Q){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(Q.getEvent)};mxGraphView.prototype.formatUnitText=function(B){return B?f(B,this.unit):B};mxGraphHandler.prototype.updateHint=function(B){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var Q=this.graph.view.translate,R=this.graph.view.scale;B=this.roundLength((this.bounds.x+
-this.currentDx)/R-Q.x);Q=this.roundLength((this.bounds.y+this.currentDy)/R-Q.y);R=this.graph.view.unit;this.hint.innerHTML=f(B,R)+", "+f(Q,R);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};
-var ha=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(B,Q){ha.apply(this,arguments);var R=this.graph.getCellStyle(B);if(null==R.childLayout){var X=this.graph.model.getParent(B),ia=null!=X?this.graph.getCellGeometry(X):null;if(null!=ia&&(R=this.graph.getCellStyle(X),"stackLayout"==R.childLayout)){var ja=parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));R="1"==mxUtils.getValue(R,"horizontalStack","1");var pa=this.graph.getActualStartSize(X);
-ia=ia.clone();R?ia.height=Q.height+pa.y+pa.height+2*ja:ia.width=Q.width+pa.x+pa.width+2*ja;this.graph.model.setGeometry(X,ia)}}};var ca=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function B(xa){R.get(xa)||(R.put(xa,!0),ia.push(xa))}for(var Q=ca.apply(this,arguments),R=new mxDictionary,X=this.graph.model,ia=[],ja=0;ja<Q.length;ja++){var pa=Q[ja];this.graph.isTableCell(pa)?B(X.getParent(X.getParent(pa))):this.graph.isTableRow(pa)&&
-B(X.getParent(pa));B(pa)}return ia};var aa=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(B){return aa.apply(this,arguments)&&!mxEvent.isControlDown(B.getEvent())&&!mxEvent.isShiftDown(B.getEvent())};var oa=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return oa.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&
-!this.graph.isSwimlane(this.state.cell)};var da=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(B){var Q=da.apply(this,arguments);Q.stroke="#C0C0C0";Q.strokewidth=1;return Q};var ka=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(B){var Q=ka.apply(this,arguments);Q.stroke="#C0C0C0";Q.strokewidth=1;return Q};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
-function(){var B=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+B.x/2,this.bounds.y+this.rotationHandleVSpacing-B.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(B,Q){return this.graph.isRecursiveVertexResize(B)&&!mxEvent.isAltDown(Q.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(B,Q){return mxEvent.isControlDown(Q.getEvent())||mxEvent.isMetaDown(Q.getEvent())};var ba=mxVertexHandler.prototype.isRotationHandleVisible;
-mxVertexHandler.prototype.isRotationHandleVisible=function(){return ba.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var V=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=
-function(){return V.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var k=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(B){return B.tableHandle||k.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var B=0;this.graph.isTableRow(this.state.cell)?B=1:this.graph.isTableCell(this.state.cell)&&
-(B=2);return B};var v=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return v.apply(this,arguments).grow(-this.getSelectionBorderInset())};var I=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==I&&(I=mxCellRenderer.defaultShapes.tableLine);var B=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var Q=function(Za,
-Pa,Ra){for(var fb=[],eb=0;eb<Za.length;eb++){var bb=Za[eb];fb.push(null==bb?null:new mxPoint((ra+bb.x+Pa)*ja,(ua+bb.y+Ra)*ja))}return fb},R=this,X=this.graph,ia=X.model,ja=X.view.scale,pa=this.state,xa=this.selectionBorder,ra=this.state.origin.x+X.view.translate.x,ua=this.state.origin.y+X.view.translate.y;null==B&&(B=[]);var Ka=X.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Ka.length){var Va=ia.getChildCells(Ka[0].cell,!0),Oa=X.getTableLines(this.state.cell,!1,!0),Ta=X.getTableLines(this.state.cell,
-!0,!1);for(ia=0;ia<Ka.length;ia++)mxUtils.bind(this,function(Za){var Pa=Ka[Za],Ra=null;if(X.isCellMovable(Pa.cell)){Ra=Za<Ka.length-1?Ka[Za+1]:null;Ra=null!=Ra?X.getCellGeometry(Ra.cell):null;var fb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:Ra;Ra=null!=Ta[Za]?new I(Ta[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ra.isDashed=xa.isDashed;Ra.svgStrokeTolerance++;Ra=new mxHandle(Pa,"row-resize",null,Ra);Ra.tableHandle=!0;var eb=0;Ra.shape.node.parentNode.insertBefore(Ra.shape.node,
-Ra.shape.node.parentNode.firstChild);Ra.redraw=function(){if(null!=this.shape){this.shape.stroke=0==eb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==I)this.shape.line=Q(Ta[Za],0,eb),this.shape.updateBoundsFromLine();else{var db=X.getActualStartSize(pa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+eb*ja;this.shape.bounds.x=pa.x+(Za==Ka.length-1?0:db.x*ja);this.shape.bounds.width=pa.width-(Za==Ka.length-1?0:db.width+db.x+ja)}this.shape.redraw()}};var bb=
-!1;Ra.setPosition=function(db,mb,lb){eb=Math.max(Graph.minTableRowHeight-db.height,mb.y-db.y-db.height);bb=mxEvent.isShiftDown(lb.getEvent());null!=fb&&bb&&(eb=Math.min(eb,fb.height-Graph.minTableRowHeight))};Ra.execute=function(db){if(0!=eb)X.setTableRowHeight(this.state.cell,eb,!bb);else if(!R.blockDelayedSelection){var mb=X.getCellAt(db.getGraphX(),db.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(mb,db)}eb=0};Ra.reset=function(){eb=0}}B.push(Ra)})(ia);for(ia=0;ia<Va.length;ia++)mxUtils.bind(this,
-function(Za){var Pa=X.view.getState(Va[Za]),Ra=X.getCellGeometry(Va[Za]),fb=null!=Ra.alternateBounds?Ra.alternateBounds:Ra;null==Pa&&(Pa=new mxCellState(X.view,Va[Za],X.getCellStyle(Va[Za])),Pa.x=pa.x+Ra.x*ja,Pa.y=pa.y+Ra.y*ja,Pa.width=fb.width*ja,Pa.height=fb.height*ja,Pa.updateCachedBounds());Ra=Za<Va.length-1?Va[Za+1]:null;Ra=null!=Ra?X.getCellGeometry(Ra):null;var eb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:Ra;Ra=null!=Oa[Za]?new I(Oa[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,
-mxConstants.NONE,1,!0);Ra.isDashed=xa.isDashed;Ra.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Ra);Pa.tableHandle=!0;var bb=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==bb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==I)this.shape.line=Q(Oa[Za],bb,0),this.shape.updateBoundsFromLine();else{var mb=X.getActualStartSize(pa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
-this.state.x+(fb.width+bb)*ja;this.shape.bounds.y=pa.y+(Za==Va.length-1?0:mb.y*ja);this.shape.bounds.height=pa.height-(Za==Va.length-1?0:(mb.height+mb.y)*ja)}this.shape.redraw()}};var db=!1;Pa.setPosition=function(mb,lb,pb){bb=Math.max(Graph.minTableColumnWidth-fb.width,lb.x-mb.x-fb.width);db=mxEvent.isShiftDown(pb.getEvent());null==eb||db||(bb=Math.min(bb,eb.width-Graph.minTableColumnWidth))};Pa.execute=function(mb){if(0!=bb)X.setTableColumnWidth(this.state.cell,bb,db);else if(!R.blockDelayedSelection){var lb=
-X.getCellAt(mb.getGraphX(),mb.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(lb,mb)}bb=0};Pa.positionChanged=function(){};Pa.reset=function(){bb=0};B.push(Pa)})(ia)}}return null!=B?B.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(B){T.apply(this,arguments);if(null!=this.moveHandles)for(var Q=0;Q<this.moveHandles.length;Q++)null!=this.moveHandles[Q]&&(this.moveHandles[Q].node.style.visibility=B?"":"hidden");if(null!=this.cornerHandles)for(Q=
-0;Q<this.cornerHandles.length;Q++)this.cornerHandles[Q].node.style.visibility=B?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var B=this.isMoveHandlesVisible();B&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():B||null==this.moveHandles||this.destroyMoveHandles();if(B&&null==this.moveHandles){for(B=0;B<this.moveHandles.length;B++)null!=
-this.moveHandles[B]&&this.moveHandles[B].parentNode.removeChild(this.moveHandles[B]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var B=this.graph,Q=B.model,R=[],X=0;X<Q.getChildCount(this.state.cell);X++)mxUtils.bind(this,function(ia){if(null!=ia&&Q.isVertex(ia.cell)&&B.isCellMovable(ia.cell)){var ja=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ja=new mxImageShape(ja,this.rowHandleImage.src);ja.rowState=ia;ja.dialect=this.graph.dialect!=
-mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ja.init(this.graph.getView().getOverlayPane());ja.node.style.cursor="move";mxEvent.addGestureListeners(ja.node,mxUtils.bind(this,function(pa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(pa)&&this.graph.isCellSelected(ia.cell)||this.graph.selectCellForEvent(ia.cell,pa);mxEvent.isPopupTrigger(pa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(pa),mxEvent.getClientY(pa),
-this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(pa),this.graph.isMouseDown=!0);mxEvent.consume(pa)}),null,mxUtils.bind(this,function(pa){mxEvent.isPopupTrigger(pa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(pa),mxEvent.getClientY(pa),ia.cell,pa),mxEvent.consume(pa))}));R.push(ja)}else R.push(null)})(this.graph.view.getState(Q.getChildAt(this.state.cell,X)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=
-this.moveHandles){for(var B=0;B<this.moveHandles.length;B++)null!=this.moveHandles[B]&&this.moveHandles[B].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var B=0;B<this.cornerHandles.length;B++)null!=this.cornerHandles[B]&&null!=this.cornerHandles[B].node&&null!=this.cornerHandles[B].node.parentNode&&this.cornerHandles[B].node.parentNode.removeChild(this.cornerHandles[B].node);this.cornerHandles=null}};var W=mxVertexHandler.prototype.refresh;
-mxVertexHandler.prototype.refresh=function(){W.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var B=0;4>B;B++){var Q=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",
-mxConstants.HANDLE_STROKECOLOR);Q.dialect=mxConstants.DIALECT_SVG;Q.init(this.graph.view.getOverlayPane());this.cornerHandles.push(Q)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();B=this.graph.getLinkForCell(this.state.cell);Q=this.graph.getLinksForState(this.state);this.updateLinkHint(B,Q)};var U=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var B=new mxPoint(0,0),Q=this.tolerance,R=this.state.style.shape;
-null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=this.customHandles[X]&&null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var ia=this.customHandles[X].shape.bounds,ja=ia.getCenterX(),pa=ia.getCenterY();if(Math.abs(this.state.x-ja)<ia.width/2||Math.abs(this.state.y-pa)<ia.height/
-2||Math.abs(this.state.x+this.state.width-ja)<ia.width/2||Math.abs(this.state.y+this.state.height-pa)<ia.height/2){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(Q/=2,this.graph.isTable(this.state.cell)&&(Q+=7),B.x=this.sizers[0].bounds.width+Q,B.y=this.sizers[0].bounds.height+Q):B=U.apply(this,arguments);return B};mxVertexHandler.prototype.updateHint=function(B){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
-if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{B=this.state.view.scale;var Q=this.state.view.unit;this.hint.innerHTML=f(this.roundLength(this.bounds.width/B),Q)+" x "+f(this.roundLength(this.bounds.height/B),Q)}B=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==B&&(B=this.bounds);this.hint.style.left=B.x+Math.round((B.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
-B.y+B.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var Y=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){Y.apply(this,arguments);var B=this.graph.getLinkForCell(this.state.cell),Q=this.graph.getLinksForState(this.state);this.updateLinkHint(B,Q)};var fa=mxEdgeHandler.prototype.mouseMove;
-mxEdgeHandler.prototype.mouseMove=function(B,Q){fa.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var na=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(B,Q){na.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=
-function(B,Q,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var X=this.graph.view.translate,ia=this.graph.view.scale,ja=this.roundLength(Q.x/ia-X.x);X=this.roundLength(Q.y/ia-X.y);var pa=this.graph.view.unit;this.hint.innerHTML=f(ja,pa)+", "+f(X,pa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(pa==mxConstants.POINTS?Math.round(R.length/ia):f(R.length/ia,pa))+")");if(this.isSource||this.isTarget)null!=
-this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(B.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(B.getGraphY(),Q.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display=
+R+")")}else this.textarea.style.height="",this.textarea.style.overflow="",M.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(C,Q){if("0"==mxUtils.getValue(C.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var R=this.graph.getEditingValue(C.cell,Q);"1"==mxUtils.getValue(C.style,"nl2Br","1")&&(R=R.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(R,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;
+mxCellEditor.prototype.setEditingValue=function(C,Q){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(C.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(C){if("0"==mxUtils.getValue(C.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,
+Graph.backupStyleAttribute);var Q=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(C.style,"nl2Br","1")?(Q=Q.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<Q.length&&("<br/>"==Q.substring(Q.length-5)||"<br>"==Q.substring(Q.length-4))&&(Q=Q.substring(0,Q.lastIndexOf("<br"))+"<div><br/></div>")):Q=Q.replace(/\r\n/g,"").replace(/\n/g,"");return Q};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(C){this.codeViewMode&&this.toggleViewMode();K.apply(this,
+arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(C){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(C,Q){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==Q&&this.graph.isCellDeletable(C.cell)&&0==this.graph.model.getChildCount(C.cell)&&this.graph.isTransparentState(C)&&this.graph.removeCells([C.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
+function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);C==mxConstants.NONE&&(C=null);return C};mxCellEditor.prototype.getBorderColor=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);C==mxConstants.NONE&&(C=null);return C};mxCellEditor.prototype.getMinimumSize=function(C){var Q=this.graph.getView().scale;return new mxRectangle(0,0,null==C.text?30:C.text.size*Q+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;
+mxGraphHandler.prototype.isValidDropTarget=function(C,Q){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(Q.getEvent)};mxGraphView.prototype.formatUnitText=function(C){return C?f(C,this.unit):C};mxGraphHandler.prototype.updateHint=function(C){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var Q=this.graph.view.translate,R=this.graph.view.scale;C=this.roundLength((this.bounds.x+
+this.currentDx)/R-Q.x);Q=this.roundLength((this.bounds.y+this.currentDy)/R-Q.y);R=this.graph.view.unit;this.hint.innerHTML=f(C,R)+", "+f(Q,R);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};
+var ja=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(C,Q){ja.apply(this,arguments);var R=this.graph.getCellStyle(C);if(null==R.childLayout){var X=this.graph.model.getParent(C),ha=null!=X?this.graph.getCellGeometry(X):null;if(null!=ha&&(R=this.graph.getCellStyle(X),"stackLayout"==R.childLayout)){var ia=parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));R="1"==mxUtils.getValue(R,"horizontalStack","1");var pa=this.graph.getActualStartSize(X);
+ha=ha.clone();R?ha.height=Q.height+pa.y+pa.height+2*ia:ha.width=Q.width+pa.x+pa.width+2*ia;this.graph.model.setGeometry(X,ha)}}};var da=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function C(xa){R.get(xa)||(R.put(xa,!0),ha.push(xa))}for(var Q=da.apply(this,arguments),R=new mxDictionary,X=this.graph.model,ha=[],ia=0;ia<Q.length;ia++){var pa=Q[ia];this.graph.isTableCell(pa)?C(X.getParent(X.getParent(pa))):this.graph.isTableRow(pa)&&
+C(X.getParent(pa));C(pa)}return ha};var ba=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(C){return ba.apply(this,arguments)&&!mxEvent.isControlDown(C.getEvent())&&!mxEvent.isShiftDown(C.getEvent())};var na=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return na.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&
+!this.graph.isSwimlane(this.state.cell)};var ca=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(C){var Q=ca.apply(this,arguments);Q.stroke="#C0C0C0";Q.strokewidth=1;return Q};var ka=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(C){var Q=ka.apply(this,arguments);Q.stroke="#C0C0C0";Q.strokewidth=1;return Q};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
+function(){var C=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+C.x/2,this.bounds.y+this.rotationHandleVSpacing-C.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(C,Q){return this.graph.isRecursiveVertexResize(C)&&!mxEvent.isAltDown(Q.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(C,Q){return mxEvent.isControlDown(Q.getEvent())||mxEvent.isMetaDown(Q.getEvent())};var aa=mxVertexHandler.prototype.isRotationHandleVisible;
+mxVertexHandler.prototype.isRotationHandleVisible=function(){return aa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var V=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=
+function(){return V.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var k=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(C){return C.tableHandle||k.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var C=0;this.graph.isTableRow(this.state.cell)?C=1:this.graph.isTableCell(this.state.cell)&&
+(C=2);return C};var v=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return v.apply(this,arguments).grow(-this.getSelectionBorderInset())};var J=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==J&&(J=mxCellRenderer.defaultShapes.tableLine);var C=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var Q=function(Za,
+Pa,Ra){for(var fb=[],eb=0;eb<Za.length;eb++){var bb=Za[eb];fb.push(null==bb?null:new mxPoint((ra+bb.x+Pa)*ia,(ua+bb.y+Ra)*ia))}return fb},R=this,X=this.graph,ha=X.model,ia=X.view.scale,pa=this.state,xa=this.selectionBorder,ra=this.state.origin.x+X.view.translate.x,ua=this.state.origin.y+X.view.translate.y;null==C&&(C=[]);var Ka=X.view.getCellStates(ha.getChildCells(this.state.cell,!0));if(0<Ka.length){var Va=ha.getChildCells(Ka[0].cell,!0),Oa=X.getTableLines(this.state.cell,!1,!0),Ta=X.getTableLines(this.state.cell,
+!0,!1);for(ha=0;ha<Ka.length;ha++)mxUtils.bind(this,function(Za){var Pa=Ka[Za],Ra=null;if(X.isCellMovable(Pa.cell)){Ra=Za<Ka.length-1?Ka[Za+1]:null;Ra=null!=Ra?X.getCellGeometry(Ra.cell):null;var fb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:Ra;Ra=null!=Ta[Za]?new J(Ta[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ra.isDashed=xa.isDashed;Ra.svgStrokeTolerance++;Ra=new mxHandle(Pa,"row-resize",null,Ra);Ra.tableHandle=!0;var eb=0;Ra.shape.node.parentNode.insertBefore(Ra.shape.node,
+Ra.shape.node.parentNode.firstChild);Ra.redraw=function(){if(null!=this.shape){this.shape.stroke=0==eb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=Q(Ta[Za],0,eb),this.shape.updateBoundsFromLine();else{var db=X.getActualStartSize(pa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+eb*ia;this.shape.bounds.x=pa.x+(Za==Ka.length-1?0:db.x*ia);this.shape.bounds.width=pa.width-(Za==Ka.length-1?0:db.width+db.x+ia)}this.shape.redraw()}};var bb=
+!1;Ra.setPosition=function(db,mb,lb){eb=Math.max(Graph.minTableRowHeight-db.height,mb.y-db.y-db.height);bb=mxEvent.isShiftDown(lb.getEvent());null!=fb&&bb&&(eb=Math.min(eb,fb.height-Graph.minTableRowHeight))};Ra.execute=function(db){if(0!=eb)X.setTableRowHeight(this.state.cell,eb,!bb);else if(!R.blockDelayedSelection){var mb=X.getCellAt(db.getGraphX(),db.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(mb,db)}eb=0};Ra.reset=function(){eb=0}}C.push(Ra)})(ha);for(ha=0;ha<Va.length;ha++)mxUtils.bind(this,
+function(Za){var Pa=X.view.getState(Va[Za]),Ra=X.getCellGeometry(Va[Za]),fb=null!=Ra.alternateBounds?Ra.alternateBounds:Ra;null==Pa&&(Pa=new mxCellState(X.view,Va[Za],X.getCellStyle(Va[Za])),Pa.x=pa.x+Ra.x*ia,Pa.y=pa.y+Ra.y*ia,Pa.width=fb.width*ia,Pa.height=fb.height*ia,Pa.updateCachedBounds());Ra=Za<Va.length-1?Va[Za+1]:null;Ra=null!=Ra?X.getCellGeometry(Ra):null;var eb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:Ra;Ra=null!=Oa[Za]?new J(Oa[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,
+mxConstants.NONE,1,!0);Ra.isDashed=xa.isDashed;Ra.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Ra);Pa.tableHandle=!0;var bb=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==bb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=Q(Oa[Za],bb,0),this.shape.updateBoundsFromLine();else{var mb=X.getActualStartSize(pa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
+this.state.x+(fb.width+bb)*ia;this.shape.bounds.y=pa.y+(Za==Va.length-1?0:mb.y*ia);this.shape.bounds.height=pa.height-(Za==Va.length-1?0:(mb.height+mb.y)*ia)}this.shape.redraw()}};var db=!1;Pa.setPosition=function(mb,lb,pb){bb=Math.max(Graph.minTableColumnWidth-fb.width,lb.x-mb.x-fb.width);db=mxEvent.isShiftDown(pb.getEvent());null==eb||db||(bb=Math.min(bb,eb.width-Graph.minTableColumnWidth))};Pa.execute=function(mb){if(0!=bb)X.setTableColumnWidth(this.state.cell,bb,db);else if(!R.blockDelayedSelection){var lb=
+X.getCellAt(mb.getGraphX(),mb.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(lb,mb)}bb=0};Pa.positionChanged=function(){};Pa.reset=function(){bb=0};C.push(Pa)})(ha)}}return null!=C?C.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(C){T.apply(this,arguments);if(null!=this.moveHandles)for(var Q=0;Q<this.moveHandles.length;Q++)null!=this.moveHandles[Q]&&(this.moveHandles[Q].node.style.visibility=C?"":"hidden");if(null!=this.cornerHandles)for(Q=
+0;Q<this.cornerHandles.length;Q++)this.cornerHandles[Q].node.style.visibility=C?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var C=this.isMoveHandlesVisible();C&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():C||null==this.moveHandles||this.destroyMoveHandles();if(C&&null==this.moveHandles){for(C=0;C<this.moveHandles.length;C++)null!=
+this.moveHandles[C]&&this.moveHandles[C].parentNode.removeChild(this.moveHandles[C]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var C=this.graph,Q=C.model,R=[],X=0;X<Q.getChildCount(this.state.cell);X++)mxUtils.bind(this,function(ha){if(null!=ha&&Q.isVertex(ha.cell)&&C.isCellMovable(ha.cell)){var ia=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ia=new mxImageShape(ia,this.rowHandleImage.src);ia.rowState=ha;ia.dialect=this.graph.dialect!=
+mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ia.init(this.graph.getView().getOverlayPane());ia.node.style.cursor="move";mxEvent.addGestureListeners(ia.node,mxUtils.bind(this,function(pa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(pa)&&this.graph.isCellSelected(ha.cell)||this.graph.selectCellForEvent(ha.cell,pa);mxEvent.isPopupTrigger(pa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(pa),mxEvent.getClientY(pa),
+this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(pa),this.graph.isMouseDown=!0);mxEvent.consume(pa)}),null,mxUtils.bind(this,function(pa){mxEvent.isPopupTrigger(pa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(pa),mxEvent.getClientY(pa),ha.cell,pa),mxEvent.consume(pa))}));R.push(ia)}else R.push(null)})(this.graph.view.getState(Q.getChildAt(this.state.cell,X)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=
+this.moveHandles){for(var C=0;C<this.moveHandles.length;C++)null!=this.moveHandles[C]&&this.moveHandles[C].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var C=0;C<this.cornerHandles.length;C++)null!=this.cornerHandles[C]&&null!=this.cornerHandles[C].node&&null!=this.cornerHandles[C].node.parentNode&&this.cornerHandles[C].node.parentNode.removeChild(this.cornerHandles[C].node);this.cornerHandles=null}};var W=mxVertexHandler.prototype.refresh;
+mxVertexHandler.prototype.refresh=function(){W.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var C=0;4>C;C++){var Q=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",
+mxConstants.HANDLE_STROKECOLOR);Q.dialect=mxConstants.DIALECT_SVG;Q.init(this.graph.view.getOverlayPane());this.cornerHandles.push(Q)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();C=this.graph.getLinkForCell(this.state.cell);Q=this.graph.getLinksForState(this.state);this.updateLinkHint(C,Q)};var U=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var C=new mxPoint(0,0),Q=this.tolerance,R=this.state.style.shape;
+null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=this.customHandles[X]&&null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var ha=this.customHandles[X].shape.bounds,ia=ha.getCenterX(),pa=ha.getCenterY();if(Math.abs(this.state.x-ia)<ha.width/2||Math.abs(this.state.y-pa)<ha.height/
+2||Math.abs(this.state.x+this.state.width-ia)<ha.width/2||Math.abs(this.state.y+this.state.height-pa)<ha.height/2){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(Q/=2,this.graph.isTable(this.state.cell)&&(Q+=7),C.x=this.sizers[0].bounds.width+Q,C.y=this.sizers[0].bounds.height+Q):C=U.apply(this,arguments);return C};mxVertexHandler.prototype.updateHint=function(C){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
+if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{C=this.state.view.scale;var Q=this.state.view.unit;this.hint.innerHTML=f(this.roundLength(this.bounds.width/C),Q)+" x "+f(this.roundLength(this.bounds.height/C),Q)}C=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==C&&(C=this.bounds);this.hint.style.left=C.x+Math.round((C.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
+C.y+C.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var Y=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){Y.apply(this,arguments);var C=this.graph.getLinkForCell(this.state.cell),Q=this.graph.getLinksForState(this.state);this.updateLinkHint(C,Q)};var fa=mxEdgeHandler.prototype.mouseMove;
+mxEdgeHandler.prototype.mouseMove=function(C,Q){fa.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var oa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(C,Q){oa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=
+function(C,Q,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var X=this.graph.view.translate,ha=this.graph.view.scale,ia=this.roundLength(Q.x/ha-X.x);X=this.roundLength(Q.y/ha-X.y);var pa=this.graph.view.unit;this.hint.innerHTML=f(ia,pa)+", "+f(X,pa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(pa==mxConstants.POINTS?Math.round(R.length/ha):f(R.length/ha,pa))+")");if(this.isSource||this.isTarget)null!=
+this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(C.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(C.getGraphY(),Q.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display=
"none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');
mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');
HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+
@@ -2718,415 +2722,415 @@ HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy=
HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.endFixedHandleImage=HoverIcons.prototype.endFixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=
HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=32;mxGraphHandler.prototype.previewColor="light-dark(#000000, #cccccc)";mxRubberband.prototype.defaultOpacity=
30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=
-function(B){return!mxEvent.isShiftDown(B.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(B){return!mxEvent.isShiftDown(B.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(B){return mxEvent.isMouseEvent(B.getEvent())?
-4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(B){var Q=B.getEvent();return null==B.getState()&&!mxEvent.isMouseEvent(Q)||mxEvent.isPopupTrigger(Q)&&(null==B.getState()||mxEvent.isControlDown(Q)||mxEvent.isShiftDown(Q))}}else mxPanningHandler.prototype.isPanningTrigger=function(B){var Q=B.getEvent();return mxEvent.isLeftMouseButton(Q)&&(this.useLeftButtonForPanning&&null==B.getState()||mxEvent.isControlDown(Q)&&!mxEvent.isShiftDown(Q))||this.usePopupTrigger&&mxEvent.isPopupTrigger(Q)};
-mxRubberband.prototype.isSpaceEvent=function(B){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(B.getEvent())||mxEvent.isMetaDown(B.getEvent()))&&mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(B,Q){if(this.cancelled)this.cancelled=!1,Q.consume();else{var R=
-null!=this.div&&"none"!=this.div.style.display,X=null,ia=null,ja=B=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ia=this.first.y,B=(this.currentX-X)/this.graph.view.scale,ja=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||(B=this.graph.snap(B),ja=this.graph.snap(ja),this.graph.isGridEnabled()||(Math.abs(B)<this.graph.tolerance&&(B=0),Math.abs(ja)<this.graph.tolerance&&(ja=0))));this.reset();if(R){if(this.isSpaceEvent(Q)){this.graph.model.beginUpdate();
-try{var pa=this.graph.getCellsBeyond(X,ia,this.graph.getDefaultParent(),!0,!0);for(R=0;R<pa.length;R++)if(this.graph.isCellMovable(pa[R])){var xa=this.graph.view.getState(pa[R]),ra=this.graph.getCellGeometry(pa[R]);null!=xa&&null!=ra&&(ra=ra.clone(),ra.translate(B,ja),this.graph.model.setGeometry(pa[R],ra))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,Q.getEvent());Q.consume()}}};mxRubberband.prototype.mouseMove=function(B,
-Q){if(!Q.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);B=mxUtils.getOffset(this.graph.container);R.x-=B.x;R.y-=B.y;B=Q.getX()+R.x;R=Q.getY()+R.y;var X=this.first.x-B,ia=this.first.y-R,ja=this.graph.tolerance;if(null!=this.div||Math.abs(X)>ja||Math.abs(ia)>ja)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(B,R),this.isSpaceEvent(Q)?(B=this.x+this.width,R=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||
-(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=B-this.width),this.y<this.first.y&&(this.y=R-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=
+function(C){return!mxEvent.isShiftDown(C.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(C){return!mxEvent.isShiftDown(C.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(C){return mxEvent.isMouseEvent(C.getEvent())?
+4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(C){var Q=C.getEvent();return null==C.getState()&&!mxEvent.isMouseEvent(Q)||mxEvent.isPopupTrigger(Q)&&(null==C.getState()||mxEvent.isControlDown(Q)||mxEvent.isShiftDown(Q))}}else mxPanningHandler.prototype.isPanningTrigger=function(C){var Q=C.getEvent();return mxEvent.isLeftMouseButton(Q)&&(this.useLeftButtonForPanning&&null==C.getState()||mxEvent.isControlDown(Q)&&!mxEvent.isShiftDown(Q))||this.usePopupTrigger&&mxEvent.isPopupTrigger(Q)};
+mxRubberband.prototype.isSpaceEvent=function(C){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(C.getEvent())||mxEvent.isMetaDown(C.getEvent()))&&mxEvent.isShiftDown(C.getEvent())&&mxEvent.isAltDown(C.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(C,Q){if(this.cancelled)this.cancelled=!1,Q.consume();else{var R=
+null!=this.div&&"none"!=this.div.style.display,X=null,ha=null,ia=C=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ha=this.first.y,C=(this.currentX-X)/this.graph.view.scale,ia=(this.currentY-ha)/this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||(C=this.graph.snap(C),ia=this.graph.snap(ia),this.graph.isGridEnabled()||(Math.abs(C)<this.graph.tolerance&&(C=0),Math.abs(ia)<this.graph.tolerance&&(ia=0))));this.reset();if(R){if(this.isSpaceEvent(Q)){this.graph.model.beginUpdate();
+try{var pa=this.graph.getCellsBeyond(X,ha,this.graph.getDefaultParent(),!0,!0);for(R=0;R<pa.length;R++)if(this.graph.isCellMovable(pa[R])){var xa=this.graph.view.getState(pa[R]),ra=this.graph.getCellGeometry(pa[R]);null!=xa&&null!=ra&&(ra=ra.clone(),ra.translate(C,ia),this.graph.model.setGeometry(pa[R],ra))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,Q.getEvent());Q.consume()}}};mxRubberband.prototype.mouseMove=function(C,
+Q){if(!Q.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);C=mxUtils.getOffset(this.graph.container);R.x-=C.x;R.y-=C.y;C=Q.getX()+R.x;R=Q.getY()+R.y;var X=this.first.x-C,ha=this.first.y-R,ia=this.graph.tolerance;if(null!=this.div||Math.abs(X)>ia||Math.abs(ha)>ia)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(C,R),this.isSpaceEvent(Q)?(C=this.x+this.width,R=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||
+(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=C-this.width),this.y<this.first.y&&(this.y=R-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=
this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):
(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),Q.consume()}};var la=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);la.apply(this,arguments)};var qa=(new Date).getTime(),ya=0,wa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=
-function(B,Q,R,X){wa.apply(this,arguments);R!=this.currentTerminalState?(qa=(new Date).getTime(),ya=0):ya=(new Date).getTime()-qa;this.currentTerminalState=R};var Ia=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(B){return mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())?!1:null!=this.currentTerminalState&&B.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
-"outlineConnect","1"))&&Ia.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(B,Q,R){Q=null!=B&&0==B;var X=this.state.getVisibleTerminalState(Q);B=null!=B&&null!=this.state.absolutePoints&&(0==B||B>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==B)?this.graph.getConnectionConstraint(this.state,X,Q):null;R=null!=(null!=B?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(Q),B):null)?R?this.endFixedHandleImage:this.fixedHandleImage:
-null!=B&&null!=X?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(B,Q,R,X){X=Q==mxEvent.ROTATION_HANDLE?
-HoverIcons.prototype.rotationHandle:Q==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:X;return Aa.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(B){if(null!=B&&1==B.length){var Q=this.graph.getModel(),R=Q.getParent(B[0]),X=this.graph.getCellGeometry(B[0]);if(Q.isEdge(R)&&null!=X&&X.relative&&(Q=this.graph.view.getState(B[0]),null!=Q&&2>Q.width&&2>Q.height&&null!=Q.text&&null!=Q.text.boundingBox))return mxRectangle.fromRectangle(Q.text.boundingBox)}return Ba.apply(this,
-arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var B=Ga.apply(this,arguments),Q=[],R=0;R<B.length;R++)"1"!=mxUtils.getValue(B[R].style,"part","0")&&Q.push(B[R]);return Q};var Ma=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(B){var Q=this.graph.getModel(),R=Q.getParent(B.cell),X=this.graph.getCellGeometry(B.cell);return Q.isEdge(R)&&null!=X&&X.relative&&2>B.width&&2>B.height&&null!=
-B.text&&null!=B.text.boundingBox?(Q=B.text.unrotatedBoundingBox||B.text.boundingBox,new mxRectangle(Math.round(Q.x),Math.round(Q.y),Math.round(Q.width),Math.round(Q.height))):Ma.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(B,Q){var R=this.graph.getModel(),X=R.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(Q)==mxEvent.ROTATION_HANDLE||!R.isEdge(X)||null==ia||!ia.relative||null==this.state||
-2<=this.state.width||2<=this.state.height)&&sa.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var B=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),Q=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&B==mxConstants.NONE&&Q==mxConstants.NONE?(B=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,
-B,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(B,Q){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Da=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
-function(B,Q){Da.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(B,Q){try{if(null==B&&(null==Q||0==Q.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
-this.linkHint=null);else if(null!=B||null!=Q&&0<Q.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var X=R.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
-X.style.paddingLeft="4px";X.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=B){var ia=document.createElement("div");
-ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(B,null,this.state.cell));this.linkHint.appendChild(ia);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ja=R.cloneNode(!0);ia.appendChild(ja);mxEvent.addListener(ja,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var pa=X.cloneNode(!0);ia.appendChild(pa);mxEvent.addListener(pa,
-"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=Q)for(ia=0;ia<Q.length;ia++)mxUtils.bind(this,function(xa,ra){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=B||0<ra?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ka=R.cloneNode(!0);ua.appendChild(Ka);var Va=mxUtils.bind(this,function(Oa){var Ta=
+function(C,Q,R,X){wa.apply(this,arguments);R!=this.currentTerminalState?(qa=(new Date).getTime(),ya=0):ya=(new Date).getTime()-qa;this.currentTerminalState=R};var Ia=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(C){return mxEvent.isShiftDown(C.getEvent())&&mxEvent.isAltDown(C.getEvent())?!1:null!=this.currentTerminalState&&C.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
+"outlineConnect","1"))&&Ia.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(C,Q,R){Q=null!=C&&0==C;var X=this.state.getVisibleTerminalState(Q);C=null!=C&&null!=this.state.absolutePoints&&(0==C||C>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==C)?this.graph.getConnectionConstraint(this.state,X,Q):null;R=null!=(null!=C?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(Q),C):null)?R?this.endFixedHandleImage:this.fixedHandleImage:
+null!=C&&null!=X?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(C,Q,R,X){X=Q==mxEvent.ROTATION_HANDLE?
+HoverIcons.prototype.rotationHandle:Q==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:X;return Aa.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(C){if(null!=C&&1==C.length){var Q=this.graph.getModel(),R=Q.getParent(C[0]),X=this.graph.getCellGeometry(C[0]);if(Q.isEdge(R)&&null!=X&&X.relative&&(Q=this.graph.view.getState(C[0]),null!=Q&&2>Q.width&&2>Q.height&&null!=Q.text&&null!=Q.text.boundingBox))return mxRectangle.fromRectangle(Q.text.boundingBox)}return Ba.apply(this,
+arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var C=Ga.apply(this,arguments),Q=[],R=0;R<C.length;R++)"1"!=mxUtils.getValue(C[R].style,"part","0")&&Q.push(C[R]);return Q};var Ma=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(C){var Q=this.graph.getModel(),R=Q.getParent(C.cell),X=this.graph.getCellGeometry(C.cell);return Q.isEdge(R)&&null!=X&&X.relative&&2>C.width&&2>C.height&&null!=
+C.text&&null!=C.text.boundingBox?(Q=C.text.unrotatedBoundingBox||C.text.boundingBox,new mxRectangle(Math.round(Q.x),Math.round(Q.y),Math.round(Q.width),Math.round(Q.height))):Ma.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(C,Q){var R=this.graph.getModel(),X=R.getParent(this.state.cell),ha=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(Q)==mxEvent.ROTATION_HANDLE||!R.isEdge(X)||null==ha||!ha.relative||null==this.state||
+2<=this.state.width||2<=this.state.height)&&sa.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var C=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),Q=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&C==mxConstants.NONE&&Q==mxConstants.NONE?(C=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,
+C,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(C,Q){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Da=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
+function(C,Q){Da.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(C,Q){try{if(null==C&&(null==Q||0==Q.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
+this.linkHint=null);else if(null!=C||null!=Q&&0<Q.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var X=R.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
+X.style.paddingLeft="4px";X.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=C){var ha=document.createElement("div");
+ha.style.display="flex";ha.style.alignItems="center";ha.appendChild(this.graph.createLinkForHint(C,null,this.state.cell));this.linkHint.appendChild(ha);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ia=R.cloneNode(!0);ha.appendChild(ia);mxEvent.addListener(ia,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var pa=X.cloneNode(!0);ha.appendChild(pa);mxEvent.addListener(pa,
+"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=Q)for(ha=0;ha<Q.length;ha++)mxUtils.bind(this,function(xa,ra){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=C||0<ra?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ka=R.cloneNode(!0);ua.appendChild(Ka);var Va=mxUtils.bind(this,function(Oa){var Ta=
document.createElement("div");Ta.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Za=Ta.getElementsByTagName("a")[ra];if(null!=Za){if(null==Oa||""==Oa){for(Oa=Za.cloneNode(!0).firstChild;null!=Oa;)Za.parentNode.insertBefore(Oa.cloneNode(!0),Za),Oa=Oa.nextSibling;Za.parentNode.removeChild(Za)}else Za.setAttribute("href",Oa);this.graph.labelChanged(this.state.cell,Ta.innerHTML)}});mxEvent.addListener(Ka,"click",mxUtils.bind(this,function(Oa){this.graph.showLinkDialog(xa.getAttribute("href")||
-"",mxResources.get("ok"),Va);mxEvent.consume(Oa)}));Ka=X.cloneNode(!0);ua.appendChild(Ka);mxEvent.addListener(Ka,"click",mxUtils.bind(this,function(Oa){Va();mxEvent.consume(Oa)}));this.linkHint.appendChild(ua)})(Q[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var va=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var B=va.apply(this,
-arguments);B.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return B};var Na=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Na.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var B=0;B<this.moveHandles.length;B++)null!=
-this.moveHandles[B]&&(this.moveHandles[B].bounds.x=Math.round(this.moveHandles[B].rowState.x+this.moveHandles[B].rowState.width-this.moveHandles[B].bounds.width/2),this.moveHandles[B].bounds.y=Math.round(this.moveHandles[B].rowState.y+(this.moveHandles[B].rowState.height-this.moveHandles[B].bounds.height)/2),this.moveHandles[B].redraw());if(null!=this.cornerHandles){B=this.getSelectionBorderInset();var Q=this.cornerHandles,R=Q[0].bounds.height/2;Q[0].bounds.x=this.state.x-Q[0].bounds.width/2+B;Q[0].bounds.y=
-this.state.y-R+B;Q[0].redraw();Q[1].bounds.x=Q[0].bounds.x+this.state.width-2*B;Q[1].bounds.y=Q[0].bounds.y;Q[1].redraw();Q[2].bounds.x=Q[0].bounds.x;Q[2].bounds.y=this.state.y+this.state.height-2*B;Q[2].redraw();Q[3].bounds.x=Q[1].bounds.x;Q[3].bounds.y=Q[2].bounds.y;Q[3].redraw();for(B=0;B<this.cornerHandles.length;B++)this.cornerHandles[B].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",
-mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(B=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),Q=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),R=mxUtils.getBoundingBox(Q,this.state.style[mxConstants.STYLE_ROTATION]||"0",B),B=null!=R?mxUtils.getBoundingBox(this.state,
-this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,Q=null!=this.state.text?this.state.text.boundingBox:null,null==R&&(R=this.state),R=R.y+R.height,null!=Q&&(R=Math.max(R,Q.y+Q.height)),this.linkHint.style.left=B.x+B.width/2+"px",this.linkHint.style.top=Math.round(R+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Ua=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ua.apply(this,arguments);
+"",mxResources.get("ok"),Va);mxEvent.consume(Oa)}));Ka=X.cloneNode(!0);ua.appendChild(Ka);mxEvent.addListener(Ka,"click",mxUtils.bind(this,function(Oa){Va();mxEvent.consume(Oa)}));this.linkHint.appendChild(ua)})(Q[ha],ha)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var va=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var C=va.apply(this,
+arguments);C.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return C};var Na=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Na.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var C=0;C<this.moveHandles.length;C++)null!=
+this.moveHandles[C]&&(this.moveHandles[C].bounds.x=Math.round(this.moveHandles[C].rowState.x+this.moveHandles[C].rowState.width-this.moveHandles[C].bounds.width/2),this.moveHandles[C].bounds.y=Math.round(this.moveHandles[C].rowState.y+(this.moveHandles[C].rowState.height-this.moveHandles[C].bounds.height)/2),this.moveHandles[C].redraw());if(null!=this.cornerHandles){C=this.getSelectionBorderInset();var Q=this.cornerHandles,R=Q[0].bounds.height/2;Q[0].bounds.x=this.state.x-Q[0].bounds.width/2+C;Q[0].bounds.y=
+this.state.y-R+C;Q[0].redraw();Q[1].bounds.x=Q[0].bounds.x+this.state.width-2*C;Q[1].bounds.y=Q[0].bounds.y;Q[1].redraw();Q[2].bounds.x=Q[0].bounds.x;Q[2].bounds.y=this.state.y+this.state.height-2*C;Q[2].redraw();Q[3].bounds.x=Q[1].bounds.x;Q[3].bounds.y=Q[2].bounds.y;Q[3].redraw();for(C=0;C<this.cornerHandles.length;C++)this.cornerHandles[C].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",
+mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(C=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),Q=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),R=mxUtils.getBoundingBox(Q,this.state.style[mxConstants.STYLE_ROTATION]||"0",C),C=null!=R?mxUtils.getBoundingBox(this.state,
+this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,Q=null!=this.state.text?this.state.text.boundingBox:null,null==R&&(R=this.state),R=R.y+R.height,null!=Q&&(R=Math.max(R,Q.y+Q.height)),this.linkHint.style.left=C.x+C.width/2+"px",this.linkHint.style.top=Math.round(R+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Ua=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ua.apply(this,arguments);
this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Qa=mxEdgeHandler.prototype.redrawHandles;
-mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Qa.apply(this),null!=this.state&&null!=this.linkHint)){var B=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(B=new mxRectangle(B.x,B.y,B.width,B.height),B.add(this.state.text.bounds));this.linkHint.style.left=B.x+B.width/2+"px";this.linkHint.style.top=Math.round(B.y+B.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
-function(){za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,p,A){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=A?A:1;this.updateBoundsFromLine()}function f(){mxSwimlane.call(this)}function l(){mxSwimlane.call(this)}function u(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function C(){mxActor.call(this)}function J(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function c(){mxShape.call(this)}
-function g(){mxShape.call(this)}function m(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1}function n(){mxActor.call(this)}function x(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function H(){mxActor.call(this)}function M(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxActor.call(this)}function Z(){mxActor.call(this)}function ha(){mxActor.call(this)}function ca(){mxActor.call(this)}function aa(d,p){this.canvas=d;this.canvas.setLineJoin("round");
-this.canvas.setLineCap("round");this.defaultVariation=p;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,aa.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,aa.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,aa.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,aa.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
-mxUtils.bind(this,aa.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,aa.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function da(){mxRectangleShape.call(this)}function ka(){mxActor.call(this)}function ba(){mxActor.call(this)}function V(){mxActor.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function I(){mxCylinder.call(this)}function N(){mxShape.call(this)}function T(){mxShape.call(this)}function W(){mxEllipse.call(this)}
-function U(){mxShape.call(this)}function Y(){mxShape.call(this)}function fa(){mxRectangleShape.call(this)}function na(){mxShape.call(this)}function la(){mxShape.call(this)}function qa(){mxShape.call(this)}function ya(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ia(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function Ma(){mxDoubleEllipse.call(this)}function sa(){mxArrowConnector.call(this);
-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Sa(){mxActor.call(this)}function Ua(){mxActor.call(this)}function Qa(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function B(){mxActor.call(this)}function Q(){mxActor.call(this)}function R(){mxActor.call(this)}function X(){mxActor.call(this)}function ia(){mxEllipse.call(this)}
-function ja(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Ka(){mxEllipse.call(this)}function Va(){mxEllipse.call(this)}function Oa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Pa(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
-!0;this.indent=2;this.rectOutline="single"}function Ra(){mxConnector.call(this)}function fb(){mxConnector.call(this)}function eb(d,p,A,t,z,E,G,ea,O,ta){G+=O;var ma=t.clone();t.x-=z*(2*G+O);t.y-=E*(2*G+O);z*=G+O;E*=G+O;return function(){d.ellipse(ma.x-z-G,ma.y-E-G,2*G,2*G);ta?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var A=this.line[p];null!=A&&(A=new mxRectangle(A.x,A.y,this.strokewidth,
-this.strokewidth),null==d?d=A:d.add(A))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,p,A,t,z){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,p,A,t){if(null!=p){var z=null;d.begin();for(var E=0;E<p.length;E++){var G=p[E];null!=G&&(null==z?d.moveTo(G.x+A,G.y+t):null!=z&&d.lineTo(G.x+A,G.y+t));z=G}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var p=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=
-this.line)for(var A=null,t=0;t<this.line.length&&!p;t++){var z=this.line[t];null!=z&&null!=A&&(p=mxUtils.rectangleIntersectsSegment(d,A,z));A=z}return p};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(f,mxSwimlane);f.prototype.getLabelBounds=function(d){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};f.prototype.paintVertexShape=function(d,p,A,t,z){var E=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
-!1,G=this.isHorizontal(),ea=this.getTitleSize();0==ea||this.outline?Ka.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-p,-A));E||this.outline||!(G&&ea<z||!G&&ea<t)||this.paintForeground(d,p,A,t,z)};f.prototype.paintForeground=function(d,p,A,t,z){if(null!=this.state){var E=this.flipH,G=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ea=E;E=G;G=ea}d.rotate(-this.getShapeRotation(),
-E,G,p+t/2,A+z/2);s=this.scale;p=this.bounds.x/s;A=this.bounds.y/s;t=this.bounds.width/s;z=this.bounds.height/s;this.paintTableForeground(d,p,A,t,z)}};f.prototype.paintTableForeground=function(d,p,A,t,z){t=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(z=0;z<t.length;z++)b.prototype.paintTableLine(d,t[z],p,A)};f.prototype.configurePointerEvents=function(d){0==this.getTitleSize()?
-d.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",f);mxUtils.extend(l,f);l.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",l);mxUtils.extend(u,mxCylinder);u.prototype.size=20;u.prototype.darkOpacity=0;u.prototype.darkOpacity2=0;u.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.max(0,Math.min(t,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),G=Math.max(-1,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ea=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(p,A);d.begin();d.moveTo(0,0);d.lineTo(t-E,0);d.lineTo(t,E);d.lineTo(t,z);d.lineTo(E,z);d.lineTo(0,z-E);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=G&&(d.setFillAlpha(Math.abs(G)),d.setFillColor(0>G?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(t-E,0),d.lineTo(t,E),
-d.lineTo(E,E),d.close(),d.fill()),0!=ea&&(d.setFillAlpha(Math.abs(ea)),d.setFillColor(0>ea?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(E,E),d.lineTo(E,z),d.lineTo(0,z-E),d.close(),d.fill()),d.begin(),d.moveTo(E,z),d.lineTo(E,E),d.lineTo(0,0),d.moveTo(E,E),d.lineTo(t,E),d.end(),d.stroke())};u.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?(d=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(d,d,0,0)):null};mxCellRenderer.registerShape("cube",
-u);var bb=Math.tan(mxUtils.toRadians(30)),db=(.5-bb)/2;mxCellRenderer.registerShape("isoRectangle",C);mxUtils.extend(y,mxConnector);y.prototype.paintEdgeShape=function(d,p){var A=this.createMarker(d,p,!0),t=this.createMarker(d,p,!1);d.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&d.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);d.setShadow(!1);d.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this,
-arguments);d.setStrokeColor(this.stroke);d.setFillColor(this.stroke);d.setDashed(!1);null!=A&&A();null!=t&&t()};mxCellRenderer.registerShape("wire",y);mxUtils.extend(q,mxCylinder);q.prototype.size=6;q.prototype.paintVertexShape=function(d,p,A,t,z){d.setFillColor(this.stroke);var E=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(p+.5*(t-E),A+.5*(z-E),E,E);d.fill();d.setFillColor(mxConstants.NONE);d.rect(p,A,t,z);d.fill()};mxCellRenderer.registerShape("waypoint",
-q);mxUtils.extend(C,mxActor);C.prototype.size=20;C.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/bb);d.translate((t-p)/2,(z-p)/2+p/4);d.moveTo(0,.25*p);d.lineTo(.5*p,p*db);d.lineTo(p,.25*p);d.lineTo(.5*p,(.5-db)*p);d.lineTo(0,.25*p);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",C);mxUtils.extend(J,mxCylinder);J.prototype.size=20;J.prototype.redrawPath=function(d,p,A,t,z,E){p=Math.min(t,z/(.5+bb));E?(d.moveTo(0,.25*p),d.lineTo(.5*p,(.5-db)*p),d.lineTo(p,.25*p),d.moveTo(.5*
-p,(.5-db)*p),d.lineTo(.5*p,(1-db)*p)):(d.translate((t-p)/2,(z-p)/2),d.moveTo(0,.25*p),d.lineTo(.5*p,p*db),d.lineTo(p,.25*p),d.lineTo(p,.75*p),d.lineTo(.5*p,(1-db)*p),d.lineTo(0,.75*p),d.close());d.end()};mxCellRenderer.registerShape("isoCube",J);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,p,A,t,z,E){p=Math.min(z/2,Math.round(z/8)+this.strokewidth-1);if(E&&null!=this.fill||!E&&null==this.fill)d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,
-p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,-p);E||(d.moveTo(0,p),d.curveTo(0,-p/3,t,-p/3,t,p),d.lineTo(t,z-p),d.curveTo(t,z+p/3,0,z+p/3,0,z-p),d.close())};S.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",S);mxUtils.extend(D,mxCylinder);D.prototype.size=30;D.prototype.darkOpacity=
-0;D.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.max(0,Math.min(t,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),G=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(p,A);d.begin();d.moveTo(0,0);d.lineTo(t-E,0);d.lineTo(t,E);d.lineTo(t,z);d.lineTo(0,z);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=G&&(d.setFillAlpha(Math.abs(G)),d.setFillColor(0>G?"#FFFFFF":"#000000"),
-d.begin(),d.moveTo(t-E,0),d.lineTo(t-E,E),d.lineTo(t,E),d.close(),d.fill()),d.begin(),d.moveTo(t-E,0),d.lineTo(t-E,E),d.lineTo(t,E),d.end(),d.stroke())};mxCellRenderer.registerShape("note",D);mxUtils.extend(P,D);mxCellRenderer.registerShape("note2",P);P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,0)}return null};mxUtils.extend(c,mxShape);c.prototype.isoAngle=
-15;c.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;E=Math.min(t*Math.tan(E),.5*z);d.translate(p,A);d.begin();d.moveTo(.5*t,0);d.lineTo(t,E);d.lineTo(t,z-E);d.lineTo(.5*t,z);d.lineTo(0,z-E);d.lineTo(0,E);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,E);d.lineTo(.5*t,2*E);d.lineTo(t,E);d.moveTo(.5*t,2*E);d.lineTo(.5*t,z);d.stroke()};mxCellRenderer.registerShape("isoCube2",
-c);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.max(0,Math.min(.5*z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(p,A);0==E?(d.rect(0,0,t,z),d.fillAndStroke()):(d.begin(),d.moveTo(0,E),d.arcTo(.5*t,E,0,0,1,.5*t,0),d.arcTo(.5*t,E,0,0,1,t,E),d.lineTo(t,z-E),d.arcTo(.5*t,E,0,0,1,.5*t,z),d.arcTo(.5*t,E,0,0,1,0,z-E),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(t,E),d.arcTo(.5*t,E,0,0,1,.5*t,2*E),d.arcTo(.5*
-t,E,0,0,1,0,E),d.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.max(0,Math.min(.5*z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),G=mxUtils.getValue(this.style,"lid",!0);d.translate(p,A);0==E?(d.rect(0,0,t,z),d.fillAndStroke()):(d.begin(),G?(d.moveTo(0,E),d.arcTo(.5*t,E,0,0,1,.5*t,0),d.arcTo(.5*t,E,0,0,1,t,E)):(d.moveTo(0,0),d.arcTo(.5*t,E,0,0,0,.5*t,E),d.arcTo(.5*t,E,
-0,0,0,t,0)),d.lineTo(t,z-E),d.arcTo(.5*t,E,0,0,1,.5*t,z),d.arcTo(.5*t,E,0,0,1,0,z-E),d.close(),d.fillAndStroke(),d.setShadow(!1),G&&(d.begin(),d.moveTo(t,E),d.arcTo(.5*t,E,0,0,1,.5*t,2*E),d.arcTo(.5*t,E,0,0,1,0,E),d.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t/2,.5*z,t,0);d.quadTo(.5*t,z/2,t,z);d.quadTo(t/2,.5*z,0,z);d.quadTo(.5*t,z/2,0,0);d.end()};mxCellRenderer.registerShape("switch",n);mxUtils.extend(x,
-mxCylinder);x.prototype.tabWidth=60;x.prototype.tabHeight=20;x.prototype.tabPosition="right";x.prototype.arcSize=.1;x.prototype.isRoundable=function(){return!0};x.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);p=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var E=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),G=mxUtils.getValue(this.style,
-"rounded",!1),ea=mxUtils.getValue(this.style,"absoluteArcSize",!1),O=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ea||(O*=Math.min(t,z));O=Math.min(O,.5*t,.5*(z-A));p=Math.max(p,O);p=Math.min(t-O,p);G||(O=0);d.begin();"left"==E?(d.moveTo(Math.max(O,0),A),d.lineTo(Math.max(O,0),0),d.lineTo(p,0),d.lineTo(p,A)):(d.moveTo(t-p,A),d.lineTo(t-p,0),d.lineTo(t-Math.max(O,0),0),d.lineTo(t-Math.max(O,0),A));G?(d.moveTo(0,O+A),d.arcTo(O,O,0,0,1,O,A),d.lineTo(t-O,A),d.arcTo(O,O,0,0,1,t,O+A),
-d.lineTo(t,z-O),d.arcTo(O,O,0,0,1,t-O,z),d.lineTo(O,z),d.arcTo(O,O,0,0,1,0,z-O)):(d.moveTo(0,A),d.lineTo(t,A),d.lineTo(t,z),d.lineTo(0,z));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(t-30,A+20),d.lineTo(t-20,A+10),d.lineTo(t-10,A+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",x);x.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var A=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var t=mxUtils.getValue(this.style,"rounded",!1),z=mxUtils.getValue(this.style,"absoluteArcSize",!1),E=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));z||(E*=Math.min(d.width,d.height));E=Math.min(E,.5*d.width,.5*(d.height-p));t||(E=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
-this.tabPosition)?new mxRectangle(E,0,Math.min(d.width,d.width-A),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-A),0,E,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};mxUtils.extend(F,mxCylinder);F.prototype.arcSize=.1;F.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);var E=mxUtils.getValue(this.style,"rounded",!1),G=mxUtils.getValue(this.style,"absoluteArcSize",!1);p=parseFloat(mxUtils.getValue(this.style,"arcSize",
-this.arcSize));A=mxUtils.getValue(this.style,"umlStateConnection",null);G||(p*=Math.min(t,z));p=Math.min(p,.5*t,.5*z);E||(p=0);E=0;null!=A&&(E=10);d.begin();d.moveTo(E,p);d.arcTo(p,p,0,0,1,E+p,0);d.lineTo(t-p,0);d.arcTo(p,p,0,0,1,t,p);d.lineTo(t,z-p);d.arcTo(p,p,0,0,1,t-p,z);d.lineTo(E+p,z);d.arcTo(p,p,0,0,1,E,z-p);d.close();d.fillAndStroke();d.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(d.roundrect(t-40,z-20,10,10,3,3),d.stroke(),d.roundrect(t-20,z-20,10,10,
-3,3),d.stroke(),d.begin(),d.moveTo(t-30,z-15),d.lineTo(t-20,z-15),d.stroke());"connPointRefEntry"==A?(d.ellipse(0,.5*z-10,20,20),d.fillAndStroke()):"connPointRefExit"==A&&(d.ellipse(0,.5*z-10,20,20),d.fillAndStroke(),d.begin(),d.moveTo(5,.5*z-5),d.lineTo(15,.5*z+5),d.moveTo(15,.5*z-5),d.lineTo(5,.5*z+5),d.stroke())};F.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,
-0,0,0):null};mxCellRenderer.registerShape("umlState",F);mxUtils.extend(H,mxActor);H.prototype.size=30;H.prototype.isRoundable=function(){return!0};H.prototype.redrawPath=function(d,p,A,t,z){p=Math.max(0,Math.min(t,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t,0),new mxPoint(t,z),new mxPoint(0,z),new mxPoint(0,p)],this.isRounded,A,!0);d.end()};
-mxCellRenderer.registerShape("card",H);mxUtils.extend(M,mxActor);M.prototype.size=.4;M.prototype.redrawPath=function(d,p,A,t,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,p/2);d.quadTo(t/4,1.4*p,t/2,p/2);d.quadTo(3*t/4,p*(1-1.4),t,p/2);d.lineTo(t,z-p/2);d.quadTo(3*t/4,z-1.4*p,t/2,z-p/2);d.quadTo(t/4,z-p*(1-1.4),0,z-p/2);d.lineTo(0,p/2);d.close();d.end()};M.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=
-mxUtils.getValue(this.style,"size",this.size),A=d.width,t=d.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return p*=t,new mxRectangle(d.x,d.y+p,A,t-2*p);p*=A;return new mxRectangle(d.x+p,d.y,A-2*p,t)}return d};mxCellRenderer.registerShape("tape",M);mxUtils.extend(L,mxActor);L.prototype.size=.3;L.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))*d.height):null};L.prototype.redrawPath=function(d,p,A,t,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,0);d.lineTo(t,0);d.lineTo(t,z-p/2);d.quadTo(3*t/4,z-1.4*p,t/2,z-p/2);d.quadTo(t/4,z-p*(1-1.4),0,z-p/2);d.lineTo(0,p/2);d.close();d.end()};mxCellRenderer.registerShape("document",L);var mb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(d,p,A,t){var z=mxUtils.getValue(this.style,"size");return null!=
-z?t*Math.max(0,Math.min(1,z)):mb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,d.height*p),0,0)}return null};m.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(p/=2);return new mxRectangle(0,Math.min(d.height*
-this.scale,2*p*this.scale),0,Math.max(0,.3*p*this.scale))}return null};x.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var A=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var t=mxUtils.getValue(this.style,"rounded",!1),z=mxUtils.getValue(this.style,"absoluteArcSize",!1),E=parseFloat(mxUtils.getValue(this.style,
-"arcSize",this.arcSize));z||(E*=Math.min(d.width,d.height));E=Math.min(E,.5*d.width,.5*(d.height-p));t||(E=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(E,0,Math.min(d.width,d.width-A),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-A),0,E,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};F.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=
-mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,Math.max(0,p*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,p,A,t,z){p=
-"0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(p,0),new mxPoint(t,0),new mxPoint(t-p,z)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(Z,mxActor);Z.prototype.size=
-.2;Z.prototype.fixedSize=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,
-z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("trapezoid",Z);mxUtils.extend(ha,mxActor);ha.prototype.size=.5;ha.prototype.redrawPath=function(d,p,A,t,z){d.setFillColor(null);p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(t,0),new mxPoint(p,0),new mxPoint(p,z/2),new mxPoint(0,z/2),new mxPoint(p,z/2),new mxPoint(p,z),new mxPoint(t,z)],this.isRounded,
-A,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ha);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(d,p,A,t,z){d.setStrokeWidth(1);d.setFillColor(this.stroke);p=t/5;d.rect(0,0,p,z);d.fillAndStroke();d.rect(2*p,0,p,z);d.fillAndStroke();d.rect(4*p,0,p,z);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ca);aa.prototype.moveTo=function(d,p){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;this.firstX=d;this.firstY=p};aa.prototype.close=
-function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};aa.prototype.quadTo=function(d,p,A,t){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=t};aa.prototype.curveTo=function(d,p,A,t,z,E){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=z;this.lastY=E};aa.prototype.arcTo=function(d,p,A,t,z,E,G){this.originalArcTo.apply(this.canvas,arguments);
-this.lastX=E;this.lastY=G};aa.prototype.lineTo=function(d,p){if(null!=this.lastX&&null!=this.lastY){var A=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},t=Math.abs(d-this.lastX),z=Math.abs(p-this.lastY),E=Math.sqrt(t*t+z*z);if(2>E){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;return}var G=Math.round(E/10),ea=this.defaultVariation;5>G&&(G=5,ea/=3);var O=A(d-this.lastX)*t/G;A=A(p-this.lastY)*z/G;t/=E;z/=E;for(E=0;E<G;E++){var ta=(Math.random()-
-.5)*ea;this.originalLineTo.call(this.canvas,O*E+this.lastX-ta*z,A*E+this.lastY-ta*t)}this.originalLineTo.call(this.canvas,d,p)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p};aa.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};var lb=mxShape.prototype.beforePaint;
-mxShape.prototype.beforePaint=function(d){lb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var pb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(d){pb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new aa(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==
-this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var gb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&gb.apply(this,arguments)};var qb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,p,A,t,z){if(null==d.handJiggle||
-d.handJiggle.constructor!=aa)qb.apply(this,arguments);else{var E=!0;null!=this.style&&(E="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(E||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)E||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?E=Math.min(t/2,Math.min(z/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2)):(E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.min(t*E,z*E)),d.moveTo(p+E,A),d.lineTo(p+t-E,A),d.quadTo(p+t,A,p+t,A+E),d.lineTo(p+t,A+z-E),d.quadTo(p+t,A+z,p+t-E,A+z),d.lineTo(p+E,A+z),d.quadTo(p,A+z,p,A+z-E),d.lineTo(p,A+E),d.quadTo(p,A,p+E,A)):(d.moveTo(p,A),d.lineTo(p+t,A),d.lineTo(p+t,A+z),d.lineTo(p,A+z),d.lineTo(p,A)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(oa,mxRectangleShape);oa.prototype.size=
-.1;oa.prototype.fixedSize=!1;oa.prototype.isHtmlAllowed=function(){return!1};oa.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var p=d.width,A=d.height;d=new mxRectangle(d.x,d.y,p,A);var t=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),z=parseFloat(mxUtils.getValue(this.style,"size",this.size));t?z=Math.max(0,Math.min(p,
-z*this.scale)):(z=p*Math.max(0,Math.min(1,z)),this.isRounded&&(t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,z=Math.max(z,Math.min(p*t,A*t))));d.x+=Math.round(z);d.width-=Math.round(2*z);return d}return d};oa.prototype.paintForeground=function(d,p,A,t,z){var E=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),G=parseFloat(mxUtils.getValue(this.style,"size",this.size));G=E?Math.max(0,Math.min(t,G)):t*Math.max(0,Math.min(1,G));this.isRounded&&
-(E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,G=Math.max(G,Math.min(t*E,z*E)));G=Math.round(G);d.begin();d.moveTo(p+G,A);d.lineTo(p+G,A+z);d.moveTo(p+t-G,A);d.lineTo(p+t-G,A+z);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",oa);mxCellRenderer.registerShape("process2",oa);mxUtils.extend(da,mxRectangleShape);da.prototype.paintBackground=function(d,p,A,t,z){d.setFillColor(mxConstants.NONE);
-d.rect(p,A,t,z);d.fill()};da.prototype.paintForeground=function(d,p,A,t,z){};mxCellRenderer.registerShape("transparent",da);mxUtils.extend(ka,mxHexagon);ka.prototype.size=30;ka.prototype.position=.5;ka.prototype.position2=.5;ka.prototype.base=20;ka.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ka.prototype.isRoundable=function(){return!0};ka.prototype.redrawPath=function(d,p,A,t,z){p=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var E=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),G=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),ea=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,z-A),new mxPoint(Math.min(t,
-E+ea),z-A),new mxPoint(G,z),new mxPoint(Math.max(0,E),z-A),new mxPoint(0,z-A)],this.isRounded,p,!0,[4])};mxCellRenderer.registerShape("callout",ka);mxUtils.extend(ba,mxActor);ba.prototype.size=.2;ba.prototype.fixedSize=20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(0,z),new mxPoint(p,z/2)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("step",ba);mxUtils.extend(V,mxHexagon);V.prototype.size=.25;V.prototype.fixedSize=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,
-"fixedSize","0")?Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,.5*z),new mxPoint(t-p,z),new mxPoint(p,z),new mxPoint(0,.5*z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("hexagon",V);mxUtils.extend(k,mxRectangleShape);
-k.prototype.isHtmlAllowed=function(){return!1};k.prototype.paintForeground=function(d,p,A,t,z){var E=Math.min(t/5,z/5)+1;d.begin();d.moveTo(p+t/2,A+E);d.lineTo(p+t/2,A+z-E);d.moveTo(p+E,A+z/2);d.lineTo(p+t-E,A+z/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",k);var ub=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};mxRhombus.prototype.paintVertexShape=function(d,p,A,t,z){ub.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var E=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=E;A+=E;t-=2*E;z-=2*E;0<t&&0<z&&(d.setShadow(!1),ub.apply(this,[d,p,A,t,z]))}};mxUtils.extend(v,mxRectangleShape);v.prototype.isHtmlAllowed=function(){return!1};v.prototype.getLabelBounds=function(d){if(1==
-this.style["double"]){var p=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};v.prototype.paintForeground=function(d,p,A,t,z){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var E=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=E;A+=E;t-=2*E;z-=2*E;0<t&&0<z&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);
-E=0;do{var G=mxCellRenderer.defaultShapes[this.style["symbol"+E]];if(null!=G){var ea=this.style["symbol"+E+"Align"],O=this.style["symbol"+E+"VerticalAlign"],ta=this.style["symbol"+E+"Width"],ma=this.style["symbol"+E+"Height"],ab=this.style["symbol"+E+"Spacing"]||0,ib=this.style["symbol"+E+"VSpacing"]||ab,cb=this.style["symbol"+E+"ArcSpacing"];null!=cb&&(cb*=this.getArcSize(t+this.strokewidth,z+this.strokewidth),ab+=cb,ib+=cb);cb=p;var Fa=A;cb=ea==mxConstants.ALIGN_CENTER?cb+(t-ta)/2:ea==mxConstants.ALIGN_RIGHT?
-cb+(t-ta-ab):cb+ab;Fa=O==mxConstants.ALIGN_MIDDLE?Fa+(z-ma)/2:O==mxConstants.ALIGN_BOTTOM?Fa+(z-ma-ib):Fa+ib;d.save();ea=new G;ea.style=this.style;G.prototype.paintVertexShape.call(ea,d,cb,Fa,ta,ma);d.restore()}E++}while(null!=G)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",v);mxUtils.extend(I,mxCylinder);I.prototype.redrawPath=function(d,p,A,t,z,E){E?(d.moveTo(0,0),d.lineTo(t/2,z/2),d.lineTo(t,0),d.end()):(d.moveTo(0,0),d.lineTo(t,0),d.lineTo(t,
-z),d.lineTo(0,z),d.close())};mxCellRenderer.registerShape("message",I);mxUtils.extend(N,mxShape);N.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.ellipse(t/4,0,t/2,z/4);d.fillAndStroke();d.begin();d.moveTo(t/2,z/4);d.lineTo(t/2,2*z/3);d.moveTo(t/2,z/3);d.lineTo(0,z/3);d.moveTo(t/2,z/3);d.lineTo(t,z/3);d.moveTo(t/2,2*z/3);d.lineTo(0,z);d.moveTo(t/2,2*z/3);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",N);mxUtils.extend(T,mxShape);T.prototype.getLabelMargins=
-function(d){return new mxRectangle(d.width/6,0,0,0)};T.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(0,z/4);d.lineTo(0,3*z/4);d.end();d.stroke();d.begin();d.moveTo(0,z/2);d.lineTo(t/6,z/2);d.end();d.stroke();d.ellipse(t/6,0,5*t/6,z);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",T);mxUtils.extend(W,mxEllipse);W.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+t/8,A+z);d.lineTo(p+
-7*t/8,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",W);mxUtils.extend(U,mxShape);U.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(t,0);d.lineTo(0,z);d.moveTo(0,0);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",U);mxUtils.extend(Y,mxShape);Y.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};Y.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();
-d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,0);d.end();d.stroke();d.ellipse(0,z/8,t,7*z/8);d.fillAndStroke()};Y.prototype.paintForeground=function(d,p,A,t,z){d.begin();d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,z/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",Y);mxUtils.extend(fa,mxRectangleShape);fa.prototype.size=40;fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.getLabelBounds=function(d){var p=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*
-this.scale));return new mxRectangle(d.x,d.y,d.width,p)};fa.prototype.paintBackground=function(d,p,A,t,z){var E=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),G=mxUtils.getValue(this.style,"participant");null==G||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,p,A,t,E):(G=this.state.view.graph.cellRenderer.getShape(G),null!=G&&G!=fa&&(G=new G,G.apply(this.state),d.save(),G.paintVertexShape(d,p,A,t,E),d.restore()));E<z&&(d.setDashed("1"==mxUtils.getValue(this.style,
-"lifelineDashed","1")),d.begin(),d.moveTo(p+t/2,A+E),d.lineTo(p+t/2,A+z),d.end(),d.stroke())};fa.prototype.paintForeground=function(d,p,A,t,z){var E=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,p,A,t,Math.min(z,E))};mxCellRenderer.registerShape("umlLifeline",fa);mxUtils.extend(na,mxShape);na.prototype.width=60;na.prototype.height=30;na.prototype.corner=10;na.prototype.configurePointerEvents=function(d){var p=
-mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=p&&p!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};na.prototype.getLabelMargins=function(d){return new mxRectangle(0,0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};na.prototype.paintBackground=
-function(d,p,A,t,z){var E=this.corner,G=Math.min(t,Math.max(E,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),ea=Math.min(z,Math.max(1.5*E,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),O=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);O!=mxConstants.NONE&&(d.setFillColor(O),d.rect(p,A,t,z),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,p,A,t,z),d.setGradient(this.fill,
-this.gradient,p,A,t,z,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(p,A);d.lineTo(p+G,A);d.lineTo(p+G,A+Math.max(0,ea-1.5*E));d.lineTo(p+Math.max(0,G-E),A+ea);d.lineTo(p,A+ea);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(p+G,A);d.lineTo(p+t,A);d.lineTo(p+t,A+z);d.lineTo(p,A+z);d.lineTo(p,A+ea);d.stroke()};mxCellRenderer.registerShape("umlFrame",na);mxPerimeter.CenterPerimeter=function(d,p,A,t){return new mxPoint(d.getCenterX(),
-d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,p,A,t){t=fa.prototype.size;null!=p&&(t=mxUtils.getValue(p.style,"size",t)*p.view.scale);p=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;A.x<d.getCenterX()&&(p=-1*(p+1));return new mxPoint(d.getCenterX()+p,Math.min(d.y+d.height,Math.max(d.y+t,A.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
-function(d,p,A,t){t=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,p,A,t){t=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;null!=p.style.backboneSize&&(t+=parseFloat(p.style.backboneSize)*p.view.scale/2-1);if("south"==p.style[mxConstants.STYLE_DIRECTION]||"north"==p.style[mxConstants.STYLE_DIRECTION])return A.x<d.getCenterX()&&(t=-1*(t+1)),
-new mxPoint(d.getCenterX()+t,Math.min(d.y+d.height,Math.max(d.y,A.y)));A.y<d.getCenterY()&&(t=-1*(t+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,A.x)),d.getCenterY()+t)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,p,A,t){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(p.style,"size",ka.prototype.size))*p.view.scale))),
-p.style),p,A,t)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),E=z?K.prototype.fixedSize:K.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var G=d.x,ea=d.y,O=d.width,ta=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==
-mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea)]):(z=z?Math.max(0,Math.min(.5*O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O,ea),new mxPoint(G+O-z,ea+ta),new mxPoint(G,ea+ta),new mxPoint(G+z,ea)]);ta=d.getCenterX();d=d.getCenterY();d=new mxPoint(ta,d);t&&(A.x<G||A.x>G+O?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,
-A)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),E=z?Z.prototype.fixedSize:Z.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var G=d.x,ea=d.y,O=d.width,ta=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,
-Math.min(.5*O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O-z,ea),new mxPoint(G+O,ea+ta),new mxPoint(G,ea+ta),new mxPoint(G+z,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G,ea),new mxPoint(G+O,ea),new mxPoint(G+O-z,ea+ta),new mxPoint(G+z,ea+ta),new mxPoint(G,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G,ea+z),new mxPoint(G+O,ea),new mxPoint(G+
-O,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea+z)]):(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+ta-z),new mxPoint(G,ea+ta),new mxPoint(G,ea)]);ta=d.getCenterX();d=d.getCenterY();d=new mxPoint(ta,d);t&&(A.x<G||A.x>G+O?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,A)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,
-"fixedSize","0"),E=z?ba.prototype.fixedSize:ba.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var G=d.x,ea=d.y,O=d.width,ta=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G,ea),new mxPoint(G+O-z,ea),new mxPoint(G+O,d),new mxPoint(G+O-z,ea+ta),new mxPoint(G,
-ea+ta),new mxPoint(G+z,d),new mxPoint(G,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O,ea),new mxPoint(G+O-z,d),new mxPoint(G+O,ea+ta),new mxPoint(G+z,ea+ta),new mxPoint(G,d),new mxPoint(G+z,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G,ea+z),new mxPoint(ma,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+ta),new mxPoint(ma,ea+ta-z),new mxPoint(G,
-ea+ta),new mxPoint(G,ea+z)]):(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G,ea),new mxPoint(ma,ea+z),new mxPoint(G+O,ea),new mxPoint(G+O,ea+ta-z),new mxPoint(ma,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea)]);ma=new mxPoint(ma,d);t&&(A.x<G||A.x>G+O?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize",
-"0"),E=z?V.prototype.fixedSize:V.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var G=d.x,ea=d.y,O=d.width,ta=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(ma,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+ta-z),
-new mxPoint(ma,ea+ta),new mxPoint(G,ea+ta-z),new mxPoint(G,ea+z),new mxPoint(ma,ea)]):(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O-z,ea),new mxPoint(G+O,d),new mxPoint(G+O-z,ea+ta),new mxPoint(G+z,ea+ta),new mxPoint(G,d),new mxPoint(G+z,ea)]);ma=new mxPoint(ma,d);t&&(A.x<G||A.x>G+O?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(la,mxShape);
-la.prototype.size=10;la.prototype.paintBackground=function(d,p,A,t,z){var E=parseFloat(mxUtils.getValue(this.style,"size",this.size));d.translate(p,A);d.ellipse((t-E)/2,0,E,E);d.fillAndStroke();d.begin();d.moveTo(t/2,E);d.lineTo(t/2,z);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",la);mxUtils.extend(qa,mxShape);qa.prototype.size=10;qa.prototype.inset=2;qa.prototype.paintBackground=function(d,p,A,t,z){var E=parseFloat(mxUtils.getValue(this.style,"size",this.size)),G=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;d.translate(p,A);d.begin();d.moveTo(t/2,E+G);d.lineTo(t/2,z);d.end();d.stroke();d.begin();d.moveTo((t-E)/2-G,E/2);d.quadTo((t-E)/2-G,E+G,t/2,E+G);d.quadTo((t+E)/2+G,E+G,(t+E)/2+G,E/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",qa);mxUtils.extend(ya,mxShape);ya.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",
-ya);mxUtils.extend(wa,mxShape);wa.prototype.inset=2;wa.prototype.paintBackground=function(d,p,A,t,z){var E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,A);d.ellipse(0,E,t-2*E,z-2*E);d.fillAndStroke();d.begin();d.moveTo(t/2,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t/2,z);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",wa);mxUtils.extend(Ia,mxCylinder);Ia.prototype.jettyWidth=20;Ia.prototype.jettyHeight=10;Ia.prototype.redrawPath=
-function(d,p,A,t,z,E){var G=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=G/2;G=A+G/2;var ea=Math.min(p,z-p),O=Math.min(ea+2*p,z-p);E?(d.moveTo(A,ea),d.lineTo(G,ea),d.lineTo(G,ea+p),d.lineTo(A,ea+p),d.moveTo(A,O),d.lineTo(G,O),d.lineTo(G,O+p),d.lineTo(A,O+p)):(d.moveTo(A,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(A,z),d.lineTo(A,O+p),d.lineTo(0,O+p),d.lineTo(0,O),d.lineTo(A,O),d.lineTo(A,ea+p),d.lineTo(0,
-ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("module",Ia);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(d,p,A,t,z,E){var G=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=G/2;G=A+G/2;var ea=.3*z-p/2,O=.7*z-p/2;E?(d.moveTo(A,ea),d.lineTo(G,ea),d.lineTo(G,ea+p),d.lineTo(A,ea+p),d.moveTo(A,O),
-d.lineTo(G,O),d.lineTo(G,O+p),d.lineTo(A,O+p)):(d.moveTo(A,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(A,z),d.lineTo(A,O+p),d.lineTo(0,O+p),d.lineTo(0,O),d.lineTo(A,O),d.lineTo(A,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(Ba,mxRectangleShape);Ba.prototype.paintForeground=function(d,p,A,t,z){var E=t/2,G=z/2,ea=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,
-[new mxPoint(p+E,A),new mxPoint(p+t,A+G),new mxPoint(p+E,A+z),new mxPoint(p,A+G)],this.isRounded,ea,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ba);mxUtils.extend(Ga,mxDoubleEllipse);Ga.prototype.outerStroke=!0;Ga.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.min(4,Math.min(t/5,z/5));0<t&&0<z&&(d.ellipse(p+E,A+E,t-2*E,z-2*E),d.fillAndStroke());d.setShadow(!1);this.outerStroke&&(d.ellipse(p,A,t,z),d.stroke())};
+mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Qa.apply(this),null!=this.state&&null!=this.linkHint)){var C=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(C=new mxRectangle(C.x,C.y,C.width,C.height),C.add(this.state.text.bounds));this.linkHint.style.left=C.x+C.width/2+"px";this.linkHint.style.top=Math.round(C.y+C.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
+function(){za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,p,A){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=A?A:1;this.updateBoundsFromLine()}function f(){mxSwimlane.call(this)}function m(){mxSwimlane.call(this)}function t(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function B(){mxActor.call(this)}function I(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function c(){mxShape.call(this)}
+function g(){mxShape.call(this)}function l(d,p,A,u){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=u?u:1}function n(){mxActor.call(this)}function x(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function G(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function K(){mxActor.call(this)}function Z(){mxActor.call(this)}function ja(){mxActor.call(this)}function da(){mxActor.call(this)}function ba(d,p){this.canvas=d;this.canvas.setLineJoin("round");
+this.canvas.setLineCap("round");this.defaultVariation=p;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ba.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ba.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ba.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ba.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
+mxUtils.bind(this,ba.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ba.prototype.arcTo)}function na(){mxRectangleShape.call(this)}function ca(){mxRectangleShape.call(this)}function ka(){mxActor.call(this)}function aa(){mxActor.call(this)}function V(){mxActor.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function N(){mxShape.call(this)}function T(){mxShape.call(this)}function W(){mxEllipse.call(this)}
+function U(){mxShape.call(this)}function Y(){mxShape.call(this)}function fa(){mxRectangleShape.call(this)}function oa(){mxShape.call(this)}function la(){mxShape.call(this)}function qa(){mxShape.call(this)}function ya(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ia(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function Ma(){mxDoubleEllipse.call(this)}function sa(){mxArrowConnector.call(this);
+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Sa(){mxActor.call(this)}function Ua(){mxActor.call(this)}function Qa(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function C(){mxActor.call(this)}function Q(){mxActor.call(this)}function R(){mxActor.call(this)}function X(){mxActor.call(this)}function ha(){mxEllipse.call(this)}
+function ia(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Ka(){mxEllipse.call(this)}function Va(){mxEllipse.call(this)}function Oa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Pa(d,p,A,u){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=u?u:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
+!0;this.indent=2;this.rectOutline="single"}function Ra(){mxConnector.call(this)}function fb(){mxConnector.call(this)}function eb(d,p,A,u,z,E,H,ea,O,ta){H+=O;var ma=u.clone();u.x-=z*(2*H+O);u.y-=E*(2*H+O);z*=H+O;E*=H+O;return function(){d.ellipse(ma.x-z-H,ma.y-E-H,2*H,2*H);ta?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var A=this.line[p];null!=A&&(A=new mxRectangle(A.x,A.y,this.strokewidth,
+this.strokewidth),null==d?d=A:d.add(A))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,p,A,u,z){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,p,A,u){if(null!=p){var z=null;d.begin();for(var E=0;E<p.length;E++){var H=p[E];null!=H&&(null==z?d.moveTo(H.x+A,H.y+u):null!=z&&d.lineTo(H.x+A,H.y+u));z=H}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var p=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=
+this.line)for(var A=null,u=0;u<this.line.length&&!p;u++){var z=this.line[u];null!=z&&null!=A&&(p=mxUtils.rectangleIntersectsSegment(d,A,z));A=z}return p};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(f,mxSwimlane);f.prototype.getLabelBounds=function(d){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};f.prototype.paintVertexShape=function(d,p,A,u,z){var E=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
+!1,H=this.isHorizontal(),ea=this.getTitleSize();0==ea||this.outline?Ka.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-p,-A));E||this.outline||!(H&&ea<z||!H&&ea<u)||this.paintForeground(d,p,A,u,z)};f.prototype.paintForeground=function(d,p,A,u,z){if(null!=this.state){var E=this.flipH,H=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ea=E;E=H;H=ea}d.rotate(-this.getShapeRotation(),
+E,H,p+u/2,A+z/2);s=this.scale;p=this.bounds.x/s;A=this.bounds.y/s;u=this.bounds.width/s;z=this.bounds.height/s;this.paintTableForeground(d,p,A,u,z)}};f.prototype.paintTableForeground=function(d,p,A,u,z){u=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(z=0;z<u.length;z++)b.prototype.paintTableLine(d,u[z],p,A)};f.prototype.configurePointerEvents=function(d){0==this.getTitleSize()?
+d.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",f);mxUtils.extend(m,f);m.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",m);mxUtils.extend(t,mxCylinder);t.prototype.size=20;t.prototype.darkOpacity=0;t.prototype.darkOpacity2=0;t.prototype.paintVertexShape=function(d,p,A,u,z){var E=Math.max(0,Math.min(u,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),H=Math.max(-1,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ea=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(p,A);d.begin();d.moveTo(0,0);d.lineTo(u-E,0);d.lineTo(u,E);d.lineTo(u,z);d.lineTo(E,z);d.lineTo(0,z-E);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=H&&(d.setFillAlpha(Math.abs(H)),d.setFillColor(0>H?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(u-E,0),d.lineTo(u,E),
+d.lineTo(E,E),d.close(),d.fill()),0!=ea&&(d.setFillAlpha(Math.abs(ea)),d.setFillColor(0>ea?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(E,E),d.lineTo(E,z),d.lineTo(0,z-E),d.close(),d.fill()),d.begin(),d.moveTo(E,z),d.lineTo(E,E),d.lineTo(0,0),d.moveTo(E,E),d.lineTo(u,E),d.end(),d.stroke())};t.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?(d=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(d,d,0,0)):null};mxCellRenderer.registerShape("cube",
+t);var bb=Math.tan(mxUtils.toRadians(30)),db=(.5-bb)/2;mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(y,mxConnector);y.prototype.paintEdgeShape=function(d,p){var A=this.createMarker(d,p,!0),u=this.createMarker(d,p,!1);d.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&d.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);d.setShadow(!1);d.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this,
+arguments);d.setStrokeColor(this.stroke);d.setFillColor(this.stroke);d.setDashed(!1);null!=A&&A();null!=u&&u()};mxCellRenderer.registerShape("wire",y);mxUtils.extend(q,mxCylinder);q.prototype.size=6;q.prototype.paintVertexShape=function(d,p,A,u,z){d.setFillColor(this.stroke);var E=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(p+.5*(u-E),A+.5*(z-E),E,E);d.fill();d.setFillColor(mxConstants.NONE);d.rect(p,A,u,z);d.fill()};mxCellRenderer.registerShape("waypoint",
+q);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.redrawPath=function(d,p,A,u,z){p=Math.min(u,z/bb);d.translate((u-p)/2,(z-p)/2+p/4);d.moveTo(0,.25*p);d.lineTo(.5*p,p*db);d.lineTo(p,.25*p);d.lineTo(.5*p,(.5-db)*p);d.lineTo(0,.25*p);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(I,mxCylinder);I.prototype.size=20;I.prototype.redrawPath=function(d,p,A,u,z,E){p=Math.min(u,z/(.5+bb));E?(d.moveTo(0,.25*p),d.lineTo(.5*p,(.5-db)*p),d.lineTo(p,.25*p),d.moveTo(.5*
+p,(.5-db)*p),d.lineTo(.5*p,(1-db)*p)):(d.translate((u-p)/2,(z-p)/2),d.moveTo(0,.25*p),d.lineTo(.5*p,p*db),d.lineTo(p,.25*p),d.lineTo(p,.75*p),d.lineTo(.5*p,(1-db)*p),d.lineTo(0,.75*p),d.close());d.end()};mxCellRenderer.registerShape("isoCube",I);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,p,A,u,z,E){p=Math.min(z/2,Math.round(z/8)+this.strokewidth-1);if(E&&null!=this.fill||!E&&null==this.fill)d.moveTo(0,p),d.curveTo(0,2*p,u,2*p,u,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,
+p),d.curveTo(0,2*p,u,2*p,u,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,u,2*p,u,p),E||(d.stroke(),d.begin()),d.translate(0,-p);E||(d.moveTo(0,p),d.curveTo(0,-p/3,u,-p/3,u,p),d.lineTo(u,z-p),d.curveTo(u,z+p/3,0,z+p/3,0,z-p),d.close())};S.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",S);mxUtils.extend(D,mxCylinder);D.prototype.size=30;D.prototype.darkOpacity=
+0;D.prototype.paintVertexShape=function(d,p,A,u,z){var E=Math.max(0,Math.min(u,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),H=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(p,A);d.begin();d.moveTo(0,0);d.lineTo(u-E,0);d.lineTo(u,E);d.lineTo(u,z);d.lineTo(0,z);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=H&&(d.setFillAlpha(Math.abs(H)),d.setFillColor(0>H?"#FFFFFF":"#000000"),
+d.begin(),d.moveTo(u-E,0),d.lineTo(u-E,E),d.lineTo(u,E),d.close(),d.fill()),d.begin(),d.moveTo(u-E,0),d.lineTo(u-E,E),d.lineTo(u,E),d.end(),d.stroke())};mxCellRenderer.registerShape("note",D);mxUtils.extend(P,D);mxCellRenderer.registerShape("note2",P);P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,0)}return null};mxUtils.extend(c,mxShape);c.prototype.isoAngle=
+15;c.prototype.paintVertexShape=function(d,p,A,u,z){var E=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;E=Math.min(u*Math.tan(E),.5*z);d.translate(p,A);d.begin();d.moveTo(.5*u,0);d.lineTo(u,E);d.lineTo(u,z-E);d.lineTo(.5*u,z);d.lineTo(0,z-E);d.lineTo(0,E);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,E);d.lineTo(.5*u,2*E);d.lineTo(u,E);d.moveTo(.5*u,2*E);d.lineTo(.5*u,z);d.stroke()};mxCellRenderer.registerShape("isoCube2",
+c);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(d,p,A,u,z){var E=Math.max(0,Math.min(.5*z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(p,A);0==E?(d.rect(0,0,u,z),d.fillAndStroke()):(d.begin(),d.moveTo(0,E),d.arcTo(.5*u,E,0,0,1,.5*u,0),d.arcTo(.5*u,E,0,0,1,u,E),d.lineTo(u,z-E),d.arcTo(.5*u,E,0,0,1,.5*u,z),d.arcTo(.5*u,E,0,0,1,0,z-E),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(u,E),d.arcTo(.5*u,E,0,0,1,.5*u,2*E),d.arcTo(.5*
+u,E,0,0,1,0,E),d.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(l,mxCylinder);l.prototype.size=15;l.prototype.paintVertexShape=function(d,p,A,u,z){var E=Math.max(0,Math.min(.5*z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),H=mxUtils.getValue(this.style,"lid",!0);d.translate(p,A);0==E?(d.rect(0,0,u,z),d.fillAndStroke()):(d.begin(),H?(d.moveTo(0,E),d.arcTo(.5*u,E,0,0,1,.5*u,0),d.arcTo(.5*u,E,0,0,1,u,E)):(d.moveTo(0,0),d.arcTo(.5*u,E,0,0,0,.5*u,E),d.arcTo(.5*u,E,
+0,0,0,u,0)),d.lineTo(u,z-E),d.arcTo(.5*u,E,0,0,1,.5*u,z),d.arcTo(.5*u,E,0,0,1,0,z-E),d.close(),d.fillAndStroke(),d.setShadow(!1),H&&(d.begin(),d.moveTo(u,E),d.arcTo(.5*u,E,0,0,1,.5*u,2*E),d.arcTo(.5*u,E,0,0,1,0,E),d.stroke()))};mxCellRenderer.registerShape("cylinder3",l);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(d,p,A,u,z){d.moveTo(0,0);d.quadTo(u/2,.5*z,u,0);d.quadTo(.5*u,z/2,u,z);d.quadTo(u/2,.5*z,0,z);d.quadTo(.5*u,z/2,0,0);d.end()};mxCellRenderer.registerShape("switch",n);mxUtils.extend(x,
+mxCylinder);x.prototype.tabWidth=60;x.prototype.tabHeight=20;x.prototype.tabPosition="right";x.prototype.arcSize=.1;x.prototype.isRoundable=function(){return!0};x.prototype.paintVertexShape=function(d,p,A,u,z){d.translate(p,A);p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var E=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),H=mxUtils.getValue(this.style,
+"rounded",!1),ea=mxUtils.getValue(this.style,"absoluteArcSize",!1),O=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ea||(O*=Math.min(u,z));O=Math.min(O,.5*u,.5*(z-A));p=Math.max(p,O);p=Math.min(u-O,p);H||(O=0);d.begin();"left"==E?(d.moveTo(Math.max(O,0),A),d.lineTo(Math.max(O,0),0),d.lineTo(p,0),d.lineTo(p,A)):(d.moveTo(u-p,A),d.lineTo(u-p,0),d.lineTo(u-Math.max(O,0),0),d.lineTo(u-Math.max(O,0),A));H?(d.moveTo(0,O+A),d.arcTo(O,O,0,0,1,O,A),d.lineTo(u-O,A),d.arcTo(O,O,0,0,1,u,O+A),
+d.lineTo(u,z-O),d.arcTo(O,O,0,0,1,u-O,z),d.lineTo(O,z),d.arcTo(O,O,0,0,1,0,z-O)):(d.moveTo(0,A),d.lineTo(u,A),d.lineTo(u,z),d.lineTo(0,z));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(u-30,A+20),d.lineTo(u-20,A+10),d.lineTo(u-10,A+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",x);x.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var A=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var u=mxUtils.getValue(this.style,"rounded",!1),z=mxUtils.getValue(this.style,"absoluteArcSize",!1),E=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));z||(E*=Math.min(d.width,d.height));E=Math.min(E,.5*d.width,.5*(d.height-p));u||(E=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
+this.tabPosition)?new mxRectangle(E,0,Math.min(d.width,d.width-A),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-A),0,E,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};mxUtils.extend(F,mxCylinder);F.prototype.arcSize=.1;F.prototype.paintVertexShape=function(d,p,A,u,z){d.translate(p,A);var E=mxUtils.getValue(this.style,"rounded",!1),H=mxUtils.getValue(this.style,"absoluteArcSize",!1);p=parseFloat(mxUtils.getValue(this.style,"arcSize",
+this.arcSize));A=mxUtils.getValue(this.style,"umlStateConnection",null);H||(p*=Math.min(u,z));p=Math.min(p,.5*u,.5*z);E||(p=0);E=0;null!=A&&(E=10);d.begin();d.moveTo(E,p);d.arcTo(p,p,0,0,1,E+p,0);d.lineTo(u-p,0);d.arcTo(p,p,0,0,1,u,p);d.lineTo(u,z-p);d.arcTo(p,p,0,0,1,u-p,z);d.lineTo(E+p,z);d.arcTo(p,p,0,0,1,E,z-p);d.close();d.fillAndStroke();d.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(d.roundrect(u-40,z-20,10,10,3,3),d.stroke(),d.roundrect(u-20,z-20,10,10,
+3,3),d.stroke(),d.begin(),d.moveTo(u-30,z-15),d.lineTo(u-20,z-15),d.stroke());"connPointRefEntry"==A?(d.ellipse(0,.5*z-10,20,20),d.fillAndStroke()):"connPointRefExit"==A&&(d.ellipse(0,.5*z-10,20,20),d.fillAndStroke(),d.begin(),d.moveTo(5,.5*z-5),d.lineTo(15,.5*z+5),d.moveTo(15,.5*z-5),d.lineTo(5,.5*z+5),d.stroke())};F.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,
+0,0,0):null};mxCellRenderer.registerShape("umlState",F);mxUtils.extend(G,mxActor);G.prototype.size=30;G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(d,p,A,u,z){p=Math.max(0,Math.min(u,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u,0),new mxPoint(u,z),new mxPoint(0,z),new mxPoint(0,p)],this.isRounded,A,!0);d.end()};
+mxCellRenderer.registerShape("card",G);mxUtils.extend(L,mxActor);L.prototype.size=.4;L.prototype.redrawPath=function(d,p,A,u,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,p/2);d.quadTo(u/4,1.4*p,u/2,p/2);d.quadTo(3*u/4,p*(1-1.4),u,p/2);d.lineTo(u,z-p/2);d.quadTo(3*u/4,z-1.4*p,u/2,z-p/2);d.quadTo(u/4,z-p*(1-1.4),0,z-p/2);d.lineTo(0,p/2);d.close();d.end()};L.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=
+mxUtils.getValue(this.style,"size",this.size),A=d.width,u=d.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return p*=u,new mxRectangle(d.x,d.y+p,A,u-2*p);p*=A;return new mxRectangle(d.x+p,d.y,A-2*p,u)}return d};mxCellRenderer.registerShape("tape",L);mxUtils.extend(M,mxActor);M.prototype.size=.3;M.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))*d.height):null};M.prototype.redrawPath=function(d,p,A,u,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,0);d.lineTo(u,0);d.lineTo(u,z-p/2);d.quadTo(3*u/4,z-1.4*p,u/2,z-p/2);d.quadTo(u/4,z-p*(1-1.4),0,z-p/2);d.lineTo(0,p/2);d.close();d.end()};mxCellRenderer.registerShape("document",M);var mb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(d,p,A,u){var z=mxUtils.getValue(this.style,"size");return null!=
+z?u*Math.max(0,Math.min(1,z)):mb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,d.height*p),0,0)}return null};l.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(p/=2);return new mxRectangle(0,Math.min(d.height*
+this.scale,2*p*this.scale),0,Math.max(0,.3*p*this.scale))}return null};x.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var A=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var u=mxUtils.getValue(this.style,"rounded",!1),z=mxUtils.getValue(this.style,"absoluteArcSize",!1),E=parseFloat(mxUtils.getValue(this.style,
+"arcSize",this.arcSize));z||(E*=Math.min(d.width,d.height));E=Math.min(E,.5*d.width,.5*(d.height-p));u||(E=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(E,0,Math.min(d.width,d.width-A),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-A),0,E,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};F.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=
+mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,Math.max(0,p*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,p,A,u,z){p=
+"0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(p,0),new mxPoint(u,0),new mxPoint(u-p,z)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(Z,mxActor);Z.prototype.size=
+.2;Z.prototype.fixedSize=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(d,p,A,u,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,
+z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("trapezoid",Z);mxUtils.extend(ja,mxActor);ja.prototype.size=.5;ja.prototype.redrawPath=function(d,p,A,u,z){d.setFillColor(null);p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(u,0),new mxPoint(p,0),new mxPoint(p,z/2),new mxPoint(0,z/2),new mxPoint(p,z/2),new mxPoint(p,z),new mxPoint(u,z)],this.isRounded,
+A,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ja);mxUtils.extend(da,mxActor);da.prototype.redrawPath=function(d,p,A,u,z){d.setStrokeWidth(1);d.setFillColor(this.stroke);p=u/5;d.rect(0,0,p,z);d.fillAndStroke();d.rect(2*p,0,p,z);d.fillAndStroke();d.rect(4*p,0,p,z);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",da);ba.prototype.moveTo=function(d,p){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;this.firstX=d;this.firstY=p};ba.prototype.close=
+function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};ba.prototype.quadTo=function(d,p,A,u){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=u};ba.prototype.curveTo=function(d,p,A,u,z,E){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=z;this.lastY=E};ba.prototype.arcTo=function(d,p,A,u,z,E,H){this.originalArcTo.apply(this.canvas,arguments);
+this.lastX=E;this.lastY=H};ba.prototype.lineTo=function(d,p){if(null!=this.lastX&&null!=this.lastY){var A=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},u=Math.abs(d-this.lastX),z=Math.abs(p-this.lastY),E=Math.sqrt(u*u+z*z);if(2>E){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;return}var H=Math.round(E/10),ea=this.defaultVariation;5>H&&(H=5,ea/=3);var O=A(d-this.lastX)*u/H;A=A(p-this.lastY)*z/H;u/=E;z/=E;for(E=0;E<H;E++){var ta=(Math.random()-
+.5)*ea;this.originalLineTo.call(this.canvas,O*E+this.lastX-ta*z,A*E+this.lastY-ta*u)}this.originalLineTo.call(this.canvas,d,p)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p};ba.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};var lb=mxShape.prototype.beforePaint;
+mxShape.prototype.beforePaint=function(d){lb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var pb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(d){pb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ba(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==
+this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var gb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&gb.apply(this,arguments)};var qb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,p,A,u,z){if(null==d.handJiggle||
+d.handJiggle.constructor!=ba)qb.apply(this,arguments);else{var E=!0;null!=this.style&&(E="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(E||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)E||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?E=Math.min(u/2,Math.min(z/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2)):(E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.min(u*E,z*E)),d.moveTo(p+E,A),d.lineTo(p+u-E,A),d.quadTo(p+u,A,p+u,A+E),d.lineTo(p+u,A+z-E),d.quadTo(p+u,A+z,p+u-E,A+z),d.lineTo(p+E,A+z),d.quadTo(p,A+z,p,A+z-E),d.lineTo(p,A+E),d.quadTo(p,A,p+E,A)):(d.moveTo(p,A),d.lineTo(p+u,A),d.lineTo(p+u,A+z),d.lineTo(p,A+z),d.lineTo(p,A)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(na,mxRectangleShape);na.prototype.size=
+.1;na.prototype.fixedSize=!1;na.prototype.isHtmlAllowed=function(){return!1};na.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var p=d.width,A=d.height;d=new mxRectangle(d.x,d.y,p,A);var u=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),z=parseFloat(mxUtils.getValue(this.style,"size",this.size));u?z=Math.max(0,Math.min(p,
+z*this.scale)):(z=p*Math.max(0,Math.min(1,z)),this.isRounded&&(u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,z=Math.max(z,Math.min(p*u,A*u))));d.x+=Math.round(z);d.width-=Math.round(2*z);return d}return d};na.prototype.paintForeground=function(d,p,A,u,z){var E=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),H=parseFloat(mxUtils.getValue(this.style,"size",this.size));H=E?Math.max(0,Math.min(u,H)):u*Math.max(0,Math.min(1,H));this.isRounded&&
+(E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,H=Math.max(H,Math.min(u*E,z*E)));H=Math.round(H);d.begin();d.moveTo(p+H,A);d.lineTo(p+H,A+z);d.moveTo(p+u-H,A);d.lineTo(p+u-H,A+z);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",na);mxCellRenderer.registerShape("process2",na);mxUtils.extend(ca,mxRectangleShape);ca.prototype.paintBackground=function(d,p,A,u,z){d.setFillColor(mxConstants.NONE);
+d.rect(p,A,u,z);d.fill()};ca.prototype.paintForeground=function(d,p,A,u,z){};mxCellRenderer.registerShape("transparent",ca);mxUtils.extend(ka,mxHexagon);ka.prototype.size=30;ka.prototype.position=.5;ka.prototype.position2=.5;ka.prototype.base=20;ka.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ka.prototype.isRoundable=function(){return!0};ka.prototype.redrawPath=function(d,p,A,u,z){p=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var E=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),H=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),ea=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,z-A),new mxPoint(Math.min(u,
+E+ea),z-A),new mxPoint(H,z),new mxPoint(Math.max(0,E),z-A),new mxPoint(0,z-A)],this.isRounded,p,!0,[4])};mxCellRenderer.registerShape("callout",ka);mxUtils.extend(aa,mxActor);aa.prototype.size=.2;aa.prototype.fixedSize=20;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(d,p,A,u,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u-p,0),new mxPoint(u,z/2),new mxPoint(u-p,z),new mxPoint(0,z),new mxPoint(p,z/2)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("step",aa);mxUtils.extend(V,mxHexagon);V.prototype.size=.25;V.prototype.fixedSize=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(d,p,A,u,z){p="0"!=mxUtils.getValue(this.style,
+"fixedSize","0")?Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,.5*z),new mxPoint(u-p,z),new mxPoint(p,z),new mxPoint(0,.5*z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("hexagon",V);mxUtils.extend(k,mxRectangleShape);
+k.prototype.isHtmlAllowed=function(){return!1};k.prototype.paintForeground=function(d,p,A,u,z){var E=Math.min(u/5,z/5)+1;d.begin();d.moveTo(p+u/2,A+E);d.lineTo(p+u/2,A+z-E);d.moveTo(p+E,A+z/2);d.lineTo(p+u-E,A+z/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",k);var ub=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};mxRhombus.prototype.paintVertexShape=function(d,p,A,u,z){ub.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var E=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=E;A+=E;u-=2*E;z-=2*E;0<u&&0<z&&(d.setShadow(!1),ub.apply(this,[d,p,A,u,z]))}};mxUtils.extend(v,mxRectangleShape);v.prototype.isHtmlAllowed=function(){return!1};v.prototype.getLabelBounds=function(d){if(1==
+this.style["double"]){var p=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};v.prototype.paintForeground=function(d,p,A,u,z){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var E=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=E;A+=E;u-=2*E;z-=2*E;0<u&&0<z&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);
+E=0;do{var H=mxCellRenderer.defaultShapes[this.style["symbol"+E]];if(null!=H){var ea=this.style["symbol"+E+"Align"],O=this.style["symbol"+E+"VerticalAlign"],ta=this.style["symbol"+E+"Width"],ma=this.style["symbol"+E+"Height"],ab=this.style["symbol"+E+"Spacing"]||0,ib=this.style["symbol"+E+"VSpacing"]||ab,cb=this.style["symbol"+E+"ArcSpacing"];null!=cb&&(cb*=this.getArcSize(u+this.strokewidth,z+this.strokewidth),ab+=cb,ib+=cb);cb=p;var Fa=A;cb=ea==mxConstants.ALIGN_CENTER?cb+(u-ta)/2:ea==mxConstants.ALIGN_RIGHT?
+cb+(u-ta-ab):cb+ab;Fa=O==mxConstants.ALIGN_MIDDLE?Fa+(z-ma)/2:O==mxConstants.ALIGN_BOTTOM?Fa+(z-ma-ib):Fa+ib;d.save();ea=new H;ea.style=this.style;H.prototype.paintVertexShape.call(ea,d,cb,Fa,ta,ma);d.restore()}E++}while(null!=H)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",v);mxUtils.extend(J,mxCylinder);J.prototype.redrawPath=function(d,p,A,u,z,E){E?(d.moveTo(0,0),d.lineTo(u/2,z/2),d.lineTo(u,0),d.end()):(d.moveTo(0,0),d.lineTo(u,0),d.lineTo(u,
+z),d.lineTo(0,z),d.close())};mxCellRenderer.registerShape("message",J);mxUtils.extend(N,mxShape);N.prototype.paintBackground=function(d,p,A,u,z){d.translate(p,A);d.ellipse(u/4,0,u/2,z/4);d.fillAndStroke();d.begin();d.moveTo(u/2,z/4);d.lineTo(u/2,2*z/3);d.moveTo(u/2,z/3);d.lineTo(0,z/3);d.moveTo(u/2,z/3);d.lineTo(u,z/3);d.moveTo(u/2,2*z/3);d.lineTo(0,z);d.moveTo(u/2,2*z/3);d.lineTo(u,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",N);mxUtils.extend(T,mxShape);T.prototype.getLabelMargins=
+function(d){return new mxRectangle(d.width/6,0,0,0)};T.prototype.paintBackground=function(d,p,A,u,z){d.translate(p,A);d.begin();d.moveTo(0,z/4);d.lineTo(0,3*z/4);d.end();d.stroke();d.begin();d.moveTo(0,z/2);d.lineTo(u/6,z/2);d.end();d.stroke();d.ellipse(u/6,0,5*u/6,z);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",T);mxUtils.extend(W,mxEllipse);W.prototype.paintVertexShape=function(d,p,A,u,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+u/8,A+z);d.lineTo(p+
+7*u/8,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",W);mxUtils.extend(U,mxShape);U.prototype.paintVertexShape=function(d,p,A,u,z){d.translate(p,A);d.begin();d.moveTo(u,0);d.lineTo(0,z);d.moveTo(0,0);d.lineTo(u,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",U);mxUtils.extend(Y,mxShape);Y.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};Y.prototype.paintBackground=function(d,p,A,u,z){d.translate(p,A);d.begin();
+d.moveTo(3*u/8,z/8*1.1);d.lineTo(5*u/8,0);d.end();d.stroke();d.ellipse(0,z/8,u,7*z/8);d.fillAndStroke()};Y.prototype.paintForeground=function(d,p,A,u,z){d.begin();d.moveTo(3*u/8,z/8*1.1);d.lineTo(5*u/8,z/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",Y);mxUtils.extend(fa,mxRectangleShape);fa.prototype.size=40;fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.getLabelBounds=function(d){var p=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*
+this.scale));return new mxRectangle(d.x,d.y,d.width,p)};fa.prototype.paintBackground=function(d,p,A,u,z){var E=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),H=mxUtils.getValue(this.style,"participant");null==H||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,p,A,u,E):(H=this.state.view.graph.cellRenderer.getShape(H),null!=H&&H!=fa&&(H=new H,H.apply(this.state),d.save(),H.paintVertexShape(d,p,A,u,E),d.restore()));E<z&&(d.setDashed("1"==mxUtils.getValue(this.style,
+"lifelineDashed","1")),d.begin(),d.moveTo(p+u/2,A+E),d.lineTo(p+u/2,A+z),d.end(),d.stroke())};fa.prototype.paintForeground=function(d,p,A,u,z){var E=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,p,A,u,Math.min(z,E))};mxCellRenderer.registerShape("umlLifeline",fa);mxUtils.extend(oa,mxShape);oa.prototype.width=60;oa.prototype.height=30;oa.prototype.corner=10;oa.prototype.configurePointerEvents=function(d){var p=
+mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=p&&p!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};oa.prototype.getLabelMargins=function(d){return new mxRectangle(0,0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};oa.prototype.paintBackground=
+function(d,p,A,u,z){var E=this.corner,H=Math.min(u,Math.max(E,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),ea=Math.min(z,Math.max(1.5*E,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),O=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);O!=mxConstants.NONE&&(d.setFillColor(O),d.rect(p,A,u,z),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,p,A,u,z),d.setGradient(this.fill,
+this.gradient,p,A,u,z,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(p,A);d.lineTo(p+H,A);d.lineTo(p+H,A+Math.max(0,ea-1.5*E));d.lineTo(p+Math.max(0,H-E),A+ea);d.lineTo(p,A+ea);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(p+H,A);d.lineTo(p+u,A);d.lineTo(p+u,A+z);d.lineTo(p,A+z);d.lineTo(p,A+ea);d.stroke()};mxCellRenderer.registerShape("umlFrame",oa);mxPerimeter.CenterPerimeter=function(d,p,A,u){return new mxPoint(d.getCenterX(),
+d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,p,A,u){u=fa.prototype.size;null!=p&&(u=mxUtils.getValue(p.style,"size",u)*p.view.scale);p=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;A.x<d.getCenterX()&&(p=-1*(p+1));return new mxPoint(d.getCenterX()+p,Math.min(d.y+d.height,Math.max(d.y+u,A.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
+function(d,p,A,u){u=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,p,A,u){u=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;null!=p.style.backboneSize&&(u+=parseFloat(p.style.backboneSize)*p.view.scale/2-1);if("south"==p.style[mxConstants.STYLE_DIRECTION]||"north"==p.style[mxConstants.STYLE_DIRECTION])return A.x<d.getCenterX()&&(u=-1*(u+1)),
+new mxPoint(d.getCenterX()+u,Math.min(d.y+d.height,Math.max(d.y,A.y)));A.y<d.getCenterY()&&(u=-1*(u+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,A.x)),d.getCenterY()+u)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,p,A,u){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(p.style,"size",ka.prototype.size))*p.view.scale))),
+p.style),p,A,u)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,p,A,u){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),E=z?K.prototype.fixedSize:K.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var H=d.x,ea=d.y,O=d.width,ta=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==
+mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H,ea),new mxPoint(H+O,ea+z),new mxPoint(H+O,ea+ta),new mxPoint(H,ea+ta-z),new mxPoint(H,ea)]):(z=z?Math.max(0,Math.min(.5*O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H+z,ea),new mxPoint(H+O,ea),new mxPoint(H+O-z,ea+ta),new mxPoint(H,ea+ta),new mxPoint(H+z,ea)]);ta=d.getCenterX();d=d.getCenterY();d=new mxPoint(ta,d);u&&(A.x<H||A.x>H+O?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,
+A)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,p,A,u){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),E=z?Z.prototype.fixedSize:Z.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var H=d.x,ea=d.y,O=d.width,ta=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,
+Math.min(.5*O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H+z,ea),new mxPoint(H+O-z,ea),new mxPoint(H+O,ea+ta),new mxPoint(H,ea+ta),new mxPoint(H+z,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H,ea),new mxPoint(H+O,ea),new mxPoint(H+O-z,ea+ta),new mxPoint(H+z,ea+ta),new mxPoint(H,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H,ea+z),new mxPoint(H+O,ea),new mxPoint(H+
+O,ea+ta),new mxPoint(H,ea+ta-z),new mxPoint(H,ea+z)]):(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H,ea),new mxPoint(H+O,ea+z),new mxPoint(H+O,ea+ta-z),new mxPoint(H,ea+ta),new mxPoint(H,ea)]);ta=d.getCenterX();d=d.getCenterY();d=new mxPoint(ta,d);u&&(A.x<H||A.x>H+O?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,A)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,p,A,u){var z="0"!=mxUtils.getValue(p.style,
+"fixedSize","0"),E=z?aa.prototype.fixedSize:aa.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var H=d.x,ea=d.y,O=d.width,ta=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H,ea),new mxPoint(H+O-z,ea),new mxPoint(H+O,d),new mxPoint(H+O-z,ea+ta),new mxPoint(H,
+ea+ta),new mxPoint(H+z,d),new mxPoint(H,ea)]):p==mxConstants.DIRECTION_WEST?(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H+z,ea),new mxPoint(H+O,ea),new mxPoint(H+O-z,d),new mxPoint(H+O,ea+ta),new mxPoint(H+z,ea+ta),new mxPoint(H,d),new mxPoint(H+z,ea)]):p==mxConstants.DIRECTION_NORTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H,ea+z),new mxPoint(ma,ea),new mxPoint(H+O,ea+z),new mxPoint(H+O,ea+ta),new mxPoint(ma,ea+ta-z),new mxPoint(H,
+ea+ta),new mxPoint(H,ea+z)]):(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H,ea),new mxPoint(ma,ea+z),new mxPoint(H+O,ea),new mxPoint(H+O,ea+ta-z),new mxPoint(ma,ea+ta),new mxPoint(H,ea+ta-z),new mxPoint(H,ea)]);ma=new mxPoint(ma,d);u&&(A.x<H||A.x>H+O?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,p,A,u){var z="0"!=mxUtils.getValue(p.style,"fixedSize",
+"0"),E=z?V.prototype.fixedSize:V.prototype.size;null!=p&&(E=mxUtils.getValue(p.style,"size",E));z&&(E*=p.view.scale);var H=d.x,ea=d.y,O=d.width,ta=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(ta,E)):ta*Math.max(0,Math.min(1,E)),ea=[new mxPoint(ma,ea),new mxPoint(H+O,ea+z),new mxPoint(H+O,ea+ta-z),
+new mxPoint(ma,ea+ta),new mxPoint(H,ea+ta-z),new mxPoint(H,ea+z),new mxPoint(ma,ea)]):(z=z?Math.max(0,Math.min(O,E)):O*Math.max(0,Math.min(1,E)),ea=[new mxPoint(H+z,ea),new mxPoint(H+O-z,ea),new mxPoint(H+O,d),new mxPoint(H+O-z,ea+ta),new mxPoint(H+z,ea+ta),new mxPoint(H,d),new mxPoint(H+z,ea)]);ma=new mxPoint(ma,d);u&&(A.x<H||A.x>H+O?ma.y=A.y:ma.x=A.x);return mxUtils.getPerimeterPoint(ea,ma,A)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(la,mxShape);
+la.prototype.size=10;la.prototype.paintBackground=function(d,p,A,u,z){var E=parseFloat(mxUtils.getValue(this.style,"size",this.size));d.translate(p,A);d.ellipse((u-E)/2,0,E,E);d.fillAndStroke();d.begin();d.moveTo(u/2,E);d.lineTo(u/2,z);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",la);mxUtils.extend(qa,mxShape);qa.prototype.size=10;qa.prototype.inset=2;qa.prototype.paintBackground=function(d,p,A,u,z){var E=parseFloat(mxUtils.getValue(this.style,"size",this.size)),H=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;d.translate(p,A);d.begin();d.moveTo(u/2,E+H);d.lineTo(u/2,z);d.end();d.stroke();d.begin();d.moveTo((u-E)/2-H,E/2);d.quadTo((u-E)/2-H,E+H,u/2,E+H);d.quadTo((u+E)/2+H,E+H,(u+E)/2+H,E/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",qa);mxUtils.extend(ya,mxShape);ya.prototype.paintBackground=function(d,p,A,u,z){d.translate(p,A);d.begin();d.moveTo(0,0);d.quadTo(u,0,u,z/2);d.quadTo(u,z,0,z);d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",
+ya);mxUtils.extend(wa,mxShape);wa.prototype.inset=2;wa.prototype.paintBackground=function(d,p,A,u,z){var E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,A);d.ellipse(0,E,u-2*E,z-2*E);d.fillAndStroke();d.begin();d.moveTo(u/2,0);d.quadTo(u,0,u,z/2);d.quadTo(u,z,u/2,z);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",wa);mxUtils.extend(Ia,mxCylinder);Ia.prototype.jettyWidth=20;Ia.prototype.jettyHeight=10;Ia.prototype.redrawPath=
+function(d,p,A,u,z,E){var H=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=H/2;H=A+H/2;var ea=Math.min(p,z-p),O=Math.min(ea+2*p,z-p);E?(d.moveTo(A,ea),d.lineTo(H,ea),d.lineTo(H,ea+p),d.lineTo(A,ea+p),d.moveTo(A,O),d.lineTo(H,O),d.lineTo(H,O+p),d.lineTo(A,O+p)):(d.moveTo(A,0),d.lineTo(u,0),d.lineTo(u,z),d.lineTo(A,z),d.lineTo(A,O+p),d.lineTo(0,O+p),d.lineTo(0,O),d.lineTo(A,O),d.lineTo(A,ea+p),d.lineTo(0,
+ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("module",Ia);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(d,p,A,u,z,E){var H=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));A=H/2;H=A+H/2;var ea=.3*z-p/2,O=.7*z-p/2;E?(d.moveTo(A,ea),d.lineTo(H,ea),d.lineTo(H,ea+p),d.lineTo(A,ea+p),d.moveTo(A,O),
+d.lineTo(H,O),d.lineTo(H,O+p),d.lineTo(A,O+p)):(d.moveTo(A,0),d.lineTo(u,0),d.lineTo(u,z),d.lineTo(A,z),d.lineTo(A,O+p),d.lineTo(0,O+p),d.lineTo(0,O),d.lineTo(A,O),d.lineTo(A,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(A,ea),d.close());d.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(Ba,mxRectangleShape);Ba.prototype.paintForeground=function(d,p,A,u,z){var E=u/2,H=z/2,ea=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,
+[new mxPoint(p+E,A),new mxPoint(p+u,A+H),new mxPoint(p+E,A+z),new mxPoint(p,A+H)],this.isRounded,ea,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ba);mxUtils.extend(Ga,mxDoubleEllipse);Ga.prototype.outerStroke=!0;Ga.prototype.paintVertexShape=function(d,p,A,u,z){var E=Math.min(4,Math.min(u/5,z/5));0<u&&0<z&&(d.ellipse(p+E,A+E,u-2*E,z-2*E),d.fillAndStroke());d.setShadow(!1);this.outerStroke&&(d.ellipse(p,A,u,z),d.stroke())};
mxCellRenderer.registerShape("endState",Ga);mxUtils.extend(Ma,Ga);Ma.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ma);mxUtils.extend(sa,mxArrowConnector);sa.prototype.defaultWidth=4;sa.prototype.isOpenEnded=function(){return!0};sa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};sa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",sa);mxUtils.extend(Ca,
mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
-Ca);mxUtils.extend(Da,mxActor);Da.prototype.size=30;Da.prototype.isRoundable=function(){return!0};Da.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(0,p),new mxPoint(t,0),new mxPoint(t,z)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("manualInput",Da);mxUtils.extend(va,mxRectangleShape);va.prototype.dx=
-20;va.prototype.dy=20;va.prototype.isHtmlAllowed=function(){return!1};va.prototype.paintForeground=function(d,p,A,t,z){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var E=0;if(this.isRounded){var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;E=Math.max(E,Math.min(t*G,z*G))}G=Math.max(E,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));E=Math.max(E,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
-d.begin();d.moveTo(p,A+E);d.lineTo(p+t,A+E);d.end();d.stroke();d.begin();d.moveTo(p+G,A);d.lineTo(p+G,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",va);mxUtils.extend(Na,mxActor);Na.prototype.dx=20;Na.prototype.dy=20;Na.prototype.isRoundable=function(){return!0};Na.prototype.redrawPath=function(d,p,A,t,z){p=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,
-"size",this.size));var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,A),new mxPoint(p,A),new mxPoint(p,z),new mxPoint(0,z)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("corner",Na);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.lineTo(0,z);d.end();d.moveTo(t,0);d.lineTo(t,z);d.end();d.moveTo(0,z/2);d.lineTo(t,z/2);d.end()};mxCellRenderer.registerShape("crossbar",
-Sa);mxUtils.extend(Ua,mxActor);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototype.isRoundable=function(){return!0};Ua.prototype.redrawPath=function(d,p,A,t,z){p=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,
-0),new mxPoint(t,A),new mxPoint((t+p)/2,A),new mxPoint((t+p)/2,z),new mxPoint((t-p)/2,z),new mxPoint((t-p)/2,A),new mxPoint(0,A)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("tee",Ua);mxUtils.extend(Qa,mxActor);Qa.prototype.arrowWidth=.3;Qa.prototype.arrowSize=.2;Qa.prototype.isRoundable=function(){return!0};Qa.prototype.redrawPath=function(d,p,A,t,z){var E=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"arrowSize",this.arrowSize))));A=(z-E)/2;E=A+E;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,E),new mxPoint(0,E)],this.isRounded,G,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Qa);mxUtils.extend(za,mxActor);za.prototype.isRoundable=function(){return!0};za.prototype.redrawPath=function(d,p,A,t,z){var E=z*Math.max(0,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"arrowWidth",Qa.prototype.arrowWidth))));p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Qa.prototype.arrowSize))));A=(z-E)/2;E=A+E;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z/2),new mxPoint(p,0),new mxPoint(p,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,E),new mxPoint(p,E),new mxPoint(p,z)],this.isRounded,
-G,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",za);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.1;Ea.prototype.fixedSize=20;Ea.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(p,0);d.lineTo(t,0);d.quadTo(t-2*p,z/2,t,z);d.lineTo(p,z);d.quadTo(p-2*p,z/2,p,0);d.close();
-d.end()};mxCellRenderer.registerShape("dataStorage",Ea);mxUtils.extend(B,mxActor);B.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.close();d.end()};mxCellRenderer.registerShape("or",B);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.quadTo(t/2,z/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",Q);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=
-function(){return!0};R.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t/2,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,.8*p),new mxPoint(t,z),new mxPoint(0,z),new mxPoint(0,.8*p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(X,mxActor);X.prototype.size=.375;X.prototype.isRoundable=
-function(){return!0};X.prototype.redrawPath=function(d,p,A,t,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,z-p),new mxPoint(t/2,z),new mxPoint(0,z-p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",X);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,p,A,t,
-z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+t/2,A+z);d.lineTo(p+t,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+t,A+z/2);d.end();d.stroke();d.begin();d.moveTo(p+t/2,A);d.lineTo(p+t/2,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",
-ja);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p+.145*t,A+.145*z);d.lineTo(p+.855*t,A+.855*z);d.end();d.stroke();d.begin();d.moveTo(p+.855*t,A+.145*z);d.lineTo(p+.145*t,A+.855*z);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,p,A,t,z){mxRhombus.prototype.paintVertexShape.apply(this,
-arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+t,A+z/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(d,p,A,t,z){d.begin();d.moveTo(p,A);d.lineTo(p+t,A);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke();d.begin();d.moveTo(p,A+z);d.lineTo(p+t,A+z);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ra);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=
-function(d,p,A,t,z){var E=d.state.strokeWidth/2,G=10+2*E,ea=A+z-G/2;d.begin();d.moveTo(p,A);d.lineTo(p,A+z);d.moveTo(p+E,ea);d.lineTo(p+E+G,ea-G/2);d.moveTo(p+E,ea);d.lineTo(p+E+G,ea+G/2);d.moveTo(p+E,ea);d.lineTo(p+t-E,ea);d.moveTo(p+t,A);d.lineTo(p+t,A+z);d.moveTo(p+t-E,ea);d.lineTo(p+t-G-E,ea-G/2);d.moveTo(p+t-E,ea);d.lineTo(p+t-G-E,ea+G/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(Ka,mxEllipse);Ka.prototype.drawHidden=!0;Ka.prototype.paintVertexShape=function(d,
-p,A,t,z){this.outline||d.setStrokeColor(null);if(null!=this.style){var E=d.pointerEvents,G=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||G||(d.pointerEvents=!1);var ea="1"==mxUtils.getValue(this.style,"top","1"),O="1"==mxUtils.getValue(this.style,"left","1"),ta="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||G||this.outline||ea||ta||ma||O?(d.rect(p,A,t,z),d.fill(),
-d.pointerEvents=E,d.setStrokeColor(this.stroke),d.setLineCap("square"),d.begin(),d.moveTo(p,A),this.outline||ea?d.lineTo(p+t,A):d.moveTo(p+t,A),this.outline||ta?d.lineTo(p+t,A+z):d.moveTo(p+t,A+z),this.outline||ma?d.lineTo(p,A+z):d.moveTo(p,A+z),(this.outline||O)&&d.lineTo(p,A),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ka);mxUtils.extend(Va,mxEllipse);Va.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);d.setShadow(!1);d.begin();"vertical"==mxUtils.getValue(this.style,"line")?(d.moveTo(p+t/2,A),d.lineTo(p+t/2,A+z)):(d.moveTo(p,A+z/2),d.lineTo(p+t,A+z/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Va);mxUtils.extend(Oa,mxActor);Oa.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/2);d.moveTo(0,0);d.lineTo(t-p,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t-p,z);d.lineTo(0,z);d.close();d.end()};mxCellRenderer.registerShape("delay",Oa);mxUtils.extend(Ta,mxActor);Ta.prototype.size=
-.2;Ta.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(z,t);var E=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(z-E)/2;A=p+E;var G=(t-E)/2;E=G+E;d.moveTo(0,p);d.lineTo(G,p);d.lineTo(G,0);d.lineTo(E,0);d.lineTo(E,p);d.lineTo(t,p);d.lineTo(t,A);d.lineTo(E,A);d.lineTo(E,z);d.lineTo(G,z);d.lineTo(G,A);d.lineTo(0,A);d.close();d.end()};mxCellRenderer.registerShape("cross",Ta);mxUtils.extend(Za,mxActor);Za.prototype.size=.25;Za.prototype.redrawPath=function(d,
-p,A,t,z){p=Math.min(t,z/2);A=Math.min(t-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*t);d.moveTo(0,z/2);d.lineTo(A,0);d.lineTo(t-p,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,t-p,z);d.lineTo(A,z);d.close();d.end()};mxCellRenderer.registerShape("display",Za);mxUtils.extend(Pa,mxActor);Pa.prototype.cst={RECT2:"mxgraph.basic.rect"};Pa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",
+Ca);mxUtils.extend(Da,mxActor);Da.prototype.size=30;Da.prototype.isRoundable=function(){return!0};Da.prototype.redrawPath=function(d,p,A,u,z){p=Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(0,p),new mxPoint(u,0),new mxPoint(u,z)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("manualInput",Da);mxUtils.extend(va,mxRectangleShape);va.prototype.dx=
+20;va.prototype.dy=20;va.prototype.isHtmlAllowed=function(){return!1};va.prototype.paintForeground=function(d,p,A,u,z){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var E=0;if(this.isRounded){var H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;E=Math.max(E,Math.min(u*H,z*H))}H=Math.max(E,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));E=Math.max(E,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
+d.begin();d.moveTo(p,A+E);d.lineTo(p+u,A+E);d.end();d.stroke();d.begin();d.moveTo(p+H,A);d.lineTo(p+H,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",va);mxUtils.extend(Na,mxActor);Na.prototype.dx=20;Na.prototype.dy=20;Na.prototype.isRoundable=function(){return!0};Na.prototype.redrawPath=function(d,p,A,u,z){p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,
+"size",this.size));var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,A),new mxPoint(p,A),new mxPoint(p,z),new mxPoint(0,z)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("corner",Na);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(d,p,A,u,z){d.moveTo(0,0);d.lineTo(0,z);d.end();d.moveTo(u,0);d.lineTo(u,z);d.end();d.moveTo(0,z/2);d.lineTo(u,z/2);d.end()};mxCellRenderer.registerShape("crossbar",
+Sa);mxUtils.extend(Ua,mxActor);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototype.isRoundable=function(){return!0};Ua.prototype.redrawPath=function(d,p,A,u,z){p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,
+0),new mxPoint(u,A),new mxPoint((u+p)/2,A),new mxPoint((u+p)/2,z),new mxPoint((u-p)/2,z),new mxPoint((u-p)/2,A),new mxPoint(0,A)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("tee",Ua);mxUtils.extend(Qa,mxActor);Qa.prototype.arrowWidth=.3;Qa.prototype.arrowSize=.2;Qa.prototype.isRoundable=function(){return!0};Qa.prototype.redrawPath=function(d,p,A,u,z){var E=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",this.arrowSize))));A=(z-E)/2;E=A+E;var H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,A),new mxPoint(u-p,A),new mxPoint(u-p,0),new mxPoint(u,z/2),new mxPoint(u-p,z),new mxPoint(u-p,E),new mxPoint(0,E)],this.isRounded,H,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Qa);mxUtils.extend(za,mxActor);za.prototype.isRoundable=function(){return!0};za.prototype.redrawPath=function(d,p,A,u,z){var E=z*Math.max(0,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"arrowWidth",Qa.prototype.arrowWidth))));p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Qa.prototype.arrowSize))));A=(z-E)/2;E=A+E;var H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z/2),new mxPoint(p,0),new mxPoint(p,A),new mxPoint(u-p,A),new mxPoint(u-p,0),new mxPoint(u,z/2),new mxPoint(u-p,z),new mxPoint(u-p,E),new mxPoint(p,E),new mxPoint(p,z)],this.isRounded,
+H,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",za);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.1;Ea.prototype.fixedSize=20;Ea.prototype.redrawPath=function(d,p,A,u,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(p,0);d.lineTo(u,0);d.quadTo(u-2*p,z/2,u,z);d.lineTo(p,z);d.quadTo(p-2*p,z/2,p,0);d.close();
+d.end()};mxCellRenderer.registerShape("dataStorage",Ea);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(d,p,A,u,z){d.moveTo(0,0);d.quadTo(u,0,u,z/2);d.quadTo(u,z,0,z);d.close();d.end()};mxCellRenderer.registerShape("or",C);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(d,p,A,u,z){d.moveTo(0,0);d.quadTo(u,0,u,z/2);d.quadTo(u,z,0,z);d.quadTo(u/2,z/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",Q);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=
+function(){return!0};R.prototype.redrawPath=function(d,p,A,u,z){p=Math.min(u/2,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,.8*p),new mxPoint(u,z),new mxPoint(0,z),new mxPoint(0,.8*p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(X,mxActor);X.prototype.size=.375;X.prototype.isRoundable=
+function(){return!0};X.prototype.redrawPath=function(d,p,A,u,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,z-p),new mxPoint(u/2,z),new mxPoint(0,z-p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",X);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(d,p,A,u,
+z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+u/2,A+z);d.lineTo(p+u,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ha);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,p,A,u,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+u,A+z/2);d.end();d.stroke();d.begin();d.moveTo(p+u/2,A);d.lineTo(p+u/2,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",
+ia);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(d,p,A,u,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p+.145*u,A+.145*z);d.lineTo(p+.855*u,A+.855*z);d.end();d.stroke();d.begin();d.moveTo(p+.855*u,A+.145*z);d.lineTo(p+.145*u,A+.855*z);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,p,A,u,z){mxRhombus.prototype.paintVertexShape.apply(this,
+arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+u,A+z/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(d,p,A,u,z){d.begin();d.moveTo(p,A);d.lineTo(p+u,A);d.lineTo(p+u/2,A+z/2);d.close();d.fillAndStroke();d.begin();d.moveTo(p,A+z);d.lineTo(p+u,A+z);d.lineTo(p+u/2,A+z/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ra);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=
+function(d,p,A,u,z){var E=d.state.strokeWidth/2,H=10+2*E,ea=A+z-H/2;d.begin();d.moveTo(p,A);d.lineTo(p,A+z);d.moveTo(p+E,ea);d.lineTo(p+E+H,ea-H/2);d.moveTo(p+E,ea);d.lineTo(p+E+H,ea+H/2);d.moveTo(p+E,ea);d.lineTo(p+u-E,ea);d.moveTo(p+u,A);d.lineTo(p+u,A+z);d.moveTo(p+u-E,ea);d.lineTo(p+u-H-E,ea-H/2);d.moveTo(p+u-E,ea);d.lineTo(p+u-H-E,ea+H/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(Ka,mxEllipse);Ka.prototype.drawHidden=!0;Ka.prototype.paintVertexShape=function(d,
+p,A,u,z){this.outline||d.setStrokeColor(null);if(null!=this.style){var E=d.pointerEvents,H=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||H||(d.pointerEvents=!1);var ea="1"==mxUtils.getValue(this.style,"top","1"),O="1"==mxUtils.getValue(this.style,"left","1"),ta="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||H||this.outline||ea||ta||ma||O?(d.rect(p,A,u,z),d.fill(),
+d.pointerEvents=E,d.setStrokeColor(this.stroke),d.setLineCap("square"),d.begin(),d.moveTo(p,A),this.outline||ea?d.lineTo(p+u,A):d.moveTo(p+u,A),this.outline||ta?d.lineTo(p+u,A+z):d.moveTo(p+u,A+z),this.outline||ma?d.lineTo(p,A+z):d.moveTo(p,A+z),(this.outline||O)&&d.lineTo(p,A),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ka);mxUtils.extend(Va,mxEllipse);Va.prototype.paintVertexShape=function(d,p,A,u,z){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);d.setShadow(!1);d.begin();"vertical"==mxUtils.getValue(this.style,"line")?(d.moveTo(p+u/2,A),d.lineTo(p+u/2,A+z)):(d.moveTo(p,A+z/2),d.lineTo(p+u,A+z/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Va);mxUtils.extend(Oa,mxActor);Oa.prototype.redrawPath=function(d,p,A,u,z){p=Math.min(u,z/2);d.moveTo(0,0);d.lineTo(u-p,0);d.quadTo(u,0,u,z/2);d.quadTo(u,z,u-p,z);d.lineTo(0,z);d.close();d.end()};mxCellRenderer.registerShape("delay",Oa);mxUtils.extend(Ta,mxActor);Ta.prototype.size=
+.2;Ta.prototype.redrawPath=function(d,p,A,u,z){p=Math.min(z,u);var E=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(z-E)/2;A=p+E;var H=(u-E)/2;E=H+E;d.moveTo(0,p);d.lineTo(H,p);d.lineTo(H,0);d.lineTo(E,0);d.lineTo(E,p);d.lineTo(u,p);d.lineTo(u,A);d.lineTo(E,A);d.lineTo(E,z);d.lineTo(H,z);d.lineTo(H,A);d.lineTo(0,A);d.close();d.end()};mxCellRenderer.registerShape("cross",Ta);mxUtils.extend(Za,mxActor);Za.prototype.size=.25;Za.prototype.redrawPath=function(d,
+p,A,u,z){p=Math.min(u,z/2);A=Math.min(u-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*u);d.moveTo(0,z/2);d.lineTo(A,0);d.lineTo(u-p,0);d.quadTo(u,0,u,z/2);d.quadTo(u,z,u-p,z);d.lineTo(A,z);d.close();d.end()};mxCellRenderer.registerShape("display",Za);mxUtils.extend(Pa,mxActor);Pa.prototype.cst={RECT2:"mxgraph.basic.rect"};Pa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",
dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",
dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",
type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},
{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",
-enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Pa.prototype.paintVertexShape=function(d,p,A,t,z){d.translate(p,A);this.strictDrawShape(d,0,0,t,z)};Pa.prototype.strictDrawShape=function(d,p,A,t,z,E){var G=E&&E.rectStyle?E.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ea=E&&E.absoluteCornerSize?E.absoluteCornerSize:mxUtils.getValue(this.style,
-"absoluteCornerSize",this.absoluteCornerSize),O=E&&E.size?E.size:Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),ta=E&&E.rectOutline?E.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=E&&E.indent?E.indent:Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=E&&E.dashed?E.dashed:mxUtils.getValue(this.style,"dashed",!1),ib=E&&E.dashPattern?E.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),cb=
+enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Pa.prototype.paintVertexShape=function(d,p,A,u,z){d.translate(p,A);this.strictDrawShape(d,0,0,u,z)};Pa.prototype.strictDrawShape=function(d,p,A,u,z,E){var H=E&&E.rectStyle?E.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ea=E&&E.absoluteCornerSize?E.absoluteCornerSize:mxUtils.getValue(this.style,
+"absoluteCornerSize",this.absoluteCornerSize),O=E&&E.size?E.size:Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),ta=E&&E.rectOutline?E.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=E&&E.indent?E.indent:Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=E&&E.dashed?E.dashed:mxUtils.getValue(this.style,"dashed",!1),ib=E&&E.dashPattern?E.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),cb=
E&&E.relIndent?E.relIndent:Math.max(0,Math.min(50,ma)),Fa=E&&E.top?E.top:mxUtils.getValue(this.style,"top",!0),La=E&&E.right?E.right:mxUtils.getValue(this.style,"right",!0),Ja=E&&E.bottom?E.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=E&&E.left?E.left:mxUtils.getValue(this.style,"left",!0),Wa=E&&E.topLeftStyle?E.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Xa=E&&E.topRightStyle?E.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ya=E&&E.bottomRightStyle?
E.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),$a=E&&E.bottomLeftStyle?E.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Hb=E&&E.fillColor?E.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");E&&E.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Ib=E&&E.strokeWidth?E.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Fb=E&&E.fillColor2?E.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Gb=E&&E.gradientColor2?
-E.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Jb=E&&E.gradientDirection2?E.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Kb=E&&E.opacity?E.opacity:mxUtils.getValue(this.style,"opacity","100"),Lb=Math.max(0,Math.min(50,O));E=Pa.prototype;d.setDashed(ab);ib&&""!=ib&&d.setDashPattern(ib);d.setStrokeWidth(Ib);O=Math.min(.5*z,.5*t,O);ea||(O=Lb*Math.min(t,z)/100);O=Math.min(O,.5*Math.min(t,z));ea||(ma=Math.min(cb*Math.min(t,z)/100));ma=Math.min(ma,
-.5*Math.min(t,z)-O);(Fa||La||Ja||Ha)&&"frame"!=ta&&(d.begin(),Fa?E.moveNW(d,p,A,t,z,G,Wa,O,Ha):d.moveTo(0,0),Fa&&E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),La&&E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),Ja&&E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),Ha&&E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Fb),ab=ea=Kb,"none"==Fb&&(ea=0),"none"==Gb&&(ab=0),d.setGradient(Fb,
-Gb,0,0,t,z,Jb,ea,ab),d.begin(),Fa?E.moveNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha):d.moveTo(ma,0),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),Ha&&Ja&&E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),Ja&&La&&E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),La&&Fa&&E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),Fa&&Ha&&E.paintNWInner(d,p,A,t,z,G,Wa,O,ma),d.fill(),"none"==Hb&&(d.begin(),E.paintFolds(d,p,A,t,z,
-G,Wa,Xa,Ya,$a,O,Fa,La,Ja,Ha),d.stroke()));Fa||La||Ja||!Ha?Fa||La||!Ja||Ha?!Fa&&!La&&Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,
-t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.lineNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):Fa||!La||Ja||Ha?!Fa&&La&&!Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSW(d,p,A,t,z,G,Wa,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha)),d.stroke(),
-d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveSW(d,p,A,t,z,G,Wa,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.lineNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke(),d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.lineSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,
-p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa&&La&&Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,
-p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.lineSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa&&La&&Ja&&Ha?"frame"!=ta?(d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,
-p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.lineNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,
-p,A,t,z,G,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa||La||Ja||Ha?Fa&&!La&&!Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),"double"==ta&&(E.moveNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,
-p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha)),d.stroke()):(d.begin(),E.moveSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke()):Fa&&!La&&Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,
-La),"double"==ta&&(E.moveNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa)),d.stroke(),d.begin(),E.moveSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke(),d.begin(),E.moveSE(d,
-p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.lineSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):Fa&&!La&&Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),"double"==ta&&(E.moveNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,
-p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,
-A,t,z,G,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):Fa&&La&&!Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa)),d.stroke()):(d.begin(),
-E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.lineSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&!Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,
-z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha)),d.stroke()):(d.begin(),E.moveSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,
-A,t,z,G,Ya,O,Ja),E.lineSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke()):Fa&&La&&Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,
-p,A,t,z,G,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa)),d.stroke()):(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.lineSWInner(d,
-p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&Ja&&Ha&&("frame"!=ta?(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,
-p,A,t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),d.close(),"double"==ta&&(E.moveSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),d.close()),d.stroke()):(d.begin(),
-E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.paintNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.paintSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.paintSW(d,p,A,t,z,G,$a,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),d.close(),E.moveSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintSWInner(d,p,A,t,z,G,$a,O,ma,Ja),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,t,z,G,Ya,O,ma),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),
-E.paintNEInner(d,p,A,t,z,G,Xa,O,ma),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,t,z,G,Wa,O,ma),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke())):"frame"!=ta?(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),"double"==ta&&(E.moveNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,p,A,t,z,G,Wa,O,ma,Ha,Fa)),d.stroke()):(d.begin(),E.moveNW(d,p,A,t,z,G,Wa,O,Ha),E.paintTop(d,p,A,t,z,G,Xa,O,La),E.lineNEInner(d,p,A,t,z,G,Xa,O,ma,La),E.paintTopInner(d,
-p,A,t,z,G,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveNE(d,p,A,t,z,G,Xa,O,Fa),E.paintRight(d,p,A,t,z,G,Ya,O,Ja),E.lineSEInner(d,p,A,t,z,G,Ya,O,ma,Ja),E.paintRightInner(d,p,A,t,z,G,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),E.moveSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,
-p,A,t,z,G,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveSE(d,p,A,t,z,G,Ya,O,La),E.paintBottom(d,p,A,t,z,G,$a,O,Ha),E.lineSWInner(d,p,A,t,z,G,$a,O,ma,Ha),E.paintBottomInner(d,p,A,t,z,G,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),E.moveSW(d,p,A,t,z,G,Wa,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,
-Ha)),d.stroke()):(d.begin(),E.moveSW(d,p,A,t,z,G,Wa,O,Ja),E.paintLeft(d,p,A,t,z,G,Wa,O,Fa),E.lineNWInner(d,p,A,t,z,G,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,t,z,G,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke());d.begin();E.paintFolds(d,p,A,t,z,G,Wa,Xa,Ya,$a,O,Fa,La,Ja,Ha);d.stroke()};Pa.prototype.moveNW=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.moveTo(0,0):d.moveTo(0,ea)};Pa.prototype.moveNE=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.moveTo(t,
-0):d.moveTo(t-ea,0)};Pa.prototype.moveSE=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.moveTo(t,z):d.moveTo(t,z-ea)};Pa.prototype.moveSW=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.moveTo(0,z):d.moveTo(ea,z)};Pa.prototype.paintNW=function(d,p,A,t,z,E,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==E||"invRound"==G||"default"==G&&"invRound"==E){p=0;if("rounded"==G||"default"==G&&"rounded"==E)p=1;d.arcTo(ea,ea,0,0,p,ea,0)}else("snip"==
-G||"default"==G&&"snip"==E||"fold"==G||"default"==G&&"fold"==E)&&d.lineTo(ea,0);else d.lineTo(0,0)};Pa.prototype.paintTop=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.lineTo(t,0):d.lineTo(t-ea,0)};Pa.prototype.paintNE=function(d,p,A,t,z,E,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==E||"invRound"==G||"default"==G&&"invRound"==E){p=0;if("rounded"==G||"default"==G&&"rounded"==E)p=1;d.arcTo(ea,ea,0,0,p,t,ea)}else("snip"==G||"default"==G&&"snip"==E||"fold"==G||"default"==
-G&&"fold"==E)&&d.lineTo(t,ea);else d.lineTo(t,0)};Pa.prototype.paintRight=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.lineTo(t,z):d.lineTo(t,z-ea)};Pa.prototype.paintLeft=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.lineTo(0,0):d.lineTo(0,ea)};Pa.prototype.paintSE=function(d,p,A,t,z,E,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==E||"invRound"==G||"default"==G&&"invRound"==E){p=0;if("rounded"==G||"default"==G&&"rounded"==E)p=1;d.arcTo(ea,
-ea,0,0,p,t-ea,z)}else("snip"==G||"default"==G&&"snip"==E||"fold"==G||"default"==G&&"fold"==E)&&d.lineTo(t-ea,z);else d.lineTo(t,z)};Pa.prototype.paintBottom=function(d,p,A,t,z,E,G,ea,O){"square"==G||"default"==G&&"square"==E||!O?d.lineTo(0,z):d.lineTo(ea,z)};Pa.prototype.paintSW=function(d,p,A,t,z,E,G,ea,O){if(O)if("rounded"==G||"default"==G&&"rounded"==E||"invRound"==G||"default"==G&&"invRound"==E){p=0;if("rounded"==G||"default"==G&&"rounded"==E)p=1;d.arcTo(ea,ea,0,0,p,0,z-ea)}else("snip"==G||"default"==
-G&&"snip"==E||"fold"==G||"default"==G&&"fold"==E)&&d.lineTo(0,z-ea);else d.lineTo(0,z)};Pa.prototype.paintNWInner=function(d,p,A,t,z,E,G,ea,O){if("rounded"==G||"default"==G&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,O,.5*O+ea);else if("invRound"==G||"default"==G&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,O,O+ea);else if("snip"==G||"default"==G&&"snip"==E)d.lineTo(O,.5*O+ea);else if("fold"==G||"default"==G&&"fold"==E)d.lineTo(O+ea,O+ea),d.lineTo(O,O+ea)};Pa.prototype.paintTopInner=function(d,p,A,t,z,
-E,G,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(0,O):ta&&!ma?d.lineTo(O,0):ta?"square"==G||"default"==G&&"square"==E?d.lineTo(O,O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(ea+.5*O,O):d.lineTo(ea+O,O):d.lineTo(0,O):d.lineTo(0,0)};Pa.prototype.paintNEInner=function(d,p,A,t,z,E,G,ea,O){if("rounded"==G||"default"==G&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,t-ea-.5*O,O);else if("invRound"==G||"default"==G&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,t-ea-O,O);else if("snip"==
-G||"default"==G&&"snip"==E)d.lineTo(t-ea-.5*O,O);else if("fold"==G||"default"==G&&"fold"==E)d.lineTo(t-ea-O,ea+O),d.lineTo(t-ea-O,O)};Pa.prototype.paintRightInner=function(d,p,A,t,z,E,G,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(t-O,0):ta&&!ma?d.lineTo(t,O):ta?"square"==G||"default"==G&&"square"==E?d.lineTo(t-O,O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(t-O,ea+.5*O):d.lineTo(t-O,ea+O):d.lineTo(t-O,0):d.lineTo(t,0)};Pa.prototype.paintLeftInner=function(d,p,A,
-t,z,E,G,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(O,z):ta&&!ma?d.lineTo(0,z-O):ta?"square"==G||"default"==G&&"square"==E?d.lineTo(O,z-O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(O,z-ea-.5*O):d.lineTo(O,z-ea-O):d.lineTo(O,z):d.lineTo(0,z)};Pa.prototype.paintSEInner=function(d,p,A,t,z,E,G,ea,O){if("rounded"==G||"default"==G&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,t-O,z-ea-.5*O);else if("invRound"==G||"default"==G&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,t-O,
-z-ea-O);else if("snip"==G||"default"==G&&"snip"==E)d.lineTo(t-O,z-ea-.5*O);else if("fold"==G||"default"==G&&"fold"==E)d.lineTo(t-ea-O,z-ea-O),d.lineTo(t-O,z-ea-O)};Pa.prototype.paintBottomInner=function(d,p,A,t,z,E,G,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(t,z-O):ta&&!ma?d.lineTo(t-O,z):"square"==G||"default"==G&&"square"==E||!ta?d.lineTo(t-O,z-O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(t-ea-.5*O,z-O):d.lineTo(t-ea-O,z-O):d.lineTo(t,z)};Pa.prototype.paintSWInner=
-function(d,p,A,t,z,E,G,ea,O,ta){if(!ta)d.lineTo(O,z);else if("square"==G||"default"==G&&"square"==E)d.lineTo(O,z-O);else if("rounded"==G||"default"==G&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,ea+.5*O,z-O);else if("invRound"==G||"default"==G&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,ea+O,z-O);else if("snip"==G||"default"==G&&"snip"==E)d.lineTo(ea+.5*O,z-O);else if("fold"==G||"default"==G&&"fold"==E)d.lineTo(O+ea,z-ea-O),d.lineTo(O+ea,z-O)};Pa.prototype.moveSWInner=function(d,p,A,t,z,E,G,ea,O,ta){ta?
-"square"==G||"default"==G&&"square"==E?d.moveTo(O,z-O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.moveTo(O,z-ea-.5*O):("invRound"==G||"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.moveTo(O,z-ea-O):d.moveTo(0,z-O)};Pa.prototype.lineSWInner=function(d,p,A,t,z,E,G,ea,O,ta){ta?"square"==G||"default"==G&&"square"==E?d.lineTo(O,z-O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(O,z-ea-.5*O):("invRound"==G||
-"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.lineTo(O,z-ea-O):d.lineTo(0,z-O)};Pa.prototype.moveSEInner=function(d,p,A,t,z,E,G,ea,O,ta){ta?"square"==G||"default"==G&&"square"==E?d.moveTo(t-O,z-O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.moveTo(t-O,z-ea-.5*O):("invRound"==G||"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.moveTo(t-O,z-ea-O):d.moveTo(t-O,z)};Pa.prototype.lineSEInner=function(d,p,A,t,z,E,G,ea,O,ta){ta?"square"==
-G||"default"==G&&"square"==E?d.lineTo(t-O,z-O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(t-O,z-ea-.5*O):("invRound"==G||"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.lineTo(t-O,z-ea-O):d.lineTo(t-O,z)};Pa.prototype.moveNEInner=function(d,p,A,t,z,E,G,ea,O,ta){ta?"square"==G||"default"==G&&"square"==E||ta?d.moveTo(t-O,O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.moveTo(t-O,ea+.5*O):("invRound"==G||
-"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.moveTo(t-O,ea+O):d.moveTo(t,O)};Pa.prototype.lineNEInner=function(d,p,A,t,z,E,G,ea,O,ta){ta?"square"==G||"default"==G&&"square"==E||ta?d.lineTo(t-O,O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(t-O,ea+.5*O):("invRound"==G||"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.lineTo(t-O,ea+O):d.lineTo(t,O)};Pa.prototype.moveNWInner=function(d,p,A,t,z,E,G,ea,O,ta,ma){ta||ma?
-!ta&&ma?d.moveTo(O,0):ta&&!ma?d.moveTo(0,O):"square"==G||"default"==G&&"square"==E?d.moveTo(O,O):"rounded"==G||"default"==G&&"rounded"==E||"snip"==G||"default"==G&&"snip"==E?d.moveTo(O,ea+.5*O):("invRound"==G||"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.moveTo(O,ea+O):d.moveTo(0,0)};Pa.prototype.lineNWInner=function(d,p,A,t,z,E,G,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(O,0):ta&&!ma?d.lineTo(0,O):"square"==G||"default"==G&&"square"==E?d.lineTo(O,O):"rounded"==G||"default"==G&&"rounded"==
-E||"snip"==G||"default"==G&&"snip"==E?d.lineTo(O,ea+.5*O):("invRound"==G||"default"==G&&"invRound"==E||"fold"==G||"default"==G&&"fold"==E)&&d.lineTo(O,ea+O):d.lineTo(0,0)};Pa.prototype.paintFolds=function(d,p,A,t,z,E,G,ea,O,ta,ma,ab,ib,cb,Fa){if("fold"==E||"fold"==G||"fold"==ea||"fold"==O||"fold"==ta)("fold"==G||"default"==G&&"fold"==E)&&ab&&Fa&&(d.moveTo(0,ma),d.lineTo(ma,ma),d.lineTo(ma,0)),("fold"==ea||"default"==ea&&"fold"==E)&&ab&&ib&&(d.moveTo(t-ma,0),d.lineTo(t-ma,ma),d.lineTo(t,ma)),("fold"==
-O||"default"==O&&"fold"==E)&&cb&&ib&&(d.moveTo(t-ma,z),d.lineTo(t-ma,z-ma),d.lineTo(t,z-ma)),("fold"==ta||"default"==ta&&"fold"==E)&&cb&&Fa&&(d.moveTo(0,z-ma),d.lineTo(ma,z-ma),d.lineTo(ma,z))};mxCellRenderer.registerShape(Pa.prototype.cst.RECT2,Pa);Pa.prototype.constraints=null;mxUtils.extend(Ra,mxConnector);Ra.prototype.origPaintEdgeShape=Ra.prototype.paintEdgeShape;Ra.prototype.paintEdgeShape=function(d,p){for(var A=[],t=0;t<p.length;t++)A.push(mxUtils.clone(p[t]));t=d.state.dashed;var z=d.state.fixDash;
-Ra.prototype.origPaintEdgeShape.apply(this,[d,A]);3<=d.state.strokeWidth&&(A=mxUtils.getValue(this.style,"fillColor",null),null!=A&&(d.setStrokeColor(A),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(t,z),Ra.prototype.origPaintEdgeShape.apply(this,[d,p])))};mxCellRenderer.registerShape("filledEdge",Ra);mxUtils.extend(fb,mxConnector);fb.prototype.defaultWidth=4;fb.prototype.getEdgeWidth=function(){return Math.max(0,mxUtils.getNumber(this.style,"width",this.defaultWidth))};fb.prototype.getFlowAnimationPath=
-function(){return mxShape.prototype.getFlowAnimationPath.call(this,2)};fb.prototype.origPaintEdgeShape=fb.prototype.paintEdgeShape;fb.prototype.paintEdgeShape=function(d,p){for(var A=[],t=0;t<p.length;t++)A.push(mxUtils.clone(p[t]));t=d.state.dashed;var z=d.state.fixDash,E=this.getEdgeWidth();d.setStrokeWidth(E+2*this.strokewidth);d.setDashed(!1);fb.prototype.origPaintEdgeShape.apply(this,[d,A]);A=mxUtils.getValue(this.style,"fillColor",null);null!=A&&(d.setStrokeWidth(E),d.setStrokeColor(A),d.setDashed(t,
-z),fb.prototype.origPaintEdgeShape.apply(this,[d,p]))};mxCellRenderer.registerShape("pipe",fb);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var p=this.editorUi.getSelectionState(),A=d.apply(this,arguments);"umlFrame"==p.style.shape&&A.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return A}}();mxMarker.addMarker("dash",function(d,p,A,t,z,E,G,ea,O,ta){var ma=
-z*(G+O+1),ab=E*(G+O+1);return function(){d.begin();d.moveTo(t.x-ma/2-ab/2,t.y-ab/2+ma/2);d.lineTo(t.x+ab/2-3*ma/2,t.y-3*ab/2-ma/2);d.stroke()}});mxMarker.addMarker("box",function(d,p,A,t,z,E,G,ea,O,ta){var ma=z*(G+O+1),ab=E*(G+O+1),ib=t.x+ma/2,cb=t.y+ab/2;t.x-=ma;t.y-=ab;return function(){d.begin();d.moveTo(ib-ma/2-ab/2,cb-ab/2+ma/2);d.lineTo(ib-ma/2+ab/2,cb-ab/2-ma/2);d.lineTo(ib+ab/2-3*ma/2,cb-3*ab/2-ma/2);d.lineTo(ib-ab/2-3*ma/2,cb-3*ab/2+ma/2);d.close();ta?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",
-function(d,p,A,t,z,E,G,ea,O,ta){var ma=z*(G+O+1),ab=E*(G+O+1);return function(){d.begin();d.moveTo(t.x-ma/2-ab/2,t.y-ab/2+ma/2);d.lineTo(t.x+ab/2-3*ma/2,t.y-3*ab/2-ma/2);d.moveTo(t.x-ma/2+ab/2,t.y-ab/2-ma/2);d.lineTo(t.x-ab/2-3*ma/2,t.y-3*ab/2+ma/2);d.stroke()}});mxMarker.addMarker("circle",eb);mxMarker.addMarker("circlePlus",function(d,p,A,t,z,E,G,ea,O,ta){var ma=t.clone(),ab=eb.apply(this,arguments),ib=z*(G+2*O),cb=E*(G+2*O);return function(){ab.apply(this,arguments);d.begin();d.moveTo(ma.x-z*O,
-ma.y-E*O);d.lineTo(ma.x-2*ib+z*O,ma.y-2*cb+E*O);d.moveTo(ma.x-ib-cb+E*O,ma.y-cb+ib-z*O);d.lineTo(ma.x+cb-ib-E*O,ma.y-cb-ib+z*O);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,p,A,t,z,E,G,ea,O,ta){var ma=z*(G+O+1),ab=E*(G+O+1),ib=t.clone();t.x-=ma;t.y-=ab;return function(){d.begin();d.moveTo(ib.x-ab,ib.y+ma);d.quadTo(t.x-ab,t.y+ma,t.x,t.y);d.quadTo(t.x+ab,t.y-ma,ib.x+ab,ib.y-ma);d.stroke()}});mxMarker.addMarker("async",function(d,p,A,t,z,E,G,ea,O,ta){p=z*O*1.118;A=E*O*1.118;z*=G+O;E*=G+O;
-var ma=t.clone();ma.x-=p;ma.y-=A;t.x+=-z-p;t.y+=-E-A;return function(){d.begin();d.moveTo(ma.x,ma.y);ea?d.lineTo(ma.x-z-E/2,ma.y-E+z/2):d.lineTo(ma.x+E/2-z,ma.y-E-z/2);d.lineTo(ma.x-z,ma.y-E);d.close();ta?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(p,A,t,z,E,G,ea,O,ta,ma){E*=ea+ta;G*=ea+ta;var ab=z.clone();return function(){p.begin();p.moveTo(ab.x,ab.y);O?p.lineTo(ab.x-E-G/d,ab.y-G+E/d):p.lineTo(ab.x+G/d-E,ab.y-G-E/d);p.stroke()}}}(2));
-if("undefined"!==typeof mxVertexHandler){var hb=function(d,p,A){return nb(d,["width"],p,function(t,z,E,G,ea){ea=d.shape.getEdgeWidth()*d.view.scale+A;return new mxPoint(G.x+z*t/4+E*ea/2,G.y+E*t/4-z*ea/2)},function(t,z,E,G,ea,O){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));d.style.width=Math.round(2*t)/d.view.scale-A})},nb=function(d,p,A,t,z){return kb(d,p,function(E){var G=d.absolutePoints;if(null!=G&&0<G.length){var ea=G.length-1;E=d.view.translate;var O=d.view.scale,ta=A?G[0]:G[ea];
-G=A?G[1]:G[ea-1];ea=G.x-ta.x;var ma=G.y-ta.y,ab=Math.sqrt(ea*ea+ma*ma);ta=t.call(this,ab,ea/ab,ma/ab,ta,G);return new mxPoint(ta.x/O-E.x,ta.y/O-E.y)}return null},function(E,G,ea){var O=d.absolutePoints,ta=O.length-1;E=d.view.translate;var ma=d.view.scale,ab=A?O[0]:O[ta];O=A?O[1]:O[ta-1];ta=O.x-ab.x;var ib=O.y-ab.y,cb=Math.sqrt(ta*ta+ib*ib);G.x=(G.x+E.x)*ma;G.y=(G.y+E.y)*ma;z.call(this,cb,ta/cb,ib/cb,ab,O,G,ea)})},ob=function(d,p){return function(A){return[nb(A,["startWidth"],!0,function(t,z,E,G,ea){ea=
-mxUtils.getNumber(A.style,"startWidth",d)*A.view.scale+p;return new mxPoint(G.x+z*t/4+E*ea/2,G.y+E*t/4-z*ea/2)},function(t,z,E,G,ea,O){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));A.style.startWidth=Math.round(2*t)/A.view.scale-p})]}},rb=function(d){return function(p){return[kb(p,["arrowWidth","arrowSize"],function(A){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Qa.prototype.arrowWidth))),z=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",
-Qa.prototype.arrowSize)));return new mxPoint(A.x+(1-z)*A.width,A.y+(1-t)*A.height/2)},function(A,t){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(A.y+A.height/2-t.y)/A.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(A.x+A.width-t.x)/A.width))})]}},vb=function(d){return function(p){return[kb(p,["size"],function(A){var t=Math.max(0,Math.min(.5*A.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(A.x,A.y+t)},function(A,t){this.state.style.size=
-Math.max(0,t.y-A.y)},!0)]}},Ab=function(d,p,A){return function(t){var z=[kb(t,["size"],function(E){var G=Math.max(0,Math.min(E.width,Math.min(E.height,parseFloat(mxUtils.getValue(this.state.style,"size",p)))))*d;return new mxPoint(E.x+G,E.y+G)},function(E,G){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(E.width,G.x-E.x),Math.min(E.height,G.y-E.y)))/d)},!1)];A&&mxUtils.getValue(t.style,mxConstants.STYLE_ROUNDED,!1)&&z.push(wb(t));return z}},Cb=function(d,p,A,t,z){A=null!=A?A:.5;return function(E){var G=
-[kb(E,["size"],function(ea){var O=null!=z?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ta=parseFloat(mxUtils.getValue(this.state.style,"size",O?z:d));return new mxPoint(ea.x+Math.max(0,Math.min(.5*ea.width,ta*(O?1:ea.width))),ea.getCenterY())},function(ea,O,ta){ea=null!=z&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?O.x-ea.x:Math.max(0,Math.min(A,(O.x-ea.x)/ea.width));this.state.style.size=ea},!1,t)];p&&mxUtils.getValue(E.style,mxConstants.STYLE_ROUNDED,!1)&&G.push(wb(E));
-return G}},Eb=function(d,p,A){d=null!=d?d:.5;return function(t){var z=[kb(t,["size"],function(E){var G=null!=A?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ea=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",G?A:p)));return new mxPoint(E.x+Math.min(.75*E.width*d,ea*(G?.75:.75*E.width)),E.y+E.height/4)},function(E,G){E=null!=A&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?G.x-E.x:Math.max(0,Math.min(d,(G.x-E.x)/E.width*.75));this.state.style.size=E},!1,!0)];
-mxUtils.getValue(t.style,mxConstants.STYLE_ROUNDED,!1)&&z.push(wb(t));return z}},yb=function(){return function(d){var p=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p}},wb=function(d,p){return kb(d,[mxConstants.STYLE_ARCSIZE],function(A){var t=null!=p?p:A.height/8;if("1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var z=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(A.x+A.width-Math.min(A.width/
-2,z),A.y+t)}z=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(A.x+A.width-Math.min(Math.max(A.width/2,A.height/2),Math.min(A.width,A.height)*z),A.y+t)},function(A,t,z){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(A.width,2*(A.x+A.width-t.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,
-Math.max(0,100*(A.width-t.x+A.x)/Math.min(A.width,A.height))))})},kb=function(d,p,A,t,z,E,G){var ea=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);ea.execute=function(ta){for(var ma=0;ma<p.length;ma++)this.copyStyle(p[ma]);G&&G(ta)};ea.getPosition=A;ea.setPosition=t;ea.ignoreGrid=null!=z?z:!0;if(E){var O=ea.positionChanged;ea.positionChanged=function(){O.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return ea},jb={link:function(d){return[hb(d,!0,
-10),hb(d,!1,10)]},pipe:function(d){return[hb(d,!0,10),hb(d,!1,10)]},flexArrow:function(d){var p=d.view.graph.gridSize/d.view.scale,A=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(A.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(t,z,E,G,ea){t=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+
-z*(ea+d.shape.strokewidth*d.view.scale)+E*t/2,G.y+E*(ea+d.shape.strokewidth*d.view.scale)-z*t/2)},function(t,z,E,G,ea,O,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+E,G.y-z,O.x,O.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*t)/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];
-mxEvent.isAltDown(ta.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),A.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(t,z,E,G,ea){t=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;
-return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)+E*t/2,G.y+E*(ea+d.shape.strokewidth*d.view.scale)-z*t/2)},function(t,z,E,G,ea,O,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+E,G.y-z,O.x,O.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*t)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=
+E.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Jb=E&&E.gradientDirection2?E.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Kb=E&&E.opacity?E.opacity:mxUtils.getValue(this.style,"opacity","100"),Lb=Math.max(0,Math.min(50,O));E=Pa.prototype;d.setDashed(ab);ib&&""!=ib&&d.setDashPattern(ib);d.setStrokeWidth(Ib);O=Math.min(.5*z,.5*u,O);ea||(O=Lb*Math.min(u,z)/100);O=Math.min(O,.5*Math.min(u,z));ea||(ma=Math.min(cb*Math.min(u,z)/100));ma=Math.min(ma,
+.5*Math.min(u,z)-O);(Fa||La||Ja||Ha)&&"frame"!=ta&&(d.begin(),Fa?E.moveNW(d,p,A,u,z,H,Wa,O,Ha):d.moveTo(0,0),Fa&&E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),La&&E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),Ja&&E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),Ha&&E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Fb),ab=ea=Kb,"none"==Fb&&(ea=0),"none"==Gb&&(ab=0),d.setGradient(Fb,
+Gb,0,0,u,z,Jb,ea,ab),d.begin(),Fa?E.moveNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha):d.moveTo(ma,0),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),Ha&&Ja&&E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),Ja&&La&&E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),La&&Fa&&E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),Fa&&Ha&&E.paintNWInner(d,p,A,u,z,H,Wa,O,ma),d.fill(),"none"==Hb&&(d.begin(),E.paintFolds(d,p,A,u,z,
+H,Wa,Xa,Ya,$a,O,Fa,La,Ja,Ha),d.stroke()));Fa||La||Ja||!Ha?Fa||La||!Ja||Ha?!Fa&&!La&&Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,
+u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.lineNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):Fa||!La||Ja||Ha?!Fa&&La&&!Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSW(d,p,A,u,z,H,Wa,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha)),d.stroke(),
+d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveSW(d,p,A,u,z,H,Wa,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.lineNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke(),d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.lineSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,
+p,A,u,z,H,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa&&La&&Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,
+p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.lineSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa&&La&&Ja&&Ha?"frame"!=ta?(d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,
+p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.lineNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,
+p,A,u,z,H,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):!Fa||La||Ja||Ha?Fa&&!La&&!Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),"double"==ta&&(E.moveNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,
+p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha)),d.stroke()):(d.begin(),E.moveSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.lineNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke()):Fa&&!La&&Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,
+La),"double"==ta&&(E.moveNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa)),d.stroke(),d.begin(),E.moveSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.lineNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke(),d.begin(),E.moveSE(d,
+p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.lineSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):Fa&&!La&&Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),"double"==ta&&(E.moveNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,
+p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.lineNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,
+A,u,z,H,$a,O,ma,Ja,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):Fa&&La&&!Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa)),d.stroke()):(d.begin(),
+E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.lineSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&!Ja&&Ha?"frame"!=ta?(d.begin(),E.moveSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,
+z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha)),d.stroke()):(d.begin(),E.moveSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,
+A,u,z,H,Ya,O,Ja),E.lineSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke()):Fa&&La&&Ja&&!Ha?"frame"!=ta?(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,
+p,A,u,z,H,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa)),d.stroke()):(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.lineSWInner(d,
+p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):Fa&&La&&Ja&&Ha&&("frame"!=ta?(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,
+p,A,u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),d.close(),"double"==ta&&(E.moveSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),d.close()),d.stroke()):(d.begin(),
+E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.paintNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.paintSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.paintSW(d,p,A,u,z,H,$a,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),d.close(),E.moveSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintSWInner(d,p,A,u,z,H,$a,O,ma,Ja),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),E.paintSEInner(d,p,A,u,z,H,Ya,O,ma),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),
+E.paintNEInner(d,p,A,u,z,H,Xa,O,ma),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa),E.paintNWInner(d,p,A,u,z,H,Wa,O,ma),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke())):"frame"!=ta?(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),"double"==ta&&(E.moveNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,p,A,u,z,H,Wa,O,ma,Ha,Fa)),d.stroke()):(d.begin(),E.moveNW(d,p,A,u,z,H,Wa,O,Ha),E.paintTop(d,p,A,u,z,H,Xa,O,La),E.lineNEInner(d,p,A,u,z,H,Xa,O,ma,La),E.paintTopInner(d,
+p,A,u,z,H,Wa,O,ma,Ha,Fa),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),"double"==ta&&(E.moveSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La)),d.stroke()):(d.begin(),E.moveNE(d,p,A,u,z,H,Xa,O,Fa),E.paintRight(d,p,A,u,z,H,Ya,O,Ja),E.lineSEInner(d,p,A,u,z,H,Ya,O,ma,Ja),E.paintRightInner(d,p,A,u,z,H,Xa,O,ma,Fa,La),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),E.moveSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,
+p,A,u,z,H,$a,O,Ha),"double"==ta&&(E.moveSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja)),d.stroke()):(d.begin(),E.moveSE(d,p,A,u,z,H,Ya,O,La),E.paintBottom(d,p,A,u,z,H,$a,O,Ha),E.lineSWInner(d,p,A,u,z,H,$a,O,ma,Ha),E.paintBottomInner(d,p,A,u,z,H,Ya,O,ma,La,Ja),d.close(),d.fillAndStroke()):"frame"!=ta?(d.begin(),E.moveSW(d,p,A,u,z,H,Wa,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),"double"==ta&&(E.moveNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,
+Ha)),d.stroke()):(d.begin(),E.moveSW(d,p,A,u,z,H,Wa,O,Ja),E.paintLeft(d,p,A,u,z,H,Wa,O,Fa),E.lineNWInner(d,p,A,u,z,H,Wa,O,ma,Fa,Ha),E.paintLeftInner(d,p,A,u,z,H,$a,O,ma,Ja,Ha),d.close(),d.fillAndStroke());d.begin();E.paintFolds(d,p,A,u,z,H,Wa,Xa,Ya,$a,O,Fa,La,Ja,Ha);d.stroke()};Pa.prototype.moveNW=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.moveTo(0,0):d.moveTo(0,ea)};Pa.prototype.moveNE=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.moveTo(u,
+0):d.moveTo(u-ea,0)};Pa.prototype.moveSE=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.moveTo(u,z):d.moveTo(u,z-ea)};Pa.prototype.moveSW=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.moveTo(0,z):d.moveTo(ea,z)};Pa.prototype.paintNW=function(d,p,A,u,z,E,H,ea,O){if(O)if("rounded"==H||"default"==H&&"rounded"==E||"invRound"==H||"default"==H&&"invRound"==E){p=0;if("rounded"==H||"default"==H&&"rounded"==E)p=1;d.arcTo(ea,ea,0,0,p,ea,0)}else("snip"==
+H||"default"==H&&"snip"==E||"fold"==H||"default"==H&&"fold"==E)&&d.lineTo(ea,0);else d.lineTo(0,0)};Pa.prototype.paintTop=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.lineTo(u,0):d.lineTo(u-ea,0)};Pa.prototype.paintNE=function(d,p,A,u,z,E,H,ea,O){if(O)if("rounded"==H||"default"==H&&"rounded"==E||"invRound"==H||"default"==H&&"invRound"==E){p=0;if("rounded"==H||"default"==H&&"rounded"==E)p=1;d.arcTo(ea,ea,0,0,p,u,ea)}else("snip"==H||"default"==H&&"snip"==E||"fold"==H||"default"==
+H&&"fold"==E)&&d.lineTo(u,ea);else d.lineTo(u,0)};Pa.prototype.paintRight=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.lineTo(u,z):d.lineTo(u,z-ea)};Pa.prototype.paintLeft=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.lineTo(0,0):d.lineTo(0,ea)};Pa.prototype.paintSE=function(d,p,A,u,z,E,H,ea,O){if(O)if("rounded"==H||"default"==H&&"rounded"==E||"invRound"==H||"default"==H&&"invRound"==E){p=0;if("rounded"==H||"default"==H&&"rounded"==E)p=1;d.arcTo(ea,
+ea,0,0,p,u-ea,z)}else("snip"==H||"default"==H&&"snip"==E||"fold"==H||"default"==H&&"fold"==E)&&d.lineTo(u-ea,z);else d.lineTo(u,z)};Pa.prototype.paintBottom=function(d,p,A,u,z,E,H,ea,O){"square"==H||"default"==H&&"square"==E||!O?d.lineTo(0,z):d.lineTo(ea,z)};Pa.prototype.paintSW=function(d,p,A,u,z,E,H,ea,O){if(O)if("rounded"==H||"default"==H&&"rounded"==E||"invRound"==H||"default"==H&&"invRound"==E){p=0;if("rounded"==H||"default"==H&&"rounded"==E)p=1;d.arcTo(ea,ea,0,0,p,0,z-ea)}else("snip"==H||"default"==
+H&&"snip"==E||"fold"==H||"default"==H&&"fold"==E)&&d.lineTo(0,z-ea);else d.lineTo(0,z)};Pa.prototype.paintNWInner=function(d,p,A,u,z,E,H,ea,O){if("rounded"==H||"default"==H&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,O,.5*O+ea);else if("invRound"==H||"default"==H&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,O,O+ea);else if("snip"==H||"default"==H&&"snip"==E)d.lineTo(O,.5*O+ea);else if("fold"==H||"default"==H&&"fold"==E)d.lineTo(O+ea,O+ea),d.lineTo(O,O+ea)};Pa.prototype.paintTopInner=function(d,p,A,u,z,
+E,H,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(0,O):ta&&!ma?d.lineTo(O,0):ta?"square"==H||"default"==H&&"square"==E?d.lineTo(O,O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(ea+.5*O,O):d.lineTo(ea+O,O):d.lineTo(0,O):d.lineTo(0,0)};Pa.prototype.paintNEInner=function(d,p,A,u,z,E,H,ea,O){if("rounded"==H||"default"==H&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,u-ea-.5*O,O);else if("invRound"==H||"default"==H&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,u-ea-O,O);else if("snip"==
+H||"default"==H&&"snip"==E)d.lineTo(u-ea-.5*O,O);else if("fold"==H||"default"==H&&"fold"==E)d.lineTo(u-ea-O,ea+O),d.lineTo(u-ea-O,O)};Pa.prototype.paintRightInner=function(d,p,A,u,z,E,H,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(u-O,0):ta&&!ma?d.lineTo(u,O):ta?"square"==H||"default"==H&&"square"==E?d.lineTo(u-O,O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(u-O,ea+.5*O):d.lineTo(u-O,ea+O):d.lineTo(u-O,0):d.lineTo(u,0)};Pa.prototype.paintLeftInner=function(d,p,A,
+u,z,E,H,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(O,z):ta&&!ma?d.lineTo(0,z-O):ta?"square"==H||"default"==H&&"square"==E?d.lineTo(O,z-O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(O,z-ea-.5*O):d.lineTo(O,z-ea-O):d.lineTo(O,z):d.lineTo(0,z)};Pa.prototype.paintSEInner=function(d,p,A,u,z,E,H,ea,O){if("rounded"==H||"default"==H&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,u-O,z-ea-.5*O);else if("invRound"==H||"default"==H&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,u-O,
+z-ea-O);else if("snip"==H||"default"==H&&"snip"==E)d.lineTo(u-O,z-ea-.5*O);else if("fold"==H||"default"==H&&"fold"==E)d.lineTo(u-ea-O,z-ea-O),d.lineTo(u-O,z-ea-O)};Pa.prototype.paintBottomInner=function(d,p,A,u,z,E,H,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(u,z-O):ta&&!ma?d.lineTo(u-O,z):"square"==H||"default"==H&&"square"==E||!ta?d.lineTo(u-O,z-O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(u-ea-.5*O,z-O):d.lineTo(u-ea-O,z-O):d.lineTo(u,z)};Pa.prototype.paintSWInner=
+function(d,p,A,u,z,E,H,ea,O,ta){if(!ta)d.lineTo(O,z);else if("square"==H||"default"==H&&"square"==E)d.lineTo(O,z-O);else if("rounded"==H||"default"==H&&"rounded"==E)d.arcTo(ea-.5*O,ea-.5*O,0,0,0,ea+.5*O,z-O);else if("invRound"==H||"default"==H&&"invRound"==E)d.arcTo(ea+O,ea+O,0,0,1,ea+O,z-O);else if("snip"==H||"default"==H&&"snip"==E)d.lineTo(ea+.5*O,z-O);else if("fold"==H||"default"==H&&"fold"==E)d.lineTo(O+ea,z-ea-O),d.lineTo(O+ea,z-O)};Pa.prototype.moveSWInner=function(d,p,A,u,z,E,H,ea,O,ta){ta?
+"square"==H||"default"==H&&"square"==E?d.moveTo(O,z-O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.moveTo(O,z-ea-.5*O):("invRound"==H||"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.moveTo(O,z-ea-O):d.moveTo(0,z-O)};Pa.prototype.lineSWInner=function(d,p,A,u,z,E,H,ea,O,ta){ta?"square"==H||"default"==H&&"square"==E?d.lineTo(O,z-O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(O,z-ea-.5*O):("invRound"==H||
+"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.lineTo(O,z-ea-O):d.lineTo(0,z-O)};Pa.prototype.moveSEInner=function(d,p,A,u,z,E,H,ea,O,ta){ta?"square"==H||"default"==H&&"square"==E?d.moveTo(u-O,z-O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.moveTo(u-O,z-ea-.5*O):("invRound"==H||"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.moveTo(u-O,z-ea-O):d.moveTo(u-O,z)};Pa.prototype.lineSEInner=function(d,p,A,u,z,E,H,ea,O,ta){ta?"square"==
+H||"default"==H&&"square"==E?d.lineTo(u-O,z-O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(u-O,z-ea-.5*O):("invRound"==H||"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.lineTo(u-O,z-ea-O):d.lineTo(u-O,z)};Pa.prototype.moveNEInner=function(d,p,A,u,z,E,H,ea,O,ta){ta?"square"==H||"default"==H&&"square"==E||ta?d.moveTo(u-O,O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.moveTo(u-O,ea+.5*O):("invRound"==H||
+"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.moveTo(u-O,ea+O):d.moveTo(u,O)};Pa.prototype.lineNEInner=function(d,p,A,u,z,E,H,ea,O,ta){ta?"square"==H||"default"==H&&"square"==E||ta?d.lineTo(u-O,O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(u-O,ea+.5*O):("invRound"==H||"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.lineTo(u-O,ea+O):d.lineTo(u,O)};Pa.prototype.moveNWInner=function(d,p,A,u,z,E,H,ea,O,ta,ma){ta||ma?
+!ta&&ma?d.moveTo(O,0):ta&&!ma?d.moveTo(0,O):"square"==H||"default"==H&&"square"==E?d.moveTo(O,O):"rounded"==H||"default"==H&&"rounded"==E||"snip"==H||"default"==H&&"snip"==E?d.moveTo(O,ea+.5*O):("invRound"==H||"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.moveTo(O,ea+O):d.moveTo(0,0)};Pa.prototype.lineNWInner=function(d,p,A,u,z,E,H,ea,O,ta,ma){ta||ma?!ta&&ma?d.lineTo(O,0):ta&&!ma?d.lineTo(0,O):"square"==H||"default"==H&&"square"==E?d.lineTo(O,O):"rounded"==H||"default"==H&&"rounded"==
+E||"snip"==H||"default"==H&&"snip"==E?d.lineTo(O,ea+.5*O):("invRound"==H||"default"==H&&"invRound"==E||"fold"==H||"default"==H&&"fold"==E)&&d.lineTo(O,ea+O):d.lineTo(0,0)};Pa.prototype.paintFolds=function(d,p,A,u,z,E,H,ea,O,ta,ma,ab,ib,cb,Fa){if("fold"==E||"fold"==H||"fold"==ea||"fold"==O||"fold"==ta)("fold"==H||"default"==H&&"fold"==E)&&ab&&Fa&&(d.moveTo(0,ma),d.lineTo(ma,ma),d.lineTo(ma,0)),("fold"==ea||"default"==ea&&"fold"==E)&&ab&&ib&&(d.moveTo(u-ma,0),d.lineTo(u-ma,ma),d.lineTo(u,ma)),("fold"==
+O||"default"==O&&"fold"==E)&&cb&&ib&&(d.moveTo(u-ma,z),d.lineTo(u-ma,z-ma),d.lineTo(u,z-ma)),("fold"==ta||"default"==ta&&"fold"==E)&&cb&&Fa&&(d.moveTo(0,z-ma),d.lineTo(ma,z-ma),d.lineTo(ma,z))};mxCellRenderer.registerShape(Pa.prototype.cst.RECT2,Pa);Pa.prototype.constraints=null;mxUtils.extend(Ra,mxConnector);Ra.prototype.origPaintEdgeShape=Ra.prototype.paintEdgeShape;Ra.prototype.paintEdgeShape=function(d,p){for(var A=[],u=0;u<p.length;u++)A.push(mxUtils.clone(p[u]));u=d.state.dashed;var z=d.state.fixDash;
+Ra.prototype.origPaintEdgeShape.apply(this,[d,A]);3<=d.state.strokeWidth&&(A=mxUtils.getValue(this.style,"fillColor",null),null!=A&&(d.setStrokeColor(A),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(u,z),Ra.prototype.origPaintEdgeShape.apply(this,[d,p])))};mxCellRenderer.registerShape("filledEdge",Ra);mxUtils.extend(fb,mxConnector);fb.prototype.defaultWidth=4;fb.prototype.getEdgeWidth=function(){return Math.max(0,mxUtils.getNumber(this.style,"width",this.defaultWidth))};fb.prototype.getFlowAnimationPath=
+function(){return mxShape.prototype.getFlowAnimationPath.call(this,2)};fb.prototype.origPaintEdgeShape=fb.prototype.paintEdgeShape;fb.prototype.paintEdgeShape=function(d,p){for(var A=[],u=0;u<p.length;u++)A.push(mxUtils.clone(p[u]));u=d.state.dashed;var z=d.state.fixDash,E=this.getEdgeWidth();d.setStrokeWidth(E+2*this.strokewidth);d.setDashed(!1);fb.prototype.origPaintEdgeShape.apply(this,[d,A]);A=mxUtils.getValue(this.style,"fillColor",null);null!=A&&(d.setStrokeWidth(E),d.setStrokeColor(A),d.setDashed(u,
+z),fb.prototype.origPaintEdgeShape.apply(this,[d,p]))};mxCellRenderer.registerShape("pipe",fb);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var p=this.editorUi.getSelectionState(),A=d.apply(this,arguments);"umlFrame"==p.style.shape&&A.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return A}}();mxMarker.addMarker("dash",function(d,p,A,u,z,E,H,ea,O,ta){var ma=
+z*(H+O+1),ab=E*(H+O+1);return function(){d.begin();d.moveTo(u.x-ma/2-ab/2,u.y-ab/2+ma/2);d.lineTo(u.x+ab/2-3*ma/2,u.y-3*ab/2-ma/2);d.stroke()}});mxMarker.addMarker("box",function(d,p,A,u,z,E,H,ea,O,ta){var ma=z*(H+O+1),ab=E*(H+O+1),ib=u.x+ma/2,cb=u.y+ab/2;u.x-=ma;u.y-=ab;return function(){d.begin();d.moveTo(ib-ma/2-ab/2,cb-ab/2+ma/2);d.lineTo(ib-ma/2+ab/2,cb-ab/2-ma/2);d.lineTo(ib+ab/2-3*ma/2,cb-3*ab/2-ma/2);d.lineTo(ib-ab/2-3*ma/2,cb-3*ab/2+ma/2);d.close();ta?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",
+function(d,p,A,u,z,E,H,ea,O,ta){var ma=z*(H+O+1),ab=E*(H+O+1);return function(){d.begin();d.moveTo(u.x-ma/2-ab/2,u.y-ab/2+ma/2);d.lineTo(u.x+ab/2-3*ma/2,u.y-3*ab/2-ma/2);d.moveTo(u.x-ma/2+ab/2,u.y-ab/2-ma/2);d.lineTo(u.x-ab/2-3*ma/2,u.y-3*ab/2+ma/2);d.stroke()}});mxMarker.addMarker("circle",eb);mxMarker.addMarker("circlePlus",function(d,p,A,u,z,E,H,ea,O,ta){var ma=u.clone(),ab=eb.apply(this,arguments),ib=z*(H+2*O),cb=E*(H+2*O);return function(){ab.apply(this,arguments);d.begin();d.moveTo(ma.x-z*O,
+ma.y-E*O);d.lineTo(ma.x-2*ib+z*O,ma.y-2*cb+E*O);d.moveTo(ma.x-ib-cb+E*O,ma.y-cb+ib-z*O);d.lineTo(ma.x+cb-ib-E*O,ma.y-cb-ib+z*O);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,p,A,u,z,E,H,ea,O,ta){var ma=z*(H+O+1),ab=E*(H+O+1),ib=u.clone();u.x-=ma;u.y-=ab;return function(){d.begin();d.moveTo(ib.x-ab,ib.y+ma);d.quadTo(u.x-ab,u.y+ma,u.x,u.y);d.quadTo(u.x+ab,u.y-ma,ib.x+ab,ib.y-ma);d.stroke()}});mxMarker.addMarker("async",function(d,p,A,u,z,E,H,ea,O,ta){p=z*O*1.118;A=E*O*1.118;z*=H+O;E*=H+O;
+var ma=u.clone();ma.x-=p;ma.y-=A;u.x+=-z-p;u.y+=-E-A;return function(){d.begin();d.moveTo(ma.x,ma.y);ea?d.lineTo(ma.x-z-E/2,ma.y-E+z/2):d.lineTo(ma.x+E/2-z,ma.y-E-z/2);d.lineTo(ma.x-z,ma.y-E);d.close();ta?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(p,A,u,z,E,H,ea,O,ta,ma){E*=ea+ta;H*=ea+ta;var ab=z.clone();return function(){p.begin();p.moveTo(ab.x,ab.y);O?p.lineTo(ab.x-E-H/d,ab.y-H+E/d):p.lineTo(ab.x+H/d-E,ab.y-H-E/d);p.stroke()}}}(2));
+if("undefined"!==typeof mxVertexHandler){var hb=function(d,p,A){return nb(d,["width"],p,function(u,z,E,H,ea){ea=d.shape.getEdgeWidth()*d.view.scale+A;return new mxPoint(H.x+z*u/4+E*ea/2,H.y+E*u/4-z*ea/2)},function(u,z,E,H,ea,O){u=Math.sqrt(mxUtils.ptSegDistSq(H.x,H.y,ea.x,ea.y,O.x,O.y));d.style.width=Math.round(2*u)/d.view.scale-A})},nb=function(d,p,A,u,z){return kb(d,p,function(E){var H=d.absolutePoints;if(null!=H&&0<H.length){var ea=H.length-1;E=d.view.translate;var O=d.view.scale,ta=A?H[0]:H[ea];
+H=A?H[1]:H[ea-1];ea=H.x-ta.x;var ma=H.y-ta.y,ab=Math.sqrt(ea*ea+ma*ma);ta=u.call(this,ab,ea/ab,ma/ab,ta,H);return new mxPoint(ta.x/O-E.x,ta.y/O-E.y)}return null},function(E,H,ea){var O=d.absolutePoints,ta=O.length-1;E=d.view.translate;var ma=d.view.scale,ab=A?O[0]:O[ta];O=A?O[1]:O[ta-1];ta=O.x-ab.x;var ib=O.y-ab.y,cb=Math.sqrt(ta*ta+ib*ib);H.x=(H.x+E.x)*ma;H.y=(H.y+E.y)*ma;z.call(this,cb,ta/cb,ib/cb,ab,O,H,ea)})},ob=function(d,p){return function(A){return[nb(A,["startWidth"],!0,function(u,z,E,H,ea){ea=
+mxUtils.getNumber(A.style,"startWidth",d)*A.view.scale+p;return new mxPoint(H.x+z*u/4+E*ea/2,H.y+E*u/4-z*ea/2)},function(u,z,E,H,ea,O){u=Math.sqrt(mxUtils.ptSegDistSq(H.x,H.y,ea.x,ea.y,O.x,O.y));A.style.startWidth=Math.round(2*u)/A.view.scale-p})]}},rb=function(d){return function(p){return[kb(p,["arrowWidth","arrowSize"],function(A){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Qa.prototype.arrowWidth))),z=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",
+Qa.prototype.arrowSize)));return new mxPoint(A.x+(1-z)*A.width,A.y+(1-u)*A.height/2)},function(A,u){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(A.y+A.height/2-u.y)/A.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(A.x+A.width-u.x)/A.width))})]}},vb=function(d){return function(p){return[kb(p,["size"],function(A){var u=Math.max(0,Math.min(.5*A.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(A.x,A.y+u)},function(A,u){this.state.style.size=
+Math.max(0,u.y-A.y)},!0)]}},Ab=function(d,p,A){return function(u){var z=[kb(u,["size"],function(E){var H=Math.max(0,Math.min(E.width,Math.min(E.height,parseFloat(mxUtils.getValue(this.state.style,"size",p)))))*d;return new mxPoint(E.x+H,E.y+H)},function(E,H){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(E.width,H.x-E.x),Math.min(E.height,H.y-E.y)))/d)},!1)];A&&mxUtils.getValue(u.style,mxConstants.STYLE_ROUNDED,!1)&&z.push(wb(u));return z}},Cb=function(d,p,A,u,z){A=null!=A?A:.5;return function(E){var H=
+[kb(E,["size"],function(ea){var O=null!=z?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ta=parseFloat(mxUtils.getValue(this.state.style,"size",O?z:d));return new mxPoint(ea.x+Math.max(0,Math.min(.5*ea.width,ta*(O?1:ea.width))),ea.getCenterY())},function(ea,O,ta){ea=null!=z&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?O.x-ea.x:Math.max(0,Math.min(A,(O.x-ea.x)/ea.width));this.state.style.size=ea},!1,u)];p&&mxUtils.getValue(E.style,mxConstants.STYLE_ROUNDED,!1)&&H.push(wb(E));
+return H}},Eb=function(d,p,A){d=null!=d?d:.5;return function(u){var z=[kb(u,["size"],function(E){var H=null!=A?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ea=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",H?A:p)));return new mxPoint(E.x+Math.min(.75*E.width*d,ea*(H?.75:.75*E.width)),E.y+E.height/4)},function(E,H){E=null!=A&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?H.x-E.x:Math.max(0,Math.min(d,(H.x-E.x)/E.width*.75));this.state.style.size=E},!1,!0)];
+mxUtils.getValue(u.style,mxConstants.STYLE_ROUNDED,!1)&&z.push(wb(u));return z}},yb=function(){return function(d){var p=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p}},wb=function(d,p){return kb(d,[mxConstants.STYLE_ARCSIZE],function(A){var u=null!=p?p:A.height/8;if("1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var z=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(A.x+A.width-Math.min(A.width/
+2,z),A.y+u)}z=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(A.x+A.width-Math.min(Math.max(A.width/2,A.height/2),Math.min(A.width,A.height)*z),A.y+u)},function(A,u,z){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(A.width,2*(A.x+A.width-u.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,
+Math.max(0,100*(A.width-u.x+A.x)/Math.min(A.width,A.height))))})},kb=function(d,p,A,u,z,E,H){var ea=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);ea.execute=function(ta){for(var ma=0;ma<p.length;ma++)this.copyStyle(p[ma]);H&&H(ta)};ea.getPosition=A;ea.setPosition=u;ea.ignoreGrid=null!=z?z:!0;if(E){var O=ea.positionChanged;ea.positionChanged=function(){O.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return ea},jb={link:function(d){return[hb(d,!0,
+10),hb(d,!1,10)]},pipe:function(d){return[hb(d,!0,10),hb(d,!1,10)]},flexArrow:function(d){var p=d.view.graph.gridSize/d.view.scale,A=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(A.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(u,z,E,H,ea){u=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(H.x+
+z*(ea+d.shape.strokewidth*d.view.scale)+E*u/2,H.y+E*(ea+d.shape.strokewidth*d.view.scale)-z*u/2)},function(u,z,E,H,ea,O,ta){u=Math.sqrt(mxUtils.ptSegDistSq(H.x,H.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(H.x,H.y,H.x+E,H.y-z,O.x,O.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*u)/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];
+mxEvent.isAltDown(ta.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),A.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(u,z,E,H,ea){u=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;
+return new mxPoint(H.x+z*(ea+d.shape.strokewidth*d.view.scale)+E*u/2,H.y+E*(ea+d.shape.strokewidth*d.view.scale)-z*u/2)},function(u,z,E,H,ea,O,ta){u=Math.sqrt(mxUtils.ptSegDistSq(H.x,H.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(H.x,H.y,H.x+E,H.y-z,O.x,O.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*u)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=
d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=d.style.startWidth;mxEvent.isAltDown(ta.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<p&&(d.style.startWidth=d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(A.push(nb(d,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(t,z,E,G,ea){t=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)-E*t/2,G.y+E*(ea+d.shape.strokewidth*d.view.scale)+z*t/2)},function(t,z,E,G,ea,O,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,G.y,G.x+E,G.y-z,O.x,O.y);
-d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*t)/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(ta.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),
-A.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(t,z,E,G,ea){t=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(G.x+z*(ea+d.shape.strokewidth*d.view.scale)-E*t/2,G.y+E*(ea+d.shape.strokewidth*d.view.scale)+z*t/2)},function(t,z,E,G,ea,O,ta){t=Math.sqrt(mxUtils.ptSegDistSq(G.x,G.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(G.x,
-G.y,G.x+E,G.y-z,O.x,O.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*t)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(ta.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<
-p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<p&&(d.style.endWidth=d.style.startWidth))})));return A},swimlane:function(d){var p=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var A=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));p.push(wb(d,A/2))}p.push(kb(d,[mxConstants.STYLE_STARTSIZE],function(t){var z=parseFloat(mxUtils.getValue(d.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(t.getCenterX(),t.y+Math.max(0,Math.min(t.height,z))):new mxPoint(t.x+Math.max(0,Math.min(t.width,z)),t.getCenterY())},function(t,z){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(t.height,z.y-t.y))):Math.round(Math.max(0,Math.min(t.width,z.x-t.x)))},!1,null,function(t){var z=
-d.view.graph;if(!mxEvent.isShiftDown(t.getEvent())&&!mxEvent.isControlDown(t.getEvent())&&(z.isTableRow(d.cell)||z.isTableCell(d.cell))){t=z.getSwimlaneDirection(d.style);var E=z.model.getParent(d.cell);E=z.model.getChildCells(E,!0);for(var G=[],ea=0;ea<E.length;ea++)E[ea]!=d.cell&&z.isSwimlane(E[ea])&&z.getSwimlaneDirection(z.getCurrentCellStyle(E[ea]))==t&&G.push(E[ea]);z.setCellStyles(mxConstants.STYLE_STARTSIZE,d.style[mxConstants.STYLE_STARTSIZE],G)}}));return p},label:yb(),ext:yb(),rectangle:yb(),
-triangle:yb(),rhombus:yb(),umlLifeline:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));return new mxPoint(p.getCenterX(),p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},umlFrame:function(d){return[kb(d,["width","height"],function(p){var A=Math.max(na.prototype.corner,Math.min(p.width,mxUtils.getValue(this.state.style,"width",na.prototype.width))),
-t=Math.max(1.5*na.prototype.corner,Math.min(p.height,mxUtils.getValue(this.state.style,"height",na.prototype.height)));return new mxPoint(p.x+A,p.y+t)},function(p,A){this.state.style.width=Math.round(Math.max(na.prototype.corner,Math.min(p.width,A.x-p.x)));this.state.style.height=Math.round(Math.max(1.5*na.prototype.corner,Math.min(p.height,A.y-p.y)))},!1)]},process:function(d){var p=[kb(d,["size"],function(A){var t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),z=parseFloat(mxUtils.getValue(this.state.style,
-"size",oa.prototype.size));return t?new mxPoint(A.x+z,A.y+A.height/4):new mxPoint(A.x+A.width*z,A.y+A.height/4)},function(A,t){A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*A.width,t.x-A.x)):Math.max(0,Math.min(.5,(t.x-A.x)/A.width));this.state.style.size=A},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},cross:function(d){return[kb(d,["size"],function(p){var A=Math.min(p.width,p.height);A=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",Ta.prototype.size)))*A/2;return new mxPoint(p.getCenterX()-A,p.getCenterY()-A)},function(p,A){var t=Math.min(p.width,p.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,p.getCenterY()-A.y)/t*2,Math.max(0,p.getCenterX()-A.x)/t*2)))})]},note:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=
-Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},note2:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},manualInput:function(d){var p=[kb(d,["size"],function(A){var t=
-Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",Da.prototype.size)));return new mxPoint(A.x+A.width/4,A.y+3*t/4)},function(A,t){this.state.style.size=Math.round(Math.max(0,Math.min(A.height,4*(t.y-A.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},dataStorage:function(d){return[kb(d,["size"],function(p){var A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),t=parseFloat(mxUtils.getValue(this.state.style,"size",A?Ea.prototype.fixedSize:
-Ea.prototype.size));return new mxPoint(p.x+p.width-t*(A?1:p.width),p.getCenterY())},function(p,A){p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(p.width,p.x+p.width-A.x)):Math.max(0,Math.min(1,(p.x+p.width-A.x)/p.width));this.state.style.size=p},!1)]},callout:function(d){var p=[kb(d,["size","position"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",ka.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",ka.prototype.position)));mxUtils.getValue(this.state.style,"base",ka.prototype.base);return new mxPoint(A.x+z*A.width,A.y+A.height-t)},function(A,t){mxUtils.getValue(this.state.style,"base",ka.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(A.height,A.y+A.height-t.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),kb(d,["position2"],function(A){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ka.prototype.position2)));
-return new mxPoint(A.x+t*A.width,A.y+A.height)},function(A,t){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),kb(d,["base"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",ka.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ka.prototype.position))),E=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"base",ka.prototype.base)));return new mxPoint(A.x+Math.min(A.width,
-z*A.width+E),A.y+A.height-t)},function(A,t){var z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ka.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(A.width,t.x-A.x-z*A.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},internalStorage:function(d){var p=[kb(d,["dx","dy"],function(A){var t=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"dx",va.prototype.dx))),z=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,
-"dy",va.prototype.dy)));return new mxPoint(A.x+t,A.y+z)},function(A,t){this.state.style.dx=Math.round(Math.max(0,Math.min(A.width,t.x-A.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(A.height,t.y-A.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},module:function(d){return[kb(d,["jettyWidth","jettyHeight"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"jettyWidth",Ia.prototype.jettyWidth))),t=Math.max(0,Math.min(p.height,
-mxUtils.getValue(this.state.style,"jettyHeight",Ia.prototype.jettyHeight)));return new mxPoint(p.x+A/2,p.y+2*t)},function(p,A){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(p.height,A.y-p.y))/2)})]},corner:function(d){return[kb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Na.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,
-"dy",Na.prototype.dy)));return new mxPoint(p.x+A,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},tee:function(d){return[kb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Ua.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Ua.prototype.dy)));return new mxPoint(p.x+(p.width+A)/2,p.y+t)},function(p,
+["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(u,z,E,H,ea){u=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(H.x+z*(ea+d.shape.strokewidth*d.view.scale)-E*u/2,H.y+E*(ea+d.shape.strokewidth*d.view.scale)+z*u/2)},function(u,z,E,H,ea,O,ta){u=Math.sqrt(mxUtils.ptSegDistSq(H.x,H.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(H.x,H.y,H.x+E,H.y-z,O.x,O.y);
+d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*u)/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(ta.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),
+A.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(u,z,E,H,ea){u=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(H.x+z*(ea+d.shape.strokewidth*d.view.scale)-E*u/2,H.y+E*(ea+d.shape.strokewidth*d.view.scale)+z*u/2)},function(u,z,E,H,ea,O,ta){u=Math.sqrt(mxUtils.ptSegDistSq(H.x,H.y,ea.x,ea.y,O.x,O.y));z=mxUtils.ptLineDist(H.x,
+H.y,H.x+E,H.y-z,O.x,O.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(z-d.shape.strokewidth)/3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*u)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(ta.getEvent())||mxEvent.isControlDown(ta.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(ta.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<
+p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<p&&(d.style.endWidth=d.style.startWidth))})));return A},swimlane:function(d){var p=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var A=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));p.push(wb(d,A/2))}p.push(kb(d,[mxConstants.STYLE_STARTSIZE],function(u){var z=parseFloat(mxUtils.getValue(d.style,
+mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(u.getCenterX(),u.y+Math.max(0,Math.min(u.height,z))):new mxPoint(u.x+Math.max(0,Math.min(u.width,z)),u.getCenterY())},function(u,z){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(u.height,z.y-u.y))):Math.round(Math.max(0,Math.min(u.width,z.x-u.x)))},!1,null,function(u){var z=
+d.view.graph;if(!mxEvent.isShiftDown(u.getEvent())&&!mxEvent.isControlDown(u.getEvent())&&(z.isTableRow(d.cell)||z.isTableCell(d.cell))){u=z.getSwimlaneDirection(d.style);var E=z.model.getParent(d.cell);E=z.model.getChildCells(E,!0);for(var H=[],ea=0;ea<E.length;ea++)E[ea]!=d.cell&&z.isSwimlane(E[ea])&&z.getSwimlaneDirection(z.getCurrentCellStyle(E[ea]))==u&&H.push(E[ea]);z.setCellStyles(mxConstants.STYLE_STARTSIZE,d.style[mxConstants.STYLE_STARTSIZE],H)}}));return p},label:yb(),ext:yb(),rectangle:yb(),
+triangle:yb(),rhombus:yb(),umlLifeline:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));return new mxPoint(p.getCenterX(),p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},umlFrame:function(d){return[kb(d,["width","height"],function(p){var A=Math.max(oa.prototype.corner,Math.min(p.width,mxUtils.getValue(this.state.style,"width",oa.prototype.width))),
+u=Math.max(1.5*oa.prototype.corner,Math.min(p.height,mxUtils.getValue(this.state.style,"height",oa.prototype.height)));return new mxPoint(p.x+A,p.y+u)},function(p,A){this.state.style.width=Math.round(Math.max(oa.prototype.corner,Math.min(p.width,A.x-p.x)));this.state.style.height=Math.round(Math.max(1.5*oa.prototype.corner,Math.min(p.height,A.y-p.y)))},!1)]},process:function(d){var p=[kb(d,["size"],function(A){var u="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),z=parseFloat(mxUtils.getValue(this.state.style,
+"size",na.prototype.size));return u?new mxPoint(A.x+z,A.y+A.height/4):new mxPoint(A.x+A.width*z,A.y+A.height/4)},function(A,u){A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*A.width,u.x-A.x)):Math.max(0,Math.min(.5,(u.x-A.x)/A.width));this.state.style.size=A},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},cross:function(d){return[kb(d,["size"],function(p){var A=Math.min(p.width,p.height);A=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",Ta.prototype.size)))*A/2;return new mxPoint(p.getCenterX()-A,p.getCenterY()-A)},function(p,A){var u=Math.min(p.width,p.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,p.getCenterY()-A.y)/u*2,Math.max(0,p.getCenterX()-A.x)/u*2)))})]},note:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},note2:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},manualInput:function(d){var p=[kb(d,["size"],function(A){var u=
+Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",Da.prototype.size)));return new mxPoint(A.x+A.width/4,A.y+3*u/4)},function(A,u){this.state.style.size=Math.round(Math.max(0,Math.min(A.height,4*(u.y-A.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},dataStorage:function(d){return[kb(d,["size"],function(p){var A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",A?Ea.prototype.fixedSize:
+Ea.prototype.size));return new mxPoint(p.x+p.width-u*(A?1:p.width),p.getCenterY())},function(p,A){p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(p.width,p.x+p.width-A.x)):Math.max(0,Math.min(1,(p.x+p.width-A.x)/p.width));this.state.style.size=p},!1)]},callout:function(d){var p=[kb(d,["size","position"],function(A){var u=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",ka.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",ka.prototype.position)));mxUtils.getValue(this.state.style,"base",ka.prototype.base);return new mxPoint(A.x+z*A.width,A.y+A.height-u)},function(A,u){mxUtils.getValue(this.state.style,"base",ka.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(A.height,A.y+A.height-u.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(u.x-A.x)/A.width)))/100},!1),kb(d,["position2"],function(A){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ka.prototype.position2)));
+return new mxPoint(A.x+u*A.width,A.y+A.height)},function(A,u){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(u.x-A.x)/A.width)))/100},!1),kb(d,["base"],function(A){var u=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",ka.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ka.prototype.position))),E=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"base",ka.prototype.base)));return new mxPoint(A.x+Math.min(A.width,
+z*A.width+E),A.y+A.height-u)},function(A,u){var z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ka.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(A.width,u.x-A.x-z*A.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},internalStorage:function(d){var p=[kb(d,["dx","dy"],function(A){var u=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"dx",va.prototype.dx))),z=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,
+"dy",va.prototype.dy)));return new mxPoint(A.x+u,A.y+z)},function(A,u){this.state.style.dx=Math.round(Math.max(0,Math.min(A.width,u.x-A.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(A.height,u.y-A.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},module:function(d){return[kb(d,["jettyWidth","jettyHeight"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"jettyWidth",Ia.prototype.jettyWidth))),u=Math.max(0,Math.min(p.height,
+mxUtils.getValue(this.state.style,"jettyHeight",Ia.prototype.jettyHeight)));return new mxPoint(p.x+A/2,p.y+2*u)},function(p,A){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(p.height,A.y-p.y))/2)})]},corner:function(d){return[kb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Na.prototype.dx))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,
+"dy",Na.prototype.dy)));return new mxPoint(p.x+A,p.y+u)},function(p,A){this.state.style.dx=Math.round(Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},tee:function(d){return[kb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Ua.prototype.dx))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Ua.prototype.dy)));return new mxPoint(p.x+(p.width+A)/2,p.y+u)},function(p,
A){this.state.style.dx=Math.round(Math.max(0,2*Math.min(p.width/2,A.x-p.x-p.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},singleArrow:rb(1),doubleArrow:rb(.5),"mxgraph.arrows2.wedgeArrow":ob(20,20),"mxgraph.arrows2.wedgeArrowDashed":ob(20,20),"mxgraph.arrows2.wedgeArrowDashed2":ob(20,20),folder:function(d){return[kb(d,["tabWidth","tabHeight"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"tabWidth",x.prototype.tabWidth))),
-t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"tabHeight",x.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",x.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(A=p.width-A);return new mxPoint(p.x+A,p.y+t)},function(p,A){var t=Math.max(0,Math.min(p.width,A.x-p.x));mxUtils.getValue(this.state.style,"tabPosition",x.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=p.width-t);this.state.style.tabWidth=Math.round(t);this.state.style.tabHeight=Math.round(Math.max(0,
-Math.min(p.height,A.y-p.y)))},!1)]},document:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(p.x+3*p.width/4,p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},tape:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(p.getCenterX(),
-p.y+A*p.height/2)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(A.y-p.y)/p.height*2))},!1)]},isoCube2:function(d){return[kb(d,["isoAngle"],function(p){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",c.isoAngle))))*Math.PI/200;return new mxPoint(p.x,p.y+Math.min(p.width*Math.tan(A),.5*p.height))},function(p,A){this.state.style.isoAngle=Math.max(0,50*(A.y-p.y)/p.height)},!0)]},cylinder2:vb(g.prototype.size),cylinder3:vb(m.prototype.size),offPageConnector:function(d){return[kb(d,
-["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size))));return new mxPoint(p.getCenterX(),p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},"mxgraph.basic.rect":function(d){var p=[Graph.createHandle(d,["size"],function(A){var t=Math.max(0,Math.min(A.width/2,A.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(A.x+t,A.y+t)},function(A,
-t){this.state.style.size=Math.round(100*Math.max(0,Math.min(A.height/2,A.width/2,t.x-A.x)))/100})];d=Graph.createHandle(d,["indent"],function(A){var t=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(A.x+.75*A.width,A.y+t*A.height/200)},function(A,t){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(t.y-A.y)/A.height)))/100});p.push(d);return p},step:Cb(ba.prototype.size,!0,null,!0,ba.prototype.fixedSize),hexagon:Cb(V.prototype.size,
-!0,.5,!0,V.prototype.fixedSize),curlyBracket:Cb(ha.prototype.size,!1),display:Cb(Za.prototype.size,!1),cube:Ab(1,u.prototype.size,!1),card:Ab(.5,H.prototype.size,!0),loopLimit:Ab(.5,R.prototype.size,!0),trapezoid:Eb(.5,Z.prototype.size,Z.prototype.fixedSize),parallelogram:Eb(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=kb;Graph.handleFactory=jb;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=Bb.apply(this,arguments);
+u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"tabHeight",x.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",x.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(A=p.width-A);return new mxPoint(p.x+A,p.y+u)},function(p,A){var u=Math.max(0,Math.min(p.width,A.x-p.x));mxUtils.getValue(this.state.style,"tabPosition",x.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(u=p.width-u);this.state.style.tabWidth=Math.round(u);this.state.style.tabHeight=Math.round(Math.max(0,
+Math.min(p.height,A.y-p.y)))},!1)]},document:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(p.x+3*p.width/4,p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},tape:function(d){return[kb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(p.getCenterX(),
+p.y+A*p.height/2)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(A.y-p.y)/p.height*2))},!1)]},isoCube2:function(d){return[kb(d,["isoAngle"],function(p){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",c.isoAngle))))*Math.PI/200;return new mxPoint(p.x,p.y+Math.min(p.width*Math.tan(A),.5*p.height))},function(p,A){this.state.style.isoAngle=Math.max(0,50*(A.y-p.y)/p.height)},!0)]},cylinder2:vb(g.prototype.size),cylinder3:vb(l.prototype.size),offPageConnector:function(d){return[kb(d,
+["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size))));return new mxPoint(p.getCenterX(),p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},"mxgraph.basic.rect":function(d){var p=[Graph.createHandle(d,["size"],function(A){var u=Math.max(0,Math.min(A.width/2,A.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(A.x+u,A.y+u)},function(A,
+u){this.state.style.size=Math.round(100*Math.max(0,Math.min(A.height/2,A.width/2,u.x-A.x)))/100})];d=Graph.createHandle(d,["indent"],function(A){var u=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(A.x+.75*A.width,A.y+u*A.height/200)},function(A,u){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(u.y-A.y)/A.height)))/100});p.push(d);return p},step:Cb(aa.prototype.size,!0,null,!0,aa.prototype.fixedSize),hexagon:Cb(V.prototype.size,
+!0,.5,!0,V.prototype.fixedSize),curlyBracket:Cb(ja.prototype.size,!1),display:Cb(Za.prototype.size,!1),cube:Ab(1,t.prototype.size,!1),card:Ab(.5,G.prototype.size,!0),loopLimit:Ab(.5,R.prototype.size,!0),trapezoid:Eb(.5,Z.prototype.size,Z.prototype.fixedSize),parallelogram:Eb(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=kb;Graph.handleFactory=jb;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=Bb.apply(this,arguments);
if(this.graph.isCellRotatable(this.state.cell)){var p=this.state.style.shape;null==mxCellRenderer.defaultShapes[p]&&null==mxStencilRegistry.getStencil(p)?p=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(p=mxConstants.SHAPE_SWIMLANE);p=jb[p];null==p&&null!=this.state.shape&&this.state.shape.isRoundable()&&(p=jb[mxConstants.SHAPE_RECTANGLE]);null!=p&&(p=p(this.state),null!=p&&(d=null==d?p:d.concat(p)))}return d};mxEdgeHandler.prototype.createCustomHandles=function(){var d=
-this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=jb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var tb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);tb=mxUtils.getRotatedPoint(tb,Math.cos(zb),Math.sin(zb));var sb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(sb),Math.sin(sb));mxEdgeStyle.IsometricConnector=function(d,p,A,t,z){var E=
-d.view;t=null!=t&&0<t.length?t[0]:null;var G=d.absolutePoints,ea=G[0];G=G[G.length-1];null!=t&&(t=E.transformControlPoint(d,t));null==ea&&null!=p&&(ea=new mxPoint(p.getCenterX(),p.getCenterY()));null==G&&null!=A&&(G=new mxPoint(A.getCenterX(),A.getCenterY()));var O=tb.x,ta=tb.y,ma=xb.x,ab=xb.y,ib="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=G&&null!=ea){d=function(Fa,La,Ja){Fa-=cb.x;var Ha=La-cb.y;La=(ab*Fa-ma*Ha)/(O*ab-ta*ma);Fa=(ta*Fa-O*Ha)/(ta*ma-O*ab);ib?(Ja&&(cb=new mxPoint(cb.x+
-O*La,cb.y+ta*La),z.push(cb)),cb=new mxPoint(cb.x+ma*Fa,cb.y+ab*Fa)):(Ja&&(cb=new mxPoint(cb.x+ma*Fa,cb.y+ab*Fa),z.push(cb)),cb=new mxPoint(cb.x+O*La,cb.y+ta*La));z.push(cb)};var cb=ea;null==t&&(t=new mxPoint(ea.x+(G.x-ea.x)/2,ea.y+(G.y-ea.y)/2));d(t.x,t.y,!0);d(G.x,G.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Db=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,p){if(p==mxEdgeStyle.IsometricConnector){var A=new mxElbowEdgeHandler(d);
-A.snapToTerminals=!1;return A}return Db.apply(this,arguments)};C.prototype.constraints=[];J.prototype.getConstraints=function(d,p,A){d=[];var t=Math.tan(mxUtils.toRadians(30)),z=(.5-t)/2;t=Math.min(p,A/(.5+t));p=(p-t)/2;A=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*t,A+t*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+t,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
-null,p+t,A+.75*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*t,A+(1-z)*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.75*t));return d};c.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;t=Math.min(p*Math.tan(t),.5*A);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A-t));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));return d};ka.prototype.getConstraints=function(d,p,A){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var t=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,
+this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=jb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var tb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);tb=mxUtils.getRotatedPoint(tb,Math.cos(zb),Math.sin(zb));var sb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(sb),Math.sin(sb));mxEdgeStyle.IsometricConnector=function(d,p,A,u,z){var E=
+d.view;u=null!=u&&0<u.length?u[0]:null;var H=d.absolutePoints,ea=H[0];H=H[H.length-1];null!=u&&(u=E.transformControlPoint(d,u));null==ea&&null!=p&&(ea=new mxPoint(p.getCenterX(),p.getCenterY()));null==H&&null!=A&&(H=new mxPoint(A.getCenterX(),A.getCenterY()));var O=tb.x,ta=tb.y,ma=xb.x,ab=xb.y,ib="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=H&&null!=ea){d=function(Fa,La,Ja){Fa-=cb.x;var Ha=La-cb.y;La=(ab*Fa-ma*Ha)/(O*ab-ta*ma);Fa=(ta*Fa-O*Ha)/(ta*ma-O*ab);ib?(Ja&&(cb=new mxPoint(cb.x+
+O*La,cb.y+ta*La),z.push(cb)),cb=new mxPoint(cb.x+ma*Fa,cb.y+ab*Fa)):(Ja&&(cb=new mxPoint(cb.x+ma*Fa,cb.y+ab*Fa),z.push(cb)),cb=new mxPoint(cb.x+O*La,cb.y+ta*La));z.push(cb)};var cb=ea;null==u&&(u=new mxPoint(ea.x+(H.x-ea.x)/2,ea.y+(H.y-ea.y)/2));d(u.x,u.y,!0);d(H.x,H.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Db=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,p){if(p==mxEdgeStyle.IsometricConnector){var A=new mxElbowEdgeHandler(d);
+A.snapToTerminals=!1;return A}return Db.apply(this,arguments)};B.prototype.constraints=[];I.prototype.getConstraints=function(d,p,A){d=[];var u=Math.tan(mxUtils.toRadians(30)),z=(.5-u)/2;u=Math.min(p,A/(.5+u));p=(p-u)/2;A=(A-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.25*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*u,A+u*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+u,A+.25*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+null,p+u,A+.75*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*u,A+(1-z)*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.75*u));return d};c.prototype.getConstraints=function(d,p,A){d=[];var u=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;u=Math.min(p*Math.tan(u),.5*A);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A-u));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-u));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));return d};ka.prototype.getConstraints=function(d,p,A){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var u=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A-t)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A-t)));p>=2*t&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A-u)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A-u)));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),
new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,
0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ka.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;D.prototype.getConstraints=
-function(d,p,A){d=[];var t=Math.max(0,Math.min(p,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*t,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,.5*(A+t)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));p>=2*t&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};H.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*t,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A+t)));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
-1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));p>=2*t&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};u.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p-.5*t,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A+t)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*t,A-.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.5*(A-t)));return d};m.prototype.getConstraints=function(d,p,A){d=[];p=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,
+function(d,p,A){d=[];var u=Math.max(0,Math.min(p,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p,.5*(A+u)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};G.prototype.getConstraints=function(d,p,A){d=[];var u=Math.max(0,Math.min(p,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A+u)));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
+1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};t.prototype.getConstraints=function(d,p,A){d=[];var u=Math.max(0,Math.min(p,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A+u)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,A-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(A-u)));return d};l.prototype.getConstraints=function(d,p,A){d=[];p=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,
0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-p));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p+.5*(.5*A-p)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,p+.5*(.5*A-p)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,A-p-.5*(.5*A-p)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-p-.5*(.5*A-p)));d.push(new mxConnectionConstraint(new mxPoint(.145,
-0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-p));d.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-p));return d};x.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),z=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,
-"tabPosition",this.tabPosition)?(d.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),z))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p-t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.25*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.75*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-p));d.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-p));return d};x.prototype.getConstraints=function(d,p,A){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),z=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,
+"tabPosition",this.tabPosition)?(d.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),z))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.25*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.75*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,p,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A));d.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,
-1),!1));return d};va.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;Va.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Oa.prototype.constraints=mxRectangleShape.prototype.constraints;
-Za.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(p,A/2),z=Math.min(p-t,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p-t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Ia.prototype.getConstraints=function(d,p,A){p=parseFloat(mxUtils.getValue(d,"jettyWidth",Ia.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ia.prototype.jettyHeight));var t=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+1),!1));return d};va.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.constraints=mxRectangleShape.prototype.constraints;ha.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;Va.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Oa.prototype.constraints=mxRectangleShape.prototype.constraints;
+Za.prototype.getConstraints=function(d,p,A){d=[];var u=Math.min(p,A/2),z=Math.min(p-u,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-u,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-u),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Ia.prototype.getConstraints=function(d,p,A){p=parseFloat(mxUtils.getValue(d,"jettyWidth",Ia.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ia.prototype.jettyHeight));var u=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,p),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),
-!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,3.5*d))];A>5*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,p));A>8*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,p));A>15*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,p));return t};R.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;
+!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,3.5*d))];A>5*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,p));A>8*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,p));A>15*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,p));return u};R.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;
mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,
.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,
.5),!1)];Aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,
1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,
-1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];n.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];M.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];n.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];L.prototype.constraints=
+[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];
mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,
.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,
.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,
-.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),
-!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Ua.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),z=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*p+.25*t,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),A));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(p-t),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*p-.25*t,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*z));return d};Na.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx)))),z=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),z));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,t,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*t,A));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Qa.prototype.getConstraints=function(d,p,A){d=[];var t=A*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"arrowSize",this.arrowSize))));t=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-z),t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-z),A-t));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,A-t));return d};za.prototype.getConstraints=function(d,p,A){d=[];var t=A*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Qa.prototype.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Qa.prototype.arrowSize))));t=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,t));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p-z,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Ta.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(A,p),z=Math.max(0,Math.min(t,t*parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=(A-z)/2;var E=t+z,G=(p-z)/2;z=G+z;d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,G,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,A-.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,A));d.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A-.5*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+z),t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,E));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(p+z),E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*G,t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*G,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,G,t));return d};fa.prototype.constraints=
-null;B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,
+.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),
+!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Ua.prototype.getConstraints=function(d,p,A){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),z=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*p+.25*u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),A));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(p-u),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*p-.25*u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*z));return d};Na.prototype.getConstraints=function(d,p,A){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx)))),z=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),z));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*(A+z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,A));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Qa.prototype.getConstraints=function(d,p,A){d=[];var u=A*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",this.arrowSize))));u=(A-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-z),u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-z),A-u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,A-u));return d};za.prototype.getConstraints=function(d,p,A){d=[];var u=A*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Qa.prototype.arrowWidth)))),z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Qa.prototype.arrowSize))));u=(A-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-z,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,A-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Ta.prototype.getConstraints=function(d,p,A){d=[];var u=Math.min(A,p),z=Math.max(0,Math.min(u,u*parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=(A-z)/2;var E=u+z,H=(p-z)/2;z=H+z;d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,H,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,H,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,H,A-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,H,A));d.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+z),u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,E));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(p+z),E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,H,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*H,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*H,E));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,H,u));return d};fa.prototype.constraints=
+null;C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,
.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];wa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(D){q.escape();D=q.deleteCells(q.getDeletableCells(q.getSelectionCells()),D);null!=D&&q.setSelectionCells(D)}function f(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{for(var D=q.getSelectionCells(),P=0;P<D.length;P++)q.cellLabelChanged(D[P],"")}finally{q.getModel().endUpdate()}}}function l(D,P,c,g,m){m.getModel().beginUpdate();try{var n=m.getCellGeometry(D);null!=n&&c&&g&&(c/=g,n=n.clone(),1<c?n.height=n.width/c:n.width=n.height*c,m.getModel().setGeometry(D,
-n));m.setCellStyles(mxConstants.STYLE_CLIP_PATH,P,[D]);m.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[D])}finally{m.getModel().endUpdate()}}var u=this.editorUi,y=u.editor,q=y.graph,C=function(){return Action.prototype.isEnabled.apply(this,arguments)&&q.isEnabled()};this.addAction("new...",function(){q.openLink(u.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";u.openFile()});var J=new Action("smartFit",function(){q.popupMenuHandler.hideMenu();var D=q.view.scale,
-P=q.container.scrollLeft,c=q.container.scrollTop,g=q.view.translate.x,m=q.view.translate.y;u.actions.get("resetView").funct();1E-5>Math.abs(D-q.view.scale)&&5>Math.abs(P-q.container.scrollLeft)&&5>Math.abs(c-q.container.scrollTop)&&g==q.view.translate.x&&m==q.view.translate.y&&u.actions.get("fitWindow").funct()},null,null,"Enter");J.getTitle=function(){return mxResources.get("fitWindow")+" / "+mxResources.get("resetView")};this.put("smartFit",J);this.addAction("keyPressEnter",function(){q.isSelectionEmpty()?
-u.actions.get("smartFit").funct():q.isEnabled()&&q.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){u.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(D,P){try{var c=mxUtils.parseXml(D);y.graph.setSelectionCells(y.graph.importGraphModel(c.documentElement))}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}));u.showDialog((new OpenDialog(this)).container,
-320,220,!0,!0,function(){window.openFile=null})}).isEnabled=C;this.addAction("save",function(){u.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=C;this.addAction("saveAs...",function(){u.saveFile(!0)},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+S");this.addAction("export...",function(){u.showDialog((new ExportDialog(u)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var D=new EditDiagramDialog(u);u.showDialog(D.container,620,420,!0,!1,null,null,null,new mxRectangle(0,
-0,440,280));D.init()}).isEnabled=C;this.addAction("pageSetup...",function(){u.showDialog((new PageSetupDialog(u)).container,320,240,!0,!0)}).isEnabled=C;this.addAction("print...",function(){u.showPrintDialog()},null,"",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(q,null,10,10)});this.addAction("undo",function(){u.undo()},null,"",Editor.ctrlKey+"+Z");this.addAction("redo",function(){u.redo()},null,"",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+"+Editor.shiftKey+"+Z");
-this.addAction("cut",function(){var D=null;try{D=u.copyXml(),null!=D&&q.removeCells(D,!1)}catch(P){}try{null==D&&mxClipboard.cut(q)}catch(P){u.handleError(P)}},null,"",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{u.copyXml()}catch(D){}try{mxClipboard.copy(q)}catch(D){u.handleError(D)}},null,"",Editor.ctrlKey+"+C");this.addAction("paste",function(){u.pasteFromClipboard()},!1,"",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(D){u.pasteFromClipboard(q.popupMenuHandler.getTriggerPoint())});
-this.addAction("swap",function(){var D=q.getSelectionCells();2==D.length&&q.swapShapes(D[0],D[1])});this.addAction("copySize",function(){var D=q.getSelectionCell();q.isEnabled()&&null!=D&&q.getModel().isVertex(D)&&(D=q.getCellGeometry(D),null!=D&&(u.copiedSize=new mxRectangle(D.x,D.y,D.width,D.height)))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+F");this.addAction("pasteSize",function(){if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=u.copiedSize){q.getModel().beginUpdate();try{for(var D=q.getResizableCells(q.getSelectionCells()),
-P=0;P<D.length;P++)if(q.getModel().isVertex(D[P])){var c=q.getCellGeometry(D[P]);null!=c&&(c=c.clone(),c.width=u.copiedSize.width,c.height=u.copiedSize.height,q.getModel().setGeometry(D[P],c))}}finally{q.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+V");this.addAction("copyData",function(){var D=q.getSelectionCell()||q.getModel().getRoot();q.isEnabled()&&null!=D&&(D=D.cloneValue(),null==D||isNaN(D.nodeType)||(u.copiedValue=D))},null,null,Editor.altKey+"+"+Editor.shiftKey+
-"+B");this.addAction("copyAsText",function(){var D=q.getSelectionCell();if(q.isEnabled()&&null!=D)try{q.isHtmlLabel(D)?u.writeHtmlToClipboard(q.getLabel(D),mxUtils.bind(this,function(P){u.handleError(P)})):u.writeTextToClipboard(q.getLabel(D),mxUtils.bind(this,function(P){u.handleError(P)}))}catch(P){u.handleError(P)}});this.addAction("pasteData",function(D,P){function c(n,x){var F=g.getValue(n);x=n.cloneValue(x);x.removeAttribute("placeholders");null==F||isNaN(F.nodeType)||x.setAttribute("placeholders",
-F.getAttribute("placeholders"));null!=D&&mxEvent.isShiftDown(D)||x.setAttribute("label",q.convertValueToString(n));g.setValue(n,x)}D=null!=P?P:D;var g=q.getModel();if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=u.copiedValue){g.beginUpdate();try{var m=q.getEditableCells(q.getSelectionCells());if(0==m.length)c(g.getRoot(),u.copiedValue);else for(P=0;P<m.length;P++)c(m[P],u.copiedValue)}finally{g.endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+E");this.addAction("delete",function(D,P){D=
-null!=P?P:D;null!=D&&mxEvent.isShiftDown(D)?f():b(null!=D&&(mxEvent.isControlDown(D)||mxEvent.isMetaDown(D)||mxEvent.isAltDown(D)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){f()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{q.setSelectionCells(q.duplicateCells()),q.scrollCellToVisible(q.getSelectionCell())}catch(D){u.handleError(D)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action("merge",
-function(){var D=u.getSelectionState();if(null!=D.mergeCell){q.getModel().beginUpdate();try{q.setCellStyles("rowspan",D.rowspan,[D.mergeCell]),q.setCellStyles("colspan",D.colspan,[D.mergeCell])}finally{q.getModel().endUpdate()}}}));this.put("unmergeCells",new Action("unmerge",function(){var D=u.getSelectionState();if(0<D.cells.length){q.getModel().beginUpdate();try{q.setCellStyles("rowspan",null,D.cells),q.setCellStyles("colspan",null,D.cells)}finally{q.getModel().endUpdate()}}}));J=new Action("turn",
-function(D,P){D=null!=P?P:D;q.turnShapes(q.getResizableCells(q.getSelectionCells()),null!=D?mxEvent.isShiftDown(D):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R");J.getTitle=function(){return mxResources.get("turn")+" / "+mxResources.get("reverse")};this.put("turn",J);this.put("selectConnections",new Action("selectEdges",function(D){D=q.getSelectionCell();q.isEnabled()&&null!=D&&q.addSelectionCells(q.getEdges(D))}));this.addAction("selectVertices",function(){q.selectVertices(null,!0)},null,
+Actions.prototype.init=function(){function b(D){q.escape();D=q.deleteCells(q.getDeletableCells(q.getSelectionCells()),D);null!=D&&q.setSelectionCells(D)}function f(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{for(var D=q.getSelectionCells(),P=0;P<D.length;P++)q.cellLabelChanged(D[P],"")}finally{q.getModel().endUpdate()}}}function m(D,P,c,g,l){l.getModel().beginUpdate();try{var n=l.getCellGeometry(D);null!=n&&c&&g&&(c/=g,n=n.clone(),1<c?n.height=n.width/c:n.width=n.height*c,l.getModel().setGeometry(D,
+n));l.setCellStyles(mxConstants.STYLE_CLIP_PATH,P,[D]);l.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[D])}finally{l.getModel().endUpdate()}}var t=this.editorUi,y=t.editor,q=y.graph,B=function(){return Action.prototype.isEnabled.apply(this,arguments)&&q.isEnabled()};this.addAction("new...",function(){q.openLink(t.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";t.openFile()});var I=new Action("smartFit",function(){q.popupMenuHandler.hideMenu();var D=q.view.scale,
+P=q.container.scrollLeft,c=q.container.scrollTop,g=q.view.translate.x,l=q.view.translate.y;t.actions.get("resetView").funct();1E-5>Math.abs(D-q.view.scale)&&5>Math.abs(P-q.container.scrollLeft)&&5>Math.abs(c-q.container.scrollTop)&&g==q.view.translate.x&&l==q.view.translate.y&&t.actions.get("fitWindow").funct()},null,null,"Enter");I.getTitle=function(){return mxResources.get("fitWindow")+" / "+mxResources.get("resetView")};this.put("smartFit",I);this.addAction("keyPressEnter",function(){q.isSelectionEmpty()?
+t.actions.get("smartFit").funct():q.isEnabled()&&q.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){t.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(D,P){try{var c=mxUtils.parseXml(D);y.graph.setSelectionCells(y.graph.importGraphModel(c.documentElement))}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}));t.showDialog((new OpenDialog(this)).container,
+320,220,!0,!0,function(){window.openFile=null})}).isEnabled=B;this.addAction("save",function(){t.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=B;this.addAction("saveAs...",function(){t.saveFile(!0)},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+S");this.addAction("export...",function(){t.showDialog((new ExportDialog(t)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var D=new EditDiagramDialog(t);t.showDialog(D.container,620,420,!0,!1,null,null,null,new mxRectangle(0,
+0,440,280));D.init()}).isEnabled=B;this.addAction("pageSetup...",function(){t.showDialog((new PageSetupDialog(t)).container,320,240,!0,!0)}).isEnabled=B;this.addAction("print...",function(){t.showPrintDialog()},null,"",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(q,null,10,10)});this.addAction("undo",function(){t.undo()},null,"",Editor.ctrlKey+"+Z");this.addAction("redo",function(){t.redo()},null,"",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+"+Editor.shiftKey+"+Z");
+this.addAction("cut",function(){var D=null;try{D=t.copyXml(),null!=D&&q.removeCells(D,!1)}catch(P){}try{null==D&&mxClipboard.cut(q)}catch(P){t.handleError(P)}},null,"",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{t.copyXml()}catch(D){}try{mxClipboard.copy(q)}catch(D){t.handleError(D)}},null,"",Editor.ctrlKey+"+C");this.addAction("paste",function(){t.pasteFromClipboard()},!1,"",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(D){t.pasteFromClipboard(q.popupMenuHandler.getTriggerPoint())});
+this.addAction("swap",function(){var D=q.getSelectionCells();2==D.length&&q.swapShapes(D[0],D[1])});this.addAction("copySize",function(){var D=q.getSelectionCell();q.isEnabled()&&null!=D&&q.getModel().isVertex(D)&&(D=q.getCellGeometry(D),null!=D&&(t.copiedSize=new mxRectangle(D.x,D.y,D.width,D.height)))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+F");this.addAction("pasteSize",function(){if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=t.copiedSize){q.getModel().beginUpdate();try{for(var D=q.getResizableCells(q.getSelectionCells()),
+P=0;P<D.length;P++)if(q.getModel().isVertex(D[P])){var c=q.getCellGeometry(D[P]);null!=c&&(c=c.clone(),c.width=t.copiedSize.width,c.height=t.copiedSize.height,q.getModel().setGeometry(D[P],c))}}finally{q.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+V");this.addAction("copyData",function(){var D=q.getSelectionCell()||q.getModel().getRoot();q.isEnabled()&&null!=D&&(D=D.cloneValue(),null==D||isNaN(D.nodeType)||(t.copiedValue=D))},null,null,Editor.altKey+"+"+Editor.shiftKey+
+"+B");this.addAction("copyAsText",function(){var D=q.getSelectionCell();if(q.isEnabled()&&null!=D)try{q.isHtmlLabel(D)?t.writeHtmlToClipboard(q.getLabel(D),mxUtils.bind(this,function(P){t.handleError(P)})):t.writeTextToClipboard(q.getLabel(D),mxUtils.bind(this,function(P){t.handleError(P)}))}catch(P){t.handleError(P)}});this.addAction("pasteData",function(D,P){function c(n,x){var F=g.getValue(n);x=n.cloneValue(x);x.removeAttribute("placeholders");null==F||isNaN(F.nodeType)||x.setAttribute("placeholders",
+F.getAttribute("placeholders"));null!=D&&mxEvent.isShiftDown(D)||x.setAttribute("label",q.convertValueToString(n));g.setValue(n,x)}D=null!=P?P:D;var g=q.getModel();if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=t.copiedValue){g.beginUpdate();try{var l=q.getEditableCells(q.getSelectionCells());if(0==l.length)c(g.getRoot(),t.copiedValue);else for(P=0;P<l.length;P++)c(l[P],t.copiedValue)}finally{g.endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+E");this.addAction("delete",function(D,P){D=
+null!=P?P:D;null!=D&&mxEvent.isShiftDown(D)?f():b(null!=D&&(mxEvent.isControlDown(D)||mxEvent.isMetaDown(D)||mxEvent.isAltDown(D)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){f()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{q.setSelectionCells(q.duplicateCells()),q.scrollCellToVisible(q.getSelectionCell())}catch(D){t.handleError(D)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action("merge",
+function(){var D=t.getSelectionState();if(null!=D.mergeCell){q.getModel().beginUpdate();try{q.setCellStyles("rowspan",D.rowspan,[D.mergeCell]),q.setCellStyles("colspan",D.colspan,[D.mergeCell])}finally{q.getModel().endUpdate()}}}));this.put("unmergeCells",new Action("unmerge",function(){var D=t.getSelectionState();if(0<D.cells.length){q.getModel().beginUpdate();try{q.setCellStyles("rowspan",null,D.cells),q.setCellStyles("colspan",null,D.cells)}finally{q.getModel().endUpdate()}}}));I=new Action("turn",
+function(D,P){D=null!=P?P:D;q.turnShapes(q.getResizableCells(q.getSelectionCells()),null!=D?mxEvent.isShiftDown(D):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R");I.getTitle=function(){return mxResources.get("turn")+" / "+mxResources.get("reverse")};this.put("turn",I);this.put("selectConnections",new Action("selectEdges",function(D){D=q.getSelectionCell();q.isEnabled()&&null!=D&&q.addSelectionCells(q.getEdges(D))}));this.addAction("selectVertices",function(){q.selectVertices(null,!0)},null,
null,Editor.ctrlKey+"+"+Editor.shiftKey+"+I");this.addAction("selectEdges",function(){q.selectEdges()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+E");this.addAction("selectAll",function(){q.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){q.clearSelection()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+A");this.addAction("lockUnlock",function(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{var D=q.getSelectionCells(),P=q.getCurrentCellStyle(q.getSelectionCell()),
c=1==mxUtils.getValue(P,mxConstants.STYLE_EDITABLE,1)?0:1;q.setCellStyles(mxConstants.STYLE_MOVABLE,c,D);q.setCellStyles(mxConstants.STYLE_RESIZABLE,c,D);q.setCellStyles(mxConstants.STYLE_ROTATABLE,c,D);q.setCellStyles(mxConstants.STYLE_DELETABLE,c,D);q.setCellStyles(mxConstants.STYLE_EDITABLE,c,D);q.setCellStyles("locked",1==c?0:1,D);q.setCellStyles("connectable",c,D)}finally{q.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){var D=q.getSelectionCell();
-q.model.isEdge(D)&&(D=q.model.getTerminal(D,!0));q.model.isVertex(D)&&Graph.exploreFromCell(u.editor.graph,D)});this.addAction("home",function(){q.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){q.exitGroup()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Home");this.addAction("enterGroup",function(){q.enterGroup()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+End");this.addAction("collapse",function(){q.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",
+q.model.isEdge(D)&&(D=q.model.getTerminal(D,!0));q.model.isVertex(D)&&Graph.exploreFromCell(t.editor.graph,D)});this.addAction("home",function(){q.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){q.exitGroup()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Home");this.addAction("enterGroup",function(){q.enterGroup()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+End");this.addAction("collapse",function(){q.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",
function(){q.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){q.orderCells(!1)},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+F");this.addAction("toBack",function(){q.orderCells(!0)},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+B");this.addAction("bringForward",function(D){q.orderCells(!1,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+F");this.addAction("sendBackward",function(D){q.orderCells(!0,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+B");this.addAction("group",
function(){if(q.isEnabled()){var D=mxUtils.sortCells(q.getSelectionCells(),!0);1!=D.length||q.isTable(D[0])||q.isTableRow(D[0])?(D=q.getCellsForGroup(D),1<D.length&&q.setSelectionCell(q.groupCells(null,0,D))):q.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(q.isEnabled()){var D=q.getEditableCells(q.getSelectionCells());q.model.beginUpdate();try{var P=q.ungroupCells();if(null!=D)for(var c=0;c<D.length;c++)q.model.contains(D[c])&&(0==q.model.getChildCount(D[c])&&
q.model.isVertex(D[c])&&q.setCellStyles("container","0",[D[c]]),P.push(D[c]))}finally{q.model.endUpdate()}0<P.length&&q.setSelectionCells(P)}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+U");this.addAction("removeFromGroup",function(){if(q.isEnabled()){var D=q.getSelectionCells();if(null!=D){for(var P=[],c=0;c<D.length;c++)q.isTableRow(D[c])||q.isTableCell(D[c])||P.push(D[c]);q.removeCellsFromParent(P);0<P.length&&q.scrollCellToVisible(P[0])}}});this.addAction("edit",function(){q.isEnabled()&&
-q.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var D=q.getSelectionCell()||q.getModel().getRoot();u.showDataDialog(D)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&null!=D&&q.isCellEditable(D)){var P="";if(mxUtils.isNode(D.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&D.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=D.value.getAttribute("tooltip_"+Graph.diagramLanguage));
-null==c&&(c=D.value.getAttribute("tooltip"));null!=c&&(P=c)}P=new TextareaDialog(u,mxResources.get("editTooltip")+":",P,function(g){q.setTooltipForCell(D,g)});u.showDialog(P.container,320,200,!0,!0);P.init()}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+T");this.addAction("openLink",function(){var D=q.getLinkForCell(q.getSelectionCell());null!=D&&q.openLink(D)});this.addAction("editLink...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&null!=D&&q.isCellEditable(D)){var P=q.getLinkForCell(D,
-!0)||"";u.showLinkDialog(P,mxResources.get("ok"),function(c,g,m){q.getModel().beginUpdate();try{q.setLinkForCell(D,0<c.length?c:null),q.setAttributeForCell(D,"linkTarget",m)}finally{q.getModel().endUpdate()}},!0,q.getLinkTargetForCell(D))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+L");this.put("insertImage",new Action("image...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&(q.clearSelection(),u.actions.get("image").funct())})).isEnabled=C;this.addAction("editImage...",function(){u.actions.get("image").funct()});
-this.put("insertLink",new Action("link...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&u.showLinkDialog("",mxResources.get("ok"),function(D,P,c){D=mxUtils.trim(D);if(0<D.length){var g=null,m=q.getLinkTitle(D);null!=P&&0<P.length&&(g=P[0].iconUrl,m=P[0].name||P[0].type,m=m.charAt(0).toUpperCase()+m.substring(1),30<m.length&&(m=m.substring(0,30)+"..."));P=new mxCell(m,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=g?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+
-g:"spacing=10;"));P.vertex=!0;g=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([P],!0));P.geometry.x=g.x;P.geometry.y=g.y;q.setAttributeForCell(P,"linkTarget",c);q.setLinkForCell(P,D);q.cellSizeUpdated(P,!0);q.getModel().beginUpdate();try{P=q.addCell(P),q.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{q.getModel().endUpdate()}q.setSelectionCell(P);q.scrollCellToVisible(q.getSelectionCell())}},!0)},null,null,"L")).isEnabled=C;this.addAction("link...",mxUtils.bind(this,function(){if(q.isEnabled())if(q.cellEditor.isContentEditing()){var D=
-q.getSelectedElement(),P=q.getParentByName(D,"A",q.cellEditor.textarea),c="";if(null==P&&null!=D&&null!=D.getElementsByTagName)for(var g=D.getElementsByTagName("a"),m=0;m<g.length&&null==P;m++)g[m].textContent==D.textContent&&(P=g[m]);null!=P&&"A"==P.nodeName&&(c=P.getAttribute("href")||"",q.selectNode(P));var n=q.cellEditor.saveSelection();u.showLinkDialog(c,mxResources.get("ok"),mxUtils.bind(this,function(x){q.cellEditor.restoreSelection(n);null!=x&&q.insertLink(x)}))}else q.isSelectionEmpty()?
-this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=C;this.addAction("autosize",function(){var D=q.getSelectionCells();if(null!=D){q.getModel().beginUpdate();try{for(var P=0;P<D.length;P++){var c=D[P];q.getModel().isVertex(c)&&(0<q.getModel().getChildCount(c)?q.updateGroupBounds([c],0,!0):q.updateCellSize(c))}}finally{q.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Y");this.addAction("snapToGrid",function(){q.snapCellsToGrid(q.getSelectionCells(),q.gridSize)});
-this.addAction("formattedText",function(){q.stopEditing();var D=q.getCommonStyle(q.getSelectionCells());D="1"==mxUtils.getValue(D,"html","0")?null:"1";q.getModel().beginUpdate();try{for(var P=q.getEditableCells(q.getSelectionCells()),c=0;c<P.length;c++)if(state=q.getView().getState(P[c]),null!=state){var g=mxUtils.getValue(state.style,"html","0");if("1"==g&&null==D)q.removeTextStyleForCell(state.cell),q.setCellStyles("html",D,[P[c]]);else if("0"==g&&"1"==D){var m=mxUtils.htmlEntities(q.convertValueToString(state.cell),
-!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(m=m.replace(/\n/g,"<br/>"));q.cellLabelChanged(state.cell,Graph.sanitizeHtml(m));q.setCellStyles("html",D,[P[c]])}}u.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=D?D:"0"],"cells",P))}finally{q.getModel().endUpdate()}});this.addAction("wordWrap",function(){var D=q.getView().getState(q.getSelectionCell()),P="wrap";q.stopEditing();null!=D&&"wrap"==D.style[mxConstants.STYLE_WHITE_SPACE]&&(P=null);q.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-P)});this.addAction("rotation",function(){var D="0",P=q.getView().getState(q.getSelectionCell());null!=P&&(D=P.style[mxConstants.STYLE_ROTATION]||D);D=new FilenameDialog(u,D,mxResources.get("apply"),function(c){null!=c&&0<c.length&&q.setCellStyles(mxConstants.STYLE_ROTATION,c)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");u.showDialog(D.container,375,80,!0,!0);D.init()});this.addAction("resetView",function(){q.zoomTo(1);u.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
-function(D){q.isFastZoomEnabled()?q.lazyZoom(!0,!0,u.buttonZoomDelay):q.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(D){q.isFastZoomEnabled()?q.lazyZoom(!1,!0,u.buttonZoomDelay):q.zoomOut()},null,null,Editor.ctrlKey+" - / Alt+Mousewheel");this.addAction("fitWindow",function(){q.pageVisible&&q.isSelectionEmpty()?q.fitPages():u.fitDiagramToWindow()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+H");this.addAction("fitPage",mxUtils.bind(this,function(){q.pageVisible?
+q.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var D=q.getSelectionCell()||q.getModel().getRoot();t.showDataDialog(D)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&null!=D&&q.isCellEditable(D)){var P="";if(mxUtils.isNode(D.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&D.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=D.value.getAttribute("tooltip_"+Graph.diagramLanguage));
+null==c&&(c=D.value.getAttribute("tooltip"));null!=c&&(P=c)}P=new TextareaDialog(t,mxResources.get("editTooltip")+":",P,function(g){q.setTooltipForCell(D,g)});t.showDialog(P.container,320,200,!0,!0);P.init()}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+T");this.addAction("openLink",function(){var D=q.getLinkForCell(q.getSelectionCell());null!=D&&q.openLink(D)});this.addAction("editLink...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&null!=D&&q.isCellEditable(D)){var P=q.getLinkForCell(D,
+!0)||"";t.showLinkDialog(P,mxResources.get("ok"),function(c,g,l){q.getModel().beginUpdate();try{q.setLinkForCell(D,0<c.length?c:null),q.setAttributeForCell(D,"linkTarget",l)}finally{q.getModel().endUpdate()}},!0,q.getLinkTargetForCell(D))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+L");this.put("insertImage",new Action("image...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&(q.clearSelection(),t.actions.get("image").funct())})).isEnabled=B;this.addAction("editImage...",function(){t.actions.get("image").funct()});
+this.put("insertLink",new Action("link...",function(){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&t.showLinkDialog("",mxResources.get("ok"),function(D,P,c){D=mxUtils.trim(D);if(0<D.length){var g=null,l=q.getLinkTitle(D);null!=P&&0<P.length&&(g=P[0].iconUrl,l=P[0].name||P[0].type,l=l.charAt(0).toUpperCase()+l.substring(1),30<l.length&&(l=l.substring(0,30)+"..."));P=new mxCell(l,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=g?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+
+g:"spacing=10;"));P.vertex=!0;g=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([P],!0));P.geometry.x=g.x;P.geometry.y=g.y;q.setAttributeForCell(P,"linkTarget",c);q.setLinkForCell(P,D);q.cellSizeUpdated(P,!0);q.getModel().beginUpdate();try{P=q.addCell(P),q.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{q.getModel().endUpdate()}q.setSelectionCell(P);q.scrollCellToVisible(q.getSelectionCell())}},!0)},null,null,"L")).isEnabled=B;this.addAction("link...",mxUtils.bind(this,function(){if(q.isEnabled())if(q.cellEditor.isContentEditing()){var D=
+q.getSelectedElement(),P=q.getParentByName(D,"A",q.cellEditor.textarea),c="";if(null==P&&null!=D&&null!=D.getElementsByTagName)for(var g=D.getElementsByTagName("a"),l=0;l<g.length&&null==P;l++)g[l].textContent==D.textContent&&(P=g[l]);null!=P&&"A"==P.nodeName&&(c=P.getAttribute("href")||"",q.selectNode(P));var n=q.cellEditor.saveSelection();t.showLinkDialog(c,mxResources.get("ok"),mxUtils.bind(this,function(x){q.cellEditor.restoreSelection(n);null!=x&&q.insertLink(x)}))}else q.isSelectionEmpty()?
+this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=B;this.addAction("autosize",function(){var D=q.getSelectionCells();if(null!=D){q.getModel().beginUpdate();try{for(var P=0;P<D.length;P++){var c=D[P];q.getModel().isVertex(c)&&(0<q.getModel().getChildCount(c)?q.updateGroupBounds([c],0,!0):q.updateCellSize(c))}}finally{q.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Y");this.addAction("snapToGrid",function(){q.snapCellsToGrid(q.getSelectionCells(),q.gridSize)});
+this.addAction("formattedText",function(){q.stopEditing();var D=q.getCommonStyle(q.getSelectionCells());D="1"==mxUtils.getValue(D,"html","0")?null:"1";q.getModel().beginUpdate();try{for(var P=q.getEditableCells(q.getSelectionCells()),c=0;c<P.length;c++)if(state=q.getView().getState(P[c]),null!=state){var g=mxUtils.getValue(state.style,"html","0");if("1"==g&&null==D)q.removeTextStyleForCell(state.cell),q.setCellStyles("html",D,[P[c]]);else if("0"==g&&"1"==D){var l=mxUtils.htmlEntities(q.convertValueToString(state.cell),
+!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(l=l.replace(/\n/g,"<br/>"));q.cellLabelChanged(state.cell,Graph.sanitizeHtml(l));q.setCellStyles("html",D,[P[c]])}}t.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=D?D:"0"],"cells",P))}finally{q.getModel().endUpdate()}});this.addAction("wordWrap",function(){var D=q.getView().getState(q.getSelectionCell()),P="wrap";q.stopEditing();null!=D&&"wrap"==D.style[mxConstants.STYLE_WHITE_SPACE]&&(P=null);q.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
+P)});this.addAction("rotation",function(){var D="0",P=q.getView().getState(q.getSelectionCell());null!=P&&(D=P.style[mxConstants.STYLE_ROTATION]||D);D=new FilenameDialog(t,D,mxResources.get("apply"),function(c){null!=c&&0<c.length&&q.setCellStyles(mxConstants.STYLE_ROTATION,c)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");t.showDialog(D.container,375,80,!0,!0);D.init()});this.addAction("resetView",function(){q.zoomTo(1);t.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
+function(D){q.isFastZoomEnabled()?q.lazyZoom(!0,!0,t.buttonZoomDelay):q.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(D){q.isFastZoomEnabled()?q.lazyZoom(!1,!0,t.buttonZoomDelay):q.zoomOut()},null,null,Editor.ctrlKey+" - / Alt+Mousewheel");this.addAction("fitWindow",function(){q.pageVisible&&q.isSelectionEmpty()?q.fitPages():t.fitDiagramToWindow()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+H");this.addAction("fitPage",mxUtils.bind(this,function(){q.pageVisible?
q.fitPages(1):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){q.pageVisible?q.fitPages(2):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){q.pageVisible?q.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action("custom...",mxUtils.bind(this,function(){var D=new FilenameDialog(this.editorUi,parseInt(100*q.getView().getScale()),
-mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&q.zoomTo(P/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(D.container,300,80,!0,!0);D.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var D=new FilenameDialog(this.editorUi,parseInt(100*q.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&(P=new ChangePageSetup(u,null,null,null,P/100),P.ignoreColor=!0,
-P.ignoreImage=!0,q.model.execute(P))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(D.container,300,80,!0,!0);D.init()}));J=null;J=this.addAction("grid",function(){q.setGridEnabled(!q.isGridEnabled());q.defaultGridEnabled=q.isGridEnabled();u.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+G");J.setToggleAction(!0);J.setSelectedCallback(function(){return q.isGridEnabled()});J.setEnabled(!1);J=this.addAction("guides",function(){q.graphHandler.guidesEnabled=
-!q.graphHandler.guidesEnabled;u.fireEvent(new mxEventObject("guidesEnabledChanged"))});J.setToggleAction(!0);J.setSelectedCallback(function(){return q.graphHandler.guidesEnabled});J.setEnabled(!1);J=this.addAction("animations",function(){Editor.enableAnimations=!Editor.enableAnimations;u.fireEvent(new mxEventObject("enableAnimationsChanged"))});J.setToggleAction(!0);J.setSelectedCallback(function(){return Editor.enableAnimations});J=this.addAction("tooltips",function(){q.tooltipHandler.setEnabled(!q.tooltipHandler.isEnabled());
-u.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});J.setToggleAction(!0);J.setSelectedCallback(function(){return q.tooltipHandler.isEnabled()});J=this.addAction("collapseExpand",function(){var D=new ChangePageSetup(u);D.ignoreColor=!0;D.ignoreImage=!0;D.foldingEnabled=!q.foldingEnabled;q.model.execute(D)});J.setToggleAction(!0);J.setSelectedCallback(function(){return q.foldingEnabled});J.isEnabled=C;J=this.addAction("pageView",mxUtils.bind(this,function(){u.setPageVisible(!q.pageVisible)}));
-J.setToggleAction(!0);J.setSelectedCallback(function(){return q.pageVisible});J=this.addAction("connectionArrows",function(){q.connectionArrowsEnabled=!q.connectionArrowsEnabled;u.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+A");J.setToggleAction(!0);J.setSelectedCallback(function(){return q.connectionArrowsEnabled});J=this.addAction("connectionPoints",function(){q.setConnectable(!q.connectionHandler.isEnabled());u.fireEvent(new mxEventObject("connectionPointsChanged"))},
-null,null,Editor.altKey+"+"+Editor.shiftKey+"+O");J.setToggleAction(!0);J.setSelectedCallback(function(){return q.connectionHandler.isEnabled()});J=this.addAction("copyConnect",function(){q.connectionHandler.setCreateTarget(!q.connectionHandler.isCreateTarget());u.fireEvent(new mxEventObject("copyConnectChanged"))});J.setToggleAction(!0);J.setSelectedCallback(function(){return q.connectionHandler.isCreateTarget()});J.isEnabled=C;J=this.addAction("autosave",function(){u.editor.setAutosave(!u.editor.autosave)});
-J.setToggleAction(!0);J.setSelectedCallback(function(){return u.editor.autosave});J.isEnabled=C;J.visible=!1;this.addAction("help",function(){var D="";mxResources.isLanguageSupported(mxClient.language)&&(D="_"+mxClient.language);q.openLink(RESOURCES_PATH+"/help"+D+".html")});var S=!1;J=new Action("about",function(){S||(u.showDialog((new AboutDialog(u)).container,320,280,!0,!0,function(){S=!1}),S=!0)});J.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",J);J=
-mxUtils.bind(this,function(D,P,c,g){return this.addAction(D,function(){if(null!=c&&q.cellEditor.isContentEditing())c();else{q.stopEditing(!1);q.getModel().beginUpdate();try{var m=q.getEditableCells(q.getSelectionCells());q.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,P,m);(P&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?q.updateLabelElements(m,function(x){x.style.fontWeight=null;"B"==x.nodeName&&q.replaceElement(x)}):(P&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?q.updateLabelElements(m,
-function(x){x.style.fontStyle=null;"I"==x.nodeName&&q.replaceElement(x)}):(P&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.updateLabelElements(m,function(x){x.style.textDecoration=null;"U"==x.nodeName&&q.replaceElement(x)});for(var n=0;n<m.length;n++)0==q.model.getChildCount(m[n])&&q.autoSizeCell(m[n],!1)}finally{q.getModel().endUpdate()}}},null,null,g)});J("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");J("italic",mxConstants.FONT_ITALIC,
-function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");J("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){u.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",q.shapeForegroundColor)});this.addAction("strokeColor...",function(){u.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("fillColor...",function(){u.menus.pickColor(mxConstants.STYLE_FILLCOLOR,
-null,null,"default",q.shapeBackgroundColor)});this.addAction("gradientColor...",function(){u.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("backgroundColor...",function(){u.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor",null,"default",q.shapeBackgroundColor)});this.addAction("borderColor...",function(){u.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("removeFormat",
-function(){if(q.isEnabled()&&!q.isSelectionEmpty()&&!q.isEditing()){q.getModel().beginUpdate();try{for(var D=q.getSelectionCells(),P=0;P<D.length;P++)q.removeTextStyleForCell(D[P],!0)}finally{q.getModel().endUpdate()}}});this.addAction("vertical",function(){u.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){u.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,
-null),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),u.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("dashed",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,"1"),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),u.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,
-mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("dotted",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,"1"),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),u.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("sharp",
-function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),q.setCellStyles(mxConstants.STYLE_CURVED,"0"),u.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("rounded",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),q.setCellStyles(mxConstants.STYLE_CURVED,"0"),u.fireEvent(new mxEventObject("styleChanged",
-"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!q.isSelectionEmpty()&&q.isEnabled()){q.getModel().beginUpdate();try{var D=q.getSelectionCells(),P=q.getCurrentCellStyle(D[0]),c="1"==mxUtils.getValue(P,mxConstants.STYLE_ROUNDED,"0")?"0":"1";q.setCellStyles(mxConstants.STYLE_ROUNDED,c);q.setCellStyles(mxConstants.STYLE_CURVED,null);u.fireEvent(new mxEventObject("styleChanged",
-"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}}});this.addAction("curved",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),q.setCellStyles(mxConstants.STYLE_CURVED,"1"),u.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("collapsible",
-function(){var D=q.view.getState(q.getSelectionCell()),P="1";null!=D&&null!=q.getFoldingImage(D)&&(P="0");q.setCellStyles("collapsible",P);u.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[P],"cells",q.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var D=q.getEditableCells(q.getSelectionCells());if(null!=D&&0<D.length){var P=q.getModel();P=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",P.getStyle(D[0])||"",function(c){null!=
-c&&q.setCellStyle(mxUtils.trim(c),D)},null,null,400,220);this.editorUi.showDialog(P.container,420,300,!0,!0);P.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&u.setDefaultStyle(q.getSelectionCell())},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+D");this.addAction("clearDefaultStyle",function(){q.isEnabled()&&u.clearDefaultStyle()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+R");this.addAction("addWaypoint",function(){var D=
-q.getSelectionCell();if(null!=D&&q.getModel().isEdge(D)){var P=y.graph.selectionCellsHandler.getHandler(D);if(P instanceof mxEdgeHandler){var c=0,g=0;D=q.getModel().getParent(D);for(var m=q.getCellGeometry(D);q.getModel().isVertex(D)&&null!=m;)c+=m.x,g+=m.y,D=q.getModel().getParent(D),m=q.getCellGeometry(D);D=q.popupMenuHandler.getTriggerPoint();c=Math.round(q.snap(D.x-c));g=Math.round(q.snap(D.y-g));P.addPointAt(P.state,c,g)}}});this.addAction("removeWaypoint",function(){var D=u.actions.get("removeWaypoint");
+mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&q.zoomTo(P/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(D.container,300,80,!0,!0);D.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var D=new FilenameDialog(this.editorUi,parseInt(100*q.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&(P=new ChangePageSetup(t,null,null,null,P/100),P.ignoreColor=!0,
+P.ignoreImage=!0,q.model.execute(P))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(D.container,300,80,!0,!0);D.init()}));I=null;I=this.addAction("grid",function(){q.setGridEnabled(!q.isGridEnabled());q.defaultGridEnabled=q.isGridEnabled();t.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+G");I.setToggleAction(!0);I.setSelectedCallback(function(){return q.isGridEnabled()});I.setEnabled(!1);I=this.addAction("guides",function(){q.graphHandler.guidesEnabled=
+!q.graphHandler.guidesEnabled;t.fireEvent(new mxEventObject("guidesEnabledChanged"))});I.setToggleAction(!0);I.setSelectedCallback(function(){return q.graphHandler.guidesEnabled});I.setEnabled(!1);I=this.addAction("animations",function(){Editor.enableAnimations=!Editor.enableAnimations;t.fireEvent(new mxEventObject("enableAnimationsChanged"))});I.setToggleAction(!0);I.setSelectedCallback(function(){return Editor.enableAnimations});I=this.addAction("tooltips",function(){q.tooltipHandler.setEnabled(!q.tooltipHandler.isEnabled());
+t.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});I.setToggleAction(!0);I.setSelectedCallback(function(){return q.tooltipHandler.isEnabled()});I=this.addAction("collapseExpand",function(){var D=new ChangePageSetup(t);D.ignoreColor=!0;D.ignoreImage=!0;D.foldingEnabled=!q.foldingEnabled;q.model.execute(D)});I.setToggleAction(!0);I.setSelectedCallback(function(){return q.foldingEnabled});I.isEnabled=B;I=this.addAction("pageView",mxUtils.bind(this,function(){t.setPageVisible(!q.pageVisible)}));
+I.setToggleAction(!0);I.setSelectedCallback(function(){return q.pageVisible});I=this.addAction("connectionArrows",function(){q.connectionArrowsEnabled=!q.connectionArrowsEnabled;t.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+A");I.setToggleAction(!0);I.setSelectedCallback(function(){return q.connectionArrowsEnabled});I=this.addAction("connectionPoints",function(){q.setConnectable(!q.connectionHandler.isEnabled());t.fireEvent(new mxEventObject("connectionPointsChanged"))},
+null,null,Editor.altKey+"+"+Editor.shiftKey+"+O");I.setToggleAction(!0);I.setSelectedCallback(function(){return q.connectionHandler.isEnabled()});I=this.addAction("copyConnect",function(){q.connectionHandler.setCreateTarget(!q.connectionHandler.isCreateTarget());t.fireEvent(new mxEventObject("copyConnectChanged"))});I.setToggleAction(!0);I.setSelectedCallback(function(){return q.connectionHandler.isCreateTarget()});I.isEnabled=B;I=this.addAction("autosave",function(){t.editor.setAutosave(!t.editor.autosave)});
+I.setToggleAction(!0);I.setSelectedCallback(function(){return t.editor.autosave});I.isEnabled=B;I.visible=!1;this.addAction("help",function(){var D="";mxResources.isLanguageSupported(mxClient.language)&&(D="_"+mxClient.language);q.openLink(RESOURCES_PATH+"/help"+D+".html")});var S=!1;I=new Action("about",function(){S||(t.showDialog((new AboutDialog(t)).container,320,280,!0,!0,function(){S=!1}),S=!0)});I.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",I);I=
+mxUtils.bind(this,function(D,P,c,g){return this.addAction(D,function(){if(null!=c&&q.cellEditor.isContentEditing())c();else{q.stopEditing(!1);q.getModel().beginUpdate();try{var l=q.getEditableCells(q.getSelectionCells());q.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,P,l);(P&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?q.updateLabelElements(l,function(x){x.style.fontWeight=null;"B"==x.nodeName&&q.replaceElement(x)}):(P&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?q.updateLabelElements(l,
+function(x){x.style.fontStyle=null;"I"==x.nodeName&&q.replaceElement(x)}):(P&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.updateLabelElements(l,function(x){x.style.textDecoration=null;"U"==x.nodeName&&q.replaceElement(x)});for(var n=0;n<l.length;n++)0==q.model.getChildCount(l[n])&&q.autoSizeCell(l[n],!1)}finally{q.getModel().endUpdate()}}},null,null,g)});I("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");I("italic",mxConstants.FONT_ITALIC,
+function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");I("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){t.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",q.shapeForegroundColor)});this.addAction("strokeColor...",function(){t.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("fillColor...",function(){t.menus.pickColor(mxConstants.STYLE_FILLCOLOR,
+null,null,"default",q.shapeBackgroundColor)});this.addAction("gradientColor...",function(){t.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("backgroundColor...",function(){t.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor",null,"default",q.shapeBackgroundColor)});this.addAction("borderColor...",function(){t.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("removeFormat",
+function(){if(q.isEnabled()&&!q.isSelectionEmpty()&&!q.isEditing()){q.getModel().beginUpdate();try{for(var D=q.getSelectionCells(),P=0;P<D.length;P++)q.removeTextStyleForCell(D[P],!0)}finally{q.getModel().endUpdate()}}});this.addAction("vertical",function(){t.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){t.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,
+null),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),t.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("dashed",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,"1"),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),t.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,
+mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("dotted",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,"1"),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),t.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("sharp",
+function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),q.setCellStyles(mxConstants.STYLE_CURVED,"0"),t.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("rounded",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),q.setCellStyles(mxConstants.STYLE_CURVED,"0"),t.fireEvent(new mxEventObject("styleChanged",
+"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!q.isSelectionEmpty()&&q.isEnabled()){q.getModel().beginUpdate();try{var D=q.getSelectionCells(),P=q.getCurrentCellStyle(D[0]),c="1"==mxUtils.getValue(P,mxConstants.STYLE_ROUNDED,"0")?"0":"1";q.setCellStyles(mxConstants.STYLE_ROUNDED,c);q.setCellStyles(mxConstants.STYLE_CURVED,null);t.fireEvent(new mxEventObject("styleChanged",
+"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}}});this.addAction("curved",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),q.setCellStyles(mxConstants.STYLE_CURVED,"1"),t.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("collapsible",
+function(){var D=q.view.getState(q.getSelectionCell()),P="1";null!=D&&null!=q.getFoldingImage(D)&&(P="0");q.setCellStyles("collapsible",P);t.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[P],"cells",q.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var D=q.getEditableCells(q.getSelectionCells());if(null!=D&&0<D.length){var P=q.getModel();P=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",P.getStyle(D[0])||"",function(c){null!=
+c&&q.setCellStyle(mxUtils.trim(c),D)},null,null,400,220);this.editorUi.showDialog(P.container,420,300,!0,!0);P.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&t.setDefaultStyle(q.getSelectionCell())},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+D");this.addAction("clearDefaultStyle",function(){q.isEnabled()&&t.clearDefaultStyle()},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+R");this.addAction("addWaypoint",function(){var D=
+q.getSelectionCell();if(null!=D&&q.getModel().isEdge(D)){var P=y.graph.selectionCellsHandler.getHandler(D);if(P instanceof mxEdgeHandler){var c=0,g=0;D=q.getModel().getParent(D);for(var l=q.getCellGeometry(D);q.getModel().isVertex(D)&&null!=l;)c+=l.x,g+=l.y,D=q.getModel().getParent(D),l=q.getCellGeometry(D);D=q.popupMenuHandler.getTriggerPoint();c=Math.round(q.snap(D.x-c));g=Math.round(q.snap(D.y-g));P.addPointAt(P.state,c,g)}}});this.addAction("removeWaypoint",function(){var D=t.actions.get("removeWaypoint");
null!=D.handler&&D.handler.removePoint(D.handler.state,D.index)});this.addAction("clearAnchors",function(){var D=q.getSelectionCells();if(null!=D){D=q.getEditableCells(q.addAllEdges(D));q.getModel().beginUpdate();try{for(var P=0;P<D.length;P++){var c=D[P];q.getModel().isEdge(c)&&(q.setCellStyles(mxConstants.STYLE_EXIT_X,null,[c]),q.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[c]),q.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),q.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{q.getModel().endUpdate()}}});
-this.addAction("clearWaypoints",function(){var D=q.getSelectionCells();if(null!=D){D=q.getEditableCells(q.addAllEdges(D));q.getModel().beginUpdate();try{for(var P=0;P<D.length;P++){var c=D[P];if(q.getModel().isEdge(c)){var g=q.getCellGeometry(c);null!=g&&(g=g.clone(),g.points=null,g.x=0,g.y=0,g.offset=null,q.getModel().setGeometry(c,g))}}}finally{q.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+R");J=this.addAction("subscript",mxUtils.bind(this,function(){q.cellEditor.isContentEditing()&&
-document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");J=this.addAction("superscript",mxUtils.bind(this,function(){q.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");J=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var D=q.getCurrentCellStyle(q.getSelectionCell());D=mxUtils.getValue(D,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,
-Math.max(1,D-1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" + (Numpad)");J=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var D=q.getCurrentCellStyle(q.getSelectionCell());D=mxUtils.getValue(D,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,D+1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" - (Numpad)");this.addAction("image...",function(){if(q.isEnabled()&&
-!q.isCellLocked(q.getDefaultParent())){var D=mxResources.get("image")+" ("+mxResources.get("url")+"):",P=q.getView().getState(q.getSelectionCell()),c="",g=null;null!=P&&(c=P.style[mxConstants.STYLE_IMAGE]||c,g=P.style[mxConstants.STYLE_CLIP_PATH]||g);var m=q.cellEditor.saveSelection();u.showImageDialog(D,c,function(n,x,F,H,M,L){if(q.cellEditor.isContentEditing())q.cellEditor.restoreSelection(m),q.insertImage(n,x,F);else{var K=q.getSelectionCells();if(null!=n&&(0<n.length||0<K.length)){var Z=null;
-q.getModel().beginUpdate();try{if(0==K.length){K=[q.insertVertex(q.getDefaultParent(),null,"",0,0,x,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ha=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ha.x;K[0].geometry.y=ha.y;null!=H&&l(K[0],H,M,L,q);Z=K;q.fireEvent(new mxEventObject("cellsInserted","cells",Z))}q.setCellStyles(mxConstants.STYLE_IMAGE,0<n.length?n:null,K);var ca=q.getCurrentCellStyle(K[0]);"image"!=ca[mxConstants.STYLE_SHAPE]&&
-"label"!=ca[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==n.length&&q.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==H&&q.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=x&&null!=F)for(n=0;n<K.length;n++){var aa=K[n];if("0"!=q.getCurrentCellStyle(aa).expand){var oa=q.getModel().getGeometry(aa);null!=oa&&(oa=oa.clone(),oa.width=x,oa.height=F,q.getModel().setGeometry(aa,oa))}null!=H&&l(aa,H,M,L,q)}}finally{q.getModel().endUpdate()}null!=Z&&(q.setSelectionCells(Z),
-q.scrollCellToVisible(Z[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,g)}}).isEnabled=C;this.addAction("crop...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=D){var P=q.getCurrentCellStyle(D),c=P[mxConstants.STYLE_IMAGE],g=P[mxConstants.STYLE_SHAPE];c&&"image"==g&&(P=new CropImageDialog(u,c,P[mxConstants.STYLE_CLIP_PATH],function(m,n,x){l(D,m,n,x,q)}),u.showDialog(P.container,300,390,!0,!0))}}).isEnabled=C;J=this.addAction("layers",
-mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(u,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){u.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){u.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),u.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),
-null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+L");J.setToggleAction(!0);J.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));J=this.addAction("format",mxUtils.bind(this,function(){u.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+P");J.setToggleAction(!0);J.setSelectedCallback(mxUtils.bind(this,function(){return u.isFormatPanelVisible()}));J=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?
-(this.outlineWindow=new OutlineWindow(u,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){u.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){u.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),u.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+
-"+O");J.setToggleAction(!0);J.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=D&&null!=D.geometry){var P=new ConnectionPointsDialog(u,D);u.showDialog(P.container,350,450,!0,!1,function(){P.destroy()});P.init()}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+Q").isEnabled=C};
-Actions.prototype.addAction=function(b,f,l,u,y,q){var C=b;"..."==C.substring(C.length-3)&&(C=C.substring(0,C.length-3));return this.put(C,new Action(b,f,l,u,y,q))};Actions.prototype.put=function(b,f){return this.actions[b]=f};Actions.prototype.get=function(b){return this.actions[b]};function Action(b,f,l,u,y,q){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(f);this.enabled=null!=l?l:!0;this.iconCls=u;this.shortcut=y;this.visible=null!=q?q:!0}mxUtils.extend(Action,mxEventSource);
+this.addAction("clearWaypoints",function(){var D=q.getSelectionCells();if(null!=D){D=q.getEditableCells(q.addAllEdges(D));q.getModel().beginUpdate();try{for(var P=0;P<D.length;P++){var c=D[P];if(q.getModel().isEdge(c)){var g=q.getCellGeometry(c);null!=g&&(g=g.clone(),g.points=null,g.x=0,g.y=0,g.offset=null,q.getModel().setGeometry(c,g))}}}finally{q.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+R");I=this.addAction("subscript",mxUtils.bind(this,function(){q.cellEditor.isContentEditing()&&
+document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");I=this.addAction("superscript",mxUtils.bind(this,function(){q.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");I=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var D=q.getCurrentCellStyle(q.getSelectionCell());D=mxUtils.getValue(D,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,
+Math.max(1,D-1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" + (Numpad)");I=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var D=q.getCurrentCellStyle(q.getSelectionCell());D=mxUtils.getValue(D,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,D+1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" - (Numpad)");this.addAction("image...",function(){if(q.isEnabled()&&
+!q.isCellLocked(q.getDefaultParent())){var D=mxResources.get("image")+" ("+mxResources.get("url")+"):",P=q.getView().getState(q.getSelectionCell()),c="",g=null;null!=P&&(c=P.style[mxConstants.STYLE_IMAGE]||c,g=P.style[mxConstants.STYLE_CLIP_PATH]||g);var l=q.cellEditor.saveSelection();t.showImageDialog(D,c,function(n,x,F,G,L,M){if(q.cellEditor.isContentEditing())q.cellEditor.restoreSelection(l),q.insertImage(n,x,F);else{var K=q.getSelectionCells();if(null!=n&&(0<n.length||0<K.length)){var Z=null;
+q.getModel().beginUpdate();try{if(0==K.length){K=[q.insertVertex(q.getDefaultParent(),null,"",0,0,x,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ja=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ja.x;K[0].geometry.y=ja.y;null!=G&&m(K[0],G,L,M,q);Z=K;q.fireEvent(new mxEventObject("cellsInserted","cells",Z))}q.setCellStyles(mxConstants.STYLE_IMAGE,0<n.length?n:null,K);var da=q.getCurrentCellStyle(K[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&
+"label"!=da[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==n.length&&q.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==G&&q.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=x&&null!=F)for(n=0;n<K.length;n++){var ba=K[n];if("0"!=q.getCurrentCellStyle(ba).expand){var na=q.getModel().getGeometry(ba);null!=na&&(na=na.clone(),na.width=x,na.height=F,q.getModel().setGeometry(ba,na))}null!=G&&m(ba,G,L,M,q)}}finally{q.getModel().endUpdate()}null!=Z&&(q.setSelectionCells(Z),
+q.scrollCellToVisible(Z[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,g)}}).isEnabled=B;this.addAction("crop...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=D){var P=q.getCurrentCellStyle(D),c=P[mxConstants.STYLE_IMAGE],g=P[mxConstants.STYLE_SHAPE];c&&"image"==g&&(P=new CropImageDialog(t,c,P[mxConstants.STYLE_CLIP_PATH],function(l,n,x){m(D,l,n,x,q)}),t.showDialog(P.container,300,390,!0,!0))}}).isEnabled=B;I=this.addAction("layers",
+mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(t,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){t.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){t.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),t.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),
+null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+L");I.setToggleAction(!0);I.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));I=this.addAction("format",mxUtils.bind(this,function(){t.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+P");I.setToggleAction(!0);I.setSelectedCallback(mxUtils.bind(this,function(){return t.isFormatPanelVisible()}));I=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?
+(this.outlineWindow=new OutlineWindow(t,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){t.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){t.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),t.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+
+"+O");I.setToggleAction(!0);I.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var D=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=D&&null!=D.geometry){var P=new ConnectionPointsDialog(t,D);t.showDialog(P.container,350,450,!0,!1,function(){P.destroy()});P.init()}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+Q").isEnabled=B};
+Actions.prototype.addAction=function(b,f,m,t,y,q){var B=b;"..."==B.substring(B.length-3)&&(B=B.substring(0,B.length-3));return this.put(B,new Action(b,f,m,t,y,q))};Actions.prototype.put=function(b,f){return this.actions[b]=f};Actions.prototype.get=function(b){return this.actions[b]};function Action(b,f,m,t,y,q){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(f);this.enabled=null!=m?m:!0;this.iconCls=t;this.shortcut=y;this.visible=null!=q?q:!0}mxUtils.extend(Action,mxEventSource);
Action.prototype.getTitle=function(){var b=this.label;"..."==b.substring(b.length-3)?(b=b.substring(0,b.length-3),b=mxResources.get(b)+"..."):b=mxResources.get(b);return b};Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};Action.prototype.setToggleAction=function(b){this.toggleAction=b};
Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,f){mxEventSource.call(this);this.ui=b;this.setData(f||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;DrawioFile.RESTRICT_EXPORT=!1;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};
-DrawioFile.prototype.synchronizeFile=function(b,f){if(this.savingFile)null!=f&&f({message:mxResources.get("busy")});else{var l=!0,u=window.setTimeout(mxUtils.bind(this,function(){l=!1;null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,f)})})}),this.ui.timeout),y=mxUtils.bind(this,function(C){l&&(window.clearTimeout(u),null!=f&&f(C))}),q=mxUtils.bind(this,function(){return!l});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,
-function(C){l&&(window.clearTimeout(u),this.sync.cleanup(b,f,C))}),y,q):this.updateFile(mxUtils.bind(this,function(){l&&(window.clearTimeout(u),null!=b&&b())}),y,q)}};
-DrawioFile.prototype.updateFile=function(b,f,l,u,y){null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",y,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(q){try{null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[q]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=q?this.mergeFile(q,b,f,
-u,y):this.reloadFile(b,f))}catch(C){null!=f&&f(C)}}),f))};
-DrawioFile.prototype.mergeFile=function(b,f,l,u,y){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var C=this.getShadowPages(),J=[this.ui.diffPages(null!=u?u:C,q)],S=this.ignorePatches(J);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var D=this.isModified()?this.ui.diffPages(C,
-this.isRealtime()?this.ownPages:this.ui.pages):null,P=this.ui.patchPages(this.ui.clonePages(C),J[0]),c=this.ui.getHashValueForPages(P,{}),g=this.ui.getHashValueForPages(q,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",C,"pages",q,"patched",P,"patches",J,"changes",D,"checksum",c,"current",g,"valid",c==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",y);if(null!=c&&c!=g)this.checksumError(l,J,null,null,"mergeFile",
-c,g,b.getCurrentRevisionId());else{this.setShadowPages(q);if(null!=this.sync){var m=this.sync.patchRealtime(J,DrawioFile.LAST_WRITE_WINS?D:null,null,y);null==m||mxUtils.isEmptyObject(m)||J.push(m)}this.patch(J,DrawioFile.LAST_WRITE_WINS?D:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(F){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(F);try{var n=this.getCurrentUser(),x=null!=n?
-n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,F)}catch(H){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(F){null!=l&&l(F)}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),l=f.document.createElement("mxfile");if(null!=b)for(var u=0;u<b.length;u++){var y=f.encode(new mxGraphModel(b[u].root));"1"!=urlParams.dev&&(y=this.ui.anonymizeNode(y,!0));y.setAttribute("id",b[u].getId());b[u].viewState&&this.ui.editor.graph.saveViewState(b[u].viewState,y,!0);l.appendChild(y)}return mxUtils.getPrettyXml(l)};
-DrawioFile.prototype.compressReportData=function(b,f,l){f=null!=f?f:1E4;null!=l&&null!=b&&b.length>l?b=b.substring(0,l)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,f,l,u,y,q,C,J){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),D=null!=S?S.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(f).length,g=null;if(null!=f&&1E3>c){b=[];for(l=0;l<f.length;l++)b.push(this.ui.anonymizePatch(f[l]));g=JSON.stringify(b);g=null!=g&&1E3>
-g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(m){try{var n=null!=g?"report":"error",x=this.ui.getHashValueForPages(m.getShadowPages()),F="unknown",H="unknown",M="unknown";try{var L=null!=m.initialData&&0<m.initialData.length?mxUtils.parseXml(m.initialData).documentElement:null;null!=L&&(null!=L.getAttribute("version")&&(F=L.getAttribute("version")),null!=L.getAttribute("agent")&&(H=L.getAttribute("agent")),null!=L.getAttribute("type")&&(M=L.getAttribute("type")))}catch(K){}EditorUi.logError("Checksum "+
-n+" in "+y,null,this.getMode()+"."+P,"user_"+D+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=C?"-current_"+C:"")+(null!=J?"-rev_"+this.ui.hashValue(J):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(m.getCurrentRevisionId())+("-latestVersion_"+F)+("-latestAgent_"+H)+("-latestType_"+M));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+P,action:y,label:"user_"+
-D+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(m){}};
-DrawioFile.prototype.sendErrorReport=function(b,f,l,u){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),C=this.getCurrentUser(),J=null!=C?this.ui.hashValue(C.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",D=this.getTitle(),P=D.lastIndexOf(".");C="xml";0<P&&(C=D.substring(P));var c=null!=l?l.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+C+")\nUser="+J+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
-"")+(null!=l?"\n\nError: "+l.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+y+"\n\nData:\n"+q,u)}catch(g){}};
-DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var l=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),u=this.ui.editor.graph,y=u.getSelectionCells(),q=u.getViewState(),C=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(J){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[l],"viewState",[q],"latestFile",J);null!=J?(this.ui.replaceFileData(J.getData(),
-[l]),this.ui.restoreViewState(C,q,y),this.setDescriptor(J.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([l]),S.fileChanged());this.ui.restoreViewState(C,q,y);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(J){null!=f&&f(J)}};
-DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var l=0;l<b.length&&f;l++)f=f&&mxUtils.isEmptyObject(b[l]);return f};
-DrawioFile.prototype.patch=function(b,f,l,u){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),C=y.indexOfNextAdd,J=this.ui.editor.graph;J.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=l;var D=J.foldingEnabled,P=J.mathEnabled,c=J.cellRenderer.redraw;J.cellRenderer.redraw=function(H){H.view.graph.isEditing(H.cell)&&(H.view.graph.scrollCellToVisible(H.cell),H.view.graph.cellEditor.resize());c.apply(this,arguments)};J.model.beginUpdate();
-try{if(l){for(var g=this.ui.pages.slice(),m=this.ui.currentPage,n=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),x=0;x<n.length;x++){var F=mxUtils.indexOf(this.ui.pages,n[x]);0>F?this.ui.insertPage(n[x],Math.min(x,this.ui.pages.length)):this.ui.movePage(F,x)}for(x=0;x<g.length;x++)0>mxUtils.indexOf(n,g[x])&&this.ui.removePage(g[x]);0<=mxUtils.indexOf(this.ui.pages,m)&&this.ui.selectPage(m,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified());0==this.ui.pages.length&&
-this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);J.checkDefaultParent()}finally{J.container.style.visibility="";J.model.endUpdate();J.cellRenderer.redraw=c;this.changeListenerEnabled=S;l||(y.history=q,y.indexOfNextAdd=C,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=J.mathEnabled?(this.ui.editor.updateGraphComponents(),J.refresh()):(D!=J.foldingEnabled?
-J.view.revalidate():J.view.validate(),J.sizeDidChange());null!=this.sync&&this.isRealtime()&&!u&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",l)}return b};
-DrawioFile.prototype.save=function(b,f,l,u,y,q){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",u,"overwrite",y,"manual",q,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!y&&this.invalidChecksum)if(null!=l)l({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=l)l({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(C){if(null!=l)l(C);else throw C;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
+DrawioFile.prototype.synchronizeFile=function(b,f){if(this.savingFile)null!=f&&f({message:mxResources.get("busy")});else{var m=!0,t=window.setTimeout(mxUtils.bind(this,function(){m=!1;null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,f)})})}),this.ui.timeout),y=mxUtils.bind(this,function(B){m&&(window.clearTimeout(t),null!=f&&f(B))}),q=mxUtils.bind(this,function(){return!m});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,
+function(B){m&&(window.clearTimeout(t),this.sync.cleanup(b,f,B))}),y,q):this.updateFile(mxUtils.bind(this,function(){m&&(window.clearTimeout(t),null!=b&&b())}),y,q)}};
+DrawioFile.prototype.updateFile=function(b,f,m,t,y){null!=m&&m()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",y,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(q){try{null!=m&&m()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[q]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=q?this.mergeFile(q,b,f,
+t,y):this.reloadFile(b,f))}catch(B){null!=f&&f(B)}}),f))};
+DrawioFile.prototype.mergeFile=function(b,f,m,t,y){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var B=this.getShadowPages(),I=[this.ui.diffPages(null!=t?t:B,q)],S=this.ignorePatches(I);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var D=this.isModified()?this.ui.diffPages(B,
+this.isRealtime()?this.ownPages:this.ui.pages):null,P=this.ui.patchPages(this.ui.clonePages(B),I[0]),c=this.ui.getHashValueForPages(P,{}),g=this.ui.getHashValueForPages(q,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",B,"pages",q,"patched",P,"patches",I,"changes",D,"checksum",c,"current",g,"valid",c==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",y);if(null!=c&&c!=g)this.checksumError(m,I,null,null,"mergeFile",
+c,g,b.getCurrentRevisionId());else{this.setShadowPages(q);if(null!=this.sync){var l=this.sync.patchRealtime(I,DrawioFile.LAST_WRITE_WINS?D:null,null,y);null==l||mxUtils.isEmptyObject(l)||I.push(l)}this.patch(I,DrawioFile.LAST_WRITE_WINS?D:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(F){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=m&&m(F);try{var n=this.getCurrentUser(),x=null!=n?
+n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,F)}catch(G){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(F){null!=m&&m(F)}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),m=f.document.createElement("mxfile");if(null!=b)for(var t=0;t<b.length;t++){var y=f.encode(new mxGraphModel(b[t].root));"1"!=urlParams.dev&&(y=this.ui.anonymizeNode(y,!0));y.setAttribute("id",b[t].getId());b[t].viewState&&this.ui.editor.graph.saveViewState(b[t].viewState,y,!0);m.appendChild(y)}return mxUtils.getPrettyXml(m)};
+DrawioFile.prototype.compressReportData=function(b,f,m){f=null!=f?f:1E4;null!=m&&null!=b&&b.length>m?b=b.substring(0,m)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
+DrawioFile.prototype.checksumError=function(b,f,m,t,y,q,B,I){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),D=null!=S?S.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(f).length,g=null;if(null!=f&&1E3>c){b=[];for(m=0;m<f.length;m++)b.push(this.ui.anonymizePatch(f[m]));g=JSON.stringify(b);g=null!=g&&1E3>
+g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(l){try{var n=null!=g?"report":"error",x=this.ui.getHashValueForPages(l.getShadowPages()),F="unknown",G="unknown",L="unknown";try{var M=null!=l.initialData&&0<l.initialData.length?mxUtils.parseXml(l.initialData).documentElement:null;null!=M&&(null!=M.getAttribute("version")&&(F=M.getAttribute("version")),null!=M.getAttribute("agent")&&(G=M.getAttribute("agent")),null!=M.getAttribute("type")&&(L=M.getAttribute("type")))}catch(K){}EditorUi.logError("Checksum "+
+n+" in "+y,null,this.getMode()+"."+P,"user_"+D+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=B?"-current_"+B:"")+(null!=I?"-rev_"+this.ui.hashValue(I):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId())+("-latestVersion_"+F)+("-latestAgent_"+G)+("-latestType_"+L));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+P,action:y,label:"user_"+
+D+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(l){}};
+DrawioFile.prototype.sendErrorReport=function(b,f,m,t){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),I=null!=B?this.ui.hashValue(B.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",D=this.getTitle(),P=D.lastIndexOf(".");B="xml";0<P&&(B=D.substring(P));var c=null!=m?m.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+B+")\nUser="+I+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
+"")+(null!=m?"\n\nError: "+m.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+y+"\n\nData:\n"+q,t)}catch(g){}};
+DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var m=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),t=this.ui.editor.graph,y=t.getSelectionCells(),q=t.getViewState(),B=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(I){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[m],"viewState",[q],"latestFile",I);null!=I?(this.ui.replaceFileData(I.getData(),
+[m]),this.ui.restoreViewState(B,q,y),this.setDescriptor(I.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([m]),S.fileChanged());this.ui.restoreViewState(B,q,y);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(I){null!=f&&f(I)}};
+DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var m=0;m<b.length&&f;m++)f=f&&mxUtils.isEmptyObject(b[m]);return f};
+DrawioFile.prototype.patch=function(b,f,m,t){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),B=y.indexOfNextAdd,I=this.ui.editor.graph;I.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=m;var D=I.foldingEnabled,P=I.mathEnabled,c=I.cellRenderer.redraw;I.cellRenderer.redraw=function(G){G.view.graph.isEditing(G.cell)&&(G.view.graph.scrollCellToVisible(G.cell),G.view.graph.cellEditor.resize());c.apply(this,arguments)};I.model.beginUpdate();
+try{if(m){for(var g=this.ui.pages.slice(),l=this.ui.currentPage,n=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),x=0;x<n.length;x++){var F=mxUtils.indexOf(this.ui.pages,n[x]);0>F?this.ui.insertPage(n[x],Math.min(x,this.ui.pages.length)):this.ui.movePage(F,x)}for(x=0;x<g.length;x++)0>mxUtils.indexOf(n,g[x])&&this.ui.removePage(g[x]);0<=mxUtils.indexOf(this.ui.pages,l)&&this.ui.selectPage(l,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified());0==this.ui.pages.length&&
+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);I.checkDefaultParent()}finally{I.container.style.visibility="";I.model.endUpdate();I.cellRenderer.redraw=c;this.changeListenerEnabled=S;m||(y.history=q,y.indexOfNextAdd=B,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=I.mathEnabled?(this.ui.editor.updateGraphComponents(),I.refresh()):(D!=I.foldingEnabled?
+I.view.revalidate():I.view.validate(),I.sizeDidChange());null!=this.sync&&this.isRealtime()&&!t&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",m)}return b};
+DrawioFile.prototype.save=function(b,f,m,t,y,q){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",t,"overwrite",y,"manual",q,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!y&&this.invalidChecksum)if(null!=m)m({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=m)m({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(B){if(null!=m)m(B);else throw B;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return Editor.defaultCompressed};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};
-DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,f,l){};DrawioFile.prototype.saveFile=function(b,f,l,u){};DrawioFile.prototype.getFileUrl=function(){return null};
+DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,f,m){};DrawioFile.prototype.saveFile=function(b,f,m,t){};DrawioFile.prototype.getFileUrl=function(){return null};
DrawioFile.prototype.getFolderUrl=function(b){return null};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return DrawioFile.RESTRICT_EXPORT};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};
-DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,f,l){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,f,l){};
-DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var f=this.ui.editor.graph,l=f.getSelectionCells(),u=f.getViewState(),y=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(y,
-u,l);this.ui.actions.get("share").funct()}))}))}),null,mxResources.get("saveToGoogleDrive",null,"Save to Google Drive"),mxResources.get("cancel")):this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
-DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var f=0;null!=b&&f<b.length;f++){var l=b[f];null!=l.id&&0==l.id.indexOf("extFont_")&&l.parentNode.removeChild(l)}};
+DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,f,m){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,f,m){};
+DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var f=this.ui.editor.graph,m=f.getSelectionCells(),t=f.getViewState(),y=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(y,
+t,m);this.ui.actions.get("share").funct()}))}))}),null,mxResources.get("saveToGoogleDrive",null,"Save to Google Drive"),mxResources.get("cancel")):this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
+DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var f=0;null!=b&&f<b.length;f++){var m=b[f];null!=m.id&&0==m.id.indexOf("extFont_")&&m.parentNode.removeChild(m)}};
DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();null!=b&&(this.ui.setFileData(b),this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages)));this.installListeners();this.isSyncSupported()&&this.startSync();EditorUi.debug("DrawioFile.open",[this])};DrawioFile.prototype.isPolling=function(){return!1};DrawioFile.prototype.getPollingInterval=function(){return 1E4};DrawioFile.prototype.isSyncSupported=function(){return!1};
DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages&&null!=this.ui.pages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,f){b(null)};
-DrawioFile.prototype.loadDescriptor=function(b,f){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,f){this.loadDescriptor(mxUtils.bind(this,function(l){b(l)}),f)};DrawioFile.prototype.patchDescriptor=function(b,f){this.setDescriptorEtag(b,this.getDescriptorEtag(f));this.descriptorChanged()};
+DrawioFile.prototype.loadDescriptor=function(b,f){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,f){this.loadDescriptor(mxUtils.bind(this,function(m){b(m)}),f)};DrawioFile.prototype.patchDescriptor=function(b,f){this.setDescriptorEtag(b,this.getDescriptorEtag(f));this.descriptorChanged()};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};
DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,f){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,f){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};DrawioFile.prototype.getDescriptor=function(){return null};
@@ -3136,47 +3140,47 @@ this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener)
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
DrawioFile.prototype.addAllSavedStatus=function(b){if(null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this){b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));var f=this.isRevisionHistorySupported()&&b!=mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+f+'title="'+b+'">'+b+(this.isLocked()?' <img class="geToolbarButton" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+
Editor.lockedImage+'"/>':"")+"</div>")}};
-DrawioFile.prototype.saveDraft=function(b){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var f={type:"draft",created:this.created,modified:(new Date).getTime(),data:null!=b?b:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(f));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[f])}catch(l){this.removeDraft()}};
+DrawioFile.prototype.saveDraft=function(b){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var f={type:"draft",created:this.created,modified:(new Date).getTime(),data:null!=b?b:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(f));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[f])}catch(m){this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};
DrawioFile.prototype.addUnsavedStatus=function(b){this.inConflictState||null==this.ui.statusContainer||this.ui.getCurrentFile()!=this||(b instanceof Error&&null!=b.message&&""!=b.message?this.ui.updateStatus(mxUtils.bind(this,function(){var f=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+f+'" data-title="'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+'" data-message="'+mxUtils.htmlEntities(b.message)+'" class="geStatusAlert">'+f+" ("+mxUtils.htmlEntities(b.message)+
-")</div>")})):(this.ui.updateStatus(mxUtils.bind(this,function(){var f=this.getErrorMessage(b);if(null==f&&null!=this.lastSaved){var l=this.ui.timeSince(new Date(this.lastSaved));null!=l&&(f=mxResources.get("lastSaved",[l]))}null!=f&&60<f.length&&(f=f.substring(0,60)+"...");f=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=f&&""!=f?" ("+mxUtils.htmlEntities(f)+")":"");l='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"';this.ui.editor.setStatus("<div "+
-l+' title="'+f+'" class="geStatusAlert">'+f+"</div>")})),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=
+")</div>")})):(this.ui.updateStatus(mxUtils.bind(this,function(){var f=this.getErrorMessage(b);if(null==f&&null!=this.lastSaved){var m=this.ui.timeSince(new Date(this.lastSaved));null!=m&&(f=mxResources.get("lastSaved",[m]))}null!=f&&60<f.length&&(f=f.substring(0,60)+"...");f=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=f&&""!=f?" ("+mxUtils.htmlEntities(f)+")":"");m='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"';this.ui.editor.setStatus("<div "+
+m+' title="'+f+'" class="geStatusAlert">'+f+"</div>")})),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=
null;this.saveDraft()}),EditorUi.draftSaveDelay||0))))};DrawioFile.prototype.addConflictStatus=function(b,f){this.ui.updateStatus(mxUtils.bind(this,function(){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""),f)}));this.ui.spinner.stop();this.clearAutosave()};
DrawioFile.prototype.setConflictStatus=function(b,f){this.ui.editor.setStatus('<div title="'+b+'" '+(null!=f?'data-action="statusFunction"':"")+' class="geStatusAlert">'+b+'<img data-link="https://www.drawio.com/doc/faq/synchronize" src="'+Editor.helpImage+'" style="margin-left:2px;cursor:help;"/></div>',f)};
-DrawioFile.prototype.showRefreshDialog=function(b,f,l){null==l&&(l=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,f)})):(this.addConflictStatus(l,mxUtils.bind(this,function(){this.showRefreshDialog(b,f)})),this.ui.showError(mxResources.get("warning")+" ("+l+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(mxUtils.bind(this,
+DrawioFile.prototype.showRefreshDialog=function(b,f,m){null==m&&(m=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,f)})):(this.addConflictStatus(m,mxUtils.bind(this,function(){this.showRefreshDialog(b,f)})),this.ui.showError(mxResources.get("warning")+" ("+m+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(mxUtils.bind(this,
function(){null!=b&&b();this.ui.alert(mxResources.get("copyCreated"))}),f)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.reloadFile(mxUtils.bind(this,function(){this.ui.spinner.stop();null!=b&&b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=f&&f()}))}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
-DrawioFile.prototype.showCopyDialog=function(b,f,l){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,f)}),null,mxResources.get("overwrite"),l,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
+DrawioFile.prototype.showCopyDialog=function(b,f,m){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,f)}),null,mxResources.get("overwrite"),m,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
DrawioFile.prototype.showConflictDialog=function(b,f){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),f,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,f){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var l=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),u=mxResources.get("redirectToNewApp");null!=f&&(u+=" ("+f+")");f=mxUtils.bind(this,function(){var y=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==l?window.location.reload():window.location.href=
-l});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()});null!=b?this.isModified()?this.ui.confirm(u,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(u,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+DrawioFile.prototype.redirectToNewApp=function(b,f){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var m=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),t=mxResources.get("redirectToNewApp");null!=f&&(t+=" ("+f+")");f=mxUtils.bind(this,function(){var y=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==m?window.location.reload():window.location.href=
+m});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()});null!=b?this.isModified()?this.ui.confirm(t,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(t,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
f)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified(),"remoteFileChanged",null==this.sync?"n/a":this.sync.remoteFileChanged),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")")})):
this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus()})),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.clearStatus())};
-DrawioFile.prototype.handleFileError=function(b,f){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,f):(this.isModified()&&this.addUnsavedStatus(b),f?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||this.ui.updateStatus(mxUtils.bind(this,function(){var l=this.getErrorMessage(b);null!=l&&60<l.length&&(l=l.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+
-(null!=l?" ("+mxUtils.htmlEntities(l)+")":"")+"</div>")}))))};
-DrawioFile.prototype.handleConflictError=function(b,f){var l=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),u=mxUtils.bind(this,function(C){this.handleFileError(C,!0)}),y=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,l,u,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),q=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,l,u,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),u)});"none"==DrawioFile.SYNC?this.showCopyDialog(l,u,y):this.invalidChecksum&&f?this.showRefreshDialog(l,u,this.getErrorMessage(b)):f?this.showConflictDialog(y,q):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(l,u)}))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT?f=mxResources.get("timeout"):"0"==f&&(f=mxResources.get("noResponse"));return f};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
-DrawioFile.prototype.compressionChanged=function(b){var f=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=f)for(var l=0;l<f.length;l++){var u=f[l].node;if(null!=u&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=f[l].getId())){var y=u.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;var q=Graph.decompress(mxUtils.getNodeValue(u));b?0==q.length&&null!=y&&(EditorUi.removeChildNodes(u),mxUtils.setTextContent(u,Graph.compressNode(y)),EditorUi.debug("DrawioFile.compressionChanged",
-[this],"Page "+l+" compressed")):0<q.length&&null==y&&(EditorUi.removeChildNodes(u),u.appendChild(mxUtils.parseXml(q).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+l+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};
+DrawioFile.prototype.handleFileError=function(b,f){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,f):(this.isModified()&&this.addUnsavedStatus(b),f?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||this.ui.updateStatus(mxUtils.bind(this,function(){var m=this.getErrorMessage(b);null!=m&&60<m.length&&(m=m.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+
+(null!=m?" ("+mxUtils.htmlEntities(m)+")":"")+"</div>")}))))};
+DrawioFile.prototype.handleConflictError=function(b,f){var m=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),t=mxUtils.bind(this,function(B){this.handleFileError(B,!0)}),y=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,m,t,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),q=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,m,t,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),t)});"none"==DrawioFile.SYNC?this.showCopyDialog(m,t,y):this.invalidChecksum&&f?this.showRefreshDialog(m,t,this.getErrorMessage(b)):f?this.showConflictDialog(y,q):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(m,t)}))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT?f=mxResources.get("timeout"):"0"==f&&(f=mxResources.get("noResponse"));return f};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.compressionChanged=function(b){var f=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=f)for(var m=0;m<f.length;m++){var t=f[m].node;if(null!=t&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=f[m].getId())){var y=t.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;var q=Graph.decompress(mxUtils.getNodeValue(t));b?0==q.length&&null!=y&&(EditorUi.removeChildNodes(t),mxUtils.setTextContent(t,Graph.compressNode(y)),EditorUi.debug("DrawioFile.compressionChanged",
+[this],"Page "+m+" compressed")):0<q.length&&null==y&&(EditorUi.removeChildNodes(t),t.appendChild(mxUtils.parseXml(q).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+m+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};
DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosaveDelay",this.autosaveDelay,"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"...")})),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),
this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(f){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(f){this.handleFileError(f)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
-DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(f,mxUtils.bind(this,function(l){EditorUi.debug("DrawioFile.createSecret",[this],"secret",f,"token",l);b(f,l)}),mxUtils.bind(this,function(){b(f)})):b(f)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,f,l,u,y,q,C){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=l&&l()):this.sync.fileSaved(q,f,l,u,y,C)}catch(D){this.invalidChecksum=
-this.inConflictState=!0;this.descriptorChanged();null!=u&&u(D);try{var J=this.getCurrentUser(),S=null!=J?J.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,D)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(D){this.descriptorChanged(),null!=u&&u(D)}};
-DrawioFile.prototype.autosave=function(b,f,l,u){null==this.lastAutosave&&(this.lastAutosave=Date.now());var y=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var q=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==q&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var C=this.isAutosaveRevision();
-C&&(this.lastAutosaveRevision=(new Date).getTime());this.save(C,mxUtils.bind(this,function(J){this.autosaveCompleted();null!=l&&l(J)}),mxUtils.bind(this,function(J){null!=u&&u(J)}))}else this.isModified()||this.ui.clearStatus(),null!=l&&l(null)}catch(J){null!=u&&u(J)}}),y);this.autosaveThread=q;EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"delay",b,"maxDelay",f,"actualDelay",y,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
+DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(f,mxUtils.bind(this,function(m){EditorUi.debug("DrawioFile.createSecret",[this],"secret",f,"token",m);b(f,m)}),mxUtils.bind(this,function(){b(f)})):b(f)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
+DrawioFile.prototype.fileSaved=function(b,f,m,t,y,q,B){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=m&&m()):this.sync.fileSaved(q,f,m,t,y,B)}catch(D){this.invalidChecksum=
+this.inConflictState=!0;this.descriptorChanged();null!=t&&t(D);try{var I=this.getCurrentUser(),S=null!=I?I.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,D)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(D){this.descriptorChanged(),null!=t&&t(D)}};
+DrawioFile.prototype.autosave=function(b,f,m,t){null==this.lastAutosave&&(this.lastAutosave=Date.now());var y=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var q=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==q&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var B=this.isAutosaveRevision();
+B&&(this.lastAutosaveRevision=(new Date).getTime());this.save(B,mxUtils.bind(this,function(I){this.autosaveCompleted();null!=m&&m(I)}),mxUtils.bind(this,function(I){null!=t&&t(I)}))}else this.isModified()||this.ui.clearStatus(),null!=m&&m(null)}catch(I){null!=t&&t(I)}}),y);this.autosaveThread=q;EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"delay",b,"maxDelay",f,"actualDelay",y,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
-DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(f){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,f){if(null!=b&&null!=f){var l=b.lastIndexOf(".");b=0<l?b.substring(l):"";l=f.lastIndexOf(".");return b===(0<l?f.substring(l):"")}return b==f};
+DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(f){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,f){if(null!=b&&null!=f){var m=b.lastIndexOf(".");b=0<m?b.substring(m):"";m=f.lastIndexOf(".");return b===(0<m?f.substring(m):"")}return b==f};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,l){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,l,u,y,q,C){DrawioFile.call(this,b,f);this.title=l;this.mode=u?null:App.MODE_DEVICE;this.fileHandle=y;this.desc=q;this.editable=C};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
-LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,f,l,u,y){this.saveAs(this.title,f,l,u,y)};LocalFile.prototype.saveAs=function(b,f,l,u,y){this.saveFile(b,!1,f,l,null,u,y)};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,m){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,m,t,y,q,B){DrawioFile.call(this,b,f);this.title=m;this.mode=t?null:App.MODE_DEVICE;this.fileHandle=y;this.desc=q;this.editable=B};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
+LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,f,m,t,y){this.saveAs(this.title,f,m,t,y)};LocalFile.prototype.saveAs=function(b,f,m,t,y){this.saveFile(b,!1,f,m,null,t,y)};
LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?null!=f&&f({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};
-LocalFile.prototype.saveFile=function(b,f,l,u,y,q,C){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var J=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),D=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),P=mxUtils.bind(this,function(c){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!=u&&u({error:n})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);C||this.desc.lastModified==x.lastModified?n.write(J?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(F){try{var H=this.desc;this.savingFile=!1;this.desc=F;this.fileSaved(S,H,D,g);this.removeDraft()}catch(M){g(M)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;g(x)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,J?"image/png":"text/xml",J);else if(c.length<MAX_REQUEST_SIZE){var m=b.lastIndexOf(".");m=0<m?b.substring(m+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+m+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(J?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));D()}});J?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){P(c)}),u,this.ui.getCurrentFile()!=this?S:null,f.scale,f.border)):P(S)};
-LocalFile.prototype.rename=function(b,f,l){this.title=b;this.descriptorChanged();null!=f&&f()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);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)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
+LocalFile.prototype.saveFile=function(b,f,m,t,y,q,B){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var I=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),D=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=m&&m()}),P=mxUtils.bind(this,function(c){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!=t&&t({error:n})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);B||this.desc.lastModified==x.lastModified?n.write(I?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(F){try{var G=this.desc;this.savingFile=!1;this.desc=F;this.fileSaved(S,G,D,g);this.removeDraft()}catch(L){g(L)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;g(x)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,I?"image/png":"text/xml",I);else if(c.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf(".");l=0<l?b.substring(l+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(I?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));D()}});I?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){P(c)}),t,this.ui.getCurrentFile()!=this?S:null,f.scale,f.border)):P(S)};
+LocalFile.prototype.rename=function(b,f,m){this.title=b;this.descriptorChanged();null!=f&&f()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);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)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";
Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";
Editor.thinShapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI5Ljc1IDI5Ljc1Wm0tMTMgNS40NXEuNC4wNS43NS4wNUgxOS4wNXY0LjY1cTAgLjI1LjE3NS40MjV0LjQyNS4xNzVIMzkuOXEuMjUgMCAuNDI1LS4xNzV0LjE3NS0uNDI1VjE5LjY1cTAtLjI1LS4xNzUtLjQyNXQtLjQyNS0uMTc1aC00LjY1VjE3LjVxMC0uMzUtLjA1LS43NWg0LjdxMS4xNSAwIDIgLjg3NS44NS44NzUuODUgMi4wMjVWMzkuOXEwIDEuMTUtLjg1IDItLjg1Ljg1LTIgLjg1SDE5LjY1cS0xLjE1IDAtMi4wMjUtLjg1dC0uODc1LTJabTEuNS0zLjk1cS01LjQ1IDAtOS4yMjUtMy44LTMuNzc1LTMuOC0zLjc3NS05LjIgMC01LjQ1IDMuNzc1LTkuMjI1UTEyLjggNS4yNSAxOC4yNSA1LjI1cTUuNCAwIDkuMiAzLjc3NSAzLjggMy43NzUgMy44IDkuMjI1IDAgNS40LTMuOCA5LjItMy44IDMuOC05LjIgMy44Wm0tLjA1LTIuM3E0LjQ1IDAgNy42LTMuMTI1IDMuMTUtMy4xMjUgMy4xNS03LjU3NXQtMy4xMjUtNy42UTIyLjcgNy41IDE4LjI1IDcuNXQtNy42IDMuMTI1UTcuNSAxMy43NSA3LjUgMTguMnQzLjEyNSA3LjZxMy4xMjUgMy4xNSA3LjU3NSAzLjE1Wm0uMDUtMTAuN1oiLz48L3N2Zz4=";
@@ -3218,1075 +3222,1082 @@ Editor.chevronLeftImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3d
Editor.rightPanelOpenImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDYwLTMyMHYtMzIwTDMwMC00ODBsMTYwIDE2MFpNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoNTYwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2NTYwcTAgMzMtMjMuNSA1Ni41VDc2MC0xMjBIMjAwWm00NDAtODBoMTIwdi01NjBINjQwdjU2MFptLTgwIDB2LTU2MEgyMDB2NTYwaDM2MFptODAgMGgxMjAtMTIwWiIvPjwvc3ZnPg==";
Editor.rightPanelCloseImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzAwLTY0MHYzMjBsMTYwLTE2MC0xNjAtMTYwWk0yMDAtMTIwcS0zMyAwLTU2LjUtMjMuNVQxMjAtMjAwdi01NjBxMC0zMyAyMy41LTU2LjVUMjAwLTg0MGg1NjBxMzMgMCA1Ni41IDIzLjVUODQwLTc2MHY1NjBxMCAzMy0yMy41IDU2LjVUNzYwLTEyMEgyMDBabTQ0MC04MGgxMjB2LTU2MEg2NDB2NTYwWm0tODAgMHYtNTYwSDIwMHY1NjBoMzYwWm04MCAwaDEyMC0xMjBaIi8+PC9zdmc+";
Editor.spinImage="data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==";
+Editor.svgSpinImage="data:image/svg+xml;base64,77u/PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyMDAgMjAwJz4KICAgIDxyYWRpYWxHcmFkaWVudCBpZD0nYTUnIGN4PScuNjYnIGZ4PScuNjYnIGN5PScuMzEyNScgZnk9Jy4zMTI1JyBncmFkaWVudFRyYW5zZm9ybT0nc2NhbGUoMS41KSc+CiAgICAgICAgPHN0b3Agb2Zmc2V0PScwJyBzdG9wLWNvbG9yPScjNjc2NzY3Jz48L3N0b3A+CiAgICAgICAgPHN0b3Agb2Zmc2V0PScuMycgc3RvcC1jb2xvcj0nIzY3Njc2Nycgc3RvcC1vcGFjaXR5PScuOSc+PC9zdG9wPgogICAgICAgIDxzdG9wIG9mZnNldD0nLjYnIHN0b3AtY29sb3I9JyM2NzY3NjcnIHN0b3Atb3BhY2l0eT0nLjYnPjwvc3RvcD4KICAgICAgICA8c3RvcCBvZmZzZXQ9Jy44JyBzdG9wLWNvbG9yPScjNjc2NzY3JyBzdG9wLW9wYWNpdHk9Jy4zJz48L3N0b3A+CiAgICAgICAgPHN0b3Agb2Zmc2V0PScxJyBzdG9wLWNvbG9yPScjNjc2NzY3JyBzdG9wLW9wYWNpdHk9JzAnPjwvc3RvcD4KICAgIDwvcmFkaWFsR3JhZGllbnQ+CiAgICA8Y2lyY2xlIHRyYW5zZm9ybS1vcmlnaW49J2NlbnRlcicgZmlsbD0nbm9uZScgc3Ryb2tlPSd1cmwoI2E1KScgc3Ryb2tlLXdpZHRoPSc1MCcgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJyBzdHJva2UtZGFzaGFycmF5PScyMDAgMTAwMCcgc3Ryb2tlLWRhc2hvZmZzZXQ9JzAnIGN4PScxMDAnIGN5PScxMDAnIHI9JzcwJz4KICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybSB0eXBlPSdyb3RhdGUnIGF0dHJpYnV0ZU5hbWU9J3RyYW5zZm9ybScgY2FsY01vZGU9J3NwbGluZScgZHVyPScyJyB2YWx1ZXM9JzM2MDswJyBrZXlUaW1lcz0nMDsxJyBrZXlTcGxpbmVzPScwIDAgMSAxJyByZXBlYXRDb3VudD0naW5kZWZpbml0ZSc+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+CiAgICA8Y2lyY2xlIHRyYW5zZm9ybS1vcmlnaW49J2NlbnRlcicgZmlsbD0nbm9uZScgb3BhY2l0eT0nLjInIHN0cm9rZT0nIzY3Njc2Nycgc3Ryb2tlLXdpZHRoPSc1MCcgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJyBjeD0nMTAwJyBjeT0nMTAwJyByPSc3MCc+PC9jaXJjbGU+Cjwvc3ZnPg==";
Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=";
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.enableUncompressedLibraries=!1;Editor.enableCustomProperties=!0;
Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||"1"==urlParams.enableSW||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(k){Editor.enableServiceWorker=!1}Editor.enableWebFonts=
-"1"!=urlParams["safe-style-src"]&&!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.pasteAtMousePointer=!0;Editor.defaultTextStyle="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;";
-Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.gptModel=null!=urlParams["gpt-model"]?decodeURIComponent(urlParams["gpt-model"]):"gpt-3.5-turbo";Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):
-"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.createInheritProperty=function(k,v){return{name:v,dispName:k,type:"bool",defVal:!1,isVisible:function(I,N){return 1==I.vertices.length?(N=N.editorUi.editor.graph.model,I=N.getParent(I.vertices[0]),N.isEdge(I)||N.isVertex(I)):!1},getValue:function(I,N){return"inherit"==
-mxUtils.getValue(I.style,v)},valueChanged:function(I,N,T,W){N=W.editorUi.editor.graph;"1"==I?N.setCellStyles(v,"inherit",T.vertices):N.setCellStyles(v,null,T.vertices)}}};Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(k){k.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(k,
-v){return"1"!=mxUtils.getValue(k.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"comic","0")||"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,
-isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",
-dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch",
-"1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(k,
-v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(k,v){return"1"==
-mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",
-type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,
-"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",
-type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},{val:"round",dispName:"Round"}]},{name:"miterlimit",dispName:"Miter Limit",type:"int",min:1,defVal:4,isVisible:function(k,v){k=mxUtils.getValue(k.style,"linejoin","miter");return"miter"==k||"miter-clip"==k}}];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(k){return"orthogonalEdgeStyle"==mxUtils.getValue(k.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,isVisible:function(k){return"entityRelationEdgeStyle"==mxUtils.getValue(k.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:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",type:"color",defVal:null},{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:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"flowAnimation",null)}},{name:"flowAnimationTimingFunction",dispName:"Flow Timing",type:"enum",defVal:"linear",enumList:[{val:"linear",dispName:"Linear"},{val:"ease",dispName:"Ease"},{val:"ease-in",dispName:"Ease-in"},
-{val:"ease-out",dispName:"Ease-out"},{val:"ease-in-out",dispName:"Ease-in-out"}],isVisible:function(k){return"1"==mxUtils.getValue(k.style,"flowAnimation",null)}},{name:"flowAnimationDirection",dispName:"Flow Direction",type:"enum",defVal:"normal",enumList:[{val:"normal",dispName:"Normal"},{val:"reverse",dispName:"Reverse"},{val:"alternate",dispName:"Alternate"},{val:"alternate-reverse",dispName:"Alternate-Reverse"}],isVisible:function(k){return"1"==mxUtils.getValue(k.style,"flowAnimation",null)}},
-{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:"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(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTableCell(k.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,
-defVal:1,isVisible:function(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTableCell(k.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(k,v){k=v.editorUi.editor.graph.getCellStyle(1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null);return"1"==mxUtils.getValue(k,"resizeLastRow","0")},isVisible:function(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTable(k.vertices[0])}},
-{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(k,v){k=v.editorUi.editor.graph.getCellStyle(1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null);return"1"==mxUtils.getValue(k,"resizeLast","0")},isVisible:function(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTable(k.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(k,v){return v.editorUi.editor.graph.isCellConnectable(0<
-k.vertices.length&&0==k.edges.length?k.vertices[0]:null)},isVisible:function(k,v){return 0<k.vertices.length&&0==k.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",getDefaultValue:function(k,v){k=0<k.vertices.length&&0==k.edges.length?k.vertices[0]:null;v=v.editorUi.editor.graph;return null!=k&&v.isSwimlane(k)},isVisible:function(k,v){return 0<k.vertices.length&&0==k.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(k,v){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;v=v.editorUi.editor.graph;return null!=k&&(v.isSwimlane(k)||0<
-v.model.getChildCount(k))},isVisible:function(k,v){return 1==k.vertices.length&&0==k.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(k,v){var I=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;v=v.editorUi.editor.graph;return null!=I&&(v.isContainer(I)&&"0"!=k.style.collapsible||!v.isContainer(I)&&"1"==k.style.collapsible)},isVisible:function(k,v){return 1==k.vertices.length&&0==k.edges.length}},{name:"recursiveResize",dispName:"Resize Children",
-type:"bool",defVal:!0,isVisible:function(k,v){return 1==k.vertices.length&&0==k.edges.length&&!v.editorUi.editor.graph.isSwimlane(k.vertices[0])&&null==mxUtils.getValue(k.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(k,v){v=v.editorUi.editor.graph.model;return 0<k.vertices.length?v.isVertex(v.getParent(k.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(k,v){k=0<k.vertices.length?v.editorUi.editor.graph.getCellGeometry(k.vertices[0]):null;return null!=k&&!k.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",
-defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(k,v){return 0<k.vertices.length&&v.editorUi.editor.graph.isAutoSizeCell(k.vertices[0])}},{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(k,v){var I=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||v.editorUi.editor.graph.isSwimlane(k.vertices[0])||
-null==I||I==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(k,v){return 0<k.vertices.length&&v.editorUi.editor.graph.isContainer(k.vertices[0])}},Editor.createInheritProperty("Inherit Font Family",mxConstants.STYLE_FONTFAMILY),Editor.createInheritProperty("Inherit Font Size",mxConstants.STYLE_FONTSIZE),
-Editor.createInheritProperty("Inherit Font Color",mxConstants.STYLE_FONTCOLOR),Editor.createInheritProperty("Inherit Fill Color",mxConstants.STYLE_FILLCOLOR),Editor.createInheritProperty("Inherit Stroke Color",mxConstants.STYLE_STROKECOLOR)].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## An optional data object can be specified to define the metadata for the connector.\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, width 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,,[email protected],default,#6c8ebf,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.canvasSupported=!1;(function(){try{var k=document.createElement("canvas");Editor.canvasSupported=!(!k.getContext||!k.getContext("2d"))}catch(v){}})();Editor.useCanvasForExport=!1;(function(){try{var k=document.createElement("canvas"),v=new Image;v.onload=function(){try{k.getContext("2d").drawImage(v,0,0);var I=k.toDataURL("image/png");Editor.useCanvasForExport=null!=I&&6<I.length}catch(N){}};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(I){}})();
-Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var k=document.createElement("canvas");k.width=k.height=1;var v=k.toDataURL("image/jpeg");Editor.jpgSupported=null!==v.match("image/jpeg");v=k.toDataURL("image/webp");Editor.webpSupported=null!==v.match("image/webp")}catch(I){}})();Editor.loadCompatibleCss=function(k){mxUtils.lightDarkColorSupported||mxUtils.get(k||"styles/grapheditor.css",mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){var I=document.createElement("style");
-I.type="text/css";var N=I.appendChild,T=document,W=T.createTextNode;v=v.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(v=v.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(U){}N.call(I,W.call(T,v));document.head.appendChild(I)}}))};Editor.createRoughCanvas=function(k){var v=
-rough.canvas({getContext:function(){return k}});v.draw=function(I){var N=I.sets||[];I=I.options||this.getDefaultOptions();for(var T=0;T<N.length;T++){var W=N[T];switch(W.type){case "path":null!=I.stroke&&this._drawToContext(k,W,I);break;case "fillPath":this._drawToContext(k,W,I);break;case "fillSketch":this.fillSketch(k,W,I)}}};v.fillSketch=function(I,N,T){var W=k.state.strokeColor,U=k.state.strokeWidth,Y=k.state.strokeAlpha,fa=k.state.dashed,na=T.fillWeight;0>na&&(na=T.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);
-k.setStrokeColor(T.fill||"");k.setStrokeWidth(na);k.setDashed(!1);this._drawToContext(I,N,T);k.setDashed(fa);k.setStrokeWidth(U);k.setStrokeColor(W);k.setStrokeAlpha(Y)};v._drawToContext=function(I,N,T){I.begin();for(var W=0;W<N.ops.length;W++){var U=N.ops[W],Y=U.data;switch(U.op){case "move":I.moveTo(Y[0],Y[1]);break;case "bcurveTo":I.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":I.lineTo(Y[0],Y[1])}}I.end();"fillPath"===N.type&&T.filled?I.fill():I.stroke()};return v};(function(){function k(W,
+!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.pasteAtMousePointer=!0;Editor.defaultTextStyle="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;";
+Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.geminiApiKey=null!=urlParams["gemini-api-key"]?decodeURIComponent(urlParams["gemini-api-key"]):null;Editor.gptModels={"GPT-5.1":"gpt-5.1-2025-11-13","GPT-4.1":"gpt-4.1-2025-04-14",
+"GPT-4o":"chatgpt-4o-latest","GPT-3.5":"gpt-3.5-turbo-0125","Gemini 3 Pro Preview":"gemini-3-pro-preview","Gemini 2.5 Pro":"gemini-2.5-pro","Gemini 2.5 Flash":"gemini-2.5-flash","Gemini 2.0 Flash":"gemini-2.0-flash"};Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=
+null;Editor.createInheritProperty=function(k,v){return{name:v,dispName:k,type:"bool",defVal:!1,isVisible:function(J,N){return 1==J.vertices.length?(N=N.editorUi.editor.graph.model,J=N.getParent(J.vertices[0]),N.isEdge(J)||N.isVertex(J)):!1},getValue:function(J,N){return"inherit"==mxUtils.getValue(J.style,v)},valueChanged:function(J,N,T,W){N=W.editorUi.editor.graph;"1"==J?N.setCellStyles(v,"inherit",T.vertices):N.setCellStyles(v,null,T.vertices)}}};Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",
+type:"bool",defVal:!1,onChange:function(k){k.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(k,v){return"1"!=mxUtils.getValue(k.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"comic","0")||"1"==mxUtils.getValue(k.style,
+"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(k,v){return"1"==
+mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",
+type:"bool",defVal:!1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},
+{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],
+isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*
+mxConstants.SHADOW_OPACITY},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,
+dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,
+mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},{val:"round",dispName:"Round"}]},{name:"miterlimit",dispName:"Miter Limit",type:"int",min:1,defVal:4,
+isVisible:function(k,v){k=mxUtils.getValue(k.style,"linejoin","miter");return"miter"==k||"miter-clip"==k}}];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(k){return"orthogonalEdgeStyle"==mxUtils.getValue(k.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,isVisible:function(k){return"entityRelationEdgeStyle"==
+mxUtils.getValue(k.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:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",type:"color",defVal:null},{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:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"flowAnimation",null)}},{name:"flowAnimationTimingFunction",
+dispName:"Flow Timing",type:"enum",defVal:"linear",enumList:[{val:"linear",dispName:"Linear"},{val:"ease",dispName:"Ease"},{val:"ease-in",dispName:"Ease-in"},{val:"ease-out",dispName:"Ease-out"},{val:"ease-in-out",dispName:"Ease-in-out"}],isVisible:function(k){return"1"==mxUtils.getValue(k.style,"flowAnimation",null)}},{name:"flowAnimationDirection",dispName:"Flow Direction",type:"enum",defVal:"normal",enumList:[{val:"normal",dispName:"Normal"},{val:"reverse",dispName:"Reverse"},{val:"alternate",
+dispName:"Alternate"},{val:"alternate-reverse",dispName:"Alternate-Reverse"}],isVisible:function(k){return"1"==mxUtils.getValue(k.style,"flowAnimation",null)}},{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:"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(k,v){v=v.editorUi.editor.graph;
+return 1==k.vertices.length&&0==k.edges.length&&v.isTableCell(k.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTableCell(k.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(k,v){k=v.editorUi.editor.graph.getCellStyle(1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null);return"1"==mxUtils.getValue(k,
+"resizeLastRow","0")},isVisible:function(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTable(k.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(k,v){k=v.editorUi.editor.graph.getCellStyle(1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null);return"1"==mxUtils.getValue(k,"resizeLast","0")},isVisible:function(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTable(k.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(k,v){return v.editorUi.editor.graph.isCellConnectable(0<k.vertices.length&&0==k.edges.length?k.vertices[0]:null)},isVisible:function(k,v){return 0<k.vertices.length&&0==k.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",getDefaultValue:function(k,v){k=0<k.vertices.length&&0==k.edges.length?k.vertices[0]:null;v=v.editorUi.editor.graph;return null!=k&&v.isSwimlane(k)},isVisible:function(k,v){return 0<k.vertices.length&&0==k.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(k,
+v){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;v=v.editorUi.editor.graph;return null!=k&&(v.isSwimlane(k)||0<v.model.getChildCount(k))},isVisible:function(k,v){return 1==k.vertices.length&&0==k.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(k,v){var J=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;v=v.editorUi.editor.graph;return null!=J&&(v.isContainer(J)&&"0"!=k.style.collapsible||!v.isContainer(J)&&"1"==k.style.collapsible)},
+isVisible:function(k,v){return 1==k.vertices.length&&0==k.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(k,v){return 1==k.vertices.length&&0==k.edges.length&&!v.editorUi.editor.graph.isSwimlane(k.vertices[0])&&null==mxUtils.getValue(k.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(k,v){v=v.editorUi.editor.graph.model;return 0<k.vertices.length?
+v.isVertex(v.getParent(k.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(k,v){k=0<k.vertices.length?v.editorUi.editor.graph.getCellGeometry(k.vertices[0]):null;return null!=k&&!k.relative}},
+{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(k,v){return 0<k.vertices.length&&v.editorUi.editor.graph.isAutoSizeCell(k.vertices[0])}},{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(k,
+v){var J=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||v.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==J||J==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(k,v){return 0<k.vertices.length&&v.editorUi.editor.graph.isContainer(k.vertices[0])}},
+Editor.createInheritProperty("Inherit Font Family",mxConstants.STYLE_FONTFAMILY),Editor.createInheritProperty("Inherit Font Size",mxConstants.STYLE_FONTSIZE),Editor.createInheritProperty("Inherit Font Color",mxConstants.STYLE_FONTCOLOR),Editor.createInheritProperty("Inherit Fill Color",mxConstants.STYLE_FILLCOLOR),Editor.createInheritProperty("Inherit Stroke Color",mxConstants.STYLE_STROKECOLOR)].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## An optional data object can be specified to define the metadata for the connector.\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, width 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,,[email protected],default,#6c8ebf,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.canvasSupported=!1;(function(){try{var k=document.createElement("canvas");Editor.canvasSupported=!(!k.getContext||!k.getContext("2d"))}catch(v){}})();Editor.useCanvasForExport=!1;(function(){try{var k=document.createElement("canvas"),v=new Image;v.onload=function(){try{k.getContext("2d").drawImage(v,0,0);var J=k.toDataURL("image/png");Editor.useCanvasForExport=null!=J&&6<J.length}catch(N){}};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(J){}})();
+Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var k=document.createElement("canvas");k.width=k.height=1;var v=k.toDataURL("image/jpeg");Editor.jpgSupported=null!==v.match("image/jpeg");v=k.toDataURL("image/webp");Editor.webpSupported=null!==v.match("image/webp")}catch(J){}})();Editor.loadCompatibleCss=function(k){mxUtils.lightDarkColorSupported||mxUtils.get(k||"styles/grapheditor.css",mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){var J=document.createElement("style");
+J.type="text/css";var N=J.appendChild,T=document,W=T.createTextNode;v=v.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(v=v.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(U){}N.call(J,W.call(T,v));document.head.appendChild(J)}}))};Editor.createRoughCanvas=function(k){var v=
+rough.canvas({getContext:function(){return k}});v.draw=function(J){var N=J.sets||[];J=J.options||this.getDefaultOptions();for(var T=0;T<N.length;T++){var W=N[T];switch(W.type){case "path":null!=J.stroke&&this._drawToContext(k,W,J);break;case "fillPath":this._drawToContext(k,W,J);break;case "fillSketch":this.fillSketch(k,W,J)}}};v.fillSketch=function(J,N,T){var W=k.state.strokeColor,U=k.state.strokeWidth,Y=k.state.strokeAlpha,fa=k.state.dashed,oa=T.fillWeight;0>oa&&(oa=T.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);
+k.setStrokeColor(T.fill||"");k.setStrokeWidth(oa);k.setDashed(!1);this._drawToContext(J,N,T);k.setDashed(fa);k.setStrokeWidth(U);k.setStrokeColor(W);k.setStrokeAlpha(Y)};v._drawToContext=function(J,N,T){J.begin();for(var W=0;W<N.ops.length;W++){var U=N.ops[W],Y=U.data;switch(U.op){case "move":J.moveTo(Y[0],Y[1]);break;case "bcurveTo":J.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":J.lineTo(Y[0],Y[1])}}J.end();"fillPath"===N.type&&T.filled?J.fill():J.stroke()};return v};(function(){function k(W,
U,Y){this.canvas=W;this.rc=U;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;
this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=
mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp=
-"L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(W,U){var Y=1;if(null!=this.shape.state){var fa=this.shape.state.cell.id;if(null!=fa)for(var na=0;na<fa.length;na++)Y=(Y<<5)-Y+fa.charCodeAt(na)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};fa=this.rc.getDefaultOptions();Y.stroke=W?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;W=null;(Y.filled=U)?(Y.fill=
+"L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(W,U){var Y=1;if(null!=this.shape.state){var fa=this.shape.state.cell.id;if(null!=fa)for(var oa=0;oa<fa.length;oa++)Y=(Y<<5)-Y+fa.charCodeAt(oa)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};fa=this.rc.getDefaultOptions();Y.stroke=W?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;W=null;(Y.filled=U)?(Y.fill=
this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,W=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Y.fill="";Y.bowing=mxUtils.getValue(this.shape.style,"bowing",fa.bowing);Y.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",fa.hachureAngle);Y.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",fa.curveFitting);Y.roughness=mxUtils.getValue(this.shape.style,"jiggle",fa.roughness);Y.simplification=mxUtils.getValue(this.shape.style,
"simplification",fa.simplification);Y.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",fa.disableMultiStroke);Y.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",fa.disableMultiStrokeFill);U=mxUtils.getValue(this.shape.style,"hachureGap",-1);Y.hachureGap="auto"==U?-1:U;Y.dashGap=mxUtils.getValue(this.shape.style,"dashGap",U);Y.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",U);Y.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",
U);U=mxUtils.getValue(this.shape.style,"fillWeight",-1);Y.fillWeight="auto"==U?-1:U;U=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==U&&(U="auto");"auto"==U&&(U=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&U.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&U.push(mxUtils.hex2rgb(Editor.darkColor)),U=null!=Y.fill&&(null!=W||0<=mxUtils.indexOf(U,mxUtils.hex2rgb(Y.fill)))?"solid":fa.fillStyle);Y.fillStyle=U;return Y};k.prototype.begin=
function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var W=2;W<arguments.length;W+=2)this.lastX=arguments[W-1],this.lastY=arguments[W],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(W,U){this.passThrough?
this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,W,U),this.lastX=W,this.lastY=U)};k.prototype.moveTo=function(W,U){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,W,U),this.lastX=W,this.lastY=U,this.firstX=W,this.firstY=U)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(W,U,Y,fa){this.passThrough?this.originalQuadTo.apply(this.canvas,
-arguments):(this.addOp(this.quadOp,W,U,Y,fa),this.lastX=Y,this.lastY=fa)};k.prototype.curveTo=function(W,U,Y,fa,na,la){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,W,U,Y,fa,na,la),this.lastX=na,this.lastY=la)};k.prototype.arcTo=function(W,U,Y,fa,na,la,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ya=mxUtils.arcToCurves(this.lastX,this.lastY,W,U,Y,fa,na,la,qa);if(null!=ya)for(var wa=0;wa<ya.length;wa+=6)this.curveTo(ya[wa],
+arguments):(this.addOp(this.quadOp,W,U,Y,fa),this.lastX=Y,this.lastY=fa)};k.prototype.curveTo=function(W,U,Y,fa,oa,la){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,W,U,Y,fa,oa,la),this.lastX=oa,this.lastY=la)};k.prototype.arcTo=function(W,U,Y,fa,oa,la,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ya=mxUtils.arcToCurves(this.lastX,this.lastY,W,U,Y,fa,oa,la,qa);if(null!=ya)for(var wa=0;wa<ya.length;wa+=6)this.curveTo(ya[wa],
ya[wa+1],ya[wa+2],ya[wa+3],ya[wa+4],ya[wa+5]);this.lastX=la;this.lastY=qa}};k.prototype.rect=function(W,U,Y,fa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(W,U,Y,fa,this.getStyle(!0,!0)))};k.prototype.ellipse=function(W,U,Y,fa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(W+Y/2,U+fa/2,Y,fa,this.getStyle(!0,!0)))};k.prototype.roundrect=function(W,
-U,Y,fa,na,la){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(W+na,U),this.lineTo(W+Y-na,U),this.quadTo(W+Y,U,W+Y,U+la),this.lineTo(W+Y,U+fa-la),this.quadTo(W+Y,U+fa,W+Y-na,U+fa),this.lineTo(W+na,U+fa),this.quadTo(W,U+fa,W,U+fa-la),this.lineTo(W,U+la),this.quadTo(W,U,W+na,U))};k.prototype.drawPath=function(W){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),W)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var U in W)this.nextShape.options[U]=
+U,Y,fa,oa,la){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(W+oa,U),this.lineTo(W+Y-oa,U),this.quadTo(W+Y,U,W+Y,U+la),this.lineTo(W+Y,U+fa-la),this.quadTo(W+Y,U+fa,W+Y-oa,U+fa),this.lineTo(W+oa,U+fa),this.quadTo(W,U+fa,W,U+fa-la),this.lineTo(W,U+la),this.quadTo(W,U,W+oa,U))};k.prototype.drawPath=function(W){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),W)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var U in W)this.nextShape.options[U]=
W[U];W.stroke!=mxConstants.NONE&&null!=W.stroke||delete this.nextShape.options.stroke;W.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?
this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.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(W){return new k(W,Editor.createRoughCanvas(W),this)};var v=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(W){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?v.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
-"sketchStyle","rough")?this.createComicCanvas(W):this.createRoughCanvas(W)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(W,U,Y,fa,na){null!=W.handJiggle&&W.handJiggle.passThrough||I.apply(this,arguments)};var N=mxShape.prototype.paint;mxShape.prototype.paint=function(W){var U=W.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=W.handJiggle&&W.handJiggle.constructor==k&&!this.outline){W.save();
-var fa=this.fill,na=this.stroke;this.stroke=this.fill=null;var la=this.configurePointerEvents,qa=W.setStrokeColor;W.setStrokeColor=function(){};var ya=W.setFillColor;W.setFillColor=function(){};Y||null==fa||(this.configurePointerEvents=function(){});W.handJiggle.passThrough=!0;N.apply(this,arguments);W.handJiggle.passThrough=!1;W.setFillColor=ya;W.setStrokeColor=qa;this.configurePointerEvents=la;this.stroke=na;this.fill=fa;W.restore();Y&&null!=fa&&(W.addTolerance=function(){})}N.apply(this,arguments);
-W.addTolerance=U};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(W,U,Y,fa,na,la){null!=W.handJiggle&&W.handJiggle.constructor==k?(W.handJiggle.passThrough=!0,T.apply(this,arguments),W.handJiggle.passThrough=!1):T.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?
-k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,v,I){if(null!=k&&"undefined"!==typeof pako){var N=k.ownerDocument.getElementsByTagName("div"),T=[];if(null!=N&&0<N.length)for(var W=0;W<N.length;W++)if("mxgraph"==N[W].getAttribute("class")){T.push(N[W]);break}0<T.length&&(N=T[0].getAttribute("data-mxgraph"),null!=N?(T=JSON.parse(N),null!=T&&null!=T.xml&&(k=mxUtils.parseXml(T.xml),k=k.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&
-(N=mxUtils.getTextContent(T[0]),N=Graph.decompress(N,null,I),0<N.length&&(k=mxUtils.parseXml(N),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(N=k.getAttribute("content"),null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(cont,N))),null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N)),null!=N&&0<N.length)k=mxUtils.parseXml(N).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||v||(T=null,"diagram"==k.nodeName?T=k:"mxfile"==
-k.nodeName&&(N=k.getElementsByTagName("diagram"),0<N.length&&(T=N[Math.max(0,Math.min(N.length-1,urlParams.page||0))])),null!=T&&(k=Editor.parseDiagramNode(T,I)));null==k||"mxGraphModel"==k.nodeName||v&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,v,I){Editor.validateDiagramNode(k);var N=mxUtils.trim(mxUtils.getTextContent(k)),T=null;0<N.length?(v=Graph.decompress(N,null,v),null!=v&&0<v.length&&(T=mxUtils.parseXml(v).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&
-(T=k[0],I&&(T=Editor.parseDiagramNode(T,v,!1)),v=mxUtils.createXmlDocument(),v.appendChild(v.importNode(T,!0)),T=v.documentElement));return T};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var v=mxUtils.getNodeValue(k),I=null;0<v.length?I=Graph.decompress(v):(k=k.getElementsByTagName("mxGraphModel"),null!=k&&0<k.length&&(I=mxUtils.getXml(k[0])));return I};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var v=
-new mxCodec,I=new mxGraphModel;k.appendChild(v.encode(I))}return k};Editor.extractGraphModelFromPdf=function(k){var v=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var I=k.indexOf("EmbeddedFile");if(-1<I){var N=k.indexOf("stream",I)+9;if(0<k.substring(I,N).indexOf("application#2Fvnd.jgraph.mxfile")){var T=k.indexOf("endstream",N-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"})}}for(I=
-k.indexOf("/ObjStm");0<I;){N=k.indexOf("stream",I)+9;T=k.indexOf("endstream",N-1);N=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"});T=N.indexOf("/Subject <");if(0<T){I=N.substring(T+14,N.indexOf(">",T));if(null!=I){v=I;I=[];for(N=0;N<v.length;N+=2)T=v.substr(N,2),"00"!=T&&I.push(String.fromCharCode(parseInt(T,16)));v=I.join("")}break}I=k.indexOf("/ObjStm",I+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){I="";T=N=0;for(var W=[],U=null;T<k.length;){var Y=k.charCodeAt(T);T+=
-1;10!=Y&&(I+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(N)?N++:N=0;if(19==N){var fa=k.indexOf("%3C%2Fmxfile%3E",T)+15;T-=9;if(fa>T){v=k.substring(T,fa);break}}10==Y&&("endobj"==I?U=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(U=[],W[I.split(" ")[0]]=U):null!=U&&U.push(I),I="")}}null==v&&null!=W&&(v=Editor.extractGraphModelFromXref(W));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=
-k.trailer,I=null;null!=v&&(v=/.* \/Info (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(v=k[v[1]],null!=v&&(v=/.* \/Subject (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(k=k[v[1]],null!=k&&(k=k.join("\n"),I=k.substring(1,k.length-1))))));return I};Editor.extractParserError=function(k,v){var I=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(I=v||mxResources.get("invalidChars"),v=k[0].getElementsByTagName("div"),0<v.length&&(I=mxUtils.getTextContent(v[0])));
-return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(k,v){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=v))};Editor.mermaidToDrawio=function(k,v,I){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,v,I)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");if(null!=k.customCss){var v=document.createElement("style");v.type="text/css";v.appendChild(document.createTextNode(k.customCss));document.head.appendChild(v)}null!=
+"sketchStyle","rough")?this.createComicCanvas(W):this.createRoughCanvas(W)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(W,U,Y,fa,oa){null!=W.handJiggle&&W.handJiggle.passThrough||J.apply(this,arguments)};var N=mxShape.prototype.paint;mxShape.prototype.paint=function(W){var U=W.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=W.handJiggle&&W.handJiggle.constructor==k&&!this.outline){W.save();
+var fa=this.fill,oa=this.stroke;this.stroke=this.fill=null;var la=this.configurePointerEvents,qa=W.setStrokeColor;W.setStrokeColor=function(){};var ya=W.setFillColor;W.setFillColor=function(){};Y||null==fa||(this.configurePointerEvents=function(){});W.handJiggle.passThrough=!0;N.apply(this,arguments);W.handJiggle.passThrough=!1;W.setFillColor=ya;W.setStrokeColor=qa;this.configurePointerEvents=la;this.stroke=oa;this.fill=fa;W.restore();Y&&null!=fa&&(W.addTolerance=function(){})}N.apply(this,arguments);
+W.addTolerance=U};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(W,U,Y,fa,oa,la){null!=W.handJiggle&&W.handJiggle.constructor==k?(W.handJiggle.passThrough=!0,T.apply(this,arguments),W.handJiggle.passThrough=!1):T.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?
+k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,v,J){if(null!=k&&"undefined"!==typeof pako){var N=k.ownerDocument.getElementsByTagName("div"),T=[];if(null!=N&&0<N.length)for(var W=0;W<N.length;W++)if("mxgraph"==N[W].getAttribute("class")){T.push(N[W]);break}0<T.length&&(N=T[0].getAttribute("data-mxgraph"),null!=N?(T=JSON.parse(N),null!=T&&null!=T.xml&&(k=mxUtils.parseXml(T.xml),k=k.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&
+(N=mxUtils.getTextContent(T[0]),N=Graph.decompress(N,null,J),0<N.length&&(k=mxUtils.parseXml(N),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(N=k.getAttribute("content"),null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(cont,N))),null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N)),null!=N&&0<N.length)k=mxUtils.parseXml(N).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||v||(T=null,"diagram"==k.nodeName?T=k:"mxfile"==
+k.nodeName&&(N=k.getElementsByTagName("diagram"),0<N.length&&(T=N[Math.max(0,Math.min(N.length-1,urlParams.page||0))])),null!=T&&(k=Editor.parseDiagramNode(T,J)));null==k||"mxGraphModel"==k.nodeName||v&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,v,J){Editor.validateDiagramNode(k);var N=mxUtils.trim(mxUtils.getTextContent(k)),T=null;0<N.length?(v=Graph.decompress(N,null,v),null!=v&&0<v.length&&(T=mxUtils.parseXml(v).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&
+(T=k[0],J&&(T=Editor.parseDiagramNode(T,v,!1)),v=mxUtils.createXmlDocument(),v.appendChild(v.importNode(T,!0)),T=v.documentElement));return T};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var v=mxUtils.getNodeValue(k),J=null;0<v.length?J=Graph.decompress(v):(k=k.getElementsByTagName("mxGraphModel"),null!=k&&0<k.length&&(J=mxUtils.getXml(k[0])));return J};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var v=
+new mxCodec,J=new mxGraphModel;k.appendChild(v.encode(J))}return k};Editor.extractGraphModelFromPdf=function(k){var v=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var J=k.indexOf("EmbeddedFile");if(-1<J){var N=k.indexOf("stream",J)+9;if(0<k.substring(J,N).indexOf("application#2Fvnd.jgraph.mxfile")){var T=k.indexOf("endstream",N-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"})}}for(J=
+k.indexOf("/ObjStm");0<J;){N=k.indexOf("stream",J)+9;T=k.indexOf("endstream",N-1);N=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"});T=N.indexOf("/Subject <");if(0<T){J=N.substring(T+14,N.indexOf(">",T));if(null!=J){v=J;J=[];for(N=0;N<v.length;N+=2)T=v.substr(N,2),"00"!=T&&J.push(String.fromCharCode(parseInt(T,16)));v=J.join("")}break}J=k.indexOf("/ObjStm",J+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){J="";T=N=0;for(var W=[],U=null;T<k.length;){var Y=k.charCodeAt(T);T+=
+1;10!=Y&&(J+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(N)?N++:N=0;if(19==N){var fa=k.indexOf("%3C%2Fmxfile%3E",T)+15;T-=9;if(fa>T){v=k.substring(T,fa);break}}10==Y&&("endobj"==J?U=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(U=[],W[J.split(" ")[0]]=U):null!=U&&U.push(J),J="")}}null==v&&null!=W&&(v=Editor.extractGraphModelFromXref(W));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=
+k.trailer,J=null;null!=v&&(v=/.* \/Info (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(v=k[v[1]],null!=v&&(v=/.* \/Subject (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(k=k[v[1]],null!=k&&(k=k.join("\n"),J=k.substring(1,k.length-1))))));return J};Editor.extractParserError=function(k,v){var J=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(J=v||mxResources.get("invalidChars"),v=k[0].getElementsByTagName("div"),0<v.length&&(J=mxUtils.getTextContent(v[0])));
+return null!=J?mxUtils.trim(J):J};Editor.addRetryToError=function(k,v){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=v))};Editor.mermaidToDrawio=function(k,v,J){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,v,J)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");if(null!=k.customCss){var v=document.createElement("style");v.type="text/css";v.appendChild(document.createTextNode(k.customCss));document.head.appendChild(v)}null!=
k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);null!=k.selectParentLayer&&(Graph.selectParentLayer=
k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&(Editor.defaultIncludeDiagram=k.includeDiagram);
null!=k.simpleLabels&&(Editor.simpleLabels=k.simpleLabels);null!=k.pasteAtMousePointer&&(Editor.pasteAtMousePointer=k.pasteAtMousePointer);null!=k.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=k.oneDriveInlinePicker);null!=k.defaultAdaptiveColors?Graph.defaultAdaptiveColors=k.defaultAdaptiveColors:0==k.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=k.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=k.enableLightDarkColors);null!=k.darkColor&&(Editor.darkColor=k.darkColor);
null!=k.darkColorVar&&(Editor.darkColorVar=k.darkColorVar);Graph.prototype.defaultPageBackgroundColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=k.settingsName&&(Editor.configurationKey="."+k.settingsName+"-configuration",Editor.settingsKey="."+k.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=k.customFonts&&(Menus.prototype.defaultFonts=k.customFonts.concat(Menus.prototype.defaultFonts));
-null!=k.customPresetColors&&(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){v=document.createElement("style");v.setAttribute("type","text/css");v.appendChild(document.createTextNode(k.css));var I=document.getElementsByTagName("script")[0];I.parentNode.insertBefore(v,I)}null!=k.expandLibraries&&
+null!=k.customPresetColors&&(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){v=document.createElement("style");v.setAttribute("type","text/css");v.appendChild(document.createTextNode(k.css));var J=document.getElementsByTagName("script")[0];J.parentNode.insertBefore(v,J)}null!=k.expandLibraries&&
(Sidebar.prototype.expandLibraries=k.expandLibraries);null!=k.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=k.appendCustomLibraries);null!=k.libraries&&(Sidebar.prototype.customEntries=k.libraries);null!=k.enabledLibraries&&(Array.isArray(k.enabledLibraries)?Sidebar.prototype.enabledLibraries=k.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=k.defaultLibraries&&(Sidebar.prototype.defaultEntries=k.defaultLibraries);null!=k.defaultCustomLibraries&&
(Editor.defaultCustomLibraries=k.defaultCustomLibraries);null!=k.enableCustomLibraries&&(Editor.enableCustomLibraries=k.enableCustomLibraries);null!=k.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=k.defaultVertexStyle);null!=k.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=k.defaultEdgeStyle);null!=k.defaultPageVisible&&(Graph.prototype.defaultPageVisible=k.defaultPageVisible);null!=k.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=k.defaultGridEnabled);null!=k.zoomWheel&&(Graph.zoomWheel=
k.zoomWheel);null!=k.zoomFactor&&(v=parseFloat(k.zoomFactor),!isNaN(v)&&1<v?Graph.prototype.zoomFactor=v:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=k.defaultGridSize&&(v=parseInt(k.defaultGridSize),!isNaN(v)&&0<v?mxGraph.prototype.gridSize=v:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=k.gridSteps&&(v=parseInt(k.gridSteps),!isNaN(v)&&0<v?mxGraphView.prototype.gridSteps=v:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=k.pageFormat&&(v=parseInt(k.pageFormat.width),I=parseInt(k.pageFormat.height),!isNaN(v)&&0<v&&!isNaN(I)&&0<I?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,v,I),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+null!=k.pageFormat&&(v=parseInt(k.pageFormat.width),J=parseInt(k.pageFormat.height),!isNaN(v)&&0<v&&!isNaN(J)&&0<J?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,v,J),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=k.emptyDiagramXml);null!=k.sidebarWidth&&(EditorUi.prototype.hsplitPosition=k.sidebarWidth);null!=k.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=k.updateDefaultStyle);null!=k.sidebarTitles&&(Sidebar.prototype.sidebarTitles=k.sidebarTitles);null!=k.sidebarTitleSize&&(v=parseInt(k.sidebarTitleSize),!isNaN(v)&&0<v?Sidebar.prototype.sidebarTitleSize=v:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));
null!=k.fontCss&&("string"===typeof k.fontCss?Editor.configureFontCss(k.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=k.autosaveDelay&&(v=parseInt(k.autosaveDelay),!isNaN(v)&&0<v?DrawioFile.prototype.autosaveDelay=v:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=k.maxImageBytes&&(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&
(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);
-null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==
-typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var v=document.getElementsByTagName("script")[0];if(null!=v&&null!=v.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(k));v.parentNode.insertBefore(I,v);k=k.split("url(");for(I=1;I<k.length;I++){var N=k[I].indexOf(")");N=Editor.trimCssUrl(k[I].substring(0,N));var T=document.createElement("link");
-T.setAttribute("rel","preload");T.setAttribute("href",N);T.setAttribute("as","font");T.setAttribute("crossorigin","");v.parentNode.insertBefore(T,v)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=
-20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var v=[],I=0;I<k;I++)v.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return v.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},
-{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];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(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var v=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(v)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[v]),Error(mxResources.get("notADiagramFile")+" ("+v+")");if("mxGraphModel"==k.nodeName){v=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=v&&""!=v)v!=this.graph.currentStyle&&(I=null!=this.graph.themes?
-this.graph.themes[v]:mxUtils.load(STYLE_PATH+"/"+v+".xml").getDocumentElement(),null!=I&&(N=new mxCodec(I.ownerDocument),N.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var N=new mxCodec(I.ownerDocument);N.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=v;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));
-v=k.getAttribute("backgroundImage");null!=v?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(v)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(v=k.getAttribute("extFonts"))try{for(v=v.split("|").map(function(T){T=T.split("^");return{name:T[0],url:T[1]}}),I=0;I<v.length;I++)this.graph.addExtFont(v[I].name,
-v[I].url)}catch(T){console.log("ExtFonts format error: "+T.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 f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(k,v){k=null!=k?k:!0;var I=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",
-this.graph.currentStyle);var N=this.graph.getBackgroundImageObject(this.graph.backgroundImage,v);null!=N&&I.setAttribute("backgroundImage",JSON.stringify(N));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(N=this.graph.extFonts.map(function(T){return T.name+
-"^"+T.url}),I.setAttribute("extFonts",N.join("|")));return I};Editor.prototype.isDataSvg=function(k){try{var v=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=v&&(null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(cont,v))),null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v)),null!=v&&0<v.length)){var I=mxUtils.parseXml(v).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(N){}return!1};Editor.prototype.extractGraphModel=
-function(k,v,I){return Editor.extractGraphModel.apply(this,arguments)};var l=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();l.apply(this,arguments)};var u=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
-function(){u.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,v){if("undefined"===typeof window.MathJax){var I=function(){N=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var N=null;Editor.doMathJaxRender=function(U){try{null==
-N?(MathJax.typesetClear([U]),MathJax.typeset([U]),I()):N!=U&&Editor.mathJaxQueue.push(U)}catch(Y){MathJax.typesetClear([U]),null!=Y.retry?(N=U,Y.retry.then(function(){MathJax.typesetPromise([U]).then(I)["catch"](function(fa){console.log("Error in MathJax.typesetPromise: "+fa.toString());I()})})["catch"](function(fa){console.log("Error in MathJax.retry: "+fa.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+Y.toString())}};window.MathJax=null!=v?v:{options:{skipHtmlTags:{"[+]":["text"]},
-ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"],paths:{fonts:DRAW_MATH_URL+"/fonts","mathjax-tex":DRAW_MATH_URL+"/fonts/mathjax-tex-font","mathjax-mhchem-extension":DRAW_MATH_URL+"/fonts/mathjax-mhchem-font-extension","mathjax-bbm-extension":DRAW_MATH_URL+"/fonts/mathjax-bbm-font-extension","mathjax-bboldx-extension":DRAW_MATH_URL+"/fonts/mathjax-bboldx-font-extension","mathjax-dsfont-extension":DRAW_MATH_URL+
-"/fonts/mathjax-dsfont-font-extension"}},output:{font:"mathjax-tex"},startup:{pageReady:function(){for(var U=0;U<Editor.mathJaxQueue.length;U++)Editor.doMathJaxRender(Editor.mathJaxQueue[U])}}};Editor.MathJaxRender=function(U){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(U):Editor.mathJaxQueue.push(U)};Editor.onMathJaxDone=function(){};var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(Y,
-fa){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var W=document.createElement("script");W.setAttribute("type","text/javascript");W.setAttribute("src",k);v[0].parentNode.appendChild(W)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var v="",I=[""],N=0,T=!0,W;k=$jscomp.makeIterator(k);
-for(W=k.next();!W.done;W=k.next())W=W.value,'"'===W?(T&&W===v&&(I[N]+=W),T=!T):","===W&&T?W=I[++N]="":I[N]+=W,v=W;return I}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var I="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+I+(v?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=
-function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.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(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=
-function(){var k=new mxUrlConverter;k.updateBaseUrl();var v=k.convert,I=this;k.convert=function(N){null!=N&&navigator.onLine&&("http://"!=N.substring(0,7)&&"https://"!=N.substring(0,8)||N.substring(0,k.baseUrl.length)==k.baseUrl||I.crossOriginImages&&I.isCorsEnabledForUrl(N)?"chrome-extension://"!=N.substring(0,19)&&(N=v.apply(this,arguments)):N=PROXY_URL+"?url="+encodeURIComponent(N));return N};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};
-Editor.prototype.convertImageToDataUri=function(k,v,I,N,T){try{var W=!0,U=window.setTimeout(mxUtils.bind(this,function(){W=!1;v(k)}),this.timeout),Y=mxUtils.bind(this,function(){null!=N?this.convertImageToDataUri(k,v,I,N,!0):v(k)});if(/(\.svg)$/i.test(k)&&!T)mxUtils.get(k,mxUtils.bind(this,function(na){window.clearTimeout(U);W&&(200>na.getStatus()||299<na.getStatus()?Y():v(Editor.createSvgDataUri(na.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(U);W&&Y()}));else{var fa=new Image;
-this.crossOriginImages&&(fa.crossOrigin="anonymous");fa.onload=function(){window.clearTimeout(U);if(W)try{N=null!=N&&T?N:1;var na=document.createElement("canvas"),la=na.getContext("2d");la.scale(N,N);na.height=fa.height*N;na.width=fa.width*N;la.drawImage(fa,0,0);v(na.toDataURL())}catch(qa){v(k)}};fa.onerror=function(){window.clearTimeout(U);W&&(null!=I?I():v(k))};fa.src=k}}catch(na){null!=I?I():v(k)}};Editor.prototype.convertImages=function(k,v,I,N){function T(){0<W.length?W.shift()():v(k)}null==
-N&&(N=this.createImageUrlConverter());var W=[],U=I||{};I=mxUtils.bind(this,function(Y,fa){Y=k.getElementsByTagName(Y);for(var na=0;na<Y.length;na++)mxUtils.bind(this,function(la){W.push(mxUtils.bind(this,function(){try{if(null!=la){var qa=N.convert(la.getAttribute(fa));if(null!=qa&&"data:"!=qa.substring(0,5)){var ya=U[qa];null==ya?this.convertImageToDataUri(qa,function(wa){null!=wa&&(U[qa]=wa,la.setAttribute(fa,wa));T()},null,Editor.svgRasterScale):(la.setAttribute(fa,ya),T())}else null!=qa&&la.setAttribute(fa,
-qa),T()}}catch(wa){T()}}))})(Y[na])});I("image","xlink:href");I("img","src");T()};Editor.base64Encode=function(k){for(var v="",I=0,N=k.length,T,W,U;I<N;){T=k.charCodeAt(I++)&255;if(I==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4);v+="==";break}W=k.charCodeAt(I++);if(I==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
-3)<<4|(W&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((W&15)<<2);v+="=";break}U=k.charCodeAt(I++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(W&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((W&15)<<2|(U&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U&63)}return v};
-Editor.prototype.loadUrl=function(k,v,I,N,T,W,U,Y){try{var fa=!U&&(N||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));T=null!=T?T:!0;var na=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(la){200<=la.getStatus()&&299>=la.getStatus()?null!=v&&(la=la.getText(),fa&&(W=null!=W?W:"data:image/png;base64,",la=W+Editor.base64Encode(la)),v(la)):null!=I&&(0==la.getStatus()?I({message:mxResources.get("accessDenied")},la):404==la.getStatus()?
-I({message:mxResources.get("fileNotFound"),code:la.getStatus()},la):I({message:this.getErrorMessage(la)},la))}),function(la){null!=I&&I({message:mxResources.get("error")+" "+la.getStatus()})},fa,this.timeout,function(){T&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:na})},Y)});na()}catch(la){null!=I&&I(la)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var I=k.getText(),N=JSON.parse(I);null!=N&&null!=N.error&&null!=N.error.message&&(v=N.error.message+
-" ("+v+")")}catch(T){}return v};Editor.prototype.absoluteCssFonts=function(k){var v=null;if(null!=k){var I=k.split("url(");if(0<I.length){v=[I[0]];k=window.location.pathname;var N=null!=k?k.lastIndexOf("/"):-1;0<=N&&(k=k.substring(0,N+1));N=document.getElementsByTagName("base");var T=null;null!=N&&0<N.length&&(T=N[0].getAttribute("href"));for(var W=1;W<I.length;W++)if(N=I[W].indexOf(")"),0<N){var U=Editor.trimCssUrl(I[W].substring(0,N));this.graph.isRelativeUrl(U)&&(U=null!=T?T+U:window.location.protocol+
-"//"+window.location.hostname+("/"==U.charAt(0)?"":k)+U);v.push('url("'+U+'"'+I[W].substring(N))}else v.push(I[W])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,I){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+encodeURIComponent(v));I(k,v)};Editor.prototype.embedCssFonts=function(k,v){var I=k.split("url("),N=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==N){for(var fa=[I[0]],na=1;na<I.length;na++){var la=
-I[na].indexOf(")");fa.push('url("');fa.push(this.cachedFonts[Editor.trimCssUrl(I[na].substring(0,la))]);fa.push('"'+I[na].substring(la))}v(fa.join(""))}});if(0<I.length){for(k=1;k<I.length;k++){var W=I[k].indexOf(")"),U=null,Y=I[k].indexOf("format(",W);0<Y&&(U=Editor.trimCssUrl(I[k].substring(Y+7,I[k].indexOf(")",Y))));mxUtils.bind(this,function(fa){if(null==this.cachedFonts[fa]){this.cachedFonts[fa]=fa;N++;var na="application/x-font-ttf";if("svg"==U||/(\.svg)($|\?)/i.test(fa))na="image/svg+xml";
-else if("otf"==U||"embedded-opentype"==U||/(\.otf)($|\?)/i.test(fa))na="application/x-font-opentype";else if("woff"==U||/(\.woff)($|\?)/i.test(fa))na="application/font-woff";else if("woff2"==U||/(\.woff2)($|\?)/i.test(fa))na="application/font-woff2";else if("eot"==U||/(\.eot)($|\?)/i.test(fa))na="application/vnd.ms-fontobject";else if("sfnt"==U||/(\.sfnt)($|\?)/i.test(fa))na="application/font-sfnt";this.mapFontUrl(na,fa,mxUtils.bind(this,function(la,qa){this.loadUrl(qa,mxUtils.bind(this,function(ya){this.cachedFonts[fa]=
-ya;N--;T()}),mxUtils.bind(this,function(ya){N--;T()}),!0,null,"data:"+la+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[k].substring(0,W)),U)}T()}else v(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(v){this.resolvedFontCss=v;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},v;for(v in Graph.fontMapping)Graph.isCssFontUrl(v)&&(k[v]=Graph.fontMapping[v]);
-return k};Editor.prototype.embedExtFonts=function(k){var v=this.graph.getCustomFonts();if(0<v.length){var I=[],N=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==N&&this.embedCssFonts(I.join(""),k)}),W=0;W<v.length;W++)mxUtils.bind(this,function(U,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(N++,this.loadUrl(Graph.rewriteGoogleFontUrl(Y),mxUtils.bind(this,function(fa){this.cachedGoogleFonts[Y]=fa;I.push(fa+
-"\n");N--;T()}),mxUtils.bind(this,function(fa){N--;I.push("@import url("+Y+");\n");T()}))):I.push(this.cachedGoogleFonts[Y]+"\n"):I.push('@font-face {font-family: "'+U+'";src: url("'+Y+'")}\n')})(v[W].name,v[W].url);T()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),I=0;I<v.length;I++){var N=mxUtils.getTextContent(v[I]);0>N.indexOf("mxPageSelector")&&0<N.indexOf("MathJax")&&k[0].appendChild(v[I].cloneNode(!0))}};
-Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var I=mxUtils.getSvgDefs(k),N=v.split("\n");v=[];for(var T=[],W=0;W<N.length;W++)"@import"==N[W].substring(0,7)?v.push(N[W]):T.push(N[W]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),I.appendChild(k));0<T.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,
-T.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,I){var N=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(N/k,N/v))};Editor.prototype.exportToCanvas=function(k,v,I,N,T,W,U,Y,fa,na,la,qa,ya,wa,Ia,Aa,Ba,Ga){try{W=null!=W?W:!0;U=null!=U?U:!0;qa=null!=qa?qa:this.graph;ya=null!=ya?ya:0;var Ma=fa?null:qa.background;Ma==mxConstants.NONE&&(Ma=null);null==Ma&&(Ma=N);null==
-Ma&&0==fa&&(Ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,ya,wa,null,U,null,null,null,na,null,Aa,Ba,Ga),mxUtils.bind(this,function(sa){try{sa.style.setProperty("-webkit-font-smoothing","antialiased");sa.style.setProperty("-moz-osx-font-smoothing","grayscale");var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){Qa.drawImage(Ca,0,0);k(Na,sa)},0):(Qa.drawImage(Ca,0,0),k(Na,sa))},Na=document.createElement("canvas"),
-Sa=parseInt(sa.getAttribute("width")),Ua=parseInt(sa.getAttribute("height"));Y=null!=Y?Y:1;null!=v&&(Y=W?Math.min(1,Math.min(3*v/(4*Ua),v/Sa)):v/Sa);Y=this.getMaxCanvasScale(Sa,Ua,Y);Sa=Math.ceil(Y*Sa);Ua=Math.ceil(Y*Ua);Na.setAttribute("width",Sa);Na.setAttribute("height",Ua);var Qa=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Qa.beginPath();Qa.rect(0,0,Sa,Ua);Qa.fillStyle="dark"==Aa&&"none"!=qa.getAdaptiveColors()?za.dark:za.light;Qa.fill()}1!=Y&&Qa.scale(Y,Y);if(Ia){var Ea=
-qa.view,B=Ea.scale;Ea.scale=1;var Q=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=B;Q="data:image/svg+xml;base64,"+Q;var R=qa.gridSize*Ea.gridSteps*Y,X=qa.getGraphBounds(),ia=Ea.translate.x*B,ja=Ea.translate.y*B,pa=ia+(X.x-ia)/B-ya,xa=ja+(X.y-ja)/B-ya,ra=new Image;ra.onload=function(){try{for(var ua=-Math.round(R-mxUtils.mod((ia-pa)*Y,R)),Ka=-Math.round(R-mxUtils.mod((ja-xa)*Y,R));ua<Sa;ua+=R)for(var Va=Ka;Va<Ua;Va+=R)Qa.drawImage(ra,ua/Y,Va/Y);va()}catch(Oa){null!=T&&
-T(Oa)}};ra.onerror=function(ua){null!=T&&T(ua)};ra.src=Q}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};na&&this.graph.addSvgShadow(sa);this.graph.mathEnabled&&this.addMathCss(sa);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(sa,this.resolvedFontCss),Ca.src=Editor.createSvgDataUri(mxUtils.getXml(sa))}catch(va){null!=T&&T(va)}});this.embedExtFonts(mxUtils.bind(this,function(va){try{null!=va&&this.addFontCss(sa,va),this.loadFonts(Da)}catch(Na){null!=
-T&&T(Na)}}))}catch(va){null!=T&&T(va)}}),I,la)}catch(sa){null!=T&&T(sa)}};Editor.crcTable=[];for(var y=0;256>y;y++)for(var q=y,C=0;8>C;C++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[y]=q;Editor.updateCRC=function(k,v,I,N){for(var T=0;T<N;T++)k=Editor.crcTable[(k^v.charCodeAt(I+T))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,I=0;I<k.length;I++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(I))&255];return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,I,N,T){function W(la,qa){var ya=
-fa;fa+=qa;return la.substring(ya,fa)}function U(la){la=W(la,4);return la.charCodeAt(3)+(la.charCodeAt(2)<<8)+(la.charCodeAt(1)<<16)+(la.charCodeAt(0)<<24)}function Y(la){return String.fromCharCode(la>>24&255,la>>16&255,la>>8&255,la&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(W(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(W(k,4),"IHDR"!=W(k,4))null!=T&&T();else{W(k,17);T=k.substring(0,fa);do{var na=U(k);if("IDAT"==
-W(k,4)){T=k.substring(0,fa-8);"pHYs"==v&&"dpi"==I?(I=Math.round(N/.0254),I=Y(I)+Y(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,v,0,4);N=Editor.updateCRC(N,I,0,I.length);T+=Y(I.length)+v+I+Y(N^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+na);W(k,na);W(k,4)}while(na);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink=
-"https://www.drawio.com/doc/faq/save-file-formats";var J=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){J.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,v){var I=null;null!=
-k.editor.graph.getModel().getParent(v)?I=v.getId():null!=k.currentPage&&(I=k.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var D=Format.prototype.init;Format.prototype.init=function(){D.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var P=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?P.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=
-function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var v=this.editorUi,I=v.editor.graph;if(I.isEnabled()){var N=v.getCurrentFile();null!=N&&N.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},function(W){v.editor.setAutosave(W);v.editor.autosave&&N.isModified()&&
-N.fileChanged()},{install:function(W){this.listener=function(){W(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(W){v.actions.get("mathematicalTypesetting").funct()},{install:function(W){this.listener=function(){W(I.mathEnabled)};
-v.addListener("mathEnabledChanged",this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(T);(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&T.appendChild(v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return k};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,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.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:.25,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,
-defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];
-mxCellRenderer.defaultShapes.trapezoid.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.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",
-dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",
-dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",
-dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",
-dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
-type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
-type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
-type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
-max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
-defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
-[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
-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;var g=StyleFormatPanel.prototype.init;
-StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments);null!=k.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),k.customProperties,k))};var m=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var v=
-this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);m.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,I,N){function T(Qa,za,Ea,B,Q){if(null!=Ea.valueChanged)Ea.valueChanged(za,Q,I,qa);else{ya.getModel().beginUpdate();try{Q=[];var R=[];if(null!=Ea.index){for(var X=[],ia=Ea.parentRow.nextSibling;ia&&ia.getAttribute("data-pName")==
-Qa;)X.push(ia.getAttribute("data-pValue")),ia=ia.nextSibling;Ea.index<X.length?null!=B?X.splice(B,1):X[Ea.index]=za:X.push(za);null!=Ea.size&&X.length>Ea.size&&(X=X.slice(0,Ea.size));za=X.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,X.length,ya.getSelectionCells()),Q.push(Ea.countProperty),R.push(X.length))}ya.setCellStyles(Qa,za,ya.getSelectionCells());Q.push(Qa);R.push(za);if(null!=Ea.dependentProps)for(Qa=0;Qa<Ea.dependentProps.length;Qa++){var ja=Ea.dependentPropsDefVal[Qa],
-pa=Ea.dependentPropsVals[Qa];if(pa.length>za)pa=pa.slice(0,za);else for(var xa=pa.length;xa<za;xa++)pa.push(ja);pa=pa.join(",");ya.setCellStyles(Ea.dependentProps[Qa],pa,ya.getSelectionCells());Q.push(Ea.dependentProps[Qa]);R.push(pa)}if("function"==typeof Ea.onChange)Ea.onChange(ya,za);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",Q,"values",R,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}}function W(Qa,za){za.style.left="0px";za.style.top="0px";za.style.position=
-"relative";za.style.right="0px";za.style.bottom="0px";za.style.width="100%";za.style.maxWidth="100%";za.style.maxHeight="100%";za.style.textAlign="left"}function U(Qa,za,Ea){function B(R){if(null==R||R==mxConstants.NONE)Q.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==R)Q.style.background="";else{var X=mxUtils.getLightDarkColor(R);mxUtils.isLightDarkColor(R)&&X.light!=X.dark?Q.style.background="linear-gradient(to right bottom, "+X.cssText+" 50%, "+mxUtils.invertLightDarkColor(X).cssText+
-" 50.3%)":Q.style.background=R}}var Q=document.createElement("div");Q.style.width="32px";Q.style.height="8px";Q.style.margin="2px";Q.style.borderStyle="solid";Q.style.borderWidth="1px";B(za);btn=mxUtils.button("",mxUtils.bind(qa,function(R){this.editorUi.pickColor(za,function(X){T(Qa,X,Ea);B(X)});mxEvent.consume(R)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(Q);return btn}function Y(Qa,za,Ea,B,Q,
-R,X){null!=za&&(za=za.split(","),wa.push({name:Qa,values:za,type:Ea,defVal:B,countProperty:Q,parentRow:R,isDeletable:!0,flipBkg:X}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ia){for(var ja=R,pa=0;null!=ja.nextSibling;)if(ja.nextSibling.getAttribute("data-pName")==Qa)ja=ja.nextSibling,pa++;else break;var xa={type:Ea,parentRow:R,index:pa,isDeletable:!0,defVal:B,countProperty:Q};pa=la(Qa,"",xa,0==pa%2,X);T(Qa,B,xa);ja.parentNode.insertBefore(pa,ja.nextSibling);mxEvent.consume(ia)}));btn.style.height=
-"16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Qa,za,Ea,B,Q,R,X){if(0<Q){var ia=Array(Q);za=null!=za?za.split(","):[];for(var ja=0;ja<Q;ja++)ia[ja]=null!=za[ja]?za[ja]:null!=B?B:"";wa.push({name:Qa,values:ia,type:Ea,defVal:B,parentRow:R,flipBkg:X,size:Q})}return document.createElement("div")}function na(Qa,za,Ea){var B=document.createElement("input");B.type="checkbox";B.checked="1"==za;mxEvent.addListener(B,"change",function(){T(Qa,B.checked?"1":"0",Ea,null,B)});return B}
-function la(Qa,za,Ea,B,Q){var R=Ea.dispName,X=Ea.type,ia=document.createElement("tr");ia.className="gePropRow"+(Q?"Dark":"")+(B?"Alt":"")+" gePropNonHeaderRow";ia.setAttribute("data-pName",Qa);ia.setAttribute("data-pValue",za);B=!1;null!=Ea.index&&(ia.setAttribute("data-index",Ea.index),R=(null!=R?R:"")+"["+Ea.index+"]",B=!0);var ja=document.createElement("td");ja.className="gePropRowCell";R=mxResources.get(R,null,R);mxUtils.write(ja,R);ja.setAttribute("title",R);B&&(ja.style.textAlign="right");ia.appendChild(ja);
-ja=document.createElement("td");ja.className="gePropRowCell";ja.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ja,"click",mxUtils.bind(qa,function(ua){!mxUtils.isAncestorNode(ia,document.activeElement)&&mxUtils.isAncestorNode(ia.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==X)ja.appendChild(U(Qa,za,Ea));else if("bool"==X||"boolean"==
-X)ja.appendChild(na(Qa,za,Ea));else if("enum"==X){var pa=Ea.enumList;ja.innerHTML="";var xa=document.createElement("div");xa.className="gePropValue";ja.appendChild(xa);for(Q=0;Q<pa.length;Q++)if(R=pa[Q],R.val==za){mxUtils.write(xa,mxResources.get(R.dispName,null,R.dispName));break}mxEvent.addListener(ja,"click",mxUtils.bind(qa,function(ua){var Ka=mxEvent.getSource(ua);if(!(Ka!=ja&&Ka!=xa||mxEvent.isConsumed(ua))){xa.innerHTML="";var Va=document.createElement("select"),Oa=null;W(ja,Va);for(ua=0;ua<
-pa.length;ua++){Ka=pa[ua];var Ta=document.createElement("option");Ta.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Ta,mxResources.get(Ka.dispName,null,Ka.dispName));Va.appendChild(Ta);null==Ka.val&&(Ta.value="null",Oa=Ta)}Va.value=null==za&&null!=Oa?"null":za;xa.appendChild(Va);mxEvent.addListener(Va,"change",function(){var Za=mxUtils.htmlEntities(Va.value);if(Va[Va.selectedIndex]==Oa||"null"==Za.value)Za=null;T(Qa,Za,Ea)});Va.focus();mxEvent.addListener(Va,"blur",function(){xa.innerHTML="";for(var Za=
-0;Za<pa.length;Za++){var Pa=pa[Za];if(Pa.val==Va.value){mxUtils.write(xa,mxResources.get(Pa.dispName,null,Pa.dispName));break}}})}}))}else if("dynamicArr"==X)ja.appendChild(Y(Qa,za,Ea.subType,Ea.subDefVal,Ea.countProperty,ia,Q));else if("staticArr"==X)ja.appendChild(fa(Qa,za,Ea.subType,Ea.subDefVal,Ea.size,ia,Q));else if("readOnly"==X)Q=document.createElement("input"),Q.setAttribute("readonly",""),Q.value=za,Q.style.borderWidth="0px","id"==Qa||"shape"==Qa?(ia.firstChild.innerHTML="",ia.firstChild.setAttribute("colspan",
-"2"),Q.style.flexGrow="1",Q.style.marginLeft="4px",Q.style.textAlign="id"==Qa?"center":"left",Q.setAttribute("title",za),R=document.createElement("div"),mxUtils.write(R,mxResources.get(Qa)+":"),R.style.display="inline-flex",R.style.alignItems="center",R.style.width="100%",R.appendChild(Q),ia.firstChild.appendChild(R)):(Q.style.width="96px",ja.appendChild(Q));else{ja.innerHTML="";var ra=document.createElement("div");ra.className="gePropValue";ja.appendChild(ra);ra.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));
-mxEvent.addListener(ja,"click",mxUtils.bind(qa,function(ua){function Ka(){var Ta=Oa.value;Ta=0==Ta.length&&"string"!=X&&"numbers"!=X?0:Ta;Ea.allowAuto&&(null!=Ta.trim&&"auto"==Ta.trim().toLowerCase()?(Ta="auto",X="string"):(Ta=parseFloat(Ta),Ta=isNaN(Ta)?0:Ta));null!=Ea.min&&Ta<Ea.min?Ta=Ea.min:null!=Ea.max&&Ta>Ea.max&&(Ta=Ea.max);var Za=null;try{Za="numbers"==X?Ta.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==X?parseInt(Ta):Ta)+"")}catch(Pa){}T(Qa,Za,Ea,null,Oa)}var Va=mxEvent.getSource(ua);
-if(!(Va!=ja&&Va!=ra||mxEvent.isConsumed(ua))){ra.innerHTML="";var Oa=document.createElement("input");W(ra,Oa);Oa.value=decodeURIComponent(za);Oa.className="gePropEditor";"int"!=X&&"float"!=X||Ea.allowAuto||(Oa.type="number",Oa.step="int"==X?"1":"any",null!=Ea.min&&(Oa.min=parseFloat(Ea.min)),null!=Ea.max&&(Oa.max=parseFloat(Ea.max)));ra.appendChild(Oa);mxEvent.addListener(Oa,"keypress",function(Ta){13==Ta.keyCode&&Ka()});Oa.focus();mxEvent.addListener(Oa,"blur",function(){Ka()})}}))}Ea.isDeletable&&
-(Q=mxUtils.button("-",mxUtils.bind(qa,function(ua){T(Qa,"",Ea,Ea.index);mxEvent.consume(ua)})),Q.style.height="16px",Q.style.width="25px",Q.style.float="right",Q.className="geColorBtn",ja.appendChild(Q));ia.appendChild(ja);return ia}var qa=this,ya=this.editorUi.editor.graph,wa=[],Ia=document.createElement("table");Ia.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.style.paddingLeft=
-"16px";Ba.style.backgroundRepeat="no-repeat";Ba.style.backgroundPosition="-2px 50%";Ba.style.backgroundSize="20px";mxUtils.write(Ba,mxResources.get("property"));Aa.style.cursor="pointer";var Ga=function(){var Qa=Ia.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ba.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var za="none";for(var Ea=k.childNodes.length-1;0<=Ea;Ea--)try{var B=k.childNodes[Ea],Q=B.nodeName.toUpperCase();"INPUT"!=Q&&"SELECT"!=Q||k.removeChild(B)}catch(R){}}else Ba.style.backgroundImage=
-"url('"+Editor.arrowDownImage+"')",za="";for(Ea=0;Ea<Qa.length;Ea++)Qa[Ea].style.display=za};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;Ga()});Aa.appendChild(Ba);var Ma=document.createElement("th");Ma.className="gePropHeaderCell";Ma.style.paddingLeft="4px";mxUtils.write(Ma,mxResources.get("value"));Aa.appendChild(Ma);Ia.appendChild(Aa);var sa=Ma=!1;Aa=null;1==I.vertices.length&&0==I.edges.length?Aa=I.vertices[0].id:0==I.vertices.length&&
-1==I.edges.length&&(Aa=I.edges[0].id);null==Aa||N||(Ia.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"id",type:"readOnly"},!0,!1)),null!=I.style&&null!=I.style.shape&&Ia.appendChild(la("shape",mxUtils.htmlEntities(I.style.shape),{dispName:"shape",type:"readOnly"},!0,!1)));for(var Ca in v)if(N=v[Ca],("function"!=typeof N.isVisible||N.isVisible(I,this))&&!N.primary){var Da=null!=N.getValue?N.getValue(I,this):null!=I.style[Ca]?mxUtils.htmlEntities(I.style[Ca]+""):null!=N.getDefaultValue?N.getDefaultValue(I,
-this):N.defVal;if("separator"==N.type)sa=!sa;else{if("staticArr"==N.type)N.size=parseInt(I.style[N.sizeProperty]||v[N.sizeProperty].defVal)||0;else if(null!=N.dependentProps){var va=N.dependentProps,Na=[],Sa=[];for(Aa=0;Aa<va.length;Aa++)if(null!=v[va[Aa]]){var Ua=I.style[va[Aa]];Sa.push(v[va[Aa]].subDefVal);Na.push(null!=Ua?Ua.split(","):[])}N.dependentPropsDefVal=Sa;N.dependentPropsVals=Na}Ia.appendChild(la(Ca,Da,N,Ma,sa));Ma=!Ma}}for(Aa=0;Aa<wa.length;Aa++)for(N=wa[Aa],v=N.parentRow,Ca=0;Ca<N.values.length;Ca++)Ma=
-la(N.name,N.values[Ca],{type:N.type,parentRow:N.parentRow,isDeletable:N.isDeletable,index:Ca,defVal:N.defVal,countProperty:N.countProperty,size:N.size},0==Ca%2,N.flipBkg),v.parentNode.insertBefore(Ma,v.nextSibling),v=Ma;k.appendChild(Ia);Ga();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=this.editorUi,I=v.editor.graph,N=document.createElement("div");N.style.padding="6px 20px 0 24px";k.appendChild(N);var T=document.createElement("div");T.className=
-"geSwitcher";T.style.padding="4px 18px 6px 0px";for(var W=[],U=0;U<this.defaultColorSchemes.length;U++){var Y=document.createElement("div");Y.className="geSwitcherDot";mxUtils.bind(this,function(ya){mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){fa(ya)}))})(U);W.push(Y);T.appendChild(Y)}var fa=mxUtils.bind(this,function(ya){null!=W[ya]&&(null!=this.format.currentScheme&&null!=W[this.format.currentScheme]&&(W[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=
-ya,na(this.defaultColorSchemes[this.format.currentScheme]),W[this.format.currentScheme].style.background="#84d7ff")}),na=mxUtils.bind(this,function(ya){var wa=mxUtils.clone(I.defaultVertexStyle);wa[mxConstants.STYLE_STROKECOLOR]=null!=wa[mxConstants.STYLE_STROKECOLOR]?wa[mxConstants.STYLE_STROKECOLOR]:"default";wa[mxConstants.STYLE_FILLCOLOR]=null!=wa[mxConstants.STYLE_FILLCOLOR]?wa[mxConstants.STYLE_FILLCOLOR]:"default";wa[mxConstants.STYLE_FONTCOLOR]=null!=wa[mxConstants.STYLE_FONTCOLOR]?wa[mxConstants.STYLE_FONTCOLOR]:
-"default";I.replaceDefaultColors(new mxCell,wa);var Ia=mxUtils.bind(this,function(Ba){var Ga=mxUtils.button("",mxUtils.bind(this,function(Ca){I.getModel().beginUpdate();try{for(var Da=v.getSelectionState().cells,va=0;va<Da.length;va++){var Na=I.getModel().getStyle(Da[va]);null!=Ba?(mxEvent.isShiftDown(Ca)||(Na=""==Ba.fill||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,Ba.fill),Na=""==Ba.gradient||null==Ba.gradient?mxUtils.setStyle(Na,
-mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,Ba.gradient),mxEvent.isControlDown(Ca)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ca)||!I.getModel().isVertex(Da[va])||(Na=""==Ba.font||null==Ba.font?mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,Ba.font))),mxEvent.isAltDown(Ca)||(Na=""==Ba.stroke||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,
-Ba.stroke))):(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null),I.getModel().isVertex(Da[va])&&(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,null)));I.getModel().setStyle(Da[va],Na)}}finally{I.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";
-if(null!=Ba){var Ma="1px solid";null!=Ba.border&&(Ma=Ba.border);if(null!=Ba.gradient)Ga.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(Ba.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(Ba.gradient).cssText+" 100%)";else if(Ba.fill==mxConstants.NONE)Ga.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==Ba.fill||""==Ba.fill)Ga.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var sa=mxUtils.getLightDarkColor(Ba.fill);
-Ga.style.backgroundImage="linear-gradient(to right bottom, "+sa.cssText+" 50%, "+sa.light+" 50.3%)"}null==Ba.stroke||Ba.stroke==mxConstants.NONE?Ga.style.border=Ma+" transparent":""==Ba.stroke?Ga.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(sa=mxUtils.getLightDarkColor(Ba.stroke),Ga.style.border=Ma+" "+sa.cssText,Ga.style.borderRightColor=sa.light,Ga.style.borderBottomColor=Ga.style.borderRightColor);null!=Ba.title&&Ga.setAttribute("title",
-Ba.title)}else Ma=mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),sa=mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,"#000000"),Ga.style.backgroundColor=Ma,Ga.style.border="1px solid "+sa;Ga.style.borderRadius="0";N.appendChild(Ga);null!=Ba&&null!=Ba.gradient&&(Ma=Ga.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.gradient).light+") 100%)",Ma.style.clipPath=
-"polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",N.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ga.click()}))});N.innerText="";if(null!=ya)for(var Aa=0;Aa<ya.length;Aa++)0<Aa&&0==mxUtils.mod(Aa,4)&&mxUtils.br(N),Ia(ya[Aa])});null==this.format.currentScheme?fa(Math.min(W.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):fa(this.format.currentScheme);U=10>=this.defaultColorSchemes.length?43:23;var la=document.createElement("div");
-la.className="geButton";la.style.cssText="position:absolute;left:0px;bottom:"+U+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(la,"click",mxUtils.bind(this,function(){fa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var qa=document.createElement("div");qa.className="geButton";qa.style.cssText="position:absolute;left:186px;bottom:"+U+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&
-(k.appendChild(la),k.appendChild(qa));mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){fa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));na(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(T)}return k}}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.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=
-function(k,v){var I=Graph.fontMapping[v];null==I&&Graph.isCssFontUrl(v)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(v))):(null==I&&(I='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+v+'");\n}'),k=document.createElement("style"),mxUtils.write(k,I));return k};Graph.addRecentCustomFont=function(k,v){};Graph.addFont=function(k,v,I,N){if(null!=k&&0<k.length&&null!=
-v&&0<v.length){N=null!=N?N:Graph.customFontElements;var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var W=N[T];null!=W&&W.url!=v&&(W.elt.parentNode.removeChild(W.elt),W=null);null==W?(W=v,"http:"==v.substring(0,5)&&(W=PROXY_URL+"?url="+encodeURIComponent(v)),W={name:k,url:v,elt:Graph.createFontElement(k,W)},N[T]=W,v=N==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=I&&("link"==W.elt.nodeName.toLowerCase()?(W.elt.onload=I,W.elt.onerror=I):I()),null!=
-v&&v.appendChild(W.elt)):null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,v){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(v=k.url);return v};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var v=0;v<k.length;v++){var I=k[v].getAttribute("data-font-src");if(null!=I){var N="FONT"==k[v].nodeName?k[v].getAttribute("face"):k[v].style.fontFamily;null!=N&&Graph.addFont(N,I)}}};Graph.processFontStyle=function(k){if(null!=k){var v=mxUtils.getValue(k,
-"fontSource",null);if(null!=v){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(v))}catch(N){}}}return k};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.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";
-Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var n=Graph.prototype.init;Graph.prototype.init=function(){function k(T){v=T}n.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var v=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(T){v=null});this.isMouseInsertPoint=function(){return null!=
-v};var I=this.getInsertPoint;this.getInsertPoint=function(T){return null==v||T?I.apply(this,arguments):this.getPointForEvent(v)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var W=this.graph.getCellStyle(T);if(null!=W&&"rack"==W.childLayout){var U=new mxStackLayout(this.graph,!1);U.gridSize=null!=W.rackUnitSize?parseFloat(W.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;U.marginLeft=W.marginLeft||0;U.marginRight=W.marginRight||0;U.marginTop=
-W.marginTop||0;U.marginBottom=W.marginBottom||0;U.allowGaps=W.allowGaps||0;U.horizontal="1"==mxUtils.getValue(W,"horizontalRack","0");U.resizeParent=!1;U.fill=!0;return U}return N.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,I,N,T,W,U,Y,fa,na,
-la,qa){F.apply(this,arguments);Graph.processFontAttributes(qa)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,I,N){function T(){for(var Aa=Y.getSelectionCells(),Ba=[],Ga=0;Ga<Aa.length;Ga++)Y.isCellVisible(Aa[Ga])&&Ba.push(Aa[Ga]);Y.setSelectionCells(Ba)}function W(Aa){Y.setHiddenTags(Aa?[]:fa.slice());T();Y.refresh()}function U(Aa,
-Ba){la.innerText="";if(0<Aa.length){var Ga=document.createElement("table");Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";var Ma=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var sa=0;sa<Aa.length;sa++)(function(Ca){function Da(){var za=Y.getCellsForTags([Ca],null,null,!0);Y.isEnabled()?Y.setSelectionCells(za):Y.highlightCells(za,null,null,70)}var va=0>mxUtils.indexOf(Y.hiddenTags,Ca),Na=document.createElement("tr"),
-Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";var Ua=document.createElement("img");Ua.setAttribute("src",va?Editor.visibleImage:Editor.hiddenImage);Ua.setAttribute("title",mxResources.get(va?"hideIt":"show",[Ca]));mxUtils.setOpacity(Ua,va?75:25);Ua.className="geAdaptiveAsset";Ua.style.verticalAlign="middle";Ua.style.cursor="pointer";Ua.style.width="16px";if(v||Editor.isDarkMode())Ua.style.filter="invert(100%)";Sa.appendChild(Ua);mxEvent.addListener(Ua,"click",function(za){mxEvent.isShiftDown(za)?
-W(0<=mxUtils.indexOf(Y.hiddenTags,Ca)):(Y.toggleHiddenTag(Ca),T(),Y.refresh());mxEvent.consume(za)});Na.appendChild(Sa);Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";Ua=document.createElement("img");Ua.setAttribute("src",Editor.selectImage);Ua.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ua,va?75:25);Ua.className="geAdaptiveAsset";Ua.style.verticalAlign="middle";Ua.style.cursor="pointer";Ua.style.width="16px";if(v||Editor.isDarkMode())Ua.style.filter=
-"invert(100%)";mxEvent.addListener(Ua,"click",function(za){W(!0);Da();mxEvent.consume(za)});Sa.appendChild(Ua);Na.appendChild(Sa);Sa=document.createElement("td");Sa.style.overflow="hidden";Sa.style.whiteSpace="nowrap";Sa.style.textOverflow="ellipsis";Sa.style.verticalAlign="middle";Sa.style.cursor="pointer";Sa.setAttribute("title",Ca);a=document.createElement("a");mxUtils.write(a,Ca);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,va?100:40);Sa.appendChild(a);mxEvent.addListener(Sa,
-"click",function(za){if(mxEvent.isShiftDown(za))W(!0),Da();else if(va&&0<Y.hiddenTags.length)W(!0);else{var Ea=fa.slice(),B=mxUtils.indexOf(Ea,Ca);Ea.splice(B,1);Y.setHiddenTags(Ea);T();Y.refresh()}mxEvent.consume(za)});Na.appendChild(Sa);if(Y.isEnabled()){Sa=document.createElement("td");Sa.style.verticalAlign="middle";Sa.style.textAlign="center";Sa.style.width="18px";if(null==Ba){Sa.style.align="center";Sa.style.width="16px";Ua=document.createElement("img");Ua.setAttribute("src",Editor.trashImage);
-Ua.setAttribute("title",mxResources.get("removeIt",[Ca]));mxUtils.setOpacity(Ua,va?75:25);Ua.className="geAdaptiveAsset";Ua.style.verticalAlign="middle";Ua.style.cursor="pointer";Ua.style.width="16px";if(v||Editor.isDarkMode())Ua.style.filter="invert(100%)";mxEvent.addListener(Ua,"click",function(za){var Ea=mxUtils.indexOf(fa,Ca);0<=Ea&&fa.splice(Ea,1);Y.removeTagsForCells(Y.model.getDescendants(Y.model.getRoot()),[Ca]);Y.refresh();mxEvent.consume(za)});Sa.appendChild(Ua)}else{var Qa=document.createElement("input");
-Qa.setAttribute("type","checkbox");Qa.style.margin="0px";Qa.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,Ca);Qa.checked=Qa.defaultChecked;Qa.style.background="transparent";Qa.setAttribute("title",mxResources.get(Qa.defaultChecked?"removeIt":"add",[Ca]));mxEvent.addListener(Qa,"change",function(za){Qa.checked?Y.addTagsForCells(Y.getSelectionCells(),[Ca]):Y.removeTagsForCells(Y.getSelectionCells(),[Ca]);mxEvent.consume(za)});Sa.appendChild(Qa)}Na.appendChild(Sa)}Ma.appendChild(Na)})(Aa[sa]);Ga.appendChild(Ma);
-la.appendChild(Ga)}}var Y=this,fa=Y.hiddenTags.slice(),na=document.createElement("div");na.style.userSelect="none";na.style.overflow="hidden";na.style.padding="10px";na.style.height="100%";var la=document.createElement("div");la.style.position="absolute";la.style.boxSizing="border-box";la.style.userSelect="none";la.style.overflow="auto";la.style.padding="3px";la.style.left="0px";la.style.right="0px";la.style.top="0px";la.style.bottom="0px";na.appendChild(la);Y.addListener(mxEvent.ROOT,function(){fa=
-Y.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Aa,Ba){if(k()){Aa=Y.getAllTags();for(Ba=0;Ba<Aa.length;Ba++)0>mxUtils.indexOf(fa,Aa[Ba])&&fa.push(Aa[Ba]);fa.sort();Y.isSelectionEmpty()?U(fa):U(fa,Y.getCommonTagsForCells(Y.getSelectionCells()))}});Y.selectionModel.addListener(mxEvent.CHANGE,qa);Y.model.addListener(mxEvent.CHANGE,qa);Y.addListener(mxEvent.REFRESH,qa);var ya=document.createElement("div");ya.className="geToolbarContainer geDialogToolbar";ya.style.position="absolute";ya.style.display=
-"flex";ya.style.bottom="0px";ya.style.left="0px";ya.style.right="0px";ya.style.height="32px";ya.style.overflow="hidden";ya.style.padding="3px 4px 4px 4px";ya.style.borderWidth="1px 0px 0px 0px";ya.style.borderStyle="solid";ya.style.whiteSpace="nowrap";if(Y.isEnabled()){la.style.bottom="32px";var wa=document.createElement("a");wa.className="geButton";var Ia=wa.cloneNode(!1);Ia.style.backgroundImage="url("+Editor.visibleImage+")";Ia.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(Ia,
-"click",function(Aa){Y.setHiddenTags([]);mxEvent.isShiftDown(Aa)||(fa=Y.hiddenTags.slice());T();Y.refresh();mxEvent.consume(Aa)});ya.appendChild(Ia);null!=I&&(wa=wa.cloneNode(!1),wa.style.backgroundImage="url("+Editor.plusImage+")",wa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(wa,"click",function(Aa){I(fa,function(Ba){fa=Ba;qa()});mxEvent.consume(Aa)}),ya.appendChild(wa));na.appendChild(ya)}null!=N&&ya.appendChild(N);return{div:na,refresh:qa}};Graph.prototype.getCustomFonts=
-function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var I=Graph.customFontElements[v];k.push({name:I.name,url:I.url})}return k};Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var I=Editor.guid();document.execCommand("fontname",!1,I);for(var N=this.cellEditor.textarea.getElementsByTagName("font"),T=!1,W=0;W<N.length;W++)N[W].getAttribute("face")==I&&(T=!0,N[W].setAttribute("face",k),null!=v?N[W].setAttribute("data-font-src",v):N[W].removeAttribute("data-font-src"));
-T||document.execCommand("fontname",!1,k)};var M=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return M.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 k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var v in k)this.globalVars[v]=k[v]}catch(I){null!=
-window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var L=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var v=L.apply(this,arguments);null==v&&null!=this.globalVars&&(v=this.globalVars[k]);return v};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};
-Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,v,I,N,T,W,U,Y,fa,na,la,qa,ya,wa,Ia,Aa){var Ba=K.apply(this,arguments);if(null!=qa){var Ga=Ba.getAttribute("style");null==Ga&&(Ga="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ba.setAttribute("style",Ga+(" color-scheme: "+qa+";"))}var Ma=this.getCustomFonts();if(la&&0<Ma.length){var sa=Ba.ownerDocument;Ga=null!=sa.createElementNS?
-sa.createElementNS(mxConstants.NS_SVG,"style"):sa.createElement("style");null!=sa.setAttributeNS?Ga.setAttributeNS("type","text/css"):Ga.setAttribute("type","text/css");for(var Ca="",Da="",va=0;va<Ma.length;va++){var Na=Ma[va].name,Sa=Ma[va].url;Graph.isCssFontUrl(Sa)?Ca+="@import url("+Graph.rewriteGoogleFontUrl(Sa)+");\n":Da+='@font-face {\nfont-family: "'+Na+'";\nsrc: url("'+Sa+'");\n}\n'}Ga.appendChild(sa.createTextNode(Ca+Da));Ba.getElementsByTagName("defs")[0].appendChild(Ga)}Editor.replaceSvgDataUris&&
-null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(Ba);this.mathEnabled&&(document.body.appendChild(Ba),Editor.MathJaxRender(Ba),Ba.parentNode.removeChild(Ba),Ga=Ba.ownerDocument.getElementById("MJX-SVG-styles"),null!=Ga&&Ba.getElementsByTagName("defs")[0].appendChild(Ga.cloneNode(!0)));return Ba};var Z=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){Z.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=
-null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ha=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ha.apply(this,arguments);this.enumerationState=0};var ca=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return ca.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,
-"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var v="1"==mxUtils.getValue(k.style,"enumerate",0);v&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,
-this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):v||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);v=k.secondLabel;if(null!=v){var I=k.view.scale,N=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*I,k.y+4*I,0,0):mxRectangle.fromPoint(k.view.getPoint(k));v.bounds.equals(k)&&v.value==N&&v.scale==I||(v.bounds=k,v.value=N,v.scale=I,v.redraw())}};var aa=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();
-aa.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var oa=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){oa.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,v){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&
-this.executeCustomActions(k.actions,null,v))};Graph.prototype.executeCustomActions=function(k,v,I){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 N=!1,T=0,W=0,U=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),Y=mxUtils.bind(this,
-function(){N&&(N=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<T&&T--;0==T&&na()}),na=mxUtils.bind(this,function(){if(W<k.length){var la=this.stoppingCustomActions,qa=k[W++],ya=[];if(null!=qa.open)if(Y(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,I))return}else this.openLink(qa.open);null==qa.wait||la||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;fa()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=qa.wait?parseInt(qa.wait):1E3),Y());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,fa,la?0:qa.fadeIn.delay));null!=qa.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,fa,la?0:qa.fadeOut.delay));null!=qa.wipeIn&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,
-!0),!0)));null!=qa.wipeOut&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(U(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){U();var wa=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(wa),1);this.setCellsVisible(wa,!0)}null!=qa.hide&&(U(),wa=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(wa),0),this.setCellsVisible(wa,!1));null!=qa.toggleStyle&&null!=
-qa.toggleStyle.key&&(U(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(U(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));wa=[];null!=qa.select&&this.isEnabled()&&(wa=this.getCellsForAction(qa.select),this.setSelectionCells(wa));null!=qa.highlight&&(wa=this.getCellsForAction(qa.highlight),this.highlightCells(wa,qa.highlight.color,
-qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(wa=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<wa.length&&this.scrollCellToVisible(wa[0]);null!=I&&null!=qa.explore&&Graph.exploreFromCell(this,I,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var Ia=qa.tags.toggle;0==Ia.length&&(Ia=this.getAllTags());for(wa=0;wa<Ia.length;wa++)this.toggleHiddenTag(Ia[wa])}Ia=null;null!=qa.tags.hidden&&(null==Ia&&(Ia=[]),Ia=Ia.concat(qa.tags.hidden));
-if(null!=qa.tags.visible){null==Ia&&(Ia=[]);var Aa=this.getAllTags();for(wa=0;wa<Aa.length;wa++)0>mxUtils.indexOf(qa.tags.visible,Aa[wa])&&0>mxUtils.indexOf(Ia,Aa[wa])&&Ia.push(Aa[wa])}null!=Ia&&this.setHiddenTags(Ia);this.refresh()}0<ya.length&&(T++,this.executeAnimations(ya,fa,la?1:qa.steps,la?0:qa.delay));0==T?na():Y()}else this.stoppingCustomActions=this.executingCustomActions=!1,Y(),null!=v&&v()});na()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var I=this.getLinkForCell(v);null!=
-I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,I));if(this.isHtmlLabel(v)){var N=document.createElement("div");N.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var T=N.getElementsByTagName("a"),W=!1,U=0;U<T.length;U++)I=T[U].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(T[U].setAttribute("href",this.updateCustomLink(k,I)),W=!0);W&&this.labelChanged(v,N.innerHTML)}};Graph.prototype.updateCustomLink=function(k,v){if("data:action/json,"==
-v.substring(0,17))try{var I=JSON.parse(v.substring(17));null!=I.actions&&(this.updateCustomLinkActions(k,I.actions),v="data:action/json,"+JSON.stringify(I))}catch(N){}return v};Graph.prototype.updateCustomLinkActions=function(k,v){for(var I=0;I<v.length;I++){var N=v[I],T;for(T in N)this.updateCustomLinkAction(k,N[T],"cells"),this.updateCustomLinkAction(k,N[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,I){if(null!=v&&null!=v[I]){for(var N=[],T=0;T<v[I].length;T++)if("*"==
-v[I][T])N.push(v[I][T]);else{var W=k[v[I][T]];null!=W?""!=W&&N.push(W):N.push(v[I][T])}v[I]=N}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,v));if(null!=k.excludeCells){for(var I=[],N=0;N<v.length;N++)0>k.excludeCells.indexOf(v[N].id)&&I.push(v[N]);v=I}return v};Graph.prototype.getCellsById=function(k){var v=[];if(null!=k)for(var I=0;I<k.length;I++)if("*"==k[I]){var N=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(W){return W!=
-N},N))}else{var T=this.model.getCell(k[I]);null!=T&&v.push(T)}return v};var da=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return da.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var v=mxUtils.indexOf(this.hiddenTags,k);0>v?this.hiddenTags.push(k):0<=v&&this.hiddenTags.splice(v,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
-Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;for(var v=0;v<k.length;v++)if(0>mxUtils.indexOf(this.hiddenTags,k[v]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,v,I,N){var T=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var W=0,U={},Y=0;Y<k.length;Y++)0<k[Y].length&&(U[k[Y]]=!0,W++);for(Y=0;Y<v.length;Y++)if(I&&this.model.getParent(v[Y])==
-this.model.root||this.model.isVertex(v[Y])||this.model.isEdge(v[Y])){var fa=this.getTagsForCell(v[Y]),na=!1;if(0<fa.length&&(fa=fa.split(" "),fa.length>=k.length)){for(var la=na=0;la<fa.length&&na<W;la++)null!=U[fa[la]]&&na++;na=na==W}na&&(1!=N||this.isCellVisible(v[Y]))&&T.push(v[Y])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,I=[],N=0;N<k.length;N++){var T=
-this.getTagsForCell(k[N]);I=[];if(0<T.length){T=T.split(" ");for(var W={},U=0;U<T.length;U++)if(null==v||null!=v[T[U]])W[T[U]]=!0,I.push(T[U]);v=W}else return[]}return I};Graph.prototype.getTagsForCells=function(k){for(var v=[],I={},N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);if(0<T.length){T=T.split(" ");for(var W=0;W<T.length;W++)null==I[T[W]]&&(I[T[W]]=!0,v.push(T[W]))}}return v};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=
-function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){for(var N=this.getTagsForCell(k[I]),T=N.split(" "),W=!1,U=0;U<v.length;U++){var Y=mxUtils.trim(v[U]);""!=Y&&0>mxUtils.indexOf(T,Y)&&(N=0<N.length?N+" "+Y:Y,W=!0)}W&&this.setAttributeForCell(k[I],"tags",N)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){var N=this.getTagsForCell(k[I]);
-if(0<N.length){for(var T=N.split(" "),W=!1,U=0;U<v.length;U++){var Y=mxUtils.indexOf(T,v[U]);0<=Y&&(T.splice(Y,1),W=!0)}W&&this.setAttributeForCell(k[I],"tags",T.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var v=0;v<k.length;v++)this.model.setVisible(k[v],!this.model.isVisible(k[v]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,v){this.model.beginUpdate();try{for(var I=0;I<k.length;I++)this.model.setVisible(k[I],
-v)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,v,I,N){for(var T=0;T<k.length;T++)this.highlightCell(k[T],v,I,N)};Graph.prototype.highlightCell=function(k,v,I,N,T){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;k=this.view.getState(k);var W=null;null!=k&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+T),W=new mxCellHighlight(this,v,T,!1),null!=N&&(W.opacity=N),W.highlight(k),window.setTimeout(function(){null!=W.shape&&
-(mxUtils.setPrefixedStyle(W.shape.node.style,"transition","all 1200ms ease-in-out"),W.shape.node.style.opacity=0);window.setTimeout(function(){W.destroy()},1200)},I));return W};Graph.prototype.addSvgShadow=function(k,v,I,N){N=null!=N?N:!0;var T=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=I&&I||(v=null!=v?v:k.getElementsByTagName("g")[0],null!=v&&(this.updateShadowFilter(v,!0),!isNaN(parseInt(k.getAttribute("width")))&&N&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+T),k.setAttribute("height",
-parseInt(k.getAttribute("height"))+T),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+T,h=parseFloat(v[3])+T,k.setAttribute("viewBox",v[0]+" "+v[1]+" "+w+" "+h))))));return T};Graph.prototype.updateShadowFilter=function(k,v){mxClient.IS_SF||(v?(v=mxUtils.getLightDarkColor(this.svgShadowColor,this.svgShadowOpacity),k.style.filter="drop-shadow("+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowBlur)/
-100+"px "+v.cssText+")"):k.style.filter="")};Graph.prototype.setShadowVisible=function(k,v){v=null!=v?v:!0;this.shadowVisible=k;this.updateShadowFilter(this.view.getDrawPane(),this.shadowVisible);v&&this.fireEvent(new mxEventObject("shadowVisibleChanged"))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=
-this.model.getChildCount(this.model.root),v=0;do var I=this.model.getChildAt(this.model.root,v);while(v++<k&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};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",STENCIL_PATH+"/kubernetes2.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=
-[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",
-STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",
-STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/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.ibmcloud=[STENCIL_PATH+"/ibm_cloud.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.networks2=[SHAPES_PATH+"/mxNetworks2.js",
-STENCIL_PATH+"/networks2.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"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];
-mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var ka=mxMarker.createMarker;mxMarker.createMarker=function(k,v,I,N,T,W,U,Y,fa,na){if(null!=I&&null==mxMarker.markers[I]){var la=this.getPackageForType(I);null!=la&&mxStencilRegistry.getStencil(la)}return ka.apply(this,
-arguments)};var ba=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,I,N,T,W){"1"==mxUtils.getValue(v.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ba.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,I,N){function T(){Ia.value=Math.max(1,Math.min(la,Math.max(parseInt(Ia.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(la,Math.min(parseInt(Ia.value),parseInt(wa.value))))}function W(ua){k.lastPrintPagesRadioChecked=
-ya.checked;k.lastPrintSelectionOnlyChecked=Ba.checked;k.lastPrintCropRadioChecked=Ma.checked;k.lastPrintFitRadioChecked=sa.checked;ya.checked&&wa.value<Ia.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ia.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);R.value=Math.max(1,Math.min(1600,parseInt(R.value)))+"%";k.lastPrintZoom=R.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=X.checked;k.lastPrintTransparent=ja.checked;k.lastPrintInclude=pa.checked;k.lastPrintSheetsAcross=
-Ea.value;k.lastPrintSheetsDown=B.value;var Ka={};Ka.border=parseInt(Q.value);Ka.scale=parseInt(R.value)/100;Ka.grid=X.checked;Ka.shadows=ia.checked;Ka.transparent=ja.checked;Ka.includeCopy=pa.checked;Ka.sheetsAcross=parseInt(Ea.value);Ka.sheetsDown=parseInt(B.value);Ka.pagesFrom=parseInt(wa.value);Ka.pagesTo=parseInt(Ia.value);Ka.allPages=qa.checked;Ka.selection=Ba.checked;Ka.pageView=Ga.checked;Ka.crop=Ma.checked;Ka.fit=sa.checked;return null!=I?I(!ua,Ka):k.print(!ua,Ka)}var U=k.editor.graph,Y=document.createElement("div"),
-fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";fa.style.marginTop="0px";mxUtils.write(fa,v||mxResources.get("print"));Y.appendChild(fa);var na=1,la=1;fa=document.createElement("div");fa.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name","pages-printdialog");fa.appendChild(qa);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));
-mxEvent.addListener(v,"click",function(){qa.checked=!0});fa.appendChild(v);mxUtils.br(fa);var ya=qa.cloneNode(!0);fa.appendChild(ya);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");fa.appendChild(v);mxEvent.addListener(v,"click",function(){ya.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type","number");wa.setAttribute("min","1");wa.style.width="40px";fa.appendChild(wa);v=document.createElement("span");
-mxUtils.write(v,mxResources.get("to"));fa.appendChild(v);var Ia=wa.cloneNode(!0);fa.appendChild(Ia);mxEvent.addListener(wa,"focus",function(){ya.checked=!0});mxEvent.addListener(Ia,"focus",function(){ya.checked=!0});mxEvent.addListener(wa,"change",T);mxEvent.addListener(Ia,"change",T);if(null!=k.pages&&(la=k.pages.length,null!=k.currentPage))for(var Aa=0;Aa<la;Aa++)if(k.currentPage==k.pages[Aa]){na=Aa+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(la,Math.max(1,
-k.lastPrintPagesFromInput)),Ia.value=Math.min(la,Math.max(1,k.lastPrintPagesToInput))):(wa.value=na,Ia.value=na);wa.setAttribute("max",la);Ia.setAttribute("max",la);Aa=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=na;Ia.value=na;ya.checked=!0});Aa.setAttribute("title",mxResources.get("currentPage"));Aa.style.marginLeft="4px";Aa.style.maxWidth="100px";Aa.style.overflow="hidden";Aa.style.textOverflow="ellipsis";Aa.style.whiteSpace="nowrap";fa.appendChild(Aa);1<la&&Y.appendChild(fa);
-fa=document.createElement("div");fa.style.borderBottom="1px solid lightGray";fa.style.paddingBottom="12px";fa.style.marginBottom="12px";fa.style.whiteSpace="nowrap";var Ba=document.createElement("input");Ba.setAttribute("name","pages-printdialog");Ba.setAttribute("type",1==la?"checkbox":"radio");Ba.style.marginRight="8px";U.isSelectionEmpty()&&Ba.setAttribute("disabled","disabled");U.isEnabled()&&(fa.appendChild(Ba),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),
-fa.appendChild(v));(U.isEnabled()||1<la)&&Y.appendChild(fa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?ya.checked=!0:!U.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ba.checked=!0:qa.checked=!0;U.isSelectionEmpty()||mxEvent.addListener(v,"click",function(){Ba.checked=!Ba.checked});U=document.createElement("div");U.style.whiteSpace="nowrap";var Ga=document.createElement("input");Ga.style.marginBottom="8px";Ga.style.marginRight="8px";Ga.setAttribute("type","radio");Ga.setAttribute("name",
-"printSize");U.appendChild(Ga);v=document.createElement("span");mxUtils.write(v,mxResources.get("pageView"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ga.checked=!0});Y.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var Ma=document.createElement("input");Ma.style.marginBottom="8px";Ma.style.marginRight="8px";Ma.setAttribute("type","radio");Ma.setAttribute("name","printSize");U.appendChild(Ma);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));
-U.appendChild(v);mxEvent.addListener(U,"click",function(){Ma.checked=!0});Y.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginBottom="8px";sa.style.marginRight="8px";sa.setAttribute("type","radio");sa.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(sa);U.appendChild(v);fa=document.createElement("table");fa.style.display=
-"inline-block";fa.style.borderSpacing="0";Aa=document.createElement("tbody");var Ca=document.createElement("tr"),Da=Ca.cloneNode(!0),va=document.createElement("td"),Na=va.cloneNode(!0),Sa=va.cloneNode(!0),Ua=va.cloneNode(!0),Qa=va.cloneNode(!0),za=va.cloneNode(!0);va.style.textAlign="right";Ua.style.textAlign="right";mxUtils.write(va,mxResources.get("fitTo"));mxEvent.addListener(U,"click",function(ua){mxEvent.getSource(ua)!=sa&&(sa.checked=!sa.checked)});var Ea=document.createElement("input");Ea.style.margin=
-"0 2px";Ea.style.boxSizing="border-box";Ea.setAttribute("value",k.lastPrintSheetsAcross||"1");Ea.setAttribute("min","1");Ea.setAttribute("type","number");Ea.style.width="40px";Na.appendChild(Ea);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));Sa.appendChild(v);mxUtils.write(Ua,mxResources.get("fitToBy"));var B=Ea.cloneNode(!0);B.setAttribute("value",k.lastPrintSheetsDown||"1");Qa.appendChild(B);mxEvent.addListener(Ea,"click",function(ua){sa.checked=!0;mxEvent.consume(ua)});
-mxEvent.addListener(B,"click",function(ua){sa.checked=!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?Ma.checked=!0:k.lastPrintFitRadioChecked?sa.checked=!0:Ga.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));za.appendChild(v);Ca.appendChild(va);Ca.appendChild(Na);Ca.appendChild(Sa);Da.appendChild(Ua);Da.appendChild(Qa);Da.appendChild(za);Aa.appendChild(Ca);Aa.appendChild(Da);fa.appendChild(Aa);U.appendChild(fa);Y.appendChild(U);U=document.createElement("div");
-U.style.borderTop="1px solid lightGray";U.style.whiteSpace="nowrap";U.style.paddingTop="12px";U.style.marginTop="12px";U.style.paddingLeft="8px";mxUtils.write(U,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;U.appendChild(Q);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,
-mxResources.get("zoom")+":");U.appendChild(v);var R=document.createElement("input");R.style.width="60px";R.style.marginLeft="4px";R.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(R);mxUtils.br(U);var X=document.createElement("input");X.setAttribute("type","checkbox");X.style.marginTop="12px";X.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(X);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));
-U.appendChild(v);mxEvent.addListener(v,"click",function(ua){X.checked=!0;mxEvent.consume(ua)});var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintShadow?k.lastPrintShadow:!1;U.appendChild(ia);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("shadows"));U.appendChild(v);k.isOffline()&&!mxClient.IS_CHROMEAPP||v.appendChild(k.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));
-mxEvent.addListener(v,"click",function(ua){"IMG"!=mxEvent.getSource(ua).nodeName&&(ia.checked=!0,mxEvent.consume(ua))});Editor.enableShadowOption?null!=I&&mxUtils.br(U):(ia.style.display="none",v.style.display="none");var ja=document.createElement("input");ja.setAttribute("type","checkbox");ja.style.marginTop="10px";ja.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(U.appendChild(ja),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),
-U.appendChild(v),mxEvent.addListener(v,"click",function(ua){ja.checked=!0;mxEvent.consume(ua)}));var pa=document.createElement("input");pa.setAttribute("type","checkbox");pa.style.marginTop="10px";pa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(U),U.appendChild(pa),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),U.appendChild(v),
-mxEvent.addListener(v,"click",function(ua){pa.checked=!0;mxEvent.consume(ua)}));Y.appendChild(U);v=document.createElement("div");v.style.marginTop="30px";v.style.textAlign="right";v.style.whiteSpace="nowrap";k.isOffline()&&!mxClient.IS_CHROMEAPP||null!=I||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));U=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});U.className="geBtn";k.editor.cancelFirst&&v.appendChild(U);PrintDialog.previewEnabled&&null==I&&
-(fa=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),W(!1)}catch(ua){k.handleError(ua)}}),fa.className="geBtn",v.appendChild(fa));N=null!=N?N:null!=I?"export":PrintDialog.previewEnabled?"print":"ok";N=mxUtils.button(mxResources.get(N),function(){try{k.hideDialog(),W(!0)}catch(ua){k.handleError(ua)}});N.className="geBtn gePrimaryBtn";v.appendChild(N);k.editor.cancelFirst||v.appendChild(U);Y.appendChild(v);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?
+null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.geminiApiKey&&(Editor.geminiApiKey=k.geminiApiKey);null!=k.gptModels&&(Editor.gptModels=k.gptModels);null!=k.gptUrl&&
+(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var v=document.getElementsByTagName("script")[0];if(null!=v&&null!=v.parentNode){var J=document.createElement("style");J.setAttribute("type","text/css");J.appendChild(document.createTextNode(k));v.parentNode.insertBefore(J,v);k=k.split("url(");for(J=1;J<k.length;J++){var N=k[J].indexOf(")");
+N=Editor.trimCssUrl(k[J].substring(0,N));var T=document.createElement("link");T.setAttribute("rel","preload");T.setAttribute("href",N);T.setAttribute("as","font");T.setAttribute("crossorigin","");v.parentNode.insertBefore(T,v)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
+Editor.GUID_LENGTH=20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var v=[],J=0;J<k;J++)v.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return v.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},
+{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.generateTimeout=6E4;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(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var v=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(v)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[v]),Error(mxResources.get("notADiagramFile")+" ("+v+")");if("mxGraphModel"==k.nodeName){v=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=v&&""!=
+v)v!=this.graph.currentStyle&&(J=null!=this.graph.themes?this.graph.themes[v]:mxUtils.load(STYLE_PATH+"/"+v+".xml").getDocumentElement(),null!=J&&(N=new mxCodec(J.ownerDocument),N.decode(J,this.graph.getStylesheet())));else{var J=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=J){var N=new mxCodec(J.ownerDocument);N.decode(J,this.graph.getStylesheet())}}this.graph.currentStyle=v;this.graph.mathEnabled="1"==urlParams.math||
+"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));v=k.getAttribute("backgroundImage");null!=v?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(v)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(v=k.getAttribute("extFonts"))try{for(v=v.split("|").map(function(T){T=
+T.split("^");return{name:T[0],url:T[1]}}),J=0;J<v.length;J++)this.graph.addExtFont(v[J].name,v[J].url)}catch(T){console.log("ExtFonts format error: "+T.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 f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(k,v){k=null!=k?k:!0;var J=f.apply(this,arguments);
+null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&J.setAttribute("style",this.graph.currentStyle);var N=this.graph.getBackgroundImageObject(this.graph.backgroundImage,v);null!=N&&J.setAttribute("backgroundImage",JSON.stringify(N));J.setAttribute("math",this.graph.mathEnabled?"1":"0");J.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?J.setAttribute("adaptiveColors",this.graph.adaptiveColors):J.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&
+0<this.graph.extFonts.length&&(N=this.graph.extFonts.map(function(T){return T.name+"^"+T.url}),J.setAttribute("extFonts",N.join("|")));return J};Editor.prototype.isDataSvg=function(k){try{var v=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=v&&(null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(cont,v))),null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v)),null!=v&&0<v.length)){var J=mxUtils.parseXml(v).documentElement;return"mxfile"==
+J.nodeName||"mxGraphModel"==J.nodeName}}catch(N){}return!1};Editor.prototype.extractGraphModel=function(k,v,J){return Editor.extractGraphModel.apply(this,arguments)};var m=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
+m.apply(this,arguments)};var t=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){t.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,v){if("undefined"===typeof window.MathJax){var J=function(){N=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?
+k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var N=null;Editor.doMathJaxRender=function(U){try{null==N?(MathJax.typesetClear([U]),MathJax.typeset([U]),J()):N!=U&&Editor.mathJaxQueue.push(U)}catch(Y){MathJax.typesetClear([U]),null!=Y.retry?(N=U,Y.retry.then(function(){MathJax.typesetPromise([U]).then(J)["catch"](function(fa){console.log("Error in MathJax.typesetPromise: "+fa.toString());J()})})["catch"](function(fa){console.log("Error in MathJax.retry: "+fa.toString());J()})):null!=window.console&&
+console.log("Error in MathJax.typeset: "+Y.toString())}};window.MathJax=null!=v?v:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"],paths:{fonts:DRAW_MATH_URL+"/fonts","mathjax-tex":DRAW_MATH_URL+"/fonts/mathjax-tex-font","mathjax-mhchem-extension":DRAW_MATH_URL+"/fonts/mathjax-mhchem-font-extension","mathjax-bbm-extension":DRAW_MATH_URL+"/fonts/mathjax-bbm-font-extension",
+"mathjax-bboldx-extension":DRAW_MATH_URL+"/fonts/mathjax-bboldx-font-extension","mathjax-dsfont-extension":DRAW_MATH_URL+"/fonts/mathjax-dsfont-font-extension"}},output:{font:"mathjax-tex"},startup:{pageReady:function(){for(var U=0;U<Editor.mathJaxQueue.length;U++)Editor.doMathJaxRender(Editor.mathJaxQueue[U])}}};Editor.MathJaxRender=function(U){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(U):Editor.mathJaxQueue.push(U)};Editor.onMathJaxDone=function(){};
+var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(Y,fa){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var W=document.createElement("script");W.setAttribute("type","text/javascript");W.setAttribute("src",k);v[0].parentNode.appendChild(W)}}};
+Editor.prototype.csvToArray=function(k){if(0<k.length){var v="",J=[""],N=0,T=!0,W;k=$jscomp.makeIterator(k);for(W=k.next();!W.done;W=k.next())W=W.value,'"'===W?(T&&W===v&&(J[N]+=W),T=!T):","===W&&T?W=J[++N]="":J[N]+=W,v=W;return J}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var J=
+"t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+J+(v?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.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(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||
+"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var v=k.convert,J=this;k.convert=function(N){null!=N&&navigator.onLine&&("http://"!=N.substring(0,7)&&"https://"!=N.substring(0,8)||N.substring(0,k.baseUrl.length)==k.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(N)?"chrome-extension://"!=N.substring(0,19)&&(N=v.apply(this,arguments)):N=PROXY_URL+
+"?url="+encodeURIComponent(N));return N};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,J,N,T){try{var W=!0,U=window.setTimeout(mxUtils.bind(this,function(){W=!1;v(k)}),this.timeout),Y=mxUtils.bind(this,function(){null!=N?this.convertImageToDataUri(k,v,J,N,!0):v(k)});if(/(\.svg)$/i.test(k)&&!T)mxUtils.get(k,mxUtils.bind(this,function(oa){window.clearTimeout(U);W&&(200>oa.getStatus()||
+299<oa.getStatus()?Y():v(Editor.createSvgDataUri(oa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(U);W&&Y()}));else{var fa=new Image;this.crossOriginImages&&(fa.crossOrigin="anonymous");fa.onload=function(){window.clearTimeout(U);if(W)try{N=null!=N&&T?N:1;var oa=document.createElement("canvas"),la=oa.getContext("2d");la.scale(N,N);oa.height=fa.height*N;oa.width=fa.width*N;la.drawImage(fa,0,0);v(oa.toDataURL())}catch(qa){v(k)}};fa.onerror=function(){window.clearTimeout(U);W&&(null!=
+J?J():v(k))};fa.src=k}}catch(oa){null!=J?J():v(k)}};Editor.prototype.convertImages=function(k,v,J,N){function T(){0<W.length?W.shift()():v(k)}null==N&&(N=this.createImageUrlConverter());var W=[],U=J||{};J=mxUtils.bind(this,function(Y,fa){Y=k.getElementsByTagName(Y);for(var oa=0;oa<Y.length;oa++)mxUtils.bind(this,function(la){W.push(mxUtils.bind(this,function(){try{if(null!=la){var qa=N.convert(la.getAttribute(fa));if(null!=qa&&"data:"!=qa.substring(0,5)){var ya=U[qa];null==ya?this.convertImageToDataUri(qa,
+function(wa){null!=wa&&(U[qa]=wa,la.setAttribute(fa,wa));T()},null,Editor.svgRasterScale):(la.setAttribute(fa,ya),T())}else null!=qa&&la.setAttribute(fa,qa),T()}}catch(wa){T()}}))})(Y[oa])});J("image","xlink:href");J("img","src");T()};Editor.base64Encode=function(k){for(var v="",J=0,N=k.length,T,W,U;J<N;){T=k.charCodeAt(J++)&255;if(J==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
+3)<<4);v+="==";break}W=k.charCodeAt(J++);if(J==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(W&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((W&15)<<2);v+="=";break}U=k.charCodeAt(J++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
+3)<<4|(W&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((W&15)<<2|(U&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U&63)}return v};Editor.prototype.loadUrl=function(k,v,J,N,T,W,U,Y){try{var fa=!U&&(N||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));T=null!=T?T:!0;var oa=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(la){200<=la.getStatus()&&
+299>=la.getStatus()?null!=v&&(la=la.getText(),fa&&(W=null!=W?W:"data:image/png;base64,",la=W+Editor.base64Encode(la)),v(la)):null!=J&&(0==la.getStatus()?J({message:mxResources.get("accessDenied")},la):404==la.getStatus()?J({message:mxResources.get("fileNotFound"),code:la.getStatus()},la):J({message:this.getErrorMessage(la)},la))}),function(la){null!=J&&J({message:mxResources.get("error")+" "+la.getStatus()})},fa,this.timeout,function(){T&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:oa})},Y)});oa()}catch(la){null!=
+J&&J(la)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var J=k.getText(),N=JSON.parse(J);null!=N&&null!=N.error&&null!=N.error.message&&(v=N.error.message+" ("+v+")")}catch(T){}return v};Editor.prototype.absoluteCssFonts=function(k){var v=null;if(null!=k){var J=k.split("url(");if(0<J.length){v=[J[0]];k=window.location.pathname;var N=null!=k?k.lastIndexOf("/"):-1;0<=N&&(k=k.substring(0,N+1));N=document.getElementsByTagName("base");var T=null;null!=
+N&&0<N.length&&(T=N[0].getAttribute("href"));for(var W=1;W<J.length;W++)if(N=J[W].indexOf(")"),0<N){var U=Editor.trimCssUrl(J[W].substring(0,N));this.graph.isRelativeUrl(U)&&(U=null!=T?T+U:window.location.protocol+"//"+window.location.hostname+("/"==U.charAt(0)?"":k)+U);v.push('url("'+U+'"'+J[W].substring(N))}else v.push(J[W])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,J){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+encodeURIComponent(v));
+J(k,v)};Editor.prototype.embedCssFonts=function(k,v){var J=k.split("url("),N=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==N){for(var fa=[J[0]],oa=1;oa<J.length;oa++){var la=J[oa].indexOf(")");fa.push('url("');fa.push(this.cachedFonts[Editor.trimCssUrl(J[oa].substring(0,la))]);fa.push('"'+J[oa].substring(la))}v(fa.join(""))}});if(0<J.length){for(k=1;k<J.length;k++){var W=J[k].indexOf(")"),U=null,Y=J[k].indexOf("format(",W);0<Y&&(U=Editor.trimCssUrl(J[k].substring(Y+
+7,J[k].indexOf(")",Y))));mxUtils.bind(this,function(fa){if(null==this.cachedFonts[fa]){this.cachedFonts[fa]=fa;N++;var oa="application/x-font-ttf";if("svg"==U||/(\.svg)($|\?)/i.test(fa))oa="image/svg+xml";else if("otf"==U||"embedded-opentype"==U||/(\.otf)($|\?)/i.test(fa))oa="application/x-font-opentype";else if("woff"==U||/(\.woff)($|\?)/i.test(fa))oa="application/font-woff";else if("woff2"==U||/(\.woff2)($|\?)/i.test(fa))oa="application/font-woff2";else if("eot"==U||/(\.eot)($|\?)/i.test(fa))oa=
+"application/vnd.ms-fontobject";else if("sfnt"==U||/(\.sfnt)($|\?)/i.test(fa))oa="application/font-sfnt";this.mapFontUrl(oa,fa,mxUtils.bind(this,function(la,qa){this.loadUrl(qa,mxUtils.bind(this,function(ya){this.cachedFonts[fa]=ya;N--;T()}),mxUtils.bind(this,function(ya){N--;T()}),!0,null,"data:"+la+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(J[k].substring(0,W)),U)}T()}else v(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,
+mxUtils.bind(this,function(v){this.resolvedFontCss=v;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},v;for(v in Graph.fontMapping)Graph.isCssFontUrl(v)&&(k[v]=Graph.fontMapping[v]);return k};Editor.prototype.embedExtFonts=function(k){var v=this.graph.getCustomFonts();if(0<v.length){var J=[],N=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==N&&this.embedCssFonts(J.join(""),k)}),
+W=0;W<v.length;W++)mxUtils.bind(this,function(U,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(N++,this.loadUrl(Graph.rewriteGoogleFontUrl(Y),mxUtils.bind(this,function(fa){this.cachedGoogleFonts[Y]=fa;J.push(fa+"\n");N--;T()}),mxUtils.bind(this,function(fa){N--;J.push("@import url("+Y+");\n");T()}))):J.push(this.cachedGoogleFonts[Y]+"\n"):J.push('@font-face {font-family: "'+U+'";src: url("'+Y+'")}\n')})(v[W].name,v[W].url);T()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");
+if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),J=0;J<v.length;J++){var N=mxUtils.getTextContent(v[J]);0>N.indexOf("mxPageSelector")&&0<N.indexOf("MathJax")&&k[0].appendChild(v[J].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var J=mxUtils.getSvgDefs(k),N=v.split("\n");v=[];for(var T=[],W=0;W<N.length;W++)"@import"==N[W].substring(0,7)?v.push(N[W]):T.push(N[W]);k=k.ownerDocument;k=null!=k.createElementNS?
+k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),J.appendChild(k));0<T.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,T.join("\n")),J.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,J){var N=mxClient.IS_FF?8192:16384;return Math.min(J,Math.min(N/k,N/v))};Editor.prototype.exportToCanvas=
+function(k,v,J,N,T,W,U,Y,fa,oa,la,qa,ya,wa,Ia,Aa,Ba,Ga){try{W=null!=W?W:!0;U=null!=U?U:!0;qa=null!=qa?qa:this.graph;ya=null!=ya?ya:0;var Ma=fa?null:qa.background;Ma==mxConstants.NONE&&(Ma=null);null==Ma&&(Ma=N);null==Ma&&0==fa&&(Ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,ya,wa,null,U,null,null,null,oa,null,Aa,Ba,Ga),mxUtils.bind(this,function(sa){try{sa.style.setProperty("-webkit-font-smoothing","antialiased");sa.style.setProperty("-moz-osx-font-smoothing",
+"grayscale");var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){Qa.drawImage(Ca,0,0);k(Na,sa)},0):(Qa.drawImage(Ca,0,0),k(Na,sa))},Na=document.createElement("canvas"),Sa=parseInt(sa.getAttribute("width")),Ua=parseInt(sa.getAttribute("height"));Y=null!=Y?Y:1;null!=v&&(Y=W?Math.min(1,Math.min(3*v/(4*Ua),v/Sa)):v/Sa);Y=this.getMaxCanvasScale(Sa,Ua,Y);Sa=Math.ceil(Y*Sa);Ua=Math.ceil(Y*Ua);Na.setAttribute("width",Sa);Na.setAttribute("height",
+Ua);var Qa=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Qa.beginPath();Qa.rect(0,0,Sa,Ua);Qa.fillStyle="dark"==Aa&&"none"!=qa.getAdaptiveColors()?za.dark:za.light;Qa.fill()}1!=Y&&Qa.scale(Y,Y);if(Ia){var Ea=qa.view,C=Ea.scale;Ea.scale=1;var Q=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=C;Q="data:image/svg+xml;base64,"+Q;var R=qa.gridSize*Ea.gridSteps*Y,X=qa.getGraphBounds(),ha=Ea.translate.x*C,ia=Ea.translate.y*C,pa=ha+(X.x-ha)/C-ya,xa=ia+(X.y-
+ia)/C-ya,ra=new Image;ra.onload=function(){try{for(var ua=-Math.round(R-mxUtils.mod((ha-pa)*Y,R)),Ka=-Math.round(R-mxUtils.mod((ia-xa)*Y,R));ua<Sa;ua+=R)for(var Va=Ka;Va<Ua;Va+=R)Qa.drawImage(ra,ua/Y,Va/Y);va()}catch(Oa){null!=T&&T(Oa)}};ra.onerror=function(ua){null!=T&&T(ua)};ra.src=Q}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};oa&&this.graph.addSvgShadow(sa);this.graph.mathEnabled&&this.addMathCss(sa);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&
+this.addFontCss(sa,this.resolvedFontCss),Ca.src=Editor.createSvgDataUri(mxUtils.getXml(sa))}catch(va){null!=T&&T(va)}});this.embedExtFonts(mxUtils.bind(this,function(va){try{null!=va&&this.addFontCss(sa,va),this.loadFonts(Da)}catch(Na){null!=T&&T(Na)}}))}catch(va){null!=T&&T(va)}}),J,la)}catch(sa){null!=T&&T(sa)}};Editor.crcTable=[];for(var y=0;256>y;y++)for(var q=y,B=0;8>B;B++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[y]=q;Editor.updateCRC=function(k,v,J,N){for(var T=0;T<N;T++)k=Editor.crcTable[(k^
+v.charCodeAt(J+T))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,J=0;J<k.length;J++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(J))&255];return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,J,N,T){function W(la,qa){var ya=fa;fa+=qa;return la.substring(ya,fa)}function U(la){la=W(la,4);return la.charCodeAt(3)+(la.charCodeAt(2)<<8)+(la.charCodeAt(1)<<16)+(la.charCodeAt(0)<<24)}function Y(la){return String.fromCharCode(la>>24&255,la>>16&255,la>>8&255,la&255)}k=k.substring(k.indexOf(",")+
+1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(W(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(W(k,4),"IHDR"!=W(k,4))null!=T&&T();else{W(k,17);T=k.substring(0,fa);do{var oa=U(k);if("IDAT"==W(k,4)){T=k.substring(0,fa-8);"pHYs"==v&&"dpi"==J?(J=Math.round(N/.0254),J=Y(J)+Y(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,v,0,4);N=Editor.updateCRC(N,J,0,J.length);T+=Y(J.length)+
+v+J+Y(N^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+oa);W(k,oa);W(k,4)}while(oa);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var I=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){I.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
+function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,v){var J=null;null!=k.editor.graph.getModel().getParent(v)?J=v.getId():null!=k.currentPage&&(J=k.currentPage.getId());return J});if(null!=window.StyleFormatPanel){var D=Format.prototype.init;Format.prototype.init=function(){D.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};
+var P=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?P.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var v=this.editorUi,J=v.editor.graph;
+if(J.isEnabled()){var N=v.getCurrentFile();null!=N&&N.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},function(W){v.editor.setAutosave(W);v.editor.autosave&&N.isModified()&&N.fileChanged()},{install:function(W){this.listener=function(){W(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&J.isEnabled()&&"undefined"!==
+typeof MathJax){var T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return J.mathEnabled},function(W){v.actions.get("mathematicalTypesetting").funct()},{install:function(W){this.listener=function(){W(J.mathEnabled)};v.addListener("mathEnabledChanged",this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(T);(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&T.appendChild(v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return k};
+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,isVisible:function(k){return"0"==mxUtils.getValue(k.style,
+"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.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:.25,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",
+min:0,defVal:25,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",
+min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.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.tape.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},
+{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},
+{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",
+type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=
+[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];
+mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",
+type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",
+type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",
+dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
+[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
+min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
+stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",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;var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));
+g.apply(this,arguments);null!=k.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),k.customProperties,k))};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var v=this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);l.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=
+function(k,v,J,N){function T(Qa,za,Ea,C,Q){if(null!=Ea.valueChanged)Ea.valueChanged(za,Q,J,qa);else{ya.getModel().beginUpdate();try{Q=[];var R=[];if(null!=Ea.index){for(var X=[],ha=Ea.parentRow.nextSibling;ha&&ha.getAttribute("data-pName")==Qa;)X.push(ha.getAttribute("data-pValue")),ha=ha.nextSibling;Ea.index<X.length?null!=C?X.splice(C,1):X[Ea.index]=za:X.push(za);null!=Ea.size&&X.length>Ea.size&&(X=X.slice(0,Ea.size));za=X.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,X.length,
+ya.getSelectionCells()),Q.push(Ea.countProperty),R.push(X.length))}ya.setCellStyles(Qa,za,ya.getSelectionCells());Q.push(Qa);R.push(za);if(null!=Ea.dependentProps)for(Qa=0;Qa<Ea.dependentProps.length;Qa++){var ia=Ea.dependentPropsDefVal[Qa],pa=Ea.dependentPropsVals[Qa];if(pa.length>za)pa=pa.slice(0,za);else for(var xa=pa.length;xa<za;xa++)pa.push(ia);pa=pa.join(",");ya.setCellStyles(Ea.dependentProps[Qa],pa,ya.getSelectionCells());Q.push(Ea.dependentProps[Qa]);R.push(pa)}if("function"==typeof Ea.onChange)Ea.onChange(ya,
+za);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",Q,"values",R,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}}function W(Qa,za){za.style.left="0px";za.style.top="0px";za.style.position="relative";za.style.right="0px";za.style.bottom="0px";za.style.width="100%";za.style.maxWidth="100%";za.style.maxHeight="100%";za.style.textAlign="left"}function U(Qa,za,Ea){function C(R){if(null==R||R==mxConstants.NONE)Q.style.background="url('"+Dialog.prototype.noColorImage+"')";
+else if("default"==R)Q.style.background="";else{var X=mxUtils.getLightDarkColor(R);mxUtils.isLightDarkColor(R)&&X.light!=X.dark?Q.style.background="linear-gradient(to right bottom, "+X.cssText+" 50%, "+mxUtils.invertLightDarkColor(X).cssText+" 50.3%)":Q.style.background=R}}var Q=document.createElement("div");Q.style.width="32px";Q.style.height="8px";Q.style.margin="2px";Q.style.borderStyle="solid";Q.style.borderWidth="1px";C(za);btn=mxUtils.button("",mxUtils.bind(qa,function(R){this.editorUi.pickColor(za,
+function(X){T(Qa,X,Ea);C(X)});mxEvent.consume(R)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(Q);return btn}function Y(Qa,za,Ea,C,Q,R,X){null!=za&&(za=za.split(","),wa.push({name:Qa,values:za,type:Ea,defVal:C,countProperty:Q,parentRow:R,isDeletable:!0,flipBkg:X}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ha){for(var ia=R,pa=0;null!=ia.nextSibling;)if(ia.nextSibling.getAttribute("data-pName")==
+Qa)ia=ia.nextSibling,pa++;else break;var xa={type:Ea,parentRow:R,index:pa,isDeletable:!0,defVal:C,countProperty:Q};pa=la(Qa,"",xa,0==pa%2,X);T(Qa,C,xa);ia.parentNode.insertBefore(pa,ia.nextSibling);mxEvent.consume(ha)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Qa,za,Ea,C,Q,R,X){if(0<Q){var ha=Array(Q);za=null!=za?za.split(","):[];for(var ia=0;ia<Q;ia++)ha[ia]=null!=za[ia]?za[ia]:null!=C?C:"";wa.push({name:Qa,values:ha,type:Ea,defVal:C,parentRow:R,
+flipBkg:X,size:Q})}return document.createElement("div")}function oa(Qa,za,Ea){var C=document.createElement("input");C.type="checkbox";C.checked="1"==za;mxEvent.addListener(C,"change",function(){T(Qa,C.checked?"1":"0",Ea,null,C)});return C}function la(Qa,za,Ea,C,Q){var R=Ea.dispName,X=Ea.type,ha=document.createElement("tr");ha.className="gePropRow"+(Q?"Dark":"")+(C?"Alt":"")+" gePropNonHeaderRow";ha.setAttribute("data-pName",Qa);ha.setAttribute("data-pValue",za);C=!1;null!=Ea.index&&(ha.setAttribute("data-index",
+Ea.index),R=(null!=R?R:"")+"["+Ea.index+"]",C=!0);var ia=document.createElement("td");ia.className="gePropRowCell";R=mxResources.get(R,null,R);mxUtils.write(ia,R);ia.setAttribute("title",R);C&&(ia.style.textAlign="right");ha.appendChild(ia);ia=document.createElement("td");ia.className="gePropRowCell";ia.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ia,"click",mxUtils.bind(qa,function(ua){!mxUtils.isAncestorNode(ha,document.activeElement)&&mxUtils.isAncestorNode(ha.parentNode,
+document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==X)ia.appendChild(U(Qa,za,Ea));else if("bool"==X||"boolean"==X)ia.appendChild(oa(Qa,za,Ea));else if("enum"==X){var pa=Ea.enumList;ia.innerHTML="";var xa=document.createElement("div");xa.className="gePropValue";ia.appendChild(xa);for(Q=0;Q<pa.length;Q++)if(R=pa[Q],R.val==za){mxUtils.write(xa,mxResources.get(R.dispName,null,R.dispName));break}mxEvent.addListener(ia,
+"click",mxUtils.bind(qa,function(ua){var Ka=mxEvent.getSource(ua);if(!(Ka!=ia&&Ka!=xa||mxEvent.isConsumed(ua))){xa.innerHTML="";var Va=document.createElement("select"),Oa=null;W(ia,Va);for(ua=0;ua<pa.length;ua++){Ka=pa[ua];var Ta=document.createElement("option");Ta.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Ta,mxResources.get(Ka.dispName,null,Ka.dispName));Va.appendChild(Ta);null==Ka.val&&(Ta.value="null",Oa=Ta)}Va.value=null==za&&null!=Oa?"null":za;xa.appendChild(Va);mxEvent.addListener(Va,
+"change",function(){var Za=mxUtils.htmlEntities(Va.value);if(Va[Va.selectedIndex]==Oa||"null"==Za.value)Za=null;T(Qa,Za,Ea)});Va.focus();mxEvent.addListener(Va,"blur",function(){xa.innerHTML="";for(var Za=0;Za<pa.length;Za++){var Pa=pa[Za];if(Pa.val==Va.value){mxUtils.write(xa,mxResources.get(Pa.dispName,null,Pa.dispName));break}}})}}))}else if("dynamicArr"==X)ia.appendChild(Y(Qa,za,Ea.subType,Ea.subDefVal,Ea.countProperty,ha,Q));else if("staticArr"==X)ia.appendChild(fa(Qa,za,Ea.subType,Ea.subDefVal,
+Ea.size,ha,Q));else if("readOnly"==X)Q=document.createElement("input"),Q.setAttribute("readonly",""),Q.value=za,Q.style.borderWidth="0px","id"==Qa||"shape"==Qa?(ha.firstChild.innerHTML="",ha.firstChild.setAttribute("colspan","2"),Q.style.flexGrow="1",Q.style.marginLeft="4px",Q.style.textAlign="id"==Qa?"center":"left",Q.setAttribute("title",za),R=document.createElement("div"),mxUtils.write(R,mxResources.get(Qa)+":"),R.style.display="inline-flex",R.style.alignItems="center",R.style.width="100%",R.appendChild(Q),
+ha.firstChild.appendChild(R)):(Q.style.width="96px",ia.appendChild(Q));else{ia.innerHTML="";var ra=document.createElement("div");ra.className="gePropValue";ia.appendChild(ra);ra.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));mxEvent.addListener(ia,"click",mxUtils.bind(qa,function(ua){function Ka(){var Ta=Oa.value;Ta=0==Ta.length&&"string"!=X&&"numbers"!=X?0:Ta;Ea.allowAuto&&(null!=Ta.trim&&"auto"==Ta.trim().toLowerCase()?(Ta="auto",X="string"):(Ta=parseFloat(Ta),Ta=isNaN(Ta)?0:Ta));null!=
+Ea.min&&Ta<Ea.min?Ta=Ea.min:null!=Ea.max&&Ta>Ea.max&&(Ta=Ea.max);var Za=null;try{Za="numbers"==X?Ta.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==X?parseInt(Ta):Ta)+"")}catch(Pa){}T(Qa,Za,Ea,null,Oa)}var Va=mxEvent.getSource(ua);if(!(Va!=ia&&Va!=ra||mxEvent.isConsumed(ua))){ra.innerHTML="";var Oa=document.createElement("input");W(ra,Oa);Oa.value=decodeURIComponent(za);Oa.className="gePropEditor";"int"!=X&&"float"!=X||Ea.allowAuto||(Oa.type="number",Oa.step="int"==X?"1":"any",null!=
+Ea.min&&(Oa.min=parseFloat(Ea.min)),null!=Ea.max&&(Oa.max=parseFloat(Ea.max)));ra.appendChild(Oa);mxEvent.addListener(Oa,"keypress",function(Ta){13==Ta.keyCode&&Ka()});Oa.focus();mxEvent.addListener(Oa,"blur",function(){Ka()})}}))}Ea.isDeletable&&(Q=mxUtils.button("-",mxUtils.bind(qa,function(ua){T(Qa,"",Ea,Ea.index);mxEvent.consume(ua)})),Q.style.height="16px",Q.style.width="25px",Q.style.float="right",Q.className="geColorBtn",ia.appendChild(Q));ha.appendChild(ia);return ha}var qa=this,ya=this.editorUi.editor.graph,
+wa=[],Ia=document.createElement("table");Ia.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.style.paddingLeft="16px";Ba.style.backgroundRepeat="no-repeat";Ba.style.backgroundPosition="-2px 50%";Ba.style.backgroundSize="20px";mxUtils.write(Ba,mxResources.get("property"));Aa.style.cursor="pointer";var Ga=function(){var Qa=Ia.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ba.style.backgroundImage=
+"url('"+Editor.arrowRightImage+"')";var za="none";for(var Ea=k.childNodes.length-1;0<=Ea;Ea--)try{var C=k.childNodes[Ea],Q=C.nodeName.toUpperCase();"INPUT"!=Q&&"SELECT"!=Q||k.removeChild(C)}catch(R){}}else Ba.style.backgroundImage="url('"+Editor.arrowDownImage+"')",za="";for(Ea=0;Ea<Qa.length;Ea++)Qa[Ea].style.display=za};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;Ga()});Aa.appendChild(Ba);var Ma=document.createElement("th");Ma.className=
+"gePropHeaderCell";Ma.style.paddingLeft="4px";mxUtils.write(Ma,mxResources.get("value"));Aa.appendChild(Ma);Ia.appendChild(Aa);var sa=Ma=!1;Aa=null;1==J.vertices.length&&0==J.edges.length?Aa=J.vertices[0].id:0==J.vertices.length&&1==J.edges.length&&(Aa=J.edges[0].id);null==Aa||N||(Ia.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"id",type:"readOnly"},!0,!1)),null!=J.style&&null!=J.style.shape&&Ia.appendChild(la("shape",mxUtils.htmlEntities(J.style.shape),{dispName:"shape",type:"readOnly"},
+!0,!1)));for(var Ca in v)if(N=v[Ca],("function"!=typeof N.isVisible||N.isVisible(J,this))&&!N.primary){var Da=null!=N.getValue?N.getValue(J,this):null!=J.style[Ca]?mxUtils.htmlEntities(J.style[Ca]+""):null!=N.getDefaultValue?N.getDefaultValue(J,this):N.defVal;if("separator"==N.type)sa=!sa;else{if("staticArr"==N.type)N.size=parseInt(J.style[N.sizeProperty]||v[N.sizeProperty].defVal)||0;else if(null!=N.dependentProps){var va=N.dependentProps,Na=[],Sa=[];for(Aa=0;Aa<va.length;Aa++)if(null!=v[va[Aa]]){var Ua=
+J.style[va[Aa]];Sa.push(v[va[Aa]].subDefVal);Na.push(null!=Ua?Ua.split(","):[])}N.dependentPropsDefVal=Sa;N.dependentPropsVals=Na}Ia.appendChild(la(Ca,Da,N,Ma,sa));Ma=!Ma}}for(Aa=0;Aa<wa.length;Aa++)for(N=wa[Aa],v=N.parentRow,Ca=0;Ca<N.values.length;Ca++)Ma=la(N.name,N.values[Ca],{type:N.type,parentRow:N.parentRow,isDeletable:N.isDeletable,index:Ca,defVal:N.defVal,countProperty:N.countProperty,size:N.size},0==Ca%2,N.flipBkg),v.parentNode.insertBefore(Ma,v.nextSibling),v=Ma;k.appendChild(Ia);Ga();
+return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=this.editorUi,J=v.editor.graph,N=document.createElement("div");N.style.padding="6px 20px 0 24px";k.appendChild(N);var T=document.createElement("div");T.className="geSwitcher";T.style.padding="4px 18px 6px 0px";for(var W=[],U=0;U<this.defaultColorSchemes.length;U++){var Y=document.createElement("div");Y.className="geSwitcherDot";mxUtils.bind(this,function(ya){mxEvent.addListener(Y,"click",mxUtils.bind(this,
+function(){fa(ya)}))})(U);W.push(Y);T.appendChild(Y)}var fa=mxUtils.bind(this,function(ya){null!=W[ya]&&(null!=this.format.currentScheme&&null!=W[this.format.currentScheme]&&(W[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ya,oa(this.defaultColorSchemes[this.format.currentScheme]),W[this.format.currentScheme].style.background="#84d7ff")}),oa=mxUtils.bind(this,function(ya){var wa=mxUtils.clone(J.defaultVertexStyle);wa[mxConstants.STYLE_STROKECOLOR]=null!=wa[mxConstants.STYLE_STROKECOLOR]?
+wa[mxConstants.STYLE_STROKECOLOR]:"default";wa[mxConstants.STYLE_FILLCOLOR]=null!=wa[mxConstants.STYLE_FILLCOLOR]?wa[mxConstants.STYLE_FILLCOLOR]:"default";wa[mxConstants.STYLE_FONTCOLOR]=null!=wa[mxConstants.STYLE_FONTCOLOR]?wa[mxConstants.STYLE_FONTCOLOR]:"default";J.replaceDefaultColors(new mxCell,wa);var Ia=mxUtils.bind(this,function(Ba){var Ga=mxUtils.button("",mxUtils.bind(this,function(Ca){J.getModel().beginUpdate();try{for(var Da=v.getSelectionState().cells,va=0;va<Da.length;va++){var Na=
+J.getModel().getStyle(Da[va]);null!=Ba?(mxEvent.isShiftDown(Ca)||(Na=""==Ba.fill||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,Ba.fill),Na=""==Ba.gradient||null==Ba.gradient?mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,Ba.gradient),mxEvent.isControlDown(Ca)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ca)||!J.getModel().isVertex(Da[va])||(Na=""==Ba.font||null==Ba.font?mxUtils.setStyle(Na,
+mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,Ba.font))),mxEvent.isAltDown(Ca)||(Na=""==Ba.stroke||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,Ba.stroke))):(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null),J.getModel().isVertex(Da[va])&&(Na=mxUtils.setStyle(Na,
+mxConstants.STYLE_FONTCOLOR,null)));J.getModel().setStyle(Da[va],Na)}}finally{J.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";if(null!=Ba){var Ma="1px solid";null!=Ba.border&&(Ma=Ba.border);if(null!=Ba.gradient)Ga.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(Ba.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(Ba.gradient).cssText+" 100%)";else if(Ba.fill==
+mxConstants.NONE)Ga.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==Ba.fill||""==Ba.fill)Ga.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var sa=mxUtils.getLightDarkColor(Ba.fill);Ga.style.backgroundImage="linear-gradient(to right bottom, "+sa.cssText+" 50%, "+sa.light+" 50.3%)"}null==Ba.stroke||Ba.stroke==mxConstants.NONE?Ga.style.border=Ma+" transparent":""==Ba.stroke?Ga.style.border="1px solid "+
+mxUtils.getLightDarkColor(mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(sa=mxUtils.getLightDarkColor(Ba.stroke),Ga.style.border=Ma+" "+sa.cssText,Ga.style.borderRightColor=sa.light,Ga.style.borderBottomColor=Ga.style.borderRightColor);null!=Ba.title&&Ga.setAttribute("title",Ba.title)}else Ma=mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),sa=mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,"#000000"),Ga.style.backgroundColor=Ma,Ga.style.border="1px solid "+sa;
+Ga.style.borderRadius="0";N.appendChild(Ga);null!=Ba&&null!=Ba.gradient&&(Ma=Ga.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(Ba.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",N.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ga.click()}))});N.innerText=
+"";if(null!=ya)for(var Aa=0;Aa<ya.length;Aa++)0<Aa&&0==mxUtils.mod(Aa,4)&&mxUtils.br(N),Ia(ya[Aa])});null==this.format.currentScheme?fa(Math.min(W.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):fa(this.format.currentScheme);U=10>=this.defaultColorSchemes.length?43:23;var la=document.createElement("div");la.className="geButton";la.style.cssText="position:absolute;left:0px;bottom:"+U+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(la,"click",mxUtils.bind(this,
+function(){fa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var qa=document.createElement("div");qa.className="geButton";qa.style.cssText="position:absolute;left:186px;bottom:"+U+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(k.appendChild(la),k.appendChild(qa));mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){fa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));oa(this.defaultColorSchemes[this.format.currentScheme]);
+10>=this.defaultColorSchemes.length&&k.appendChild(T)}return k}}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.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=
+function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=function(k,v){var J=Graph.fontMapping[v];null==J&&Graph.isCssFontUrl(v)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",
+Graph.rewriteGoogleFontUrl(v))):(null==J&&(J='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+v+'");\n}'),k=document.createElement("style"),mxUtils.write(k,J));return k};Graph.addRecentCustomFont=function(k,v){};Graph.addFont=function(k,v,J,N){if(null!=k&&0<k.length&&null!=v&&0<v.length){N=null!=N?N:Graph.customFontElements;var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var W=N[T];null!=W&&W.url!=v&&(W.elt.parentNode.removeChild(W.elt),W=null);null==W?(W=v,"http:"==v.substring(0,
+5)&&(W=PROXY_URL+"?url="+encodeURIComponent(v)),W={name:k,url:v,elt:Graph.createFontElement(k,W)},N[T]=W,v=N==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=J&&("link"==W.elt.nodeName.toLowerCase()?(W.elt.onload=J,W.elt.onerror=J):J()),null!=v&&v.appendChild(W.elt)):null!=J&&J()}else null!=J&&J()}else null!=J&&J();return k};Graph.getFontUrl=function(k,v){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(v=k.url);return v};Graph.processFontAttributes=function(k){k=
+k.getElementsByTagName("*");for(var v=0;v<k.length;v++){var J=k[v].getAttribute("data-font-src");if(null!=J){var N="FONT"==k[v].nodeName?k[v].getAttribute("face"):k[v].style.fontFamily;null!=N&&Graph.addFont(N,J)}}};Graph.processFontStyle=function(k){if(null!=k){var v=mxUtils.getValue(k,"fontSource",null);if(null!=v){var J=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=J)try{Graph.addFont(J,decodeURIComponent(v))}catch(N){}}}return k};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.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var n=Graph.prototype.init;Graph.prototype.init=function(){function k(T){v=T}n.apply(this,arguments);this.hiddenTags=
+[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var v=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(T){v=null});this.isMouseInsertPoint=function(){return null!=v};var J=this.getInsertPoint;this.getInsertPoint=function(T){return null==v||T?J.apply(this,arguments):this.getPointForEvent(v)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var W=this.graph.getCellStyle(T);
+if(null!=W&&"rack"==W.childLayout){var U=new mxStackLayout(this.graph,!1);U.gridSize=null!=W.rackUnitSize?parseFloat(W.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;U.marginLeft=W.marginLeft||0;U.marginRight=W.marginRight||0;U.marginTop=W.marginTop||0;U.marginBottom=W.marginBottom||0;U.allowGaps=W.allowGaps||0;U.horizontal="1"==mxUtils.getValue(W,"horizontalRack","0");U.resizeParent=!1;U.fill=!0;return U}return N.apply(this,arguments)};this.updateGlobalUrlVariables()};
+var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,J,N,T,W,U,Y,fa,oa,la,qa){F.apply(this,arguments);Graph.processFontAttributes(qa)};var G=mxText.prototype.redraw;mxText.prototype.redraw=function(){G.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};
+Graph.prototype.createTagsDialog=function(k,v,J,N){function T(){for(var Aa=Y.getSelectionCells(),Ba=[],Ga=0;Ga<Aa.length;Ga++)Y.isCellVisible(Aa[Ga])&&Ba.push(Aa[Ga]);Y.setSelectionCells(Ba)}function W(Aa){Y.setHiddenTags(Aa?[]:fa.slice());T();Y.refresh()}function U(Aa,Ba){la.innerText="";if(0<Aa.length){var Ga=document.createElement("table");Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";var Ma=document.createElement("tbody");
+if(null!=Aa&&0<Aa.length)for(var sa=0;sa<Aa.length;sa++)(function(Ca){function Da(){var za=Y.getCellsForTags([Ca],null,null,!0);Y.isEnabled()?Y.setSelectionCells(za):Y.highlightCells(za,null,null,70)}var va=0>mxUtils.indexOf(Y.hiddenTags,Ca),Na=document.createElement("tr"),Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";var Ua=document.createElement("img");Ua.setAttribute("src",va?Editor.visibleImage:Editor.hiddenImage);Ua.setAttribute("title",mxResources.get(va?"hideIt":
+"show",[Ca]));mxUtils.setOpacity(Ua,va?75:25);Ua.className="geAdaptiveAsset";Ua.style.verticalAlign="middle";Ua.style.cursor="pointer";Ua.style.width="16px";if(v||Editor.isDarkMode())Ua.style.filter="invert(100%)";Sa.appendChild(Ua);mxEvent.addListener(Ua,"click",function(za){mxEvent.isShiftDown(za)?W(0<=mxUtils.indexOf(Y.hiddenTags,Ca)):(Y.toggleHiddenTag(Ca),T(),Y.refresh());mxEvent.consume(za)});Na.appendChild(Sa);Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";Ua=
+document.createElement("img");Ua.setAttribute("src",Editor.selectImage);Ua.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ua,va?75:25);Ua.className="geAdaptiveAsset";Ua.style.verticalAlign="middle";Ua.style.cursor="pointer";Ua.style.width="16px";if(v||Editor.isDarkMode())Ua.style.filter="invert(100%)";mxEvent.addListener(Ua,"click",function(za){W(!0);Da();mxEvent.consume(za)});Sa.appendChild(Ua);Na.appendChild(Sa);Sa=document.createElement("td");Sa.style.overflow="hidden";Sa.style.whiteSpace=
+"nowrap";Sa.style.textOverflow="ellipsis";Sa.style.verticalAlign="middle";Sa.style.cursor="pointer";Sa.setAttribute("title",Ca);a=document.createElement("a");mxUtils.write(a,Ca);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,va?100:40);Sa.appendChild(a);mxEvent.addListener(Sa,"click",function(za){if(mxEvent.isShiftDown(za))W(!0),Da();else if(va&&0<Y.hiddenTags.length)W(!0);else{var Ea=fa.slice(),C=mxUtils.indexOf(Ea,Ca);Ea.splice(C,1);Y.setHiddenTags(Ea);T();Y.refresh()}mxEvent.consume(za)});
+Na.appendChild(Sa);if(Y.isEnabled()){Sa=document.createElement("td");Sa.style.verticalAlign="middle";Sa.style.textAlign="center";Sa.style.width="18px";if(null==Ba){Sa.style.align="center";Sa.style.width="16px";Ua=document.createElement("img");Ua.setAttribute("src",Editor.trashImage);Ua.setAttribute("title",mxResources.get("removeIt",[Ca]));mxUtils.setOpacity(Ua,va?75:25);Ua.className="geAdaptiveAsset";Ua.style.verticalAlign="middle";Ua.style.cursor="pointer";Ua.style.width="16px";if(v||Editor.isDarkMode())Ua.style.filter=
+"invert(100%)";mxEvent.addListener(Ua,"click",function(za){var Ea=mxUtils.indexOf(fa,Ca);0<=Ea&&fa.splice(Ea,1);Y.removeTagsForCells(Y.model.getDescendants(Y.model.getRoot()),[Ca]);Y.refresh();mxEvent.consume(za)});Sa.appendChild(Ua)}else{var Qa=document.createElement("input");Qa.setAttribute("type","checkbox");Qa.style.margin="0px";Qa.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,Ca);Qa.checked=Qa.defaultChecked;Qa.style.background="transparent";Qa.setAttribute("title",mxResources.get(Qa.defaultChecked?
+"removeIt":"add",[Ca]));mxEvent.addListener(Qa,"change",function(za){Qa.checked?Y.addTagsForCells(Y.getSelectionCells(),[Ca]):Y.removeTagsForCells(Y.getSelectionCells(),[Ca]);mxEvent.consume(za)});Sa.appendChild(Qa)}Na.appendChild(Sa)}Ma.appendChild(Na)})(Aa[sa]);Ga.appendChild(Ma);la.appendChild(Ga)}}var Y=this,fa=Y.hiddenTags.slice(),oa=document.createElement("div");oa.style.userSelect="none";oa.style.overflow="hidden";oa.style.padding="10px";oa.style.height="100%";var la=document.createElement("div");
+la.style.position="absolute";la.style.boxSizing="border-box";la.style.userSelect="none";la.style.overflow="auto";la.style.padding="3px";la.style.left="0px";la.style.right="0px";la.style.top="0px";la.style.bottom="0px";oa.appendChild(la);Y.addListener(mxEvent.ROOT,function(){fa=Y.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Aa,Ba){if(k()){Aa=Y.getAllTags();for(Ba=0;Ba<Aa.length;Ba++)0>mxUtils.indexOf(fa,Aa[Ba])&&fa.push(Aa[Ba]);fa.sort();Y.isSelectionEmpty()?U(fa):U(fa,Y.getCommonTagsForCells(Y.getSelectionCells()))}});
+Y.selectionModel.addListener(mxEvent.CHANGE,qa);Y.model.addListener(mxEvent.CHANGE,qa);Y.addListener(mxEvent.REFRESH,qa);var ya=document.createElement("div");ya.className="geToolbarContainer geDialogToolbar";ya.style.position="absolute";ya.style.display="flex";ya.style.bottom="0px";ya.style.left="0px";ya.style.right="0px";ya.style.height="32px";ya.style.overflow="hidden";ya.style.padding="3px 4px 4px 4px";ya.style.borderWidth="1px 0px 0px 0px";ya.style.borderStyle="solid";ya.style.whiteSpace="nowrap";
+if(Y.isEnabled()){la.style.bottom="32px";var wa=document.createElement("a");wa.className="geButton";var Ia=wa.cloneNode(!1);Ia.style.backgroundImage="url("+Editor.visibleImage+")";Ia.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(Ia,"click",function(Aa){Y.setHiddenTags([]);mxEvent.isShiftDown(Aa)||(fa=Y.hiddenTags.slice());T();Y.refresh();mxEvent.consume(Aa)});ya.appendChild(Ia);null!=J&&(wa=wa.cloneNode(!1),wa.style.backgroundImage="url("+Editor.plusImage+")",wa.setAttribute("title",
+mxResources.get("add")),mxEvent.addListener(wa,"click",function(Aa){J(fa,function(Ba){fa=Ba;qa()});mxEvent.consume(Aa)}),ya.appendChild(wa));oa.appendChild(ya)}null!=N&&ya.appendChild(N);return{div:oa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var J=Graph.customFontElements[v];k.push({name:J.name,url:J.url})}return k};Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var J=Editor.guid();document.execCommand("fontname",
+!1,J);for(var N=this.cellEditor.textarea.getElementsByTagName("font"),T=!1,W=0;W<N.length;W++)N[W].getAttribute("face")==J&&(T=!0,N[W].setAttribute("face",k),null!=v?N[W].setAttribute("data-font-src",v):N[W].removeAttribute("data-font-src"));T||document.execCommand("fontname",!1,k)};var L=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return L.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 k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var v in k)this.globalVars[v]=k[v]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var M=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var v=
+M.apply(this,arguments);null==v&&null!=this.globalVars&&(v=this.globalVars[k]);return v};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,v,J,N,T,W,U,Y,fa,oa,la,qa,ya,wa,Ia,Aa){var Ba=K.apply(this,arguments);if(null!=
+qa){var Ga=Ba.getAttribute("style");null==Ga&&(Ga="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ba.setAttribute("style",Ga+(" color-scheme: "+qa+";"))}var Ma=this.getCustomFonts();if(la&&0<Ma.length){var sa=Ba.ownerDocument;Ga=null!=sa.createElementNS?sa.createElementNS(mxConstants.NS_SVG,"style"):sa.createElement("style");null!=sa.setAttributeNS?Ga.setAttributeNS("type","text/css"):Ga.setAttribute("type","text/css");for(var Ca="",Da=
+"",va=0;va<Ma.length;va++){var Na=Ma[va].name,Sa=Ma[va].url;Graph.isCssFontUrl(Sa)?Ca+="@import url("+Graph.rewriteGoogleFontUrl(Sa)+");\n":Da+='@font-face {\nfont-family: "'+Na+'";\nsrc: url("'+Sa+'");\n}\n'}Ga.appendChild(sa.createTextNode(Ca+Da));Ba.getElementsByTagName("defs")[0].appendChild(Ga)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(Ba);this.mathEnabled&&(document.body.appendChild(Ba),Editor.MathJaxRender(Ba),Ba.parentNode.removeChild(Ba),
+Ga=Ba.ownerDocument.getElementById("MJX-SVG-styles"),null!=Ga&&Ba.getElementsByTagName("defs")[0].appendChild(Ga.cloneNode(!0)));return Ba};var Z=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){Z.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ja=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=
+function(){ja.apply(this,arguments);this.enumerationState=0};var da=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return da.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+
+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var v="1"==mxUtils.getValue(k.style,"enumerate",0);v&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):v||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);v=k.secondLabel;if(null!=v){var J=k.view.scale,
+N=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*J,k.y+4*J,0,0):mxRectangle.fromPoint(k.view.getPoint(k));v.bounds.equals(k)&&v.value==N&&v.scale==J||(v.bounds=k,v.value=N,v.scale=J,v.redraw())}};var ba=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ba.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),
+this.view.validateBackgroundImage())};var na=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){na.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,v){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,v))};Graph.prototype.executeCustomActions=function(k,v,J){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 N=!1,T=0,W=0,U=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),Y=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<T&&T--;0==T&&oa()}),oa=mxUtils.bind(this,function(){if(W<k.length){var la=this.stoppingCustomActions,qa=
+k[W++],ya=[];if(null!=qa.open)if(Y(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,J))return}else this.openLink(qa.open);null==qa.wait||la||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;fa()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),Y());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,
+!0)),qa.opacity.value);null!=qa.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,fa,la?0:qa.fadeIn.delay));null!=qa.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,fa,la?0:qa.fadeOut.delay));null!=qa.wipeIn&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&
+(U(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){U();var wa=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(wa),1);this.setCellsVisible(wa,!0)}null!=qa.hide&&(U(),wa=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(wa),0),this.setCellsVisible(wa,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(U(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:
+"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(U(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));wa=[];null!=qa.select&&this.isEnabled()&&(wa=this.getCellsForAction(qa.select),this.setSelectionCells(wa));null!=qa.highlight&&(wa=this.getCellsForAction(qa.highlight),this.highlightCells(wa,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(wa=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&
+this.fitWindow(qa.viewbox,qa.viewbox.border);0<wa.length&&this.scrollCellToVisible(wa[0]);null!=J&&null!=qa.explore&&Graph.exploreFromCell(this,J,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var Ia=qa.tags.toggle;0==Ia.length&&(Ia=this.getAllTags());for(wa=0;wa<Ia.length;wa++)this.toggleHiddenTag(Ia[wa])}Ia=null;null!=qa.tags.hidden&&(null==Ia&&(Ia=[]),Ia=Ia.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==Ia&&(Ia=[]);var Aa=this.getAllTags();for(wa=0;wa<Aa.length;wa++)0>mxUtils.indexOf(qa.tags.visible,
+Aa[wa])&&0>mxUtils.indexOf(Ia,Aa[wa])&&Ia.push(Aa[wa])}null!=Ia&&this.setHiddenTags(Ia);this.refresh()}0<ya.length&&(T++,this.executeAnimations(ya,fa,la?1:qa.steps,la?0:qa.delay));0==T?oa():Y()}else this.stoppingCustomActions=this.executingCustomActions=!1,Y(),null!=v&&v()});oa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var J=this.getLinkForCell(v);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,J));if(this.isHtmlLabel(v)){var N=document.createElement("div");
+N.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var T=N.getElementsByTagName("a"),W=!1,U=0;U<T.length;U++)J=T[U].getAttribute("href"),null!=J&&"data:action/json,"==J.substring(0,17)&&(T[U].setAttribute("href",this.updateCustomLink(k,J)),W=!0);W&&this.labelChanged(v,N.innerHTML)}};Graph.prototype.updateCustomLink=function(k,v){if("data:action/json,"==v.substring(0,17))try{var J=JSON.parse(v.substring(17));null!=J.actions&&(this.updateCustomLinkActions(k,J.actions),v="data:action/json,"+JSON.stringify(J))}catch(N){}return v};
+Graph.prototype.updateCustomLinkActions=function(k,v){for(var J=0;J<v.length;J++){var N=v[J],T;for(T in N)this.updateCustomLinkAction(k,N[T],"cells"),this.updateCustomLinkAction(k,N[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,J){if(null!=v&&null!=v[J]){for(var N=[],T=0;T<v[J].length;T++)if("*"==v[J][T])N.push(v[J][T]);else{var W=k[v[J][T]];null!=W?""!=W&&N.push(W):N.push(v[J][T])}v[J]=N}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,
+null,v));if(null!=k.excludeCells){for(var J=[],N=0;N<v.length;N++)0>k.excludeCells.indexOf(v[N].id)&&J.push(v[N]);v=J}return v};Graph.prototype.getCellsById=function(k){var v=[];if(null!=k)for(var J=0;J<k.length;J++)if("*"==k[J]){var N=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(W){return W!=N},N))}else{var T=this.model.getCell(k[J]);null!=T&&v.push(T)}return v};var ca=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return ca.apply(this,arguments)&&
+!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var v=mxUtils.indexOf(this.hiddenTags,k);0>v?this.hiddenTags.push(k):0<=v&&this.hiddenTags.splice(v,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;
+for(var v=0;v<k.length;v++)if(0>mxUtils.indexOf(this.hiddenTags,k[v]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,v,J,N){var T=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var W=0,U={},Y=0;Y<k.length;Y++)0<k[Y].length&&(U[k[Y]]=!0,W++);for(Y=0;Y<v.length;Y++)if(J&&this.model.getParent(v[Y])==this.model.root||this.model.isVertex(v[Y])||this.model.isEdge(v[Y])){var fa=this.getTagsForCell(v[Y]),oa=!1;if(0<fa.length&&(fa=fa.split(" "),fa.length>=k.length)){for(var la=
+oa=0;la<fa.length&&oa<W;la++)null!=U[fa[la]]&&oa++;oa=oa==W}oa&&(1!=N||this.isCellVisible(v[Y]))&&T.push(v[Y])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,J=[],N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);J=[];if(0<T.length){T=T.split(" ");for(var W={},U=0;U<T.length;U++)if(null==v||null!=v[T[U]])W[T[U]]=!0,J.push(T[U]);v=W}else return[]}return J};
+Graph.prototype.getTagsForCells=function(k){for(var v=[],J={},N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);if(0<T.length){T=T.split(" ");for(var W=0;W<T.length;W++)null==J[T[W]]&&(J[T[W]]=!0,v.push(T[W]))}}return v};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){for(var N=this.getTagsForCell(k[J]),T=N.split(" "),W=!1,U=0;U<
+v.length;U++){var Y=mxUtils.trim(v[U]);""!=Y&&0>mxUtils.indexOf(T,Y)&&(N=0<N.length?N+" "+Y:Y,W=!0)}W&&this.setAttributeForCell(k[J],"tags",N)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){var N=this.getTagsForCell(k[J]);if(0<N.length){for(var T=N.split(" "),W=!1,U=0;U<v.length;U++){var Y=mxUtils.indexOf(T,v[U]);0<=Y&&(T.splice(Y,1),W=!0)}W&&this.setAttributeForCell(k[J],"tags",
+T.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var v=0;v<k.length;v++)this.model.setVisible(k[v],!this.model.isVisible(k[v]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,v){this.model.beginUpdate();try{for(var J=0;J<k.length;J++)this.model.setVisible(k[J],v)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,v,J,N){for(var T=0;T<k.length;T++)this.highlightCell(k[T],v,
+J,N)};Graph.prototype.highlightCell=function(k,v,J,N,T){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;J=null!=J?J:1E3;k=this.view.getState(k);var W=null;null!=k&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+T),W=new mxCellHighlight(this,v,T,!1),null!=N&&(W.opacity=N),W.highlight(k),window.setTimeout(function(){null!=W.shape&&(mxUtils.setPrefixedStyle(W.shape.node.style,"transition","all 1200ms ease-in-out"),W.shape.node.style.opacity=0);window.setTimeout(function(){W.destroy()},
+1200)},J));return W};Graph.prototype.addSvgShadow=function(k,v,J,N){N=null!=N?N:!0;var T=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=J&&J||(v=null!=v?v:k.getElementsByTagName("g")[0],null!=v&&(this.updateShadowFilter(v,!0),!isNaN(parseInt(k.getAttribute("width")))&&N&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+T),k.setAttribute("height",parseInt(k.getAttribute("height"))+T),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+T,
+h=parseFloat(v[3])+T,k.setAttribute("viewBox",v[0]+" "+v[1]+" "+w+" "+h))))));return T};Graph.prototype.updateShadowFilter=function(k,v){mxClient.IS_SF||(v?(v=mxUtils.getLightDarkColor(this.svgShadowColor,this.svgShadowOpacity),k.style.filter="drop-shadow("+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowBlur)/100+"px "+v.cssText+")"):k.style.filter="")};Graph.prototype.setShadowVisible=function(k,v){v=null!=v?v:!0;this.shadowVisible=
+k;this.updateShadowFilter(this.view.getDrawPane(),this.shadowVisible);v&&this.fireEvent(new mxEventObject("shadowVisibleChanged"))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),v=0;do var J=this.model.getChildAt(this.model.root,v);while(v++<k&&"1"==mxUtils.getValue(this.getCellStyle(J),
+"locked","0"));null!=J&&this.setDefaultParent(J)}};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",STENCIL_PATH+"/kubernetes2.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=
+[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=
+[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",
+STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+
+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=
+[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];
+mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/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.ibmcloud=[STENCIL_PATH+"/ibm_cloud.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.networks2=[SHAPES_PATH+"/mxNetworks2.js",STENCIL_PATH+"/networks2.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"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=
+function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var ka=mxMarker.createMarker;mxMarker.createMarker=function(k,v,J,N,T,W,U,Y,fa,oa){if(null!=J&&null==mxMarker.markers[J]){var la=this.getPackageForType(J);null!=la&&mxStencilRegistry.getStencil(la)}return ka.apply(this,arguments)};var aa=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,J,N,T,W){"1"==mxUtils.getValue(v.style,"lineShape",
+null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return aa.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,J,N){function T(){Ia.value=Math.max(1,Math.min(la,Math.max(parseInt(Ia.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(la,Math.min(parseInt(Ia.value),parseInt(wa.value))))}function W(ua){k.lastPrintPagesRadioChecked=ya.checked;k.lastPrintSelectionOnlyChecked=Ba.checked;k.lastPrintCropRadioChecked=Ma.checked;k.lastPrintFitRadioChecked=
+sa.checked;ya.checked&&wa.value<Ia.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ia.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);R.value=Math.max(1,Math.min(1600,parseInt(R.value)))+"%";k.lastPrintZoom=R.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=X.checked;k.lastPrintTransparent=ia.checked;k.lastPrintInclude=pa.checked;k.lastPrintSheetsAcross=Ea.value;k.lastPrintSheetsDown=C.value;var Ka={};Ka.border=parseInt(Q.value);Ka.scale=parseInt(R.value)/100;
+Ka.grid=X.checked;Ka.shadows=ha.checked;Ka.transparent=ia.checked;Ka.includeCopy=pa.checked;Ka.sheetsAcross=parseInt(Ea.value);Ka.sheetsDown=parseInt(C.value);Ka.pagesFrom=parseInt(wa.value);Ka.pagesTo=parseInt(Ia.value);Ka.allPages=qa.checked;Ka.selection=Ba.checked;Ka.pageView=Ga.checked;Ka.crop=Ma.checked;Ka.fit=sa.checked;return null!=J?J(!ua,Ka):k.print(!ua,Ka)}var U=k.editor.graph,Y=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";
+fa.style.marginTop="0px";mxUtils.write(fa,v||mxResources.get("print"));Y.appendChild(fa);var oa=1,la=1;fa=document.createElement("div");fa.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name","pages-printdialog");fa.appendChild(qa);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));mxEvent.addListener(v,"click",function(){qa.checked=!0});fa.appendChild(v);
+mxUtils.br(fa);var ya=qa.cloneNode(!0);fa.appendChild(ya);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");fa.appendChild(v);mxEvent.addListener(v,"click",function(){ya.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type","number");wa.setAttribute("min","1");wa.style.width="40px";fa.appendChild(wa);v=document.createElement("span");mxUtils.write(v,mxResources.get("to"));fa.appendChild(v);var Ia=
+wa.cloneNode(!0);fa.appendChild(Ia);mxEvent.addListener(wa,"focus",function(){ya.checked=!0});mxEvent.addListener(Ia,"focus",function(){ya.checked=!0});mxEvent.addListener(wa,"change",T);mxEvent.addListener(Ia,"change",T);if(null!=k.pages&&(la=k.pages.length,null!=k.currentPage))for(var Aa=0;Aa<la;Aa++)if(k.currentPage==k.pages[Aa]){oa=Aa+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(la,Math.max(1,k.lastPrintPagesFromInput)),Ia.value=Math.min(la,Math.max(1,
+k.lastPrintPagesToInput))):(wa.value=oa,Ia.value=oa);wa.setAttribute("max",la);Ia.setAttribute("max",la);Aa=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=oa;Ia.value=oa;ya.checked=!0});Aa.setAttribute("title",mxResources.get("currentPage"));Aa.style.marginLeft="4px";Aa.style.maxWidth="100px";Aa.style.overflow="hidden";Aa.style.textOverflow="ellipsis";Aa.style.whiteSpace="nowrap";fa.appendChild(Aa);1<la&&Y.appendChild(fa);fa=document.createElement("div");fa.style.borderBottom=
+"1px solid lightGray";fa.style.paddingBottom="12px";fa.style.marginBottom="12px";fa.style.whiteSpace="nowrap";var Ba=document.createElement("input");Ba.setAttribute("name","pages-printdialog");Ba.setAttribute("type",1==la?"checkbox":"radio");Ba.style.marginRight="8px";U.isSelectionEmpty()&&Ba.setAttribute("disabled","disabled");U.isEnabled()&&(fa.appendChild(Ba),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),fa.appendChild(v));(U.isEnabled()||1<la)&&Y.appendChild(fa);
+!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?ya.checked=!0:!U.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ba.checked=!0:qa.checked=!0;U.isSelectionEmpty()||mxEvent.addListener(v,"click",function(){Ba.checked=!Ba.checked});U=document.createElement("div");U.style.whiteSpace="nowrap";var Ga=document.createElement("input");Ga.style.marginBottom="8px";Ga.style.marginRight="8px";Ga.setAttribute("type","radio");Ga.setAttribute("name","printSize");U.appendChild(Ga);v=document.createElement("span");
+mxUtils.write(v,mxResources.get("pageView"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ga.checked=!0});Y.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var Ma=document.createElement("input");Ma.style.marginBottom="8px";Ma.style.marginRight="8px";Ma.setAttribute("type","radio");Ma.setAttribute("name","printSize");U.appendChild(Ma);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ma.checked=
+!0});Y.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginBottom="8px";sa.style.marginRight="8px";sa.setAttribute("type","radio");sa.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(sa);U.appendChild(v);fa=document.createElement("table");fa.style.display="inline-block";fa.style.borderSpacing="0";Aa=document.createElement("tbody");
+var Ca=document.createElement("tr"),Da=Ca.cloneNode(!0),va=document.createElement("td"),Na=va.cloneNode(!0),Sa=va.cloneNode(!0),Ua=va.cloneNode(!0),Qa=va.cloneNode(!0),za=va.cloneNode(!0);va.style.textAlign="right";Ua.style.textAlign="right";mxUtils.write(va,mxResources.get("fitTo"));mxEvent.addListener(U,"click",function(ua){mxEvent.getSource(ua)!=sa&&(sa.checked=!sa.checked)});var Ea=document.createElement("input");Ea.style.margin="0 2px";Ea.style.boxSizing="border-box";Ea.setAttribute("value",
+k.lastPrintSheetsAcross||"1");Ea.setAttribute("min","1");Ea.setAttribute("type","number");Ea.style.width="40px";Na.appendChild(Ea);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));Sa.appendChild(v);mxUtils.write(Ua,mxResources.get("fitToBy"));var C=Ea.cloneNode(!0);C.setAttribute("value",k.lastPrintSheetsDown||"1");Qa.appendChild(C);mxEvent.addListener(Ea,"click",function(ua){sa.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(C,"click",function(ua){sa.checked=
+!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?Ma.checked=!0:k.lastPrintFitRadioChecked?sa.checked=!0:Ga.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));za.appendChild(v);Ca.appendChild(va);Ca.appendChild(Na);Ca.appendChild(Sa);Da.appendChild(Ua);Da.appendChild(Qa);Da.appendChild(za);Aa.appendChild(Ca);Aa.appendChild(Da);fa.appendChild(Aa);U.appendChild(fa);Y.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";
+U.style.whiteSpace="nowrap";U.style.paddingTop="12px";U.style.marginTop="12px";U.style.paddingLeft="8px";mxUtils.write(U,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;U.appendChild(Q);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,mxResources.get("zoom")+":");
+U.appendChild(v);var R=document.createElement("input");R.style.width="60px";R.style.marginLeft="4px";R.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(R);mxUtils.br(U);var X=document.createElement("input");X.setAttribute("type","checkbox");X.style.marginTop="12px";X.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(X);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));U.appendChild(v);mxEvent.addListener(v,
+"click",function(ua){X.checked=!0;mxEvent.consume(ua)});var ha=document.createElement("input");ha.setAttribute("type","checkbox");ha.style.marginTop="12px";ha.checked=null!=k.lastPrintShadow?k.lastPrintShadow:!1;U.appendChild(ha);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("shadows"));U.appendChild(v);k.isOffline()&&!mxClient.IS_CHROMEAPP||v.appendChild(k.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));mxEvent.addListener(v,
+"click",function(ua){"IMG"!=mxEvent.getSource(ua).nodeName&&(ha.checked=!0,mxEvent.consume(ua))});Editor.enableShadowOption?null!=J&&mxUtils.br(U):(ha.style.display="none",v.style.display="none");var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="10px";ia.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=J&&(U.appendChild(ia),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),
+U.appendChild(v),mxEvent.addListener(v,"click",function(ua){ia.checked=!0;mxEvent.consume(ua)}));var pa=document.createElement("input");pa.setAttribute("type","checkbox");pa.style.marginTop="10px";pa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==J||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(U),U.appendChild(pa),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),U.appendChild(v),
+mxEvent.addListener(v,"click",function(ua){pa.checked=!0;mxEvent.consume(ua)}));Y.appendChild(U);v=document.createElement("div");v.style.marginTop="30px";v.style.textAlign="right";v.style.whiteSpace="nowrap";k.isOffline()&&!mxClient.IS_CHROMEAPP||null!=J||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));U=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});U.className="geBtn";k.editor.cancelFirst&&v.appendChild(U);PrintDialog.previewEnabled&&null==J&&
+(fa=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),W(!1)}catch(ua){k.handleError(ua)}}),fa.className="geBtn",v.appendChild(fa));N=null!=N?N:null!=J?"export":PrintDialog.previewEnabled?"print":"ok";N=mxUtils.button(mxResources.get(N),function(){try{k.hideDialog(),W(!0)}catch(ua){k.handleError(ua)}});N.className="geBtn gePrimaryBtn";v.appendChild(N);k.editor.cancelFirst||v.appendChild(U);Y.appendChild(v);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?
(Y.classList.add("geDarkMode"),Y.style.colorScheme="dark"):(Y.classList.remove("geDarkMode"),Y.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ra=function(ua,Ka){ua=Ka.getProperty("dialog");Y.parentNode==ua.container&&(k.editor.removeListener(ra),k.removeListener(xa))};k.editor.addListener("hideDialog",ra)}this.container=Y};var V=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 k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=
this.shadowVisible)}}else V.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),
-this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="29.0.3";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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)||/.*\.cdn\.prod\.atlassian-dev\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&
+this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="29.2.2";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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)||/.*\.cdn\.prod\.atlassian-dev\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&
"support.draw.io"!=window.location.hostname&&"test.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||
"1"==urlParams.dev;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.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes=
"flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!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:{useWidth:1E3,useMaxWidth:!0,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,g,m,n,x,F,H){if(null!=c){x=null!=x?x:Error(c);x.stack=null!=x.stack?x.stack:"";F=null!=F?F:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&
-0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>x.stack.indexOf("extension:")&&0>x.stack.indexOf("<anonymous>:")&&0>x.stack.indexOf("/math4/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+F+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(m)+(null!=n?":colno:"+encodeURIComponent(n):
-"")+(""!=x.stack?"&stack="+encodeURIComponent(x.stack):""))}catch(M){}try{H||null==window.console||console.error(F,c,g,m,n,x)}catch(M){}}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);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!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(m){}};EditorUi.sendReport=function(c,g){if("1"==
-urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,c.length>g&&(c=c.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(m){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],g=0;g<arguments.length;g++)c.push(arguments[g]);mxClient.IS_IOS?(mxLog.show(),
-mxLog.debug(c.join(" "))):console.log.apply(console,c)}}catch(m){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");for(var g=[],m=0;m<c.length;m++)g.push(c[m]);for(m=0;m<g.length;m++)EditorUi.replaceSvgImage(g[m])};EditorUi.replaceSvgImage=function(c){try{var g=null;g=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var m=EditorUi.getSvgSubtree(g);
-if(null!=m&&"svg"==m.nodeName){var n=m.getAttribute("width"),x=m.getAttribute("height");m.setAttribute("x",c.getAttribute("x"));m.setAttribute("y",c.getAttribute("y"));m.setAttribute("width",c.getAttribute("width"));m.setAttribute("height",c.getAttribute("height"));m.style.fontFamily="initial";0<n&&0<x&&null==m.getAttribute("viewBox")&&m.setAttribute("viewBox","0 0 "+n+" "+x);var F=mxUtils.createElementNs(m.ownerDocument,mxConstants.NS_SVG,"g");F.appendChild(m);c.hasAttribute("transform")&&F.setAttribute("transform",
-c.getAttribute("transform"));c.parentNode.replaceChild(F,c)}}catch(H){}};EditorUi.getSvgSubtree=function(c){var g=Graph.getSvgFromDataUri(c);c=null;if(null!=g){c=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=c.getElementsByTagName("style");if(0<g.length){var m="svg-image-"+Editor.guid();c.setAttribute("id",m);for(var n=document.implementation.createHTMLDocument(""),x=document.createElement("style"),F=0;F<g.length;F++){x.textContent=g[F].textContent;n.body.appendChild(x);for(var H="",M=
-0;M<x.sheet.cssRules.length;M++){var L=x.sheet.cssRules[M];if(null!=L.selectorText){for(var K=L.selectorText.split(","),Z=0;Z<K.length;Z++)K[Z]="#"+m+" "+K[Z];L.selectorText=K.join(",")}H+=L.cssText+"\n"}g[F].textContent=H}}null!=c.style&&"light dark"==c.style.getPropertyValue("color-scheme")&&c.style.removeProperty("color-scheme");g=c.getElementsByTagName("*");for(m=0;m<g.length;m++)g[m].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,g,l,n,x,F,G){if(null!=c){x=null!=x?x:Error(c);x.stack=null!=x.stack?x.stack:"";F=null!=F?F:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&
+0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>x.stack.indexOf("extension:")&&0>x.stack.indexOf("<anonymous>:")&&0>x.stack.indexOf("/math4/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+F+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=n?":colno:"+encodeURIComponent(n):
+"")+(""!=x.stack?"&stack="+encodeURIComponent(x.stack):""))}catch(L){}try{G||null==window.console||console.error(F,c,g,l,n,x)}catch(L){}}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);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!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(l){}};EditorUi.sendReport=function(c,g){if("1"==
+urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,c.length>g&&(c=c.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],g=0;g<arguments.length;g++)c.push(arguments[g]);mxClient.IS_IOS?(mxLog.show(),
+mxLog.debug(c.join(" "))):console.log.apply(console,c)}}catch(l){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");for(var g=[],l=0;l<c.length;l++)g.push(c[l]);for(l=0;l<g.length;l++)EditorUi.replaceSvgImage(g[l])};EditorUi.replaceSvgImage=function(c){try{var g=null;g=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var l=EditorUi.getSvgSubtree(g);
+if(null!=l&&"svg"==l.nodeName){var n=l.getAttribute("width"),x=l.getAttribute("height");l.setAttribute("x",c.getAttribute("x"));l.setAttribute("y",c.getAttribute("y"));l.setAttribute("width",c.getAttribute("width"));l.setAttribute("height",c.getAttribute("height"));l.style.fontFamily="initial";0<n&&0<x&&null==l.getAttribute("viewBox")&&l.setAttribute("viewBox","0 0 "+n+" "+x);var F=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");F.appendChild(l);c.hasAttribute("transform")&&F.setAttribute("transform",
+c.getAttribute("transform"));c.parentNode.replaceChild(F,c)}}catch(G){}};EditorUi.getSvgSubtree=function(c){var g=Graph.getSvgFromDataUri(c);c=null;if(null!=g){c=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=c.getElementsByTagName("style");if(0<g.length){var l="svg-image-"+Editor.guid();c.setAttribute("id",l);for(var n=document.implementation.createHTMLDocument(""),x=document.createElement("style"),F=0;F<g.length;F++){x.textContent=g[F].textContent;n.body.appendChild(x);for(var G="",L=
+0;L<x.sheet.cssRules.length;L++){var M=x.sheet.cssRules[L];if(null!=M.selectorText){for(var K=M.selectorText.split(","),Z=0;Z<K.length;Z++)K[Z]="#"+l+" "+K[Z];M.selectorText=K.join(",")}G+=M.cssText+"\n"}g[F].textContent=G}}null!=c.style&&"light dark"==c.style.getPropertyValue("color-scheme")&&c.style.removeProperty("color-scheme");g=c.getElementsByTagName("*");for(l=0;l<g.length;l++)g[l].removeAttribute("data-cell-id")}return c};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.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=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;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.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";return c};EditorUi.prototype.openLink=function(c,g,m){return this.editor.graph.openLink(c,g,m)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=
-function(c,g){g(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,g,m){localStorage.setItem(c,g);null!=m&&m()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,g){localStorage.removeItem(c);g()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";return c};EditorUi.prototype.openLink=function(c,g,l){return this.editor.graph.openLink(c,g,l)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=
+function(c,g){g(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,g,l){localStorage.setItem(c,g);null!=l&&l()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,g){localStorage.removeItem(c);g()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};
EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var g=this.editor.graph;g.mathEnabled=c;null!=g.view.backgroundImage&&(g.view.backgroundImage.destroy(),g.view.backgroundImage=null);this.editor.updateGraphComponents();g.refresh();g.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};
EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||
-!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,g,m){var n=null==c||null==g;m=null!=m?m:24;var x=new Spinner({lines:12,length:m,width:Math.round(m/3),radius:Math.round(m/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),F=this.timeout,H=x.spin,M=null,L=null,
-K=mxUtils.bind(this,function(ca){null!=ca&&ca()}),Z=this;x.spin=function(ca,aa,oa,da){da=null!=da?da:F;var ka=!1;if(!this.active){var ba=Date.now();null!=oa&&(M=window.setTimeout(function(){x.stop();M=null;oa({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:L})},da));n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);ca==document.body&&"1"==urlParams.embedInline&&(ca=Z.diagramContainer,c=ca.scrollLeft+ca.clientWidth/
-2,g=ca.scrollTop+ca.clientHeight/2);H.call(this,ca);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=ca.scrollTop+"px",x.el.style.marginLeft=ca.scrollLeft+"px");this.active=!0;null!=aa&&(ka=document.createElement("div"),ka.className="geSpinnerStatus",ka.setAttribute("title",aa),ca==document.body?(ka.style.left=Math.max(0,c)+"px",ka.style.top=Math.max(0,g+66)+"px"):(ka.style.left="50%",ka.style.top="50%",ka.style.marginTop="70px"),"..."!=aa.substring(aa.length-3,aa.length)&&"!"!=aa.charAt(aa.length-
-1)&&(aa+="..."),ka.innerText=aa,ca.appendChild(ka),x.status=ka);this.pause=mxUtils.bind(this,function(){var V=K;this.active&&(da=Math.max(0,da-(Date.now()-ba)),V=mxUtils.bind(this,function(k){this.spin(ca,aa,oa,da);if(null!=k)try{k(),L=mxUtils.bind(this,function(){this.spin(ca,aa,oa,da);try{k()}catch(v){null!=oa&&oa(v)}})}catch(v){null!=oa&&oa(v)}}));this.stop();return V});ka=!0}return ka};var ha=x.stop;x.stop=function(){ha.call(this);this.active&&(this.active=!1,null!=M&&(window.clearTimeout(M),
-M=null),null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),x.status=null)};x.pause=function(){return K};return x};EditorUi.prototype.isCompatibleString=function(c){try{if(c=mxUtils.trim(c),"<"==c.charAt(0)){var g=mxUtils.parseXml(c),m=this.editor.extractGraphModel(g.documentElement,!0);return null!=m&&0==m.getElementsByTagName("parsererror").length}}catch(n){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};
+!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,g,l){var n=null==c||null==g;l=null!=l?l:24;var x=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),F=this.timeout,G=x.spin,L=null,M=null,
+K=mxUtils.bind(this,function(da){null!=da&&da()}),Z=this;x.spin=function(da,ba,na,ca){ca=null!=ca?ca:F;var ka=!1;if(!this.active){var aa=Date.now();null!=na&&(L=window.setTimeout(function(){x.stop();L=null;na({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:M})},ca));n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);da==document.body&&"1"==urlParams.embedInline&&(da=Z.diagramContainer,c=da.scrollLeft+da.clientWidth/
+2,g=da.scrollTop+da.clientHeight/2);G.call(this,da);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=da.scrollTop+"px",x.el.style.marginLeft=da.scrollLeft+"px");this.active=!0;null!=ba&&(ka=document.createElement("div"),ka.className="geSpinnerStatus",ka.setAttribute("title",ba),da==document.body?(ka.style.left=Math.max(0,c)+"px",ka.style.top=Math.max(0,g+66)+"px"):(ka.style.left="50%",ka.style.top="50%",ka.style.marginTop="70px"),"..."!=ba.substring(ba.length-3,ba.length)&&"!"!=ba.charAt(ba.length-
+1)&&(ba+="..."),ka.innerText=ba,da.appendChild(ka),x.status=ka);this.pause=mxUtils.bind(this,function(){var V=K;this.active&&(ca=Math.max(0,ca-(Date.now()-aa)),V=mxUtils.bind(this,function(k){this.spin(da,ba,na,ca);if(null!=k)try{k(),M=mxUtils.bind(this,function(){this.spin(da,ba,na,ca);try{k()}catch(v){null!=na&&na(v)}})}catch(v){null!=na&&na(v)}}));this.stop();return V});ka=!0}return ka};var ja=x.stop;x.stop=function(){ja.call(this);this.active&&(this.active=!1,null!=L&&(window.clearTimeout(L),
+L=null),null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),x.status=null)};x.pause=function(){return K};return x};EditorUi.prototype.isCompatibleString=function(c){try{if(c=mxUtils.trim(c),"<"==c.charAt(0)){var g=mxUtils.parseXml(c),l=this.editor.extractGraphModel(g.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}}catch(n){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};
EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&
-17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var m=g.getFunction,n=this.editor.graph,x=this;g.getFunction=function(F){if(n.isSelectionEmpty()&&
-null!=x.pages&&0<x.pages.length){var H=x.getSelectedPageIndex();if(mxEvent.isShiftDown(F)){if(37==F.keyCode)return function(){0<H&&x.movePage(H,H-1)};if(38==F.keyCode)return function(){0<H&&x.movePage(H,0)};if(39==F.keyCode)return function(){H<x.pages.length-1&&x.movePage(H,H+1)};if(40==F.keyCode)return function(){H<x.pages.length-1&&x.movePage(H,x.pages.length-1)}}else if(mxEvent.isControlDown(F)||mxClient.IS_MAC&&mxEvent.isMetaDown(F)){if(37==F.keyCode)return function(){0<H&&x.selectNextPage(!1)};
-if(38==F.keyCode)return function(){0<H&&x.selectPage(x.pages[0])};if(39==F.keyCode)return function(){H<x.pages.length-1&&x.selectNextPage(!0)};if(40==F.keyCode)return function(){H<x.pages.length-1&&x.selectPage(x.pages[x.pages.length-1])}}}return!(65<=F.keyCode&&90>=F.keyCode)||n.isSelectionEmpty()||mxEvent.isAltDown(F)||mxEvent.isShiftDown(F)||mxEvent.isControlDown(F)||mxClient.IS_MAC&&mxEvent.isMetaDown(F)?m.apply(this,arguments):null}}return g};var f=EditorUi.prototype.extractGraphModelFromHtml;
-EditorUi.prototype.extractGraphModelFromHtml=function(c){var g=f.apply(this,arguments);if(null==g)try{var m=c.indexOf("&lt;mxfile ");if(0<=m){var n=c.lastIndexOf("&lt;/mxfile&gt;");n>m&&(g=c.substring(m,n+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var x=mxUtils.parseXml(c),F=this.editor.extractGraphModel(x.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=F?mxUtils.getXml(F):""}}catch(H){}return g};EditorUi.prototype.validateFileData=
-function(c){if(null!=c&&0<c.length){var g=c.indexOf('<meta charset="utf-8">');0<=g&&(c=c.slice(0,g)+'<meta charset="utf-8"/>'+c.slice(g+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,g){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",g);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var m=null!=c?this.editor.extractGraphModel(c,!0):null;null!=m&&(c=m);if(null!=c){m=this.editor.graph;m.model.beginUpdate();
-try{var n=null!=this.pages?this.pages.slice():null,x=c.getElementsByTagName("diagram");if(1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var F=x.length-1;0<=F;F--){var H=this.updatePageRoot(new DiagramPage(x[F]));null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[F+1]));m.model.execute(new ChangePage(this,H,0==F?H:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=
-new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),m.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,m.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(F=0;F<n.length;F++)m.model.execute(new ChangePage(this,n[F],null));var M=this.getCurrentFile();null!=M&&M.fileReplaced(g)}finally{m.model.endUpdate()}}};
-EditorUi.prototype.createFileData=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca){g=null!=g?g:this.editor.graph;x=null!=x?x:!1;L=null!=L?L:!0;Z=null!=Z?Z:!Editor.defaultCompressed;var aa=null;if(null==m||m.getMode()==App.MODE_DEVICE||m.getMode()==App.MODE_BROWSER)var oa="_blank";else aa=oa=n;if(null==c)return"";var da=c;if("mxfile"!=da.nodeName.toLowerCase()){if(Z){var ka=c.ownerDocument.createElement("diagram");ka.setAttribute("name",mxResources.get("pageWithNumber",[1]));ka.setAttribute("id",Editor.guid());
-ka.appendChild(c)}else{ka=Graph.zapGremlins(mxUtils.getXml(c));da=Graph.compress(ka);if(Graph.decompress(da)!=ka)return ka;ka=c.ownerDocument.createElement("diagram");ka.setAttribute("name",mxResources.get("pageWithNumber",[1]));ka.setAttribute("id",Editor.guid());mxUtils.setTextContent(ka,da)}da=c.ownerDocument.createElement("mxfile");da.appendChild(ka)}K?(da=da.cloneNode(!0),da.removeAttribute("modified"),da.removeAttribute("host"),da.removeAttribute("agent"),da.removeAttribute("etag"),da.removeAttribute("userAgent"),
-da.removeAttribute("version"),da.removeAttribute("editor"),da.removeAttribute("type")):(da.removeAttribute("userAgent"),da.removeAttribute("modified"),da.removeAttribute("version"),da.removeAttribute("editor"),da.removeAttribute("pages"),da.removeAttribute("type"),da.removeAttribute("etag"),mxClient.IS_CHROMEAPP?da.setAttribute("host","Chrome"):EditorUi.isElectronApp?da.setAttribute("host","Electron"):da.setAttribute("host",window.location.hostname),da.setAttribute("agent",null!=navigator.userAgent?
-navigator.userAgent:navigator.appVersion),da.setAttribute("version",EditorUi.VERSION),1<da.getElementsByTagName("diagram").length&&null!=this.pages&&da.setAttribute("pages",this.pages.length));null!=ha&&(da=da.cloneNode(!0),da.setAttribute("scale",ha));null!=ca&&(da=da.cloneNode(!0),da.setAttribute("border",ca));c=Z?mxUtils.getPrettyXml(da):mxUtils.getXml(da);if(!F&&!x&&(H||null!=m&&/(\.html)$/i.test(m.getTitle())))c=this.getHtml2(mxUtils.getXml(da),g,null!=m?m.getTitle():null,oa,aa);else if(F||!x&&
-null!=m&&/(\.svg)$/i.test(m.getTitle()))null==m||m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER||(n=null),m=this.getSvgFileProperties(da),c=this.getEmbeddedSvg(c,g,n,null,M,L,aa,null,null,m.scale,m.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,g,m,n){c=null!=c?c:!0;g=null!=g?g:!1;m=null!=m?m:!Editor.defaultCompressed;var x=this.editor.getGraphXml(c,n);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(L){var K=L.getElementsByTagName("mxGraphModel"),
-Z=0<K.length?K[0]:null;K=L;null==Z&&m?(Z=mxUtils.getNodeValue(L),0<Z.length&&(Z=Graph.decompress(Z),null!=Z&&0<Z.length&&(K=L.cloneNode(!1),K.appendChild(mxUtils.parseXml(Z).documentElement)))):null==Z||m?K=L.cloneNode(!0):(K=L.cloneNode(!1),mxUtils.setTextContent(K,Graph.compressNode(Z)));x.appendChild(K)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(x),x=this.fileNode.cloneNode(!1),g)c(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var F=this.pages[g],
-H=F.node;if(F!=this.currentPage)if(F.needsUpdate){var M=new mxCodec(mxUtils.createXmlDocument());M=M.encode(new mxGraphModel(F.root));this.editor.graph.saveViewState(F.viewState,M,null,n);EditorUi.removeChildNodes(H);H.appendChild(M);delete F.needsUpdate}else n&&(this.updatePageRoot(F),null!=F.viewState.backgroundImage&&null!=F.viewState.backgroundImage.originalSrc&&(M=new mxCodec(mxUtils.createXmlDocument()),M=M.encode(new mxGraphModel(F.root)),this.editor.graph.saveViewState(F.viewState,M,null,
-n,F),H=H.cloneNode(!1),H.appendChild(M)));c(H)}return x};EditorUi.prototype.anonymizeString=function(c,g){for(var m=[],n=0;n<c.length;n++){var x=c.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?m.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?m.push(String.fromCharCode(65+Math.round(25*Math.random()))):x.toUpperCase()!=x?m.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?m.push(" "):m.push("?"):m.push(g?"0":Math.round(9*Math.random()))}return m.join("")};EditorUi.prototype.anonymizePatch=
-function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var g=0;g<c[EditorUi.DIFF_INSERT].length;g++)try{var m=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=m.getAttribute("name")&&m.setAttribute("name",this.anonymizeString(m.getAttribute("name")));c[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(m)}catch(F){c[EditorUi.DIFF_INSERT][g].data=F.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var n in c[EditorUi.DIFF_UPDATE]){var x=c[EditorUi.DIFF_UPDATE][n];
-null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(g=mxUtils.bind(this,function(F){var H=x.cells[F];if(null!=H){for(var M in H)null!=H[M].value&&(H[M].value="["+H[M].value.length+"]"),null!=H[M].xmlValue&&(H[M].xmlValue="["+H[M].xmlValue.length+"]"),null!=H[M].style&&(H[M].style="["+H[M].style.length+"]"),mxUtils.isEmptyObject(H[M])&&delete H[M];mxUtils.isEmptyObject(H)&&delete x.cells[F]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);
-mxUtils.isEmptyObject(x)&&delete c[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,g){if(null!=c.attributes)for(var m=0;m<c.attributes.length;m++)"as"!=c.attributes[m].name&&c.setAttribute(c.attributes[m].name,this.anonymizeString(c.attributes[m].value,g));if(null!=c.childNodes)for(m=0;m<c.childNodes.length;m++)this.anonymizeAttributes(c.childNodes[m],g)};EditorUi.prototype.anonymizeNode=
-function(c,g){g=c.getElementsByTagName("mxCell");for(var m=0;m<g.length;m++)null!=g[m].getAttribute("value")&&g[m].setAttribute("value","["+g[m].getAttribute("value").length+"]"),null!=g[m].getAttribute("xmlValue")&&g[m].setAttribute("xmlValue","["+g[m].getAttribute("xmlValue").length+"]"),null!=g[m].getAttribute("style")&&g[m].setAttribute("style","["+g[m].getAttribute("style").length+"]"),null!=g[m].parentNode&&"root"!=g[m].parentNode.nodeName&&null!=g[m].parentNode.parentNode&&(g[m].setAttribute("id",
-g[m].parentNode.getAttribute("id")),g[m].parentNode.parentNode.replaceChild(g[m],g[m].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.clearStatus(),c?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==
-DrawioFile.SYNC)}),mxUtils.bind(this,function(m){this.spinner.stop();g.handleFileError(m,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(m){g.handleFileError(m,!0)}))))};EditorUi.prototype.getFileData=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca){x=null!=x?x:!0;F=null!=F?F:!1;K=null!=K?K:!Editor.defaultCompressed;var aa=this.editor.graph;if((g||!c&&null!=L&&/(\.svg)$/i.test(L.getTitle()))&&null!=this.pages&&this.currentPage!=
-this.pages[0]){var oa=aa.getGlobalVariable;aa=this.createTemporaryGraph(aa.getStylesheet());aa.setBackgroundImage=this.editor.graph.setBackgroundImage;aa.background=this.editor.graph.background;var da=null!=this.pages?this.pages[0]:null;null==da||this.currentPage==da?aa.setBackgroundImage(this.editor.graph.backgroundImage):null!=da.viewState&&null!=da.viewState&&aa.setBackgroundImage(da.viewState.backgroundImage);aa.getGlobalVariable=function(ka){return"page"==ka&&null!=da?da.getName():"pagenumber"==
-ka?1:oa.apply(this,arguments)};document.body.appendChild(aa.container);null!=da&&aa.model.setRoot(da.root)}H=null!=H?H:this.getXmlFileData(x,F,K,Z);L=null!=L?L:this.getCurrentFile();c=this.createFileData(H,aa,L,window.location.href,c,g,m,n,x,M,K,ha,ca);aa!=this.editor.graph&&aa.container.parentNode.removeChild(aa.container);return c};EditorUi.prototype.getHtml=function(c,g,m,n,x,F){F=null!=F?F:!0;var H=null,M=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){H=F?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());
-var L=g.view.scale;F=Math.floor(H.x/L-g.view.translate.x);L=Math.floor(H.y/L-g.view.translate.y);H=g.background;null==x&&(g=this.getBasenames().join(";"),0<g.length&&(M=EditorUi.drawHost+"/embed.js?s="+g));c.setAttribute("x0",F);c.setAttribute("y0",L)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=n&&c.setAttribute("edit",n));null!=x&&(x=x.replace(/&/g,"&amp;"));c=
-null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";n=Graph.compress(c);Graph.decompress(n)!=c&&(n=encodeURIComponent(c));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+
-(null==x&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\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==x?'<script type="text/javascript" src="'+M+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};
-EditorUi.prototype.getHtml2=function(c,g,m,n,x){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+
-(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\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(c))+'"></div>\n'+(null==x?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var g=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,m=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(m)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[g],"cause",[m]),Error(mxResources.get("notADiagramFile")+
-" ("+m+")");c=null!=g?this.editor.extractGraphModel(g,!0):null;null!=c&&(g=c);if(null!=g&&"mxfile"==g.nodeName&&(c=g.getElementsByTagName("diagram"),m={},0<c.length)){var n=this.getHashObject(),x=null;this.fileNode=g;this.pages=[];for(var F=0;F<c.length;F++){null==c[F].getAttribute("id")&&c[F].setAttribute("id",F);g=new DiagramPage(c[F]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[F+1]));this.pages.push(g);if(null==n.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||
-null!=n.pageId&&g.getId()==n.pageId)x=g;if(null==m[g.getId()])m[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=null!=x?x:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}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,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var H=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(F=0;F<H.length;F++)g[H[F]]=!0;var M=this.editor.graph.getModel(),L=M.getChildren(M.root);for(F=0;F<L.length;F++){var K=L[F];M.setVisible(K,g[K.id]||!1)}}catch(Z){}};EditorUi.prototype.getBaseFilename=function(c){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(".")));!c&&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(c,g,m,n,x,
-F,H,M,L,K,Z,ha,ca,aa,oa,da,ka){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename(!x),V=ba+("xml"==c||"pdf"==c&&Z?".drawio":"")+"."+c;if("xml"==c){var k=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(V,c,k,"text/xml")}else if("html"==c)k=this.getHtml2(this.getFileData(!0),this.editor.graph,ba),this.saveData(V,c,k,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
-c?V=ba+".png":"jpeg"==c&&(V=ba+".jpg"),this.saveRequest(V,c,mxUtils.bind(this,function(W,U){try{return this.createDownloadRequest(W,c,n,U,H,x,M,L,K,Z,ha,void 0,void 0,!F,ca,aa,oa,da,ka)}catch(Y){this.handleError(Y)}}));else{var v=null,I=mxUtils.bind(this,function(W){W.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==c){var N=this.editor.graph.background;
-if(H||N==mxConstants.NONE)N=null;var T=this.editor.graph.getSvg(N,null,null,null,null,n);m&&this.editor.graph.addSvgShadow(T);this.editor.convertImages(T,mxUtils.bind(this,mxUtils.bind(this,function(W){this.spinner.stop();I(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(W))})))}else V=ba+".svg",v=this.getFileData(!1,!0,null,mxUtils.bind(this,function(W){this.spinner.stop();I(W)}),n)}}catch(W){this.handleError(W)}};EditorUi.prototype.createDownloadRequest=function(c,g,m,n,x,F,H,M,L,
-K,Z,ha,ca,aa,oa,da,ka,ba,V){c=this.downloadRequestBuilder(c,g,m,n,x,F,H,M,L,K,Z,ha,ca,aa,oa,da,ka,ba,V);g="";for(var k in c)m=c[k],null!=m&&(g+=k+"="+encodeURIComponent(m)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca,aa,oa,da,ka,ba,V){var k=this.editor.graph,v=k.getGraphBounds();m=this.getFileData(!0,null,null,null,m,0==F?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var I=null,N=null,T=null;if(!EditorUi.isElectronApp&&
-(v.width*v.height>MAX_AREA||m.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};K=K?"1":"0";"pdf"==g&&(null!=Z?(I=Z.from,N=Z.to):0==F&&(T="1"));"xmlpng"==g&&(K="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(F=0;F<this.pages.length;F++)if(this.pages[F]==this.currentPage){I=F;break}F=k.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!x?x||null!=F&&F!=mxConstants.NONE||(F="#ffffff"):F=mxConstants.NONE;x={globalVars:k.getExportVariables()};null!=
-Z&&null!=Z.from&&(x.globalVars.pagenumber=Z.from+1);L&&(x.grid={size:k.gridSize,steps:k.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:k.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:I,to:N,allPages:T,bg:null!=F?F:mxConstants.NONE,base64:n,embedXml:K,xml:m,filename:null!=c?c:"",extras:JSON.stringify(x),scale:H,border:M,pageMargin:oa,w:ha&&isFinite(ha)?ha:null,h:ca&&isFinite(ca)?ca:null,crop:null!=
-aa&&aa?"1":"0",fit:null!=da&&da?"1":"0",shadows:null!=V&&V?"1":"0",sheetsAcross:ka,sheetsDown:ba}};EditorUi.prototype.setMode=function(c,g){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var g=c.indexOf("#");0<=g&&(c=c.substring(0,g))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,g={};if(null!=c&&0<c.length){var m=c.lastIndexOf("#");if(0<m){c=decodeURIComponent(c.substring(m+
-1));try{g=JSON.parse(c)}catch(n){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var m=g.lastIndexOf("#");0<m&&(g=g.substring(0,m));try{null==c||mxUtils.isEmptyObject(c)||
-(g=g+"#"+encodeURIComponent(JSON.stringify(c)))}catch(n){}0<m&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(c,g,m){var n=window.location.hash,x=mxUtils.bind(this,function(H){var M=null!=c.data?c.data:"";null!=H&&0<H.length&&(0<M.length&&(M+="\n"),M+=H);H=new LocalFile(this,"csv"!=c.format&&0<M.length?M:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return n};
-this.fileLoaded(H);"csv"==c.format&&this.importCsv(M,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var L=null!=c.interval?parseInt(c.interval):6E4,K=null,Z=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(aa){ca===this.currentPage&&(200<=aa.getStatus()&&300>=aa.getStatus()?(this.updateDiagram(aa.getText()),
-ha()):this.handleError({message:mxResources.get("error")+" "+aa.getStatus()}))}),mxUtils.bind(this,function(aa){this.handleError(aa)}))}),ha=mxUtils.bind(this,function(){window.clearTimeout(K);K=window.setTimeout(Z,L)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ha();Z()}));ha();Z()}null!=g&&g()});if(null!=c.url&&0<c.url.length){var F=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(F,mxUtils.bind(this,function(H){x(H)}),mxUtils.bind(this,function(H){null!=m&&m(H)}))}else x("")};
-EditorUi.prototype.updateDiagram=function(c){function g(k){var v=new mxCellOverlay(k.image||x.warningImage,k.tooltip,k.align,k.valign,k.offset);v.addListener(mxEvent.CLICK,function(I,N){n.alert(k.tooltip)});return v}var m=null,n=this;if(null!=c&&0<c.length&&(m=mxUtils.parseXml(c),c=null!=m?m.documentElement:null,null!=c&&"updates"==c.nodeName)){var x=this.editor.graph,F=x.getModel();F.beginUpdate();var H=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var M=F.getCell(c.getAttribute("id"));
-if(null!=M){try{var L=c.getAttribute("value");if(null!=L){var K=mxUtils.parseXml(L).documentElement;if(null!=K)if("1"==K.getAttribute("replace-value"))F.setValue(M,K);else for(var Z=K.attributes,ha=0;ha<Z.length;ha++)x.setAttributeForCell(M,Z[ha].nodeName,0<Z[ha].nodeValue.length?Z[ha].nodeValue:null)}}catch(k){null!=window.console&&console.log("Error in value for "+M.id+": "+k)}try{var ca=c.getAttribute("style");null!=ca&&x.model.setStyle(M,ca)}catch(k){null!=window.console&&console.log("Error in style for "+
-M.id+": "+k)}try{var aa=c.getAttribute("icon");if(null!=aa){var oa=0<aa.length?JSON.parse(aa):null;null!=oa&&oa.append||x.removeCellOverlays(M);null!=oa&&x.addCellOverlay(M,g(oa))}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}try{var da=c.getAttribute("geometry");if(null!=da){da=JSON.parse(da);var ka=x.getCellGeometry(M);if(null!=ka){ka=ka.clone();for(key in da){var ba=parseFloat(da[key]);"dx"==key?ka.x+=ba:"dy"==key?ka.y+=ba:"dw"==key?ka.width+=ba:"dh"==key?ka.height+=
-ba:ka[key]=parseFloat(da[key])}x.model.setGeometry(M,ka)}}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}}}else if("model"==c.nodeName){for(var V=c.firstChild;null!=V&&V.nodeType!=mxConstants.NODETYPE_ELEMENT;)V=V.nextSibling;null!=V&&(new mxCodec(c.firstChild)).decode(V,F)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(x.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))x.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||
-0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(H=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{F.endUpdate()}null!=H&&this.chromelessResize&&this.chromelessResize(!0,H)}return m};EditorUi.prototype.getCopyFilename=function(c,g){var m=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var n=m.lastIndexOf(".");0<=n&&(c=m.substring(n),m=m.substring(0,n));if(g){g=m;var x=new Date;m=x.getFullYear();n=x.getMonth()+1;var F=
-x.getDate(),H=x.getHours(),M=x.getMinutes();x=x.getSeconds();m=g+(" "+(m+"-"+n+"-"+F+"-"+H+"-"+M+"-"+x))}return m=mxResources.get("copyOf",[m])+c};EditorUi.prototype.logIfModified=function(c,g){try{null!=c&&g&&EditorUi.debug("File.closed",[c])}catch(m){}};EditorUi.prototype.fileLoaded=function(c,g,m){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[c],"noDialogs",[g]);var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=
+17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=g.getFunction,n=this.editor.graph,x=this;g.getFunction=function(F){if(n.isSelectionEmpty()&&
+null!=x.pages&&0<x.pages.length){var G=x.getSelectedPageIndex();if(mxEvent.isShiftDown(F)){if(37==F.keyCode)return function(){0<G&&x.movePage(G,G-1)};if(38==F.keyCode)return function(){0<G&&x.movePage(G,0)};if(39==F.keyCode)return function(){G<x.pages.length-1&&x.movePage(G,G+1)};if(40==F.keyCode)return function(){G<x.pages.length-1&&x.movePage(G,x.pages.length-1)}}else if(mxEvent.isControlDown(F)||mxClient.IS_MAC&&mxEvent.isMetaDown(F)){if(37==F.keyCode)return function(){0<G&&x.selectNextPage(!1)};
+if(38==F.keyCode)return function(){0<G&&x.selectPage(x.pages[0])};if(39==F.keyCode)return function(){G<x.pages.length-1&&x.selectNextPage(!0)};if(40==F.keyCode)return function(){G<x.pages.length-1&&x.selectPage(x.pages[x.pages.length-1])}}}return!(65<=F.keyCode&&90>=F.keyCode)||n.isSelectionEmpty()||mxEvent.isAltDown(F)||mxEvent.isShiftDown(F)||mxEvent.isControlDown(F)||mxClient.IS_MAC&&mxEvent.isMetaDown(F)?l.apply(this,arguments):null}}return g};var f=EditorUi.prototype.extractGraphModelFromHtml;
+EditorUi.prototype.extractGraphModelFromHtml=function(c){var g=f.apply(this,arguments);if(null==g)try{var l=c.indexOf("&lt;mxfile ");if(0<=l){var n=c.lastIndexOf("&lt;/mxfile&gt;");n>l&&(g=c.substring(l,n+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var x=mxUtils.parseXml(c),F=this.editor.extractGraphModel(x.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=F?mxUtils.getXml(F):""}}catch(G){}return g};EditorUi.prototype.validateFileData=
+function(c){if(null!=c&&0<c.length){var g=c.indexOf('<meta charset="utf-8">');0<=g&&(c=c.slice(0,g)+'<meta charset="utf-8"/>'+c.slice(g+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,g){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",g);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var l=null!=c?this.editor.extractGraphModel(c,!0):null;null!=l&&(c=l);if(null!=c){l=this.editor.graph;l.model.beginUpdate();
+try{var n=null!=this.pages?this.pages.slice():null,x=c.getElementsByTagName("diagram");if(1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var F=x.length-1;0<=F;F--){var G=this.updatePageRoot(new DiagramPage(x[F]));null==G.getName()&&G.setName(mxResources.get("pageWithNumber",[F+1]));l.model.execute(new ChangePage(this,G,0==F?G:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=
+new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(F=0;F<n.length;F++)l.model.execute(new ChangePage(this,n[F],null));var L=this.getCurrentFile();null!=L&&L.fileReplaced(g)}finally{l.model.endUpdate()}}};
+EditorUi.prototype.createFileData=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da){g=null!=g?g:this.editor.graph;x=null!=x?x:!1;M=null!=M?M:!0;Z=null!=Z?Z:!Editor.defaultCompressed;var ba=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var na="_blank";else ba=na=n;if(null==c)return"";var ca=c;if("mxfile"!=ca.nodeName.toLowerCase()){if(Z){var ka=c.ownerDocument.createElement("diagram");ka.setAttribute("name",mxResources.get("pageWithNumber",[1]));ka.setAttribute("id",Editor.guid());
+ka.appendChild(c)}else{ka=Graph.zapGremlins(mxUtils.getXml(c));ca=Graph.compress(ka);if(Graph.decompress(ca)!=ka)return ka;ka=c.ownerDocument.createElement("diagram");ka.setAttribute("name",mxResources.get("pageWithNumber",[1]));ka.setAttribute("id",Editor.guid());mxUtils.setTextContent(ka,ca)}ca=c.ownerDocument.createElement("mxfile");ca.appendChild(ka)}K?(ca=ca.cloneNode(!0),ca.removeAttribute("modified"),ca.removeAttribute("host"),ca.removeAttribute("agent"),ca.removeAttribute("etag"),ca.removeAttribute("userAgent"),
+ca.removeAttribute("version"),ca.removeAttribute("editor"),ca.removeAttribute("type")):(ca.removeAttribute("userAgent"),ca.removeAttribute("modified"),ca.removeAttribute("version"),ca.removeAttribute("editor"),ca.removeAttribute("pages"),ca.removeAttribute("type"),ca.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ca.setAttribute("host","Chrome"):EditorUi.isElectronApp?ca.setAttribute("host","Electron"):ca.setAttribute("host",window.location.hostname),ca.setAttribute("agent",null!=navigator.userAgent?
+navigator.userAgent:navigator.appVersion),ca.setAttribute("version",EditorUi.VERSION),1<ca.getElementsByTagName("diagram").length&&null!=this.pages&&ca.setAttribute("pages",this.pages.length));null!=ja&&(ca=ca.cloneNode(!0),ca.setAttribute("scale",ja));null!=da&&(ca=ca.cloneNode(!0),ca.setAttribute("border",da));c=Z?mxUtils.getPrettyXml(ca):mxUtils.getXml(ca);if(!F&&!x&&(G||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ca),g,null!=l?l.getTitle():null,na,ba);else if(F||!x&&
+null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(n=null),l=this.getSvgFileProperties(ca),c=this.getEmbeddedSvg(c,g,n,null,L,M,ba,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,g,l,n){c=null!=c?c:!0;g=null!=g?g:!1;l=null!=l?l:!Editor.defaultCompressed;var x=this.editor.getGraphXml(c,n);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(M){var K=M.getElementsByTagName("mxGraphModel"),
+Z=0<K.length?K[0]:null;K=M;null==Z&&l?(Z=mxUtils.getNodeValue(M),0<Z.length&&(Z=Graph.decompress(Z),null!=Z&&0<Z.length&&(K=M.cloneNode(!1),K.appendChild(mxUtils.parseXml(Z).documentElement)))):null==Z||l?K=M.cloneNode(!0):(K=M.cloneNode(!1),mxUtils.setTextContent(K,Graph.compressNode(Z)));x.appendChild(K)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(x),x=this.fileNode.cloneNode(!1),g)c(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var F=this.pages[g],
+G=F.node;if(F!=this.currentPage)if(F.needsUpdate){var L=new mxCodec(mxUtils.createXmlDocument());L=L.encode(new mxGraphModel(F.root));this.editor.graph.saveViewState(F.viewState,L,null,n);EditorUi.removeChildNodes(G);G.appendChild(L);delete F.needsUpdate}else n&&(this.updatePageRoot(F),null!=F.viewState.backgroundImage&&null!=F.viewState.backgroundImage.originalSrc&&(L=new mxCodec(mxUtils.createXmlDocument()),L=L.encode(new mxGraphModel(F.root)),this.editor.graph.saveViewState(F.viewState,L,null,
+n,F),G=G.cloneNode(!1),G.appendChild(L)));c(G)}return x};EditorUi.prototype.anonymizeString=function(c,g){for(var l=[],n=0;n<c.length;n++){var x=c.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?l.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):x.toUpperCase()!=x?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?l.push(" "):l.push("?"):l.push(g?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=
+function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var g=0;g<c[EditorUi.DIFF_INSERT].length;g++)try{var l=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));c[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(l)}catch(F){c[EditorUi.DIFF_INSERT][g].data=F.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var n in c[EditorUi.DIFF_UPDATE]){var x=c[EditorUi.DIFF_UPDATE][n];
+null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(g=mxUtils.bind(this,function(F){var G=x.cells[F];if(null!=G){for(var L in G)null!=G[L].value&&(G[L].value="["+G[L].value.length+"]"),null!=G[L].xmlValue&&(G[L].xmlValue="["+G[L].xmlValue.length+"]"),null!=G[L].style&&(G[L].style="["+G[L].style.length+"]"),mxUtils.isEmptyObject(G[L])&&delete G[L];mxUtils.isEmptyObject(G)&&delete x.cells[F]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);
+mxUtils.isEmptyObject(x)&&delete c[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,g){if(null!=c.attributes)for(var l=0;l<c.attributes.length;l++)"as"!=c.attributes[l].name&&c.setAttribute(c.attributes[l].name,this.anonymizeString(c.attributes[l].value,g));if(null!=c.childNodes)for(l=0;l<c.childNodes.length;l++)this.anonymizeAttributes(c.childNodes[l],g)};EditorUi.prototype.anonymizeNode=
+function(c,g){g=c.getElementsByTagName("mxCell");for(var l=0;l<g.length;l++)null!=g[l].getAttribute("value")&&g[l].setAttribute("value","["+g[l].getAttribute("value").length+"]"),null!=g[l].getAttribute("xmlValue")&&g[l].setAttribute("xmlValue","["+g[l].getAttribute("xmlValue").length+"]"),null!=g[l].getAttribute("style")&&g[l].setAttribute("style","["+g[l].getAttribute("style").length+"]"),null!=g[l].parentNode&&"root"!=g[l].parentNode.nodeName&&null!=g[l].parentNode.parentNode&&(g[l].setAttribute("id",
+g[l].parentNode.getAttribute("id")),g[l].parentNode.parentNode.replaceChild(g[l],g[l].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.clearStatus(),c?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==
+DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();g.handleFileError(l,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){g.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da){x=null!=x?x:!0;F=null!=F?F:!1;K=null!=K?K:!Editor.defaultCompressed;var ba=this.editor.graph;if((g||!c&&null!=M&&/(\.svg)$/i.test(M.getTitle()))&&null!=this.pages&&this.currentPage!=
+this.pages[0]){var na=ba.getGlobalVariable;ba=this.createTemporaryGraph(ba.getStylesheet());ba.setBackgroundImage=this.editor.graph.setBackgroundImage;ba.background=this.editor.graph.background;var ca=null!=this.pages?this.pages[0]:null;null==ca||this.currentPage==ca?ba.setBackgroundImage(this.editor.graph.backgroundImage):null!=ca.viewState&&null!=ca.viewState&&ba.setBackgroundImage(ca.viewState.backgroundImage);ba.getGlobalVariable=function(ka){return"page"==ka&&null!=ca?ca.getName():"pagenumber"==
+ka?1:na.apply(this,arguments)};document.body.appendChild(ba.container);null!=ca&&ba.model.setRoot(ca.root)}G=null!=G?G:this.getXmlFileData(x,F,K,Z);M=null!=M?M:this.getCurrentFile();c=this.createFileData(G,ba,M,window.location.href,c,g,l,n,x,L,K,ja,da);ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);return c};EditorUi.prototype.getHtml=function(c,g,l,n,x,F){F=null!=F?F:!0;var G=null,L=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){G=F?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());
+var M=g.view.scale;F=Math.floor(G.x/M-g.view.translate.x);M=Math.floor(G.y/M-g.view.translate.y);G=g.background;null==x&&(g=this.getBasenames().join(";"),0<g.length&&(L=EditorUi.drawHost+"/embed.js?s="+g));c.setAttribute("x0",F);c.setAttribute("y0",M)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=n&&c.setAttribute("edit",n));null!=x&&(x=x.replace(/&/g,"&amp;"));c=
+null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";n=Graph.compress(c);Graph.decompress(n)!=c&&(n=encodeURIComponent(c));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+
+(null==x&&null!=G&&G!=mxConstants.NONE?' style="background-color:'+G+';">':">")+'\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==x?'<script type="text/javascript" src="'+L+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};
+EditorUi.prototype.getHtml2=function(c,g,l,n,x){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+
+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\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(c))+'"></div>\n'+(null==x?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var g=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,l=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[g],"cause",[l]),Error(mxResources.get("notADiagramFile")+
+" ("+l+")");c=null!=g?this.editor.extractGraphModel(g,!0):null;null!=c&&(g=c);if(null!=g&&"mxfile"==g.nodeName&&(c=g.getElementsByTagName("diagram"),l={},0<c.length)){var n=this.getHashObject(),x=null;this.fileNode=g;this.pages=[];for(var F=0;F<c.length;F++){null==c[F].getAttribute("id")&&c[F].setAttribute("id",F);g=new DiagramPage(c[F]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[F+1]));this.pages.push(g);if(null==n.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||
+null!=n.pageId&&g.getId()==n.pageId)x=g;if(null==l[g.getId()])l[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=null!=x?x:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}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,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var G=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(F=0;F<G.length;F++)g[G[F]]=!0;var L=this.editor.graph.getModel(),M=L.getChildren(L.root);for(F=0;F<M.length;F++){var K=M[F];L.setVisible(K,g[K.id]||!1)}}catch(Z){}};EditorUi.prototype.getBaseFilename=function(c){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(".")));!c&&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(c,g,l,n,x,
+F,G,L,M,K,Z,ja,da,ba,na,ca,ka){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var aa=this.getBaseFilename(!x),V=aa+("xml"==c||"pdf"==c&&Z?".drawio":"")+"."+c;if("xml"==c){var k=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(V,c,k,"text/xml")}else if("html"==c)k=this.getHtml2(this.getFileData(!0),this.editor.graph,aa),this.saveData(V,c,k,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
+c?V=aa+".png":"jpeg"==c&&(V=aa+".jpg"),this.saveRequest(V,c,mxUtils.bind(this,function(W,U){try{return this.createDownloadRequest(W,c,n,U,G,x,L,M,K,Z,ja,void 0,void 0,!F,da,ba,na,ca,ka)}catch(Y){this.handleError(Y)}}));else{var v=null,J=mxUtils.bind(this,function(W){W.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==c){var N=this.editor.graph.background;
+if(G||N==mxConstants.NONE)N=null;var T=this.editor.graph.getSvg(N,null,null,null,null,n);l&&this.editor.graph.addSvgShadow(T);this.editor.convertImages(T,mxUtils.bind(this,mxUtils.bind(this,function(W){this.spinner.stop();J(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(W))})))}else V=aa+".svg",v=this.getFileData(!1,!0,null,mxUtils.bind(this,function(W){this.spinner.stop();J(W)}),n)}}catch(W){this.handleError(W)}};EditorUi.prototype.createDownloadRequest=function(c,g,l,n,x,F,G,L,M,
+K,Z,ja,da,ba,na,ca,ka,aa,V){c=this.downloadRequestBuilder(c,g,l,n,x,F,G,L,M,K,Z,ja,da,ba,na,ca,ka,aa,V);g="";for(var k in c)l=c[k],null!=l&&(g+=k+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da,ba,na,ca,ka,aa,V){var k=this.editor.graph,v=k.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==F?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var J=null,N=null,T=null;if(!EditorUi.isElectronApp&&
+(v.width*v.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};K=K?"1":"0";"pdf"==g&&(null!=Z?(J=Z.from,N=Z.to):0==F&&(T="1"));"xmlpng"==g&&(K="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(F=0;F<this.pages.length;F++)if(this.pages[F]==this.currentPage){J=F;break}F=k.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!x?x||null!=F&&F!=mxConstants.NONE||(F="#ffffff"):F=mxConstants.NONE;x={globalVars:k.getExportVariables()};null!=
+Z&&null!=Z.from&&(x.globalVars.pagenumber=Z.from+1);M&&(x.grid={size:k.gridSize,steps:k.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:k.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:J,to:N,allPages:T,bg:null!=F?F:mxConstants.NONE,base64:n,embedXml:K,xml:l,filename:null!=c?c:"",extras:JSON.stringify(x),scale:G,border:L,pageMargin:na,w:ja&&isFinite(ja)?ja:null,h:da&&isFinite(da)?da:null,crop:null!=
+ba&&ba?"1":"0",fit:null!=ca&&ca?"1":"0",shadows:null!=V&&V?"1":"0",sheetsAcross:ka,sheetsDown:aa}};EditorUi.prototype.setMode=function(c,g){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var g=c.indexOf("#");0<=g&&(c=c.substring(0,g))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,g={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+
+1));try{g=JSON.parse(c)}catch(n){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var l=g.lastIndexOf("#");0<l&&(g=g.substring(0,l));try{null==c||mxUtils.isEmptyObject(c)||
+(g=g+"#"+encodeURIComponent(JSON.stringify(c)))}catch(n){}0<l&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(c,g,l){var n=window.location.hash,x=mxUtils.bind(this,function(G){var L=null!=c.data?c.data:"";null!=G&&0<G.length&&(0<L.length&&(L+="\n"),L+=G);G=new LocalFile(this,"csv"!=c.format&&0<L.length?L:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);G.getHash=function(){return n};
+this.fileLoaded(G);"csv"==c.format&&this.importCsv(L,mxUtils.bind(this,function(da){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var M=null!=c.interval?parseInt(c.interval):6E4,K=null,Z=mxUtils.bind(this,function(){var da=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ba){da===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),
+ja()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),ja=mxUtils.bind(this,function(){window.clearTimeout(K);K=window.setTimeout(Z,M)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ja();Z()}));ja();Z()}null!=g&&g()});if(null!=c.url&&0<c.url.length){var F=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(F,mxUtils.bind(this,function(G){x(G)}),mxUtils.bind(this,function(G){null!=l&&l(G)}))}else x("")};
+EditorUi.prototype.updateDiagram=function(c){function g(k){var v=new mxCellOverlay(k.image||x.warningImage,k.tooltip,k.align,k.valign,k.offset);v.addListener(mxEvent.CLICK,function(J,N){n.alert(k.tooltip)});return v}var l=null,n=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var x=this.editor.graph,F=x.getModel();F.beginUpdate();var G=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var L=F.getCell(c.getAttribute("id"));
+if(null!=L){try{var M=c.getAttribute("value");if(null!=M){var K=mxUtils.parseXml(M).documentElement;if(null!=K)if("1"==K.getAttribute("replace-value"))F.setValue(L,K);else for(var Z=K.attributes,ja=0;ja<Z.length;ja++)x.setAttributeForCell(L,Z[ja].nodeName,0<Z[ja].nodeValue.length?Z[ja].nodeValue:null)}}catch(k){null!=window.console&&console.log("Error in value for "+L.id+": "+k)}try{var da=c.getAttribute("style");null!=da&&x.model.setStyle(L,da)}catch(k){null!=window.console&&console.log("Error in style for "+
+L.id+": "+k)}try{var ba=c.getAttribute("icon");if(null!=ba){var na=0<ba.length?JSON.parse(ba):null;null!=na&&na.append||x.removeCellOverlays(L);null!=na&&x.addCellOverlay(L,g(na))}}catch(k){null!=window.console&&console.log("Error in icon for "+L.id+": "+k)}try{var ca=c.getAttribute("geometry");if(null!=ca){ca=JSON.parse(ca);var ka=x.getCellGeometry(L);if(null!=ka){ka=ka.clone();for(key in ca){var aa=parseFloat(ca[key]);"dx"==key?ka.x+=aa:"dy"==key?ka.y+=aa:"dw"==key?ka.width+=aa:"dh"==key?ka.height+=
+aa:ka[key]=parseFloat(ca[key])}x.model.setGeometry(L,ka)}}}catch(k){null!=window.console&&console.log("Error in icon for "+L.id+": "+k)}}}else if("model"==c.nodeName){for(var V=c.firstChild;null!=V&&V.nodeType!=mxConstants.NODETYPE_ELEMENT;)V=V.nextSibling;null!=V&&(new mxCodec(c.firstChild)).decode(V,F)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(x.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))x.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||
+0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(G=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{F.endUpdate()}null!=G&&this.chromelessResize&&this.chromelessResize(!0,G)}return l};EditorUi.prototype.getCopyFilename=function(c,g){var l=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var n=l.lastIndexOf(".");0<=n&&(c=l.substring(n),l=l.substring(0,n));if(g){g=l;var x=new Date;l=x.getFullYear();n=x.getMonth()+1;var F=
+x.getDate(),G=x.getHours(),L=x.getMinutes();x=x.getSeconds();l=g+(" "+(l+"-"+n+"-"+F+"-"+G+"-"+L+"-"+x))}return l=mxResources.get("copyOf",[l])+c};EditorUi.prototype.logIfModified=function(c,g){try{null!=c&&g&&EditorUi.debug("File.closed",[c])}catch(l){}};EditorUi.prototype.fileLoaded=function(c,g,l){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[c],"noDialogs",[g]);var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=
n&&(n.removeListener(this.descriptorChangedListener),this.logIfModified(n,!0),n.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var F=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=n&&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.fname.innerText="");
this.clearStatus();this.updateUi();g||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=c)try{this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();
this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.clearStatus():this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")}));!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();null!=m&&m();this.editor.fireEvent(new mxEventObject("fileLoaded"));x=!0;if(!this.isOffline()&&null!=c.getMode()){var H="1"==urlParams.sketch?"sketch":uiTheme;if(null==H)H="default";else if("sketch"==H||"min"==H)H+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?
-"on":"off")+"_theme_"+H})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(M){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(M){}}catch(M){this.fileLoadedError=M;if(null!=c)try{c.close()}catch(L){}c=mxUtils.bind(this,function(){null!=
-urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=n?this.fileLoaded(n)||F():F()});g?c():(null!=M.fallbackFileData&&(M.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var L=new LocalFile(this,M.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(L)})}),this.handleError(M,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else F();return x};EditorUi.prototype.getHashValueForPages=
-function(c,g){var m=0,n=new mxGraphModel,x=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var F=0;F<c.length;F++){this.updatePageRoot(c[F]);var H=c[F].node.cloneNode(!1);H.removeAttribute("name");n.root=c[F].root;var M=x.encode(n);this.editor.graph.saveViewState(c[F].viewState,M,!0);M.removeAttribute("pageWidth");M.removeAttribute("pageHeight");H.appendChild(M);null!=g&&(g.eltCount+=H.getElementsByTagName("*").length,g.nodeCount+=H.getElementsByTagName("mxCell").length);
-m=(m<<5)-m+this.hashValue(H,function(L,K,Z,ha){return!ha||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=K&&"y"!=K&&"width"!=K&&"height"!=K?ha&&"mxCell"==L.nodeName&&"previous"==K?null:Z:Math.round(Z)},g)<<0}return m};EditorUi.prototype.hashValue=function(c,g,m){var n=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(n^=this.hashValue(c.nodeName,g,m));if(null!=c.attributes){null!=m&&(m.attrCount+=
-c.attributes.length);for(var x=0;x<c.attributes.length;x++){var F=c.attributes[x].name,H=null!=g?g(c,F,c.attributes[x].value,!0):c.attributes[x].value;null!=H&&(n^=this.hashValue(F,g,m)+this.hashValue(H,g,m))}}if(null!=c.childNodes)for(x=0;x<c.childNodes.length;x++)n=(n<<5)-n+this.hashValue(c.childNodes[x],g,m)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);g=0;null!=m&&(m.byteCount+=c.length);for(x=0;x<c.length;x++)g=(g<<5)-g+c.charCodeAt(x)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=
-function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,g,m,n,x,F,H){};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(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};
-EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var g=0;g<c.length;g++)null!=c[g].xml&&"<"!=c[g].xml.charAt(0)&&(c[g].xml=mxUtils.trim(Graph.decompress(c[g].xml)));g=mxUtils.createXmlDocument();var m=g.createElement("mxlibrary");mxUtils.setTextContent(m,JSON.stringify(c,null,2));g.appendChild(m);return mxUtils.getXml(g,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),
-".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var g=this.sidebar.palettes[c];if(null!=g){for(var m=0;m<g.length;m++)g[m].parentNode.removeChild(g[m]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,g){var m=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!g){null==c&&(g=this.sidebar.palettes["L.scratchpad"],null==g&&(g=this.sidebar.palettes.search),null!=g&&(c=g[g.length-1].nextSibling));
-c=null!=c?c:m.firstChild.nextSibling.nextSibling;g=m.lastChild;var n=g.previousSibling;m.insertBefore(g,c);m.insertBefore(n,g)}};EditorUi.prototype.loadLibrary=function(c,g){var m=mxUtils.parseXml(c.getData());if("mxlibrary"==m.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(m.documentElement));this.libraryLoaded(c,n,m.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=
-function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.showSearchWindow=function(c,g){var m=c?"findReplace":"find",n=m+"Window";if(null==this[n]){var x="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,F=c?x?330:300:240;this[n]=new FindWindow(this,document.body.offsetWidth-(F+20),100,F,c?x?304:288:180,c);this[n].window.addListener("show",function(){this.fireEvent(new mxEventObject(m))});this[n].window.addListener("hide",
-function(){this.fireEvent(new mxEventObject(m))});this[n].window.setVisible(!0)}else null==g&&this[n].window.setVisible(!this[n].window.isVisible());null!=g&&(this[n].doSearch(g),this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,g,m,n){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var x=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var F=0;F<this.openLibraries.length;F++)if(this.openLibraries[F].file.getHash()==
-c.getHash()){mxUtils.remove(this.openLibraries[F],this.openLibraries);break}x={file:c,images:g,title:m,expand:n};this.openLibraries.push(x)}else this.scratchpad=c;F=this.sidebar.palettes[c.getHash()];F=null!=F?F[F.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var H=null,M=mxUtils.bind(this,function(ba,V){0==ba.length&&c.isEditable()?(null==H&&(H=document.createElement("div"),H.className="geDropTarget",mxUtils.write(H,mxResources.get("dragElementsHere"))),V.appendChild(H)):this.addLibraryEntries(ba,
-V)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==m&&(m=c.getTitle(),null!=m&&/(\.xml)$/i.test(m)&&(m=m.substring(0,m.lastIndexOf("."))));var L=this.sidebar.addPalette(c.getHash(),m,null!=n?n:!0,mxUtils.bind(this,function(ba){M(g,ba)}));null!=x&&(x.div=L);this.repositionLibrary(F,"L.scratchpad"!=c.getHash());n=L.parentNode.previousSibling;m=n.getAttribute("title");null!=m&&0<m.length&&".scratchpad"!=c.title&&n.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+m);var K=document.createElement("div");
-K.style.backgroundColor="inherit";n.style.position="relative";var Z=document.createElement("img");Z.className="geLibraryButton";Z.setAttribute("src",Editor.crossImage);Z.setAttribute("title",mxResources.get("close"));var ha=null;if(".scratchpad"!=c.title||this.closableScratchpad)K.appendChild(Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(ba){if(!mxEvent.isConsumed(ba)){var V=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(c)});null!=ha?this.confirm(mxResources.get("allChangesLost"),
-null,V,mxResources.get("cancel"),mxResources.get("discardChanges")):V();mxEvent.consume(ba)}}));if(c.isEditable()){var ca=this.editor.graph,aa=null;m=mxUtils.bind(this,function(ba){this.showLibraryDialog(c.getTitle(),L,g,c,c.getMode());mxEvent.consume(ba)});var oa=mxUtils.bind(this,function(ba){c.setModified(!0);c.isAutosave()?(null!=aa&&null!=aa.parentNode&&aa.parentNode.removeChild(aa),aa=Z.cloneNode(!1),aa.setAttribute("src",Editor.spinImage),aa.setAttribute("title",mxResources.get("saving")),
-aa.style.cursor="default",aa.style.marginRight="2px",aa.style.marginTop="-2px",K.insertBefore(aa,K.firstChild),this.saveLibrary(c.getTitle(),g,c,c.getMode(),!0,!0,function(){null!=aa&&null!=aa.parentNode&&aa.parentNode.removeChild(aa)})):null==ha&&(ha=Z.cloneNode(!1),ha.setAttribute("src",Editor.saveImage),ha.setAttribute("title",mxResources.get("save")),K.insertBefore(ha,K.firstChild),mxEvent.addListener(ha,"click",mxUtils.bind(this,function(V){this.saveLibrary(c.getTitle(),g,c,c.getMode(),c.constructor==
-LocalLibrary,!0,function(){null==ha||c.isModified()||(ha.parentNode.removeChild(ha),ha=null)});mxEvent.consume(V)})))}),da=mxUtils.bind(this,function(ba,V,k,v){ba=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(ba)));for(var I=0;I<ba.length;I++){var N=ca.getCellGeometry(ba[I]);null!=N&&N.translate(-V.x,-V.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(ba,V.width,V.height,v||"",!0,null,!1));ba=mxUtils.getXml(this.editor.graph.encodeCells(ba));Editor.defaultCompressed&&(ba=Graph.compress(ba));
-V={xml:ba,w:V.width,h:V.height};null!=v&&(V.title=v);g.push(V);oa(k);null!=H&&null!=H.parentNode&&0<g.length&&(H.parentNode.removeChild(H),H=null)}),ka=mxUtils.bind(this,function(ba){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(ba),ca.getRubberband().reset()):null!=ba&&mxEvent.getSource(ba).classList.contains("geLibraryButton")&&this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var V=ca.getSelectionCells(),
-k=ca.view.getBounds(V);if(null!=k&&0<k.width&&0<k.height){var v=ca.view.scale;k.x/=v;k.y/=v;k.width/=v;k.height/=v;k.x-=ca.view.translate.x;k.y-=ca.view.translate.y;da(V,k)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(ba)});mxEvent.addGestureListeners(L,function(){},mxUtils.bind(this,function(ba){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility=
-"hidden"),L.style.backgroundColor="light-dark(#fefefe, #000000)",L.style.cursor="copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(ba))}),mxUtils.bind(this,function(ba){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler&&(L.style.backgroundColor="",L.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,ka(ba),mxEvent.consume(ba))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(ba){ca.isMouseDown&&
-null!=ca.graphHandler.first&&(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(ba){L.style.backgroundColor="light-dark(#fefefe, #000000)";ba.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();ba.stopPropagation();ba.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,
-function(ba){L.style.cursor="";L.style.backgroundColor="";0<ba.dataTransfer.files.length&&this.importFiles(ba.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(V,k,v,I,N,T,W,U,Y){if(null!=V&&"image/"==k.substring(0,6))V="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(V),V=[new mxCell("",new mxGeometry(0,0,N,T),V)],V[0].vertex=!0,da(V,new mxRectangle(0,0,N,T),ba,mxEvent.isAltDown(ba)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g,
-" ")),null!=H&&null!=H.parentNode&&0<g.length&&(H.parentNode.removeChild(H),H=null);else{var fa=!1,na=mxUtils.bind(this,function(la,qa){null!=la&&"application/pdf"==qa&&(qa=Editor.extractGraphModelFromPdf(la),null!=qa&&0<qa.length&&(la=qa));if(null!=la)if(la=mxUtils.parseXml(la),"mxlibrary"==la.documentElement.nodeName)try{var ya=JSON.parse(mxUtils.getTextContent(la.documentElement));M(ya,L);g=g.concat(ya);oa(ba);this.spinner.stop();fa=!0}catch(Ba){}else if("mxfile"==la.documentElement.nodeName)try{var wa=
-la.documentElement.getElementsByTagName("diagram");for(ya=0;ya<wa.length;ya++){var Ia=this.stringToCells(Editor.getDiagramNodeXml(wa[ya])),Aa=this.editor.graph.getBoundingBoxFromGeometry(Ia);null!=Aa&&da(Ia,new mxRectangle(0,0,Aa.width,Aa.height),ba)}fa=!0}catch(Ba){null!=window.console&&console.log("error in drop handler:",Ba)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=H&&null!=H.parentNode&&0<g.length&&(H.parentNode.removeChild(H),H=null)});null!=
-Y&&null!=W&&EditorUi.isVisioFilename(W)?this.importVisio(Y,function(la){na(la,"text/xml")},null,W):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(V,W)&&null!=Y?this.isExternalDataComms()?this.parseFile(Y,mxUtils.bind(this,function(la){4==la.readyState&&(this.spinner.stop(),200<=la.status&&299>=la.status?na(la.responseText,"text/xml"):this.handleError({message:mxResources.get(413==la.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),
-this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):na(V,k)}}));ba.stopPropagation();ba.preventDefault()})),mxEvent.addListener(L,"dragleave",function(ba){L.style.cursor="";L.style.backgroundColor="";ba.stopPropagation();ba.preventDefault()}));Z=Z.cloneNode(!1);Z.setAttribute("src",Editor.editImage);Z.setAttribute("title",mxResources.get("edit"));K.insertBefore(Z,K.firstChild);mxEvent.addListener(Z,"click",m);m=Z.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",
-mxResources.get("add"));K.insertBefore(m,K.firstChild);mxEvent.addListener(m,"click",ka);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ka);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(m=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),m.className="geLibraryButton",K.insertBefore(m,K.firstChild))}n.appendChild(K);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,g){for(var m=0;m<c.length;m++)try{var n=
-c[m],x=n.data;if(null!=x){x="data:"==x.substring(0,5)?this.convertDataUri(x):x;var F="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(F+="aspect=fixed;");F=F+"image="+x+";";null!=n.style&&(F+=n.style);g.appendChild(this.sidebar.createVertexTemplate(F,n.w,n.h,"",n.title||"",!1,null,!0))}else if(null!=n.xml){var H=this.stringToCells("<"==n.xml.charAt(0)?n.xml:Graph.decompress(n.xml)),M=0==H.length?mxResources.get("drawingEmpty"):null!=n.title?n.title:"";
-g.appendChild(this.sidebar.createVertexTemplateFromCells(H,n.w,n.h,M,!0,null,!0))}}catch(L){M=null!=L.message?mxResources.get("error")+": "+L.message:String(L),F=this.sidebar.createVertexTemplateFromCells(null,n.w,n.h,M,!0,null,!0),g.appendChild(F)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||
-(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,g,m,n,x,F,H){c=new ImageDialog(this,c,g,m,n,x,F,H);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,g,m,n,x,F){var H=localStorage.getItem(g);c=new TextareaDialog(this,c,null!=H?JSON.stringify(JSON.parse(H),null,2):"",mxUtils.bind(this,function(M){if(null!=
-M)try{if(null!=F&&F(M),M==H)this.hideDialog();else{if(0<M.length){var L=JSON.parse(M);localStorage.setItem(g,JSON.stringify(L))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(K){this.handleError(K)}}),null,mxResources.get("close"),null,null,null,!0,null,null,x,m,n);this.showDialog(c.container,660,480,!0,!1,null,null,null,new mxRectangle(0,0,null!=m&&2<m.length?500:440,280));c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,
-g,m,n){c=null!=c?c:mxUtils.bind(this,function(x,F,H,M){F||(x=new ChangePageSetup(this,n?H:null,x),x.ignoreColor=!n,null!=M&&n&&(x.shadowVisible=M),this.editor.graph.model.execute(x))});c=new BackgroundImageDialog(this,c,g,m,n);this.showDialog(c.container,400,n?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,g,m,n,x){c=new LibraryDialog(this,c,g,m,n,x);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(F){F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&
-this.showSplash()}));c.init()};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var g=l.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(m){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(c,g,m,n,x,F,H){var M=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},L=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&
-null!=c.message)try{H||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!H||null==window.console||console.error("EditorUi.handleError:",c)}catch(ca){}if(null!=L||null!=g){H=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var K=mxResources.get("ok"),Z=null;g=null!=g?g:mxResources.get("error");if(null!=L){null!=L.retry&&(K=mxResources.get("cancel"),Z=function(){M();L.retry()});if(404==L.code||404==
-L.status||403==L.code){H=403==L.code?null!=L.message?mxUtils.htmlEntities(L.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ha=null!=x?null:null!=F?F:window.location.hash;if(null!=ha&&("#G"==ha.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ha.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&
-0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==L.code||404==L.status)){ha="#U"==ha.substring(0,2)?ha.substring(45,ha.lastIndexOf("%26ex")):ha.substring(2);this.showError(g,H,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ha);null!=n&&n()}),Z,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){ka.innerText=
-"";for(var ba=0;ba<aa.length;ba++){var V=document.createElement("option");mxUtils.write(V,aa[ba].displayName);V.value=ba;ka.appendChild(V);V=document.createElement("option");V.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(V,"<"+aa[ba].email+">");V.setAttribute("disabled","disabled");ka.appendChild(V)}V=document.createElement("option");mxUtils.write(V,mxResources.get("addAccount"));V.value=aa.length;ka.appendChild(V)}var aa=this.drive.getUsersList(),oa=document.createElement("div"),da=document.createElement("div");
-da.style.marginBottom="6px";mxUtils.write(da,mxResources.get("changeUser")+": ");oa.appendChild(da);var ka=document.createElement("select");ka.style.width="100%";ca();mxEvent.addListener(ka,"change",mxUtils.bind(this,function(){var ba=ka.value,V=aa.length!=ba;V&&this.drive.setUser(aa[ba]);this.drive.authorize(V,mxUtils.bind(this,function(){V||(aa=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(k){this.handleError(k)}),!0)}));oa.appendChild(ka);oa=new CustomDialog(this,oa,mxUtils.bind(this,
-function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(oa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=m&&m()}),520,150);return}}null!=L.message?H=""==L.message&&null!=L.name?mxUtils.htmlEntities(L.name,!1):mxUtils.htmlEntities(L.message,!1):null!=L.response&&null!=L.response.error?H=mxUtils.htmlEntities(L.response.error,!1):"undefined"!==typeof window.App&&(L.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout"),
-!1):L.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof L&&0<L.length&&(H=mxUtils.htmlEntities(L,!1)))}x=c=null;null!=L&&null!=L.helpLink?(c=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(L.helpLink)})):null!=L&&null!=L.ownerEmail?(c=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+c+": "+L.ownerEmail+")",!1),x=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(L.ownerEmail))})):
-null!=L&&null!=L.alternateAction&&(c=L.alternateAction.label,x=L.alternateAction.funct);this.showError(g,H,K,m,Z,null,null,c,x,null,null,null,n?m:null)}else null!=m&&m()};EditorUi.prototype.alert=function(c,g,m){c=new ErrorDialog(this,null,c,mxResources.get("ok"),g);this.showDialog(c.container,m||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,g,m,n,x,F){c=null!=c?c:"";var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},M=Math.min(220,28*Math.ceil(Math.max(1,
-c.length)/50));c=new ConfirmDialog(this,c,function(){H();null!=g&&g()},function(){H();null!=m&&m()},n,x,null,null,null,null,M);this.showDialog(c.container,340,46+M,!0,F);c.init()};EditorUi.prototype.showBanner=function(c,g,m,n,x,F,H,M,L){F=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){H=null!=H?H:"translate(-50%,120%)";M=null!=M?M:"translate(-50%,0%)";var K=document.createElement("div");K.className="geBtn gePrimaryBtn geBanner"+
-(x?" geSmallBanner":"");K.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(K.style,"transform",H);mxUtils.setPrefixedStyle(K.style,"transition","all 1000ms ease");null!=L&&mxUtils.setPrefixedStyle(K.style,"transform-origin",L);L=L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));L.setAttribute("border","0");x||(F=document.createElement("img"),F.setAttribute("src",IMAGE_PATH+"/logo.png"),F.setAttribute("border",
-"0"),F.setAttribute("align","absmiddle"),F.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",K.appendChild(F),L.style.cssText=(x?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",K.appendChild(L));mxUtils.write(K,g);document.body.appendChild(K);this.bannerShowing=!0;x&&(L.className="geLibraryButton",K.appendChild(L));g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";
-var Z=document.createElement("input");Z.setAttribute("type","checkbox");Z.setAttribute("id","geDoNotShowAgainCheckbox");Z.style.marginRight="6px";if(!n){g.appendChild(Z);var ha=document.createElement("label");ha.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ha,mxResources.get("doNotShowAgain"));g.appendChild(ha);K.style.paddingBottom=x?"16px":"30px";K.appendChild(g)}var ca=mxUtils.bind(this,function(){null!=K.parentNode&&(K.parentNode.removeChild(K),this.bannerShowing=!1,Z.checked||
-n)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=L&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(oa){mxEvent.consume(oa);ca()}));var aa=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(K.style,"transform",H);window.setTimeout(mxUtils.bind(this,function(){ca()}),1E3)});mxEvent.addListener(K,"click",mxUtils.bind(this,function(oa){var da=mxEvent.getSource(oa);da!=Z&&da!=ha?(null!=m&&m(),ca(),
-mxEvent.consume(oa)):aa()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(K.style,"transform",M)}),500);window.setTimeout(aa,x?5E3:3E4);F=!0}return F};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=function(c,g,m,n){c=c.toDataURL("image/"+m);if(null!=c&&6<c.length)null!=g&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",
-encodeURIComponent(g))),0<n&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,g,m,n,x){var F="jpeg"==m?"jpg":m;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+F;c=this.createImageDataUri(c,g,m,x);this.saveData(n,F,c.substring(c.lastIndexOf(",")+1),"image/"+m,!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(c,g){c=new TextareaDialog(this,c,g,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,g,m,n,x,F){"text/xml"!=m||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||
-/(\.html)$/i.test(g)||(g=g+"."+(null!=F?F:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=n?this.base64ToBlob(c,m):new Blob([c],{type:m}),navigator.msSaveOrOpenBlob(c,g);else if(mxClient.IS_IE)m=window.open("about:blank","_blank"),null==m?mxUtils.popup(c,!0):(m.document.write(c),m.document.close(),m.document.execCommand("SaveAs",!0,g),m.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==m||"image/"!=m.substring(0,6)?this.showTextDialog(g+":",c):this.openInNewWindow(c,
-m,n);else{var H=document.createElement("a");F=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var M=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);F=65==(M?parseInt(M[2],10):!1)?!1:F}if(F||this.isOffline()){H.href=URL.createObjectURL(n?this.base64ToBlob(c,m):new Blob([c],{type:m}));F?H.download=g:H.setAttribute("target","_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)},
-2E4),H.click(),H.parentNode.removeChild(H)}catch(L){}}else this.createEchoRequest(c,g,m,n,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,g,m,n,x,F){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=m?"&mime="+m:"")+(null!=x?"&format="+x:"")+(null!=F?"&base64="+F:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,g,m,n,x,F,H,M,L){F=null!=F?F:!1;H=null!=H?H:"vsdx"!=x&&(!mxClient.IS_IOS||
-!navigator.standalone);var K=mxUtils.bind(this,function(ha,ca,aa,oa){try{if("_blank"==ca)if(null!=m&&"image/"==m.substring(0,6))this.openInNewWindow(c,m,n);else if(null!=m&&"text/html"==m.substring(0,9)){var da=new EmbedDialog(this,c);this.showDialog(da.container,450,240,!0,!0);da.init()}else{var ka=window.open("about:blank");null==ka?mxUtils.popup(c,!0):(ka.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ka.document.close())}else if(ca==App.MODE_DEVICE||"download"==ca)this.doSaveLocalFile(c,
-ha,m,n,null,M);else if(null!=ha&&0<ha.length){var ba=mxUtils.bind(this,function(V){try{this.exportFile(c,ha,m,n,ca,V)}catch(k){this.handleError(k)}});null!=oa?ba(oa):this.pickFolder(ca,ba)}}catch(V){this.handleError(V)}});x=[];F||x.push(App.MODE_BROWSER);H||x.push("_blank");var Z=new SaveDialog(this,g,mxUtils.bind(this,function(ha,ca,aa){K(ha.value,ca,ha,aa);this.hideDialog(null,null,Z.container)}),x,c,m,n,L);this.showDialog(Z.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));
-Z.init()};EditorUi.prototype.openInNewWindow=function(c,g,m){var n=window.open("about:blank");if(null==n||null==n.document)mxUtils.popup(c,!0);else{var x="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var F=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=F&&(x="background: "+F+";")}x='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+x+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||m?(F=m?c:btoa(unescape(encodeURIComponent(c))),
-n.document.write(x+'<img style="max-width:100%;" src="data:'+g+";base64,"+F+'"/></body></html>')):n.document.write(x+c+"</body></html>"):n.document.write(x+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");n.document.close()}};var u=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=
+window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=l&&l();this.editor.fireEvent(new mxEventObject("fileLoaded"));x=!0;if(!this.isOffline()&&null!=c.getMode()){var G="1"==urlParams.sketch?"sketch":uiTheme;if(null==G)G="default";else if("sketch"==G||"min"==G)G+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?
+"on":"off")+"_theme_"+G})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(L){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(L){}}catch(L){this.fileLoadedError=L;if(null!=c)try{c.close()}catch(M){}c=mxUtils.bind(this,function(){null!=
+urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=n?this.fileLoaded(n)||F():F()});g?c():(null!=L.fallbackFileData&&(L.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var M=new LocalFile(this,L.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(M)})}),this.handleError(L,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else F();return x};EditorUi.prototype.getHashValueForPages=
+function(c,g){var l=0,n=new mxGraphModel,x=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var F=0;F<c.length;F++){this.updatePageRoot(c[F]);var G=c[F].node.cloneNode(!1);G.removeAttribute("name");n.root=c[F].root;var L=x.encode(n);this.editor.graph.saveViewState(c[F].viewState,L,!0);L.removeAttribute("pageWidth");L.removeAttribute("pageHeight");G.appendChild(L);null!=g&&(g.eltCount+=G.getElementsByTagName("*").length,g.nodeCount+=G.getElementsByTagName("mxCell").length);
+l=(l<<5)-l+this.hashValue(G,function(M,K,Z,ja){return!ja||"mxGeometry"!=M.nodeName&&"mxPoint"!=M.nodeName||"x"!=K&&"y"!=K&&"width"!=K&&"height"!=K?ja&&"mxCell"==M.nodeName&&"previous"==K?null:Z:Math.round(Z)},g)<<0}return l};EditorUi.prototype.hashValue=function(c,g,l){var n=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(n^=this.hashValue(c.nodeName,g,l));if(null!=c.attributes){null!=l&&(l.attrCount+=
+c.attributes.length);for(var x=0;x<c.attributes.length;x++){var F=c.attributes[x].name,G=null!=g?g(c,F,c.attributes[x].value,!0):c.attributes[x].value;null!=G&&(n^=this.hashValue(F,g,l)+this.hashValue(G,g,l))}}if(null!=c.childNodes)for(x=0;x<c.childNodes.length;x++)n=(n<<5)-n+this.hashValue(c.childNodes[x],g,l)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);g=0;null!=l&&(l.byteCount+=c.length);for(x=0;x<c.length;x++)g=(g<<5)-g+c.charCodeAt(x)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=
+function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,g,l,n,x,F,G){};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(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};
+EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var g=0;g<c.length;g++)null!=c[g].xml&&"<"!=c[g].xml.charAt(0)&&(c[g].xml=mxUtils.trim(Graph.decompress(c[g].xml)));g=mxUtils.createXmlDocument();var l=g.createElement("mxlibrary");mxUtils.setTextContent(l,JSON.stringify(c,null,2));g.appendChild(l);return mxUtils.getXml(g,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),
+".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var g=this.sidebar.palettes[c];if(null!=g){for(var l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,g){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!g){null==c&&(g=this.sidebar.palettes["L.scratchpad"],null==g&&(g=this.sidebar.palettes.search),null!=g&&(c=g[g.length-1].nextSibling));
+c=null!=c?c:l.firstChild.nextSibling.nextSibling;g=l.lastChild;var n=g.previousSibling;l.insertBefore(g,c);l.insertBefore(n,g)}};EditorUi.prototype.loadLibrary=function(c,g){var l=mxUtils.parseXml(c.getData());if("mxlibrary"==l.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(c,n,l.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=
+function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.showSearchWindow=function(c,g){var l=c?"findReplace":"find",n=l+"Window";if(null==this[n]){var x="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,F=c?x?330:300:240;this[n]=new FindWindow(this,document.body.offsetWidth-(F+20),100,F,c?x?304:288:180,c);this[n].window.addListener("show",function(){this.fireEvent(new mxEventObject(l))});this[n].window.addListener("hide",
+function(){this.fireEvent(new mxEventObject(l))});this[n].window.setVisible(!0)}else null==g&&this[n].window.setVisible(!this[n].window.isVisible());null!=g&&(this[n].doSearch(g),this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,g,l,n){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var x=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var F=0;F<this.openLibraries.length;F++)if(this.openLibraries[F].file.getHash()==
+c.getHash()){mxUtils.remove(this.openLibraries[F],this.openLibraries);break}x={file:c,images:g,title:l,expand:n};this.openLibraries.push(x)}else this.scratchpad=c;F=this.sidebar.palettes[c.getHash()];F=null!=F?F[F.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var G=null,L=mxUtils.bind(this,function(aa,V){0==aa.length&&c.isEditable()?(null==G&&(G=document.createElement("div"),G.className="geDropTarget",mxUtils.write(G,mxResources.get("dragElementsHere"))),V.appendChild(G)):this.addLibraryEntries(aa,
+V)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var M=this.sidebar.addPalette(c.getHash(),l,null!=n?n:!0,mxUtils.bind(this,function(aa){L(g,aa)}));null!=x&&(x.div=M);this.repositionLibrary(F,"L.scratchpad"!=c.getHash());n=M.parentNode.previousSibling;l=n.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&n.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var K=document.createElement("div");
+K.style.backgroundColor="inherit";n.style.position="relative";var Z=document.createElement("img");Z.className="geLibraryButton";Z.setAttribute("src",Editor.crossImage);Z.setAttribute("title",mxResources.get("close"));var ja=null;if(".scratchpad"!=c.title||this.closableScratchpad)K.appendChild(Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(aa){if(!mxEvent.isConsumed(aa)){var V=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(c)});null!=ja?this.confirm(mxResources.get("allChangesLost"),
+null,V,mxResources.get("cancel"),mxResources.get("discardChanges")):V();mxEvent.consume(aa)}}));if(c.isEditable()){var da=this.editor.graph,ba=null;l=mxUtils.bind(this,function(aa){this.showLibraryDialog(c.getTitle(),M,g,c,c.getMode());mxEvent.consume(aa)});var na=mxUtils.bind(this,function(aa){c.setModified(!0);c.isAutosave()?(null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba),ba=Z.cloneNode(!1),ba.setAttribute("src",Editor.spinImage),ba.setAttribute("title",mxResources.get("saving")),
+ba.style.cursor="default",ba.style.marginRight="2px",ba.style.marginTop="-2px",K.insertBefore(ba,K.firstChild),this.saveLibrary(c.getTitle(),g,c,c.getMode(),!0,!0,function(){null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba)})):null==ja&&(ja=Z.cloneNode(!1),ja.setAttribute("src",Editor.saveImage),ja.setAttribute("title",mxResources.get("save")),K.insertBefore(ja,K.firstChild),mxEvent.addListener(ja,"click",mxUtils.bind(this,function(V){this.saveLibrary(c.getTitle(),g,c,c.getMode(),c.constructor==
+LocalLibrary,!0,function(){null==ja||c.isModified()||(ja.parentNode.removeChild(ja),ja=null)});mxEvent.consume(V)})))}),ca=mxUtils.bind(this,function(aa,V,k,v){aa=da.cloneCells(mxUtils.sortCells(da.model.getTopmostCells(aa)));for(var J=0;J<aa.length;J++){var N=da.getCellGeometry(aa[J]);null!=N&&N.translate(-V.x,-V.y)}M.appendChild(this.sidebar.createVertexTemplateFromCells(aa,V.width,V.height,v||"",!0,null,!1));aa=mxUtils.getXml(this.editor.graph.encodeCells(aa));Editor.defaultCompressed&&(aa=Graph.compress(aa));
+V={xml:aa,w:V.width,h:V.height};null!=v&&(V.title=v);g.push(V);na(k);null!=G&&null!=G.parentNode&&0<g.length&&(G.parentNode.removeChild(G),G=null)}),ka=mxUtils.bind(this,function(aa){if(da.isSelectionEmpty())da.getRubberband().isActive()?(da.getRubberband().execute(aa),da.getRubberband().reset()):null!=aa&&mxEvent.getSource(aa).classList.contains("geLibraryButton")&&this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var V=da.getSelectionCells(),
+k=da.view.getBounds(V);if(null!=k&&0<k.width&&0<k.height){var v=da.view.scale;k.x/=v;k.y/=v;k.width/=v;k.height/=v;k.x-=da.view.translate.x;k.y-=da.view.translate.y;ca(V,k)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(aa)});mxEvent.addGestureListeners(M,function(){},mxUtils.bind(this,function(aa){da.isMouseDown&&null!=da.panningManager&&null!=da.graphHandler.first&&(da.graphHandler.suspend(),null!=da.graphHandler.hint&&(da.graphHandler.hint.style.visibility=
+"hidden"),M.style.backgroundColor="light-dark(#fefefe, #000000)",M.style.cursor="copy",da.panningManager.stop(),da.autoScroll=!1,mxEvent.consume(aa))}),mxUtils.bind(this,function(aa){da.isMouseDown&&null!=da.panningManager&&null!=da.graphHandler&&(M.style.backgroundColor="",M.style.cursor="default",this.sidebar.showTooltips=!0,da.panningManager.stop(),da.graphHandler.reset(),da.isMouseDown=!1,da.autoScroll=!0,ka(aa),mxEvent.consume(aa))}));mxEvent.addListener(M,"mouseleave",mxUtils.bind(this,function(aa){da.isMouseDown&&
+null!=da.graphHandler.first&&(da.graphHandler.resume(),null!=da.graphHandler.hint&&(da.graphHandler.hint.style.visibility="visible"),M.style.backgroundColor="",M.style.cursor="",da.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(aa){M.style.backgroundColor="light-dark(#fefefe, #000000)";aa.dataTransfer.dropEffect="copy";M.style.cursor="copy";this.sidebar.hideTooltip();aa.stopPropagation();aa.preventDefault()})),mxEvent.addListener(M,"drop",mxUtils.bind(this,
+function(aa){M.style.cursor="";M.style.backgroundColor="";0<aa.dataTransfer.files.length&&this.importFiles(aa.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(V,k,v,J,N,T,W,U,Y){if(null!=V&&"image/"==k.substring(0,6))V="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(V),V=[new mxCell("",new mxGeometry(0,0,N,T),V)],V[0].vertex=!0,ca(V,new mxRectangle(0,0,N,T),aa,mxEvent.isAltDown(aa)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g,
+" ")),null!=G&&null!=G.parentNode&&0<g.length&&(G.parentNode.removeChild(G),G=null);else{var fa=!1,oa=mxUtils.bind(this,function(la,qa){null!=la&&"application/pdf"==qa&&(qa=Editor.extractGraphModelFromPdf(la),null!=qa&&0<qa.length&&(la=qa));if(null!=la)if(la=mxUtils.parseXml(la),"mxlibrary"==la.documentElement.nodeName)try{var ya=JSON.parse(mxUtils.getTextContent(la.documentElement));L(ya,M);g=g.concat(ya);na(aa);this.spinner.stop();fa=!0}catch(Ba){}else if("mxfile"==la.documentElement.nodeName)try{var wa=
+la.documentElement.getElementsByTagName("diagram");for(ya=0;ya<wa.length;ya++){var Ia=this.stringToCells(Editor.getDiagramNodeXml(wa[ya])),Aa=this.editor.graph.getBoundingBoxFromGeometry(Ia);null!=Aa&&ca(Ia,new mxRectangle(0,0,Aa.width,Aa.height),aa)}fa=!0}catch(Ba){null!=window.console&&console.log("error in drop handler:",Ba)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=G&&null!=G.parentNode&&0<g.length&&(G.parentNode.removeChild(G),G=null)});null!=
+Y&&null!=W&&EditorUi.isVisioFilename(W)?this.importVisio(Y,function(la){oa(la,"text/xml")},null,W):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(V,W)&&null!=Y?this.isExternalDataComms()?this.parseFile(Y,mxUtils.bind(this,function(la){4==la.readyState&&(this.spinner.stop(),200<=la.status&&299>=la.status?oa(la.responseText,"text/xml"):this.handleError({message:mxResources.get(413==la.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),
+this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):oa(V,k)}}));aa.stopPropagation();aa.preventDefault()})),mxEvent.addListener(M,"dragleave",function(aa){M.style.cursor="";M.style.backgroundColor="";aa.stopPropagation();aa.preventDefault()}));Z=Z.cloneNode(!1);Z.setAttribute("src",Editor.editImage);Z.setAttribute("title",mxResources.get("edit"));K.insertBefore(Z,K.firstChild);mxEvent.addListener(Z,"click",l);l=Z.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",
+mxResources.get("add"));K.insertBefore(l,K.firstChild);mxEvent.addListener(l,"click",ka);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ka);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),l.className="geLibraryButton",K.insertBefore(l,K.firstChild))}n.appendChild(K);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,g){for(var l=0;l<c.length;l++)try{var n=
+c[l],x=n.data;if(null!=x){x="data:"==x.substring(0,5)?this.convertDataUri(x):x;var F="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(F+="aspect=fixed;");F=F+"image="+x+";";null!=n.style&&(F+=n.style);g.appendChild(this.sidebar.createVertexTemplate(F,n.w,n.h,"",n.title||"",!1,null,!0))}else if(null!=n.xml){var G=this.stringToCells("<"==n.xml.charAt(0)?n.xml:Graph.decompress(n.xml)),L=0==G.length?mxResources.get("drawingEmpty"):null!=n.title?n.title:"";
+g.appendChild(this.sidebar.createVertexTemplateFromCells(G,n.w,n.h,L,!0,null,!0))}}catch(M){L=null!=M.message?mxResources.get("error")+": "+M.message:String(M),F=this.sidebar.createVertexTemplateFromCells(null,n.w,n.h,L,!0,null,!0),g.appendChild(F)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||
+(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,g,l,n,x,F,G){c=new ImageDialog(this,c,g,l,n,x,F,G);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,g,l,n,x,F){var G=localStorage.getItem(g);c=new TextareaDialog(this,c,null!=G?JSON.stringify(JSON.parse(G),null,2):"",mxUtils.bind(this,function(L){if(null!=
+L)try{if(null!=F&&F(L),L==G)this.hideDialog();else{if(0<L.length){var M=JSON.parse(L);localStorage.setItem(g,JSON.stringify(M))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(K){this.handleError(K)}}),null,mxResources.get("close"),null,null,null,!0,null,null,x,l,n);this.showDialog(c.container,660,480,!0,!1,null,null,null,new mxRectangle(0,0,null!=l&&2<l.length?500:440,280));c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,
+g,l,n){c=null!=c?c:mxUtils.bind(this,function(x,F,G,L){F||(x=new ChangePageSetup(this,n?G:null,x),x.ignoreColor=!n,null!=L&&n&&(x.shadowVisible=L),this.editor.graph.model.execute(x))});c=new BackgroundImageDialog(this,c,g,l,n);this.showDialog(c.container,400,n?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,g,l,n,x){c=new LibraryDialog(this,c,g,l,n,x);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(F){F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&
+this.showSplash()}));c.init()};var m=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var g=m.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(c,g,l,n,x,F,G){var L=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},M=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&
+null!=c.message)try{G||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!G||null==window.console||console.error("EditorUi.handleError:",c)}catch(da){}if(null!=M||null!=g){G=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var K=mxResources.get("ok"),Z=null;g=null!=g?g:mxResources.get("error");if(null!=M){null!=M.retry&&(K=mxResources.get("cancel"),Z=function(){L();M.retry()});if(404==M.code||404==
+M.status||403==M.code){G=403==M.code?null!=M.message?mxUtils.htmlEntities(M.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ja=null!=x?null:null!=F?F:window.location.hash;if(null!=ja&&("#G"==ja.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ja.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&
+0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==M.code||404==M.status)){ja="#U"==ja.substring(0,2)?ja.substring(45,ja.lastIndexOf("%26ex")):ja.substring(2);this.showError(g,G,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ja);null!=n&&n()}),Z,mxResources.get("changeUser"),mxUtils.bind(this,function(){function da(){ka.innerText=
+"";for(var aa=0;aa<ba.length;aa++){var V=document.createElement("option");mxUtils.write(V,ba[aa].displayName);V.value=aa;ka.appendChild(V);V=document.createElement("option");V.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(V,"<"+ba[aa].email+">");V.setAttribute("disabled","disabled");ka.appendChild(V)}V=document.createElement("option");mxUtils.write(V,mxResources.get("addAccount"));V.value=ba.length;ka.appendChild(V)}var ba=this.drive.getUsersList(),na=document.createElement("div"),ca=document.createElement("div");
+ca.style.marginBottom="6px";mxUtils.write(ca,mxResources.get("changeUser")+": ");na.appendChild(ca);var ka=document.createElement("select");ka.style.width="100%";da();mxEvent.addListener(ka,"change",mxUtils.bind(this,function(){var aa=ka.value,V=ba.length!=aa;V&&this.drive.setUser(ba[aa]);this.drive.authorize(V,mxUtils.bind(this,function(){V||(ba=this.drive.getUsersList(),da())}),mxUtils.bind(this,function(k){this.handleError(k)}),!0)}));na.appendChild(ka);na=new CustomDialog(this,na,mxUtils.bind(this,
+function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(na.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=M.message?G=""==M.message&&null!=M.name?mxUtils.htmlEntities(M.name,!1):mxUtils.htmlEntities(M.message,!1):null!=M.response&&null!=M.response.error?G=mxUtils.htmlEntities(M.response.error,!1):"undefined"!==typeof window.App&&(M.code==App.ERROR_TIMEOUT?G=mxUtils.htmlEntities(mxResources.get("timeout"),
+!1):M.code==App.ERROR_BUSY?G=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof M&&0<M.length&&(G=mxUtils.htmlEntities(M,!1)))}x=c=null;null!=M&&null!=M.helpLink?(c=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(M.helpLink)})):null!=M&&null!=M.ownerEmail?(c=mxResources.get("contactOwner"),G+=mxUtils.htmlEntities(" ("+c+": "+M.ownerEmail+")",!1),x=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(M.ownerEmail))})):
+null!=M&&null!=M.alternateAction&&(c=M.alternateAction.label,x=M.alternateAction.funct);this.showError(g,G,K,l,Z,null,null,c,x,null,null,null,n?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,g,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),g);this.showDialog(c.container,l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,g,l,n,x,F){c=null!=c?c:"";var G=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},L=Math.min(220,28*Math.ceil(Math.max(1,
+c.length)/50));c=new ConfirmDialog(this,c,function(){G();null!=g&&g()},function(){G();null!=l&&l()},n,x,null,null,null,null,L);this.showDialog(c.container,340,46+L,!0,F);c.init()};EditorUi.prototype.showBanner=function(c,g,l,n,x,F,G,L,M){F=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){G=null!=G?G:"translate(-50%,120%)";L=null!=L?L:"translate(-50%,0%)";var K=document.createElement("div");K.className="geBtn gePrimaryBtn geBanner"+
+(x?" geSmallBanner":"");K.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(K.style,"transform",G);mxUtils.setPrefixedStyle(K.style,"transition","all 1000ms ease");null!=M&&mxUtils.setPrefixedStyle(K.style,"transform-origin",M);M=M=document.createElement("img");M.setAttribute("src",Editor.crossImage);M.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));M.setAttribute("border","0");x||(F=document.createElement("img"),F.setAttribute("src",IMAGE_PATH+"/logo.png"),F.setAttribute("border",
+"0"),F.setAttribute("align","absmiddle"),F.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",K.appendChild(F),M.style.cssText=(x?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",K.appendChild(M));mxUtils.write(K,g);document.body.appendChild(K);this.bannerShowing=!0;x&&(M.className="geLibraryButton",K.appendChild(M));g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";
+var Z=document.createElement("input");Z.setAttribute("type","checkbox");Z.setAttribute("id","geDoNotShowAgainCheckbox");Z.style.marginRight="6px";if(!n){g.appendChild(Z);var ja=document.createElement("label");ja.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ja,mxResources.get("doNotShowAgain"));g.appendChild(ja);K.style.paddingBottom=x?"16px":"30px";K.appendChild(g)}var da=mxUtils.bind(this,function(){null!=K.parentNode&&(K.parentNode.removeChild(K),this.bannerShowing=!1,Z.checked||
+n)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=M&&mxEvent.addListener(M,"click",mxUtils.bind(this,function(na){mxEvent.consume(na);da()}));var ba=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(K.style,"transform",G);window.setTimeout(mxUtils.bind(this,function(){da()}),1E3)});mxEvent.addListener(K,"click",mxUtils.bind(this,function(na){var ca=mxEvent.getSource(na);ca!=Z&&ca!=ja?(null!=l&&l(),da(),
+mxEvent.consume(na)):ba()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(K.style,"transform",L)}),500);window.setTimeout(ba,x?5E3:3E4);F=!0}return F};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=function(c,g,l,n){c=c.toDataURL("image/"+l);if(null!=c&&6<c.length)null!=g&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",
+encodeURIComponent(g))),0<n&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,g,l,n,x){var F="jpeg"==l?"jpg":l;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+F;c=this.createImageDataUri(c,g,l,x);this.saveData(n,F,c.substring(c.lastIndexOf(",")+1),"image/"+l,!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(c,g){c=new TextareaDialog(this,c,g,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,g,l,n,x,F){"text/xml"!=l||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||
+/(\.html)$/i.test(g)||(g=g+"."+(null!=F?F:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=n?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,g);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(c,!0):(l.document.write(c),l.document.close(),l.document.execCommand("SaveAs",!0,g),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(g+":",c):this.openInNewWindow(c,
+l,n);else{var G=document.createElement("a");F=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof G.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var L=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);F=65==(L?parseInt(L[2],10):!1)?!1:F}if(F||this.isOffline()){G.href=URL.createObjectURL(n?this.base64ToBlob(c,l):new Blob([c],{type:l}));F?G.download=g:G.setAttribute("target","_blank");document.body.appendChild(G);try{window.setTimeout(function(){URL.revokeObjectURL(G.href)},
+2E4),G.click(),G.parentNode.removeChild(G)}catch(M){}}else this.createEchoRequest(c,g,l,n,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,g,l,n,x,F){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=l?"&mime="+l:"")+(null!=x?"&format="+x:"")+(null!=F?"&base64="+F:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,g,l,n,x,F,G,L,M){F=null!=F?F:!1;G=null!=G?G:"vsdx"!=x&&(!mxClient.IS_IOS||
+!navigator.standalone);var K=mxUtils.bind(this,function(ja,da,ba,na){try{if("_blank"==da)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,n);else if(null!=l&&"text/html"==l.substring(0,9)){var ca=new EmbedDialog(this,c);this.showDialog(ca.container,450,240,!0,!0);ca.init()}else{var ka=window.open("about:blank");null==ka?mxUtils.popup(c,!0):(ka.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ka.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(c,
+ja,l,n,null,L);else if(null!=ja&&0<ja.length){var aa=mxUtils.bind(this,function(V){try{this.exportFile(c,ja,l,n,da,V)}catch(k){this.handleError(k)}});null!=na?aa(na):this.pickFolder(da,aa)}}catch(V){this.handleError(V)}});x=[];F||x.push(App.MODE_BROWSER);G||x.push("_blank");var Z=new SaveDialog(this,g,mxUtils.bind(this,function(ja,da,ba){K(ja.value,da,ja,ba);this.hideDialog(null,null,Z.container)}),x,c,l,n,M);this.showDialog(Z.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));
+Z.init()};EditorUi.prototype.openInNewWindow=function(c,g,l){var n=window.open("about:blank");if(null==n||null==n.document)mxUtils.popup(c,!0);else{var x="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var F=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=F&&(x="background: "+F+";")}x='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+x+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||l?(F=l?c:btoa(unescape(encodeURIComponent(c))),
+n.document.write(x+'<img style="max-width:100%;" src="data:'+g+";base64,"+F+'"/></body></html>')):n.document.write(x+c+"</body></html>"):n.document.write(x+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");n.document.close()}};var t=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(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=c(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.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,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 x=g.getBoundingClientRect();this.tagsDialog.style.left=x.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=x.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"}))}u.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=
+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"}))}t.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.editor.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var m=c(mxUtils.bind(this,function(n){var x=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",x);null!=this.exportDialog&&
-(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)x.apply(this);else{this.exportDialog=document.createElement("div");var F=m.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,80);this.exportDialog.style.left=F.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";F=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=F.zIndex;var H=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",
-speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});H.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",x);this.editor.exportToCanvas(mxUtils.bind(this,function(M){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var L=this.createImageDataUri(M,null,"png");M=document.createElement("img");M.style.maxWidth="140px";M.style.maxHeight="140px";
-M.style.cursor="pointer";M.style.backgroundColor="white";M.setAttribute("title",mxResources.get("openInNewWindow"));M.setAttribute("border","0");M.setAttribute("src",L);this.exportDialog.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){this.openInNewWindow(L.substring(L.indexOf(",")+1),"image/png",!0);x.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(M){H.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null);this.handleError(M)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,g,m,n,x,F){this.isLocalFileSave()?this.saveLocalFile(m,c,n,x,g,F):this.saveRequest(c,g,mxUtils.bind(this,function(H,M){return this.createEchoRequest(m,H,n,x,g,M)}),m,x,n)};EditorUi.prototype.saveRequest=function(c,g,m,n,x,F,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;var M=mxUtils.bind(this,
-function(K,Z,ha,ca){if("_blank"==Z||null!=K&&0<K.length){var aa=m("_blank"==Z?null:K,Z==App.MODE_DEVICE||"download"==Z||null==Z||"_blank"==Z?"0":"1");null!=aa&&(Z==App.MODE_DEVICE||"download"==Z||"_blank"==Z?aa.simulate(document,"_blank"):(ha=mxUtils.bind(this,function(oa){F=null!=F?F:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,K,F,!0,Z,oa)}catch(da){this.handleError(da)}else this.spinner.spin(document.body,mxResources.get("saving"))&&aa.send(mxUtils.bind(this,function(){this.spinner.stop();
-if(200<=aa.getStatus()&&299>=aa.getStatus())try{this.exportFile(aa.getText(),K,F,!0,Z,oa)}catch(da){this.handleError(da)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(da){this.spinner.stop();this.handleError(da)}))}),null!=ca?ha(ca):this.pickFolder(Z,ha)))}});x=[App.MODE_BROWSER];H||x.push("_blank");var L=new SaveDialog(this,c,mxUtils.bind(this,function(K,Z,ha){M(K.value,Z,K,ha);this.hideDialog(null,null,L.container)}),x,null,"application/pdf");this.showDialog(L.container,
-420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));L.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,g,m,n,x,F){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,g,m){g(null)};EditorUi.prototype.exportSvg=function(c,g,m,n,x,F,
-H,M,L,K,Z,ha,ca,aa){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(la){Editor.addRetryToError(la,mxUtils.bind(this,function(){this.exportSvg(c,g,m,n,x,F,H,M,L,K,Z,ha,ca,aa)}));this.handleError(la)})))try{var oa=this.editor.graph.isSelectionEmpty();m=null!=m?m:oa;var da=g?null:this.editor.graph.background;da==mxConstants.NONE&&(da=null);null==da&&0==g&&(da=this.editor.graph.shapeBackgroundColor);var ka=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&
-(this.editor.graph.addForeignObjectWarning=function(){});var ba=mxUtils.lightDarkColorSupported,V=mxUtils.preferDarkColor;if("light"==Z||"dark"==Z)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==Z;var k=Graph.addFont,v={};Graph.addFont=function(la,qa,ya,wa){k.call(this,la,qa,ya,v)};var I=this.editor.graph.createSvgImageExport(x),N=I.drawCellState;I.drawCellState=function(la,qa){null!=la&&Graph.processFontStyle(la.style);N.apply(this,arguments)};var T=this.editor.graph.getSvg(da,
-c,H,M,null,m,null,I,"blank"==K?"_blank":"self"==K?"_top":null,null,!ca,Z,ha);mxUtils.lightDarkColorSupported=ba;mxUtils.preferDarkColor=V;this.editor.graph.addForeignObjectWarning=ka;n&&this.editor.graph.addSvgShadow(T);var W=this.getBaseFilename()+(x?".drawio":"")+".svg";aa=null!=aa?aa:mxUtils.bind(this,function(la){this.isLocalFileSave()||la.length<=MAX_REQUEST_SIZE?this.saveData(W,"svg",la,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
-function(){mxUtils.popup(la)}))});var U=mxUtils.bind(this,function(la){this.spinner.stop();x&&la.setAttribute("content",this.getFileData(!0,null,null,null,m,L,null,null,null,null,null,c,H));aa(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(la))});this.editor.graph.mathEnabled&&this.editor.addMathCss(T);var Y=mxUtils.bind(this,function(la){Editor.replaceSvgDataUris&&F&&EditorUi.embedSvgImages(la);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(la,
-Z,U):U(la)}),fa=Graph.customFontElements;Graph.customFontElements=v;var na=mxUtils.bind(this,function(la){Graph.customFontElements=fa;Graph.addFont=k;F&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(la,Y,this.thumbImageCache)):Y(la)});ca?this.embedFonts(T,na):(this.editor.addFontCss(T),na(T))}catch(la){this.handleError(la)}};EditorUi.prototype.replaceAlternateContent=function(c,g,m){function n(ha,ca,aa,oa,da){var ka=mxUtils.createElementNs(c.ownerDocument,
-mxConstants.NS_SVG,"image");ka.setAttribute("x",ca);ka.setAttribute("y",aa+.5);ka.setAttribute("width",oa.width);ka.setAttribute("height",oa.height);null==ka.setAttributeNS?ka.setAttribute("xlink:href",da):ka.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",da);ha.replaceChild(ka,ha.lastChild);M()}function x(){if(H<Z.length)Z[H++](x)}var F="";g=c.getElementsByTagName("style");for(var H=0;H<g.length;H++)F+=g[H].innerHTML;g=c.getElementsByTagName("switch");counter=g.length;var M=mxUtils.bind(this,function(){counter--;
-0==counter&&m(c)}),L={},K={},Z=[];for(H=0;H<g.length;H++)mxUtils.bind(this,function(ha){var ca=ha.getElementsByTagName("div");if(0<ca.length)try{var aa=ca[0].cloneNode(!0),oa=parseInt(aa.style.marginLeft),da=parseInt(aa.style.paddingTop),ka=aa.getElementsByTagName("div")[1],ba=ca=!1,V=aa.style.alignItems,k=aa.style.justifyContent;if(null!=aa.style.writingMode){var v=aa.style.writingMode;ba="vertical-"==v.substring(0,9);ca="-rl"==v.substring(v.length-3)}var I=!ba&&"1px"==aa.style.width||ba&&"1px"==
-aa.style.height;if(!ba&&"1px"==aa.style.height||ba&&"1px"==aa.style.width)aa.style.alignItems=ba&&ca?"unsafe flex-end":"unsafe flex-start";I&&(aa.style.justifyContent="unsafe flex-start");aa.style.paddingTop="";aa.style.marginLeft="";var N=aa.outerHTML,T=L[N];null==T&&(aa.style.position="absolute",aa.style.visibility="hidden",document.body.appendChild(aa),v=1,v="1px"==aa.style.width?ka.offsetWidth:parseInt(aa.style.width),I=1,I="1px"==aa.style.height?ka.offsetHeight:parseInt(aa.style.height),document.body.removeChild(aa),
-T=new mxRectangle(oa,da,v,I),L[N]=T);"1px"==aa.style.height&&("unsafe center"==V?da-=T.height/2:"unsafe flex-end"==V&&(da-=T.height));if("1px"==aa.style.width)if(!ba&&"unsafe center"==k||ba&&"unsafe center"==V)oa-=T.width/2;else if(!ba&&"unsafe flex-end"==k||ba&&(!ca&&"unsafe flex-end"==V||ca&&"unsafe flex-start"==V))oa-=T.width;T=new mxRectangle(oa,da,T.width,T.height+parseInt(ka.style.fontSize)/4);Z.push(mxUtils.bind(this,function(W){var U=K[N];null==U?Graph.htmlToPng(N,T.width,T.height,mxUtils.bind(this,
-function(Y){n(ha,oa,da,T,Y);K[N]=Y;W()}),F):(n(ha,oa,da,T,U),W())}))}catch(W){M()}else M()})(g[H]);0==counter&&m(c);H=0;x()};EditorUi.prototype.addRadiobox=function(c,g,m,n,x,F,H){return this.addCheckbox(c,m,n,x,F,H,!0,g)};EditorUi.prototype.addCheckbox=function(c,g,m,n,x,F,H,M){F=null!=F?F:!0;var L=document.createElement("input");L.style.marginRight="8px";L.style.marginTop="16px";L.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();L.id=H;null!=M&&L.setAttribute("name",M);m&&
-(L.setAttribute("checked","checked"),L.defaultChecked=!0);n&&L.setAttribute("disabled","disabled");F&&(c.appendChild(L),m=document.createElement("label"),mxUtils.write(m,g),m.setAttribute("for",H),c.appendChild(m),x||mxUtils.br(c));return L};EditorUi.prototype.addEditButton=function(c,g){var m=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);m.style.marginLeft="24px";var n=this.getCurrentFile(),x="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(x=window.location.href);
-var F=document.createElement("select");F.style.maxWidth="200px";F.style.width="auto";F.style.marginLeft="8px";F.style.marginRight="10px";F.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));F.appendChild(n);var H=document.createElement("option");H.setAttribute("value","custom");mxUtils.write(H,mxResources.get("custom")+"...");F.appendChild(H);c.appendChild(F);mxEvent.addListener(F,"change",mxUtils.bind(this,function(){if("custom"==
-F.value){var M=new FilenameDialog(this,x,mxResources.get("ok"),function(L){null!=L?(x=L,H.setAttribute("title",L)):(F.value="blank",H.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){F.value="blank"});this.showDialog(M.container,300,80,!0,!1);M.init()}}));mxEvent.addListener(m,"change",mxUtils.bind(this,function(){m.checked&&(null==g||g.checked)?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return m.checked?
-"blank"===F.value?"_blank":x:null},getEditInput:function(){return m},getEditSelect:function(){return F}}};EditorUi.prototype.addLinkSection=function(c,g){function m(){var M=document.createElement("div");M.style.width="100%";M.style.height="100%";M.style.boxSizing="border-box";null!=F&&F!=mxConstants.NONE?(M.style.border="1px solid black",M.style.backgroundColor=F):(M.style.backgroundPosition="center center",M.style.backgroundRepeat="no-repeat",M.style.backgroundImage="url('"+Dialog.prototype.closeImage+
-"')");H.innerText="";H.appendChild(M)}mxUtils.write(c,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 x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));n.appendChild(x);x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("openInNewWindow"));n.appendChild(x);
-x=document.createElement("option");x.setAttribute("value","self");mxUtils.write(x,mxResources.get("openInThisWindow"));n.appendChild(x);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));c.appendChild(n);mxUtils.write(c,mxResources.get("borderColor")+":");var F="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(M){this.pickColor(F||"none",function(L){F=L;m()});
-mxEvent.consume(M)}));m();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";c.appendChild(H);mxUtils.br(c);return{getColor:function(){return F},getTarget:function(){return n.value},focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(c,g,m,n,x,F){F=null!=F?F:[];m&&(F.push("lightbox=1"),
-"auto"!=c&&F.push("target="+c),null!=g&&g!=mxConstants.NONE&&F.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=n&&0<n.length&&F.push("edit="+encodeURIComponent(n)),x&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));return F};EditorUi.prototype.createLink=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca){var aa=this.getCurrentFile();L=this.createUrlParameters(c,g,n,x,F,L);c=!0;null!=H?m="#U"+encodeURIComponent(H):M||null==aa||""==aa.getHash()?m="#R"+encodeURIComponent(m?this.getFileData(!0,
-null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(m="#"+aa.getHash(),c=!1);c&&null!=aa&&null!=aa.getTitle()&&aa.getTitle()!=this.defaultFilename&&L.push("title="+encodeURIComponent(aa.getTitle()));K&&1<m.length&&(L.push("open="+m.substring(1)),m="");Z&&null!=this.currentPage&&L.push("page-id="+this.currentPage.getId());ha&&L.push("transparent=1");null!=ca&&L.push("dark="+ca);return(n&&(null!=H||null!=aa&&aa.getMode()!=App.MODE_GITHUB&&aa.getMode()!=
-App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<L.length?"?"+L.join("&"):"")+m};EditorUi.prototype.createHtml=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca){this.getBasenames();var aa={};""!=x&&x!=mxConstants.NONE&&(aa.highlight=x);"auto"!==n&&(aa.target=n);K||(aa.lightbox=!1);aa.nav=this.editor.graph.foldingEnabled;m=parseInt(m);isNaN(m)||100==m||(aa.zoom=m/100);
-m=[];H&&(m.push("pages"),aa.resize=!0,null!=this.pages&&null!=this.currentPage&&(aa.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(m.push("zoom"),aa.resize=!0);M&&m.push("layers");L&&m.push("tags");null!=ca&&(aa["dark-mode"]=ca);0<m.length&&(K&&m.push("lightbox"),aa.toolbar=m.join(" "));null!=Z&&0<Z.length&&(aa.edit=Z);null!=c?aa.url=c:aa.xml=this.getFileData(!0,null,null,null,null,!H);g='<div class="mxgraph" style="'+(F?"max-width:100%;":"")+(""!=m?"border:1px solid transparent;":"")+'" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(aa))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ha(g,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"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(c,g,m,n){var x=document.createElement("div");
-x.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("html"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(F);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var M=document.createElement("input");M.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";M.setAttribute("value","url");M.setAttribute("type","radio");M.setAttribute("name",
-"type-embedhtmldialog");F=M.cloneNode(!0);F.setAttribute("value","copy");H.appendChild(F);var L=document.createElement("span");mxUtils.write(L,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(L);mxUtils.br(H);H.appendChild(M);L=document.createElement("span");mxUtils.write(L,mxResources.get("publicDiagramUrl"));H.appendChild(L);var K=this.getCurrentFile();null==m&&null!=K&&K.constructor==window.DriveFile&&(L=document.createElement("a"),L.style.paddingLeft="12px",L.style.color="gray",L.style.cursor=
-"pointer",mxUtils.write(L,mxResources.get("share")),H.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(K.getId(),K)})));F.setAttribute("checked","checked");null==m&&M.setAttribute("disabled","disabled");x.appendChild(H);H=380;var Z=this.addLinkSection(x),ha=document.createElement("select");ha.style.maxWidth="260px";ha.style.marginLeft="8px";ha.style.marginTop="16px";L=document.createElement("option");L.setAttribute("value","light");
-mxUtils.write(L,mxResources.get("light"));ha.appendChild(L);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));ha.appendChild(L);L=document.createElement("option");L.setAttribute("value","auto");mxUtils.write(L,mxResources.get("automatic"));L.setAttribute("selected","selected");ha.appendChild(L);L.setAttribute("selected","selected");mxUtils.write(x,mxResources.get("appearance")+":");x.appendChild(ha);mxUtils.br(x);H+=26;var ca=this.addCheckbox(x,
-mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var aa=document.createElement("input");aa.setAttribute("type","text");aa.style.marginRight="16px";aa.style.width="60px";aa.style.marginLeft="4px";aa.style.marginRight="12px";aa.value="100%";x.appendChild(aa);var oa=this.addCheckbox(x,mxResources.get("fit"),!0);L=null!=this.pages&&1<this.pages.length;var da=da=this.addCheckbox(x,mxResources.get("allPages"),L,!L),ka=this.addCheckbox(x,mxResources.get("layers"),!0),ba=this.addCheckbox(x,mxResources.get("tags"),
-!0),V=this.addCheckbox(x,mxResources.get("lightbox"),!0),k=null;if(EditorUi.enableHtmlEditOption){k=this.addEditButton(x,V);var v=k.getEditInput();v.style.marginBottom="16px";H+=50;mxEvent.addListener(V,"change",function(){V.checked?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled");v.checked&&V.checked?k.getEditSelect().removeAttribute("disabled"):k.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,x,mxUtils.bind(this,function(){n(M.checked?m:null,ca.checked,
-aa.value,Z.getTarget(),Z.getColor(),oa.checked,da.checked,ka.checked,ba.checked,V.checked,null!=k?k.getLink():null,null!=ha?ha.value:null)}),null,c,g);this.showDialog(c.container,340,H,!0,!0);F.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,g,m,n,x,F,H,M,L,K,Z,ha){var ca=document.createElement("div");ca.style.whiteSpace="nowrap";var aa=document.createElement("h3");mxUtils.write(aa,c||mxResources.get("publish"));aa.style.width="100%";aa.style.textAlign="center";aa.style.marginTop="2px";
-aa.style.marginBottom="20px";ca.appendChild(aa);var oa=document.createElement("select");c=30;oa.className="geBtn";oa.style.marginBottom="8px";oa.style.marginLeft="0px";oa.style.width="100%";oa.style.boxSizing="border-box";if(null==M||""==M.getHash())x=null!=x?x:"https://www.drawio.com/doc/faq/publish-diagram-as-link",aa=document.createElement("option"),mxUtils.write(aa,mxResources.get("makeCopy")),aa.setAttribute("value","copy"),oa.appendChild(aa);aa=document.createElement("option");mxUtils.write(aa,
-mxResources.get("authorizationRequired"));aa.setAttribute("value","auth");oa.appendChild(aa);null!=M&&""!=M.getHash()||aa.setAttribute("disabled","disabled");M=document.createElement("option");M.setAttribute("value","public");oa.appendChild(M);null!=H?(mxUtils.write(M,mxResources.get("publicDiagramUrl")),M.setAttribute("title",H),oa.value="public"):(mxUtils.write(M,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),M.setAttribute("disabled","disabled"));ca.appendChild(oa);
-mxUtils.br(ca);oa.focus();var da=null,ka=null;if(null!=g||null!=m)c+=30,mxUtils.write(ca,mxResources.get("width")+":"),da=document.createElement("input"),da.setAttribute("type","text"),da.style.marginRight="16px",da.style.width="50px",da.style.marginLeft="6px",da.style.marginRight="16px",da.style.marginBottom="10px",da.value="100%",ca.appendChild(da),mxUtils.write(ca,mxResources.get("height")+":"),ka=document.createElement("input"),ka.setAttribute("type","text"),ka.style.width="50px",ka.style.marginLeft=
-"6px",ka.style.marginBottom="10px",ka.value=m+"px",ca.appendChild(ka),mxUtils.br(ca);var ba=this.addLinkSection(ca,n),V=K?this.addCheckbox(ca,mxResources.get("transparentBackground"),!1):null;null!=V&&(c+=20);var k=document.createElement("select");k.className="geBtn";k.style.marginTop="8px";g=document.createElement("option");mxUtils.write(g,mxResources.get("allPages"));g.setAttribute("value","allPages");k.appendChild(g);g=document.createElement("option");mxUtils.write(g,mxResources.get("currentPage"));
-g.setAttribute("value","currentPage");k.appendChild(g);var v=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),ha&&(mxUtils.write(ca,mxResources.get("pages")+":"),ca.appendChild(k),mxUtils.br(ca),c+=30),v=this.addCheckbox(ca,mxResources.get("selectedPage")+": "+g));var I=document.createElement("select");I.style.maxWidth="260px";I.style.marginLeft="8px";I.style.marginTop=
-"16px";ha=document.createElement("option");ha.setAttribute("value","0");mxUtils.write(ha,mxResources.get("light"));I.appendChild(ha);ha=document.createElement("option");ha.setAttribute("value","1");mxUtils.write(ha,mxResources.get("dark"));I.appendChild(ha);ha=document.createElement("option");ha.setAttribute("value","auto");mxUtils.write(ha,mxResources.get("automatic"));ha.setAttribute("selected","selected");I.appendChild(ha);Z&&(mxUtils.write(ca,mxResources.get("appearance")+":"),ca.appendChild(I),
-mxUtils.br(ca),c+=30);var N=this.addCheckbox(ca,mxResources.get("lightbox"),!0,null,null,!n),T=this.addEditButton(ca,N),W=T.getEditInput();n&&(W.style.marginLeft=N.style.marginLeft,N.style.display="none",c-=20);var U=this.addCheckbox(ca,mxResources.get("layers"),!0);U.style.marginLeft=W.style.marginLeft;U.style.marginTop="8px";var Y=this.addCheckbox(ca,mxResources.get("tags"),!0);Y.style.marginLeft=W.style.marginLeft;Y.style.marginBottom="16px";Y.style.marginTop="16px";mxEvent.addListener(N,"change",
-function(){N.checked?(U.removeAttribute("disabled"),W.removeAttribute("disabled"),Y.removeAttribute("disabled")):(U.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),Y.setAttribute("disabled","disabled"));W.checked&&N.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,ca,mxUtils.bind(this,function(){L(ba.getTarget(),ba.getColor(),null==v?!1:v.checked,N.checked,T.getLink(),U.checked,null!=da?
-da.value:null,null!=ka?ka.value:null,Y.checked,oa.value,null!=V?V.checked:!1,I.value,"allPages"==k.value)}),null,mxResources.get("create"),x,F);this.showDialog(n.container,340,296+c,!0,!0);null!=da?(da.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?da.select():document.execCommand("selectAll",!1,null)):null==oa.parentNode;ba.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,g,m,n,x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var H=document.createElement("h3");
-mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(x?"10":"4")+"px";F.appendChild(H);if(x){mxUtils.write(F,mxResources.get("zoom")+":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value=this.lastExportZoom||"100%";F.appendChild(M);mxUtils.write(F,mxResources.get("borderWidth")+":");var L=document.createElement("input");
-L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.value=this.lastExportBorder||"0";F.appendChild(L);mxUtils.br(F)}var K=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Z=n?null:this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var ha=n?null:this.addCheckbox(F,mxResources.get("transparentBackground"),H.background==mxConstants.NONE||null==H.background);
-null!=ha&&(ha.style.marginBottom="16px");c=new CustomDialog(this,F,mxUtils.bind(this,function(){var ca=parseInt(M.value)/100||1,aa=parseInt(L.value)||0;m(!K.checked,null!=Z?Z.checked:!1,null!=ha?ha.checked:!1,ca,aa)}),null,c,g);this.showDialog(c.container,300,(x?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,g,m,n,x,F,H,M,L){H=null!=H?H:Editor.defaultIncludeDiagram;var K=document.createElement("div");K.style.whiteSpace="nowrap";var Z=this.editor.graph,ha="jpeg"==M||"webp"==
-M?220:320,ca=document.createElement("h3");mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";K.appendChild(ca);mxUtils.write(K,mxResources.get("zoom")+":");var aa=document.createElement("input");aa.setAttribute("type","text");aa.style.marginRight="16px";aa.style.width="60px";aa.style.marginLeft="4px";aa.style.marginRight="12px";aa.value=this.lastExportZoom||"100%";K.appendChild(aa);mxUtils.write(K,mxResources.get("borderWidth")+":");var oa=document.createElement("input");
-oa.setAttribute("type","text");oa.style.marginRight="16px";oa.style.width="60px";oa.style.marginLeft="4px";oa.value=this.lastExportBorder||"0";K.appendChild(oa);mxUtils.br(K);var da=this.addCheckbox(K,mxResources.get("selectionOnly"),!1,Z.isSelectionEmpty()),ka=document.createElement("input");ka.style.marginTop="16px";ka.style.marginRight="8px";ka.style.marginLeft="24px";ka.setAttribute("disabled","disabled");ka.setAttribute("type","checkbox");var ba=document.createElement("select");ba.style.marginTop=
-"16px";ba.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!Z.isSelectionEmpty()||"selectionOnly"!=c[ca]){var V=document.createElement("option");mxUtils.write(V,mxResources.get(c[ca]));V.setAttribute("value",c[ca]);ba.appendChild(V)}L?(mxUtils.write(K,mxResources.get("size")+":"),K.appendChild(ba),mxUtils.br(K),ha+=26,mxEvent.addListener(ba,"change",function(){"selectionOnly"==ba.value&&(da.checked=!0)})):F&&(K.appendChild(ka),mxUtils.write(K,mxResources.get("crop")),
-mxUtils.br(K),ha+=30,mxEvent.addListener(da,"change",function(){da.checked?ka.removeAttribute("disabled"):ka.setAttribute("disabled","disabled")}));Z.isSelectionEmpty()?L&&(da.style.display="none",da.nextSibling.style.display="none",da.nextSibling.nextSibling.style.display="none",ha-=30):(ba.value="diagram",ka.setAttribute("checked","checked"),ka.defaultChecked=!0,mxEvent.addListener(da,"change",function(){ba.value=da.checked?"selectionOnly":"diagram"}));var k=this.addCheckbox(K,mxResources.get("transparentBackground"),
-!1,null,null,"jpeg"!=M&&"webp"!=M),v=document.createElement("select");v.style.maxWidth="260px";v.style.marginLeft="8px";v.style.marginTop="16px";F=document.createElement("option");F.setAttribute("value","light");mxUtils.write(F,mxResources.get("light"));v.appendChild(F);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));v.appendChild(L);"svg"==M&&mxUtils.lightDarkColorSupported?(F=document.createElement("option"),F.setAttribute("value","auto"),
-mxUtils.write(F,mxResources.get("automatic")),F.setAttribute("selected","selected"),v.appendChild(F)):Editor.isDarkMode()?L.setAttribute("selected","selected"):F.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("appearance")+":");K.appendChild(v);mxUtils.br(K);ha+=26;var I=this.addCheckbox(K,mxResources.get("shadow"),Z.shadowVisible),N=null;if("png"==M||"jpeg"==M||"webp"==M)N=this.addCheckbox(K,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),ha+=30;Z=
-null!=this.pages?this.pages.length:1;var T=this.addCheckbox(K,mxResources.get("includeCopyOfMyDiagram")+(1<Z?":":""),H,null,null,"jpeg"!=M&&"webp"!=M),W=document.createElement("select");W.style.maxWidth="260px";W.style.marginLeft="28px";"png"==M||"svg"==M?(H=function(){T.checked?W.removeAttribute("disabled"):W.setAttribute("disabled","disabled")},F=document.createElement("option"),F.setAttribute("value","allPages"),mxUtils.write(F,mxResources.get("allPages")),W.appendChild(F),F=document.createElement("option"),
-F.setAttribute("value","currentPage"),mxUtils.write(F,mxResources.get("currentPage")),W.appendChild(F),1<Z?(T.style.marginBottom="12px",W.style.marginBottom="16px",K.appendChild(W),mxUtils.br(K),ha+=20):T.style.marginBottom="16px",null!=this.lastEmbedInclude&&(W.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",H),H()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");U.id="geCheckbox-"+
-Editor.guid();var Y=document.createElement("input");Y.style.marginBottom="16px";Y.style.marginRight="8px";Y.setAttribute("type","checkbox");Y.id="geCheckbox-"+Editor.guid();g&&(U.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,K.appendChild(U),H=document.createElement("label"),mxUtils.write(H,mxResources.get("embedImages")),H.setAttribute("for",U.id),K.appendChild(H),mxUtils.br(K),Y.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,K.appendChild(Y),H=document.createElement("label"),
-mxUtils.write(H,mxResources.get("embedFonts")),H.setAttribute("for",Y.id),K.appendChild(H),mxUtils.br(K),ha+=50);var fa=document.createElement("select");fa.style.maxWidth="260px";fa.style.marginLeft="8px";F=document.createElement("option");F.setAttribute("value","auto");mxUtils.write(F,mxResources.get("automatic"));fa.appendChild(F);H=document.createElement("option");H.setAttribute("value","blank");mxUtils.write(H,mxResources.get("openInNewWindow"));fa.appendChild(H);H=document.createElement("option");
-H.setAttribute("value","self");mxUtils.write(H,mxResources.get("openInThisWindow"));fa.appendChild(H);H=document.createElement("div");mxUtils.write(H,mxResources.get("LinksLost"));H.style.margin="7px";H.style.display="none";"svg"==M&&(mxUtils.write(K,mxResources.get("links")+":"),K.appendChild(fa),K.appendChild(H),mxUtils.br(K),mxUtils.br(K),ha+=50);m=new CustomDialog(this,K,mxUtils.bind(this,function(){this.lastExportBorder=oa.value;this.lastExportZoom=aa.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=
-Y.checked;this.lastEmbedInclude=W.value;x(aa.value,k.checked,!da.checked,I.checked,T.checked,U.checked&&g,oa.value,ka.checked,("png"==M||"svg"==M)&&"currentPage"==W.value,fa.value,null!=N?N.checked:null,null!=v?v.value:null,ba.value,Y.checked)}),null,m,n);this.showDialog(m.container,340,ha,!0,!0,null,null,null,null,!0);aa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?aa.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,g,m,n,
-x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=g){var M=document.createElement("h3");mxUtils.write(M,g);M.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";F.appendChild(M)}var L=this.addCheckbox(F,mxResources.get("fit"),!0),K=this.addCheckbox(F,mxResources.get("shadow"),H.shadowVisible&&n,!n),Z=this.addCheckbox(F,m),ha=this.addCheckbox(F,mxResources.get("lightbox"),!0),ca=this.addEditButton(F,ha),aa=ca.getEditInput(),
-oa=1<H.model.getChildCount(H.model.getRoot()),da=this.addCheckbox(F,mxResources.get("layers"),oa,!oa);da.style.marginLeft=aa.style.marginLeft;da.style.marginBottom="12px";da.style.marginTop="8px";mxEvent.addListener(ha,"change",function(){ha.checked?(oa&&da.removeAttribute("disabled"),aa.removeAttribute("disabled")):(da.setAttribute("disabled","disabled"),aa.setAttribute("disabled","disabled"));aa.checked&&ha.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled",
-"disabled")});g=new CustomDialog(this,F,mxUtils.bind(this,function(){c(L.checked,K.checked,Z.checked,ha.checked,ca.getLink(),da.checked)}),null,mxResources.get("embed"),x);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,g,m,n,x,F,H,M){function L(aa){var oa=" ",da="";n&&(oa=" 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!=Z?"&page="+Z:"")+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}})(this);\"",da+="cursor:pointer;");c&&(da+="max-width:100%;");var ka="";m&&(ka=' width="'+Math.round(K.width)+'" height="'+Math.round(K.height)+'"');H('<img src="'+aa+'"'+ka+(""!=da?' style="'+da+'"':"")+oa+"/>")}var K=this.editor.graph.getGraphBounds(),Z=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(aa){var oa=n?this.getFileData(!0):
-null;aa=this.createImageDataUri(aa,oa,"png");L(aa)}),null,null,null,mxUtils.bind(this,function(aa){M({message:mxResources.get("unknownError")})}),null,!0,m?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),K.width*K.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var ha="";m&&(ha="&w="+Math.round(2*K.width)+"&h="+Math.round(2*K.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+ha+"&xml="+encodeURIComponent(g));ca.send(mxUtils.bind(this,function(){200<=
-ca.getStatus()&&299>=ca.getStatus()?L("data:image/png;base64,"+ca.getText()):M({message:mxResources.get("unknownError")})}))}else M({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,g,m,n,x,F,H){var M=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!m,"auto"),L=M.getElementsByTagName("a");if(null!=L)for(var K=0;K<L.length;K++){var Z=L[K].getAttribute("href");null!=Z&&"#"==Z.charAt(0)&&"_blank"==L[K].getAttribute("target")&&L[K].removeAttribute("target")}n&&
-M.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(M);if(m){var ha=" ",ca="";n&&(ha="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"+(x?"&edit=_blank":"")+(F?"&layers=1":
-"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");this.editor.convertImages(M,mxUtils.bind(this,function(aa){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(aa))+'"'+(""!=ca?' style="'+ca+'"':"")+ha+"/>")}))}else ca="",n&&(g=this.getSelectedPageIndex(),M.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:"")+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),c&&(c=parseInt(M.getAttribute("width")),x=parseInt(M.getAttribute("height")),M.setAttribute("viewBox","-0.5 -0.5 "+c+" "+x),ca+="max-width:100%;max-height:"+x+"px;",M.removeAttribute("height")),""!=ca&&M.setAttribute("style",ca),this.editor.addFontCss(M),this.editor.graph.mathEnabled&&this.editor.addMathCss(M),H(mxUtils.getXml(M))};EditorUi.prototype.timeSince=
-function(c){c=Math.floor((new Date-c)/1E3);var g=Math.floor(c/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(c/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(c/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(c/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(c/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,g){if(null!=c){var m=null;if("diagram"==
-c.nodeName)m=c;else if("mxfile"==c.nodeName){var n=c.getElementsByTagName("diagram");if(0<n.length){m=n[0];var x=g.getGlobalVariable;g.getGlobalVariable=function(F){return"page"==F?m.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==F?1:x.apply(this,arguments)}}}null!=m&&(c=Editor.parseDiagramNode(m))}n=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(c)}catch(F){}finally{this.editor.graph=n}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};
-EditorUi.prototype.getPngFileProperties=function(c){var g=1,m=0;if(null!=c){if(c.hasAttribute("scale")){var n=parseFloat(c.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}c.hasAttribute("border")&&(n=parseInt(c.getAttribute("border")),!isNaN(n)&&0<n&&(m=n))}return{scale:g,border:m}};EditorUi.prototype.getEmbeddedPng=function(c,g,m,n,x){try{var F=this.editor.graph,H=null;if(null!=m&&0<m.length)F=this.createTemporaryGraph(F.getStylesheet()),document.body.appendChild(F.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,
-!0),F),H=m;else if(null!=this.pages&&this.currentPage!=this.pages[0]){F=this.createTemporaryGraph(F.getStylesheet());var M=F.getGlobalVariable;F.setBackgroundImage=this.editor.graph.setBackgroundImage;var L=this.pages[0];this.currentPage==L?F.setBackgroundImage(this.editor.graph.backgroundImage):null!=L.viewState&&null!=L.viewState&&F.setBackgroundImage(L.viewState.backgroundImage);F.getGlobalVariable=function(K){return"page"==K?L.getName():"pagenumber"==K?1:M.apply(this,arguments)};document.body.appendChild(F.container);
-F.model.setRoot(L.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(K){try{null==H&&(H=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var Z=K.toDataURL("image/png");Z=Editor.writeGraphModelToPng(Z,"tEXt","mxfile",encodeURIComponent(H));c(Z.substring(Z.lastIndexOf(",")+1));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container)}catch(ha){null!=g&&g(ha)}}),null,null,null,mxUtils.bind(this,function(K){null!=g&&g(K)}),null,null,n,null,F.shadowVisible,null,F,x,
-null,null,null,"diagram",null)}catch(K){null!=g&&g(K)}};EditorUi.prototype.getEmbeddedSvg=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca){M=null!=M?M:!0;Z=null!=Z?Z:0;H=null!=L?L:g.background;H==mxConstants.NONE&&(H=null);null==H&&"none"==g.getAdaptiveColors()&&(H="#ffffff");L=this.editor.graph.createSvgImageExport(null!=c);F=g.getSvg(H,K,Z,null,null,F,null,L,null,g.shadowVisible||ha,null,ca,"diagram");(g.shadowVisible||ha)&&g.addSvgShadow(F,null,null,0==Z);null!=c&&F.setAttribute("content",c);null!=m&&F.setAttribute("resource",
-m);var aa=mxUtils.bind(this,function(oa){oa=(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(oa);null!=x&&x(oa);return oa});g.mathEnabled&&this.editor.addMathCss(F);if(null!=x)this.embedFonts(F,mxUtils.bind(this,function(oa){M?this.editor.convertImages(oa,mxUtils.bind(this,function(da){aa(da)})):aa(oa)}));else return aa(F)};EditorUi.prototype.embedFonts=function(c,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
-this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(m){try{null!=m&&this.editor.addFontCss(c,m),g(c)}catch(n){g(c)}}))}catch(m){g(c)}}))};EditorUi.prototype.exportImage=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca){L=null!=L?L:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(oa){Editor.addRetryToError(oa,mxUtils.bind(this,function(){this.exportImage(c,g,m,n,x,F,H,M,L,K,Z,ha,ca)}));this.handleError(oa)}))){var aa=
-this.editor.graph.isSelectionEmpty();m=null!=m?m:aa;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(oa){this.spinner.stop();try{this.saveCanvas(oa,x?this.getFileData(!0,null,null,null,m,M,null,null,null,null,null,c,F):null,L,null==this.pages||0==this.pages.length,Z)}catch(da){this.handleError(da)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(oa){this.spinner.stop();this.handleError(oa)}),null,m,c||1,g,n,null,null,F,H,K,
-ha,ca)}catch(oa){this.spinner.stop(),this.handleError(oa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)c[this.pages[g].getId()]=this.pages[g].getId();return c};EditorUi.prototype.importXml=function(c,g,m,n,x,F,H){g=null!=g?g:0;m=null!=m?m:0;var M=[];try{var L=this.editor.graph;if(null!=c&&0<c.length){L.model.beginUpdate();
-try{var K=mxUtils.parseXml(c);c={};var Z=this.editor.extractGraphModel(K.documentElement,null!=this.pages);if(null!=Z&&"mxfile"==Z.nodeName&&null!=this.pages){var ha=Z.getElementsByTagName("diagram");if(1==ha.length&&!F){if(Z=Editor.parseDiagramNode(ha[0]),null!=this.currentPage&&(c[ha[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=ha[0].getAttribute("name");null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ca))}}else if(0<ha.length){F=
-[];var aa=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ha[0].getAttribute("id")]=this.pages[0].getId(),ca=ha[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),Z=Editor.parseDiagramNode(ha[0]),n=!1,aa=1);for(;aa<ha.length;aa++){var oa=ha[aa].getAttribute("id");ha[aa].removeAttribute("id");var da=this.updatePageRoot(new DiagramPage(ha[aa]));c[oa]=ha[aa].getAttribute("id");var ka=this.pages.length;null==da.getName()&&
-da.setName(mxResources.get("pageWithNumber",[ka+1]));L.model.execute(new ChangePage(this,da,da,ka,!0));F.push(da)}this.updatePageLinks(c,F)}}if(null!=Z&&"mxGraphModel"===Z.nodeName){M=L.importGraphModel(Z,g,m,n);if(null!=M)for(this.addLocalPagesToMapping(c),aa=0;aa<M.length;aa++)this.updatePageLinksForCell(c,M[aa]);var ba=L.parseBackgroundImage(Z.getAttribute("backgroundImage"));if(null!=ba&&null!=ba.originalSrc){this.updateBackgroundPageLink(c,ba);var V=new ChangePageSetup(this,null,ba);V.ignoreColor=
-!0;L.model.execute(V)}}H&&L.pasteCellStyles(L.includeDescendants(M),L.defaultVertexStyle,L.defaultEdgeStyle)}finally{L.model.endUpdate()}}}catch(k){if(x)throw k;this.handleError(k)}return M};EditorUi.prototype.updatePageLinks=function(c,g){for(var m=0;m<g.length;m++)this.updatePageLinksForCell(c,g[m].root),null!=g[m].viewState&&this.updateBackgroundPageLink(c,g[m].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var m=
-c[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=m&&(g.originalSrc="data:page/id,"+m)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=function(c,g){var m=document.createElement("div"),n=this.editor.graph,x=n.getLinkForCell(g);null!=x&&n.setLinkForCell(g,this.updatePageLink(c,x));if(n.isHtmlLabel(g)){m.innerHTML=Graph.sanitizeHtml(n.getLabel(g));for(var F=m.getElementsByTagName("a"),H=!1,M=0;M<F.length;M++)x=F[M].getAttribute("href"),null!=x&&(F[M].setAttribute("href",this.updatePageLink(c,
-x)),H=!0);H&&n.labelChanged(g,m.innerHTML)}for(M=0;M<n.model.getChildCount(g);M++)this.updatePageLinksForCell(c,n.model.getChildAt(g,M))};EditorUi.prototype.updatePageLink=function(c,g){if(Graph.isPageLink(g)){var m=c[g.substring(g.indexOf(",")+1)];g=null!=m?"data:page/id,"+m:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var x=0;x<n.actions.length;x++){var F=n.actions[x];if(null!=F.open&&Graph.isPageLink(F.open)){var H=F.open.substring(F.open.indexOf(",")+
-1);m=c[H];null!=m?F.open="data:page/id,"+m:null==this.getPageById(H)&&delete F.open}}g="data:action/json,"+JSON.stringify(n)}}catch(M){}return g};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,g,m,n,x){var F=mxUtils.bind(this,function(H){this.loadingExtensions=!1;null!=m?m(H):this.handleError(H)});this.createTimeout(null,mxUtils.bind(this,function(H){n=null!=n?n:c.name;var M=mxUtils.bind(this,
-function(K){H.clear()&&F(K)}),L=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var K=this.isRemoteVisioFormat(n);try{var Z=n.lastIndexOf(".");if(0<=Z&&Z<n.length)n.substring(Z+1).toUpperCase();else{var ha=n.lastIndexOf("/");0<=ha&&ha<n.length&&(n=n.substring(ha+1))}}catch(aa){}if(K)if(null==VSS_CONVERT_URL||this.isOffline())M({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{K=new FormData;
-K.append("file1",c,n);var ca=new XMLHttpRequest;ca.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=x&&ca.setRequestHeader("x-convert-custom",x);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&H.clear())if(200<=ca.status&&299>=ca.status)try{var aa=ca.response;if("text/xml"==aa.type){var oa=new FileReader;oa.onload=mxUtils.bind(this,function(da){try{g(da.target.result)}catch(ka){M({message:mxResources.get("errorLoadingFile")})}});
-oa.readAsText(aa)}else this.doImportVisio(aa,g,M,n)}catch(da){M(da)}else try{""==ca.responseType||"text"==ca.responseType?M({message:ca.responseText}):(oa=new FileReader,oa.onload=function(){try{M({message:JSON.parse(oa.result).Message})}catch(da){null!=oa.result&&0<oa.result.length?M({message:oa.result}):M(da)}},oa.readAsText(ca.response))}catch(da){M({})}});ca.send(K)}else if(H.clear())try{this.doImportVisio(c,g,M,n)}catch(aa){M(aa)}}else M({message:mxResources.get("serviceUnavailableOrBlocked")})});
-this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?L():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",L,null,null,null,M))}),F)};EditorUi.prototype.importGraphML=function(c,g,m){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=m?m(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var F=mxUtils.bind(this,function(M){x.clear()&&n(M)}),H=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,
-g,n)}catch(M){F(M)}else F({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?H():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",H,null,null,null,F))}),n)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var g=mxUtils.bind(this,function(m){this.loadingExtensions=!1;this.handleError(m)});this.vsdxExportEnabled()?this.createTimeout(null,
-mxUtils.bind(this,function(m){var n=mxUtils.bind(this,function(F){m.clear()&&g(F)}),x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(m.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||n({message:mxResources.get("unknownError")})}catch(F){n(F)}else n({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=
-!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,n))}),g):g({message:mxResources.get("serviceUnavailableOrBlocked")})}};EditorUi.prototype.convertLucidChart=function(c,g,m){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=m?m(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var F=mxUtils.bind(this,function(M){x.clear()&&n(M)}),H=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if("undefined"!==typeof window.LucidImporter)try{var M=
-JSON.parse(c);g(LucidImporter.importState(M));try{if(null!=window.console&&"1"==urlParams.test){var L=[(new Date).toISOString(),"convertLucidChart",M];null!=M.state&&L.push(JSON.parse(M.state));if(null!=M.svgThumbs)for(var K=0;K<M.svgThumbs.length;K++)L.push(Editor.createSvgDataUri(M.svgThumbs[K]));null!=M.thumb&&L.push(M.thumb);console.log.apply(console,L)}}catch(Z){}}catch(Z){null!=window.console&&console.error(Z),F(Z)}else F({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==
-typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(H,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",H,null,null,null,F)},null,null,null,F)},null,null,null,F)},null,null,null,F)},null,null,null,F):mxscript(window.DRAWIO_SERVER_URL+
-"js/extensions.min.js",H,null,null,null,F))}),n)};EditorUi.prototype.createMermaidXml=function(c,g,m,n,x,F){var H=new Graph(document.createElement("div"));m=H.insertVertex(null,null,null,0,0,n,x,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+m+";");H.setAttributeForCell(m,"mermaidData",JSON.stringify({data:c,config:g},null,2));null!=F&&H.setAttributeForCell(m,"templatePrompt",F);c=(new mxCodec).encode(H.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=
-function(c,g,m){var n=0,x=function(){for(var H=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),M=0;M<H.length;M++)null!=H[M].parentNode&&H[M].parentNode.removeChild(H[M])},F=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(H){var M=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),L=mxUtils.bind(this,function(K){H.clear()&&(x(),m(K))});M.send(mxUtils.bind(this,function(K){if(H.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,
-function(){var ha=mxUtils.trim(K.getText());this.generateMermaidImage(ha,null,mxUtils.bind(this,function(ca,aa,oa){this.tryAndHandle(mxUtils.bind(this,function(){H.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[ha]),x(),g(ha,ca,aa,oa))}),L)}),L,mxUtils.bind(this,function(ca){3>n++?H.clear()&&F():L(ca)}))}),L);else{var Z={message:mxResources.get("error")+" "+K.getStatus()};try{Z=JSON.parse(K.getText()),Z=Z.error}catch(ha){}L(Z)}}),L)}),m)});F()};EditorUi.prototype.extractMermaidDeclaration=
-function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var g=c.split("```");g=1<g.length?g:c.split("<pre>");g=1<g.length?g:c.split("~~~");g=1<g.length?g:c.split("%%");g=1<g.length?g:c.split("(Begins)");c=mxUtils.trim(1>=g.length?c:g[1]);g=c.split("\n");var m=1<g.length?g[1]:null;if(null!=m){var n=m.indexOf("-");0<n&&(m=m.substring(0,n))}if(0<g.length&&"mermaid"==mxUtils.trim(g[0])||null!=m&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,m))g.shift(),c=mxUtils.trim(g.join("\n")),
-g=c.split("\n");m=g[0].split(" ")[0].replace(/:$/,"");n=m.indexOf("-");0<n&&(m=m.substring(0,n));try{"mindmap"==m&&2<g.length&&(c=extractMermaidMindmap(g))}catch(x){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,m)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,g,m,n,x){var F=mxUtils.bind(this,function(M){this.loadingMermaid=!1;null!=n?n(M):this.handleError(M)}),H=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);
-g.securityLevel="strict";g.startOnLoad=!1;g.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=c.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(g.theme="dark");var M=mxUtils.bind(this,function(L){try{if(mxClient.IS_IE||mxClient.IS_IE11)L=L.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');L=L.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");
-var K=mxUtils.parseXml(L).getElementsByTagName("svg");if(0<K.length&&"error"!=K[0].getAttribute("aria-roledescription")){var Z=parseFloat(K[0].getAttribute("width")),ha=parseFloat(K[0].getAttribute("height"));if(isNaN(Z)||isNaN(ha))try{var ca=K[0].getAttribute("viewBox").split(/\s+/);Z=parseFloat(ca[2]);ha=parseFloat(ca[3])}catch(aa){Z=Z||100,ha=ha||100}m(this.convertDataUri(Editor.createSvgDataUri(L)),Z,ha)}else null!=x?x():n({message:mxResources.get("invalidInput")})}catch(aa){n(aa)}});mermaid.mermaidAPI.initialize(g);
-mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(L){M(L.svg)}).catch(function(L){null!=x?x(L):n(L)})}catch(L){n(L)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(H,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(M){this.importXml(M,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",H,null,null,null,F)):mxscript(window.DRAWIO_SERVER_URL+
-"js/extensions.min.js",H,null,null,null,F))};EditorUi.prototype.generatePlantUmlImage=function(c,g,m,n){function x(M,L,K){c1=M>>2;c2=(M&3)<<4|L>>4;c3=(L&15)<<2|K>>6;c4=K&63;r="";r+=F(c1&63);r+=F(c2&63);r+=F(c3&63);return r+=F(c4&63)}function F(M){if(10>M)return String.fromCharCode(48+M);M-=10;if(26>M)return String.fromCharCode(65+M);M-=26;if(26>M)return String.fromCharCode(97+M);M-=26;return 0==M?"-":1==M?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+
-"/png/":PLANT_URL+"/svg/")+function(M){r="";for(i=0;i<M.length;i+=3)r=i+2==M.length?r+x(M.charCodeAt(i),M.charCodeAt(i+1),0):i+1==M.length?r+x(M.charCodeAt(i),0,0):r+x(M.charCodeAt(i),M.charCodeAt(i+1),M.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=g&&(H.responseType="blob");H.onload=function(M){if(200<=this.status&&300>this.status)if("txt"==g)m(this.response);else{var L=new FileReader;L.readAsDataURL(this.response);L.onloadend=function(K){var Z=new Image;Z.onload=
-function(){try{var ha=Z.width,ca=Z.height;if(0==ha&&0==ca){var aa=L.result,oa=aa.indexOf(","),da=decodeURIComponent(escape(atob(aa.substring(oa+1)))),ka=mxUtils.parseXml(da).getElementsByTagName("svg");0<ka.length&&(ha=parseFloat(ka[0].getAttribute("width")),ca=parseFloat(ka[0].getAttribute("height")))}m(L.result,ha,ca)}catch(ba){n(ba)}};Z.src=L.result};L.onerror=function(K){n(K)}}else n(M)};H.onerror=function(M){n(M)};H.send()};EditorUi.prototype.insertAsPreText=function(c,g,m){var n=this.editor.graph,
-x=null;n.getModel().beginUpdate();try{x=n.insertVertex(null,null,"<pre>"+c+"</pre>",g,m,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(x,!0)}finally{n.getModel().endUpdate()}return x};EditorUi.prototype.insertTextAt=function(c,g,m,n,x,F,H,M){F=null!=F?F:!0;H=null!=H?H:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g,
-" "),mxUtils.bind(this,function(ca){4==ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,g,m,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var L=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var K=Editor.extractGraphModelFromPdf(c);if(null!=K&&0<K.length)return this.importXml(K,g,m,F,!0,M)}if(Editor.isPngDataUrl(c)&&(K=Editor.extractGraphModelFromPng(c),
-null!=K&&0<K.length))return this.importXml(K,g,m,F,!0,M);if("data:image/svg+xml;"==c.substring(0,19))try{K=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(K=c.substring(c.indexOf(",")+1),K=window.atob&&!mxClient.IS_SF?atob(K):Base64.decode(K,!0)):K=decodeURIComponent(c.substring(c.indexOf(",")+1));var Z=this.importXml(K,g,m,F,!0,M);if(0<Z.length)return Z}catch(ca){}this.loadImage(c,mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,c,mxUtils.bind(this,function(da,
-ka,ba){L.setSelectionCell(L.insertVertex(null,null,"",L.snap(g),L.snap(m),ka,ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(da)+";"))}),H,this.maxImageSize);else{var aa=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),oa=Math.round(ca.width*aa);ca=Math.round(ca.height*aa);L.setSelectionCell(L.insertVertex(null,null,"",L.snap(g),L.snap(m),oa,ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-c+";"))}}),mxUtils.bind(this,function(){var ca=null;L.getModel().beginUpdate();try{ca=L.insertVertex(L.getDefaultParent(),null,c,L.snap(g),L.snap(m),1,1,"text;"+(n?"html=1;":"")),L.updateCellSize(ca),L.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{L.getModel().endUpdate()}L.setSelectionCell(ca)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,g,m,F,null,M);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
-function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,g,m,F,null,M))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{L=this.editor.graph;x=null;L.getModel().beginUpdate();try{x=L.insertVertex(L.getDefaultParent(),null,"",L.snap(g),L.snap(m),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));L.fireEvent(new mxEventObject("textInserted","cells",[x]));n&&(c=L.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");x.value=c;L.updateCellSize(x);if(0<
-this.maxTextWidth&&x.geometry.width>this.maxTextWidth){var ha=L.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=ha.width;x.geometry.height=ha.height}Graph.isLink(x.value)&&L.setLinkForCell(x,x.value);x.geometry.width+=L.gridSize;x.geometry.height+=L.gridSize}finally{L.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=function(c){var g=-1;do c/=1024,g++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};EditorUi.prototype.convertDataUri=
-function(c){if("data:"==c.substring(0,5)){var g=c.indexOf(";");0<g&&(c=c.substring(0,g)+c.substring(c.indexOf(",",g+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,g){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,g){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var m=
-document.createElement("input");m.setAttribute("type","file");mxEvent.addListener(m,"change",mxUtils.bind(this,function(){null!=m.files&&(this.importFiles(m.files,null,null,this.maxImageSize),m.type="",m.type="file",m.value="")}));m.style.display="none";document.body.appendChild(m);this.importFileInputElt=m}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(H,M){StorageFile.listFiles(this,"F",H,M)});window.openBrowserFile=
-mxUtils.bind(this,function(H,M,L){StorageFile.getFileContent(this,H,M,L)});window.deleteBrowserFile=mxUtils.bind(this,function(H,M,L){StorageFile.deleteFile(this,H,M,L)});if(!g){var n=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(H){this.hideDialog(H)}));window.openFile.setConsumer(mxUtils.bind(this,function(H,M){null!=M&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(M)?(H=new Blob([H],{type:"application/octet-stream"}),this.importVisio(H,
-mxUtils.bind(this,function(L){this.importXml(L,0,0,!0)}),null,M)):this.editor.graph.setSelectionCells(this.importXml(H,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 x=this.dialog,F=x.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=n;F.apply(x,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
-function(c,g,m){var n=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(F){if(mxUtils.isEmptyObject(F.files))m();else{var H=0,M,L=!1;F.forEach(function(K,Z){K=Z.name.toLowerCase();"diagram/diagram.xml"==K?(L=!0,Z.async("string").then(function(ha){0==ha.indexOf("<mxfile ")?g(ha):m()})):0==K.indexOf("versions/")&&(K=parseInt(K.substr(9)),K>H&&(H=K,M=Z))});0<H?M.async("string").then(function(K){(new XMLHttpRequest).upload&&n.isRemoteFileFormat(K,
-c.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,m):n.parseFileData(K,mxUtils.bind(this,function(Z){4==Z.readyState&&(200<=Z.status&&299>=Z.status?g(Z.responseText):m())}),c.name):m()}):L||m()}},function(F){m(F)}):m()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,m))};EditorUi.prototype.importFile=function(c,g,m,n,x,F,H,
-M,L,K,Z,ha){K=null!=K?K:!0;var ca=!1,aa=null,oa=mxUtils.bind(this,function(da){var ka=null;null!=da&&"<mxlibrary"==da.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,da,H)),this.showSidebar()):ka=this.importXml(da,m,n,K,null,null!=ha?mxEvent.isControlDown(ha):null);null!=M&&M(ka)});"image"==g.substring(0,5)?(L=!1,"image/png"==g.substring(0,9)&&(Z=Z?null:this.extractGraphModelFromPng(c),null!=Z&&0<Z.length&&(aa=this.importXml(Z,m,n,K,null,null!=ha?mxEvent.isControlDown(ha):null),L=!0)),L||
-(L=this.editor.graph,Z=c.indexOf(";"),0<Z&&(c=c.substring(0,Z)+c.substring(c.indexOf(",",Z+1))),K&&L.isGridEnabled()&&(m=L.snap(m),n=L.snap(n)),Z="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(Z+="editableCssRules=.*;"),aa=[L.insertVertex(null,null,"",m,n,x,F,Z+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ca=!0,this.importGraphML(c,oa)):null!=L&&null!=H&&EditorUi.isVisioFilename(H)?(ca=!0,this.importVisio(L,
-oa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,H)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,g=mxUtils.bind(this,function(da){4==da.readyState&&(200<=da.status&&299>=da.status?oa(da.responseText):null!=M&&(M(null),this.showError(mxResources.get("error"),413==da.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,g,H):this.parseFile(L,g,H)):0==c.indexOf("PK")&&null!=L?(ca=!0,this.importZipFile(L,
-oa,mxUtils.bind(this,function(){aa=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K);M(aa)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(aa=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K,null,null!=ha?mxEvent.isControlDown(ha):null));ca||null==M||M(aa);return aa};EditorUi.prototype.importFiles=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca){n=null!=n?n:this.maxImageSize;K=null!=K?K:this.maxImageBytes;var aa=null!=g&&null!=m,oa=!0;g=null!=g?g:0;m=null!=m?m:0;var da=!1;if(!mxClient.IS_CHROMEAPP&&
-null!=c)for(var ka=Z||this.resampleThreshold,ba=0;ba<c.length;ba++)if("image/svg"!==c[ba].type.substring(0,9)&&"image/"===c[ba].type.substring(0,6)&&c[ba].size>ka){da=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[g],"y",[m],"maxSize",[n],"maxBytes",[K],"resampleThreshold",[this.resampleThreshold],"largeImages",[da],"crop",[aa],"resizeImages",[oa],"ignoreEmbeddedXml",[ha],"evt",[ca]);var V=mxUtils.bind(this,function(){var k=this.editor.graph,v=k.gridSize;x=null!=x?x:mxUtils.bind(this,
-function(Y,fa,na,la,qa,ya,wa,Ia,Aa){try{if(null!=Y&&"<mxlibrary"==Y.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,Y,wa)),this.showSidebar(),null;this.isCompatibleString(Y)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(aa=!1,la=na=0);return this.importFile(Y,fa,na,la,qa,ya,wa,Ia,Aa,aa,ha,ca)}catch(Ba){return this.handleError(Ba),null}});F=null!=F?F:mxUtils.bind(this,function(Y){k.setSelectionCells(Y)});if(this.spinner.spin(document.body,
-mxResources.get("loading")))for(var I=c.length,N=I,T=[],W=mxUtils.bind(this,function(Y,fa){T[Y]=fa;if(0==--N){this.spinner.stop();if(null!=M)M(T);else{var na=[];k.getModel().beginUpdate();try{for(Y=0;Y<T.length;Y++){var la=T[Y]();null!=la&&(na=na.concat(la))}}finally{k.getModel().endUpdate()}}F(na)}}),U=0;U<I;U++)mxUtils.bind(this,function(Y){var fa=c[Y];if(null!=fa){var na=new FileReader;na.onload=mxUtils.bind(this,function(la){if(null==H||H(fa))try{if("image/"==fa.type.substring(0,6))if("image/svg"==
-fa.type.substring(0,9)){var qa=Graph.clipSvgDataUri(la.target.result),ya=qa.indexOf(","),wa=decodeURIComponent(escape(atob(qa.substring(ya+1)))),Ia=mxUtils.parseXml(wa),Aa=Ia.getElementsByTagName("svg");if(0<Aa.length){var Ba=Aa[0],Ga=ha?null:Ba.getAttribute("content");null!=Ga&&"<"!=Ga.charAt(0)&&"%"!=Ga.charAt(0)&&(Ga=unescape(window.atob?atob(Ga):Base64.decode(Ga,!0)));null!=Ga&&"%"==Ga.charAt(0)&&(Ga=decodeURIComponent(Ga));null==Ga||"<mxfile "!==Ga.substring(0,8)&&"<mxGraphModel>"!==Ga.substring(0,
-14)&&"<mxGraphModel "!==Ga.substring(0,14)?W(Y,mxUtils.bind(this,function(){try{if(null!=Ia){var Ca=Ia.getElementsByTagName("svg");if(0<Ca.length){var Da=Ca[0],va=Da.getAttribute("width"),Na=Da.getAttribute("height");va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Sa=Da.getAttribute("viewBox");if(null==Sa||0==Sa.length)Da.setAttribute("viewBox","0 0 "+va+" "+Na);else if(isNaN(va)||isNaN(Na)){var Ua=Sa.split(" ");3<Ua.length&&
-(va=parseFloat(Ua[2]),Na=parseFloat(Ua[3]))}qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var Qa=Math.min(1,Math.min(n/Math.max(1,va)),n/Math.max(1,Na)),za=x(qa,fa.type,g+Y*v,m+Y*v,Math.max(1,Math.round(va*Qa)),Math.max(1,Math.round(Na*Qa)),fa.name);if(null!=za&&(isNaN(va)||isNaN(Na))){var Ea=new Image;Ea.onload=mxUtils.bind(this,function(){va=Math.max(1,Ea.width);Na=Math.max(1,Ea.height);za[0].geometry.width=va;za[0].geometry.height=Na;Da.setAttribute("viewBox","0 0 "+va+" "+Na);qa=Editor.createSvgDataUri(mxUtils.getXml(Da));
-var B=qa.indexOf(";");0<B&&(qa=qa.substring(0,B)+qa.substring(qa.indexOf(",",B+1)));k.setCellStyles("image",qa,[za[0]])});Ea.src=Editor.createSvgDataUri(mxUtils.getXml(Da))}return za}}}catch(B){}return null})):W(Y,mxUtils.bind(this,function(){return x(Ga,"text/xml",g+Y*v,m+Y*v,0,0,fa.name)}))}else W(Y,mxUtils.bind(this,function(){return null}))}else{ya=!1;if("image/png"==fa.type){var Ma=ha?null:this.extractGraphModelFromPng(la.target.result);if(null!=Ma&&0<Ma.length){var sa=new Image;sa.src=la.target.result;
-W(Y,mxUtils.bind(this,function(){return x(Ma,"text/xml",g+Y*v,m+Y*v,sa.width,sa.height,fa.name)}));ya=!0}}ya||(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(la.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,la.target.result,mxUtils.bind(this,
-function(Da,va,Na){W(Y,mxUtils.bind(this,function(){if(null!=Da&&Da.length<K){var Sa=oa&&this.isResampleImageSize(fa.size,Z)?Math.min(1,Math.min(n/va,n/Na)):1;return x(Da,fa.type,g+Y*v,m+Y*v,Math.round(va*Sa),Math.round(Na*Sa),fa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),oa,n,Z,fa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else qa=la.target.result,x(qa,fa.type,g+Y*v,m+Y*v,240,160,fa.name,function(Ca){W(Y,
-function(){return Ca})},fa)}catch(Ca){W(Y,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ca,fa)}else W(Y,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(fa.name)?x(null,fa.type,g+Y*v,m+Y*v,240,160,fa.name,function(la){W(Y,function(){return la})},fa):"image"==fa.type.substring(0,5)||"application/pdf"==fa.type?na.readAsDataURL(fa):na.readAsText(fa)}})(U)});if(da){da=[];for(ba=0;ba<c.length;ba++)da.push(c[ba]);c=da;this.confirmImageResize(function(k){oa=
-k;V()},L)}else V()};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(c,g){g=null!=g?g:!1;var m=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,x=function(F,H){if(F||g)mxSettings.setResizeImages(F?H:null),mxSettings.save();
-m();c(H)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(F){x(F,!0)},function(F){x(F,!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?226:200,!0,!0):x(!1,n)};EditorUi.prototype.parseFile=function(c,g,m){m=null!=m?m:c.name;var n=
-new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,g,m)});n.readAsText(c)};EditorUi.prototype.parseFileData=function(c,g,m){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(m)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=
-function(c,g){g=null!=g?g:this.resampleThreshold;return c>g};EditorUi.prototype.resizeImage=function(c,g,m,n,x,F,H){x=null!=x?x:this.maxImageSize;var M=Math.max(1,c.width),L=Math.max(1,c.height),K=g;if(n&&this.isResampleImageSize(null!=H?H:g.length,F))try{var Z=Math.max(M/x,L/x);if(1<Z){var ha=Math.round(M/Z),ca=Math.round(L/Z),aa=document.createElement("canvas");aa.width=ha;aa.height=ca;aa.getContext("2d").drawImage(c,0,0,ha,ca);var oa=aa.toDataURL();if(oa.length<g.length){var da=document.createElement("canvas");
-da.width=ha;da.height=ca;var ka=da.toDataURL();oa!==ka&&(g=oa,M=ha,L=ca)}}}catch(ba){}n&&K!=g&&x>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(c,g,m,n,x/1.5,F,H):m(g,M,L)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,g,m){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!=m&&(n.onerror=m);n.src=c}catch(x){if(null!=m)m(x);
-else throw x;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var y=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());y.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&
-null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,g=this.editor.graph,m=g.isEnabled;g.isEnabled=function(){return m.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(v){var I=v.getEvent();return null==v.getState()&&!mxEvent.isMouseEvent(I)&&
-!g.freehand.isDrawing()||mxEvent.isPopupTrigger(I)&&(null==v.getState()||mxEvent.isControlDown(I)||mxEvent.isShiftDown(I))});g.cellEditor.editPlantUmlData=function(v,I,N){var T=JSON.parse(N);I=new SimpleTextareaDialog(c,T.data,function(W){null!=W&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(W,T.format,function(U,Y,fa){c.spinner.stop();g.getModel().beginUpdate();try{if("txt"==T.format)g.labelChanged(v,"<pre>"+U+"</pre>"),g.updateCellSize(v,!0);else{g.setCellStyles("image",
-c.convertDataUri(U),[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=Y,na.height=fa,g.cellsResized([v],[na],!1))}g.setAttributeForCell(v,"plantUmlData",JSON.stringify({data:W,format:T.format}))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(I.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));I.init()};g.cellEditor.editMermaidData=function(v,I,N){var T=JSON.parse(N);I=new SimpleTextareaDialog(c,T.data,function(W){null!=W&&c.spinner.spin(document.body,
-mxResources.get("inserting"))&&c.generateMermaidImage(W,T.config,function(U,Y,fa){c.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=Math.max(na.width,Y),na.height=Math.max(na.height,fa),g.cellsResized([v],[na],!1));g.setAttributeForCell(v,"mermaidData",JSON.stringify({data:W,config:T.config},null,2))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(I.container,640,420,!0,!0,
-null,null,null,new mxRectangle(0,0,320,280));I.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=function(v,I){try{var N=this.graph.getAttributeForCell(v,"plantUmlData");if(null!=N)this.editPlantUmlData(v,I,N);else if(N=this.graph.getAttributeForCell(v,"mermaidData"),null!=N&&window.isMermaidEnabled)this.editMermaidData(v,I,N);else{var T=g.getCellStyle(v);"1"==mxUtils.getValue(T,"metaEdit","0")?c.showDataDialog(v):n.apply(this,arguments)}}catch(W){c.handleError(W)}};g.getLinkTitle=
-function(v){return c.getLinkTitle(v)};g.customLinkClicked=function(v,I){var N=!1;try{var T=this.getGraphBounds();c.handleCustomLink(v,I);N=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(I))}catch(W){c.handleError(W)}return N};var x=g.parseBackgroundImage;g.parseBackgroundImage=function(v){var I=x.apply(this,arguments);null!=I&&null!=I.src&&Graph.isPageLink(I.src)&&(I={originalSrc:I.src});return I};var F=g.setBackgroundImage;g.setBackgroundImage=
-function(v){null!=v&&null!=v.originalSrc&&(v=c.createImageForPageLink(v.originalSrc,c.currentPage,this));F.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(v,I){v=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=v){var N=v.indexOf(",");if(0<N)for(v=v.substring(N+
-1),I=I.getProperty("patches"),N=0;N<I.length;N++)if(null!=I[N][EditorUi.DIFF_UPDATE]&&null!=I[N][EditorUi.DIFF_UPDATE][v]||null!=I[N][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(I[N][EditorUi.DIFF_REMOVE],v)){g.refreshBackgroundImage();break}}}));var H=g.getBackgroundImageObject;g.getBackgroundImageObject=function(v,I,N){var T=H.apply(this,arguments);null!=T&&null!=T.originalSrc&&(T=I?c.createImageForPageLink(T.originalSrc,N,null,!0):{src:T.originalSrc});return T};this.isOffline()||"undefined"===typeof window.EditDataDialog||
-(EditDataDialog.placeholderHelpLink="https://www.drawio.com/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 M=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(v){v=null!=v?v:"";"1"==urlParams.dev&&(v+=(0<v.length?"&":"?")+"dev=1");return M.apply(this,arguments)};var L=g.addClickHandler;g.addClickHandler=function(v,I,N){var T=I;I=
-function(W,U,Y){if(null==U){var fa=mxEvent.getSource(W);"a"==fa.nodeName.toLowerCase()&&(U=fa.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(W)||!mxEvent.isPopupTrigger(W))&&g.customLinkClicked(U,Y)&&mxEvent.consume(W);null!=T&&T(W,U,Y)};L.call(this,v,I,N)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var K=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(v,I,N){g.isSelectionEmpty()&&
-"simple"==Editor.currentTheme&&this.addMenuItems(v,["zoomIn","zoomOut","-"],null,N);K.apply(this,arguments);g.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(v,["-","addToScratchpad"],null,N);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(v,["-","exitGroup","home"],null,N)};var Z=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(v,I,N){if(c.editor.graph.isSelectionEmpty())Z.apply(this,arguments),c.menus.addMenuItems(v,["copyAsImage",
-"copyAsSvg"],null,N);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(v,I,N):this.addPopupMenuArrangeItems(v,I,N),this.addMenuItems(v,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,N),this.isShowCellEditItems()||this.addPopupDeleteItem(v,I,N),this.addMenuItems(v,["lockUnlock","-"],null,N),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(I)&&g.isCellEditable(I)&&(this.addSubmenu("editCell",v,null,mxResources.get("edit")),v.addSeparator(),g.getModel().isEdge(I))){this.addSubmenu("line",
-v);var T=g.getModel().getGeometry(I);null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(v,["clearWaypoints"],null,N)}1==g.getSelectionCount()&&this.addMenuItems(v,["enterGroup"],null,N);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(v,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(v,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=
-function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var ha=g.getExportVariables;g.getExportVariables=function(){var v=ha.apply(this,arguments),I=c.getCurrentFile();null!=I&&(v.filename=I.getTitle());v.pagecount=null!=c.pages?
-c.pages.length:1;v.page=null!=c.currentPage?c.currentPage.getName():"";v.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return v};var ca=g.getGlobalVariable;g.getGlobalVariable=function(v){var I=c.getCurrentFile();return"filename"==v&&null!=I?I.getTitle():"page"==v&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==v?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==v?null!=c.pages?c.pages.length:1:ca.apply(this,
-arguments)};var aa=null,oa=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var v=this.getCurrentFile(),I=null!=v&&null!=v.getTitle()?v.getTitle():this.defaultFilename;aa!=I&&v==oa&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());aa=I;oa=v}));var da=g.labelLinkClicked;g.labelLinkClicked=function(v,I,N){var T=I.getAttribute("href");if(null==T||!g.isCustomLink(T)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))da.apply(this,arguments);else{if(!g.isEnabled()||
-null!=v&&g.isCellLocked(v.cell))g.customLinkClicked(T),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var v=c.defaultFilename,I=c.getCurrentFile();null!=I&&(v=null!=I.getTitle()?I.getTitle():v);return v};var ka=this.actions.get("print");ka.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ka.visible=ka.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",
+"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.editor.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var l=c(mxUtils.bind(this,function(n){var x=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",x);null!=this.exportDialog&&
+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)x.apply(this);else{this.exportDialog=document.createElement("div");var F=l.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,80);this.exportDialog.style.left=F.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";F=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=F.zIndex;var G=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});G.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",x);this.editor.exportToCanvas(mxUtils.bind(this,function(L){G.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var M=this.createImageDataUri(L,null,"png");L=document.createElement("img");L.style.maxWidth="140px";L.style.maxHeight="140px";
+L.style.cursor="pointer";L.style.backgroundColor="white";L.setAttribute("title",mxResources.get("openInNewWindow"));L.setAttribute("border","0");L.setAttribute("src",M);this.exportDialog.appendChild(L);mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.openInNewWindow(M.substring(M.indexOf(",")+1),"image/png",!0);x.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(L){G.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+this.exportDialog=null);this.handleError(L)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,g,l,n,x,F){this.isLocalFileSave()?this.saveLocalFile(l,c,n,x,g,F):this.saveRequest(c,g,mxUtils.bind(this,function(G,L){return this.createEchoRequest(l,G,n,x,g,L)}),l,x,n)};EditorUi.prototype.saveRequest=function(c,g,l,n,x,F,G){G=null!=G?G:!mxClient.IS_IOS||!navigator.standalone;var L=mxUtils.bind(this,
+function(K,Z,ja,da){if("_blank"==Z||null!=K&&0<K.length){var ba=l("_blank"==Z?null:K,Z==App.MODE_DEVICE||"download"==Z||null==Z||"_blank"==Z?"0":"1");null!=ba&&(Z==App.MODE_DEVICE||"download"==Z||"_blank"==Z?ba.simulate(document,"_blank"):(ja=mxUtils.bind(this,function(na){F=null!=F?F:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,K,F,!0,Z,na)}catch(ca){this.handleError(ca)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ba.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=ba.getStatus()&&299>=ba.getStatus())try{this.exportFile(ba.getText(),K,F,!0,Z,na)}catch(ca){this.handleError(ca)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ca){this.spinner.stop();this.handleError(ca)}))}),null!=da?ja(da):this.pickFolder(Z,ja)))}});x=[App.MODE_BROWSER];G||x.push("_blank");var M=new SaveDialog(this,c,mxUtils.bind(this,function(K,Z,ja){L(K.value,Z,K,ja);this.hideDialog(null,null,M.container)}),x,null,"application/pdf");this.showDialog(M.container,
+420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));M.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,g,l,n,x,F){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,g,l){g(null)};EditorUi.prototype.exportSvg=function(c,g,l,n,x,F,
+G,L,M,K,Z,ja,da,ba){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(la){Editor.addRetryToError(la,mxUtils.bind(this,function(){this.exportSvg(c,g,l,n,x,F,G,L,M,K,Z,ja,da,ba)}));this.handleError(la)})))try{var na=this.editor.graph.isSelectionEmpty();l=null!=l?l:na;var ca=g?null:this.editor.graph.background;ca==mxConstants.NONE&&(ca=null);null==ca&&0==g&&(ca=this.editor.graph.shapeBackgroundColor);var ka=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&
+(this.editor.graph.addForeignObjectWarning=function(){});var aa=mxUtils.lightDarkColorSupported,V=mxUtils.preferDarkColor;if("light"==Z||"dark"==Z)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==Z;var k=Graph.addFont,v={};Graph.addFont=function(la,qa,ya,wa){k.call(this,la,qa,ya,v)};var J=this.editor.graph.createSvgImageExport(x),N=J.drawCellState;J.drawCellState=function(la,qa){null!=la&&Graph.processFontStyle(la.style);N.apply(this,arguments)};var T=this.editor.graph.getSvg(ca,
+c,G,L,null,l,null,J,"blank"==K?"_blank":"self"==K?"_top":null,null,!da,Z,ja);mxUtils.lightDarkColorSupported=aa;mxUtils.preferDarkColor=V;this.editor.graph.addForeignObjectWarning=ka;n&&this.editor.graph.addSvgShadow(T);var W=this.getBaseFilename()+(x?".drawio":"")+".svg";ba=null!=ba?ba:mxUtils.bind(this,function(la){this.isLocalFileSave()||la.length<=MAX_REQUEST_SIZE?this.saveData(W,"svg",la,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
+function(){mxUtils.popup(la)}))});var U=mxUtils.bind(this,function(la){this.spinner.stop();x&&la.setAttribute("content",this.getFileData(!0,null,null,null,l,M,null,null,null,null,null,c,G));ba(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(la))});this.editor.graph.mathEnabled&&this.editor.addMathCss(T);var Y=mxUtils.bind(this,function(la){Editor.replaceSvgDataUris&&F&&EditorUi.embedSvgImages(la);Editor.foreignObjectImages&&da?this.replaceAlternateContent(la,
+Z,U):U(la)}),fa=Graph.customFontElements;Graph.customFontElements=v;var oa=mxUtils.bind(this,function(la){Graph.customFontElements=fa;Graph.addFont=k;F&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(la,Y,this.thumbImageCache)):Y(la)});da?this.embedFonts(T,oa):(this.editor.addFontCss(T),oa(T))}catch(la){this.handleError(la)}};EditorUi.prototype.replaceAlternateContent=function(c,g,l){function n(ja,da,ba,na,ca){var ka=mxUtils.createElementNs(c.ownerDocument,
+mxConstants.NS_SVG,"image");ka.setAttribute("x",da);ka.setAttribute("y",ba+.5);ka.setAttribute("width",na.width);ka.setAttribute("height",na.height);null==ka.setAttributeNS?ka.setAttribute("xlink:href",ca):ka.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",ca);ja.replaceChild(ka,ja.lastChild);L()}function x(){if(G<Z.length)Z[G++](x)}var F="";g=c.getElementsByTagName("style");for(var G=0;G<g.length;G++)F+=g[G].innerHTML;g=c.getElementsByTagName("switch");counter=g.length;var L=mxUtils.bind(this,function(){counter--;
+0==counter&&l(c)}),M={},K={},Z=[];for(G=0;G<g.length;G++)mxUtils.bind(this,function(ja){var da=ja.getElementsByTagName("div");if(0<da.length)try{var ba=da[0].cloneNode(!0),na=parseInt(ba.style.marginLeft),ca=parseInt(ba.style.paddingTop),ka=ba.getElementsByTagName("div")[1],aa=da=!1,V=ba.style.alignItems,k=ba.style.justifyContent;if(null!=ba.style.writingMode){var v=ba.style.writingMode;aa="vertical-"==v.substring(0,9);da="-rl"==v.substring(v.length-3)}var J=!aa&&"1px"==ba.style.width||aa&&"1px"==
+ba.style.height;if(!aa&&"1px"==ba.style.height||aa&&"1px"==ba.style.width)ba.style.alignItems=aa&&da?"unsafe flex-end":"unsafe flex-start";J&&(ba.style.justifyContent="unsafe flex-start");ba.style.paddingTop="";ba.style.marginLeft="";var N=ba.outerHTML,T=M[N];null==T&&(ba.style.position="absolute",ba.style.visibility="hidden",document.body.appendChild(ba),v=1,v="1px"==ba.style.width?ka.offsetWidth:parseInt(ba.style.width),J=1,J="1px"==ba.style.height?ka.offsetHeight:parseInt(ba.style.height),document.body.removeChild(ba),
+T=new mxRectangle(na,ca,v,J),M[N]=T);"1px"==ba.style.height&&("unsafe center"==V?ca-=T.height/2:"unsafe flex-end"==V&&(ca-=T.height));if("1px"==ba.style.width)if(!aa&&"unsafe center"==k||aa&&"unsafe center"==V)na-=T.width/2;else if(!aa&&"unsafe flex-end"==k||aa&&(!da&&"unsafe flex-end"==V||da&&"unsafe flex-start"==V))na-=T.width;T=new mxRectangle(na,ca,T.width,T.height+parseInt(ka.style.fontSize)/4);Z.push(mxUtils.bind(this,function(W){var U=K[N];null==U?Graph.htmlToPng(N,T.width,T.height,mxUtils.bind(this,
+function(Y){n(ja,na,ca,T,Y);K[N]=Y;W()}),F):(n(ja,na,ca,T,U),W())}))}catch(W){L()}else L()})(g[G]);0==counter&&l(c);G=0;x()};EditorUi.prototype.addRadiobox=function(c,g,l,n,x,F,G){return this.addCheckbox(c,l,n,x,F,G,!0,g)};EditorUi.prototype.addCheckbox=function(c,g,l,n,x,F,G,L){F=null!=F?F:!0;var M=document.createElement("input");M.style.marginRight="8px";M.style.marginTop="16px";M.setAttribute("type",G?"radio":"checkbox");G="geCheckbox-"+Editor.guid();M.id=G;null!=L&&M.setAttribute("name",L);l&&
+(M.setAttribute("checked","checked"),M.defaultChecked=!0);n&&M.setAttribute("disabled","disabled");F&&(c.appendChild(M),l=document.createElement("label"),mxUtils.write(l,g),l.setAttribute("for",G),c.appendChild(l),x||mxUtils.br(c));return M};EditorUi.prototype.addEditButton=function(c,g){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var n=this.getCurrentFile(),x="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(x=window.location.href);
+var F=document.createElement("select");F.style.maxWidth="200px";F.style.width="auto";F.style.marginLeft="8px";F.style.marginRight="10px";F.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));F.appendChild(n);var G=document.createElement("option");G.setAttribute("value","custom");mxUtils.write(G,mxResources.get("custom")+"...");F.appendChild(G);c.appendChild(F);mxEvent.addListener(F,"change",mxUtils.bind(this,function(){if("custom"==
+F.value){var L=new FilenameDialog(this,x,mxResources.get("ok"),function(M){null!=M?(x=M,G.setAttribute("title",M)):(F.value="blank",G.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){F.value="blank"});this.showDialog(L.container,300,80,!0,!1);L.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==g||g.checked)?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?
+"blank"===F.value?"_blank":x:null},getEditInput:function(){return l},getEditSelect:function(){return F}}};EditorUi.prototype.addLinkSection=function(c,g){function l(){var L=document.createElement("div");L.style.width="100%";L.style.height="100%";L.style.boxSizing="border-box";null!=F&&F!=mxConstants.NONE?(L.style.border="1px solid black",L.style.backgroundColor=F):(L.style.backgroundPosition="center center",L.style.backgroundRepeat="no-repeat",L.style.backgroundImage="url('"+Dialog.prototype.closeImage+
+"')");G.innerText="";G.appendChild(L)}mxUtils.write(c,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 x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));n.appendChild(x);x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("openInNewWindow"));n.appendChild(x);
+x=document.createElement("option");x.setAttribute("value","self");mxUtils.write(x,mxResources.get("openInThisWindow"));n.appendChild(x);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));c.appendChild(n);mxUtils.write(c,mxResources.get("borderColor")+":");var F="#0000ff",G=null;G=mxUtils.button("",mxUtils.bind(this,function(L){this.pickColor(F||"none",function(M){F=M;l()});
+mxEvent.consume(L)}));l();G.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";G.style.marginLeft="4px";G.style.height="22px";G.style.width="22px";G.style.position="relative";G.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";G.className="geColorBtn";c.appendChild(G);mxUtils.br(c);return{getColor:function(){return F},getTarget:function(){return n.value},focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(c,g,l,n,x,F){F=null!=F?F:[];l&&(F.push("lightbox=1"),
+"auto"!=c&&F.push("target="+c),null!=g&&g!=mxConstants.NONE&&F.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=n&&0<n.length&&F.push("edit="+encodeURIComponent(n)),x&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));return F};EditorUi.prototype.createLink=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da){var ba=this.getCurrentFile();M=this.createUrlParameters(c,g,n,x,F,M);c=!0;null!=G?l="#U"+encodeURIComponent(G):L||null==ba||""==ba.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,
+null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+ba.getHash(),c=!1);c&&null!=ba&&null!=ba.getTitle()&&ba.getTitle()!=this.defaultFilename&&M.push("title="+encodeURIComponent(ba.getTitle()));K&&1<l.length&&(M.push("open="+l.substring(1)),l="");Z&&null!=this.currentPage&&M.push("page-id="+this.currentPage.getId());ja&&M.push("transparent=1");null!=da&&M.push("dark="+da);return(n&&(null!=G||null!=ba&&ba.getMode()!=App.MODE_GITHUB&&ba.getMode()!=
+App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<M.length?"?"+M.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da){this.getBasenames();var ba={};""!=x&&x!=mxConstants.NONE&&(ba.highlight=x);"auto"!==n&&(ba.target=n);K||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(ba.zoom=l/100);
+l=[];G&&(l.push("pages"),ba.resize=!0,null!=this.pages&&null!=this.currentPage&&(ba.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(l.push("zoom"),ba.resize=!0);L&&l.push("layers");M&&l.push("tags");null!=da&&(ba["dark-mode"]=da);0<l.length&&(K&&l.push("lightbox"),ba.toolbar=l.join(" "));null!=Z&&0<Z.length&&(ba.edit=Z);null!=c?ba.url=c:ba.xml=this.getFileData(!0,null,null,null,null,!G);g='<div class="mxgraph" style="'+(F?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(ba))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ja(g,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"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(c,g,l,n){var x=document.createElement("div");
+x.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("html"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(F);var G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";L.setAttribute("value","url");L.setAttribute("type","radio");L.setAttribute("name",
+"type-embedhtmldialog");F=L.cloneNode(!0);F.setAttribute("value","copy");G.appendChild(F);var M=document.createElement("span");mxUtils.write(M,mxResources.get("includeCopyOfMyDiagram"));G.appendChild(M);mxUtils.br(G);G.appendChild(L);M=document.createElement("span");mxUtils.write(M,mxResources.get("publicDiagramUrl"));G.appendChild(M);var K=this.getCurrentFile();null==l&&null!=K&&K.constructor==window.DriveFile&&(M=document.createElement("a"),M.style.paddingLeft="12px",M.style.color="gray",M.style.cursor=
+"pointer",mxUtils.write(M,mxResources.get("share")),G.appendChild(M),mxEvent.addListener(M,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(K.getId(),K)})));F.setAttribute("checked","checked");null==l&&L.setAttribute("disabled","disabled");x.appendChild(G);G=380;var Z=this.addLinkSection(x),ja=document.createElement("select");ja.style.maxWidth="260px";ja.style.marginLeft="8px";ja.style.marginTop="16px";M=document.createElement("option");M.setAttribute("value","light");
+mxUtils.write(M,mxResources.get("light"));ja.appendChild(M);M=document.createElement("option");M.setAttribute("value","dark");mxUtils.write(M,mxResources.get("dark"));ja.appendChild(M);M=document.createElement("option");M.setAttribute("value","auto");mxUtils.write(M,mxResources.get("automatic"));M.setAttribute("selected","selected");ja.appendChild(M);M.setAttribute("selected","selected");mxUtils.write(x,mxResources.get("appearance")+":");x.appendChild(ja);mxUtils.br(x);G+=26;var da=this.addCheckbox(x,
+mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value="100%";x.appendChild(ba);var na=this.addCheckbox(x,mxResources.get("fit"),!0);M=null!=this.pages&&1<this.pages.length;var ca=ca=this.addCheckbox(x,mxResources.get("allPages"),M,!M),ka=this.addCheckbox(x,mxResources.get("layers"),!0),aa=this.addCheckbox(x,mxResources.get("tags"),
+!0),V=this.addCheckbox(x,mxResources.get("lightbox"),!0),k=null;if(EditorUi.enableHtmlEditOption){k=this.addEditButton(x,V);var v=k.getEditInput();v.style.marginBottom="16px";G+=50;mxEvent.addListener(V,"change",function(){V.checked?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled");v.checked&&V.checked?k.getEditSelect().removeAttribute("disabled"):k.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,x,mxUtils.bind(this,function(){n(L.checked?l:null,da.checked,
+ba.value,Z.getTarget(),Z.getColor(),na.checked,ca.checked,ka.checked,aa.checked,V.checked,null!=k?k.getLink():null,null!=ja?ja.value:null)}),null,c,g);this.showDialog(c.container,340,G,!0,!0);F.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,g,l,n,x,F,G,L,M,K,Z,ja){var da=document.createElement("div");da.style.whiteSpace="nowrap";var ba=document.createElement("h3");mxUtils.write(ba,c||mxResources.get("publish"));ba.style.width="100%";ba.style.textAlign="center";ba.style.marginTop="2px";
+ba.style.marginBottom="20px";da.appendChild(ba);var na=document.createElement("select");c=30;na.className="geBtn";na.style.marginBottom="8px";na.style.marginLeft="0px";na.style.width="100%";na.style.boxSizing="border-box";if(null==L||""==L.getHash())x=null!=x?x:"https://www.drawio.com/doc/faq/publish-diagram-as-link",ba=document.createElement("option"),mxUtils.write(ba,mxResources.get("makeCopy")),ba.setAttribute("value","copy"),na.appendChild(ba);ba=document.createElement("option");mxUtils.write(ba,
+mxResources.get("authorizationRequired"));ba.setAttribute("value","auth");na.appendChild(ba);null!=L&&""!=L.getHash()||ba.setAttribute("disabled","disabled");L=document.createElement("option");L.setAttribute("value","public");na.appendChild(L);null!=G?(mxUtils.write(L,mxResources.get("publicDiagramUrl")),L.setAttribute("title",G),na.value="public"):(mxUtils.write(L,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),L.setAttribute("disabled","disabled"));da.appendChild(na);
+mxUtils.br(da);na.focus();var ca=null,ka=null;if(null!=g||null!=l)c+=30,mxUtils.write(da,mxResources.get("width")+":"),ca=document.createElement("input"),ca.setAttribute("type","text"),ca.style.marginRight="16px",ca.style.width="50px",ca.style.marginLeft="6px",ca.style.marginRight="16px",ca.style.marginBottom="10px",ca.value="100%",da.appendChild(ca),mxUtils.write(da,mxResources.get("height")+":"),ka=document.createElement("input"),ka.setAttribute("type","text"),ka.style.width="50px",ka.style.marginLeft=
+"6px",ka.style.marginBottom="10px",ka.value=l+"px",da.appendChild(ka),mxUtils.br(da);var aa=this.addLinkSection(da,n),V=K?this.addCheckbox(da,mxResources.get("transparentBackground"),!1):null;null!=V&&(c+=20);var k=document.createElement("select");k.className="geBtn";k.style.marginTop="8px";g=document.createElement("option");mxUtils.write(g,mxResources.get("allPages"));g.setAttribute("value","allPages");k.appendChild(g);g=document.createElement("option");mxUtils.write(g,mxResources.get("currentPage"));
+g.setAttribute("value","currentPage");k.appendChild(g);var v=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),ja&&(mxUtils.write(da,mxResources.get("pages")+":"),da.appendChild(k),mxUtils.br(da),c+=30),v=this.addCheckbox(da,mxResources.get("selectedPage")+": "+g));var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginTop=
+"16px";ja=document.createElement("option");ja.setAttribute("value","0");mxUtils.write(ja,mxResources.get("light"));J.appendChild(ja);ja=document.createElement("option");ja.setAttribute("value","1");mxUtils.write(ja,mxResources.get("dark"));J.appendChild(ja);ja=document.createElement("option");ja.setAttribute("value","auto");mxUtils.write(ja,mxResources.get("automatic"));ja.setAttribute("selected","selected");J.appendChild(ja);Z&&(mxUtils.write(da,mxResources.get("appearance")+":"),da.appendChild(J),
+mxUtils.br(da),c+=30);var N=this.addCheckbox(da,mxResources.get("lightbox"),!0,null,null,!n),T=this.addEditButton(da,N),W=T.getEditInput();n&&(W.style.marginLeft=N.style.marginLeft,N.style.display="none",c-=20);var U=this.addCheckbox(da,mxResources.get("layers"),!0);U.style.marginLeft=W.style.marginLeft;U.style.marginTop="8px";var Y=this.addCheckbox(da,mxResources.get("tags"),!0);Y.style.marginLeft=W.style.marginLeft;Y.style.marginBottom="16px";Y.style.marginTop="16px";mxEvent.addListener(N,"change",
+function(){N.checked?(U.removeAttribute("disabled"),W.removeAttribute("disabled"),Y.removeAttribute("disabled")):(U.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),Y.setAttribute("disabled","disabled"));W.checked&&N.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,da,mxUtils.bind(this,function(){M(aa.getTarget(),aa.getColor(),null==v?!1:v.checked,N.checked,T.getLink(),U.checked,null!=ca?
+ca.value:null,null!=ka?ka.value:null,Y.checked,na.value,null!=V?V.checked:!1,J.value,"allPages"==k.value)}),null,mxResources.get("create"),x,F);this.showDialog(n.container,340,296+c,!0,!0);null!=ca?(ca.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)):null==na.parentNode;aa.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,g,l,n,x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var G=document.createElement("h3");
+mxUtils.write(G,mxResources.get("image"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(x?"10":"4")+"px";F.appendChild(G);if(x){mxUtils.write(F,mxResources.get("zoom")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.style.marginRight="12px";L.value=this.lastExportZoom||"100%";F.appendChild(L);mxUtils.write(F,mxResources.get("borderWidth")+":");var M=document.createElement("input");
+M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.value=this.lastExportBorder||"0";F.appendChild(M);mxUtils.br(F)}var K=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Z=n?null:this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);G=this.editor.graph;var ja=n?null:this.addCheckbox(F,mxResources.get("transparentBackground"),G.background==mxConstants.NONE||null==G.background);
+null!=ja&&(ja.style.marginBottom="16px");c=new CustomDialog(this,F,mxUtils.bind(this,function(){var da=parseInt(L.value)/100||1,ba=parseInt(M.value)||0;l(!K.checked,null!=Z?Z.checked:!1,null!=ja?ja.checked:!1,da,ba)}),null,c,g);this.showDialog(c.container,300,(x?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,g,l,n,x,F,G,L,M){G=null!=G?G:Editor.defaultIncludeDiagram;var K=document.createElement("div");K.style.whiteSpace="nowrap";var Z=this.editor.graph,ja="jpeg"==L||"webp"==
+L?220:320,da=document.createElement("h3");mxUtils.write(da,c);da.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";K.appendChild(da);mxUtils.write(K,mxResources.get("zoom")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value=this.lastExportZoom||"100%";K.appendChild(ba);mxUtils.write(K,mxResources.get("borderWidth")+":");var na=document.createElement("input");
+na.setAttribute("type","text");na.style.marginRight="16px";na.style.width="60px";na.style.marginLeft="4px";na.value=this.lastExportBorder||"0";K.appendChild(na);mxUtils.br(K);var ca=this.addCheckbox(K,mxResources.get("selectionOnly"),!1,Z.isSelectionEmpty()),ka=document.createElement("input");ka.style.marginTop="16px";ka.style.marginRight="8px";ka.style.marginLeft="24px";ka.setAttribute("disabled","disabled");ka.setAttribute("type","checkbox");var aa=document.createElement("select");aa.style.marginTop=
+"16px";aa.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(da=0;da<c.length;da++)if(!Z.isSelectionEmpty()||"selectionOnly"!=c[da]){var V=document.createElement("option");mxUtils.write(V,mxResources.get(c[da]));V.setAttribute("value",c[da]);aa.appendChild(V)}M?(mxUtils.write(K,mxResources.get("size")+":"),K.appendChild(aa),mxUtils.br(K),ja+=26,mxEvent.addListener(aa,"change",function(){"selectionOnly"==aa.value&&(ca.checked=!0)})):F&&(K.appendChild(ka),mxUtils.write(K,mxResources.get("crop")),
+mxUtils.br(K),ja+=30,mxEvent.addListener(ca,"change",function(){ca.checked?ka.removeAttribute("disabled"):ka.setAttribute("disabled","disabled")}));Z.isSelectionEmpty()?M&&(ca.style.display="none",ca.nextSibling.style.display="none",ca.nextSibling.nextSibling.style.display="none",ja-=30):(aa.value="diagram",ka.setAttribute("checked","checked"),ka.defaultChecked=!0,mxEvent.addListener(ca,"change",function(){aa.value=ca.checked?"selectionOnly":"diagram"}));var k=this.addCheckbox(K,mxResources.get("transparentBackground"),
+!1,null,null,"jpeg"!=L&&"webp"!=L),v=document.createElement("select");v.style.maxWidth="260px";v.style.marginLeft="8px";v.style.marginTop="16px";F=document.createElement("option");F.setAttribute("value","light");mxUtils.write(F,mxResources.get("light"));v.appendChild(F);M=document.createElement("option");M.setAttribute("value","dark");mxUtils.write(M,mxResources.get("dark"));v.appendChild(M);"svg"==L&&mxUtils.lightDarkColorSupported?(F=document.createElement("option"),F.setAttribute("value","auto"),
+mxUtils.write(F,mxResources.get("automatic")),F.setAttribute("selected","selected"),v.appendChild(F)):Editor.isDarkMode()?M.setAttribute("selected","selected"):F.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("appearance")+":");K.appendChild(v);mxUtils.br(K);ja+=26;var J=this.addCheckbox(K,mxResources.get("shadow"),Z.shadowVisible),N=null;if("png"==L||"jpeg"==L||"webp"==L)N=this.addCheckbox(K,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),ja+=30;Z=
+null!=this.pages?this.pages.length:1;var T=this.addCheckbox(K,mxResources.get("includeCopyOfMyDiagram")+(1<Z?":":""),G,null,null,"jpeg"!=L&&"webp"!=L),W=document.createElement("select");W.style.maxWidth="260px";W.style.marginLeft="28px";"png"==L||"svg"==L?(G=function(){T.checked?W.removeAttribute("disabled"):W.setAttribute("disabled","disabled")},F=document.createElement("option"),F.setAttribute("value","allPages"),mxUtils.write(F,mxResources.get("allPages")),W.appendChild(F),F=document.createElement("option"),
+F.setAttribute("value","currentPage"),mxUtils.write(F,mxResources.get("currentPage")),W.appendChild(F),1<Z?(T.style.marginBottom="12px",W.style.marginBottom="16px",K.appendChild(W),mxUtils.br(K),ja+=20):T.style.marginBottom="16px",null!=this.lastEmbedInclude&&(W.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",G),G()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");U.id="geCheckbox-"+
+Editor.guid();var Y=document.createElement("input");Y.style.marginBottom="16px";Y.style.marginRight="8px";Y.setAttribute("type","checkbox");Y.id="geCheckbox-"+Editor.guid();g&&(U.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,K.appendChild(U),G=document.createElement("label"),mxUtils.write(G,mxResources.get("embedImages")),G.setAttribute("for",U.id),K.appendChild(G),mxUtils.br(K),Y.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,K.appendChild(Y),G=document.createElement("label"),
+mxUtils.write(G,mxResources.get("embedFonts")),G.setAttribute("for",Y.id),K.appendChild(G),mxUtils.br(K),ja+=50);var fa=document.createElement("select");fa.style.maxWidth="260px";fa.style.marginLeft="8px";F=document.createElement("option");F.setAttribute("value","auto");mxUtils.write(F,mxResources.get("automatic"));fa.appendChild(F);G=document.createElement("option");G.setAttribute("value","blank");mxUtils.write(G,mxResources.get("openInNewWindow"));fa.appendChild(G);G=document.createElement("option");
+G.setAttribute("value","self");mxUtils.write(G,mxResources.get("openInThisWindow"));fa.appendChild(G);G=document.createElement("div");mxUtils.write(G,mxResources.get("LinksLost"));G.style.margin="7px";G.style.display="none";"svg"==L&&(mxUtils.write(K,mxResources.get("links")+":"),K.appendChild(fa),K.appendChild(G),mxUtils.br(K),mxUtils.br(K),ja+=50);l=new CustomDialog(this,K,mxUtils.bind(this,function(){this.lastExportBorder=na.value;this.lastExportZoom=ba.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=
+Y.checked;this.lastEmbedInclude=W.value;x(ba.value,k.checked,!ca.checked,J.checked,T.checked,U.checked&&g,na.value,ka.checked,("png"==L||"svg"==L)&&"currentPage"==W.value,fa.value,null!=N?N.checked:null,null!=v?v.value:null,aa.value,Y.checked)}),null,l,n);this.showDialog(l.container,340,ja,!0,!0,null,null,null,null,!0);ba.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,g,l,n,
+x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var G=this.editor.graph;if(null!=g){var L=document.createElement("h3");mxUtils.write(L,g);L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";F.appendChild(L)}var M=this.addCheckbox(F,mxResources.get("fit"),!0),K=this.addCheckbox(F,mxResources.get("shadow"),G.shadowVisible&&n,!n),Z=this.addCheckbox(F,l),ja=this.addCheckbox(F,mxResources.get("lightbox"),!0),da=this.addEditButton(F,ja),ba=da.getEditInput(),
+na=1<G.model.getChildCount(G.model.getRoot()),ca=this.addCheckbox(F,mxResources.get("layers"),na,!na);ca.style.marginLeft=ba.style.marginLeft;ca.style.marginBottom="12px";ca.style.marginTop="8px";mxEvent.addListener(ja,"change",function(){ja.checked?(na&&ca.removeAttribute("disabled"),ba.removeAttribute("disabled")):(ca.setAttribute("disabled","disabled"),ba.setAttribute("disabled","disabled"));ba.checked&&ja.checked?da.getEditSelect().removeAttribute("disabled"):da.getEditSelect().setAttribute("disabled",
+"disabled")});g=new CustomDialog(this,F,mxUtils.bind(this,function(){c(M.checked,K.checked,Z.checked,ja.checked,da.getLink(),ca.checked)}),null,mxResources.get("embed"),x);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,g,l,n,x,F,G,L){function M(ba){var na=" ",ca="";n&&(na=" 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!=Z?"&page="+Z:"")+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");var ka="";l&&(ka=' width="'+Math.round(K.width)+'" height="'+Math.round(K.height)+'"');G('<img src="'+ba+'"'+ka+(""!=ca?' style="'+ca+'"':"")+na+"/>")}var K=this.editor.graph.getGraphBounds(),Z=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ba){var na=n?this.getFileData(!0):
+null;ba=this.createImageDataUri(ba,na,"png");M(ba)}),null,null,null,mxUtils.bind(this,function(ba){L({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),K.width*K.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var ja="";l&&(ja="&w="+Math.round(2*K.width)+"&h="+Math.round(2*K.height));var da=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+ja+"&xml="+encodeURIComponent(g));da.send(mxUtils.bind(this,function(){200<=
+da.getStatus()&&299>=da.getStatus()?M("data:image/png;base64,"+da.getText()):L({message:mxResources.get("unknownError")})}))}else L({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,g,l,n,x,F,G){var L=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),M=L.getElementsByTagName("a");if(null!=M)for(var K=0;K<M.length;K++){var Z=M[K].getAttribute("href");null!=Z&&"#"==Z.charAt(0)&&"_blank"==M[K].getAttribute("target")&&M[K].removeAttribute("target")}n&&
+L.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(L);if(l){var ja=" ",da="";n&&(ja="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"+(x?"&edit=_blank":"")+(F?"&layers=1":
+"")+"');}})(this);\"",da+="cursor:pointer;");c&&(da+="max-width:100%;");this.editor.convertImages(L,mxUtils.bind(this,function(ba){G('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ba))+'"'+(""!=da?' style="'+da+'"':"")+ja+"/>")}))}else da="",n&&(g=this.getSelectedPageIndex(),L.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:"")+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}}})(this);"),da+="cursor:pointer;"),c&&(c=parseInt(L.getAttribute("width")),x=parseInt(L.getAttribute("height")),L.setAttribute("viewBox","-0.5 -0.5 "+c+" "+x),da+="max-width:100%;max-height:"+x+"px;",L.removeAttribute("height")),""!=da&&L.setAttribute("style",da),this.editor.addFontCss(L),this.editor.graph.mathEnabled&&this.editor.addMathCss(L),G(mxUtils.getXml(L))};EditorUi.prototype.timeSince=
+function(c){c=Math.floor((new Date-c)/1E3);var g=Math.floor(c/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(c/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(c/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(c/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(c/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,g){if(null!=c){var l=null;if("diagram"==
+c.nodeName)l=c;else if("mxfile"==c.nodeName){var n=c.getElementsByTagName("diagram");if(0<n.length){l=n[0];var x=g.getGlobalVariable;g.getGlobalVariable=function(F){return"page"==F?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==F?1:x.apply(this,arguments)}}}null!=l&&(c=Editor.parseDiagramNode(l))}n=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(c)}catch(F){}finally{this.editor.graph=n}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};
+EditorUi.prototype.getPngFileProperties=function(c){var g=1,l=0;if(null!=c){if(c.hasAttribute("scale")){var n=parseFloat(c.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}c.hasAttribute("border")&&(n=parseInt(c.getAttribute("border")),!isNaN(n)&&0<n&&(l=n))}return{scale:g,border:l}};EditorUi.prototype.getEmbeddedPng=function(c,g,l,n,x){try{var F=this.editor.graph,G=null;if(null!=l&&0<l.length)F=this.createTemporaryGraph(F.getStylesheet()),document.body.appendChild(F.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,
+!0),F),G=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){F=this.createTemporaryGraph(F.getStylesheet());var L=F.getGlobalVariable;F.setBackgroundImage=this.editor.graph.setBackgroundImage;var M=this.pages[0];this.currentPage==M?F.setBackgroundImage(this.editor.graph.backgroundImage):null!=M.viewState&&null!=M.viewState&&F.setBackgroundImage(M.viewState.backgroundImage);F.getGlobalVariable=function(K){return"page"==K?M.getName():"pagenumber"==K?1:L.apply(this,arguments)};document.body.appendChild(F.container);
+F.model.setRoot(M.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(K){try{null==G&&(G=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var Z=K.toDataURL("image/png");Z=Editor.writeGraphModelToPng(Z,"tEXt","mxfile",encodeURIComponent(G));c(Z.substring(Z.lastIndexOf(",")+1));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container)}catch(ja){null!=g&&g(ja)}}),null,null,null,mxUtils.bind(this,function(K){null!=g&&g(K)}),null,null,n,null,F.shadowVisible,null,F,x,
+null,null,null,"diagram",null)}catch(K){null!=g&&g(K)}};EditorUi.prototype.getEmbeddedSvg=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da){L=null!=L?L:!0;Z=null!=Z?Z:0;G=null!=M?M:g.background;G==mxConstants.NONE&&(G=null);null==G&&"none"==g.getAdaptiveColors()&&(G="#ffffff");M=this.editor.graph.createSvgImageExport(null!=c);F=g.getSvg(G,K,Z,null,null,F,null,M,null,g.shadowVisible||ja,null,da,"diagram");(g.shadowVisible||ja)&&g.addSvgShadow(F,null,null,0==Z);null!=c&&F.setAttribute("content",c);null!=l&&F.setAttribute("resource",
+l);var ba=mxUtils.bind(this,function(na){na=(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(na);null!=x&&x(na);return na});g.mathEnabled&&this.editor.addMathCss(F);if(null!=x)this.embedFonts(F,mxUtils.bind(this,function(na){L?this.editor.convertImages(na,mxUtils.bind(this,function(ca){ba(ca)})):ba(na)}));else return ba(F)};EditorUi.prototype.embedFonts=function(c,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
+this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),g(c)}catch(n){g(c)}}))}catch(l){g(c)}}))};EditorUi.prototype.exportImage=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da){M=null!=M?M:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(na){Editor.addRetryToError(na,mxUtils.bind(this,function(){this.exportImage(c,g,l,n,x,F,G,L,M,K,Z,ja,da)}));this.handleError(na)}))){var ba=
+this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(na){this.spinner.stop();try{this.saveCanvas(na,x?this.getFileData(!0,null,null,null,l,L,null,null,null,null,null,c,F):null,M,null==this.pages||0==this.pages.length,Z)}catch(ca){this.handleError(ca)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(na){this.spinner.stop();this.handleError(na)}),null,l,c||1,g,n,null,null,F,G,K,
+ja,da)}catch(na){this.spinner.stop(),this.handleError(na)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)c[this.pages[g].getId()]=this.pages[g].getId();return c};EditorUi.prototype.importXml=function(c,g,l,n,x,F,G){g=null!=g?g:0;l=null!=l?l:0;var L=[];try{var M=this.editor.graph;if(null!=c&&0<c.length){M.model.beginUpdate();
+try{var K=mxUtils.parseXml(c);c={};var Z=this.editor.extractGraphModel(K.documentElement,null!=this.pages);if(null!=Z&&"mxfile"==Z.nodeName&&null!=this.pages){var ja=Z.getElementsByTagName("diagram");if(1==ja.length&&!F){if(Z=Editor.parseDiagramNode(ja[0]),null!=this.currentPage&&(c[ja[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var da=ja[0].getAttribute("name");null!=da&&""!=da&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,da))}}else if(0<ja.length){F=
+[];var ba=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ja[0].getAttribute("id")]=this.pages[0].getId(),da=ja[0].getAttribute("name"),null!=da&&""!=da&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],da)),Z=Editor.parseDiagramNode(ja[0]),n=!1,ba=1);for(;ba<ja.length;ba++){var na=ja[ba].getAttribute("id");ja[ba].removeAttribute("id");var ca=this.updatePageRoot(new DiagramPage(ja[ba]));c[na]=ja[ba].getAttribute("id");var ka=this.pages.length;null==ca.getName()&&
+ca.setName(mxResources.get("pageWithNumber",[ka+1]));M.model.execute(new ChangePage(this,ca,ca,ka,!0));F.push(ca)}this.updatePageLinks(c,F)}}if(null!=Z&&"mxGraphModel"===Z.nodeName){L=M.importGraphModel(Z,g,l,n);if(null!=L)for(this.addLocalPagesToMapping(c),ba=0;ba<L.length;ba++)this.updatePageLinksForCell(c,L[ba]);var aa=M.parseBackgroundImage(Z.getAttribute("backgroundImage"));if(null!=aa&&null!=aa.originalSrc){this.updateBackgroundPageLink(c,aa);var V=new ChangePageSetup(this,null,aa);V.ignoreColor=
+!0;M.model.execute(V)}}G&&M.pasteCellStyles(M.includeDescendants(L),M.defaultVertexStyle,M.defaultEdgeStyle)}finally{M.model.endUpdate()}}}catch(k){if(x)throw k;this.handleError(k)}return L};EditorUi.prototype.updatePageLinks=function(c,g){for(var l=0;l<g.length;l++)this.updatePageLinksForCell(c,g[l].root),null!=g[l].viewState&&this.updateBackgroundPageLink(c,g[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var l=
+c[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=l&&(g.originalSrc="data:page/id,"+l)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=function(c,g){var l=document.createElement("div"),n=this.editor.graph,x=n.getLinkForCell(g);null!=x&&n.setLinkForCell(g,this.updatePageLink(c,x));if(n.isHtmlLabel(g)){l.innerHTML=Graph.sanitizeHtml(n.getLabel(g));for(var F=l.getElementsByTagName("a"),G=!1,L=0;L<F.length;L++)x=F[L].getAttribute("href"),null!=x&&(F[L].setAttribute("href",this.updatePageLink(c,
+x)),G=!0);G&&n.labelChanged(g,l.innerHTML)}for(L=0;L<n.model.getChildCount(g);L++)this.updatePageLinksForCell(c,n.model.getChildAt(g,L))};EditorUi.prototype.updatePageLink=function(c,g){if(Graph.isPageLink(g)){var l=c[g.substring(g.indexOf(",")+1)];g=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var x=0;x<n.actions.length;x++){var F=n.actions[x];if(null!=F.open&&Graph.isPageLink(F.open)){var G=F.open.substring(F.open.indexOf(",")+
+1);l=c[G];null!=l?F.open="data:page/id,"+l:null==this.getPageById(G)&&delete F.open}}g="data:action/json,"+JSON.stringify(n)}}catch(L){}return g};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,g,l,n,x){var F=mxUtils.bind(this,function(G){this.loadingExtensions=!1;null!=l?l(G):this.handleError(G)});this.createTimeout(null,mxUtils.bind(this,function(G){n=null!=n?n:c.name;var L=mxUtils.bind(this,
+function(K){G.clear()&&F(K)}),M=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var K=this.isRemoteVisioFormat(n);try{var Z=n.lastIndexOf(".");if(0<=Z&&Z<n.length)n.substring(Z+1).toUpperCase();else{var ja=n.lastIndexOf("/");0<=ja&&ja<n.length&&(n=n.substring(ja+1))}}catch(ba){}if(K)if(null==VSS_CONVERT_URL||this.isOffline())L({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{K=new FormData;
+K.append("file1",c,n);var da=new XMLHttpRequest;da.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));da.responseType="blob";this.addRemoteServiceSecurityCheck(da);null!=x&&da.setRequestHeader("x-convert-custom",x);da.onreadystatechange=mxUtils.bind(this,function(){if(4==da.readyState&&G.clear())if(200<=da.status&&299>=da.status)try{var ba=da.response;if("text/xml"==ba.type){var na=new FileReader;na.onload=mxUtils.bind(this,function(ca){try{g(ca.target.result)}catch(ka){L({message:mxResources.get("errorLoadingFile")})}});
+na.readAsText(ba)}else this.doImportVisio(ba,g,L,n)}catch(ca){L(ca)}else try{""==da.responseType||"text"==da.responseType?L({message:da.responseText}):(na=new FileReader,na.onload=function(){try{L({message:JSON.parse(na.result).Message})}catch(ca){null!=na.result&&0<na.result.length?L({message:na.result}):L(ca)}},na.readAsText(da.response))}catch(ca){L({})}});da.send(K)}else if(G.clear())try{this.doImportVisio(c,g,L,n)}catch(ba){L(ba)}}else L({message:mxResources.get("serviceUnavailableOrBlocked")})});
+this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?M():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",M,null,null,null,L))}),F)};EditorUi.prototype.importGraphML=function(c,g,l){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=l?l(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var F=mxUtils.bind(this,function(L){x.clear()&&n(L)}),G=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,
+g,n)}catch(L){F(L)}else F({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?G():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",G,null,null,null,F))}),n)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var g=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.vsdxExportEnabled()?this.createTimeout(null,
+mxUtils.bind(this,function(l){var n=mxUtils.bind(this,function(F){l.clear()&&g(F)}),x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||n({message:mxResources.get("unknownError")})}catch(F){n(F)}else n({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=
+!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,n))}),g):g({message:mxResources.get("serviceUnavailableOrBlocked")})}};EditorUi.prototype.convertLucidChart=function(c,g,l){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=l?l(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var F=mxUtils.bind(this,function(L){x.clear()&&n(L)}),G=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if("undefined"!==typeof window.LucidImporter)try{var L=
+JSON.parse(c);g(LucidImporter.importState(L));try{if(null!=window.console&&"1"==urlParams.test){var M=[(new Date).toISOString(),"convertLucidChart",L];null!=L.state&&M.push(JSON.parse(L.state));if(null!=L.svgThumbs)for(var K=0;K<L.svgThumbs.length;K++)M.push(Editor.createSvgDataUri(L.svgThumbs[K]));null!=L.thumb&&M.push(L.thumb);console.log.apply(console,M)}}catch(Z){}}catch(Z){null!=window.console&&console.error(Z),F(Z)}else F({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==
+typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(G,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",G,null,null,null,F)},null,null,null,F)},null,null,null,F)},null,null,null,F)},null,null,null,F):mxscript(window.DRAWIO_SERVER_URL+
+"js/extensions.min.js",G,null,null,null,F))}),n)};EditorUi.prototype.createMermaidXml=function(c,g,l,n,x,F){var G=new Graph(document.createElement("div"));l=G.insertVertex(null,null,null,0,0,n,x,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");G.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:g},null,2));null!=F&&G.setAttributeForCell(l,"templatePrompt",F);c=(new mxCodec).encode(G.getModel());return mxUtils.getXml(c)};EditorUi.prototype.getSvgForXml=function(c){var g=
+null,l=this.createTemporaryGraph(this.editor.graph.getStylesheet());try{document.body.appendChild(l.container),(new mxCodec(mxUtils.parseXml(c))).decode(mxUtils.parseXml(c).documentElement,l.getModel()),g=l.getSvg(null,null,null,null,null,null,null,null,null,null,null,null,null,null,!0,!0)}finally{document.body.removeChild(l.container)}return g};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,g,l,n,x){var F=0,G=mxUtils.bind(this,function(){this.createTimeout(this.editor.generateTimeout,
+mxUtils.bind(this,function(L){var M="";if(null!=this.drive&&null!=this.drive.getUser()){var K=this.drive.getUser();null!=K.email&&0<K.email.indexOf("@")&&(M=K.email.substring(K.email.indexOf("@")+1))}var Z={prompt:c,driveDomain:M,options:null!=x?x:{}};EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"enableParser",n,"data",[Z],"url",["https://www.draw.io/generate/v3"]);var ja=Date.now();M=new mxXmlRequest("https://www.draw.io/generate/v3",JSON.stringify(Z),"POST");var da=mxUtils.bind(this,
+function(na){L.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"data",[Z],"error",[na],"time",Date.now()-ja+" ms"),l(na))}),ba=mxUtils.bind(this,function(na){3>F++?L.clear()&&G():da(na)});M.send(mxUtils.bind(this,function(na){if(L.isAlive())if(200<=na.getStatus()&&299>=na.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ka=na.getText();try{ka=JSON.parse(ka),result=ka.result}catch(aa){result=ka}EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"data",
+[Z],"response",[ka],"time",Date.now()-ja+" ms");n?"<"==result.charAt(0)?L.clear()&&(ka=Editor.extractGraphModelFromText(result),g(null!=ka&&3==ka.length?ka[1]:result)):this.parseMermaidDiagram(result,null,mxUtils.bind(this,function(aa){this.tryAndHandle(mxUtils.bind(this,function(){L.clear()&&g(aa)}),da)}),da,ba,!0):this.generateMermaidImage(result,null,mxUtils.bind(this,function(aa,V,k){this.tryAndHandle(mxUtils.bind(this,function(){L.clear()&&g(result,aa,V,k)}),da)}),da,ba)}),da,!0);else{var ca=
+{message:mxResources.get("error")+" "+na.getStatus()};try{ca=JSON.parse(na.getText()),null!=ca.error&&(ca.message=ca.error)}catch(ka){}da(ca)}}),da)}),l)});G()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var g=c.split("```");g=1<g.length?g:c.split("<pre>");g=1<g.length?g:c.split("~~~");g=1<g.length?g:c.split("%%");g=1<g.length?g:c.split("(Begins)");c=mxUtils.trim(1>=g.length?c:g[1]);g=c.split("\n");var l=1<g.length?g[1]:
+null;if(null!=l){var n=l.indexOf("-");0<n&&(l=l.substring(0,n))}if(0<g.length&&"mermaid"==mxUtils.trim(g[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))g.shift(),c=mxUtils.trim(g.join("\n")),g=c.split("\n");l=g[0].split(" ")[0].replace(/:$/,"");n=l.indexOf("-");0<n&&(l=l.substring(0,n));0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.isSupportedMermaidDiagramType=function(c){return"graph"==c||"flowchart"==c||"sequencediagram"==c||"classdiagram"==
+c||"statediagram-v2"==c||"statediagram"==c||"erdiagram"==c||"requirementdiagram"==c||"gitgraph"==c||"mindmap"==c||"journey"==c};EditorUi.prototype.getMermaidDiagramType=function(c){c=c.split("\n");for(var g=0;g<c.length&&(0==c[g].trim().length||"%%"==c[g].substring(0,2));)g++;if("---"==c[g].trim()){do g++;while(g<c.length&&"---"!=c[g].trim());g++}c=c[g].trim().toLowerCase();g=c.indexOf(" ");return c.substring(0,0<g?g:c.length)};EditorUi.prototype.parseMermaidDiagram=function(c,g,l,n,x,F){var G=!1;
+F&&"undefined"!==typeof mxMermaidToDrawio&&this.isSupportedMermaidDiagramType(this.getMermaidDiagramType(c))&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(L){G||L==this.emptyDiagramXml||(G=!0,l(L))}));this.generateMermaidImage(c,g,mxUtils.bind(this,function(L,M,K){G||(G=!0,l(this.createMermaidXml(c,g,L,M,K)))}),n,x)};EditorUi.prototype.loadMermaid=function(c,g){var l=mxUtils.bind(this,function(x){this.loadingMermaid=!1;g(x)}),n=mxUtils.bind(this,function(){try{this.loadingMermaid=!1,c()}catch(x){l(x)}});
+"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(n,0):(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",n,null,null,null,l):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",n,null,null,null,l))};EditorUi.prototype.mermaidSvgToDataUri=function(c,g,l,n){try{c=c.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var x=mxUtils.parseXml(c).getElementsByTagName("svg");if(0<x.length&&"error"!=x[0].getAttribute("aria-roledescription")){var F=
+parseFloat(x[0].getAttribute("width")),G=parseFloat(x[0].getAttribute("height"));if(isNaN(F)||isNaN(G))try{var L=x[0].getAttribute("viewBox").split(/\s+/);F=parseFloat(L[2]);G=parseFloat(L[3])}catch(M){F=F||100,G=G||100}g(this.convertDataUri(Editor.createSvgDataUri(c)),F,G)}else null!=n?n():l({message:mxResources.get("invalidInput")})}catch(M){l(M)}};EditorUi.prototype.getMermaidConfig=function(c,g){g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);g.securityLevel="strict";g.startOnLoad=!1;
+g.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=c.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(g.theme="dark");return g};EditorUi.prototype.generateMermaidImage=function(c,g,l,n,x){var F=mxUtils.bind(this,function(G){null!=n?n(G):this.handleError(G)});this.loadMermaid(mxUtils.bind(this,function(){try{mermaid.mermaidAPI.initialize(this.getMermaidConfig(c,g)),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),
+c).then(mxUtils.bind(this,function(G){this.mermaidSvgToDataUri(G.svg,l,n,x)})).catch(mxUtils.bind(this,function(G){this.removeMermaidErrors();"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();null!=x?x(G):F(G)}))}catch(G){F(G)}}),F)};EditorUi.prototype.removeMermaidErrors=function(){for(var c=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),g=0;g<c.length;g++)null!=c[g].parentNode&&c[g].parentNode.removeChild(c[g])};EditorUi.prototype.generatePlantUmlImage=function(c,
+g,l,n){function x(L,M,K){c1=L>>2;c2=(L&3)<<4|M>>4;c3=(M&15)<<2|K>>6;c4=K&63;r="";r+=F(c1&63);r+=F(c2&63);r+=F(c3&63);return r+=F(c4&63)}function F(L){if(10>L)return String.fromCharCode(48+L);L-=10;if(26>L)return String.fromCharCode(65+L);L-=26;if(26>L)return String.fromCharCode(97+L);L-=26;return 0==L?"-":1==L?"_":"?"}var G=new XMLHttpRequest;G.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(L){r="";for(i=0;i<L.length;i+=3)r=i+2==L.length?r+x(L.charCodeAt(i),
+L.charCodeAt(i+1),0):i+1==L.length?r+x(L.charCodeAt(i),0,0):r+x(L.charCodeAt(i),L.charCodeAt(i+1),L.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=g&&(G.responseType="blob");G.onload=function(L){if(200<=this.status&&300>this.status)if("txt"==g)l(this.response);else{var M=new FileReader;M.readAsDataURL(this.response);M.onloadend=function(K){var Z=new Image;Z.onload=function(){try{var ja=Z.width,da=Z.height;if(0==ja&&0==da){var ba=M.result,na=ba.indexOf(","),ca=
+decodeURIComponent(escape(atob(ba.substring(na+1)))),ka=mxUtils.parseXml(ca).getElementsByTagName("svg");0<ka.length&&(ja=parseFloat(ka[0].getAttribute("width")),da=parseFloat(ka[0].getAttribute("height")))}l(M.result,ja,da)}catch(aa){n(aa)}};Z.src=M.result};M.onerror=function(K){n(K)}}else n(L)};G.onerror=function(L){n(L)};G.send()};EditorUi.prototype.insertAsPreText=function(c,g,l){var n=this.editor.graph,x=null;n.getModel().beginUpdate();try{x=n.insertVertex(null,null,"<pre>"+c+"</pre>",g,l,1,
+1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(x,!0)}finally{n.getModel().endUpdate()}return x};EditorUi.prototype.insertTextAt=function(c,g,l,n,x,F,G,L){F=null!=F?F:!0;G=null!=G?G:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(da){4==da.readyState&&200<=da.status&&299>=da.status&&
+this.editor.graph.setSelectionCells(this.insertTextAt(da.responseText,g,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var M=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var K=Editor.extractGraphModelFromPdf(c);if(null!=K&&0<K.length)return this.importXml(K,g,l,F,!0,L)}if(Editor.isPngDataUrl(c)&&(K=Editor.extractGraphModelFromPng(c),null!=K&&0<K.length))return this.importXml(K,g,l,F,!0,L);if("data:image/svg+xml;"==
+c.substring(0,19))try{K=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(K=c.substring(c.indexOf(",")+1),K=window.atob&&!mxClient.IS_SF?atob(K):Base64.decode(K,!0)):K=decodeURIComponent(c.substring(c.indexOf(",")+1));var Z=this.importXml(K,g,l,F,!0,L);if(0<Z.length)return Z}catch(da){}this.loadImage(c,mxUtils.bind(this,function(da){if("data:"==c.substring(0,5))this.resizeImage(da,c,mxUtils.bind(this,function(ca,ka,aa){M.setSelectionCell(M.insertVertex(null,null,"",M.snap(g),M.snap(l),ka,aa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+this.convertDataUri(ca)+";"))}),G,this.maxImageSize);else{var ba=Math.min(1,Math.min(this.maxImageSize/da.width,this.maxImageSize/da.height)),na=Math.round(da.width*ba);da=Math.round(da.height*ba);M.setSelectionCell(M.insertVertex(null,null,"",M.snap(g),M.snap(l),na,da,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var da=null;M.getModel().beginUpdate();try{da=M.insertVertex(M.getDefaultParent(),
+null,c,M.snap(g),M.snap(l),1,1,"text;"+(n?"html=1;":"")),M.updateCellSize(da),M.fireEvent(new mxEventObject("textInserted","cells",[da]))}finally{M.getModel().endUpdate()}M.setSelectionCell(da)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,g,l,F,null,L);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(da){this.editor.graph.setSelectionCells(this.importXml(da,g,l,F,null,L))}),mxUtils.bind(this,function(da){this.handleError(da)}));
+else{M=this.editor.graph;x=null;M.getModel().beginUpdate();try{x=M.insertVertex(M.getDefaultParent(),null,"",M.snap(g),M.snap(l),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));M.fireEvent(new mxEventObject("textInserted","cells",[x]));n&&(c=M.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");x.value=c;M.updateCellSize(x);if(0<this.maxTextWidth&&x.geometry.width>this.maxTextWidth){var ja=M.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=ja.width;x.geometry.height=
+ja.height}Graph.isLink(x.value)&&M.setLinkForCell(x,x.value);x.geometry.width+=M.gridSize;x.geometry.height+=M.gridSize}finally{M.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=function(c){var g=-1;do c/=1024,g++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var g=c.indexOf(";");0<g&&(c=c.substring(0,g)+c.substring(c.indexOf(",",g+1)))}return c};
+EditorUi.prototype.isRemoteFileFormat=function(c,g){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,g){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=
+l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(G,L){StorageFile.listFiles(this,"F",G,L)});window.openBrowserFile=mxUtils.bind(this,function(G,L,M){StorageFile.getFileContent(this,G,L,M)});window.deleteBrowserFile=mxUtils.bind(this,function(G,
+L,M){StorageFile.deleteFile(this,G,L,M)});if(!g){var n=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(G){this.hideDialog(G)}));window.openFile.setConsumer(mxUtils.bind(this,function(G,L){null!=L&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(L)?(G=new Blob([G],{type:"application/octet-stream"}),this.importVisio(G,mxUtils.bind(this,function(M){this.importXml(M,0,0,!0)}),null,L)):this.editor.graph.setSelectionCells(this.importXml(G,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 x=this.dialog,F=x.close;this.dialog.close=mxUtils.bind(this,function(G){Editor.useLocalStorage=n;F.apply(x,arguments);G&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,g,l){var n=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?
+JSZip.loadAsync(c).then(function(F){if(mxUtils.isEmptyObject(F.files))l();else{var G=0,L,M=!1;F.forEach(function(K,Z){K=Z.name.toLowerCase();"diagram/diagram.xml"==K?(M=!0,Z.async("string").then(function(ja){0==ja.indexOf("<mxfile ")?g(ja):l()})):0==K.indexOf("versions/")&&(K=parseInt(K.substr(9)),K>G&&(G=K,L=Z))});0<G?L.async("string").then(function(K){(new XMLHttpRequest).upload&&n.isRemoteFileFormat(K,c.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,
+l):n.parseFileData(K,mxUtils.bind(this,function(Z){4==Z.readyState&&(200<=Z.status&&299>=Z.status?g(Z.responseText):l())}),c.name):l()}):M||l()}},function(F){l(F)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,l))};EditorUi.prototype.importFile=function(c,g,l,n,x,F,G,L,M,K,Z,ja){K=null!=K?K:!0;var da=!1,ba=null,na=mxUtils.bind(this,function(ca){var ka=null;null!=
+ca&&"<mxlibrary"==ca.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ca,G)),this.showSidebar()):ka=this.importXml(ca,l,n,K,null,null!=ja?mxEvent.isControlDown(ja):null);null!=L&&L(ka)});"image"==g.substring(0,5)?(M=!1,"image/png"==g.substring(0,9)&&(Z=Z?null:this.extractGraphModelFromPng(c),null!=Z&&0<Z.length&&(ba=this.importXml(Z,l,n,K,null,null!=ja?mxEvent.isControlDown(ja):null),M=!0)),M||(M=this.editor.graph,Z=c.indexOf(";"),0<Z&&(c=c.substring(0,Z)+c.substring(c.indexOf(",",Z+1))),K&&
+M.isGridEnabled()&&(l=M.snap(l),n=M.snap(n)),Z="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(Z+="editableCssRules=.*;"),ba=[M.insertVertex(null,null,"",l,n,x,F,Z+"image="+c+";")])):/(\.*<graphml )/.test(c)?(da=!0,this.importGraphML(c,na)):null!=M&&null!=G&&EditorUi.isVisioFilename(G)?(da=!0,this.importVisio(M,na)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,G)?this.isOffline()?this.showError(mxResources.get("error"),
+mxResources.get("notInOffline")):(da=!0,g=mxUtils.bind(this,function(ca){4==ca.readyState&&(200<=ca.status&&299>=ca.status?na(ca.responseText):null!=L&&(L(null),this.showError(mxResources.get("error"),413==ca.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,g,G):this.parseFile(M,g,G)):0==c.indexOf("PK")&&null!=M?(da=!0,this.importZipFile(M,na,mxUtils.bind(this,function(){ba=this.insertTextAt(this.validateFileData(c),l,n,!0,null,K);L(ba)}))):
+/(\.v(sd|dx))($|\?)/i.test(G)||/(\.vs(s|x))($|\?)/i.test(G)||(ba=this.insertTextAt(this.validateFileData(c),l,n,!0,null,K,null,null!=ja?mxEvent.isControlDown(ja):null));da||null==L||L(ba);return ba};EditorUi.prototype.importFiles=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da){n=null!=n?n:this.maxImageSize;K=null!=K?K:this.maxImageBytes;var ba=null!=g&&null!=l,na=!0;g=null!=g?g:0;l=null!=l?l:0;var ca=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var ka=Z||this.resampleThreshold,aa=0;aa<c.length;aa++)if("image/svg"!==
+c[aa].type.substring(0,9)&&"image/"===c[aa].type.substring(0,6)&&c[aa].size>ka){ca=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[g],"y",[l],"maxSize",[n],"maxBytes",[K],"resampleThreshold",[this.resampleThreshold],"largeImages",[ca],"crop",[ba],"resizeImages",[na],"ignoreEmbeddedXml",[ja],"evt",[da]);var V=mxUtils.bind(this,function(){var k=this.editor.graph,v=k.gridSize;x=null!=x?x:mxUtils.bind(this,function(Y,fa,oa,la,qa,ya,wa,Ia,Aa){try{if(null!=Y&&"<mxlibrary"==Y.substring(0,
+10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,Y,wa)),this.showSidebar(),null;this.isCompatibleString(Y)&&1==c.length&&null!=da&&"drop"==da.type&&this.isBlankFile()&&!this.canUndo()&&(ba=!1,la=oa=0);return this.importFile(Y,fa,oa,la,qa,ya,wa,Ia,Aa,ba,ja,da)}catch(Ba){return this.handleError(Ba),null}});F=null!=F?F:mxUtils.bind(this,function(Y){k.setSelectionCells(Y)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=c.length,N=J,T=[],W=mxUtils.bind(this,
+function(Y,fa){T[Y]=fa;if(0==--N){this.spinner.stop();if(null!=L)L(T);else{var oa=[];k.getModel().beginUpdate();try{for(Y=0;Y<T.length;Y++){var la=T[Y]();null!=la&&(oa=oa.concat(la))}}finally{k.getModel().endUpdate()}}F(oa)}}),U=0;U<J;U++)mxUtils.bind(this,function(Y){var fa=c[Y];if(null!=fa){var oa=new FileReader;oa.onload=mxUtils.bind(this,function(la){if(null==G||G(fa))try{if("image/"==fa.type.substring(0,6))if("image/svg"==fa.type.substring(0,9)){var qa=Graph.clipSvgDataUri(la.target.result),
+ya=qa.indexOf(","),wa=decodeURIComponent(escape(atob(qa.substring(ya+1)))),Ia=mxUtils.parseXml(wa),Aa=Ia.getElementsByTagName("svg");if(0<Aa.length){var Ba=Aa[0],Ga=ja?null:Ba.getAttribute("content");null!=Ga&&"<"!=Ga.charAt(0)&&"%"!=Ga.charAt(0)&&(Ga=unescape(window.atob?atob(Ga):Base64.decode(Ga,!0)));null!=Ga&&"%"==Ga.charAt(0)&&(Ga=decodeURIComponent(Ga));null==Ga||"<mxfile "!==Ga.substring(0,8)&&"<mxGraphModel>"!==Ga.substring(0,14)&&"<mxGraphModel "!==Ga.substring(0,14)?W(Y,mxUtils.bind(this,
+function(){try{if(null!=Ia){var Ca=Ia.getElementsByTagName("svg");if(0<Ca.length){var Da=Ca[0],va=Da.getAttribute("width"),Na=Da.getAttribute("height");va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Sa=Da.getAttribute("viewBox");if(null==Sa||0==Sa.length)Da.setAttribute("viewBox","0 0 "+va+" "+Na);else if(isNaN(va)||isNaN(Na)){var Ua=Sa.split(" ");3<Ua.length&&(va=parseFloat(Ua[2]),Na=parseFloat(Ua[3]))}qa=Editor.createSvgDataUri(mxUtils.getXml(Da));
+var Qa=Math.min(1,Math.min(n/Math.max(1,va)),n/Math.max(1,Na)),za=x(qa,fa.type,g+Y*v,l+Y*v,Math.max(1,Math.round(va*Qa)),Math.max(1,Math.round(Na*Qa)),fa.name);if(null!=za&&(isNaN(va)||isNaN(Na))){var Ea=new Image;Ea.onload=mxUtils.bind(this,function(){va=Math.max(1,Ea.width);Na=Math.max(1,Ea.height);za[0].geometry.width=va;za[0].geometry.height=Na;Da.setAttribute("viewBox","0 0 "+va+" "+Na);qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var C=qa.indexOf(";");0<C&&(qa=qa.substring(0,C)+qa.substring(qa.indexOf(",",
+C+1)));k.setCellStyles("image",qa,[za[0]])});Ea.src=Editor.createSvgDataUri(mxUtils.getXml(Da))}return za}}}catch(C){}return null})):W(Y,mxUtils.bind(this,function(){return x(Ga,"text/xml",g+Y*v,l+Y*v,0,0,fa.name)}))}else W(Y,mxUtils.bind(this,function(){return null}))}else{ya=!1;if("image/png"==fa.type){var Ma=ja?null:this.extractGraphModelFromPng(la.target.result);if(null!=Ma&&0<Ma.length){var sa=new Image;sa.src=la.target.result;W(Y,mxUtils.bind(this,function(){return x(Ma,"text/xml",g+Y*v,l+Y*
+v,sa.width,sa.height,fa.name)}));ya=!0}}ya||(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(la.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,la.target.result,mxUtils.bind(this,function(Da,va,Na){W(Y,mxUtils.bind(this,function(){if(null!=
+Da&&Da.length<K){var Sa=na&&this.isResampleImageSize(fa.size,Z)?Math.min(1,Math.min(n/va,n/Na)):1;return x(Da,fa.type,g+Y*v,l+Y*v,Math.round(va*Sa),Math.round(Na*Sa),fa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),na,n,Z,fa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else qa=la.target.result,x(qa,fa.type,g+Y*v,l+Y*v,240,160,fa.name,function(Ca){W(Y,function(){return Ca})},fa)}catch(Ca){W(Y,mxUtils.bind(this,
+function(){return null})),null!=window.console&&console.error(Ca,fa)}else W(Y,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(fa.name)?x(null,fa.type,g+Y*v,l+Y*v,240,160,fa.name,function(la){W(Y,function(){return la})},fa):"image"==fa.type.substring(0,5)||"application/pdf"==fa.type?oa.readAsDataURL(fa):oa.readAsText(fa)}})(U)});if(ca){ca=[];for(aa=0;aa<c.length;aa++)ca.push(c[aa]);c=ca;this.confirmImageResize(function(k){na=k;V()},M)}else V()};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(c,g){g=null!=g?g:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,x=function(F,G){if(F||g)mxSettings.setResizeImages(F?G:null),mxSettings.save();l();c(G)};null==n||g?this.showDialog((new ConfirmDialog(this,
+mxResources.get("resizeLargeImages"),function(F){x(F,!0)},function(F){x(F,!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?226:200,!0,!0):x(!1,n)};EditorUi.prototype.parseFile=function(c,g,l){l=null!=l?l:c.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,
+g,l)});n.readAsText(c)};EditorUi.prototype.parseFileData=function(c,g,l){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(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=function(c,g){g=null!=g?g:this.resampleThreshold;return c>
+g};EditorUi.prototype.resizeImage=function(c,g,l,n,x,F,G){x=null!=x?x:this.maxImageSize;var L=Math.max(1,c.width),M=Math.max(1,c.height),K=g;if(n&&this.isResampleImageSize(null!=G?G:g.length,F))try{var Z=Math.max(L/x,M/x);if(1<Z){var ja=Math.round(L/Z),da=Math.round(M/Z),ba=document.createElement("canvas");ba.width=ja;ba.height=da;ba.getContext("2d").drawImage(c,0,0,ja,da);var na=ba.toDataURL();if(na.length<g.length){var ca=document.createElement("canvas");ca.width=ja;ca.height=da;var ka=ca.toDataURL();
+na!==ka&&(g=na,L=ja,M=da)}}}catch(aa){}n&&K!=g&&x>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(c,g,l,n,x/1.5,F,G):l(g,L,M)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,g,l){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!=l&&(n.onerror=l);n.src=c}catch(x){if(null!=l)l(x);else throw x;}};EditorUi.prototype.getDefaultSketchMode=
+function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var y=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());y.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?
+mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,g=this.editor.graph,l=g.isEnabled;g.isEnabled=function(){return l.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(v){var J=v.getEvent();return null==v.getState()&&!mxEvent.isMouseEvent(J)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(J)&&
+(null==v.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))});g.cellEditor.editPlantUmlData=function(v,J,N){var T=JSON.parse(N);J=new SimpleTextareaDialog(c,T.data,function(W){null!=W&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(W,T.format,function(U,Y,fa){c.spinner.stop();g.getModel().beginUpdate();try{if("txt"==T.format)g.labelChanged(v,"<pre>"+U+"</pre>"),g.updateCellSize(v,!0);else{g.setCellStyles("image",c.convertDataUri(U),[v]);var oa=g.model.getGeometry(v);
+null!=oa&&(oa=oa.clone(),oa.width=Y,oa.height=fa,g.cellsResized([v],[oa],!1))}g.setAttributeForCell(v,"plantUmlData",JSON.stringify({data:W,format:T.format}))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(J.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));J.init()};g.cellEditor.editMermaidData=function(v,J,N){var T=JSON.parse(N);J=new SimpleTextareaDialog(c,T.data,function(W){null!=W&&c.spinner.spin(document.body,mxResources.get("inserting"))&&
+c.generateMermaidImage(W,T.config,function(U,Y,fa){c.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[v]);var oa=g.model.getGeometry(v);null!=oa&&(oa=oa.clone(),oa.width=Math.max(oa.width,Y),oa.height=Math.max(oa.height,fa),g.cellsResized([v],[oa],!1));g.setAttributeForCell(v,"mermaidData",JSON.stringify({data:W,config:T.config},null,2))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(J.container,640,420,!0,!0,null,null,null,new mxRectangle(0,
+0,320,280));J.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=function(v,J){try{var N=this.graph.getAttributeForCell(v,"plantUmlData");if(null!=N)this.editPlantUmlData(v,J,N);else if(N=this.graph.getAttributeForCell(v,"mermaidData"),null!=N&&window.isMermaidEnabled)this.editMermaidData(v,J,N);else{var T=g.getCellStyle(v);"1"==mxUtils.getValue(T,"metaEdit","0")?c.showDataDialog(v):n.apply(this,arguments)}}catch(W){c.handleError(W)}};g.getLinkTitle=function(v){return c.getLinkTitle(v)};
+g.customLinkClicked=function(v,J){var N=!1;try{var T=this.getGraphBounds();c.handleCustomLink(v,J);N=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(J))}catch(W){c.handleError(W)}return N};var x=g.parseBackgroundImage;g.parseBackgroundImage=function(v){var J=x.apply(this,arguments);null!=J&&null!=J.src&&Graph.isPageLink(J.src)&&(J={originalSrc:J.src});return J};var F=g.setBackgroundImage;g.setBackgroundImage=function(v){null!=v&&null!=v.originalSrc&&
+(v=c.createImageForPageLink(v.originalSrc,c.currentPage,this));F.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(v,J){v=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=v){var N=v.indexOf(",");if(0<N)for(v=v.substring(N+1),J=J.getProperty("patches"),
+N=0;N<J.length;N++)if(null!=J[N][EditorUi.DIFF_UPDATE]&&null!=J[N][EditorUi.DIFF_UPDATE][v]||null!=J[N][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(J[N][EditorUi.DIFF_REMOVE],v)){g.refreshBackgroundImage();break}}}));var G=g.getBackgroundImageObject;g.getBackgroundImageObject=function(v,J,N){var T=G.apply(this,arguments);null!=T&&null!=T.originalSrc&&(T=J?c.createImageForPageLink(T.originalSrc,N,null,!0):{src:T.originalSrc});return T};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
+"https://www.drawio.com/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 L=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(v){v=null!=v?v:"";"1"==urlParams.dev&&(v+=(0<v.length?"&":"?")+"dev=1");return L.apply(this,arguments)};var M=g.addClickHandler;g.addClickHandler=function(v,J,N){var T=J;J=function(W,U,Y){if(null==U){var fa=
+mxEvent.getSource(W);"a"==fa.nodeName.toLowerCase()&&(U=fa.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(W)||!mxEvent.isPopupTrigger(W))&&g.customLinkClicked(U,Y)&&mxEvent.consume(W);null!=T&&T(W,U,Y)};M.call(this,v,J,N)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var K=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(v,J,N){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&
+this.addMenuItems(v,["zoomIn","zoomOut","-"],null,N);K.apply(this,arguments);g.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(v,["-","addToScratchpad"],null,N);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(v,["-","exitGroup","home"],null,N)};var Z=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(v,J,N){if(c.editor.graph.isSelectionEmpty())Z.apply(this,arguments),c.menus.addMenuItems(v,["copyAsImage","copyAsSvg"],null,N);else if(this.isShowCellEditItems()?
+this.addPopupDeleteItem(v,J,N):this.addPopupMenuArrangeItems(v,J,N),this.addMenuItems(v,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,N),this.isShowCellEditItems()||this.addPopupDeleteItem(v,J,N),this.addMenuItems(v,["lockUnlock","-"],null,N),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(J)&&g.isCellEditable(J)&&(this.addSubmenu("editCell",v,null,mxResources.get("edit")),v.addSeparator(),g.getModel().isEdge(J))){this.addSubmenu("line",v);var T=g.getModel().getGeometry(J);
+null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(v,["clearWaypoints"],null,N)}1==g.getSelectionCount()&&this.addMenuItems(v,["enterGroup"],null,N);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(v,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(v,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=
+Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var ja=g.getExportVariables;g.getExportVariables=function(){var v=ja.apply(this,arguments),J=c.getCurrentFile();null!=J&&(v.filename=J.getTitle());v.pagecount=null!=c.pages?c.pages.length:1;v.page=
+null!=c.currentPage?c.currentPage.getName():"";v.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return v};var da=g.getGlobalVariable;g.getGlobalVariable=function(v){var J=c.getCurrentFile();return"filename"==v&&null!=J?J.getTitle():"page"==v&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==v?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==v?null!=c.pages?c.pages.length:1:da.apply(this,arguments)};var ba=
+null,na=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var v=this.getCurrentFile(),J=null!=v&&null!=v.getTitle()?v.getTitle():this.defaultFilename;ba!=J&&v==na&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());ba=J;na=v}));var ca=g.labelLinkClicked;g.labelLinkClicked=function(v,J,N){var T=J.getAttribute("href");if(null==T||!g.isCustomLink(T)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))ca.apply(this,arguments);else{if(!g.isEnabled()||
+null!=v&&g.isCellLocked(v.cell))g.customLinkClicked(T),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var v=c.defaultFilename,J=c.getCurrentFile();null!=J&&(v=null!=J.getTitle()?J.getTitle():v);return v};var ka=this.actions.get("print");ka.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ka.visible=ka.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",
!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(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,
-!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),g.addListener(mxEvent.ESCAPE,function(v,I){null!=I&&g.isEnabled()&&!g.isEditing()&&null!=I.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,
-24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(v){var I=g.cellEditor.text2,N=null;null!=I&&(mxEvent.addListener(I,"dragleave",function(T){null!=N&&(N.parentNode.removeChild(N),N=null);T.stopPropagation();T.preventDefault()}),mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(T){null==N&&(N=this.highlightElement(I));T.stopPropagation();T.preventDefault()})),mxEvent.addListener(I,"drop",mxUtils.bind(this,function(T){null!=N&&(N.parentNode.removeChild(N),
-N=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,Y,fa,na,la,qa){g.insertImage(U,la,qa)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var Y=0;Y<U.length;Y++)U[Y]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var W=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(U){var Y=
+!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),g.addListener(mxEvent.ESCAPE,function(v,J){null!=J&&g.isEnabled()&&!g.isEditing()&&null!=J.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,
+24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(v){var J=g.cellEditor.text2,N=null;null!=J&&(mxEvent.addListener(J,"dragleave",function(T){null!=N&&(N.parentNode.removeChild(N),N=null);T.stopPropagation();T.preventDefault()}),mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(T){null==N&&(N=this.highlightElement(J));T.stopPropagation();T.preventDefault()})),mxEvent.addListener(J,"drop",mxUtils.bind(this,function(T){null!=N&&(N.parentNode.removeChild(N),
+N=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,Y,fa,oa,la,qa){g.insertImage(U,la,qa)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var Y=0;Y<U.length;Y++)U[Y]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var W=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(U){var Y=
Math.max(1,U.width);U=Math.max(1,U.height);var fa=this.maxImageSize;fa=Math.min(1,Math.min(fa/Math.max(1,Y)),fa/Math.max(1,U));g.insertImage(decodeURIComponent(W),Y*fa,U*fa)})):document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(T.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(T.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"));
-T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){ka=this.editor.graph.view;var ba=mxSettings.getUnit();ka.setUnit(ba);Editor.pageSizeUnit=ba==mxConstants.METERS?mxConstants.MILLIMETERS:ba;ka.addListener("unitChanged",function(v,I){v=I.getProperty("unit");mxSettings.setUnit(v);mxSettings.save();Editor.pageSizeUnit=v==mxConstants.METERS?mxConstants.MILLIMETERS:v});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||
+T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){ka=this.editor.graph.view;var aa=mxSettings.getUnit();ka.setUnit(aa);Editor.pageSizeUnit=aa==mxConstants.METERS?mxConstants.MILLIMETERS:aa;ka.addListener("unitChanged",function(v,J){v=J.getProperty("unit");mxSettings.setUnit(v);mxSettings.save();Editor.pageSizeUnit=v==mxConstants.METERS?mxConstants.MILLIMETERS:v});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||
this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ka.unit);this.refresh()}if("1"==urlParams.styledev){ka=document.getElementById("geFooter");null!=ka&&(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)})),ka.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,I){0<this.editor.graph.getSelectionCount()?(v=this.editor.graph.getSelectionCell(),v=this.editor.graph.getModel().getStyle(v),this.styleInput.value=v||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));
+"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),ka.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,J){0<this.editor.graph.getSelectionCount()?(v=this.editor.graph.getSelectionCell(),v=this.editor.graph.getModel().getStyle(v),this.styleInput.value=v||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));
var V=this.isSelectionAllowed;this.isSelectionAllowed=function(v){return mxEvent.getSource(v)==this.styleInput?!0:V.apply(this,arguments)}}ka=document.getElementById("geInfo");null!=ka&&ka.parentNode.removeChild(ka);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var k=null;mxEvent.addListener(g.container,"dragleave",function(v){g.isEnabled()&&(null!=k&&(k.parentNode.removeChild(k),k=null),v.stopPropagation(),v.preventDefault())});mxEvent.addListener(g.container,"dragover",
-mxUtils.bind(this,function(v){null==k&&(k=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();v.stopPropagation();v.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(v){null!=k&&(k.parentNode.removeChild(k),k=null);if(g.isEnabled()){var I=mxUtils.convertPoint(g.container,mxEvent.getClientX(v),mxEvent.getClientY(v)),N=v.dataTransfer.files,T=g.view.translate,W=g.view.scale,U=I.x/W-T.x,Y=I.y/W-T.y;if(0<N.length)"1"!=urlParams.embed&&
-mxEvent.isShiftDown(v)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(v)&&(Y=U=null),this.importFiles(N,U,Y,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(v),null,null,mxEvent.isShiftDown(v),v));else{mxEvent.isAltDown(v)&&(Y=U=0);var fa=0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):null;I=this.extractGraphModelFromEvent(v,null!=this.pages);if(null!=I)g.setSelectionCells(this.importXml(I,
-U,Y,!0));else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/html")){var na=v.dataTransfer.getData("text/html");I=document.createElement("div");I.innerHTML=Graph.sanitizeHtml(na);var la=null;N=I.getElementsByTagName("img");null!=N&&1==N.length?(na=N[0].getAttribute("src"),null==na&&(na=N[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(na)||(la=!0)):(N=I.getElementsByTagName("a"),null!=N&&1==N.length?na=N[0].getAttribute("href"):(I=I.getElementsByTagName("pre"),null!=I&&1==I.length&&
-(na=mxUtils.getTextContent(I[0]))));var qa=!0,ya=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(na,U,Y,!0,la,null,qa,mxEvent.isControlDown(v)))});la&&null!=na&&na.length>this.resampleThreshold?this.confirmImageResize(function(wa){qa=wa;ya()},mxEvent.isControlDown(v)):ya()}else null!=fa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(fa)?this.loadImage(decodeURIComponent(fa),mxUtils.bind(this,function(wa){var Ia=Math.max(1,wa.width);wa=Math.max(1,wa.height);var Aa=this.maxImageSize;Aa=
+mxUtils.bind(this,function(v){null==k&&(k=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();v.stopPropagation();v.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(v){null!=k&&(k.parentNode.removeChild(k),k=null);if(g.isEnabled()){var J=mxUtils.convertPoint(g.container,mxEvent.getClientX(v),mxEvent.getClientY(v)),N=v.dataTransfer.files,T=g.view.translate,W=g.view.scale,U=J.x/W-T.x,Y=J.y/W-T.y;if(0<N.length)"1"!=urlParams.embed&&
+mxEvent.isShiftDown(v)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(v)&&(Y=U=null),this.importFiles(N,U,Y,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(v),null,null,mxEvent.isShiftDown(v),v));else{mxEvent.isAltDown(v)&&(Y=U=0);var fa=0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):null;J=this.extractGraphModelFromEvent(v,null!=this.pages);if(null!=J)g.setSelectionCells(this.importXml(J,
+U,Y,!0));else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/html")){var oa=v.dataTransfer.getData("text/html");J=document.createElement("div");J.innerHTML=Graph.sanitizeHtml(oa);var la=null;N=J.getElementsByTagName("img");null!=N&&1==N.length?(oa=N[0].getAttribute("src"),null==oa&&(oa=N[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(oa)||(la=!0)):(N=J.getElementsByTagName("a"),null!=N&&1==N.length?oa=N[0].getAttribute("href"):(J=J.getElementsByTagName("pre"),null!=J&&1==J.length&&
+(oa=mxUtils.getTextContent(J[0]))));var qa=!0,ya=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(oa,U,Y,!0,la,null,qa,mxEvent.isControlDown(v)))});la&&null!=oa&&oa.length>this.resampleThreshold?this.confirmImageResize(function(wa){qa=wa;ya()},mxEvent.isControlDown(v)):ya()}else null!=fa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(fa)?this.loadImage(decodeURIComponent(fa),mxUtils.bind(this,function(wa){var Ia=Math.max(1,wa.width);wa=Math.max(1,wa.height);var Aa=this.maxImageSize;Aa=
Math.min(1,Math.min(Aa/Math.max(1,Ia)),Aa/Math.max(1,wa));g.setSelectionCell(g.insertVertex(null,null,"",U,Y,Ia*Aa,wa*Aa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+fa+";"))}),mxUtils.bind(this,function(wa){g.setSelectionCells(this.insertTextAt(fa,U,Y,!0))})):0<=mxUtils.indexOf(v.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(v.dataTransfer.getData("text/plain"),U,Y,!0))}}v.stopPropagation();v.preventDefault()}),
!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});g.addListener("enabledChanged",mxUtils.bind(this,
-function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var v=parseInt(this.div.offsetLeft),I=parseInt(this.div.offsetWidth),N=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),W=parseInt(this.div.offsetHeight),U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(v,N-I))+"px";this.div.style.top=Math.max(c.embedViewport.y,
+function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var v=parseInt(this.div.offsetLeft),J=parseInt(this.div.offsetWidth),N=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),W=parseInt(this.div.offsetHeight),U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(v,N-J))+"px";this.div.style.top=Math.max(c.embedViewport.y,
Math.min(T,U-W))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ka=Editor.currentTheme,"simple"==ka||"sketch"==ka)this.doSetCurrentTheme(ka,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&
this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));ka=!1;if(null!=urlParams.dark)ka=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)ka="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||ka&&"auto"!=mxSettings.settings.darkMode||(ka=mxSettings.settings.darkMode);"auto"==ka&&this.isAutoDarkModeSupported()&&(ka=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof ka?"1"==ka:ka);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",
mxUtils.bind(this,function(v){this.isAutoDarkMode()&&this.setDarkMode(v.matches)}))}catch(v){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&
-this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(v,I){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var C=EditorUi.prototype.windowResized;
-EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&c<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&c>=g&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}C.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=
-function(){var c=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,m=this.sketchPickerMenuElt,n=this.editor.graph;m.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(K){mxEvent.getSource(K)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var x=document.createElement("div");x.style.position="absolute";x.style.width=
-"10px";x.style.height="10px";x.style.borderRadius="5px";x.style.border="1px solid gray";x.style.background="#ffffff";x.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(x);this.bottomResizer=x;var F=null,H=null,M=null,L=null;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(K){L=parseInt(this.diagramContainer.style.height);H=mxEvent.getClientY(K);n.popupMenuHandler.hideMenu();mxEvent.consume(K)}));x=x.cloneNode(!1);x.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(x);
-this.rightResizer=x;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(K){M=parseInt(this.diagramContainer.style.width);F=mxEvent.getClientX(K);n.popupMenuHandler.hideMenu();mxEvent.consume(K)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(K){var Z=!1;null!=F&&(this.diagramContainer.style.width=Math.max(20,M+mxEvent.getClientX(K)-F)+"px",Z=!0);null!=H&&(this.diagramContainer.style.height=Math.max(20,L+mxEvent.getClientY(K)-H)+"px",Z=!0);Z&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(K){null==F&&null==H||mxEvent.consume(K);H=F=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";g.style.visibility="hidden";c.style.visibility="hidden";m.style.display="none";
-this.addListener("editInlineStart",mxUtils.bind(this,function(K){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(K){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";g.style.visibility="hidden";c.style.visibility="hidden";m.style.display="none"}));this.windowResized=mxUtils.bind(this,
-function(){});this.inlineSizeChanged()};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){m.innerHTML="&nbsp;";m.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,m=document.createElement("div");m.setAttribute("autocomplete","off");m.setAttribute("autocorrect","off");m.setAttribute("autocapitalize","off");m.setAttribute("spellcheck","false");m.style.textRendering="optimizeSpeed";m.style.fontFamily="monospace";m.style.wordBreak=
-"break-all";m.style.background="transparent";m.style.color="transparent";m.style.position="absolute";m.style.whiteSpace="nowrap";m.style.overflow="hidden";m.style.display="block";m.style.fontSize="1";m.style.zIndex="-1";m.style.resize="none";m.style.outline="none";m.style.width="1px";m.style.height="1px";mxUtils.setOpacity(m,0);m.contentEditable=!0;m.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(F){var H=mxEvent.getSource(F);null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||"true"==H.contentEditable||224!=F.keyCode&&(mxClient.IS_MAC||17!=F.keyCode)&&(!mxClient.IS_MAC||91!=F.keyCode&&93!=F.keyCode)||n||(m.style.left=g.container.scrollLeft+10+"px",m.style.top=g.container.scrollTop+10+"px",F=g.container.scrollLeft,H=g.container.scrollTop,g.container.appendChild(m),
-n=!0,m.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=F,g.container.scrollTop=H)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(F){var H=F.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=H&&17!=H&&91!=H&&93!=H||(n=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),m.parentNode.removeChild(m),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(m,"copy",mxUtils.bind(this,function(F){if(g.isEnabled())try{mxClipboard.copy(g),
-this.copyCells(m),c()}catch(H){this.handleError(H)}}));mxEvent.addListener(m,"cut",mxUtils.bind(this,function(F){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(m,!0),c()}catch(H){this.handleError(H)}}));mxEvent.addListener(m,"paste",mxUtils.bind(this,function(F){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{if(m.innerHTML="&nbsp;",m.focus(),null!=F.clipboardData&&(Graph.removePasteFormatting(m.firstChild),this.pasteCells(F,m,!0,!0)),!mxEvent.isConsumed(F)){var H=g.container.scrollLeft,
-M=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{g.container.scrollLeft=H,g.container.scrollTop=M,Graph.removePasteFormatting(m.firstChild),this.pasteCells(F,m,!1,!0)}catch(L){this.handleError(L)}}),0)}}catch(L){this.handleError(L)}}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=function(F){return mxEvent.getSource(F)==m?!0:x.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,g){mxSettings.setUi(c);(g=this.doSetCurrentTheme(c)||g)||this.alert(mxResources.get("restartForChangeRequired"))};
-EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,g){if(null==c||""==c)c=App.isSimpleThemePreferred()?"simple":"kennedy";var m="simple"==Editor.currentTheme&&this.isDefaultTheme(c)||this.isDefaultTheme(Editor.currentTheme)&&"simple"==c||c==Editor.currentTheme;if(m||g)g=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=c,this.switchTheme(c),this.fireEvent(new mxEventObject("currentThemeChanged")),
-this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(g);return m};EditorUi.prototype.saveScrollState=function(c){var g=this.editor.graph.view.translate,m=this.diagramContainer.scrollLeft,n=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(m-=this.embedViewport.x,n-=this.embedViewport.y):(m+=this.embedViewport.x,n+=this.embedViewport.y));g={x:m,y:n,tx:g.x,ty:g.y};c&&(g.boundingRect=this.diagramContainer.getBoundingClientRect());return g};
-EditorUi.prototype.restoreScrollState=function(c){var g=this.editor.graph.view.scale,m=this.editor.graph.view.translate;if(null!=c.boundingRect){var n=this.diagramContainer.getBoundingClientRect();c.x-=c.boundingRect.x-n.x;c.y-=c.boundingRect.y-n.y}this.diagramContainer.scrollLeft=c.x+(m.x-c.tx)*g;this.diagramContainer.scrollTop=c.y+(m.y-c.ty)*g};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var g=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,
-function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||g||(this.statusContainer.style.display="none")}));var m=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var n=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;g=null!=n&&null!=n.getAttribute("class");
+this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(v,J){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var B=EditorUi.prototype.windowResized;
+EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&c<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&c>=g&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=
+function(){var c=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,n=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(K){mxEvent.getSource(K)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var x=document.createElement("div");x.style.position="absolute";x.style.width=
+"10px";x.style.height="10px";x.style.borderRadius="5px";x.style.border="1px solid gray";x.style.background="#ffffff";x.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(x);this.bottomResizer=x;var F=null,G=null,L=null,M=null;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(K){M=parseInt(this.diagramContainer.style.height);G=mxEvent.getClientY(K);n.popupMenuHandler.hideMenu();mxEvent.consume(K)}));x=x.cloneNode(!1);x.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(x);
+this.rightResizer=x;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(K){L=parseInt(this.diagramContainer.style.width);F=mxEvent.getClientX(K);n.popupMenuHandler.hideMenu();mxEvent.consume(K)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(K){var Z=!1;null!=F&&(this.diagramContainer.style.width=Math.max(20,L+mxEvent.getClientX(K)-F)+"px",Z=!0);null!=G&&(this.diagramContainer.style.height=Math.max(20,M+mxEvent.getClientY(K)-G)+"px",Z=!0);Z&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
+fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(K){null==F&&null==G||mxEvent.consume(K);G=F=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";g.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";
+this.addListener("editInlineStart",mxUtils.bind(this,function(K){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(K){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";g.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,
+function(){});this.inlineSizeChanged()};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak=
+"break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.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(F){var G=mxEvent.getSource(F);null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==G.nodeName||"TEXTAREA"==G.nodeName||"true"==G.contentEditable||224!=F.keyCode&&(mxClient.IS_MAC||17!=F.keyCode)&&(!mxClient.IS_MAC||91!=F.keyCode&&93!=F.keyCode)||n||(l.style.left=g.container.scrollLeft+10+"px",l.style.top=g.container.scrollTop+10+"px",F=g.container.scrollLeft,G=g.container.scrollTop,g.container.appendChild(l),
+n=!0,l.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=F,g.container.scrollTop=G)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(F){var G=F.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=G&&17!=G&&91!=G&&93!=G||(n=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(F){if(g.isEnabled())try{mxClipboard.copy(g),
+this.copyCells(l),c()}catch(G){this.handleError(G)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(F){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(l,!0),c()}catch(G){this.handleError(G)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(F){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{if(l.innerHTML="&nbsp;",l.focus(),null!=F.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(F,l,!0,!0)),!mxEvent.isConsumed(F)){var G=g.container.scrollLeft,
+L=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{g.container.scrollLeft=G,g.container.scrollTop=L,Graph.removePasteFormatting(l.firstChild),this.pasteCells(F,l,!1,!0)}catch(M){this.handleError(M)}}),0)}}catch(M){this.handleError(M)}}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=function(F){return mxEvent.getSource(F)==l?!0:x.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,g){mxSettings.setUi(c);(g=this.doSetCurrentTheme(c)||g)||this.alert(mxResources.get("restartForChangeRequired"))};
+EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,g){if(null==c||""==c)c=App.isSimpleThemePreferred()?"simple":"kennedy";var l="simple"==Editor.currentTheme&&this.isDefaultTheme(c)||this.isDefaultTheme(Editor.currentTheme)&&"simple"==c||c==Editor.currentTheme;if(l||g)g=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=c,this.switchTheme(c),this.fireEvent(new mxEventObject("currentThemeChanged")),
+this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(g);return l};EditorUi.prototype.saveScrollState=function(c){var g=this.editor.graph.view.translate,l=this.diagramContainer.scrollLeft,n=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(l-=this.embedViewport.x,n-=this.embedViewport.y):(l+=this.embedViewport.x,n+=this.embedViewport.y));g={x:l,y:n,tx:g.x,ty:g.y};c&&(g.boundingRect=this.diagramContainer.getBoundingClientRect());return g};
+EditorUi.prototype.restoreScrollState=function(c){var g=this.editor.graph.view.scale,l=this.editor.graph.view.translate;if(null!=c.boundingRect){var n=this.diagramContainer.getBoundingClientRect();c.x-=c.boundingRect.x-n.x;c.y-=c.boundingRect.y-n.y}this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*g;this.diagramContainer.scrollTop=c.y+(l.y-c.ty)*g};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var g=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,
+function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||g||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var n=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;g=null!=n&&null!=n.getAttribute("class");
if(!g&&null!=n){n=n.getAttribute("title");var x=this.getCurrentFile();x=null!=x?x.savingStatusKey:DrawioFile.prototype.savingStatusKey;n==mxResources.get(x)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(x))+'..."src="'+Editor.tailSpin+'"></div>',g=!0)}this.statusContainer.style.display="none";n=32>=c.clientWidth;c.style.visibility=n&&""==this.editor.getStatus()?"hidden":"";if(n||g)this.statusContainer.style.display="",g=!0}else"simple"==Editor.currentTheme?
-(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",m);m()};EditorUi.prototype.switchTheme=function(c){this.destroyWindows(!0);this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);"sketch"==c&&(this.createFormatWindow(),
+(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.destroyWindows(!0);this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);"sketch"==c&&(this.createFormatWindow(),
this.createShapesWindow())};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),g=0;g<c.length;g++)null!=c[g]&&c[g].window.fit()};EditorUi.prototype.hideWindows=
-function(){for(var c=this.getWindows(),g=0;g<c.length;g++)null!=c[g]&&c[g].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(c){null==this.sidebarWindow||c||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||c||(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=
-this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=
-this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var g=this.editor.graph;g.defaultEdgeLength=Graph.prototype.defaultEdgeLength;g.defaultGridEnabled=Graph.prototype.defaultGridEnabled;g.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||
-null==Editor.config.defaultEdgeLength)g.defaultEdgeLength=120;null==urlParams.grid&&(g.defaultGridEnabled=!1);null==urlParams.pv&&(g.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=
-function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var g=this.getCurrentFile();null!=g&&(g.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==g.sync||g.sync.enabled&&g.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==g.sync||g.sync.isConnected()?g.isRealtimeEnabled()&&g.isRealtimeSupported()&&1<g.getRealtimeState()&&(c=g.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+
-": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity=
-"");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,g,m,n){m=null!=m?m:"geButton";var x=this.menus.get(c);n=this.menubar.addMenu(mxResources.get(c),x.funct,null,n);n.className=m;n.setAttribute("title",mxResources.get(c));this.menus.menuCreated(x,n,m);null!=g&&(n.style.backgroundImage="url("+
-g+")",n.innerText="");return n};EditorUi.prototype.addButton=function(c,g,m,n){c=this.createToolbarButton(c,g,m);n=null!=n?n:this.container;n.appendChild(c);return c};EditorUi.prototype.createToolbarButton=function(c,g,m){var n=document.createElement("a");n.className="geButton";null!=c&&"data:"==c.substring(0,5)&&(n.style.backgroundImage="url("+c+")");null!=g&&n.setAttribute("title",g);null!=m&&mxEvent.addListener(n,"click",function(x){"disabled"!=n.getAttribute("disabled")&&m(x);mxEvent.consume(x)});
-mxEvent.preventDefault(n);return n};EditorUi.prototype.createMenuItem=function(c,g,m){var n=this.actions.get(c),x=null!=n?n.funct:null,F=this.createToolbarButton(g,mxResources.get(c)+(null!=n&&null!=n.shortcut?" ("+n.shortcut+")":""),x);null==n||m||(c=function(){n.isEnabled()?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",c),n.addListener("stateChanged",c),c());return F};EditorUi.prototype.createFormatWindow=function(){if(null==
-this.formatWindow){var c=this,g=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),m="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),g,60,240,m,mxUtils.bind(this,function(F){F.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var n=this.formatWindow.window.toggleMinimized,
+function(){for(var c=this.getWindows(),g=0;g<c.length;g++)null!=c[g]&&c[g].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(c){null==this.sidebarWindow||c||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||c||(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.chatWindow&&(this.chatWindow.destroy(),this.chatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),
+this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=
+null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var g=this.editor.graph;g.defaultEdgeLength=Graph.prototype.defaultEdgeLength;g.defaultGridEnabled=Graph.prototype.defaultGridEnabled;g.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==
+Editor.config||null==Editor.config.defaultEdgeLength)g.defaultEdgeLength=120;null==urlParams.grid&&(g.defaultGridEnabled=!1);null==urlParams.pv&&(g.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.createFooterMenuForTheme=function(c){};
+EditorUi.prototype.createPickerMenuForTheme=function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var g=this.getCurrentFile();null!=g&&(g.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==g.sync||g.sync.enabled&&g.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==g.sync||g.sync.isConnected()?g.isRealtimeEnabled()&&g.isRealtimeSupported()&&1<g.getRealtimeState()&&(c=g.getRealtimeError(),
+c=mxResources.get("realtimeCollaboration")+": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent=
+"",this.statusContainer.style.opacity="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,g,l,n){l=null!=l?l:"geButton";var x=this.menus.get(c);n=this.menubar.addMenu(mxResources.get(c),x.funct,null,n);n.className=l;n.setAttribute("title",mxResources.get(c));this.menus.menuCreated(x,n,
+l);null!=g&&(n.style.backgroundImage="url("+g+")",n.innerText="");return n};EditorUi.prototype.addButton=function(c,g,l,n){c=this.createToolbarButton(c,g,l);n=null!=n?n:this.container;n.appendChild(c);return c};EditorUi.prototype.createToolbarButton=function(c,g,l){var n=document.createElement("a");n.className="geButton";null!=c&&"data:"==c.substring(0,5)&&(n.style.backgroundImage="url("+c+")");null!=g&&n.setAttribute("title",g);null!=l&&mxEvent.addListener(n,"click",function(x){"disabled"!=n.getAttribute("disabled")&&
+l(x);mxEvent.consume(x)});mxEvent.preventDefault(n);return n};EditorUi.prototype.createMenuItem=function(c,g,l){var n=this.actions.get(c),x=null!=n?n.funct:null,F=this.createToolbarButton(g,mxResources.get(c)+(null!=n&&null!=n.shortcut?" ("+n.shortcut+")":""),x);null==n||l||(c=function(){n.isEnabled()?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",c),n.addListener("stateChanged",c),c());return F};EditorUi.prototype.createFormatWindow=
+function(){if(null==this.formatWindow){var c=this,g=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),l="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),g,60,240,l,mxUtils.bind(this,function(F){F.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var n=this.formatWindow.window.toggleMinimized,
x=240;this.formatWindow.window.toggleMinimized=function(){n.apply(this,arguments);this.minimized?(x=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+x-140+"px"):(this.div.style.width=x+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-x+140)+"px");c.format.refresh();this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,
-function(F){mxEvent.getSource(F)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var F=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,H=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>F||690>
-H)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var J=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var g=this.formatWindow;null!=g?g.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):J.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));
-var m=this.hsplitPosition,n=mxUtils.bind(this,function(){this.hsplitPosition=x;this.refresh();this.diagramContainer.scrollLeft-=m-this.hsplitPosition}),x=c?g:0,F=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(0)":"translateX(-100%)");0!=x&&n();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,
+function(F){mxEvent.getSource(F)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var F=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,G=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>F||690>
+G)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var I=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var g=this.formatWindow;null!=g?g.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):I.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));
+var l=this.hsplitPosition,n=mxUtils.bind(this,function(){this.hsplitPosition=x;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),x=c?g:0,F=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(0)":"translateX(-100%)");0!=x&&n();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,
"transition","transform "+F+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==x&&n()}),1E3*F)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};
-var S=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():S.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var g=mxUtils.bind(this,function(H,M){var L=this.menus.get(H);H=this.createMenuElement(M,mxUtils.bind(this,function(){L.funct.apply(this,arguments)}));H.setAttribute("title",M);H.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";
-H.className="geButton";c.parentNode.appendChild(H);return H});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))g=document.createElement("div"),g.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",g.className="geButton",g.style.left="0px",g.style.right="50%",mxUtils.write(g,mxResources.get("newLibrary")),c.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("newLibrary").funct),
-g=g.cloneNode(!1),g.style.left="50%",g.style.right="0px",mxUtils.write(g,mxResources.get("openLibrary")),c.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct);else{var m=g("newLibrary","");m.style.left="0px";m.style.right="50%";var n=document.createElement("span");m.appendChild(n);var x=g("openLibraryFrom","");x.style.borderLeftWidth="1px";x.style.left="50%";x.style.right="0px";var F=document.createElement("span");x.appendChild(F);this.dependsOnLanguage(mxUtils.bind(this,
-function(){n.innerHTML="";mxUtils.write(n,mxResources.get("newLibrary"));m.setAttribute("title",mxResources.get("newLibrary"));F.innerHTML="";mxUtils.write(F,mxResources.get("openLibraryFrom"));x.setAttribute("title",mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,
-650),m="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),m&&"1"!=urlParams.embedInline?66:10,m&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,c-6,g-6,mxUtils.bind(this,function(n){this.createShapesPanel(n)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,
+var S=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():S.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var g=mxUtils.bind(this,function(G,L){var M=this.menus.get(G);G=this.createMenuElement(L,mxUtils.bind(this,function(){M.funct.apply(this,arguments)}));G.setAttribute("title",L);G.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";
+G.className="geButton";c.parentNode.appendChild(G);return G});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))g=document.createElement("div"),g.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",g.className="geButton",g.style.left="0px",g.style.right="50%",mxUtils.write(g,mxResources.get("newLibrary")),c.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("newLibrary").funct),
+g=g.cloneNode(!1),g.style.left="50%",g.style.right="0px",mxUtils.write(g,mxResources.get("openLibrary")),c.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct);else{var l=g("newLibrary","");l.style.left="0px";l.style.right="50%";var n=document.createElement("span");l.appendChild(n);var x=g("openLibraryFrom","");x.style.borderLeftWidth="1px";x.style.left="50%";x.style.right="0px";var F=document.createElement("span");x.appendChild(F);this.dependsOnLanguage(mxUtils.bind(this,
+function(){n.innerHTML="";mxUtils.write(n,mxResources.get("newLibrary"));l.setAttribute("title",mxResources.get("newLibrary"));F.innerHTML="";mxUtils.write(F,mxResources.get("openLibraryFrom"));x.setAttribute("title",mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,
+650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,c-6,g-6,mxUtils.bind(this,function(n){this.createShapesPanel(n)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,
0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};EditorUi.prototype.setAndPersistDarkMode=function(c){var g=c;"auto"==c&&(g=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(g);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==
urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(c){this.spinner.spin(document.body,mxResources.get("working"))&&(mxSettings.setLanguage(c),mxSettings.save(),mxClient.language=c,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(c,g){this.dependsOnLanguage(mxUtils.bind(this,
function(){c.setAttribute("title",mxResources.get(g))}))};EditorUi.prototype.dependsOnLanguage=function(c){c();this.addListener("languageChanged",c)};EditorUi.prototype.setAndPersistHighContrast=function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&
-window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var g=document.getElementById("high-contrast-stylesheet");if(null!=g&&window.matchMedia){var m=window.matchMedia("(forced-colors: active)").matches,n=g.getAttribute("media");(n="all"==n||"not all"!=n&&m)&&!c?g.setAttribute("media",m?"not all":"(forced-colors: active)"):!n&&c&&g.setAttribute("media",m?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};
+window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var g=document.getElementById("high-contrast-stylesheet");if(null!=g&&window.matchMedia){var l=window.matchMedia("(forced-colors: active)").matches,n=g.getAttribute("media");(n="all"==n||"not all"!=n&&l)&&!c?g.setAttribute("media",l?"not all":"(forced-colors: active)"):!n&&c&&g.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};
EditorUi.prototype.setRulerVisible=function(c){var g=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.fireEvent(new mxEventObject("rulerVisibleChanged"));c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-g.x;this.diagramContainer.scrollTop+=c.x-g.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=
window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(c){mxUtils.lightDarkColorSupported&&(Editor.darkMode=c,c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container,mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff",null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),
c.style.colorScheme="dark"):(c.classList.remove("geDarkMode"),c.style.colorScheme="light")),null!=this.ruler&&this.ruler.updateStyle(),this.fireEvent(new mxEventObject("darkModeChanged")))};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,g){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=
c,Editor.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState(!0))),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=
-function(){var c=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,m=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)g.style.left="10px",g.style.top="10px",m.style.left="10px",m.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),
+function(){var c=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,l=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)g.style.left="10px",g.style.top="10px",l.style.left="10px",l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),
this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var n=this.diagramContainer.getAttribute("data-bounds");if(null!=n){this.diagramContainer.removeAttribute("data-bounds");var x=n.split(" ");n=mxUtils.getDocumentSize();this.diagramContainer.style.top=x[0];this.diagramContainer.style.left=x[1];var F=parseInt(x[2]);
x=parseInt(x[3]);F=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,F):F,n.width-80);x=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,x):x,n.height-80);this.diagramContainer.style.width=F+"px";this.diagramContainer.style.height=x+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}g.style.left=this.diagramContainer.offsetLeft+
-"px";g.style.top=this.diagramContainer.offsetTop-g.offsetHeight-4+"px";m.style.display="";m.style.left=this.diagramContainer.offsetLeft-m.offsetWidth-4+"px";m.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=g.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=
+"px";g.style.top=this.diagramContainer.offsetTop-g.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=g.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=
this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;
g.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||
"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize-4):(c.vertexFontSize=Graph.prototype.vertexFontSize,c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded=
"0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==
Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,
c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);
-this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var m=c.indexOf(",");0<m&&(g=this.getPageById(c.substring(m+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(g=this.getCustomLinkTitle(c));return g};EditorUi.prototype.getCustomLinkTitle=function(c){var g=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var m=JSON.parse(c.substring(17));
-null!=m&&null!=m.title&&(g=m.title)}catch(n){}return g};EditorUi.prototype.handleCustomLink=function(c,g){if(Graph.isPageLink(c))if(g=c.indexOf(","),c=this.getPageById(c.substring(g+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,g)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();
-if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(g){g.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(g){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(g,m){mxSettings.setCustomFonts(this.menus.customFonts);
-mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(g,m){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(g,m){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));
-c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(g,m){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,
-function(g,m){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(g,m){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?
+this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(g=this.getPageById(c.substring(l+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(g=this.getCustomLinkTitle(c));return g};EditorUi.prototype.getCustomLinkTitle=function(c){var g=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var l=JSON.parse(c.substring(17));
+null!=l&&null!=l.title&&(g=l.title)}catch(n){}return g};EditorUi.prototype.handleCustomLink=function(c,g){if(Graph.isPageLink(c))if(g=c.indexOf(","),c=this.getPageById(c.substring(g+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,g)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();
+if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(g){g.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(g){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(g,l){mxSettings.setCustomFonts(this.menus.customFonts);
+mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(g,l){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(g,l){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));
+c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(g,l){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,
+function(g,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(g,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));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.writeImageToClipboard=function(c,
-g,m,n,x,F){n=null!=n?n:"image/png";var H=null==g||null==m?'<img src="'+c+'">':'<img src="'+c+'" width="'+g+'" height="'+m+'">',M={"text/html":new Blob([H],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(n)&&(M[n]=this.base64ToBlob(c.substring(c.indexOf(",")+1),n));var L=new ClipboardItem(M);navigator.clipboard.write([L]).then(x)["catch"](F);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[c],"w",g,"h",m,"type",n,"html",[H],"data",[M],"item",[L])};EditorUi.prototype.writeHtmlToClipboard=
-function(c,g){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(c)],{type:"text/plain"}),"text/html":new Blob([c],{type:"text/html"})})])["catch"](g)};EditorUi.prototype.writeTextToClipboard=function(c,g){navigator.clipboard.writeText(c)["catch"](g)};EditorUi.prototype.copySvg=function(c,g,m){try{if(null!=navigator.clipboard&&"function"===typeof window.ClipboardItem){var n=this.editor.graph.getSvg(null,m,null,null,null,null,null,null,null,null,null,null,
-null,0<c.length?c:null);n.setAttribute("content",g);var x=Editor.createSvgDataUri(mxUtils.getXml(n)),F=parseInt(n.getAttribute("width")),H=parseInt(n.getAttribute("height"));this.writeImageToClipboard(x,F,H,"image/svg+xml",null,mxUtils.bind(this,function(M){this.handleError(M)}))}}catch(M){this.handleError(M)}};EditorUi.prototype.copyImage=function(c,g,m){try{m=null!=m?m:4,null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(n,x){try{this.spinner.stop();var F=this.createImageDataUri(n,g,"png"),H=Math.round(parseInt(x.getAttribute("width"))/m),M=Math.round(parseInt(x.getAttribute("height"))/m);EditorUi.debug("EditorUi.copyImage",[this],"cells",[c],"xml",[g],"scale",[m]);this.writeImageToClipboard(F,H,M,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var L=this.getBaseFilename(!1)+(null!=g?".drawio":"")+".png";this.saveLocalFile(F.substring(F.lastIndexOf(",")+
-1),L,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(L){this.handleError(L)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,null,m,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(n){this.handleError(n)}};EditorUi.prototype.copyCells=function(c,g){var m=this.editor.graph;if(m.isSelectionEmpty())c.innerText="";else{var n=mxUtils.sortCells(m.model.getTopmostCells(m.getSelectionCells())),
-x=mxUtils.getXml(m.encodeCells(n));mxUtils.setTextContent(c,encodeURIComponent(x));g?(m.removeCells(n,!1),m.lastPasteXml=null):(m.lastPasteXml=x,m.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeClipboard){var g=this.editor.graph;g.isSelectionEmpty()||(c=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(c)),navigator.clipboard.writeText(g))}return c};
-EditorUi.prototype.pasteXml=function(c,g,m,n,x,F){EditorUi.debug("EditorUi.pasteXml",[this],"xml",[c],"pasteAsLabel",[g],"compat",[m],"evt",[n],"html",[x],"pt",[F]);x=null!=x?x:!0;var H=this.editor.graph,M=null!=F?F:Editor.pasteAtMousePointer&&H.isMouseInsertPoint()?H.getInsertPoint():null;F=null;H.lastPasteXml==c?null==M&&H.pasteCounter++:(H.lastPasteXml=c,H.pasteCounter=0);var L=H.pasteCounter*H.gridSize;if(m||this.isCompatibleString(c)){H.model.beginUpdate();try{if(F=this.importXml(c,L,L),null!=
-M){var K=H.getBoundingBoxFromGeometry(F,!0);if(null!=K){var Z=Math.round(H.snap(M.x)),ha=Math.round(H.snap(M.y));H.cellsMoved(F,Z-K.x,ha-K.y)}}}finally{H.model.endUpdate()}H.setSelectionCells(F)}else if(g&&1==H.getSelectionCount()){g=H.getStartEditingCell(H.getSelectionCell(),n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==H.getCurrentCellStyle(g)[mxConstants.STYLE_SHAPE])H.setCellStyles(mxConstants.STYLE_IMAGE,c,[g]);else{H.model.beginUpdate();try{H.labelChanged(g,c),Graph.isLink(c)&&H.setLinkForCell(g,
-c)}finally{H.model.endUpdate()}}H.setSelectionCell(g)}else M=null!=M?M:H.getInsertPoint(),H.isMouseInsertPoint()&&(L=0,H.lastPasteXml==c&&0<H.pasteCounter&&H.pasteCounter--),F=this.insertTextAt(c,M.x+L,M.y+L,x),H.setSelectionCells(F);H.isSelectionEmpty()||(H.scrollCellToVisible(H.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(H.view.getState(H.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,g,m,n){if(!mxEvent.isConsumed(c)){var x=c.clipboardData,F=this.editor.graph,
-H=!1,M=g;if(m&&null!=x&&x.getData){var L=x.getData("text/plain"),K=!1;if(null!=L&&0<L.length&&"%3CmxGraphModel%3E"==L.substring(0,18))try{var Z=decodeURIComponent(L);this.isCompatibleString(Z)&&(K=!0,L=Z)}catch(ba){}K=K?null:x.getData("text/html");null!=K&&0<K.length?(M=this.parseHtmlData(K),H="text/plain"!=M.getAttribute("data-type")):null!=L&&0<L.length&&(M=document.createElement("div"),mxUtils.setTextContent(M,K))}L=M.getElementsByTagName("span");if(null!=L&&0<L.length&&"application/vnd.lucid.chart.objects"===
-L[0].getAttribute("data-lucid-type"))m=L[0].getAttribute("data-lucid-content"),null!=m&&0<m.length&&(this.convertLucidChart(m,mxUtils.bind(this,function(ba){var V=this.editor.graph;V.lastPasteXml==ba?V.pasteCounter++:(V.lastPasteXml=ba,V.pasteCounter=0);var k=V.pasteCounter*V.gridSize;V.setSelectionCells(this.importXml(ba,k,k));V.scrollCellToVisible(V.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(c));else{var ha=!1,ca="";ca=H?null!=M.textContent&&"<mxfile"==
-M.textContent.substring(0,7)&&"</mxfile>"==M.textContent.substring(M.textContent.length-9)||"<mxGraphModel"==M.textContent.substring(0,13)&&"</mxGraphModel>"==M.textContent.substring(M.textContent.length-15)?M.textContent.replace(/\u00a0/g," "):M.innerHTML:mxUtils.trim(null==M.innerText?mxUtils.getTextContent(M):M.innerText);try{var aa=ca.lastIndexOf("%3E");0<=aa&&aa<ca.length-3&&(ca=ca.substring(0,aa+3))}catch(ba){}try{L=M.getElementsByTagName("span"),(Z=null!=L&&0<L.length?mxUtils.trim(decodeURIComponent(L[0].textContent)):
-decodeURIComponent(ca))&&(this.isCompatibleString(Z)||0==Z.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ha=!0,ca=Z)}catch(ba){}Z=null;try{if(!ha&&""==M.textContent)for(aa=0;aa<x.items.length;aa++){var oa=x.items[aa];if("file"===oa.kind){Z=oa.getAsFile();break}}}catch(ba){}EditorUi.debug("EditorUi.pasteCells",[this],"evt",[c],"realElt",[g.outerHTML],"elt",[M.outerHTML],"useEvent",m,"pasteAsLabel",n,"xml",[ca],"compat",ha,"asHtml",H,"data",x,"items",[x.items.length],"files",[x.files.length],
-"types",[JSON.stringify(x.types)],"blob",[Z]);try{if(ha||null==Z)if(null!=ca&&0<ca.length){if(0==ca.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ka=mxUtils.bind(this,function(){try{ca=(new MiroImporter).importMiroJson(JSON.parse(ca)),this.pasteXml(ca,n,ha,c)}catch(ba){console.log("Miro import error:",ba)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ka):ka()}else this.pasteXml(ca,n,ha,c,H);mxEvent.consume(c)}else m||(F.lastPasteXml=null,F.pasteCounter=
-0);else{var da=F.getInsertPoint();this.importFiles([Z],da.x,da.y,this.maxImageSize);mxEvent.consume(c)}}catch(ba){this.handleError(ba)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.pasteFromClipboard=function(c){var g=this.editor.graph;if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,function(m,n,x,F,H){if(null!=m){g.getModel().beginUpdate();try{this.pasteXml(m,!0,null,null,null,c)}finally{g.getModel().endUpdate()}}else m=
-null!=n?n:null!=x?x:F,null!=m?(c=null!=c?c:g.getInsertPoint(),this.importFiles([m],c.x,c.y,this.maxImageSize)):this.pasteFromLocalClipboard(c)})):this.pasteFromLocalClipboard(c)}catch(m){}};EditorUi.prototype.pasteFromLocalClipboard=function(c){var g=this.editor.graph;g.getModel().beginUpdate();try{g.moveCellsTo(mxClipboard.paste(g),c)}finally{g.getModel().endUpdate()}};EditorUi.prototype.installImagePasteHandler=function(){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,
-function(g){for(var m=null!=g.clipboardData?g.clipboardData:g.originalEvent.clipboardData,n=!1,x=null,F=0;F<m.types.length;F++)if("text/"===m.types[F].substring(0,5)){n=!0;break}for(F=0;F<m.items.length;F++){var H=m.items[F];if("file"===H.kind){x=H.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[g],"data",[m],"items",[m.items.length],"files",[m.files.length],"types",[JSON.stringify(m.types)],"containsText",n,"file",[x],"editing",c.isEditing());var M=mxUtils.bind(this,
-function(){try{if(!n&&null!=x){if(c.isEditing())this.importFiles([x],0,0,this.maxImageSize,function(K,Z,ha,ca,aa,oa){c.insertImage(K,aa,oa)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var Z=0;Z<K.length;Z++)K[Z]()});else{var L=this.editor.graph.getInsertPoint();this.importFiles([x],L.x,L.y,this.maxImageSize)}mxEvent.consume(g)}}catch(K){}});if(!mxEvent.isConsumed(g)&&!n)if(Editor.enableNativeClipboard)navigator.clipboard.read().then(mxUtils.bind(this,function(L){this.readTypeFromClipboardData(L,
-"image/svg+xml",mxUtils.bind(this,function(K){if(null!=K){K=new Blob([K],{type:"image/svg+xml"});var Z=this.editor.graph.getInsertPoint();this.importFiles([K],Z.x,Z.y,this.maxImageSize)}else M()}),"image")}))["catch"](M);else M()}),!1)};EditorUi.prototype.readGraphModelFromClipboard=function(c){navigator.clipboard.read().then(mxUtils.bind(this,function(g){try{EditorUi.debug("EditorUi.readGraphModelFromClipboard",[this],"data",g,"types",null!=g&&0<g.length?[JSON.stringify(g[0].types)]:[]),this.readGraphModelFromHtmlClipboardData(g,
-mxUtils.bind(this,function(m,n){null!=m?c(m):this.readGraphModelFromImageClipboardData(g,mxUtils.bind(this,function(x,F,H){null!=x?c(x):this.readTypeFromClipboardData(g,"text/plain",mxUtils.bind(this,function(M){c(M,F,H,n,g)}))}))}))}catch(m){c(null)}}))["catch"](function(){c(null)})};EditorUi.prototype.readGraphModelFromHtmlClipboardData=function(c,g){this.readTypeFromClipboardData(c,"text/html",mxUtils.bind(this,function(m){var n=null,x=null;try{var F=this.parseHtmlData(m);if(null!=F){n="text/plain"!=
-F.getAttribute("data-type")?F.innerHTML:mxUtils.trim(null==F.innerText?mxUtils.getTextContent(F):F.innerText);try{var H=n.lastIndexOf("%3E");0<=H&&H<n.length-3&&(n=n.substring(0,H+3))}catch(K){}try{null==n&&(m=null,""==F.textContent&&1==F.children.length&&"IMG"==F.firstChild.nodeName&&(m=F.firstChild.getAttribute("src")),null!=m&&0<m.length&&("data:image/png;base64,"==m.substring(0,22)?x=this.base64ToBlob(m.substring(m.indexOf(",")+1),"image/png"):"data:image/svg+xml;base64,"==m.substring(0,26)&&
-(x=this.base64ToBlob(m.substring(m.indexOf(",")+1),"image/svg+xml"))))}catch(K){}try{var M=F.getElementsByTagName("span"),L=null!=M&&0<M.length?mxUtils.trim(decodeURIComponent(M[0].textContent)):decodeURIComponent(n);this.isCompatibleString(L)&&(n=L)}catch(K){}}}catch(K){}g(this.isCompatibleString(n)?n:null,x)}))};EditorUi.prototype.readGraphModelFromImageClipboardData=function(c,g){this.readTypeFromClipboardData(c,"image/svg+xml",mxUtils.bind(this,function(m,n){var x=null;try{null!=m&&(x=mxUtils.parseXml(m).documentElement.getAttribute("content"))}catch(F){}this.isCompatibleString(x)?
-g(x):this.readTypeFromClipboardData(c,"image/png",mxUtils.bind(this,function(F,H){x=Editor.extractGraphModelFromPng("data:image/png;base64,"+F);this.isCompatibleString(x)?g(x):g(null,n,H)}))}))};EditorUi.prototype.readTypeFromClipboardData=function(c,g,m){var n=!1;if(null!=c&&0<c.length)for(var x=0;x<c.length&&!n;x++)(function(F){0<=mxUtils.indexOf(F.types,g)&&(n=!0,F.getType(g).then(mxUtils.bind(this,function(H){if("image/png"==g)H.arrayBuffer().then(function(M){m(btoa(Graph.arrayBufferToString(M)),
-H)})["catch"](function(){m(null)});else H.text().then(mxUtils.bind(this,function(M){EditorUi.debug("EditorUi.readTypeFromClipboardData",[this],"data",[c],"type",[g],"result",[M]);m(M,H)}))["catch"](function(){m(null)})}))["catch"](function(){m(null)}))})(c[x]);n||m()};EditorUi.prototype.parseHtmlData=function(c){var g=null;if(null!=c&&0<c.length){var m="<meta "==c.substring(0,6);g=document.createElement("div");g.innerHTML=(m?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(c);asHtml=!0;m=g.getElementsByTagName("style");
-if(null!=m)for(;0<m.length;)m[0].parentNode.removeChild(m[0]);if(null!=g.firstChild&&g.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=g.firstChild.nextSibling&&g.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==g.firstChild.nodeName&&"A"==g.firstChild.nextSibling.nodeName&&null==g.firstChild.nextSibling.nextSibling){var n=null==g.firstChild.nextSibling.innerText?mxUtils.getTextContent(g.firstChild.nextSibling):g.firstChild.nextSibling.innerText;n==g.firstChild.nextSibling.getAttribute("href")&&
-(mxUtils.setTextContent(g,n),asHtml=!1)}if(""==g.textContent&&(m=g.getElementsByTagName("img"),1==m.length&&(n=m[0].getAttribute("src"),m=null,null!=n))){if(Editor.isPngDataUrl(n)){var x=Editor.extractGraphModelFromPng(n);null!=x&&0<x.length&&(m=x)}else if("data:image/svg+xml;base64,"==n.substring(0,26)){img=this.base64ToBlob(n.substring(n.indexOf(",")+1),"image/svg+xml");n=Graph.getSvgFromDataUri(n);try{x=mxUtils.parseXml(n).documentElement.getAttribute("content"),this.isCompatibleString(x)&&(m=
-x)}catch(F){}}null!=m&&(mxUtils.setTextContent(g,m),asHtml=!1)}asHtml?Graph.removePasteFormatting(g):g.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[c],"elt",[g],"asHtml",asHtml);return g};EditorUi.prototype.showPrintDialog=function(c,g,m){var n=330;this.editor.graph.isEnabled()&&(n+=40);null!=this.pages&&1<this.pages.length&&(n+=40,this.editor.graph.isEnabled()||(n+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(n+=20);this.showDialog((new PrintDialog(this,
-c,g,m)).container,320,n,!0,!0)};EditorUi.prototype.print=function(c,g){var m=this.editor,n=m.graph,x=this.getPageIndex(this.currentPage),F=null!=x?x+1:1,H=mxUtils.bind(this,function(ba,V,k,v){var I=ba.useCssTransforms,N=ba.currentTranslate,T=ba.currentScale,W=ba.view.translate,U=ba.view.scale;ba.useCssTransforms&&(ba.useCssTransforms=!1,ba.currentTranslate=new mxPoint(0,0),ba.currentScale=1,ba.view.translate=new mxPoint(0,0),ba.view.scale=1);var Y=ba.getGraphBounds(),fa=0,na=0,la=mxRectangle.fromRectangle(ba.pageFormat),
-qa=g.fit||g.crop||!ba.pageVisible,ya=g.scale;la.width=Math.ceil(la.width*ba.pageScale);la.height=Math.ceil(la.height*ba.pageScale);var wa=1;if(g.fit){wa=g.sheetsAcross;var Ia=g.sheetsDown;isNaN(ya)||(la.width=Math.ceil(la.width*ya),la.height=Math.ceil(la.height*ya));wa=Math.min(la.height*Ia/(Y.height/ba.view.scale),la.width*wa/(Y.width/ba.view.scale))}else wa=isNaN(ya)?1:ya;wa*=1;!qa&&ba.pageVisible?(ya=ba.getPageLayout(),fa-=ya.x*la.width,na-=ya.y*la.height):qa=!0;g.crop&&(g.selection&&(Y=n.getBoundingBox(n.getSelectionCells())),
-la.width=(Y.width+1)*wa/ba.view.scale,la.height=(Y.height+1)*wa/ba.view.scale);la.width=Math.ceil(1*la.width);la.height=Math.ceil(1*la.height);v=null!=v?"page/id,"+v:null;if(null==V){V=PrintDialog.createPrintPreview(ba,wa,null,0,fa,na,qa);V.title=this.getBaseFilename(!0);V.pageSelector=!1;V.mathEnabled=!1;fa=g.border;isNaN(fa)||(V.pageMargin=fa);g.selection&&(V.isCellVisible=function(Ma){return ba.isCellSelected(Ma)});var Aa=V.writeHead;V.writeHead=function(Ma,sa){sa=null!=sa?sa:"";g.shadows||(sa+=
-'g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');mxClient.IS_GC&&(sa+="@media print {\n .MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=m.fontCss&&(sa+=m.fontCss);Aa.apply(this,arguments);for(var Ca=ba.getCustomFonts(),Da=0;Da<Ca.length;Da++){var va=Ca[Da].name,Na=Ca[Da].url;Graph.isCssFontUrl(Na)?Ma.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Na))+'" charset="UTF-8" type="text/css">'):(Ma.writeln('<style type="text/css">'),
+g,l,n,x,F){n=null!=n?n:"image/png";var G=null==g||null==l?'<img src="'+c+'">':'<img src="'+c+'" width="'+g+'" height="'+l+'">',L={"text/html":new Blob([G],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(n)&&(L[n]=this.base64ToBlob(c.substring(c.indexOf(",")+1),n));var M=new ClipboardItem(L);navigator.clipboard.write([M]).then(x)["catch"](F);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[c],"w",g,"h",l,"type",n,"html",[G],"data",[L],"item",[M])};EditorUi.prototype.writeHtmlToClipboard=
+function(c,g){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(c)],{type:"text/plain"}),"text/html":new Blob([c],{type:"text/html"})})])["catch"](g)};EditorUi.prototype.writeTextToClipboard=function(c,g){navigator.clipboard.writeText(c)["catch"](g)};EditorUi.prototype.copySvg=function(c,g,l){try{if(null!=navigator.clipboard&&"function"===typeof window.ClipboardItem){var n=this.editor.graph.getSvg(null,l,null,null,null,null,null,null,null,null,null,null,
+null,0<c.length?c:null);n.setAttribute("content",g);var x=Editor.createSvgDataUri(mxUtils.getXml(n)),F=parseInt(n.getAttribute("width")),G=parseInt(n.getAttribute("height"));this.writeImageToClipboard(x,F,G,"image/svg+xml",null,mxUtils.bind(this,function(L){this.handleError(L)}))}}catch(L){this.handleError(L)}};EditorUi.prototype.copyImage=function(c,g,l){try{l=null!=l?l:4,null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
+this.editor.exportToCanvas(mxUtils.bind(this,function(n,x){try{this.spinner.stop();var F=this.createImageDataUri(n,g,"png"),G=Math.round(parseInt(x.getAttribute("width"))/l),L=Math.round(parseInt(x.getAttribute("height"))/l);EditorUi.debug("EditorUi.copyImage",[this],"cells",[c],"xml",[g],"scale",[l]);this.writeImageToClipboard(F,G,L,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var M=this.getBaseFilename(!1)+(null!=g?".drawio":"")+".png";this.saveLocalFile(F.substring(F.lastIndexOf(",")+
+1),M,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(M){this.handleError(M)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,null,l,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(n){this.handleError(n)}};EditorUi.prototype.copyCells=function(c,g){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText="";else{var n=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),
+x=mxUtils.getXml(l.encodeCells(n));mxUtils.setTextContent(c,encodeURIComponent(x));g?(l.removeCells(n,!1),l.lastPasteXml=null):(l.lastPasteXml=x,l.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeClipboard){var g=this.editor.graph;g.isSelectionEmpty()||(c=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(c)),navigator.clipboard.writeText(g))}return c};
+EditorUi.prototype.pasteXml=function(c,g,l,n,x,F){EditorUi.debug("EditorUi.pasteXml",[this],"xml",[c],"pasteAsLabel",[g],"compat",[l],"evt",[n],"html",[x],"pt",[F]);x=null!=x?x:!0;var G=this.editor.graph,L=null!=F?F:Editor.pasteAtMousePointer&&G.isMouseInsertPoint()?G.getInsertPoint():null;F=null;G.lastPasteXml==c?null==L&&G.pasteCounter++:(G.lastPasteXml=c,G.pasteCounter=0);var M=G.pasteCounter*G.gridSize;if(l||this.isCompatibleString(c)){G.model.beginUpdate();try{if(F=this.importXml(c,M,M),null!=
+L){var K=G.getBoundingBoxFromGeometry(F,!0);if(null!=K){var Z=Math.round(G.snap(L.x)),ja=Math.round(G.snap(L.y));G.cellsMoved(F,Z-K.x,ja-K.y)}}}finally{G.model.endUpdate()}G.setSelectionCells(F)}else if(g&&1==G.getSelectionCount()){g=G.getStartEditingCell(G.getSelectionCell(),n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==G.getCurrentCellStyle(g)[mxConstants.STYLE_SHAPE])G.setCellStyles(mxConstants.STYLE_IMAGE,c,[g]);else{G.model.beginUpdate();try{G.labelChanged(g,c),Graph.isLink(c)&&G.setLinkForCell(g,
+c)}finally{G.model.endUpdate()}}G.setSelectionCell(g)}else L=null!=L?L:G.getInsertPoint(),G.isMouseInsertPoint()&&(M=0,G.lastPasteXml==c&&0<G.pasteCounter&&G.pasteCounter--),F=this.insertTextAt(c,L.x+M,L.y+M,x),G.setSelectionCells(F);G.isSelectionEmpty()||(G.scrollCellToVisible(G.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(G.view.getState(G.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,g,l,n){if(!mxEvent.isConsumed(c)){var x=c.clipboardData,F=this.editor.graph,
+G=!1,L=g;if(l&&null!=x&&x.getData){var M=x.getData("text/plain"),K=!1;if(null!=M&&0<M.length&&"%3CmxGraphModel%3E"==M.substring(0,18))try{var Z=decodeURIComponent(M);this.isCompatibleString(Z)&&(K=!0,M=Z)}catch(aa){}K=K?null:x.getData("text/html");null!=K&&0<K.length?(L=this.parseHtmlData(K),G="text/plain"!=L.getAttribute("data-type")):null!=M&&0<M.length&&(L=document.createElement("div"),mxUtils.setTextContent(L,K))}M=L.getElementsByTagName("span");if(null!=M&&0<M.length&&"application/vnd.lucid.chart.objects"===
+M[0].getAttribute("data-lucid-type"))l=M[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(aa){var V=this.editor.graph;V.lastPasteXml==aa?V.pasteCounter++:(V.lastPasteXml=aa,V.pasteCounter=0);var k=V.pasteCounter*V.gridSize;V.setSelectionCells(this.importXml(aa,k,k));V.scrollCellToVisible(V.getSelectionCell())}),mxUtils.bind(this,function(aa){this.handleError(aa)})),mxEvent.consume(c));else{var ja=!1,da="";da=G?null!=L.textContent&&"<mxfile"==
+L.textContent.substring(0,7)&&"</mxfile>"==L.textContent.substring(L.textContent.length-9)||"<mxGraphModel"==L.textContent.substring(0,13)&&"</mxGraphModel>"==L.textContent.substring(L.textContent.length-15)?L.textContent.replace(/\u00a0/g," "):L.innerHTML:mxUtils.trim(null==L.innerText?mxUtils.getTextContent(L):L.innerText);try{var ba=da.lastIndexOf("%3E");0<=ba&&ba<da.length-3&&(da=da.substring(0,ba+3))}catch(aa){}try{M=L.getElementsByTagName("span"),(Z=null!=M&&0<M.length?mxUtils.trim(decodeURIComponent(M[0].textContent)):
+decodeURIComponent(da))&&(this.isCompatibleString(Z)||0==Z.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ja=!0,da=Z)}catch(aa){}Z=null;try{if(!ja&&""==L.textContent)for(ba=0;ba<x.items.length;ba++){var na=x.items[ba];if("file"===na.kind){Z=na.getAsFile();break}}}catch(aa){}EditorUi.debug("EditorUi.pasteCells",[this],"evt",[c],"realElt",[g.outerHTML],"elt",[L.outerHTML],"useEvent",l,"pasteAsLabel",n,"xml",[da],"compat",ja,"asHtml",G,"data",x,"items",[x.items.length],"files",[x.files.length],
+"types",[JSON.stringify(x.types)],"blob",[Z]);try{if(ja||null==Z)if(null!=da&&0<da.length){if(0==da.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ka=mxUtils.bind(this,function(){try{da=(new MiroImporter).importMiroJson(JSON.parse(da)),this.pasteXml(da,n,ja,c)}catch(aa){console.log("Miro import error:",aa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ka):ka()}else this.pasteXml(da,n,ja,c,G);mxEvent.consume(c)}else l||(F.lastPasteXml=null,F.pasteCounter=
+0);else{var ca=F.getInsertPoint();this.importFiles([Z],ca.x,ca.y,this.maxImageSize);mxEvent.consume(c)}}catch(aa){this.handleError(aa)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.pasteFromClipboard=function(c){var g=this.editor.graph;if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,function(l,n,x,F,G){if(null!=l){g.getModel().beginUpdate();try{this.pasteXml(l,!0,null,null,null,c)}finally{g.getModel().endUpdate()}}else l=
+null!=n?n:null!=x?x:F,null!=l?(c=null!=c?c:g.getInsertPoint(),this.importFiles([l],c.x,c.y,this.maxImageSize)):this.pasteFromLocalClipboard(c)})):this.pasteFromLocalClipboard(c)}catch(l){}};EditorUi.prototype.pasteFromLocalClipboard=function(c){var g=this.editor.graph;g.getModel().beginUpdate();try{g.moveCellsTo(mxClipboard.paste(g),c)}finally{g.getModel().endUpdate()}};EditorUi.prototype.installImagePasteHandler=function(){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,
+function(g){for(var l=null!=g.clipboardData?g.clipboardData:g.originalEvent.clipboardData,n=!1,x=null,F=0;F<l.types.length;F++)if("text/"===l.types[F].substring(0,5)){n=!0;break}for(F=0;F<l.items.length;F++){var G=l.items[F];if("file"===G.kind){x=G.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[g],"data",[l],"items",[l.items.length],"files",[l.files.length],"types",[JSON.stringify(l.types)],"containsText",n,"file",[x],"editing",c.isEditing());var L=mxUtils.bind(this,
+function(){try{if(!n&&null!=x){if(c.isEditing())this.importFiles([x],0,0,this.maxImageSize,function(K,Z,ja,da,ba,na){c.insertImage(K,ba,na)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var Z=0;Z<K.length;Z++)K[Z]()});else{var M=this.editor.graph.getInsertPoint();this.importFiles([x],M.x,M.y,this.maxImageSize)}mxEvent.consume(g)}}catch(K){}});if(!mxEvent.isConsumed(g)&&!n)if(Editor.enableNativeClipboard)navigator.clipboard.read().then(mxUtils.bind(this,function(M){this.readTypeFromClipboardData(M,
+"image/svg+xml",mxUtils.bind(this,function(K){if(null!=K){K=new Blob([K],{type:"image/svg+xml"});var Z=this.editor.graph.getInsertPoint();this.importFiles([K],Z.x,Z.y,this.maxImageSize)}else L()}),"image")}))["catch"](L);else L()}),!1)};EditorUi.prototype.readGraphModelFromClipboard=function(c){navigator.clipboard.read().then(mxUtils.bind(this,function(g){try{EditorUi.debug("EditorUi.readGraphModelFromClipboard",[this],"data",g,"types",null!=g&&0<g.length?[JSON.stringify(g[0].types)]:[]),this.readGraphModelFromHtmlClipboardData(g,
+mxUtils.bind(this,function(l,n){null!=l?c(l):this.readGraphModelFromImageClipboardData(g,mxUtils.bind(this,function(x,F,G){null!=x?c(x):this.readTypeFromClipboardData(g,"text/plain",mxUtils.bind(this,function(L){c(L,F,G,n,g)}))}))}))}catch(l){c(null)}}))["catch"](function(){c(null)})};EditorUi.prototype.readGraphModelFromHtmlClipboardData=function(c,g){this.readTypeFromClipboardData(c,"text/html",mxUtils.bind(this,function(l){var n=null,x=null;try{var F=this.parseHtmlData(l);if(null!=F){n="text/plain"!=
+F.getAttribute("data-type")?F.innerHTML:mxUtils.trim(null==F.innerText?mxUtils.getTextContent(F):F.innerText);try{var G=n.lastIndexOf("%3E");0<=G&&G<n.length-3&&(n=n.substring(0,G+3))}catch(K){}try{null==n&&(l=null,""==F.textContent&&1==F.children.length&&"IMG"==F.firstChild.nodeName&&(l=F.firstChild.getAttribute("src")),null!=l&&0<l.length&&("data:image/png;base64,"==l.substring(0,22)?x=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/png"):"data:image/svg+xml;base64,"==l.substring(0,26)&&
+(x=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/svg+xml"))))}catch(K){}try{var L=F.getElementsByTagName("span"),M=null!=L&&0<L.length?mxUtils.trim(decodeURIComponent(L[0].textContent)):decodeURIComponent(n);this.isCompatibleString(M)&&(n=M)}catch(K){}}}catch(K){}g(this.isCompatibleString(n)?n:null,x)}))};EditorUi.prototype.readGraphModelFromImageClipboardData=function(c,g){this.readTypeFromClipboardData(c,"image/svg+xml",mxUtils.bind(this,function(l,n){var x=null;try{null!=l&&(x=mxUtils.parseXml(l).documentElement.getAttribute("content"))}catch(F){}this.isCompatibleString(x)?
+g(x):this.readTypeFromClipboardData(c,"image/png",mxUtils.bind(this,function(F,G){x=Editor.extractGraphModelFromPng("data:image/png;base64,"+F);this.isCompatibleString(x)?g(x):g(null,n,G)}))}))};EditorUi.prototype.readTypeFromClipboardData=function(c,g,l){var n=!1;if(null!=c&&0<c.length)for(var x=0;x<c.length&&!n;x++)(function(F){0<=mxUtils.indexOf(F.types,g)&&(n=!0,F.getType(g).then(mxUtils.bind(this,function(G){if("image/png"==g)G.arrayBuffer().then(function(L){l(btoa(Graph.arrayBufferToString(L)),
+G)})["catch"](function(){l(null)});else G.text().then(mxUtils.bind(this,function(L){EditorUi.debug("EditorUi.readTypeFromClipboardData",[this],"data",[c],"type",[g],"result",[L]);l(L,G)}))["catch"](function(){l(null)})}))["catch"](function(){l(null)}))})(c[x]);n||l()};EditorUi.prototype.parseHtmlData=function(c){var g=null;if(null!=c&&0<c.length){var l="<meta "==c.substring(0,6);g=document.createElement("div");g.innerHTML=(l?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(c);asHtml=!0;l=g.getElementsByTagName("style");
+if(null!=l)for(;0<l.length;)l[0].parentNode.removeChild(l[0]);if(null!=g.firstChild&&g.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=g.firstChild.nextSibling&&g.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==g.firstChild.nodeName&&"A"==g.firstChild.nextSibling.nodeName&&null==g.firstChild.nextSibling.nextSibling){var n=null==g.firstChild.nextSibling.innerText?mxUtils.getTextContent(g.firstChild.nextSibling):g.firstChild.nextSibling.innerText;n==g.firstChild.nextSibling.getAttribute("href")&&
+(mxUtils.setTextContent(g,n),asHtml=!1)}if(""==g.textContent&&(l=g.getElementsByTagName("img"),1==l.length&&(n=l[0].getAttribute("src"),l=null,null!=n))){if(Editor.isPngDataUrl(n)){var x=Editor.extractGraphModelFromPng(n);null!=x&&0<x.length&&(l=x)}else if("data:image/svg+xml;base64,"==n.substring(0,26)){img=this.base64ToBlob(n.substring(n.indexOf(",")+1),"image/svg+xml");n=Graph.getSvgFromDataUri(n);try{x=mxUtils.parseXml(n).documentElement.getAttribute("content"),this.isCompatibleString(x)&&(l=
+x)}catch(F){}}null!=l&&(mxUtils.setTextContent(g,l),asHtml=!1)}asHtml?Graph.removePasteFormatting(g):g.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[c],"elt",[g],"asHtml",asHtml);return g};EditorUi.prototype.showPrintDialog=function(c,g,l){var n=330;this.editor.graph.isEnabled()&&(n+=40);null!=this.pages&&1<this.pages.length&&(n+=40,this.editor.graph.isEnabled()||(n+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(n+=20);this.showDialog((new PrintDialog(this,
+c,g,l)).container,320,n,!0,!0)};EditorUi.prototype.print=function(c,g){var l=this.editor,n=l.graph,x=this.getPageIndex(this.currentPage),F=null!=x?x+1:1,G=mxUtils.bind(this,function(aa,V,k,v){var J=aa.useCssTransforms,N=aa.currentTranslate,T=aa.currentScale,W=aa.view.translate,U=aa.view.scale;aa.useCssTransforms&&(aa.useCssTransforms=!1,aa.currentTranslate=new mxPoint(0,0),aa.currentScale=1,aa.view.translate=new mxPoint(0,0),aa.view.scale=1);var Y=aa.getGraphBounds(),fa=0,oa=0,la=mxRectangle.fromRectangle(aa.pageFormat),
+qa=g.fit||g.crop||!aa.pageVisible,ya=g.scale;la.width=Math.ceil(la.width*aa.pageScale);la.height=Math.ceil(la.height*aa.pageScale);var wa=1;if(g.fit){wa=g.sheetsAcross;var Ia=g.sheetsDown;isNaN(ya)||(la.width=Math.ceil(la.width*ya),la.height=Math.ceil(la.height*ya));wa=Math.min(la.height*Ia/(Y.height/aa.view.scale),la.width*wa/(Y.width/aa.view.scale))}else wa=isNaN(ya)?1:ya;wa*=1;!qa&&aa.pageVisible?(ya=aa.getPageLayout(),fa-=ya.x*la.width,oa-=ya.y*la.height):qa=!0;g.crop&&(g.selection&&(Y=n.getBoundingBox(n.getSelectionCells())),
+la.width=(Y.width+1)*wa/aa.view.scale,la.height=(Y.height+1)*wa/aa.view.scale);la.width=Math.ceil(1*la.width);la.height=Math.ceil(1*la.height);v=null!=v?"page/id,"+v:null;if(null==V){V=PrintDialog.createPrintPreview(aa,wa,null,0,fa,oa,qa);V.title=this.getBaseFilename(!0);V.pageSelector=!1;V.mathEnabled=!1;fa=g.border;isNaN(fa)||(V.pageMargin=fa);g.selection&&(V.isCellVisible=function(Ma){return aa.isCellSelected(Ma)});var Aa=V.writeHead;V.writeHead=function(Ma,sa){sa=null!=sa?sa:"";g.shadows||(sa+=
+'g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');mxClient.IS_GC&&(sa+="@media print {\n .MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=l.fontCss&&(sa+=l.fontCss);Aa.apply(this,arguments);for(var Ca=aa.getCustomFonts(),Da=0;Da<Ca.length;Da++){var va=Ca[Da].name,Na=Ca[Da].url;Graph.isCssFontUrl(Na)?Ma.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Na))+'" charset="UTF-8" type="text/css">'):(Ma.writeln('<style type="text/css">'),
Ma.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(va)+'";\nsrc: url("'+mxUtils.htmlEntities(Na)+'");\n}'),Ma.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var Ba=V.drawBackgroundImage;V.drawBackgroundImage=function(Ma){Ba.apply(this,arguments);null!=Ma.node&&(EditorUi.embedSvgImages(Ma.node),n.disableSvgLinks(Ma.node,function(sa){sa.setAttribute("href","javascript:void(0)")}))}}var Ga=V.addGraphFragment;V.addGraphFragment=function(Ma,sa,Ca,Da,va,Na){Ga.apply(this,arguments);this.graph.mathEnabled?
-this.mathEnabled=this.mathEnabled||!0:va.classList.add("geDisableMathJax");if(this.graph.shadowVisible)for(var Sa=va.getElementsByTagName("svg"),Ua=0;Ua<Sa.length;Ua++)ba.addSvgShadow(Sa[Ua])};g.grid&&(V.gridSize=ba.gridSize,V.gridSteps=ba.view.gridSteps,V.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ba.view.gridColor);V.open(null,null,k,!0,v,la,g.selection?ba.getSelectionCells():null)}else{Y=ba.background;if(null==Y||""==Y||Y==mxConstants.NONE)Y="#ffffff";V.backgroundColor=
-Y;V.autoOrigin=qa;g.grid&&(V.gridSize=ba.gridSize,V.gridSteps=ba.view.gridSteps,V.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ba.view.gridColor);V.appendGraph(ba,wa,fa,na,k,!0,v,la,g.selection?ba.getSelectionCells():null);k=ba.getCustomFonts();if(null!=V.wnd)for(la=0;la<k.length;la++)fa=k[la].name,na=k[la].url,Graph.isCssFontUrl(na)?V.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(na)+'" charset="UTF-8" type="text/css">'):(V.wnd.document.writeln('<style type="text/css">'),
-V.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fa)+'";\nsrc: url("'+mxUtils.htmlEntities(na)+'");\n}'),V.wnd.document.writeln("</style>"))}I&&(ba.useCssTransforms=I,ba.currentTranslate=N,ba.currentScale=T,ba.view.translate=W,ba.view.scale=U);return V}),M=g.pagesFrom,L=g.pagesTo,K=!g.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,g);else{K&&(K=g.selection||M==F&&L==F);if(!K&&null!=this.pages&&this.pages.length){K=0;F=this.pages.length-1;g.allPages||
-(K=parseInt(M)-1,F=parseInt(L)-1);for(var Z=K;Z<=F;Z++){var ha=this.pages[Z];M=ha==this.currentPage?n:null;if(null==M){M=this.createTemporaryGraph(n.stylesheet);M.shapeForegroundColor=n.shapeForegroundColor;M.shapeBackgroundColor=n.shapeBackgroundColor;L=!0;var ca=K=!1,aa=null,oa=null;null==ha.viewState&&null==ha.root&&this.updatePageRoot(ha);null!=ha.viewState&&(L=ha.viewState.pageVisible,K=ha.viewState.mathEnabled,ca=ha.viewState.shadowVisible,aa=ha.viewState.background,oa=ha.viewState.backgroundImage,
-M.pageFormat=ha.viewState.pageFormat,M.gridSize=ha.viewState.gridSize);null!=oa&&null!=oa.originalSrc&&(oa=this.createImageForPageLink(oa.originalSrc,ha));M.background=aa;M.backgroundImage=null!=oa?new mxImage(oa.src,oa.width,oa.height,oa.x,oa.y):null;M.pageVisible=L;M.mathEnabled=K;M.shadowVisible=ca;var da=M.getGraphBounds;M.getGraphBounds=function(){var ba=da.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var k=this.view.translate,v=this.view.scale;ba=mxRectangle.fromRectangle(ba);
-ba.add(new mxRectangle((k.x+V.x)*v,(k.y+V.y)*v,V.width*v,V.height*v))}return ba};var ka=M.getGlobalVariable;M.getGlobalVariable=function(ba){return"page"==ba?ha.getName():"pagenumber"==ba?Z+1:"pagecount"==ba?null!=this.pages?this.pages.length:1:ka.apply(this,arguments)};document.body.appendChild(M.container);this.updatePageRoot(ha);M.model.setRoot(ha.root)}x=H(M,x,Z!=F,ha.getId());M!=n&&M.container.parentNode.removeChild(M.container)}}else x=H(n);null==x||null==x.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):
-(x.mathEnabled&&(H=x.wnd.document,c||(x.wnd.IMMEDIATE_PRINT=!0),H.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),x.closeDocument(),Graph.rewritePageLinks(x.wnd.document,!0),x.mathEnabled||c||PrintDialog.printPreview(x));return x}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var g=null,m=0;m<c.length;m++)mxEvent.addListener(c[m],"dragleave",function(n){null!=g&&(g.parentNode.removeChild(g),g=null);n.stopPropagation();n.preventDefault()}),
-mxEvent.addListener(c[m],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(g=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(c[m],"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,
+this.mathEnabled=this.mathEnabled||!0:va.classList.add("geDisableMathJax");if(this.graph.shadowVisible)for(var Sa=va.getElementsByTagName("svg"),Ua=0;Ua<Sa.length;Ua++)aa.addSvgShadow(Sa[Ua])};g.grid&&(V.gridSize=aa.gridSize,V.gridSteps=aa.view.gridSteps,V.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:aa.view.gridColor);V.open(null,null,k,!0,v,la,g.selection?aa.getSelectionCells():null)}else{Y=aa.background;if(null==Y||""==Y||Y==mxConstants.NONE)Y="#ffffff";V.backgroundColor=
+Y;V.autoOrigin=qa;g.grid&&(V.gridSize=aa.gridSize,V.gridSteps=aa.view.gridSteps,V.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:aa.view.gridColor);V.appendGraph(aa,wa,fa,oa,k,!0,v,la,g.selection?aa.getSelectionCells():null);k=aa.getCustomFonts();if(null!=V.wnd)for(la=0;la<k.length;la++)fa=k[la].name,oa=k[la].url,Graph.isCssFontUrl(oa)?V.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(oa)+'" charset="UTF-8" type="text/css">'):(V.wnd.document.writeln('<style type="text/css">'),
+V.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fa)+'";\nsrc: url("'+mxUtils.htmlEntities(oa)+'");\n}'),V.wnd.document.writeln("</style>"))}J&&(aa.useCssTransforms=J,aa.currentTranslate=N,aa.currentScale=T,aa.view.translate=W,aa.view.scale=U);return V}),L=g.pagesFrom,M=g.pagesTo,K=!g.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,g);else{K&&(K=g.selection||L==F&&M==F);if(!K&&null!=this.pages&&this.pages.length){K=0;F=this.pages.length-1;g.allPages||
+(K=parseInt(L)-1,F=parseInt(M)-1);for(var Z=K;Z<=F;Z++){var ja=this.pages[Z];L=ja==this.currentPage?n:null;if(null==L){L=this.createTemporaryGraph(n.stylesheet);L.shapeForegroundColor=n.shapeForegroundColor;L.shapeBackgroundColor=n.shapeBackgroundColor;M=!0;var da=K=!1,ba=null,na=null;null==ja.viewState&&null==ja.root&&this.updatePageRoot(ja);null!=ja.viewState&&(M=ja.viewState.pageVisible,K=ja.viewState.mathEnabled,da=ja.viewState.shadowVisible,ba=ja.viewState.background,na=ja.viewState.backgroundImage,
+L.pageFormat=ja.viewState.pageFormat,L.gridSize=ja.viewState.gridSize);null!=na&&null!=na.originalSrc&&(na=this.createImageForPageLink(na.originalSrc,ja));L.background=ba;L.backgroundImage=null!=na?new mxImage(na.src,na.width,na.height,na.x,na.y):null;L.pageVisible=M;L.mathEnabled=K;L.shadowVisible=da;var ca=L.getGraphBounds;L.getGraphBounds=function(){var aa=ca.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var k=this.view.translate,v=this.view.scale;aa=mxRectangle.fromRectangle(aa);
+aa.add(new mxRectangle((k.x+V.x)*v,(k.y+V.y)*v,V.width*v,V.height*v))}return aa};var ka=L.getGlobalVariable;L.getGlobalVariable=function(aa){return"page"==aa?ja.getName():"pagenumber"==aa?Z+1:"pagecount"==aa?null!=this.pages?this.pages.length:1:ka.apply(this,arguments)};document.body.appendChild(L.container);this.updatePageRoot(ja);L.model.setRoot(ja.root)}x=G(L,x,Z!=F,ja.getId());L!=n&&L.container.parentNode.removeChild(L.container)}}else x=G(n);null==x||null==x.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):
+(x.mathEnabled&&(G=x.wnd.document,c||(x.wnd.IMMEDIATE_PRINT=!0),G.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),x.closeDocument(),Graph.rewritePageLinks(x.wnd.document,!0),x.mathEnabled||c||PrintDialog.printPreview(x));return x}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var g=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(n){null!=g&&(g.parentNode.removeChild(g),g=null);n.stopPropagation();n.preventDefault()}),
+mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(g=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(c[l],"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 x=this.extractGraphModelFromEvent(n);if(null==x){var F=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=F&&(10==document.documentMode||11==document.documentMode?x=F.getData("Text"):(x=null,x=0<=mxUtils.indexOf(F.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(F.types,"text/html")?F.getData("text/html"):null,null!=x&&0<x.length?(F=document.createElement("div"),
F.innerHTML=Graph.sanitizeHtml(x),F=F.getElementsByTagName("img"),0<F.length&&(x=F[0].getAttribute("src"))):0<=mxUtils.indexOf(F.types,"text/plain")&&(x=F.getData("text/plain"))),null!=x&&(Editor.isPngDataUrl(x)?(x=Editor.extractGraphModelFromPng(x),null!=x&&0<x.length&&this.openLocalFile(x,null,!0)):this.isRemoteFileFormat(x)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(x))).send(mxUtils.bind(this,
-function(H){200<=H.getStatus()&&299>=H.getStatus()?this.openLocalFile(H.getText(),null,!0):this.showError(mxResources.get("error"),413==H.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(x)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(x):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(x)))))}else this.openLocalFile(x,null,
-!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var g=0,m=0;if(null==c){var n=document.body;var x=document.documentElement;var F=(n.clientWidth||x.clientWidth)-3;n=Math.max(n.clientHeight||0,x.clientHeight)-3}else n=c.getBoundingClientRect(),g=n.top,m=n.left,F=n.width,n=n.height;x=document.createElement("div");x.style.zIndex=mxPopupMenu.prototype.zIndex+2;x.style.border="3px dotted rgb(254, 137, 12)";x.style.pointerEvents="none";x.style.position="absolute";
-x.style.top=g+"px";x.style.left=m+"px";x.style.width=Math.max(0,F-3)+"px";x.style.height=Math.max(0,n-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(x):document.body.appendChild(x);return x};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var g=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=g){var m=new mxCodec(g.ownerDocument),n=new mxGraphModel;m.decode(g,n);g=n.getChildAt(n.getRoot(),0);for(m=0;m<n.getChildCount(g);m++)c.push(n.getChildAt(g,
-m))}return c};EditorUi.prototype.openFileHandle=function(c,g,m,n,x,F){if(null!=g&&0<g.length){if(!Editor.useCanvasForExport&&/(\.png)$/i.test(g)||/(\.pdf)$/i.test(g))g=g.substring(0,g.length-4),/(\.drawio)$/i.test(g)||(g+=".drawio");var H=mxUtils.bind(this,function(L){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==L.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,
-L,g)),this.showSidebar()}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(L,g,n)});if(EditorUi.isVisioFilename(g))this.importVisio(m,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),
-mxResources.get("notInOffline"))):this.parseFile(m,mxUtils.bind(this,function(L){4==L.readyState&&(this.spinner.stop(),200<=L.status&&299>=L.status?H(L.responseText):this.handleError({message:mxResources.get(413==L.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(L){this.spinner.stop();this.openLocalFile(L,g,n)}),
-mxUtils.bind(this,function(L){this.spinner.stop();this.handleError(L)}));else if("<mxlibrary"==c.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,c,m.name)),this.showSidebar()}catch(L){this.handleError(L,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(m,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}),mxUtils.bind(this,
-function(){this.spinner.stop();this.openLocalFile(c,g,n)}));else{if("image/png"==m.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==m.type){var M=Editor.extractGraphModelFromPdf(c);null!=M&&(x=null,n=!0,c=M)}this.spinner.stop();this.openLocalFile(c,g,n,x,null!=x?m:null,F)}}};EditorUi.prototype.openFiles=function(c,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var m=0;m<c.length;m++)mxUtils.bind(this,function(n){var x=new FileReader;x.onload=
-mxUtils.bind(this,function(F){try{this.openFileHandle(F.target.result,n.name,n,g)}catch(H){this.handleError(H)}});x.onerror=mxUtils.bind(this,function(F){this.spinner.stop();this.handleError(F);window.openFile=null});"image"!==n.type.substring(0,5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?x.readAsText(n):x.readAsDataURL(n)})(c[m])};EditorUi.prototype.openLocalFile=function(c,g,m,n,x,F){var H=this.getCurrentFile(),M=mxUtils.bind(this,function(){window.openFile=null;if(null==
-g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var L=mxUtils.parseXml(c);null!=L&&(this.editor.setGraphXml(L.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,g||this.defaultFilename,m,n,x,F))});if(null!=c&&0<c.length)null==H||!H.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?M():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),
-mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,g),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),
-this.addBasenamesForCell(this.pages[g].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);g=[];for(var m in c)g.push(m);return g};EditorUi.prototype.addBasenamesForCell=function(c,g){function m(H){if(null!=H){var M=H.lastIndexOf(".");0<M&&(H=H.substring(M+1,H.length));null==g[H]&&(g[H]=!0)}}var n=this.editor.graph,x=n.getCellStyle(c);m(mxStencilRegistry.getBasenameForStencil(x[mxConstants.STYLE_SHAPE]));n.model.isEdge(c)&&(m(mxMarker.getPackageForType(x[mxConstants.STYLE_STARTARROW])),
-m(mxMarker.getPackageForType(x[mxConstants.STYLE_ENDARROW])));x=n.model.getChildCount(c);for(var F=0;F<x;F++)this.addBasenamesForCell(n.model.getChildAt(c,F),g)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;this.editor.graph.setEnabled(c);null!=this.tabContainer&&
-(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);c||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};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 c=!1;this.installMessageHandler(mxUtils.bind(this,function(g,m,n,x){c||(c=!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(x)try{var F=this.editor.graph;F.setGridEnabled(!1);F.pageVisible=!1;var H=F.model.cells,M;for(M in H){var L=H[M];null!=L&&null!=L.style&&(L.style+=";sketch=1;"+(-1==L.style.indexOf("fontFamily=")||-1<L.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+function(G){200<=G.getStatus()&&299>=G.getStatus()?this.openLocalFile(G.getText(),null,!0):this.showError(mxResources.get("error"),413==G.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(x)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(x):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(x)))))}else this.openLocalFile(x,null,
+!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var g=0,l=0;if(null==c){var n=document.body;var x=document.documentElement;var F=(n.clientWidth||x.clientWidth)-3;n=Math.max(n.clientHeight||0,x.clientHeight)-3}else n=c.getBoundingClientRect(),g=n.top,l=n.left,F=n.width,n=n.height;x=document.createElement("div");x.style.zIndex=mxPopupMenu.prototype.zIndex+2;x.style.border="3px dotted rgb(254, 137, 12)";x.style.pointerEvents="none";x.style.position="absolute";
+x.style.top=g+"px";x.style.left=l+"px";x.style.width=Math.max(0,F-3)+"px";x.style.height=Math.max(0,n-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(x):document.body.appendChild(x);return x};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var g=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=g){var l=new mxCodec(g.ownerDocument),n=new mxGraphModel;l.decode(g,n);g=n.getChildAt(n.getRoot(),0);for(l=0;l<n.getChildCount(g);l++)c.push(n.getChildAt(g,
+l))}return c};EditorUi.prototype.openFileHandle=function(c,g,l,n,x,F){if(null!=g&&0<g.length){if(!Editor.useCanvasForExport&&/(\.png)$/i.test(g)||/(\.pdf)$/i.test(g))g=g.substring(0,g.length-4),/(\.drawio)$/i.test(g)||(g+=".drawio");var G=mxUtils.bind(this,function(M){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==M.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,
+M,g)),this.showSidebar()}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(M,g,n)});if(EditorUi.isVisioFilename(g))this.importVisio(l,mxUtils.bind(this,function(M){this.spinner.stop();G(M)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(M){this.spinner.stop();G(M)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),
+mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(M){4==M.readyState&&(this.spinner.stop(),200<=M.status&&299>=M.status?G(M.responseText):this.handleError({message:mxResources.get(413==M.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(M){this.spinner.stop();this.openLocalFile(M,g,n)}),
+mxUtils.bind(this,function(M){this.spinner.stop();this.handleError(M)}));else if("<mxlibrary"==c.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,c,l.name)),this.showSidebar()}catch(M){this.handleError(M,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(M){this.spinner.stop();G(M)}),mxUtils.bind(this,
+function(){this.spinner.stop();this.openLocalFile(c,g,n)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==l.type){var L=Editor.extractGraphModelFromPdf(c);null!=L&&(x=null,n=!0,c=L)}this.spinner.stop();this.openLocalFile(c,g,n,x,null!=x?l:null,F)}}};EditorUi.prototype.openFiles=function(c,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=0;l<c.length;l++)mxUtils.bind(this,function(n){var x=new FileReader;x.onload=
+mxUtils.bind(this,function(F){try{this.openFileHandle(F.target.result,n.name,n,g)}catch(G){this.handleError(G)}});x.onerror=mxUtils.bind(this,function(F){this.spinner.stop();this.handleError(F);window.openFile=null});"image"!==n.type.substring(0,5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?x.readAsText(n):x.readAsDataURL(n)})(c[l])};EditorUi.prototype.openLocalFile=function(c,g,l,n,x,F){var G=this.getCurrentFile(),L=mxUtils.bind(this,function(){window.openFile=null;if(null==
+g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var M=mxUtils.parseXml(c);null!=M&&(this.editor.setGraphXml(M.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,g||this.defaultFilename,l,n,x,F))});if(null!=c&&0<c.length)null==G||!G.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?L():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=G&&G.isModified()?this.confirm(mxResources.get("allChangesLost"),null,L,mxResources.get("cancel"),
+mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,g),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=G&&G.isModified()?this.confirm(mxResources.get("allChangesLost"),null,L,mxResources.get("cancel"),mxResources.get("discardChanges")):L()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),
+this.addBasenamesForCell(this.pages[g].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);g=[];for(var l in c)g.push(l);return g};EditorUi.prototype.addBasenamesForCell=function(c,g){function l(G){if(null!=G){var L=G.lastIndexOf(".");0<L&&(G=G.substring(L+1,G.length));null==g[G]&&(g[G]=!0)}}var n=this.editor.graph,x=n.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(x[mxConstants.STYLE_SHAPE]));n.model.isEdge(c)&&(l(mxMarker.getPackageForType(x[mxConstants.STYLE_STARTARROW])),
+l(mxMarker.getPackageForType(x[mxConstants.STYLE_ENDARROW])));x=n.model.getChildCount(c);for(var F=0;F<x;F++)this.addBasenamesForCell(n.model.getChildAt(c,F),g)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;this.editor.graph.setEnabled(c);null!=this.tabContainer&&
+(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);c||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};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 c=!1;this.installMessageHandler(mxUtils.bind(this,function(g,l,n,x){c||(c=!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(x)try{var F=this.editor.graph;F.setGridEnabled(!1);F.pageVisible=!1;var G=F.model.cells,L;for(L in G){var M=G[L];null!=M&&null!=M.style&&(M.style+=";sketch=1;"+(-1==M.style.indexOf("fontFamily=")||-1<M.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
""))}}catch(K){console.log(K)}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(c,g){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(m){this.spinner.stop();g(m)})):g(null)};EditorUi.prototype.createLoadMessage=function(c){var g=this.editor.graph;return{event:c,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(c){try{var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var m=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(x){m.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,
-exit:null!=c?!c:!0,data:Editor.createSvgDataUri(x)}),"*")}),null,null,!0,n,1,this.embedExportBorder,null,this.embedExportTheme)}else c||m.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(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")))}catch(x){c||this.handleError(x)}};
-EditorUi.prototype.installMessageHandler=function(c){var g=null,m=!1,n=!1,x=null,F=mxUtils.bind(this,function(L,K){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,F);mxEvent.addListener(window,"message",mxUtils.bind(this,function(L){if(L.source==(window.opener||window.parent)){var K=
-L.data,Z=null,ha=mxUtils.bind(this,function(sa){if(null!=sa&&"function"===typeof sa.charAt&&"<"!=sa.charAt(0))try{Editor.isPngDataUrl(sa)?sa=Editor.extractGraphModelFromPng(sa):"data:image/svg+xml;base64,"==sa.substring(0,26)?sa=atob(sa.substring(26)):"data:image/svg+xml;utf8,"==sa.substring(0,24)&&(sa=sa.substring(24)),null!=sa&&(""==sa.trim()?sa=null:"%"==sa.charAt(0)?sa=decodeURIComponent(sa):"<"!=sa.charAt(0)&&(sa=Graph.decompress(sa)))}catch(Ca){}return sa});if("json"==urlParams.proto){var ca=
-!1;try{K=JSON.parse(K),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[L],"data",[K])}catch(sa){K=null}try{if(null==K)return;if("dialog"==K.action){this.showError(null!=K.titleKey?mxResources.get(K.titleKey):K.title,null!=K.messageKey?mxResources.get(K.messageKey):mxUtils.htmlEntities(K.message),null!=K.buttonKey?mxResources.get(K.buttonKey):K.button);null!=K.modified&&(this.editor.modified=K.modified);return}if("layout"==K.action){this.executeLayouts(this.editor.graph.createLayouts(K.layouts));
-return}if("prompt"==K.action){this.spinner.stop();var aa=new FilenameDialog(this,K.defaultValue||"",null!=K.okKey?mxResources.get(K.okKey):K.ok,function(sa){null!=sa?H.postMessage(JSON.stringify({event:"prompt",value:sa,message:K}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")},null!=K.titleKey?mxResources.get(K.titleKey):K.title,null,null,null,null,function(){H.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")});this.showDialog(aa.container,300,80,!0,
-!1);aa.init();return}if("draft"==K.action){var oa=ha(K.xml);this.spinner.stop();aa=new DraftDialog(this,mxResources.get("draftFound",[K.name||this.defaultFilename]),oa,mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"edit",message:K}),"*")}),mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"discard",message:K}),"*")}),K.editKey?mxResources.get(K.editKey):null,K.discardKey?mxResources.get(K.discardKey):
-null,K.ignore?mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"ignore",message:K}),"*")}):null);this.showDialog(aa.container,640,480,!0,!1,mxUtils.bind(this,function(sa){sa&&this.actions.get("exit").funct()}));try{aa.init()}catch(sa){H.postMessage(JSON.stringify({event:"draft",error:sa.toString(),message:K}),"*")}return}if("template"==K.action){this.spinner.stop();var da=1==K.enableRecent,ka=1==K.enableSearch,ba=1==K.enableCustomTemp;aa=new NewDialog(this,
-!1,K.templatesOnly?!1:null!=K.callback,mxUtils.bind(this,function(sa,Ca,Da,va){sa=sa||this.emptyDiagramXml;null!=K.callback?H.postMessage(JSON.stringify({event:"template",xml:sa,blank:sa==this.emptyDiagramXml,name:Ca,tempUrl:Da,libs:va,builtIn:!0,message:K}),"*"):(c(sa,L,sa!=this.emptyDiagramXml,K.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,da?mxUtils.bind(this,function(sa){this.remoteInvoke("getRecentDiagrams",[null],null,sa,function(){sa(null,"Network Error!")})}):
-null,ka?mxUtils.bind(this,function(sa,Ca){this.remoteInvoke("searchDiagrams",[sa,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(sa,Ca,Da){H.postMessage(JSON.stringify({event:"template",docUrl:sa,info:Ca,name:Da}),"*")}),null,null,ba?mxUtils.bind(this,function(sa){this.remoteInvoke("getCustomTemplates",null,null,sa,function(){sa({},0)})}):null,1==K.withoutType,null,K.templatesOnly);this.showDialog(aa.container,620,460,!0,!1,mxUtils.bind(this,function(sa){null!=
-this.sidebar&&this.sidebar.hideTooltip();sa&&this.actions.get("exit").funct()}));aa.init();return}if("textContent"==K.action){var V=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent",data:V,message:K}),"*");return}if("status"==K.action){this.updateStatus(mxUtils.bind(this,function(){null!=K.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(K.messageKey))):null!=K.message&&this.editor.setStatus(mxUtils.htmlEntities(K.message))}));null!=K.modified&&(this.editor.modified=
-K.modified);return}if("spinner"==K.action){var k=null!=K.messageKey?mxResources.get(K.messageKey):K.message;null==K.show||K.show?this.spinner.spin(document.body,k):this.spinner.stop();return}if("exit"==K.action){this.actions.get("exit").funct();return}if("viewport"==K.action){if(null!=K.viewport){var v=this.editor.graph,I=v.view.translate.x,N=v.view.translate.y;this.embedViewport=K.viewport;v.refresh();this.diagramContainer.scrollTop-=(N-v.view.translate.y)*v.view.scale;this.diagramContainer.scrollLeft-=
-(I-v.view.translate.x)*v.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==K.action){aa=null;try{var T=this.diagramContainer.getAttribute("data-scrollState");null!=T&&(this.diagramContainer.removeAttribute("data-scrollState"),aa=JSON.parse(T))}catch(sa){}Editor.inlineFullscreen=K.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=aa&&this.restoreScrollState(aa);return}if("snapshot"==K.action){this.sendEmbeddedSvgExport(!0);return}if("export"==
+this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,g){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();g(l)})):g(null)};EditorUi.prototype.createLoadMessage=function(c){var g=this.editor.graph;return{event:c,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(c){try{var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var l=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(x){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,
+exit:null!=c?!c:!0,data:Editor.createSvgDataUri(x)}),"*")}),null,null,!0,n,1,this.embedExportBorder,null,this.embedExportTheme)}else c||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(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")))}catch(x){c||this.handleError(x)}};
+EditorUi.prototype.installMessageHandler=function(c){var g=null,l=!1,n=!1,x=null,F=mxUtils.bind(this,function(M,K){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,F);mxEvent.addListener(window,"message",mxUtils.bind(this,function(M){if(M.source==(window.opener||window.parent)){var K=
+M.data,Z=null,ja=mxUtils.bind(this,function(sa){if(null!=sa&&"function"===typeof sa.charAt&&"<"!=sa.charAt(0))try{Editor.isPngDataUrl(sa)?sa=Editor.extractGraphModelFromPng(sa):"data:image/svg+xml;base64,"==sa.substring(0,26)?sa=atob(sa.substring(26)):"data:image/svg+xml;utf8,"==sa.substring(0,24)&&(sa=sa.substring(24)),null!=sa&&(""==sa.trim()?sa=null:"%"==sa.charAt(0)?sa=decodeURIComponent(sa):"<"!=sa.charAt(0)&&(sa=Graph.decompress(sa)))}catch(Ca){}return sa});if("json"==urlParams.proto){var da=
+!1;try{K=JSON.parse(K),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[M],"data",[K])}catch(sa){K=null}try{if(null==K)return;if("dialog"==K.action){this.showError(null!=K.titleKey?mxResources.get(K.titleKey):K.title,null!=K.messageKey?mxResources.get(K.messageKey):mxUtils.htmlEntities(K.message),null!=K.buttonKey?mxResources.get(K.buttonKey):K.button);null!=K.modified&&(this.editor.modified=K.modified);return}if("layout"==K.action){this.executeLayouts(this.editor.graph.createLayouts(K.layouts));
+return}if("prompt"==K.action){this.spinner.stop();var ba=new FilenameDialog(this,K.defaultValue||"",null!=K.okKey?mxResources.get(K.okKey):K.ok,function(sa){null!=sa?G.postMessage(JSON.stringify({event:"prompt",value:sa,message:K}),"*"):G.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")},null!=K.titleKey?mxResources.get(K.titleKey):K.title,null,null,null,null,function(){G.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")});this.showDialog(ba.container,300,80,!0,
+!1);ba.init();return}if("draft"==K.action){var na=ja(K.xml);this.spinner.stop();ba=new DraftDialog(this,mxResources.get("draftFound",[K.name||this.defaultFilename]),na,mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"edit",message:K}),"*")}),mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"discard",message:K}),"*")}),K.editKey?mxResources.get(K.editKey):null,K.discardKey?mxResources.get(K.discardKey):
+null,K.ignore?mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"ignore",message:K}),"*")}):null);this.showDialog(ba.container,640,480,!0,!1,mxUtils.bind(this,function(sa){sa&&this.actions.get("exit").funct()}));try{ba.init()}catch(sa){G.postMessage(JSON.stringify({event:"draft",error:sa.toString(),message:K}),"*")}return}if("template"==K.action){this.spinner.stop();var ca=1==K.enableRecent,ka=1==K.enableSearch,aa=1==K.enableCustomTemp;ba=new NewDialog(this,
+!1,K.templatesOnly?!1:null!=K.callback,mxUtils.bind(this,function(sa,Ca,Da,va){sa=sa||this.emptyDiagramXml;null!=K.callback?G.postMessage(JSON.stringify({event:"template",xml:sa,blank:sa==this.emptyDiagramXml,name:Ca,tempUrl:Da,libs:va,builtIn:!0,message:K}),"*"):(c(sa,M,sa!=this.emptyDiagramXml,K.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,ca?mxUtils.bind(this,function(sa){this.remoteInvoke("getRecentDiagrams",[null],null,sa,function(){sa(null,"Network Error!")})}):
+null,ka?mxUtils.bind(this,function(sa,Ca){this.remoteInvoke("searchDiagrams",[sa,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(sa,Ca,Da){G.postMessage(JSON.stringify({event:"template",docUrl:sa,info:Ca,name:Da}),"*")}),null,null,aa?mxUtils.bind(this,function(sa){this.remoteInvoke("getCustomTemplates",null,null,sa,function(){sa({},0)})}):null,1==K.withoutType,null,K.templatesOnly);this.showDialog(ba.container,620,460,!0,!1,mxUtils.bind(this,function(sa){null!=
+this.sidebar&&this.sidebar.hideTooltip();sa&&this.actions.get("exit").funct()}));ba.init();return}if("textContent"==K.action){var V=this.getDiagramTextContent();G.postMessage(JSON.stringify({event:"textContent",data:V,message:K}),"*");return}if("status"==K.action){this.updateStatus(mxUtils.bind(this,function(){null!=K.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(K.messageKey))):null!=K.message&&this.editor.setStatus(mxUtils.htmlEntities(K.message))}));null!=K.modified&&(this.editor.modified=
+K.modified);return}if("spinner"==K.action){var k=null!=K.messageKey?mxResources.get(K.messageKey):K.message;null==K.show||K.show?this.spinner.spin(document.body,k):this.spinner.stop();return}if("exit"==K.action){this.actions.get("exit").funct();return}if("viewport"==K.action){if(null!=K.viewport){var v=this.editor.graph,J=v.view.translate.x,N=v.view.translate.y;this.embedViewport=K.viewport;v.refresh();this.diagramContainer.scrollTop-=(N-v.view.translate.y)*v.view.scale;this.diagramContainer.scrollLeft-=
+(J-v.view.translate.x)*v.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==K.action){ba=null;try{var T=this.diagramContainer.getAttribute("data-scrollState");null!=T&&(this.diagramContainer.removeAttribute("data-scrollState"),ba=JSON.parse(T))}catch(sa){}Editor.inlineFullscreen=K.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=ba&&this.restoreScrollState(ba);return}if("snapshot"==K.action){this.sendEmbeddedSvgExport(!0);return}if("export"==
K.action){if("png"==K.format||"xmlpng"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){var W=null!=K.xml?K.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);v=this.editor.graph;var U=mxUtils.bind(this,function(sa,Ca){if(K.withSvg)K.withSvg=!1,this.getEmbeddedSvg(W,this.editor.graph,null,!0,function(va){U(sa,va)},null,null,K.embedImages,this.editor.graph.background,K.scale,K.border,K.shadow,"auto");else{this.editor.graph.setEnabled(!0);
-this.spinner.stop();var Da=this.createLoadMessage("export");Da.format=K.format;Da.message=K;Da.data=sa;Da.svg=Ca;Da.xml=W;H.postMessage(JSON.stringify(Da),"*")}}),Y=mxUtils.bind(this,function(sa){null==sa&&(sa=Editor.blankImage);"xmlpng"==K.format&&(sa=Editor.writeGraphModelToPng(sa,"tEXt","mxfile",encodeURIComponent(W)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);U(sa)}),fa=K.pageId||(null!=this.pages?K.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var na=
+this.spinner.stop();var Da=this.createLoadMessage("export");Da.format=K.format;Da.message=K;Da.data=sa;Da.svg=Ca;Da.xml=W;G.postMessage(JSON.stringify(Da),"*")}}),Y=mxUtils.bind(this,function(sa){null==sa&&(sa=Editor.blankImage);"xmlpng"==K.format&&(sa=Editor.writeGraphModelToPng(sa,"tEXt","mxfile",encodeURIComponent(W)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);U(sa)}),fa=K.pageId||(null!=this.pages?K.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var oa=
mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=fa){var sa=v.getGlobalVariable;v=this.createTemporaryGraph(v.getStylesheet());for(var Ca,Da=0;Da<this.pages.length;Da++)if(this.pages[Da].getId()==fa){Ca=this.updatePageRoot(this.pages[Da]);break}null==Ca&&(Ca=this.currentPage);v.getGlobalVariable=function(Ua){return"page"==Ua?Ca.getName():"pagenumber"==Ua?1:sa.apply(this,arguments)};document.body.appendChild(v.container);v.model.setRoot(Ca.root)}if(null!=K.layerIds){var va=
-v.model,Na=va.getChildCells(va.getRoot()),Sa={};for(Da=0;Da<K.layerIds.length;Da++)Sa[K.layerIds[Da]]=!0;for(Da=0;Da<Na.length;Da++)va.setVisible(Na[Da],Sa[Na[Da].id]||!1)}Da=null;K.keepTheme&&(Da=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ua){Y(Ua.toDataURL("image/png"))}),K.width,null,K.background,mxUtils.bind(this,function(){Y(null)}),null,null,K.scale,K.transparent,K.shadow,null,v,K.border,null,K.grid,Da)});null!=K.xml&&0<K.xml.length&&(m=!0,this.setFileData(W),
-m=!1);na()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==K.format?"1":"0")+(null!=fa?"&pageId="+fa:"")+(null!=K.layerIds&&0<K.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:K.layerIds})):"")+(null!=K.scale?"&scale="+K.scale:"")+"&base64=1&xml="+encodeURIComponent(W))).send(mxUtils.bind(this,function(sa){200<=sa.getStatus()&&299>=sa.getStatus()?U("data:image/png;base64,"+sa.getText()):Y(null)}),mxUtils.bind(this,function(){Y(null)}))}}else if(na=mxUtils.bind(this,
+v.model,Na=va.getChildCells(va.getRoot()),Sa={};for(Da=0;Da<K.layerIds.length;Da++)Sa[K.layerIds[Da]]=!0;for(Da=0;Da<Na.length;Da++)va.setVisible(Na[Da],Sa[Na[Da].id]||!1)}Da=null;K.keepTheme&&(Da=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ua){Y(Ua.toDataURL("image/png"))}),K.width,null,K.background,mxUtils.bind(this,function(){Y(null)}),null,null,K.scale,K.transparent,K.shadow,null,v,K.border,null,K.grid,Da)});null!=K.xml&&0<K.xml.length&&(l=!0,this.setFileData(W),
+l=!1);oa()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==K.format?"1":"0")+(null!=fa?"&pageId="+fa:"")+(null!=K.layerIds&&0<K.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:K.layerIds})):"")+(null!=K.scale?"&scale="+K.scale:"")+"&base64=1&xml="+encodeURIComponent(W))).send(mxUtils.bind(this,function(sa){200<=sa.getStatus()&&299>=sa.getStatus()?U("data:image/png;base64,"+sa.getText()):Y(null)}),mxUtils.bind(this,function(){Y(null)}))}}else if(oa=mxUtils.bind(this,
function(){var sa=this.createLoadMessage("export");sa.message=K;if("html2"==K.format||"html"==K.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Ca=this.getXmlFileData();sa.xml=mxUtils.getXml(Ca);sa.data=this.getFileData(null,null,!0,null,null,null,Ca);sa.format=K.format}else if("html"==K.format)Ca=this.editor.getGraphXml(),sa.data=this.getHtml(Ca,this.editor.graph),sa.xml=mxUtils.getXml(Ca),sa.format=K.format;else{mxSvgCanvas2D.prototype.foAltText=null;Ca=null!=K.background?
-K.background:this.editor.graph.background;Ca==mxConstants.NONE&&(Ca=null);sa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);sa.format="svg";var Da=mxUtils.bind(this,function(Na){this.editor.graph.setEnabled(!0);this.spinner.stop();sa.data=K.asText?Na:Editor.createSvgDataUri(Na);H.postMessage(JSON.stringify(sa),"*")}),va="auto";K.keepTheme&&(va=Editor.isDarkMode()?"dark":"light");null!=K.theme&&(va=K.theme);if("xmlsvg"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,
+K.background:this.editor.graph.background;Ca==mxConstants.NONE&&(Ca=null);sa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);sa.format="svg";var Da=mxUtils.bind(this,function(Na){this.editor.graph.setEnabled(!0);this.spinner.stop();sa.data=K.asText?Na:Editor.createSvgDataUri(Na);G.postMessage(JSON.stringify(sa),"*")}),va="auto";K.keepTheme&&(va=Editor.isDarkMode()?"dark":"light");null!=K.theme&&(va=K.theme);if("xmlsvg"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,
null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){va=null;if(this.isAutoDarkMode()||Editor.isDarkMode())va="auto";null!=K.theme&&(va=K.theme);this.getEmbeddedSvg(sa.xml,this.editor.graph,null,!0,Da,null,null,K.embedImages,Ca,K.scale,K.border,K.shadow,va)}}else if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin))this.editor.graph.setEnabled(!1),Ca=this.editor.graph.getSvg(Ca,K.scale,K.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||
-K.shadow,null,va),(this.editor.graph.shadowVisible||K.shadow)&&this.editor.graph.addSvgShadow(Ca),this.embedFonts(Ca,mxUtils.bind(this,function(Na){K.embedImages||null==K.embedImages?this.editor.convertImages(Na,mxUtils.bind(this,function(Sa){Da(mxUtils.getXml(Sa))})):Da(mxUtils.getXml(Na))}));return}H.postMessage(JSON.stringify(sa),"*")}),null!=K.xml&&0<K.xml.length){if(this.editor.graph.mathEnabled){var la=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){la.apply(this,arguments);na()}}m=!0;
-this.setFileData(K.xml);m=!1;this.editor.graph.mathEnabled||na()}else na();return}if("load"==K.action){ca=K.toSketch;n=1==K.autosave;this.hideDialog();null!=K.modified&&null==urlParams.modified&&(urlParams.modified=K.modified);null!=K.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=K.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),
+K.shadow,null,va),(this.editor.graph.shadowVisible||K.shadow)&&this.editor.graph.addSvgShadow(Ca),this.embedFonts(Ca,mxUtils.bind(this,function(Na){K.embedImages||null==K.embedImages?this.editor.convertImages(Na,mxUtils.bind(this,function(Sa){Da(mxUtils.getXml(Sa))})):Da(mxUtils.getXml(Na))}));return}G.postMessage(JSON.stringify(sa),"*")}),null!=K.xml&&0<K.xml.length){if(this.editor.graph.mathEnabled){var la=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){la.apply(this,arguments);oa()}}l=!0;
+this.setFileData(K.xml);l=!1;this.editor.graph.mathEnabled||oa()}else oa();return}if("load"==K.action){da=K.toSketch;n=1==K.autosave;this.hideDialog();null!=K.modified&&null==urlParams.modified&&(urlParams.modified=K.modified);null!=K.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=K.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),
"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+"+Editor.shiftKey+"+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=K.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=K.noSaveBtn);if(null!=K.rough){var qa=Editor.sketchMode;this.doSetSketchMode(K.rough);qa!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=K.dark&&this.setDarkMode(K.dark);null!=K.border&&(this.embedExportBorder=K.border);null!=K.theme&&(this.embedExportTheme=
K.theme);null!=K.background&&(this.embedExportBackground=K.background);null!=K.viewport&&(this.embedViewport=K.viewport);this.embedExitPoint=null;if(null!=K.rect){var ya=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,K.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,K.rect.top)+"px";this.minInlineWidth=K.minWidth;this.minInlineHeight=K.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
"";var wa=K.maxFitScale,Ia=K.rect.width+2*ya,Aa=K.rect.height+2*ya;Z=mxUtils.bind(this,function(){var sa=mxUtils.getDocumentSize();Ia=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Ia):Ia,sa.width-80);sa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,Aa):Aa,sa.height-80);this.diagramContainer.style.width=Ia+"px";this.diagramContainer.style.height=sa+"px";var Ca=this.editor.graph;sa=Ca.maxFitScale;Ca.maxFitScale=wa;Ca.fit(2*ya,null,null,null,null,null,Aa);this.setPageVisible(!1);
if(null!=this.minInlineWidth&&Ca.getGraphBounds().width<this.minInlineWidth){var Da=Ca.container.scrollTop;this.resetScrollbars();Ca.container.scrollTop=Da}Ca.maxFitScale=sa;Ca.container.scrollTop-=ya;Ca.container.scrollLeft-=ya;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[K]));Ca.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=Ca.container.style.top);
var va=Ca.getGraphBounds();Ca.container.clientWidth>va.width+2*ya&&(Ca.container.scrollLeft=va.x+(va.width+ya-Ca.container.clientWidth)/2)}),10)})}null!=K.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=K.noExitBtn);null!=K.title&&null!=this.buttonContainer&&this.setEmbedTitle(K.title);try{K.libs&&this.sidebar.showEntries(K.libs)}catch(sa){}K=null!=K.xmlpng?this.extractGraphModelFromPng(K.xmlpng):null!=K.descriptor?K.descriptor:K.xml}else{if("merge"==K.action){var Ba=this.getCurrentFile();
-null!=Ba&&(oa=ha(K.xml),null!=oa&&""!=oa&&Ba.mergeFile(new LocalFile(this,oa),function(){H.postMessage(JSON.stringify({event:"merge",message:K}),"*")},function(sa){H.postMessage(JSON.stringify({event:"merge",message:K,error:sa}),"*")}))}else"remoteInvokeReady"==K.action?this.handleRemoteInvokeReady(H):"remoteInvoke"==K.action?this.handleRemoteInvoke(K,L.origin):"remoteInvokeResponse"==K.action?this.handleRemoteInvokeResponse(K):H.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(K)}),
-"*");return}}catch(sa){this.handleError(sa)}}var Ga=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ma=mxUtils.bind(this,function(sa,Ca){m=!0;try{c(sa,Ca,null,ca)}catch(Da){this.handleError(Da)}m=!1;null!=urlParams.modified&&this.clearStatus();x=Ga();n&&null==g&&(g=mxUtils.bind(this,function(Da,va){Da=Ga();Da==x||m||(va=this.createLoadMessage("autosave"),va.xml=Da,(window.opener||window.parent).postMessage(JSON.stringify(va),
+null!=Ba&&(na=ja(K.xml),null!=na&&""!=na&&Ba.mergeFile(new LocalFile(this,na),function(){G.postMessage(JSON.stringify({event:"merge",message:K}),"*")},function(sa){G.postMessage(JSON.stringify({event:"merge",message:K,error:sa}),"*")}))}else"remoteInvokeReady"==K.action?this.handleRemoteInvokeReady(G):"remoteInvoke"==K.action?this.handleRemoteInvoke(K,M.origin):"remoteInvokeResponse"==K.action?this.handleRemoteInvokeResponse(K):G.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(K)}),
+"*");return}}catch(sa){this.handleError(sa)}}var Ga=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ma=mxUtils.bind(this,function(sa,Ca){l=!0;try{c(sa,Ca,null,da)}catch(Da){this.handleError(Da)}l=!1;null!=urlParams.modified&&this.clearStatus();x=Ga();n&&null==g&&(g=mxUtils.bind(this,function(Da,va){Da=Ga();Da==x||l||(va=this.createLoadMessage("autosave"),va.xml=Da,(window.opener||window.parent).postMessage(JSON.stringify(va),
"*"));x=Da}),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)Ca=this.createLoadMessage("load"),Ca.xml=sa,H.postMessage(JSON.stringify(Ca),"*");null!=Z&&Z()});null!=K&&"function"===typeof K.substring&&"data:application/vnd.visio;base64,"==K.substring(0,34)?(ha="0M8R4KGxGuE"==K.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(sa){Ma(sa,L)},mxUtils.bind(this,function(sa){this.handleError(sa)}),ha)):null!=
-K&&"function"===typeof K.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(K,mxUtils.bind(this,function(sa){4==sa.readyState&&(200<=sa.status&&299>=sa.status&&"<mxGraphModel"==sa.responseText.substring(0,13)?Ma(sa.responseText,L):this.handleError({message:413==sa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=K&&"function"===typeof K.substring&&
-this.isLucidChartData(K)?this.convertLucidChart(K,mxUtils.bind(this,function(sa){Ma(sa)}),mxUtils.bind(this,function(sa){this.handleError(sa)})):null==K||"object"!==typeof K||null==K.format||null==K.data&&null==K.url?(K=ha(K),Ma(K,L)):this.loadDescriptor(K,mxUtils.bind(this,function(sa){Ma(Ga(),L)}),mxUtils.bind(this,function(sa){this.handleError(sa,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;F="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||
-"ready";H.postMessage(F,"*");if("json"==urlParams.proto){var M=this.editor.graph.openLink;this.editor.graph.openLink=function(L,K,Z){M.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:L,target:K,allowOpener:Z}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,g,m,n){var x=document.createElement("button");x.className="geEmbedBtn geBtn";x.setAttribute("title",c+(null!=m?" ("+m+")":""));mxUtils.write(x,c);n&&x.classList.add("gePrimaryBtn");mxEvent.addListener(x,"click",
+g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Ca=this.createLoadMessage("load"),Ca.xml=sa,G.postMessage(JSON.stringify(Ca),"*");null!=Z&&Z()});null!=K&&"function"===typeof K.substring&&"data:application/vnd.visio;base64,"==K.substring(0,34)?(ja="0M8R4KGxGuE"==K.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(sa){Ma(sa,M)},mxUtils.bind(this,function(sa){this.handleError(sa)}),ja)):null!=
+K&&"function"===typeof K.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(K,mxUtils.bind(this,function(sa){4==sa.readyState&&(200<=sa.status&&299>=sa.status&&"<mxGraphModel"==sa.responseText.substring(0,13)?Ma(sa.responseText,M):this.handleError({message:413==sa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=K&&"function"===typeof K.substring&&
+this.isLucidChartData(K)?this.convertLucidChart(K,mxUtils.bind(this,function(sa){Ma(sa)}),mxUtils.bind(this,function(sa){this.handleError(sa)})):null==K||"object"!==typeof K||null==K.format||null==K.data&&null==K.url?(K=ja(K),Ma(K,M)):this.loadDescriptor(K,mxUtils.bind(this,function(sa){Ma(Ga(),M)}),mxUtils.bind(this,function(sa){this.handleError(sa,mxResources.get("errorLoadingFile"))}))}}));var G=window.opener||window.parent;F="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||
+"ready";G.postMessage(F,"*");if("json"==urlParams.proto){var L=this.editor.graph.openLink;this.editor.graph.openLink=function(M,K,Z){L.apply(this,arguments);G.postMessage(JSON.stringify({event:"openLink",href:M,target:K,allowOpener:Z}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,g,l,n){var x=document.createElement("button");x.className="geEmbedBtn geBtn";x.setAttribute("title",c+(null!=l?" ("+l+")":""));mxUtils.write(x,c);n&&x.classList.add("gePrimaryBtn");mxEvent.addListener(x,"click",
g);return x};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==
this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),
mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+"+Editor.shiftKey+"+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct))}))};
EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new SimpleTextareaDialog(this,Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),mxResources.get("import"),"https://www.drawio.com/blog/insert-from-csv"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,new mxRectangle(0,0,320,280));this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,
-function(){var g=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(m){if(0<m.length)try{var n=JSON.parse(m);this.executeLayouts(this.editor.graph.createLayouts(n));this.customLayoutConfig=n;this.hideDialog()}catch(x){this.handleError(x)}}),null,null,null,null,mxUtils.bind(this,function(m,n){var x=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var F=n.value;n.value=JSON.stringify(JSON.parse(F));n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));n.value=F}catch(H){this.handleError(H)}}));x.setAttribute("title","copy");x.className="geBtn";m.appendChild(x)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(g){var m=mxUtils.bind(this,function(){this.loadingOrgChart=
-!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),n=mxUtils.bind(this,function(x){this.loadingOrgChart=!1;g.clear()&&this.handleError(x)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?m():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",m,null,null,null,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",m,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(c,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,g)}))};EditorUi.prototype.doImportCsv=function(c,g){try{var m=c.split("\n"),n=[],x=[],F=[],H={};if(0<m.length){var M={},L=this.editor.graph,K=null,Z=null,ha=null,ca=null,
-aa=null,oa=null,da=null,ka="whiteSpace=wrap;html=1;",ba=null,V=null,k="",v="auto",I="auto",N=!1,T=null,W=null,U=40,Y=40,fa=100,na=0,la=mxUtils.bind(this,function(){null!=g?g(ra):(L.setSelectionCells(ra),L.scrollCellToVisible(L.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),qa=L.getFreeInsertPoint(),ya=qa.x,wa=qa.y;qa=wa;var Ia=null,Aa="auto";V=null;for(var Ba=[],Ga=null,Ma=null,sa=0;sa<m.length&&"#"==m[sa].charAt(0);){c=
-m[sa].replace(/\r$/,"");for(sa++;sa<m.length&&"\\"==c.charAt(c.length-1)&&"#"==m[sa].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(m[sa].substring(1)),sa++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var Da=mxUtils.trim(c.substring(1,Ca)),va=mxUtils.trim(c.substring(Ca+1));"label"==Da?Ia=Graph.sanitizeHtml(va):"labelname"==Da&&0<va.length&&"-"!=va?aa=va:"labels"==Da&&0<va.length&&"-"!=va?da=JSON.parse(va):"style"==Da?Z=va:"parentstyle"==Da?ka=va:"unknownStyle"==Da&&"-"!=va?oa=va:"stylename"==
-Da&&0<va.length&&"-"!=va?ca=va:"styles"==Da&&0<va.length&&"-"!=va?ha=JSON.parse(va):"vars"==Da&&0<va.length&&"-"!=va?K=JSON.parse(va):"identity"==Da&&0<va.length&&"-"!=va?ba=va:"parent"==Da&&0<va.length&&"-"!=va?V=va:"namespace"==Da&&0<va.length&&"-"!=va?k=va:"width"==Da?v=va:"height"==Da?I=va:"collapsed"==Da&&"-"!=va?N="true"==va:"left"==Da&&0<va.length?T=va:"top"==Da&&0<va.length?W=va:"ignore"==Da?Ma=va.split(","):"connect"==Da?Ba.push(JSON.parse(va)):"link"==Da?Ga=va:"padding"==Da?na=parseFloat(va):
-"edgespacing"==Da?U=parseFloat(va):"nodespacing"==Da?Y=parseFloat(va):"levelspacing"==Da?fa=parseFloat(va):"layout"==Da&&(Aa=va)}}}if(null==m[sa])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(m[sa].replace(/\r$/,""));Ca=c=null;Da=[];for(va=0;va<Na.length;va++)ba==Na[va]&&(c=va),V==Na[va]&&(Ca=va),Da.push(mxUtils.trim(Na[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ia&&(Ia="%"+Da[0]+"%");if(null!=Ba)for(var Sa=0;Sa<Ba.length;Sa++)null==
-M[Ba[Sa].to]&&(M[Ba[Sa].to]={});ba=[];for(va=sa+1;va<m.length;va++){var Ua=this.editor.csvToArray(m[va].replace(/\r$/,""));if(null==Ua){var Qa=40<m[va].length?m[va].substring(0,40)+"...":m[va];throw Error(Qa+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Ua.length&&ba.push(Ua)}L.model.beginUpdate();try{for(va=0;va<ba.length;va++){Ua=ba[va];var za=null,Ea=null!=c?k+Ua[c]:null;m=!1;null!=Ea&&(za=L.model.getCell(Ea),m=null==za||0<=mxUtils.indexOf(n,za));var B=new mxCell(Ia,new mxGeometry(ya,
-qa,0,0),Z||"whiteSpace=wrap;html=1;");B.collapsed=N;B.vertex=!0;B.id=Ea;null==za||m||L.model.setCollapsed(za,N);for(var Q=0;Q<Ua.length;Q++)L.setAttributeForCell(B,Da[Q],Ua[Q]),null==za||m||L.setAttributeForCell(za,Da[Q],Ua[Q]);if(null!=aa&&null!=da){var R=da[B.getAttribute(aa)];null!=R&&(L.labelChanged(B,R),null==za||m||L.cellLabelChanged(za,R))}if(null!=ca&&null!=ha){var X=ha[B.getAttribute(ca)];null!=X&&(B.style=X)}L.setAttributeForCell(B,"placeholders","1");B.style=L.replacePlaceholders(B,B.style,
-K);null==za||m?L.fireEvent(new mxEventObject("cellsInserted","cells",[B])):(L.model.setStyle(za,B.style),0>mxUtils.indexOf(F,za)&&F.push(za),L.fireEvent(new mxEventObject("cellsInserted","cells",[za])));m=null!=za;za=B;if(!m)for(Sa=0;Sa<Ba.length;Sa++)M[Ba[Sa].to][za.getAttribute(Ba[Sa].to)]=za;null!=Ga&&"link"!=Ga&&(L.setLinkForCell(za,za.getAttribute(Ga)),L.setAttributeForCell(za,Ga,null));var ia=this.editor.graph.getPreferredSizeForCell(za);V=null!=Ca?L.model.getCell(k+Ua[Ca]):null;if(za.vertex){Qa=
-null!=V?0:ya;sa=null!=V?0:wa;null!=T&&null!=za.getAttribute(T)&&(za.geometry.x=Qa+parseFloat(za.getAttribute(T)));null!=W&&null!=za.getAttribute(W)&&(za.geometry.y=sa+parseFloat(za.getAttribute(W)));var ja="@"==v.charAt(0)?za.getAttribute(v.substring(1)):null;za.geometry.width=null!=ja&&"auto"!=ja?parseFloat(za.getAttribute(v.substring(1))):"auto"==v||"auto"==ja?ia.width+na:parseFloat(v);var pa="@"==I.charAt(0)?za.getAttribute(I.substring(1)):null;za.geometry.height=null!=pa&&"auto"!=pa&&"width"!=
-I?parseFloat(pa):"auto"==I||"auto"==pa?ia.height+na:"width"==I?za.geometry.width:parseFloat(I);qa+=za.geometry.height+Y}m?(null==H[Ea]&&(H[Ea]=[]),H[Ea].push(za)):(n.push(za),null!=V?(V.style=L.replacePlaceholders(V,ka,K),L.addCell(za,V),x.push(V)):F.push(L.addCell(za)))}for(va=0;va<x.length;va++)ja="@"==v.charAt(0)?x[va].getAttribute(v.substring(1)):null,pa="@"==I.charAt(0)?x[va].getAttribute(I.substring(1)):null,"auto"!=v&&"auto"!=ja||"auto"!=I&&"auto"!=pa||L.updateGroupBounds([x[va]],na,!0);var xa=
-F.slice(),ra=F.slice();for(Sa=0;Sa<Ba.length;Sa++){var ua=Ba[Sa];for(va=0;va<n.length;va++){za=n[va];var Ka=mxUtils.bind(this,function(lb,pb,gb){var qb=pb.getAttribute(gb.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var ub=0;ub<qb.length;ub++){var hb=M[gb.to][qb[ub]];if(null==hb&&null!=oa){hb=new mxCell(qb[ub],new mxGeometry(ya,wa,0,0),oa);hb.style=L.replacePlaceholders(pb,hb.style,K);var nb=this.editor.graph.getPreferredSizeForCell(hb);hb.geometry.width=nb.width+na;hb.geometry.height=nb.height+
-na;M[gb.to][qb[ub]]=hb;hb.vertex=!0;hb.id=qb[ub];F.push(L.addCell(hb))}if(null!=hb){nb=gb.label;null!=gb.fromlabel&&(nb=(pb.getAttribute(gb.fromlabel)||"")+(nb||""));null!=gb.sourcelabel&&(nb=L.replacePlaceholders(pb,gb.sourcelabel,K)+(nb||""));null!=gb.tolabel&&(nb=(nb||"")+(hb.getAttribute(gb.tolabel)||""));null!=gb.targetlabel&&(nb=(nb||"")+L.replacePlaceholders(hb,gb.targetlabel,K));var ob="target"==gb.placeholders==!gb.invert?hb:lb;ob=null!=gb.style?L.replacePlaceholders(ob,gb.style,K):L.createCurrentEdgeStyle();
-nb=L.insertEdge(null,null,nb||"",gb.invert?hb:lb,gb.invert?lb:hb,ob);if(null!=gb.labels)for(ob=0;ob<gb.labels.length;ob++){var rb=gb.labels[ob],vb=new mxCell(rb.label||ob,new mxGeometry(null!=rb.x?rb.x:0,null!=rb.y?rb.y:0,0,0),"resizable=0;html=1;");vb.vertex=!0;vb.connectable=!1;vb.geometry.relative=!0;null!=rb.placeholders&&(vb.value=L.replacePlaceholders("target"==rb.placeholders==!gb.invert?hb:lb,vb.value,K));if(null!=rb.dx||null!=rb.dy)vb.geometry.offset=new mxPoint(null!=rb.dx?rb.dx:0,null!=
-rb.dy?rb.dy:0);nb.insert(vb)}if(null!=gb.data)for(var Ab in gb.data)L.setAttributeForCell(nb,Ab,gb.data[Ab]);ra.push(nb);mxUtils.remove(gb.invert?lb:hb,xa)}}}});Ka(za,za,ua);if(null!=H[za.id])for(Q=0;Q<H[za.id].length;Q++)Ka(za,H[za.id][Q],ua)}}if(null!=Ma)for(va=0;va<n.length;va++)for(za=n[va],Q=0;Q<Ma.length;Q++)L.setAttributeForCell(za,mxUtils.trim(Ma[Q]),null);if(0<F.length){var Va=new mxParallelEdgeLayout(L);Va.spacing=U;Va.checkOverlap=!0;var Oa=function(){0<Va.spacing&&Va.execute(L.getDefaultParent());
-for(var lb=0;lb<F.length;lb++){var pb=L.getCellGeometry(F[lb]);pb.x=Math.round(L.snap(pb.x));pb.y=Math.round(L.snap(pb.y));"auto"==v&&(pb.width=Math.round(L.snap(pb.width)));"auto"==I&&(pb.height=Math.round(L.snap(pb.height)))}};if("["==Aa.charAt(0)){var Ta=la;L.view.validate();this.executeLayouts(L.createLayouts(JSON.parse(Aa)),function(){Oa();Ta()});la=null}else if("circle"==Aa){var Za=new mxCircleLayout(L);Za.disableEdgeStyle=!1;Za.resetEdges=!1;var Pa=Za.isVertexIgnored;Za.isVertexIgnored=function(lb){return Pa.apply(this,
-arguments)||0>mxUtils.indexOf(F,lb)};this.executeLayout(function(){Za.execute(L.getDefaultParent());Oa()},!0,la);la=null}else if("horizontaltree"==Aa||"verticaltree"==Aa||"auto"==Aa&&ra.length==2*F.length-1&&1==xa.length){L.view.validate();var Ra=new mxCompactTreeLayout(L,"horizontaltree"==Aa);Ra.levelDistance=Y;Ra.edgeRouting=!1;Ra.resetEdges=!1;Ra.sortEdges=!0;this.executeLayout(function(){Ra.execute(L.getDefaultParent(),0<xa.length?xa[0]:null)},!0,la);la=null}else if("horizontalflow"==Aa||"verticalflow"==
-Aa||"auto"==Aa&&1==xa.length){L.view.validate();var fb=new mxHierarchicalLayout(L,"horizontalflow"==Aa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fb.intraCellSpacing=Y;fb.parallelEdgeSpacing=U;fb.interRankCellSpacing=fa;fb.disableEdgeStyle=!1;this.executeLayout(function(){fb.execute(L.getDefaultParent(),ra);L.moveCells(ra,ya,wa)},!0,la);la=null}else if("orgchart"==Aa){L.view.validate();var eb=new mxOrgChartLayout(L,2,fa,Y),bb=eb.isVertexIgnored;eb.isVertexIgnored=function(lb){return bb.apply(this,
-arguments)||0>mxUtils.indexOf(F,lb)};this.executeLayout(function(){eb.execute(L.getDefaultParent());Oa()},!0,la);la=null}else if("organic"==Aa||"auto"==Aa&&ra.length>F.length){L.view.validate();var db=new mxFastOrganicLayout(L);db.forceConstant=3*Y;db.disableEdgeStyle=!1;db.resetEdges=!1;var mb=db.isVertexIgnored;db.isVertexIgnored=function(lb){return mb.apply(this,arguments)||0>mxUtils.indexOf(F,lb)};this.executeLayout(function(){db.execute(L.getDefaultParent());Oa()},!0,la);la=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=
-la&&la()}}catch(lb){this.handleError(lb)}};EditorUi.prototype.getSearch=function(c){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var m="?",n;for(n in urlParams)0>mxUtils.indexOf(c,n)&&null!=urlParams[n]&&(g+=m+n+"="+urlParams[n],m="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var g=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var m="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-n;for(n in urlParams)0>mxUtils.indexOf(m,n)&&(c=0==g?c+"?":c+"&",null!=urlParams[n]&&(c+=n+"="+urlParams[n],g++))}return c};EditorUi.prototype.showLinkDialog=function(c,g,m,n,x){c=new LinkDialog(this,c,g,m,!0,n,x);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){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++;c&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),g=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var m=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!m);
-this.actions.get("print").setEnabled(!m);this.menus.get("exportAs").setEnabled(!m);this.menus.get("embed").setEnabled(!m);m="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(m);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(m),this.menus.get("newLibrary").setEnabled(m));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);
+function(){var g=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var n=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(n));this.customLayoutConfig=n;this.hideDialog()}catch(x){this.handleError(x)}}),null,null,null,null,mxUtils.bind(this,function(l,n){var x=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var F=n.value;n.value=JSON.stringify(JSON.parse(F));n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));n.value=F}catch(G){this.handleError(G)}}));x.setAttribute("title","copy");x.className="geBtn";l.appendChild(x)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(g){var l=mxUtils.bind(this,function(){this.loadingOrgChart=
+!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),n=mxUtils.bind(this,function(x){this.loadingOrgChart=!1;g.clear()&&this.handleError(x)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():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",l,null,null,null,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(c,g,l){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,g,l)}))};EditorUi.prototype.doImportCsv=function(c,g,l){try{var n=c.split("\n"),x=[],F=[],G=[],L={};if(0<n.length){var M={};l=null!=l?l:this.editor.graph;var K=null,
+Z=null,ja=null,da=null,ba=null,na=null,ca=null,ka="whiteSpace=wrap;html=1;",aa=null,V=null,k="",v="auto",J="auto",N=!1,T=null,W=null,U=40,Y=40,fa=100,oa=0,la=mxUtils.bind(this,function(){null!=g?g(ra):(l.setSelectionCells(ra),l.scrollCellToVisible(l.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),qa=l.getFreeInsertPoint(),ya=qa.x,wa=qa.y;qa=wa;var Ia=null,Aa="auto";V=null;for(var Ba=[],Ga=null,Ma=null,sa=0;sa<n.length&&
+"#"==n[sa].charAt(0);){c=n[sa].replace(/\r$/,"");for(sa++;sa<n.length&&"\\"==c.charAt(c.length-1)&&"#"==n[sa].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(n[sa].substring(1)),sa++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var Da=mxUtils.trim(c.substring(1,Ca)),va=mxUtils.trim(c.substring(Ca+1));"label"==Da?Ia=Graph.sanitizeHtml(va):"labelname"==Da&&0<va.length&&"-"!=va?ba=va:"labels"==Da&&0<va.length&&"-"!=va?ca=JSON.parse(va):"style"==Da?Z=va:"parentstyle"==Da?ka=va:"unknownStyle"==
+Da&&"-"!=va?na=va:"stylename"==Da&&0<va.length&&"-"!=va?da=va:"styles"==Da&&0<va.length&&"-"!=va?ja=JSON.parse(va):"vars"==Da&&0<va.length&&"-"!=va?K=JSON.parse(va):"identity"==Da&&0<va.length&&"-"!=va?aa=va:"parent"==Da&&0<va.length&&"-"!=va?V=va:"namespace"==Da&&0<va.length&&"-"!=va?k=va:"width"==Da?v=va:"height"==Da?J=va:"collapsed"==Da&&"-"!=va?N="true"==va:"left"==Da&&0<va.length?T=va:"top"==Da&&0<va.length?W=va:"ignore"==Da?Ma=va.split(","):"connect"==Da?Ba.push(JSON.parse(va)):"link"==Da?Ga=
+va:"padding"==Da?oa=parseFloat(va):"edgespacing"==Da?U=parseFloat(va):"nodespacing"==Da?Y=parseFloat(va):"levelspacing"==Da?fa=parseFloat(va):"layout"==Da&&(Aa=va)}}}if(null==n[sa])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(n[sa].replace(/\r$/,""));Ca=c=null;Da=[];for(va=0;va<Na.length;va++)aa==Na[va]&&(c=va),V==Na[va]&&(Ca=va),Da.push(mxUtils.trim(Na[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ia&&(Ia="%"+Da[0]+"%");if(null!=
+Ba)for(var Sa=0;Sa<Ba.length;Sa++)null==M[Ba[Sa].to]&&(M[Ba[Sa].to]={});aa=[];for(va=sa+1;va<n.length;va++){var Ua=this.editor.csvToArray(n[va].replace(/\r$/,""));if(null==Ua){var Qa=40<n[va].length?n[va].substring(0,40)+"...":n[va];throw Error(Qa+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Ua.length&&aa.push(Ua)}l.model.beginUpdate();try{for(va=0;va<aa.length;va++){Ua=aa[va];var za=null,Ea=null!=c?k+Ua[c]:null;n=!1;null!=Ea&&(za=l.model.getCell(Ea),n=null==za||0<=mxUtils.indexOf(x,
+za));var C=new mxCell(Ia,new mxGeometry(ya,qa,0,0),Z||"whiteSpace=wrap;html=1;");C.collapsed=N;C.vertex=!0;C.id=Ea;null==za||n||l.model.setCollapsed(za,N);for(var Q=0;Q<Ua.length;Q++)l.setAttributeForCell(C,Da[Q],Ua[Q]),null==za||n||l.setAttributeForCell(za,Da[Q],Ua[Q]);if(null!=ba&&null!=ca){var R=ca[C.getAttribute(ba)];null!=R&&(l.labelChanged(C,R),null==za||n||l.cellLabelChanged(za,R))}if(null!=da&&null!=ja){var X=ja[C.getAttribute(da)];null!=X&&(C.style=X)}l.setAttributeForCell(C,"placeholders",
+"1");C.style=l.replacePlaceholders(C,C.style,K);null==za||n?l.fireEvent(new mxEventObject("cellsInserted","cells",[C])):(l.model.setStyle(za,C.style),0>mxUtils.indexOf(G,za)&&G.push(za),l.fireEvent(new mxEventObject("cellsInserted","cells",[za])));n=null!=za;za=C;if(!n)for(Sa=0;Sa<Ba.length;Sa++)M[Ba[Sa].to][za.getAttribute(Ba[Sa].to)]=za;null!=Ga&&"link"!=Ga&&(l.setLinkForCell(za,za.getAttribute(Ga)),l.setAttributeForCell(za,Ga,null));var ha=l.getPreferredSizeForCell(za);V=null!=Ca?l.model.getCell(k+
+Ua[Ca]):null;if(za.vertex){Qa=null!=V?0:ya;sa=null!=V?0:wa;null!=T&&null!=za.getAttribute(T)&&(za.geometry.x=Qa+parseFloat(za.getAttribute(T)));null!=W&&null!=za.getAttribute(W)&&(za.geometry.y=sa+parseFloat(za.getAttribute(W)));var ia="@"==v.charAt(0)?za.getAttribute(v.substring(1)):null;za.geometry.width=null!=ia&&"auto"!=ia?parseFloat(za.getAttribute(v.substring(1))):"auto"==v||"auto"==ia?ha.width+oa:parseFloat(v);var pa="@"==J.charAt(0)?za.getAttribute(J.substring(1)):null;za.geometry.height=
+null!=pa&&"auto"!=pa&&"width"!=J?parseFloat(pa):"auto"==J||"auto"==pa?ha.height+oa:"width"==J?za.geometry.width:parseFloat(J);qa+=za.geometry.height+Y}n?(null==L[Ea]&&(L[Ea]=[]),L[Ea].push(za)):(x.push(za),null!=V?(V.style=l.replacePlaceholders(V,ka,K),l.addCell(za,V),F.push(V)):G.push(l.addCell(za)))}for(va=0;va<F.length;va++)ia="@"==v.charAt(0)?F[va].getAttribute(v.substring(1)):null,pa="@"==J.charAt(0)?F[va].getAttribute(J.substring(1)):null,"auto"!=v&&"auto"!=ia||"auto"!=J&&"auto"!=pa||l.updateGroupBounds([F[va]],
+oa,!0);var xa=G.slice(),ra=G.slice();for(Sa=0;Sa<Ba.length;Sa++){var ua=Ba[Sa];for(va=0;va<x.length;va++){za=x[va];var Ka=mxUtils.bind(this,function(lb,pb,gb){var qb=pb.getAttribute(gb.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var ub=0;ub<qb.length;ub++){var hb=M[gb.to][qb[ub]];if(null==hb&&null!=na){hb=new mxCell(qb[ub],new mxGeometry(ya,wa,0,0),na);hb.style=l.replacePlaceholders(pb,hb.style,K);var nb=l.getPreferredSizeForCell(hb);hb.geometry.width=nb.width+oa;hb.geometry.height=nb.height+
+oa;M[gb.to][qb[ub]]=hb;hb.vertex=!0;hb.id=qb[ub];G.push(l.addCell(hb))}if(null!=hb){nb=gb.label;null!=gb.fromlabel&&(nb=(pb.getAttribute(gb.fromlabel)||"")+(nb||""));null!=gb.sourcelabel&&(nb=l.replacePlaceholders(pb,gb.sourcelabel,K)+(nb||""));null!=gb.tolabel&&(nb=(nb||"")+(hb.getAttribute(gb.tolabel)||""));null!=gb.targetlabel&&(nb=(nb||"")+l.replacePlaceholders(hb,gb.targetlabel,K));var ob="target"==gb.placeholders==!gb.invert?hb:lb;ob=null!=gb.style?l.replacePlaceholders(ob,gb.style,K):l.createCurrentEdgeStyle();
+nb=l.insertEdge(null,null,nb||"",gb.invert?hb:lb,gb.invert?lb:hb,ob);if(null!=gb.labels)for(ob=0;ob<gb.labels.length;ob++){var rb=gb.labels[ob],vb=new mxCell(rb.label||ob,new mxGeometry(null!=rb.x?rb.x:0,null!=rb.y?rb.y:0,0,0),"resizable=0;html=1;");vb.vertex=!0;vb.connectable=!1;vb.geometry.relative=!0;null!=rb.placeholders&&(vb.value=l.replacePlaceholders("target"==rb.placeholders==!gb.invert?hb:lb,vb.value,K));if(null!=rb.dx||null!=rb.dy)vb.geometry.offset=new mxPoint(null!=rb.dx?rb.dx:0,null!=
+rb.dy?rb.dy:0);nb.insert(vb)}if(null!=gb.data)for(var Ab in gb.data)l.setAttributeForCell(nb,Ab,gb.data[Ab]);ra.push(nb);mxUtils.remove(gb.invert?lb:hb,xa)}}}});Ka(za,za,ua);if(null!=L[za.id])for(Q=0;Q<L[za.id].length;Q++)Ka(za,L[za.id][Q],ua)}}if(null!=Ma)for(va=0;va<x.length;va++)for(za=x[va],Q=0;Q<Ma.length;Q++)l.setAttributeForCell(za,mxUtils.trim(Ma[Q]),null);if(0<G.length){var Va=new mxParallelEdgeLayout(l);Va.spacing=U;Va.checkOverlap=!0;var Oa=function(){0<Va.spacing&&Va.execute(l.getDefaultParent());
+for(var lb=0;lb<G.length;lb++){var pb=l.getCellGeometry(G[lb]);pb.x=Math.round(l.snap(pb.x));pb.y=Math.round(l.snap(pb.y));"auto"==v&&(pb.width=Math.round(l.snap(pb.width)));"auto"==J&&(pb.height=Math.round(l.snap(pb.height)))}};if("["==Aa.charAt(0)){var Ta=la;l.view.validate();this.executeLayouts(l.createLayouts(JSON.parse(Aa)),function(){Oa();Ta()});la=null}else if("circle"==Aa){var Za=new mxCircleLayout(l);Za.disableEdgeStyle=!1;Za.resetEdges=!1;var Pa=Za.isVertexIgnored;Za.isVertexIgnored=function(lb){return Pa.apply(this,
+arguments)||0>mxUtils.indexOf(G,lb)};this.executeLayout(function(){Za.execute(l.getDefaultParent());Oa()},!0,la);la=null}else if("horizontaltree"==Aa||"verticaltree"==Aa||"auto"==Aa&&ra.length==2*G.length-1&&1==xa.length){l.view.validate();var Ra=new mxCompactTreeLayout(l,"horizontaltree"==Aa);Ra.levelDistance=Y;Ra.edgeRouting=!1;Ra.resetEdges=!1;Ra.sortEdges=!0;this.executeLayout(function(){Ra.execute(l.getDefaultParent(),0<xa.length?xa[0]:null)},!0,la);la=null}else if("horizontalflow"==Aa||"verticalflow"==
+Aa||"auto"==Aa&&1==xa.length){l.view.validate();var fb=new mxHierarchicalLayout(l,"horizontalflow"==Aa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fb.intraCellSpacing=Y;fb.parallelEdgeSpacing=U;fb.interRankCellSpacing=fa;fb.disableEdgeStyle=!1;this.executeLayout(function(){fb.execute(l.getDefaultParent(),ra);l.moveCells(ra,ya,wa)},!0,la);la=null}else if("orgchart"==Aa){l.view.validate();var eb=new mxOrgChartLayout(l,2,fa,Y),bb=eb.isVertexIgnored;eb.isVertexIgnored=function(lb){return bb.apply(this,
+arguments)||0>mxUtils.indexOf(G,lb)};this.executeLayout(function(){eb.execute(l.getDefaultParent());Oa()},!0,la);la=null}else if("organic"==Aa||"auto"==Aa&&ra.length>G.length){l.view.validate();var db=new mxFastOrganicLayout(l);db.forceConstant=3*Y;db.disableEdgeStyle=!1;db.resetEdges=!1;var mb=db.isVertexIgnored;db.isVertexIgnored=function(lb){return mb.apply(this,arguments)||0>mxUtils.indexOf(G,lb)};this.executeLayout(function(){db.execute(l.getDefaultParent());Oa()},!0,la);la=null}}this.hideDialog()}finally{l.model.endUpdate()}null!=
+la&&la()}}catch(lb){this.handleError(lb)}};EditorUi.prototype.getSearch=function(c){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",n;for(n in urlParams)0>mxUtils.indexOf(c,n)&&null!=urlParams[n]&&(g+=l+n+"="+urlParams[n],l="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var g=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+n;for(n in urlParams)0>mxUtils.indexOf(l,n)&&(c=0==g?c+"?":c+"&",null!=urlParams[n]&&(c+=n+"="+urlParams[n],g++))}return c};EditorUi.prototype.showLinkDialog=function(c,g,l,n,x){c=new LinkDialog(this,c,g,l,!0,n,x);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){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++;c&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),g=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!l);
+this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);
this.actions.get("smartFit").setEnabled(g);this.actions.get("resetView").setEnabled(g);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);this.menus.get("edgeShape").setEnabled(c);this.menus.get("edgeStyle").setEnabled(c);this.menus.get("appearance").setEnabled(mxUtils.lightDarkColorSupported)};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};
EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var g=0;g<c.length;g++)this.libraryLoaded(c[g].file,c[g].images,c[g].title,null!=c[g].div?"none"!=c[g].div.style.display:c[g].expand)};var D=EditorUi.prototype.updateActionStates;
-EditorUi.prototype.updateActionStates=function(){D.apply(this,arguments);var c=this.editor.graph,g=this.getCurrentFile(),m=this.getSelectionState(),n=this.isDiagramActive(),x="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=g&&g.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&x);this.actions.get("redo").setEnabled(this.canRedo()&&x);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(c.isEnabled());
-this.actions.get("explore").setEnabled(n&&(1==m.edges.length||1==m.vertices.length));this.actions.get("editConnectionPoints").setEnabled(n&&0==m.edges.length&&1==m.vertices.length);this.actions.get("editImage").setEnabled(n&&m.image&&0<m.cells.length);this.actions.get("crop").setEnabled(n&&m.image&&0<m.cells.length);this.actions.get("pageSetup").setEnabled(n);this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);
-this.actions.get("copyStyle").setEnabled(n&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&n&&0<m.cells.length);this.actions.get("editGeometry").setEnabled(0<m.vertices.length);this.actions.get("addToScratchpad").setEnabled(0<m.cells.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&&
+EditorUi.prototype.updateActionStates=function(){D.apply(this,arguments);var c=this.editor.graph,g=this.getCurrentFile(),l=this.getSelectionState(),n=this.isDiagramActive(),x="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=g&&g.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&x);this.actions.get("redo").setEnabled(this.canRedo()&&x);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(c.isEnabled());
+this.actions.get("explore").setEnabled(n&&(1==l.edges.length||1==l.vertices.length));this.actions.get("editConnectionPoints").setEnabled(n&&0==l.edges.length&&1==l.vertices.length);this.actions.get("editImage").setEnabled(n&&l.image&&0<l.cells.length);this.actions.get("crop").setEnabled(n&&l.image&&0<l.cells.length);this.actions.get("pageSetup").setEnabled(n);this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);
+this.actions.get("copyStyle").setEnabled(n&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&n&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);this.actions.get("addToScratchpad").setEnabled(0<l.cells.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("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||
"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.actions.get("properties").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("none"!=this.diagramContainer.style.display);g.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var P=EditorUi.prototype.destroy;
-EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);P.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,g,m,n,x,F,H,M){var L=c.editor.graph;if("xml"==m)c.hideDialog(),c.saveData(g,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==m)c.hideDialog(),c.saveData(g,"svg",mxUtils.getXml(L.getSvg(n,
-x,F)),"image/svg+xml");else{var K=c.getFileData(!0,null,null,null,null,!0),Z=L.getGraphBounds(),ha=Math.floor(Z.width*x/L.view.scale),ca=Math.floor(Z.height*x/L.view.scale);if(K.length<=MAX_REQUEST_SIZE&&ha*ca<MAX_AREA)if(c.hideDialog(),"png"!=m&&"jpg"!=m&&"jpeg"!=m||!c.editor.isExportToCanvas()){var aa={globalVars:L.getExportVariables()};M&&(aa.grid={size:L.gridSize,steps:L.view.gridSteps,color:L.view.gridColor});c.saveRequest(g,m,function(oa,da){return new mxXmlRequest(EXPORT_URL,"format="+m+"&base64="+
-(da||"0")+(null!=oa?"&filename="+encodeURIComponent(oa):"")+"&extras="+encodeURIComponent(JSON.stringify(aa))+(0<H?"&dpi="+H:"")+"&bg="+(null!=n?n:"none")+"&w="+ha+"&h="+ca+"&border="+F+"&xml="+encodeURIComponent(K))})}else"png"==m?c.exportImage(x,null==n||"none"==n,!0,!1,!1,F,!0,!1,null,M,H):c.exportImage(x,!1,!0,!1,!1,F,!0,!1,"jpeg",M);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,
-g="";if(null!=this.pages)for(var m=0;m<this.pages.length;m++){var n=c;this.currentPage!=this.pages[m]&&(n=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[m]),n.model.setRoot(this.pages[m].root));g+=this.pages[m].getName()+" "+n.getIndexableText()+" "}else g=c.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var g={},m=document.createElement("div");m.style.whiteSpace="nowrap";var n=document.createElement("h3");
-mxUtils.write(n,mxUtils.htmlEntities(c));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(n);var x=document.createElement("div");x.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";x.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var F={};try{var H=mxSettings.getCustomLibraries();for(c=0;c<H.length;c++){var M=H[c];if("R"==M.substring(0,1)){var L=JSON.parse(decodeURIComponent(M.substring(1)));
-F[L[0]]={id:L[0],title:L[1],downloadUrl:L[2]}}}}catch(K){}this.remoteInvoke("getCustomLibraries",null,null,function(K){x.innerText="";if(0==K.length)x.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Z=0;Z<K.length;Z++){var ha=K[Z];F[ha.id]&&(g[ha.id]=ha);var ca=this.addCheckbox(x,ha.title,F[ha.id]);(function(aa,oa){mxEvent.addListener(oa,"change",function(){this.checked?g[aa.id]=aa:delete g[aa.id]})})(ha,
-ca)}},mxUtils.bind(this,function(K){x.innerText="";var Z=document.createElement("div");Z.style.padding="8px";Z.style.textAlign="center";mxUtils.write(Z,mxResources.get("error")+": ");mxUtils.write(Z,null!=K&&null!=K.message?K.message:mxResources.get("unknownError"));x.appendChild(Z)}));m.appendChild(x);m=new CustomDialog(this,m,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var K=0,Z;for(Z in g)null==F[Z]&&(K++,mxUtils.bind(this,function(ha){this.remoteInvoke("getFileContent",
-[ha.downloadUrl],null,mxUtils.bind(this,function(ca){K--;0==K&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,ha)),this.showSidebar()}catch(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){K--;0==K&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[Z]));for(Z in F)g[Z]||this.closeLibrary(new RemoteLibrary(this,null,F[Z]));0==K&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");
-this.showDialog(m.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(c){this.remoteWin=
-c;for(var g=0;g<this.remoteInvokeQueue.length;g++)c.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var g=c.msgMarkers,m=this.remoteInvokeCallbacks[g.callbackId];if(null==m)throw Error("No callback for "+(null!=g?g.callbackId:"null"));c.error?m.error&&m.error(c.error.errResp):m.callback&&m.callback.apply(this,c.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,g,m,n,x){var F=
-!0,H=window.setTimeout(mxUtils.bind(this,function(){F=!1;x({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),M=mxUtils.bind(this,function(){window.clearTimeout(H);F&&n.apply(this,arguments)}),L=mxUtils.bind(this,function(){window.clearTimeout(H);F&&x.apply(this,arguments)});m=m||{};m.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:M,error:L});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:g,msgMarkers:m});null!=this.remoteWin?
-this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,g){var m=mxUtils.bind(this,function(K,Z){var ha={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=Z?ha.error={errResp:Z}:null!=K&&(ha.resp=K);this.remoteWin.postMessage(JSON.stringify(ha),"*")});try{var n=c.funtionName,x=this.remoteInvokableFns[n];if(null!=x&&"function"===typeof this[n]){if(x.allowedDomains){for(var F=!1,H=0;H<x.allowedDomains.length;H++)if(g=="https://"+x.allowedDomains[H]){F=
-!0;break}if(!F){m(null,"Invalid Call: "+n+" is not allowed.");return}}var M=c.functionArgs;Array.isArray(M)||(M=[]);if(x.isAsync)M.push(function(){m(Array.prototype.slice.apply(arguments))}),M.push(function(K){m(null,K||"Unkown Error")}),this[n].apply(this,M);else{var L=this[n].apply(this,M);m([L])}}else m(null,"Invalid Call: "+n+" is not found.")}catch(K){m(null,"Invalid Call: An error occurred, "+K.message)}};EditorUi.prototype.openDatabase=function(c,g){if(null==this.database){var m=window.indexedDB||
-window.mozIndexedDB||window.webkitIndexedDB;if(null!=m)try{var n=m.open("database",2);n.onupgradeneeded=function(x){try{var F=n.result;1>x.oldVersion&&F.createObjectStore("objects",{keyPath:"key"});2>x.oldVersion&&(F.createObjectStore("files",{keyPath:"title"}),F.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=g&&g(H)}};n.onsuccess=mxUtils.bind(this,function(x){try{var F=n.result;this.database=F;EditorUi.migrateStorageFiles&&(StorageFile.migrate(F),
-EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if((!H||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var M=document.createElement("iframe");M.style.display="none";M.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(M);var L=!0,K=!1,Z,ha=0,ca=mxUtils.bind(this,
-function(){K=!0;this.setDatabaseItem(".drawioMigrated3",!0);M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),aa=mxUtils.bind(this,function(){ha++;oa()}),oa=mxUtils.bind(this,function(){try{if(ha>=Z.length)ca();else{var ka=Z[ha];StorageFile.getFileContent(this,ka,mxUtils.bind(this,function(ba){null==ba||".scratchpad"==ka&&ba==this.emptyLibraryXml?M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",
-functionArgs:[ka]}),"*"):aa()}),aa)}}catch(ba){console.log(ba)}}),da=mxUtils.bind(this,function(ka){try{this.setDatabaseItem(null,[{title:ka.title,size:ka.data.length,lastModified:Date.now(),type:ka.isLib?"L":"F"},{title:ka.title,data:ka.data}],aa,aa,["filesInfo","files"])}catch(ba){console.log(ba)}});H=mxUtils.bind(this,function(ka){try{if(ka.source==M.contentWindow){var ba={};try{ba=JSON.parse(ka.data)}catch(V){}"init"==ba.event?(M.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
-"*"),M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ba.event||K||(L?null!=ba.resp&&0<ba.resp.length&&null!=ba.resp[0]?(Z=ba.resp[0],L=!1,oa()):ca():null!=ba.resp&&0<ba.resp.length&&null!=ba.resp[0]?da(ba.resp[0]):aa())}}catch(V){console.log(V)}});window.addEventListener("message",H)}})));c(F);F.onversionchange=function(){F.close()}}catch(H){null!=g?g(H):null!=window.console&&console.warn(H)}});n.onerror=g;n.onblocked=
-function(){}}catch(x){null!=g?g(x):null!=window.console&&console.error(x)}else null!=g&&g(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,g,m,n,x){this.openDatabase(mxUtils.bind(this,function(F){try{x=x||"objects";Array.isArray(x)||(x=[x],c=[c],g=[g]);var H=F.transaction(x,"readwrite");H.oncomplete=m;H.onerror=n;for(F=0;F<x.length;F++)H.objectStore(x[F]).put(null!=c&&null!=c[F]?{key:c[F],data:g[F]}:g[F])}catch(M){null!=n&&n(M)}}),n)};EditorUi.prototype.removeDatabaseItem=
-function(c,g,m,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";Array.isArray(n)||(n=[n],c=[c]);var F=x.transaction(n,"readwrite");F.oncomplete=g;F.onerror=m;for(x=0;x<n.length;x++)F.objectStore(n[x]).delete(c[x])}catch(H){null!=m&&m(H)}}),m)};EditorUi.prototype.getDatabaseItem=function(c,g,m,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";var F=x.transaction([n],"readonly").objectStore(n).get(c);F.onsuccess=function(){g(F.result)};F.onerror=m}catch(H){null!=
-m&&m(H)}}),m)};EditorUi.prototype.getDatabaseItems=function(c,g,m){this.openDatabase(mxUtils.bind(this,function(n){try{m=m||"objects";var x=n.transaction([m],"readonly").objectStore(m).openCursor(IDBKeyRange.lowerBound(0)),F=[];x.onsuccess=function(H){null==H.target.result?c(F):(F.push(H.target.result.value),H.target.result.continue())};x.onerror=g}catch(H){null!=g&&g(H)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(c,g,m){this.openDatabase(mxUtils.bind(this,function(n){try{m=m||"objects";
-var x=n.transaction([m],"readonly").objectStore(m).getAllKeys();x.onsuccess=function(){c(x.result)};x.onerror=g}catch(F){null!=g&&g(F)}}),g)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};
-EditorUi.prototype.getComments=function(c,g){var m=this.getCurrentFile();null!=m?m.getComments(c,g):c([])};EditorUi.prototype.addComment=function(c,g,m){var n=this.getCurrentFile();null!=n?n.addComment(c,g,m):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,g){var m=this.getCurrentFile();
-return null!=m?m.newComment(c,g):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,g){var m=this.getCurrentFile();null!=m&&m.getRevisions?m.getRevisions(c,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==
-DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,g,m,n,x,F,H,M){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,g,m,n,x,F,H,M)};EditorUi.prototype.loadFonts=
+EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);P.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,g,l,n,x,F,G,L){var M=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(g,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(g,"svg",mxUtils.getXml(M.getSvg(n,
+x,F)),"image/svg+xml");else{var K=c.getFileData(!0,null,null,null,null,!0),Z=M.getGraphBounds(),ja=Math.floor(Z.width*x/M.view.scale),da=Math.floor(Z.height*x/M.view.scale);if(K.length<=MAX_REQUEST_SIZE&&ja*da<MAX_AREA)if(c.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.editor.isExportToCanvas()){var ba={globalVars:M.getExportVariables()};L&&(ba.grid={size:M.gridSize,steps:M.view.gridSteps,color:M.view.gridColor});c.saveRequest(g,l,function(na,ca){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+
+(ca||"0")+(null!=na?"&filename="+encodeURIComponent(na):"")+"&extras="+encodeURIComponent(JSON.stringify(ba))+(0<G?"&dpi="+G:"")+"&bg="+(null!=n?n:"none")+"&w="+ja+"&h="+da+"&border="+F+"&xml="+encodeURIComponent(K))})}else"png"==l?c.exportImage(x,null==n||"none"==n,!0,!1,!1,F,!0,!1,null,L,G):c.exportImage(x,!1,!0,!1,!1,F,!0,!1,"jpeg",L);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,
+g="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var n=c;this.currentPage!=this.pages[l]&&(n=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[l]),n.model.setRoot(this.pages[l].root));g+=this.pages[l].getName()+" "+n.getIndexableText()+" "}else g=c.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var g={},l=document.createElement("div");l.style.whiteSpace="nowrap";var n=document.createElement("h3");
+mxUtils.write(n,mxUtils.htmlEntities(c));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(n);var x=document.createElement("div");x.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";x.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var F={};try{var G=mxSettings.getCustomLibraries();for(c=0;c<G.length;c++){var L=G[c];if("R"==L.substring(0,1)){var M=JSON.parse(decodeURIComponent(L.substring(1)));
+F[M[0]]={id:M[0],title:M[1],downloadUrl:M[2]}}}}catch(K){}this.remoteInvoke("getCustomLibraries",null,null,function(K){x.innerText="";if(0==K.length)x.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Z=0;Z<K.length;Z++){var ja=K[Z];F[ja.id]&&(g[ja.id]=ja);var da=this.addCheckbox(x,ja.title,F[ja.id]);(function(ba,na){mxEvent.addListener(na,"change",function(){this.checked?g[ba.id]=ba:delete g[ba.id]})})(ja,
+da)}},mxUtils.bind(this,function(K){x.innerText="";var Z=document.createElement("div");Z.style.padding="8px";Z.style.textAlign="center";mxUtils.write(Z,mxResources.get("error")+": ");mxUtils.write(Z,null!=K&&null!=K.message?K.message:mxResources.get("unknownError"));x.appendChild(Z)}));l.appendChild(x);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var K=0,Z;for(Z in g)null==F[Z]&&(K++,mxUtils.bind(this,function(ja){this.remoteInvoke("getFileContent",
+[ja.downloadUrl],null,mxUtils.bind(this,function(da){K--;0==K&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,da,ja)),this.showSidebar()}catch(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){K--;0==K&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[Z]));for(Z in F)g[Z]||this.closeLibrary(new RemoteLibrary(this,null,F[Z]));0==K&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");
+this.showDialog(l.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(c){this.remoteWin=
+c;for(var g=0;g<this.remoteInvokeQueue.length;g++)c.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var g=c.msgMarkers,l=this.remoteInvokeCallbacks[g.callbackId];if(null==l)throw Error("No callback for "+(null!=g?g.callbackId:"null"));c.error?l.error&&l.error(c.error.errResp):l.callback&&l.callback.apply(this,c.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,g,l,n,x){var F=
+!0,G=window.setTimeout(mxUtils.bind(this,function(){F=!1;x({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),L=mxUtils.bind(this,function(){window.clearTimeout(G);F&&n.apply(this,arguments)}),M=mxUtils.bind(this,function(){window.clearTimeout(G);F&&x.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:L,error:M});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:g,msgMarkers:l});null!=this.remoteWin?
+this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,g){var l=mxUtils.bind(this,function(K,Z){var ja={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=Z?ja.error={errResp:Z}:null!=K&&(ja.resp=K);this.remoteWin.postMessage(JSON.stringify(ja),"*")});try{var n=c.funtionName,x=this.remoteInvokableFns[n];if(null!=x&&"function"===typeof this[n]){if(x.allowedDomains){for(var F=!1,G=0;G<x.allowedDomains.length;G++)if(g=="https://"+x.allowedDomains[G]){F=
+!0;break}if(!F){l(null,"Invalid Call: "+n+" is not allowed.");return}}var L=c.functionArgs;Array.isArray(L)||(L=[]);if(x.isAsync)L.push(function(){l(Array.prototype.slice.apply(arguments))}),L.push(function(K){l(null,K||"Unkown Error")}),this[n].apply(this,L);else{var M=this[n].apply(this,L);l([M])}}else l(null,"Invalid Call: "+n+" is not found.")}catch(K){l(null,"Invalid Call: An error occurred, "+K.message)}};EditorUi.prototype.openDatabase=function(c,g){if(null==this.database){var l=window.indexedDB||
+window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var n=l.open("database",2);n.onupgradeneeded=function(x){try{var F=n.result;1>x.oldVersion&&F.createObjectStore("objects",{keyPath:"key"});2>x.oldVersion&&(F.createObjectStore("files",{keyPath:"title"}),F.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(G){null!=g&&g(G)}};n.onsuccess=mxUtils.bind(this,function(x){try{var F=n.result;this.database=F;EditorUi.migrateStorageFiles&&(StorageFile.migrate(F),
+EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(G){if((!G||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var L=document.createElement("iframe");L.style.display="none";L.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(L);var M=!0,K=!1,Z,ja=0,da=mxUtils.bind(this,
+function(){K=!0;this.setDatabaseItem(".drawioMigrated3",!0);L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ba=mxUtils.bind(this,function(){ja++;na()}),na=mxUtils.bind(this,function(){try{if(ja>=Z.length)da();else{var ka=Z[ja];StorageFile.getFileContent(this,ka,mxUtils.bind(this,function(aa){null==aa||".scratchpad"==ka&&aa==this.emptyLibraryXml?L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",
+functionArgs:[ka]}),"*"):ba()}),ba)}}catch(aa){console.log(aa)}}),ca=mxUtils.bind(this,function(ka){try{this.setDatabaseItem(null,[{title:ka.title,size:ka.data.length,lastModified:Date.now(),type:ka.isLib?"L":"F"},{title:ka.title,data:ka.data}],ba,ba,["filesInfo","files"])}catch(aa){console.log(aa)}});G=mxUtils.bind(this,function(ka){try{if(ka.source==L.contentWindow){var aa={};try{aa=JSON.parse(ka.data)}catch(V){}"init"==aa.event?(L.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=aa.event||K||(M?null!=aa.resp&&0<aa.resp.length&&null!=aa.resp[0]?(Z=aa.resp[0],M=!1,na()):da():null!=aa.resp&&0<aa.resp.length&&null!=aa.resp[0]?ca(aa.resp[0]):ba())}}catch(V){console.log(V)}});window.addEventListener("message",G)}})));c(F);F.onversionchange=function(){F.close()}}catch(G){null!=g?g(G):null!=window.console&&console.warn(G)}});n.onerror=g;n.onblocked=
+function(){}}catch(x){null!=g?g(x):null!=window.console&&console.error(x)}else null!=g&&g(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,g,l,n,x){this.openDatabase(mxUtils.bind(this,function(F){try{x=x||"objects";Array.isArray(x)||(x=[x],c=[c],g=[g]);var G=F.transaction(x,"readwrite");G.oncomplete=l;G.onerror=n;for(F=0;F<x.length;F++)G.objectStore(x[F]).put(null!=c&&null!=c[F]?{key:c[F],data:g[F]}:g[F])}catch(L){null!=n&&n(L)}}),n)};EditorUi.prototype.removeDatabaseItem=
+function(c,g,l,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";Array.isArray(n)||(n=[n],c=[c]);var F=x.transaction(n,"readwrite");F.oncomplete=g;F.onerror=l;for(x=0;x<n.length;x++)F.objectStore(n[x]).delete(c[x])}catch(G){null!=l&&l(G)}}),l)};EditorUi.prototype.getDatabaseItem=function(c,g,l,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";var F=x.transaction([n],"readonly").objectStore(n).get(c);F.onsuccess=function(){g(F.result)};F.onerror=l}catch(G){null!=
+l&&l(G)}}),l)};EditorUi.prototype.getDatabaseItems=function(c,g,l){this.openDatabase(mxUtils.bind(this,function(n){try{l=l||"objects";var x=n.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),F=[];x.onsuccess=function(G){null==G.target.result?c(F):(F.push(G.target.result.value),G.target.result.continue())};x.onerror=g}catch(G){null!=g&&g(G)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(c,g,l){this.openDatabase(mxUtils.bind(this,function(n){try{l=l||"objects";
+var x=n.transaction([l],"readonly").objectStore(l).getAllKeys();x.onsuccess=function(){c(x.result)};x.onerror=g}catch(F){null!=g&&g(F)}}),g)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};
+EditorUi.prototype.getComments=function(c,g){var l=this.getCurrentFile();null!=l?l.getComments(c,g):c([])};EditorUi.prototype.addComment=function(c,g,l){var n=this.getCurrentFile();null!=n?n.addComment(c,g,l):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,g){var l=this.getCurrentFile();
+return null!=l?l.newComment(c,g):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,g){var l=this.getCurrentFile();null!=l&&l.getRevisions?l.getRevisions(c,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==
+DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,g,l,n,x,F,G,L){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,g,l,n,x,F,G,L)};EditorUi.prototype.loadFonts=
function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,g)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};
-EditorUi.prototype.exportToCanvas=function(c,g,m,n,x,F,H,M,L,K,Z,ha,ca,aa,oa,da){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,g,m,n,x,F,H,M,L,K,Z,ha,ca,aa,oa,da)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,g,m,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,
-g,m,n)};EditorUi.prototype.convertImageToDataUri=function(c,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,g)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,g,m,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,g,m,n)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,g,m,n,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,g,m,n,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],g=0;g<localStorage.length;g++){var m=localStorage.key(g),n=localStorage.getItem(m);if(0<m.length&&(".scratchpad"==m||"."!=m.charAt(0))&&0<n.length){var x=
-"<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(x||n)&&c.push(m)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(c);return{title:c,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,f,l,u,y,q){function C(){for(var da=M.getElementsByTagName("div"),ka=0,ba=0;ba<da.length;ba++)"none"!=da[ba].style.display&&da[ba].parentNode==M&&ka++;L.style.display=0==ka?"block":"none"}function J(da,ka,ba,V){function k(){ka.removeChild(N);ka.removeChild(T);I.style.display="block";v.style.display="block"}x={div:ka,comment:da,saveCallback:ba,deleteOnCancel:V};var v=ka.querySelector(".geCommentTxt"),I=ka.querySelector(".geCommentActionsList"),N=document.createElement("textarea");
-N.className="geCommentEditTxtArea";N.style.minHeight=v.offsetHeight+"px";N.value=da.content;ka.insertBefore(N,v);var T=document.createElement("div");T.className="geCommentEditBtns";var W=mxUtils.button(mxResources.get("cancel"),function(){V?(ka.parentNode.removeChild(ka),C()):k();x=null});W.className="geCommentEditBtn";T.appendChild(W);var U=mxUtils.button(mxResources.get("save"),function(){v.innerText="";da.content=N.value;mxUtils.write(v,da.content);k();ba(da);x=null});mxEvent.addListener(N,"keydown",
-mxUtils.bind(this,function(Y){mxEvent.isConsumed(Y)||((mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y))&&13==Y.keyCode?(U.click(),mxEvent.consume(Y)):27==Y.keyCode&&(W.click(),mxEvent.consume(Y)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);ka.insertBefore(T,v);I.style.display="none";v.style.display="none";N.focus()}function S(da,ka){ka.innerText="";da=new Date(da.modifiedDate);var ba=b.timeSince(da);null==ba&&(ba=mxResources.get("lessThanAMinute"));
-mxUtils.write(ka,mxResources.get("timeAgo",[ba],"{1} ago"));ka.setAttribute("title",da.toLocaleDateString()+" "+da.toLocaleTimeString())}function D(da){var ka=document.createElement("img");ka.className="geCommentBusyImg";ka.src=IMAGE_PATH+"/spin.gif";da.appendChild(ka);da.busyImg=ka}function P(da){da.style.border="1px solid red";da.busyImg.parentNode==da&&da.removeChild(da.busyImg)}function c(da){da.style.border="";da.busyImg.parentNode==da&&da.removeChild(da.busyImg)}function g(da,ka,ba,V,k){function v(na,
-la,qa){var ya=document.createElement("li");ya.className="geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,na);ya.appendChild(wa);mxEvent.addListener(wa,"click",function(Ia){la(Ia,da);Ia.preventDefault();mxEvent.consume(Ia)});fa.appendChild(ya);qa&&(ya.style.display="none")}function I(){function na(ya){la.push(qa);if(null!=ya.replies)for(var wa=0;wa<ya.replies.length;wa++)qa=qa.nextSibling,na(ya.replies[wa])}var la=[],qa=T;na(da);return{pdiv:qa,
-replies:la}}function N(na,la,qa,ya,wa){function Ia(){D(Ma);da.addReply(Ga,function(sa){Ga.id=sa;da.replies.push(Ga);c(Ma);qa&&qa()},function(sa){Aa();P(Ma);b.handleError(sa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ya,wa)}function Aa(){J(Ga,Ma,function(sa){Ia()},!0)}var Ba=I().pdiv,Ga=b.newComment(na,b.getCurrentUser());Ga.pCommentId=da.id;null==da.replies&&(da.replies=[]);var Ma=g(Ga,da.replies,Ba,V+1);la?Aa():Ia()}if(k||!da.isResolved){L.style.display="none";var T=
-document.createElement("div");T.className="geCommentContainer";T.setAttribute("data-commentId",da.id);T.style.marginLeft=20*V+5+"px";da.isResolved&&(F.style.opacity="0.7");var W=document.createElement("div");W.className="geCommentHeader";var U=document.createElement("img");U.className="geCommentUserImg";U.src=null!=da.user&&null!=da.user.pictureUrl?da.user.pictureUrl:Editor.userImage;W.appendChild(U);U=document.createElement("div");U.className="geCommentHeaderTxt";W.appendChild(U);var Y=document.createElement("div");
-Y.className="geCommentUsername";mxUtils.write(Y,null!=da.user?da.user.displayName:mxResources.get("unknownUser"));U.appendChild(Y);Y=document.createElement("div");Y.className="geCommentDate";Y.setAttribute("data-commentId",da.id);S(da,Y);U.appendChild(Y);T.appendChild(W);W=document.createElement("div");W.className="geCommentTxt";mxUtils.write(W,da.content||"");T.appendChild(W);da.isLocked&&(T.style.opacity="0.5");W=document.createElement("div");W.className="geCommentActions";var fa=document.createElement("ul");
-fa.className="geCommentActionsList";W.appendChild(fa);m||da.isLocked||0!=V&&!n||v(mxResources.get("reply"),function(){N("",!0)},da.isResolved);U=b.getCurrentUser();null==U||null==da.user||U.id!=da.user.id||m||da.isLocked||(v(mxResources.get("edit"),function(){function na(){J(da,T,function(){D(T);da.editComment(da.content,function(){c(T)},function(la){P(T);na();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}na()},da.isResolved),v(mxResources.get("delete"),
-function(){b.confirm(mxResources.get("areYouSure"),function(){D(T);da.deleteComment(function(na){if(!0===na){na=T.querySelector(".geCommentTxt");na.innerText="";mxUtils.write(na,mxResources.get("msgDeleted"));var la=T.querySelectorAll(".geCommentAction");for(na=0;na<la.length;na++)la[na].parentNode.removeChild(la[na]);c(T);T.style.opacity="0.5"}else{la=I(da).replies;for(na=0;na<la.length;na++)M.removeChild(la[na]);for(na=0;na<ka.length;na++)if(ka[na]==da){ka.splice(na,1);break}L.style.display=0==
-M.getElementsByTagName("div").length?"block":"none"}},function(na){P(T);b.handleError(na,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},da.isResolved));m||da.isLocked||0!=V||v(da.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(na){function la(){var qa=na.target;qa.innerText="";da.isResolved=!da.isResolved;mxUtils.write(qa,da.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ya=da.isResolved?"none":"",wa=I(da).replies,Ia=
-"light-dark("+(da.isResolved?"ghostWhite":"white")+", transparent)",Aa=0;Aa<wa.length;Aa++){wa[Aa].style.backgroundColor=Ia;for(var Ba=wa[Aa].querySelectorAll(".geCommentAction"),Ga=0;Ga<Ba.length;Ga++)Ba[Ga]!=qa.parentNode&&(Ba[Ga].style.display=ya);ca||(wa[Aa].style.display="none")}C()}da.isResolved?N(mxResources.get("reOpened")+": ",!0,la,!1,!0):N(mxResources.get("markedAsResolved"),!1,la,!0)});T.appendChild(W);null!=ba?M.insertBefore(T,ba.nextSibling):M.appendChild(T);for(ba=0;null!=da.replies&&
-ba<da.replies.length;ba++)W=da.replies[ba],W.isResolved=da.isResolved,g(W,da.replies,null,V+1,k);null!=x&&(x.comment.id==da.id?(k=da.content,da.content=x.comment.content,J(da,T,x.saveCallback,x.deleteOnCancel),da.content=k):null==x.comment.id&&x.comment.pCommentId==da.id&&(M.appendChild(x.div),J(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return T}}var m=!b.canComment(),n=b.canReplyToReplies(),x=null,F=document.createElement("div");F.className="geCommentsWin";var H=EditorUi.compactUi?"26px":
-"30px",M=document.createElement("div");M.className="geCommentsList";M.style.bottom=parseInt(H)+7+"px";F.appendChild(M);var L=document.createElement("span");L.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(L,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=H;K.style.padding="3px 4px 4px 4px";H=document.createElement("a");H.className="geButton";if(!m){var Z=H.cloneNode();Z.style.backgroundImage=
-"url("+Editor.plusImage+")";Z.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Z,"click",function(da){function ka(){J(ba,V,function(k){D(V);b.addComment(k,function(v){k.id=v;aa.push(k);c(V)},function(v){P(V);ka();b.handleError(v,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ba=b.newComment("",b.getCurrentUser()),V=g(ba,aa,null,0);ka();da.preventDefault();mxEvent.consume(da)});K.appendChild(Z)}var ha=H.cloneNode();ha.style.backgroundImage=
-"url("+Editor.checkImage+")";ha.setAttribute("title",mxResources.get("showResolved"));var ca=!1;mxEvent.addListener(ha,"click",function(da){(ca=!ca)?ha.classList.add("geActiveItem"):ha.classList.remove("geActiveItem");oa();da.preventDefault();mxEvent.consume(da)});K.appendChild(ha);b.commentsRefreshNeeded()&&(Z=H.cloneNode(),Z.style.backgroundImage="url("+Editor.refreshImage+")",Z.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(Z,"click",function(da){oa();da.preventDefault();
-mxEvent.consume(da)}),K.appendChild(Z));b.commentsSaveNeeded()&&(H=H.cloneNode(),H.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',H.setAttribute("title",mxResources.get("save")),H.className="geButton geAdaptiveAsset",mxEvent.addListener(H,"click",function(da){q();da.preventDefault();mxEvent.consume(da)}),K.appendChild(H));F.appendChild(K);var aa=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var da=x.div.querySelector(".geCommentEditTxtArea"),
-ka=x.div.querySelector(".geCommentEditBtns");x.comment.content=da.value;da.parentNode.removeChild(da);ka.parentNode.removeChild(ka)}catch(ba){b.handleError(ba)}M.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ba){function V(k){if(null!=k){k.sort(function(I,N){return new Date(I.modifiedDate)-new Date(N.modifiedDate)});
-for(var v=0;v<k.length;v++)V(k[v].replies)}}ba.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});M.innerText="";M.appendChild(L);L.style.display="block";aa=ba;for(ba=0;ba<aa.length;ba++)V(aa[ba].replies),g(aa[ba],aa,null,0,ca);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(M.appendChild(x.div),J(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(ba){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ba&&ba.message?": "+ba.message:
-""));this.hasError=!0})):M.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;K=mxUtils.bind(this,function(){function da(v){var I=ba[v.id];if(null!=I)for(S(v,I),I=0;null!=v.replies&&I<v.replies.length;I++)da(v.replies[I])}if(this.window.isVisible()){for(var ka=M.querySelectorAll(".geCommentDate"),ba={},V=0;V<ka.length;V++){var k=ka[V];ba[k.getAttribute("data-commentId")]=k}for(V=0;V<aa.length;V++)da(aa[V])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=
-new mxWindow(mxResources.get("comments"),F,f,l,u,y,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,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,f,l,u,y,q,C,J,S,D,P){var c=document.createElement("div");c.style.textAlign="center";P=null!=P?P:44;var g=
-document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=P+"px";g.style.lineHeight="1.2em";mxUtils.write(g,f);c.appendChild(g);null!=D&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",D),g.appendChild(f),c.appendChild(g));D=document.createElement("div");D.style.textAlign="center";D.style.whiteSpace="nowrap";var m=document.createElement("input");m.setAttribute("type","checkbox");q=mxUtils.button(q||
-mxResources.get("cancel"),function(){b.hideDialog();null!=u&&u(m.checked)});q.className="geBtn";null!=J&&(q.innerHTML=J+"<br>"+q.innerHTML,q.style.display="inline-block",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.style.width="40%");b.editor.cancelFirst&&D.appendChild(q);var n=mxUtils.button(y||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(m.checked)});D.appendChild(n);null!=C?(n.innerHTML=C+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom=
-"8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||D.appendChild(q);c.appendChild(D);S?(D.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.style.marginBottom="0px",g.appendChild(m),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),g.appendChild(y),c.appendChild(g),mxEvent.addListener(y,"click",function(x){m.checked=!m.checked;mxEvent.consume(x)})):
+EditorUi.prototype.exportToCanvas=function(c,g,l,n,x,F,G,L,M,K,Z,ja,da,ba,na,ca){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,g,l,n,x,F,G,L,M,K,Z,ja,da,ba,na,ca)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,g,l,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,
+g,l,n)};EditorUi.prototype.convertImageToDataUri=function(c,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,g)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,g,l,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,g,l,n)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
+return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,g,l,n,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,g,l,n,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],g=0;g<localStorage.length;g++){var l=localStorage.key(g),n=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<n.length){var x=
+"<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(x||n)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(c);return{title:c,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,f,m,t,y,q){function B(){for(var ca=L.getElementsByTagName("div"),ka=0,aa=0;aa<ca.length;aa++)"none"!=ca[aa].style.display&&ca[aa].parentNode==L&&ka++;M.style.display=0==ka?"block":"none"}function I(ca,ka,aa,V){function k(){ka.removeChild(N);ka.removeChild(T);J.style.display="block";v.style.display="block"}x={div:ka,comment:ca,saveCallback:aa,deleteOnCancel:V};var v=ka.querySelector(".geCommentTxt"),J=ka.querySelector(".geCommentActionsList"),N=document.createElement("textarea");
+N.className="geCommentEditTxtArea";N.style.minHeight=v.offsetHeight+"px";N.value=ca.content;ka.insertBefore(N,v);var T=document.createElement("div");T.className="geCommentEditBtns";var W=mxUtils.button(mxResources.get("cancel"),function(){V?(ka.parentNode.removeChild(ka),B()):k();x=null});W.className="geCommentEditBtn";T.appendChild(W);var U=mxUtils.button(mxResources.get("save"),function(){v.innerText="";ca.content=N.value;mxUtils.write(v,ca.content);k();aa(ca);x=null});mxEvent.addListener(N,"keydown",
+mxUtils.bind(this,function(Y){mxEvent.isConsumed(Y)||((mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y))&&13==Y.keyCode?(U.click(),mxEvent.consume(Y)):27==Y.keyCode&&(W.click(),mxEvent.consume(Y)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);ka.insertBefore(T,v);J.style.display="none";v.style.display="none";N.focus()}function S(ca,ka){ka.innerText="";ca=new Date(ca.modifiedDate);var aa=b.timeSince(ca);null==aa&&(aa=mxResources.get("lessThanAMinute"));
+mxUtils.write(ka,mxResources.get("timeAgo",[aa],"{1} ago"));ka.setAttribute("title",ca.toLocaleDateString()+" "+ca.toLocaleTimeString())}function D(ca){var ka=document.createElement("img");ka.className="geCommentBusyImg";ka.src=IMAGE_PATH+"/spin.gif";ca.appendChild(ka);ca.busyImg=ka}function P(ca){ca.style.border="1px solid red";ca.busyImg.parentNode==ca&&ca.removeChild(ca.busyImg)}function c(ca){ca.style.border="";ca.busyImg.parentNode==ca&&ca.removeChild(ca.busyImg)}function g(ca,ka,aa,V,k){function v(oa,
+la,qa){var ya=document.createElement("li");ya.className="geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,oa);ya.appendChild(wa);mxEvent.addListener(wa,"click",function(Ia){la(Ia,ca);Ia.preventDefault();mxEvent.consume(Ia)});fa.appendChild(ya);qa&&(ya.style.display="none")}function J(){function oa(ya){la.push(qa);if(null!=ya.replies)for(var wa=0;wa<ya.replies.length;wa++)qa=qa.nextSibling,oa(ya.replies[wa])}var la=[],qa=T;oa(ca);return{pdiv:qa,
+replies:la}}function N(oa,la,qa,ya,wa){function Ia(){D(Ma);ca.addReply(Ga,function(sa){Ga.id=sa;ca.replies.push(Ga);c(Ma);qa&&qa()},function(sa){Aa();P(Ma);b.handleError(sa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ya,wa)}function Aa(){I(Ga,Ma,function(sa){Ia()},!0)}var Ba=J().pdiv,Ga=b.newComment(oa,b.getCurrentUser());Ga.pCommentId=ca.id;null==ca.replies&&(ca.replies=[]);var Ma=g(Ga,ca.replies,Ba,V+1);la?Aa():Ia()}if(k||!ca.isResolved){M.style.display="none";var T=
+document.createElement("div");T.className="geCommentContainer";T.setAttribute("data-commentId",ca.id);T.style.marginLeft=20*V+5+"px";ca.isResolved&&(F.style.opacity="0.7");var W=document.createElement("div");W.className="geCommentHeader";var U=document.createElement("img");U.className="geCommentUserImg";U.src=null!=ca.user&&null!=ca.user.pictureUrl?ca.user.pictureUrl:Editor.userImage;W.appendChild(U);U=document.createElement("div");U.className="geCommentHeaderTxt";W.appendChild(U);var Y=document.createElement("div");
+Y.className="geCommentUsername";mxUtils.write(Y,null!=ca.user?ca.user.displayName:mxResources.get("unknownUser"));U.appendChild(Y);Y=document.createElement("div");Y.className="geCommentDate";Y.setAttribute("data-commentId",ca.id);S(ca,Y);U.appendChild(Y);T.appendChild(W);W=document.createElement("div");W.className="geCommentTxt";mxUtils.write(W,ca.content||"");T.appendChild(W);ca.isLocked&&(T.style.opacity="0.5");W=document.createElement("div");W.className="geCommentActions";var fa=document.createElement("ul");
+fa.className="geCommentActionsList";W.appendChild(fa);l||ca.isLocked||0!=V&&!n||v(mxResources.get("reply"),function(){N("",!0)},ca.isResolved);U=b.getCurrentUser();null==U||null==ca.user||U.id!=ca.user.id||l||ca.isLocked||(v(mxResources.get("edit"),function(){function oa(){I(ca,T,function(){D(T);ca.editComment(ca.content,function(){c(T)},function(la){P(T);oa();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}oa()},ca.isResolved),v(mxResources.get("delete"),
+function(){b.confirm(mxResources.get("areYouSure"),function(){D(T);ca.deleteComment(function(oa){if(!0===oa){oa=T.querySelector(".geCommentTxt");oa.innerText="";mxUtils.write(oa,mxResources.get("msgDeleted"));var la=T.querySelectorAll(".geCommentAction");for(oa=0;oa<la.length;oa++)la[oa].parentNode.removeChild(la[oa]);c(T);T.style.opacity="0.5"}else{la=J(ca).replies;for(oa=0;oa<la.length;oa++)L.removeChild(la[oa]);for(oa=0;oa<ka.length;oa++)if(ka[oa]==ca){ka.splice(oa,1);break}M.style.display=0==
+L.getElementsByTagName("div").length?"block":"none"}},function(oa){P(T);b.handleError(oa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},ca.isResolved));l||ca.isLocked||0!=V||v(ca.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(oa){function la(){var qa=oa.target;qa.innerText="";ca.isResolved=!ca.isResolved;mxUtils.write(qa,ca.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ya=ca.isResolved?"none":"",wa=J(ca).replies,Ia=
+"light-dark("+(ca.isResolved?"ghostWhite":"white")+", transparent)",Aa=0;Aa<wa.length;Aa++){wa[Aa].style.backgroundColor=Ia;for(var Ba=wa[Aa].querySelectorAll(".geCommentAction"),Ga=0;Ga<Ba.length;Ga++)Ba[Ga]!=qa.parentNode&&(Ba[Ga].style.display=ya);da||(wa[Aa].style.display="none")}B()}ca.isResolved?N(mxResources.get("reOpened")+": ",!0,la,!1,!0):N(mxResources.get("markedAsResolved"),!1,la,!0)});T.appendChild(W);null!=aa?L.insertBefore(T,aa.nextSibling):L.appendChild(T);for(aa=0;null!=ca.replies&&
+aa<ca.replies.length;aa++)W=ca.replies[aa],W.isResolved=ca.isResolved,g(W,ca.replies,null,V+1,k);null!=x&&(x.comment.id==ca.id?(k=ca.content,ca.content=x.comment.content,I(ca,T,x.saveCallback,x.deleteOnCancel),ca.content=k):null==x.comment.id&&x.comment.pCommentId==ca.id&&(L.appendChild(x.div),I(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return T}}var l=!b.canComment(),n=b.canReplyToReplies(),x=null,F=document.createElement("div");F.className="geCommentsWin";var G=EditorUi.compactUi?"26px":
+"30px",L=document.createElement("div");L.className="geCommentsList";L.style.bottom=parseInt(G)+7+"px";F.appendChild(L);var M=document.createElement("span");M.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(M,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=G;K.style.padding="3px 4px 4px 4px";G=document.createElement("a");G.className="geButton";if(!l){var Z=G.cloneNode();Z.style.backgroundImage=
+"url("+Editor.plusImage+")";Z.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Z,"click",function(ca){function ka(){I(aa,V,function(k){D(V);b.addComment(k,function(v){k.id=v;ba.push(k);c(V)},function(v){P(V);ka();b.handleError(v,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var aa=b.newComment("",b.getCurrentUser()),V=g(aa,ba,null,0);ka();ca.preventDefault();mxEvent.consume(ca)});K.appendChild(Z)}var ja=G.cloneNode();ja.style.backgroundImage=
+"url("+Editor.checkImage+")";ja.setAttribute("title",mxResources.get("showResolved"));var da=!1;mxEvent.addListener(ja,"click",function(ca){(da=!da)?ja.classList.add("geActiveItem"):ja.classList.remove("geActiveItem");na();ca.preventDefault();mxEvent.consume(ca)});K.appendChild(ja);b.commentsRefreshNeeded()&&(Z=G.cloneNode(),Z.style.backgroundImage="url("+Editor.refreshImage+")",Z.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(Z,"click",function(ca){na();ca.preventDefault();
+mxEvent.consume(ca)}),K.appendChild(Z));b.commentsSaveNeeded()&&(G=G.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',G.setAttribute("title",mxResources.get("save")),G.className="geButton geAdaptiveAsset",mxEvent.addListener(G,"click",function(ca){q();ca.preventDefault();mxEvent.consume(ca)}),K.appendChild(G));F.appendChild(K);var ba=[],na=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var ca=x.div.querySelector(".geCommentEditTxtArea"),
+ka=x.div.querySelector(".geCommentEditBtns");x.comment.content=ca.value;ca.parentNode.removeChild(ca);ka.parentNode.removeChild(ka)}catch(aa){b.handleError(aa)}L.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(aa){function V(k){if(null!=k){k.sort(function(J,N){return new Date(J.modifiedDate)-new Date(N.modifiedDate)});
+for(var v=0;v<k.length;v++)V(k[v].replies)}}aa.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});L.innerText="";L.appendChild(M);M.style.display="block";ba=aa;for(aa=0;aa<ba.length;aa++)V(ba[aa].replies),g(ba[aa],ba,null,0,da);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(L.appendChild(x.div),I(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(aa){L.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(aa&&aa.message?": "+aa.message:
+""));this.hasError=!0})):L.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});na();this.refreshComments=na;K=mxUtils.bind(this,function(){function ca(v){var J=aa[v.id];if(null!=J)for(S(v,J),J=0;null!=v.replies&&J<v.replies.length;J++)ca(v.replies[J])}if(this.window.isVisible()){for(var ka=L.querySelectorAll(".geCommentDate"),aa={},V=0;V<ka.length;V++){var k=ka[V];aa[k.getAttribute("data-commentId")]=k}for(V=0;V<ba.length;V++)ca(ba[V])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=
+new mxWindow(mxResources.get("comments"),F,f,m,t,y,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,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,f,m,t,y,q,B,I,S,D,P){var c=document.createElement("div");c.style.textAlign="center";P=null!=P?P:44;var g=
+document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=P+"px";g.style.lineHeight="1.2em";mxUtils.write(g,f);c.appendChild(g);null!=D&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",D),g.appendChild(f),c.appendChild(g));D=document.createElement("div");D.style.textAlign="center";D.style.whiteSpace="nowrap";var l=document.createElement("input");l.setAttribute("type","checkbox");q=mxUtils.button(q||
+mxResources.get("cancel"),function(){b.hideDialog();null!=t&&t(l.checked)});q.className="geBtn";null!=I&&(q.innerHTML=I+"<br>"+q.innerHTML,q.style.display="inline-block",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.style.width="40%");b.editor.cancelFirst&&D.appendChild(q);var n=mxUtils.button(y||mxResources.get("ok"),function(){b.hideDialog();null!=m&&m(l.checked)});D.appendChild(n);null!=B?(n.innerHTML=B+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom=
+"8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||D.appendChild(q);c.appendChild(D);S?(D.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.style.marginBottom="0px",g.appendChild(l),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),g.appendChild(y),c.appendChild(g),mxEvent.addListener(y,"click",function(x){l.checked=!l.checked;mxEvent.consume(x)})):
D.style.marginTop="12px";this.init=function(){n.focus()};this.container=c},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;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)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,f,l){this.ui=b;this.page=f;this.previous=this.name=l}
-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,f,l){this.ui=b;this.oldIndex=f;this.newIndex=l}
-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,f,l){this.ui=b;this.previousPage=this.page=f;null!=f&&(this.ui.updatePageRoot(f),null!=l&&(f.viewState=l))}
-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var f=this.ui.editor,l=f.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(f.getGraphXml(!0)));b.viewState=l.getViewState();b.root=l.model.root;null!=b.model&&b.model.rootChanged(b.root);l.view.clear(b.root,!0);l.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;
-l.model.prefix=Editor.guid()+"-";l.model.rootChanged(b.root);l.setViewState(b.viewState);l.gridEnabled=l.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);f.graph.fireEvent(new mxEventObject(mxEvent.ROOT));f.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,f,l,u,y){SelectPage.call(this,b,l);this.relatedPage=f;this.index=u;this.previousIndex=null;this.noSelect=y}mxUtils.extend(ChangePage,SelectPage);
+DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,f,m){this.ui=b;this.page=f;this.previous=this.name=m}
+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,f,m){this.ui=b;this.oldIndex=f;this.newIndex=m}
+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,f,m){this.ui=b;this.previousPage=this.page=f;null!=f&&(this.ui.updatePageRoot(f),null!=m&&(f.viewState=m))}
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var f=this.ui.editor,m=f.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(f.getGraphXml(!0)));b.viewState=m.getViewState();b.root=m.model.root;null!=b.model&&b.model.rootChanged(b.root);m.view.clear(b.root,!0);m.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;
+m.model.prefix=Editor.guid()+"-";m.model.rootChanged(b.root);m.setViewState(b.viewState);m.gridEnabled=m.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);f.graph.fireEvent(new mxEventObject(mxEvent.ROOT));f.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,f,m,t,y){SelectPage.call(this,b,m);this.relatedPage=f;this.index=t;this.previousIndex=null;this.noSelect=y}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};function ReplaceDiagram(b,f){this.ui=b;this.data=f}
-ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,f=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var l=new mxCodec(this.data.ownerDocument),u=new mxGraphModel;l.decode(this.data,u);this.data=f;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=u.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,
-!0);b.model.rootChanged(u.root);b.fireEvent(new mxEventObject(mxEvent.ROOT))};EditorUi.prototype.tabContainerVisible=!0;EditorUi.prototype.setTabContainerVisible=function(b,f){Editor.isSettingsEnabled()&&f&&(mxSettings.settings.pages=b,mxSettings.save());this.tabContainerVisible=b;this.updateTabContainer()};EditorUi.prototype.isTabContainerVisible=function(){return this.tabContainerVisible};EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
-EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&null!=b)for(var l=0;l<this.pages.length;l++)if(this.pages[l]==b){f=l;break}return f};EditorUi.prototype.getPageById=function(b,f){f=null!=f?f:this.pages;if(null!=f)for(var l=0;l<f.length;l++)if(f[l].getId()==b)return f[l];return null};
-EditorUi.prototype.createImageForPageLink=function(b,f,l,u){var y=b.indexOf(","),q=null;0<y&&(y=this.getPageById(b.substring(y+1)),null!=y&&y!=f&&(q=this.getImageForPage(y,f,l,u),q.originalSrc=b));null==q&&(q={originalSrc:b});return q};
+ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,f=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var m=new mxCodec(this.data.ownerDocument),t=new mxGraphModel;m.decode(this.data,t);this.data=f;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=t.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,
+!0);b.model.rootChanged(t.root);b.fireEvent(new mxEventObject(mxEvent.ROOT))};EditorUi.prototype.tabContainerVisible=!0;EditorUi.prototype.setTabContainerVisible=function(b,f){Editor.isSettingsEnabled()&&f&&(mxSettings.settings.pages=b,mxSettings.save());this.tabContainerVisible=b;this.updateTabContainer()};EditorUi.prototype.isTabContainerVisible=function(){return this.tabContainerVisible};EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
+EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&null!=b)for(var m=0;m<this.pages.length;m++)if(this.pages[m]==b){f=m;break}return f};EditorUi.prototype.getPageById=function(b,f){f=null!=f?f:this.pages;if(null!=f)for(var m=0;m<f.length;m++)if(f[m].getId()==b)return f[m];return null};
+EditorUi.prototype.createImageForPageLink=function(b,f,m,t){var y=b.indexOf(","),q=null;0<y&&(y=this.getPageById(b.substring(y+1)),null!=y&&y!=f&&(q=this.getImageForPage(y,f,m,t),q.originalSrc=b));null==q&&(q={originalSrc:b});return q};
EditorUi.prototype.pageSelected=function(){var b=this.editor.graph,f=this.currentPage;null!=f&&(b.tooltipHandler.hide(),null==f.viewState||null==f.viewState.scrollTop||null==f.viewState.scrollLeft?(b.selectUnlockedLayer(),this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollleft=0,b.container.scrollTop=0,this.chromelessResize())):b.setScrollbarPositions(f.viewState,b.view.translate.x,b.view.translate.y),this.updateTabContainer(),this.scrollToPage())};
-EditorUi.prototype.getImageForPage=function(b,f,l,u){l=null!=l?l:this.editor.graph;var y=l.getGlobalVariable;l=this.createTemporaryGraph(l.getStylesheet());var q=this.getPageIndex(null!=f?f:this.currentPage);l.getGlobalVariable=function(J){return"pagenumber"==J?q+1:"page"==J&&null!=f?f.getName():y.apply(this,arguments)};document.body.appendChild(l.container);this.updatePageRoot(b);l.setAdaptiveColors(b.viewState.adaptiveColors);l.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=
-"";u=l.getSvg(null,null,null,null,null,null,null,null,null,null,u,null,null,null,!0,!0);var C=l.getGraphBounds();document.body.removeChild(l.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(u)),C.width,C.height,C.x,C.y)};
+EditorUi.prototype.getImageForPage=function(b,f,m,t){m=null!=m?m:this.editor.graph;var y=m.getGlobalVariable;m=this.createTemporaryGraph(m.getStylesheet());var q=this.getPageIndex(null!=f?f:this.currentPage);m.getGlobalVariable=function(I){return"pagenumber"==I?q+1:"page"==I&&null!=f?f.getName():y.apply(this,arguments)};document.body.appendChild(m.container);this.updatePageRoot(b);m.setAdaptiveColors(b.viewState.adaptiveColors);m.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=
+"";t=m.getSvg(null,null,null,null,null,null,null,null,null,null,t,null,null,null,!0,!0);var B=m.getGraphBounds();document.body.removeChild(m.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(t)),B.width,B.height,B.x,B.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,f=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){f.apply(b.view,
-arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,J){C=J.getProperty("edit").changes;for(J=0;J<C.length;J++)if(C[J]instanceof RenamePage||C[J]instanceof ChangePage||C[J]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==C.length&&C[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var l=b.sizeDidChange,u=null,y=this;b.sizeDidChange=
-function(){var C=l.apply(this,arguments);null!=y.currentPage&&u!=y.currentPage&&(u=y.currentPage,y.pageSelected());return C};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var q=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",q);this.editor.addListener("pagesPatched",q);this.editor.addListener("pageRenamed",q);this.editor.addListener("pageMoved",q);this.editor.addListener("fileLoaded",q);
-this.editor.addListener("pageSelected",mxUtils.bind(this,function(C,J){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(C,J){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
-EditorUi.prototype.scrollToPage=function(b,f){var l=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),u=null!=b?b:this.currentPage;null!=l&&null!=this.tabScroller&&this.tabScroller.children.length>l&&null!=this.tabScroller.children[l]&&(u!=this.lastScrollPage||f)&&(this.tabScroller.children[l].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[l].className="geTab gePageTab geActivePage",this.lastScrollPage=u)};
-EditorUi.prototype.restoreViewState=function(b,f,l){b=null!=b?this.getPageById(b.getId()):null;var u=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(u.setViewState(f),this.editor.updateGraphComponents(),u.view.revalidate(),u.sizeDidChange()),u.container.scrollLeft=u.view.translate.x*u.view.scale+f.scrollLeft,u.container.scrollTop=u.view.translate.y*u.view.scale+f.scrollTop,u.restoreSelection(l))};
-Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),l=parseFloat(b.getAttribute("pageScale")),u=parseFloat(b.getAttribute("pageWidth")),y=parseFloat(b.getAttribute("pageHeight")),q=b.getAttribute("background"),C=this.parseBackgroundImage(b.getAttribute("backgroundImage")),J=b.getAttribute("extFonts");if(J)try{J=J.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=q&&0<q.length?q:null,backgroundImage:C,pageScale:isNaN(l)?mxGraph.prototype.pageScale:l,pageFormat:isNaN(u)||isNaN(y)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,u,y),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:J||[]}};
-Graph.prototype.saveViewState=function(b,f,l,u,y){l||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),
-f.setAttribute("fold",null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);l=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=l&&(f.setAttribute("pageWidth",l.width),f.setAttribute("pageHeight",l.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),u=this.getBackgroundImageObject(b.backgroundImage,
-u,y),null!=u&&f.setAttribute("backgroundImage",JSON.stringify(u)));f.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");f.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?f.removeAttribute("adaptiveColors"):f.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&f.setAttribute("extFonts",b.extFonts.map(function(q){return q.name+"^"+q.url}).join("|"))};
+arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(B,I){B=I.getProperty("edit").changes;for(I=0;I<B.length;I++)if(B[I]instanceof RenamePage||B[I]instanceof ChangePage||B[I]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==B.length&&B[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var m=b.sizeDidChange,t=null,y=this;b.sizeDidChange=
+function(){var B=m.apply(this,arguments);null!=y.currentPage&&t!=y.currentPage&&(t=y.currentPage,y.pageSelected());return B};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var q=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",q);this.editor.addListener("pagesPatched",q);this.editor.addListener("pageRenamed",q);this.editor.addListener("pageMoved",q);this.editor.addListener("fileLoaded",q);
+this.editor.addListener("pageSelected",mxUtils.bind(this,function(B,I){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(B,I){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
+EditorUi.prototype.scrollToPage=function(b,f){var m=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),t=null!=b?b:this.currentPage;null!=m&&null!=this.tabScroller&&this.tabScroller.children.length>m&&null!=this.tabScroller.children[m]&&(t!=this.lastScrollPage||f)&&(this.tabScroller.children[m].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[m].className="geTab gePageTab geActivePage",this.lastScrollPage=t)};
+EditorUi.prototype.restoreViewState=function(b,f,m){b=null!=b?this.getPageById(b.getId()):null;var t=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(t.setViewState(f),this.editor.updateGraphComponents(),t.view.revalidate(),t.sizeDidChange()),t.container.scrollLeft=t.view.translate.x*t.view.scale+f.scrollLeft,t.container.scrollTop=t.view.translate.y*t.view.scale+f.scrollTop,t.restoreSelection(m))};
+Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),m=parseFloat(b.getAttribute("pageScale")),t=parseFloat(b.getAttribute("pageWidth")),y=parseFloat(b.getAttribute("pageHeight")),q=b.getAttribute("background"),B=this.parseBackgroundImage(b.getAttribute("backgroundImage")),I=b.getAttribute("extFonts");if(I)try{I=I.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=q&&0<q.length?q:null,backgroundImage:B,pageScale:isNaN(m)?mxGraph.prototype.pageScale:m,pageFormat:isNaN(t)||isNaN(y)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,t,y),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:I||[]}};
+Graph.prototype.saveViewState=function(b,f,m,t,y){m||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),
+f.setAttribute("fold",null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);m=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=m&&(f.setAttribute("pageWidth",m.width),f.setAttribute("pageHeight",m.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),t=this.getBackgroundImageObject(b.backgroundImage,
+t,y),null!=t&&f.setAttribute("backgroundImage",JSON.stringify(t)));f.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");f.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?f.removeAttribute("adaptiveColors"):f.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&f.setAttribute("extFonts",b.extFonts.map(function(q){return q.name+"^"+q.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,adaptiveColors:this.adaptiveColors,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
Graph.prototype.setViewState=function(b,f){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.adaptiveColors=b.adaptiveColors;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;
-this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var l=this.extFonts;this.extFonts=b.extFonts||[];if(f&&null!=l)for(f=0;f<l.length;f++){var u=document.getElementById("extFont_"+l[f].name);null!=u&&u.parentNode.removeChild(u)}for(f=0;f<this.extFonts.length;f++)this.addExtFont(this.extFonts[f].name,
+this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var m=this.extFonts;this.extFonts=b.extFonts||[];if(f&&null!=m)for(f=0;f<m.length;f++){var t=document.getElementById("extFont_"+m[f].name);null!=t&&t.parentNode.removeChild(t)}for(f=0;f<this.extFonts.length;f++)this.addExtFont(this.extFonts[f].name,
this.extFonts[f].url,!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,
this.pageFormat="undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.adaptiveColors=
-null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,f,l){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=f*this.view.scale+b.scrollLeft,this.container.scrollTop=l*this.view.scale+b.scrollTop)};
-Graph.prototype.addExtFont=function(b,f,l){if(b&&f){var u="extFont_"+b;if(null==document.getElementById(u))if(0==f.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",f,null,u);else{document.getElementsByTagName("head");var y=document.createElement("style");y.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+f+'");\n}'));y.setAttribute("id",u);document.getElementsByTagName("head")[0].appendChild(y)}if(!l){null==this.extFonts&&(this.extFonts=[]);l=this.extFonts;
-u=!0;for(y=0;y<l.length;y++)if(l[y].name==b){u=!1;break}u&&this.extFonts.push({name:b,url:f})}}};
-EditorUi.prototype.updatePageRoot=function(b,f){if(null==b.root){f=this.editor.extractGraphModel(b.node,null,f);var l=Editor.extractParserError(f);if(l)throw Error(l);null!=f?(b.graphModelNode=f,b.viewState=this.editor.graph.createViewState(f),l=new mxCodec(f.ownerDocument),b.root=l.decode(f).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){f=this.editor.extractGraphModel(b.node);
-if(l=Editor.extractParserError(f))throw Error(l);null!=f&&(b.graphModelNode=f)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)f=new mxCell,f.setId("1"),b.root.insert(f),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};
-EditorUi.prototype.updateDiagramData=function(b,f){if(null==this.getPageIndex(b.page))this.insertPage(null,null,f);else{var l=new mxCodec(b.node.ownerDocument),u=new mxGraphModel;l.decode(b.node,u);l=new mxCodec(f.ownerDocument);var y=new mxGraphModel;l.decode(f,y);this.selectPage(b.page);f=this.diffCells(u.root,y.root);this.patchPage(b.page,f,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};
-EditorUi.prototype.selectPage=function(b,f,l){try{if(b!=this.currentPage){var u=this.editor.graph;u.isEditing()&&u.stopEditing(!1);f=null!=f?f:!1;u.isMouseDown=!1;u.reset();var y=u.model.createUndoableEdit();y.ignoreEdit=!0;var q=new SelectPage(this,b,l);q.execute();y.add(q);y.notify();f||u.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",y))}}catch(C){this.handleError(C)}};
+null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,f,m){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=f*this.view.scale+b.scrollLeft,this.container.scrollTop=m*this.view.scale+b.scrollTop)};
+Graph.prototype.addExtFont=function(b,f,m){if(b&&f){var t="extFont_"+b;if(null==document.getElementById(t))if(0==f.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",f,null,t);else{document.getElementsByTagName("head");var y=document.createElement("style");y.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+f+'");\n}'));y.setAttribute("id",t);document.getElementsByTagName("head")[0].appendChild(y)}if(!m){null==this.extFonts&&(this.extFonts=[]);m=this.extFonts;
+t=!0;for(y=0;y<m.length;y++)if(m[y].name==b){t=!1;break}t&&this.extFonts.push({name:b,url:f})}}};
+EditorUi.prototype.updatePageRoot=function(b,f){if(null==b.root){f=this.editor.extractGraphModel(b.node,null,f);var m=Editor.extractParserError(f);if(m)throw Error(m);null!=f?(b.graphModelNode=f,b.viewState=this.editor.graph.createViewState(f),m=new mxCodec(f.ownerDocument),b.root=m.decode(f).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){f=this.editor.extractGraphModel(b.node);
+if(m=Editor.extractParserError(f))throw Error(m);null!=f&&(b.graphModelNode=f)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)f=new mxCell,f.setId("1"),b.root.insert(f),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};
+EditorUi.prototype.updateDiagramData=function(b,f){if(null==this.getPageIndex(b.page))this.insertPage(null,null,f);else{var m=new mxCodec(b.node.ownerDocument),t=new mxGraphModel;m.decode(b.node,t);m=new mxCodec(f.ownerDocument);var y=new mxGraphModel;m.decode(f,y);this.selectPage(b.page);f=this.diffCells(t.root,y.root);this.patchPage(b.page,f,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};
+EditorUi.prototype.selectPage=function(b,f,m){try{if(b!=this.currentPage){var t=this.editor.graph;t.isEditing()&&t.stopEditing(!1);f=null!=f?f:!1;t.isMouseDown=!1;t.reset();var y=t.model.createUndoableEdit();y.ignoreEdit=!0;var q=new SelectPage(this,b,m);q.execute();y.add(q);y.notify();f||t.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",y))}}catch(B){this.handleError(B)}};
EditorUi.prototype.selectNextPage=function(b){var f=this.currentPage;null!=f&&null!=this.pages&&(f=mxUtils.indexOf(this.pages,f),b?this.selectPage(this.pages[mxUtils.mod(f+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(f-1,this.pages.length)]))};
-EditorUi.prototype.insertPage=function(b,f,l){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),l),f=null!=f?f:this.pages.length,f=new ChangePage(this,b,b,f),this.editor.graph.model.execute(f));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
-EditorUi.prototype.createPage=function(b,f,l){f=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f,l);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var l=this.pages[f].getName();null!=l&&0<l.length&&(b[l]=l)}f=this.pages.length;do l=mxResources.get("pageWithNumber",[++f]);while(null!=b[l]);return l};
-EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,l=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=l){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var u=this.currentPage;u==b&&1<this.pages.length?(l==this.pages.length-1?l--:l++,u=this.pages[l]):1>=this.pages.length&&(u=this.insertPage(),f.model.execute(new RenamePage(this,u,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,u))}finally{f.model.endUpdate()}}}catch(y){this.handleError(y)}return b};
-EditorUi.prototype.duplicatePage=function(b,f){var l=null;try{var u=this.editor.graph;if(u.isEnabled()){u.isEditing()&&u.stopEditing();var y=b.node.cloneNode(!1);y.removeAttribute("id");var q={},C=u.createCellLookup([u.model.root]);l=new DiagramPage(y);l.root=u.cloneCell(u.model.root,null,q);var J=new mxGraphModel;J.prefix=Editor.guid()+"-";J.setRoot(l.root);u.updateCustomLinks(u.createCellMapping(q,C),[l.root]);l.viewState=b==this.currentPage?u.getViewState():b.viewState;this.initDiagramNode(l);
-l.viewState.scale=1;delete l.viewState.scrollLeft;delete l.viewState.scrollTop;delete l.viewState.currentRoot;delete l.viewState.defaultParent;l.setName(f);l=this.insertPage(l,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return l};EditorUi.prototype.initDiagramNode=function(b,f){null==f&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,f);EditorUi.removeChildNodes(b.node);b.node.appendChild(f)};
-EditorUi.prototype.clonePages=function(b){for(var f=[],l=[],u=0;u<b.length;u++)try{l.push(this.clonePage(b[u]))}catch(y){f.push(mxResources.get("pageWithNumber",[u+1])+": "+y.toString())}if(0<f.length){b=Error(f.join("\n"));try{0<l.length&&(b.fallbackFileData=this.getXmlForPages(l))}catch(y){}throw b;}return l};
-EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),l=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(l,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);f.diagramModified=b.diagramModified;return f};
-EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(l){null!=l&&0<l.length&&this.editor.graph.model.execute(new RenamePage(this,b,l))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};
+EditorUi.prototype.insertPage=function(b,f,m){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),m),f=null!=f?f:this.pages.length,f=new ChangePage(this,b,b,f),this.editor.graph.model.execute(f));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
+EditorUi.prototype.createPage=function(b,f,m){f=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f,m);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var m=this.pages[f].getName();null!=m&&0<m.length&&(b[m]=m)}f=this.pages.length;do m=mxResources.get("pageWithNumber",[++f]);while(null!=b[m]);return m};
+EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,m=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=m){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var t=this.currentPage;t==b&&1<this.pages.length?(m==this.pages.length-1?m--:m++,t=this.pages[m]):1>=this.pages.length&&(t=this.insertPage(),f.model.execute(new RenamePage(this,t,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,t))}finally{f.model.endUpdate()}}}catch(y){this.handleError(y)}return b};
+EditorUi.prototype.duplicatePage=function(b,f){var m=null;try{var t=this.editor.graph;if(t.isEnabled()){t.isEditing()&&t.stopEditing();var y=b.node.cloneNode(!1);y.removeAttribute("id");var q={},B=t.createCellLookup([t.model.root]);m=new DiagramPage(y);m.root=t.cloneCell(t.model.root,null,q);var I=new mxGraphModel;I.prefix=Editor.guid()+"-";I.setRoot(m.root);t.updateCustomLinks(t.createCellMapping(q,B),[m.root]);m.viewState=b==this.currentPage?t.getViewState():b.viewState;this.initDiagramNode(m);
+m.viewState.scale=1;delete m.viewState.scrollLeft;delete m.viewState.scrollTop;delete m.viewState.currentRoot;delete m.viewState.defaultParent;m.setName(f);m=this.insertPage(m,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return m};EditorUi.prototype.initDiagramNode=function(b,f){null==f&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,f);EditorUi.removeChildNodes(b.node);b.node.appendChild(f)};
+EditorUi.prototype.clonePages=function(b){for(var f=[],m=[],t=0;t<b.length;t++)try{m.push(this.clonePage(b[t]))}catch(y){f.push(mxResources.get("pageWithNumber",[t+1])+": "+y.toString())}if(0<f.length){b=Error(f.join("\n"));try{0<m.length&&(b.fallbackFileData=this.getXmlForPages(m))}catch(y){}throw b;}return m};
+EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),m=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(m,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);f.diagramModified=b.diagramModified;return f};
+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(m){null!=m&&0<m.length&&this.editor.graph.model.execute(new RenamePage(this,b,m))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer geTabItem";return b};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&!this.isTabContainerVisible())this.tabContainer.style.display="none";else if(null!=this.tabContainer&&null!=this.pages){this.tabContainer.style.display="";var b=this.editor.graph,f=document.createElement("div");f.className="geTabScroller";for(var l=null,u=0;u<this.pages.length;u++)mxUtils.bind(this,function(y,q){q.className="geTab gePageTab";this.pages[y]==this.currentPage&&q.classList.add("geActivePage");q.setAttribute("draggable",
-"true");mxEvent.addListener(q,"dragstart",mxUtils.bind(this,function(C){b.isEnabled()?(mxClient.IS_FF&&C.dataTransfer.setData("Text","<diagram/>"),l=y):mxEvent.consume(C)}));mxEvent.addListener(q,"dragend",mxUtils.bind(this,function(C){l=null;C.stopPropagation();C.preventDefault()}));mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(C){null!=l&&(C.dataTransfer.dropEffect="move");C.stopPropagation();C.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(C){null!=l&&
-y!=l&&this.movePage(l,y);C.stopPropagation();C.preventDefault()}));f.appendChild(q)})(u,this.createTabForPage(this.pages[u],u+1));u=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(f);this.leftScrollTab=this.createLeftScrollTab();
-this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);this.tabScroller=f;this.tabScroller.scrollLeft=u;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(y){this.checkTabScrollerOverflow()}))}};
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&!this.isTabContainerVisible())this.tabContainer.style.display="none";else if(null!=this.tabContainer&&null!=this.pages){this.tabContainer.style.display="";var b=this.editor.graph,f=document.createElement("div");f.className="geTabScroller";for(var m=null,t=0;t<this.pages.length;t++)mxUtils.bind(this,function(y,q){q.className="geTab gePageTab";this.pages[y]==this.currentPage&&q.classList.add("geActivePage");q.setAttribute("draggable",
+"true");mxEvent.addListener(q,"dragstart",mxUtils.bind(this,function(B){b.isEnabled()?(mxClient.IS_FF&&B.dataTransfer.setData("Text","<diagram/>"),m=y):mxEvent.consume(B)}));mxEvent.addListener(q,"dragend",mxUtils.bind(this,function(B){m=null;B.stopPropagation();B.preventDefault()}));mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(B){null!=m&&(B.dataTransfer.dropEffect="move");B.stopPropagation();B.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(B){null!=m&&
+y!=m&&this.movePage(m,y);B.stopPropagation();B.preventDefault()}));f.appendChild(q)})(t,this.createTabForPage(this.pages[t],t+1));t=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(f);this.leftScrollTab=this.createLeftScrollTab();
+this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);this.tabScroller=f;this.tabScroller.scrollLeft=t;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(y){this.checkTabScrollerOverflow()}))}};
EditorUi.prototype.checkTabScrollerOverflow=function(){null!=this.tabScroller&&null!=this.tabContainer&&2<this.tabContainer.children.length&&(this.tabScroller.scrollWidth>this.tabScroller.offsetWidth?(this.leftScrollTab.style.display="",this.rightScrollTab.style.display="",0==this.tabScroller.scrollLeft?this.leftScrollTab.classList.add("mxDisabled"):this.leftScrollTab.classList.remove("mxDisabled"),Math.ceil(this.tabScroller.scrollLeft)+this.tabScroller.offsetWidth>=this.tabScroller.scrollWidth?this.rightScrollTab.classList.add("mxDisabled"):
this.rightScrollTab.classList.remove("mxDisabled")):(this.leftScrollTab.style.display="none",this.rightScrollTab.style.display="none"))};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};EditorUi.prototype.createTab=function(){var b=document.createElement("div");b.className="geTab";return b};
-EditorUi.prototype.getShortPageName=function(b){var f=null;null!=b&&(f=b.getName(),null!=f&&36<f.length&&(f=f.substring(0,34)+"..."));return f};EditorUi.prototype.createControlTab=function(b,f,l){var u=this.createTab();u.className="geTab geControlTab";null!=b&&u.setAttribute("title",b);b=document.createElement("div");b.className="geButton";b.style.backgroundImage="url("+f+")";u.appendChild(b);mxEvent.addListener(u,"click",l);return u};
+EditorUi.prototype.getShortPageName=function(b){var f=null;null!=b&&(f=b.getName(),null!=f&&36<f.length&&(f=f.substring(0,34)+"..."));return f};EditorUi.prototype.createControlTab=function(b,f,m){var t=this.createTab();t.className="geTab geControlTab";null!=b&&t.setAttribute("title",b);b=document.createElement("div");b.className="geButton";b.style.backgroundImage="url("+f+")";t.appendChild(b);mxEvent.addListener(t,"click",m);return t};
EditorUi.prototype.createPageInsertTab=function(){return this.createControlTab(mxResources.get("insertPage"),Editor.plusImage,mxUtils.bind(this,function(b){try{this.insertPage()}catch(f){this.handleError(f)}mxEvent.consume(b)}))};
EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(null,Editor.chevronLeftImage,mxUtils.bind(this,function(b){var f=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:-f,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft-=f;mxEvent.consume(b)}))};
EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,mxUtils.bind(this,function(b){var f=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:f,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=f;mxEvent.consume(b)}))};
-EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(mxUtils.bind(this,function(y,q){this.menus.get("pages").funct(y,q)}));f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});var l=mxEvent.getClientX(b),u=mxEvent.getClientY(b);f.popup(l,
-u,null,b);this.setCurrentMenu(f);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,f){var l=this.createTab(),u=b.getName()||mxResources.get("untitled"),y=b.getId();l.setAttribute("title",u+(null!=y?" ("+y+")":"")+" ["+f+"]");f=document.createElement("span");f.style.maxWidth="160px";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,u);l.appendChild(f);this.addTabListeners(b,l);return l};
-EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var l=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var u=document.createElement("div");u.style.backgroundImage="url("+Editor.thinExpandImage+")";u.className="geButton";f.appendChild(u);var y=!1,q=!1,C=mxUtils.bind(this,function(S){y=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);l.isMouseDown||q||this.selectPage(b)}),J=mxUtils.bind(this,
-function(S){if(!l.isMouseDown&&(q&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==u)||mxEvent.isPopupTrigger(S))&&(l.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!y)){var D=new mxPopupMenu(this.createPageMenu(b));D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);this.resetCurrentMenu();D.destroy()});var P=mxEvent.getClientX(S),c=mxEvent.getClientY(S);D.popup(P,c,null,S);
-this.setCurrentMenu(D,f)}mxEvent.consume(S)});mxEvent.addGestureListeners(u,C,null,J);mxEvent.addGestureListeners(f,C,null,J)};
-EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(l,u){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||l.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),u));this.editor.graph.isEnabled()&&(l.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",
-[b.getName()]))}),u),l.addSeparator(u),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",l,u,mxResources.get("move")),l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),u),l.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),u))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(u,y,q,C,J){y=null!=y?y:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),u));this.stopEditing();this.model.beginUpdate();try{for(var S=q.slice(),D=0;D<q.length;D++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[D]),"treeFolding","0")&&this.foldTreeCell(u,q[D]);q=S;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(u,y){this.model.beginUpdate();try{var q=
-[];this.traverse(y,!0,mxUtils.bind(this,function(J,S){var D=null!=S&&this.isTreeEdge(S);D&&q.push(S);J==y||null!=S&&!D||q.push(J);return(null==S||D)&&(J==y||!this.model.isCollapsed(J))}));this.model.setCollapsed(y,u);for(var C=0;C<q.length;C++)this.model.setVisible(q[C],!u)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(u){return!this.isEdgeIgnored(u)};Graph.prototype.getTreeEdges=function(u,y,q,C,J,S){return this.model.filterCells(this.getEdges(u,y,q,C,J,S),mxUtils.bind(this,
-function(D){return this.isTreeEdge(D)}))};Graph.prototype.getIncomingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function u(V){return x.isVertex(V)&&q(V)}function y(V){var k=!1;null!=V&&(k="1"==
-n.getCurrentCellStyle(V).treeMoving);return k}function q(V){var k=!1;null!=V&&(V=x.getParent(V),k=n.view.getState(V),k="tree"==(null!=k?k.style:n.getCellStyle(V)).containerType);return k}function C(V){var k=!1;null!=V&&(V=x.getParent(V),k=n.view.getState(V),n.view.getState(V),k=null!=(null!=k?k.style:n.getCellStyle(V)).childLayout);return k}function J(V){V=n.view.getState(V);if(null!=V){var k=n.getIncomingTreeEdges(V.cell);if(0<k.length&&(k=n.view.getState(k[0]),null!=k&&(k=k.absolutePoints,null!=
-k&&0<k.length&&(k=k[k.length-1],null!=k)))){if(k.y==V.y&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_SOUTH;if(k.y==V.y+V.height&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_NORTH;if(k.x>V.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(V,k){k=null!=k?k:!0;n.model.beginUpdate();try{var v=n.model.getParent(V),I=n.getIncomingTreeEdges(V),N=n.cloneCells([I[0],V]);n.model.setTerminal(N[0],n.model.getTerminal(I[0],
-!0),!0);var T=J(V),W=v.geometry;T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?N[1].geometry.x+=k?V.geometry.width+10:-N[1].geometry.width-10:N[1].geometry.y+=k?V.geometry.height+10:-N[1].geometry.height-10;n.view.currentRoot!=v&&(N[1].geometry.x-=W.x,N[1].geometry.y-=W.y);var U=n.view.getState(V),Y=n.view.scale;if(null!=U){var fa=mxRectangle.fromRectangle(U);T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?fa.x+=(k?V.geometry.width+10:-N[1].geometry.width-10)*Y:fa.y+=
-(k?V.geometry.height+10:-N[1].geometry.height-10)*Y;var na=n.getOutgoingTreeEdges(n.model.getTerminal(I[0],!0));if(null!=na){for(var la=T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH,qa=W=I=0;qa<na.length;qa++){var ya=n.model.getTerminal(na[qa],!1);if(T==J(ya)){var wa=n.view.getState(ya);ya!=V&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY())&&mxUtils.intersects(fa,wa)&&(I=10+Math.max(I,(Math.min(fa.x+fa.width,wa.x+wa.width)-Math.max(fa.x,wa.x))/
-Y),W=10+Math.max(W,(Math.min(fa.y+fa.height,wa.y+wa.height)-Math.max(fa.y,wa.y))/Y))}}la?W=0:I=0;for(qa=0;qa<na.length;qa++)if(ya=n.model.getTerminal(na[qa],!1),T==J(ya)&&(wa=n.view.getState(ya),ya!=V&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY()))){var Ia=[];n.traverse(wa.cell,!0,function(Aa,Ba){var Ga=null!=Ba&&n.isTreeEdge(Ba);Ga&&Ia.push(Ba);(null==Ba||Ga)&&Ia.push(Aa);return null==Ba||Ga});n.moveCells(Ia,(k?1:-1)*I,(k?1:-1)*W)}}}return n.addCells(N,
-v)}finally{n.model.endUpdate()}}function D(V){n.model.beginUpdate();try{var k=J(V),v=n.getIncomingTreeEdges(V),I=n.cloneCells([v[0],V]);n.model.setTerminal(v[0],I[1],!1);n.model.setTerminal(I[0],I[1],!0);n.model.setTerminal(I[0],V,!1);var N=n.model.getParent(V),T=N.geometry,W=[];n.view.currentRoot!=N&&(I[1].geometry.x-=T.x,I[1].geometry.y-=T.y);n.traverse(V,!0,function(fa,na){var la=null!=na&&n.isTreeEdge(na);la&&W.push(na);(null==na||la)&&W.push(fa);return null==na||la});var U=V.geometry.width+40,
-Y=V.geometry.height+40;k==mxConstants.DIRECTION_SOUTH?U=0:k==mxConstants.DIRECTION_NORTH?(U=0,Y=-Y):k==mxConstants.DIRECTION_WEST?(U=-U,Y=0):k==mxConstants.DIRECTION_EAST&&(Y=0);n.moveCells(W,U,Y);return n.addCells(I,N)}finally{n.model.endUpdate()}}function P(V,k){n.model.beginUpdate();try{var v=n.model.getParent(V),I=n.getIncomingTreeEdges(V),N=J(V);0==I.length&&(I=[n.createEdge(v,null,"",null,null,n.createCurrentEdgeStyle())],N=k);var T=n.cloneCells([I[0],V]);n.model.setTerminal(T[0],V,!0);null==
-n.model.getTerminal(T[0],!1)&&(n.model.setTerminal(T[0],T[1],!1),n.applyNewEdgeStyle(T[1],[T[0]],N));I=n.getOutgoingTreeEdges(V);var W=v.geometry;k=[];n.view.currentRoot==v&&(W=new mxRectangle);for(var U=0;U<I.length;U++){var Y=n.model.getTerminal(I[U],!1);null!=Y&&k.push(Y)}var fa=n.view.getBounds(k),na=n.view.translate,la=n.view.scale;N==mxConstants.DIRECTION_SOUTH?(T[1].geometry.x=null==fa?V.geometry.x+(V.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x-W.x+10,T[1].geometry.y+=T[1].geometry.height-
-W.y+40):N==mxConstants.DIRECTION_NORTH?(T[1].geometry.x=null==fa?V.geometry.x+(V.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x+-W.x+10,T[1].geometry.y-=T[1].geometry.height+W.y+40):(T[1].geometry.x=N==mxConstants.DIRECTION_WEST?T[1].geometry.x-(T[1].geometry.width+W.x+40):T[1].geometry.x+(T[1].geometry.width-W.x+40),T[1].geometry.y=null==fa?V.geometry.y+(V.geometry.height-T[1].geometry.height)/2:(fa.y+fa.height)/la-na.y+-W.y+10);return n.addCells(T,v)}finally{n.model.endUpdate()}}
-function c(V,k,v){V=n.getOutgoingTreeEdges(V);v=n.view.getState(v);var I=[];if(null!=v&&null!=V){for(var N=0;N<V.length;N++){var T=n.view.getState(n.model.getTerminal(V[N],!1));null!=T&&(!k&&Math.min(T.x+T.width,v.x+v.width)>=Math.max(T.x,v.x)||k&&Math.min(T.y+T.height,v.y+v.height)>=Math.max(T.y,v.y))&&I.push(T)}I.sort(function(W,U){return k?W.x+W.width-U.x-U.width:W.y+W.height-U.y-U.height})}return I}function g(V,k){var v=J(V),I=k==mxConstants.DIRECTION_EAST||k==mxConstants.DIRECTION_WEST;(v==mxConstants.DIRECTION_EAST||
-v==mxConstants.DIRECTION_WEST)==I&&v!=k?m.actions.get("selectParent").funct():v==k?(k=n.getOutgoingTreeEdges(V),null!=k&&0<k.length&&n.setSelectionCell(n.model.getTerminal(k[0],!1))):(v=n.getIncomingTreeEdges(V),null!=v&&0<v.length&&(I=c(n.model.getTerminal(v[0],!0),I,V),V=n.view.getState(V),null!=V&&(V=mxUtils.indexOf(I,V),0<=V&&(V+=k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_WEST?-1:1,0<=V&&V<=I.length-1&&n.setSelectionCell(I[V].cell)))))}var m=this,n=m.editor.graph,x=n.getModel(),
-F=m.menus.createPopupMenu;m.menus.createPopupMenu=function(V,k,v){F.apply(this,arguments);if(1==n.getSelectionCount()){k=n.getSelectionCell();var I=n.getOutgoingTreeEdges(k);V.addSeparator();0<I.length&&(u(n.getSelectionCell())&&this.addMenuItems(V,["selectChildren"],null,v),this.addMenuItems(V,["selectDescendants"],null,v));u(n.getSelectionCell())?(V.addSeparator(),0<n.getIncomingTreeEdges(k).length&&this.addMenuItems(V,["selectSiblings","selectParent"],null,v)):0<n.model.getEdgeCount(k)&&this.addMenuItems(V,
-["selectConnections"],null,v)}};m.actions.addAction("selectChildren",function(V){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell();V=mxEvent.isControlDown(V)?null:n.getOutgoingTreeEdges(k);if(null!=V&&0<V.length){k=[];for(var v=0;v<V.length;v++)k.push(n.model.getTerminal(V[v],!1));n.setSelectionCells(k)}else n.setSelectionCells(n.model.getChildren(k))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");m.actions.addAction("selectDescendants",function(V){var k=n.getSelectionCell();
-if(n.isEnabled()&&null!=k){var v=[];mxEvent.isControlDown(V)||n.traverse(k,!0,function(I,N){var T=null!=N&&n.isTreeEdge(N);T&&mxEvent.isControlDown(V)&&v.push(N);(null==N||T)&&v.push(I);return null==N||T});if(0==v.length||1==v.length&&v[0]==k)v=n.model.getDescendants(k);n.setSelectionCells(v)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");m.actions.addAction("selectParent",function(V){var k=n.getSelectionCell();n.isEnabled()&&null!=k&&(V=mxEvent.isControlDown(V)?null:n.getIncomingTreeEdges(k),
-null!=V&&0<V.length?n.setSelectionCell(n.model.getTerminal(V[0],!0)):n.selectParentCell())},null,null,Editor.altKey+"+"+Editor.shiftKey+"+P");m.actions.addAction("selectSiblings",function(V){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell(),v=mxEvent.isControlDown(V)?null:n.getIncomingTreeEdges(k);V=[];if(null!=v&&0<v.length&&(v=n.getOutgoingTreeEdges(n.model.getTerminal(v[0],!0)),null!=v))for(var I=0;I<v.length;I++)V.push(n.model.getTerminal(v[I],!1));0==V.length&&(V=n.model.getChildren(n.model.getParent(k)));
-n.setSelectionCells(V)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");var H=n.removeCells;n.removeCells=function(V,k){k=null!=k?k:!0;null==V&&(V=this.getDeletableCells(this.getSelectionCells()));k&&(V=this.getDeletableCells(this.addAllEdges(V)));for(var v=[],I=0;I<V.length;I++){var N=V[I];x.isEdge(N)&&q(N)&&(v.push(N),N=x.getTerminal(N,!1));if(u(N)){var T=[];n.traverse(N,!0,function(W,U){var Y=null!=U&&n.isTreeEdge(U);Y&&T.push(U);(null==U||Y)&&T.push(W);return null==U||Y});0<T.length&&(v=v.concat(T),
-N=n.getIncomingTreeEdges(V[I]),V=V.concat(N))}else null!=N&&v.push(V[I])}V=v;return H.apply(this,arguments)};m.hoverIcons.getStateAt=function(V,k,v){return u(V.cell)?null:this.graph.view.getState(this.graph.getCellAt(k,v))};var M=n.duplicateCells;n.duplicateCells=function(V,k){V=null!=V?V:this.getSelectionCells();for(var v=V.slice(0),I=0;I<v.length;I++){var N=n.view.getState(v[I]);if(null!=N&&u(N.cell)){var T=n.getIncomingTreeEdges(N.cell);for(N=0;N<T.length;N++)mxUtils.remove(T[N],V)}}this.model.beginUpdate();
-try{var W=M.call(this,V,k);if(W.length==V.length)for(I=0;I<V.length;I++)if(u(V[I])){var U=n.getIncomingTreeEdges(W[I]);T=n.getIncomingTreeEdges(V[I]);if(0==U.length&&0<T.length){var Y=this.cloneCell(T[0]);this.addEdge(Y,n.getDefaultParent(),this.model.getTerminal(T[0],!0),W[I])}}}finally{this.model.endUpdate()}return W};var L=n.moveCells;n.moveCells=function(V,k,v,I,N,T,W){for(var U=null,Y=[],fa=0;fa<V.length;fa++)(y(V[fa])||u(V[fa]))&&!C(V[fa])&&this.isCellCollapsed(V[fa])?Y=Y.concat(this.getSubtree(V[fa])):
-Y.push(V[fa]);V=mxUtils.removeDuplicates(Y);this.model.beginUpdate();try{Y=N;var na=this.getCurrentCellStyle(N);if(null!=V&&u(N)&&"1"==mxUtils.getValue(na,"treeFolding","0")){for(fa=0;fa<V.length;fa++)if(u(V[fa])||n.model.isEdge(V[fa])&&null==n.model.getTerminal(V[fa],!0)){N=n.model.getParent(V[fa]);break}if(null!=Y&&N!=Y&&null!=this.view.getState(V[0])){var la=n.getIncomingTreeEdges(V[0]);if(0<la.length){var qa=n.view.getState(n.model.getTerminal(la[0],!0));if(null!=qa){var ya=n.view.getState(Y);
-null!=ya&&(k=(ya.getCenterX()-qa.getCenterX())/n.view.scale,v=(ya.getCenterY()-qa.getCenterY())/n.view.scale)}}}}U=L.apply(this,arguments);if(null!=U&&null!=V&&U.length==V.length)for(fa=0;fa<U.length;fa++)if(this.model.isEdge(U[fa]))u(Y)&&0>mxUtils.indexOf(U,this.model.getTerminal(U[fa],!0))&&this.model.setTerminal(U[fa],Y,!0);else if(u(V[fa])&&(la=n.getIncomingTreeEdges(V[fa]),0<la.length))if(!I)u(Y)&&0>mxUtils.indexOf(V,this.model.getTerminal(la[0],!0))&&this.model.setTerminal(la[0],Y,!0);else if(0==
-n.getIncomingTreeEdges(U[fa]).length){na=Y;if(null==na||na==n.model.getParent(V[fa]))na=n.model.getTerminal(la[0],!0);I=this.cloneCell(la[0]);this.addEdge(I,n.getDefaultParent(),na,U[fa])}}finally{this.model.endUpdate()}return U};if(null!=m.sidebar){var K=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(V,k,v,I){var N=n.model,T=null;N.beginUpdate();try{if(T=K.apply(this,arguments),u(V))for(var W=0;W<T.length;W++)if(N.isEdge(T[W])&&null==N.getTerminal(T[W],!0)){N.setTerminal(T[W],V,!0);var U=
-n.getCellGeometry(T[W]);U.points=null;null!=U.getTerminalPoint(!0)&&U.setTerminalPoint(null,!0)}}finally{N.endUpdate()}return T}}var Z={67:m.actions.get("selectChildren"),88:m.actions.get("selectDescendants"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},ha={67:m.actions.get("copyStyle"),86:m.actions.get("pasteStyle")},ca=m.onKeyDown;m.onKeyDown=function(V){try{var k=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=k){var v=mxEvent.isAltDown(V)&&mxEvent.isShiftDown(V)?
-Z[V.keyCode]:mxEvent.isAltDown(V)?ha[V.keyCode]:null;null!=v?(v.funct(V),mxEvent.consume(V)):u(k)&&(v=null,0<n.getIncomingTreeEdges(k).length&&(9==V.which?v=mxEvent.isShiftDown(V)?D(k):P(k):13==V.which&&(v=S(k,!mxEvent.isShiftDown(V)))),null!=v&&0<v.length?(1==v.length&&n.model.isEdge(v[0])?n.setSelectionCell(n.model.getTerminal(v[0],!1)):n.setSelectionCell(v[v.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(n.view.getState(k)),n.startEditingAtCell(k),mxEvent.consume(V)):37==V.keyCode?(g(k,mxConstants.DIRECTION_WEST),
-mxEvent.consume(V)):38==V.keyCode?(g(k,mxConstants.DIRECTION_NORTH),mxEvent.consume(V)):39==V.keyCode?(g(k,mxConstants.DIRECTION_EAST),mxEvent.consume(V)):40==V.keyCode&&(g(k,mxConstants.DIRECTION_SOUTH),mxEvent.consume(V)))}}catch(I){m.handleError(I)}mxEvent.isConsumed(V)||ca.apply(this,arguments)};var aa=n.connectVertex;n.connectVertex=function(V,k,v,I,N,T,W){var U=n.getIncomingTreeEdges(V);if(u(V)){var Y=J(V),fa=Y==mxConstants.DIRECTION_EAST||Y==mxConstants.DIRECTION_WEST,na=k==mxConstants.DIRECTION_EAST||
-k==mxConstants.DIRECTION_WEST;return Y==k||0==U.length?P(V,k):fa==na?D(V):S(V,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return aa.apply(this,arguments)};n.getSubtree=function(V){var k=[V];!y(V)&&!u(V)||C(V)||n.traverse(V,!0,function(v,I){var N=null!=I&&n.isTreeEdge(I);N&&0>mxUtils.indexOf(k,I)&&k.push(I);(null==I||N)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==I||N});return k};var oa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){oa.apply(this,
-arguments);(y(this.state.cell)||u(this.state.cell))&&!C(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(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),
-this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(V){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(V),mxEvent.getClientY(V),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(V);this.graph.isMouseDown=!0;m.hoverIcons.reset();mxEvent.consume(V)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var da=mxVertexHandler.prototype.redrawHandles;
-mxVertexHandler.prototype.redrawHandles=function(){da.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 ka=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(V){ka.apply(this,arguments);null!=
-this.moveHandle&&(this.moveHandle.style.display=V?"":"none")};var ba=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(V,k){ba.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var l=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var u=l.apply(this,arguments),y=this.graph,q=this;return u.concat([this.addEntry("tree container",
-function(){var C=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.vertex=!0;var J=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');J.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);S.insertEdge(D,!1);C.insert(D);C.insert(J);C.insert(S);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var C=new mxCell("Mindmap",new mxGeometry(0,
-0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.vertex=!0;var J=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');J.vertex=!0;var S=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);S.insertEdge(D,!1);var P=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-P.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),D.style);c.geometry.relative=!0;c.edge=!0;J.insertEdge(c,!0);P.insertEdge(c,!1);var g=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),D.style);m.geometry.relative=!0;m.edge=!0;J.insertEdge(m,!0);g.insertEdge(m,!1);var n=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),D.style);x.geometry.relative=!0;x.edge=!0;J.insertEdge(x,!0);n.insertEdge(x,!1);C.insert(D);C.insert(c);C.insert(m);C.insert(x);C.insert(J);C.insert(S);C.insert(P);C.insert(g);C.insert(n);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var C=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
-C.vertex=!0;return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var C=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");J.geometry.setTerminalPoint(new mxPoint(-40,40),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);return q.createVertexTemplateFromCells([C,J],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var C=new mxCell("Sub Topic",new mxGeometry(0,0,80,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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
-J.geometry.setTerminalPoint(new mxPoint(-40,40),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);return q.createVertexTemplateFromCells([C,J],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree orgchart organization division",function(){var C=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.vertex=!0;var J=new mxCell("Organization",new mxGeometry(80,
-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(J,"treeRoot","1");J.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);S.insertEdge(D,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
-!0;c.edge=!0;J.insertEdge(c,!0);P.insertEdge(c,!1);C.insert(D);C.insert(c);C.insert(J);C.insert(S);C.insert(P);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree root",function(){var C=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(C,"treeRoot","1");C.vertex=!0;return q.createVertexTemplateFromCells([C],
-C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree division",function(){var C=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-J.geometry.setTerminalPoint(new mxPoint(0,0),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);return q.createVertexTemplateFromCells([C,J],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree sub sections",function(){var C=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
-J.geometry.setTerminalPoint(new mxPoint(110,-40),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),J.style);D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative=!0;D.edge=!0;S.insertEdge(D,!1);return q.createVertexTemplateFromCells([J,D,C,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(mxUtils.bind(this,function(y,q){this.menus.get("pages").funct(y,q)}));f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});var m=mxEvent.getClientX(b),t=mxEvent.getClientY(b);f.popup(m,
+t,null,b);this.setCurrentMenu(f);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,f){var m=this.createTab(),t=b.getName()||mxResources.get("untitled"),y=b.getId();m.setAttribute("title",t+(null!=y?" ("+y+")":"")+" ["+f+"]");f=document.createElement("span");f.style.maxWidth="160px";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,t);m.appendChild(f);this.addTabListeners(b,m);return m};
+EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var m=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var t=document.createElement("div");t.style.backgroundImage="url("+Editor.thinExpandImage+")";t.className="geButton";f.appendChild(t);var y=!1,q=!1,B=mxUtils.bind(this,function(S){y=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);m.isMouseDown||q||this.selectPage(b)}),I=mxUtils.bind(this,
+function(S){if(!m.isMouseDown&&(q&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==t)||mxEvent.isPopupTrigger(S))&&(m.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!y)){var D=new mxPopupMenu(this.createPageMenu(b));D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);this.resetCurrentMenu();D.destroy()});var P=mxEvent.getClientX(S),c=mxEvent.getClientY(S);D.popup(P,c,null,S);
+this.setCurrentMenu(D,f)}mxEvent.consume(S)});mxEvent.addGestureListeners(t,B,null,I);mxEvent.addGestureListeners(f,B,null,I)};
+EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(m,t){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||m.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),t));this.editor.graph.isEnabled()&&(m.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",
+[b.getName()]))}),t),m.addSeparator(t),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",m,t,mxResources.get("move")),m.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),t),m.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),t))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(t,y,q,B,I){y=null!=y?y:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),t));this.stopEditing();this.model.beginUpdate();try{for(var S=q.slice(),D=0;D<q.length;D++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[D]),"treeFolding","0")&&this.foldTreeCell(t,q[D]);q=S;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(t,y){this.model.beginUpdate();try{var q=
+[];this.traverse(y,!0,mxUtils.bind(this,function(I,S){var D=null!=S&&this.isTreeEdge(S);D&&q.push(S);I==y||null!=S&&!D||q.push(I);return(null==S||D)&&(I==y||!this.model.isCollapsed(I))}));this.model.setCollapsed(y,t);for(var B=0;B<q.length;B++)this.model.setVisible(q[B],!t)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(t){return!this.isEdgeIgnored(t)};Graph.prototype.getTreeEdges=function(t,y,q,B,I,S){return this.model.filterCells(this.getEdges(t,y,q,B,I,S),mxUtils.bind(this,
+function(D){return this.isTreeEdge(D)}))};Graph.prototype.getIncomingTreeEdges=function(t,y){return this.getTreeEdges(t,y,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(t,y){return this.getTreeEdges(t,y,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function t(V){return x.isVertex(V)&&q(V)}function y(V){var k=!1;null!=V&&(k="1"==
+n.getCurrentCellStyle(V).treeMoving);return k}function q(V){var k=!1;null!=V&&(V=x.getParent(V),k=n.view.getState(V),k="tree"==(null!=k?k.style:n.getCellStyle(V)).containerType);return k}function B(V){var k=!1;null!=V&&(V=x.getParent(V),k=n.view.getState(V),n.view.getState(V),k=null!=(null!=k?k.style:n.getCellStyle(V)).childLayout);return k}function I(V){V=n.view.getState(V);if(null!=V){var k=n.getIncomingTreeEdges(V.cell);if(0<k.length&&(k=n.view.getState(k[0]),null!=k&&(k=k.absolutePoints,null!=
+k&&0<k.length&&(k=k[k.length-1],null!=k)))){if(k.y==V.y&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_SOUTH;if(k.y==V.y+V.height&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_NORTH;if(k.x>V.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(V,k){k=null!=k?k:!0;n.model.beginUpdate();try{var v=n.model.getParent(V),J=n.getIncomingTreeEdges(V),N=n.cloneCells([J[0],V]);n.model.setTerminal(N[0],n.model.getTerminal(J[0],
+!0),!0);var T=I(V),W=v.geometry;T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?N[1].geometry.x+=k?V.geometry.width+10:-N[1].geometry.width-10:N[1].geometry.y+=k?V.geometry.height+10:-N[1].geometry.height-10;n.view.currentRoot!=v&&(N[1].geometry.x-=W.x,N[1].geometry.y-=W.y);var U=n.view.getState(V),Y=n.view.scale;if(null!=U){var fa=mxRectangle.fromRectangle(U);T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?fa.x+=(k?V.geometry.width+10:-N[1].geometry.width-10)*Y:fa.y+=
+(k?V.geometry.height+10:-N[1].geometry.height-10)*Y;var oa=n.getOutgoingTreeEdges(n.model.getTerminal(J[0],!0));if(null!=oa){for(var la=T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH,qa=W=J=0;qa<oa.length;qa++){var ya=n.model.getTerminal(oa[qa],!1);if(T==I(ya)){var wa=n.view.getState(ya);ya!=V&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY())&&mxUtils.intersects(fa,wa)&&(J=10+Math.max(J,(Math.min(fa.x+fa.width,wa.x+wa.width)-Math.max(fa.x,wa.x))/
+Y),W=10+Math.max(W,(Math.min(fa.y+fa.height,wa.y+wa.height)-Math.max(fa.y,wa.y))/Y))}}la?W=0:J=0;for(qa=0;qa<oa.length;qa++)if(ya=n.model.getTerminal(oa[qa],!1),T==I(ya)&&(wa=n.view.getState(ya),ya!=V&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY()))){var Ia=[];n.traverse(wa.cell,!0,function(Aa,Ba){var Ga=null!=Ba&&n.isTreeEdge(Ba);Ga&&Ia.push(Ba);(null==Ba||Ga)&&Ia.push(Aa);return null==Ba||Ga});n.moveCells(Ia,(k?1:-1)*J,(k?1:-1)*W)}}}return n.addCells(N,
+v)}finally{n.model.endUpdate()}}function D(V){n.model.beginUpdate();try{var k=I(V),v=n.getIncomingTreeEdges(V),J=n.cloneCells([v[0],V]);n.model.setTerminal(v[0],J[1],!1);n.model.setTerminal(J[0],J[1],!0);n.model.setTerminal(J[0],V,!1);var N=n.model.getParent(V),T=N.geometry,W=[];n.view.currentRoot!=N&&(J[1].geometry.x-=T.x,J[1].geometry.y-=T.y);n.traverse(V,!0,function(fa,oa){var la=null!=oa&&n.isTreeEdge(oa);la&&W.push(oa);(null==oa||la)&&W.push(fa);return null==oa||la});var U=V.geometry.width+40,
+Y=V.geometry.height+40;k==mxConstants.DIRECTION_SOUTH?U=0:k==mxConstants.DIRECTION_NORTH?(U=0,Y=-Y):k==mxConstants.DIRECTION_WEST?(U=-U,Y=0):k==mxConstants.DIRECTION_EAST&&(Y=0);n.moveCells(W,U,Y);return n.addCells(J,N)}finally{n.model.endUpdate()}}function P(V,k){n.model.beginUpdate();try{var v=n.model.getParent(V),J=n.getIncomingTreeEdges(V),N=I(V);0==J.length&&(J=[n.createEdge(v,null,"",null,null,n.createCurrentEdgeStyle())],N=k);var T=n.cloneCells([J[0],V]);n.model.setTerminal(T[0],V,!0);null==
+n.model.getTerminal(T[0],!1)&&(n.model.setTerminal(T[0],T[1],!1),n.applyNewEdgeStyle(T[1],[T[0]],N));J=n.getOutgoingTreeEdges(V);var W=v.geometry;k=[];n.view.currentRoot==v&&(W=new mxRectangle);for(var U=0;U<J.length;U++){var Y=n.model.getTerminal(J[U],!1);null!=Y&&k.push(Y)}var fa=n.view.getBounds(k),oa=n.view.translate,la=n.view.scale;N==mxConstants.DIRECTION_SOUTH?(T[1].geometry.x=null==fa?V.geometry.x+(V.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-oa.x-W.x+10,T[1].geometry.y+=T[1].geometry.height-
+W.y+40):N==mxConstants.DIRECTION_NORTH?(T[1].geometry.x=null==fa?V.geometry.x+(V.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-oa.x+-W.x+10,T[1].geometry.y-=T[1].geometry.height+W.y+40):(T[1].geometry.x=N==mxConstants.DIRECTION_WEST?T[1].geometry.x-(T[1].geometry.width+W.x+40):T[1].geometry.x+(T[1].geometry.width-W.x+40),T[1].geometry.y=null==fa?V.geometry.y+(V.geometry.height-T[1].geometry.height)/2:(fa.y+fa.height)/la-oa.y+-W.y+10);return n.addCells(T,v)}finally{n.model.endUpdate()}}
+function c(V,k,v){V=n.getOutgoingTreeEdges(V);v=n.view.getState(v);var J=[];if(null!=v&&null!=V){for(var N=0;N<V.length;N++){var T=n.view.getState(n.model.getTerminal(V[N],!1));null!=T&&(!k&&Math.min(T.x+T.width,v.x+v.width)>=Math.max(T.x,v.x)||k&&Math.min(T.y+T.height,v.y+v.height)>=Math.max(T.y,v.y))&&J.push(T)}J.sort(function(W,U){return k?W.x+W.width-U.x-U.width:W.y+W.height-U.y-U.height})}return J}function g(V,k){var v=I(V),J=k==mxConstants.DIRECTION_EAST||k==mxConstants.DIRECTION_WEST;(v==mxConstants.DIRECTION_EAST||
+v==mxConstants.DIRECTION_WEST)==J&&v!=k?l.actions.get("selectParent").funct():v==k?(k=n.getOutgoingTreeEdges(V),null!=k&&0<k.length&&n.setSelectionCell(n.model.getTerminal(k[0],!1))):(v=n.getIncomingTreeEdges(V),null!=v&&0<v.length&&(J=c(n.model.getTerminal(v[0],!0),J,V),V=n.view.getState(V),null!=V&&(V=mxUtils.indexOf(J,V),0<=V&&(V+=k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_WEST?-1:1,0<=V&&V<=J.length-1&&n.setSelectionCell(J[V].cell)))))}var l=this,n=l.editor.graph,x=n.getModel(),
+F=l.menus.createPopupMenu;l.menus.createPopupMenu=function(V,k,v){F.apply(this,arguments);if(1==n.getSelectionCount()){k=n.getSelectionCell();var J=n.getOutgoingTreeEdges(k);V.addSeparator();0<J.length&&(t(n.getSelectionCell())&&this.addMenuItems(V,["selectChildren"],null,v),this.addMenuItems(V,["selectDescendants"],null,v));t(n.getSelectionCell())?(V.addSeparator(),0<n.getIncomingTreeEdges(k).length&&this.addMenuItems(V,["selectSiblings","selectParent"],null,v)):0<n.model.getEdgeCount(k)&&this.addMenuItems(V,
+["selectConnections"],null,v)}};l.actions.addAction("selectChildren",function(V){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell();V=mxEvent.isControlDown(V)?null:n.getOutgoingTreeEdges(k);if(null!=V&&0<V.length){k=[];for(var v=0;v<V.length;v++)k.push(n.model.getTerminal(V[v],!1));n.setSelectionCells(k)}else n.setSelectionCells(n.model.getChildren(k))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");l.actions.addAction("selectDescendants",function(V){var k=n.getSelectionCell();
+if(n.isEnabled()&&null!=k){var v=[];mxEvent.isControlDown(V)||n.traverse(k,!0,function(J,N){var T=null!=N&&n.isTreeEdge(N);T&&mxEvent.isControlDown(V)&&v.push(N);(null==N||T)&&v.push(J);return null==N||T});if(0==v.length||1==v.length&&v[0]==k)v=n.model.getDescendants(k);n.setSelectionCells(v)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");l.actions.addAction("selectParent",function(V){var k=n.getSelectionCell();n.isEnabled()&&null!=k&&(V=mxEvent.isControlDown(V)?null:n.getIncomingTreeEdges(k),
+null!=V&&0<V.length?n.setSelectionCell(n.model.getTerminal(V[0],!0)):n.selectParentCell())},null,null,Editor.altKey+"+"+Editor.shiftKey+"+P");l.actions.addAction("selectSiblings",function(V){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell(),v=mxEvent.isControlDown(V)?null:n.getIncomingTreeEdges(k);V=[];if(null!=v&&0<v.length&&(v=n.getOutgoingTreeEdges(n.model.getTerminal(v[0],!0)),null!=v))for(var J=0;J<v.length;J++)V.push(n.model.getTerminal(v[J],!1));0==V.length&&(V=n.model.getChildren(n.model.getParent(k)));
+n.setSelectionCells(V)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");var G=n.removeCells;n.removeCells=function(V,k){k=null!=k?k:!0;null==V&&(V=this.getDeletableCells(this.getSelectionCells()));k&&(V=this.getDeletableCells(this.addAllEdges(V)));for(var v=[],J=0;J<V.length;J++){var N=V[J];x.isEdge(N)&&q(N)&&(v.push(N),N=x.getTerminal(N,!1));if(t(N)){var T=[];n.traverse(N,!0,function(W,U){var Y=null!=U&&n.isTreeEdge(U);Y&&T.push(U);(null==U||Y)&&T.push(W);return null==U||Y});0<T.length&&(v=v.concat(T),
+N=n.getIncomingTreeEdges(V[J]),V=V.concat(N))}else null!=N&&v.push(V[J])}V=v;return G.apply(this,arguments)};l.hoverIcons.getStateAt=function(V,k,v){return t(V.cell)?null:this.graph.view.getState(this.graph.getCellAt(k,v))};var L=n.duplicateCells;n.duplicateCells=function(V,k){V=null!=V?V:this.getSelectionCells();for(var v=V.slice(0),J=0;J<v.length;J++){var N=n.view.getState(v[J]);if(null!=N&&t(N.cell)){var T=n.getIncomingTreeEdges(N.cell);for(N=0;N<T.length;N++)mxUtils.remove(T[N],V)}}this.model.beginUpdate();
+try{var W=L.call(this,V,k);if(W.length==V.length)for(J=0;J<V.length;J++)if(t(V[J])){var U=n.getIncomingTreeEdges(W[J]);T=n.getIncomingTreeEdges(V[J]);if(0==U.length&&0<T.length){var Y=this.cloneCell(T[0]);this.addEdge(Y,n.getDefaultParent(),this.model.getTerminal(T[0],!0),W[J])}}}finally{this.model.endUpdate()}return W};var M=n.moveCells;n.moveCells=function(V,k,v,J,N,T,W){for(var U=null,Y=[],fa=0;fa<V.length;fa++)(y(V[fa])||t(V[fa]))&&!B(V[fa])&&this.isCellCollapsed(V[fa])?Y=Y.concat(this.getSubtree(V[fa])):
+Y.push(V[fa]);V=mxUtils.removeDuplicates(Y);this.model.beginUpdate();try{Y=N;var oa=this.getCurrentCellStyle(N);if(null!=V&&t(N)&&"1"==mxUtils.getValue(oa,"treeFolding","0")){for(fa=0;fa<V.length;fa++)if(t(V[fa])||n.model.isEdge(V[fa])&&null==n.model.getTerminal(V[fa],!0)){N=n.model.getParent(V[fa]);break}if(null!=Y&&N!=Y&&null!=this.view.getState(V[0])){var la=n.getIncomingTreeEdges(V[0]);if(0<la.length){var qa=n.view.getState(n.model.getTerminal(la[0],!0));if(null!=qa){var ya=n.view.getState(Y);
+null!=ya&&(k=(ya.getCenterX()-qa.getCenterX())/n.view.scale,v=(ya.getCenterY()-qa.getCenterY())/n.view.scale)}}}}U=M.apply(this,arguments);if(null!=U&&null!=V&&U.length==V.length)for(fa=0;fa<U.length;fa++)if(this.model.isEdge(U[fa]))t(Y)&&0>mxUtils.indexOf(U,this.model.getTerminal(U[fa],!0))&&this.model.setTerminal(U[fa],Y,!0);else if(t(V[fa])&&(la=n.getIncomingTreeEdges(V[fa]),0<la.length))if(!J)t(Y)&&0>mxUtils.indexOf(V,this.model.getTerminal(la[0],!0))&&this.model.setTerminal(la[0],Y,!0);else if(0==
+n.getIncomingTreeEdges(U[fa]).length){oa=Y;if(null==oa||oa==n.model.getParent(V[fa]))oa=n.model.getTerminal(la[0],!0);J=this.cloneCell(la[0]);this.addEdge(J,n.getDefaultParent(),oa,U[fa])}}finally{this.model.endUpdate()}return U};if(null!=l.sidebar){var K=l.sidebar.dropAndConnect;l.sidebar.dropAndConnect=function(V,k,v,J){var N=n.model,T=null;N.beginUpdate();try{if(T=K.apply(this,arguments),t(V))for(var W=0;W<T.length;W++)if(N.isEdge(T[W])&&null==N.getTerminal(T[W],!0)){N.setTerminal(T[W],V,!0);var U=
+n.getCellGeometry(T[W]);U.points=null;null!=U.getTerminalPoint(!0)&&U.setTerminalPoint(null,!0)}}finally{N.endUpdate()}return T}}var Z={67:l.actions.get("selectChildren"),88:l.actions.get("selectDescendants"),80:l.actions.get("selectParent"),83:l.actions.get("selectSiblings")},ja={67:l.actions.get("copyStyle"),86:l.actions.get("pasteStyle")},da=l.onKeyDown;l.onKeyDown=function(V){try{var k=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=k){var v=mxEvent.isAltDown(V)&&mxEvent.isShiftDown(V)?
+Z[V.keyCode]:mxEvent.isAltDown(V)?ja[V.keyCode]:null;null!=v?(v.funct(V),mxEvent.consume(V)):t(k)&&(v=null,0<n.getIncomingTreeEdges(k).length&&(9==V.which?v=mxEvent.isShiftDown(V)?D(k):P(k):13==V.which&&(v=S(k,!mxEvent.isShiftDown(V)))),null!=v&&0<v.length?(1==v.length&&n.model.isEdge(v[0])?n.setSelectionCell(n.model.getTerminal(v[0],!1)):n.setSelectionCell(v[v.length-1]),null!=l.hoverIcons&&l.hoverIcons.update(n.view.getState(k)),n.startEditingAtCell(k),mxEvent.consume(V)):37==V.keyCode?(g(k,mxConstants.DIRECTION_WEST),
+mxEvent.consume(V)):38==V.keyCode?(g(k,mxConstants.DIRECTION_NORTH),mxEvent.consume(V)):39==V.keyCode?(g(k,mxConstants.DIRECTION_EAST),mxEvent.consume(V)):40==V.keyCode&&(g(k,mxConstants.DIRECTION_SOUTH),mxEvent.consume(V)))}}catch(J){l.handleError(J)}mxEvent.isConsumed(V)||da.apply(this,arguments)};var ba=n.connectVertex;n.connectVertex=function(V,k,v,J,N,T,W){var U=n.getIncomingTreeEdges(V);if(t(V)){var Y=I(V),fa=Y==mxConstants.DIRECTION_EAST||Y==mxConstants.DIRECTION_WEST,oa=k==mxConstants.DIRECTION_EAST||
+k==mxConstants.DIRECTION_WEST;return Y==k||0==U.length?P(V,k):fa==oa?D(V):S(V,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return ba.apply(this,arguments)};n.getSubtree=function(V){var k=[V];!y(V)&&!t(V)||B(V)||n.traverse(V,!0,function(v,J){var N=null!=J&&n.isTreeEdge(J);N&&0>mxUtils.indexOf(k,J)&&k.push(J);(null==J||N)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==J||N});return k};var na=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){na.apply(this,
+arguments);(y(this.state.cell)||t(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(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),
+this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(V){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(V),mxEvent.getClientY(V),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(V);this.graph.isMouseDown=!0;l.hoverIcons.reset();mxEvent.consume(V)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var ca=mxVertexHandler.prototype.redrawHandles;
+mxVertexHandler.prototype.redrawHandles=function(){ca.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 ka=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(V){ka.apply(this,arguments);null!=
+this.moveHandle&&(this.moveHandle.style.display=V?"":"none")};var aa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(V,k){aa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var m=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var t=m.apply(this,arguments),y=this.graph,q=this;return t.concat([this.addEntry("tree container",
+function(){var B=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var I=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');I.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");D.geometry.relative=!0;D.edge=!0;I.insertEdge(D,!0);S.insertEdge(D,!1);B.insert(D);B.insert(I);B.insert(S);return q.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var B=new mxCell("Mindmap",new mxGeometry(0,
+0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var I=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');I.vertex=!0;var S=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");D.geometry.relative=!0;D.edge=!0;I.insertEdge(D,!0);S.insertEdge(D,!1);var P=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+P.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),D.style);c.geometry.relative=!0;c.edge=!0;I.insertEdge(c,!0);P.insertEdge(c,!1);var g=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+g.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),D.style);l.geometry.relative=!0;l.edge=!0;I.insertEdge(l,!0);g.insertEdge(l,!1);var n=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),D.style);x.geometry.relative=!0;x.edge=!0;I.insertEdge(x,!0);n.insertEdge(x,!1);B.insert(D);B.insert(c);B.insert(l);B.insert(x);B.insert(I);B.insert(S);B.insert(P);B.insert(g);B.insert(n);return q.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var B=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
+B.vertex=!0;return q.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var B=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+B.vertex=!0;var I=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");I.geometry.setTerminalPoint(new mxPoint(-40,40),!0);I.geometry.relative=!0;I.edge=!0;B.insertEdge(I,!1);return q.createVertexTemplateFromCells([B,I],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var B=new mxCell("Sub Topic",new mxGeometry(0,0,80,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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');B.vertex=!0;var I=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
+I.geometry.setTerminalPoint(new mxPoint(-40,40),!0);I.geometry.relative=!0;I.edge=!0;B.insertEdge(I,!1);return q.createVertexTemplateFromCells([B,I],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree orgchart organization division",function(){var B=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var I=new mxCell("Organization",new mxGeometry(80,
+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(I,"treeRoot","1");I.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+D.geometry.relative=!0;D.edge=!0;I.insertEdge(D,!0);S.insertEdge(D,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
+!0;c.edge=!0;I.insertEdge(c,!0);P.insertEdge(c,!1);B.insert(D);B.insert(c);B.insert(I);B.insert(S);B.insert(P);return q.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree root",function(){var B=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;return q.createVertexTemplateFromCells([B],
+B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree division",function(){var B=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var I=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+I.geometry.setTerminalPoint(new mxPoint(0,0),!0);I.geometry.relative=!0;I.edge=!0;B.insertEdge(I,!1);return q.createVertexTemplateFromCells([B,I],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree sub sections",function(){var B=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");B.vertex=!0;var I=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
+I.geometry.setTerminalPoint(new mxPoint(110,-40),!0);I.geometry.relative=!0;I.edge=!0;B.insertEdge(I,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),I.style);D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative=!0;D.edge=!0;S.insertEdge(D,!1);return q.createVertexTemplateFromCells([I,D,B,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
EditorUi.initMinimalTheme=function(){function b(D,P){if(EditorUi.windowed){var c=D.editor.graph;c.popupMenuHandler.hideMenu();null==D.formatWindow?(D.formatWindow=new WrapperWindow(D,"",Math.max(10,D.diagramContainer.clientWidth-248),60,240,Math.min(566,c.container.clientHeight-10),function(g){g.className="geSidebarContainer geFormatContainer";D.createFormat(g).init()}),D.dependsOnLanguage(mxUtils.bind(this,function(){D.formatWindow.window.setTitle(mxResources.get("format"))})),D.formatWindow.window.addListener(mxEvent.SHOW,
mxUtils.bind(this,function(){D.formatWindow.window.fit()})),D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):D.formatWindow.window.setVisible(null!=P?P:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeftWidth="1px",D.formatElt.style.borderLeftStyle="solid",D.formatElt.style.right="0px"),P=D.diagramContainer.parentNode,
null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),P.style.right="0px"):(P.parentNode.appendChild(D.formatElt),P.style.right=D.formatElt.style.width)}function f(D,P){if(EditorUi.windowed){var c=D.editor.graph;c.popupMenuHandler.hideMenu();null==D.sidebarWindow?(D.sidebarWindow=new WrapperWindow(D,"",10,56,Math.min(c.container.clientWidth-10,218)-6,Math.min(c.container.clientHeight-40,650)-6,function(g){D.createShapesPanel(g)}),D.dependsOnLanguage(mxUtils.bind(this,function(){D.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
D.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){D.sidebarWindow.window.fit()})),D.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),D.sidebarWindow.window.setVisible(!0),isLocalStorage&&D.getLocalData("sidebar",function(g){D.sidebar.showEntries(g,null,!0)}),D.restoreLibraries()):D.sidebarWindow.window.setVisible(null!=P?P:!D.sidebarWindow.window.isVisible())}else null==D.sidebarElt&&(D.sidebarElt=D.createSidebarContainer(),D.createShapesPanel(D.sidebarElt),D.sidebarElt.style.border=
-"none",D.sidebarElt.style.width="210px",D.sidebarElt.style.borderRight="1px solid gray"),P=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),P.style.left="0px"):(P.parentNode.appendChild(D.sidebarElt),P.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var l=0;try{l=window.innerWidth||document.documentElement.clientWidth||
+"none",D.sidebarElt.style.width="210px",D.sidebarElt.style.borderRight="1px solid gray"),P=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),P.style.left="0px"):(P.parentNode.appendChild(D.sidebarElt),P.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||
document.body.clientWidth}catch(D){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
"#C0C0C0";mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;EditorUi.prototype.closableScratchpad=!1;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=
-function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var u=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){u.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var y=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,P){null!=P.shortcut&&900>l&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",P.shortcut):y.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
-function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?D:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();q.apply(this,arguments)};var C=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){C.apply(this,
+function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var y=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,P){null!=P.shortcut&&900>m&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",P.shortcut):y.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
+function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?D:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();q.apply(this,arguments)};var B=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){B.apply(this,
arguments);if(D){var P=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=P&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=P&&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(){};EditorUi.prototype.installFormatToolbar=function(D){var P=
-this.editor.graph,c=document.createElement("div");c.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%;";P.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(g,m){0<P.getSelectionCount()?(D.appendChild(c),c.innerHTML="Selected: "+P.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var J=!1;EditorUi.prototype.initFormatWindow=
-function(){if(!J&&null!=this.formatWindow){J=!0;var D=this.formatWindow.window.toggleMinimized,P=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(P=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+P-140+"px"):(this.div.style.width=P+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-P+140)+"px");this.fit()};
-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var S=EditorUi.prototype.init;EditorUi.prototype.init=function(){function D(I,N,T){var W=n.menus.get(I);N=H.addMenu(mxResources.get(I),mxUtils.bind(this,function(){W.funct.apply(this,arguments)}));N.className="geButton";N.setAttribute("title",mxResources.get(I));n.menus.menuCreated(W,N,"geButton");null!=T&&
-(N.style.backgroundImage="url("+T+")",N.innerText="");return N}function P(I,N,T,W,U,Y){var fa=document.createElement("a");fa.className="geButton";F.appendChild(fa);null!=Y?fa.style.backgroundImage="url("+Y+")":mxUtils.write(fa,I);mxEvent.addListener(fa,"click",function(na){"disabled"!=fa.getAttribute("disabled")&&N(na);mxEvent.consume(na)});mxEvent.preventDefault(fa);null!=W&&fa.setAttribute("title",W);null!=U&&(I=function(){U.isEnabled()?fa.removeAttribute("disabled"):fa.setAttribute("disabled",
-"disabled")},U.addListener("stateChanged",I),x.addListener("enabledChanged",I),I());return fa}function c(I,N,T){N=document.createElement("div");N.className="geButtonGroup";for(T=0;T<I.length;T++)null!=I[T]&&N.appendChild(I[T]);F.appendChild(N);return N}function g(){l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.innerHTML="";var I=1E3>l,N=D("diagram",null,I?Editor.menuImage:null);c([N,P(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),
-n.actions.get("image"),I?Editor.shapesImage:null),P(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),I?Editor.formatImage:null)]);N=D("insert",!0,I?ha:null);c([N,P(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),I?Editor.trashImage:null)]);x.isEnabled()||N.setAttribute("disabled","disabled");V.setAttribute("title",mxResources.get("undo")+
-" ("+ka.shortcut+")");k.setAttribute("title",mxResources.get("redo")+" ("+ba.shortcut+")");v.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=l&&(c([V,k]),520<=l&&c([v,640<=l?P("",oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",oa,Editor.zoomInImage):null,640<=l?P("",da.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",da,Editor.zoomOutImage):null]));F.appendChild(n.statusContainer);F.appendChild(n.buttonContainer)}S.apply(this,arguments);var m=
-mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=m&&(m.classList.add("geSimple"),m.classList.add("geMinimal"),m.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=l||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"));
-EditorUi.windowed&&1E3<=l&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var F=document.createElement("div");F.className="geMenubarContainer";var H=new Menubar(n,F),M=n.hideCurrentMenu;n.hideCurrentMenu=function(){M.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var L=n.descriptorChanged;n.descriptorChanged=function(){L.apply(this,arguments);var I=n.getCurrentFile();if(null!=I&&null!=I.getTitle()){var N=
-I.getMode();"google"==N?N="googleDrive":"github"==N?N="gitHub":"gitlab"==N?N="gitLab":"onedrive"==N&&(N="oneDrive");N=mxResources.get(N);F.setAttribute("title",I.getTitle()+(null!=N?" ("+N+")":""))}else F.removeAttribute("title")};n.setStatusText(n.editor.getStatus());F.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();F.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var K=this.createZoomInput(!0),Z=n.updateTabContainer;
-n.updateTabContainer=function(){Z.apply(this,arguments);n.tabContainer.appendChild(K)};var ha=Editor.addBoxImage;if(null!=n.hoverIcons){var ca=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||ca.apply(this,arguments)}}if(null!=x.freehand){var aa=x.freehand.createStyle;x.freehand.createStyle=function(I){return aa.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());
-var oa=n.actions.get("zoomIn"),da=n.actions.get("zoomOut");m=n.actions.get("resetView");var ka=n.actions.get("undo"),ba=n.actions.get("redo"),V=P("",ka.funct,null,"",ka,Editor.undoImage),k=P("",ba.funct,null,"",ba,Editor.redoImage),v=P("",function(I){mxEvent.isAltDown(I)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(I)},!0,"",m,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,
-null)});n.container.appendChild(n.tabContainer);n.container.appendChild(F);n.updateTabContainer();!EditorUi.windowed&&1E3<=l&&b(this,!0);g();n.addListener("lockedChanged",g);n.addListener("languageChanged",g);n.editor.graph.addListener("enabledChanged",g);mxEvent.addListener(window,"resize",function(){g();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&
+this.editor.graph,c=document.createElement("div");c.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%;";P.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(g,l){0<P.getSelectionCount()?(D.appendChild(c),c.innerHTML="Selected: "+P.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var I=!1;EditorUi.prototype.initFormatWindow=
+function(){if(!I&&null!=this.formatWindow){I=!0;var D=this.formatWindow.window.toggleMinimized,P=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(P=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+P-140+"px"):(this.div.style.width=P+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-P+140)+"px");this.fit()};
+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var S=EditorUi.prototype.init;EditorUi.prototype.init=function(){function D(J,N,T){var W=n.menus.get(J);N=G.addMenu(mxResources.get(J),mxUtils.bind(this,function(){W.funct.apply(this,arguments)}));N.className="geButton";N.setAttribute("title",mxResources.get(J));n.menus.menuCreated(W,N,"geButton");null!=T&&
+(N.style.backgroundImage="url("+T+")",N.innerText="");return N}function P(J,N,T,W,U,Y){var fa=document.createElement("a");fa.className="geButton";F.appendChild(fa);null!=Y?fa.style.backgroundImage="url("+Y+")":mxUtils.write(fa,J);mxEvent.addListener(fa,"click",function(oa){"disabled"!=fa.getAttribute("disabled")&&N(oa);mxEvent.consume(oa)});mxEvent.preventDefault(fa);null!=W&&fa.setAttribute("title",W);null!=U&&(J=function(){U.isEnabled()?fa.removeAttribute("disabled"):fa.setAttribute("disabled",
+"disabled")},U.addListener("stateChanged",J),x.addListener("enabledChanged",J),J());return fa}function c(J,N,T){N=document.createElement("div");N.className="geButtonGroup";for(T=0;T<J.length;T++)null!=J[T]&&N.appendChild(J[T]);F.appendChild(N);return N}function g(){m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.innerHTML="";var J=1E3>m,N=D("diagram",null,J?Editor.menuImage:null);c([N,P(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),
+n.actions.get("image"),J?Editor.shapesImage:null),P(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),J?Editor.formatImage:null)]);N=D("insert",!0,J?ja:null);c([N,P(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),J?Editor.trashImage:null)]);x.isEnabled()||N.setAttribute("disabled","disabled");V.setAttribute("title",mxResources.get("undo")+
+" ("+ka.shortcut+")");k.setAttribute("title",mxResources.get("redo")+" ("+aa.shortcut+")");v.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=m&&(c([V,k]),520<=m&&c([v,640<=m?P("",na.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",na,Editor.zoomInImage):null,640<=m?P("",ca.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ca,Editor.zoomOutImage):null]));F.appendChild(n.statusContainer);F.appendChild(n.buttonContainer)}S.apply(this,arguments);var l=
+mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=l&&(l.classList.add("geSimple"),l.classList.add("geMinimal"),l.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=m||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"));
+EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var F=document.createElement("div");F.className="geMenubarContainer";var G=new Menubar(n,F),L=n.hideCurrentMenu;n.hideCurrentMenu=function(){L.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var M=n.descriptorChanged;n.descriptorChanged=function(){M.apply(this,arguments);var J=n.getCurrentFile();if(null!=J&&null!=J.getTitle()){var N=
+J.getMode();"google"==N?N="googleDrive":"github"==N?N="gitHub":"gitlab"==N?N="gitLab":"onedrive"==N&&(N="oneDrive");N=mxResources.get(N);F.setAttribute("title",J.getTitle()+(null!=N?" ("+N+")":""))}else F.removeAttribute("title")};n.setStatusText(n.editor.getStatus());F.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();F.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var K=this.createZoomInput(!0),Z=n.updateTabContainer;
+n.updateTabContainer=function(){Z.apply(this,arguments);n.tabContainer.appendChild(K)};var ja=Editor.addBoxImage;if(null!=n.hoverIcons){var da=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||da.apply(this,arguments)}}if(null!=x.freehand){var ba=x.freehand.createStyle;x.freehand.createStyle=function(J){return ba.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());
+var na=n.actions.get("zoomIn"),ca=n.actions.get("zoomOut");l=n.actions.get("resetView");var ka=n.actions.get("undo"),aa=n.actions.get("redo"),V=P("",ka.funct,null,"",ka,Editor.undoImage),k=P("",aa.funct,null,"",aa,Editor.redoImage),v=P("",function(J){mxEvent.isAltDown(J)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(J)},!0,"",l,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,
+null)});n.container.appendChild(n.tabContainer);n.container.appendChild(F);n.updateTabContainer();!EditorUi.windowed&&1E3<=m&&b(this,!0);g();n.addListener("lockedChanged",g);n.addListener("languageChanged",g);n.editor.graph.addListener("enabledChanged",g);mxEvent.addListener(window,"resize",function(){g();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&
n.actions.layersWindow.window.fit();null!=n.menus.chatWindow&&n.menus.chatWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,f,l,u,y,q,C){this.file=b;this.id=f;this.content=l;this.modifiedDate=u;this.createdDate=y;this.isResolved=q;this.user=C;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,u,y){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,l,u,y){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=u;this.locale=y};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on Connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Был обнаружен черновик \'{1}\'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfindInDiagram=Find in Diagram\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to Right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste Here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to Left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshadows=Shadows\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate Shape Only by 90°\ntype=Type\ntypeSlashToSearch=Type / to search\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\ncopyAsSvg=Copy as SVG\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\nconfACacheMapping=Cache page IDs mapping\nconfARemImpPages=Remember imported pages\ndelCachedData=Delete Cached Data\nk15tPagesError=Error retrieving Scroll pages. Is Scroll Versions installed?\ndrawioUninstalled=draw.io has been uninstalled, the editor will now close\nconfAttachmentArchived=Diagram belongs to an archived page and cannot be loaded. Restore the page (ID: {1}) to load it.\n');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;
-Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];Editor.currentTheme="";window.uiTheme="";GraphViewer=function(b,f,l){this.init(b,f,l)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="1"==urlParams.dev?"https://test.draw.io/":"https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl=window.DRAWIO_BASE_URL+"/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,f,m,t,y,q,B){this.file=b;this.id=f;this.content=m;this.modifiedDate=t;this.createdDate=y;this.isResolved=q;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,m,t,y){f()};DrawioComment.prototype.editComment=function(b,f,m){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,m,t,y){this.id=b;this.email=f;this.displayName=m;this.pictureUrl=t;this.locale=y};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on Connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Был обнаружен черновик \'{1}\'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfindInDiagram=Find in Diagram\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to Right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste Here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to Left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshadows=Shadows\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate Shape Only by 90°\ntype=Type\ntypeSlashToSearch=Type / to search\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\ncopyAsSvg=Copy as SVG\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\nconfACacheMapping=Cache page IDs mapping\nconfARemImpPages=Remember imported pages\ndelCachedData=Delete Cached Data\nk15tPagesError=Error retrieving Scroll pages. Is Scroll Versions installed?\ndrawioUninstalled=draw.io has been uninstalled, the editor will now close\nconfAttachmentArchived=Diagram belongs to an archived page and cannot be loaded. Restore the page (ID: {1}) to load it.\n');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;
+Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];Editor.currentTheme="";window.uiTheme="";GraphViewer=function(b,f,m){this.init(b,f,m)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="1"==urlParams.dev?"https://test.draw.io/":"https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl=window.DRAWIO_BASE_URL+"/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;
GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;GraphViewer.prototype.darkMode=null;
-GraphViewer.prototype.init=function(b,f,l){GraphViewer.initCss();this.graphConfig=null!=l?l:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=
+GraphViewer.prototype.init=function(b,f,m){GraphViewer.initCss();this.graphConfig=null!=m?m:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=
null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.darkMode=null!=this.graphConfig["dark-mode"]?this.graphConfig["dark-mode"]:this.darkMode;
this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=
-null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;var u=this;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=f&&(this.xmlDocument=f.ownerDocument,this.xmlNode=f,this.xml=mxUtils.getXml(f),null!=b)){var y=
-mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var J=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?J.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(J.style.padding="8px");J.style.forcedColorAdjust="none";J.style.boxSizing="border-box";J.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var x=
-this.view.graphBounds,F=this.view.translate;J.setAttribute("viewBox",x.x+F.x-this.panDx+" "+(x.y+F.y-this.panDy)+" "+(x.width+1)+" "+(x.height+1));this.container.style.backgroundColor=J.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",x))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(x){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=
-!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=f)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(x){}this.graph.getImageFromBundles=function(x){return u.getImageUrl(x)};this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var D=
-this.xmlNode.getElementsByTagName("diagram");if(0<D.length){if(null!=this.pageId)for(S=0;S<D.length;S++)if(this.pageId==D[S].getAttribute("id")){this.currentPage=S;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(x){var F=D[u.currentPage];return"page"==x?F.getAttribute("name")||"Page-"+(u.currentPage+1):"pagenumber"==x?u.currentPage+1:"pagecount"==x?D.length:P.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(x){this.handlingResize||(this.currentPage=
+null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;var t=this;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=f&&(this.xmlDocument=f.ownerDocument,this.xmlNode=f,this.xml=mxUtils.getXml(f),null!=b)){var y=
+mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var I=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?I.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(I.style.padding="8px");I.style.forcedColorAdjust="none";I.style.boxSizing="border-box";I.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var x=
+this.view.graphBounds,F=this.view.translate;I.setAttribute("viewBox",x.x+F.x-this.panDx+" "+(x.y+F.y-this.panDy)+" "+(x.width+1)+" "+(x.height+1));this.container.style.backgroundColor=I.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",x))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(x){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=
+!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=f)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(x){}this.graph.getImageFromBundles=function(x){return t.getImageUrl(x)};this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var D=
+this.xmlNode.getElementsByTagName("diagram");if(0<D.length){if(null!=this.pageId)for(S=0;S<D.length;S++)if(this.pageId==D[S].getAttribute("id")){this.currentPage=S;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(x){var F=D[t.currentPage];return"page"==x?F.getAttribute("name")||"Page-"+(t.currentPage+1):"pagenumber"==x?t.currentPage+1:"pagecount"==x?D.length:P.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(x){this.handlingResize||(this.currentPage=
mxUtils.mod(x,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(x){x=this.getIndexById(x);var F=0<=x;F&&this.selectPage(x);return F};S=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});var g=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(x){if(null!=x&&
-Graph.isPageLink(x.src)){var F=x.src,H=F.indexOf(",");0<H&&(H=u.getIndexById(F.substring(H+1)),0<=H&&(x=u.getImageForGraphModel(Editor.parseDiagramNode(u.diagrams[H])),x.originalSrc=F))}g.apply(this,arguments)};var m=this.graph.getGraphBounds;this.graph.getGraphBounds=function(x){var F=m.apply(this,arguments);x=this.backgroundImage;if(null!=x){var H=this.view.translate,M=this.view.scale;F=mxRectangle.fromRectangle(F);F.add(new mxRectangle((H.x+x.x)*M,(H.y+x.y)*M,x.width*M,x.height*M))}return F};this.addListener("xmlNodeChanged",
-S);S();urlParams.page=u.currentPage;S=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||
+Graph.isPageLink(x.src)){var F=x.src,G=F.indexOf(",");0<G&&(G=t.getIndexById(F.substring(G+1)),0<=G&&(x=t.getImageForGraphModel(Editor.parseDiagramNode(t.diagrams[G])),x.originalSrc=F))}g.apply(this,arguments)};var l=this.graph.getGraphBounds;this.graph.getGraphBounds=function(x){var F=l.apply(this,arguments);x=this.backgroundImage;if(null!=x){var G=this.view.translate,L=this.view.scale;F=mxRectangle.fromRectangle(F);F.add(new mxRectangle((G.x+x.x)*L,(G.y+x.y)*L,x.width*L,x.height*L))}return F};this.addListener("xmlNodeChanged",
+S);S();urlParams.page=t.currentPage;S=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||
(this.graph.panningHandler.isForcePanningEvent=function(x){return!mxEvent.isPopupTrigger(x.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.titleTooltip||
-this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(x,F){try{if(Graph.isPageLink(x)){var H=x.indexOf(",");u.selectPageById(x.substring(H+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var M=
-this.getGraphBounds();this.handleCustomLink(x,F);M.equals(this.getGraphBounds())||u.crop()}}catch(L){alert(L.message)}return!0};var n=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return n.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});l=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof l){var q=
-this.getObservableParent(b),C=new l(mxUtils.bind(this,function(J){0<b.offsetWidth&&(C.disconnect(),y())}));C.observe(q,{attributes:!0})}else y()}};
-GraphViewer.prototype.installBackgroundColorHandler=function(){var b=this.graph;if(null!=b){null!=GraphViewer.shapeBackgroundColor&&(b.shapeBackgroundColor=GraphViewer.shapeBackgroundColor);b.defaultPageBackgroundColor="transparent";b.diagramBackgroundColor="transparent";b.transparentBackground=!1;var f=b.background,l=mxUtils.bind(this,function(u){"none"==b.getAdaptiveColors()&&null==f&&(this.isDarkMode()?b.background="#ffffff":b.background=null,u&&b.view.validateBackground())});this.addListener("graphChanged",
-function(){f=b.background;l(!0)});this.addListener("darkModeChanged",function(){l(!0)});l(!1)}};GraphViewer.prototype.installDarkModeListener=function(){null!=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(){this.darkModeChanged();this.fireEvent(new mxEventObject("darkModeChanged"))}));this.darkModeChanged()};
+this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(x,F){try{if(Graph.isPageLink(x)){var G=x.indexOf(",");t.selectPageById(x.substring(G+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var L=
+this.getGraphBounds();this.handleCustomLink(x,F);L.equals(this.getGraphBounds())||t.crop()}}catch(M){alert(M.message)}return!0};var n=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return n.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});m=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof m){var q=
+this.getObservableParent(b),B=new m(mxUtils.bind(this,function(I){0<b.offsetWidth&&(B.disconnect(),y())}));B.observe(q,{attributes:!0})}else y()}};
+GraphViewer.prototype.installBackgroundColorHandler=function(){var b=this.graph;if(null!=b){null!=GraphViewer.shapeBackgroundColor&&(b.shapeBackgroundColor=GraphViewer.shapeBackgroundColor);b.defaultPageBackgroundColor="transparent";b.diagramBackgroundColor="transparent";b.transparentBackground=!1;var f=b.background,m=mxUtils.bind(this,function(t){"none"==b.getAdaptiveColors()&&null==f&&(this.isDarkMode()?b.background="#ffffff":b.background=null,t&&b.view.validateBackground())});this.addListener("graphChanged",
+function(){f=b.background;m(!0)});this.addListener("darkModeChanged",function(){m(!0)});m(!1)}};GraphViewer.prototype.installDarkModeListener=function(){null!=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(){this.darkModeChanged();this.fireEvent(new mxEventObject("darkModeChanged"))}));this.darkModeChanged()};
GraphViewer.prototype.darkModeChanged=function(){if(null!=this.graph){var b=this.graph.container,f=this.isDarkMode();f?b.classList.add("geDarkMode"):b.classList.remove("geDarkMode");b.style.colorScheme=f?"dark":"light"}};GraphViewer.prototype.getAncestorDetails=function(b){for(;null!=b;){if("DETAILS"==b.nodeName)return b;b=b.parentNode}return null};
GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
-GraphViewer.prototype.getImageForGraphModel=function(b){var f=Graph.createOffscreenGraph(this.graph.getStylesheet());f.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(f.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;f.model.setRoot(b);b=f.getSvg();var l=f.getGraphBounds();document.body.removeChild(f.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),l.width,l.height,l.x,l.y)};
+GraphViewer.prototype.getImageForGraphModel=function(b){var f=Graph.createOffscreenGraph(this.graph.getStylesheet());f.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(f.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;f.model.setRoot(b);b=f.getSvg();var m=f.getGraphBounds();document.body.removeChild(f.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),m.width,m.height,m.x,m.y)};
GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var f=0;f<this.diagrams.length;f++)if(this.diagrams[f].getAttribute("id")==b)return f;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocument=b.ownerDocument,this.xml=mxUtils.getXml(b),this.xmlNode=b);this.setGraphXml(b)};GraphViewer.prototype.updateGraphXml=function(b){this.setGraphXml(b);this.fireEvent(new mxEventObject("graphChanged"))};
-GraphViewer.prototype.setLayersVisible=function(b){var f=!0;if(!this.autoOrigin){var l=[],u=this.graph.getModel();u.beginUpdate();try{for(var y=0;y<u.getChildCount(u.root);y++){var q=u.getChildAt(u.root,y);f=f&&u.isVisible(q);l.push(u.isVisible(q));u.setVisible(q,null!=b?b[y]:!0)}}finally{u.endUpdate()}}return f?null:l};
+GraphViewer.prototype.setLayersVisible=function(b){var f=!0;if(!this.autoOrigin){var m=[],t=this.graph.getModel();t.beginUpdate();try{for(var y=0;y<t.getChildCount(t.root);y++){var q=t.getChildAt(t.root,y);f=f&&t.isVisible(q);m.push(t.isVisible(q));t.setVisible(q,null!=b?b[y]:!0)}}finally{t.endUpdate()}}return f?null:m};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var f=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),f=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};f&&this.setLayersVisible(f)}};GraphViewer.prototype.isDarkMode=function(){return"dark"==this.darkMode||"auto"==this.darkMode&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,f=this.graph.getGraphBounds(),l=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var u=mxUtils.bind(this,function(){if(!l){l=!0;var J=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?J.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){J=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);
-S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};J={left:J.left-S.left,top:J.top-S.top,bottom:J.bottom-S.top,right:J.right-S.left};this.toolbar.style.left=J.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=J.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=J.top+1+"px"):this.toolbar.style.top=J.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());l=!1}}),y=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(J){var S=b.offsetWidth;S==y||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=J?J:this.graphConfig.zoom||
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,f=this.graph.getGraphBounds(),m=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var t=mxUtils.bind(this,function(){if(!m){m=!0;var I=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?I.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){I=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);
+S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};I={left:I.left-S.left,top:I.top-S.top,bottom:I.bottom-S.top,right:I.right-S.left};this.toolbar.style.left=I.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=I.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=I.top+1+"px"):this.toolbar.style.top=I.top+"px"}else null!=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());m=!1}}),y=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(I){var S=b.offsetWidth;S==y||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=I?I:this.graphConfig.zoom||
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},y=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
-!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",u),this.graph.addListener("size",u)):new ResizeSensor(this.graph.container,u));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,f.width+2*this.graph.border),
-0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,f.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var q=y=null;u=mxUtils.bind(this,function(){window.clearTimeout(q);this.handlingResize||(q=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",u):new ResizeSensor(this.graph.container,u))}else 9>=document.documentMode||this.graph.addListener("size",
-u);var C=mxUtils.bind(this,function(J){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var D=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==J&&this.allowZoomOut&&(this.allowZoomIn||f.width+2*this.graph.border>b.offsetWidth||f.height+2*this.graph.border>D)?(J=null,null!=D&&f.height+2*this.graph.border>D-2&&(J=(D-2*this.graph.border-2)/f.height),this.fitGraph(J)):this.widthIsEmpty||
-null!=J||0!=this.graphConfig.resize||""==b.style.height?(J=null!=J?J:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-f.x/this.graph.view.scale)+J.x,Math.floor(this.graph.border-f.y/this.graph.view.scale)+J.y),y=b.offsetWidth):this.graph.center((!this.widthIsEmpty||f.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(C,0):C();this.positionGraph=function(J){f=this.graph.getGraphBounds();y=null;C(J)}};
-GraphViewer.prototype.crop=function(){var b=this.graph,f=b.getGraphBounds(),l=b.border,u=b.view.scale;b.view.setTranslate(null!=f.x?Math.floor(b.view.translate.x-f.x/u+l):l,null!=f.y?Math.floor(b.view.translate.y-f.y/u+l):l)};GraphViewer.prototype.updateContainerWidth=function(b,f){b.style.width=f+"px"};GraphViewer.prototype.updateContainerHeight=function(b,f){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=f+"px"};
-GraphViewer.prototype.showLayers=function(b,f){var l=this.graphConfig.layers;l=null!=l&&0<l.length?l.split(" "):[];var u=this.graphConfig.layerIds,y=null!=u&&0<u.length,q=!1;if(0<l.length||y||null!=f){f=null!=f?f.getModel():null;b=b.getModel();b.beginUpdate();try{var C=b.getChildCount(b.root);if(null==f){f=!1;q={};if(y)for(var J=0;J<u.length;J++){var S=b.getCell(u[J]);null!=S&&(f=!0,q[S.id]=!0)}else for(J=0;J<l.length;J++)S=b.getChildAt(b.root,parseInt(l[J])),null!=S&&(f=!0,q[S.id]=!0);for(J=0;f&&
-J<C;J++)S=b.getChildAt(b.root,J),b.setVisible(S,q[S.id]||!1)}else for(J=0;J<C;J++)b.setVisible(b.getChildAt(b.root,J),f.isVisible(f.getChildAt(f.root,J)))}finally{b.endUpdate()}q=!0}return q};
+!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",t),this.graph.addListener("size",t)):new ResizeSensor(this.graph.container,t));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,f.width+2*this.graph.border),
+0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,f.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var q=y=null;t=mxUtils.bind(this,function(){window.clearTimeout(q);this.handlingResize||(q=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",t):new ResizeSensor(this.graph.container,t))}else 9>=document.documentMode||this.graph.addListener("size",
+t);var B=mxUtils.bind(this,function(I){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var D=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==I&&this.allowZoomOut&&(this.allowZoomIn||f.width+2*this.graph.border>b.offsetWidth||f.height+2*this.graph.border>D)?(I=null,null!=D&&f.height+2*this.graph.border>D-2&&(I=(D-2*this.graph.border-2)/f.height),this.fitGraph(I)):this.widthIsEmpty||
+null!=I||0!=this.graphConfig.resize||""==b.style.height?(I=null!=I?I:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-f.x/this.graph.view.scale)+I.x,Math.floor(this.graph.border-f.y/this.graph.view.scale)+I.y),y=b.offsetWidth):this.graph.center((!this.widthIsEmpty||f.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(B,0):B();this.positionGraph=function(I){f=this.graph.getGraphBounds();y=null;B(I)}};
+GraphViewer.prototype.crop=function(){var b=this.graph,f=b.getGraphBounds(),m=b.border,t=b.view.scale;b.view.setTranslate(null!=f.x?Math.floor(b.view.translate.x-f.x/t+m):m,null!=f.y?Math.floor(b.view.translate.y-f.y/t+m):m)};GraphViewer.prototype.updateContainerWidth=function(b,f){b.style.width=f+"px"};GraphViewer.prototype.updateContainerHeight=function(b,f){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=f+"px"};
+GraphViewer.prototype.showLayers=function(b,f){var m=this.graphConfig.layers;m=null!=m&&0<m.length?m.split(" "):[];var t=this.graphConfig.layerIds,y=null!=t&&0<t.length,q=!1;if(0<m.length||y||null!=f){f=null!=f?f.getModel():null;b=b.getModel();b.beginUpdate();try{var B=b.getChildCount(b.root);if(null==f){f=!1;q={};if(y)for(var I=0;I<t.length;I++){var S=b.getCell(t[I]);null!=S&&(f=!0,q[S.id]=!0)}else for(I=0;I<m.length;I++)S=b.getChildAt(b.root,parseInt(m[I])),null!=S&&(f=!0,q[S.id]=!0);for(I=0;f&&
+I<B;I++)S=b.getChildAt(b.root,I),b.setVisible(S,q[S.id]||!1)}else for(I=0;I<B;I++)b.setVisible(b.getChildAt(b.root,I),f.isVisible(f.getChildAt(f.root,I)))}finally{b.endUpdate()}q=!0}return q};
GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var f=b.ownerDocument.createElement("div");f.style.display="flex";f.style.alignItems="center";f.style.position="absolute";f.style.overflow="hidden";f.style.boxSizing="border-box";f.style.whiteSpace="nowrap";f.style.textAlign="left";f.style.zIndex=
-this.toolbarZIndex;f.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";f.style.height=this.toolbarHeight+"px";var l=mxUtils.bind(this,function(){this.isDarkMode()?(f.classList.add("geDarkMode"),f.style.colorScheme="dark"):(f.classList.remove("geDarkMode"),f.style.colorScheme="light")});this.addListener("darkModeChanged",l);this.toolbar=f;l();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");
-mxUtils.setOpacity(f,30);var u=null,y=null,q=mxUtils.bind(this,function(aa){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);u=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,0);u=null;y=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";y=null}),100)}),aa||200)}),C=mxUtils.bind(this,function(aa){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);f.style.display=
-"flex";mxUtils.setOpacity(f,aa||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||(C(30),q())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":"mousemove",function(aa){mxEvent.consume(aa)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(aa){C(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(aa){C(100);mxEvent.consume(aa)}));mxEvent.addListener(f,"mouseleave",
-mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||C(30)}));var J=this.graph,S=J.getTolerance();J.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(aa,oa){this.startX=oa.getGraphX();this.startY=oa.getGraphY();this.scrollLeft=J.container.scrollLeft;this.scrollTop=J.container.scrollTop},mouseMove:function(aa,oa){},mouseUp:function(aa,oa){mxEvent.isTouchEvent(oa.getEvent())&&Math.abs(this.scrollLeft-J.container.scrollLeft)<S&&Math.abs(this.scrollTop-J.container.scrollTop)<
-S&&Math.abs(this.startX-oa.getGraphX())<S&&Math.abs(this.startY-oa.getGraphY())<S&&(0<parseFloat(f.style.opacity||0)?q():C(30))}})}l=this.toolbarItems;for(var D=0,P=mxUtils.bind(this,function(aa,oa,da,ka){aa=this.createToolbarButton(aa,oa,da,ka);f.appendChild(aa);D++;return aa}),c=this.graph.getModel(),g=null,m=null,n=null,x=null,F=0;F<l.length;F++){var H=l[F];if("pages"==H){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";
-x.style.padding="4px";x.style.fontFamily=GraphViewer.cssFontFamily;x.style.fontSize="12px";x.style.cursor="default";x.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(x,70);var M=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.chevronLeftImage,mxResources.get("previousPage")||"Previous Page");M.style.borderRightStyle="none";M.style.paddingLeft="0px";M.style.paddingRight="0px";f.appendChild(x);var L=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.chevronRightImage,mxResources.get("nextPage")||"Next Page");L.style.paddingLeft="0px";L.style.paddingRight="0px";H=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,this.currentPage+1+" / "+this.diagrams.length);x.style.display=1<this.diagrams.length?"inline-flex":"none";M.style.display=x.style.display;L.style.display=x.style.display});this.addListener("graphChanged",H);H()}else if("zoom"==H)this.zoomEnabled&&(P(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),P(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),P(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==H){if(this.layersEnabled){var K=P(mxUtils.bind(this,function(aa){if(null!=g)g.parentNode.removeChild(g),
-g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var da=this.graph.getGraphBounds(),ka=this.graph.view;0>da.x||0>da.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ka.translate.clone(),scale:ka.scale}):null!=this.graph.originalViewState&&0<da.x/ka.scale+this.graph.originalViewState.translate.x-ka.translate.x&&0<da.y/ka.scale+this.graph.originalViewState.translate.y-
-ka.translate.y&&(ka.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ka.translate.clone(),scale:ka.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});aa=K.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=GraphViewer.cssFontFamily;
-g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;g.style.color="#000";mxUtils.setOpacity(g,85);var oa=mxUtils.getDocumentScrollOrigin(document);g.style.left=oa.x+aa.left-1+"px";g.style.top=oa.y+aa.bottom-2+"px";this.isDarkMode()&&(g.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");c.addListener(mxEvent.CHANGE,
-function(){K.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"});K.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"}}else if("tags"==H){if(this.tagsEnabled){var Z=P(mxUtils.bind(this,function(aa){null==m&&(m=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),m.div.getElementsByTagName("div")[0].style.position="",m.div.style.maxHeight="160px",m.div.style.maxWidth="120px",m.div.style.padding="2px",m.div.style.overflow="auto",m.div.style.height="auto",m.div.style.position=
-"fixed",m.div.style.fontFamily=GraphViewer.cssFontFamily,m.div.style.fontSize="11px",m.div.style.backgroundColor="#eee",m.div.style.color="#000",m.div.style.border="1px solid #d0d0d0",m.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(m.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(m.div,85));if(null!=n)n.parentNode.removeChild(n),n=null;else{n=m.div;n.style.position="absolute";mxEvent.addListener(n,"mouseleave",function(){null!=n&&(n.parentNode.removeChild(n),n=null)});
-aa=Z.getBoundingClientRect();var oa=mxUtils.getDocumentScrollOrigin(document);n.style.left=oa.x+aa.left-1+"px";n.style.top=oa.y+aa.bottom-2+"px";document.body.appendChild(n);m.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");c.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Z.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=n&&0==this.graph.getAllTags().length&&(n.parentNode.removeChild(n),n=null)}));Z.style.display=0<this.graph.getAllTags().length?"inline-flex":
-"none"}}else"lightbox"==H?this.lightboxEnabled&&P(mxUtils.bind(this,function(){try{this.showLightbox()}catch(aa){alert(aa.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(H=this.graphConfig["toolbar-buttons"][H],null!=H&&(H.elem=P(null==H.enabled||H.enabled?H.handler:function(){},H.image,H.title,H.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*D);null!=this.graphConfig.title&&(l=
-b.ownerDocument.createElement("div"),l.style.display="inline-flex",l.style.position="relative",l.style.alignItems="center",l.style.padding="6px",l.style.fontFamily=GraphViewer.cssFontFamily,l.style.fontSize="12px",l.style.cursor="default",l.style.color="light-dark(#000000, #ffffff)",l.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),f.appendChild(l),this.filename=l);this.minToolbarWidth=34*D;var ha=b.style.border,
-ca=mxUtils.bind(this,function(){f.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";f.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var aa=b.getBoundingClientRect(),oa=mxUtils.getScrollOrigin(document.body);oa="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-oa.x,top:-oa.y};aa={left:aa.left-oa.left,top:aa.top-oa.top,bottom:aa.bottom-oa.top,right:aa.right-oa.left};f.style.left=
-aa.left+"px";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=aa.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=aa.top+1+"px"):f.style.top=aa.top+"px";"1px solid transparent"==ha&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(f);var da=mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f);null!=n&&(n.parentNode.removeChild(n),n=null);null!=g&&(g.parentNode.removeChild(g),g=null);
-b.style.border=ha});mxEvent.addListener(document,"mousemove",function(ka){for(ka=mxEvent.getSource(ka);null!=ka;){if(ka==b||ka==f||ka==g||ka==n)return;ka=ka.parentNode}da()});mxEvent.addListener(document.body,"mouseleave",function(ka){da()})}else f.style.top=-this.toolbarHeight+"px",b.appendChild(f)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ca):ca();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=f.parentNode&&ca()})).observe(b)};
-GraphViewer.prototype.createToolbarButton=function(b,f,l,u){var y=document.createElement("div");y.style.borderRight="1px solid #d0d0d0";y.style.display="inline-flex";y.style.alignItems="center";y.style.padding="6px";mxEvent.addListener(y,"click",b);null!=l&&y.setAttribute("title",l);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",f);b.style.width="18px";b.className="geAdaptiveAsset";null==u||u?(mxEvent.addListener(y,"mouseenter",function(){y.style.backgroundColor=
+this.toolbarZIndex;f.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";f.style.height=this.toolbarHeight+"px";var m=mxUtils.bind(this,function(){this.isDarkMode()?(f.classList.add("geDarkMode"),f.style.colorScheme="dark"):(f.classList.remove("geDarkMode"),f.style.colorScheme="light")});this.addListener("darkModeChanged",m);this.toolbar=f;m();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");
+mxUtils.setOpacity(f,30);var t=null,y=null,q=mxUtils.bind(this,function(ba){null!=t&&(window.clearTimeout(t),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);t=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,0);t=null;y=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";y=null}),100)}),ba||200)}),B=mxUtils.bind(this,function(ba){null!=t&&(window.clearTimeout(t),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);f.style.display=
+"flex";mxUtils.setOpacity(f,ba||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||(B(30),q())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":"mousemove",function(ba){mxEvent.consume(ba)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(ba){B(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(ba){B(100);mxEvent.consume(ba)}));mxEvent.addListener(f,"mouseleave",
+mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||B(30)}));var I=this.graph,S=I.getTolerance();I.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ba,na){this.startX=na.getGraphX();this.startY=na.getGraphY();this.scrollLeft=I.container.scrollLeft;this.scrollTop=I.container.scrollTop},mouseMove:function(ba,na){},mouseUp:function(ba,na){mxEvent.isTouchEvent(na.getEvent())&&Math.abs(this.scrollLeft-I.container.scrollLeft)<S&&Math.abs(this.scrollTop-I.container.scrollTop)<
+S&&Math.abs(this.startX-na.getGraphX())<S&&Math.abs(this.startY-na.getGraphY())<S&&(0<parseFloat(f.style.opacity||0)?q():B(30))}})}m=this.toolbarItems;for(var D=0,P=mxUtils.bind(this,function(ba,na,ca,ka){ba=this.createToolbarButton(ba,na,ca,ka);f.appendChild(ba);D++;return ba}),c=this.graph.getModel(),g=null,l=null,n=null,x=null,F=0;F<m.length;F++){var G=m[F];if("pages"==G){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";
+x.style.padding="4px";x.style.fontFamily=GraphViewer.cssFontFamily;x.style.fontSize="12px";x.style.cursor="default";x.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(x,70);var L=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.chevronLeftImage,mxResources.get("previousPage")||"Previous Page");L.style.borderRightStyle="none";L.style.paddingLeft="0px";L.style.paddingRight="0px";f.appendChild(x);var M=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.chevronRightImage,mxResources.get("nextPage")||"Next Page");M.style.paddingLeft="0px";M.style.paddingRight="0px";G=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,this.currentPage+1+" / "+this.diagrams.length);x.style.display=1<this.diagrams.length?"inline-flex":"none";L.style.display=x.style.display;M.style.display=x.style.display});this.addListener("graphChanged",G);G()}else if("zoom"==G)this.zoomEnabled&&(P(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),P(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),P(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==G){if(this.layersEnabled){var K=P(mxUtils.bind(this,function(ba){if(null!=g)g.parentNode.removeChild(g),
+g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ca=this.graph.getGraphBounds(),ka=this.graph.view;0>ca.x||0>ca.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ka.translate.clone(),scale:ka.scale}):null!=this.graph.originalViewState&&0<ca.x/ka.scale+this.graph.originalViewState.translate.x-ka.translate.x&&0<ca.y/ka.scale+this.graph.originalViewState.translate.y-
+ka.translate.y&&(ka.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ka.translate.clone(),scale:ka.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});ba=K.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=GraphViewer.cssFontFamily;
+g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;g.style.color="#000";mxUtils.setOpacity(g,85);var na=mxUtils.getDocumentScrollOrigin(document);g.style.left=na.x+ba.left-1+"px";g.style.top=na.y+ba.bottom-2+"px";this.isDarkMode()&&(g.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");c.addListener(mxEvent.CHANGE,
+function(){K.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"});K.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"}}else if("tags"==G){if(this.tagsEnabled){var Z=P(mxUtils.bind(this,function(ba){null==l&&(l=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),l.div.getElementsByTagName("div")[0].style.position="",l.div.style.maxHeight="160px",l.div.style.maxWidth="120px",l.div.style.padding="2px",l.div.style.overflow="auto",l.div.style.height="auto",l.div.style.position=
+"fixed",l.div.style.fontFamily=GraphViewer.cssFontFamily,l.div.style.fontSize="11px",l.div.style.backgroundColor="#eee",l.div.style.color="#000",l.div.style.border="1px solid #d0d0d0",l.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(l.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(l.div,85));if(null!=n)n.parentNode.removeChild(n),n=null;else{n=l.div;n.style.position="absolute";mxEvent.addListener(n,"mouseleave",function(){null!=n&&(n.parentNode.removeChild(n),n=null)});
+ba=Z.getBoundingClientRect();var na=mxUtils.getDocumentScrollOrigin(document);n.style.left=na.x+ba.left-1+"px";n.style.top=na.y+ba.bottom-2+"px";document.body.appendChild(n);l.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");c.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Z.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=n&&0==this.graph.getAllTags().length&&(n.parentNode.removeChild(n),n=null)}));Z.style.display=0<this.graph.getAllTags().length?"inline-flex":
+"none"}}else"lightbox"==G?this.lightboxEnabled&&P(mxUtils.bind(this,function(){try{this.showLightbox()}catch(ba){alert(ba.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(G=this.graphConfig["toolbar-buttons"][G],null!=G&&(G.elem=P(null==G.enabled||G.enabled?G.handler:function(){},G.image,G.title,G.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*D);null!=this.graphConfig.title&&(m=
+b.ownerDocument.createElement("div"),m.style.display="inline-flex",m.style.position="relative",m.style.alignItems="center",m.style.padding="6px",m.style.fontFamily=GraphViewer.cssFontFamily,m.style.fontSize="12px",m.style.cursor="default",m.style.color="light-dark(#000000, #ffffff)",m.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(m,this.graphConfig.title),mxUtils.setOpacity(m,70),f.appendChild(m),this.filename=m);this.minToolbarWidth=34*D;var ja=b.style.border,
+da=mxUtils.bind(this,function(){f.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";f.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ba=b.getBoundingClientRect(),na=mxUtils.getScrollOrigin(document.body);na="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-na.x,top:-na.y};ba={left:ba.left-na.left,top:ba.top-na.top,bottom:ba.bottom-na.top,right:ba.right-na.left};f.style.left=
+ba.left+"px";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=ba.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=ba.top+1+"px"):f.style.top=ba.top+"px";"1px solid transparent"==ja&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(f);var ca=mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f);null!=n&&(n.parentNode.removeChild(n),n=null);null!=g&&(g.parentNode.removeChild(g),g=null);
+b.style.border=ja});mxEvent.addListener(document,"mousemove",function(ka){for(ka=mxEvent.getSource(ka);null!=ka;){if(ka==b||ka==f||ka==g||ka==n)return;ka=ka.parentNode}ca()});mxEvent.addListener(document.body,"mouseleave",function(ka){ca()})}else f.style.top=-this.toolbarHeight+"px",b.appendChild(f)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",da):da();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=f.parentNode&&da()})).observe(b)};
+GraphViewer.prototype.createToolbarButton=function(b,f,m,t){var y=document.createElement("div");y.style.borderRight="1px solid #d0d0d0";y.style.display="inline-flex";y.style.alignItems="center";y.style.padding="6px";mxEvent.addListener(y,"click",b);null!=m&&y.setAttribute("title",m);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",f);b.style.width="18px";b.className="geAdaptiveAsset";null==t||t?(mxEvent.addListener(y,"mouseenter",function(){y.style.backgroundColor=
"light-dark(#dddddd,#333333)"}),mxEvent.addListener(y,"mouseleave",function(){y.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),y.style.cursor="pointer"):mxUtils.setOpacity(y,30);y.appendChild(b);return y};
-GraphViewer.prototype.disableButton=function(b,f){var l=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=l&&(mxUtils.setOpacity(l.elem,30),mxEvent.removeListener(l.elem,"click",l.handler),mxEvent.addListener(l.elem,"mouseenter",function(){l.elem.style.backgroundColor="#eee"}),f&&l.elem.setAttribute("title",f))};
-GraphViewer.prototype.addClickHandler=function(b,f){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(l,u,y){if(null==u)for(var q=mxEvent.getSource(l);q!=b.container&&null!=q&&null==u;)"a"==q.nodeName.toLowerCase()&&(u=q.getAttribute("href")),q=q.parentNode;null!=f?null==u||b.isCustomLink(u)?mxEvent.consume(l):b.isExternalProtocol(u)||b.isBlankLink(u)||window.setTimeout(function(){f.destroy()},0):null!=u&&null==f&&b.isCustomLink(u)&&
-(mxEvent.isTouchEvent(l)||!mxEvent.isPopupTrigger(l))&&b.customLinkClicked(u,y)&&(mxUtils.clearSelection(),mxEvent.consume(l))}),mxUtils.bind(this,function(l){if(null==f&&this.lightboxClickEnabled&&(!mxEvent.isTouchEvent(l)||0==this.toolbarItems.length))try{this.showLightbox()}catch(u){alert(u.message)}}))};
-GraphViewer.prototype.showLightbox=function(b,f,l){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;l={client:1,target:null!=l?l:"blank"};b&&(l.edit=this.graphConfig.edit||"_blank");if(null!=f?f:1)l.close=1;this.layersEnabled&&(l.layers=1);this.tagsEnabled&&(l.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(l.nav=1);null!=this.graphConfig&&null!=
-this.graphConfig.highlight&&(l.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(l.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(u){"ready"==u.data&&u.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):l.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(l.dev=
-"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(l)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
-GraphViewer.prototype.showLocalLightbox=function(b){var f=document.createElement("div");f.style.position="fixed";f.style.top="0";f.style.left="0";f.style.bottom="0";f.style.right="0";f.style.zIndex=this.lightboxZIndex;f.style.backgroundColor="#000000";mxUtils.setOpacity(f,70);document.body.appendChild(f);var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("src",Editor.closeBlackImage);l.style.position="fixed";l.style.top="32px";l.style.right="32px";l.style.cursor="pointer";
-l.className="geAdaptiveAsset";var u=mxUtils.bind(this,function(){q.setDarkMode(this.isDarkMode())});mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",u);q.destroy()}));urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=
-this.layersEnabled?"1":"0";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var y=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));y.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(y))}catch(m){}if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};
-EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var q=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",u);q.editor.editBlankUrl=this.editBlankUrl;q.refresh=function(){};var C=mxUtils.bind(this,function(m){27==m.keyCode&&q.destroy()}),J=this.initialOverflow,S=q.destroy;q.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",C),document.body.removeChild(f),
-document.body.removeChild(l),document.body.style.overflow=J,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var D=q.editor.graph,P=D.container;P.style.overflow="hidden";P.style.inset="0";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",C)):(f.style.display="none",l.style.display="none");var c=this;D.getImageFromBundles=function(m){return c.getImageUrl(m)};var g=q.createTemporaryGraph;q.createTemporaryGraph=
-function(){var m=g.apply(this,arguments);m.getImageFromBundles=function(n){return c.getImageUrl(n)};return m};this.graphConfig.move&&(D.isMoveCellsEvent=function(m){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(D,q);window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(f,"click",function(){q.destroy()}),P.style.outline="none",P.style.zIndex=this.lightboxZIndex,
-l.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(P)):(document.body.appendChild(P),document.body.appendChild(l)),q.setFileData(this.xml),mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)"),q.chromelessToolbar.style.bottom="60px",q.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(q.chromelessToolbar),q.getEditBlankXml=mxUtils.bind(this,function(){return this.xml}),this.showLayers(D,this.graph),q.lightboxFit(),q.chromelessResize()}catch(m){q.handleError(m,
+GraphViewer.prototype.disableButton=function(b,f){var m=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=m&&(mxUtils.setOpacity(m.elem,30),mxEvent.removeListener(m.elem,"click",m.handler),mxEvent.addListener(m.elem,"mouseenter",function(){m.elem.style.backgroundColor="#eee"}),f&&m.elem.setAttribute("title",f))};
+GraphViewer.prototype.addClickHandler=function(b,f){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(m,t,y){if(null==t)for(var q=mxEvent.getSource(m);q!=b.container&&null!=q&&null==t;)"a"==q.nodeName.toLowerCase()&&(t=q.getAttribute("href")),q=q.parentNode;null!=f?null==t||b.isCustomLink(t)?mxEvent.consume(m):b.isExternalProtocol(t)||b.isBlankLink(t)||window.setTimeout(function(){f.destroy()},0):null!=t&&null==f&&b.isCustomLink(t)&&
+(mxEvent.isTouchEvent(m)||!mxEvent.isPopupTrigger(m))&&b.customLinkClicked(t,y)&&(mxUtils.clearSelection(),mxEvent.consume(m))}),mxUtils.bind(this,function(m){if(null==f&&this.lightboxClickEnabled&&(!mxEvent.isTouchEvent(m)||0==this.toolbarItems.length))try{this.showLightbox()}catch(t){alert(t.message)}}))};
+GraphViewer.prototype.showLightbox=function(b,f,m){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;m={client:1,target:null!=m?m:"blank"};b&&(m.edit=this.graphConfig.edit||"_blank");if(null!=f?f:1)m.close=1;this.layersEnabled&&(m.layers=1);this.tagsEnabled&&(m.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(m.nav=1);null!=this.graphConfig&&null!=
+this.graphConfig.highlight&&(m.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(m.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(t){"ready"==t.data&&t.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):m.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(m.dev=
+"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(m)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
+GraphViewer.prototype.showLocalLightbox=function(b){var f=document.createElement("div");f.style.position="fixed";f.style.top="0";f.style.left="0";f.style.bottom="0";f.style.right="0";f.style.zIndex=this.lightboxZIndex;f.style.backgroundColor="#000000";mxUtils.setOpacity(f,70);document.body.appendChild(f);var m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("src",Editor.closeBlackImage);m.style.position="fixed";m.style.top="32px";m.style.right="32px";m.style.cursor="pointer";
+m.className="geAdaptiveAsset";var t=mxUtils.bind(this,function(){q.setDarkMode(this.isDarkMode())});mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",t);q.destroy()}));urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=
+this.layersEnabled?"1":"0";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var y=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));y.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(y))}catch(l){}if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};
+EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var q=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",t);q.editor.editBlankUrl=this.editBlankUrl;q.refresh=function(){};var B=mxUtils.bind(this,function(l){27==l.keyCode&&q.destroy()}),I=this.initialOverflow,S=q.destroy;q.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",B),document.body.removeChild(f),
+document.body.removeChild(m),document.body.style.overflow=I,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var D=q.editor.graph,P=D.container;P.style.overflow="hidden";P.style.inset="0";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",B)):(f.style.display="none",m.style.display="none");var c=this;D.getImageFromBundles=function(l){return c.getImageUrl(l)};var g=q.createTemporaryGraph;q.createTemporaryGraph=
+function(){var l=g.apply(this,arguments);l.getImageFromBundles=function(n){return c.getImageUrl(n)};return l};this.graphConfig.move&&(D.isMoveCellsEvent=function(l){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(D,q);window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(f,"click",function(){q.destroy()}),P.style.outline="none",P.style.zIndex=this.lightboxZIndex,
+m.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(P)):(document.body.appendChild(P),document.body.appendChild(m)),q.setFileData(this.xml),mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)"),q.chromelessToolbar.style.bottom="60px",q.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(q.chromelessToolbar),q.getEditBlankXml=mxUtils.bind(this,function(){return this.xml}),this.showLayers(D,this.graph),q.lightboxFit(),q.chromelessResize()}catch(l){q.handleError(l,
null,function(){q.destroy()})}}),0);return q};Dialog.prototype.getDocumentSize=function(){return new mxRectangle(0,0,Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0))};
GraphViewer.prototype.updateTitle=function(b,f){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",f||b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",f||b))};
-GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(f){try{f.innerText="",GraphViewer.createViewerForElement(f)}catch(l){f.innerText=l.message,null!=window.console&&console.error(l)}})};
-GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var f=document.getElementsByClassName(b);b=[];for(var l=0;l<f.length;l++)b.push(f[l]);return b}var u=document.getElementsByTagName("*");f=[];for(l=0;l<u.length;l++){var y=u[l].className;null!=y&&0<y.length&&(y=y.split(" "),0<=mxUtils.indexOf(y,b)&&f.push(u[l]))}return f};
-GraphViewer.createViewerForElement=function(b,f){var l=b.getAttribute("data-mxgraph");if(null!=l){var u=JSON.parse(l),y=function(q){q=mxUtils.parseXml(q);q=new GraphViewer(b,q.documentElement,u);null!=f&&f(q)};null!=u.url?GraphViewer.getUrl(u.url,function(q){y(q)}):y(u.xml)}};
-GraphViewer.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));for(var f="",l=0;l<window.location.ancestorOrigins.length;l++)if(f+=" -> "+window.location.ancestorOrigins[l],f.endsWith("dan6v7pm1f1a1.cloudfront.net")||f.endsWith("confluence-cloud-excalidraw-ll3likebca-uc.a.run.app"))return!0;
-(b.endsWith("ac.draw.io")||b.endsWith("aj.draw.io"))&&1==window.location.ancestorOrigins.length&&window.location.ancestorOrigins[0]&&window.location.ancestorOrigins[0].endsWith(".atlassian.net")}}catch(u){}return!1};GraphViewer.darkBackgroundColor=Editor.darkColor;GraphViewer.cssFontFamily=Editor.defaultHtmlFont;GraphViewer.shapeBackgroundColor=null;GraphViewer.viewerInitialized=function(b){};
+GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(f){try{f.innerText="",GraphViewer.createViewerForElement(f)}catch(m){f.innerText=m.message,null!=window.console&&console.error(m)}})};
+GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var f=document.getElementsByClassName(b);b=[];for(var m=0;m<f.length;m++)b.push(f[m]);return b}var t=document.getElementsByTagName("*");f=[];for(m=0;m<t.length;m++){var y=t[m].className;null!=y&&0<y.length&&(y=y.split(" "),0<=mxUtils.indexOf(y,b)&&f.push(t[m]))}return f};
+GraphViewer.createViewerForElement=function(b,f){var m=b.getAttribute("data-mxgraph");if(null!=m){var t=JSON.parse(m),y=function(q){q=mxUtils.parseXml(q);q=new GraphViewer(b,q.documentElement,t);null!=f&&f(q)};null!=t.url?GraphViewer.getUrl(t.url,function(q){y(q)}):y(t.xml)}};
+GraphViewer.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));for(var f="",m=0;m<window.location.ancestorOrigins.length;m++)if(f+=" -> "+window.location.ancestorOrigins[m],f.endsWith("dan6v7pm1f1a1.cloudfront.net")||f.endsWith("confluence-cloud-excalidraw-ll3likebca-uc.a.run.app"))return!0;
+(b.endsWith("ac.draw.io")||b.endsWith("aj.draw.io"))&&1==window.location.ancestorOrigins.length&&window.location.ancestorOrigins[0]&&window.location.ancestorOrigins[0].endsWith(".atlassian.net")}}catch(t){}return!1};GraphViewer.darkBackgroundColor=Editor.darkColor;GraphViewer.cssFontFamily=Editor.defaultHtmlFont;GraphViewer.shapeBackgroundColor=null;GraphViewer.viewerInitialized=function(b){};
GraphViewer.initCss=function(){try{null==GraphViewer.styleElement&&(GraphViewer.styleElement=document.createElement("style"),GraphViewer.styleElement.setAttribute("type","text/css"),GraphViewer.styleElement.innerHTML=GraphViewer.getCss(),GraphViewer.blockedAncestorFrames()||document.getElementsByTagName("head")[0].appendChild(GraphViewer.styleElement))}catch(b){}};
GraphViewer.getCss=function(){return[".geDarkMode img {\n filter: invert(1);\n}\ndiv.mxTooltip {\n box-shadow: 3px 3px 12px light-dark(#c0c0c0, transparent);"," background: light-dark(#ffffcc, "+GraphViewer.darkBackgroundColor+");"," border-style: solid;\n border-width: 1px;\n border-color: black;"," font-family: "+GraphViewer.cssFontFamily+";"," font-size: 8pt;\n position: absolute;\n cursor: default;\n padding: 4px;\n color: black;\n}\ntd.mxPopupMenuIcon div {\n width: 16px;\n height: 16px;\n}\ndiv.mxPopupMenu {\n box-shadow: 2px 2px 3px light-dark(#d5d5d5, transparent);\n background: white;\n position: absolute;\n border: 3px solid #e7e7e7;\n padding: 3px;\n}\ntable.mxPopupMenu {\n border-collapse: collapse;\n margin: 0px;\n}\ntd.mxPopupMenuItem {\n padding: 7px 30px;",
" font-family: "+GraphViewer.cssFontFamily+";"," font-size: 10pt;\n}\ntd.mxPopupMenuIcon {"," background-color: light-dark(#ffffff, "+GraphViewer.darkBackgroundColor+");"," padding: 0px;\n}\ntr.mxPopupMenuItemHover {\n background-color: #eeeeee;\n color: black;\n}\ntable.mxPopupMenu hr {\n color: #cccccc;\n background-color: #cccccc;\n border: none;\n height: 1px;\n}\ntable.mxPopupMenu tr {\n font-size: 4pt;\n}\n.geDialog, .geDialog table {"," font-family: "+GraphViewer.cssFontFamily+
";"," font-size: 10pt;\n border: none;\n margin: 0px;\n}\n.geDialog {\n position: fixed;"," background: light-dark(#ffffff, "+GraphViewer.darkBackgroundColor+");","\t color: light-dark(#3f3f3f, #c0c0c0);\n box-shadow: 0px 0px 2px 2px light-dark(#d5d5d5, transparent);\n border: 1px solid light-dark(#dadada, #565656);\n overflow: hidden;\n padding: 30px;\n left: 50%;\n top: 50%;\n max-height: 100%;\n max-width: 100%;\n\t box-sizing: border-box;\n transform: translate(-50%, -50%);",
"\t z-index: "+(GraphViewer.prototype.lightboxZIndex+2)+";","}\n.geBackground {"," background-color: light-dark(#ffffff, "+GraphViewer.darkBackgroundColor+");","\t position: fixed;\n left: 0px;\n top: 0px;\n right: 0px;\n bottom: 0px;\n opacity: 0.9;","\t z-index: "+(GraphViewer.prototype.lightboxZIndex+1)+";","}\n.geDialogTitle {\n box-sizing: border-box;\n white-space: nowrap;"," background: light-dark(#f1f3f4, "+GraphViewer.darkBackgroundColor+");"," border-bottom: 1px solid rgb(192, 192, 192);\n font-size: 15px;\n font-weight: bold;\n text-align: center;\n color: rgb(35, 86, 149);\n}\n.geDialogFooter {",
" background: light-dark(#f1f3f4, "+GraphViewer.darkBackgroundColor+");"," white-space: nowrap;\n text-align: right;\n box-sizing: border-box;\n border-top: 1px solid #e5e5e5;\n color: darkGray;\n}\n.geHelpIcon {\n width: 16px;\n margin: 0 4px;\n vertical-align: text-bottom;\n}\n.geBtn, .mxWindow .geBtn {\n background-color: light-dark(#eeeeee, #1b1d1e);\n border: 1px solid light-dark(#d8d8d8, #333333);\n color: light-dark(#3f3f3f, #c0c0c0);\n font-size: 13px;\n font-weight: 500;\n border-radius: 4px;\n height: 30px;\n margin: 0 0 0 8px;\n min-width: 72px;\n outline: 0;\n padding: 0 8px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n.geBtn:hover:not(.gePrimaryBtn), .geBtn:focus {\n border: 1px solid light-dark(#c6c6c6, #333333);\n background: light-dark(#dadada, #333333);\n}\n.geBtn:disabled {\n opacity: .5;\n}\n.gePrimaryBtn {\n background: linear-gradient(light-dark(#4d90fe, #003555) 0px, light-dark(#4787ed, #003555) 100%);\n border: 1px solid light-dark(#3079ed, transparent);\n color: light-dark(#ffffff, #c0c0c0);\n}\n.gePrimaryBtn:hover:not([disabled]) {\n background: linear-gradient(light-dark(#4d90fe, #004a77) 0px, light-dark(#357ae8, #004a77) 100%);\n border: 1px solid light-dark(#2f5bb7, transparent);\n}\n.geBtn:disabled {\n opacity: .5;\n}"].join("\n")};
-GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,f,l){if(null!=GraphViewer.cachedUrls[b])f(GraphViewer.cachedUrls[b]);else{var u=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;u.open("GET",b);u.onload=function(){f(null!=u.getText?u.getText():u.responseText)};u.onerror=l;u.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;
-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(l){return window.setTimeout(l,20)},f=function(l,u){function y(){this.q=[];this.add=function(x){this.q.push(x)};var m,n;this.call=function(){m=0;for(n=this.q.length;m<n;m++)this.q[m].call()}}function q(m,n){return m.currentStyle?m.currentStyle[n]:window.getComputedStyle?window.getComputedStyle(m,null).getPropertyValue(n):m.style[n]}function C(m,n){if(!m.resizedAttached)m.resizedAttached=
-new y,m.resizedAttached.add(n);else if(m.resizedAttached){m.resizedAttached.add(n);return}m.resizeSensor=document.createElement("div");m.resizeSensor.className="resize-sensor";m.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";m.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-m.appendChild(m.resizeSensor);"static"==q(m,"position")&&(m.style.position="relative");var x=m.resizeSensor.childNodes[0],F=x.childNodes[0],H=m.resizeSensor.childNodes[1],M=function(){F.style.width="100000px";F.style.height="100000px";x.scrollLeft=1E5;x.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};M();var L=!1,K=function(){m.resizedAttached&&(L&&(m.resizedAttached.call(),L=!1),b(K))};b(K);var Z,ha,ca,aa;n=function(){if((ca=m.offsetWidth)!=Z||(aa=m.offsetHeight)!=ha)L=!0,Z=ca,ha=aa;M()};var oa=
-function(da,ka,ba){da.attachEvent?da.attachEvent("on"+ka,ba):da.addEventListener(ka,ba)};oa(x,"scroll",n);oa(H,"scroll",n)}var J=function(){GraphViewer.resizeSensorEnabled&&u()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,D=!1;(new ResizeObserver(function(){D||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){D=!0;J();S=null;D=!1},200))})).observe(l)}else{var P=Object.prototype.toString.call(l),c="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===
-P||"undefined"!==typeof jQuery&&l instanceof jQuery||"undefined"!==typeof Elements&&l instanceof Elements;if(c){P=0;for(var g=l.length;P<g;P++)C(l[P],J)}else C(l,J);this.detach=function(){if(c)for(var m=0,n=l.length;m<n;m++)f.detach(l[m]);else f.detach(l)}}};f.detach=function(l){l.resizeSensor&&(l.removeChild(l.resizeSensor),delete l.resizeSensor,delete l.resizedAttached)};window.ResizeSensor=f})();
+GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,f,m){if(null!=GraphViewer.cachedUrls[b])f(GraphViewer.cachedUrls[b]);else{var t=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;t.open("GET",b);t.onload=function(){f(null!=t.getText?t.getText():t.responseText)};t.onerror=m;t.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;
+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(m){return window.setTimeout(m,20)},f=function(m,t){function y(){this.q=[];this.add=function(x){this.q.push(x)};var l,n;this.call=function(){l=0;for(n=this.q.length;l<n;l++)this.q[l].call()}}function q(l,n){return l.currentStyle?l.currentStyle[n]:window.getComputedStyle?window.getComputedStyle(l,null).getPropertyValue(n):l.style[n]}function B(l,n){if(!l.resizedAttached)l.resizedAttached=
+new y,l.resizedAttached.add(n);else if(l.resizedAttached){l.resizedAttached.add(n);return}l.resizeSensor=document.createElement("div");l.resizeSensor.className="resize-sensor";l.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";l.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
+l.appendChild(l.resizeSensor);"static"==q(l,"position")&&(l.style.position="relative");var x=l.resizeSensor.childNodes[0],F=x.childNodes[0],G=l.resizeSensor.childNodes[1],L=function(){F.style.width="100000px";F.style.height="100000px";x.scrollLeft=1E5;x.scrollTop=1E5;G.scrollLeft=1E5;G.scrollTop=1E5};L();var M=!1,K=function(){l.resizedAttached&&(M&&(l.resizedAttached.call(),M=!1),b(K))};b(K);var Z,ja,da,ba;n=function(){if((da=l.offsetWidth)!=Z||(ba=l.offsetHeight)!=ja)M=!0,Z=da,ja=ba;L()};var na=
+function(ca,ka,aa){ca.attachEvent?ca.attachEvent("on"+ka,aa):ca.addEventListener(ka,aa)};na(x,"scroll",n);na(G,"scroll",n)}var I=function(){GraphViewer.resizeSensorEnabled&&t()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,D=!1;(new ResizeObserver(function(){D||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){D=!0;I();S=null;D=!1},200))})).observe(m)}else{var P=Object.prototype.toString.call(m),c="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===
+P||"undefined"!==typeof jQuery&&m instanceof jQuery||"undefined"!==typeof Elements&&m instanceof Elements;if(c){P=0;for(var g=m.length;P<g;P++)B(m[P],I)}else B(m,I);this.detach=function(){if(c)for(var l=0,n=m.length;l<n;l++)f.detach(m[l]);else f.detach(m)}}};f.detach=function(m){m.resizeSensor&&(m.removeChild(m.resizeSensor),delete m.resizeSensor,delete m.resizedAttached)};window.ResizeSensor=f})();
(function(){Editor.initMath();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/mxgraph/mxClient.js b/src/main/webapp/mxgraph/mxClient.js
index d10a0bcdf..f8fd01566 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"29.0.3",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:"29.2.2",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:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -1827,7 +1827,8 @@ mxCodec.prototype.decodeCell=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&
mxCodec.prototype.insertIntoGraph=function(a){var b=a.parent,c=a.getTerminal(!0),d=a.getTerminal(!1);a.setTerminal(null,!1);a.setTerminal(null,!0);a.parent=null;if(null!=b){if(b==a)throw Error(b.id+": Self Reference");b.insert(a)}null!=c&&c.insertEdge(a,!0);null!=d&&d.insertEdge(a,!1)};mxCodec.prototype.setAttribute=function(a,b,c){null!=b&&null!=c&&a.setAttribute(b,c)};
function mxObjectCodec(a,b,c,d){this.template=a;this.exclude=null!=b?b:[];this.idrefs=null!=c?c:[];this.mapping=null!=d?d:[];this.reverse={};for(var e in this.mapping)this.reverse[this.mapping[e]]=e}mxObjectCodec.allowEval=!1;mxObjectCodec.prototype.template=null;mxObjectCodec.prototype.exclude=null;mxObjectCodec.prototype.idrefs=null;mxObjectCodec.prototype.mapping=null;mxObjectCodec.prototype.reverse=null;mxObjectCodec.prototype.getName=function(){return mxUtils.getFunctionName(this.template.constructor)};
mxObjectCodec.prototype.cloneTemplate=function(){return new this.template.constructor};mxObjectCodec.prototype.getFieldName=function(a){if(null!=a){var b=this.reverse[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.getAttributeName=function(a){if(null!=a){var b=this.mapping[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.isExcluded=function(a,b,c,d){return b==mxObjectIdentity.FIELD_NAME||0<=mxUtils.indexOf(this.exclude,b)};
-mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));for(var d in b){var e=d,f=b[e];null==f||this.isExcluded(b,e,f,!0)||(mxUtils.isInteger(e)&&(e=null),this.encodeValue(a,b,e,f,c))}};
+mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};
+mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));var d=[],e;for(e in b){var f=e,g=b[f];null==g||this.isExcluded(b,f,g,!0)||(mxUtils.isInteger(f)?this.encodeValue(a,b,null,g,c):d.push({name:f,value:g}))}d.sort(function(k,l){return k.name<l.name?-1:k.name>l.name?1:0});for(e=0;e<d.length;e++)this.encodeValue(a,b,d[e].name,d[e].value,c)};
mxObjectCodec.prototype.encodeValue=function(a,b,c,d,e){if(null!=d){if(this.isReference(b,c,d,!0)){var f=a.getId(d);if(null==f){mxLog.warn("mxObjectCodec.encode: No ID for "+this.getName()+"."+c+"="+d);return}d=f}f=this.template[c];if(null==c||a.encodeDefaults||f!=d)c=this.getAttributeName(c),this.writeAttribute(a,b,c,d,e)}};mxObjectCodec.prototype.writeAttribute=function(a,b,c,d,e){"object"!=typeof d?this.writePrimitiveAttribute(a,b,c,d,e):this.writeComplexAttribute(a,b,c,d,e)};
mxObjectCodec.prototype.writePrimitiveAttribute=function(a,b,c,d,e){d=this.convertAttributeToXml(a,b,c,d,e);null==c?(b=a.document.createElement("add"),"function"==typeof d?b.appendChild(a.document.createTextNode(d)):a.setAttribute(b,"value",d),e.appendChild(b)):"function"!=typeof d&&a.setAttribute(e,c,d)};
mxObjectCodec.prototype.writeComplexAttribute=function(a,b,c,d,e){a=a.encode(d);null!=a?(null!=c&&a.setAttribute("as",c),e.appendChild(a)):mxLog.warn("mxObjectCodec.encode: No node for "+this.getName()+"."+c+": "+d)};mxObjectCodec.prototype.convertAttributeToXml=function(a,b,c,d){this.isBooleanAttribute(a,b,c,d)&&(d=1==d?"1":"0");return d};mxObjectCodec.prototype.isBooleanAttribute=function(a,b,c,d){return"undefined"==typeof d.length&&(1==d||0==d)};
diff --git a/src/main/webapp/mxgraph/src/io/mxObjectCodec.js b/src/main/webapp/mxgraph/src/io/mxObjectCodec.js
index 866d7272a..e3bdf9a61 100644
--- a/src/main/webapp/mxgraph/src/io/mxObjectCodec.js
+++ b/src/main/webapp/mxgraph/src/io/mxObjectCodec.js
@@ -437,6 +437,7 @@ mxObjectCodec.prototype.encode = function(enc, obj)
mxObjectCodec.prototype.encodeObject = function(enc, obj, node)
{
enc.setAttribute(node, 'id', enc.getId(obj));
+ var attrs = [];
for (var i in obj)
{
@@ -447,12 +448,36 @@ mxObjectCodec.prototype.encodeObject = function(enc, obj, node)
{
if (mxUtils.isInteger(name))
{
- name = null;
- }
-
- this.encodeValue(enc, obj, name, value, node);
+ this.encodeValue(enc, obj, null, value, node);
+ }
+ else
+ {
+ attrs.push({name: name, value: value});
+ }
}
}
+
+ // Sorts by name
+ attrs.sort(function(a, b)
+ {
+ if (a.name < b.name)
+ {
+ return -1;
+ }
+ else if (a.name > b.name)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+ });
+
+ for (var i = 0; i < attrs.length; i++)
+ {
+ this.encodeValue(enc, obj, attrs[i].name, attrs[i].value, node);
+ }
};
/**
diff --git a/src/main/webapp/resources/dia_nl.txt b/src/main/webapp/resources/dia_nl.txt
index 38ca19c1d..b84867021 100644
--- a/src/main/webapp/resources/dia_nl.txt
+++ b/src/main/webapp/resources/dia_nl.txt
@@ -1320,6 +1320,6 @@ confPublishErr=Een andere update conflicteerde met uw publicatie, probeer de bew
confACacheMapping=Verwijzingen van pagina-ID's opslaan
confARemImpPages=Geïmporteerde pagina's onthouden
delCachedData=Tijdelijke opgeslag wissen
-k15tPagesError=Error retrieving Scroll pages. Is Scroll Versions installed?
-drawioUninstalled=draw.io has been uninstalled, the editor will now close
-confAttachmentArchived=Diagram belongs to an archived page and cannot be loaded. Restore the page (ID: {1}) to load it.
+k15tPagesError=Fout bij ophalen Scrollpagina's. Is Scroll Versions geïnstalleerd?
+drawioUninstalled=draw.io is verwijderd, de editor zal nu sluiten
+confAttachmentArchived=Diagram behoort tot een gearchiveerde pagina en kan niet worden geladen. Herstel de pagina (ID: {1}) om deze te laden.
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 96f6b4470..ce41fc900 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){let e,i={};const s=(s,a)=>(s=new URL(s+".js",a).href,i[s]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()})).then((()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e})));self.define=(a,r)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(i[c])return;let o={};const n=e=>s(e,c),d={module:{uri:c},exports:o,require:n};i[c]=Promise.all(a.map((e=>d[e]||n(e)))).then((e=>(r(...e),o)))}}define(["./workbox-acfd85e3"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"38d90ece6dc5c40b357bc12ab64c1925"},{url:"js/main.js",revision:"a8d40469d3d72ab4b11059362f3dd825"},{url:"js/app.min.js",revision:"7e957f442f335bb0ff9087028f2e4c92"},{url:"js/extensions.min.js",revision:"9dbd8436c45fb61a4db5893540cbac0b"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"6aa26e69c9e9b58346317a6d52293add"},{url:"js/shapes-14-6-5.min.js",revision:"9d0ff8993440b0411b0b1243910f33ad"},{url:"js/math-print.js",revision:"ad9cf0f2f2b614eac58ea72499c1017f"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"ed4a663eb787c135a04e5f6c97bdaa47"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"e863f5e6833892f22492211663e3efe9"},{url:"js/viewer-static.min.js",revision:"901513b74bb74cc61de7916209b514e8"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/viewerPanel2.html",revision:"0dd1ee1343a46b5c03aedbc587450b84"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"85011efa68d638da560871ee2ab3a6fe"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"3dc56c6566abaa7af151a8359e5bb556"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"07043c1ee868dd425f7876da94bbc307"},{url:"connect/jira/fullscreen-viewer.js",revision:"a6be96b8ddc5a25196925713cf34d571"},{url:"plugins/connectJira.js",revision:"db54dba28f9f2510a00411a410c837a0"},{url:"plugins/cConf-comments.js",revision:"e4a4b5a0fb22393693d3b62968c50644"},{url:"plugins/cConf-1-4-8.js",revision:"9b5e217aed7dd67a665ea42311b4b0c3"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"ee77b4097838bb8af432b84975238dde"},{url:"connect/new_common/cac.js",revision:"443fb416a407b8a183d0c8f4ecf68808"},{url:"connect/gdrive_common/gac.js",revision:"ac3a28fa16c3e6a36af854fcfc018a81"},{url:"connect/onedrive_common/ac.js",revision:"37c626698573f4419ab9f7ecd7b4bb01"},{url:"connect/confluence/viewer-init.js",revision:"c5e51e32ac74414d8d518af83ee2781f"},{url:"connect/confluence/viewer.js",revision:"f25b33ded1392fbb5fcf11b7001f90cd"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"489bc44e46d6481277c3f2a5d81a2db6"},{url:"connect/confluence/includeDiagram.html",revision:"01b04b3f54f1e2e63fcf1df033d24519"},{url:"connect/confluence/macro-editor.js",revision:"b9000d6c20f30e4068f83bd0b56965ca"},{url:"math4/es5/ui/safe.js",revision:"540f14866ef7df930e923d164c211137"},{url:"math4/es5/core.js",revision:"366284f7ce6a80244ceaa3b8ee3e54e9"},{url:"math4/es5/input/tex/extensions/bbm.js",revision:"513ce4c980aacdcc90feec0713be74b1"},{url:"math4/es5/input/tex/extensions/html.js",revision:"51ffc0406fb08ecf28c53e72afe0a0ed"},{url:"math4/es5/input/tex/extensions/extpfeil.js",revision:"f272a36c89a652be5c65f28e353838b0"},{url:"math4/es5/input/tex/extensions/action.js",revision:"2a74c19cfefb234c2734e792c957c9a1"},{url:"math4/es5/input/tex/extensions/boldsymbol.js",revision:"f90dceccbe95e6404fde4f00eed2c8dd"},{url:"math4/es5/input/tex/extensions/cases.js",revision:"65cd3750c7490ac93cc68e52f74a1dab"},{url:"math4/es5/input/tex/extensions/colortbl.js",revision:"bfd4ec3e12e214119393fa61b0259f5d"},{url:"math4/es5/input/tex/extensions/verb.js",revision:"33057675c209f0b42365bcceb5288a44"},{url:"math4/es5/input/tex/extensions/unicode.js",revision:"92918f71eb0c857b36b138de9408eadc"},{url:"math4/es5/input/tex/extensions/cancel.js",revision:"3c69ed47f602c9052d603449f9d244ac"},{url:"math4/es5/input/tex/extensions/enclose.js",revision:"dceb251e090a0f9468eb668a2d2568d9"},{url:"math4/es5/input/tex/extensions/units.js",revision:"633ff0c3f4a982ee184fbca414d36425"},{url:"math4/es5/input/tex/extensions/color.js",revision:"2c905b4c025088fb367bfd66f7d67ba5"},{url:"math4/es5/input/tex/extensions/mathtools.js",revision:"7edddab4e756cd10637aeae4de404d75"},{url:"math4/es5/input/tex/extensions/begingroup.js",revision:"aa419405c6ad13e8b85137dcbd1c09dd"},{url:"math4/es5/input/tex/extensions/braket.js",revision:"598978a618d13df0329d00f242e7e7e9"},{url:"math4/es5/input/tex/extensions/dsfont.js",revision:"d4f5cb1231efc15a5a781366c0a6af6e"},{url:"math4/es5/input/tex/extensions/bbox.js",revision:"4036e6a76633738052eef578586f247a"},{url:"math4/es5/input/tex/extensions/amscd.js",revision:"c23bc24168bb563253bb1ef914e3ca32"},{url:"math4/es5/input/tex/extensions/textcomp.js",revision:"acdd5a6d8572b3693161533a5735671a"},{url:"math4/es5/input/tex/extensions/bussproofs.js",revision:"9e58e843a9ed1f94eee376e151d8eb58"},{url:"math4/es5/input/tex/extensions/bboldx.js",revision:"af20cca3c8cb6caa5e8544ab19d8679e"},{url:"math4/es5/input/tex/extensions/physics.js",revision:"82dfb1226c4797981024f28728cc5e1d"},{url:"math4/es5/input/tex/extensions/centernot.js",revision:"3e60d55d414becf276ae7874d935ba7e"},{url:"math4/es5/input/tex/extensions/gensymb.js",revision:"893f6dc84ea72d6e7cc2cca82d593aee"},{url:"math4/es5/input/tex/extensions/upgreek.js",revision:"8ec88557d9ffc45da864b9b2621439d7"},{url:"math4/es5/input/tex/extensions/empheq.js",revision:"0d474e9e342009b916cab0740be6ce1a"},{url:"math4/es5/input/tex/extensions/mhchem.js",revision:"9bfe80f6dd048c146c428aa40520f948"},{url:"math4/es5/input/asciimath.js",revision:"1937743af3c6d3ebc2813ea06cbf64cf"},{url:"math4/es5/input/tex.js",revision:"699c55bfd58543a167ac2377b7854c9c"},{url:"math4/es5/startup.js",revision:"89ab8999231997a2bf1e8729972ad276"},{url:"math4/es5/output/svg.js",revision:"517ba224cf88d8dd44c72fa492fcfa10"},{url:"math4/es5/fonts/mathjax-bbm-font-extension/svg.js",revision:"e0d34b8b0319e9e24e05185d7c6b3792"},{url:"math4/es5/fonts/mathjax-tex-font/svg.js",revision:"0a1b18e9e32f8870c8114a1735a64c42"},{url:"math4/es5/fonts/mathjax-bboldx-font-extension/svg.js",revision:"afa2753bd8d3f58c6bc505f3804f4d96"},{url:"math4/es5/fonts/mathjax-dsfont-font-extension/svg.js",revision:"f627b03dcf17ea1a9c0858980f9420f8"},{url:"math4/es5/fonts/mathjax-mhchem-font-extension/svg.js",revision:"bd5e3b97cf0ee565f5288cfcbfea71f3"},{url:"resources/dia.txt",revision:"a4729b9a37dec1735a5b08b5c91771af"},{url:"resources/dia_am.txt",revision:"259a948c27b27a286a0bf2d76e3b9d8d"},{url:"resources/dia_ar.txt",revision:"56e2a17d0bc9a5aabfbd81bde6a366d9"},{url:"resources/dia_bg.txt",revision:"cc06a434b1e2bb224b06a1139adf5209"},{url:"resources/dia_bn.txt",revision:"16167545c0bb7f87221f69fc77c34b6c"},{url:"resources/dia_bs.txt",revision:"3b716d105871dd9cf25b5f73a80215cc"},{url:"resources/dia_ca.txt",revision:"2cc2a991b6ae133db0c09af5fc52b9f4"},{url:"resources/dia_cs.txt",revision:"b155b354ace03ee78529ca081faccc98"},{url:"resources/dia_da.txt",revision:"2df28b4f0846caa39d9aea907d7b57c7"},{url:"resources/dia_de.txt",revision:"1904b0776af3be5b82159b826c3325cc"},{url:"resources/dia_el.txt",revision:"e4d12f6e9bc7e65a1a213949319937ea"},{url:"resources/dia_eo.txt",revision:"5f049d8603b0d8d983d1f77eadffcd82"},{url:"resources/dia_es.txt",revision:"81b54555792af4cfcab1231dd3b40d84"},{url:"resources/dia_et.txt",revision:"a60e315625676a7eb50a7cd83d049dda"},{url:"resources/dia_eu.txt",revision:"65befcd5722ec968390c6ed14549d98b"},{url:"resources/dia_fa.txt",revision:"3d2410c140948bc70f519e118a7cdaec"},{url:"resources/dia_fi.txt",revision:"e07efa83a635d381825a69d6f1331801"},{url:"resources/dia_fil.txt",revision:"e858695961fcd5a0f2f2f6d4a0397e02"},{url:"resources/dia_fr.txt",revision:"c358afd2c60b5abf4a0b670d19c452ef"},{url:"resources/dia_gl.txt",revision:"afbd61ed70166fa7293d7dd241065ea6"},{url:"resources/dia_gu.txt",revision:"0b7f0d63665fe0253e160aa4d75ef12c"},{url:"resources/dia_he.txt",revision:"dac7b75a977dabe6f74d4b52491d31be"},{url:"resources/dia_hi.txt",revision:"c7b7d695d7f18c29cf1e206df6225cfe"},{url:"resources/dia_hr.txt",revision:"db109e88eab935c112b800faaebc2af2"},{url:"resources/dia_hu.txt",revision:"f0c9b46856ce2151593e1a8335647e39"},{url:"resources/dia_id.txt",revision:"45c2a0d1e0c6926a5f3f5f0b1dab5e90"},{url:"resources/dia_it.txt",revision:"2e857aebd83e2378407aba045583417d"},{url:"resources/dia_ja.txt",revision:"2e5082f34188f2c9e974d2a4ba690172"},{url:"resources/dia_kn.txt",revision:"7d80dd8c5f97b3ca7a93918a5f7effa8"},{url:"resources/dia_ko.txt",revision:"82242262baa7ccc0104b13ecd4f571b8"},{url:"resources/dia_lt.txt",revision:"7c87793413f4f497505db44b076c733e"},{url:"resources/dia_lv.txt",revision:"3c8c5cd5a63c8bacce0a02994481bd65"},{url:"resources/dia_ml.txt",revision:"ab9bd05d5a46f3a015c7cc78e9f9ce06"},{url:"resources/dia_mr.txt",revision:"2b9f8a936f6405fb75fcb32ae45cf532"},{url:"resources/dia_ms.txt",revision:"79efb5bbd6783cda403d86715a99fb1f"},{url:"resources/dia_my.txt",revision:"0b83f270c50b612b0fc331c0e185ca18"},{url:"resources/dia_nl.txt",revision:"96737d875cd68a992aa6c088ad326456"},{url:"resources/dia_no.txt",revision:"bd8851d66ed0d0ddd6a1a2737872fe6c"},{url:"resources/dia_pl.txt",revision:"337fcc17dc1ecfd33da52fa20ccb510d"},{url:"resources/dia_pt-br.txt",revision:"b46225c7aba6f036fa7cd07f2f1bd36a"},{url:"resources/dia_pt.txt",revision:"b7955cf38fcb6685c17a18f0871aad10"},{url:"resources/dia_ro.txt",revision:"e5166c4a3a92f93b695bf05f18d012e0"},{url:"resources/dia_ru.txt",revision:"c8e52ef80990393b236bc21330e00f47"},{url:"resources/dia_si.txt",revision:"a89e725f42df43032ae7d3d21fed5309"},{url:"resources/dia_sk.txt",revision:"cf1f190adc8c3ba422e2e0034ab544ae"},{url:"resources/dia_sl.txt",revision:"e855e026a5eed3c6f66a5625fb007250"},{url:"resources/dia_sr.txt",revision:"e689adb77e19f9c69e4d43f4718469b4"},{url:"resources/dia_sv.txt",revision:"3a4b84baaaafc800b7866ffb4ecaaec6"},{url:"resources/dia_sw.txt",revision:"824f2a2aecc773e6ecbb26b713307c87"},{url:"resources/dia_ta.txt",revision:"7ec22334bd9e4b348388bf78f70bdf10"},{url:"resources/dia_te.txt",revision:"c098647bf0c52373e6098f6f3dd5a6e1"},{url:"resources/dia_th.txt",revision:"18703430dbccc50af3e374c93dadefe8"},{url:"resources/dia_tr.txt",revision:"aa82b3302c7c4875f8b2810de2f04db9"},{url:"resources/dia_uk.txt",revision:"b0c32b3ac364827dbf531c42c7210201"},{url:"resources/dia_vi.txt",revision:"c9862c2e37a1891b91f0ff23662c8969"},{url:"resources/dia_zh-tw.txt",revision:"dd3df77fe1a64808fdabe86d4064a84f"},{url:"resources/dia_zh.txt",revision:"57228ad690560909ff5218a60115bc0b"},{url:"favicon.ico",revision:"b2bf17349e4b50ce4ba311f079f8bf7d"},{url:"images/manifest.json",revision:"421b4fae5b46499348d194e1f93558c3"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{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/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{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/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){let e,i={};const s=(s,a)=>(s=new URL(s+".js",a).href,i[s]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()})).then((()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e})));self.define=(a,r)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(i[c])return;let o={};const n=e=>s(e,c),d={module:{uri:c},exports:o,require:n};i[c]=Promise.all(a.map((e=>d[e]||n(e)))).then((e=>(r(...e),o)))}}define(["./workbox-acfd85e3"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"38d90ece6dc5c40b357bc12ab64c1925"},{url:"js/main.js",revision:"a8d40469d3d72ab4b11059362f3dd825"},{url:"js/app.min.js",revision:"53e2b0214e8452e6eed3e22fe53024ec"},{url:"js/extensions.min.js",revision:"9dbd8436c45fb61a4db5893540cbac0b"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"6aa26e69c9e9b58346317a6d52293add"},{url:"js/shapes-14-6-5.min.js",revision:"9d0ff8993440b0411b0b1243910f33ad"},{url:"js/math-print.js",revision:"ad9cf0f2f2b614eac58ea72499c1017f"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"ed4a663eb787c135a04e5f6c97bdaa47"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"e863f5e6833892f22492211663e3efe9"},{url:"js/viewer-static.min.js",revision:"13d1b4192c998d46bba4a7b60275d927"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/viewerPanel2.html",revision:"0dd1ee1343a46b5c03aedbc587450b84"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"85011efa68d638da560871ee2ab3a6fe"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"3dc56c6566abaa7af151a8359e5bb556"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"07043c1ee868dd425f7876da94bbc307"},{url:"connect/jira/fullscreen-viewer.js",revision:"a6be96b8ddc5a25196925713cf34d571"},{url:"plugins/connectJira.js",revision:"db54dba28f9f2510a00411a410c837a0"},{url:"plugins/cConf-comments.js",revision:"e4a4b5a0fb22393693d3b62968c50644"},{url:"plugins/cConf-1-4-8.js",revision:"144bc6c568c98fb014ab0428337ff177"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"fc4347b8a6ff41d981d91989439af3be"},{url:"connect/new_common/cac.js",revision:"443fb416a407b8a183d0c8f4ecf68808"},{url:"connect/gdrive_common/gac.js",revision:"ac3a28fa16c3e6a36af854fcfc018a81"},{url:"connect/onedrive_common/ac.js",revision:"37c626698573f4419ab9f7ecd7b4bb01"},{url:"connect/confluence/viewer-init.js",revision:"c5e51e32ac74414d8d518af83ee2781f"},{url:"connect/confluence/viewer.js",revision:"e6e7d871e09a377391e690f37da03445"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"489bc44e46d6481277c3f2a5d81a2db6"},{url:"connect/confluence/includeDiagram.html",revision:"01b04b3f54f1e2e63fcf1df033d24519"},{url:"connect/confluence/macro-editor.js",revision:"b9000d6c20f30e4068f83bd0b56965ca"},{url:"math4/es5/ui/safe.js",revision:"540f14866ef7df930e923d164c211137"},{url:"math4/es5/core.js",revision:"366284f7ce6a80244ceaa3b8ee3e54e9"},{url:"math4/es5/input/tex/extensions/bbm.js",revision:"513ce4c980aacdcc90feec0713be74b1"},{url:"math4/es5/input/tex/extensions/html.js",revision:"51ffc0406fb08ecf28c53e72afe0a0ed"},{url:"math4/es5/input/tex/extensions/extpfeil.js",revision:"f272a36c89a652be5c65f28e353838b0"},{url:"math4/es5/input/tex/extensions/action.js",revision:"2a74c19cfefb234c2734e792c957c9a1"},{url:"math4/es5/input/tex/extensions/boldsymbol.js",revision:"f90dceccbe95e6404fde4f00eed2c8dd"},{url:"math4/es5/input/tex/extensions/cases.js",revision:"65cd3750c7490ac93cc68e52f74a1dab"},{url:"math4/es5/input/tex/extensions/colortbl.js",revision:"bfd4ec3e12e214119393fa61b0259f5d"},{url:"math4/es5/input/tex/extensions/verb.js",revision:"33057675c209f0b42365bcceb5288a44"},{url:"math4/es5/input/tex/extensions/unicode.js",revision:"92918f71eb0c857b36b138de9408eadc"},{url:"math4/es5/input/tex/extensions/cancel.js",revision:"3c69ed47f602c9052d603449f9d244ac"},{url:"math4/es5/input/tex/extensions/enclose.js",revision:"dceb251e090a0f9468eb668a2d2568d9"},{url:"math4/es5/input/tex/extensions/units.js",revision:"633ff0c3f4a982ee184fbca414d36425"},{url:"math4/es5/input/tex/extensions/color.js",revision:"2c905b4c025088fb367bfd66f7d67ba5"},{url:"math4/es5/input/tex/extensions/mathtools.js",revision:"7edddab4e756cd10637aeae4de404d75"},{url:"math4/es5/input/tex/extensions/begingroup.js",revision:"aa419405c6ad13e8b85137dcbd1c09dd"},{url:"math4/es5/input/tex/extensions/braket.js",revision:"598978a618d13df0329d00f242e7e7e9"},{url:"math4/es5/input/tex/extensions/dsfont.js",revision:"d4f5cb1231efc15a5a781366c0a6af6e"},{url:"math4/es5/input/tex/extensions/bbox.js",revision:"4036e6a76633738052eef578586f247a"},{url:"math4/es5/input/tex/extensions/amscd.js",revision:"c23bc24168bb563253bb1ef914e3ca32"},{url:"math4/es5/input/tex/extensions/textcomp.js",revision:"acdd5a6d8572b3693161533a5735671a"},{url:"math4/es5/input/tex/extensions/bussproofs.js",revision:"9e58e843a9ed1f94eee376e151d8eb58"},{url:"math4/es5/input/tex/extensions/bboldx.js",revision:"af20cca3c8cb6caa5e8544ab19d8679e"},{url:"math4/es5/input/tex/extensions/physics.js",revision:"82dfb1226c4797981024f28728cc5e1d"},{url:"math4/es5/input/tex/extensions/centernot.js",revision:"3e60d55d414becf276ae7874d935ba7e"},{url:"math4/es5/input/tex/extensions/gensymb.js",revision:"893f6dc84ea72d6e7cc2cca82d593aee"},{url:"math4/es5/input/tex/extensions/upgreek.js",revision:"8ec88557d9ffc45da864b9b2621439d7"},{url:"math4/es5/input/tex/extensions/empheq.js",revision:"0d474e9e342009b916cab0740be6ce1a"},{url:"math4/es5/input/tex/extensions/mhchem.js",revision:"9bfe80f6dd048c146c428aa40520f948"},{url:"math4/es5/input/asciimath.js",revision:"1937743af3c6d3ebc2813ea06cbf64cf"},{url:"math4/es5/input/tex.js",revision:"699c55bfd58543a167ac2377b7854c9c"},{url:"math4/es5/startup.js",revision:"89ab8999231997a2bf1e8729972ad276"},{url:"math4/es5/output/svg.js",revision:"517ba224cf88d8dd44c72fa492fcfa10"},{url:"math4/es5/fonts/mathjax-bbm-font-extension/svg.js",revision:"e0d34b8b0319e9e24e05185d7c6b3792"},{url:"math4/es5/fonts/mathjax-tex-font/svg.js",revision:"0a1b18e9e32f8870c8114a1735a64c42"},{url:"math4/es5/fonts/mathjax-bboldx-font-extension/svg.js",revision:"afa2753bd8d3f58c6bc505f3804f4d96"},{url:"math4/es5/fonts/mathjax-dsfont-font-extension/svg.js",revision:"f627b03dcf17ea1a9c0858980f9420f8"},{url:"math4/es5/fonts/mathjax-mhchem-font-extension/svg.js",revision:"bd5e3b97cf0ee565f5288cfcbfea71f3"},{url:"resources/dia.txt",revision:"a4729b9a37dec1735a5b08b5c91771af"},{url:"resources/dia_am.txt",revision:"259a948c27b27a286a0bf2d76e3b9d8d"},{url:"resources/dia_ar.txt",revision:"56e2a17d0bc9a5aabfbd81bde6a366d9"},{url:"resources/dia_bg.txt",revision:"cc06a434b1e2bb224b06a1139adf5209"},{url:"resources/dia_bn.txt",revision:"16167545c0bb7f87221f69fc77c34b6c"},{url:"resources/dia_bs.txt",revision:"3b716d105871dd9cf25b5f73a80215cc"},{url:"resources/dia_ca.txt",revision:"2cc2a991b6ae133db0c09af5fc52b9f4"},{url:"resources/dia_cs.txt",revision:"b155b354ace03ee78529ca081faccc98"},{url:"resources/dia_da.txt",revision:"2df28b4f0846caa39d9aea907d7b57c7"},{url:"resources/dia_de.txt",revision:"1904b0776af3be5b82159b826c3325cc"},{url:"resources/dia_el.txt",revision:"e4d12f6e9bc7e65a1a213949319937ea"},{url:"resources/dia_eo.txt",revision:"5f049d8603b0d8d983d1f77eadffcd82"},{url:"resources/dia_es.txt",revision:"81b54555792af4cfcab1231dd3b40d84"},{url:"resources/dia_et.txt",revision:"a60e315625676a7eb50a7cd83d049dda"},{url:"resources/dia_eu.txt",revision:"65befcd5722ec968390c6ed14549d98b"},{url:"resources/dia_fa.txt",revision:"3d2410c140948bc70f519e118a7cdaec"},{url:"resources/dia_fi.txt",revision:"e07efa83a635d381825a69d6f1331801"},{url:"resources/dia_fil.txt",revision:"e858695961fcd5a0f2f2f6d4a0397e02"},{url:"resources/dia_fr.txt",revision:"c358afd2c60b5abf4a0b670d19c452ef"},{url:"resources/dia_gl.txt",revision:"afbd61ed70166fa7293d7dd241065ea6"},{url:"resources/dia_gu.txt",revision:"0b7f0d63665fe0253e160aa4d75ef12c"},{url:"resources/dia_he.txt",revision:"dac7b75a977dabe6f74d4b52491d31be"},{url:"resources/dia_hi.txt",revision:"c7b7d695d7f18c29cf1e206df6225cfe"},{url:"resources/dia_hr.txt",revision:"db109e88eab935c112b800faaebc2af2"},{url:"resources/dia_hu.txt",revision:"f0c9b46856ce2151593e1a8335647e39"},{url:"resources/dia_id.txt",revision:"45c2a0d1e0c6926a5f3f5f0b1dab5e90"},{url:"resources/dia_it.txt",revision:"2e857aebd83e2378407aba045583417d"},{url:"resources/dia_ja.txt",revision:"2e5082f34188f2c9e974d2a4ba690172"},{url:"resources/dia_kn.txt",revision:"7d80dd8c5f97b3ca7a93918a5f7effa8"},{url:"resources/dia_ko.txt",revision:"82242262baa7ccc0104b13ecd4f571b8"},{url:"resources/dia_lt.txt",revision:"7c87793413f4f497505db44b076c733e"},{url:"resources/dia_lv.txt",revision:"3c8c5cd5a63c8bacce0a02994481bd65"},{url:"resources/dia_ml.txt",revision:"ab9bd05d5a46f3a015c7cc78e9f9ce06"},{url:"resources/dia_mr.txt",revision:"2b9f8a936f6405fb75fcb32ae45cf532"},{url:"resources/dia_ms.txt",revision:"79efb5bbd6783cda403d86715a99fb1f"},{url:"resources/dia_my.txt",revision:"0b83f270c50b612b0fc331c0e185ca18"},{url:"resources/dia_nl.txt",revision:"6dc36a1afc4ef55e4d3542b0068159eb"},{url:"resources/dia_no.txt",revision:"bd8851d66ed0d0ddd6a1a2737872fe6c"},{url:"resources/dia_pl.txt",revision:"337fcc17dc1ecfd33da52fa20ccb510d"},{url:"resources/dia_pt-br.txt",revision:"b46225c7aba6f036fa7cd07f2f1bd36a"},{url:"resources/dia_pt.txt",revision:"b7955cf38fcb6685c17a18f0871aad10"},{url:"resources/dia_ro.txt",revision:"e5166c4a3a92f93b695bf05f18d012e0"},{url:"resources/dia_ru.txt",revision:"c8e52ef80990393b236bc21330e00f47"},{url:"resources/dia_si.txt",revision:"a89e725f42df43032ae7d3d21fed5309"},{url:"resources/dia_sk.txt",revision:"cf1f190adc8c3ba422e2e0034ab544ae"},{url:"resources/dia_sl.txt",revision:"e855e026a5eed3c6f66a5625fb007250"},{url:"resources/dia_sr.txt",revision:"e689adb77e19f9c69e4d43f4718469b4"},{url:"resources/dia_sv.txt",revision:"3a4b84baaaafc800b7866ffb4ecaaec6"},{url:"resources/dia_sw.txt",revision:"824f2a2aecc773e6ecbb26b713307c87"},{url:"resources/dia_ta.txt",revision:"7ec22334bd9e4b348388bf78f70bdf10"},{url:"resources/dia_te.txt",revision:"c098647bf0c52373e6098f6f3dd5a6e1"},{url:"resources/dia_th.txt",revision:"18703430dbccc50af3e374c93dadefe8"},{url:"resources/dia_tr.txt",revision:"aa82b3302c7c4875f8b2810de2f04db9"},{url:"resources/dia_uk.txt",revision:"b0c32b3ac364827dbf531c42c7210201"},{url:"resources/dia_vi.txt",revision:"c9862c2e37a1891b91f0ff23662c8969"},{url:"resources/dia_zh-tw.txt",revision:"dd3df77fe1a64808fdabe86d4064a84f"},{url:"resources/dia_zh.txt",revision:"57228ad690560909ff5218a60115bc0b"},{url:"favicon.ico",revision:"b2bf17349e4b50ce4ba311f079f8bf7d"},{url:"images/manifest.json",revision:"421b4fae5b46499348d194e1f93558c3"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{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/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{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/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{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 14a3c4d57..3e7ebde0a 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":["../../../../../../private/var/folders/w3/8z182_j14fbd1p8pn7nc032h0000gn/T/e92dc4d002e0d7429e526045144b916b/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/Users/davidbenson/.nvm/versions/node/v22.14.0/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.skipWaiting();\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/bootstrap.js\",\n \"revision\": \"38d90ece6dc5c40b357bc12ab64c1925\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"a8d40469d3d72ab4b11059362f3dd825\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"7e957f442f335bb0ff9087028f2e4c92\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"9dbd8436c45fb61a4db5893540cbac0b\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"6aa26e69c9e9b58346317a6d52293add\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"9d0ff8993440b0411b0b1243910f33ad\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"ad9cf0f2f2b614eac58ea72499c1017f\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"ed4a663eb787c135a04e5f6c97bdaa47\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"e863f5e6833892f22492211663e3efe9\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"901513b74bb74cc61de7916209b514e8\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/viewerPanel2.html\",\n \"revision\": \"0dd1ee1343a46b5c03aedbc587450b84\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"85011efa68d638da560871ee2ab3a6fe\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"3dc56c6566abaa7af151a8359e5bb556\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"07043c1ee868dd425f7876da94bbc307\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"a6be96b8ddc5a25196925713cf34d571\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"db54dba28f9f2510a00411a410c837a0\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"e4a4b5a0fb22393693d3b62968c50644\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"9b5e217aed7dd67a665ea42311b4b0c3\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"ee77b4097838bb8af432b84975238dde\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"443fb416a407b8a183d0c8f4ecf68808\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"ac3a28fa16c3e6a36af854fcfc018a81\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"37c626698573f4419ab9f7ecd7b4bb01\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"c5e51e32ac74414d8d518af83ee2781f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"f25b33ded1392fbb5fcf11b7001f90cd\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"489bc44e46d6481277c3f2a5d81a2db6\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"01b04b3f54f1e2e63fcf1df033d24519\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"b9000d6c20f30e4068f83bd0b56965ca\"\n },\n {\n \"url\": \"math4/es5/ui/safe.js\",\n \"revision\": \"540f14866ef7df930e923d164c211137\"\n },\n {\n \"url\": \"math4/es5/core.js\",\n \"revision\": \"366284f7ce6a80244ceaa3b8ee3e54e9\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/bbm.js\",\n \"revision\": \"513ce4c980aacdcc90feec0713be74b1\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/html.js\",\n \"revision\": \"51ffc0406fb08ecf28c53e72afe0a0ed\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/extpfeil.js\",\n \"revision\": \"f272a36c89a652be5c65f28e353838b0\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/action.js\",\n \"revision\": \"2a74c19cfefb234c2734e792c957c9a1\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/boldsymbol.js\",\n \"revision\": \"f90dceccbe95e6404fde4f00eed2c8dd\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/cases.js\",\n \"revision\": \"65cd3750c7490ac93cc68e52f74a1dab\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/colortbl.js\",\n \"revision\": \"bfd4ec3e12e214119393fa61b0259f5d\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/verb.js\",\n \"revision\": \"33057675c209f0b42365bcceb5288a44\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/unicode.js\",\n \"revision\": \"92918f71eb0c857b36b138de9408eadc\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/cancel.js\",\n \"revision\": \"3c69ed47f602c9052d603449f9d244ac\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/enclose.js\",\n \"revision\": \"dceb251e090a0f9468eb668a2d2568d9\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/units.js\",\n \"revision\": \"633ff0c3f4a982ee184fbca414d36425\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/color.js\",\n \"revision\": \"2c905b4c025088fb367bfd66f7d67ba5\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/mathtools.js\",\n \"revision\": \"7edddab4e756cd10637aeae4de404d75\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/begingroup.js\",\n \"revision\": \"aa419405c6ad13e8b85137dcbd1c09dd\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/braket.js\",\n \"revision\": \"598978a618d13df0329d00f242e7e7e9\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/dsfont.js\",\n \"revision\": \"d4f5cb1231efc15a5a781366c0a6af6e\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/bbox.js\",\n \"revision\": \"4036e6a76633738052eef578586f247a\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/amscd.js\",\n \"revision\": \"c23bc24168bb563253bb1ef914e3ca32\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/textcomp.js\",\n \"revision\": \"acdd5a6d8572b3693161533a5735671a\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/bussproofs.js\",\n \"revision\": \"9e58e843a9ed1f94eee376e151d8eb58\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/bboldx.js\",\n \"revision\": \"af20cca3c8cb6caa5e8544ab19d8679e\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/physics.js\",\n \"revision\": \"82dfb1226c4797981024f28728cc5e1d\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/centernot.js\",\n \"revision\": \"3e60d55d414becf276ae7874d935ba7e\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/gensymb.js\",\n \"revision\": \"893f6dc84ea72d6e7cc2cca82d593aee\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/upgreek.js\",\n \"revision\": \"8ec88557d9ffc45da864b9b2621439d7\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/empheq.js\",\n \"revision\": \"0d474e9e342009b916cab0740be6ce1a\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/mhchem.js\",\n \"revision\": \"9bfe80f6dd048c146c428aa40520f948\"\n },\n {\n \"url\": \"math4/es5/input/asciimath.js\",\n \"revision\": \"1937743af3c6d3ebc2813ea06cbf64cf\"\n },\n {\n \"url\": \"math4/es5/input/tex.js\",\n \"revision\": \"699c55bfd58543a167ac2377b7854c9c\"\n },\n {\n \"url\": \"math4/es5/startup.js\",\n \"revision\": \"89ab8999231997a2bf1e8729972ad276\"\n },\n {\n \"url\": \"math4/es5/output/svg.js\",\n \"revision\": \"517ba224cf88d8dd44c72fa492fcfa10\"\n },\n {\n \"url\": \"math4/es5/fonts/mathjax-bbm-font-extension/svg.js\",\n \"revision\": \"e0d34b8b0319e9e24e05185d7c6b3792\"\n },\n {\n \"url\": \"math4/es5/fonts/mathjax-tex-font/svg.js\",\n \"revision\": \"0a1b18e9e32f8870c8114a1735a64c42\"\n },\n {\n \"url\": \"math4/es5/fonts/mathjax-bboldx-font-extension/svg.js\",\n \"revision\": \"afa2753bd8d3f58c6bc505f3804f4d96\"\n },\n {\n \"url\": \"math4/es5/fonts/mathjax-dsfont-font-extension/svg.js\",\n \"revision\": \"f627b03dcf17ea1a9c0858980f9420f8\"\n },\n {\n \"url\": \"math4/es5/fonts/mathjax-mhchem-font-extension/svg.js\",\n \"revision\": \"bd5e3b97cf0ee565f5288cfcbfea71f3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"a4729b9a37dec1735a5b08b5c91771af\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"259a948c27b27a286a0bf2d76e3b9d8d\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"56e2a17d0bc9a5aabfbd81bde6a366d9\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"cc06a434b1e2bb224b06a1139adf5209\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"16167545c0bb7f87221f69fc77c34b6c\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"3b716d105871dd9cf25b5f73a80215cc\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"2cc2a991b6ae133db0c09af5fc52b9f4\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"b155b354ace03ee78529ca081faccc98\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"2df28b4f0846caa39d9aea907d7b57c7\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"1904b0776af3be5b82159b826c3325cc\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"e4d12f6e9bc7e65a1a213949319937ea\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"5f049d8603b0d8d983d1f77eadffcd82\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"81b54555792af4cfcab1231dd3b40d84\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"a60e315625676a7eb50a7cd83d049dda\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"65befcd5722ec968390c6ed14549d98b\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"3d2410c140948bc70f519e118a7cdaec\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"e07efa83a635d381825a69d6f1331801\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"e858695961fcd5a0f2f2f6d4a0397e02\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"c358afd2c60b5abf4a0b670d19c452ef\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"afbd61ed70166fa7293d7dd241065ea6\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"0b7f0d63665fe0253e160aa4d75ef12c\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"dac7b75a977dabe6f74d4b52491d31be\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"c7b7d695d7f18c29cf1e206df6225cfe\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"db109e88eab935c112b800faaebc2af2\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"f0c9b46856ce2151593e1a8335647e39\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"45c2a0d1e0c6926a5f3f5f0b1dab5e90\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"2e857aebd83e2378407aba045583417d\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"2e5082f34188f2c9e974d2a4ba690172\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7d80dd8c5f97b3ca7a93918a5f7effa8\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"82242262baa7ccc0104b13ecd4f571b8\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"7c87793413f4f497505db44b076c733e\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"3c8c5cd5a63c8bacce0a02994481bd65\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"ab9bd05d5a46f3a015c7cc78e9f9ce06\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"2b9f8a936f6405fb75fcb32ae45cf532\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"79efb5bbd6783cda403d86715a99fb1f\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"0b83f270c50b612b0fc331c0e185ca18\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"96737d875cd68a992aa6c088ad326456\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"bd8851d66ed0d0ddd6a1a2737872fe6c\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"337fcc17dc1ecfd33da52fa20ccb510d\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"b46225c7aba6f036fa7cd07f2f1bd36a\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"b7955cf38fcb6685c17a18f0871aad10\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"e5166c4a3a92f93b695bf05f18d012e0\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"c8e52ef80990393b236bc21330e00f47\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"a89e725f42df43032ae7d3d21fed5309\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"cf1f190adc8c3ba422e2e0034ab544ae\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"e855e026a5eed3c6f66a5625fb007250\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"e689adb77e19f9c69e4d43f4718469b4\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"3a4b84baaaafc800b7866ffb4ecaaec6\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"824f2a2aecc773e6ecbb26b713307c87\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"7ec22334bd9e4b348388bf78f70bdf10\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"c098647bf0c52373e6098f6f3dd5a6e1\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"18703430dbccc50af3e374c93dadefe8\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"aa82b3302c7c4875f8b2810de2f04db9\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"b0c32b3ac364827dbf531c42c7210201\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"c9862c2e37a1891b91f0ff23662c8969\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"dd3df77fe1a64808fdabe86d4064a84f\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"57228ad690560909ff5218a60115bc0b\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"b2bf17349e4b50ce4ba311f079f8bf7d\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"421b4fae5b46499348d194e1f93558c3\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\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/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\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/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/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,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,gBACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,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,iCACPC,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,uBACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,+CACPC,SAAY,oCAEd,CACED,IAAO,0CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,0CACPC,SAAY,oCAEd,CACED,IAAO,0CACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,+CACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,0CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,+CACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,oDACPC,SAAY,oCAEd,CACED,IAAO,0CACPC,SAAY,oCAEd,CACED,IAAO,uDACPC,SAAY,oCAEd,CACED,IAAO,uDACPC,SAAY,oCAEd,CACED,IAAO,uDACPC,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,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,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,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"}
\ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/w3/8z182_j14fbd1p8pn7nc032h0000gn/T/2310a884f2842dd06d93962a906a3269/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/Users/davidbenson/.nvm/versions/node/v22.14.0/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.skipWaiting();\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/bootstrap.js\",\n \"revision\": \"38d90ece6dc5c40b357bc12ab64c1925\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"a8d40469d3d72ab4b11059362f3dd825\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"53e2b0214e8452e6eed3e22fe53024ec\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"9dbd8436c45fb61a4db5893540cbac0b\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"6aa26e69c9e9b58346317a6d52293add\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"9d0ff8993440b0411b0b1243910f33ad\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"ad9cf0f2f2b614eac58ea72499c1017f\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"ed4a663eb787c135a04e5f6c97bdaa47\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"e863f5e6833892f22492211663e3efe9\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"13d1b4192c998d46bba4a7b60275d927\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/viewerPanel2.html\",\n \"revision\": \"0dd1ee1343a46b5c03aedbc587450b84\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"85011efa68d638da560871ee2ab3a6fe\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"3dc56c6566abaa7af151a8359e5bb556\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"07043c1ee868dd425f7876da94bbc307\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"a6be96b8ddc5a25196925713cf34d571\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"db54dba28f9f2510a00411a410c837a0\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"e4a4b5a0fb22393693d3b62968c50644\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"144bc6c568c98fb014ab0428337ff177\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"fc4347b8a6ff41d981d91989439af3be\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"443fb416a407b8a183d0c8f4ecf68808\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"ac3a28fa16c3e6a36af854fcfc018a81\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"37c626698573f4419ab9f7ecd7b4bb01\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"c5e51e32ac74414d8d518af83ee2781f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"e6e7d871e09a377391e690f37da03445\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"489bc44e46d6481277c3f2a5d81a2db6\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"01b04b3f54f1e2e63fcf1df033d24519\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"b9000d6c20f30e4068f83bd0b56965ca\"\n },\n {\n \"url\": \"math4/es5/ui/safe.js\",\n \"revision\": \"540f14866ef7df930e923d164c211137\"\n },\n {\n \"url\": \"math4/es5/core.js\",\n \"revision\": \"366284f7ce6a80244ceaa3b8ee3e54e9\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/bbm.js\",\n \"revision\": \"513ce4c980aacdcc90feec0713be74b1\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/html.js\",\n \"revision\": \"51ffc0406fb08ecf28c53e72afe0a0ed\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/extpfeil.js\",\n \"revision\": \"f272a36c89a652be5c65f28e353838b0\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/action.js\",\n \"revision\": \"2a74c19cfefb234c2734e792c957c9a1\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/boldsymbol.js\",\n \"revision\": \"f90dceccbe95e6404fde4f00eed2c8dd\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/cases.js\",\n \"revision\": \"65cd3750c7490ac93cc68e52f74a1dab\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/colortbl.js\",\n \"revision\": \"bfd4ec3e12e214119393fa61b0259f5d\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/verb.js\",\n \"revision\": \"33057675c209f0b42365bcceb5288a44\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/unicode.js\",\n \"revision\": \"92918f71eb0c857b36b138de9408eadc\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/cancel.js\",\n \"revision\": \"3c69ed47f602c9052d603449f9d244ac\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/enclose.js\",\n \"revision\": \"dceb251e090a0f9468eb668a2d2568d9\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/units.js\",\n \"revision\": \"633ff0c3f4a982ee184fbca414d36425\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/color.js\",\n \"revision\": \"2c905b4c025088fb367bfd66f7d67ba5\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/mathtools.js\",\n \"revision\": \"7edddab4e756cd10637aeae4de404d75\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/begingroup.js\",\n \"revision\": \"aa419405c6ad13e8b85137dcbd1c09dd\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/braket.js\",\n \"revision\": \"598978a618d13df0329d00f242e7e7e9\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/dsfont.js\",\n \"revision\": \"d4f5cb1231efc15a5a781366c0a6af6e\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/bbox.js\",\n \"revision\": \"4036e6a76633738052eef578586f247a\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/amscd.js\",\n \"revision\": \"c23bc24168bb563253bb1ef914e3ca32\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/textcomp.js\",\n \"revision\": \"acdd5a6d8572b3693161533a5735671a\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/bussproofs.js\",\n \"revision\": \"9e58e843a9ed1f94eee376e151d8eb58\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/bboldx.js\",\n \"revision\": \"af20cca3c8cb6caa5e8544ab19d8679e\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/physics.js\",\n \"revision\": \"82dfb1226c4797981024f28728cc5e1d\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/centernot.js\",\n \"revision\": \"3e60d55d414becf276ae7874d935ba7e\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/gensymb.js\",\n \"revision\": \"893f6dc84ea72d6e7cc2cca82d593aee\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/upgreek.js\",\n \"revision\": \"8ec88557d9ffc45da864b9b2621439d7\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/empheq.js\",\n \"revision\": \"0d474e9e342009b916cab0740be6ce1a\"\n },\n {\n \"url\": \"math4/es5/input/tex/extensions/mhchem.js\",\n \"revision\": \"9bfe80f6dd048c146c428aa40520f948\"\n },\n {\n \"url\": \"math4/es5/input/asciimath.js\",\n \"revision\": \"1937743af3c6d3ebc2813ea06cbf64cf\"\n },\n {\n \"url\": \"math4/es5/input/tex.js\",\n \"revision\": \"699c55bfd58543a167ac2377b7854c9c\"\n },\n {\n \"url\": \"math4/es5/startup.js\",\n \"revision\": \"89ab8999231997a2bf1e8729972ad276\"\n },\n {\n \"url\": \"math4/es5/output/svg.js\",\n \"revision\": \"517ba224cf88d8dd44c72fa492fcfa10\"\n },\n {\n \"url\": \"math4/es5/fonts/mathjax-bbm-font-extension/svg.js\",\n \"revision\": \"e0d34b8b0319e9e24e05185d7c6b3792\"\n },\n {\n \"url\": \"math4/es5/fonts/mathjax-tex-font/svg.js\",\n \"revision\": \"0a1b18e9e32f8870c8114a1735a64c42\"\n },\n {\n \"url\": \"math4/es5/fonts/mathjax-bboldx-font-extension/svg.js\",\n \"revision\": \"afa2753bd8d3f58c6bc505f3804f4d96\"\n },\n {\n \"url\": \"math4/es5/fonts/mathjax-dsfont-font-extension/svg.js\",\n \"revision\": \"f627b03dcf17ea1a9c0858980f9420f8\"\n },\n {\n \"url\": \"math4/es5/fonts/mathjax-mhchem-font-extension/svg.js\",\n \"revision\": \"bd5e3b97cf0ee565f5288cfcbfea71f3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"a4729b9a37dec1735a5b08b5c91771af\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"259a948c27b27a286a0bf2d76e3b9d8d\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"56e2a17d0bc9a5aabfbd81bde6a366d9\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"cc06a434b1e2bb224b06a1139adf5209\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"16167545c0bb7f87221f69fc77c34b6c\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"3b716d105871dd9cf25b5f73a80215cc\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"2cc2a991b6ae133db0c09af5fc52b9f4\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"b155b354ace03ee78529ca081faccc98\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"2df28b4f0846caa39d9aea907d7b57c7\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"1904b0776af3be5b82159b826c3325cc\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"e4d12f6e9bc7e65a1a213949319937ea\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"5f049d8603b0d8d983d1f77eadffcd82\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"81b54555792af4cfcab1231dd3b40d84\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"a60e315625676a7eb50a7cd83d049dda\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"65befcd5722ec968390c6ed14549d98b\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"3d2410c140948bc70f519e118a7cdaec\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"e07efa83a635d381825a69d6f1331801\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"e858695961fcd5a0f2f2f6d4a0397e02\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"c358afd2c60b5abf4a0b670d19c452ef\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"afbd61ed70166fa7293d7dd241065ea6\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"0b7f0d63665fe0253e160aa4d75ef12c\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"dac7b75a977dabe6f74d4b52491d31be\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"c7b7d695d7f18c29cf1e206df6225cfe\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"db109e88eab935c112b800faaebc2af2\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"f0c9b46856ce2151593e1a8335647e39\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"45c2a0d1e0c6926a5f3f5f0b1dab5e90\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"2e857aebd83e2378407aba045583417d\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"2e5082f34188f2c9e974d2a4ba690172\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7d80dd8c5f97b3ca7a93918a5f7effa8\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"82242262baa7ccc0104b13ecd4f571b8\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"7c87793413f4f497505db44b076c733e\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"3c8c5cd5a63c8bacce0a02994481bd65\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"ab9bd05d5a46f3a015c7cc78e9f9ce06\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"2b9f8a936f6405fb75fcb32ae45cf532\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"79efb5bbd6783cda403d86715a99fb1f\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"0b83f270c50b612b0fc331c0e185ca18\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"6dc36a1afc4ef55e4d3542b0068159eb\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"bd8851d66ed0d0ddd6a1a2737872fe6c\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"337fcc17dc1ecfd33da52fa20ccb510d\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"b46225c7aba6f036fa7cd07f2f1bd36a\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"b7955cf38fcb6685c17a18f0871aad10\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"e5166c4a3a92f93b695bf05f18d012e0\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"c8e52ef80990393b236bc21330e00f47\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"a89e725f42df43032ae7d3d21fed5309\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"cf1f190adc8c3ba422e2e0034ab544ae\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"e855e026a5eed3c6f66a5625fb007250\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"e689adb77e19f9c69e4d43f4718469b4\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"3a4b84baaaafc800b7866ffb4ecaaec6\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"824f2a2aecc773e6ecbb26b713307c87\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"7ec22334bd9e4b348388bf78f70bdf10\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"c098647bf0c52373e6098f6f3dd5a6e1\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"18703430dbccc50af3e374c93dadefe8\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"aa82b3302c7c4875f8b2810de2f04db9\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"b0c32b3ac364827dbf531c42c7210201\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"c9862c2e37a1891b91f0ff23662c8969\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"dd3df77fe1a64808fdabe86d4064a84f\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"57228ad690560909ff5218a60115bc0b\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"b2bf17349e4b50ce4ba311f079f8bf7d\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"421b4fae5b46499348d194e1f93558c3\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\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/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\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/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/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,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,gBACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,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,iCACPC,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,uBACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,+CACPC,SAAY,oCAEd,CACED,IAAO,0CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,0CACPC,SAAY,oCAEd,CACED,IAAO,0CACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,+CACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,0CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,+CACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,oDACPC,SAAY,oCAEd,CACED,IAAO,0CACPC,SAAY,oCAEd,CACED,IAAO,uDACPC,SAAY,oCAEd,CACED,IAAO,uDACPC,SAAY,oCAEd,CACED,IAAO,uDACPC,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,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,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,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"}
\ No newline at end of file